Skip to content

Commit

Permalink
use new single-pass idiomorph branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
botandrose-machine committed Dec 24, 2024
1 parent ac4331e commit 78f6e45
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"chai": "~4.3.4",
"eslint": "^8.13.0",
"express": "^4.18.2",
"idiomorph": "~0.4.0",
"idiomorph": "https://github.com/botandrose/idiomorph.git#single-pass-build",
"multer": "^1.4.2",
"rollup": "^2.35.1"
},
Expand Down
6 changes: 0 additions & 6 deletions src/core/morphing.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { dispatch } from "../util"
export function morphElements(currentElement, newElement, { callbacks, ...options } = {}) {
Idiomorph.morph(currentElement, newElement, {
...options,
twoPass: true,
callbacks: new DefaultIdiomorphCallbacks(callbacks)
})
}
Expand All @@ -22,11 +21,6 @@ class DefaultIdiomorphCallbacks {
this.#beforeNodeMorphed = beforeNodeMorphed || (() => true)
}

// don't mess with the contents of a permanent node when pantrying
beforeNodePantried = (node) => {
if (node.parentNode instanceof Element && node.parentNode.hasAttribute("data-turbo-permanent")) return false;
}

beforeNodeAdded = (node) => {
return !(node.id && node.hasAttribute("data-turbo-permanent") && document.getElementById(node.id))
}
Expand Down
5 changes: 2 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1932,10 +1932,9 @@ [email protected]:
dependencies:
safer-buffer ">= 2.1.2 < 3"

idiomorph@~0.4.0:
"idiomorph@https://github.com/botandrose/idiomorph.git#single-pass-build":
version "0.4.0"
resolved "https://registry.yarnpkg.com/idiomorph/-/idiomorph-0.4.0.tgz#ba63a7a73cf6b8db74acec6e22b7c98341e7d548"
integrity sha512-VdXFpZOTXhLatJmhCWJR5oQKLXT01O6sFCJqT0/EqG71C4tYZdPJ5etvttwWsT2WKRYWz160XkNr1DUqXNMZHg==
resolved "https://github.com/botandrose/idiomorph.git#7c4904418ddba27e991318242423cb22f1f1a9b2"

ieee754@^1.1.13:
version "1.2.1"
Expand Down

0 comments on commit 78f6e45

Please sign in to comment.