marko 5.38.36 → 5.38.38

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.
@@ -112,6 +112,11 @@ const entryBuilder = exports.entryBuilder = {
112
112
 
113
113
  const { watchFiles, imports, lassoDeps, body } = state;
114
114
 
115
+ if (fileMeta.implicitSplitComponent) {
116
+ state.hasComponents = true;
117
+ return;
118
+ }
119
+
115
120
  if (fileMeta.component) {
116
121
  state.hasComponents = true;
117
122
 
@@ -175,7 +180,7 @@ const entryBuilder = exports.entryBuilder = {
175
180
  }
176
181
  }
177
182
 
178
- if (fileMeta.component) {
183
+ if (fileMeta.component && !fileMeta.implicitSplitComponent) {
179
184
  // Split component
180
185
  const splitComponentId = _compiler.types.identifier(
181
186
  `component_${state.splitComponentIndex++}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.38.36",
3
+ "version": "5.38.38",
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,7 +70,7 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@marko/compiler": "^5.39.62",
73
- "@marko/runtime-tags": "^6.0.164",
73
+ "@marko/runtime-tags": "^6.0.169",
74
74
  "app-module-path": "^2.2.0",
75
75
  "argly": "^1.2.0",
76
76
  "browser-refresh-client": "1.1.4",
@@ -112,6 +112,11 @@ export const entryBuilder = {
112
112
 
113
113
  const { watchFiles, imports, lassoDeps, body } = state;
114
114
 
115
+ if (fileMeta.implicitSplitComponent) {
116
+ state.hasComponents = true;
117
+ return;
118
+ }
119
+
115
120
  if (fileMeta.component) {
116
121
  state.hasComponents = true;
117
122
 
@@ -175,7 +180,7 @@ export const entryBuilder = {
175
180
  }
176
181
  }
177
182
 
178
- if (fileMeta.component) {
183
+ if (fileMeta.component && !fileMeta.implicitSplitComponent) {
179
184
  // Split component
180
185
  const splitComponentId = t.identifier(
181
186
  `component_${state.splitComponentIndex++}`,
package/tags-html.d.ts CHANGED
@@ -141,7 +141,7 @@ declare global {
141
141
  * Specifies the URL of the linked resource.
142
142
  * @see https://html.spec.whatwg.org/multipage/links.html#attr-hyperlink-href
143
143
  */
144
- href?: AttrString;
144
+ href?: AttrHref;
145
145
 
146
146
  /**
147
147
  * Specifies the language of the linked resource.
@@ -199,7 +199,7 @@ declare global {
199
199
  * Specifies the MIME type of the linked resource.
200
200
  * @see https://html.spec.whatwg.org/multipage/links.html#attr-hyperlink-type
201
201
  */
202
- type?: AttrString;
202
+ type?: AttrMimeType;
203
203
 
204
204
  /** @deprecated */
205
205
  charset?: AttrString;
@@ -287,7 +287,7 @@ declare global {
287
287
  nohref?: AttrString;
288
288
 
289
289
  /** @deprecated */
290
- type?: AttrString;
290
+ type?: AttrMimeType;
291
291
  }
292
292
  interface Article extends HTMLAttributes<HTMLElement> {}
293
293
  interface Aside extends HTMLAttributes<HTMLElement> {}
@@ -350,7 +350,7 @@ declare global {
350
350
  * Specifies the URL of the audio resource.
351
351
  * @see https://html.spec.whatwg.org/multipage/media.html#attr-media-src
352
352
  */
353
- src?: AttrString;
353
+ src?: AttrSrc;
354
354
  }
355
355
 
356
356
  interface B extends HTMLAttributes<HTMLElement> {}
@@ -359,7 +359,7 @@ declare global {
359
359
  * Specifies the base URL for resolving relative URLs within the document.
360
360
  * @see https://html.spec.whatwg.org/multipage/semantics.html#attr-base-href
361
361
  */
362
- href?: AttrString;
362
+ href?: AttrHref;
363
363
 
364
364
  /**
365
365
  * Specifies the default browsing context for links and forms in the document.
@@ -374,7 +374,7 @@ declare global {
374
374
  * Specifies the URL of the source document or quoted content.
375
375
  * @see https://html.spec.whatwg.org/multipage/grouping-content.html#attr-blockquote-cite
376
376
  */
377
- cite?: AttrString;
377
+ cite?: AttrHref;
378
378
  }
379
379
  interface Body extends HTMLAttributes<HTMLBodyElement> {
380
380
  /**
@@ -701,7 +701,7 @@ declare global {
701
701
  * Specifies the URL of the source of the quote or change.
702
702
  * @see https://html.spec.whatwg.org/multipage/edits.html#attr-mod-cite
703
703
  */
704
- cite?: AttrString;
704
+ cite?: AttrHref;
705
705
 
706
706
  /**
707
707
  * Specifies the date and time of the quote or change.
@@ -759,13 +759,13 @@ declare global {
759
759
  * Specifies the URL of the resource to embed.
760
760
  * @see https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-embed-src
761
761
  */
762
- src?: AttrString;
762
+ src?: AttrSrc;
763
763
 
764
764
  /**
765
765
  * Specifies the MIME type of the embedded content.
766
766
  * @see https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-embed-type
767
767
  */
768
- type?: AttrString;
768
+ type?: AttrMimeType;
769
769
 
770
770
  /**
771
771
  * Specifies the width of the embedded content.
@@ -803,7 +803,7 @@ declare global {
803
803
  * Specifies the URL which the form data will be submitted to.
804
804
  * @see https://html.spec.whatwg.org/multipage/forms.html#attr-fs-action
805
805
  */
806
- action?: AttrString;
806
+ action?: AttrHref;
807
807
  /**
808
808
  * Controls whether the browser should automatically complete form input values.
809
809
  * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-autocomplete
@@ -975,7 +975,7 @@ declare global {
975
975
  * The URL of the page to embed in the iframe.
976
976
  * @see https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-src
977
977
  */
978
- src?: AttrString;
978
+ src?: AttrSrc;
979
979
  /**
980
980
  * A document to render inside the iframe.
981
981
  * @see https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-srcdoc
@@ -1059,7 +1059,7 @@ declare global {
1059
1059
  * The URL of the image to display.
1060
1060
  * @see https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-src
1061
1061
  */
1062
- src?: AttrString;
1062
+ src?: AttrSrc;
1063
1063
 
1064
1064
  /**
1065
1065
  * A string containing URL and size descriptor pairs for responsive images.
@@ -1097,7 +1097,7 @@ declare global {
1097
1097
  * A comma-separated list of file types that a file input should accept.
1098
1098
  * @see https://html.spec.whatwg.org/multipage/input.html#attr-input-accept
1099
1099
  */
1100
- accept?: AttrString;
1100
+ accept?: AttrAccept;
1101
1101
 
1102
1102
  /**
1103
1103
  * The alternate text for an image input, displayed if the image cannot be loaded.
@@ -1270,7 +1270,7 @@ declare global {
1270
1270
  * The URL of the image file.
1271
1271
  * @see https://html.spec.whatwg.org/multipage/input.html#attr-input-src
1272
1272
  */
1273
- src?: AttrString;
1273
+ src?: AttrSrc;
1274
1274
 
1275
1275
  /**
1276
1276
  * Specifies the allowed number intervals for the input value.
@@ -1366,7 +1366,7 @@ declare global {
1366
1366
  * A URI for a resource that explains the reason for the insertion.
1367
1367
  * @see https://html.spec.whatwg.org/multipage/edits.html#attr-mod-cite
1368
1368
  */
1369
- cite?: AttrString;
1369
+ cite?: AttrHref;
1370
1370
 
1371
1371
  /**
1372
1372
  * The date and time when the element's contents were inserted, in the format "YYYY-MM-DDThh:mm:ssZ".
@@ -1452,7 +1452,7 @@ declare global {
1452
1452
  * Specifies the URL of the linked resource.
1453
1453
  * @see https://html.spec.whatwg.org/multipage/links.html#attr-link-href
1454
1454
  */
1455
- href?: AttrString;
1455
+ href?: AttrHref;
1456
1456
 
1457
1457
  /**
1458
1458
  * Specifies the language of the linked resource.
@@ -1527,7 +1527,9 @@ declare global {
1527
1527
  * Specifies the MIME type of the linked resource.
1528
1528
  * @see https://html.spec.whatwg.org/multipage/links.html#attr-link-type
1529
1529
  */
1530
- type?: AttrString;
1530
+ type?: AttrMimeType;
1531
+
1532
+ // DEPRECATED
1531
1533
 
1532
1534
  /** @deprecated */
1533
1535
  charset?: AttrString;
@@ -1668,7 +1670,7 @@ declare global {
1668
1670
  * Specifies the MIME type of the resource.
1669
1671
  * @see https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-object-type
1670
1672
  */
1671
- type?: AttrString;
1673
+ type?: AttrMimeType;
1672
1674
 
1673
1675
  /**
1674
1676
  * Specifies a client-side image map to be used with the object element.
@@ -1691,7 +1693,7 @@ declare global {
1691
1693
  /** @deprecated */
1692
1694
  codebase?: AttrString;
1693
1695
  /** @deprecated */
1694
- codetype?: AttrString;
1696
+ codetype?: AttrMimeType;
1695
1697
  /** @deprecated */
1696
1698
  declare?: AttrBoolean;
1697
1699
  /** @deprecated */
@@ -1803,7 +1805,7 @@ declare global {
1803
1805
  * Specifies the URL of the source document or message that the quotation came from.
1804
1806
  * @see https://html.spec.whatwg.org/multipage/text-level-semantics.html#attr-q-cite
1805
1807
  */
1806
- cite?: AttrString;
1808
+ cite?: AttrHref;
1807
1809
  }
1808
1810
 
1809
1811
  interface RP extends HTMLAttributes<HTMLElement> {}
@@ -1864,7 +1866,7 @@ declare global {
1864
1866
  * Specifies the URL of the script.
1865
1867
  * @see https://html.spec.whatwg.org/multipage/scripting.html#attr-script-src
1866
1868
  */
1867
- src?: AttrString;
1869
+ src?: AttrSrc;
1868
1870
 
1869
1871
  /**
1870
1872
  * Specifies the type of the script.
@@ -1965,13 +1967,13 @@ declare global {
1965
1967
  * Helps the browser decide if it can play the resource or not.
1966
1968
  * @see https://html.spec.whatwg.org/multipage/embedded-content.html#attr-source-type
1967
1969
  */
1968
- type?: AttrString;
1970
+ type?: AttrMimeType;
1969
1971
 
1970
1972
  /**
1971
1973
  * Specifies the URL of the media resource for the <source> element.
1972
1974
  * @see https://html.spec.whatwg.org/multipage/embedded-content.html#attr-source-src
1973
1975
  */
1974
- src?: AttrString;
1976
+ src?: AttrSrc;
1975
1977
 
1976
1978
  /**
1977
1979
  * Specifies a list of image sources for the <source> element when used inside a <picture> element.
@@ -2027,7 +2029,7 @@ declare global {
2027
2029
  /** @deprecated */
2028
2030
  scoped?: AttrBoolean;
2029
2031
  /** @deprecated */
2030
- type?: AttrMissing | "text/css";
2032
+ type?: AttrMimeType;
2031
2033
  }
2032
2034
  interface Sub extends HTMLAttributes<HTMLElement> {}
2033
2035
  interface Summary extends HTMLAttributes<HTMLElement> {}
@@ -2321,7 +2323,7 @@ declare global {
2321
2323
  | "chapters"
2322
2324
  | "metadata";
2323
2325
  label?: AttrString;
2324
- src?: AttrString;
2326
+ src?: AttrSrc;
2325
2327
  srclang?: AttrString;
2326
2328
  }
2327
2329
  interface U extends HTMLAttributes<HTMLElement> {}
@@ -2409,7 +2411,7 @@ declare global {
2409
2411
  * Specifies the URL of an image to be shown while the video is downloading or until the user plays the video.
2410
2412
  * @see https://html.spec.whatwg.org/multipage/media.html#attr-video-poster
2411
2413
  */
2412
- poster?: AttrString;
2414
+ poster?: AttrSrc;
2413
2415
 
2414
2416
  /**
2415
2417
  * Specifies how much of the video should be preloaded when the page loads.
@@ -2420,7 +2422,7 @@ declare global {
2420
2422
  * Specifies the URL of the video file to be embedded.
2421
2423
  * @see https://html.spec.whatwg.org/multipage/media.html#attr-media-src
2422
2424
  */
2423
- src?: AttrString;
2425
+ src?: AttrSrc;
2424
2426
  /**
2425
2427
  * Specifies the width of the video's display area.
2426
2428
  * @see https://html.spec.whatwg.org/multipage/embedded-content-other.html#attr-dim-width
@@ -3493,7 +3495,7 @@ declare global {
3493
3495
  * information to be exchanged between the HTML and its DOM representation by scripts.
3494
3496
  * @see https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes
3495
3497
  */
3496
- [data: `data-${string}`]: AttrMissing | string | number | boolean;
3498
+ [data: `data-${string}`]: AttrStringOrNumber | boolean;
3497
3499
  }
3498
3500
 
3499
3501
  interface AriaAttributes {
@@ -3917,6 +3919,78 @@ type AttrReferrerPolicy =
3917
3919
  | "strict-origin-when-cross-origin"
3918
3920
  | "strict-origin"
3919
3921
  | "unsafe-url";
3922
+ /**
3923
+ * URL for links, form actions, and citations. Use (string & {}) so any URL is
3924
+ * accepted while suggesting common prefixes in autocomplete.
3925
+ */
3926
+ type AttrHref =
3927
+ | AttrMissing
3928
+ | "#"
3929
+ | "mailto:"
3930
+ | "tel:"
3931
+ | "/"
3932
+ | "./"
3933
+ | "https://"
3934
+ | "data:"
3935
+ | (string & {});
3936
+ /**
3937
+ * URL for embeddable resources (img, script, iframe, etc.). Use (string & {})
3938
+ * so any URL is accepted while suggesting common prefixes in autocomplete.
3939
+ */
3940
+ type AttrSrc =
3941
+ | AttrMissing
3942
+ | "/"
3943
+ | "./"
3944
+ | "https://"
3945
+ | "data:"
3946
+ | "blob:"
3947
+ | (string & {});
3948
+ /**
3949
+ * MIME type for type, codetype, and enctype attributes. Use (string & {}) so
3950
+ * any MIME type is accepted while suggesting common values in autocomplete.
3951
+ */
3952
+ type AttrMimeType =
3953
+ | AttrMissing
3954
+ | "text/html"
3955
+ | "text/css"
3956
+ | "text/javascript"
3957
+ | "application/javascript"
3958
+ | "application/json"
3959
+ | "application/pdf"
3960
+ | "text/plain"
3961
+ | "application/x-www-form-urlencoded"
3962
+ | "multipart/form-data"
3963
+ | "image/png"
3964
+ | "image/jpeg"
3965
+ | "image/gif"
3966
+ | "image/svg+xml"
3967
+ | "image/webp"
3968
+ | "video/mp4"
3969
+ | "video/webm"
3970
+ | "audio/mpeg"
3971
+ | "audio/webm"
3972
+ | "font/woff"
3973
+ | "font/woff2"
3974
+ | (string & {});
3975
+ /**
3976
+ * File type hint for input accept. Use (string & {}) so any value is accepted
3977
+ * while suggesting common MIME wildcards and extensions in autocomplete.
3978
+ */
3979
+ type AttrAccept =
3980
+ | AttrMissing
3981
+ | "image/*"
3982
+ | "audio/*"
3983
+ | "video/*"
3984
+ | "application/pdf"
3985
+ | ".pdf"
3986
+ | ".doc"
3987
+ | ".docx"
3988
+ | ".jpg"
3989
+ | ".jpeg"
3990
+ | ".png"
3991
+ | ".gif"
3992
+ | ".webp"
3993
+ | (string & {});
3920
3994
  type AttrString = AttrMissing | string;
3921
3995
  type AttrStringOrNumber = AttrString | number;
3922
3996
  type AttrBoolean = AttrMissing | boolean;