@rokt/dcui-orchestrator 1.0.0 → 1.0.1-rc.0
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.cjs +40 -40
- package/dist/index.js +40 -40
- package/dist/{modules/instant-purchase/src/components/catalog-device-pay-button → libraries/dcui-components/src/components/apple-pay-button}/apple-pay-button.d.ts +26 -2
- package/dist/libraries/dcui-components/src/components/apple-pay-button/index.d.ts +1 -0
- package/dist/libraries/dcui-components/src/components/index.d.ts +1 -0
- package/dist/libraries/domain/src/behaviors/custom-states.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ThemeColor } from '@rokt/dcui-layout-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Renders an Apple Pay button using Apple's native CSS styling.
|
|
5
5
|
* Returns null if the browser does not support `-webkit-appearance: -apple-pay-button`.
|
|
@@ -11,12 +11,36 @@ export type ThemedApplePayButtonStyle = {
|
|
|
11
11
|
dark?: ApplePayButtonStyle;
|
|
12
12
|
};
|
|
13
13
|
export type ButtonStyleInput = ApplePayButtonStyle | ThemedApplePayButtonStyle;
|
|
14
|
+
/**
|
|
15
|
+
* Structural shape of the `own` style hints this module reads. Declared
|
|
16
|
+
* structurally rather than against one schema node so both the layout-variant
|
|
17
|
+
* `CatalogDevicePayButton` and a child-layout escape hatch can pass their own
|
|
18
|
+
* schema without either owning the other's types.
|
|
19
|
+
*/
|
|
20
|
+
export type ApplePayButtonStyleSource = {
|
|
21
|
+
styles?: {
|
|
22
|
+
elements?: {
|
|
23
|
+
own?: ReadonlyArray<{
|
|
24
|
+
default?: {
|
|
25
|
+
background?: {
|
|
26
|
+
backgroundColor?: ThemeColor | null;
|
|
27
|
+
} | null;
|
|
28
|
+
border?: {
|
|
29
|
+
borderWidth?: unknown;
|
|
30
|
+
borderStyle?: unknown;
|
|
31
|
+
} | null;
|
|
32
|
+
} | null;
|
|
33
|
+
} | null> | null;
|
|
34
|
+
} | null;
|
|
35
|
+
} | null;
|
|
36
|
+
};
|
|
14
37
|
type ApplePayButtonProps = {
|
|
15
38
|
buttonStyle?: ButtonStyleInput;
|
|
16
39
|
className?: string;
|
|
17
40
|
disabled?: boolean;
|
|
18
41
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
19
42
|
tabIndex?: number;
|
|
43
|
+
testId?: string;
|
|
20
44
|
};
|
|
21
45
|
/**
|
|
22
46
|
* Derives an Apple Pay button style from the schema's `own` background and
|
|
@@ -31,6 +55,6 @@ type ApplePayButtonProps = {
|
|
|
31
55
|
* Breakpoint blocks merge with last-non-null-wins. An unrecognized `dark` is
|
|
32
56
|
* dropped, so the `light` style applies in both modes.
|
|
33
57
|
*/
|
|
34
|
-
export declare function deriveApplePayButtonStyle
|
|
58
|
+
export declare function deriveApplePayButtonStyle(schema: ApplePayButtonStyleSource): ThemedApplePayButtonStyle | undefined;
|
|
35
59
|
export declare const ApplePayButton: React.ForwardRefExoticComponent<ApplePayButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
36
60
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './apple-pay-button';
|
|
@@ -8,3 +8,12 @@ export interface SetCustomStatePayload {
|
|
|
8
8
|
value: number;
|
|
9
9
|
}
|
|
10
10
|
export declare function isValidSetCustomStatePayload(payload: unknown): payload is SetCustomStatePayload;
|
|
11
|
+
/**
|
|
12
|
+
* Custom state the instant-purchase device-pay sagas raise while a payment is in
|
|
13
|
+
* flight. Declared here, not in the module, because it crosses the child-layout
|
|
14
|
+
* bridge: a child CTA reads it to disable itself, and a child-initiated payment
|
|
15
|
+
* listener reads it to refuse a second request. Both frames must agree on the key.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DEVICE_PAY_PROCESSING_STATE_KEY = "ProcessingState";
|
|
18
|
+
export declare const DEVICE_PAY_PROCESSING_IDLE = 0;
|
|
19
|
+
export declare const DEVICE_PAY_PROCESSING_IN_FLIGHT = 1;
|