@xplortech/apollo-angular 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 CHANGED
@@ -13,6 +13,7 @@ See the root [AGENTS.md](https://github.com/xplor/apollo/blob/main/AGENTS.md) fo
13
13
  | Build | `nx build @xplortech/apollo-angular` |
14
14
  | TypeScript compile | `nx tsc @xplortech/apollo-angular` |
15
15
  | Tests (smoke) | `nx test @xplortech/apollo-angular` |
16
+ | Tests (SSR runtime) | `nx test:ssr @xplortech/apollo-angular` (requires `nx build @xplortech/apollo-core` and `nx build @xplortech/apollo-angular`) |
16
17
  | Clean | `nx clean @xplortech/apollo-angular` |
17
18
  | Angular Storybook (dev, port 6007) | `nx storybook @xplortech/apollo-angular` |
18
19
  | Angular Storybook (static build) | `nx build:storybook @xplortech/apollo-angular` |
@@ -30,4 +31,21 @@ There is no per-package lint target; lint runs at the workspace level via `npm r
30
31
 
31
32
  ## CSS proxy files
32
33
 
33
- Committed one-line `@import` proxies under `css/` re-export `@xplortech/apollo-core` modular CSS without an `exports` field (subpaths resolve by file path). Per-component treeshake CSS is **not** proxied — consumers import `@xplortech/apollo-core/css/components/*` directly.
34
+ Committed one-line `@import` proxies under `css/` re-export `@xplortech/apollo-core` modular CSS via the package `exports` map (`./css/*`). Per-component treeshake CSS is **not** proxied — consumers import `@xplortech/apollo-core/css/components/*` directly. SSR helpers (`provideApolloSSR()`) are exported from the root entry — there is no `./server` subpath.
35
+
36
+ ## AI tooling (MCP)
37
+
38
+ 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`:
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "apollo-docs": {
44
+ "url": "https://platform.xplordocs.com/mcp"
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ - Machine-readable doc indexes: [llms.txt](https://platform.xplordocs.com/llms.txt) and [llms-full.txt](https://platform.xplordocs.com/llms-full.txt)
51
+ - The server covers all Xplor Platform docs; Apollo content lives under `/apollo/`
package/README.md CHANGED
@@ -7,11 +7,15 @@ Angular bindings for the Apollo design system (`@xplortech/apollo-core` web comp
7
7
  Published as **`@xplortech/apollo-angular`** on the public npm registry (same scope as `@xplortech/apollo-core` and `@xplortech/apollo-react`).
8
8
 
9
9
  ```bash
10
- npm install @xplortech/apollo-angular @xplortech/apollo-core
10
+ npm install @xplortech/apollo-angular
11
11
  ```
12
12
 
13
+ `@xplortech/apollo-core` is included as a dependency — you do not need to install both.
14
+
13
15
  Peer dependencies: **Angular 19+**, **RxJS 7+**, and **TypeScript 5+**.
14
16
 
17
+ The package `exports` map exposes the root entry (`@xplortech/apollo-angular`), documented `css/*` proxy paths, and `./dist/*` passthroughs for backwards compatibility. There is no separate `./server` subpath — SSR helpers such as `provideApolloSSR()` are exported from the root entry.
18
+
15
19
  Import styles once in your app (path may vary with your bundler):
16
20
 
17
21
  ```css
@@ -182,6 +186,26 @@ Pass objects and arrays directly as `[propName]` bindings — Angular forwards t
182
186
  <xpl-table [data]="rows" [columns]="cols"></xpl-table>
183
187
  ```
184
188
 
189
+ ## Server-side rendering (Angular Universal)
190
+
191
+ `@stencil/angular-output-target` has no `hydrateModule` option (unlike React and Vue). For Angular Universal, import **`provideApolloSSR()`** from the package root — there is no separate `@xplortech/apollo-angular/server` entry. Add it to your server config alongside `provideServerRendering()`:
192
+
193
+ ```ts
194
+ // app.config.server.ts
195
+ import { mergeApplicationConfig, ApplicationConfig } from '@angular/core';
196
+ import { provideServerRendering } from '@angular/platform-server';
197
+ import { provideApolloSSR } from '@xplortech/apollo-angular';
198
+ import { appConfig } from './app.config';
199
+
200
+ const serverConfig: ApplicationConfig = {
201
+ providers: [provideServerRendering(), provideApolloSSR()],
202
+ };
203
+
204
+ export const config = mergeApplicationConfig(appConfig, serverConfig);
205
+ ```
206
+
207
+ Use the same standalone imports as in the browser (`XplButton`, `XplInput`, `TextValueAccessor`, etc.). SSR HTML will include Stencil-serialized markup on `xpl-*` hosts. `provideApolloSSR()` syncs Angular property bindings (including `[(ngModel)]`) before serialization and sets `ngSkipHydration` on each host so `provideClientHydration()` does not fight Stencil's server markup. See the [SSR guide](https://platform.xplordocs.com/apollo/ssr) for React, Vue, and verification steps.
208
+
185
209
  ## Further reading
186
210
 
187
211
  - [Apollo repo](https://github.com/xplor/apollo)
@@ -1,6 +1,9 @@
1
1
  import { ElementRef } from '@angular/core';
2
2
  import { ValueAccessor } from './value-accessor';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class BooleanValueAccessor extends ValueAccessor {
4
5
  constructor(el: ElementRef);
5
6
  writeValue(value: any): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<BooleanValueAccessor, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BooleanValueAccessor, "xpl-checkbox, xpl-toggle", never, {}, {}, never, never, true, never>;
6
9
  }
@@ -1,39 +1,39 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
1
  import { Directive, ElementRef, forwardRef } from '@angular/core';
11
2
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
12
3
  import { ValueAccessor } from './value-accessor';
13
- let BooleanValueAccessor = class BooleanValueAccessor extends ValueAccessor {
4
+ import * as i0 from "@angular/core";
5
+ export class BooleanValueAccessor extends ValueAccessor {
14
6
  constructor(el) {
15
7
  super(el);
16
8
  }
17
9
  writeValue(value) {
18
10
  this.el.nativeElement.checked = this.lastValue = value == null ? false : value;
19
11
  }
20
- };
21
- BooleanValueAccessor = __decorate([
22
- Directive({
23
- selector: 'xpl-checkbox, xpl-toggle',
24
- host: {
25
- '(checkboxChange)': 'handleChangeEvent($event.detail)',
26
- '(toggleChange)': 'handleChangeEvent($event.detail)'
27
- },
28
- providers: [
29
- {
30
- provide: NG_VALUE_ACCESSOR,
31
- useExisting: forwardRef(() => BooleanValueAccessor),
32
- multi: true
33
- }
34
- ]
35
- }),
36
- __metadata("design:paramtypes", [ElementRef])
37
- ], BooleanValueAccessor);
38
- export { BooleanValueAccessor };
12
+ }
13
+ BooleanValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: BooleanValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
14
+ BooleanValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: BooleanValueAccessor, isStandalone: true, selector: "xpl-checkbox, xpl-toggle", host: { listeners: { "checkboxChange": "handleChangeEvent($event.detail)", "toggleChange": "handleChangeEvent($event.detail)" } }, providers: [
15
+ {
16
+ provide: NG_VALUE_ACCESSOR,
17
+ useExisting: forwardRef(() => BooleanValueAccessor),
18
+ multi: true
19
+ }
20
+ ], usesInheritance: true, ngImport: i0 });
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: BooleanValueAccessor, decorators: [{
22
+ type: Directive,
23
+ args: [{
24
+ selector: 'xpl-checkbox, xpl-toggle',
25
+ standalone: true,
26
+ host: {
27
+ '(checkboxChange)': 'handleChangeEvent($event.detail)',
28
+ '(toggleChange)': 'handleChangeEvent($event.detail)'
29
+ },
30
+ providers: [
31
+ {
32
+ provide: NG_VALUE_ACCESSOR,
33
+ useExisting: forwardRef(() => BooleanValueAccessor),
34
+ multi: true
35
+ }
36
+ ]
37
+ }]
38
+ }], ctorParameters: () => [{ type: i0.ElementRef }] });
39
39
  //# sourceMappingURL=boolean-value-accessor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"boolean-value-accessor.js","sourceRoot":"","sources":["../../src/directives/boolean-value-accessor.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAiB1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,aAAa;IACrD,YAAY,EAAc;QACxB,KAAK,CAAC,EAAE,CAAC,CAAC;IACZ,CAAC;IACQ,UAAU,CAAC,KAAU;QAC5B,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACjF,CAAC;CACF,CAAA;AAPY,oBAAoB;IAfhC,SAAS,CAAC;QAET,QAAQ,EAAE,0BAA0B;QACpC,IAAI,EAAE;YACJ,kBAAkB,EAAE,kCAAkC;YACtD,gBAAgB,EAAE,kCAAkC;SACrD;QACD,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC;gBACnD,KAAK,EAAE,IAAI;aACZ;SACF;KACF,CAAC;qCAEgB,UAAU;GADf,oBAAoB,CAOhC"}
1
+ {"version":3,"file":"boolean-value-accessor.js","sourceRoot":"","sources":["../../src/directives/boolean-value-accessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;;AAkBjD,MAAM,OAAO,oBAAqB,SAAQ,aAAa;IACrD,YAAY,EAAc;QACxB,KAAK,CAAC,EAAE,CAAC,CAAC;IACZ,CAAC;IACQ,UAAU,CAAC,KAAU;QAC5B,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACjF,CAAC;;kHANU,oBAAoB;sGAApB,oBAAoB,0MARpB;QACT;YACE,OAAO,EAAE,iBAAiB;YAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC;YACnD,KAAK,EAAE,IAAI;SACZ;KACF;4FAEU,oBAAoB;kBAhBhC,SAAS;mBAAC;oBAET,QAAQ,EAAE,0BAA0B;oBACpC,UAAU,EAAE,IAAI;oBAChB,IAAI,EAAE;wBACJ,kBAAkB,EAAE,kCAAkC;wBACtD,gBAAgB,EAAE,kCAAkC;qBACrD;oBACD,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,iBAAiB;4BAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,qBAAqB,CAAC;4BACnD,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF"}