@microsoft/webui-framework 0.0.18 → 0.0.19

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.
@@ -13,7 +13,7 @@ export function templateRegistrationDetail(event) {
13
13
  const detail = event.detail;
14
14
  if (!detail || typeof detail !== 'object')
15
15
  return undefined;
16
- const templates = detail?.templates;
16
+ const templates = detail.templates;
17
17
  const payload = {
18
18
  templates: typeof templates === 'object' && templates !== null
19
19
  ? templates
@@ -1,5 +1,4 @@
1
1
  import type { TemplateMeta } from './template.js';
2
2
  export declare function templateHasRoot(meta: TemplateMeta, root: string): boolean;
3
3
  export declare function templateRootForAttribute(meta: TemplateMeta, attrName: string): string | undefined;
4
- export declare function templateAttributeForRoot(meta: TemplateMeta, root: string): string | undefined;
5
4
  export declare function templateNeedsStaticHost(meta: TemplateMeta): boolean;
@@ -19,17 +19,6 @@ export function templateRootForAttribute(meta, attrName) {
19
19
  }
20
20
  return undefined;
21
21
  }
22
- export function templateAttributeForRoot(meta, root) {
23
- const roots = meta.tr;
24
- const attrs = meta.ta;
25
- if (!roots || !attrs)
26
- return undefined;
27
- for (let i = 0; i < roots.length && i < attrs.length; i++) {
28
- if (roots[i] === root)
29
- return attrs[i];
30
- }
31
- return undefined;
32
- }
33
22
  export function templateNeedsStaticHost(meta) {
34
23
  return !!meta.th;
35
24
  }
@@ -17,7 +17,13 @@ export type SerializedCompiledCondition = [fnIndex: number, paths: string[]];
17
17
  export type TemplateCondition = CompiledCondition | SerializedCompiledCondition;
18
18
  export type CompiledConditionalMeta = [condition: TemplateCondition, blockIndex: number, slot: TemplateSlotPath];
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
- export type CompiledRepeatMeta = [collection: string, itemVar: string, blockIndex: number, slot: TemplateSlotPath];
20
+ export type CompiledRepeatMeta = [
21
+ collection: string,
22
+ itemVar: string,
23
+ blockIndex: number,
24
+ slot: TemplateSlotPath,
25
+ keyPath?: string
26
+ ];
21
27
  export type CompiledEventArg = ['e'] | ['p', string] | ['s', string] | ['n', number] | ['b', number] | ['z'];
22
28
  export type CompiledEventArgs = CompiledEventArg[];
23
29
  export type CompiledEventBindingMeta = [
@@ -6,6 +6,7 @@ declare global {
6
6
  state?: Record<string, unknown>;
7
7
  templates?: Record<string, TemplateMeta>;
8
8
  templateFns?: Record<string, CompiledConditionFn[]>;
9
+ templateHostExclusions?: Set<string>;
9
10
  [key: string]: unknown;
10
11
  };
11
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/webui-framework",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "description": "WebUI Framework Next — Preact-inspired lightweight Web Component runtime with SSR hydration. 15KB minified, compiled-template path mapping, no hydration markers.",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "@playwright/test": "^1.61.1",
26
26
  "@types/node": "^26.1.0",
27
27
  "typescript": "^6.0.3",
28
- "@microsoft/webui-test-support": "0.0.18"
28
+ "@microsoft/webui-test-support": "0.0.19"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "tsc",