@betterstore/react 0.3.88 → 0.5.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.
Files changed (107) hide show
  1. package/dist/components/cart/useCart.d.ts +1 -0
  2. package/dist/components/cart/useCart.d.ts.map +1 -0
  3. package/dist/components/checkout-embed/appearance.d.ts +2 -1
  4. package/dist/components/checkout-embed/appearance.d.ts.map +1 -0
  5. package/dist/components/checkout-embed/checkout-form-loading.d.ts +2 -2
  6. package/dist/components/checkout-embed/checkout-form-loading.d.ts.map +1 -0
  7. package/dist/components/checkout-embed/checkout-form.d.ts +2 -2
  8. package/dist/components/checkout-embed/checkout-form.d.ts.map +1 -0
  9. package/dist/components/checkout-embed/checkout-schema.d.ts +1 -0
  10. package/dist/components/checkout-embed/checkout-schema.d.ts.map +1 -0
  11. package/dist/components/checkout-embed/index.d.ts +3 -2
  12. package/dist/components/checkout-embed/index.d.ts.map +1 -0
  13. package/dist/components/checkout-embed/steps/customer/address-input.d.ts +2 -2
  14. package/dist/components/checkout-embed/steps/customer/address-input.d.ts.map +1 -0
  15. package/dist/components/checkout-embed/steps/customer/address-utils.d.ts +1 -0
  16. package/dist/components/checkout-embed/steps/customer/address-utils.d.ts.map +1 -0
  17. package/dist/components/checkout-embed/steps/customer/form.d.ts +2 -2
  18. package/dist/components/checkout-embed/steps/customer/form.d.ts.map +1 -0
  19. package/dist/components/checkout-embed/steps/payment/form.d.ts +2 -2
  20. package/dist/components/checkout-embed/steps/payment/form.d.ts.map +1 -0
  21. package/dist/components/checkout-embed/steps/shipping/form.d.ts +2 -2
  22. package/dist/components/checkout-embed/steps/shipping/form.d.ts.map +1 -0
  23. package/dist/components/checkout-embed/steps/shipping/providers/zasilkovna.d.ts +2 -1
  24. package/dist/components/checkout-embed/steps/shipping/providers/zasilkovna.d.ts.map +1 -0
  25. package/dist/components/checkout-embed/steps/shipping/shipping-option-wrapper.d.ts +2 -1
  26. package/dist/components/checkout-embed/steps/shipping/shipping-option-wrapper.d.ts.map +1 -0
  27. package/dist/components/checkout-embed/steps/summary/discount-code.d.ts +2 -2
  28. package/dist/components/checkout-embed/steps/summary/discount-code.d.ts.map +1 -0
  29. package/dist/components/checkout-embed/steps/summary/index.d.ts +2 -2
  30. package/dist/components/checkout-embed/steps/summary/index.d.ts.map +1 -0
  31. package/dist/components/checkout-embed/steps/summary/loading.d.ts +2 -2
  32. package/dist/components/checkout-embed/steps/summary/loading.d.ts.map +1 -0
  33. package/dist/components/checkout-embed/useFormStore.d.ts +1 -0
  34. package/dist/components/checkout-embed/useFormStore.d.ts.map +1 -0
  35. package/dist/components/compounds/form/country-dropdown.d.ts +1 -0
  36. package/dist/components/compounds/form/country-dropdown.d.ts.map +1 -0
  37. package/dist/components/compounds/form/form-messages.d.ts +2 -1
  38. package/dist/components/compounds/form/form-messages.d.ts.map +1 -0
  39. package/dist/components/compounds/form/input-group.d.ts +3 -2
  40. package/dist/components/compounds/form/input-group.d.ts.map +1 -0
  41. package/dist/components/compounds/form/submit-button.d.ts +3 -3
  42. package/dist/components/compounds/form/submit-button.d.ts.map +1 -0
  43. package/dist/components/iframe-wrapper.d.ts +2 -1
  44. package/dist/components/iframe-wrapper.d.ts.map +1 -0
  45. package/dist/components/index.d.ts +1 -0
  46. package/dist/components/index.d.ts.map +1 -0
  47. package/dist/components/payment-element/appearance.d.ts +1 -0
  48. package/dist/components/payment-element/appearance.d.ts.map +1 -0
  49. package/dist/components/payment-element/checkout-form.d.ts +2 -1
  50. package/dist/components/payment-element/checkout-form.d.ts.map +1 -0
  51. package/dist/components/payment-element/index.d.ts +2 -1
  52. package/dist/components/payment-element/index.d.ts.map +1 -0
  53. package/dist/components/payment-element/useCheckout.d.ts +1 -0
  54. package/dist/components/payment-element/useCheckout.d.ts.map +1 -0
  55. package/dist/components/ui/button.d.ts +2 -1
  56. package/dist/components/ui/button.d.ts.map +1 -0
  57. package/dist/components/ui/checkbox.d.ts +2 -1
  58. package/dist/components/ui/checkbox.d.ts.map +1 -0
  59. package/dist/components/ui/command.d.ts +13 -12
  60. package/dist/components/ui/command.d.ts.map +1 -0
  61. package/dist/components/ui/dialog.d.ts +11 -10
  62. package/dist/components/ui/dialog.d.ts.map +1 -0
  63. package/dist/components/ui/dropdown-menu.d.ts +18 -17
  64. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  65. package/dist/components/ui/form.d.ts +7 -6
  66. package/dist/components/ui/form.d.ts.map +1 -0
  67. package/dist/components/ui/input.d.ts +2 -1
  68. package/dist/components/ui/input.d.ts.map +1 -0
  69. package/dist/components/ui/label.d.ts +2 -1
  70. package/dist/components/ui/label.d.ts.map +1 -0
  71. package/dist/components/ui/popover.d.ts +7 -6
  72. package/dist/components/ui/popover.d.ts.map +1 -0
  73. package/dist/components/ui/radio-group.d.ts +4 -3
  74. package/dist/components/ui/radio-group.d.ts.map +1 -0
  75. package/dist/components/ui/select.d.ts +11 -10
  76. package/dist/components/ui/select.d.ts.map +1 -0
  77. package/dist/components/ui/skeleton.d.ts +2 -1
  78. package/dist/components/ui/skeleton.d.ts.map +1 -0
  79. package/dist/components/ui/sonner.d.ts +2 -2
  80. package/dist/components/ui/sonner.d.ts.map +1 -0
  81. package/dist/dev/dev.d.ts +2 -0
  82. package/dist/dev/dev.d.ts.map +1 -0
  83. package/dist/i18n/index.d.ts +1 -0
  84. package/dist/i18n/index.d.ts.map +1 -0
  85. package/dist/index.cjs.js +425 -614
  86. package/dist/index.d.ts +1 -0
  87. package/dist/index.d.ts.map +1 -0
  88. package/dist/index.mjs +425 -614
  89. package/dist/lib/betterstore.d.ts +9 -0
  90. package/dist/lib/betterstore.d.ts.map +1 -0
  91. package/dist/lib/error-message-utils.d.ts +1 -0
  92. package/dist/lib/error-message-utils.d.ts.map +1 -0
  93. package/dist/lib/utils.d.ts +1 -0
  94. package/dist/lib/utils.d.ts.map +1 -0
  95. package/dist/types.d.ts +2 -1
  96. package/dist/types.d.ts.map +1 -0
  97. package/package.json +33 -35
  98. package/.prettierignore +0 -3
  99. package/.prettierrc +0 -8
  100. package/CHANGELOG.md +0 -908
  101. package/CONTRIBUTING.md +0 -52
  102. package/LICENSE +0 -21
  103. package/README.md +0 -34
  104. package/components.json +0 -21
  105. package/postcss.config.cjs +0 -6
  106. package/rollup.config.mjs +0 -103
  107. package/tailwind.config.js +0 -12
package/CONTRIBUTING.md DELETED
@@ -1,52 +0,0 @@
1
- # Contributing to Better Store SDK
2
-
3
- 🚀 Thank you for your interest in contributing to **Better Store SDK**! We’re building the best developer experience for eCommerce, and we’d love your help.
4
-
5
- ## 🛠 Getting Started
6
-
7
- 1. **Fork the repository** and clone your fork locally:
8
- ```sh
9
- git clone https://github.com/your-username/better-store-sdk.git
10
- cd better-store-sdk
11
- ```
12
- 2. **Install dependencies:**
13
- ```sh
14
- npm install
15
- ```
16
- 3. **Run the tests to ensure everything is working:**
17
- ```sh
18
- npm test
19
- ```
20
-
21
- ## 📌 Code Guidelines
22
-
23
- - Use **TypeScript** for type safety.
24
- - Follow **Prettier** and **ESLint** formatting.
25
- - Keep PRs small and focused on a single issue.
26
- - Write **unit tests** for any new functionality.
27
-
28
- ## 🛠 Submitting a Pull Request
29
-
30
- 1. **Create a feature branch:**
31
- ```sh
32
- git checkout -b feature/new-feature
33
- ```
34
- 2. **Make your changes and commit them:**
35
- ```sh
36
- git add .
37
- git commit -m "✨ Added new feature"
38
- ```
39
- 3. **Push your branch:**
40
- ```sh
41
- git push origin feature/new-feature
42
- ```
43
- 4. **Open a Pull Request** on GitHub and describe your changes.
44
-
45
- ## 🐛 Reporting Issues
46
-
47
- - Use the [GitHub Issues](https://github.com/your-org/better-store-sdk/issues) to report bugs and request features.
48
- - Provide steps to reproduce bugs if possible.
49
-
50
- ## ❤️ Thank You!
51
-
52
- Your contributions make **Better Store SDK** awesome. Let's build a better eCommerce experience together! 🚀
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Better Store
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/README.md DELETED
@@ -1,34 +0,0 @@
1
- # Better Store SDK
2
-
3
- 🚀 **Better Store SDK** is a modern, developer-friendly sdk toolkit designed to help developers build flexible and powerful e-commerce stores with ease.
4
-
5
- ## 📦 Installation
6
-
7
- ```sh
8
- npm install @betterstore/sdk
9
- ```
10
-
11
- ## 🚀 Quick Start
12
-
13
- ```javascript
14
- import { BetterStore } from "@betterstore/sdk";
15
-
16
- const betterStore = new BetterStore("YOUR_API_KEY");
17
-
18
- betterStore.checkout.create({
19
- type: "hosted",
20
- lineItems: [{ productId: "example_id", quantity: 1 }],
21
- });
22
- ```
23
-
24
- ## 📚 Documentation
25
-
26
- Full documentation is available at **[betterstore.io](https://betterstore.io)**.
27
-
28
- ## 🤝 Contributing
29
-
30
- We welcome contributions! Please check the [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
31
-
32
- ## ⚖️ License
33
-
34
- This project is licensed under the [MIT License](./LICENSE).
package/components.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "new-york",
4
- "rsc": false,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "",
8
- "css": "src/globals.css",
9
- "baseColor": "neutral",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "aliases": {
14
- "components": "@/components",
15
- "utils": "@/lib/utils",
16
- "ui": "@/components/ui",
17
- "lib": "@/lib",
18
- "hooks": "@/hooks"
19
- },
20
- "iconLibrary": "lucide"
21
- }
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- plugins: {
3
- "@tailwindcss/postcss": {},
4
- autoprefixer: {},
5
- },
6
- };
package/rollup.config.mjs DELETED
@@ -1,103 +0,0 @@
1
- import commonjs from "@rollup/plugin-commonjs";
2
- import json from "@rollup/plugin-json";
3
- import resolve from "@rollup/plugin-node-resolve";
4
- import typescript from "@rollup/plugin-typescript";
5
- import { dirname, resolve as pathResolve } from "path";
6
- import postcss from "rollup-plugin-postcss";
7
- import { fileURLToPath } from "url";
8
-
9
- const __dirname = dirname(fileURLToPath(import.meta.url));
10
-
11
- // Custom plugin to handle "use client" directives
12
- const removeUseClientDirective = {
13
- name: "remove-use-client-directive",
14
- transform(code) {
15
- return {
16
- code: code.replace(/^"use client";\n?/gm, ""),
17
- map: null,
18
- };
19
- },
20
- };
21
-
22
- export default {
23
- input: "src/index.ts",
24
- output: [
25
- {
26
- file: "dist/index.cjs.js",
27
- format: "cjs",
28
- },
29
- {
30
- file: "dist/index.mjs",
31
- format: "esm",
32
- },
33
- ],
34
- plugins: [
35
- removeUseClientDirective,
36
- resolve({
37
- extensions: [".js", ".jsx", ".ts", ".tsx", ".json"],
38
- alias: {
39
- "@": pathResolve(__dirname, "src"),
40
- },
41
- browser: true,
42
- preferBuiltins: false,
43
- }),
44
- commonjs({
45
- include: /node_modules/,
46
- }),
47
- typescript(),
48
- json({
49
- include: "**/*.json",
50
- preferConst: true,
51
- }),
52
- postcss({
53
- config: {
54
- path: "./postcss.config.cjs",
55
- },
56
- extract: false,
57
- modules: false,
58
- minimize: false,
59
- inject: false,
60
- }),
61
- ],
62
- external: [
63
- // "@radix-ui/react-radio-group",
64
- // "@radix-ui/react-label",
65
- // "@radix-ui/react-checkbox",
66
- // "@radix-ui/react-select",
67
- // "@radix-ui/react-roving-focus",
68
- // "@radix-ui/react-presence",
69
- // "@radix-ui/react-dismissable-layer",
70
- // "@radix-ui/react-focus-guards",
71
- // "@radix-ui/react-collection",
72
- // "@radix-ui/react-popper",
73
- // "@radix-ui/react-portal",
74
- // "@radix-ui/react-focus-scope",
75
- // "@radix-ui/react-dialog",
76
- // "@radix-ui/react-dropdown-menu",
77
- // "@radix-ui/react-popover",
78
- // "@radix-ui/react-separator",
79
- // "@radix-ui/react-slot",
80
- "react",
81
- "react-dom",
82
- "react/jsx-runtime",
83
- // "@stripe/react-stripe-js",
84
- // "@stripe/stripe-js",
85
- // "zustand",
86
- // "zod",
87
- // "tailwindcss-animate",
88
- // "class-variance-authority",
89
- // "clsx",
90
- // "tailwind-merge",
91
- // "lucide-react",
92
- // "react-hook-form",
93
- // "@hookform/resolvers",
94
- // "motion",
95
- // "@betterstore/sdk",
96
- // "country-data-list",
97
- // "cmdk",
98
- // "i18next",
99
- // "i18next-browser-languagedetector",
100
- // "react-i18next",
101
- // "sonner",
102
- ],
103
- };
@@ -1,12 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- module.exports = {
3
- content: ["./src/**/*.{js,jsx,ts,tsx}"],
4
- important: true, // This ensures your styles take precedence
5
- theme: {
6
- extend: {},
7
- },
8
- plugins: [],
9
- // corePlugins: {
10
- // preflight: false,
11
- // },
12
- };