Compare commits

...
8 changed files with 193 additions and 131 deletions

No files matched your search

+1 -1
View File
@@ -153,7 +153,7 @@
"@octokit/rest": "22.0.1",
"@playwright/test": "1.65.1",
"@rsdoctor/rspack-plugin": "1.6.5",
"@rspack/core": "2.3.3",
"@rspack/core": "2.3.4",
"@rspack/dev-server": "2.2.2",
"@types/babel__plugin-transform-runtime": "7.9.5",
"@types/chromecast-caf-receiver": "7.0.1",
+105 -105
View File
@@ -531,13 +531,13 @@ importers:
version: 1.65.1
'@rsdoctor/rspack-plugin':
specifier: 1.6.5
version: 1.6.5(@emnapi/[email protected])(@emnapi/[email protected])(@rsbuild/[email protected]([email protected]))(@rspack/[email protected].3(@swc/[email protected]))([email protected])
version: 1.6.5(@emnapi/[email protected])(@emnapi/[email protected])(@rsbuild/[email protected]([email protected]))(@rspack/[email protected].4(@swc/[email protected]))([email protected])
'@rspack/core':
specifier: 2.3.3
version: 2.3.3(@swc/[email protected])
specifier: 2.3.4
version: 2.3.4(@swc/[email protected])
'@rspack/dev-server':
specifier: 2.2.2
version: 2.2.2(@rspack/[email protected].3(@swc/[email protected]))
version: 2.2.2(@rspack/[email protected].4(@swc/[email protected]))
'@types/babel__plugin-transform-runtime':
specifier: 7.9.5
version: 7.9.5
@@ -588,7 +588,7 @@ importers:
version: 5.1.1([email protected])
babel-loader:
specifier: 10.1.1
version: 10.1.1(@babel/[email protected])(@rspack/[email protected].3(@swc/[email protected]))
version: 10.1.1(@babel/[email protected])(@rspack/[email protected].4(@swc/[email protected]))
babel-plugin-polyfill-corejs3:
specifier: 1.0.0
version: 1.0.0(@babel/[email protected])
@@ -696,7 +696,7 @@ importers:
version: 3.10.1
rspack-manifest-plugin:
specifier: 5.2.2
version: 5.2.2(@rspack/[email protected].3(@swc/[email protected]))
version: 5.2.2(@rspack/[email protected].4(@swc/[email protected]))
serve:
specifier: 14.2.8
version: 14.2.8([email protected])
@@ -732,7 +732,7 @@ importers:
version: 1.1.3
webpackbar:
specifier: 7.0.0
version: 7.0.0(@rspack/[email protected].3(@swc/[email protected]))
version: 7.0.0(@rspack/[email protected].4(@swc/[email protected]))
workbox-build:
specifier: 7.4.1
version: 7.4.1(patch_hash=75e6346ad8d8af554c167f77ac7d9b9652f010398efdc6b399925a4795133099)([email protected])
@@ -3058,88 +3058,88 @@ packages:
typescript:
optional: true
'@rspack/[email protected].3':
resolution: {integrity: sha512-G9WcBOP/6ZWeqTM/G0/rkJRY4DWmYQvk2untzcpj92uO12tqjZ9BSMgtBFvwElwagfQBkX8PPutkAZgtnlAoWA==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-eBD71fbmoJKnxcHD03bukbAIOP5r7nD0Ehs+mUrUQlZ6N53EhuJsTeJ1oYdg5L4GoSeQ+KecCqME81Nm0COLrA==}
cpu: [arm64]
os: [darwin]
'@rspack/[email protected].3':
resolution: {integrity: sha512-6agI5XDoihay+84vzZgIwwpQQ3xBWbe2HTWBRc0n42LzynIj9h7Qv8CJzf1gSDV1Ts0jzDgAJCYUFJ6Ya5F6MA==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-CqdfzTLPVFQCniOy/GDVWbg+rqg31qfdzbFf8NYCzdDkCQg+p15hU2HsckD/1sLsaNB8Y55EjGz4ZyGDny0cHg==}
cpu: [x64]
os: [darwin]
'@rspack/[email protected].3':
resolution: {integrity: sha512-VdjK1mDq+GBexd041lmWBFmAvcWIZy7kepTJbJgxLeHYYOnI3KmBG15kemhlK0pBySa+bePX7p2w8uYtl1HsCA==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-T/Y1FYiSegcNc+oHuDOLRGIcc+eSdBnfbS70d51EWQj4+0TG/tlfuqFKeAIL3mnKUV5lDLaTz3vsoD0Sws5Fxw==}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@rspack/[email protected].3':
resolution: {integrity: sha512-xF4Wy4XwGjC3m13tFm1q9p9Qpm31qrk6f5zEMPZC31UVabb+2jrgTI1pfZ8IRuo9x/Qw9s+Zq3hyDbtJvvD8Pg==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-WZHCzZ532UfXFXNU8XyM8jb+I6wddegbs/7IXsyw7xiPwwZX1D/M6iKFVpBYdvKcupUM8bS8Uw2REirR/cERVw==}
cpu: [arm64]
os: [linux]
libc: [musl]
'@rspack/[email protected].3':
resolution: {integrity: sha512-jVmn+LpF44D4FdZyT91rlT/tPMdHIfPfQTgVzwPB5nDICp4b57SFjVBApuAPIxnLT1pKLkv/LIcdvGSdAeX12w==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-WeizqeI6HIh7Ax9w2tlmpTtipJWxXcdgt3QqI3N9LOixymlMD5yMBMZNPqwZ6cHXT9gOQ69SvPcVgMwxsdmceQ==}
cpu: [ppc64]
os: [linux]
libc: [glibc]
'@rspack/[email protected].3':
resolution: {integrity: sha512-JcQJm8M634jkbG6zJ3TfziKYsCINEAh3FwKuxLljvBgGDEupBxPuB0n2bXBIUeI8P9C33B45IYX6BwWYXll/zw==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-h+001Vbq8LyGwPMNkeRWidPOVKwlAbwNPskY3CjNlSw3euHkVchfhM3uo6+1h0GyTtb3rzsWqsfm1kar7m/tiQ==}
cpu: [riscv64]
os: [linux]
libc: [glibc]
'@rspack/[email protected].3':
resolution: {integrity: sha512-YMIOS7rFvCDnpeyxoVEVbM7U/TwcC2VDtN3Oiq9BenRsNTEvk0imINhuVRFanh15+wkiQHk9h0b+pzcggYLAsA==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-S1rlaCnNVG5s4WZ9odLsqN3ySh5TEdNTLXWapEK8x3iQl56aLtdvqXTfbJWHWnYLJuS7M1WqnQGdJNdjy2NDsA==}
cpu: [riscv64]
os: [linux]
libc: [musl]
'@rspack/[email protected].3':
resolution: {integrity: sha512-tHGtIG6GGHsk2KvSleQp/BrVqiGdjDsLJuMKR7hE7W1uJW6WDJ+a+Z23Rk5kHXh5BjeFLjXxcufGuokvmLmTag==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-0SkgGrgulVMam3xel5dMNKQ+U7BEpCczhF1avGT1DzDVIbMfIOsbb32gApQNSz0E7RfAQ/Pa5eWiA9oyRq7ZMQ==}
cpu: [s390x]
os: [linux]
libc: [glibc]
'@rspack/[email protected].3':
resolution: {integrity: sha512-spe8SjywfO+dD7Sk+vIpPaOXf56wstrgeuztfJdiI9zTeQmf/lhdaNUUSUAXlGIaLjrN/PhV8i5kbQ7VaAkenw==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-q7E6x3rJJ/9fJyLuRe5+KyEPi23BF/xkAU4xCM5VwLkTf+rVyOkDZfu0qOkxmILjrxllQPV+b/ojBL/ZaIeQPw==}
cpu: [x64]
os: [linux]
libc: [glibc]
'@rspack/[email protected].3':
resolution: {integrity: sha512-4E4OJodrmsS52zkSAWShG/F07etr0OG4oSrIN+/2BBgc0qR2wwu2T+rAs308IL3lbywlS+J+cynrRcsSFMD+Kg==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-rey4Tyasui/WeMn6KfhH5xyZGOMt+Ny+GDK7nGh9TSz/cb3/bisxqGzpbu6GJK8leDmTUDD5ZdpODexytA5rzQ==}
cpu: [x64]
os: [linux]
libc: [musl]
'@rspack/[email protected].3':
resolution: {integrity: sha512-AhlsPjW31TGP8N+J7OmbCPaamARUl+OQNiT3xo0PL5Dz5oMm+bEfYLostpehKyy8MNDrmJcY97M9pDb5MDMA0w==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-sDt2MSXZrIaMBa6UaEqmXEqebwpTOPAXLdo9CYJ2Fa9FJWP4TCYbn30mbvV38ZC2n5YX411DRbjck+s97CceIg==}
cpu: [wasm32]
'@rspack/[email protected].3':
resolution: {integrity: sha512-Zqbj7GBPtkJ8GlUKAjFgvmOxKkQwjfS3XfjwGBcmoIAUb4IxUsmMqvi+gfKrvI45SjYVFZaJnTpOJw6GL79K+Q==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-24YC1YSodLAJ8VsMQJmJSHCNvHTqK9JP5hj50T50WE8lCHNsNl/rIYXO9V0VlCYT/HshE6EHHzAeKdahiEOtcw==}
cpu: [arm64]
os: [win32]
'@rspack/[email protected].3':
resolution: {integrity: sha512-sJJmbrdzH6kI48mCsUu5a2+BzEktLmHrHUmWGkAPAi0zhi4anA7sOdS1+uERbkkd/XAzs0bdn3JXyT2djY+3IA==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-xmUNu6kgV9lLEkRP1Zb+t6i1Z1ZMEWXmLlMalPx8tHqndz2RflNMBBx6kjB2nAPQBIZgWufwm7dVGS0HKomCmw==}
cpu: [ia32]
os: [win32]
'@rspack/[email protected].3':
resolution: {integrity: sha512-1r3wxV1pBNykqpbEbZWqcrZd13PKLq0e7Ku6qv8IGKKeftuf3RUxTkeM5AzppGMGEIA9sw8mRdN7NvEXxqLLxw==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-WY+AkJqpbLtLEZiG1fE7CVJZ54y0qHeCiVmLxGBsh4OOGIDCs6v2Ub5COcPrYVzGJFGyeHUS29dV7JAs93qIHw==}
cpu: [x64]
os: [win32]
'@rspack/[email protected].3':
resolution: {integrity: sha512-wwF++36a3rqYi0G9zj+rUavn/GIMzbzXehelGS1jkYeKPHyPXrVYwRHqwEKNKMD9z+FdW4YJKQcfFkPlHEiwUg==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-wSOT16LVITL/IKeIiLXgN5Q5jZIDqnQ7Gmk+wzKOSZ6OHYNfEBXAKhSJuYtCBq8ovJuGl8cJjdqatAlHE5XKIA==}
'@rspack/[email protected].3':
resolution: {integrity: sha512-stAYr0SXf+ZFXFsWTv+Ljxoj/nQs2p7gX9V1kBwlO2IXlRAAhabLONYibT3ZeEGybx3kowrs7uJkcOQsuHgghw==}
'@rspack/[email protected].4':
resolution: {integrity: sha512-T8HGkIjPVDlGlIN8st/ICe8Gfixq8te75g/8crSdNSf8F+6884sBcKNky0CRdfPxao1C5SXV+Vjv1XJTjyu83w==}
engines: {node: ^20.19.0 || >=22.12.0}
peerDependencies:
'@module-federation/runtime-tools': ^0.24.1 || ^2.0.0
@@ -10861,7 +10861,7 @@ snapshots:
'@rsbuild/[email protected]([email protected])':
dependencies:
'@rspack/core': 2.3.3(@swc/[email protected])
'@rspack/core': 2.3.4(@swc/[email protected])
'@swc/helpers': 0.5.24
optionalDependencies:
core-js: 3.51.0
@@ -10880,13 +10880,13 @@ snapshots:
'@rsdoctor/[email protected]': {}
'@rsdoctor/[email protected](@emnapi/[email protected])(@emnapi/[email protected])(@rsbuild/[email protected]([email protected]))(@rspack/[email protected].3(@swc/[email protected]))([email protected])':
'@rsdoctor/[email protected](@emnapi/[email protected])(@emnapi/[email protected])(@rsbuild/[email protected]([email protected]))(@rspack/[email protected].4(@swc/[email protected]))([email protected])':
dependencies:
'@rsbuild/plugin-check-syntax': 1.6.1(@rsbuild/[email protected]([email protected]))
'@rsdoctor/graph': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/sdk': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))([email protected])
'@rsdoctor/types': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/utils': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/graph': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
'@rsdoctor/sdk': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))([email protected])
'@rsdoctor/types': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
'@rsdoctor/utils': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
'@rspack/resolver': 0.2.8(@emnapi/[email protected])(@emnapi/[email protected])
browserslist-load-config: 1.0.3
enhanced-resolve: 5.26.0
@@ -10905,10 +10905,10 @@ snapshots:
- utf-8-validate
- webpack
'@rsdoctor/[email protected](@rspack/[email protected].3(@swc/[email protected]))':
'@rsdoctor/[email protected](@rspack/[email protected].4(@swc/[email protected]))':
dependencies:
'@rsdoctor/types': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/utils': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/types': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
'@rsdoctor/utils': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
es-toolkit: 1.50.0
path-browserify: 1.0.1
source-map: 0.7.6
@@ -10916,15 +10916,15 @@ snapshots:
- '@rspack/core'
- webpack
'@rsdoctor/[email protected](@emnapi/[email protected])(@emnapi/[email protected])(@rsbuild/[email protected]([email protected]))(@rspack/[email protected].3(@swc/[email protected]))([email protected])':
'@rsdoctor/[email protected](@emnapi/[email protected])(@emnapi/[email protected])(@rsbuild/[email protected]([email protected]))(@rspack/[email protected].4(@swc/[email protected]))([email protected])':
dependencies:
'@rsdoctor/core': 1.6.5(@emnapi/[email protected])(@emnapi/[email protected])(@rsbuild/[email protected]([email protected]))(@rspack/[email protected].3(@swc/[email protected]))([email protected])
'@rsdoctor/graph': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/sdk': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))([email protected])
'@rsdoctor/types': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/utils': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/core': 1.6.5(@emnapi/[email protected])(@emnapi/[email protected])(@rsbuild/[email protected]([email protected]))(@rspack/[email protected].4(@swc/[email protected]))([email protected])
'@rsdoctor/graph': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
'@rsdoctor/sdk': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))([email protected])
'@rsdoctor/types': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
'@rsdoctor/utils': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
optionalDependencies:
'@rspack/core': 2.3.3(@swc/[email protected])
'@rspack/core': 2.3.4(@swc/[email protected])
transitivePeerDependencies:
- '@emnapi/core'
- '@emnapi/runtime'
@@ -10934,12 +10934,12 @@ snapshots:
- utf-8-validate
- webpack
'@rsdoctor/[email protected](@rspack/[email protected].3(@swc/[email protected]))([email protected])':
'@rsdoctor/[email protected](@rspack/[email protected].4(@swc/[email protected]))([email protected])':
dependencies:
'@rsdoctor/client': 1.6.5
'@rsdoctor/graph': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/types': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/utils': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/graph': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
'@rsdoctor/types': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
'@rsdoctor/utils': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
launch-editor: 2.14.2
safer-buffer: 2.1.2
socket.io: 4.8.1([email protected])
@@ -10951,19 +10951,19 @@ snapshots:
- utf-8-validate
- webpack
'@rsdoctor/[email protected](@rspack/[email protected].3(@swc/[email protected]))':
'@rsdoctor/[email protected](@rspack/[email protected].4(@swc/[email protected]))':
dependencies:
'@types/connect': 3.4.38
'@types/estree': 1.0.5
'@types/tapable': 2.3.0
source-map: 0.7.6
optionalDependencies:
'@rspack/core': 2.3.3(@swc/[email protected])
'@rspack/core': 2.3.4(@swc/[email protected])
'@rsdoctor/[email protected](@rspack/[email protected].3(@swc/[email protected]))':
'@rsdoctor/[email protected](@rspack/[email protected].4(@swc/[email protected]))':
dependencies:
'@babel/code-frame': 7.26.2
'@rsdoctor/types': 1.6.5(@rspack/[email protected].3(@swc/[email protected]))
'@rsdoctor/types': 1.6.5(@rspack/[email protected].4(@swc/[email protected]))
'@types/estree': 1.0.5
acorn: 8.18.0
acorn-import-attributes: 1.9.5([email protected])
@@ -10991,83 +10991,83 @@ snapshots:
- '@module-federation/runtime-tools'
- core-js
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
dependencies:
'@emnapi/core': 2.0.0-beta.3
'@emnapi/runtime': 2.0.0-beta.3
'@napi-rs/wasm-runtime': 1.2.7(@emnapi/[email protected])(@emnapi/[email protected])
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optional: true
'@rspack/[email protected].3':
'@rspack/[email protected].4':
optionalDependencies:
'@rspack/binding-darwin-arm64': 2.3.3
'@rspack/binding-darwin-x64': 2.3.3
'@rspack/binding-linux-arm64-gnu': 2.3.3
'@rspack/binding-linux-arm64-musl': 2.3.3
'@rspack/binding-linux-ppc64-gnu': 2.3.3
'@rspack/binding-linux-riscv64-gnu': 2.3.3
'@rspack/binding-linux-riscv64-musl': 2.3.3
'@rspack/binding-linux-s390x-gnu': 2.3.3
'@rspack/binding-linux-x64-gnu': 2.3.3
'@rspack/binding-linux-x64-musl': 2.3.3
'@rspack/binding-wasm32-wasi': 2.3.3
'@rspack/binding-win32-arm64-msvc': 2.3.3
'@rspack/binding-win32-ia32-msvc': 2.3.3
'@rspack/binding-win32-x64-msvc': 2.3.3
'@rspack/binding-darwin-arm64': 2.3.4
'@rspack/binding-darwin-x64': 2.3.4
'@rspack/binding-linux-arm64-gnu': 2.3.4
'@rspack/binding-linux-arm64-musl': 2.3.4
'@rspack/binding-linux-ppc64-gnu': 2.3.4
'@rspack/binding-linux-riscv64-gnu': 2.3.4
'@rspack/binding-linux-riscv64-musl': 2.3.4
'@rspack/binding-linux-s390x-gnu': 2.3.4
'@rspack/binding-linux-x64-gnu': 2.3.4
'@rspack/binding-linux-x64-musl': 2.3.4
'@rspack/binding-wasm32-wasi': 2.3.4
'@rspack/binding-win32-arm64-msvc': 2.3.4
'@rspack/binding-win32-ia32-msvc': 2.3.4
'@rspack/binding-win32-x64-msvc': 2.3.4
'@rspack/[email protected].3(@swc/[email protected])':
'@rspack/[email protected].4(@swc/[email protected])':
dependencies:
'@rspack/binding': 2.3.3
'@rspack/binding': 2.3.4
optionalDependencies:
'@swc/helpers': 0.5.24
'@rspack/[email protected](@rspack/[email protected].3(@swc/[email protected]))':
'@rspack/[email protected](@rspack/[email protected].4(@swc/[email protected]))':
optionalDependencies:
'@rspack/core': 2.3.3(@swc/[email protected])
'@rspack/core': 2.3.4(@swc/[email protected])
'@rspack/[email protected](@rspack/[email protected].3(@swc/[email protected]))':
'@rspack/[email protected](@rspack/[email protected].4(@swc/[email protected]))':
dependencies:
'@rspack/core': 2.3.3(@swc/[email protected])
'@rspack/dev-middleware': 2.0.6(@rspack/[email protected].3(@swc/[email protected]))
'@rspack/core': 2.3.4(@swc/[email protected])
'@rspack/dev-middleware': 2.0.6(@rspack/[email protected].4(@swc/[email protected]))
'@rspack/[email protected]': {}
@@ -11989,12 +11989,12 @@ snapshots:
[email protected]: {}
[email protected](@babel/[email protected])(@rspack/[email protected].3(@swc/[email protected])):
[email protected](@babel/[email protected])(@rspack/[email protected].4(@swc/[email protected])):
dependencies:
'@babel/core': 8.1.3
find-up: 5.0.0
optionalDependencies:
'@rspack/core': 2.3.3(@swc/[email protected])
'@rspack/core': 2.3.4(@swc/[email protected])
[email protected](@babel/[email protected]([email protected]))([email protected]):
dependencies:
@@ -15073,11 +15073,11 @@ snapshots:
[email protected]: {}
[email protected](@rspack/[email protected].3(@swc/[email protected])):
[email protected](@rspack/[email protected].4(@swc/[email protected])):
dependencies:
'@rspack/lite-tapable': 1.1.5
optionalDependencies:
'@rspack/core': 2.3.3(@swc/[email protected])
'@rspack/core': 2.3.4(@swc/[email protected])
[email protected]:
dependencies:
@@ -16069,14 +16069,14 @@ snapshots:
[email protected]: {}
[email protected](@rspack/[email protected].3(@swc/[email protected])):
[email protected](@rspack/[email protected].4(@swc/[email protected])):
dependencies:
ansis: 3.17.0
consola: 3.4.2
pretty-time: 1.1.0
std-env: 3.10.0
optionalDependencies:
'@rspack/core': 2.3.3(@swc/[email protected])
'@rspack/core': 2.3.4(@swc/[email protected])
[email protected]: {}
+4 -4
View File
@@ -153,18 +153,18 @@ export const computeEnergySuggestions = (
};
/**
* The dismissed statistics with the new one added, dropping statistics that
* The dismissed statistics with the new ones added, dropping statistics that
* no longer exist.
*/
export const updateDismissedSuggestions = (
dismissed: string[],
statisticId: string,
statisticIds: string[],
statistics: StatisticsMetaData[]
): string[] => {
const existing = new Set(statistics.map((meta) => meta.statistic_id));
return [
...dismissed.filter((id) => id !== statisticId && existing.has(id)),
statisticId,
...dismissed.filter((id) => !statisticIds.includes(id) && existing.has(id)),
...statisticIds,
];
};
+1 -3
View File
@@ -50,9 +50,7 @@ export class CloudStart extends LitElement {
.hass=${this.hass}
.narrow=${this.narrow}
back-path="/config"
.header=${this.hass.localize(
"ui.panel.config.cloud.login.landing_title"
)}
header="Home Assistant Link"
>
<cloud-signed-out-menu
slot="toolbar-icon"
@@ -57,6 +57,8 @@ const TAB_ICONS: Record<EnergySuggestionTab, string> = {
water: mdiWater,
};
const DISMISS_ALL_THRESHOLD = 3;
@customElement("ha-energy-suggestions")
export class EnergySuggestions extends LitElement {
@property({ attribute: false })
@@ -257,13 +259,28 @@ export class EnergySuggestions extends LitElement {
}
</h1>
<div class="card-content">
<p>
${this._i18n.localize(
suggestions.length
? "ui.panel.config.energy.suggestions.sub"
: "ui.panel.config.energy.suggestions.dismissed_sub"
)}
</p>
<div class="intro">
<p>
${this._i18n.localize(
suggestions.length
? "ui.panel.config.energy.suggestions.sub"
: "ui.panel.config.energy.suggestions.dismissed_sub"
)}
</p>
${
suggestions.length > DISMISS_ALL_THRESHOLD
? html`<ha-button
size="s"
appearance="plain"
variant="neutral"
@click=${this._dismissAll}
>${this._i18n.localize(
"ui.panel.config.energy.suggestions.dismiss_all"
)}</ha-button
>`
: nothing
}
</div>
${
suggestions.length
? html`<div class="items-container">
@@ -403,25 +420,38 @@ export class EnergySuggestions extends LitElement {
})}`;
}
private async _dismiss(ev: Event) {
private _dismiss(ev: Event) {
const suggestion: EnergyMeterSuggestion = (ev.currentTarget as any)
.suggestion;
const statisticId = suggestion.statisticId;
this._pendingDismissed = [...this._pendingDismissed, statisticId];
this._dismissStatistics([suggestion.statisticId], "dismiss_failed");
}
private _dismissAll() {
this._dismissStatistics(
this._view()!.suggestions.map((suggestion) => suggestion.statisticId),
"dismiss_all_failed"
);
}
private async _dismissStatistics(
statisticIds: string[],
failedKey: "dismiss_failed" | "dismiss_all_failed"
) {
this._pendingDismissed = [...this._pendingDismissed, ...statisticIds];
this._pendingRestored = this._pendingRestored.filter(
(id) => id !== statisticId
(id) => !statisticIds.includes(id)
);
try {
await this._saveDismissed((dismissed) =>
updateDismissedSuggestions(dismissed, statisticId, this._statistics!)
updateDismissedSuggestions(dismissed, statisticIds, this._statistics!)
);
} catch (err: any) {
this._pendingDismissed = this._pendingDismissed.filter(
(id) => id !== statisticId
(id) => !statisticIds.includes(id)
);
showAlertDialog(this, {
title: this._i18n.localize(
"ui.panel.config.energy.suggestions.dismiss_failed"
`ui.panel.config.energy.suggestions.${failedKey}`
),
text: err.message,
});
@@ -497,6 +527,15 @@ export class EnergySuggestions extends LitElement {
haStyle,
energyCardStyles,
css`
.intro {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0 var(--ha-space-4);
}
.intro ha-button {
margin-inline-start: auto;
}
.suggestion {
display: flex;
flex-wrap: wrap;
@@ -14,6 +14,7 @@ import { consume } from "../../../../common/decorators/consume";
import { formatNumberWithUnit } from "../../../../common/number/format_number";
import "../../../../components/chart/ha-chart-base";
import "../../../../components/chart/ha-chart-tooltip-marker";
import { wrapLitTooltipFormatter } from "../../../../components/chart/lit-tooltip-formatter";
import {
formattersContext,
internationalizationContext,
@@ -251,6 +252,23 @@ export class HuiEnergyDevicesGraphCard
<div style="direction:ltr; display: inline;">${value}</div>`;
};
private _renderLabelTooltip = wrapLitTooltipFormatter(
(params: { value: string }) => {
const series = this._chartData[0];
const item = (series?.data as any[] | undefined)?.find(
(d) => d.id === params.value
);
return item
? this._renderTooltip({
name: item.name,
value: item.value,
color: item.itemStyle.color,
seriesName: series.name,
})
: nothing;
}
);
private _createOptions = memoizeOne(
(
data: (BarSeriesOption | PieSeriesOption)[],
@@ -287,6 +305,12 @@ export class HuiEnergyDevicesGraphCard
type: "category",
inverse: true,
triggerEvent: true,
// ECharts types only list `show`, but the label tooltip takes the
// formatter too
tooltip: {
show: true,
formatter: this._renderLabelTooltip,
} as { show: boolean },
// take order from data
data: data[0]?.data?.map((d: any) => d.name),
axisLabel: {
+2 -1
View File
@@ -4796,6 +4796,8 @@
"add": "Add",
"dismiss": "Dismiss",
"dismiss_failed": "Couldn't dismiss this meter",
"dismiss_all": "Dismiss all",
"dismiss_all_failed": "Couldn't dismiss these meters",
"show_dismissed": "Show dismissed meters ({count})",
"hide_dismissed": "Hide dismissed meters",
"dismissed": "Dismissed",
@@ -7356,7 +7358,6 @@
"description_features": "Access your system away from home. Control your home with Google Home and Alexa.",
"login": {
"title": "Home Assistant Link login",
"landing_title": "[%key:ui::panel::config::cloud::account::onboarding::ha_cloud_title%]",
"hero_title": "Tools for your home, support for the Open Home",
"hero_lead": "The easy, secure, and private way to get more out of Home Assistant, and the simplest way to fund its development.",
"trial_note": "Try free for a month. No payment information required up front.",
+3 -3
View File
@@ -217,18 +217,18 @@ describe("computeEnergySuggestions", () => {
});
describe("updateDismissedSuggestions", () => {
it("adds the statistic and drops statistics that no longer exist", () => {
it("adds the statistics and drops statistics that no longer exist", () => {
expect(
updateDismissedSuggestions(
["sensor.removed", "sensor.kept", "sensor.new"],
"sensor.new",
["sensor.new", "sensor.other"],
[
statistic("sensor.kept"),
statistic("sensor.new"),
statistic("sensor.other"),
]
)
).toEqual(["sensor.kept", "sensor.new"]);
).toEqual(["sensor.kept", "sensor.new", "sensor.other"]);
});
});