@microsoft/webui 0.0.11 → 0.0.13
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/README.md +7 -7
- package/bin/webui +0 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/package.json +13 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @microsoft/webui
|
|
2
2
|
|
|
3
|
-
High-performance server-side rendering framework. Compiles HTML templates into a binary protocol at build time and renders them with native speed at runtime
|
|
3
|
+
High-performance server-side rendering framework. Compiles HTML templates into a binary protocol at build time and renders them with native speed at runtime - no JavaScript runtime overhead.
|
|
4
4
|
|
|
5
5
|
> 📖 **Full documentation, tutorials, and playground at [microsoft.github.io/webui](https://microsoft.github.io/webui)**
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ High-performance server-side rendering framework. Compiles HTML templates into a
|
|
|
10
10
|
npm install @microsoft/webui
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
The package automatically installs the correct platform-specific native binary for your OS and architecture (Windows, macOS, Linux
|
|
13
|
+
The package automatically installs the correct platform-specific native binary for your OS and architecture (Windows, macOS, Linux - x64 and arm64).
|
|
14
14
|
|
|
15
15
|
## Quick start
|
|
16
16
|
|
|
@@ -36,14 +36,14 @@ const result = build({
|
|
|
36
36
|
appDir: "./src", // Path to the template directory
|
|
37
37
|
entry: "index.html", // Entry file (default: "index.html")
|
|
38
38
|
css: "link", // CSS strategy: "link" or "style"
|
|
39
|
-
plugin: "
|
|
39
|
+
plugin: "webui", // Parser plugin name
|
|
40
40
|
components: [], // Additional component sources
|
|
41
41
|
outDir: "./dist", // Output directory for CLI fallback
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
// result.protocol
|
|
45
|
-
// result.cssFiles
|
|
46
|
-
// result.stats
|
|
44
|
+
// result.protocol - Buffer containing the compiled protocol
|
|
45
|
+
// result.cssFiles - Array of [filename, content, ...] pairs
|
|
46
|
+
// result.stats - { durationMs, fragmentCount, componentCount, cssFileCount, protocolSizeBytes, tokenCount }
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
### `render(protocol: Buffer, state: object | string): string`
|
|
@@ -56,7 +56,7 @@ const html = render(protocol, { title: "Hello", show: true });
|
|
|
56
56
|
|
|
57
57
|
### `renderStream(protocol: Buffer, state: object | string, onChunk: (html: string) => void): void`
|
|
58
58
|
|
|
59
|
-
Renders with streaming output
|
|
59
|
+
Renders with streaming output - each HTML fragment is passed to the callback as it is produced.
|
|
60
60
|
|
|
61
61
|
```js
|
|
62
62
|
renderStream(protocol, state, (chunk) => {
|
package/bin/webui
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface BuildOptions {
|
|
|
6
6
|
entry?: string;
|
|
7
7
|
/** CSS delivery strategy: "link" (default), "style", or "module". */
|
|
8
8
|
css?: "link" | "style" | "module";
|
|
9
|
-
/** Parser plugin
|
|
9
|
+
/** Parser plugin name. */
|
|
10
10
|
plugin?: string;
|
|
11
11
|
/** Additional component sources (npm packages or local paths). */
|
|
12
12
|
components?: string[];
|
|
@@ -43,14 +43,14 @@ export interface RenderOptions {
|
|
|
43
43
|
entry?: string;
|
|
44
44
|
/** URL path to match routes against (default: "/"). */
|
|
45
45
|
requestPath?: string;
|
|
46
|
-
/**
|
|
46
|
+
/** Handler plugin name. */
|
|
47
47
|
plugin?: string;
|
|
48
48
|
}
|
|
49
49
|
/** Response from `renderComponentTemplates()` for on-demand component loading. */
|
|
50
50
|
export interface ComponentTemplatesResponse {
|
|
51
51
|
/** Module CSS `<style>` strings for the requested components. */
|
|
52
52
|
templateStyles: string[];
|
|
53
|
-
/**
|
|
53
|
+
/** Component template payload strings for the requested components. */
|
|
54
54
|
templates: string[];
|
|
55
55
|
/** Updated hex bitmask of loaded component templates. */
|
|
56
56
|
inventory: string;
|
|
@@ -59,7 +59,7 @@ export interface ComponentTemplatesResponse {
|
|
|
59
59
|
export interface PartialResponse {
|
|
60
60
|
/** Application state for the matched route. */
|
|
61
61
|
state: Record<string, unknown>;
|
|
62
|
-
/**
|
|
62
|
+
/** Component template payload strings the client doesn't already have. */
|
|
63
63
|
templates: string[];
|
|
64
64
|
/** Updated hex bitmask of loaded component templates. */
|
|
65
65
|
inventory: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,gDAAgD;AAChD,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAClC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,gDAAgD;AAChD,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAClC,0BAA0B;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAwB;AACxB,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,oCAAoC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,iBAAiB,EAA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B,MAAM,CACpB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,OAAO,CAAC,EAAE,aAAa,GACtB,MAAM,CAiBR;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAC/B,OAAO,CAAC,EAAE,aAAa,GACtB,IAAI,CAcN;AAID,yCAAyC;AACzC,wBAAgB,cAAc,CAC5B,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,UAAU,CAAC,EAAE,aAAa,GACzB,MAAM,CAMR;AAED,6DAA6D;AAC7D,wBAAgB,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAMpD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,MAAM,CAMR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EAAE,EACvB,YAAY,EAAE,MAAM,GACnB,MAAM,CAUR"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@microsoft/webui",
|
|
3
3
|
"description": "WebUI — high-performance server-side rendering framework. Build-time protocol compiler and streaming renderer.",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.13",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -25,15 +25,21 @@
|
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
26
|
"default": "./dist/index.js"
|
|
27
27
|
}
|
|
28
|
+
},
|
|
29
|
+
"./platform.js": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./dist/platform.d.ts",
|
|
32
|
+
"default": "./dist/platform.js"
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
35
|
},
|
|
30
36
|
"optionalDependencies": {
|
|
31
|
-
"@microsoft/webui-darwin-arm64": "0.0.
|
|
32
|
-
"@microsoft/webui-linux-arm64": "0.0.
|
|
33
|
-
"@microsoft/webui-linux-x64": "0.0.
|
|
34
|
-
"@microsoft/webui-win32-arm64": "0.0.
|
|
35
|
-
"@microsoft/webui-
|
|
36
|
-
"@microsoft/webui-
|
|
37
|
+
"@microsoft/webui-darwin-arm64": "0.0.13",
|
|
38
|
+
"@microsoft/webui-linux-arm64": "0.0.13",
|
|
39
|
+
"@microsoft/webui-linux-x64": "0.0.13",
|
|
40
|
+
"@microsoft/webui-win32-arm64": "0.0.13",
|
|
41
|
+
"@microsoft/webui-darwin-x64": "0.0.13",
|
|
42
|
+
"@microsoft/webui-win32-x64": "0.0.13"
|
|
37
43
|
},
|
|
38
44
|
"devDependencies": {
|
|
39
45
|
"@types/node": "^25.3.5",
|