@apolopay-sdk/astro 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.
Files changed (2) hide show
  1. package/README.md +54 -0
  2. package/package.json +35 -0
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # @apolopay-sdk/astro
2
+
3
+ Astro integration for the Apolo Pay SDK. Provides a component to integrate the Apolo Pay payment button into Astro projects.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @apolopay-sdk/astro
9
+ # or
10
+ pnpm add @apolopay-sdk/astro
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```astro
16
+ ---
17
+ import { ApoloPayButton, ApoloPayClient } from '@apolopay-sdk/astro';
18
+
19
+ // 1. Initialize the client
20
+ const client = new ApoloPayClient({
21
+ publicKey: 'pk_test_...',
22
+ });
23
+
24
+ const processId = 'your-process-id';
25
+ ---
26
+
27
+ <html>
28
+ <body>
29
+ <h1>My Astro Store</h1>
30
+
31
+ <!-- 2. Use the component -->
32
+ <ApoloPayButton
33
+ client={client}
34
+ processId={processId}
35
+ productTitle="Order #ASTRO-1"
36
+ lang="es"
37
+ client:load
38
+ />
39
+ </body>
40
+ </html>
41
+ ```
42
+
43
+ ## Props
44
+
45
+ - `client`: (ApoloPayClient) **Required**.
46
+ - `processId`: (string) **Required**.
47
+ - `productTitle`: (string)
48
+ - `lang`: ('es' | 'en')
49
+ - `label`: (string)
50
+ - `barrierDismissible`: (boolean)
51
+
52
+ ## License
53
+
54
+ MIT
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@apolopay-sdk/astro",
3
+ "version": "1.0.0",
4
+ "description": "Adaptador de Apolo Pay para Astro",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "type": "module",
9
+ "main": "dist/index.js",
10
+ "module": "dist/index.js",
11
+ "types": "dist/index.d.ts",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "dependencies": {
16
+ "@apolopay-sdk/ui": "1.0.0"
17
+ },
18
+ "devDependencies": {
19
+ "typescript": "5.4.5"
20
+ },
21
+ "peerDependencies": {
22
+ "astro": ">=3.0.0"
23
+ },
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js"
28
+ },
29
+ "./ApoloPayButton.astro": "./src/ApoloPayButton.astro"
30
+ },
31
+ "scripts": {
32
+ "build": "tsc",
33
+ "dev": "tsc --watch"
34
+ }
35
+ }