@alipay/ams-checkout 2.0.26 → 2.0.27

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.
@@ -296,6 +296,6 @@ export var LogConfig = {
296
296
  version: 'iteration/20231021',
297
297
  mdata: {
298
298
  firstLogTime: Date.now(),
299
- sdkVersion: "2.0.26"
299
+ sdkVersion: "2.0.27"
300
300
  }
301
301
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "2.0.26",
3
+ "version": "2.0.27",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "exports": {
@@ -10,6 +10,9 @@
10
10
  "require": "./ams-checkout.js"
11
11
  },
12
12
  "./types": "./types.d.ts",
13
+ "./appearance-rules": {
14
+ "types": "./esm/modern/sdk/elements/appearanceRules.d.ts"
15
+ },
13
16
  "./antom": "./antom.d.ts",
14
17
  "./react-js": {
15
18
  "types": "./react-js.d.ts",
@@ -49,23 +52,23 @@
49
52
  "build:type": "dts-bundle-generator -o ./types/antom-web-sdk.d.ts ./src/index.ts --no-banner --silent --no-check",
50
53
  "build:w": "FATHER_BUILD_TYPE=only-umd STAGE_NAME=LOCAL father dev",
51
54
  "ci": "tnpm run cov",
55
+ "code-review-biz": "node .agents/skills/code-review-biz/scripts/code-review-cli.js",
56
+ "code-review-biz:init": "node .agents/skills/code-review-biz/scripts/lib/init.js init",
57
+ "code-review-biz:mr": "node .agents/skills/code-review-biz/scripts/code-review-cli.js --url=",
58
+ "code-review-biz:push": "node .agents/skills/code-review-biz/scripts/code-review-cli.js --mode=pre-push",
59
+ "code-review-biz:update": "node .agents/skills/code-review-biz/scripts/lib/init.js update",
52
60
  "cov": "jest --coverage --silent",
53
61
  "dev": "father dev",
54
62
  "e2e": "nyc playwright test",
55
63
  "e2e:create": "node scripts/e2e-create.js",
56
64
  "e2e:ui": "playwright test --ui",
57
- "extract": "opensdk extract && tspc -p tsconfig.build.json && rm -rf esm/modern/sdk",
65
+ "extract": "opensdk extract && tspc -p tsconfig.build.json && find esm/modern/sdk -type f ! -path '*/elements/appearanceRules.d.ts' -delete",
58
66
  "format": "prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"",
59
67
  "generateApi": "intl-oneapi generate && prettier --write src/modern/sdk/oneapi",
60
68
  "lint": "eslint ./src",
69
+ "prepare": "husky install || true",
61
70
  "test": "jest --coverage --silent",
62
- "tsc": "tsc --noEmit",
63
- "code-review-biz": "node .agents/skills/code-review-biz/scripts/code-review-cli.js",
64
- "code-review-biz:mr": "node .agents/skills/code-review-biz/scripts/code-review-cli.js --url=",
65
- "code-review-biz:push": "node .agents/skills/code-review-biz/scripts/code-review-cli.js --mode=pre-push",
66
- "code-review-biz:init": "node .agents/skills/code-review-biz/scripts/lib/init.js init",
67
- "code-review-biz:update": "node .agents/skills/code-review-biz/scripts/lib/init.js update",
68
- "prepare": "husky install || true"
71
+ "tsc": "tsc --noEmit"
69
72
  },
70
73
  "commitlint": {
71
74
  "extends": [
@@ -90,9 +93,6 @@
90
93
  "proxy-polyfill": "^0.3.2",
91
94
  "uuid": "^9.0.0"
92
95
  },
93
- "opensdk": {
94
- "name": "Antom"
95
- },
96
96
  "devDependencies": {
97
97
  "@antglobal/create-sdk-loader": "^1.0.5",
98
98
  "@babel/core": "^7.20.7",
package/types.d.ts CHANGED
@@ -208,12 +208,14 @@ export declare type AntomLayouts = 'tabs' | 'accordion';
208
208
  */
209
209
  export declare class AntomSDK extends BaseElementsFactory {
210
210
  static version: string;
211
+ private stopModalMessageMonitor;
211
212
  constructor(config?: AntomSDKConfig);
212
213
  protected canUseElements(): Array<ElementListItemType>;
213
214
  /**
214
215
  * @description 更新配置
215
216
  */
216
217
  updateConfig(config: Partial<BaseFactoryConfig>): void;
218
+ destroy(): void;
217
219
  /* Excluded from this release type: redirect */
218
220
  /* Excluded from this release type: openModal */
219
221
  elements(): Elements;
@@ -312,9 +314,6 @@ export declare const AntomSDKErrorCodes: {
312
314
  readonly NOT_SUPPORT_SUBMIT: "NOT_SUPPORT_SUBMIT";
313
315
  readonly UPDATE_CONFIG_TIMEOUT: "UPDATE_CONFIG_TIMEOUT";
314
316
  readonly UPDATE_CONFIG_NOT_READY: "UPDATE_CONFIG_NOT_READY";
315
- /**
316
- * 查询到的结果消息
317
- */
318
317
  readonly INVALID_MODAL_URL: "INVALID_MODAL_URL";
319
318
  readonly LOAD_DEBUGGER_FAILED: "LOAD_DEBUGGER_FAILED";
320
319
  readonly API_MISS_PARAMS: "API_MISS_PARAMS";
@@ -332,28 +331,100 @@ export declare type AntomSDKErrorCodes = (typeof AntomSDKErrorCodes)[keyof typeo
332
331
 
333
332
  export declare type AntomTheme = 'default' | 'agateGreen' | 'night' | 'nostalgicGray' | 'gamingPurple' | 'cherryBlossomPink' | 'light';
334
333
 
335
- export declare type AntomVariables = 'content-primary' | 'content-secondary' | 'content-tertiary' | 'content-quaternary' | 'background-primary' | 'background-secondary' | 'background-disable' | 'background-transparency' | 'border-primary' | 'border-secondary' | 'border-disable' | 'action-normal' | 'action-hover' | 'action-disable' | 'action-secondary' | 'state-failure' | 'state-warning' | 'state-success' | 'state-info' | 'state-marketing' | 'state-conventional' | 'radius-backup' | 'radius-module' | 'radius-component' | 'radius-button' | 'wrapper-padding' | 'stroke-default' | 'stroke-active' | 'fontFamily';
334
+ /**
335
+ * @deprecated Use {@link AppearanceVariables} (Token 2.0) instead.
336
+ * 保留仅为向后兼容,将在下一个 major 版本中删除。
337
+ */
338
+ export declare type AntomVariables = LegacyAppearanceVariables;
336
339
 
337
340
  /**
338
341
  * @description SDK UI组件的外观配置。
339
342
  * 控制主题、CSS变量、布局规则及显示设置。
340
343
  * @template Props - 自定义外观属性类型,默认为 DefaultAppearanceProps。
341
344
  */
342
- declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps> {
345
+ declare interface Appearance<Props extends Partial<DefaultAppearanceProps> = DefaultAppearanceProps, Rules extends CSS_2.Properties<string, number> = CSS_2.Properties<string, number>> {
343
346
  theme?: Props['theme'];
344
347
  variables?: PartialSpeKey<Props['variables'], string>;
345
- rules?: PartialSpeKey<Props['rules'], CSS_2.Properties<string, number>>;
348
+ rules?: PartialSpeKey<Props['rules'], Rules>;
346
349
  displaySetting?: PartialSpeKey<Props['displaySetting'], boolean>;
347
350
  layout?: Props['layout'];
348
351
  fonts?: FontSource[];
349
352
  }
350
353
 
351
- export declare type AppearanceSetting = {
352
- displaySetting: Record<'showCardBrandIcon', boolean>;
353
- theme: 'light' | 'dark';
354
- layout: 'accordion' | 'tabs';
354
+ /** Target-level layout declarations admitted before runtime capability intersection. */
355
+ export declare type AppearanceLayoutDeclarations = {
356
+ [Property in Exclude<AppearanceLayoutProperty, 'height'>]?: AppearanceSpacingValue;
357
+ } & {
358
+ /** Exact integer-pixel enum allocated by the target contract. */
359
+ readonly height?: `${number}px`;
355
360
  };
356
361
 
362
+ /** Controlled layout longhands intersected with the concrete Part at runtime. */
363
+ export declare type AppearanceLayoutProperty = 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft' | 'height';
364
+
365
+ /** Paint declarations accepted before WebApp and Components runtime validation. */
366
+ declare type AppearancePaintDeclarations = Partial<Record<Exclude<AppearancePaintProperty, 'fillOpacity' | 'strokeOpacity' | 'strokeWidth' | 'textDecorationStyle' | 'outlineStyle'>, string> & Record<'fillOpacity' | 'strokeOpacity' | 'strokeWidth', string | number> & {
367
+ textDecorationStyle: '-moz-initial' | 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset' | 'dashed' | 'dotted' | 'double' | 'solid' | 'wavy';
368
+ outlineStyle: '-moz-initial' | 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset' | 'auto' | 'dashed' | 'dotted' | 'double' | 'groove' | 'inset' | 'none' | 'outset' | 'ridge' | 'solid';
369
+ }>;
370
+
371
+ /** Paint-only property names exposed by the SDK contract. */
372
+ export declare type AppearancePaintProperty = 'color' | 'WebkitTextFillColor' | 'textDecorationColor' | 'textDecorationLine' | 'textDecorationStyle' | 'textShadow' | 'backgroundColor' | 'borderColor' | 'borderTopColor' | 'borderRightColor' | 'borderBottomColor' | 'borderLeftColor' | 'borderRadius' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomRightRadius' | 'borderBottomLeftRadius' | 'borderStyle' | 'boxShadow' | 'fill' | 'stroke' | 'fillOpacity' | 'strokeOpacity' | 'strokeWidth' | 'outlineColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'caretColor' | 'accentColor';
373
+
374
+ /** Paint declarations plus controlled typography and target-level layout fields. */
375
+ declare type AppearanceRuleDeclarations = AppearancePaintDeclarations & AppearanceLayoutDeclarations & {
376
+ /** Single font family identifier admitted only for authorized targets at runtime. */
377
+ readonly fontFamily?: string;
378
+ /** Integer pixel size admitted only for authorized text targets at runtime. */
379
+ readonly fontSize?: `${number}px`;
380
+ /** Controlled font weight admitted only for authorized text targets at runtime. */
381
+ readonly fontWeight?: 400 | 500 | 600 | 700;
382
+ /** Controlled font style admitted only for authorized text targets at runtime. */
383
+ readonly fontStyle?: 'normal' | 'italic';
384
+ };
385
+
386
+ /** Controlled pseudo-class accepted by the merchant selector grammar. */
387
+ declare type AppearanceRulePseudoClass = 'autofill';
388
+
389
+ /** Controlled pseudo-element accepted by the merchant selector grammar. */
390
+ declare type AppearanceRulePseudoElement = 'placeholder' | 'selection';
391
+
392
+ /**
393
+ * Optional state or controlled pseudo suffix on one alias.
394
+ */
395
+ export declare type AppearanceRuleScopeSuffix = '' | `:${AppearanceRuleState | AppearanceRulePseudoClass}` | `::${AppearanceRulePseudoElement}`;
396
+
397
+ /** One merchant alias with an optional semantic suffix. */
398
+ export declare type AppearanceRuleSelector<RuleAlias extends string> = `${RuleAlias}${AppearanceRuleScopeSuffix}`;
399
+
400
+ /** Semantic states accepted by the merchant selector grammar. */
401
+ declare type AppearanceRuleState = 'hover' | 'focus' | 'focus-visible' | 'active' | 'disabled' | 'loading' | 'selected' | 'checked' | 'expanded' | 'invalid' | 'success' | 'error';
402
+
403
+ /** Backward-compatible name for the Express appearance configuration. */
404
+ export declare type AppearanceSetting = ExpressAppearance;
405
+
406
+ /** Exact official spacing Token accepted by controlled margin and padding. */
407
+ export declare type AppearanceSpacingToken = `var(--spacing-${'base' | 'none' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'})`;
408
+
409
+ /** Runtime-constrained non-negative integer pixel value for spacing longhands. */
410
+ export declare type AppearanceSpacingValue = '0' | `${number}px` | AppearanceSpacingToken;
411
+
412
+ /**
413
+ * 对客公开 appearance variables 类型(Token 2.x,figma-v4「3 层 + 状态」命名)。
414
+ * 字段名为新 CSS 变量名去掉 '--' 前缀(如 color-text-primary)。
415
+ *
416
+ * 权威源:`antom-web-checkout-v2/packages/elements2/src/utils/themeConfig.ts` 的 `PUBLIC_TOKENS`
417
+ * (54 color + 4 radius + 10 spacing = 68 项)。本 union 是该清单的手工镜像,
418
+ * 增删 token 时必须两侧同步,否则商户会遇到「类型报错但运行时可用」的错位。
419
+ *
420
+ * 命名规则:`--color-<scene>-<level>[-<state>]`;brand 场景并入 scene 段的 camelCase
421
+ * (如 `color-backgroundBrand-primary-hover`),CSS 变量大小写敏感,不可改写为 kebab。
422
+ *
423
+ * @example
424
+ * variables: { 'color-text-primary': '#2a3a52', 'radius-sm': '4px' }
425
+ */
426
+ export declare type AppearanceVariables = 'color-background-primary' | 'color-background-primary-hover' | 'color-background-primary-active' | 'color-background-secondary' | 'color-background-secondary-hover' | 'color-background-secondary-active' | 'color-background-layout' | 'color-background-inverse' | 'color-background-disabled' | 'color-background-transparency' | 'color-background-mask' | 'color-background-success' | 'color-background-warning' | 'color-background-danger' | 'color-background-info' | 'color-background-neutral' | 'color-background-promotional' | 'color-backgroundBrand-primary' | 'color-backgroundBrand-primary-hover' | 'color-backgroundBrand-secondary' | 'color-backgroundBrand-secondary-hover' | 'color-backgroundBrand-tertiary' | 'color-backgroundBrand-disabled' | 'color-text-primary' | 'color-text-secondary' | 'color-text-tertiary' | 'color-text-inverse' | 'color-text-active' | 'color-text-disabled' | 'color-text-success' | 'color-text-warning' | 'color-text-danger' | 'color-text-info' | 'color-text-neutral' | 'color-text-promotional' | 'color-textBrand-primary' | 'color-textBrand-secondary' | 'color-textBrand-secondary-hover' | 'color-textBrand-disabled' | 'color-border-primary' | 'color-border-secondary' | 'color-border-inverse' | 'color-border-active' | 'color-border-subtle' | 'color-border-disabled' | 'color-border-success' | 'color-border-warning' | 'color-border-danger' | 'color-border-info' | 'color-border-neutral' | 'color-border-promotional' | 'color-borderBrand-primary' | 'color-borderBrand-primary-hover' | 'color-borderBrand-disabled' | 'radius-sm' | 'radius-md' | 'radius-lg' | 'radius-xl' | 'spacing-base' | 'spacing-none' | 'spacing-2xs' | 'spacing-xs' | 'spacing-sm' | 'spacing-md' | 'spacing-lg' | 'spacing-xl' | 'spacing-2xl' | 'spacing-3xl';
427
+
357
428
  declare interface AppleMerchantInfo {
358
429
  /**
359
430
  * @description Apple商户ID
@@ -742,10 +813,6 @@ declare interface BankInfo {
742
813
  hasSchemaUrl?: boolean;
743
814
  }
744
815
 
745
- declare interface BaseAppearance<A extends Partial<Appearance>> {
746
- appearance?: A;
747
- }
748
-
749
816
  /**
750
817
  * @description 内置基础的桥接事件映射类型
751
818
  */
@@ -2210,7 +2277,9 @@ declare interface CustomFontSource {
2210
2277
  * @public
2211
2278
  * @description CVV element app config type
2212
2279
  */
2213
- export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance>, BaseElementAppConfig {
2280
+ export declare interface CVVAppConfig extends BaseElementAppConfig {
2281
+ /** CVV appearance configuration including optional alias-only Rules. */
2282
+ appearance?: CVVAppearance;
2214
2283
  /**
2215
2284
  * @description sessionData
2216
2285
  */
@@ -2226,12 +2295,13 @@ export declare interface CVVAppConfig extends BaseAppearance<CVVAppearance>, Bas
2226
2295
  /* Excluded from this release type: paymentFlow */
2227
2296
  }
2228
2297
 
2229
- export declare type CVVAppearance = PickAppearance<CVVAppearanceProps>;
2298
+ export declare type CVVAppearance = PickAntomAppearance<CVVAppearanceProps>;
2230
2299
 
2231
2300
  export declare type CVVAppearanceProps = {
2232
2301
  theme: AntomTheme;
2233
- variables: AntomVariables;
2302
+ variables: AppearanceVariables | AntomVariables;
2234
2303
  fonts?: FontSource[];
2304
+ rules: AppearanceRuleSelector<string>;
2235
2305
  };
2236
2306
 
2237
2307
  /**
@@ -2241,6 +2311,12 @@ export declare class CVVElement extends BaseMainElement<CVVElementConfig, CVVEle
2241
2311
  static elementType: string;
2242
2312
  constructor(name: string, config: CVVElementConfig);
2243
2313
  /* Excluded from this release type: setup */
2314
+ /**
2315
+ * Updates CVV configuration while preserving the public Rules clear semantics.
2316
+ * @param newConfig Partial CVV configuration patch.
2317
+ * @returns The WebApp update acknowledgement.
2318
+ */
2319
+ updateConfig(newConfig: Partial<CVVAppConfig>): Promise<CVVElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
2244
2320
  /* Excluded from this release type: submit */
2245
2321
  protected focus(): void;
2246
2322
  protected blur(): void;
@@ -3125,11 +3201,11 @@ declare interface ExpPaymentOptionDetail {
3125
3201
  * @public
3126
3202
  * @description Express element app config type
3127
3203
  */
3128
- export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetting>, BaseElementAppConfig {
3204
+ export declare interface ExpressAppConfig extends BaseElementAppConfig {
3205
+ /** Express appearance configuration. */
3206
+ appearance?: ExpressAppearance;
3129
3207
  /** payment SessionData */
3130
3208
  sessionData?: string;
3131
- /** Business division (country/region) */
3132
- businessDivision?: string;
3133
3209
  /**
3134
3210
  * Amount & Currency
3135
3211
  *
@@ -3183,6 +3259,17 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
3183
3259
  /* Excluded from this release type: doMain */
3184
3260
  }
3185
3261
 
3262
+ /** Express element appearance configuration. */
3263
+ declare type ExpressAppearance = PickAntomAppearance<ExpressAppearanceProps>;
3264
+
3265
+ /** Express element appearance properties. */
3266
+ export declare type ExpressAppearanceProps = {
3267
+ displaySetting: 'showCardBrandIcon';
3268
+ theme: 'light' | 'dark';
3269
+ layout: 'accordion' | 'tabs';
3270
+ rules: AppearanceRuleSelector<string>;
3271
+ };
3272
+
3186
3273
  /** cancel 事件负载 */
3187
3274
  export declare interface ExpressCancelEvent {
3188
3275
  expressPaymentType: string;
@@ -3269,7 +3356,7 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
3269
3356
  * 用于 Native WebView 场景下 SDK 需要向商户透传跳转信息等。
3270
3357
  */
3271
3358
  private _emit;
3272
- updateConfig(newConfig: Pick<ExpressAppConfig, 'amount'>): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
3359
+ updateConfig(newConfig: ExpressAppConfig): Promise<ExpressElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
3273
3360
  /**
3274
3361
  * 商户在 confirm 回调内调用,触发实际支付提交。
3275
3362
  * iframe 收到 OPENSDK@COMPLETE_PAYMENT 后执行 submitPay / polling 等,
@@ -3284,6 +3371,7 @@ export declare class ExpressElement extends BaseMainElement<ExpressElementConfig
3284
3371
  };
3285
3372
  /** 用户是否手动关闭 3D 弹窗(透传 webapp COMPLETE_PAYMENT_RESULT.userCanceled3D) */
3286
3373
  userCanceled3D?: boolean;
3374
+ status?: 'SUCCESS' | 'CANCELLED' | 'FAIL' | 'PROCESSING';
3287
3375
  }>;
3288
3376
  setup(): Promise<Partial<ExpressAppConfig> | undefined>;
3289
3377
  private registerInternalListeners;
@@ -4318,6 +4406,58 @@ declare interface Language {
4318
4406
  country?: string;
4319
4407
  }
4320
4408
 
4409
+ /**
4410
+ * @deprecated Token 1.0 老字段类型 — 请迁移到 {@link AppearanceVariables}。
4411
+ * 所有字段均已废弃,运行时由 WebApp 侧 LEGACY_TO_NEW_TOKEN_MAP 翻译为新 token。
4412
+ *
4413
+ * @deprecated 'content-primary' → color-text-primary
4414
+ * @deprecated 'content-secondary' → color-text-secondary
4415
+ * @deprecated 'content-tertiary' → color-text-tertiary
4416
+ * @deprecated 'content-quaternary' → color-text-inverse
4417
+ * @deprecated 'background-primary' → color-background-primary
4418
+ * @deprecated 'background-secondary' → color-background-secondary
4419
+ * @deprecated 'background-disable' → color-background-disabled
4420
+ * @deprecated 'background-transparency' → color-background-transparency
4421
+ * @deprecated 'border-primary' → color-border-primary
4422
+ * @deprecated 'border-secondary' → color-border-secondary
4423
+ * @deprecated 'border-disable' → color-border-disabled
4424
+ * @deprecated 'border-active' → color-border-active
4425
+ * @deprecated 'action-normal' → 一对多 fan-out(无单值映射;运行时展开为 3 个新 token,老 key 不再注入):
4426
+ * - background/background-color → color-backgroundBrand-primary
4427
+ * - border/border-color/box-shadow → color-border-active
4428
+ * - color/文本/图标/勾选态 → color-text-active
4429
+ * @deprecated 'action-hover' → 一对多 fan-out(运行时展开为 2 个新 token,老 key 不再注入):
4430
+ * - background → color-backgroundBrand-primary-hover
4431
+ * - border → color-borderBrand-primary-hover
4432
+ * 文字色 color-textBrand-secondary-hover 不参与派生
4433
+ * (设计稿中与 bg/border 不同色阶),需要时请显式传入该新 token 键
4434
+ * @deprecated 'action-secondary' → color-backgroundBrand-secondary
4435
+ * @deprecated 'action-disable' → 一对多 fan-out(运行时展开为 2 个新 token,老 key 不再注入):
4436
+ * - background/background-color → color-backgroundBrand-disabled
4437
+ * - border/border-color → color-borderBrand-disabled
4438
+ * 文字色 color-textBrand-disabled 不参与派生
4439
+ * (设计稿中全部主题均与 bg/border 不同色阶),需要时请显式传入该新 token 键
4440
+ * @deprecated 'state-success' → color-text-success
4441
+ * @deprecated 'state-failure' → color-text-danger
4442
+ * @deprecated 'state-warning' → color-text-warning
4443
+ * @deprecated 'state-info' → color-text-info
4444
+ * @deprecated 'state-conventional' → color-text-neutral
4445
+ * @deprecated 'state-marketing' → color-text-promotional(color 上下文;background 上下文由 CSS 层直接迁移)
4446
+ * @deprecated 'radius-backup' → radius-sm
4447
+ * @deprecated 'radius-component' → radius-md
4448
+ * @deprecated 'radius-module' → radius-lg
4449
+ * @deprecated 'radius-button' → radius-lg(与 radius-module 同档合并)
4450
+ * @deprecated 'wrapper-padding' → spacing-lg
4451
+ * @deprecated 'stroke-default' → 由 Rules 机制接管
4452
+ * @deprecated 'stroke-active' → 由 Rules 机制接管
4453
+ *
4454
+ * 注:fan-out 展开基数以 figma-v4 设计稿的色阶一致性为准,故 action-hover / action-disable
4455
+ * 为 1→2 而非 1→3;三者合计派生 7 项。
4456
+ */
4457
+ export declare type LegacyAppearanceVariables = 'content-primary' | 'content-secondary' | 'content-tertiary' | 'content-quaternary' | 'background-primary' | 'background-secondary' | 'background-disable' | 'background-transparency' | 'border-primary' | 'border-secondary' | 'border-disable' | 'action-normal' | 'action-hover' | 'action-disable' | 'action-secondary' | 'state-failure' | 'state-warning' | 'state-success' | 'state-info' | 'state-marketing' | 'state-conventional' | 'radius-backup' | 'radius-module' | 'radius-component' | 'radius-button' | 'wrapper-padding' | 'stroke-default' | 'stroke-active'
4458
+ /** 非 Token 体系字段,由 WebApp 侧展开为 design-font-family-* 系列 */
4459
+ | 'fontFamily';
4460
+
4321
4461
  declare interface Link {
4322
4462
  /**
4323
4463
  * @description 发起关联的父元素,如国家
@@ -6881,7 +7021,7 @@ declare interface OtpChallengeActionForm {
6881
7021
  resendLeftTimes?: number;
6882
7022
  }
6883
7023
 
6884
- declare type PartialSpeKey<T, V> = Partial<T extends infer K extends string ? Record<K, V> : Record<string, V>>;
7024
+ declare type PartialSpeKey<T extends string | undefined, V> = Partial<Record<T extends string ? T : string, V>>;
6885
7025
 
6886
7026
  declare interface PayByLinkInfo {
6887
7027
  /**
@@ -6905,7 +7045,9 @@ declare interface PayByLinkInfo {
6905
7045
  /**
6906
7046
  * @description Payment element app config type
6907
7047
  */
6908
- export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearance>, BaseElementAppConfig {
7048
+ export declare interface PaymentAppConfig extends BaseElementAppConfig {
7049
+ /** Payment appearance configuration including optional alias-only Rules. */
7050
+ appearance?: PaymentAppearance;
6909
7051
  /**
6910
7052
  * @description sessionData,无法通过updateConfig更新
6911
7053
  */
@@ -6934,12 +7076,18 @@ export declare interface PaymentAppConfig extends BaseAppearance<PaymentAppearan
6934
7076
  /**
6935
7077
  * @description Payment element appearance type
6936
7078
  */
6937
- export declare type PaymentAppearance = PickAppearance<{
7079
+ export declare type PaymentAppearance = PickAntomAppearance<PaymentAppearanceProps>;
7080
+
7081
+ /**
7082
+ * @description Payment element appearance properties
7083
+ */
7084
+ export declare type PaymentAppearanceProps = {
6938
7085
  displaySetting: 'showPaymentMethodListWhenSingleOption' | 'showCardBrandIcon' | 'showRadioWhenAccordionLayout' | 'showCardCVV';
6939
7086
  theme: AntomTheme;
6940
- variables: AntomVariables;
7087
+ variables: AppearanceVariables | AntomVariables;
6941
7088
  layout: AntomLayouts;
6942
- }>;
7089
+ rules: AppearanceRuleSelector<string>;
7090
+ };
6943
7091
 
6944
7092
  /**
6945
7093
  * @description Payment element
@@ -6950,9 +7098,9 @@ export declare class PaymentElement extends BaseMainElement<PaymentElementConfig
6950
7098
  constructor(name: string, config: PaymentElementConfig);
6951
7099
  /* Excluded from this release type: setup */
6952
7100
  /**
6953
- * @description Update payment element configuration with amount validation
7101
+ * @description Update payment element configuration with amount validation and appearance Rules support
6954
7102
  */
6955
- updateConfig(newConfig: Pick<PaymentAppConfig, 'amount'>): Promise<PaymentElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
7103
+ updateConfig(newConfig: Partial<PaymentAppConfig>): Promise<PaymentElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
6956
7104
  /* Excluded from this release type: submit */
6957
7105
  protected focus(): void;
6958
7106
  protected blur(): void;
@@ -7660,6 +7808,7 @@ export declare interface PayPalConfig {
7660
7808
  channelMerchantAccountId?: string;
7661
7809
  /** Button style (fine-grained override) */
7662
7810
  style?: PayPalButtonStyle;
7811
+ businessDivision?: string;
7663
7812
  /** Callback to create PayPal order, no params, returns sessionData */
7664
7813
  createOrder?: () => Promise<string>;
7665
7814
  /** Callback when user changes shipping address, data is raw data returned by PayPal */
@@ -7679,12 +7828,15 @@ declare interface PeriodRule {
7679
7828
  periodCount?: number;
7680
7829
  }
7681
7830
 
7831
+ /** Builds an Antom appearance type with the restricted Rules declaration contract. */
7832
+ declare type PickAntomAppearance<T extends Record<string, any>> = PickAppearance<T, AppearanceRuleDeclarations>;
7833
+
7682
7834
  /**
7683
7835
  * @description 工具类型,仅从 Appearance 中拾取与 Props 类型匹配的属性。
7684
7836
  * 返回受 Props 中存在的键约束的部分外观对象。
7685
7837
  * @template Props - 要从 Appearance 中拾取的自定义外观属性类型。
7686
7838
  */
7687
- declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>> = Partial<Pick<Appearance<Props>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
7839
+ declare type PickAppearance<Props extends Partial<DefaultAppearanceProps>, Rules extends CSS_2.Properties<string, number> = CSS_2.Properties<string, number>> = Partial<Pick<Appearance<Props, Rules>, keyof Props extends infer k extends keyof Partial<Appearance> ? k : keyof Partial<Appearance>>>;
7688
7840
 
7689
7841
  /**
7690
7842
  * @description 政策信息,例如隐私链接,免责声明等
@@ -24382,7 +24534,9 @@ declare interface UserName {
24382
24534
  * @public
24383
24535
  * @description Vaulting element app config type
24384
24536
  */
24385
- export declare interface VaultingAppConfig extends BaseAppearance<VaultingAppearance>, BaseElementAppConfig {
24537
+ export declare interface VaultingAppConfig extends BaseElementAppConfig {
24538
+ /** Vaulting appearance configuration including optional alias-only Rules. */
24539
+ appearance?: VaultingAppearance;
24386
24540
  /**
24387
24541
  * @description sessionData,无法通过updateConfig更新
24388
24542
  */
@@ -24394,13 +24548,14 @@ export declare interface VaultingAppConfig extends BaseAppearance<VaultingAppear
24394
24548
  /* Excluded from this release type: _requestConfig */
24395
24549
  }
24396
24550
 
24397
- export declare type VaultingAppearance = PickAppearance<VaultingAppearanceProps>;
24551
+ export declare type VaultingAppearance = PickAntomAppearance<VaultingAppearanceProps>;
24398
24552
 
24399
24553
  export declare type VaultingAppearanceProps = {
24400
24554
  displaySetting: 'showCardBrandIcon';
24401
24555
  theme: AntomTheme;
24402
- variables: AntomVariables;
24556
+ variables: AppearanceVariables | AntomVariables;
24403
24557
  fonts?: FontSource[];
24558
+ rules: AppearanceRuleSelector<string>;
24404
24559
  };
24405
24560
 
24406
24561
  /**
@@ -24410,6 +24565,12 @@ export declare class VaultingElement extends BaseMainElement<VaultingElementConf
24410
24565
  static elementType: string;
24411
24566
  constructor(name: string, config: VaultingElementConfig);
24412
24567
  /* Excluded from this release type: setup */
24568
+ /**
24569
+ * Updates Vaulting configuration while preserving the public Rules clear semantics.
24570
+ * @param newConfig Partial Vaulting configuration patch.
24571
+ * @returns The WebApp update acknowledgement.
24572
+ */
24573
+ updateConfig(newConfig: Partial<VaultingAppConfig>): Promise<VaultingElementEvents['OPENSDK@UPDATE_CONFIG_REPLY']>;
24413
24574
  /* Excluded from this release type: submit */
24414
24575
  protected focus(): void;
24415
24576
  protected blur(): void;