Skip to content

Commit

Permalink
Upgrade Lit to 2.8 and add Shoelace styles (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuaYoo committed Aug 16, 2023
1 parent 3c88762 commit 32193ab
Show file tree
Hide file tree
Showing 7 changed files with 370 additions and 288 deletions.
9 changes: 7 additions & 2 deletions _data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
"license": "AGPL-3.0-or-later",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4",
"@shoelace-style/shoelace": "^2.7.0",
"@webrecorder/wabac": "^2.16.8",
"bulma": "^0.9.3",
"electron-log": "^4.4.1",
"electron-updater": "^5.3.0",
"fetch-ndjson": "^1.1.6",
"flexsearch": "^0.7.31",
"keyword-mark-element": "^0.2.0",
"lit": "^2.1.1",
"lit": "^2.8.0",
"marked": "^4.0.10",
"mime-types": "^2.1.32",
"minimist": "^1.2.5",
Expand All @@ -37,10 +38,13 @@
"http-server": "^13.0.2",
"mini-css-extract-plugin": "^2.3.0",
"node-sass": "^9.0.0",
"prettier": "^3.0.1",
"raw-loader": "^4.0.2",
"sass-loader": "^13.3.2",
"style-loader": "^3.2.1",
"svg-inline-loader": "^0.8.2",
"ts-loader": "^9.4.4",
"typescript": "^5.1.6",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1"
Expand All @@ -67,7 +71,8 @@
"dist": "yarn run build && yarn run pack",
"dist-dev": "yarn run build-dev && yarn run pack",
"release": "yarn run build && electron-builder",
"lint": "eslint ./src/ webpack.config.js"
"lint": "eslint ./src/ webpack.config.js",
"format-ts": "prettier --write \"src/**/*.ts\""
},
"build": {
"afterSign": "build/notarize.js",
Expand Down
2 changes: 2 additions & 0 deletions assets/main.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@charset "utf-8";

@import "@shoelace-style/shoelace/dist/themes/light.css";

/*$wr-green: #64e986;*/
$wr-green: #55be6f;
$wr-yellow: #ffd975;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
"license": "AGPL-3.0-or-later",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4",
"@shoelace-style/shoelace": "^2.7.0",
"@webrecorder/wabac": "^2.16.8",
"bulma": "^0.9.3",
"electron-log": "^4.4.1",
"electron-updater": "^5.3.0",
"fetch-ndjson": "^1.1.6",
"flexsearch": "^0.7.31",
"keyword-mark-element": "^0.2.0",
"lit": "^2.1.1",
"lit": "^2.8.0",
"marked": "^4.0.10",
"mime-types": "^2.1.32",
"minimist": "^1.2.5",
Expand Down
1 change: 1 addition & 0 deletions src/shoelace.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Cherry-picked Shoelace components:
1 change: 1 addition & 0 deletions src/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Replay } from "./replay";
import { Sorter } from "./sorter";
import { URLResources } from "./url-resources";
import { Embed } from "./embed";
import "./shoelace";

export {
ReplayWebApp,
Expand Down
530 changes: 265 additions & 265 deletions ui.js

Large diffs are not rendered by default.

112 changes: 92 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@ctrl/tinycolor@^3.5.0":
version "3.6.0"
resolved "https://registry.yarnpkg.com/@ctrl/tinycolor/-/tinycolor-3.6.0.tgz#53fa5fe9c34faee89469e48f91d51a3766108bc8"
integrity sha512-/Z3l6pXthq0JvMYdUFyX9j0MaCltlIn6mfh9jLyQwg5aPKxkyNa0PTHtU1AlFXLNk55ZuAeJRcpvq+tmLfKmaQ==

"@develar/schema-utils@~2.6.5":
version "2.6.5"
resolved "https://registry.yarnpkg.com/@develar/schema-utils/-/schema-utils-2.6.5.tgz#3ece22c5838402419a6e0425f85742b961d9b6c6"
Expand Down Expand Up @@ -84,6 +89,26 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"

"@floating-ui/core@^1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.4.1.tgz#0d633f4b76052668afb932492ac452f7ebe97f17"
integrity sha512-jk3WqquEJRlcyu7997NtR5PibI+y5bi+LS3hPmguVClypenMsCY3CBa3LAQnozRCtCrYWSEtAdiskpamuJRFOQ==
dependencies:
"@floating-ui/utils" "^0.1.1"

"@floating-ui/dom@^1.2.1":
version "1.5.1"
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.5.1.tgz#88b70defd002fe851f17b4a25efb2d3c04d7a8d7"
integrity sha512-KwvVcPSXg6mQygvA1TjbN/gh///36kKtllIF8SUm0qpFj8+rvYrpvlYdL1JoA71SHpDqgSSdGOSoQ0Mp3uY5aw==
dependencies:
"@floating-ui/core" "^1.4.1"
"@floating-ui/utils" "^0.1.1"

"@floating-ui/utils@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.1.1.tgz#1a5b1959a528e374e8037c4396c3e825d6cf4a83"
integrity sha512-m0G6wlnhm/AX0H12IOWtK8gASEMffnX08RtKkCgTdHb9JpHKGloI7icFfLg9ZmQeavcvR0PKmzxClyuFPSjKWw==

"@fortawesome/fontawesome-free@^5.15.4":
version "5.15.4"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz#ecda5712b61ac852c760d8b3c79c96adca5554e5"
Expand Down Expand Up @@ -128,10 +153,22 @@
resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b"
integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==

"@lit/reactive-element@^1.1.0":
"@lit-labs/react@^1.1.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@lit-labs/react/-/react-1.2.1.tgz#5b421502cdf68a3639dec431318eeed2285f1c0e"
integrity sha512-DiZdJYFU0tBbdQkfwwRSwYyI/mcWkg3sWesKRsHUd4G+NekTmmeq9fzsurvcKTNVa0comNljwtg4Hvi1ds3V+A==

"@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.1.1.tgz#523b29e529e881fce47bab764ea1b8058fd45796"
integrity sha512-B2JdRMwCGv+VpIRj3CYVQBx3muPDeE8y+HPgWqzrAHsO5/40BpwDFZeplIV790BaTqDVUDvZOKMSbuFM9zWC0w==
resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.1.tgz#64df34e2f12e68e78ac57e571d25ec07fa460ca9"
integrity sha512-kXOeFbfCm4fFf2A3WwVEeQj55tMZa8c8/f9AKHMobQMkzNUfUj+antR3fRPaZJawsa1aZiP/Da3ndpZrwEe4rQ==

"@lit/reactive-element@^1.3.0", "@lit/reactive-element@^1.6.0":
version "1.6.3"
resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.6.3.tgz#25b4eece2592132845d303e091bad9b04cdcfe03"
integrity sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==
dependencies:
"@lit-labs/ssr-dom-shim" "^1.0.0"

"@malept/cross-spawn-promise@^1.1.0":
version "1.1.1"
Expand Down Expand Up @@ -327,6 +364,30 @@
tslib "^2.4.1"
tsyringe "^4.7.0"

"@shoelace-style/animations@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@shoelace-style/animations/-/animations-1.1.0.tgz#17539abafd6dcbf2a79e089e1593175e9f7835b5"
integrity sha512-Be+cahtZyI2dPKRm8EZSx3YJQ+jLvEcn3xzRP7tM4tqBnvd/eW/64Xh0iOf0t2w5P8iJKfdBbpVNE9naCaOf2g==

"@shoelace-style/localize@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@shoelace-style/localize/-/localize-3.1.1.tgz#f5b96e35a9a8709aa46d1aaa2359069c0db71534"
integrity sha512-NkM/hj3Js6yXCU9WxhsyxRUdyqUUUl/BSvIluUMptQteUWGOJaoyP1iMbOMqO544DYMzBfnoCw66ZHkGuTdKgA==

"@shoelace-style/shoelace@^2.7.0":
version "2.7.0"
resolved "https://registry.yarnpkg.com/@shoelace-style/shoelace/-/shoelace-2.7.0.tgz#3844488cc1d5de4dfa966949961cb6faf4c2b35a"
integrity sha512-w7FnHqBoYR6Ne42WZPW+bIJGIAGsUZgxF3WA9LLfqn3+Q4NOQ4r5jl/DEfsQmRUTmY0nUrs4WGO1CeTrhv6taA==
dependencies:
"@ctrl/tinycolor" "^3.5.0"
"@floating-ui/dom" "^1.2.1"
"@lit-labs/react" "^1.1.1"
"@shoelace-style/animations" "^1.1.0"
"@shoelace-style/localize" "^3.1.1"
composed-offset-position "^0.0.4"
lit "^2.7.5"
qr-creator "^1.0.0"

"@sindresorhus/is@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
Expand Down Expand Up @@ -1649,6 +1710,11 @@ compare-version@^0.1.2:
resolved "https://registry.yarnpkg.com/compare-version/-/compare-version-0.1.2.tgz#0162ec2d9351f5ddd59a9202cba935366a725080"
integrity sha1-AWLsLZNR9d3VmpICy6k1NmpyUIA=

composed-offset-position@^0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/composed-offset-position/-/composed-offset-position-0.0.4.tgz#ca8854abf15e3c235ecf4df125a27fe88af76ea4"
integrity sha512-vMlvu1RuNegVE0YsCDSV/X4X10j56mq7PCIyOKK74FxkXzGLwhOUmdkJLSdOBOMwWycobGUMgft2lp+YgTe8hw==

compressible@~2.0.16:
version "2.0.18"
resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba"
Expand Down Expand Up @@ -3581,29 +3647,30 @@ lines-and-columns@^1.1.6:
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=

lit-element@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.1.1.tgz#562d5ccbc8ba0c01d8ba4a0ac3576263167d2ccb"
integrity sha512-14ClnMAU8EXnzC+M2/KDd3SFmNUn1QUw1+GxWkEMwGV3iaH8ObunMlO5svzvaWlkSV0WlxJCi40NGnDVJ2XZKQ==
lit-element@^3.3.0:
version "3.3.3"
resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.3.3.tgz#10bc19702b96ef5416cf7a70177255bfb17b3209"
integrity sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==
dependencies:
"@lit/reactive-element" "^1.1.0"
lit-html "^2.1.0"
"@lit-labs/ssr-dom-shim" "^1.1.0"
"@lit/reactive-element" "^1.3.0"
lit-html "^2.8.0"

lit-html@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.1.1.tgz#f4da485798a0d967514d31730d387350fafb79f7"
integrity sha512-E4BImK6lopAYanJpvcGaAG8kQFF1ccIulPu2BRNZI7acFB6i4ujjjsnaPVFT1j/4lD9r8GKih0Y8d7/LH8SeyQ==
lit-html@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa"
integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==
dependencies:
"@types/trusted-types" "^2.0.2"

lit@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/lit/-/lit-2.1.1.tgz#65f43abca945988f696391f762c645ba51966b0b"
integrity sha512-yqDqf36IhXwOxIQSFqCMgpfvDCRdxLCLZl7m/+tO5C9W/OBHUj17qZpiMBT35v97QMVKcKEi1KZ3hZRyTwBNsQ==
lit@^2.7.5, lit@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e"
integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==
dependencies:
"@lit/reactive-element" "^1.1.0"
lit-element "^3.1.0"
lit-html "^2.1.0"
"@lit/reactive-element" "^1.6.0"
lit-element "^3.3.0"
lit-html "^2.8.0"

loader-runner@^4.2.0:
version "4.2.0"
Expand Down Expand Up @@ -4590,6 +4657,11 @@ pvutils@^1.1.3:
resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.3.tgz#f35fc1d27e7cd3dfbd39c0826d173e806a03f5a3"
integrity sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==

qr-creator@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/qr-creator/-/qr-creator-1.0.0.tgz#f350a8f0b5be02bd1fc1ef133a038a06ef8bc5ef"
integrity sha512-C0cqfbS1P5hfqN4NhsYsUXePlk9BO+a45bAQ3xLYjBL3bOIFzoVEjs79Fado9u9BPBD3buHi3+vY+C8tHh4qMQ==

qs@6.11.0, qs@^6.4.0:
version "6.11.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
Expand Down

0 comments on commit 32193ab

Please sign in to comment.