Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Jan 1, 2024
1 parent 3d90f51 commit 7c65bf5
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 153 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.20.3

### Bug fixes
* Fix phx-viewport bindings failing to fire after navigation

## 0.20.2 (2023-12-18)

### Bug fixes
Expand Down
75 changes: 27 additions & 48 deletions priv/static/phoenix_live_view.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions priv/static/phoenix_live_view.cjs.js.map

Large diffs are not rendered by default.

75 changes: 27 additions & 48 deletions priv/static/phoenix_live_view.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions priv/static/phoenix_live_view.esm.js.map

Large diffs are not rendered by default.

75 changes: 27 additions & 48 deletions priv/static/phoenix_live_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -2129,66 +2129,42 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
"track",
"wbr"
]);
var endingTagNameChars = new Set([">", "/", " ", "\n", " ", "\r"]);
var quoteChars = new Set(["'", '"']);
var modifyRoot = (html, attrs, clearInnerHTML) => {
let i = 0;
let insideComment = false;
let beforeTag, afterTag, tag, tagNameEndsAt, id, newHTML;
while (i < html.length) {
let char = html.charAt(i);
if (insideComment) {
if (char === "-" && html.slice(i, i + 3) === "-->") {
insideComment = false;
i += 3;
} else {
i++;
}
} else if (char === "<" && html.slice(i, i + 4) === "<!--") {
insideComment = true;
i += 4;
} else if (char === "<") {
beforeTag = html.slice(0, i);
let iAtOpen = i;
let lookahead = html.match(/^(\s*(?:<!--.*?-->\s*)*)<([^\s\/>]+)/);
if (lookahead === null) {
throw new Error(`malformed html ${html}`);
}
i = lookahead[0].length;
beforeTag = lookahead[1];
tag = lookahead[2];
tagNameEndsAt = i;
for (i; i < html.length; i++) {
if (html.charAt(i) === ">") {
break;
}
if (html.charAt(i) === "=") {
let isId = html.slice(i - 3, i) === " id";
i++;
for (i; i < html.length; i++) {
if (endingTagNameChars.has(html.charAt(i))) {
break;
let char = html.charAt(i);
if (quoteChars.has(char)) {
let attrStartsAt = i;
i++;
for (i; i < html.length; i++) {
if (html.charAt(i) === char) {
break;
}
}
}
tagNameEndsAt = i;
tag = html.slice(iAtOpen + 1, tagNameEndsAt);
for (i; i < html.length; i++) {
if (html.charAt(i) === ">") {
if (isId) {
id = html.slice(attrStartsAt + 1, i);
break;
}
if (html.charAt(i) === "=") {
let isId = html.slice(i - 3, i) === " id";
i++;
let char2 = html.charAt(i);
if (quoteChars.has(char2)) {
let attrStartsAt = i;
i++;
for (i; i < html.length; i++) {
if (html.charAt(i) === char2) {
break;
}
}
if (isId) {
id = html.slice(attrStartsAt + 1, i);
break;
}
}
}
}
break;
} else {
i++;
}
}
if (!tag) {
throw new Error(`malformed html ${html}`);
}
let closeAt = html.length - 1;
insideComment = false;
while (closeAt >= beforeTag.length + tag.length) {
Expand Down Expand Up @@ -3051,6 +3027,9 @@ removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}"
let updatedHookIds = new Set();
patch.after("added", (el) => {
this.liveSocket.triggerDOM("onNodeAdded", [el]);
let phxViewportTop = this.binding(PHX_VIEWPORT_TOP);
let phxViewportBottom = this.binding(PHX_VIEWPORT_BOTTOM);
dom_default.maybeAddPrivateHooks(el, phxViewportTop, phxViewportBottom);
this.maybeAddNewHook(el);
if (el.getAttribute) {
this.maybeMounted(el);
Expand Down
9 changes: 4 additions & 5 deletions priv/static/phoenix_live_view.min.js

Large diffs are not rendered by default.

0 comments on commit 7c65bf5

Please sign in to comment.