@@ -77,7 +77,7 @@ When connected to the DOM it:
77772 . Publishes a template when a matching FAST element definition requests one.
78783 . Delegates parsing of the inner ` <template> ` tag to ` TemplateParser ` , which
7979 converts declarative bindings into FAST ` ViewTemplate ` strings and values.
80- 4 . Runs definition-scoped schema hooks , such as ` attributeMap() ` and
80+ 4 . Runs definition-scoped schema transforms , such as ` attributeMap() ` and
8181 ` observerMap() ` , before returning the concrete ` ViewTemplate ` .
8282
8383### ` TemplateParser ` — declarative HTML parser
@@ -196,7 +196,7 @@ packages/fast-element/
196196│ ├── index.ts # Declarative barrel export
197197│ ├── interfaces.ts # Message enum (error codes)
198198│ ├── debug.ts # Human-readable declarative debug messages
199- │ ├── definition-options.ts # Definition-scoped schema hook storage
199+ │ ├── definition-options.ts # Definition-scoped schema transform storage
200200│ ├── template.ts # declarativeTemplate(), internal <f-template> publisher, lifecycle orchestration
201201│ ├── template-bridge.ts # Registry/name bridge between definitions and publishers
202202│ ├── template-parser.ts # TemplateParser — converts declarative HTML to ViewTemplate strings/values
@@ -214,22 +214,22 @@ packages/fast-element/
214214### Module dependency direction
215215
216216The default ` declarativeTemplate() ` path avoids importing optional map
217- implementations. Map helpers attach schema hooks to the definition only when the
218- consumer passes them as define extensions.
217+ implementations. Map helpers attach schema transforms to the definition only
218+ when the consumer passes them as define extensions.
219219
220220```
221- template.ts ──imports──▶ definition-options.ts (schema hook reads)
221+ template.ts ──imports──▶ definition-options.ts (schema transform reads)
222222template.ts ──imports──▶ schema.ts (Schema)
223- attribute-map.ts ──imports──▶ definition-options.ts (register attribute-map hook )
224- observer-map.ts ──imports──▶ definition-options.ts (register observer-map hook )
223+ attribute-map.ts ──imports──▶ definition-options.ts (register attribute-map transform )
224+ observer-map.ts ──imports──▶ definition-options.ts (register observer-map transform )
225225observer-map.ts ──imports──▶ schema.ts (Schema types)
226226attribute-map.ts ──imports──▶ schema.ts (Schema types)
227227utilities.ts ──imports──▶ schema.ts (schemaRegistry for cross-element $ref resolution)
228228```
229229
230- Schema hooks are sorted by priority and insertion order. ` attributeMap() ` uses a
231- higher-priority slot than ` observerMap() ` , so generated attributes are available
232- before observer mapping runs.
230+ Schema transforms are sorted by priority and insertion order. ` attributeMap() `
231+ uses a higher-priority slot than ` observerMap() ` , so generated attributes are
232+ available before observer mapping runs.
233233
234234---
235235
@@ -332,7 +332,7 @@ via registry + name bridge"]
332332 G --> H[transformInnerHTML normalises HTML entities]
333333 H --> I["TemplateParser parses bindings/directives
334334builds Schema, strings, values"]
335- I --> J["Run definition schema hooks
335+ I --> J["Run definition schema transforms
336336attributeMap before observerMap"]
337337 J --> K["ViewTemplate.create(strings, values)
338338returned to definition"]
@@ -358,17 +358,18 @@ to the parser, keeping method signatures lean.
358358
359359### Architecture
360360
361- The parsing pipeline is split across two classes plus definition-scoped hooks:
361+ The parsing pipeline is split across two classes plus definition-scoped
362+ transforms:
362363
363364- ** Internal ` <f-template> ` publisher** (` template.ts ` ) — Custom element
364365 lifecycle, registry/name bridge registration, lifecycle callback dispatch, and
365- schema-hook execution. It is a native ` HTMLElement ` , not a ` FASTElement ` .
366+ schema-transform execution. It is a native ` HTMLElement ` , not a ` FASTElement ` .
366367- ** ` TemplateParser ` ** (` template-parser.ts ` ) — Synchronous template parser:
367368 converts declarative HTML into ` strings ` /` values ` arrays for
368369 ` ViewTemplate.create() ` . Uses a ` StringsAccumulator ` to track the running
369370 previous-string in O(1) per binding site instead of O(N) ` join("") ` calls.
370371 Independently testable without DOM.
371- - ** Schema hooks ** (` definition-options.ts ` ) — Extension-provided callbacks run
372+ - ** Schema transforms ** (` definition-options.ts ` ) — Extension-provided callbacks run
372373 after parsing and before ` ViewTemplate.create() ` . ` attributeMap() ` runs before
373374 ` observerMap() ` .
374375
@@ -379,7 +380,7 @@ sequenceDiagram
379380 participant TP as TemplateParser
380381 participant U as utilities.ts
381382 participant S as Schema
382- participant Hooks as schema hooks
383+ participant Transforms as schema transforms
383384
384385 DOM->>FTE: connectedCallback()
385386 FTE->>FTE: register publisher with bridge
@@ -413,7 +414,7 @@ sequenceDiagram
413414 end
414415 end
415416 TP-->>FTE: { strings, values }
416- FTE->>Hooks : attributeMap(), then observerMap()
417+ FTE->>Transforms : attributeMap(), then observerMap()
417418 FTE->>TP: parser.createTemplate(strings, values)
418419 FTE-->>DOM: return ViewTemplate to definition resolver
419420```
@@ -518,11 +519,11 @@ When an `ObserverMapConfig` with a `properties` key is provided, `ObserverMap.de
518519
519520### AttributeMap and leaf bindings
520521
521- When ` attributeMap() ` is enabled, it registers a definition schema hook. After
522- parsing, the hook constructs an ` AttributeMap ` implementation and calls
523- ` defineProperties() ` . It iterates ` Schema.getRootProperties() ` and skips any
524- property whose schema entry contains ` properties ` , ` type ` , or ` anyOf ` — keeping
525- only plain leaf bindings. For each leaf:
522+ When ` attributeMap() ` is enabled, it registers a definition schema transform.
523+ After parsing, the transform constructs an ` AttributeMap ` implementation and
524+ calls ` defineProperties() ` . It iterates ` Schema.getRootProperties() ` and skips
525+ any property whose schema entry contains ` properties ` , ` type ` , or ` anyOf ` —
526+ keeping only plain leaf bindings. For each leaf:
526527
5275281 . The schema key is used as the ** JS property name** .
5285292 . The ** HTML attribute name** depends on the ` attribute-name-strategy ` :
@@ -536,7 +537,7 @@ accessed via bracket notation (e.g. `element["foo-bar"]`). When using
536537` "camelCase" ` , property names are standard JS identifiers (e.g.
537538` element.fooBar ` ).
538539
539- Because schema hooks are priority sorted, attribute mapping runs before observer
540+ Because schema transforms are priority sorted, attribute mapping runs before observer
540541mapping when both extensions are supplied.
541542
542543---
@@ -560,7 +561,7 @@ sequenceDiagram
560561 FTE->>FTE: bridge matches registry + name
561562 FTE->>PerEl: elementDidRegister('my-el')
562563 FTE->>PerEl: templateWillUpdate('my-el')
563- FTE->>FTE: parse template → schema → hooks → ViewTemplate
564+ FTE->>FTE: parse template → schema → transforms → ViewTemplate
564565 FTE->>FER: return viewTemplate to resolver
565566 FER->>PerEl: templateDidUpdate('my-el')
566567 FER->>FER: customElements.define('my-el', MyElement)
@@ -608,7 +609,7 @@ tagged templates produce.
608609| ---| ---|
609610| ` FASTElement ` | Base class for user components; the internal ` <f-template> ` publisher is a native ` HTMLElement ` |
610611| ` FASTElementDefinition.register() ` / template resolvers | Deferred element registration — element waits for its template |
611- | ` FASTElementExtension ` | Extension callback mechanism used by ` attributeMap() ` and ` observerMap() ` to attach schema hooks before template resolution |
612+ | ` FASTElementExtension ` | Extension callback mechanism used by ` attributeMap() ` and ` observerMap() ` to attach schema transforms before template resolution |
612613| ` ViewTemplate.create(strings, values) ` | Compiles the resolved strings/values arrays into a ` ViewTemplate ` |
613614| ` ElementController ` | Automatically detects prerendered content (` isPrerendered ` ) and hydrates server-rendered DOM using ` fe-b ` comment/dataset markers via ` template.hydrate() ` |
614615| ` Observable.defineProperty() ` | Defines observable root properties on element prototypes (ObserverMap) |
0 commit comments