@plurid/plurid-react-server 0.0.0-14 → 0.0.0-15
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import { Helmet } from 'react-helmet-async';
|
|
3
|
-
import { PluridRoute, PluridRoutePlane, PluridPreserve, IsoMatcherRouteResult } from '@plurid/plurid-data';
|
|
3
|
+
import { PluridRoute, PluridRoutePlane, PluridPreserve, IsoMatcherRouteResult, PluridRouterProperties } from '@plurid/plurid-data';
|
|
4
4
|
import { PluridReactComponent } from '@plurid/plurid-react';
|
|
5
5
|
export declare type PluridServerMiddleware = (request: express.Request, response: express.Response, next: express.NextFunction) => void;
|
|
6
6
|
export declare type ServerRequest = express.Request & {
|
|
@@ -79,6 +79,7 @@ export interface PluridServerConfiguration {
|
|
|
79
79
|
middleware?: PluridServerMiddleware[];
|
|
80
80
|
exterior?: PluridReactComponent;
|
|
81
81
|
shell?: PluridReactComponent;
|
|
82
|
+
routerProperties?: Partial<PluridRouterProperties<PluridReactComponent>>;
|
|
82
83
|
/**
|
|
83
84
|
* Replace the internal plurid plane with a custom implementation.
|
|
84
85
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Helmet } from 'react-helmet-async';
|
|
2
2
|
import { ServerStyleSheet } from 'styled-components';
|
|
3
|
-
import { Indexed, PluridRoute, PluridRoutePlane, PluridPreserveResponse } from '@plurid/plurid-data';
|
|
3
|
+
import { Indexed, PluridRoute, PluridRoutePlane, PluridPreserveResponse, PluridRouterProperties } from '@plurid/plurid-data';
|
|
4
4
|
import { PluridReactComponent } from '@plurid/plurid-react';
|
|
5
5
|
import { PluridServerService, PluridStillerOptions } from '../external';
|
|
6
6
|
export interface PluridRendererConfiguration {
|
|
@@ -52,6 +52,7 @@ export interface PluridContentGeneratorData {
|
|
|
52
52
|
helmet: Helmet;
|
|
53
53
|
exterior: PluridReactComponent | undefined;
|
|
54
54
|
shell: PluridReactComponent | undefined;
|
|
55
|
+
routerProperties: Partial<PluridRouterProperties<PluridReactComponent>>;
|
|
55
56
|
routes: PluridRoute<PluridReactComponent>[];
|
|
56
57
|
planes: PluridRoutePlane<PluridReactComponent>[];
|
|
57
58
|
pluridMetastate: any;
|
package/distribution/index.es.js
CHANGED
|
@@ -285,7 +285,7 @@ class PluridContentGenerator {
|
|
|
285
285
|
render() {
|
|
286
286
|
var _a;
|
|
287
287
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
288
|
-
const {pluridMetastate: pluridMetastate, routes: routes, planes: planes, exterior: exterior, shell: shell, gateway: gateway, gatewayEndpoint: gatewayEndpoint, gatewayQuery: gatewayQuery, helmet: helmet, services: services, stylesheet: stylesheet, preserveResult: preserveResult, matchedPlane: matchedPlane, pathname: pathname, hostname: hostname} = this.data;
|
|
288
|
+
const {pluridMetastate: pluridMetastate, routes: routes, planes: planes, exterior: exterior, shell: shell, routerProperties: routerProperties, gateway: gateway, gatewayEndpoint: gatewayEndpoint, gatewayQuery: gatewayQuery, helmet: helmet, services: services, stylesheet: stylesheet, preserveResult: preserveResult, matchedPlane: matchedPlane, pathname: pathname, hostname: hostname} = this.data;
|
|
289
289
|
const RoutedApplication = () => React.createElement(PluridProvider, {
|
|
290
290
|
metastate: pluridMetastate
|
|
291
291
|
}, React.createElement(PluridRouterStatic, {
|
|
@@ -298,7 +298,8 @@ class PluridContentGenerator {
|
|
|
298
298
|
gateway: gateway,
|
|
299
299
|
gatewayEndpoint: gatewayEndpoint,
|
|
300
300
|
gatewayQuery: gatewayQuery,
|
|
301
|
-
hostname: hostname
|
|
301
|
+
hostname: hostname,
|
|
302
|
+
routerProperties: routerProperties
|
|
302
303
|
}));
|
|
303
304
|
let Wrap = wrapping(HelmetProvider, RoutedApplication, {
|
|
304
305
|
context: helmet
|
|
@@ -335,7 +336,7 @@ const {IsoMatcher: PluridIsoMatcher} = routing;
|
|
|
335
336
|
|
|
336
337
|
class PluridServer {
|
|
337
338
|
constructor(configuration) {
|
|
338
|
-
const {routes: routes, planes: planes, preserves: preserves, helmet: helmet, styles: styles, middleware: middleware, exterior: exterior, shell: shell, services: services, options: options, template: template, usePTTP: usePTTP, pttpHandler: pttpHandler, elementqlEndpoint: elementqlEndpoint} = configuration;
|
|
339
|
+
const {routes: routes, planes: planes, preserves: preserves, helmet: helmet, styles: styles, middleware: middleware, exterior: exterior, shell: shell, routerProperties: routerProperties, services: services, options: options, template: template, usePTTP: usePTTP, pttpHandler: pttpHandler, elementqlEndpoint: elementqlEndpoint} = configuration;
|
|
339
340
|
this.routes = routes;
|
|
340
341
|
this.planes = planes || [];
|
|
341
342
|
this.preserves = preserves;
|
|
@@ -344,6 +345,7 @@ class PluridServer {
|
|
|
344
345
|
this.middleware = middleware || [];
|
|
345
346
|
this.exterior = exterior;
|
|
346
347
|
this.shell = shell;
|
|
348
|
+
this.routerProperties = routerProperties || {};
|
|
347
349
|
this.services = services || [];
|
|
348
350
|
this.options = this.handleOptions(options);
|
|
349
351
|
this.template = template;
|
|
@@ -768,6 +770,7 @@ class PluridServer {
|
|
|
768
770
|
stylesheet: stylesheet,
|
|
769
771
|
exterior: this.exterior,
|
|
770
772
|
shell: this.shell,
|
|
773
|
+
routerProperties: this.routerProperties,
|
|
771
774
|
helmet: this.helmet,
|
|
772
775
|
routes: this.routes,
|
|
773
776
|
planes: this.planes,
|
package/distribution/index.js
CHANGED
|
@@ -313,7 +313,7 @@ class PluridContentGenerator {
|
|
|
313
313
|
render() {
|
|
314
314
|
var _a;
|
|
315
315
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
316
|
-
const {pluridMetastate: pluridMetastate, routes: routes, planes: planes, exterior: exterior, shell: shell, gateway: gateway, gatewayEndpoint: gatewayEndpoint, gatewayQuery: gatewayQuery, helmet: helmet, services: services, stylesheet: stylesheet, preserveResult: preserveResult, matchedPlane: matchedPlane, pathname: pathname, hostname: hostname} = this.data;
|
|
316
|
+
const {pluridMetastate: pluridMetastate, routes: routes, planes: planes, exterior: exterior, shell: shell, routerProperties: routerProperties, gateway: gateway, gatewayEndpoint: gatewayEndpoint, gatewayQuery: gatewayQuery, helmet: helmet, services: services, stylesheet: stylesheet, preserveResult: preserveResult, matchedPlane: matchedPlane, pathname: pathname, hostname: hostname} = this.data;
|
|
317
317
|
const RoutedApplication = () => React__default["default"].createElement(pluridReact.PluridProvider, {
|
|
318
318
|
metastate: pluridMetastate
|
|
319
319
|
}, React__default["default"].createElement(pluridReact.PluridRouterStatic, {
|
|
@@ -326,7 +326,8 @@ class PluridContentGenerator {
|
|
|
326
326
|
gateway: gateway,
|
|
327
327
|
gatewayEndpoint: gatewayEndpoint,
|
|
328
328
|
gatewayQuery: gatewayQuery,
|
|
329
|
-
hostname: hostname
|
|
329
|
+
hostname: hostname,
|
|
330
|
+
routerProperties: routerProperties
|
|
330
331
|
}));
|
|
331
332
|
let Wrap = wrapping(reactHelmetAsync.HelmetProvider, RoutedApplication, {
|
|
332
333
|
context: helmet
|
|
@@ -363,7 +364,7 @@ const {IsoMatcher: PluridIsoMatcher} = pluridEngine.routing;
|
|
|
363
364
|
|
|
364
365
|
class PluridServer {
|
|
365
366
|
constructor(configuration) {
|
|
366
|
-
const {routes: routes, planes: planes, preserves: preserves, helmet: helmet, styles: styles, middleware: middleware, exterior: exterior, shell: shell, services: services, options: options, template: template, usePTTP: usePTTP, pttpHandler: pttpHandler, elementqlEndpoint: elementqlEndpoint} = configuration;
|
|
367
|
+
const {routes: routes, planes: planes, preserves: preserves, helmet: helmet, styles: styles, middleware: middleware, exterior: exterior, shell: shell, routerProperties: routerProperties, services: services, options: options, template: template, usePTTP: usePTTP, pttpHandler: pttpHandler, elementqlEndpoint: elementqlEndpoint} = configuration;
|
|
367
368
|
this.routes = routes;
|
|
368
369
|
this.planes = planes || [];
|
|
369
370
|
this.preserves = preserves;
|
|
@@ -372,6 +373,7 @@ class PluridServer {
|
|
|
372
373
|
this.middleware = middleware || [];
|
|
373
374
|
this.exterior = exterior;
|
|
374
375
|
this.shell = shell;
|
|
376
|
+
this.routerProperties = routerProperties || {};
|
|
375
377
|
this.services = services || [];
|
|
376
378
|
this.options = this.handleOptions(options);
|
|
377
379
|
this.template = template;
|
|
@@ -796,6 +798,7 @@ class PluridServer {
|
|
|
796
798
|
stylesheet: stylesheet,
|
|
797
799
|
exterior: this.exterior,
|
|
798
800
|
shell: this.shell,
|
|
801
|
+
routerProperties: this.routerProperties,
|
|
799
802
|
helmet: this.helmet,
|
|
800
803
|
routes: this.routes,
|
|
801
804
|
planes: this.planes,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurid/plurid-react-server",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-15",
|
|
4
4
|
"description": "React implementation of Plurid to view and explore the web in three dimensions with server-side rendering",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurid",
|
|
@@ -80,13 +80,13 @@
|
|
|
80
80
|
"@babel/core": "^7.19.0",
|
|
81
81
|
"@plurid/elementql": "^0.0.0-1",
|
|
82
82
|
"@plurid/elementql-client-react": "^0.0.0-1",
|
|
83
|
-
"@plurid/plurid-data": "0.0.0-
|
|
83
|
+
"@plurid/plurid-data": "0.0.0-20",
|
|
84
84
|
"@plurid/plurid-engine": "0.0.0-18",
|
|
85
85
|
"@plurid/plurid-functions": "0.0.0-30",
|
|
86
86
|
"@plurid/plurid-functions-react": "0.0.0-5",
|
|
87
87
|
"@plurid/plurid-icons-react": "0.0.0-5",
|
|
88
88
|
"@plurid/plurid-pubsub": "0.0.0-9",
|
|
89
|
-
"@plurid/plurid-react": "0.0.0-
|
|
89
|
+
"@plurid/plurid-react": "0.0.0-30",
|
|
90
90
|
"@plurid/plurid-themes": "0.0.0-2",
|
|
91
91
|
"@plurid/plurid-ui-components-react": "0.0.0-18",
|
|
92
92
|
"@plurid/plurid-ui-state-react": "0.0.0-7",
|