@microsoft/webui 0.0.10 → 0.0.12
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 +9 -7
- package/bin/webui +0 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/package.json +7 -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,16 +36,18 @@ 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: "fast",
|
|
39
|
+
plugin: "fast-v3", // Parser plugin; use "fast-v3" for @microsoft/fast-element 3.x hydration
|
|
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
|
+
`"fast"` and `"fast-v2"` are deprecated @microsoft/fast-element 2.x compatibility plugin names. Use `"fast-v3"` for @microsoft/fast-element 3.x.
|
|
50
|
+
|
|
49
51
|
### `render(protocol: Buffer, state: object | string): string`
|
|
50
52
|
|
|
51
53
|
Renders a compiled protocol with state data and returns the full HTML string.
|
|
@@ -56,7 +58,7 @@ const html = render(protocol, { title: "Hello", show: true });
|
|
|
56
58
|
|
|
57
59
|
### `renderStream(protocol: Buffer, state: object | string, onChunk: (html: string) => void): void`
|
|
58
60
|
|
|
59
|
-
Renders with streaming output
|
|
61
|
+
Renders with streaming output - each HTML fragment is passed to the callback as it is produced.
|
|
60
62
|
|
|
61
63
|
```js
|
|
62
64
|
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 (e.g., "fast" for FAST-
|
|
9
|
+
/** Parser plugin (e.g., "fast-v3" for FAST 3 hydration; "fast"/"fast-v2" are deprecated FAST 2 compatibility aliases). */
|
|
10
10
|
plugin?: string;
|
|
11
11
|
/** Additional component sources (npm packages or local paths). */
|
|
12
12
|
components?: string[];
|
|
@@ -43,7 +43,7 @@ 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 (e.g., "fast-v3" for FAST 3 hydration; "fast"/"fast-v2" are deprecated FAST 2 compatibility aliases). */
|
|
47
47
|
plugin?: string;
|
|
48
48
|
}
|
|
49
49
|
/** Response from `renderComponentTemplates()` for on-demand component loading. */
|
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,0HAA0H;IAC1H,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,EAAE,MAAM,CAAC;IAC1B,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,8CAA8C;AAC9C,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,QAAQ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H,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.12",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"@microsoft/webui-darwin-
|
|
32
|
-
"@microsoft/webui-darwin-
|
|
33
|
-
"@microsoft/webui-linux-x64": "0.0.
|
|
34
|
-
"@microsoft/webui-win32-x64": "0.0.
|
|
35
|
-
"@microsoft/webui-linux-arm64": "0.0.
|
|
36
|
-
"@microsoft/webui-win32-arm64": "0.0.
|
|
31
|
+
"@microsoft/webui-darwin-arm64": "0.0.12",
|
|
32
|
+
"@microsoft/webui-darwin-x64": "0.0.12",
|
|
33
|
+
"@microsoft/webui-linux-x64": "0.0.12",
|
|
34
|
+
"@microsoft/webui-win32-x64": "0.0.12",
|
|
35
|
+
"@microsoft/webui-linux-arm64": "0.0.12",
|
|
36
|
+
"@microsoft/webui-win32-arm64": "0.0.12"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^25.3.5",
|