@slexkit/runtime 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Simgor001
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # @slexkit/runtime
2
+
3
+ Component-free SlexKit runtime entry.
4
+
5
+ This package re-exports `slexkit/runtime`; it is not a standalone physical runtime package yet. Install `slexkit` alongside it.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install slexkit @slexkit/runtime
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```js
16
+ import { mount, register, attachComponentDisposer } from "@slexkit/runtime";
17
+ ```
18
+
19
+ Use this entry when you want to register your own components instead of using the bundled Svelte components. The full Svelte component set is available via `@slexkit/components-svelte`.
20
+
21
+ ## What's included
22
+
23
+ All core engine APIs without component registrations:
24
+
25
+ - **Mount & lifecycle**: `mount`, `ingest`, `boot`, `disposeNamespace`
26
+ - **Component registry**: `register`, `getRenderer`, `attachComponentDisposer`
27
+ - **Secure runtime**: `mountSecureArtifact`, `createSecureRuntime`, `setSlexKitRuntimeUrl`, `getSlexKitRuntimeUrl`
28
+ - **Markdown hosting**: `createSlexKitMarkdownRuntimeHost`, `getSlexKitMarkdownRuntimeHost`, `installSlexKitMarkdownRuntimeHost`
29
+ - **Diagnostics**: `parseSlexSource`, `diagnoseSlexKitSource`, `formatSlexKitDiagnostic`
30
+ - **Error types**: `SlexKitSyntaxError`, `SlexKitRuntimeError`
31
+
32
+ Note: the runtime entry does **not** auto-register any components. You must register your own renderers or import `@slexkit/components-svelte` for the official Svelte component set.
33
+
34
+ ## With custom components
35
+
36
+ ```js
37
+ import { mount, register, attachComponentDisposer } from "@slexkit/runtime";
38
+
39
+ register("text", (props, name, ctx) => {
40
+ const el = document.createElement("span");
41
+ el.textContent = props.text ?? "";
42
+ return el;
43
+ }, { state: "none" });
44
+
45
+ mount({
46
+ namespace: "demo",
47
+ g: {},
48
+ layout: { "text:hello": { text: "Hello, World!" } },
49
+ }, document.getElementById("app"));
50
+ ```
51
+
52
+ ## Documentation
53
+
54
+ - [SlexKit Runtime model](https://github.com/slexkit/slexkit/blob/main/site/content/reference/runtime/en-US.md)
55
+ - [Usage guide](https://github.com/slexkit/slexkit/blob/main/site/content/reference/usage/en-US.md)
56
+ - [Package boundaries](https://github.com/slexkit/slexkit/blob/main/site/content/reference/packages/en-US.md)
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "slexkit/runtime";
package/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "slexkit/runtime";
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@slexkit/runtime",
3
+ "version": "0.2.0",
4
+ "description": "Pure SlexKit runtime and expression engine entry.",
5
+ "author": "SlexKit contributors",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/slexkit/slexkit.git",
10
+ "directory": "packages/runtime"
11
+ },
12
+ "homepage": "https://github.com/slexkit/slexkit/tree/main/packages/runtime#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/slexkit/slexkit/issues"
15
+ },
16
+ "main": "./index.js",
17
+ "module": "./index.js",
18
+ "types": "./index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./index.d.ts",
22
+ "import": "./index.js"
23
+ }
24
+ },
25
+ "files": [
26
+ "index.js",
27
+ "index.d.ts",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
31
+ "sideEffects": false,
32
+ "keywords": [
33
+ "slexkit",
34
+ "runtime",
35
+ "slex",
36
+ "expression"
37
+ ],
38
+ "license": "MIT",
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "peerDependencies": {
43
+ "slexkit": "^0.2.0"
44
+ },
45
+ "peerDependenciesMeta": {
46
+ "slexkit": {
47
+ "optional": true
48
+ }
49
+ },
50
+ "devDependencies": {
51
+ "slexkit": "file:../.."
52
+ }
53
+ }