@plurid/plurid-react-server 0.0.0-14 → 0.0.0-16

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 (29) hide show
  1. package/README.md +69 -5
  2. package/distribution/index.d.mts +244 -0
  3. package/distribution/index.d.ts +244 -6
  4. package/distribution/index.js +1573 -1056
  5. package/distribution/index.js.map +1 -0
  6. package/distribution/index.mjs +1642 -0
  7. package/distribution/index.mjs.map +1 -0
  8. package/package.json +129 -133
  9. package/distribution/__tests__/sanity.test.d.ts +0 -0
  10. package/distribution/data/constants/general/index.d.ts +0 -34
  11. package/distribution/data/constants/index.d.ts +0 -2
  12. package/distribution/data/constants/stiller/index.d.ts +0 -2
  13. package/distribution/data/interfaces/external/index.d.ts +0 -151
  14. package/distribution/data/interfaces/index.d.ts +0 -2
  15. package/distribution/data/interfaces/internal/index.d.ts +0 -83
  16. package/distribution/data/templates/index.d.ts +0 -2
  17. package/distribution/index.es.js +0 -1095
  18. package/distribution/objects/ContentGenerator/index.d.ts +0 -7
  19. package/distribution/objects/LiveServer/index.d.ts +0 -13
  20. package/distribution/objects/Renderer/index.d.ts +0 -22
  21. package/distribution/objects/Renderer/template/index.d.ts +0 -3
  22. package/distribution/objects/Server/index.d.ts +0 -57
  23. package/distribution/objects/Stiller/__tests__/index.test.d.ts +0 -1
  24. package/distribution/objects/Stiller/index.d.ts +0 -24
  25. package/distribution/objects/StillsGenerator/index.d.ts +0 -8
  26. package/distribution/objects/StillsManager/index.d.ts +0 -9
  27. package/distribution/utilities/pttp/index.d.ts +0 -6
  28. package/distribution/utilities/template/index.d.ts +0 -9
  29. package/distribution/utilities/wrapping/index.d.ts +0 -28
@@ -1,7 +0,0 @@
1
- import { PluridContentGeneratorData } from "../../data/interfaces";
2
- declare class PluridContentGenerator {
3
- private data;
4
- constructor(data: PluridContentGeneratorData);
5
- render(): Promise<string>;
6
- }
7
- export default PluridContentGenerator;
@@ -1,13 +0,0 @@
1
- import { PluridLiveServerOptions } from "../../data/interfaces";
2
- declare class LiveServer {
3
- private options;
4
- private expressServer;
5
- private httpServer;
6
- private sockets;
7
- constructor(options?: Partial<PluridLiveServerOptions>);
8
- private resolveOptions;
9
- private setupExpressServer;
10
- private setupHttpServer;
11
- start(): void;
12
- }
13
- export default LiveServer;
@@ -1,22 +0,0 @@
1
- import { PluridRendererConfiguration } from "../../data/interfaces";
2
- declare class PluridRenderer {
3
- private htmlLanguage;
4
- private head;
5
- private htmlAttributes;
6
- private bodyAttributes;
7
- private defaultStyle;
8
- private styles;
9
- private headScripts;
10
- private bodyScripts;
11
- private vendorScriptSource;
12
- private mainScriptSource;
13
- private root;
14
- private content;
15
- private defaultPreloadedPluridMetastate;
16
- private pluridMetastate;
17
- private globals;
18
- private minify;
19
- constructor(configuration: PluridRendererConfiguration);
20
- html(): string;
21
- }
22
- export default PluridRenderer;
@@ -1,3 +0,0 @@
1
- import { RendererTemplateData } from "../../../data/interfaces";
2
- declare const template: (data: RendererTemplateData) => string;
3
- export default template;
@@ -1,57 +0,0 @@
1
- /// <reference types="node" />
2
- import { Server } from 'http';
3
- import express from 'express';
4
- import { PluridRoute } from '@plurid/plurid-data';
5
- import { PluridReactComponent } from '@plurid/plurid-react';
6
- import { PluridServerOptions, PluridServerConfiguration } from "../../data/interfaces";
7
- declare class PluridServer {
8
- private routes;
9
- private planes;
10
- private preserves;
11
- private helmet;
12
- private styles;
13
- private middleware;
14
- private exterior;
15
- private shell;
16
- private services;
17
- private options;
18
- private template;
19
- usePTTP: boolean;
20
- private pttpHandler;
21
- private elementqlEndpoint;
22
- private serverApplication;
23
- private server;
24
- private port;
25
- private isoMatcher;
26
- constructor(configuration: PluridServerConfiguration);
27
- static analysis(pluridServer: PluridServer): {
28
- routes: PluridRoute<PluridReactComponent<any, import("@plurid/plurid-data").PluridPlaneComponentProperty | import("@plurid/plurid-data").PluridRouteComponentProperty>, any>[];
29
- options: PluridServerOptions;
30
- };
31
- start(port?: string | number): Server;
32
- stop(): void;
33
- handle(): {
34
- post: (path: string, ...handlers: express.RequestHandler[]) => express.Express;
35
- patch: (path: string, ...handlers: express.RequestHandler[]) => express.Express;
36
- put: (path: string, ...handlers: express.RequestHandler[]) => express.Express;
37
- delete: (path: string, ...handlers: express.RequestHandler[]) => express.Express;
38
- };
39
- instance(): express.Express;
40
- private handleEndpoints;
41
- private handleGetRequest;
42
- private handlePTTPRequest;
43
- private ignoreGetRequest;
44
- private resolveMatchingPath;
45
- private resolvePreserve;
46
- private resolvePreserveAfterServe;
47
- private handleGateway;
48
- private renderApplication;
49
- private getContentAndStyles;
50
- private computeRequestTime;
51
- private handleOptions;
52
- private configureServer;
53
- private loadMiddleware;
54
- private open;
55
- private debugAllows;
56
- }
57
- export default PluridServer;
@@ -1,24 +0,0 @@
1
- import { StillerOptions } from "../../data/interfaces";
2
- /**
3
- * The Server will parse the given application routes,
4
- * and will decide which ones to send to the Stiller.
5
- *
6
- * The Stiller spins a server, accesses the routes,
7
- * views the application routes as a browser,
8
- * extracts the HTML of the plurid pages,
9
- * and returns a data structure which will be used by the Server
10
- * to serve the adequate plurid space structure when asked for the given route.
11
- */
12
- declare class Stiller {
13
- private puppeteer;
14
- private host;
15
- private routes;
16
- private configuration;
17
- constructor(options: StillerOptions);
18
- still(): AsyncGenerator<{
19
- route: string;
20
- html: string;
21
- stilltime: number;
22
- }, void, unknown>;
23
- }
24
- export default Stiller;
@@ -1,8 +0,0 @@
1
- import { StillsGeneratorOptions } from "../../data/interfaces";
2
- declare class StillsGenerator {
3
- private options;
4
- constructor(options?: Partial<StillsGeneratorOptions>);
5
- resolveOptions(options?: Partial<StillsGeneratorOptions>): StillsGeneratorOptions;
6
- initialize(): Promise<void>;
7
- }
8
- export default StillsGenerator;
@@ -1,9 +0,0 @@
1
- import { PluridServerOptions } from "../../data/interfaces";
2
- declare class StillsManager {
3
- private options;
4
- private stills;
5
- constructor(options: PluridServerOptions);
6
- get(url: string): string | undefined;
7
- private findStills;
8
- }
9
- export default StillsManager;
@@ -1,6 +0,0 @@
1
- import { IsoMatcherPlaneResult } from '@plurid/plurid-data';
2
- import { PluridReactComponent } from '@plurid/plurid-react';
3
- export declare const resolveElementFromPlaneMatch: (planeMatch: IsoMatcherPlaneResult<PluridReactComponent<any>>, elementqlEndpoint: string | undefined) => {
4
- name: string;
5
- url: string | undefined;
6
- } | undefined;
@@ -1,9 +0,0 @@
1
- export declare const cleanTemplate: (template: string) => string;
2
- export declare const resolveBackgroundStyle: (store: string) => {
3
- gradientBackground: string;
4
- gradientForeground: string;
5
- };
6
- export declare const recordToString: (record: Record<string, string> | undefined) => string;
7
- export declare const assetsPathRewrite: (content: string) => string;
8
- export declare const safeStore: (store: string) => string;
9
- export declare const globalsInjector: (globals: Record<string, string>) => string;
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- declare const wrapping: (WrappedComponent: any, WrappeeComponent: any, properties: any) => {
3
- new (props: any): {
4
- render(): JSX.Element;
5
- context: unknown;
6
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
7
- forceUpdate(callback?: (() => void) | undefined): void;
8
- readonly props: Readonly<{}>;
9
- state: Readonly<{}>;
10
- refs: {
11
- [key: string]: React.ReactInstance;
12
- };
13
- componentDidMount?(): void;
14
- shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
15
- componentWillUnmount?(): void;
16
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
17
- getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
18
- componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
19
- componentWillMount?(): void;
20
- UNSAFE_componentWillMount?(): void;
21
- componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
22
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
23
- componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
24
- UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
25
- };
26
- contextType?: React.Context<any> | undefined;
27
- };
28
- export default wrapping;