@returnflows/shop-overlay 1.0.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/README.md +976 -0
- package/dist/index.esm.css +3 -0
- package/dist/index.esm.js +12494 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/messages/da.json +1 -0
- package/dist/messages/de.json +1 -0
- package/dist/messages/en.json +1 -0
- package/dist/messages/es.json +1 -0
- package/dist/messages/fi.json +1 -0
- package/dist/messages/fr.json +1 -0
- package/dist/messages/it.json +1 -0
- package/dist/messages/nb.json +1 -0
- package/dist/messages/nl.json +1 -0
- package/dist/messages/pl.json +1 -0
- package/dist/messages/sv.json +1 -0
- package/dist/types/api/index.d.ts +6 -0
- package/dist/types/api/state-bridge.d.ts +37 -0
- package/dist/types/api/storefront-cart.d.ts +3 -0
- package/dist/types/api/types.d.ts +402 -0
- package/dist/types/api/widget-api.d.ts +20 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/widget/components/dialog/common/dialog-backdrop.d.ts +6 -0
- package/dist/types/widget/components/dialog/common/dialog-button.d.ts +6 -0
- package/dist/types/widget/components/dialog/common/dialog-modal.d.ts +9 -0
- package/dist/types/widget/components/dialog/common/dialog-subtitle.d.ts +2 -0
- package/dist/types/widget/components/dialog/common/dialog-title.d.ts +2 -0
- package/dist/types/widget/components/dialog/common/index.d.ts +10 -0
- package/dist/types/widget/components/dialog/return-decision-dialog.d.ts +2 -0
- package/dist/types/widget/components/drawer/adjustments/exchange-adjustments.d.ts +2 -0
- package/dist/types/widget/components/drawer/adjustments/exchange-banner.d.ts +2 -0
- package/dist/types/widget/components/drawer/adjustments/table/adjustments-table-skeleton.d.ts +2 -0
- package/dist/types/widget/components/drawer/adjustments/table/adjustments-table.d.ts +2 -0
- package/dist/types/widget/components/drawer/annoucement-bar.d.ts +2 -0
- package/dist/types/widget/components/drawer/error-screen.d.ts +6 -0
- package/dist/types/widget/components/drawer/exchange-confirmation.d.ts +2 -0
- package/dist/types/widget/components/drawer/exchange-drawer.d.ts +5 -0
- package/dist/types/widget/components/drawer/exchange-header.d.ts +2 -0
- package/dist/types/widget/components/drawer/exchange-placeholder.d.ts +2 -0
- package/dist/types/widget/components/drawer/product/product-actions.d.ts +8 -0
- package/dist/types/widget/components/drawer/product/product-attributes.d.ts +14 -0
- package/dist/types/widget/components/drawer/product/product-errors.d.ts +2 -0
- package/dist/types/widget/components/drawer/product/product-image.d.ts +7 -0
- package/dist/types/widget/components/drawer/product/product-list.d.ts +2 -0
- package/dist/types/widget/components/drawer/product/product.d.ts +9 -0
- package/dist/types/widget/components/drawer/product/quantity-picker.d.ts +20 -0
- package/dist/types/widget/components/drawer/return/return-product-actions.d.ts +10 -0
- package/dist/types/widget/components/drawer/return/return-product-badge.d.ts +7 -0
- package/dist/types/widget/components/drawer/return/return-product-list.d.ts +2 -0
- package/dist/types/widget/components/drawer/return/return-product-skeleton.d.ts +2 -0
- package/dist/types/widget/components/drawer/return/return-product.d.ts +14 -0
- package/dist/types/widget/components/drawer/scroll-indicator.d.ts +5 -0
- package/dist/types/widget/components/handlers/dialog-handler.d.ts +2 -0
- package/dist/types/widget/components/handlers/initialization-handler.d.ts +2 -0
- package/dist/types/widget/components/icons/arrow-down.d.ts +2 -0
- package/dist/types/widget/components/icons/arrow-left.d.ts +2 -0
- package/dist/types/widget/components/icons/arrow-right.d.ts +2 -0
- package/dist/types/widget/components/icons/bag.d.ts +2 -0
- package/dist/types/widget/components/icons/banner/action.d.ts +2 -0
- package/dist/types/widget/components/icons/banner/info.d.ts +2 -0
- package/dist/types/widget/components/icons/cart.d.ts +2 -0
- package/dist/types/widget/components/icons/chevron.d.ts +2 -0
- package/dist/types/widget/components/icons/giftcard.d.ts +2 -0
- package/dist/types/widget/components/icons/icon.d.ts +17 -0
- package/dist/types/widget/components/icons/spinner.d.ts +2 -0
- package/dist/types/widget/components/icons/star.d.ts +2 -0
- package/dist/types/widget/components/icons/warning.d.ts +2 -0
- package/dist/types/widget/components/icons/x.d.ts +2 -0
- package/dist/types/widget/components/is-mounted.d.ts +4 -0
- package/dist/types/widget/components/providers/error-provider.d.ts +4 -0
- package/dist/types/widget/components/providers/return-context-provider.d.ts +17 -0
- package/dist/types/widget/components/providers/root-provider.d.ts +2 -0
- package/dist/types/widget/components/providers/widget-context-provider.d.ts +6 -0
- package/dist/types/widget/components/return-avatar-stack.d.ts +2 -0
- package/dist/types/widget/components/summary/back-button.d.ts +2 -0
- package/dist/types/widget/components/summary/exchange-summary.d.ts +2 -0
- package/dist/types/widget/components/summary/exchange-total-skeleton.d.ts +2 -0
- package/dist/types/widget/components/summary/exchange-total.d.ts +2 -0
- package/dist/types/widget/components/toast/toast-container.d.ts +2 -0
- package/dist/types/widget/components/toast/toast-provider.d.ts +4 -0
- package/dist/types/widget/components/toast/toast.d.ts +16 -0
- package/dist/types/widget/components/ui/avatar/avatar-stack-skeleton.d.ts +2 -0
- package/dist/types/widget/components/ui/avatar/avatar-stack.d.ts +12 -0
- package/dist/types/widget/components/ui/avatar/avatar.d.ts +10 -0
- package/dist/types/widget/components/ui/banner/banner-skeleton.d.ts +2 -0
- package/dist/types/widget/components/ui/banner/banner.d.ts +13 -0
- package/dist/types/widget/components/ui/button.d.ts +11 -0
- package/dist/types/widget/components/ui/expander.d.ts +8 -0
- package/dist/types/widget/components/ui/image.d.ts +5 -0
- package/dist/types/widget/components/ui/link.d.ts +7 -0
- package/dist/types/widget/components/ui/price.d.ts +7 -0
- package/dist/types/widget/components/ui/skeleton/skeleton-container.d.ts +6 -0
- package/dist/types/widget/components/ui/skeleton/skeleton.d.ts +2 -0
- package/dist/types/widget/components/widget-container.d.ts +3 -0
- package/dist/types/widget/components/widget.d.ts +2 -0
- package/dist/types/widget/lib/constants.d.ts +13 -0
- package/dist/types/widget/lib/context/dialog-context.d.ts +3 -0
- package/dist/types/widget/lib/context/error-context.d.ts +10 -0
- package/dist/types/widget/lib/context/return-context.d.ts +12 -0
- package/dist/types/widget/lib/context/root-context.d.ts +2 -0
- package/dist/types/widget/lib/context/toast-context.d.ts +13 -0
- package/dist/types/widget/lib/context/widget-context.d.ts +9 -0
- package/dist/types/widget/lib/hooks/common/use-array.d.ts +14 -0
- package/dist/types/widget/lib/hooks/common/use-async-state.d.ts +40 -0
- package/dist/types/widget/lib/hooks/common/use-dialog.d.ts +11 -0
- package/dist/types/widget/lib/hooks/common/use-is-mounted.d.ts +2 -0
- package/dist/types/widget/lib/hooks/common/use-once.d.ts +3 -0
- package/dist/types/widget/lib/hooks/common/use-value-state.d.ts +7 -0
- package/dist/types/widget/lib/hooks/common/use-y-scrollable.d.ts +10 -0
- package/dist/types/widget/lib/hooks/context/use-calculation.d.ts +12 -0
- package/dist/types/widget/lib/hooks/context/use-cart-items.d.ts +9 -0
- package/dist/types/widget/lib/hooks/context/use-currency.d.ts +12 -0
- package/dist/types/widget/lib/hooks/context/use-errors.d.ts +2 -0
- package/dist/types/widget/lib/hooks/context/use-navigation.d.ts +6 -0
- package/dist/types/widget/lib/hooks/context/use-return-context.d.ts +2 -0
- package/dist/types/widget/lib/hooks/context/use-root.d.ts +2 -0
- package/dist/types/widget/lib/hooks/context/use-theme.d.ts +5 -0
- package/dist/types/widget/lib/hooks/context/use-toast.d.ts +2 -0
- package/dist/types/widget/lib/hooks/context/use-widget-context.d.ts +2 -0
- package/dist/types/widget/lib/hooks/feature/use-api-bridge.d.ts +6 -0
- package/dist/types/widget/lib/hooks/feature/use-cart-activator.d.ts +2 -0
- package/dist/types/widget/lib/hooks/feature/use-external-events.d.ts +2 -0
- package/dist/types/widget/lib/hooks/feature/use-fetch-interceptor.d.ts +4 -0
- package/dist/types/widget/lib/hooks/feature/use-override-scroll-blocking.d.ts +2 -0
- package/dist/types/widget/lib/types.d.ts +382 -0
- package/dist/types/widget/lib/utils/api.d.ts +26 -0
- package/dist/types/widget/lib/utils/cart-provider-store.d.ts +3 -0
- package/dist/types/widget/lib/utils/cart.d.ts +17 -0
- package/dist/types/widget/lib/utils/custom-events.d.ts +48 -0
- package/dist/types/widget/lib/utils/dom.d.ts +2 -0
- package/dist/types/widget/lib/utils/errors.d.ts +6 -0
- package/dist/types/widget/lib/utils/helpers.d.ts +24 -0
- package/dist/types/widget/lib/utils/i18n.d.ts +8 -0
- package/dist/types/widget/lib/utils/initialization/dataset.d.ts +5 -0
- package/dist/types/widget/lib/utils/initialization/font.d.ts +7 -0
- package/dist/types/widget/lib/utils/initialization/index.d.ts +6 -0
- package/dist/types/widget/lib/utils/initialization/styles.d.ts +4 -0
- package/dist/types/widget/lib/utils/initialization/types.d.ts +51 -0
- package/dist/types/widget/lib/utils/interceptor/fetch.d.ts +5 -0
- package/dist/types/widget/lib/utils/interceptor/index.d.ts +26 -0
- package/dist/types/widget/lib/utils/interceptor/xhr.d.ts +5 -0
- package/dist/types/widget/lib/utils/logger.d.ts +13 -0
- package/dist/types/widget/lib/utils/navigation.d.ts +7 -0
- package/dist/types/widget/lib/utils/session.d.ts +54 -0
- package/dist/types/widget/lib/utils/shopify.d.ts +6 -0
- package/dist/types/widget/lib/utils/storage.d.ts +33 -0
- package/dist/variables.css +1 -0
- package/dist/widget.css +3 -0
- package/dist/widget.js +12006 -0
- package/package.json +112 -0
package/package.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@returnflows/shop-overlay",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Returnflows Shop Overlay Widget - Modular exchange/return widget with programmatic API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.esm.js",
|
|
7
|
+
"module": "dist/index.esm.js",
|
|
8
|
+
"types": "dist/types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.esm.js",
|
|
12
|
+
"types": "./dist/types/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./widget": {
|
|
15
|
+
"import": "./dist/widget.js"
|
|
16
|
+
},
|
|
17
|
+
"./styles": {
|
|
18
|
+
"import": "./dist/widget.css"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"sideEffects": [
|
|
25
|
+
"*.css"
|
|
26
|
+
],
|
|
27
|
+
"prettier": "@dxmd/prettier-config",
|
|
28
|
+
"scripts": {
|
|
29
|
+
"dev": "vite",
|
|
30
|
+
"lint": "eslint .",
|
|
31
|
+
"preview": "vite preview",
|
|
32
|
+
"pretty": "prettier --write \"src/**/*.{ts,tsx,js,jsx,css,md,mdx,mjs,cjs}\"",
|
|
33
|
+
"prettier:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,css,md,mdx,mjs,cjs}\"",
|
|
34
|
+
"check-types": "tsc --noEmit",
|
|
35
|
+
"build": "rollup -c ./rollup.config.mjs && pnpm build:types",
|
|
36
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
37
|
+
"build:staging": "rollup -c ./rollup.config.mjs --environment=test && pnpm build:types",
|
|
38
|
+
"build:production": "rollup -c ./rollup.config.mjs --environment=production && pnpm build:types",
|
|
39
|
+
"serve": "http-server ./dist --cors -p 3334",
|
|
40
|
+
"deploy": "pnpm build && cd ../ && act -W .github/workflows/deploy-shop-overlay.yml --secret-file .env.local --input deploy_env=development",
|
|
41
|
+
"deploy:staging": "pnpm build:staging && cd ../ && act -W .github/workflows/deploy-shop-overlay.yml --secret-file .env.local --input deploy_env=test",
|
|
42
|
+
"deploy:production": "pnpm build:production && cd ../ && act -W .github/workflows/deploy-shop-overlay.yml --secret-file .env.local --input deploy_env=production",
|
|
43
|
+
"version:patch": "npm version patch --no-git-tag-version",
|
|
44
|
+
"version:minor": "npm version minor --no-git-tag-version",
|
|
45
|
+
"version:major": "npm version major --no-git-tag-version",
|
|
46
|
+
"prepublishOnly": "pnpm build",
|
|
47
|
+
"publish:staging": "pnpm build:staging && npm publish --tag staging",
|
|
48
|
+
"publish:production": "pnpm build:production && npm publish --tag latest"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"class-variance-authority": "^0.7.1",
|
|
52
|
+
"clsx": "^2.1.1",
|
|
53
|
+
"preact": "^10.23.2",
|
|
54
|
+
"tailwind-merge": "^3.3.0",
|
|
55
|
+
"use-intl": "^4.1.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@babel/preset-env": "^7.29.0",
|
|
59
|
+
"@babel/preset-react": "^7.26.3",
|
|
60
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
61
|
+
"@dxmd/eslint-plugin-i18n-messages": "^1.0.0",
|
|
62
|
+
"@dxmd/prettier-config": "^1.0.2",
|
|
63
|
+
"@eslint/js": "^9.17.0",
|
|
64
|
+
"@preact/preset-vite": "^2.9.1",
|
|
65
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
66
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
67
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
68
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
69
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
70
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
71
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
72
|
+
"@types/css": "^0.0.38",
|
|
73
|
+
"@types/node": "^22.10.2",
|
|
74
|
+
"autoprefixer": "^10.4.21",
|
|
75
|
+
"concurrently": "^9.1.2",
|
|
76
|
+
"cssnano": "^7.1.2",
|
|
77
|
+
"dotenv": "^16.4.7",
|
|
78
|
+
"eslint": "^9.17.0",
|
|
79
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
80
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
81
|
+
"eslint-plugin-unicorn": "^60.0.0",
|
|
82
|
+
"globals": "^15.14.0",
|
|
83
|
+
"http-server": "^14.1.1",
|
|
84
|
+
"msw": "^2.10.4",
|
|
85
|
+
"postcss": "^8.4.49",
|
|
86
|
+
"postcss-replace": "^2.0.1",
|
|
87
|
+
"prettier": "3.6.0",
|
|
88
|
+
"rollup": "^4.29.1",
|
|
89
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
90
|
+
"rollup-plugin-filesize": "^10.0.0",
|
|
91
|
+
"rollup-plugin-inject-process-env": "^1.3.1",
|
|
92
|
+
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
93
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
94
|
+
"rollup-plugin-tsconfig-paths": "^1.5.2",
|
|
95
|
+
"rollup-plugin-visualizer": "^5.12.0",
|
|
96
|
+
"tailwindcss": "^3.4.17",
|
|
97
|
+
"tailwindcss-safe-area": "^0.6.0",
|
|
98
|
+
"tslib": "^2.8.1",
|
|
99
|
+
"typescript": "~5.6.3",
|
|
100
|
+
"typescript-eslint": "^8.18.1",
|
|
101
|
+
"vite": "^6.0.5",
|
|
102
|
+
"wrangler": "^4.17.0"
|
|
103
|
+
},
|
|
104
|
+
"publishConfig": {
|
|
105
|
+
"access": "public"
|
|
106
|
+
},
|
|
107
|
+
"msw": {
|
|
108
|
+
"workerDirectory": [
|
|
109
|
+
"public"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|