@angular/platform-server 19.0.0-next.9 → 19.0.0-rc.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/fesm2022/init.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.9
2
+ * @license Angular v19.0.0-rc.0
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.9
2
+ * @license Angular v19.0.0-rc.0
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -16138,14 +16138,12 @@ function serializeDocument(doc) {
16138
16138
  * DOM Adapter for the server platform based on https://github.com/fgnass/domino.
16139
16139
  */
16140
16140
  class DominoAdapter extends ɵBrowserDomAdapter {
16141
- constructor() {
16142
- super(...arguments);
16143
- this.supportsDOMEvents = false;
16144
- }
16145
16141
  static makeCurrent() {
16146
16142
  setDomTypes();
16147
16143
  ɵsetRootDomAdapter(new DominoAdapter());
16148
16144
  }
16145
+ supportsDOMEvents = false;
16146
+ static defaultDoc;
16149
16147
  createHtmlDocument() {
16150
16148
  return parseDocument('<html><head><title>fakeTitle</title></head><body></body></html>');
16151
16149
  }
@@ -16216,10 +16214,11 @@ const ENABLE_DOM_EMULATION = new InjectionToken('ENABLE_DOM_EMULATION');
16216
16214
  * @publicApi
16217
16215
  */
16218
16216
  class PlatformState {
16217
+ _doc;
16218
+ /* @internal */
16219
+ _enableDomEmulation = enableDomEmulation(inject(Injector));
16219
16220
  constructor(_doc) {
16220
16221
  this._doc = _doc;
16221
- /* @internal */
16222
- this._enableDomEmulation = enableDomEmulation(inject(Injector));
16223
16222
  }
16224
16223
  /**
16225
16224
  * Renders the current state of the platform to string.
@@ -16243,10 +16242,10 @@ class PlatformState {
16243
16242
  getDocument() {
16244
16243
  return this._doc;
16245
16244
  }
16246
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
16247
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: PlatformState }); }
16245
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
16246
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: PlatformState });
16248
16247
  }
16249
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: PlatformState, decorators: [{
16248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: PlatformState, decorators: [{
16250
16249
  type: Injectable
16251
16250
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16252
16251
  type: Inject,
@@ -16257,6 +16256,7 @@ function enableDomEmulation(injector) {
16257
16256
  }
16258
16257
 
16259
16258
  class ServerXhr {
16259
+ xhrImpl;
16260
16260
  // The `xhr2` dependency has a side-effect of accessing and modifying a
16261
16261
  // global scope. Loading `xhr2` dynamically allows us to delay the loading
16262
16262
  // and start the process once the global scope is established by the underlying
@@ -16274,10 +16274,10 @@ class ServerXhr {
16274
16274
  }
16275
16275
  return new impl.XMLHttpRequest();
16276
16276
  }
16277
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
16278
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerXhr }); }
16277
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16278
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerXhr });
16279
16279
  }
16280
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerXhr, decorators: [{
16280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerXhr, decorators: [{
16281
16281
  type: Injectable
16282
16282
  }] });
16283
16283
  function relativeUrlsTransformerInterceptorFn(request, next) {
@@ -16321,16 +16321,17 @@ function parseUrl(urlStr) {
16321
16321
  * but not the state stack.
16322
16322
  */
16323
16323
  class ServerPlatformLocation {
16324
+ _doc;
16325
+ href = '/';
16326
+ hostname = '/';
16327
+ protocol = '/';
16328
+ port = '/';
16329
+ pathname = '/';
16330
+ search = '';
16331
+ hash = '';
16332
+ _hashUpdate = new Subject();
16324
16333
  constructor(_doc, _config) {
16325
16334
  this._doc = _doc;
16326
- this.href = '/';
16327
- this.hostname = '/';
16328
- this.protocol = '/';
16329
- this.port = '/';
16330
- this.pathname = '/';
16331
- this.search = '';
16332
- this.hash = '';
16333
- this._hashUpdate = new Subject();
16334
16335
  const config = _config;
16335
16336
  if (!config) {
16336
16337
  return;
@@ -16395,10 +16396,10 @@ class ServerPlatformLocation {
16395
16396
  getState() {
16396
16397
  return undefined;
16397
16398
  }
16398
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
16399
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerPlatformLocation }); }
16399
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
16400
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerPlatformLocation });
16400
16401
  }
16401
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerPlatformLocation, decorators: [{
16402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerPlatformLocation, decorators: [{
16402
16403
  type: Injectable
16403
16404
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16404
16405
  type: Inject,
@@ -16411,6 +16412,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.9",
16411
16412
  }] }] });
16412
16413
 
16413
16414
  class ServerEventManagerPlugin extends EventManagerPlugin {
16415
+ doc;
16414
16416
  constructor(doc) {
16415
16417
  super(doc);
16416
16418
  this.doc = doc;
@@ -16422,10 +16424,10 @@ class ServerEventManagerPlugin extends EventManagerPlugin {
16422
16424
  addEventListener(element, eventName, handler) {
16423
16425
  return ɵgetDOM().onAndCancel(element, eventName, handler);
16424
16426
  }
16425
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerEventManagerPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
16426
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerEventManagerPlugin }); }
16427
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerEventManagerPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
16428
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerEventManagerPlugin });
16427
16429
  }
16428
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerEventManagerPlugin, decorators: [{
16430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerEventManagerPlugin, decorators: [{
16429
16431
  type: Injectable
16430
16432
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16431
16433
  type: Inject,
@@ -16518,11 +16520,11 @@ const PLATFORM_SERVER_PROVIDERS = [
16518
16520
  * @publicApi
16519
16521
  */
16520
16522
  class ServerModule {
16521
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
16522
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerModule, imports: [NoopAnimationsModule], exports: [BrowserModule] }); }
16523
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [NoopAnimationsModule, BrowserModule] }); }
16523
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16524
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerModule, imports: [NoopAnimationsModule], exports: [BrowserModule] });
16525
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [NoopAnimationsModule, BrowserModule] });
16524
16526
  }
16525
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.9", ngImport: i0, type: ServerModule, decorators: [{
16527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ServerModule, decorators: [{
16526
16528
  type: NgModule,
16527
16529
  args: [{
16528
16530
  exports: [BrowserModule],
@@ -16552,7 +16554,16 @@ function _document(injector) {
16552
16554
  /**
16553
16555
  * @publicApi
16554
16556
  */
16555
- const platformServer = createPlatformFactory(platformCore, 'server', INTERNAL_SERVER_PLATFORM_PROVIDERS);
16557
+ function platformServer(extraProviders) {
16558
+ if (typeof ngServerMode === 'undefined') {
16559
+ globalThis['ngServerMode'] = true;
16560
+ }
16561
+ const platform = createPlatformFactory(platformCore, 'server', INTERNAL_SERVER_PLATFORM_PROVIDERS)(extraProviders);
16562
+ platform.onDestroy(() => {
16563
+ globalThis['ngServerMode'] = undefined;
16564
+ });
16565
+ return platform;
16566
+ }
16556
16567
 
16557
16568
  /**
16558
16569
  * Sets up providers necessary to enable server rendering functionality for the application.
@@ -16570,6 +16581,9 @@ const platformServer = createPlatformFactory(platformCore, 'server', INTERNAL_SE
16570
16581
  * @returns A set of providers to setup the server.
16571
16582
  */
16572
16583
  function provideServerRendering() {
16584
+ if (typeof ngServerMode === 'undefined') {
16585
+ globalThis['ngServerMode'] = true;
16586
+ }
16573
16587
  return makeEnvironmentProviders([provideNoopAnimations(), ...PLATFORM_SERVER_PROVIDERS]);
16574
16588
  }
16575
16589
 
@@ -16826,7 +16840,7 @@ async function renderApplication(bootstrap, options) {
16826
16840
  /**
16827
16841
  * @publicApi
16828
16842
  */
16829
- const VERSION = new Version('19.0.0-next.9');
16843
+ const VERSION = new Version('19.0.0-rc.0');
16830
16844
 
16831
16845
  /// <reference types="node" />
16832
16846
  // This file only reexports content of the `src` folder. Keep it that way.