@railbed/embed 0.1.0 → 0.1.1

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 +5 -0
  2. package/package.json +17 -4
package/README.md CHANGED
@@ -13,6 +13,11 @@ Full guide: https://railbed.com/docs/guides/embedded-checkout/
13
13
  npm install @railbed/embed
14
14
  ```
15
15
 
16
+ The package is ESM only. Bundlers and Next.js find it as is, as does `require()` in Node 20.19+ or 22.12+ (where it
17
+ loads ES modules without a flag), and TypeScript finds its types with `moduleResolution` `bundler`, `node16` (from an
18
+ ES module) or `node`. A Jest setup that runs CommonJS has to transform it:
19
+ `transformIgnorePatterns: ['/node_modules/(?!@railbed/embed/)']`.
20
+
16
21
  ## React and Next.js
17
22
 
18
23
  The components are client components (`'use client'` is built in), so a Next.js app router page can render
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@railbed/embed",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Railbed's embedded checkout for React, Vue and any page: the payment widget, pricing table and buy button, with typed events.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://railbed.com/docs/guides/embedded-checkout/",
@@ -24,18 +24,31 @@
24
24
  "exports": {
25
25
  ".": {
26
26
  "types": "./dist/index.d.ts",
27
- "import": "./dist/index.js"
27
+ "import": "./dist/index.js",
28
+ "default": "./dist/index.js"
28
29
  },
29
30
  "./react": {
30
31
  "types": "./dist/react.d.ts",
31
- "import": "./dist/react.js"
32
+ "import": "./dist/react.js",
33
+ "default": "./dist/react.js"
32
34
  },
33
35
  "./vue": {
34
36
  "types": "./dist/vue.d.ts",
35
- "import": "./dist/vue.js"
37
+ "import": "./dist/vue.js",
38
+ "default": "./dist/vue.js"
36
39
  },
37
40
  "./package.json": "./package.json"
38
41
  },
42
+ "typesVersions": {
43
+ "*": {
44
+ "react": [
45
+ "dist/react.d.ts"
46
+ ],
47
+ "vue": [
48
+ "dist/vue.d.ts"
49
+ ]
50
+ }
51
+ },
39
52
  "files": [
40
53
  "dist",
41
54
  "!dist/*.tsbuildinfo"