ui.shipaid.com 0.3.67 → 0.3.69

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 (28) hide show
  1. package/README.md +202 -200
  2. package/dist/widget.es.js +11 -6
  3. package/dist/widget.iife.js +17 -12
  4. package/dist/widget.umd.js +17 -12
  5. package/dist-types/common/shopify/index.d.ts +6 -6
  6. package/dist-types/common/shopify/protection.d.ts +7 -7
  7. package/dist-types/common/shopify/types/ShopifyCart.d.ts +29 -29
  8. package/dist-types/common/shopify/types/ShopifyProduct.d.ts +12 -12
  9. package/dist-types/common/types/ShipAid.d.ts +82 -82
  10. package/dist-types/widget/src/assets/confirmation-styles.d.ts +2 -2
  11. package/dist-types/widget/src/assets/icons.d.ts +9 -9
  12. package/dist-types/widget/src/assets/learn-more-styles.d.ts +2 -2
  13. package/dist-types/widget/src/assets/styles.d.ts +2 -2
  14. package/dist-types/widget/src/components/checkout-button.d.ts +7 -0
  15. package/dist-types/widget/src/components/checkout-package-protection.d.ts +13 -13
  16. package/dist-types/widget/src/components/checkoutButton.d.ts +13 -0
  17. package/dist-types/widget/src/components/confirmation-popup.d.ts +9 -9
  18. package/dist-types/widget/src/components/content-loader.d.ts +6 -0
  19. package/dist-types/widget/src/components/learn-more-popup.d.ts +8 -8
  20. package/dist-types/widget/src/components/shipaid-cart-confirmation.d.ts +15 -15
  21. package/dist-types/widget/src/shipaid-widget.d.ts +145 -145
  22. package/dist-types/widget/src/utils/fetch_interceptor.d.ts +3 -3
  23. package/dist-types/widget/src/utils/fetch_interceptor.test.d.ts +1 -1
  24. package/dist-types/widget/types/shipaid.d.ts +10 -10
  25. package/dist-types/widget/types/shopify.d.ts +29 -29
  26. package/dist-types/widget/types/widget.d.ts +13 -13
  27. package/package.json +48 -48
  28. package/dist-types/widget/src/components/product-add-confirmation.d.ts +0 -13
@@ -1,29 +1,29 @@
1
- import { ShopifyProduct } from '../../common/shopify/types/ShopifyProduct';
2
- export * from '../../common/shopify/types/ShopifyCart';
3
- export * from '../../common/shopify/types/ShopifyProduct';
4
- declare global {
5
- interface Window {
6
- Shopify?: {
7
- shop?: string;
8
- locale?: string;
9
- designMode?: boolean;
10
- currency?: {
11
- active?: string;
12
- };
13
- Checkout?: Record<string, string> & {
14
- apiHost?: string;
15
- };
16
- };
17
- }
18
- }
19
- export interface ShopifyCartAddPayload {
20
- id: number | string;
21
- quantity?: number;
22
- selling_plan?: number | string | null;
23
- }
24
- export interface ShopifyCartUpdatePayload {
25
- updates: Record<string | number, number>;
26
- }
27
- export interface ShopifyProductResponse {
28
- product: ShopifyProduct;
29
- }
1
+ import { ShopifyProduct } from '../../common/shopify/types/ShopifyProduct';
2
+ export * from '../../common/shopify/types/ShopifyCart';
3
+ export * from '../../common/shopify/types/ShopifyProduct';
4
+ declare global {
5
+ interface Window {
6
+ Shopify?: {
7
+ shop?: string;
8
+ locale?: string;
9
+ designMode?: boolean;
10
+ currency?: {
11
+ active?: string;
12
+ };
13
+ Checkout?: Record<string, string> & {
14
+ apiHost?: string;
15
+ };
16
+ };
17
+ }
18
+ }
19
+ export interface ShopifyCartAddPayload {
20
+ id: number | string;
21
+ quantity?: number;
22
+ selling_plan?: number | string | null;
23
+ }
24
+ export interface ShopifyCartUpdatePayload {
25
+ updates: Record<string | number, number>;
26
+ }
27
+ export interface ShopifyProductResponse {
28
+ product: ShopifyProduct;
29
+ }
@@ -1,13 +1,13 @@
1
- export declare enum Events {
2
- LOADED = "shipaid-loaded",
3
- STATUS_UPDATE = "shipaid-protection-status"
4
- }
5
- export interface State {
6
- loading: boolean;
7
- success: boolean | null;
8
- error: boolean | string | null;
9
- }
10
- export interface FetchHelper {
11
- get: <Data>(url: string) => Promise<Data>;
12
- post: <Data>(url: string, body: unknown) => Promise<Data>;
13
- }
1
+ export declare enum Events {
2
+ LOADED = "shipaid-loaded",
3
+ STATUS_UPDATE = "shipaid-protection-status"
4
+ }
5
+ export interface State {
6
+ loading: boolean;
7
+ success: boolean | null;
8
+ error: boolean | string | null;
9
+ }
10
+ export interface FetchHelper {
11
+ get: <Data>(url: string) => Promise<Data>;
12
+ post: <Data>(url: string, body: unknown) => Promise<Data>;
13
+ }
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
- {
2
- "name": "ui.shipaid.com",
3
- "private": false,
4
- "version": "0.3.67",
5
- "type": "module",
6
- "main": "dist/widget.umd.js",
7
- "unpkg": "dist/widget.iife.js",
8
- "module": "dist/widget.es.js",
9
- "exports": {
10
- ".": "./dist/widget.es.js"
11
- },
12
- "types": "dist-types/src/shipaid-widget.d.ts",
13
- "files": [
14
- "dist-types",
15
- "dist"
16
- ],
17
- "dependencies": {
18
- "@lit-labs/task": "^2.0.0",
19
- "lit": "^2.6.1",
20
- "lit-element-effect": "^1.0.2",
21
- "lit-translate": "^2.0.1",
22
- "@nhost/nhost-js": "^3.1.10"
23
- },
24
- "devDependencies": {
25
- "@typescript-eslint/eslint-plugin": "^5.49.0",
26
- "@typescript-eslint/parser": "^5.49.0",
27
- "@vitest/browser": "^2.1.4",
28
- "eslint": "^8.32.0",
29
- "eslint-config-standard": "^17.0.0",
30
- "eslint-plugin-html": "^7.1.0",
31
- "eslint-plugin-import": "^2.27.5",
32
- "eslint-plugin-lit": "^1.8.2",
33
- "eslint-plugin-lit-a11y": "^2.3.0",
34
- "eslint-plugin-n": "^15.6.1",
35
- "eslint-plugin-promise": "^6.1.1",
36
- "jsdom": "^25.0.1",
37
- "playwright": "^1.48.2",
38
- "terser": "^5.16.1",
39
- "typescript": "^4.9.4",
40
- "vite": "^5.4.10",
41
- "vitest": "^2.1.4"
42
- },
43
- "scripts": {
44
- "develop": "vite",
45
- "build": "tsc && node build",
46
- "lint": "eslint . --ext=ts --fix",
47
- "test": "vitest"
48
- }
1
+ {
2
+ "name": "ui.shipaid.com",
3
+ "private": false,
4
+ "version": "0.3.69",
5
+ "type": "module",
6
+ "main": "dist/widget.umd.js",
7
+ "unpkg": "dist/widget.iife.js",
8
+ "module": "dist/widget.es.js",
9
+ "exports": {
10
+ ".": "./dist/widget.es.js"
11
+ },
12
+ "types": "dist-types/src/shipaid-widget.d.ts",
13
+ "files": [
14
+ "dist-types",
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "develop": "vite",
19
+ "build": "tsc && node build",
20
+ "lint": "eslint . --ext=ts --fix",
21
+ "test": "vitest"
22
+ },
23
+ "dependencies": {
24
+ "@lit-labs/task": "^2.0.0",
25
+ "lit": "^2.6.1",
26
+ "lit-element-effect": "^1.0.2",
27
+ "lit-translate": "^2.0.1",
28
+ "@nhost/nhost-js": "^3.1.10"
29
+ },
30
+ "devDependencies": {
31
+ "@typescript-eslint/eslint-plugin": "^5.49.0",
32
+ "@typescript-eslint/parser": "^5.49.0",
33
+ "@vitest/browser": "^2.1.4",
34
+ "eslint": "^8.32.0",
35
+ "eslint-config-standard": "^17.0.0",
36
+ "eslint-plugin-html": "^7.1.0",
37
+ "eslint-plugin-import": "^2.27.5",
38
+ "eslint-plugin-lit": "^1.8.2",
39
+ "eslint-plugin-lit-a11y": "^2.3.0",
40
+ "eslint-plugin-n": "^15.6.1",
41
+ "eslint-plugin-promise": "^6.1.1",
42
+ "jsdom": "^25.0.1",
43
+ "playwright": "^1.48.2",
44
+ "terser": "^5.16.1",
45
+ "typescript": "^4.9.4",
46
+ "vite": "^5.4.10",
47
+ "vitest": "^2.1.4"
48
+ }
49
49
  }
@@ -1,13 +0,0 @@
1
- import { LitElement } from 'lit'
2
- declare class ProductAddConfirmation extends LitElement {
3
- static styles: import('lit').CSSResult
4
- open: boolean
5
- product: null
6
- imageUrl: null
7
- priceOfVariant: null
8
- quantity: number
9
- handleDismiss(): void
10
- handleConfirm(): void
11
- render(): import('lit-html').TemplateResult<1>
12
- }
13
- export default ProductAddConfirmation