@microsoft/fast-element 2.0.0-beta.3 → 2.0.0-beta.4

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.
Files changed (50) hide show
  1. package/CHANGELOG.json +81 -0
  2. package/CHANGELOG.md +20 -1
  3. package/dist/dts/components/fast-definitions.d.ts +9 -8
  4. package/dist/dts/components/fast-element.d.ts +8 -4
  5. package/dist/dts/context.d.ts +1 -1
  6. package/dist/dts/di/di.d.ts +854 -0
  7. package/dist/dts/hooks.d.ts +2 -2
  8. package/dist/dts/interfaces.d.ts +38 -7
  9. package/dist/dts/observation/observable.d.ts +19 -13
  10. package/dist/dts/styles/element-styles.d.ts +6 -0
  11. package/dist/dts/templating/binding-signal.d.ts +10 -27
  12. package/dist/dts/templating/binding-two-way.d.ts +16 -41
  13. package/dist/dts/templating/binding.d.ts +79 -118
  14. package/dist/dts/templating/html-directive.d.ts +28 -2
  15. package/dist/dts/templating/render.d.ts +277 -0
  16. package/dist/dts/templating/repeat.d.ts +12 -16
  17. package/dist/dts/templating/template.d.ts +3 -3
  18. package/dist/dts/templating/when.d.ts +3 -3
  19. package/dist/dts/testing/exports.d.ts +2 -0
  20. package/dist/dts/testing/fixture.d.ts +90 -0
  21. package/dist/dts/testing/timeout.d.ts +7 -0
  22. package/dist/esm/components/fast-definitions.js +25 -27
  23. package/dist/esm/components/fast-element.js +16 -8
  24. package/dist/esm/context.js +5 -1
  25. package/dist/esm/debug.js +34 -4
  26. package/dist/esm/di/di.js +1349 -0
  27. package/dist/esm/observation/observable.js +4 -4
  28. package/dist/esm/platform.js +1 -1
  29. package/dist/esm/styles/element-styles.js +14 -0
  30. package/dist/esm/templating/binding-signal.js +56 -61
  31. package/dist/esm/templating/binding-two-way.js +51 -35
  32. package/dist/esm/templating/binding.js +137 -156
  33. package/dist/esm/templating/compiler.js +29 -7
  34. package/dist/esm/templating/html-directive.js +12 -1
  35. package/dist/esm/templating/render.js +392 -0
  36. package/dist/esm/templating/repeat.js +54 -40
  37. package/dist/esm/templating/template.js +8 -5
  38. package/dist/esm/templating/when.js +5 -4
  39. package/dist/esm/testing/exports.js +2 -0
  40. package/dist/esm/testing/fixture.js +88 -0
  41. package/dist/esm/testing/timeout.js +24 -0
  42. package/dist/fast-element.api.json +3257 -3151
  43. package/dist/fast-element.d.ts +210 -209
  44. package/dist/fast-element.debug.js +329 -248
  45. package/dist/fast-element.debug.min.js +1 -1
  46. package/dist/fast-element.js +295 -244
  47. package/dist/fast-element.min.js +1 -1
  48. package/dist/fast-element.untrimmed.d.ts +218 -214
  49. package/docs/api-report.md +83 -85
  50. package/package.json +13 -1
@@ -98,19 +98,49 @@ const debugMessages = {
98
98
  [1201 /* onlySetHTMLPolicyOnce */]: "The HTML policy can only be set once.",
99
99
  [1202 /* bindingInnerHTMLRequiresTrustedTypes */]: "To bind innerHTML, you must use a TrustedTypesPolicy.",
100
100
  [1203 /* twoWayBindingRequiresObservables */]: "View=>Model update skipped. To use twoWay binding, the target property must be observable.",
101
+ [1204 /* hostBindingWithoutHost */]: "No host element is present. Cannot bind host with ${name}.",
102
+ [1205 /* unsupportedBindingBehavior */]: "The requested binding behavior is not supported by the binding engine.",
101
103
  [1401 /* missingElementDefinition */]: "Missing FASTElement definition.",
104
+ [1501 /* noRegistrationForContext */]: "No registration for Context/Interface '${name}'.",
105
+ [1502 /* noFactoryForResolver */]: "Dependency injection resolver for '${key}' returned a null factory.",
106
+ [1503 /* invalidResolverStrategy */]: "Invalid dependency injection resolver strategy specified '${strategy}'.",
107
+ [1504 /* cannotAutoregisterDependency */]: "Unable to autoregister dependency.",
108
+ [1505 /* cannotResolveKey */]: "Unable to resolve dependency injection key '${key}'.",
109
+ [1506 /* cannotConstructNativeFunction */]: "'${name}' is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.",
110
+ [1507 /* cannotJITRegisterNonConstructor */]: "Attempted to jitRegister something that is not a constructor '${value}'. Did you forget to register this dependency?",
111
+ [1508 /* cannotJITRegisterIntrinsic */]: "Attempted to jitRegister an intrinsic type '${value}'. Did you forget to add @inject(Key)?",
112
+ [1509 /* cannotJITRegisterInterface */]: "Attempted to jitRegister an interface '${value}'.",
113
+ [1510 /* invalidResolver */]: "A valid resolver was not returned from the register method.",
114
+ [1511 /* invalidKey */]: "Key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?",
115
+ [1512 /* noDefaultResolver */]: "'${key}' not registered. Did you forget to add @singleton()?",
116
+ [1513 /* cyclicDependency */]: "Cyclic dependency found '${name}'.",
102
117
  };
118
+ const allPlaceholders = /(\$\{\w+?})/g;
119
+ const placeholder = /\$\{(\w+?)}/g;
120
+ const noValues = Object.freeze({});
121
+ function formatMessage(message, values) {
122
+ return message
123
+ .split(allPlaceholders)
124
+ .map(v => {
125
+ var _a;
126
+ const replaced = v.replace(placeholder, "$1");
127
+ return String((_a = values[replaced]) !== null && _a !== void 0 ? _a : v);
128
+ })
129
+ .join("");
130
+ }
103
131
  Object.assign(FAST$1, {
104
132
  addMessages(messages) {
105
133
  Object.assign(debugMessages, messages);
106
134
  },
107
- warn(code, ...args) {
135
+ warn(code, values = noValues) {
108
136
  var _a;
109
- console.warn((_a = debugMessages[code]) !== null && _a !== void 0 ? _a : "Unknown Warning");
137
+ const message = (_a = debugMessages[code]) !== null && _a !== void 0 ? _a : "Unknown Warning";
138
+ console.warn(formatMessage(message, values));
110
139
  },
111
- error(code, ...args) {
140
+ error(code, values = noValues) {
112
141
  var _a;
113
- return new Error((_a = debugMessages[code]) !== null && _a !== void 0 ? _a : "Unknown Error");
142
+ const message = (_a = debugMessages[code]) !== null && _a !== void 0 ? _a : "Unknown Error";
143
+ return new Error(formatMessage(message, values));
114
144
  },
115
145
  });
116
146
 
@@ -142,7 +172,7 @@ if (FAST.error === void 0) {
142
172
  Object.assign(FAST, {
143
173
  warn() { },
144
174
  error(code) {
145
- return new Error(`Code ${code}`);
175
+ return new Error(`Error ${code}`);
146
176
  },
147
177
  addMessages() { },
148
178
  });
@@ -479,7 +509,7 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
479
509
  }
480
510
  }
481
511
  }
482
- class BindingObserverImplementation extends SubscriberSet {
512
+ class ExpressionNotifierImplementation extends SubscriberSet {
483
513
  constructor(binding, initialSubscriber, isVolatileBinding = false) {
484
514
  super(binding, initialSubscriber);
485
515
  this.binding = binding;
@@ -634,14 +664,14 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
634
664
  */
635
665
  getAccessors,
636
666
  /**
637
- * Creates a {@link BindingObserver} that can watch the
638
- * provided {@link Binding} for changes.
667
+ * Creates a {@link ExpressionNotifier} that can watch the
668
+ * provided {@link Expression} for changes.
639
669
  * @param binding - The binding to observe.
640
670
  * @param initialSubscriber - An initial subscriber to changes in the binding value.
641
671
  * @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.
642
672
  */
643
673
  binding(binding, initialSubscriber, isVolatileBinding = this.isVolatileBinding(binding)) {
644
- return new BindingObserverImplementation(binding, initialSubscriber, isVolatileBinding);
674
+ return new ExpressionNotifierImplementation(binding, initialSubscriber, isVolatileBinding);
645
675
  },
646
676
  /**
647
677
  * Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated
@@ -1147,6 +1177,20 @@ class ElementStyles {
1147
1177
  static setDefaultStrategy(Strategy) {
1148
1178
  DefaultStyleStrategy = Strategy;
1149
1179
  }
1180
+ /**
1181
+ * Normalizes a set of composable style options.
1182
+ * @param styles - The style options to normalize.
1183
+ * @returns A singular ElementStyles instance or undefined.
1184
+ */
1185
+ static normalize(styles) {
1186
+ return styles === void 0
1187
+ ? void 0
1188
+ : Array.isArray(styles)
1189
+ ? new ElementStyles(styles)
1190
+ : styles instanceof ElementStyles
1191
+ ? styles
1192
+ : new ElementStyles([styles]);
1193
+ }
1150
1194
  }
1151
1195
  /**
1152
1196
  * Indicates whether the DOM supports the adoptedStyleSheets feature.
@@ -1473,6 +1517,13 @@ function htmlDirective(options) {
1473
1517
  HTMLDirective.define(type, options);
1474
1518
  };
1475
1519
  }
1520
+ /**
1521
+ * Captures a binding expression along with related information and capabilities.
1522
+ *
1523
+ * @public
1524
+ */
1525
+ class Binding {
1526
+ }
1476
1527
  /**
1477
1528
  * The type of HTML aspect to target.
1478
1529
  * @public
@@ -1566,6 +1617,10 @@ class StatelessAttachedAttributeDirective {
1566
1617
  */
1567
1618
  constructor(options) {
1568
1619
  this.options = options;
1620
+ /**
1621
+ * The unique id of the factory.
1622
+ */
1623
+ this.id = nextId();
1569
1624
  }
1570
1625
  /**
1571
1626
  * Creates a behavior.
@@ -1594,99 +1649,28 @@ const createInnerHTMLBinding = globalThis.TrustedHTML
1594
1649
  throw FAST.error(1202 /* Message.bindingInnerHTMLRequiresTrustedTypes */);
1595
1650
  }
1596
1651
  : (binding) => binding;
1597
- /**
1598
- * Describes how aspects of an HTML element will be affected by bindings.
1599
- * @public
1600
- */
1601
- const BindingMode = Object.freeze({
1602
- /**
1603
- * Creates a binding mode based on the supplied behavior types.
1604
- * @param UpdateType - The base behavior type used to update aspects.
1605
- * @param EventType - The base behavior type used to respond to events.
1606
- * @returns A new binding mode.
1607
- */
1608
- define(UpdateType, EventType = EventBinding) {
1609
- return Object.freeze({
1610
- [1]: d => new UpdateType(d, DOM.setAttribute),
1611
- [2]: d => new UpdateType(d, DOM.setBooleanAttribute),
1612
- [3]: d => new UpdateType(d, (t, a, v) => (t[a] = v)),
1613
- [4]: d => new (createContentBinding(UpdateType))(d, updateContentTarget),
1614
- [5]: d => new UpdateType(d, updateTokenListTarget),
1615
- [6]: d => new EventType(d),
1616
- });
1617
- },
1618
- });
1619
- /**
1620
- * Describes the configuration for a binding expression.
1621
- * @public
1622
- */
1623
- const BindingConfig = Object.freeze({
1624
- /**
1625
- * Creates a binding configuration based on the provided mode and options.
1626
- * @param mode - The mode to use for the configuration.
1627
- * @param defaultOptions - The default options to use for the configuration.
1628
- * @returns A new binding configuration.
1629
- */
1630
- define(mode, defaultOptions) {
1631
- const config = (options) => {
1632
- return {
1633
- mode: config.mode,
1634
- options: Object.assign({}, defaultOptions, options),
1635
- };
1636
- };
1637
- config.options = defaultOptions;
1638
- config.mode = mode;
1639
- return config;
1640
- },
1641
- });
1642
- /**
1643
- * A base binding behavior for DOM updates.
1644
- * @public
1645
- */
1646
- class UpdateBinding {
1647
- /**
1648
- * Creates an instance of UpdateBinding.
1649
- * @param directive - The directive that has the configuration for this behavior.
1650
- * @param updateTarget - The function used to update the target with the latest value.
1651
- */
1652
- constructor(directive, updateTarget) {
1653
- this.directive = directive;
1654
- this.updateTarget = updateTarget;
1652
+ class OnChangeBinding extends Binding {
1653
+ constructor(evaluate, isVolatile) {
1654
+ super();
1655
+ this.evaluate = evaluate;
1656
+ this.isVolatile = isVolatile;
1655
1657
  }
1656
- /**
1657
- * Bind this behavior to the source.
1658
- * @param source - The source to bind to.
1659
- * @param context - The execution context that the binding is operating within.
1660
- * @param targets - The targets that behaviors in a view can attach to.
1661
- */
1662
- bind(source, context, targets) { }
1663
- /**
1664
- * Unbinds this behavior from the source.
1665
- * @param source - The source to unbind from.
1666
- * @param context - The execution context that the binding is operating within.
1667
- * @param targets - The targets that behaviors in a view can attach to.
1668
- */
1669
- unbind(source, context, targets) { }
1670
- /**
1671
- * Creates a behavior.
1672
- * @param targets - The targets available for behaviors to be attached to.
1673
- */
1674
- createBehavior(targets) {
1675
- return this;
1658
+ createObserver(_, subscriber) {
1659
+ return Observable.binding(this.evaluate, subscriber, this.isVolatile);
1676
1660
  }
1677
1661
  }
1678
- function createContentBinding(Type) {
1679
- return class extends Type {
1680
- unbind(source, context, targets) {
1681
- super.unbind(source, context, targets);
1682
- const target = targets[this.directive.nodeId];
1683
- const view = target.$fastView;
1684
- if (view !== void 0 && view.isComposed) {
1685
- view.unbind();
1686
- view.needsBindOnly = true;
1687
- }
1688
- }
1689
- };
1662
+ class OneTimeBinding extends Binding {
1663
+ constructor(evaluate) {
1664
+ super();
1665
+ this.evaluate = evaluate;
1666
+ }
1667
+ createObserver() {
1668
+ return this;
1669
+ }
1670
+ observe(source, context) {
1671
+ return this.evaluate(source, context);
1672
+ }
1673
+ dispose() { }
1690
1674
  }
1691
1675
  function updateContentTarget(target, aspect, value, source, context) {
1692
1676
  // If there's no actual value, then this equates to the
@@ -1694,7 +1678,7 @@ function updateContentTarget(target, aspect, value, source, context) {
1694
1678
  if (value === null || value === undefined) {
1695
1679
  value = "";
1696
1680
  }
1697
- // If the value has a "create" method, then it's a template-like.
1681
+ // If the value has a "create" method, then it's a ContentTemplate.
1698
1682
  if (value.create) {
1699
1683
  target.textContent = "";
1700
1684
  let view = target.$fastView;
@@ -1780,46 +1764,21 @@ function updateTokenListTarget(target, aspect, value) {
1780
1764
  }
1781
1765
  }
1782
1766
  }
1783
- /**
1784
- * A binding behavior for one-time bindings.
1785
- * @public
1786
- */
1787
- class OneTimeBinding extends UpdateBinding {
1788
- /**
1789
- * Bind this behavior to the source.
1790
- * @param source - The source to bind to.
1791
- * @param context - The execution context that the binding is operating within.
1792
- * @param targets - The targets that behaviors in a view can attach to.
1793
- */
1794
- bind(source, context, targets) {
1795
- const directive = this.directive;
1796
- this.updateTarget(targets[directive.nodeId], directive.targetAspect, directive.binding(source, context), source, context);
1797
- }
1798
- }
1799
1767
  /**
1800
1768
  * A binding behavior for bindings that change.
1801
1769
  * @public
1802
1770
  */
1803
- class ChangeBinding extends UpdateBinding {
1771
+ class BindingBehavior {
1804
1772
  /**
1805
1773
  * Creates an instance of ChangeBinding.
1806
1774
  * @param directive - The directive that has the configuration for this behavior.
1807
1775
  * @param updateTarget - The function used to update the target with the latest value.
1808
1776
  */
1809
1777
  constructor(directive, updateTarget) {
1810
- super(directive, updateTarget);
1811
- this.isBindingVolatile = Observable.isVolatileBinding(directive.binding);
1778
+ this.directive = directive;
1779
+ this.updateTarget = updateTarget;
1812
1780
  this.observerProperty = `${directive.id}-o`;
1813
1781
  }
1814
- /**
1815
- * Returns the binding observer used to update the node.
1816
- * @param target - The target node.
1817
- * @returns A BindingObserver.
1818
- */
1819
- getObserver(target) {
1820
- var _a;
1821
- return ((_a = target[this.observerProperty]) !== null && _a !== void 0 ? _a : (target[this.observerProperty] = Observable.binding(this.directive.binding, this, this.isBindingVolatile)));
1822
- }
1823
1782
  /**
1824
1783
  * Bind this behavior to the source.
1825
1784
  * @param source - The source to bind to.
@@ -1856,12 +1815,49 @@ class ChangeBinding extends UpdateBinding {
1856
1815
  const context = observer.context;
1857
1816
  this.updateTarget(target, this.directive.targetAspect, observer.observe(source, context), source, context);
1858
1817
  }
1818
+ /**
1819
+ * Returns the binding observer used to update the node.
1820
+ * @param target - The target node.
1821
+ * @returns A BindingObserver.
1822
+ */
1823
+ getObserver(target) {
1824
+ var _a;
1825
+ return ((_a = target[this.observerProperty]) !== null && _a !== void 0 ? _a : (target[this.observerProperty] = this.directive.dataBinding.createObserver(this.directive, this)));
1826
+ }
1827
+ /**
1828
+ * Creates a behavior.
1829
+ * @param targets - The targets available for behaviors to be attached to.
1830
+ */
1831
+ createBehavior(targets) {
1832
+ return this;
1833
+ }
1834
+ }
1835
+ /**
1836
+ * A special binding behavior that can bind node content.
1837
+ * @public
1838
+ */
1839
+ class ContentBehavior extends BindingBehavior {
1840
+ /**
1841
+ * Unbinds this behavior from the source.
1842
+ * @param source - The source to unbind from.
1843
+ * @param context - The execution context that the binding is operating within.
1844
+ * @param targets - The targets that behaviors in a view can attach to.
1845
+ */
1846
+ unbind(source, context, targets) {
1847
+ super.unbind(source, context, targets);
1848
+ const target = targets[this.directive.nodeId];
1849
+ const view = target.$fastView;
1850
+ if (view !== void 0 && view.isComposed) {
1851
+ view.unbind();
1852
+ view.needsBindOnly = true;
1853
+ }
1854
+ }
1859
1855
  }
1860
1856
  /**
1861
1857
  * A binding behavior for handling events.
1862
1858
  * @public
1863
1859
  */
1864
- class EventBinding {
1860
+ class EventBehavior {
1865
1861
  /**
1866
1862
  * Creates an instance of EventBinding.
1867
1863
  * @param directive - The directive that has the configuration for this behavior.
@@ -1882,7 +1878,7 @@ class EventBinding {
1882
1878
  const target = targets[directive.nodeId];
1883
1879
  target[this.sourceProperty] = source;
1884
1880
  target[this.contextProperty] = context;
1885
- target.addEventListener(directive.targetAspect, this, directive.options);
1881
+ target.addEventListener(directive.targetAspect, this, directive.dataBinding.options);
1886
1882
  }
1887
1883
  /**
1888
1884
  * Unbinds this behavior from the source.
@@ -1894,7 +1890,7 @@ class EventBinding {
1894
1890
  const directive = this.directive;
1895
1891
  const target = targets[directive.nodeId];
1896
1892
  target[this.sourceProperty] = target[this.contextProperty] = null;
1897
- target.removeEventListener(directive.targetAspect, this, directive.options);
1893
+ target.removeEventListener(directive.targetAspect, this, directive.dataBinding.options);
1898
1894
  }
1899
1895
  /**
1900
1896
  * Creates a behavior.
@@ -1909,25 +1905,13 @@ class EventBinding {
1909
1905
  handleEvent(event) {
1910
1906
  const target = event.currentTarget;
1911
1907
  ExecutionContext.setEvent(event);
1912
- const result = this.directive.binding(target[this.sourceProperty], target[this.contextProperty]);
1908
+ const result = this.directive.dataBinding.evaluate(target[this.sourceProperty], target[this.contextProperty]);
1913
1909
  ExecutionContext.setEvent(null);
1914
1910
  if (result !== true) {
1915
1911
  event.preventDefault();
1916
1912
  }
1917
1913
  }
1918
1914
  }
1919
- /**
1920
- * The default onChange binding configuration.
1921
- * @public
1922
- */
1923
- const onChange = BindingConfig.define(BindingMode.define(ChangeBinding), {});
1924
- /**
1925
- * The default onTime binding configuration.
1926
- * @public
1927
- */
1928
- const oneTime = BindingConfig.define(BindingMode.define(OneTimeBinding), {
1929
- once: true,
1930
- });
1931
1915
  /**
1932
1916
  * A directive that applies bindings.
1933
1917
  * @public
@@ -1935,15 +1919,15 @@ const oneTime = BindingConfig.define(BindingMode.define(OneTimeBinding), {
1935
1919
  class HTMLBindingDirective {
1936
1920
  /**
1937
1921
  * Creates an instance of HTMLBindingDirective.
1938
- * @param binding - The binding to apply.
1939
- * @param mode - The binding mode to use when applying the binding.
1940
- * @param options - The options to configure the binding with.
1922
+ * @param dataBinding - The binding configuration to apply.
1941
1923
  */
1942
- constructor(binding, mode, options) {
1943
- this.binding = binding;
1944
- this.mode = mode;
1945
- this.options = options;
1924
+ constructor(dataBinding) {
1925
+ this.dataBinding = dataBinding;
1946
1926
  this.factory = null;
1927
+ /**
1928
+ * The unique id of the factory.
1929
+ */
1930
+ this.id = nextId();
1947
1931
  /**
1948
1932
  * The type of aspect to target.
1949
1933
  */
@@ -1963,26 +1947,78 @@ class HTMLBindingDirective {
1963
1947
  createBehavior(targets) {
1964
1948
  if (this.factory == null) {
1965
1949
  if (this.targetAspect === "innerHTML") {
1966
- this.binding = createInnerHTMLBinding(this.binding);
1950
+ this.dataBinding.evaluate = createInnerHTMLBinding(this.dataBinding.evaluate);
1951
+ }
1952
+ switch (this.aspectType) {
1953
+ case 1:
1954
+ this.factory = new BindingBehavior(this, DOM.setAttribute);
1955
+ break;
1956
+ case 2:
1957
+ this.factory = new BindingBehavior(this, DOM.setBooleanAttribute);
1958
+ break;
1959
+ case 3:
1960
+ this.factory = new BindingBehavior(this, (t, a, v) => (t[a] = v));
1961
+ break;
1962
+ case 4:
1963
+ this.factory = new ContentBehavior(this, updateContentTarget);
1964
+ break;
1965
+ case 5:
1966
+ this.factory = new BindingBehavior(this, updateTokenListTarget);
1967
+ break;
1968
+ case 6:
1969
+ this.factory = new EventBehavior(this);
1970
+ break;
1971
+ default:
1972
+ throw FAST.error(1205 /* Message.unsupportedBindingBehavior */);
1967
1973
  }
1968
- this.factory = this.mode[this.aspectType](this);
1969
1974
  }
1970
1975
  return this.factory.createBehavior(targets);
1971
1976
  }
1972
1977
  }
1973
1978
  HTMLDirective.define(HTMLBindingDirective, { aspected: true });
1974
1979
  /**
1975
- * Creates a binding directive with the specified configuration.
1976
- * @param binding - The binding expression.
1977
- * @param config - The binding configuration.
1978
- * @returns A binding directive.
1980
+ * Creates an standard binding.
1981
+ * @param binding - The binding to refresh when changed.
1982
+ * @param isVolatile - Indicates whether the binding is volatile or not.
1983
+ * @returns A binding configuration.
1979
1984
  * @public
1980
1985
  */
1981
- function bind(binding, config = onChange) {
1982
- if (!("mode" in config)) {
1983
- config = onChange(config);
1984
- }
1985
- return new HTMLBindingDirective(binding, config.mode, config.options);
1986
+ function bind(binding, isVolatile = Observable.isVolatileBinding(binding)) {
1987
+ return new OnChangeBinding(binding, isVolatile);
1988
+ }
1989
+ /**
1990
+ * Creates a one time binding
1991
+ * @param binding - The binding to refresh when signaled.
1992
+ * @returns A binding configuration.
1993
+ * @public
1994
+ */
1995
+ function oneTime(binding) {
1996
+ return new OneTimeBinding(binding);
1997
+ }
1998
+ /**
1999
+ * Creates an event listener binding.
2000
+ * @param binding - The binding to invoke when the event is raised.
2001
+ * @param options - Event listener options.
2002
+ * @returns A binding configuration.
2003
+ * @public
2004
+ */
2005
+ function listener(binding, options) {
2006
+ const config = new OnChangeBinding(binding, false);
2007
+ config.options = options;
2008
+ return config;
2009
+ }
2010
+ /**
2011
+ * Normalizes the input value into a binding.
2012
+ * @param value - The value to create the default binding for.
2013
+ * @returns A binding configuration for the provided value.
2014
+ * @public
2015
+ */
2016
+ function normalizeBinding(value) {
2017
+ return isFunction(value)
2018
+ ? bind(value)
2019
+ : value instanceof Binding
2020
+ ? value
2021
+ : oneTime(() => value);
1986
2022
  }
1987
2023
 
1988
2024
  function removeNodeSequence(firstNode, lastNode) {
@@ -2149,6 +2185,22 @@ const next = {
2149
2185
  index: 0,
2150
2186
  node: null,
2151
2187
  };
2188
+ function tryWarn(name) {
2189
+ if (!name.startsWith("fast-")) {
2190
+ FAST.warn(1204 /* Message.hostBindingWithoutHost */, { name });
2191
+ }
2192
+ }
2193
+ const warningHost = new Proxy(document.createElement("div"), {
2194
+ get(target, property) {
2195
+ tryWarn(property);
2196
+ const value = Reflect.get(target, property);
2197
+ return isFunction(value) ? value.bind(target) : value;
2198
+ },
2199
+ set(target, property, value) {
2200
+ tryWarn(property);
2201
+ return Reflect.set(target, property, value);
2202
+ },
2203
+ });
2152
2204
  class CompilationContext {
2153
2205
  constructor(fragment, directives) {
2154
2206
  this.fragment = fragment;
@@ -2199,7 +2251,7 @@ class CompilationContext {
2199
2251
  const fragment = this.fragment.cloneNode(true);
2200
2252
  const targets = Object.create(this.proto);
2201
2253
  targets.r = fragment;
2202
- targets.h = hostBindingTarget !== null && hostBindingTarget !== void 0 ? hostBindingTarget : fragment;
2254
+ targets.h = hostBindingTarget !== null && hostBindingTarget !== void 0 ? hostBindingTarget : warningHost;
2203
2255
  for (const id of this.nodeIds) {
2204
2256
  targets[id]; // trigger locator
2205
2257
  }
@@ -2216,7 +2268,7 @@ function compileAttributes(context, parentId, node, nodeId, nodeIndex, includeBa
2216
2268
  let result = null;
2217
2269
  if (parseResult === null) {
2218
2270
  if (includeBasicValues) {
2219
- result = bind(() => attrValue, oneTime);
2271
+ result = new HTMLBindingDirective(oneTime(() => attrValue));
2220
2272
  Aspect.assign(result, attr.name);
2221
2273
  }
2222
2274
  }
@@ -2386,22 +2438,28 @@ const Compiler = {
2386
2438
  return parts[0];
2387
2439
  }
2388
2440
  let sourceAspect;
2441
+ let binding;
2442
+ let isVolatile = false;
2389
2443
  const partCount = parts.length;
2390
2444
  const finalParts = parts.map((x) => {
2391
2445
  if (isString(x)) {
2392
2446
  return () => x;
2393
2447
  }
2394
2448
  sourceAspect = x.sourceAspect || sourceAspect;
2395
- return x.binding;
2449
+ binding = x.dataBinding || binding;
2450
+ isVolatile = isVolatile || x.dataBinding.isVolatile;
2451
+ return x.dataBinding.evaluate;
2396
2452
  });
2397
- const binding = (scope, context) => {
2453
+ const expression = (scope, context) => {
2398
2454
  let output = "";
2399
2455
  for (let i = 0; i < partCount; ++i) {
2400
2456
  output += finalParts[i](scope, context);
2401
2457
  }
2402
2458
  return output;
2403
2459
  };
2404
- const directive = bind(binding);
2460
+ binding.evaluate = expression;
2461
+ binding.isVolatile = isVolatile;
2462
+ const directive = new HTMLBindingDirective(binding);
2405
2463
  Aspect.assign(directive, sourceAspect);
2406
2464
  return directive;
2407
2465
  },
@@ -2481,12 +2539,12 @@ function html(strings, ...values) {
2481
2539
  let definition;
2482
2540
  html += currentString;
2483
2541
  if (isFunction(currentValue)) {
2484
- html += createAspectedHTML(bind(currentValue), currentString, add);
2542
+ html += createAspectedHTML(new HTMLBindingDirective(bind(currentValue)), currentString, add);
2485
2543
  }
2486
2544
  else if (isString(currentValue)) {
2487
2545
  const match = lastAttributeNameRegex.exec(currentString);
2488
2546
  if (match !== null) {
2489
- const directive = bind(() => currentValue, oneTime);
2547
+ const directive = new HTMLBindingDirective(oneTime(() => currentValue));
2490
2548
  Aspect.assign(directive, match[2]);
2491
2549
  html += directive.createHTML(add);
2492
2550
  }
@@ -2494,8 +2552,11 @@ function html(strings, ...values) {
2494
2552
  html += currentValue;
2495
2553
  }
2496
2554
  }
2555
+ else if (currentValue instanceof Binding) {
2556
+ html += createAspectedHTML(new HTMLBindingDirective(currentValue), currentString, add);
2557
+ }
2497
2558
  else if ((definition = HTMLDirective.getForInstance(currentValue)) === void 0) {
2498
- html += createAspectedHTML(bind(() => currentValue, oneTime), currentString, add);
2559
+ html += createAspectedHTML(new HTMLBindingDirective(oneTime(() => currentValue)), currentString, add);
2499
2560
  }
2500
2561
  else {
2501
2562
  if (definition.aspected) {
@@ -2540,16 +2601,17 @@ const ref = (propertyName) => new RefDirective(propertyName);
2540
2601
 
2541
2602
  /**
2542
2603
  * A directive that enables basic conditional rendering in a template.
2543
- * @param binding - The condition to test for rendering.
2604
+ * @param condition - The condition to test for rendering.
2544
2605
  * @param templateOrTemplateBinding - The template or a binding that gets
2545
2606
  * the template to render when the condition is true.
2546
2607
  * @public
2547
2608
  */
2548
- function when(binding, templateOrTemplateBinding) {
2549
- const getTemplate = isFunction(templateOrTemplateBinding)
2609
+ function when(condition, templateOrTemplateBinding) {
2610
+ const dataBinding = isFunction(condition) ? condition : () => condition;
2611
+ const templateBinding = isFunction(templateOrTemplateBinding)
2550
2612
  ? templateOrTemplateBinding
2551
2613
  : () => templateOrTemplateBinding;
2552
- return (source, context) => binding(source, context) ? getTemplate(source, context) : null;
2614
+ return (source, context) => dataBinding(source, context) ? templateBinding(source, context) : null;
2553
2615
  }
2554
2616
 
2555
2617
  const defaultRepeatOptions = Object.freeze({
@@ -2570,17 +2632,15 @@ class RepeatBehavior {
2570
2632
  /**
2571
2633
  * Creates an instance of RepeatBehavior.
2572
2634
  * @param location - The location in the DOM to render the repeat.
2573
- * @param itemsBinding - The array to render.
2635
+ * @param dataBinding - The array to render.
2574
2636
  * @param isItemsBindingVolatile - Indicates whether the items binding has volatile dependencies.
2575
2637
  * @param templateBinding - The template to render for each item.
2576
2638
  * @param isTemplateBindingVolatile - Indicates whether the template binding has volatile dependencies.
2577
2639
  * @param options - Options used to turn on special repeat features.
2578
2640
  */
2579
- constructor(location, itemsBinding, isItemsBindingVolatile, templateBinding, isTemplateBindingVolatile, options) {
2641
+ constructor(directive, location) {
2642
+ this.directive = directive;
2580
2643
  this.location = location;
2581
- this.itemsBinding = itemsBinding;
2582
- this.templateBinding = templateBinding;
2583
- this.options = options;
2584
2644
  this.source = null;
2585
2645
  this.views = [];
2586
2646
  this.items = null;
@@ -2588,9 +2648,9 @@ class RepeatBehavior {
2588
2648
  this.context = void 0;
2589
2649
  this.childContext = void 0;
2590
2650
  this.bindView = bindWithoutPositioning;
2591
- this.itemsBindingObserver = Observable.binding(itemsBinding, this, isItemsBindingVolatile);
2592
- this.templateBindingObserver = Observable.binding(templateBinding, this, isTemplateBindingVolatile);
2593
- if (options.positioning) {
2651
+ this.itemsBindingObserver = directive.dataBinding.createObserver(directive, this);
2652
+ this.templateBindingObserver = directive.templateBinding.createObserver(directive, this);
2653
+ if (directive.options.positioning) {
2594
2654
  this.bindView = bindWithPositioning;
2595
2655
  }
2596
2656
  }
@@ -2628,12 +2688,12 @@ class RepeatBehavior {
2628
2688
  * @param args - The details about what was changed.
2629
2689
  */
2630
2690
  handleChange(source, args) {
2631
- if (source === this.itemsBinding) {
2691
+ if (args === this.itemsBindingObserver) {
2632
2692
  this.items = this.itemsBindingObserver.observe(this.source, this.context);
2633
2693
  this.observeItems();
2634
2694
  this.refreshAllViews();
2635
2695
  }
2636
- else if (source === this.templateBinding) {
2696
+ else if (args === this.templateBindingObserver) {
2637
2697
  this.template = this.templateBindingObserver.observe(this.source, this.context);
2638
2698
  this.refreshAllViews(true);
2639
2699
  }
@@ -2662,36 +2722,51 @@ class RepeatBehavior {
2662
2722
  updateViews(splices) {
2663
2723
  const views = this.views;
2664
2724
  const childContext = this.childContext;
2665
- const totalRemoved = [];
2666
2725
  const bindView = this.bindView;
2667
- let removeDelta = 0;
2668
- for (let i = 0, ii = splices.length; i < ii; ++i) {
2669
- const splice = splices[i];
2670
- const removed = splice.removed;
2671
- totalRemoved.push(...views.splice(splice.index + removeDelta, removed.length));
2672
- removeDelta -= splice.addedCount;
2673
- }
2674
2726
  const items = this.items;
2675
2727
  const template = this.template;
2728
+ const recycle = this.directive.options.recycle;
2729
+ const leftoverViews = [];
2730
+ let leftoverIndex = 0;
2731
+ let availableViews = 0;
2676
2732
  for (let i = 0, ii = splices.length; i < ii; ++i) {
2677
2733
  const splice = splices[i];
2734
+ const removed = splice.removed;
2735
+ let removeIndex = 0;
2678
2736
  let addIndex = splice.index;
2679
2737
  const end = addIndex + splice.addedCount;
2738
+ const removedViews = views.splice(splice.index, removed.length);
2739
+ availableViews = leftoverViews.length + removedViews.length;
2680
2740
  for (; addIndex < end; ++addIndex) {
2681
2741
  const neighbor = views[addIndex];
2682
2742
  const location = neighbor ? neighbor.firstChild : this.location;
2683
- const view = this.options.recycle && totalRemoved.length > 0
2684
- ? totalRemoved.shift()
2685
- : template.create();
2743
+ let view;
2744
+ if (recycle && availableViews > 0) {
2745
+ if (removeIndex <= availableViews && removedViews.length > 0) {
2746
+ view = removedViews[removeIndex];
2747
+ removeIndex++;
2748
+ }
2749
+ else {
2750
+ view = leftoverViews[leftoverIndex];
2751
+ leftoverIndex++;
2752
+ }
2753
+ availableViews--;
2754
+ }
2755
+ else {
2756
+ view = template.create();
2757
+ }
2686
2758
  views.splice(addIndex, 0, view);
2687
2759
  bindView(view, items, addIndex, childContext);
2688
2760
  view.insertBefore(location);
2689
2761
  }
2762
+ if (removedViews[removeIndex]) {
2763
+ leftoverViews.push(...removedViews.slice(removeIndex));
2764
+ }
2690
2765
  }
2691
- for (let i = 0, ii = totalRemoved.length; i < ii; ++i) {
2692
- totalRemoved[i].dispose();
2766
+ for (let i = leftoverIndex, ii = leftoverViews.length; i < ii; ++i) {
2767
+ leftoverViews[i].dispose();
2693
2768
  }
2694
- if (this.options.positioning) {
2769
+ if (this.directive.options.positioning) {
2695
2770
  for (let i = 0, ii = views.length; i < ii; ++i) {
2696
2771
  views[i].context.updatePosition(i, ii);
2697
2772
  }
@@ -2706,7 +2781,7 @@ class RepeatBehavior {
2706
2781
  let itemsLength = items.length;
2707
2782
  let views = this.views;
2708
2783
  let viewsLength = views.length;
2709
- if (itemsLength === 0 || templateChanged || !this.options.recycle) {
2784
+ if (itemsLength === 0 || templateChanged || !this.directive.options.recycle) {
2710
2785
  // all views need to be removed
2711
2786
  HTMLView.disposeContiguousBatch(views);
2712
2787
  viewsLength = 0;
@@ -2756,17 +2831,19 @@ class RepeatBehavior {
2756
2831
  class RepeatDirective {
2757
2832
  /**
2758
2833
  * Creates an instance of RepeatDirective.
2759
- * @param itemsBinding - The binding that provides the array to render.
2834
+ * @param dataBinding - The binding that provides the array to render.
2760
2835
  * @param templateBinding - The template binding used to obtain a template to render for each item in the array.
2761
2836
  * @param options - Options used to turn on special repeat features.
2762
2837
  */
2763
- constructor(itemsBinding, templateBinding, options) {
2764
- this.itemsBinding = itemsBinding;
2838
+ constructor(dataBinding, templateBinding, options) {
2839
+ this.dataBinding = dataBinding;
2765
2840
  this.templateBinding = templateBinding;
2766
2841
  this.options = options;
2842
+ /**
2843
+ * The unique id of the factory.
2844
+ */
2845
+ this.id = nextId();
2767
2846
  ArrayObserver.enable();
2768
- this.isItemsBindingVolatile = Observable.isVolatileBinding(itemsBinding);
2769
- this.isTemplateBindingVolatile = Observable.isVolatileBinding(templateBinding);
2770
2847
  }
2771
2848
  /**
2772
2849
  * Creates a placeholder string based on the directive's index within the template.
@@ -2780,23 +2857,22 @@ class RepeatDirective {
2780
2857
  * @param target - The node instance to create the behavior for.
2781
2858
  */
2782
2859
  createBehavior(targets) {
2783
- return new RepeatBehavior(targets[this.nodeId], this.itemsBinding, this.isItemsBindingVolatile, this.templateBinding, this.isTemplateBindingVolatile, this.options);
2860
+ return new RepeatBehavior(this, targets[this.nodeId]);
2784
2861
  }
2785
2862
  }
2786
2863
  HTMLDirective.define(RepeatDirective);
2787
2864
  /**
2788
2865
  * A directive that enables list rendering.
2789
- * @param itemsBinding - The array to render.
2790
- * @param templateOrTemplateBinding - The template or a template binding used obtain a template
2866
+ * @param items - The array to render.
2867
+ * @param template - The template or a template binding used obtain a template
2791
2868
  * to render for each item in the array.
2792
2869
  * @param options - Options used to turn on special repeat features.
2793
2870
  * @public
2794
2871
  */
2795
- function repeat(itemsBinding, templateOrTemplateBinding, options = defaultRepeatOptions) {
2796
- const templateBinding = isFunction(templateOrTemplateBinding)
2797
- ? templateOrTemplateBinding
2798
- : () => templateOrTemplateBinding;
2799
- return new RepeatDirective(itemsBinding, templateBinding, options);
2872
+ function repeat(items, template, options = defaultRepeatOptions) {
2873
+ const dataBinding = normalizeBinding(items);
2874
+ const templateBinding = normalizeBinding(template);
2875
+ return new RepeatDirective(dataBinding, templateBinding, options);
2800
2876
  }
2801
2877
 
2802
2878
  const selectElements = (value) => value.nodeType === 1;
@@ -3181,19 +3257,15 @@ const fastElementRegistry = FAST.getById(4 /* KernelServiceId.elementRegistry */
3181
3257
  * @public
3182
3258
  */
3183
3259
  class FASTElementDefinition {
3184
- /**
3185
- * Creates an instance of FASTElementDefinition.
3186
- * @param type - The type this definition is being created for.
3187
- * @param nameOrConfig - The name of the element to define or a config object
3188
- * that describes the element to define.
3189
- */
3190
3260
  constructor(type, nameOrConfig = type.definition) {
3261
+ this.platformDefined = false;
3191
3262
  if (isString(nameOrConfig)) {
3192
3263
  nameOrConfig = { name: nameOrConfig };
3193
3264
  }
3194
3265
  this.type = type;
3195
3266
  this.name = nameOrConfig.name;
3196
3267
  this.template = nameOrConfig.template;
3268
+ const proto = type.prototype;
3197
3269
  const attributes = AttributeDefinition.collect(type, nameOrConfig.attributes);
3198
3270
  const observedAttributes = new Array(attributes.length);
3199
3271
  const propertyLookup = {};
@@ -3203,9 +3275,13 @@ class FASTElementDefinition {
3203
3275
  observedAttributes[i] = current.attribute;
3204
3276
  propertyLookup[current.name] = current;
3205
3277
  attributeLookup[current.attribute] = current;
3278
+ Observable.defineProperty(proto, current);
3206
3279
  }
3280
+ Reflect.defineProperty(type, "observedAttributes", {
3281
+ value: observedAttributes,
3282
+ enumerable: true,
3283
+ });
3207
3284
  this.attributes = attributes;
3208
- this.observedAttributes = observedAttributes;
3209
3285
  this.propertyLookup = propertyLookup;
3210
3286
  this.attributeLookup = attributeLookup;
3211
3287
  this.shadowOptions =
@@ -3218,20 +3294,14 @@ class FASTElementDefinition {
3218
3294
  nameOrConfig.elementOptions === void 0
3219
3295
  ? defaultElementOptions
3220
3296
  : Object.assign(Object.assign({}, defaultElementOptions), nameOrConfig.elementOptions);
3221
- this.styles =
3222
- nameOrConfig.styles === void 0
3223
- ? void 0
3224
- : Array.isArray(nameOrConfig.styles)
3225
- ? new ElementStyles(nameOrConfig.styles)
3226
- : nameOrConfig.styles instanceof ElementStyles
3227
- ? nameOrConfig.styles
3228
- : new ElementStyles([nameOrConfig.styles]);
3297
+ this.styles = ElementStyles.normalize(nameOrConfig.styles);
3298
+ fastElementRegistry.register(this);
3229
3299
  }
3230
3300
  /**
3231
3301
  * Indicates if this element has been defined in at least one registry.
3232
3302
  */
3233
3303
  get isDefined() {
3234
- return !!fastElementRegistry.getByType(this.type);
3304
+ return this.platformDefined;
3235
3305
  }
3236
3306
  /**
3237
3307
  * Defines a custom element based on this definition.
@@ -3241,22 +3311,26 @@ class FASTElementDefinition {
3241
3311
  */
3242
3312
  define(registry = customElements) {
3243
3313
  const type = this.type;
3244
- if (fastElementRegistry.register(this)) {
3245
- const attributes = this.attributes;
3246
- const proto = type.prototype;
3247
- for (let i = 0, ii = attributes.length; i < ii; ++i) {
3248
- Observable.defineProperty(proto, attributes[i]);
3249
- }
3250
- Reflect.defineProperty(type, "observedAttributes", {
3251
- value: this.observedAttributes,
3252
- enumerable: true,
3253
- });
3254
- }
3255
3314
  if (!registry.get(this.name)) {
3315
+ this.platformDefined = true;
3256
3316
  registry.define(this.name, type, this.elementOptions);
3257
3317
  }
3258
3318
  return this;
3259
3319
  }
3320
+ /**
3321
+ * Creates an instance of FASTElementDefinition.
3322
+ * @param type - The type this definition is being created for.
3323
+ * @param nameOrDef - The name of the element to define or a config object
3324
+ * that describes the element to define.
3325
+ */
3326
+ static compose(type, nameOrDef) {
3327
+ const found = fastElementRegistry.getByType(type);
3328
+ if (found) {
3329
+ return new FASTElementDefinition(class extends type {
3330
+ }, nameOrDef);
3331
+ }
3332
+ return new FASTElementDefinition(type, nameOrDef);
3333
+ }
3260
3334
  }
3261
3335
  /**
3262
3336
  * Gets the element definition associated with the specified type.
@@ -3674,6 +3748,18 @@ function createFASTElement(BaseType) {
3674
3748
  }
3675
3749
  };
3676
3750
  }
3751
+ function compose(type, nameOrDef) {
3752
+ if (isFunction(type)) {
3753
+ return FASTElementDefinition.compose(type, nameOrDef);
3754
+ }
3755
+ return FASTElementDefinition.compose(this, type);
3756
+ }
3757
+ function define(type, nameOrDef) {
3758
+ if (isFunction(type)) {
3759
+ return FASTElementDefinition.compose(type, nameOrDef).define().type;
3760
+ }
3761
+ return FASTElementDefinition.compose(this, type).define().type;
3762
+ }
3677
3763
  /**
3678
3764
  * A minimal base class for FASTElements that also provides
3679
3765
  * static helpers for working with FASTElements.
@@ -3694,17 +3780,12 @@ const FASTElement = Object.assign(createFASTElement(HTMLElement), {
3694
3780
  * @param nameOrDef - The name of the element to define or a definition object
3695
3781
  * that describes the element to define.
3696
3782
  */
3697
- define(type, nameOrDef) {
3698
- return this.metadata(type, nameOrDef).define().type;
3699
- },
3783
+ define,
3700
3784
  /**
3701
3785
  * Defines metadata for a FASTElement which can be used to later define the element.
3702
- * IMPORTANT: This API will be renamed to "compose" in a future beta.
3703
3786
  * @public
3704
3787
  */
3705
- metadata(type, nameOrDef) {
3706
- return new FASTElementDefinition(type, nameOrDef);
3707
- },
3788
+ compose,
3708
3789
  });
3709
3790
  /**
3710
3791
  * Decorator: Defines a platform custom element based on `FASTElement`.
@@ -3715,8 +3796,8 @@ const FASTElement = Object.assign(createFASTElement(HTMLElement), {
3715
3796
  function customElement(nameOrDef) {
3716
3797
  /* eslint-disable-next-line @typescript-eslint/explicit-function-return-type */
3717
3798
  return function (type) {
3718
- FASTElement.define(type, nameOrDef);
3799
+ define(type, nameOrDef);
3719
3800
  };
3720
3801
  }
3721
3802
 
3722
- export { AdoptedStyleSheetsStrategy, ArrayObserver, Aspect, AttributeDefinition, BindingConfig, BindingMode, CSSDirective, ChangeBinding, ChildrenDirective, Compiler, Controller, DOM, ElementStyles, EventBinding, ExecutionContext, FAST, FASTElement, FASTElementDefinition, HTMLBindingDirective, HTMLDirective, HTMLView, Markup, NodeObservationDirective, Observable, OneTimeBinding, Parser, PropertyChangeNotifier, RefDirective, RepeatBehavior, RepeatDirective, SlottedDirective, Splice, SpliceStrategy, SpliceStrategySupport, StatelessAttachedAttributeDirective, SubscriberSet, UpdateBinding, Updates, ViewTemplate, attr, bind, booleanConverter, children, createTypeRegistry, css, cssDirective, cssPartial, customElement, elements, emptyArray, html, htmlDirective, lengthOf, nullableNumberConverter, observable, onChange, oneTime, ref, repeat, slotted, volatile, when };
3803
+ export { AdoptedStyleSheetsStrategy, ArrayObserver, Aspect, AttributeDefinition, Binding, BindingBehavior, CSSDirective, ChildrenDirective, Compiler, ContentBehavior, Controller, DOM, ElementStyles, EventBehavior, ExecutionContext, FAST, FASTElement, FASTElementDefinition, HTMLBindingDirective, HTMLDirective, HTMLView, Markup, NodeObservationDirective, Observable, Parser, PropertyChangeNotifier, RefDirective, RepeatBehavior, RepeatDirective, SlottedDirective, Splice, SpliceStrategy, SpliceStrategySupport, StatelessAttachedAttributeDirective, SubscriberSet, Updates, ViewTemplate, attr, bind, booleanConverter, children, createTypeRegistry, css, cssDirective, cssPartial, customElement, elements, emptyArray, html, htmlDirective, lengthOf, listener, normalizeBinding, nullableNumberConverter, observable, oneTime, ref, repeat, slotted, volatile, when };