@microsoft/webui-framework 0.0.22 → 0.0.23

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.
@@ -1,13 +1,13 @@
1
1
  export type CompiledAttrPart = string | [path: string];
2
- export type TemplateNodePath = number[];
3
- export type TemplateSlotPath = [
4
- parentPath: TemplateNodePath,
2
+ export type TemplateNodeIndex = number;
3
+ export type TemplateSlot = [
4
+ parentIndex: TemplateNodeIndex,
5
5
  beforeIndex: number,
6
6
  order?: number
7
7
  ];
8
- export type CompiledTextRunMeta = [slot: TemplateSlotPath, parts: CompiledAttrPart[], raw?: 1];
8
+ export type CompiledTextRunMeta = [slot: TemplateSlot, parts: CompiledAttrPart[], raw?: 1];
9
9
  export type CompiledAttrGroupMeta = [
10
- target: TemplateNodePath,
10
+ target: TemplateNodeIndex,
11
11
  start: number,
12
12
  count: number
13
13
  ];
@@ -15,13 +15,13 @@ export type CompiledConditionFn = (v: (path: string, s?: unknown) => unknown, s?
15
15
  export type CompiledCondition = [fn: CompiledConditionFn, paths: string[]];
16
16
  export type SerializedCompiledCondition = [fnIndex: number, paths: string[]];
17
17
  export type TemplateCondition = CompiledCondition | SerializedCompiledCondition;
18
- export type CompiledConditionalMeta = [condition: TemplateCondition, blockIndex: number, slot: TemplateSlotPath];
18
+ export type CompiledConditionalMeta = [condition: TemplateCondition, blockIndex: number, slot: TemplateSlot];
19
19
  export type CompiledAttrMeta = [name: string, kind: 0, value: string] | [name: string, kind: 1, value: string] | [name: string, kind: 2, condition: TemplateCondition] | [name: string, kind: 3, parts: CompiledAttrPart[]];
20
20
  export type CompiledRepeatMeta = [
21
21
  collection: string,
22
22
  itemVar: string,
23
23
  blockIndex: number,
24
- slot: TemplateSlotPath,
24
+ slot: TemplateSlot,
25
25
  keyPath?: string
26
26
  ];
27
27
  export type CompiledEventArg = ['e'] | ['p', string] | ['s', string] | ['n', number] | ['b', number] | ['z'];
@@ -29,7 +29,7 @@ export type CompiledEventArgs = CompiledEventArg[];
29
29
  export type CompiledEventBindingMeta = [
30
30
  handler: string,
31
31
  args: CompiledEventArgs,
32
- target: TemplateNodePath,
32
+ target: TemplateNodeIndex,
33
33
  usesEvent?: 1
34
34
  ];
35
35
  export type CompiledEventGroupMeta = [name: string, bindings: CompiledEventBindingMeta[]];
@@ -50,4 +50,5 @@ export interface TemplateMeta extends TemplateBlockMeta {
50
50
  ta?: string[];
51
51
  sd?: 1;
52
52
  th?: boolean | 1;
53
+ wp?: 1 | 2;
53
54
  }
@@ -1,4 +1,4 @@
1
- export type { CompiledAttrGroupMeta, CompiledAttrMeta, CompiledAttrPart, CompiledCondition, CompiledConditionFn, CompiledConditionalMeta, CompiledEventArg, CompiledEventArgs, CompiledEventBindingMeta, CompiledEventGroupMeta, SerializedCompiledCondition, TemplateCondition, CompiledTextRunMeta, TemplateBlockMeta, TemplateMeta, TemplateNodePath, TemplateSlotPath, } from './template-types.js';
1
+ export type { CompiledAttrGroupMeta, CompiledAttrMeta, CompiledAttrPart, CompiledCondition, CompiledConditionFn, CompiledConditionalMeta, CompiledEventArg, CompiledEventArgs, CompiledEventBindingMeta, CompiledEventGroupMeta, SerializedCompiledCondition, TemplateCondition, CompiledTextRunMeta, TemplateBlockMeta, TemplateMeta, TemplateNodeIndex, TemplateSlot, } from './template-types.js';
2
2
  import type { CompiledConditionFn, TemplateMeta } from './template-types.js';
3
3
  declare global {
4
4
  interface Window {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/webui-framework",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "type": "module",
5
5
  "description": "WebUI Framework Next — Preact-inspired lightweight Web Component runtime with SSR hydration and compiled-template path mapping.",
6
6
  "license": "MIT",
@@ -22,6 +22,12 @@
22
22
  "types": "./dist/streaming-entry.d.ts",
23
23
  "default": "./dist/streaming-entry.js"
24
24
  }
25
+ },
26
+ "./lazy-hydration.js": {
27
+ "import": {
28
+ "types": "./dist/lazy-hydration-entry.d.ts",
29
+ "default": "./dist/lazy-hydration-entry.js"
30
+ }
25
31
  }
26
32
  },
27
33
  "files": [
@@ -31,7 +37,7 @@
31
37
  "@playwright/test": "^1.61.1",
32
38
  "@types/node": "^26.1.0",
33
39
  "typescript": "^6.0.3",
34
- "@microsoft/webui-test-support": "0.0.22"
40
+ "@microsoft/webui-test-support": "0.0.23"
35
41
  },
36
42
  "scripts": {
37
43
  "build": "tsc",