tutuca 0.9.56 → 0.9.57

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.
@@ -7866,14 +7866,18 @@ class ComponentSummary {
7866
7866
  }
7867
7867
 
7868
7868
  class ComponentList {
7869
- constructor({ items }) {
7869
+ constructor({ items, total = null, truncated = false }) {
7870
7870
  this.items = items;
7871
+ this.total = total ?? items.length;
7872
+ this.truncated = truncated;
7871
7873
  }
7872
7874
  }
7873
7875
 
7874
7876
  class ExampleIndex {
7875
- constructor({ sections }) {
7877
+ constructor({ sections, total = null, truncated = false }) {
7876
7878
  this.sections = sections;
7879
+ this.total = total ?? sections.reduce((n, s) => n + (s.items?.length ?? 0), 0);
7880
+ this.truncated = truncated;
7877
7881
  }
7878
7882
  }
7879
7883
 
@@ -9030,7 +9034,8 @@ class NameArgsTransaction extends Transaction {
9030
9034
  }
9031
9035
  handlerProp = null;
9032
9036
  getHandlerForName(comp) {
9033
- return comp?.[this.handlerProp]?.[this.name] ?? nullHandler;
9037
+ const handlers = comp?.[this.handlerProp];
9038
+ return handlers?.[this.name] ?? handlers?.$unknown ?? nullHandler;
9034
9039
  }
9035
9040
  getHandlerAndArgs(_root, instance, comps) {
9036
9041
  const handler = this.getHandlerForName(comps.getCompFor(instance));
@@ -9119,6 +9124,9 @@ class Dispatcher {
9119
9124
  }
9120
9125
 
9121
9126
  class EventContext extends Dispatcher {
9127
+ get name() {
9128
+ return this.parent?.name ?? null;
9129
+ }
9122
9130
  stopPropagation() {
9123
9131
  return this.parent.stopPropagation();
9124
9132
  }