strapi-admin-portal 0.0.1 → 0.0.2

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 +4 -4
  2. package/package.json +8 -1
package/README.md CHANGED
@@ -111,18 +111,18 @@ Removes a registered injection route.
111
111
 
112
112
  ## Visual Example
113
113
 
114
- Imagine you want to add a "Terms of Service" reminder below the "Save" button on the user profile page (`/me`).
114
+ Imagine you want to add a "Terms of Service" reminder below the "Login" button on the Login page (`/admin/auth/login`).
115
115
 
116
- 1. **Find the Selector**: Inspect the DOM on the `/me` page. Find the "Save" button. Let's say it's reachable via `form button[type="submit"]`.
116
+ 1. **Find the Selector**: Inspect the DOM on the `/admin/auth/login` page. Find the "Login" button. Let's say it's reachable via `form button[type="submit"]`.
117
117
  2. **Register**:
118
118
  ```ts
119
119
  registerRoute({
120
- route: '/me',
120
+ route: '/admin/auth/login',
121
121
  selector: 'form button[type="submit"]',
122
122
  Component: () => import('./components/TermsReminder'),
123
123
  });
124
124
  ```
125
- 3. **Result**: When you navigate to `/me`, the library watches for the selector. Once found, it creates a new React root next to it and renders your component.
125
+ 3. **Result**: When you navigate to `/admin/auth/logine`, the library watches for the selector. Once found, it creates a new React root next to it and renders your component.
126
126
 
127
127
  ## Caveats
128
128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-admin-portal",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "The Portal Gun for Strapi Admin. Seamlessly mount React components into specific DOM selectors across any admin route.",
5
5
  "keywords": [
6
6
  "strapi",
@@ -21,6 +21,13 @@
21
21
  "main": "dist/index.js",
22
22
  "module": "dist/index.esm.js",
23
23
  "types": "dist/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.mjs",
28
+ "require": "./dist/index.js"
29
+ }
30
+ },
24
31
  "files": [
25
32
  "dist"
26
33
  ],