marko 5.38.17 → 5.38.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/tags-html.d.ts +105 -27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.38.17",
3
+ "version": "5.38.19",
4
4
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
5
5
  "keywords": [
6
6
  "front-end",
@@ -70,8 +70,8 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@babel/runtime": "^7.28.2",
73
- "@marko/compiler": "^5.39.48",
74
- "@marko/runtime-tags": "^6.0.139",
73
+ "@marko/compiler": "^5.39.49",
74
+ "@marko/runtime-tags": "^6.0.141",
75
75
  "app-module-path": "^2.2.0",
76
76
  "argly": "^1.2.0",
77
77
  "browser-refresh-client": "1.1.4",
package/tags-html.d.ts CHANGED
@@ -382,36 +382,36 @@ declare global {
382
382
  * Fires after printing the document.
383
383
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-afterprint
384
384
  */
385
- onAfterprint?: AttrEventHandler<Event, HTMLBodyElement>;
386
- "on-afterprint"?: this["onAfterprint"];
385
+ onAfterPrint?: AttrEventHandler<Event, HTMLBodyElement>;
386
+ "on-afterprint"?: this["onAfterPrint"];
387
387
 
388
388
  /**
389
389
  * Fires before printing the document.
390
390
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-beforeprint
391
391
  */
392
- onBeforeprint?: AttrEventHandler<Event, HTMLBodyElement>;
393
- "on-beforeprint"?: this["onBeforeprint"];
392
+ onBeforePrint?: AttrEventHandler<Event, HTMLBodyElement>;
393
+ "on-beforeprint"?: this["onBeforePrint"];
394
394
 
395
395
  /**
396
396
  * Fired when the page is about to be unloaded, in case the page would like to show a warning prompt.
397
397
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-beforeunload
398
398
  */
399
- onBeforeunload?: AttrEventHandler<BeforeUnloadEvent, HTMLBodyElement>;
400
- "on-beforeunload"?: this["onBeforeunload"];
399
+ onBeforeUnload?: AttrEventHandler<BeforeUnloadEvent, HTMLBodyElement>;
400
+ "on-beforeunload"?: this["onBeforeUnload"];
401
401
 
402
402
  /**
403
403
  * Fired when the fragment part of the document's URL changes.
404
404
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-hashchange
405
405
  */
406
- onHashchange?: AttrEventHandler<HashChangeEvent, HTMLBodyElement>;
407
- "on-hashchange"?: this["onHashchange"];
406
+ onHashChange?: AttrEventHandler<HashChangeEvent, HTMLBodyElement>;
407
+ "on-hashchange"?: this["onHashChange"];
408
408
 
409
409
  /**
410
410
  * Fired when the user's preferred languages change.
411
411
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-languagechange
412
412
  */
413
- onLanguagechange?: AttrEventHandler<Event, HTMLBodyElement>;
414
- "on-languagechange"?: this["onLanguagechange"];
413
+ onLanguageChange?: AttrEventHandler<Event, HTMLBodyElement>;
414
+ "on-languagechange"?: this["onLanguageChange"];
415
415
 
416
416
  /**
417
417
  * Fired when the window receives a message.
@@ -424,8 +424,8 @@ declare global {
424
424
  * Fired when the window receives an error message.
425
425
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-messageerror
426
426
  */
427
- onMessageerror?: AttrEventHandler<MessageEvent, HTMLBodyElement>;
428
- "on-messageerror"?: this["onMessageerror"];
427
+ onMessageError?: AttrEventHandler<MessageEvent, HTMLBodyElement>;
428
+ "on-messageerror"?: this["onMessageError"];
429
429
 
430
430
  /**
431
431
  * Fired when the network connection is lost.
@@ -445,29 +445,29 @@ declare global {
445
445
  * Fired when the page's session history entry stops being the active entry.
446
446
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-pagehide
447
447
  */
448
- onPagehide?: AttrEventHandler<PageTransitionEvent, HTMLBodyElement>;
449
- "on-pagehide"?: this["onPagehide"];
448
+ onPageHide?: AttrEventHandler<PageTransitionEvent, HTMLBodyElement>;
449
+ "on-pagehide"?: this["onPageHide"];
450
450
 
451
451
  /**
452
452
  * Fired when the page's session history entry becomes the active entry.
453
453
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-pageshow
454
454
  */
455
- onPageshow?: AttrEventHandler<PageTransitionEvent, HTMLBodyElement>;
456
- "on-pageshow"?: this["onPageshow"];
455
+ onPageShow?: AttrEventHandler<PageTransitionEvent, HTMLBodyElement>;
456
+ "on-pageshow"?: this["onPageShow"];
457
457
 
458
458
  /**
459
459
  * Fired when the window's session history is popped.
460
460
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-popstate
461
461
  */
462
- onPopstate?: AttrEventHandler<PopStateEvent, HTMLBodyElement>;
463
- "on-popstate"?: this["onPopstate"];
462
+ onPopState?: AttrEventHandler<PopStateEvent, HTMLBodyElement>;
463
+ "on-popstate"?: this["onPopState"];
464
464
 
465
465
  /**
466
466
  * Fires when a previously-unhandled promise rejection becomes handled.
467
467
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-rejectionhandled
468
468
  */
469
- onRejectionhandled?: AttrEventHandler<Event, HTMLBodyElement>;
470
- "on-rejectionhandled"?: this["onRejectionhandled"];
469
+ onRejectionHandled?: AttrEventHandler<Event, HTMLBodyElement>;
470
+ "on-rejectionhandled"?: this["onRejectionHandled"];
471
471
 
472
472
  /**
473
473
  * Fired when the corresponding localStorage or sessionStorage storage areas change.
@@ -696,6 +696,13 @@ declare global {
696
696
  * @see https://html.spec.whatwg.org/multipage/interactive-elements.html#attr-details-open
697
697
  */
698
698
  open?: AttrBoolean;
699
+
700
+ // NON STANDARD
701
+ /**
702
+ * Called whenever a the `open` attribute has changed.
703
+ * When `openChange` is a function, `open` becomes controlled.
704
+ */
705
+ openChange?: AttrMissing | ((open: boolean) => void);
699
706
  }
700
707
  interface Dfn extends HTMLAttributes<HTMLElement> {}
701
708
  interface Dialog extends HTMLAttributes<HTMLDialogElement> {
@@ -704,6 +711,13 @@ declare global {
704
711
  * @see https://html.spec.whatwg.org/multipage/interactive-elements.html#attr-dialog-open
705
712
  */
706
713
  open?: AttrBoolean;
714
+
715
+ // NON STANDARD
716
+ /**
717
+ * Called whenever a the `open` attribute has changed.
718
+ * When `openChange` is a function, `open` becomes controlled.
719
+ */
720
+ openChange?: AttrMissing | ((open: boolean) => void);
707
721
  }
708
722
  interface Div extends HTMLAttributes<HTMLDivElement> {}
709
723
  interface DL extends HTMLAttributes<HTMLDListElement> {}
@@ -831,8 +845,8 @@ declare global {
831
845
  * Fired at a form element when it is constructing the entry list
832
846
  * @see https://html.spec.whatwg.org/multipage/indices.html#event-formdata
833
847
  */
834
- onFormdata?: AttrEventHandler<FormDataEvent, HTMLFormElement>;
835
- "on-formdata"?: this["onFormdata"];
848
+ onFormData?: AttrEventHandler<FormDataEvent, HTMLFormElement>;
849
+ "on-formdata"?: this["onFormData"];
836
850
 
837
851
  /**
838
852
  * Fired when a form is submitted, either by user interaction or through a script.
@@ -1279,6 +1293,41 @@ declare global {
1279
1293
  * @see https://html.spec.whatwg.org/multipage/embedded-content-other.html#attr-dim-width
1280
1294
  */
1281
1295
  width?: AttrStringOrNumber;
1296
+
1297
+ // NON STANDARD
1298
+
1299
+ /**
1300
+ * Called whenever a the `checked` property of an `input` has changed.
1301
+ * When `checkedChange` is a function, `checked` becomes controlled.
1302
+ * This means the `checked` property is synchronized instead of the `checked` attribute.
1303
+ */
1304
+ checkedChange?: AttrMissing | ((checked: boolean) => void);
1305
+
1306
+ /**
1307
+ * Used to synchronize the `checked` attribute with a `value` attribute used across related `input type="checkbox"` and `input type="radio"` controls.
1308
+ * When `checkedValue` is a string, the `checked` attribute will be set to a boolean that is `true` if the `checkedValue` is the same as the `value`.
1309
+ * When `checkedValue` is an array of strings, the `checked` attribute will be set to a boolean that is `true` if the `checkedValue` array includes the `value`.
1310
+ * If the `checkedValue` is falsy then `checked` is always `false`.
1311
+ */
1312
+ checkedValue?: AttrMissing | string | string[];
1313
+ /**
1314
+ * Called whenever a `input type="checkbox"` or `input type="radio"` using the `checkedValue` attribute has changed.
1315
+ * When `checkedValueChange` is a function, `checked` becomes controlled.
1316
+ * This means the `checked` property is synchronized instead of the `checked` attribute.
1317
+ */
1318
+ checkedValueChange?:
1319
+ | AttrMissing
1320
+ | ((
1321
+ /** Note this is hack that allows you to work with the value as both a string and a string[] without needing generics */
1322
+ checkedValue: string & string[],
1323
+ ) => void);
1324
+
1325
+ /**
1326
+ * Called whenever a the `value` property of an `input` has changed.
1327
+ * When `valueChange` is a function, `value` becomes controlled. This means
1328
+ * This means the `value` property is synchronized instead of the `value` attribute.
1329
+ */
1330
+ valueChange?: AttrMissing | ((value: string) => void);
1282
1331
  }
1283
1332
 
1284
1333
  interface Ins extends HTMLAttributes<HTMLModElement> {
@@ -1841,6 +1890,26 @@ declare global {
1841
1890
  * @see https://html.spec.whatwg.org/multipage/form-elements.html#attr-select-size
1842
1891
  */
1843
1892
  size?: AttrStringOrNumber;
1893
+
1894
+ // NON STANDARD
1895
+
1896
+ /**
1897
+ * When the `value` is a string, nested `<option>` tags with a matching `value` attribute become `selected`.
1898
+ * When the `value` is an array of strings, nested `<option>` tags with a `value` contained within the array are `selected.
1899
+ */
1900
+ value?: AttrMissing | string | string[];
1901
+
1902
+ /**
1903
+ * Called whenever a the `value` property of the `select` has changed.
1904
+ * When `valueChange` is a function, `value` becomes controlled. This means
1905
+ * This means the `value` property is synchronized instead of the `value` attribute.
1906
+ */
1907
+ valueChange?:
1908
+ | AttrMissing
1909
+ | ((
1910
+ /** Note this is hack that allows you to work with the value as both a string and a string[] without needing generics */
1911
+ value: string & string[],
1912
+ ) => void);
1844
1913
  }
1845
1914
 
1846
1915
  interface Slot extends HTMLAttributes<HTMLSlotElement> {
@@ -2088,17 +2157,26 @@ declare global {
2088
2157
  */
2089
2158
  rows?: AttrStringOrNumber;
2090
2159
 
2091
- /**
2092
- * (Non-standard). Represents the current value of the <textarea> element.
2093
- */
2094
- value?: AttrString;
2095
-
2096
2160
  /**
2097
2161
  * Controls the line wrapping behavior of the <textarea> element.
2098
2162
  * "hard" inserts line breaks in the submitted value, "soft" doesn't, and "off" disables wrapping.
2099
2163
  * @see https://html.spec.whatwg.org/multipage/form-elements.html#attr-textarea-wrap
2100
2164
  */
2101
2165
  wrap?: AttrMissing | "hard" | "soft" | "off";
2166
+
2167
+ // NON STANDARD
2168
+
2169
+ /**
2170
+ * Represents the current value of the `textarea` element.
2171
+ */
2172
+ value?: AttrMissing | string;
2173
+
2174
+ /**
2175
+ * Called whenever a the `value` property of the `textarea` has changed.
2176
+ * When `valueChange` is a function, `value` becomes controlled. This means
2177
+ * This means the `value` property is synchronized instead of the `value` attribute.
2178
+ */
2179
+ valueChange?: AttrMissing | ((value: string) => void);
2102
2180
  }
2103
2181
 
2104
2182
  interface TFoot extends HTMLAttributes<HTMLTableSectionElement> {