@primer-io/primer-js 0.1.2 → 0.1.3
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/custom-elements.json +321 -122
- package/dist/primer-loader.d.ts +30 -27
- package/dist/primer-loader.js +83 -83
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
package/dist/primer-loader.d.ts
CHANGED
|
@@ -2497,6 +2497,7 @@ declare class SdkStateController implements ReactiveController {
|
|
|
2497
2497
|
setError(error: Error): void;
|
|
2498
2498
|
setFailure(code: string, message: string, details?: Record<string, unknown>): void;
|
|
2499
2499
|
reset(): void;
|
|
2500
|
+
forceCompleteLoading(): void;
|
|
2500
2501
|
get state(): SdkState;
|
|
2501
2502
|
}
|
|
2502
2503
|
export interface PrimerCheckoutType extends ReactiveControllerHost, LitElement {
|
|
@@ -2661,6 +2662,7 @@ export declare class PrimerCheckoutComponent extends LitElement implements Prime
|
|
|
2661
2662
|
defaultSlot: HTMLSlotElement;
|
|
2662
2663
|
private previousLoadingState;
|
|
2663
2664
|
private hasAssignedContent;
|
|
2665
|
+
private _loadingTimeoutId;
|
|
2664
2666
|
locale?: LocaleCode;
|
|
2665
2667
|
private onSlotChange;
|
|
2666
2668
|
sdkContextController: SDKContextController;
|
|
@@ -2671,6 +2673,7 @@ export declare class PrimerCheckoutComponent extends LitElement implements Prime
|
|
|
2671
2673
|
cardNetworkController: CardNetworkController;
|
|
2672
2674
|
constructor();
|
|
2673
2675
|
attributeChangedCallback(attrName: string, oldVal: string, newVal: string): void;
|
|
2676
|
+
disconnectedCallback(): void;
|
|
2674
2677
|
willUpdate(changedProperties: PropertyValues): void;
|
|
2675
2678
|
updated(): void;
|
|
2676
2679
|
/**
|
|
@@ -2684,6 +2687,33 @@ export declare class PrimerCheckoutComponent extends LitElement implements Prime
|
|
|
2684
2687
|
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: PrimerCheckoutComponent, ev: DocumentEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void;
|
|
2685
2688
|
addEventListener<K extends keyof PrimerEvents>(type: K, listener: (this: PrimerCheckoutComponent, ev: PrimerEvents[K]) => void, options?: boolean | AddEventListenerOptions): void;
|
|
2686
2689
|
}
|
|
2690
|
+
/**
|
|
2691
|
+
* Injects the CSS loader styles into the page
|
|
2692
|
+
* These styles display a loading indicator before JavaScript initializes
|
|
2693
|
+
*
|
|
2694
|
+
* Unlike theme styles, loader styles should take precedence over merchant styles
|
|
2695
|
+
* to ensure the loading indicator is visible. We append them to the end of the head.
|
|
2696
|
+
*/
|
|
2697
|
+
export declare function injectLoaderStyles(): void;
|
|
2698
|
+
/**
|
|
2699
|
+
* Injects all required theme CSS variables into the page
|
|
2700
|
+
* This should be called before components are rendered to ensure
|
|
2701
|
+
* they have access to all design tokens
|
|
2702
|
+
*
|
|
2703
|
+
* Theme styles are prepended to the document head to allow merchant styles
|
|
2704
|
+
* to override our default variables.
|
|
2705
|
+
*/
|
|
2706
|
+
export declare function injectThemeStyles(): void;
|
|
2707
|
+
/**
|
|
2708
|
+
* Utility function to inject only the light theme CSS variables
|
|
2709
|
+
* @returns {void}
|
|
2710
|
+
*/
|
|
2711
|
+
export declare function injectLightTheme(): void;
|
|
2712
|
+
/**
|
|
2713
|
+
* Utility function to inject only the dark theme CSS variables
|
|
2714
|
+
* @returns {void}
|
|
2715
|
+
*/
|
|
2716
|
+
export declare function injectDarkTheme(): void;
|
|
2687
2717
|
/**
|
|
2688
2718
|
* Size options for the spinner component
|
|
2689
2719
|
*/
|
|
@@ -4249,33 +4279,6 @@ declare global {
|
|
|
4249
4279
|
"primer-error-message-container": ErrorMessageContainerComponent;
|
|
4250
4280
|
}
|
|
4251
4281
|
}
|
|
4252
|
-
/**
|
|
4253
|
-
* Injects the CSS loader styles into the page
|
|
4254
|
-
* These styles display a loading indicator before JavaScript initializes
|
|
4255
|
-
*
|
|
4256
|
-
* Unlike theme styles, loader styles should take precedence over merchant styles
|
|
4257
|
-
* to ensure the loading indicator is visible. We append them to the end of the head.
|
|
4258
|
-
*/
|
|
4259
|
-
export declare function injectLoaderStyles(): void;
|
|
4260
|
-
/**
|
|
4261
|
-
* Injects all required theme CSS variables into the page
|
|
4262
|
-
* This should be called before components are rendered to ensure
|
|
4263
|
-
* they have access to all design tokens
|
|
4264
|
-
*
|
|
4265
|
-
* Theme styles are prepended to the document head to allow merchant styles
|
|
4266
|
-
* to override our default variables.
|
|
4267
|
-
*/
|
|
4268
|
-
export declare function injectThemeStyles(): void;
|
|
4269
|
-
/**
|
|
4270
|
-
* Utility function to inject only the light theme CSS variables
|
|
4271
|
-
* @returns {void}
|
|
4272
|
-
*/
|
|
4273
|
-
export declare function injectLightTheme(): void;
|
|
4274
|
-
/**
|
|
4275
|
-
* Utility function to inject only the dark theme CSS variables
|
|
4276
|
-
* @returns {void}
|
|
4277
|
-
*/
|
|
4278
|
-
export declare function injectDarkTheme(): void;
|
|
4279
4282
|
/**
|
|
4280
4283
|
* Main function to load the Primer SDK with all required dependencies and styles
|
|
4281
4284
|
* @returns {Promise<void>} A promise that resolves when loading is complete
|