@xplortech/apollo-react 3.2.1 → 3.4.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/AGENTS.md +19 -1
- package/README.md +11 -1
- package/package.json +18 -5
package/AGENTS.md
CHANGED
|
@@ -24,7 +24,25 @@ There is no per-package lint target; lint runs at the workspace level via `npm r
|
|
|
24
24
|
|
|
25
25
|
- Usage and examples: [README.md](./README.md)
|
|
26
26
|
- Depends on `@xplortech/apollo-core` for runtime and styles
|
|
27
|
+
- Package `exports` map: `.` (client bindings), `./server` (SSR bindings → `dist/components/stencil-generated/components.server.js`), `./css/*` (style proxies), plus `./dist/*` and `./package.json` passthroughs for backwards compatibility. The generated `dist/` layout is internal — new consumer-facing entries belong in the `exports` map, not in documented deep imports.
|
|
27
28
|
|
|
28
29
|
## CSS proxy files
|
|
29
30
|
|
|
30
|
-
Committed one-line `@import` proxies under `css/` re-export `@xplortech/apollo-core` modular CSS
|
|
31
|
+
Committed one-line `@import` proxies under `css/` re-export `@xplortech/apollo-core` modular CSS via the `./css/*` subpath export. Per-component treeshake CSS is **not** proxied — consumers import `@xplortech/apollo-core/css/components/*` directly.
|
|
32
|
+
|
|
33
|
+
## AI tooling (MCP)
|
|
34
|
+
|
|
35
|
+
The public Apollo docs expose a **streamable-HTTP MCP server** at `https://platform.xplordocs.com/mcp` (public, unauthenticated) that gives coding agents searchable access to the documentation. To use it in Cursor, add this to your project's `.cursor/mcp.json`:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"mcpServers": {
|
|
40
|
+
"apollo-docs": {
|
|
41
|
+
"url": "https://platform.xplordocs.com/mcp"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- Machine-readable doc indexes: [llms.txt](https://platform.xplordocs.com/llms.txt) and [llms-full.txt](https://platform.xplordocs.com/llms-full.txt)
|
|
48
|
+
- The server covers all Xplor Platform docs; Apollo content lives under `/apollo/`
|
package/README.md
CHANGED
|
@@ -32,7 +32,17 @@ import '@xplortech/apollo-react/css/tailwind-theme.css'; // when using Tailwind
|
|
|
32
32
|
|
|
33
33
|
Other modular entry points: `reset.css`, `typography.css`, `variables/field-edge.css`, and `vendor/flatpickr.css`.
|
|
34
34
|
|
|
35
|
-
Per-component CSS for treeshaking is not proxied here — import directly from `@xplortech/apollo-core/css/components/*` (for example `@xplortech/apollo-core/css/components/button.css`).
|
|
35
|
+
Per-component CSS for treeshaking is not proxied here — import directly from `@xplortech/apollo-core/css/components/*` (for example `@xplortech/apollo-core/css/components/button.css`). When using these per-component paths, declare `@xplortech/apollo-core` in your own `package.json`: it otherwise resolves as a pinned transitive dependency of this package via npm hoisting, which is fragile and prevents bumping core independently.
|
|
36
|
+
|
|
37
|
+
## Server-side rendering
|
|
38
|
+
|
|
39
|
+
Import server bindings from the dedicated `./server` subpath export when rendering on Node (e.g. `renderToReadableStream`, Next.js App Router server components):
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { XplButton } from '@xplortech/apollo-react/server';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Server bindings call Stencil `hydrateModule` during SSR so server HTML matches what the client hydrates. Client bundles should keep using the default `@xplortech/apollo-react` import. See the [SSR guide](https://platform.xplordocs.com/apollo/getting-started/ssr) for full setup.
|
|
36
46
|
|
|
37
47
|
## Getting Started
|
|
38
48
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xplortech/apollo-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./server": {
|
|
13
|
+
"types": "./dist/components/stencil-generated/components.server.d.ts",
|
|
14
|
+
"default": "./dist/components/stencil-generated/components.server.js"
|
|
15
|
+
},
|
|
16
|
+
"./css/*": "./css/*",
|
|
17
|
+
"./dist/*": "./dist/*",
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
7
20
|
"private": false,
|
|
8
21
|
"publishConfig": {
|
|
9
22
|
"access": "public",
|
|
@@ -49,7 +62,7 @@
|
|
|
49
62
|
"@types/jest": "^29.5.14",
|
|
50
63
|
"@types/node": "^18.14.1",
|
|
51
64
|
"@types/react": "19.2.18",
|
|
52
|
-
"@types/react-dom": "19.2.
|
|
65
|
+
"@types/react-dom": "19.2.7",
|
|
53
66
|
"jest": "^29.7.0",
|
|
54
67
|
"np": "^11.2.0",
|
|
55
68
|
"react": "^19.2.8",
|
|
@@ -57,9 +70,9 @@
|
|
|
57
70
|
"typescript": "^5.5.3"
|
|
58
71
|
},
|
|
59
72
|
"dependencies": {
|
|
60
|
-
"@stencil/react-output-target": "1.6.
|
|
61
|
-
"@xplortech/apollo-core": "3.
|
|
62
|
-
"@xplortech/apollo-icons": "0.5.
|
|
73
|
+
"@stencil/react-output-target": "1.6.2",
|
|
74
|
+
"@xplortech/apollo-core": "3.4.0",
|
|
75
|
+
"@xplortech/apollo-icons": "0.5.1"
|
|
63
76
|
},
|
|
64
77
|
"peerDependencies": {
|
|
65
78
|
"react": "^18 || ^19",
|