Patch Changes
-
#3313
8e03f4aThanks @LuLaValva! - Add the native<search>tag. -
#4232
daeeb0eThanks @DylanPiercey! - An attribute tag<for>nested within an attribute tag<if>,<else-if>or<else>now passes every attribute tag it repeats, instead of only the last.
An attribute tag<if>chain whose branches hold different attribute tags now passes each branch's attribute tags on the client, instead of dropping them or failing to compile when the child reads only some of them.
<@catch>and<@placeholder>content created by an attribute tag<for>now receives the loop's params when a<try>renders it on the client, instead of rendering without them.
Content an attribute tag<for>creates now keeps the loop's params when the client first renders it after resume (a child opening a list, rendering a saved item or showing a<@catch>), instead of rendering them empty. -
#4256
4be1b92Thanks @DylanPiercey! - A section nested within content an attribute tag<for>creates (an<if>,<for>, dynamic tag body, or another tag's attribute tags inside<@item>) now receives the loop's params when rendered on the client, instead of rendering without them or throwing. The loop's params also keep their defaults, spreads and lazy reads there, and a static loop no longer resumes its content. -
#4288
2426fa5Thanks @DylanPiercey! - Trim a few bytes from the client runtime of every page that uses<await>. -
#4258
b8f1014Thanks @DylanPiercey! - Changing an<await>value while its server-rendered content is still streaming no longer throws, and the content shows the latest value once it arrives. -
#4263
a90c855Thanks @DylanPiercey! - Note in the cheat sheet that$!{}and<html-script>/<html-style>contents are written as-is and must not receive user-provided content. -
#4235
8544424Thanks @DylanPiercey! - A derived<const>whose property is read elsewhere (xs.length) is no longer inlined into a collapsed intersection, so the client runs the signal that feeds that property instead of leaving dependent valuesundefined. -
#4243
96ef015Thanks @DylanPiercey! - Content a parent builds again on the client after resume, such as a new item of an attribute tag<for>over changing input, now receives the values it reads from its parent (including a constant input or a never-assigned<let>) instead of rendering without them. -
#4236
5b7b719Thanks @DylanPiercey! - A variable or param named_no longer collides with the owner scope in debug builds. -
#4291
a63532bThanks @DylanPiercey! - The body and attribute tag content of a dynamic tag whose name the compiler cannot resolve, such as<${input.as}>, keep the values they read after resume when a component passed as that name renders them later, for example behind its own<if>. Those values reach the browser only when the component sends the content there, so attribute tag content no longer serializes everything it reads on every render. -
#4261
a9d8a07Thanks @DylanPiercey! - Let a tag variable inside a dynamic tag's body be read from outside it when the tag name is falsy, including after the name is toggled on a resumed page. -
#4281
1c142cdThanks @DylanPiercey! - Assigning to a property destructured from a dynamic tag's variable (<${tag}/{ value }/>withvalue++in a handler) no longer throwsReferenceError: $valueChange is not definedon every server render. The assignment now calls the tag's returnedvalueChange, as it already did for a custom tag. -
#4266
67d0215Thanks @DylanPiercey! - Point an<effect>with body content at its replacement,<script>, which runs its body as code, instead of reporting that<effect>does not support body content. -
#4284
6d721cbThanks @DylanPiercey! - Server rendering checks whether a flushed scope has values to send without allocating an array of its keys. -
#4254
b419872Thanks @DylanPiercey! - A<for by>key (row.idwithby="id") is read as a constant within its branch, like an index key, since a branch is keyed by it. Its reads no longer create signals or per-branch state, a keyed selector comparison drops the key from its intersection, and resumed HTML no longer writes the key twice. -
#4254
b419872Thanks @DylanPiercey! - A property of a<for>loop key (${key.length}in<for|key| in=obj>) now renders in branches created in the browser. -
#4272
d52fa58Thanks @DylanPiercey! - Content that streams in out of order (a<try>with a@placeholder) or loads lazily (load) no longer becomes interactive while in-order content, such as an<await>without a placeholder, is still streaming. Its effects now wait with the rest of the page's, so a value changed meanwhile can no longer leave the in-order content showing the server's stale value. -
#4240
cb7a14cThanks @DylanPiercey! - A derived value that the server skipped because its intersection partner's changes recompute it is now serialized when a serialized value on that recompute path (such aslist.length) can stop the recompute after resume. Previously a same-length update left itundefinedand rendered the wrong branch. -
#4264
ca8bfddThanks @DylanPiercey! - Content streamed in order after the page resumed is walked even when its chunk carries no resume data, so later client updates reach it. -
#4279
27ca957Thanks @DylanPiercey! - A custom tag whose content readsinputor contains an<if>now keeps what its import declares: aloadimport stays lazy on the client instead of being bundled into the page, and a name import (import Wrap from "<wrap>") no longer compiles to a browser import of the unresolvable"<wrap>". Using aloadimport above the import statement is now a compile error instead of a silent eager load. -
#4271
aeb74eaThanks @DylanPiercey! - Fix a resume error for a<for>loop's key read inside an<await>body whose content streams in after the loop, and stop sending a subscriber set for it: the key never changes within its row. -
#4275
7cd2056Thanks @DylanPiercey! - A tag with more than fifteen params no longer serializes resume markers and values for its later params when the caller passes them constants. -
#4249
aa8dbcbThanks @DylanPiercey! - A value spread onto one element and passed through a function in another element's spread (<div ...attrs/>with<div ...withCount(attrs, count)/>) is now serialized, so that spread keeps the value when it re-runs after resume. -
#4249
aa8dbcbThanks @DylanPiercey! - Content rendered only through a native tag spread (<div ...attrs>withattrs.content, including attribute tag items spread in a<for of>or<for in>, forwarded to a child that spreads them, or spread into a custom tag that spreads its input) is no longer registered for resume, so its renderer, and anything only it keeps, tree-shakes out of the client bundle. Content spread directly also no longer writes the closures it would need to be rebuilt when nothing can rebuild it. -
#4282
36126dbThanks @DylanPiercey! - A<define>tag declared and rendered inside another<define>body no longer makes the client module throwReferenceError: Cannot access '…__walks' before initializationwhen it loads. -
#4274
e6fb8b8Thanks @DylanPiercey! - A tag named by a<const>that may be a template or nullish, such as<const/x=show ? Tag : null>then<${x}>, renders its body in place while the value is nullish instead of always rendering the template. -
#4286
2e530b9Thanks @DylanPiercey! - A template whose only$globalreads are unused values (<const/unused=$global.foo/>) no longer looks up$globalin its server render. -
#4233
52cf5d7Thanks @DylanPiercey! - A server render no longer reads the wrong value, or throws, through a member of a tag variable renamed for sharing its name (<div><const/x/>${x.n}</div><div><const/x/>${x.n}</div>). -
#4234
fc3bd9fThanks @DylanPiercey! - A value read through a destructured rest param (|{ id, ...rest }|thenrest.extra, or|{ ...all }|thenall) no longer throws when the server serializes it. -
#4239
5ebc005Thanks @DylanPiercey! - Fix an "Unable to serialize" server error when a<define>renders its content conditionally (including through another or the same<define>) and that content reads values from where it is called.Fix a
_ is not a functionclient error when a<define>with client-side setup is both rendered as a tag and passed as a dynamic tag value. -
#4269
329f770Thanks @DylanPiercey! - Share one lazy loader between every tag that loads the same template with the same trigger, instead of creating one per tag. -
#4270
91cbc80Thanks @DylanPiercey! - A value spread onto a native tag inside a nested branch, or beside an attribute that changes on its own, keeps its attributes when the tag re-renders after resume. Content that streams in after the page resumed now shows values changed while it was pending, including behind a<try>placeholder in another component, and no longer blanks one that never changed. A<define>body called inside a branch the client re-creates keeps the values it closes over, and one that is both called directly and rendered as a dynamic tag no longer throws when it closes over a value. Fewer values reach the browser: a native tag with a spread sends its attribute values only when a client render reads them, and a value read inside a branch is not sent when every change that re-creates the branch recomputes it. -
#4265
4f1c727Thanks @DylanPiercey! - Suggeststaticforinterface X { ... }andenum X { ... }written at the template root, instead of reporting an invalid attribute name. -
#4229
ec77d73Thanks @DylanPiercey! - A tag param's default (<child|y = fallback|>) now applies on the client, and a tag with no body no longer fails to compile when its params have defaults. -
#4277
f467422Thanks @DylanPiercey! - A tag name that may be a<define>or another tag's variable, such as<${show ? Foo : "div"}>, registers its body for the client, so that tag can still render the body after resume. -
#4231
2298b9dThanks @DylanPiercey! - A<for>withoutby=(of=, orto=/until=counting from 0 by 1) keys its branches by index, so it now compiles to a loop that only appends and removes at the end, and ships without the keyed move planner. -
#4285
441e5b8Thanks @DylanPiercey! - An<await|result|=promise>whoseresultis never read no longer reads a variable that was never declared, which threwis not definedin the browser, or in the server render whenpromisecame from a<let>. An<id/unused=value/>whose variable is never read no longer breaks the browser compile, or throwsis not definedin the browser when it sits beside other setup content or inside a<for>. -
Updated dependencies [
8e03f4a,d36b447,8af26eb,6485a1f,0bde97c,413c8f3,348266e,1c73664,0848d17,1c73664,4c04d1d,710a6f2]:- @marko/compiler@5.42.7