wallace 0.15.0 → 0.17.1

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.
package/lib/types.d.ts CHANGED
@@ -182,21 +182,14 @@ Other than that, its standard JSX, except for three special cases:
182
182
 
183
183
  ## 3. Nesting
184
184
 
185
- To nest a component use its name followed by `.nest` and pass `props` if needed:
185
+ To nest a component use its name and pass `props` if needed:
186
186
 
187
187
  ```tsx
188
188
  const Task = (task) => (<div></div>);
189
189
 
190
190
  const TopTasks = (tasks) => (
191
191
  <div>
192
- <Task.nest props={tasks[0]} />
193
- <Task.nest props={tasks[1]} />
194
- </div>
195
- );
196
-
197
- const TaskList = (tasks) => (
198
- <div>
199
- <Task.repeat items={tasks} />
192
+ <Task props={tasks[0]} />
200
193
  </div>
201
194
  );
202
195
  ```
@@ -208,14 +201,15 @@ Notes:
208
201
 
209
202
  ## 4. Repeating
210
203
 
211
- To repeat a component use its name followed by `.repeat` and pass `items`:
204
+ To repeat a component use its name followed by `.repeat` and pass `props` which must
205
+ be an Array of the props the component uses:
212
206
 
213
207
  ```tsx
214
208
  const Task = (task) => (<div></div>);
215
209
 
216
210
  const TaskList = (tasks) => (
217
211
  <div>
218
- <Task.repeat items={tasks} />
212
+ <Task.repeat props={tasks} />
219
213
  </div>
220
214
  );
221
215
  ```
@@ -227,13 +221,13 @@ be a string or a function:
227
221
  ```tsx
228
222
  const TaskList = (tasks) => (
229
223
  <div>
230
- <Task.repeat items={tasks} key="id"/>
224
+ <Task.repeat props={tasks} key="id"/>
231
225
  </div>
232
226
  );
233
227
 
234
228
  const TaskList = (tasks) => (
235
229
  <div>
236
- <Task.repeat items={tasks} key={(x) => x.id}/>
230
+ <Task.repeat props={tasks} key={(x) => x.id}/>
237
231
  </div>
238
232
  );
239
233
  ```
@@ -295,7 +289,7 @@ const Task = (task) => (<div>{task.name}</div>);
295
289
 
296
290
  const TaskList = (_, {ctrl}) => (
297
291
  <div>
298
- <Task.repeat items={ctrl.getTasks()} />
292
+ <Task.repeat props={ctrl.getTasks()} />
299
293
  </div>
300
294
  );
301
295
 
@@ -330,17 +324,17 @@ Stubs are named placeholders for nested components which are requested in the JS
330
324
  ```tsx
331
325
  const MyComponent = () => (
332
326
  <div>
333
- <stub:animation />
334
- <stub:text />
327
+ <stub.animation />
328
+ <stub.text />
335
329
  </div>
336
330
  );
337
331
  ```
338
332
 
339
- And defined on the `stubs` property of the component definition:
333
+ And defined on the `stub` property of the component definition:
340
334
 
341
335
  ```tsx
342
- MyComponent.stubs.animation: () => <div>...</div>;
343
- MyComponent.stubs.text: MyTextComponent;
336
+ MyComponent.stub.animation: () => <div>...</div>;
337
+ MyComponent.stub.text: MyTextComponent;
344
338
  ```
345
339
 
346
340
  Stubs are inherited and can be overridden, which means you can either:
@@ -352,13 +346,13 @@ So long as the rendered component has all its stubs defined somewhere, it will w
352
346
 
353
347
  Notes:
354
348
 
355
- - Stubs receive the same props and controller as their containing component.
356
349
  - Stubs are separate components, so cannot access methods on the containing component
357
350
  through `self` (use the controller for that kind of thing).
358
351
 
359
352
  ## 9. TypeScript
360
353
 
361
- The main type is `Uses` which must be placed right after the comonent name:
354
+ The `Uses` lets you annotate a component's props and other types. It must be placed
355
+ right after the component name (not inside the parameters):
362
356
 
363
357
  ```tsx
364
358
  import { Uses } from 'wallace';
@@ -370,49 +364,41 @@ interface iTask {
370
364
  const Task: Uses<iTask> = ({text}) => <div>{text}</div>;
371
365
  ```
372
366
 
373
- If you require no props, set it to `null`:
374
-
375
- ```tsx
376
- const Task: Uses<null> = () => <div>Hello</div>;
377
- ```
378
-
379
- `Uses` sets up type support in several places.
380
-
381
- ### Props
382
-
383
- TypeScript will ensure you pass correct props during mounting, nesting and repeating:
367
+ This ensure you pass correct props during mounting, nesting and repeating:
384
368
 
385
369
  ```
386
370
  const TaskList: Uses<iTask[]> = (tasks) => (
387
371
  <div>
388
372
  First task:
389
- <Task.nest props={tasks[0]} />
390
- <Task.repeat items={tasks.slice(1)} />
373
+ <Task props={tasks[0]} />
374
+ <Task.repeat props={tasks.slice(1)} />
391
375
  </div>
392
376
  );
393
377
 
394
378
  mount("main", TaskList, [{test: 'foo'}]);
395
379
  ```
396
380
 
397
- ### Controller
398
-
399
- The 2nd type is used for the controller, available as `ctrl` in **xargs**:
381
+ If you require no props, pass `null`:
400
382
 
401
383
  ```tsx
402
- import { Uses } from 'wallace';
384
+ const Task: Uses<null> = () => <div>Hello</div>;
385
+ ```
403
386
 
404
- class TaskController () {
405
- getName() {}
406
- }
387
+ ### Other types
388
+
389
+ You can alternatively pass a compound type which lets you specify other things:
390
+
391
+ ### Controller
407
392
 
408
- const Task: Uses<null, TaskController> = (_, { ctrl }) => (
393
+ ```tsx
394
+ const Task: Uses<{ctrl: Controller}> = (_, { ctrl }) => (
409
395
  <div>{ctrl.getName()}</div>
410
- ));
396
+ );
411
397
  ```
412
398
 
413
399
  ### Methods
414
400
 
415
- To see custom methods on `self` you'll need use an interface:
401
+ Custom methods of the component are available `self`:
416
402
 
417
403
  ```tsx
418
404
  import { Uses } from 'wallace';
@@ -421,7 +407,7 @@ interface TaskMethods () {
421
407
  getName(): string;
422
408
  }
423
409
 
424
- const Task: Uses<null, null, TaskMethods> = (_, { self }) => (
410
+ const Task: Uses<{methods: TaskMethods}> = (_, { self }) => (
425
411
  <div>{self.getName()}</div>
426
412
  ));
427
413
 
@@ -438,16 +424,23 @@ in addition to standard methods like `render`, which are already typed for you.
438
424
 
439
425
  ### Stubs
440
426
 
441
- The `props` and `controller` will pass through to functions you assign to
442
- `Component.stubs` as stubs receive the same props as the parent.
443
-
444
- But `methods` are not passed through as stubs are distinct components and will have
445
- their own methods.
427
+ You can specify the props and controller of each stub:
446
428
 
447
429
  ```tsx
448
- Task.stubs.foo = (_, { self }) => (
449
- <div>{self.getName()}</div>
450
- ));
430
+ interface ParentTypes {
431
+ ctrl: Controller;
432
+ stub: {
433
+ foo: Uses<iDay>;
434
+ bar: Uses<{props: iDay, ctrl: Controller}>;
435
+ };
436
+ }
437
+
438
+ const Parent: Uses<ParentTypes> = (_, { stub }) => (
439
+ <div>
440
+ <stub.foo props={data[0]} />
441
+ <stub.foo.repeat props={data} />
442
+ </div>
443
+ );
451
444
  ```
452
445
 
453
446
  ### Inheritance
@@ -559,60 +552,63 @@ The types (and therefore tool tips) are unaffected by these flags, and will trea
559
552
  all as being true.
560
553
 
561
554
  ---
562
- Report any issues to https://github.com/wallace-js/wallace (and please give it a ★)
555
+ Report any issues to https://github.com/wallace-js/wallace
563
556
 
564
557
  */
565
558
 
566
559
  declare module "wallace" {
560
+ type StubDefinition = {
561
+ [key: string]: ComponentFunction;
562
+ };
563
+
564
+ type StubInterface<Stubs> = {
565
+ [K in keyof Stubs]: Stubs[K] extends ComponentFunction ? Stubs[K] : never;
566
+ };
567
+
567
568
  /**
568
- * For internal use. Ensures a component can be nested in JSX, and also sets the types
569
- * for the args.
569
+ * A component function.
570
570
  */
571
571
  interface ComponentFunction<
572
572
  Props = any,
573
573
  Controller = any,
574
- Methods extends object = {}
574
+ Methods extends object = {},
575
+ Stubs extends StubDefinition = {}
575
576
  > {
576
577
  (
577
- props: Props,
578
+ props?: Props,
578
579
  xargs?: {
579
580
  ctrl: Controller;
580
581
  props: Props;
581
582
  self: ComponentInstance<Props, Controller, Methods>;
583
+ stub: StubInterface<Stubs>;
582
584
  event: Event;
583
585
  element: HTMLElement;
584
586
  }
585
587
  ): JSX.Element;
586
- nest?({
587
- props,
588
- show,
589
- hide
590
- }: {
591
- props?: Props;
592
- ctrl?: Controller;
593
- show?: boolean;
594
- hide?: boolean;
595
- }): JSX.Element;
596
588
  repeat?({
597
- items,
589
+ props,
598
590
  ctrl,
591
+ part,
599
592
  key
600
593
  }: {
601
- items: Array<Props>;
594
+ props: Array<Props>;
602
595
  ctrl?: Controller;
603
- key?: string | ((item: Props) => any);
596
+ part?: string;
597
+ key?: keyof Props | ((item: Props) => any);
604
598
  }): JSX.Element;
605
- methods?: ComponenMethods<Props, Controller> &
599
+ methods?: ComponentMethods<Props, Controller, Methods> &
606
600
  ThisType<ComponentInstance<Props, Controller, Methods>>;
607
- readonly prototype?: ComponenMethods<Props, Controller> &
608
- ThisType<ComponentInstance<Props, Controller, Methods>>;
609
- // Methods will not be available on nested component, so omit.
610
- readonly stubs?: Record<string, ComponentFunction<Props, Controller>>;
601
+ readonly prototype: ComponentInstance<Props, Controller>;
602
+ readonly stub?: Stubs;
611
603
  }
612
604
 
613
- type ComponenMethods<Props, Controller> = {
614
- render?(props: Props, ctrl: Controller): void;
615
- update?(): void;
605
+ type ComponentMethods<Props, Controller, Methods extends object = {}> = {
606
+ render?(
607
+ this: ComponentInstance<Props, Controller, Methods>,
608
+ props: Props,
609
+ ctrl: Controller
610
+ ): void;
611
+ update?(this: ComponentInstance<Props, Controller, Methods>): void;
616
612
  [key: string]: any;
617
613
  };
618
614
 
@@ -631,11 +627,16 @@ declare module "wallace" {
631
627
  *
632
628
  * See cheat sheet by hovering over the module import for more details.
633
629
  */
634
- export type Uses<
635
- Props = any,
636
- Controller = any,
637
- Methods extends object = {}
638
- > = ComponentFunction<Props, Controller, Methods>;
630
+ type Uses<T = any> = T extends CompoundTypes
631
+ ? ComponentFunction<T["props"], T["ctrl"], T["methods"], T["stub"]>
632
+ : ComponentFunction<T>;
633
+
634
+ interface CompoundTypes {
635
+ props?: any;
636
+ ctrl?: any;
637
+ methods?: object;
638
+ stub?: StubDefinition;
639
+ }
639
640
 
640
641
  export interface Part {
641
642
  update(): void;
@@ -652,9 +653,10 @@ declare module "wallace" {
652
653
  el: HTMLElement;
653
654
  props: Props;
654
655
  ctrl: Controller;
655
- ref: { [key: string]: HTMLElement | ComponentInstance };
656
+ ref: { [key: string]: HTMLElement };
656
657
  part: { [key: string]: Part };
657
658
  base: Component<Props, Controller>;
659
+ dismount(): void;
658
660
  } & Component<Props, Controller> &
659
661
  Methods;
660
662
 
@@ -793,24 +795,33 @@ declare module "wallace" {
793
795
  export function route<Props>(
794
796
  path: string,
795
797
  componentDef: ComponentFunction<Props>,
796
- converter: RouteConverter<Props>
798
+ converter?: RouteConverter<Props>,
799
+ cleanup?: RouteCleanup<Props>
797
800
  ): Route<Props>;
798
801
 
799
802
  type RouteConverter<Props> = (routedata: RouteData) => Props;
800
-
801
- export type Route<Props> = [string, ComponentFunction<Props>, RouteConverter<Props>?];
803
+ type RouteCleanup<Props> = (component: ComponentInstance<Props>) => void;
804
+
805
+ export type Route<Props> = [
806
+ string,
807
+ ComponentFunction<Props>,
808
+ RouteConverter<Props>?,
809
+ RouteCleanup<Props>?
810
+ ];
802
811
  export type RouterProps = {
803
- routes: readonly Route<unknown>[];
804
- atts?: Record<string, unknown>;
812
+ routes: readonly Route<any>[];
813
+ atts?: Record<string, any>;
805
814
  error?: (error: Error, router: Router) => void;
806
815
  };
807
816
 
808
- export class Router extends Component {
809
- static nest?({ props }: { props?: RouterProps }): JSX.Element;
817
+ export type Router = ComponentFunction<RouterProps> & {
810
818
  mount(component: Component<any>): void;
811
- }
819
+ };
820
+
821
+ export const Router: Router;
812
822
  }
813
823
 
824
+ type OptionalExpression<T> = T | boolean;
814
825
  type MustBeExpression = Exclude<any, string>;
815
826
 
816
827
  /**
@@ -839,6 +850,37 @@ interface DirectiveAttributes extends AllDomEvents {
839
850
  */
840
851
  apply?: MustBeExpression;
841
852
 
853
+ /**
854
+ * ## Wallace directive: assign
855
+ *
856
+ * Assigns the component instance to a value during `render`, typically on the props
857
+ * or the controller.
858
+ *
859
+ * You can either use an expression:
860
+ *
861
+ * ```
862
+ * const MyComponent = ({ id }, { ctrl }) => (
863
+ * <div assign={ctrl.register[id]}>
864
+ * </div>
865
+ * );
866
+ * ```
867
+ *
868
+ * Or use a qualifier, which is read as being a field on the props:
869
+ *
870
+ * ```
871
+ * const MyComponent = () => (
872
+ * <div assign:c>
873
+ * </div>
874
+ * );
875
+ * ```
876
+ *
877
+ * Be careful not to assign to a watched property which updates this component or a
878
+ * parent, as that will create an infinite loop.
879
+ *
880
+ * May only be used on the root element. Modifies the `set` method.
881
+ */
882
+ assign?: ComponentInstance;
883
+
842
884
  /**
843
885
  * ## Wallace directive: bind
844
886
  *
@@ -899,10 +941,10 @@ interface DirectiveAttributes extends AllDomEvents {
899
941
  /**
900
942
  * ## Wallace directive: ctrl
901
943
  *
902
- * Specifies alternative `ctrl` for nested or repeated components.
944
+ * Specifies alternative `ctrl` for stubs, nested or repeated components.
903
945
  *
904
946
  * ```
905
- * <MyComponent.nest ctrl={altController} />
947
+ * <MyComponent ctrl={altController} />
906
948
  * ```
907
949
  */
908
950
  ctrl?: any;
@@ -934,6 +976,50 @@ interface DirectiveAttributes extends AllDomEvents {
934
976
  */
935
977
  fixed?: string;
936
978
 
979
+ /**
980
+ * ## Wallace directive: help
981
+ *
982
+ * Does nothing other than show this tooltip.
983
+ *
984
+ * ### Directives:
985
+ *
986
+ * - `apply` runs a callback to modify an element.
987
+ * - `assign` assigns the component instance to a value.
988
+ * - `bind` updates a value when an input is changed.
989
+ * - `class:xyz` defines a set of classes to be toggled.
990
+ * - `css` shorthand for `fixed:class`.
991
+ * - `ctrl` specifies ctrl for nested/repeated components.
992
+ * - `event` changes the event which `bind` reacts to.
993
+ * - `fixed:xyz` sets a attribute from an expression at definition.
994
+ * - `hide` sets an element or component's hidden property.
995
+ * - `html` Set the element's `innnerHTML` property.
996
+ * - `if` excludes an element from the DOM.
997
+ * - `key` specifies a key for repeated components.
998
+ * - `on[EventName]` creates an event handler (note the code is copied).
999
+ * - `part:xyz` saves a reference to part of a component so it can be updated.
1000
+ * - `props` specifies props for stubs, nested or repeated components.
1001
+ * - `ref:xyz` saves a reference to an element or nested component.
1002
+ * - `show` sets and element or component's hidden property.
1003
+ * - `style:xyz` sets a specific style property.
1004
+ * - `toggle:xyz` toggles `xyz` as defined by `class:xyz` on same element, or class
1005
+ * `xyz`.
1006
+ * - `unique` can be set on components which are only used once for better performance.
1007
+ * - `watch` watches the props or the controller.
1008
+ *
1009
+ * See more by hovering on a specific directive.
1010
+ * Qualifiers like `class:danger` break the tool tip. Try `class x:danger`.
1011
+ *
1012
+ * ### Nesting syntax:
1013
+ *
1014
+ * ```
1015
+ * <MyComponent props={singleProps} />
1016
+ * <MyComponent.repeat props={arrayOfProps} />
1017
+ * <MyComponent.repeat props={arrayOfProps} key="id"/>
1018
+ * <MyComponent.repeat props={arrayOfProps} key={(i) => i.id}/>
1019
+ * ```
1020
+ */
1021
+ help?: boolean;
1022
+
937
1023
  /** ## Wallace directive: hide
938
1024
  *
939
1025
  * Set the element's `hidden` property and if true, does not render dynamic elements
@@ -955,15 +1041,6 @@ interface DirectiveAttributes extends AllDomEvents {
955
1041
  */
956
1042
  if?: MustBeExpression;
957
1043
 
958
- /**
959
- * ## Wallace directive: items
960
- *
961
- * Specifies items for repeated component. Must be an array of the props which the
962
- * nested item accepts.
963
- *
964
- */
965
- items?: MustBeExpression;
966
-
967
1044
  /** ## Wallace directive: key
968
1045
  *
969
1046
  * Specifies a key for repeated components, creating an association between the key
@@ -988,12 +1065,13 @@ interface DirectiveAttributes extends AllDomEvents {
988
1065
  * component.part.title.update();
989
1066
  * ```
990
1067
  */
991
- part?: null;
1068
+ part?: string | null;
992
1069
 
993
1070
  /**
994
1071
  * ## Wallace directive: props
995
1072
  *
996
- * Specifies props for a nested component.
1073
+ * Specifies props for a stub, nested or repeated component - in which case it means
1074
+ * an Array of the props used by the component.
997
1075
  *
998
1076
  */
999
1077
  props?: MustBeExpression;
@@ -1013,7 +1091,7 @@ interface DirectiveAttributes extends AllDomEvents {
1013
1091
  * component.ref.title.textContent = 'hello';
1014
1092
  * ```
1015
1093
  */
1016
- ref?: null;
1094
+ ref?: string | null;
1017
1095
 
1018
1096
  /** ## Wallace directive: show
1019
1097
  *
@@ -1059,1029 +1137,1046 @@ interface DirectiveAttributes extends AllDomEvents {
1059
1137
  * ## Wallace directive: unique
1060
1138
  *
1061
1139
  * Performance optimisation that can be applied to a component which is only used once.
1140
+ *
1141
+ * May only be used on the root element.
1062
1142
  */
1063
1143
  unique?: boolean;
1064
- }
1065
-
1066
- declare namespace JSX {
1067
- interface Element {}
1068
-
1069
- interface IntrinsicElements {
1070
- /**
1071
- * Nesting syntax:
1072
- * ```
1073
- * <MyComponent.nest props={singleProps} />
1074
- * <MyComponent.repeat items={arrayOfProps} />
1075
- * <MyComponent.repeat items={arrayOfProps} key="id"/>
1076
- * <MyComponent.repeat items={arrayOfProps} key={(i) => i.id}/>
1077
- * ```
1078
- *
1079
- * Available Wallace directives:
1080
- *
1081
- * - `apply` runs a callback to modify an element.
1082
- * - `bind` updates a value when an input is changed.
1083
- * - `class:xyz` defines a set of classes to be toggled.
1084
- * - `css` shorthand for `fixed:class`.
1085
- * - `ctrl` specifies ctrl for nested/repeated components.
1086
- * - `event` changes the event which `bind` reacts to.
1087
- * - `fixed:xyz` sets a attribute from an expression at definition.
1088
- * - `hide` sets an element or component's hidden property.
1089
- * - `html` Set the element's `innnerHTML` property.
1090
- * - `if` excludes an element from the DOM.
1091
- * - `key` specifies a key for repeated items.
1092
- * - `items` set items for repeated component, must be an array of props.
1093
- * - `on[EventName]` creates an event handler (note the code is copied).
1094
- * - `part:xyz` saves a reference to part of a component so it can be updated.
1095
- * - `props` specifies props for a nested components.
1096
- * - `ref:xyz` saves a reference to an element or nested component.
1097
- * - `show` sets and element or component's hidden property.
1098
- * - `style:xyz` sets a specific style property.
1099
- * - `toggle:xyz` toggles `xyz` as defined by `class:xyz` on same element, or class
1100
- * `xyz`.
1101
- * - `unique` can be set on components which are only used once for better performance.
1102
- *
1103
- * You will get more details by hovering on the directive itself, but unfortunetely
1104
- * the tool tip won't display when you use a qualifier, like `class:danger`. To see
1105
- * it you cantemporarily change it to something `class x:danger`.
1106
- */
1107
- [elemName: string]: DirectiveAttributes & Record<string, any>;
1108
- }
1109
- interface ElementClass {}
1110
- interface IntrinsicAttributes {}
1111
- interface ElementAttributesProperty {}
1112
- }
1113
1144
 
1114
- /**
1115
- * These must be individually named to obtain the JSDoc.
1116
- * They allow expressions or strings, so we don't bother enforcing type here.
1117
- */
1118
- interface AllDomEvents {
1119
- /**
1120
- * ## Wallace event handler
1121
- *
1122
- * Note the code is copied. Use xargs to access the event:
1123
- *
1124
- * ```
1125
- * const MyComponent = (_, { event }) => (
1126
- * <button onClick={clickHandler(event)} />
1127
- * );
1128
- * ```
1129
- */ onAbort?: any;
1130
- /**
1131
- * ## Wallace event handler.
1132
- *
1133
- * Use xargs to access the event:
1134
- *
1135
- * ```
1136
- * const MyComponent = (_, { event }) => (
1137
- * <button onClick={clickHandler(event)} />
1138
- * );
1139
- * ```
1140
- */ onAnimationCancel?: any;
1141
- /**
1142
- * ## Wallace event handler
1143
- *
1144
- * Note the code is copied. Use xargs to access the event:
1145
- *
1146
- * ```
1147
- * const MyComponent = (_, { event }) => (
1148
- * <button onClick={clickHandler(event)} />
1149
- * );
1150
- * ```
1151
- */ onAnimationEnd?: any;
1152
- /**
1153
- * ## Wallace event handler
1154
- *
1155
- * Note the code is copied. Use xargs to access the event:
1156
- *
1157
- * ```
1158
- * const MyComponent = (_, { event }) => (
1159
- * <button onClick={clickHandler(event)} />
1160
- * );
1161
- * ```
1162
- */ onAnimationIteration?: any;
1163
- /**
1164
- * ## Wallace event handler
1165
- *
1166
- * Note the code is copied. Use xargs to access the event:
1167
- *
1168
- * ```
1169
- * const MyComponent = (_, { event }) => (
1170
- * <button onClick={clickHandler(event)} />
1171
- * );
1172
- * ```
1173
- */ onAnimationStart?: any;
1174
- /**
1175
- * ## Wallace event handler
1176
- *
1177
- * Note the code is copied. Use xargs to access the event:
1178
- *
1179
- * ```
1180
- * const MyComponent = (_, { event }) => (
1181
- * <button onClick={clickHandler(event)} />
1182
- * );
1183
- * ```
1184
- */ onAuxClick?: any;
1185
- /**
1186
- * ## Wallace event handler
1187
- *
1188
- * Note the code is copied. Use xargs to access the event:
1189
- *
1190
- * ```
1191
- * const MyComponent = (_, { event }) => (
1192
- * <button onClick={clickHandler(event)} />
1193
- * );
1194
- * ```
1195
- */ onBeforeInput?: any;
1196
- /**
1197
- * ## Wallace event handler
1198
- *
1199
- * Note the code is copied. Use xargs to access the event:
1200
- *
1201
- * ```
1202
- * const MyComponent = (_, { event }) => (
1203
- * <button onClick={clickHandler(event)} />
1204
- * );
1205
- * ```
1206
- */ onBlur?: any;
1207
- /**
1208
- * ## Wallace event handler
1209
- *
1210
- * Note the code is copied. Use xargs to access the event:
1211
- *
1212
- * ```
1213
- * const MyComponent = (_, { event }) => (
1214
- * <button onClick={clickHandler(event)} />
1215
- * );
1216
- * ```
1217
- */ onCancel?: any;
1218
- /**
1219
- * ## Wallace event handler
1220
- *
1221
- * Note the code is copied. Use xargs to access the event:
1222
- *
1223
- * ```
1224
- * const MyComponent = (_, { event }) => (
1225
- * <button onClick={clickHandler(event)} />
1226
- * );
1227
- * ```
1228
- */ onCanPlay?: any;
1229
- /**
1230
- * ## Wallace event handler
1231
- *
1232
- * Note the code is copied. Use xargs to access the event:
1233
- *
1234
- * ```
1235
- * const MyComponent = (_, { event }) => (
1236
- * <button onClick={clickHandler(event)} />
1237
- * );
1238
- * ```
1239
- */ onCanPlayThrough?: any;
1240
- /**
1241
- * ## Wallace event handler
1242
- *
1243
- * Note the code is copied. Use xargs to access the event:
1244
- *
1245
- * ```
1246
- * const MyComponent = (_, { event }) => (
1247
- * <button onClick={clickHandler(event)} />
1248
- * );
1249
- * ```
1250
- */ onChange?: any;
1251
- /**
1252
- * ## Wallace event handler
1253
- *
1254
- * Note the code is copied. Use xargs to access the event:
1255
- *
1256
- * ```
1257
- * const MyComponent = (_, { event }) => (
1258
- * <button onClick={clickHandler(event)} />
1259
- * );
1260
- * ```
1261
- */ onClick?: any;
1262
- /**
1263
- * ## Wallace event handler
1264
- *
1265
- * Note the code is copied. Use xargs to access the event:
1266
- *
1267
- * ```
1268
- * const MyComponent = (_, { event }) => (
1269
- * <button onClick={clickHandler(event)} />
1270
- * );
1271
- * ```
1272
- */ onClose?: any;
1273
- /**
1274
- * ## Wallace event handler
1275
- *
1276
- * Note the code is copied. Use xargs to access the event:
1277
- *
1278
- * ```
1279
- * const MyComponent = (_, { event }) => (
1280
- * <button onClick={clickHandler(event)} />
1281
- * );
1282
- * ```
1283
- */ onContextMenu?: any;
1284
- /**
1285
- * ## Wallace event handler
1286
- *
1287
- * Note the code is copied. Use xargs to access the event:
1288
- *
1289
- * ```
1290
- * const MyComponent = (_, { event }) => (
1291
- * <button onClick={clickHandler(event)} />
1292
- * );
1293
- * ```
1294
- */ onCopy?: any;
1295
- /**
1296
- * ## Wallace event handler
1297
- *
1298
- * Note the code is copied. Use xargs to access the event:
1299
- *
1300
- * ```
1301
- * const MyComponent = (_, { event }) => (
1302
- * <button onClick={clickHandler(event)} />
1303
- * );
1304
- * ```
1305
- */ onCueChange?: any;
1306
- /**
1307
- * ## Wallace event handler
1308
- *
1309
- * Note the code is copied. Use xargs to access the event:
1310
- *
1311
- * ```
1312
- * const MyComponent = (_, { event }) => (
1313
- * <button onClick={clickHandler(event)} />
1314
- * );
1315
- * ```
1316
- */ onCut?: any;
1317
- /**
1318
- * ## Wallace event handler
1319
- *
1320
- * Note the code is copied. Use xargs to access the event:
1321
- *
1322
- * ```
1323
- * const MyComponent = (_, { event }) => (
1324
- * <button onClick={clickHandler(event)} />
1325
- * );
1326
- * ```
1327
- */ onDblClick?: any;
1328
- /**
1329
- * ## Wallace event handler
1330
- *
1331
- * Note the code is copied. Use xargs to access the event:
1332
- *
1333
- * ```
1334
- * const MyComponent = (_, { event }) => (
1335
- * <button onClick={clickHandler(event)} />
1336
- * );
1337
- * ```
1338
- */ onDrag?: any;
1339
- /**
1340
- * ## Wallace event handler
1341
- *
1342
- * Note the code is copied. Use xargs to access the event:
1343
- *
1344
- * ```
1345
- * const MyComponent = (_, { event }) => (
1346
- * <button onClick={clickHandler(event)} />
1347
- * );
1348
- * ```
1349
- */ onDragEnd?: any;
1350
- /**
1351
- * ## Wallace event handler
1352
- *
1353
- * Note the code is copied. Use xargs to access the event:
1354
- *
1355
- * ```
1356
- * const MyComponent = (_, { event }) => (
1357
- * <button onClick={clickHandler(event)} />
1358
- * );
1359
- * ```
1360
- */ onDragEnter?: any;
1361
- /**
1362
- * ## Wallace event handler
1363
- *
1364
- * Note the code is copied. Use xargs to access the event:
1365
- *
1366
- * ```
1367
- * const MyComponent = (_, { event }) => (
1368
- * <button onClick={clickHandler(event)} />
1369
- * );
1370
- * ```
1371
- */ onDragLeave?: any;
1372
- /**
1373
- * ## Wallace event handler
1374
- *
1375
- * Note the code is copied. Use xargs to access the event:
1376
- *
1377
- * ```
1378
- * const MyComponent = (_, { event }) => (
1379
- * <button onClick={clickHandler(event)} />
1380
- * );
1381
- * ```
1382
- */ onDragOver?: any;
1383
1145
  /**
1384
- * ## Wallace event handler
1146
+ * ## Wallace directive: watch
1385
1147
  *
1386
- * Note the code is copied. Use xargs to access the event:
1148
+ * Wraps the props in a `watch` call which updates the component by overriding the
1149
+ * `set` method:
1387
1150
  *
1388
1151
  * ```
1389
- * const MyComponent = (_, { event }) => (
1390
- * <button onClick={clickHandler(event)} />
1391
- * );
1392
- * ```
1393
- */ onDragStart?: any;
1394
- /**
1395
- * ## Wallace event handler
1396
- *
1397
- * Note the code is copied. Use xargs to access the event:
1398
- *
1399
- * ```
1400
- * const MyComponent = (_, { event }) => (
1401
- * <button onClick={clickHandler(event)} />
1402
- * );
1152
+ * function set(props, ctrl) {
1153
+ * this.props = watch(props, () => this.update());
1154
+ * this.ctrl = ctrl;
1155
+ * }
1403
1156
  * ```
1404
- */ onDrop?: any;
1405
- /**
1406
- * ## Wallace event handler
1407
1157
  *
1408
- * Note the code is copied. Use xargs to access the event:
1158
+ * You can provide a different callback to `watch`:
1409
1159
  *
1410
1160
  * ```
1411
- * const MyComponent = (_, { event }) => (
1412
- * <button onClick={clickHandler(event)} />
1161
+ * const MyComponent = () => (
1162
+ * <div watch={(target, key, value) => foo()}></div>
1413
1163
  * );
1414
1164
  * ```
1415
- */ onDurationChange?: any;
1416
- /**
1417
- * ## Wallace event handler
1418
1165
  *
1419
- * Note the code is copied. Use xargs to access the event:
1166
+ * For more complex use cases, import the `watch` function and use it in an overriden
1167
+ * `render` method.
1420
1168
  *
1421
- * ```
1422
- * const MyComponent = (_, { event }) => (
1423
- * <button onClick={clickHandler(event)} />
1424
- * );
1425
- * ```
1426
- */ onEmptied?: any;
1169
+ * May only be used on the root element. Modifies the `set` method.
1170
+ */
1171
+ watch?: OptionalExpression<CallableFunction>;
1172
+ }
1173
+
1174
+ // This makes this a module, which is needed to declare global, which is needed to make
1175
+ // LibraryManagedAttributes work.
1176
+ export {};
1177
+
1178
+ type NativeIntrinsicElements = {
1179
+ [K in keyof HTMLElementTagNameMap]: DirectiveAttributes & {
1180
+ style?: string;
1181
+ class?: string;
1182
+ [attr: string]: any;
1183
+ };
1184
+ };
1185
+
1186
+ // WARNING - check that your changes here don't break standard html autocomplete
1187
+ // in JSX. The following should autocomplete button and allow style:
1188
+ //
1189
+ // <button style="width:20px" >
1190
+
1191
+ declare global {
1192
+ namespace JSX {
1193
+ // This allows <Foo props={x} if={y} />
1194
+ type Wrapper<Props> = Props | { props: Props; if?: boolean; part?: string };
1195
+
1196
+ type LibraryManagedAttributes<C, P> =
1197
+ C extends ComponentFunction<infer Props, any, any, any> ? Wrapper<Props> : P;
1198
+
1199
+ interface IntrinsicElements extends NativeIntrinsicElements {
1200
+ [elemName: string]: DirectiveAttributes & Record<string, any>;
1201
+ }
1202
+ interface Element {}
1203
+ interface ElementClass {}
1204
+ interface IntrinsicAttributes {}
1205
+ interface ElementAttributesProperty {}
1206
+ }
1207
+
1427
1208
  /**
1428
- * ## Wallace event handler
1429
- *
1430
- * Note the code is copied. Use xargs to access the event:
1431
- *
1432
- * ```
1433
- * const MyComponent = (_, { event }) => (
1434
- * <button onClick={clickHandler(event)} />
1435
- * );
1436
- * ```
1437
- */ onEnded?: any;
1438
- /**
1439
- * ## Wallace event handler
1440
- *
1441
- * Note the code is copied. Use xargs to access the event:
1442
- *
1443
- * ```
1444
- * const MyComponent = (_, { event }) => (
1445
- * <button onClick={clickHandler(event)} />
1446
- * );
1447
- * ```
1448
- */ onError?: any;
1449
- /**
1450
- * ## Wallace event handler
1451
- *
1452
- * Note the code is copied. Use xargs to access the event:
1453
- *
1454
- * ```
1455
- * const MyComponent = (_, { event }) => (
1456
- * <button onClick={clickHandler(event)} />
1457
- * );
1458
- * ```
1459
- */ onFocus?: any;
1460
- /**
1461
- * ## Wallace event handler
1462
- *
1463
- * Note the code is copied. Use xargs to access the event:
1464
- *
1465
- * ```
1466
- * const MyComponent = (_, { event }) => (
1467
- * <button onClick={clickHandler(event)} />
1468
- * );
1469
- * ```
1470
- */ onFormData?: any;
1471
- /**
1472
- * ## Wallace event handler
1473
- *
1474
- * Note the code is copied. Use xargs to access the event:
1475
- *
1476
- * ```
1477
- * const MyComponent = (_, { event }) => (
1478
- * <button onClick={clickHandler(event)} />
1479
- * );
1480
- * ```
1481
- */ onGotPointerCapture?: any;
1482
- /**
1483
- * ## Wallace event handler
1484
- *
1485
- * Note the code is copied. Use xargs to access the event:
1486
- *
1487
- * ```
1488
- * const MyComponent = (_, { event }) => (
1489
- * <button onClick={clickHandler(event)} />
1490
- * );
1491
- * ```
1492
- */ onInput?: any;
1493
- /**
1494
- * ## Wallace event handler
1495
- *
1496
- * Note the code is copied. Use xargs to access the event:
1497
- *
1498
- * ```
1499
- * const MyComponent = (_, { event }) => (
1500
- * <button onClick={clickHandler(event)} />
1501
- * );
1502
- * ```
1503
- */ onInvalid?: any;
1504
- /**
1505
- * ## Wallace event handler
1506
- *
1507
- * Note the code is copied. Use xargs to access the event:
1508
- *
1509
- * ```
1510
- * const MyComponent = (_, { event }) => (
1511
- * <button onClick={clickHandler(event)} />
1512
- * );
1513
- * ```
1514
- */ onKeyDown?: any;
1515
- /**
1516
- * ## Wallace event handler
1517
- *
1518
- * Note the code is copied. Use xargs to access the event:
1519
- *
1520
- * ```
1521
- * const MyComponent = (_, { event }) => (
1522
- * <button onClick={clickHandler(event)} />
1523
- * );
1524
- * ```
1525
- */ onKeyPress?: any;
1526
- /**
1527
- * ## Wallace event handler
1528
- *
1529
- * Note the code is copied. Use xargs to access the event:
1530
- *
1531
- * ```
1532
- * const MyComponent = (_, { event }) => (
1533
- * <button onClick={clickHandler(event)} />
1534
- * );
1535
- * ```
1536
- */ onKeyUp?: any;
1537
- /**
1538
- * ## Wallace event handler
1539
- *
1540
- * Note the code is copied. Use xargs to access the event:
1541
- *
1542
- * ```
1543
- * const MyComponent = (_, { event }) => (
1544
- * <button onClick={clickHandler(event)} />
1545
- * );
1546
- * ```
1547
- */ onLoad?: any;
1548
- /**
1549
- * ## Wallace event handler
1550
- *
1551
- * Note the code is copied. Use xargs to access the event:
1552
- *
1553
- * ```
1554
- * const MyComponent = (_, { event }) => (
1555
- * <button onClick={clickHandler(event)} />
1556
- * );
1557
- * ```
1558
- */ onLoadedData?: any;
1559
- /**
1560
- * ## Wallace event handler
1561
- *
1562
- * Note the code is copied. Use xargs to access the event:
1563
- *
1564
- * ```
1565
- * const MyComponent = (_, { event }) => (
1566
- * <button onClick={clickHandler(event)} />
1567
- * );
1568
- * ```
1569
- */ onLoadedMetadata?: any;
1570
- /**
1571
- * ## Wallace event handler
1572
- *
1573
- * Note the code is copied. Use xargs to access the event:
1574
- *
1575
- * ```
1576
- * const MyComponent = (_, { event }) => (
1577
- * <button onClick={clickHandler(event)} />
1578
- * );
1579
- * ```
1580
- */ onLoadStart?: any;
1581
- /**
1582
- * ## Wallace event handler
1583
- *
1584
- * Note the code is copied. Use xargs to access the event:
1585
- *
1586
- * ```
1587
- * const MyComponent = (_, { event }) => (
1588
- * <button onClick={clickHandler(event)} />
1589
- * );
1590
- * ```
1591
- */ onLostPointerCapture?: any;
1592
- /**
1593
- * ## Wallace event handler
1594
- *
1595
- * Note the code is copied. Use xargs to access the event:
1596
- *
1597
- * ```
1598
- * const MyComponent = (_, { event }) => (
1599
- * <button onClick={clickHandler(event)} />
1600
- * );
1601
- * ```
1602
- */ onMouseDown?: any;
1603
- /**
1604
- * ## Wallace event handler
1605
- *
1606
- * Note the code is copied. Use xargs to access the event:
1607
- *
1608
- * ```
1609
- * const MyComponent = (_, { event }) => (
1610
- * <button onClick={clickHandler(event)} />
1611
- * );
1612
- * ```
1613
- */ onMouseEnter?: any;
1614
- /**
1615
- * ## Wallace event handler
1616
- *
1617
- * Note the code is copied. Use xargs to access the event:
1618
- *
1619
- * ```
1620
- * const MyComponent = (_, { event }) => (
1621
- * <button onClick={clickHandler(event)} />
1622
- * );
1623
- * ```
1624
- */ onMouseLeave?: any;
1625
- /**
1626
- * ## Wallace event handler
1627
- *
1628
- * Note the code is copied. Use xargs to access the event:
1629
- *
1630
- * ```
1631
- * const MyComponent = (_, { event }) => (
1632
- * <button onClick={clickHandler(event)} />
1633
- * );
1634
- * ```
1635
- */ onMouseMove?: any;
1636
- /**
1637
- * ## Wallace event handler
1638
- *
1639
- * Note the code is copied. Use xargs to access the event:
1640
- *
1641
- * ```
1642
- * const MyComponent = (_, { event }) => (
1643
- * <button onClick={clickHandler(event)} />
1644
- * );
1645
- * ```
1646
- */ onMouseOut?: any;
1647
- /**
1648
- * ## Wallace event handler
1649
- *
1650
- * Note the code is copied. Use xargs to access the event:
1651
- *
1652
- * ```
1653
- * const MyComponent = (_, { event }) => (
1654
- * <button onClick={clickHandler(event)} />
1655
- * );
1656
- * ```
1657
- */ onMouseOver?: any;
1658
- /**
1659
- * ## Wallace event handler
1660
- *
1661
- * Note the code is copied. Use xargs to access the event:
1662
- *
1663
- * ```
1664
- * const MyComponent = (_, { event }) => (
1665
- * <button onClick={clickHandler(event)} />
1666
- * );
1667
- * ```
1668
- */ onMouseUp?: any;
1669
- /**
1670
- * ## Wallace event handler
1671
- *
1672
- * Note the code is copied. Use xargs to access the event:
1673
- *
1674
- * ```
1675
- * const MyComponent = (_, { event }) => (
1676
- * <button onClick={clickHandler(event)} />
1677
- * );
1678
- * ```
1679
- */ onPaste?: any;
1680
- /**
1681
- * ## Wallace event handler
1682
- *
1683
- * Note the code is copied. Use xargs to access the event:
1684
- *
1685
- * ```
1686
- * const MyComponent = (_, { event }) => (
1687
- * <button onClick={clickHandler(event)} />
1688
- * );
1689
- * ```
1690
- */ onPause?: any;
1691
- /**
1692
- * ## Wallace event handler
1693
- *
1694
- * Note the code is copied. Use xargs to access the event:
1695
- *
1696
- * ```
1697
- * const MyComponent = (_, { event }) => (
1698
- * <button onClick={clickHandler(event)} />
1699
- * );
1700
- * ```
1701
- */ onPlay?: any;
1702
- /**
1703
- * ## Wallace event handler
1704
- *
1705
- * Note the code is copied. Use xargs to access the event:
1706
- *
1707
- * ```
1708
- * const MyComponent = (_, { event }) => (
1709
- * <button onClick={clickHandler(event)} />
1710
- * );
1711
- * ```
1712
- */ onPlaying?: any;
1713
- /**
1714
- * ## Wallace event handler
1715
- *
1716
- * Note the code is copied. Use xargs to access the event:
1717
- *
1718
- * ```
1719
- * const MyComponent = (_, { event }) => (
1720
- * <button onClick={clickHandler(event)} />
1721
- * );
1722
- * ```
1723
- */ onPointerCancel?: any;
1724
- /**
1725
- * ## Wallace event handler
1726
- *
1727
- * Note the code is copied. Use xargs to access the event:
1728
- *
1729
- * ```
1730
- * const MyComponent = (_, { event }) => (
1731
- * <button onClick={clickHandler(event)} />
1732
- * );
1733
- * ```
1734
- */ onPointerDown?: any;
1735
- /**
1736
- * ## Wallace event handler
1737
- *
1738
- * Note the code is copied. Use xargs to access the event:
1739
- *
1740
- * ```
1741
- * const MyComponent = (_, { event }) => (
1742
- * <button onClick={clickHandler(event)} />
1743
- * );
1744
- * ```
1745
- */ onPointerEnter?: any;
1746
- /**
1747
- * ## Wallace event handler
1748
- *
1749
- * Note the code is copied. Use xargs to access the event:
1750
- *
1751
- * ```
1752
- * const MyComponent = (_, { event }) => (
1753
- * <button onClick={clickHandler(event)} />
1754
- * );
1755
- * ```
1756
- */ onPointerLeave?: any;
1757
- /**
1758
- * ## Wallace event handler
1759
- *
1760
- * Note the code is copied. Use xargs to access the event:
1761
- *
1762
- * ```
1763
- * const MyComponent = (_, { event }) => (
1764
- * <button onClick={clickHandler(event)} />
1765
- * );
1766
- * ```
1767
- */ onPointerMove?: any;
1768
- /**
1769
- * ## Wallace event handler
1770
- *
1771
- * Note the code is copied. Use xargs to access the event:
1772
- *
1773
- * ```
1774
- * const MyComponent = (_, { event }) => (
1775
- * <button onClick={clickHandler(event)} />
1776
- * );
1777
- * ```
1778
- */ onPointerOut?: any;
1779
- /**
1780
- * ## Wallace event handler
1781
- *
1782
- * Note the code is copied. Use xargs to access the event:
1783
- *
1784
- * ```
1785
- * const MyComponent = (_, { event }) => (
1786
- * <button onClick={clickHandler(event)} />
1787
- * );
1788
- * ```
1789
- */ onPointerOver?: any;
1790
- /**
1791
- * ## Wallace event handler
1792
- *
1793
- * Note the code is copied. Use xargs to access the event:
1794
- *
1795
- * ```
1796
- * const MyComponent = (_, { event }) => (
1797
- * <button onClick={clickHandler(event)} />
1798
- * );
1799
- * ```
1800
- */ onPointerUp?: any;
1801
- /**
1802
- * ## Wallace event handler
1803
- *
1804
- * Note the code is copied. Use xargs to access the event:
1805
- *
1806
- * ```
1807
- * const MyComponent = (_, { event }) => (
1808
- * <button onClick={clickHandler(event)} />
1809
- * );
1810
- * ```
1811
- */ onProgress?: any;
1812
- /**
1813
- * ## Wallace event handler
1814
- *
1815
- * Note the code is copied. Use xargs to access the event:
1816
- *
1817
- * ```
1818
- * const MyComponent = (_, { event }) => (
1819
- * <button onClick={clickHandler(event)} />
1820
- * );
1821
- * ```
1822
- */ onRateChange?: any;
1823
- /**
1824
- * ## Wallace event handler
1825
- *
1826
- * Note the code is copied. Use xargs to access the event:
1827
- *
1828
- * ```
1829
- * const MyComponent = (_, { event }) => (
1830
- * <button onClick={clickHandler(event)} />
1831
- * );
1832
- * ```
1833
- */ onReset?: any;
1834
- /**
1835
- * ## Wallace event handler
1836
- *
1837
- * Note the code is copied. Use xargs to access the event:
1838
- *
1839
- * ```
1840
- * const MyComponent = (_, { event }) => (
1841
- * <button onClick={clickHandler(event)} />
1842
- * );
1843
- * ```
1844
- */ onResize?: any;
1845
- /**
1846
- * ## Wallace event handler
1847
- *
1848
- * Note the code is copied. Use xargs to access the event:
1849
- *
1850
- * ```
1851
- * const MyComponent = (_, { event }) => (
1852
- * <button onClick={clickHandler(event)} />
1853
- * );
1854
- * ```
1855
- */ onScroll?: any;
1856
- /**
1857
- * ## Wallace event handler
1858
- *
1859
- * Note the code is copied. Use xargs to access the event:
1860
- *
1861
- * ```
1862
- * const MyComponent = (_, { event }) => (
1863
- * <button onClick={clickHandler(event)} />
1864
- * );
1865
- * ```
1866
- */ onSecurityPolicyViolation?: any;
1867
- /**
1868
- * ## Wallace event handler
1869
- *
1870
- * Note the code is copied. Use xargs to access the event:
1871
- *
1872
- * ```
1873
- * const MyComponent = (_, { event }) => (
1874
- * <button onClick={clickHandler(event)} />
1875
- * );
1876
- * ```
1877
- */ onSeeked?: any;
1878
- /**
1879
- * ## Wallace event handler
1880
- *
1881
- * Note the code is copied. Use xargs to access the event:
1882
- *
1883
- * ```
1884
- * const MyComponent = (_, { event }) => (
1885
- * <button onClick={clickHandler(event)} />
1886
- * );
1887
- * ```
1888
- */ onSeeking?: any;
1889
- /**
1890
- * ## Wallace event handler
1891
- *
1892
- * Note the code is copied. Use xargs to access the event:
1893
- *
1894
- * ```
1895
- * const MyComponent = (_, { event }) => (
1896
- * <button onClick={clickHandler(event)} />
1897
- * );
1898
- * ```
1899
- */ onSelect?: any;
1900
- /**
1901
- * ## Wallace event handler
1902
- *
1903
- * Note the code is copied. Use xargs to access the event:
1904
- *
1905
- * ```
1906
- * const MyComponent = (_, { event }) => (
1907
- * <button onClick={clickHandler(event)} />
1908
- * );
1909
- * ```
1910
- */ onSlotChange?: any;
1911
- /**
1912
- * ## Wallace event handler
1913
- *
1914
- * Note the code is copied. Use xargs to access the event:
1915
- *
1916
- * ```
1917
- * const MyComponent = (_, { event }) => (
1918
- * <button onClick={clickHandler(event)} />
1919
- * );
1920
- * ```
1921
- */ onStalled?: any;
1922
- /**
1923
- * ## Wallace event handler
1924
- *
1925
- * Note the code is copied. Use xargs to access the event:
1926
- *
1927
- * ```
1928
- * const MyComponent = (_, { event }) => (
1929
- * <button onClick={clickHandler(event)} />
1930
- * );
1931
- * ```
1932
- */ onSubmit?: any;
1933
- /**
1934
- * ## Wallace event handler
1935
- *
1936
- * Note the code is copied. Use xargs to access the event:
1937
- *
1938
- * ```
1939
- * const MyComponent = (_, { event }) => (
1940
- * <button onClick={clickHandler(event)} />
1941
- * );
1942
- * ```
1943
- */ onSuspend?: any;
1944
- /**
1945
- * ## Wallace event handler
1946
- *
1947
- * Note the code is copied. Use xargs to access the event:
1948
- *
1949
- * ```
1950
- * const MyComponent = (_, { event }) => (
1951
- * <button onClick={clickHandler(event)} />
1952
- * );
1953
- * ```
1954
- */ onTimeUpdate?: any;
1955
- /**
1956
- * ## Wallace event handler
1957
- *
1958
- * Note the code is copied. Use xargs to access the event:
1959
- *
1960
- * ```
1961
- * const MyComponent = (_, { event }) => (
1962
- * <button onClick={clickHandler(event)} />
1963
- * );
1964
- * ```
1965
- */ onToggle?: any;
1966
- /**
1967
- * ## Wallace event handler
1968
- *
1969
- * Note the code is copied. Use xargs to access the event:
1970
- *
1971
- * ```
1972
- * const MyComponent = (_, { event }) => (
1973
- * <button onClick={clickHandler(event)} />
1974
- * );
1975
- * ```
1976
- */ onTouchCancel?: any;
1977
- /**
1978
- * ## Wallace event handler
1979
- *
1980
- * Note the code is copied. Use xargs to access the event:
1981
- *
1982
- * ```
1983
- * const MyComponent = (_, { event }) => (
1984
- * <button onClick={clickHandler(event)} />
1985
- * );
1986
- * ```
1987
- */ onTouchEnd?: any;
1988
- /**
1989
- * ## Wallace event handler
1990
- *
1991
- * Note the code is copied. Use xargs to access the event:
1992
- *
1993
- * ```
1994
- * const MyComponent = (_, { event }) => (
1995
- * <button onClick={clickHandler(event)} />
1996
- * );
1997
- * ```
1998
- */ onTouchMove?: any;
1999
- /**
2000
- * ## Wallace event handler
2001
- *
2002
- * Note the code is copied. Use xargs to access the event:
2003
- *
2004
- * ```
2005
- * const MyComponent = (_, { event }) => (
2006
- * <button onClick={clickHandler(event)} />
2007
- * );
2008
- * ```
2009
- */ onTouchStart?: any;
2010
- /**
2011
- * ## Wallace event handler
2012
- *
2013
- * Note the code is copied. Use xargs to access the event:
2014
- *
2015
- * ```
2016
- * const MyComponent = (_, { event }) => (
2017
- * <button onClick={clickHandler(event)} />
2018
- * );
2019
- * ```
2020
- */ onTransitionCancel?: any;
2021
- /**
2022
- * ## Wallace event handler
2023
- *
2024
- * Note the code is copied. Use xargs to access the event:
2025
- *
2026
- * ```
2027
- * const MyComponent = (_, { event }) => (
2028
- * <button onClick={clickHandler(event)} />
2029
- * );
2030
- * ```
2031
- */ onTransitionEnd?: any;
2032
- /**
2033
- * ## Wallace event handler
2034
- *
2035
- * Note the code is copied. Use xargs to access the event:
2036
- *
2037
- * ```
2038
- * const MyComponent = (_, { event }) => (
2039
- * <button onClick={clickHandler(event)} />
2040
- * );
2041
- * ```
2042
- */ onTransitionRun?: any;
2043
- /**
2044
- * ## Wallace event handler
2045
- *
2046
- * Note the code is copied. Use xargs to access the event:
2047
- *
2048
- * ```
2049
- * const MyComponent = (_, { event }) => (
2050
- * <button onClick={clickHandler(event)} />
2051
- * );
2052
- * ```
2053
- */ onTransitionStart?: any;
2054
- /**
2055
- * ## Wallace event handler
2056
- *
2057
- * Note the code is copied. Use xargs to access the event:
2058
- *
2059
- * ```
2060
- * const MyComponent = (_, { event }) => (
2061
- * <button onClick={clickHandler(event)} />
2062
- * );
2063
- * ```
2064
- */ onVolumeChange?: any;
2065
- /**
2066
- * ## Wallace event handler
2067
- *
2068
- * Note the code is copied. Use xargs to access the event:
2069
- *
2070
- * ```
2071
- * const MyComponent = (_, { event }) => (
2072
- * <button onClick={clickHandler(event)} />
2073
- * );
2074
- * ```
2075
- */ onWaiting?: any;
2076
- /**
2077
- * ## Wallace event handler
2078
- *
2079
- * Note the code is copied. Use xargs to access the event:
2080
- *
2081
- * ```
2082
- * const MyComponent = (_, { event }) => (
2083
- * <button onClick={clickHandler(event)} />
2084
- * );
2085
- * ```
2086
- */ onWheel?: any;
1209
+ * These must be individually named to obtain the JSDoc.
1210
+ * They allow expressions or strings, so we don't bother enforcing type here.
1211
+ */
1212
+ interface AllDomEvents {
1213
+ /**
1214
+ * ## Wallace event handler
1215
+ *
1216
+ * Note the code is copied. Use xargs to access the event:
1217
+ *
1218
+ * ```
1219
+ * const MyComponent = (_, { event }) => (
1220
+ * <button onClick={clickHandler(event)} />
1221
+ * );
1222
+ * ```
1223
+ */ onAbort?: any;
1224
+ /**
1225
+ * ## Wallace event handler.
1226
+ *
1227
+ * Use xargs to access the event:
1228
+ *
1229
+ * ```
1230
+ * const MyComponent = (_, { event }) => (
1231
+ * <button onClick={clickHandler(event)} />
1232
+ * );
1233
+ * ```
1234
+ */ onAnimationCancel?: any;
1235
+ /**
1236
+ * ## Wallace event handler
1237
+ *
1238
+ * Note the code is copied. Use xargs to access the event:
1239
+ *
1240
+ * ```
1241
+ * const MyComponent = (_, { event }) => (
1242
+ * <button onClick={clickHandler(event)} />
1243
+ * );
1244
+ * ```
1245
+ */ onAnimationEnd?: any;
1246
+ /**
1247
+ * ## Wallace event handler
1248
+ *
1249
+ * Note the code is copied. Use xargs to access the event:
1250
+ *
1251
+ * ```
1252
+ * const MyComponent = (_, { event }) => (
1253
+ * <button onClick={clickHandler(event)} />
1254
+ * );
1255
+ * ```
1256
+ */ onAnimationIteration?: any;
1257
+ /**
1258
+ * ## Wallace event handler
1259
+ *
1260
+ * Note the code is copied. Use xargs to access the event:
1261
+ *
1262
+ * ```
1263
+ * const MyComponent = (_, { event }) => (
1264
+ * <button onClick={clickHandler(event)} />
1265
+ * );
1266
+ * ```
1267
+ */ onAnimationStart?: any;
1268
+ /**
1269
+ * ## Wallace event handler
1270
+ *
1271
+ * Note the code is copied. Use xargs to access the event:
1272
+ *
1273
+ * ```
1274
+ * const MyComponent = (_, { event }) => (
1275
+ * <button onClick={clickHandler(event)} />
1276
+ * );
1277
+ * ```
1278
+ */ onAuxClick?: any;
1279
+ /**
1280
+ * ## Wallace event handler
1281
+ *
1282
+ * Note the code is copied. Use xargs to access the event:
1283
+ *
1284
+ * ```
1285
+ * const MyComponent = (_, { event }) => (
1286
+ * <button onClick={clickHandler(event)} />
1287
+ * );
1288
+ * ```
1289
+ */ onBeforeInput?: any;
1290
+ /**
1291
+ * ## Wallace event handler
1292
+ *
1293
+ * Note the code is copied. Use xargs to access the event:
1294
+ *
1295
+ * ```
1296
+ * const MyComponent = (_, { event }) => (
1297
+ * <button onClick={clickHandler(event)} />
1298
+ * );
1299
+ * ```
1300
+ */ onBlur?: any;
1301
+ /**
1302
+ * ## Wallace event handler
1303
+ *
1304
+ * Note the code is copied. Use xargs to access the event:
1305
+ *
1306
+ * ```
1307
+ * const MyComponent = (_, { event }) => (
1308
+ * <button onClick={clickHandler(event)} />
1309
+ * );
1310
+ * ```
1311
+ */ onCancel?: any;
1312
+ /**
1313
+ * ## Wallace event handler
1314
+ *
1315
+ * Note the code is copied. Use xargs to access the event:
1316
+ *
1317
+ * ```
1318
+ * const MyComponent = (_, { event }) => (
1319
+ * <button onClick={clickHandler(event)} />
1320
+ * );
1321
+ * ```
1322
+ */ onCanPlay?: any;
1323
+ /**
1324
+ * ## Wallace event handler
1325
+ *
1326
+ * Note the code is copied. Use xargs to access the event:
1327
+ *
1328
+ * ```
1329
+ * const MyComponent = (_, { event }) => (
1330
+ * <button onClick={clickHandler(event)} />
1331
+ * );
1332
+ * ```
1333
+ */ onCanPlayThrough?: any;
1334
+ /**
1335
+ * ## Wallace event handler
1336
+ *
1337
+ * Note the code is copied. Use xargs to access the event:
1338
+ *
1339
+ * ```
1340
+ * const MyComponent = (_, { event }) => (
1341
+ * <button onClick={clickHandler(event)} />
1342
+ * );
1343
+ * ```
1344
+ */ onChange?: any;
1345
+ /**
1346
+ * ## Wallace event handler
1347
+ *
1348
+ * Note the code is copied. Use xargs to access the event:
1349
+ *
1350
+ * ```
1351
+ * const MyComponent = (_, { event }) => (
1352
+ * <button onClick={clickHandler(event)} />
1353
+ * );
1354
+ * ```
1355
+ */ onClick?: any;
1356
+ /**
1357
+ * ## Wallace event handler
1358
+ *
1359
+ * Note the code is copied. Use xargs to access the event:
1360
+ *
1361
+ * ```
1362
+ * const MyComponent = (_, { event }) => (
1363
+ * <button onClick={clickHandler(event)} />
1364
+ * );
1365
+ * ```
1366
+ */ onClose?: any;
1367
+ /**
1368
+ * ## Wallace event handler
1369
+ *
1370
+ * Note the code is copied. Use xargs to access the event:
1371
+ *
1372
+ * ```
1373
+ * const MyComponent = (_, { event }) => (
1374
+ * <button onClick={clickHandler(event)} />
1375
+ * );
1376
+ * ```
1377
+ */ onContextMenu?: any;
1378
+ /**
1379
+ * ## Wallace event handler
1380
+ *
1381
+ * Note the code is copied. Use xargs to access the event:
1382
+ *
1383
+ * ```
1384
+ * const MyComponent = (_, { event }) => (
1385
+ * <button onClick={clickHandler(event)} />
1386
+ * );
1387
+ * ```
1388
+ */ onCopy?: any;
1389
+ /**
1390
+ * ## Wallace event handler
1391
+ *
1392
+ * Note the code is copied. Use xargs to access the event:
1393
+ *
1394
+ * ```
1395
+ * const MyComponent = (_, { event }) => (
1396
+ * <button onClick={clickHandler(event)} />
1397
+ * );
1398
+ * ```
1399
+ */ onCueChange?: any;
1400
+ /**
1401
+ * ## Wallace event handler
1402
+ *
1403
+ * Note the code is copied. Use xargs to access the event:
1404
+ *
1405
+ * ```
1406
+ * const MyComponent = (_, { event }) => (
1407
+ * <button onClick={clickHandler(event)} />
1408
+ * );
1409
+ * ```
1410
+ */ onCut?: any;
1411
+ /**
1412
+ * ## Wallace event handler
1413
+ *
1414
+ * Note the code is copied. Use xargs to access the event:
1415
+ *
1416
+ * ```
1417
+ * const MyComponent = (_, { event }) => (
1418
+ * <button onClick={clickHandler(event)} />
1419
+ * );
1420
+ * ```
1421
+ */ onDblClick?: any;
1422
+ /**
1423
+ * ## Wallace event handler
1424
+ *
1425
+ * Note the code is copied. Use xargs to access the event:
1426
+ *
1427
+ * ```
1428
+ * const MyComponent = (_, { event }) => (
1429
+ * <button onClick={clickHandler(event)} />
1430
+ * );
1431
+ * ```
1432
+ */ onDrag?: any;
1433
+ /**
1434
+ * ## Wallace event handler
1435
+ *
1436
+ * Note the code is copied. Use xargs to access the event:
1437
+ *
1438
+ * ```
1439
+ * const MyComponent = (_, { event }) => (
1440
+ * <button onClick={clickHandler(event)} />
1441
+ * );
1442
+ * ```
1443
+ */ onDragEnd?: any;
1444
+ /**
1445
+ * ## Wallace event handler
1446
+ *
1447
+ * Note the code is copied. Use xargs to access the event:
1448
+ *
1449
+ * ```
1450
+ * const MyComponent = (_, { event }) => (
1451
+ * <button onClick={clickHandler(event)} />
1452
+ * );
1453
+ * ```
1454
+ */ onDragEnter?: any;
1455
+ /**
1456
+ * ## Wallace event handler
1457
+ *
1458
+ * Note the code is copied. Use xargs to access the event:
1459
+ *
1460
+ * ```
1461
+ * const MyComponent = (_, { event }) => (
1462
+ * <button onClick={clickHandler(event)} />
1463
+ * );
1464
+ * ```
1465
+ */ onDragLeave?: any;
1466
+ /**
1467
+ * ## Wallace event handler
1468
+ *
1469
+ * Note the code is copied. Use xargs to access the event:
1470
+ *
1471
+ * ```
1472
+ * const MyComponent = (_, { event }) => (
1473
+ * <button onClick={clickHandler(event)} />
1474
+ * );
1475
+ * ```
1476
+ */ onDragOver?: any;
1477
+ /**
1478
+ * ## Wallace event handler
1479
+ *
1480
+ * Note the code is copied. Use xargs to access the event:
1481
+ *
1482
+ * ```
1483
+ * const MyComponent = (_, { event }) => (
1484
+ * <button onClick={clickHandler(event)} />
1485
+ * );
1486
+ * ```
1487
+ */ onDragStart?: any;
1488
+ /**
1489
+ * ## Wallace event handler
1490
+ *
1491
+ * Note the code is copied. Use xargs to access the event:
1492
+ *
1493
+ * ```
1494
+ * const MyComponent = (_, { event }) => (
1495
+ * <button onClick={clickHandler(event)} />
1496
+ * );
1497
+ * ```
1498
+ */ onDrop?: any;
1499
+ /**
1500
+ * ## Wallace event handler
1501
+ *
1502
+ * Note the code is copied. Use xargs to access the event:
1503
+ *
1504
+ * ```
1505
+ * const MyComponent = (_, { event }) => (
1506
+ * <button onClick={clickHandler(event)} />
1507
+ * );
1508
+ * ```
1509
+ */ onDurationChange?: any;
1510
+ /**
1511
+ * ## Wallace event handler
1512
+ *
1513
+ * Note the code is copied. Use xargs to access the event:
1514
+ *
1515
+ * ```
1516
+ * const MyComponent = (_, { event }) => (
1517
+ * <button onClick={clickHandler(event)} />
1518
+ * );
1519
+ * ```
1520
+ */ onEmptied?: any;
1521
+ /**
1522
+ * ## Wallace event handler
1523
+ *
1524
+ * Note the code is copied. Use xargs to access the event:
1525
+ *
1526
+ * ```
1527
+ * const MyComponent = (_, { event }) => (
1528
+ * <button onClick={clickHandler(event)} />
1529
+ * );
1530
+ * ```
1531
+ */ onEnded?: any;
1532
+ /**
1533
+ * ## Wallace event handler
1534
+ *
1535
+ * Note the code is copied. Use xargs to access the event:
1536
+ *
1537
+ * ```
1538
+ * const MyComponent = (_, { event }) => (
1539
+ * <button onClick={clickHandler(event)} />
1540
+ * );
1541
+ * ```
1542
+ */ onError?: any;
1543
+ /**
1544
+ * ## Wallace event handler
1545
+ *
1546
+ * Note the code is copied. Use xargs to access the event:
1547
+ *
1548
+ * ```
1549
+ * const MyComponent = (_, { event }) => (
1550
+ * <button onClick={clickHandler(event)} />
1551
+ * );
1552
+ * ```
1553
+ */ onFocus?: any;
1554
+ /**
1555
+ * ## Wallace event handler
1556
+ *
1557
+ * Note the code is copied. Use xargs to access the event:
1558
+ *
1559
+ * ```
1560
+ * const MyComponent = (_, { event }) => (
1561
+ * <button onClick={clickHandler(event)} />
1562
+ * );
1563
+ * ```
1564
+ */ onFormData?: any;
1565
+ /**
1566
+ * ## Wallace event handler
1567
+ *
1568
+ * Note the code is copied. Use xargs to access the event:
1569
+ *
1570
+ * ```
1571
+ * const MyComponent = (_, { event }) => (
1572
+ * <button onClick={clickHandler(event)} />
1573
+ * );
1574
+ * ```
1575
+ */ onGotPointerCapture?: any;
1576
+ /**
1577
+ * ## Wallace event handler
1578
+ *
1579
+ * Note the code is copied. Use xargs to access the event:
1580
+ *
1581
+ * ```
1582
+ * const MyComponent = (_, { event }) => (
1583
+ * <button onClick={clickHandler(event)} />
1584
+ * );
1585
+ * ```
1586
+ */ onInput?: any;
1587
+ /**
1588
+ * ## Wallace event handler
1589
+ *
1590
+ * Note the code is copied. Use xargs to access the event:
1591
+ *
1592
+ * ```
1593
+ * const MyComponent = (_, { event }) => (
1594
+ * <button onClick={clickHandler(event)} />
1595
+ * );
1596
+ * ```
1597
+ */ onInvalid?: any;
1598
+ /**
1599
+ * ## Wallace event handler
1600
+ *
1601
+ * Note the code is copied. Use xargs to access the event:
1602
+ *
1603
+ * ```
1604
+ * const MyComponent = (_, { event }) => (
1605
+ * <button onClick={clickHandler(event)} />
1606
+ * );
1607
+ * ```
1608
+ */ onKeyDown?: any;
1609
+ /**
1610
+ * ## Wallace event handler
1611
+ *
1612
+ * Note the code is copied. Use xargs to access the event:
1613
+ *
1614
+ * ```
1615
+ * const MyComponent = (_, { event }) => (
1616
+ * <button onClick={clickHandler(event)} />
1617
+ * );
1618
+ * ```
1619
+ */ onKeyPress?: any;
1620
+ /**
1621
+ * ## Wallace event handler
1622
+ *
1623
+ * Note the code is copied. Use xargs to access the event:
1624
+ *
1625
+ * ```
1626
+ * const MyComponent = (_, { event }) => (
1627
+ * <button onClick={clickHandler(event)} />
1628
+ * );
1629
+ * ```
1630
+ */ onKeyUp?: any;
1631
+ /**
1632
+ * ## Wallace event handler
1633
+ *
1634
+ * Note the code is copied. Use xargs to access the event:
1635
+ *
1636
+ * ```
1637
+ * const MyComponent = (_, { event }) => (
1638
+ * <button onClick={clickHandler(event)} />
1639
+ * );
1640
+ * ```
1641
+ */ onLoad?: any;
1642
+ /**
1643
+ * ## Wallace event handler
1644
+ *
1645
+ * Note the code is copied. Use xargs to access the event:
1646
+ *
1647
+ * ```
1648
+ * const MyComponent = (_, { event }) => (
1649
+ * <button onClick={clickHandler(event)} />
1650
+ * );
1651
+ * ```
1652
+ */ onLoadedData?: any;
1653
+ /**
1654
+ * ## Wallace event handler
1655
+ *
1656
+ * Note the code is copied. Use xargs to access the event:
1657
+ *
1658
+ * ```
1659
+ * const MyComponent = (_, { event }) => (
1660
+ * <button onClick={clickHandler(event)} />
1661
+ * );
1662
+ * ```
1663
+ */ onLoadedMetadata?: any;
1664
+ /**
1665
+ * ## Wallace event handler
1666
+ *
1667
+ * Note the code is copied. Use xargs to access the event:
1668
+ *
1669
+ * ```
1670
+ * const MyComponent = (_, { event }) => (
1671
+ * <button onClick={clickHandler(event)} />
1672
+ * );
1673
+ * ```
1674
+ */ onLoadStart?: any;
1675
+ /**
1676
+ * ## Wallace event handler
1677
+ *
1678
+ * Note the code is copied. Use xargs to access the event:
1679
+ *
1680
+ * ```
1681
+ * const MyComponent = (_, { event }) => (
1682
+ * <button onClick={clickHandler(event)} />
1683
+ * );
1684
+ * ```
1685
+ */ onLostPointerCapture?: any;
1686
+ /**
1687
+ * ## Wallace event handler
1688
+ *
1689
+ * Note the code is copied. Use xargs to access the event:
1690
+ *
1691
+ * ```
1692
+ * const MyComponent = (_, { event }) => (
1693
+ * <button onClick={clickHandler(event)} />
1694
+ * );
1695
+ * ```
1696
+ */ onMouseDown?: any;
1697
+ /**
1698
+ * ## Wallace event handler
1699
+ *
1700
+ * Note the code is copied. Use xargs to access the event:
1701
+ *
1702
+ * ```
1703
+ * const MyComponent = (_, { event }) => (
1704
+ * <button onClick={clickHandler(event)} />
1705
+ * );
1706
+ * ```
1707
+ */ onMouseEnter?: any;
1708
+ /**
1709
+ * ## Wallace event handler
1710
+ *
1711
+ * Note the code is copied. Use xargs to access the event:
1712
+ *
1713
+ * ```
1714
+ * const MyComponent = (_, { event }) => (
1715
+ * <button onClick={clickHandler(event)} />
1716
+ * );
1717
+ * ```
1718
+ */ onMouseLeave?: any;
1719
+ /**
1720
+ * ## Wallace event handler
1721
+ *
1722
+ * Note the code is copied. Use xargs to access the event:
1723
+ *
1724
+ * ```
1725
+ * const MyComponent = (_, { event }) => (
1726
+ * <button onClick={clickHandler(event)} />
1727
+ * );
1728
+ * ```
1729
+ */ onMouseMove?: any;
1730
+ /**
1731
+ * ## Wallace event handler
1732
+ *
1733
+ * Note the code is copied. Use xargs to access the event:
1734
+ *
1735
+ * ```
1736
+ * const MyComponent = (_, { event }) => (
1737
+ * <button onClick={clickHandler(event)} />
1738
+ * );
1739
+ * ```
1740
+ */ onMouseOut?: any;
1741
+ /**
1742
+ * ## Wallace event handler
1743
+ *
1744
+ * Note the code is copied. Use xargs to access the event:
1745
+ *
1746
+ * ```
1747
+ * const MyComponent = (_, { event }) => (
1748
+ * <button onClick={clickHandler(event)} />
1749
+ * );
1750
+ * ```
1751
+ */ onMouseOver?: any;
1752
+ /**
1753
+ * ## Wallace event handler
1754
+ *
1755
+ * Note the code is copied. Use xargs to access the event:
1756
+ *
1757
+ * ```
1758
+ * const MyComponent = (_, { event }) => (
1759
+ * <button onClick={clickHandler(event)} />
1760
+ * );
1761
+ * ```
1762
+ */ onMouseUp?: any;
1763
+ /**
1764
+ * ## Wallace event handler
1765
+ *
1766
+ * Note the code is copied. Use xargs to access the event:
1767
+ *
1768
+ * ```
1769
+ * const MyComponent = (_, { event }) => (
1770
+ * <button onClick={clickHandler(event)} />
1771
+ * );
1772
+ * ```
1773
+ */ onPaste?: any;
1774
+ /**
1775
+ * ## Wallace event handler
1776
+ *
1777
+ * Note the code is copied. Use xargs to access the event:
1778
+ *
1779
+ * ```
1780
+ * const MyComponent = (_, { event }) => (
1781
+ * <button onClick={clickHandler(event)} />
1782
+ * );
1783
+ * ```
1784
+ */ onPause?: any;
1785
+ /**
1786
+ * ## Wallace event handler
1787
+ *
1788
+ * Note the code is copied. Use xargs to access the event:
1789
+ *
1790
+ * ```
1791
+ * const MyComponent = (_, { event }) => (
1792
+ * <button onClick={clickHandler(event)} />
1793
+ * );
1794
+ * ```
1795
+ */ onPlay?: any;
1796
+ /**
1797
+ * ## Wallace event handler
1798
+ *
1799
+ * Note the code is copied. Use xargs to access the event:
1800
+ *
1801
+ * ```
1802
+ * const MyComponent = (_, { event }) => (
1803
+ * <button onClick={clickHandler(event)} />
1804
+ * );
1805
+ * ```
1806
+ */ onPlaying?: any;
1807
+ /**
1808
+ * ## Wallace event handler
1809
+ *
1810
+ * Note the code is copied. Use xargs to access the event:
1811
+ *
1812
+ * ```
1813
+ * const MyComponent = (_, { event }) => (
1814
+ * <button onClick={clickHandler(event)} />
1815
+ * );
1816
+ * ```
1817
+ */ onPointerCancel?: any;
1818
+ /**
1819
+ * ## Wallace event handler
1820
+ *
1821
+ * Note the code is copied. Use xargs to access the event:
1822
+ *
1823
+ * ```
1824
+ * const MyComponent = (_, { event }) => (
1825
+ * <button onClick={clickHandler(event)} />
1826
+ * );
1827
+ * ```
1828
+ */ onPointerDown?: any;
1829
+ /**
1830
+ * ## Wallace event handler
1831
+ *
1832
+ * Note the code is copied. Use xargs to access the event:
1833
+ *
1834
+ * ```
1835
+ * const MyComponent = (_, { event }) => (
1836
+ * <button onClick={clickHandler(event)} />
1837
+ * );
1838
+ * ```
1839
+ */ onPointerEnter?: any;
1840
+ /**
1841
+ * ## Wallace event handler
1842
+ *
1843
+ * Note the code is copied. Use xargs to access the event:
1844
+ *
1845
+ * ```
1846
+ * const MyComponent = (_, { event }) => (
1847
+ * <button onClick={clickHandler(event)} />
1848
+ * );
1849
+ * ```
1850
+ */ onPointerLeave?: any;
1851
+ /**
1852
+ * ## Wallace event handler
1853
+ *
1854
+ * Note the code is copied. Use xargs to access the event:
1855
+ *
1856
+ * ```
1857
+ * const MyComponent = (_, { event }) => (
1858
+ * <button onClick={clickHandler(event)} />
1859
+ * );
1860
+ * ```
1861
+ */ onPointerMove?: any;
1862
+ /**
1863
+ * ## Wallace event handler
1864
+ *
1865
+ * Note the code is copied. Use xargs to access the event:
1866
+ *
1867
+ * ```
1868
+ * const MyComponent = (_, { event }) => (
1869
+ * <button onClick={clickHandler(event)} />
1870
+ * );
1871
+ * ```
1872
+ */ onPointerOut?: any;
1873
+ /**
1874
+ * ## Wallace event handler
1875
+ *
1876
+ * Note the code is copied. Use xargs to access the event:
1877
+ *
1878
+ * ```
1879
+ * const MyComponent = (_, { event }) => (
1880
+ * <button onClick={clickHandler(event)} />
1881
+ * );
1882
+ * ```
1883
+ */ onPointerOver?: any;
1884
+ /**
1885
+ * ## Wallace event handler
1886
+ *
1887
+ * Note the code is copied. Use xargs to access the event:
1888
+ *
1889
+ * ```
1890
+ * const MyComponent = (_, { event }) => (
1891
+ * <button onClick={clickHandler(event)} />
1892
+ * );
1893
+ * ```
1894
+ */ onPointerUp?: any;
1895
+ /**
1896
+ * ## Wallace event handler
1897
+ *
1898
+ * Note the code is copied. Use xargs to access the event:
1899
+ *
1900
+ * ```
1901
+ * const MyComponent = (_, { event }) => (
1902
+ * <button onClick={clickHandler(event)} />
1903
+ * );
1904
+ * ```
1905
+ */ onProgress?: any;
1906
+ /**
1907
+ * ## Wallace event handler
1908
+ *
1909
+ * Note the code is copied. Use xargs to access the event:
1910
+ *
1911
+ * ```
1912
+ * const MyComponent = (_, { event }) => (
1913
+ * <button onClick={clickHandler(event)} />
1914
+ * );
1915
+ * ```
1916
+ */ onRateChange?: any;
1917
+ /**
1918
+ * ## Wallace event handler
1919
+ *
1920
+ * Note the code is copied. Use xargs to access the event:
1921
+ *
1922
+ * ```
1923
+ * const MyComponent = (_, { event }) => (
1924
+ * <button onClick={clickHandler(event)} />
1925
+ * );
1926
+ * ```
1927
+ */ onReset?: any;
1928
+ /**
1929
+ * ## Wallace event handler
1930
+ *
1931
+ * Note the code is copied. Use xargs to access the event:
1932
+ *
1933
+ * ```
1934
+ * const MyComponent = (_, { event }) => (
1935
+ * <button onClick={clickHandler(event)} />
1936
+ * );
1937
+ * ```
1938
+ */ onResize?: any;
1939
+ /**
1940
+ * ## Wallace event handler
1941
+ *
1942
+ * Note the code is copied. Use xargs to access the event:
1943
+ *
1944
+ * ```
1945
+ * const MyComponent = (_, { event }) => (
1946
+ * <button onClick={clickHandler(event)} />
1947
+ * );
1948
+ * ```
1949
+ */ onScroll?: any;
1950
+ /**
1951
+ * ## Wallace event handler
1952
+ *
1953
+ * Note the code is copied. Use xargs to access the event:
1954
+ *
1955
+ * ```
1956
+ * const MyComponent = (_, { event }) => (
1957
+ * <button onClick={clickHandler(event)} />
1958
+ * );
1959
+ * ```
1960
+ */ onSecurityPolicyViolation?: any;
1961
+ /**
1962
+ * ## Wallace event handler
1963
+ *
1964
+ * Note the code is copied. Use xargs to access the event:
1965
+ *
1966
+ * ```
1967
+ * const MyComponent = (_, { event }) => (
1968
+ * <button onClick={clickHandler(event)} />
1969
+ * );
1970
+ * ```
1971
+ */ onSeeked?: any;
1972
+ /**
1973
+ * ## Wallace event handler
1974
+ *
1975
+ * Note the code is copied. Use xargs to access the event:
1976
+ *
1977
+ * ```
1978
+ * const MyComponent = (_, { event }) => (
1979
+ * <button onClick={clickHandler(event)} />
1980
+ * );
1981
+ * ```
1982
+ */ onSeeking?: any;
1983
+ /**
1984
+ * ## Wallace event handler
1985
+ *
1986
+ * Note the code is copied. Use xargs to access the event:
1987
+ *
1988
+ * ```
1989
+ * const MyComponent = (_, { event }) => (
1990
+ * <button onClick={clickHandler(event)} />
1991
+ * );
1992
+ * ```
1993
+ */ onSelect?: any;
1994
+ /**
1995
+ * ## Wallace event handler
1996
+ *
1997
+ * Note the code is copied. Use xargs to access the event:
1998
+ *
1999
+ * ```
2000
+ * const MyComponent = (_, { event }) => (
2001
+ * <button onClick={clickHandler(event)} />
2002
+ * );
2003
+ * ```
2004
+ */ onSlotChange?: any;
2005
+ /**
2006
+ * ## Wallace event handler
2007
+ *
2008
+ * Note the code is copied. Use xargs to access the event:
2009
+ *
2010
+ * ```
2011
+ * const MyComponent = (_, { event }) => (
2012
+ * <button onClick={clickHandler(event)} />
2013
+ * );
2014
+ * ```
2015
+ */ onStalled?: any;
2016
+ /**
2017
+ * ## Wallace event handler
2018
+ *
2019
+ * Note the code is copied. Use xargs to access the event:
2020
+ *
2021
+ * ```
2022
+ * const MyComponent = (_, { event }) => (
2023
+ * <button onClick={clickHandler(event)} />
2024
+ * );
2025
+ * ```
2026
+ */ onSubmit?: any;
2027
+ /**
2028
+ * ## Wallace event handler
2029
+ *
2030
+ * Note the code is copied. Use xargs to access the event:
2031
+ *
2032
+ * ```
2033
+ * const MyComponent = (_, { event }) => (
2034
+ * <button onClick={clickHandler(event)} />
2035
+ * );
2036
+ * ```
2037
+ */ onSuspend?: any;
2038
+ /**
2039
+ * ## Wallace event handler
2040
+ *
2041
+ * Note the code is copied. Use xargs to access the event:
2042
+ *
2043
+ * ```
2044
+ * const MyComponent = (_, { event }) => (
2045
+ * <button onClick={clickHandler(event)} />
2046
+ * );
2047
+ * ```
2048
+ */ onTimeUpdate?: any;
2049
+ /**
2050
+ * ## Wallace event handler
2051
+ *
2052
+ * Note the code is copied. Use xargs to access the event:
2053
+ *
2054
+ * ```
2055
+ * const MyComponent = (_, { event }) => (
2056
+ * <button onClick={clickHandler(event)} />
2057
+ * );
2058
+ * ```
2059
+ */ onToggle?: any;
2060
+ /**
2061
+ * ## Wallace event handler
2062
+ *
2063
+ * Note the code is copied. Use xargs to access the event:
2064
+ *
2065
+ * ```
2066
+ * const MyComponent = (_, { event }) => (
2067
+ * <button onClick={clickHandler(event)} />
2068
+ * );
2069
+ * ```
2070
+ */ onTouchCancel?: any;
2071
+ /**
2072
+ * ## Wallace event handler
2073
+ *
2074
+ * Note the code is copied. Use xargs to access the event:
2075
+ *
2076
+ * ```
2077
+ * const MyComponent = (_, { event }) => (
2078
+ * <button onClick={clickHandler(event)} />
2079
+ * );
2080
+ * ```
2081
+ */ onTouchEnd?: any;
2082
+ /**
2083
+ * ## Wallace event handler
2084
+ *
2085
+ * Note the code is copied. Use xargs to access the event:
2086
+ *
2087
+ * ```
2088
+ * const MyComponent = (_, { event }) => (
2089
+ * <button onClick={clickHandler(event)} />
2090
+ * );
2091
+ * ```
2092
+ */ onTouchMove?: any;
2093
+ /**
2094
+ * ## Wallace event handler
2095
+ *
2096
+ * Note the code is copied. Use xargs to access the event:
2097
+ *
2098
+ * ```
2099
+ * const MyComponent = (_, { event }) => (
2100
+ * <button onClick={clickHandler(event)} />
2101
+ * );
2102
+ * ```
2103
+ */ onTouchStart?: any;
2104
+ /**
2105
+ * ## Wallace event handler
2106
+ *
2107
+ * Note the code is copied. Use xargs to access the event:
2108
+ *
2109
+ * ```
2110
+ * const MyComponent = (_, { event }) => (
2111
+ * <button onClick={clickHandler(event)} />
2112
+ * );
2113
+ * ```
2114
+ */ onTransitionCancel?: any;
2115
+ /**
2116
+ * ## Wallace event handler
2117
+ *
2118
+ * Note the code is copied. Use xargs to access the event:
2119
+ *
2120
+ * ```
2121
+ * const MyComponent = (_, { event }) => (
2122
+ * <button onClick={clickHandler(event)} />
2123
+ * );
2124
+ * ```
2125
+ */ onTransitionEnd?: any;
2126
+ /**
2127
+ * ## Wallace event handler
2128
+ *
2129
+ * Note the code is copied. Use xargs to access the event:
2130
+ *
2131
+ * ```
2132
+ * const MyComponent = (_, { event }) => (
2133
+ * <button onClick={clickHandler(event)} />
2134
+ * );
2135
+ * ```
2136
+ */ onTransitionRun?: any;
2137
+ /**
2138
+ * ## Wallace event handler
2139
+ *
2140
+ * Note the code is copied. Use xargs to access the event:
2141
+ *
2142
+ * ```
2143
+ * const MyComponent = (_, { event }) => (
2144
+ * <button onClick={clickHandler(event)} />
2145
+ * );
2146
+ * ```
2147
+ */ onTransitionStart?: any;
2148
+ /**
2149
+ * ## Wallace event handler
2150
+ *
2151
+ * Note the code is copied. Use xargs to access the event:
2152
+ *
2153
+ * ```
2154
+ * const MyComponent = (_, { event }) => (
2155
+ * <button onClick={clickHandler(event)} />
2156
+ * );
2157
+ * ```
2158
+ */ onVolumeChange?: any;
2159
+ /**
2160
+ * ## Wallace event handler
2161
+ *
2162
+ * Note the code is copied. Use xargs to access the event:
2163
+ *
2164
+ * ```
2165
+ * const MyComponent = (_, { event }) => (
2166
+ * <button onClick={clickHandler(event)} />
2167
+ * );
2168
+ * ```
2169
+ */ onWaiting?: any;
2170
+ /**
2171
+ * ## Wallace event handler
2172
+ *
2173
+ * Note the code is copied. Use xargs to access the event:
2174
+ *
2175
+ * ```
2176
+ * const MyComponent = (_, { event }) => (
2177
+ * <button onClick={clickHandler(event)} />
2178
+ * );
2179
+ * ```
2180
+ */ onWheel?: any;
2181
+ }
2087
2182
  }