From 40f9d2ea5afb74c4f04030fb1a643fcd803a70e7 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Mon, 6 Jun 2022 18:58:45 -0500 Subject: [PATCH] Update to work with latest `hydrogen-view-sdk@0.0.12` (#10) Get this project running again after a few months of changes from `hydrogen-view-sdk` and now finally after https://github.com/vector-im/hydrogen-web/pull/693 merged to make the SDK friendly to locally link and develop on. --- package-lock.json | 405 +++++++++++++++------------- package.json | 2 +- server/routes/install-routes.js | 2 +- shared/ArchiveView.js | 7 +- shared/hydrogen-vm-render-script.js | 39 +-- 5 files changed, 249 insertions(+), 206 deletions(-) diff --git a/package-lock.json b/package-lock.json index ee8d676..8637ea6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "mocha": "^9.2.1", "nodemon": "^2.0.15", "prettier": "^2.5.1", - "vite": "^2.8.2" + "vite": "^2.9.8" }, "engines": { "node": ">=16.0.0" @@ -1099,9 +1099,9 @@ } }, "node_modules/esbuild": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.21.tgz", - "integrity": "sha512-7WEoNMBJdLN993dr9h0CpFHPRc3yFZD+EAVY9lg6syJJ12gc5fHq8d75QRExuhnMkT2DaRiIKFThRvDWP+fO+A==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.31.tgz", + "integrity": "sha512-QA0fUM13+JZzcvg1bdrhi7wo8Lr5IRHA9ypNn2znqxGqb66dSK6pAh01TjyBOhzZGazPQJZ1K26VrCAQJ715qA==", "dev": true, "hasInstallScript": true, "bin": { @@ -1111,31 +1111,48 @@ "node": ">=12" }, "optionalDependencies": { - "esbuild-android-arm64": "0.14.21", - "esbuild-darwin-64": "0.14.21", - "esbuild-darwin-arm64": "0.14.21", - "esbuild-freebsd-64": "0.14.21", - "esbuild-freebsd-arm64": "0.14.21", - "esbuild-linux-32": "0.14.21", - "esbuild-linux-64": "0.14.21", - "esbuild-linux-arm": "0.14.21", - "esbuild-linux-arm64": "0.14.21", - "esbuild-linux-mips64le": "0.14.21", - "esbuild-linux-ppc64le": "0.14.21", - "esbuild-linux-riscv64": "0.14.21", - "esbuild-linux-s390x": "0.14.21", - "esbuild-netbsd-64": "0.14.21", - "esbuild-openbsd-64": "0.14.21", - "esbuild-sunos-64": "0.14.21", - "esbuild-windows-32": "0.14.21", - "esbuild-windows-64": "0.14.21", - "esbuild-windows-arm64": "0.14.21" + "esbuild-android-64": "0.14.31", + "esbuild-android-arm64": "0.14.31", + "esbuild-darwin-64": "0.14.31", + "esbuild-darwin-arm64": "0.14.31", + "esbuild-freebsd-64": "0.14.31", + "esbuild-freebsd-arm64": "0.14.31", + "esbuild-linux-32": "0.14.31", + "esbuild-linux-64": "0.14.31", + "esbuild-linux-arm": "0.14.31", + "esbuild-linux-arm64": "0.14.31", + "esbuild-linux-mips64le": "0.14.31", + "esbuild-linux-ppc64le": "0.14.31", + "esbuild-linux-riscv64": "0.14.31", + "esbuild-linux-s390x": "0.14.31", + "esbuild-netbsd-64": "0.14.31", + "esbuild-openbsd-64": "0.14.31", + "esbuild-sunos-64": "0.14.31", + "esbuild-windows-32": "0.14.31", + "esbuild-windows-64": "0.14.31", + "esbuild-windows-arm64": "0.14.31" + } + }, + "node_modules/esbuild-android-64": { + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.31.tgz", + "integrity": "sha512-MYkuJ91w07nGmr4EouejOZK2j/f5TCnsKxY8vRr2+wpKKfHD1LTJK28VbZa+y1+AL7v1V9G98ezTUwsV3CmXNw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, "node_modules/esbuild-android-arm64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.21.tgz", - "integrity": "sha512-Bqgld1TY0wZv8TqiQmVxQFgYzz8ZmyzT7clXBDZFkOOdRybzsnj8AZuK1pwcLVA7Ya6XncHgJqIao7NFd3s0RQ==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.31.tgz", + "integrity": "sha512-0rkH/35s7ZVcsw6nS0IAkR0dekSbjZGWdlOAf3jV0lGoPqqw0x6/TmaV9w7DQgUERTH1ApmPlpAMU4kVkCq9Jg==", "cpu": [ "arm64" ], @@ -1149,9 +1166,9 @@ } }, "node_modules/esbuild-darwin-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.21.tgz", - "integrity": "sha512-j+Eg+e13djzyYINVvAbOo2/zvZ2DivuJJTaBrJnJHSD7kUNuGHRkHoSfFjbI80KHkn091w350wdmXDNSgRjfYQ==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.31.tgz", + "integrity": "sha512-kP6xPZHxtJa36Hb0jC05L3VzQSZBW2f3bpnQS20czXTRGEmM2GDiYpGdI5g2QYaw6vC4PYXjnigq8usd9g9jnQ==", "cpu": [ "x64" ], @@ -1165,9 +1182,9 @@ } }, "node_modules/esbuild-darwin-arm64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.21.tgz", - "integrity": "sha512-nDNTKWDPI0RuoPj5BhcSB2z5EmZJJAyRtZLIjyXSqSpAyoB8eyAKXl4lB8U2P78Fnh4Lh1le/fmpewXE04JhBQ==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.31.tgz", + "integrity": "sha512-1ZMog4hkNsdBGtDDtsftUqX6S9N52gEx4vX5aVehsSptgoBFIar1XrPiBTQty7YNH+bJasTpSVaZQgElCVvPKQ==", "cpu": [ "arm64" ], @@ -1181,9 +1198,9 @@ } }, "node_modules/esbuild-freebsd-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.21.tgz", - "integrity": "sha512-zIurkCHXhxELiDZtLGiexi8t8onQc2LtuE+S7457H/pP0g0MLRKMrsn/IN4LDkNe6lvBjuoZZi2OfelOHn831g==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.31.tgz", + "integrity": "sha512-Zo0BYj7QpVFWoUpkv6Ng0RO2eJ4zk/WDaHMO88+jr5HuYmxsOre0imgwaZVPquTuJnCvL1G48BFucJ3tFflSeQ==", "cpu": [ "x64" ], @@ -1197,9 +1214,9 @@ } }, "node_modules/esbuild-freebsd-arm64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.21.tgz", - "integrity": "sha512-wdxMmkJfbwcN+q85MpeUEamVZ40FNsBa9mPq8tAszDn8TRT2HoJvVRADPIIBa9SWWwlDChIMjkDKAnS3KS/sPA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.31.tgz", + "integrity": "sha512-t85bS6jbRpmdjr4pdr/FY/fpx8lo1vv9S7BAs2EsXKJQhRDMIiC3QW+k2acYJoRuqirlvJcJVFQGCq/PfyC1kA==", "cpu": [ "arm64" ], @@ -1213,9 +1230,9 @@ } }, "node_modules/esbuild-linux-32": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.21.tgz", - "integrity": "sha512-fmxvyzOPPh2xiEHojpCeIQP6pXcoKsWbz3ryDDIKLOsk4xp3GbpHIEAWP0xTeuhEbendmvBDVKbAVv3PnODXLg==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.31.tgz", + "integrity": "sha512-XYtOk/GodSkv+UOYVwryGpGPuFnszsMvRMKq6cIUfFfdssHuKDsU9IZveyCG44J106J39ABenQ5EetbYtVJHUw==", "cpu": [ "ia32" ], @@ -1229,9 +1246,9 @@ } }, "node_modules/esbuild-linux-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.21.tgz", - "integrity": "sha512-edZyNOv1ql+kpmlzdqzzDjRQYls+tSyi4QFi+PdBhATJFUqHsnNELWA9vMSzAaInPOEaVUTA5Ml28XFChcy4DA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.31.tgz", + "integrity": "sha512-Zf9CZxAxaXWHLqCg/QZ/hs0RU0XV3IBxV+ENQzy00S4QOTnZAvSLgPciILHHrVJ0lPIlb4XzAqlLM5y6iI2LIw==", "cpu": [ "x64" ], @@ -1245,9 +1262,9 @@ } }, "node_modules/esbuild-linux-arm": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.21.tgz", - "integrity": "sha512-aSU5pUueK6afqmLQsbU+QcFBT62L+4G9hHMJDHWfxgid6hzhSmfRH9U/f+ymvxsSTr/HFRU4y7ox8ZyhlVl98w==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.31.tgz", + "integrity": "sha512-RpiaeHPRlgCCDskxoyIsI49BhcDtZ4cl8+SLffizDm0yMNWP538SUg0ezQ2TTOPj3/svaGIbkRDwYtAon0Sjkg==", "cpu": [ "arm" ], @@ -1261,9 +1278,9 @@ } }, "node_modules/esbuild-linux-arm64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.21.tgz", - "integrity": "sha512-t5qxRkq4zdQC0zXpzSB2bTtfLgOvR0C6BXYaRE/6/k8/4SrkZcTZBeNu+xGvwCU4b5dU9ST9pwIWkK6T1grS8g==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.31.tgz", + "integrity": "sha512-V/H0tv+xpQ9IOHM+o85oCKNNidIEc5CcnDWl0V+hPd2F03dqdbFkWPBGphx8rD4JSQn6UefUQ1iH7y1qIzO8Fw==", "cpu": [ "arm64" ], @@ -1277,9 +1294,9 @@ } }, "node_modules/esbuild-linux-mips64le": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.21.tgz", - "integrity": "sha512-jLZLQGCNlUsmIHtGqNvBs3zN+7a4D9ckf0JZ+jQTwHdZJ1SgV9mAjbB980OFo66LoY+WeM7t3WEnq3FjI1zw4A==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.31.tgz", + "integrity": "sha512-9/oBfAckInRuUg6AEgdCLLn6KJ6UOJDOLmUinTsReVSg6AfV6wxYQJq9iQM2idRogP7GUpomJ+bvCdWXpotQRQ==", "cpu": [ "mips64el" ], @@ -1293,9 +1310,9 @@ } }, "node_modules/esbuild-linux-ppc64le": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.21.tgz", - "integrity": "sha512-4TWxpK391en2UBUw6GSrukToTDu6lL9vkm3Ll40HrI08WG3qcnJu7bl8e1+GzelDsiw1QmfAY/nNvJ6iaHRpCQ==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.31.tgz", + "integrity": "sha512-NMcb14Pg+8q8raGkzor9/R3vQwKzgxE3694BtO2SDLBwJuL2C1dQ1ZtM1t7ZvArQBgT8RiZVxb0/3fD+qGNk7g==", "cpu": [ "ppc64" ], @@ -1309,9 +1326,9 @@ } }, "node_modules/esbuild-linux-riscv64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.21.tgz", - "integrity": "sha512-fElngqOaOfTsF+u+oetDLHsPG74vB2ZaGZUqmGefAJn3a5z9Z2pNa4WpVbbKgHpaAAy5tWM1m1sbGohj6Ki6+Q==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.31.tgz", + "integrity": "sha512-l13yvmsVfawAnoYfcpuvml+nTlrOmtdceXYufSkXl2DOb0JKcuR6ARlAzuQCDcpo49SOJy1cCxpwlOIsUQBfzA==", "cpu": [ "riscv64" ], @@ -1325,9 +1342,9 @@ } }, "node_modules/esbuild-linux-s390x": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.21.tgz", - "integrity": "sha512-brleZ6R5fYv0qQ7ZBwenQmP6i9TdvJCB092c/3D3pTLQHBGHJb5zWgKxOeS7bdHzmLy6a6W7GbFk6QKpjyD6QA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.31.tgz", + "integrity": "sha512-GIwV9mY3koYja9MCSkKLk1P7rj+MkPV0UsGsZ575hEcIBrXeKN9jBi6X/bxDDPEN/SUAH35cJhBNrZU4x9lEfg==", "cpu": [ "s390x" ], @@ -1341,9 +1358,9 @@ } }, "node_modules/esbuild-netbsd-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.21.tgz", - "integrity": "sha512-nCEgsLCQ8RoFWVV8pVI+kX66ICwbPP/M9vEa0NJGIEB/Vs5sVGMqkf67oln90XNSkbc0bPBDuo4G6FxlF7PN8g==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.31.tgz", + "integrity": "sha512-bJ+pyLvKQm+Obp5k7/Wk8e9Gdkls56F1aiI3uptoIfOIUqsZImH7pDyTrSufwqsFp62kO9LRuwXnjDwQtPyhFQ==", "cpu": [ "x64" ], @@ -1357,9 +1374,9 @@ } }, "node_modules/esbuild-openbsd-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.21.tgz", - "integrity": "sha512-h9zLMyVD0T73MDTVYIb/qUTokwI6EJH9O6wESuTNq6+XpMSr6C5aYZ4fvFKdNELW+Xsod+yDS2hV2JTUAbFrLA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.31.tgz", + "integrity": "sha512-NRAAPPca05H9j9Xab0kVXK0V6/pyZGGy8d2Y8KS0BMwWEydlD4KCJDmH8/7bWCKYLRGOOCE9/GPBJyPWHFW3sg==", "cpu": [ "x64" ], @@ -1373,9 +1390,9 @@ } }, "node_modules/esbuild-sunos-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.21.tgz", - "integrity": "sha512-Kl+7Cot32qd9oqpLdB1tEGXEkjBlijrIxMJ0+vlDFaqsODutif25on0IZlFxEBtL2Gosd4p5WCV1U7UskNQfXA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.31.tgz", + "integrity": "sha512-9uA+V8w9Eehu4ldb95lPWdgCMcMO5HH6pXmfkk5usn3JsSZxKdLKsXB4hYgP80wscZvVYXJl2G+KNxsUTfPhZw==", "cpu": [ "x64" ], @@ -1389,9 +1406,9 @@ } }, "node_modules/esbuild-windows-32": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.21.tgz", - "integrity": "sha512-V7vnTq67xPBUCk/9UtlolmQ798Ecjdr1ZoI1vcSgw7M82aSSt0eZdP6bh5KAFZU8pxDcx3qoHyWQfHYr11f22A==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.31.tgz", + "integrity": "sha512-VGdncQTqoxD9q3v/dk0Yugbmx2FzOkcs0OemBYc1X9KXOLQYH0uQbLJIckZdZOC3J+JKSExbYFrzYCOwWPuNyA==", "cpu": [ "ia32" ], @@ -1405,9 +1422,9 @@ } }, "node_modules/esbuild-windows-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.21.tgz", - "integrity": "sha512-kDgHjKOHwjfJDCyRGELzVxiP/RBJBTA+wyspf78MTTJQkyPuxH2vChReNdWc+dU2S4gIZFHMdP1Qrl/k22ZmaA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.31.tgz", + "integrity": "sha512-v/2ye5zBqpmCzi3bLCagStbNQlnOsY7WtMrD2Q0xZxeSIXONxji15KYtVee5o7nw4lXWbQSS1BL8G6BBMvtq4A==", "cpu": [ "x64" ], @@ -1421,9 +1438,9 @@ } }, "node_modules/esbuild-windows-arm64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.21.tgz", - "integrity": "sha512-8Sbo0zpzgwWrwjQYLmHF78f7E2xg5Ve63bjB2ng3V2aManilnnTGaliq2snYg+NOX60+hEvJHRdVnuIAHW0lVw==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.31.tgz", + "integrity": "sha512-RXeU42FJoG1sriNHg73h4S+5B7L/gw+8T7U9u8IWqSSEbY6fZvBh4uofugiU1szUDqqP00GHwZ09WgYe3lGZiw==", "cpu": [ "arm64" ], @@ -3103,9 +3120,9 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "node_modules/nanoid": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz", - "integrity": "sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -3491,20 +3508,26 @@ } }, "node_modules/postcss": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.6.tgz", - "integrity": "sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA==", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], "dependencies": { - "nanoid": "^3.2.0", + "nanoid": "^3.3.4", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, "engines": { "node": "^10 || ^12 || >=14" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" } }, "node_modules/prelude-ls": { @@ -4432,13 +4455,13 @@ } }, "node_modules/vite": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-2.8.2.tgz", - "integrity": "sha512-zawfykcPVPYva4KusIWORNLr324Qx86/3NpfQSIOJdjnL5pYhwDoImLYMOh4lFLcP/7//tNuWM2vx2F5OSVC9w==", + "version": "2.9.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-2.9.8.tgz", + "integrity": "sha512-zsBGwn5UT3YS0NLSJ7hnR54+vUKfgzMUh/Z9CxF1YKEBVIe213+63jrFLmZphgGI5zXwQCSmqIdbPuE8NJywPw==", "dev": true, "dependencies": { - "esbuild": "^0.14.14", - "postcss": "^8.4.6", + "esbuild": "^0.14.27", + "postcss": "^8.4.13", "resolve": "^1.22.0", "rollup": "^2.59.0" }, @@ -5474,162 +5497,170 @@ "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" }, "esbuild": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.21.tgz", - "integrity": "sha512-7WEoNMBJdLN993dr9h0CpFHPRc3yFZD+EAVY9lg6syJJ12gc5fHq8d75QRExuhnMkT2DaRiIKFThRvDWP+fO+A==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.31.tgz", + "integrity": "sha512-QA0fUM13+JZzcvg1bdrhi7wo8Lr5IRHA9ypNn2znqxGqb66dSK6pAh01TjyBOhzZGazPQJZ1K26VrCAQJ715qA==", "dev": true, "requires": { - "esbuild-android-arm64": "0.14.21", - "esbuild-darwin-64": "0.14.21", - "esbuild-darwin-arm64": "0.14.21", - "esbuild-freebsd-64": "0.14.21", - "esbuild-freebsd-arm64": "0.14.21", - "esbuild-linux-32": "0.14.21", - "esbuild-linux-64": "0.14.21", - "esbuild-linux-arm": "0.14.21", - "esbuild-linux-arm64": "0.14.21", - "esbuild-linux-mips64le": "0.14.21", - "esbuild-linux-ppc64le": "0.14.21", - "esbuild-linux-riscv64": "0.14.21", - "esbuild-linux-s390x": "0.14.21", - "esbuild-netbsd-64": "0.14.21", - "esbuild-openbsd-64": "0.14.21", - "esbuild-sunos-64": "0.14.21", - "esbuild-windows-32": "0.14.21", - "esbuild-windows-64": "0.14.21", - "esbuild-windows-arm64": "0.14.21" + "esbuild-android-64": "0.14.31", + "esbuild-android-arm64": "0.14.31", + "esbuild-darwin-64": "0.14.31", + "esbuild-darwin-arm64": "0.14.31", + "esbuild-freebsd-64": "0.14.31", + "esbuild-freebsd-arm64": "0.14.31", + "esbuild-linux-32": "0.14.31", + "esbuild-linux-64": "0.14.31", + "esbuild-linux-arm": "0.14.31", + "esbuild-linux-arm64": "0.14.31", + "esbuild-linux-mips64le": "0.14.31", + "esbuild-linux-ppc64le": "0.14.31", + "esbuild-linux-riscv64": "0.14.31", + "esbuild-linux-s390x": "0.14.31", + "esbuild-netbsd-64": "0.14.31", + "esbuild-openbsd-64": "0.14.31", + "esbuild-sunos-64": "0.14.31", + "esbuild-windows-32": "0.14.31", + "esbuild-windows-64": "0.14.31", + "esbuild-windows-arm64": "0.14.31" } }, + "esbuild-android-64": { + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.31.tgz", + "integrity": "sha512-MYkuJ91w07nGmr4EouejOZK2j/f5TCnsKxY8vRr2+wpKKfHD1LTJK28VbZa+y1+AL7v1V9G98ezTUwsV3CmXNw==", + "dev": true, + "optional": true + }, "esbuild-android-arm64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.21.tgz", - "integrity": "sha512-Bqgld1TY0wZv8TqiQmVxQFgYzz8ZmyzT7clXBDZFkOOdRybzsnj8AZuK1pwcLVA7Ya6XncHgJqIao7NFd3s0RQ==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.31.tgz", + "integrity": "sha512-0rkH/35s7ZVcsw6nS0IAkR0dekSbjZGWdlOAf3jV0lGoPqqw0x6/TmaV9w7DQgUERTH1ApmPlpAMU4kVkCq9Jg==", "dev": true, "optional": true }, "esbuild-darwin-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.21.tgz", - "integrity": "sha512-j+Eg+e13djzyYINVvAbOo2/zvZ2DivuJJTaBrJnJHSD7kUNuGHRkHoSfFjbI80KHkn091w350wdmXDNSgRjfYQ==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.31.tgz", + "integrity": "sha512-kP6xPZHxtJa36Hb0jC05L3VzQSZBW2f3bpnQS20czXTRGEmM2GDiYpGdI5g2QYaw6vC4PYXjnigq8usd9g9jnQ==", "dev": true, "optional": true }, "esbuild-darwin-arm64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.21.tgz", - "integrity": "sha512-nDNTKWDPI0RuoPj5BhcSB2z5EmZJJAyRtZLIjyXSqSpAyoB8eyAKXl4lB8U2P78Fnh4Lh1le/fmpewXE04JhBQ==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.31.tgz", + "integrity": "sha512-1ZMog4hkNsdBGtDDtsftUqX6S9N52gEx4vX5aVehsSptgoBFIar1XrPiBTQty7YNH+bJasTpSVaZQgElCVvPKQ==", "dev": true, "optional": true }, "esbuild-freebsd-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.21.tgz", - "integrity": "sha512-zIurkCHXhxELiDZtLGiexi8t8onQc2LtuE+S7457H/pP0g0MLRKMrsn/IN4LDkNe6lvBjuoZZi2OfelOHn831g==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.31.tgz", + "integrity": "sha512-Zo0BYj7QpVFWoUpkv6Ng0RO2eJ4zk/WDaHMO88+jr5HuYmxsOre0imgwaZVPquTuJnCvL1G48BFucJ3tFflSeQ==", "dev": true, "optional": true }, "esbuild-freebsd-arm64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.21.tgz", - "integrity": "sha512-wdxMmkJfbwcN+q85MpeUEamVZ40FNsBa9mPq8tAszDn8TRT2HoJvVRADPIIBa9SWWwlDChIMjkDKAnS3KS/sPA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.31.tgz", + "integrity": "sha512-t85bS6jbRpmdjr4pdr/FY/fpx8lo1vv9S7BAs2EsXKJQhRDMIiC3QW+k2acYJoRuqirlvJcJVFQGCq/PfyC1kA==", "dev": true, "optional": true }, "esbuild-linux-32": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.21.tgz", - "integrity": "sha512-fmxvyzOPPh2xiEHojpCeIQP6pXcoKsWbz3ryDDIKLOsk4xp3GbpHIEAWP0xTeuhEbendmvBDVKbAVv3PnODXLg==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.31.tgz", + "integrity": "sha512-XYtOk/GodSkv+UOYVwryGpGPuFnszsMvRMKq6cIUfFfdssHuKDsU9IZveyCG44J106J39ABenQ5EetbYtVJHUw==", "dev": true, "optional": true }, "esbuild-linux-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.21.tgz", - "integrity": "sha512-edZyNOv1ql+kpmlzdqzzDjRQYls+tSyi4QFi+PdBhATJFUqHsnNELWA9vMSzAaInPOEaVUTA5Ml28XFChcy4DA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.31.tgz", + "integrity": "sha512-Zf9CZxAxaXWHLqCg/QZ/hs0RU0XV3IBxV+ENQzy00S4QOTnZAvSLgPciILHHrVJ0lPIlb4XzAqlLM5y6iI2LIw==", "dev": true, "optional": true }, "esbuild-linux-arm": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.21.tgz", - "integrity": "sha512-aSU5pUueK6afqmLQsbU+QcFBT62L+4G9hHMJDHWfxgid6hzhSmfRH9U/f+ymvxsSTr/HFRU4y7ox8ZyhlVl98w==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.31.tgz", + "integrity": "sha512-RpiaeHPRlgCCDskxoyIsI49BhcDtZ4cl8+SLffizDm0yMNWP538SUg0ezQ2TTOPj3/svaGIbkRDwYtAon0Sjkg==", "dev": true, "optional": true }, "esbuild-linux-arm64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.21.tgz", - "integrity": "sha512-t5qxRkq4zdQC0zXpzSB2bTtfLgOvR0C6BXYaRE/6/k8/4SrkZcTZBeNu+xGvwCU4b5dU9ST9pwIWkK6T1grS8g==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.31.tgz", + "integrity": "sha512-V/H0tv+xpQ9IOHM+o85oCKNNidIEc5CcnDWl0V+hPd2F03dqdbFkWPBGphx8rD4JSQn6UefUQ1iH7y1qIzO8Fw==", "dev": true, "optional": true }, "esbuild-linux-mips64le": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.21.tgz", - "integrity": "sha512-jLZLQGCNlUsmIHtGqNvBs3zN+7a4D9ckf0JZ+jQTwHdZJ1SgV9mAjbB980OFo66LoY+WeM7t3WEnq3FjI1zw4A==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.31.tgz", + "integrity": "sha512-9/oBfAckInRuUg6AEgdCLLn6KJ6UOJDOLmUinTsReVSg6AfV6wxYQJq9iQM2idRogP7GUpomJ+bvCdWXpotQRQ==", "dev": true, "optional": true }, "esbuild-linux-ppc64le": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.21.tgz", - "integrity": "sha512-4TWxpK391en2UBUw6GSrukToTDu6lL9vkm3Ll40HrI08WG3qcnJu7bl8e1+GzelDsiw1QmfAY/nNvJ6iaHRpCQ==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.31.tgz", + "integrity": "sha512-NMcb14Pg+8q8raGkzor9/R3vQwKzgxE3694BtO2SDLBwJuL2C1dQ1ZtM1t7ZvArQBgT8RiZVxb0/3fD+qGNk7g==", "dev": true, "optional": true }, "esbuild-linux-riscv64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.21.tgz", - "integrity": "sha512-fElngqOaOfTsF+u+oetDLHsPG74vB2ZaGZUqmGefAJn3a5z9Z2pNa4WpVbbKgHpaAAy5tWM1m1sbGohj6Ki6+Q==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.31.tgz", + "integrity": "sha512-l13yvmsVfawAnoYfcpuvml+nTlrOmtdceXYufSkXl2DOb0JKcuR6ARlAzuQCDcpo49SOJy1cCxpwlOIsUQBfzA==", "dev": true, "optional": true }, "esbuild-linux-s390x": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.21.tgz", - "integrity": "sha512-brleZ6R5fYv0qQ7ZBwenQmP6i9TdvJCB092c/3D3pTLQHBGHJb5zWgKxOeS7bdHzmLy6a6W7GbFk6QKpjyD6QA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.31.tgz", + "integrity": "sha512-GIwV9mY3koYja9MCSkKLk1P7rj+MkPV0UsGsZ575hEcIBrXeKN9jBi6X/bxDDPEN/SUAH35cJhBNrZU4x9lEfg==", "dev": true, "optional": true }, "esbuild-netbsd-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.21.tgz", - "integrity": "sha512-nCEgsLCQ8RoFWVV8pVI+kX66ICwbPP/M9vEa0NJGIEB/Vs5sVGMqkf67oln90XNSkbc0bPBDuo4G6FxlF7PN8g==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.31.tgz", + "integrity": "sha512-bJ+pyLvKQm+Obp5k7/Wk8e9Gdkls56F1aiI3uptoIfOIUqsZImH7pDyTrSufwqsFp62kO9LRuwXnjDwQtPyhFQ==", "dev": true, "optional": true }, "esbuild-openbsd-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.21.tgz", - "integrity": "sha512-h9zLMyVD0T73MDTVYIb/qUTokwI6EJH9O6wESuTNq6+XpMSr6C5aYZ4fvFKdNELW+Xsod+yDS2hV2JTUAbFrLA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.31.tgz", + "integrity": "sha512-NRAAPPca05H9j9Xab0kVXK0V6/pyZGGy8d2Y8KS0BMwWEydlD4KCJDmH8/7bWCKYLRGOOCE9/GPBJyPWHFW3sg==", "dev": true, "optional": true }, "esbuild-sunos-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.21.tgz", - "integrity": "sha512-Kl+7Cot32qd9oqpLdB1tEGXEkjBlijrIxMJ0+vlDFaqsODutif25on0IZlFxEBtL2Gosd4p5WCV1U7UskNQfXA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.31.tgz", + "integrity": "sha512-9uA+V8w9Eehu4ldb95lPWdgCMcMO5HH6pXmfkk5usn3JsSZxKdLKsXB4hYgP80wscZvVYXJl2G+KNxsUTfPhZw==", "dev": true, "optional": true }, "esbuild-windows-32": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.21.tgz", - "integrity": "sha512-V7vnTq67xPBUCk/9UtlolmQ798Ecjdr1ZoI1vcSgw7M82aSSt0eZdP6bh5KAFZU8pxDcx3qoHyWQfHYr11f22A==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.31.tgz", + "integrity": "sha512-VGdncQTqoxD9q3v/dk0Yugbmx2FzOkcs0OemBYc1X9KXOLQYH0uQbLJIckZdZOC3J+JKSExbYFrzYCOwWPuNyA==", "dev": true, "optional": true }, "esbuild-windows-64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.21.tgz", - "integrity": "sha512-kDgHjKOHwjfJDCyRGELzVxiP/RBJBTA+wyspf78MTTJQkyPuxH2vChReNdWc+dU2S4gIZFHMdP1Qrl/k22ZmaA==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.31.tgz", + "integrity": "sha512-v/2ye5zBqpmCzi3bLCagStbNQlnOsY7WtMrD2Q0xZxeSIXONxji15KYtVee5o7nw4lXWbQSS1BL8G6BBMvtq4A==", "dev": true, "optional": true }, "esbuild-windows-arm64": { - "version": "0.14.21", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.21.tgz", - "integrity": "sha512-8Sbo0zpzgwWrwjQYLmHF78f7E2xg5Ve63bjB2ng3V2aManilnnTGaliq2snYg+NOX60+hEvJHRdVnuIAHW0lVw==", + "version": "0.14.31", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.31.tgz", + "integrity": "sha512-RXeU42FJoG1sriNHg73h4S+5B7L/gw+8T7U9u8IWqSSEbY6fZvBh4uofugiU1szUDqqP00GHwZ09WgYe3lGZiw==", "dev": true, "optional": true }, @@ -6875,9 +6906,9 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nanoid": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.0.tgz", - "integrity": "sha512-JzxqqT5u/x+/KOFSd7JP15DOo9nOoHpx6DYatqIHUW2+flybkm+mdcraotSQR5WcnZr+qhGVh8Ted0KdfSMxlg==" + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" }, "natural-compare": { "version": "1.4.0", @@ -7150,11 +7181,11 @@ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, "postcss": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.6.tgz", - "integrity": "sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA==", + "version": "8.4.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", + "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==", "requires": { - "nanoid": "^3.2.0", + "nanoid": "^3.3.4", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } @@ -7849,14 +7880,14 @@ } }, "vite": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-2.8.2.tgz", - "integrity": "sha512-zawfykcPVPYva4KusIWORNLr324Qx86/3NpfQSIOJdjnL5pYhwDoImLYMOh4lFLcP/7//tNuWM2vx2F5OSVC9w==", + "version": "2.9.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-2.9.8.tgz", + "integrity": "sha512-zsBGwn5UT3YS0NLSJ7hnR54+vUKfgzMUh/Z9CxF1YKEBVIe213+63jrFLmZphgGI5zXwQCSmqIdbPuE8NJywPw==", "dev": true, "requires": { - "esbuild": "^0.14.14", + "esbuild": "^0.14.27", "fsevents": "~2.3.2", - "postcss": "^8.4.6", + "postcss": "^8.4.13", "resolve": "^1.22.0", "rollup": "^2.59.0" } diff --git a/package.json b/package.json index 5bd3548..0db87fd 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "mocha": "^9.2.1", "nodemon": "^2.0.15", "prettier": "^2.5.1", - "vite": "^2.8.2" + "vite": "^2.9.8" }, "dependencies": { "express": "^4.17.2", diff --git a/server/routes/install-routes.js b/server/routes/install-routes.js index 9c269b1..3f72711 100644 --- a/server/routes/install-routes.js +++ b/server/routes/install-routes.js @@ -67,7 +67,7 @@ function installRoutes(app) { // account `package.json`. `exports`, see // https://github.com/mysticatea/eslint-plugin-node/issues/255 // eslint-disable-next-line node/no-missing-require - app.use(express.static(path.dirname(require.resolve('hydrogen-view-sdk/assets/index.js')))); + app.use(express.static(path.dirname(require.resolve('hydrogen-view-sdk/assets/main.js')))); app.get('/hydrogen-styles.css', async function (req, res) { res.set('Content-Type', 'text/css'); diff --git a/shared/ArchiveView.js b/shared/ArchiveView.js index a7d53fc..84adc4b 100644 --- a/shared/ArchiveView.js +++ b/shared/ArchiveView.js @@ -1,6 +1,6 @@ 'use strict'; -const { TemplateView, RoomView, RightPanelView } = require('hydrogen-view-sdk'); +const { TemplateView, RoomView, RightPanelView, viewClassForTile } = require('hydrogen-view-sdk'); class ArchiveView extends TemplateView { render(t, vm) { @@ -10,7 +10,10 @@ class ArchiveView extends TemplateView { ArchiveView: true, }, }, - [t.view(new RoomView(vm.roomViewModel)), t.view(new RightPanelView(vm.rightPanelModel))] + [ + t.view(new RoomView(vm.roomViewModel, viewClassForTile)), + t.view(new RightPanelView(vm.rightPanelModel)), + ] ); } } diff --git a/shared/hydrogen-vm-render-script.js b/shared/hydrogen-vm-render-script.js index 0834ce1..d47b4c5 100644 --- a/shared/hydrogen-vm-render-script.js +++ b/shared/hydrogen-vm-render-script.js @@ -9,7 +9,7 @@ const { TilesCollection, FragmentIdComparer, - tilesCreator: makeTilesCreator, + tileClassForEntry, EventEntry, encodeKey, encodeEventIdKey, @@ -79,7 +79,12 @@ async function mountHydrogen() { const platformConfig = {}; const assetPaths = {}; - const platform = new Platform(app, assetPaths, platformConfig, { development: true }); + const platform = new Platform({ + container: app, + assetPaths, + config: platformConfig, + options: { development: true }, + }); const navigation = createNavigation(); platform.setNavigation(navigation); @@ -139,16 +144,6 @@ async function mountHydrogen() { mediaRepository: mediaRepository, }; - const tilesCreator = makeTilesCreator({ - platform, - roomVM: { - room, - }, - timeline, - urlCreator: urlRouter, - navigation, - }); - // Something we can modify with new state updates as we see them const workingStateEventMap = { ...stateEventMap, @@ -162,6 +157,7 @@ async function mountHydrogen() { return makeEventEntryFromEventJson(event, memberEvent); }); //console.log('eventEntries', eventEntries); + console.log('eventEntries', eventEntries.length); // We have to use `timeline._setupEntries([])` because it sets // `this._allEntries` in `Timeline` and we don't want to use `timeline.load()` @@ -174,8 +170,21 @@ async function mountHydrogen() { //console.log('timeline.entries', timeline.entries.length, timeline.entries); - const tiles = new TilesCollection(timeline.entries, tilesCreator); - // Trigger onSubscribeFirst -> tiles._populateTiles(); + const tiles = new TilesCollection(timeline.entries, { + tileClassForEntry, + platform, + navigation, + urlCreator: urlRouter, + timeline, + roomVM: { + room, + }, + }); + // Trigger `onSubscribeFirst` -> `tiles._populateTiles()` so it creates a tile + // for each entry to display. This way we can also call `tile.notifyVisible()` + // on each tile so that the tile creation doesn't happen later when the + // `TilesListView` is mounted and subscribes which is a bit out of our + // control. tiles.subscribe({ onAdd: () => null, onUpdate: () => null }); // Make the lazy-load images appear @@ -186,7 +195,7 @@ async function mountHydrogen() { const timelineViewModel = { showJumpDown: false, setVisibleTileRange: () => {}, - tiles: tiles, + tiles, }; // const view = new TimelineView(timelineViewModel);