@mml-io/networked-dom-server 0.0.0-experimental-edf5cd7-20250120

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/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2023 Improbable MV Limited
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,19 @@
1
+ # Networked DOM Server
2
+ #### `@mml-io/networked-dom-server`
3
+
4
+ [![npm version](https://img.shields.io/npm/v/@mml-io/networked-dom-server.svg?style=flat)](https://www.npmjs.com/package/@mml-io/networked-dom-server)
5
+
6
+ This package is a wrapper around multiple packages and adds an additional function to combine them:
7
+ * `@mml-io/observable-dom`
8
+ * `ObservableDOM`
9
+ * class that takes a `DOMRunnerFactory` and runs a DOM from a string which emits events when the DOM updates and can apply events to the DOM.
10
+ * `JSDOMRunner`
11
+ * a JSDOM-backed implementation of the `DOMRunnerInterface` (a way to run a DOM from a string and interact with it).
12
+ * `JSDOMRunnerFactory`
13
+ * a `DOMRunnerFactory` factory that creates `JSDOMRunner` instances.
14
+ * `@mml-io/networked-dom-document`
15
+ * `NetworkedDOM` and `EditableNetworkedDOM`
16
+ * Takes an `ObservableDOMFactory` to create an `ObservableDOM` instance containing the document.
17
+ * Handle WebSocket connections to NetworkedDOM documents.
18
+ * `LocalObservableDOMFactory`
19
+ * An implementation of `ObservableDOMFactory` that creates `ObservableDOM` instances with a `JSDOMRunner`.
@@ -0,0 +1,4 @@
1
+ import { ObservableDOMInterface, ObservableDOMMessage, ObservableDOMParameters } from "@mml-io/observable-dom-common";
2
+ export declare function LocalObservableDOMFactory(observableDOMParameters: ObservableDOMParameters, callback: (message: ObservableDOMMessage, observableDOM: ObservableDOMInterface) => void): ObservableDOMInterface;
3
+ export * from "@mml-io/networked-dom-document";
4
+ export * from "@mml-io/observable-dom";
package/build/index.js ADDED
@@ -0,0 +1,11 @@
1
+ // src/index.ts
2
+ import { JSDOMRunnerFactory, ObservableDOM } from "@mml-io/observable-dom";
3
+ export * from "@mml-io/networked-dom-document";
4
+ export * from "@mml-io/observable-dom";
5
+ function LocalObservableDOMFactory(observableDOMParameters, callback) {
6
+ return new ObservableDOM(observableDOMParameters, callback, JSDOMRunnerFactory);
7
+ }
8
+ export {
9
+ LocalObservableDOMFactory
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts"],
4
+ "sourcesContent": ["import { JSDOMRunnerFactory, ObservableDOM } from \"@mml-io/observable-dom\";\nimport {\n ObservableDOMInterface,\n ObservableDOMMessage,\n ObservableDOMParameters,\n} from \"@mml-io/observable-dom-common\";\n\nexport function LocalObservableDOMFactory(\n observableDOMParameters: ObservableDOMParameters,\n callback: (message: ObservableDOMMessage, observableDOM: ObservableDOMInterface) => void,\n): ObservableDOMInterface {\n return new ObservableDOM(observableDOMParameters, callback, JSDOMRunnerFactory);\n}\n\nexport * from \"@mml-io/networked-dom-document\";\nexport * from \"@mml-io/observable-dom\";\n"],
5
+ "mappings": ";AAAA,SAAS,oBAAoB,qBAAqB;AAclD,cAAc;AACd,cAAc;AARP,SAAS,0BACd,yBACA,UACwB;AACxB,SAAO,IAAI,cAAc,yBAAyB,UAAU,kBAAkB;AAChF;",
6
+ "names": []
7
+ }
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@mml-io/networked-dom-server",
3
+ "version": "0.0.0-experimental-edf5cd7-20250120",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "main": "./build/index.js",
8
+ "types": "./build/index.d.ts",
9
+ "type": "module",
10
+ "files": [
11
+ "/build"
12
+ ],
13
+ "scripts": {
14
+ "type-check": "tsc --noEmit",
15
+ "build": "tsx ./build.ts --build",
16
+ "iterate": "tsx ./build.ts --watch",
17
+ "lint": "eslint \"./**/*.{js,jsx,ts,tsx}\" --max-warnings 0",
18
+ "lint-fix": "eslint \"./**/*.{js,jsx,ts,tsx}\" --fix"
19
+ },
20
+ "dependencies": {
21
+ "@mml-io/networked-dom-document": "0.0.0-experimental-edf5cd7-20250120",
22
+ "@mml-io/observable-dom": "0.0.0-experimental-edf5cd7-20250120",
23
+ "@mml-io/observable-dom-common": "0.0.0-experimental-edf5cd7-20250120"
24
+ },
25
+ "gitHead": "4d1344cf69e44b65d059011cb66a564c47d23f2d"
26
+ }