@geometra/server 0.1.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/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol.d.ts +36 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +34 -0
- package/dist/protocol.js.map +1 -0
- package/dist/server.d.ts +23 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +87 -0
- package/dist/server.js.map +1 -0
- package/package.json +42 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createServer } from './server.js';
|
|
2
|
+
export type { TexturaServer, TexturaServerOptions } from './server.js';
|
|
3
|
+
export { diffLayout } from './protocol.js';
|
|
4
|
+
export type { ServerMessage, ClientMessage, LayoutPatch } from './protocol.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ComputedLayout } from 'textura';
|
|
2
|
+
import type { UIElement } from '@geometra/core';
|
|
3
|
+
/** Messages sent from server to client. */
|
|
4
|
+
export type ServerMessage = {
|
|
5
|
+
type: 'frame';
|
|
6
|
+
layout: ComputedLayout;
|
|
7
|
+
tree: UIElement;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'patch';
|
|
10
|
+
patches: LayoutPatch[];
|
|
11
|
+
} | {
|
|
12
|
+
type: 'error';
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
/** Messages sent from client to server. */
|
|
16
|
+
export type ClientMessage = {
|
|
17
|
+
type: 'event';
|
|
18
|
+
eventType: string;
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
} | {
|
|
22
|
+
type: 'resize';
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
/** A patch describing a change to a single node's geometry. */
|
|
27
|
+
export interface LayoutPatch {
|
|
28
|
+
path: number[];
|
|
29
|
+
x?: number;
|
|
30
|
+
y?: number;
|
|
31
|
+
width?: number;
|
|
32
|
+
height?: number;
|
|
33
|
+
}
|
|
34
|
+
/** Diff two computed layouts and return patches for changed nodes. */
|
|
35
|
+
export declare function diffLayout(prev: ComputedLayout, next: ComputedLayout, path?: number[]): LayoutPatch[];
|
|
36
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,2CAA2C;AAC3C,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC1D;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,WAAW,EAAE,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtC,2CAA2C;AAC3C,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAErD,+DAA+D;AAC/D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CACxB,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,cAAc,EACpB,IAAI,GAAE,MAAM,EAAO,GAClB,WAAW,EAAE,CAuBf"}
|
package/dist/protocol.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Diff two computed layouts and return patches for changed nodes. */
|
|
2
|
+
export function diffLayout(prev, next, path = []) {
|
|
3
|
+
const patches = [];
|
|
4
|
+
const patch = { path };
|
|
5
|
+
let changed = false;
|
|
6
|
+
if (prev.x !== next.x) {
|
|
7
|
+
patch.x = next.x;
|
|
8
|
+
changed = true;
|
|
9
|
+
}
|
|
10
|
+
if (prev.y !== next.y) {
|
|
11
|
+
patch.y = next.y;
|
|
12
|
+
changed = true;
|
|
13
|
+
}
|
|
14
|
+
if (prev.width !== next.width) {
|
|
15
|
+
patch.width = next.width;
|
|
16
|
+
changed = true;
|
|
17
|
+
}
|
|
18
|
+
if (prev.height !== next.height) {
|
|
19
|
+
patch.height = next.height;
|
|
20
|
+
changed = true;
|
|
21
|
+
}
|
|
22
|
+
if (changed)
|
|
23
|
+
patches.push(patch);
|
|
24
|
+
const maxChildren = Math.max(prev.children.length, next.children.length);
|
|
25
|
+
for (let i = 0; i < maxChildren; i++) {
|
|
26
|
+
const prevChild = prev.children[i];
|
|
27
|
+
const nextChild = next.children[i];
|
|
28
|
+
if (prevChild && nextChild) {
|
|
29
|
+
patches.push(...diffLayout(prevChild, nextChild, [...path, i]));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return patches;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAuBA,sEAAsE;AACtE,MAAM,UAAU,UAAU,CACxB,IAAoB,EACpB,IAAoB,EACpB,OAAiB,EAAE;IAEnB,MAAM,OAAO,GAAkB,EAAE,CAAA;IAEjC,MAAM,KAAK,GAAgB,EAAE,IAAI,EAAE,CAAA;IACnC,IAAI,OAAO,GAAG,KAAK,CAAA;IAEnB,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC;QAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QAAC,OAAO,GAAG,IAAI,CAAA;IAAC,CAAC;IAC3D,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC;QAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QAAC,OAAO,GAAG,IAAI,CAAA;IAAC,CAAC;IAC3D,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;QAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAAC,OAAO,GAAG,IAAI,CAAA;IAAC,CAAC;IAC3E,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;QAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAAC,OAAO,GAAG,IAAI,CAAA;IAAC,CAAC;IAE/E,IAAI,OAAO;QAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAEhC,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IACxE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QAClC,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QAClC,IAAI,SAAS,IAAI,SAAS,EAAE,CAAC;YAC3B,OAAO,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,SAAS,EAAE,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;QACjE,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { UIElement } from '@geometra/core';
|
|
2
|
+
export interface TexturaServerOptions {
|
|
3
|
+
/** Port to listen on. Default: 3100. */
|
|
4
|
+
port?: number;
|
|
5
|
+
/** Root width. Default: 800. */
|
|
6
|
+
width?: number;
|
|
7
|
+
/** Root height. Default: 600. */
|
|
8
|
+
height?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface TexturaServer {
|
|
11
|
+
/** Trigger a re-render for all connected clients. */
|
|
12
|
+
update(): void;
|
|
13
|
+
/** Shut down the server. */
|
|
14
|
+
close(): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a Textura server that computes layout and streams geometry to clients.
|
|
18
|
+
*
|
|
19
|
+
* The `view` function produces the UI tree. Call `server.update()` after
|
|
20
|
+
* signal changes to push new frames to all connected clients.
|
|
21
|
+
*/
|
|
22
|
+
export declare function createServer(view: () => UIElement, options?: TexturaServerOptions): Promise<TexturaServer>;
|
|
23
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,gBAAgB,CAAA;AAI9D,MAAM,WAAW,oBAAoB;IACnC,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,MAAM,IAAI,IAAI,CAAA;IACd,4BAA4B;IAC5B,KAAK,IAAI,IAAI,CAAA;CACd;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,SAAS,EACrB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,aAAa,CAAC,CAwFxB"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { WebSocketServer } from 'ws';
|
|
2
|
+
import { init, computeLayout } from 'textura';
|
|
3
|
+
import { toLayoutTree, dispatchHit } from '@geometra/core';
|
|
4
|
+
import { diffLayout } from './protocol.js';
|
|
5
|
+
/**
|
|
6
|
+
* Create a Textura server that computes layout and streams geometry to clients.
|
|
7
|
+
*
|
|
8
|
+
* The `view` function produces the UI tree. Call `server.update()` after
|
|
9
|
+
* signal changes to push new frames to all connected clients.
|
|
10
|
+
*/
|
|
11
|
+
export async function createServer(view, options = {}) {
|
|
12
|
+
await init();
|
|
13
|
+
const port = options.port ?? 3100;
|
|
14
|
+
const width = options.width ?? 800;
|
|
15
|
+
const height = options.height ?? 600;
|
|
16
|
+
const clients = new Set();
|
|
17
|
+
let prevLayout = null;
|
|
18
|
+
let currentTree = null;
|
|
19
|
+
function computeAndBroadcast() {
|
|
20
|
+
currentTree = view();
|
|
21
|
+
const layoutTree = toLayoutTree(currentTree);
|
|
22
|
+
const layout = computeLayout(layoutTree, { width, height });
|
|
23
|
+
let msg;
|
|
24
|
+
if (prevLayout) {
|
|
25
|
+
const patches = diffLayout(prevLayout, layout);
|
|
26
|
+
if (patches.length === 0)
|
|
27
|
+
return;
|
|
28
|
+
// If patches are more than half the tree, just send full frame
|
|
29
|
+
if (patches.length > 20) {
|
|
30
|
+
msg = { type: 'frame', layout, tree: currentTree };
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
msg = { type: 'patch', patches };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
msg = { type: 'frame', layout, tree: currentTree };
|
|
38
|
+
}
|
|
39
|
+
prevLayout = layout;
|
|
40
|
+
const data = JSON.stringify(msg);
|
|
41
|
+
for (const client of clients) {
|
|
42
|
+
if (client.readyState === client.OPEN) {
|
|
43
|
+
client.send(data);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const wss = new WebSocketServer({ port });
|
|
48
|
+
wss.on('connection', (ws) => {
|
|
49
|
+
clients.add(ws);
|
|
50
|
+
// Send current state immediately
|
|
51
|
+
if (prevLayout && currentTree) {
|
|
52
|
+
const msg = { type: 'frame', layout: prevLayout, tree: currentTree };
|
|
53
|
+
ws.send(JSON.stringify(msg));
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
computeAndBroadcast();
|
|
57
|
+
}
|
|
58
|
+
ws.on('message', (raw) => {
|
|
59
|
+
try {
|
|
60
|
+
const msg = JSON.parse(String(raw));
|
|
61
|
+
if (msg.type === 'event' && currentTree && prevLayout) {
|
|
62
|
+
dispatchHit(currentTree, prevLayout, msg.eventType, msg.x, msg.y);
|
|
63
|
+
// After event handling, signals may have changed — re-render
|
|
64
|
+
computeAndBroadcast();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
// Ignore malformed messages
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
ws.on('close', () => {
|
|
72
|
+
clients.delete(ws);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
// Initial render
|
|
76
|
+
computeAndBroadcast();
|
|
77
|
+
return {
|
|
78
|
+
update() {
|
|
79
|
+
computeAndBroadcast();
|
|
80
|
+
},
|
|
81
|
+
close() {
|
|
82
|
+
wss.close();
|
|
83
|
+
clients.clear();
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,IAAI,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE7C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAmB1C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,IAAqB,EACrB,UAAgC,EAAE;IAElC,MAAM,IAAI,EAAE,CAAA;IAEZ,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI,CAAA;IACjC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,GAAG,CAAA;IAClC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,GAAG,CAAA;IAEpC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAa,CAAA;IACpC,IAAI,UAAU,GAA0B,IAAI,CAAA;IAC5C,IAAI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
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@geometra/server",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Server-side layout engine with WebSocket geometry streaming",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/razroo/textrura-framework",
|
|
10
|
+
"directory": "packages/server"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://razroo.github.io/textrura-framework",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"textura",
|
|
15
|
+
"server",
|
|
16
|
+
"websocket",
|
|
17
|
+
"layout",
|
|
18
|
+
"dom-free"
|
|
19
|
+
],
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
33
|
+
"check": "tsc --noEmit"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@geometra/core": "^0.1.0",
|
|
37
|
+
"ws": "^8.18.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/ws": "^8.5.13"
|
|
41
|
+
}
|
|
42
|
+
}
|