From 9854f1907df579e4ccd0e1f10e4d1cc0305cb40a Mon Sep 17 00:00:00 2001 From: Nils Bergmann Date: Tue, 19 Dec 2023 20:39:49 +0100 Subject: [PATCH] feat: color support for useNewLight --- deno.lock | 251 +++++++++--------- reactive_home/src/composeables/useNewLight.ts | 128 ++++++--- reactive_home/src/composeables/useState.ts | 40 ++- reactive_home/src/dep.ts | 10 +- reactive_home/src/lib/time.ts | 7 + reactive_home/src/public.ts | 1 + 6 files changed, 268 insertions(+), 169 deletions(-) create mode 100644 reactive_home/src/lib/time.ts diff --git a/deno.lock b/deno.lock index dcfa38d..6d18a6f 100644 --- a/deno.lock +++ b/deno.lock @@ -1,8 +1,10 @@ { - "version": "2", + "version": "3", + "redirects": { + "https://esm.noim.io/v128/@types/color-name@latest/index.d.ts": "https://esm.noim.io/v128/@types/color-name@1.1.3/index.d.ts", + "https://esm.noim.io/v128/@types/color@latest/index.d.ts": "https://esm.noim.io/v128/@types/color@3.0.6/index.d.ts" + }, "remote": { - "https://cdn.skypack.dev/-/date-fns@v2.29.3-0RSog6bigd3QCHssXhzG/dist=es2019,mode=imports/optimized/date-fns.js": "76c388491eb66a125296045d14baf2569c5bff73fbb742ecace8362426f027ae", - "https://cdn.skypack.dev/date-fns@2.29.3": "182208ebcfd101338f365571cd1d3dd90cab04ff66b14c2253234afb7b26f91f", "https://deno.land/std@0.170.0/_util/asserts.ts": "d0844e9b62510f89ce1f9878b046f6a57bf88f208a10304aab50efcb48365272", "https://deno.land/std@0.170.0/_util/os.ts": "8a33345f74990e627b9dfe2de9b040004b08ea5146c7c9e8fe9a29070d193934", "https://deno.land/std@0.170.0/encoding/base64.ts": "8605e018e49211efc767686f6f687827d7f5fd5217163e981d8d693105640d7a", @@ -16,50 +18,93 @@ "https://deno.land/std@0.170.0/path/posix.ts": "b859684bc4d80edfd4cad0a82371b50c716330bed51143d6dcdbe59e6278b30c", "https://deno.land/std@0.170.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9", "https://deno.land/std@0.170.0/path/win32.ts": "7cebd2bda6657371adc00061a1d23fdd87bcdf64b4843bb148b0b24c11b40f69", - "https://deno.land/std@0.173.0/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462", - "https://deno.land/std@0.173.0/_util/os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3", - "https://deno.land/std@0.173.0/flags/mod.ts": "d1cdefa18472ef69858a17df5cf7c98445ed27ac10e1460183081303b0ebc270", - "https://deno.land/std@0.173.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", - "https://deno.land/std@0.173.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", - "https://deno.land/std@0.173.0/path/_util.ts": "86c2375a996c1931b2f2ac71fefd5ddf0cf0e579fa4ab12d3e4c552d4223b8d8", - "https://deno.land/std@0.173.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000", - "https://deno.land/std@0.173.0/path/glob.ts": "d479e0a695621c94d3fd7fe7abd4f9499caf32a8de13f25073451c6ef420a4e1", - "https://deno.land/std@0.173.0/path/mod.ts": "4b83694ac500d7d31b0cdafc927080a53dc0c3027eb2895790fb155082b0d232", - "https://deno.land/std@0.173.0/path/posix.ts": "0874b341c2c6968ca38d323338b8b295ea1dae10fa872a768d812e2e7d634789", - "https://deno.land/std@0.173.0/path/separator.ts": "0fb679739d0d1d7bf45b68dacfb4ec7563597a902edbaf3c59b50d5bcadd93b1", - "https://deno.land/std@0.173.0/path/win32.ts": "672942919dd66ce1b8c224e77d3447e2ad8254eaff13fe6946420a9f78fa141e", - "https://deno.land/std@0.178.0/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462", - "https://deno.land/std@0.178.0/_util/os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3", - "https://deno.land/std@0.178.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", - "https://deno.land/std@0.178.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", - "https://deno.land/std@0.178.0/path/_util.ts": "d7abb1e0dea065f427b89156e28cdeb32b045870acdf865833ba808a73b576d0", - "https://deno.land/std@0.178.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000", - "https://deno.land/std@0.178.0/path/glob.ts": "d479e0a695621c94d3fd7fe7abd4f9499caf32a8de13f25073451c6ef420a4e1", - "https://deno.land/std@0.178.0/path/mod.ts": "4b83694ac500d7d31b0cdafc927080a53dc0c3027eb2895790fb155082b0d232", - "https://deno.land/std@0.178.0/path/posix.ts": "8b7c67ac338714b30c816079303d0285dd24af6b284f7ad63da5b27372a2c94d", - "https://deno.land/std@0.178.0/path/separator.ts": "0fb679739d0d1d7bf45b68dacfb4ec7563597a902edbaf3c59b50d5bcadd93b1", - "https://deno.land/std@0.178.0/path/win32.ts": "d186344e5583bcbf8b18af416d13d82b35a317116e6460a5a3953508c3de5bba", - "https://deno.land/std@0.193.0/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462", - "https://deno.land/std@0.193.0/_util/os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3", - "https://deno.land/std@0.193.0/flags/mod.ts": "17f444ddbee43c5487568de0c6a076c7729cfe90d96d2ffcd2b8f8adadafb6e8", - "https://deno.land/std@0.193.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", - "https://deno.land/std@0.193.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", - "https://deno.land/std@0.193.0/path/_util.ts": "d7abb1e0dea065f427b89156e28cdeb32b045870acdf865833ba808a73b576d0", - "https://deno.land/std@0.193.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000", - "https://deno.land/std@0.193.0/path/glob.ts": "d479e0a695621c94d3fd7fe7abd4f9499caf32a8de13f25073451c6ef420a4e1", - "https://deno.land/std@0.193.0/path/mod.ts": "f065032a7189404fdac3ad1a1551a9ac84751d2f25c431e101787846c86c79ef", - "https://deno.land/std@0.193.0/path/posix.ts": "8b7c67ac338714b30c816079303d0285dd24af6b284f7ad63da5b27372a2c94d", - "https://deno.land/std@0.193.0/path/separator.ts": "0fb679739d0d1d7bf45b68dacfb4ec7563597a902edbaf3c59b50d5bcadd93b1", - "https://deno.land/std@0.193.0/path/win32.ts": "d186344e5583bcbf8b18af416d13d82b35a317116e6460a5a3953508c3de5bba", + "https://deno.land/std@0.209.0/assert/assert.ts": "e265ad50a9341f3b40e51dd4cb41ab253d976943ba78a977106950e52e0302ab", + "https://deno.land/std@0.209.0/assert/assertion_error.ts": "26ed1863d905005f00785c89750c001c3522c5417e4f58f95044b8143cfc1593", + "https://deno.land/std@0.209.0/fmt/colors.ts": "34b3f77432925eb72cf0bfb351616949746768620b8e5ead66da532f93d10ba2", + "https://deno.land/std@0.209.0/path/_common/assert_path.ts": "061e4d093d4ba5aebceb2c4da3318bfe3289e868570e9d3a8e327d91c2958946", + "https://deno.land/std@0.209.0/path/_common/basename.ts": "0d978ff818f339cd3b1d09dc914881f4d15617432ae519c1b8fdc09ff8d3789a", + "https://deno.land/std@0.209.0/path/_common/common.ts": "9e4233b2eeb50f8b2ae10ecc2108f58583aea6fd3e8907827020282dc2b76143", + "https://deno.land/std@0.209.0/path/_common/constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0", + "https://deno.land/std@0.209.0/path/_common/dirname.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://deno.land/std@0.209.0/path/_common/format.ts": "11aa62e316dfbf22c126917f5e03ea5fe2ee707386555a8f513d27ad5756cf96", + "https://deno.land/std@0.209.0/path/_common/from_file_url.ts": "ef1bf3197d2efbf0297a2bdbf3a61d804b18f2bcce45548ae112313ec5be3c22", + "https://deno.land/std@0.209.0/path/_common/glob_to_reg_exp.ts": "50386887d6041f15741d0013a703ee63ef673983d465d3a0c9c190e95f8da4fe", + "https://deno.land/std@0.209.0/path/_common/normalize.ts": "2ba7fb4cc9fafb0f38028f434179579ce61d4d9e51296fad22b701c3d3cd7397", + "https://deno.land/std@0.209.0/path/_common/normalize_string.ts": "88c472f28ae49525f9fe82de8c8816d93442d46a30d6bb5063b07ff8a89ff589", + "https://deno.land/std@0.209.0/path/_common/relative.ts": "1af19d787a2a84b8c534cc487424fe101f614982ae4851382c978ab2216186b4", + "https://deno.land/std@0.209.0/path/_common/strip_trailing_separators.ts": "7ffc7c287e97bdeeee31b155828686967f222cd73f9e5780bfe7dfb1b58c6c65", + "https://deno.land/std@0.209.0/path/_common/to_file_url.ts": "a8cdd1633bc9175b7eebd3613266d7c0b6ae0fb0cff24120b6092ac31662f9ae", + "https://deno.land/std@0.209.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b", + "https://deno.land/std@0.209.0/path/_os.ts": "30b0c2875f360c9296dbe6b7f2d528f0f9c741cecad2e97f803f5219e91b40a2", + "https://deno.land/std@0.209.0/path/basename.ts": "04bb5ef3e86bba8a35603b8f3b69537112cdd19ce64b77f2522006da2977a5f3", + "https://deno.land/std@0.209.0/path/common.ts": "f4d061c7d0b95a65c2a1a52439edec393e906b40f1caf4604c389fae7caa80f5", + "https://deno.land/std@0.209.0/path/dirname.ts": "88a0a71c21debafc4da7a4cd44fd32e899462df458fbca152390887d41c40361", + "https://deno.land/std@0.209.0/path/extname.ts": "2da4e2490f3b48b7121d19fb4c91681a5e11bd6bd99df4f6f47d7a71bb6ecdf2", + "https://deno.land/std@0.209.0/path/format.ts": "3457530cc85d1b4bab175f9ae73998b34fd456c830d01883169af0681b8894fb", + "https://deno.land/std@0.209.0/path/from_file_url.ts": "e7fa233ea1dff9641e8d566153a24d95010110185a6f418dd2e32320926043f8", + "https://deno.land/std@0.209.0/path/glob_to_regexp.ts": "74d7448c471e293d03f05ccb968df4365fed6aaa508506b6325a8efdc01d8271", + "https://deno.land/std@0.209.0/path/is_absolute.ts": "67232b41b860571c5b7537f4954c88d86ae2ba45e883ee37d3dec27b74909d13", + "https://deno.land/std@0.209.0/path/is_glob.ts": "567dce5c6656bdedfc6b3ee6c0833e1e4db2b8dff6e62148e94a917f289c06ad", + "https://deno.land/std@0.209.0/path/join.ts": "98d3d76c819af4a11a81d5ba2dbb319f1ce9d63fc2b615597d4bcfddd4a89a09", + "https://deno.land/std@0.209.0/path/join_globs.ts": "9b84d5103b63d3dbed4b2cf8b12477b2ad415c7d343f1488505162dc0e5f4db8", + "https://deno.land/std@0.209.0/path/mod.ts": "3defabebc98279e62b392fee7a6937adc932a8f4dcd2471441e36c15b97b00e0", + "https://deno.land/std@0.209.0/path/normalize.ts": "aa95be9a92c7bd4f9dc0ba51e942a1973e2b93d266cd74f5ca751c136d520b66", + "https://deno.land/std@0.209.0/path/normalize_glob.ts": "674baa82e1c00b6cb153bbca36e06f8e0337cb8062db6d905ab5de16076ca46b", + "https://deno.land/std@0.209.0/path/parse.ts": "d87ff0deef3fb495bc0d862278ff96da5a06acf0625ca27769fc52ac0d3d6ece", + "https://deno.land/std@0.209.0/path/posix/_util.ts": "ecf49560fedd7dd376c6156cc5565cad97c1abe9824f4417adebc7acc36c93e5", + "https://deno.land/std@0.209.0/path/posix/basename.ts": "a630aeb8fd8e27356b1823b9dedd505e30085015407caa3396332752f6b8406a", + "https://deno.land/std@0.209.0/path/posix/common.ts": "e781d395dc76f6282e3f7dd8de13194abb8b04a82d109593141abc6e95755c8b", + "https://deno.land/std@0.209.0/path/posix/dirname.ts": "f48c9c42cc670803b505478b7ef162c7cfa9d8e751b59d278b2ec59470531472", + "https://deno.land/std@0.209.0/path/posix/extname.ts": "ee7f6571a9c0a37f9218fbf510c440d1685a7c13082c348d701396cc795e0be0", + "https://deno.land/std@0.209.0/path/posix/format.ts": "b94876f77e61bfe1f147d5ccb46a920636cd3cef8be43df330f0052b03875968", + "https://deno.land/std@0.209.0/path/posix/from_file_url.ts": "b97287a83e6407ac27bdf3ab621db3fccbf1c27df0a1b1f20e1e1b5acf38a379", + "https://deno.land/std@0.209.0/path/posix/glob_to_regexp.ts": "6ed00c71fbfe0ccc35977c35444f94e82200b721905a60bd1278b1b768d68b1a", + "https://deno.land/std@0.209.0/path/posix/is_absolute.ts": "159900a3422d11069d48395568217eb7fc105ceda2683d03d9b7c0f0769e01b8", + "https://deno.land/std@0.209.0/path/posix/is_glob.ts": "ec4fbc604b9db8487f7b56ab0e759b24a971ab6a45f7b0b698bc39b8b9f9680f", + "https://deno.land/std@0.209.0/path/posix/join.ts": "0c0d84bdc344876930126640011ec1b888e6facf74153ffad9ef26813aa2a076", + "https://deno.land/std@0.209.0/path/posix/join_globs.ts": "f4838d54b1f60a34a40625a3293f6e583135348be1b2974341ac04743cb26121", + "https://deno.land/std@0.209.0/path/posix/mod.ts": "f1b08a7f64294b7de87fc37190d63b6ce5b02889af9290c9703afe01951360ae", + "https://deno.land/std@0.209.0/path/posix/normalize.ts": "11de90a94ab7148cc46e5a288f7d732aade1d616bc8c862f5560fa18ff987b4b", + "https://deno.land/std@0.209.0/path/posix/normalize_glob.ts": "10a1840c628ebbab679254d5fa1c20e59106102354fb648a1765aed72eb9f3f9", + "https://deno.land/std@0.209.0/path/posix/parse.ts": "199208f373dd93a792e9c585352bfc73a6293411bed6da6d3bc4f4ef90b04c8e", + "https://deno.land/std@0.209.0/path/posix/relative.ts": "e2f230608b0f083e6deaa06e063943e5accb3320c28aef8d87528fbb7fe6504c", + "https://deno.land/std@0.209.0/path/posix/resolve.ts": "51579d83159d5c719518c9ae50812a63959bbcb7561d79acbdb2c3682236e285", + "https://deno.land/std@0.209.0/path/posix/separator.ts": "0b6573b5f3269a3164d8edc9cefc33a02dd51003731c561008c8bb60220ebac1", + "https://deno.land/std@0.209.0/path/posix/to_file_url.ts": "08d43ea839ee75e9b8b1538376cfe95911070a655cd312bc9a00f88ef14967b6", + "https://deno.land/std@0.209.0/path/posix/to_namespaced_path.ts": "c9228a0e74fd37e76622cd7b142b8416663a9b87db643302fa0926b5a5c83bdc", + "https://deno.land/std@0.209.0/path/relative.ts": "23d45ede8b7ac464a8299663a43488aad6b561414e7cbbe4790775590db6349c", + "https://deno.land/std@0.209.0/path/resolve.ts": "5b184efc87155a0af9fa305ff68a109e28de9aee81fc3e77cd01380f19daf867", + "https://deno.land/std@0.209.0/path/separator.ts": "40a3e9a4ad10bef23bc2cd6c610291b6c502a06237c2c4cd034a15ca78dedc1f", + "https://deno.land/std@0.209.0/path/to_file_url.ts": "edaafa089e0bce386e1b2d47afe7c72e379ff93b28a5829a5885e4b6c626d864", + "https://deno.land/std@0.209.0/path/to_namespaced_path.ts": "cf8734848aac3c7527d1689d2adf82132b1618eff3cc523a775068847416b22a", + "https://deno.land/std@0.209.0/path/windows/_util.ts": "f32b9444554c8863b9b4814025c700492a2b57ff2369d015360970a1b1099d54", + "https://deno.land/std@0.209.0/path/windows/basename.ts": "8a9dbf7353d50afbc5b221af36c02a72c2d1b2b5b9f7c65bf6a5a2a0baf88ad3", + "https://deno.land/std@0.209.0/path/windows/common.ts": "e781d395dc76f6282e3f7dd8de13194abb8b04a82d109593141abc6e95755c8b", + "https://deno.land/std@0.209.0/path/windows/dirname.ts": "5c2aa541384bf0bd9aca821275d2a8690e8238fa846198ef5c7515ce31a01a94", + "https://deno.land/std@0.209.0/path/windows/extname.ts": "07f4fa1b40d06a827446b3e3bcc8d619c5546b079b8ed0c77040bbef716c7614", + "https://deno.land/std@0.209.0/path/windows/format.ts": "343019130d78f172a5c49fdc7e64686a7faf41553268961e7b6c92a6d6548edf", + "https://deno.land/std@0.209.0/path/windows/from_file_url.ts": "d53335c12b0725893d768be3ac6bf0112cc5b639d2deb0171b35988493b46199", + "https://deno.land/std@0.209.0/path/windows/glob_to_regexp.ts": "290755e18ec6c1a4f4d711c3390537358e8e3179581e66261a0cf348b1a13395", + "https://deno.land/std@0.209.0/path/windows/is_absolute.ts": "245b56b5f355ede8664bd7f080c910a97e2169972d23075554ae14d73722c53c", + "https://deno.land/std@0.209.0/path/windows/is_glob.ts": "ec4fbc604b9db8487f7b56ab0e759b24a971ab6a45f7b0b698bc39b8b9f9680f", + "https://deno.land/std@0.209.0/path/windows/join.ts": "e6600bf88edeeef4e2276e155b8de1d5dec0435fd526ba2dc4d37986b2882f16", + "https://deno.land/std@0.209.0/path/windows/join_globs.ts": "f4838d54b1f60a34a40625a3293f6e583135348be1b2974341ac04743cb26121", + "https://deno.land/std@0.209.0/path/windows/mod.ts": "d7040f461465c2c21c1c68fc988ef0bdddd499912138cde3abf6ad60c7fb3814", + "https://deno.land/std@0.209.0/path/windows/normalize.ts": "9deebbf40c81ef540b7b945d4ccd7a6a2c5a5992f791e6d3377043031e164e69", + "https://deno.land/std@0.209.0/path/windows/normalize_glob.ts": "344ff5ed45430495b9a3d695567291e50e00b1b3b04ea56712a2acf07ab5c128", + "https://deno.land/std@0.209.0/path/windows/parse.ts": "120faf778fe1f22056f33ded069b68e12447668fcfa19540c0129561428d3ae5", + "https://deno.land/std@0.209.0/path/windows/relative.ts": "026855cd2c36c8f28f1df3c6fbd8f2449a2aa21f48797a74700c5d872b86d649", + "https://deno.land/std@0.209.0/path/windows/resolve.ts": "5ff441ab18a2346abadf778121128ee71bda4d0898513d4639a6ca04edca366b", + "https://deno.land/std@0.209.0/path/windows/separator.ts": "ae21f27015f10510ed1ac4a0ba9c4c9c967cbdd9d9e776a3e4967553c397bd5d", + "https://deno.land/std@0.209.0/path/windows/to_file_url.ts": "8e9ea9e1ff364aa06fa72999204229952d0a279dbb876b7b838b2b2fea55cce3", + "https://deno.land/std@0.209.0/path/windows/to_namespaced_path.ts": "e0f4d4a5e77f28a5708c1a33ff24360f35637ba6d8f103d19661255ef7bfd50d", "https://deno.land/x/cliffy@v0.25.7/_utils/distance.ts": "02af166952c7c358ac83beae397aa2fbca4ad630aecfcd38d92edb1ea429f004", "https://deno.land/x/cliffy@v0.25.7/ansi/ansi_escapes.ts": "885f61f343223f27b8ec69cc138a54bea30542924eacd0f290cd84edcf691387", - "https://deno.land/x/cliffy@v0.25.7/ansi/chain.ts": "31fb9fcbf72fed9f3eb9b9487270d2042ccd46a612d07dd5271b1a80ae2140a0", "https://deno.land/x/cliffy@v0.25.7/ansi/cursor_position.ts": "d537491e31d9c254b208277448eff92ff7f55978c4928dea363df92c0df0813f", "https://deno.land/x/cliffy@v0.25.7/ansi/deps.ts": "0f35cb7e91868ce81561f6a77426ea8bc55dc15e13f84c7352f211023af79053", "https://deno.land/x/cliffy@v0.25.7/ansi/tty.ts": "8fb064c17ead6cdf00c2d3bc87a9fd17b1167f2daa575c42b516f38bdb604673", "https://deno.land/x/cliffy@v0.25.7/keycode/key_code.ts": "c4ab0ffd102c2534962b765ded6d8d254631821bf568143d9352c1cdcf7a24be", "https://deno.land/x/cliffy@v0.25.7/keycode/key_codes.ts": "917f0a2da0dbace08cf29bcfdaaa2257da9fe7e705fff8867d86ed69dfb08cfe", - "https://deno.land/x/cliffy@v0.25.7/keycode/mod.ts": "292d2f295316c6e0da6955042a7b31ab2968ff09f2300541d00f05ed6c2aa2d4", "https://deno.land/x/cliffy@v0.25.7/prompt/_generic_input.ts": "737cff2de02c8ce35250f5dd79c67b5fc176423191a2abd1f471a90dd725659e", "https://deno.land/x/cliffy@v0.25.7/prompt/_generic_list.ts": "79b301bf09eb19f0d070d897f613f78d4e9f93100d7e9a26349ef0bfaa7408d2", "https://deno.land/x/cliffy@v0.25.7/prompt/_generic_prompt.ts": "8630ce89a66d83e695922df41721cada52900b515385d86def597dea35971bb2", @@ -77,95 +122,41 @@ "https://deno.land/x/cliffy@v0.25.7/prompt/secret.ts": "58745f5231fb2c44294c4acf2511f8c5bfddfa1e12f259580ff90dedea2703d6", "https://deno.land/x/cliffy@v0.25.7/prompt/select.ts": "1e982eae85718e4e15a3ee10a5ae2233e532d7977d55888f3a309e8e3982b784", "https://deno.land/x/cliffy@v0.25.7/prompt/toggle.ts": "842c3754a40732f2e80bcd4670098713e402e64bd930e6cab2b787f7ad4d931a", - "https://deno.land/x/dotenv@v3.2.0/mod.ts": "077b48773de9205266a0b44c3c3a3c3083449ed64bb0b6cc461b95720678d38e", - "https://deno.land/x/dotenv@v3.2.0/util.ts": "693730877b13f8ead2b79b2aa31e2a0652862f7dc0c5f6d2f313f4d39c7b7670", - "https://esm.noim.io/@vue/reactivity@3.2.45": "f62e7a148b6cdcf3406231d50ebb18e2dd4446b2fbfd1139588844cc20ce65fb", - "https://esm.noim.io/@vue/reactivity@3.2.47": "707e93ec3d5ea0148507aefabb0e1de742a05d7f378e07c1d37e4389dffd5040", - "https://esm.noim.io/@vue/runtime-core@3.2.45": "34a582c5e2caa7c572e24bed865b081aa694ba7b22f782b34fb95de3c6097f5d", - "https://esm.noim.io/@vue/runtime-core@3.2.47": "30029061d9d25f8217068530cf777364279a112087ef89a2d9038d64786aac64", - "https://esm.noim.io/@vueuse/core@9.11.0?deps=@vue/shared@3.2.45&externals=@vue/runtime-dom": "3fee41102c379ef116c1fe354a508eb40eeb7fe30b723f15c46eefe4b31253c4", - "https://esm.noim.io/@vueuse/core@9.13.0?deps=@vue/shared@3.2.47&externals=@vue/runtime-dom": "277447dc010a6f0770747b25555d82ba819b8340959f3cd4c96a703ba518e148", - "https://esm.noim.io/date-fns@2.29.3": "1b2ec960311dc0b31809654b2109993ac013d1d732b3dfe9085d27e76f67d943", - "https://esm.noim.io/date-fns@2.29.3/eachMinuteOfInterval": "43ebe565cee88a07092ba2fd9488d80727e1acc95f336a67b434c89aed1b8908", - "https://esm.noim.io/date-fns@2.29.3?exports=subMilliseconds,subSeconds,eachMinuteOfInterval,subHours,addHours": "7860fab33dc27a89918fec6eb30ac1f01d4f17c44a5263b7569be2bd8001067b", - "https://esm.noim.io/home-assistant-js-websocket@8.0.1": "a50e459fae7b291915399d29eec5b9285fb9eb478d9e917c12320d172fe6667c", - "https://esm.noim.io/parse-duration@1.0.2": "8649ff89e374f812cb3067f9caa6df4c7182d762a95da366923590406ab86e1b", - "https://esm.noim.io/stable/vue@3.2.45/deno/vue.js": "11fd4bb11564b35f944004ed7b10a2357fbf656e4d56e1b31c8f46c404b140a3", - "https://esm.noim.io/stable/vue@3.3.0-alpha.4/deno/vue.js": "1305589b8526a10787a1ed250e0a3fa56c66a8e550558b6bd2ac84a8e7579cb7", - "https://esm.noim.io/suncalc3@2.0.5": "b7a6a1a0612e7326ff9f60e6f187c572ee911d014b5bc8154c747c2c51e3e1c6", - "https://esm.noim.io/v103/@babel/parser@7.20.7/typings/babel-parser.d.ts": "b6a17f9be1df9d8ba0b1933dea1d5dcfb2d42345e5d7dc231cac125dd37b78c6", - "https://esm.noim.io/v103/@babel/parser@7.21.2/typings/babel-parser.d.ts": "b0a338772fdcca1de6c22fda45061365bca181f56185c5331654831ad58a097b", - "https://esm.noim.io/v103/@babel/types@7.20.7/lib/index-legacy.d.ts": "500cd3a6b69408560fd50b7386c5bf0f1a11da7ece18357c8ca5cb4f21ff9f74", - "https://esm.noim.io/v103/@babel/types@7.21.2/lib/index-legacy.d.ts": "9dd0b24a2500fa59acfefbb2b35ad84c05acfaa4d9b080de65762535c2ab4438", - "https://esm.noim.io/v103/@vue/compiler-core@3.2.45/dist/compiler-core.d.ts": "2d75e1c7774aead4c806ccf180409177566c3dc3f5ecdbd7bbe0ba7b7db485fa", - "https://esm.noim.io/v103/@vue/compiler-core@3.2.47/dist/compiler-core.d.ts": "982c0185143128c3b45958f1655c1238b9c2f4928c96a2e694b27fde36b0c3f0", - "https://esm.noim.io/v103/@vue/compiler-dom@3.2.45/dist/compiler-dom.d.ts": "28daf60ccefbb9735270647444bf298888a0450b8eb86de5e339175b555a4dbe", - "https://esm.noim.io/v103/@vue/compiler-dom@3.2.47/dist/compiler-dom.d.ts": "af9ccd57d0b3b0c2eca18d18f7f9b77e79504f83ac51eb8436ff41cad996d812", - "https://esm.noim.io/v103/@vue/reactivity@3.2.45/deno/reactivity.js": "4c77c30cfc11e94d30cd167f3d72d52dc0a80e26f53918735a2dcd0c385448f2", - "https://esm.noim.io/v103/@vue/reactivity@3.2.45/dist/reactivity.d.ts": "d24349fba32c62055d2e22a5b2f15ef82abac695880c806aafdbcc45c46b5b91", - "https://esm.noim.io/v103/@vue/reactivity@3.2.47/deno/reactivity.js": "5c08e5177f3580cec293f82fa4e8c3a159bee1d6c58d544e6b2b9db3f618eefb", - "https://esm.noim.io/v103/@vue/reactivity@3.2.47/dist/reactivity.d.ts": "56a6e5fc32f2426af67dc5f709898f883f2f58c9ec1ffb1a752a0ef5578b493f", - "https://esm.noim.io/v103/@vue/reactivity@3.3.0-alpha.4/deno/reactivity.js": "291e4d96637ad9e9b1527d634ab5c0388ff2499338636fdc20855aa926705a36", - "https://esm.noim.io/v103/@vue/runtime-core@3.2.45/deno/runtime-core.js": "3f77f41b7fb454f8dca0c1f5912e669eaa00347200ef8fb691738fba37e6195f", - "https://esm.noim.io/v103/@vue/runtime-core@3.2.45/dist/runtime-core.d.ts": "55ab8fb409fe623a397002838053c28923ad1531351b146a02b25120dd4b2246", - "https://esm.noim.io/v103/@vue/runtime-core@3.2.47/deno/runtime-core.js": "952ea56098a85b48eefc0f56249dfbc4c9a77d725b603bedf29ae3d7541875df", - "https://esm.noim.io/v103/@vue/runtime-core@3.2.47/dist/runtime-core.d.ts": "ba425aa5aacc83ea45f524cc8b41d013007f2b202dc5390967ff3c833761c7a7", - "https://esm.noim.io/v103/@vue/runtime-core@3.3.0-alpha.4/deno/runtime-core.js": "09ec5ec98de1fc8131aa34c54476f1fcfbf32efe6a59e96162e809cb3773ca53", - "https://esm.noim.io/v103/@vue/runtime-dom@3.2.45/deno/runtime-dom.js": "18efb91e979ad4bcc2b47225a2962a78dd98f68b55af9b59e95f6d38b846c8c1", - "https://esm.noim.io/v103/@vue/runtime-dom@3.2.45/dist/runtime-dom.d.ts": "2d01a824b1253cd0c6cc6bd3f936e20fc7500358ab25bd4b57877e61f6ff721b", - "https://esm.noim.io/v103/@vue/runtime-dom@3.2.47/dist/runtime-dom.d.ts": "57a9e50cc9fbb628df1c156758b83e6d060563caaa2b73a4f83b6b73d7fd7239", - "https://esm.noim.io/v103/@vue/runtime-dom@3.3.0-alpha.4/deno/runtime-dom.js": "7104301f1767b1dfae7b4a5ed38b21d4066db6f8437ffd696c76c106d0c0d560", - "https://esm.noim.io/v103/@vue/shared@3.2.45/deno/shared.js": "9a1e5d94159c46b583bec94b71a35d1f88d730a4357eb9fb959a119032778fba", - "https://esm.noim.io/v103/@vue/shared@3.2.45/dist/shared.d.ts": "6b049c50a1a3bbd3f68f784df0edc942131b1161d0a4f670617639af9dc6d59d", - "https://esm.noim.io/v103/@vue/shared@3.2.47/deno/shared.js": "9247118c058ba8c55752cdb6369e6b57ee4f4f900b9f201636db267c6bffc9e6", - "https://esm.noim.io/v103/@vue/shared@3.2.47/dist/shared.d.ts": "10bc9999456a9cc0ee0c3a4918db22d27365728b92bf57b900ae6fd8f7359403", - "https://esm.noim.io/v103/@vue/shared@3.3.0-alpha.4/deno/shared.js": "8ca2637f46bfd207297a7cfa5f8b5311b9ee592228cd193627958f7f6dc117ee", - "https://esm.noim.io/v103/@vueuse/core@9.11.0/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDU/deno/core.js": "a6a5f2676f3d282254feea77b2bda3a9ac32d8c55da87f58e2a75cb2664bb34b", - "https://esm.noim.io/v103/@vueuse/core@9.11.0/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDU/index.d.ts": "6f25463ee5e07ccfb24181863ade06fe6a5d961b3e9523cf7440dcce5813e233", - "https://esm.noim.io/v103/@vueuse/core@9.13.0/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDc/deno/core.js": "ac22846a3b12d7feb7068cbbf2fe088803753d8e41695b120360c1da8596d3ed", - "https://esm.noim.io/v103/@vueuse/core@9.13.0/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDc/index.d.ts": "c078092f3363b555374f1850a32e6fdea7870eca7b381348cf1c8d292de8ab05", - "https://esm.noim.io/v103/@vueuse/shared@9.11.0/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDU/deno/shared.js": "c50ce875c1a83591a784f2c677dc6fb92cc438f89de43389b3899f57e5c18455", - "https://esm.noim.io/v103/@vueuse/shared@9.11.0/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDU/index.d.ts": "1ebea6d35b726550e8b9ad674c6c98349bbe507e87352d771d8c9444a955d5da", - "https://esm.noim.io/v103/@vueuse/shared@9.13.0/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDc/deno/shared.js": "9df2196bd58e5f266887f643acd7a025f38d3b991d1634ffddb7254d409ad5fc", - "https://esm.noim.io/v103/@vueuse/shared@9.13.0/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDc/index.d.ts": "fe8440cfd5fac32743e9cd92526315f2f2be85552dacc1e2dcaee270a16cabf0", - "https://esm.noim.io/v103/csstype@2.6.21/index.d.ts": "d514bad37e8b2036cfa6deaf126241bbe4637f96532162c08e4682a0eaac9485", - "https://esm.noim.io/v103/date-fns@2.29.3/X-dHMvYWRkSG91cnMsZWFjaE1pbnV0ZU9mSW50ZXJ2YWwsc3ViSG91cnMsc3ViTWlsbGlzZWNvbmRzLHN1YlNlY29uZHM/deno/date-fns.js": "a758f1e2720601d497355679a4cc5d85fbcfe90a38f2b91924a22b097763bfc4", - "https://esm.noim.io/v103/date-fns@2.29.3/X-dHMvYWRkSG91cnMsZWFjaE1pbnV0ZU9mSW50ZXJ2YWwsc3ViSG91cnMsc3ViTWlsbGlzZWNvbmRzLHN1YlNlY29uZHM/esm~.d.ts": "854cdc32752c20a63ea380b17a93c803d6d1e06fa939fdc231732a7b35e8a906", - "https://esm.noim.io/v103/date-fns@2.29.3/X-dHMvYWRkSG91cnMsZWFjaE1pbnV0ZU9mSW50ZXJ2YWwsc3ViSG91cnMsc3ViTWlsbGlzZWNvbmRzLHN1YlNlY29uZHM/typings.d.ts": "f039f5ad7b382ec2a62d571bdddd77b31d07e7dee2da05ab6f4c5811e3b3bc46", - "https://esm.noim.io/v103/date-fns@2.29.3/deno/date-fns.js": "48e5adc5f12afd729d0bf6cc9a45eeb27fdef13b55dd1cc9b7c573e18268b7ec", - "https://esm.noim.io/v103/date-fns@2.29.3/deno/eachMinuteOfInterval.js": "28f60515f18578a25a7b0102a80f99a85eee1aa34469f54da1f6e5a2b074ac7c", - "https://esm.noim.io/v103/date-fns@2.29.3/deno/esm/_lib/requiredArgs/index.js": "4a6083b5e30ca6613901cf72443606c693dde827f2409c31310557a008ee73a4", - "https://esm.noim.io/v103/date-fns@2.29.3/deno/esm/_lib/toInteger/index.js": "15ba88cbecb591431d3619b1f04207fd4888a69553db4fab36da12211fc50e8b", - "https://esm.noim.io/v103/date-fns@2.29.3/deno/esm/addMilliseconds/index.js": "c2688fd4b451bdc631a5f8595ddc153979c4f750bed005a3c72adf2486542096", - "https://esm.noim.io/v103/date-fns@2.29.3/deno/esm/addMinutes/index.js": "d3fa95663d17d26f2266cc4d7dd26cb84c54c429678d1cf8b8a21dcb6da9424d", - "https://esm.noim.io/v103/date-fns@2.29.3/deno/esm/startOfMinute/index.js": "14a844e0587bb9e9f7dc6ce60d69beacfd7f64e70ee3e10216480bd233b9e8d1", - "https://esm.noim.io/v103/date-fns@2.29.3/deno/esm/toDate/index.js": "7a98d15b20cc81f66afb9e83d176b1e90c2255c8fc391121ba6cf625fb0a7b22", - "https://esm.noim.io/v103/date-fns@2.29.3/esm~.d.ts": "854cdc32752c20a63ea380b17a93c803d6d1e06fa939fdc231732a7b35e8a906", - "https://esm.noim.io/v103/date-fns@2.29.3/typings.d.ts": "48563e8ada340dfbe430c2a82f7c58665b6675868976d9d07e0304eb4cc14d6f", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/deno/home-assistant-js-websocket.js": "0951ced7d7a65b57c74b6c666f3b9984089a642af4b8b17fca02265acf0edd1b", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/auth.d.ts": "cbe1cc1e3c86ae5b175b1a227aa1b6cf7092f16b044fc86db1d7e4b64b94a8f4", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/collection.d.ts": "bb8b4296b031f7c72beb9abe673726f4096c060f4bbcb78e4399189126ef74d1", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/commands.d.ts": "4f2d724492dd5ff9938ca209c8f4c48a85d08c702a1bcdb52950ef804d9cf44c", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/config.d.ts": "344c67c36b27fc0d0de5cf229c6b31ae750c13f3a8d4dbb9ef6db5bddf5fb1be", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/connection.d.ts": "6f44eb6541ee69864058d349b9f7a068b43ef39177d9cd2964baa33c80413836", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/entities.d.ts": "80f5c2f4feb8298cd4d662aa5505c38719a7a945d0688e274d6bb8c0933dd49c", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/errors.d.ts": "05ec08e7721212d4223af280c11683be90655e0ca71f74d76dd16c136d67a906", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/index.d.ts": "7ec183325833bfac7da7880ef02a9bddf99f5b95afff5561491fa8e8e353231c", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/services.d.ts": "f87af9ee0e17d444557ca841d85d24609231a1ba865a56fc708cf915ab805ba0", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/socket.d.ts": "b4d47abca29fc7cb007bddc68f6392341ee6ca6fb3053688e28993077c4cc6b2", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/store.d.ts": "40c9bd24b87b64e3331632a2c31ff1fea655d0c1f9d74cccd6a090a40410894a", - "https://esm.noim.io/v103/home-assistant-js-websocket@8.0.1/dist/types.d.ts": "72da17acf0463b86d6b4800724a6b7a3026d5e15a263e78614f1bc0a23bf044a", - "https://esm.noim.io/v103/parse-duration@1.0.2/deno/parse-duration.js": "de8e4657a1efb745e02ddc3839da79852f412416a56e0f668fb4caa981863609", - "https://esm.noim.io/v103/parse-duration@1.0.2/index.d.ts": "1fd8131e0354bca7e1a03057a49fa40849679e0b93a479ff9fb4d8404f92f859", - "https://esm.noim.io/v103/source-map@0.6.1/source-map.d.ts": "2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579", - "https://esm.noim.io/v103/suncalc3@2.0.5/deno/suncalc3.js": "02ffcfa9d38a92bb0778757bea63e55d755dce4dcc770c72a931cb35dd50dd7c", - "https://esm.noim.io/v103/suncalc3@2.0.5/suncalc.d.ts": "854cdc32752c20a63ea380b17a93c803d6d1e06fa939fdc231732a7b35e8a906", - "https://esm.noim.io/v103/vue-demi@0.13.11/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDU/deno/vue-demi.js": "b4ceb1e6d100fb2eb6dfde4f863072b2d1e1da3fe3de60c2f06f78eba1a31baa", - "https://esm.noim.io/v103/vue-demi@0.13.11/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDU/lib/index.d.ts": "91ae2264b2e6c72077cc60fe396d479b96405ffd5caaa32ef27b9c7c9632400b", - "https://esm.noim.io/v103/vue-demi@0.13.11/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDc/deno/vue-demi.js": "fc42685a74685dc4e23516e69dae79b7f92ffc777dd5a5d584dcacd290390278", - "https://esm.noim.io/v103/vue-demi@0.13.11/X-ZC9AdnVlL3NoYXJlZEAzLjIuNDc/lib/index.d.ts": "978e98e407f1030f9189bf19c6a44eca774bcf26ab96c2815433e34b9e9fcf75", - "https://esm.noim.io/v103/vue@3.2.45/dist/vue.d.ts": "96c5364d6f1db3a86915e007214218612a7ad2b1a85c043230d2d4d81df5501f", - "https://esm.noim.io/v103/vue@3.2.47/dist/vue.d.ts": "fa79294cf3b3bb2c0a6b6f5280cd2ab4f758dc60270373ba1e0d9327ab0c80d9", - "https://raw.githubusercontent.com/Hypnos3/suncalc3/609d315d7787d15ca3f4643f8b121839e8333cee/suncalc.d.ts": "d820c99387da45df04b7a1906c310a95e5eaa313fb4256d16414aae083865b7a" + "https://deno.land/x/dotenv@v3.2.2/mod.ts": "077b48773de9205266a0b44c3c3a3c3083449ed64bb0b6cc461b95720678d38e", + "https://deno.land/x/dotenv@v3.2.2/util.ts": "693730877b13f8ead2b79b2aa31e2a0652862f7dc0c5f6d2f313f4d39c7b7670", + "https://esm.noim.io/@vue/reactivity@3.3.11": "e6c0705f6acad166bffcd1b9dcd5842b8d2696c79abba75c235c3d460607747b", + "https://esm.noim.io/@vue/runtime-core@3.3.11": "7fd7fcec34550a70f147f27e3fd298a4ffa01458b4f1558d7c406ac1c5dd21e5", + "https://esm.noim.io/@vueuse/core@10.7.0?deps=@vue/shared@3.3.11&externals=@vue/runtime-dom": "2ec7ff205b25980b3a93756f97cd17df3aafdf275161461acf0208dd6685261e", + "https://esm.noim.io/color-name@2.0.0": "40fc771ac11fe3879ee7f79fa8e4433de7586a1fff2043339d43f65ae6f0d316", + "https://esm.noim.io/date-fns@2.30.0": "9dacdd8271d1e0c489af72e6557e1a65b7b8236ee0b244e41e202a6882b11c68", + "https://esm.noim.io/fast-equals@5.0.1": "58a97b024db4e2b87a45c84971029b12b02fb5457628a1a46fb1b836139221bc", + "https://esm.noim.io/home-assistant-js-websocket@9.1.0": "99dca063607870a65fcb4ee6b00bfd98dd41e7a1c97d54d4fde1c7c5b4b66baf", + "https://esm.noim.io/parse-duration@1.1.0": "a6aa29ca15e8546fe5bb6886c73df436831f403d60ffde809410f204bb1abc60", + "https://esm.noim.io/stable/@vue/reactivity@3.3.11/denonext/reactivity.mjs": "8fba07ccd0b524682f042484b1b57b42f705503a55cd6b49d47cdfeedd26793e", + "https://esm.noim.io/stable/@vue/reactivity@3.3.4/denonext/reactivity.mjs": "99dcaed2e52b34fc4f77f3e9a44a539935306ec3f4597e0737b7ed1be7901183", + "https://esm.noim.io/stable/@vue/runtime-core@3.3.11/denonext/runtime-core.mjs": "174be053309294ad73ecb91fa0ca45ff9162d2c44c10a4286456aee4a5c1fd87", + "https://esm.noim.io/stable/@vue/runtime-core@3.3.4/denonext/runtime-core.mjs": "177d7094761f4b6075066e31b8db3e46cc84b19fe5ec5b707687902867d16bea", + "https://esm.noim.io/stable/@vue/runtime-dom@3.3.4/denonext/runtime-dom.mjs": "d5363c33be52f82869278ffd41242a8cac721d6c389e0b6bd4f6d55397844895", + "https://esm.noim.io/stable/@vue/shared@3.3.11/denonext/shared.mjs": "aaa9a0ff7d2ffc587bab386c5a3737bbfff9b235fcd6eb54017d757ae1bbfec9", + "https://esm.noim.io/stable/@vue/shared@3.3.4/denonext/shared.mjs": "d14bdf0b011d5d8255893e8b51b65af1269d73b918cbeef8d02da127787ad2f2", + "https://esm.noim.io/stable/vue@3.3.4/denonext/vue.mjs": "a51b115fe7b4521e2e66703e9c199d27ec4988247b0ac97bca2763ea3d4cacf6", + "https://esm.noim.io/suncalc3@2.0.5": "2870eb9cd8e73f560cb13837ebc2a169b8fb17ca9fa5412e96e8a944a4ede8a8", + "https://esm.noim.io/v128/@babel/runtime@7.22.6/denonext/helpers/esm/assertThisInitialized.js": "de5be8e5177663f65b3c04ba4db32bf860092014af845beb0e63c87c58b99edb", + "https://esm.noim.io/v128/@babel/runtime@7.22.6/denonext/helpers/esm/classCallCheck.js": "2bc07fa3ca8bf9736ca3ba70888d1f19d9dec886b8df69b479a6e2ad0ee56dae", + "https://esm.noim.io/v128/@babel/runtime@7.22.6/denonext/helpers/esm/createClass.js": "eb778b2ac55cd22279c3754e8945542537989bb3a9404ee5bbcf2f2aac0cdeea", + "https://esm.noim.io/v128/@babel/runtime@7.22.6/denonext/helpers/esm/createForOfIteratorHelper.js": "855355e6fb56e3d32398f4f23f746b059f1e32ee8c32177035c49992441d0667", + "https://esm.noim.io/v128/@babel/runtime@7.22.6/denonext/helpers/esm/createSuper.js": "7ade7e8045ea4fd117e8d5ac72a5650cbabe5f5778cb3d7154aec5af5fca841b", + "https://esm.noim.io/v128/@babel/runtime@7.22.6/denonext/helpers/esm/defineProperty.js": "117c72d27300a9726054ba49bef856bea93c2379c06063379280ed91de0f5a4c", + "https://esm.noim.io/v128/@babel/runtime@7.22.6/denonext/helpers/esm/inherits.js": "e9a853d1afb5c5854436cfe1b89bd7c0126c464f6059516adc4c90dbd1edb6ac", + "https://esm.noim.io/v128/@babel/runtime@7.22.6/denonext/helpers/esm/typeof.js": "c13c420d835607410ab60a398e7f2681e60d48a0068d1ed527a9e69367ebda50", + "https://esm.noim.io/v128/@vueuse/core@10.7.0/X-ZC9AdnVlL3NoYXJlZEAzLjMuMTE/denonext/core.mjs": "a9e32e0411b16d48cb0a71389a695b67d44f68ebc0523c2949ff15e0d3d06152", + "https://esm.noim.io/v128/@vueuse/shared@10.7.0/denonext/shared.mjs": "9f170cdbced1f85662ddcb9299861f1bc8382f0e79ba15f6f65a7acb530af43f", + "https://esm.noim.io/v128/color-name@2.0.0/denonext/color-name.mjs": "d5d7a44349eedee7408e656006801e9f4b0159284d03fedf8cf5c84fe4892017", + "https://esm.noim.io/v128/date-fns@2.30.0/denonext/date-fns.mjs": "afcd17b3cbcd0700739abbfc1d785ff290abcb7bcf87bfea7bc001163806b377", + "https://esm.noim.io/v128/fast-equals@5.0.1/denonext/fast-equals.mjs": "082237c1b190940a6509173e28cce41d0ff58f81147300934d8055071e40d95f", + "https://esm.noim.io/v128/home-assistant-js-websocket@9.1.0/denonext/home-assistant-js-websocket.mjs": "0e668af2c99e4fdd04c90f598178c841158b3d26da3e835b33e0ce8e3a85ff7a", + "https://esm.noim.io/v128/parse-duration@1.1.0/denonext/parse-duration.mjs": "d2f3d8fedbbee8e1793b6f872a76d6ac3b133b279190ae5bc3172b5abdbdb265", + "https://esm.noim.io/v128/suncalc3@2.0.5/denonext/suncalc3.mjs": "4f6a3cd09d03019c9ec1aa5f6e7c0587c0c4956b2bb554888134133741afa57b", + "https://esm.noim.io/v128/vue-demi@0.14.6/denonext/vue-demi.mjs": "9ee5fa5955ed6041e1ca106f0378312494316beb6466648bbe20046b30c0ad38" } } diff --git a/reactive_home/src/composeables/useNewLight.ts b/reactive_home/src/composeables/useNewLight.ts index face54c..82baefe 100644 --- a/reactive_home/src/composeables/useNewLight.ts +++ b/reactive_home/src/composeables/useNewLight.ts @@ -1,8 +1,17 @@ import type { FullfilledUseState } from "./useState.ts"; -import { useDebounceFn, reactive, watch, computed, extendRef } from "../dep.ts"; +import { + useDebounceFn, + reactive, + watch, + computed, + extendRef, + brightBlue, + italic, +} from "../dep.ts"; import type { MessageBase, HassEntity } from "../dep.ts"; import { connection } from "../hass/connection.ts"; import { stringBoolToBool } from "../lib/util.ts"; +import { formatTime } from "../lib/time.ts"; export function useNewLight(state: FullfilledUseState, debug = false) { const skipContexts: string[] = []; @@ -18,9 +27,27 @@ export function useNewLight(state: FullfilledUseState, debug = false) { } const updateHASSState = useDebounceFn( - async (newState: boolean, brightness: number) => { + async ( + newState: boolean, + brightness?: number, + rgbColor?: [number, number, number] + ) => { const entity = state.value; + let service_data; + + if ((brightness || rgbColor) && newState) { + service_data = {} as any; + if (brightness !== null && brightness !== undefined) { + service_data["brightness"] = brightness; + } + if (rgbColor !== null && rgbColor !== undefined) { + service_data["rgb_color"] = rgbColor; + } + } else { + service_data = {}; + } + const payload = { type: "call_service", domain: entity.entity_id.split(".").at(0), @@ -28,16 +55,19 @@ export function useNewLight(state: FullfilledUseState, debug = false) { target: { entity_id: entity.entity_id, }, - service_data: - newState && brightness > 0 - ? { - brightness: brightness, - } - : {}, + service_data: service_data, } satisfies MessageBase; if (debug) { - console.log(`call_service(${entity.entity_id}): `, payload); + console.log( + `[${brightBlue("->")}][${formatTime(new Date())}] ${ + entity.entity_id + }: ${italic(payload.service)} ${ + typeof payload.service_data === "object" + ? payload.service_data.brightness + : payload.service_data + }` + ); } const result: { context: HassEntity["context"] } = @@ -55,6 +85,7 @@ export function useNewLight(state: FullfilledUseState, debug = false) { brightness: getBrightnessFromAttribute(state.value), entity_id: state.value.entity_id, lastChanged: new Date(state.value.last_changed), + rgbColor: state.value.attributes.rgb_color as [number, number, number], }); const exposedValue = computed({ @@ -64,12 +95,12 @@ export function useNewLight(state: FullfilledUseState, debug = false) { set(newValue) { localValues.value = newValue; localValues.lastChanged = new Date(); - if (debug) { - console.log( - `call(${state.value.entity_id}): updateHASSState (via value change)` - ); - } - updateHASSState(newValue, localValues.brightness); + // if (debug) { + // console.log( + // `call(${state.value.entity_id}): updateHASSState (via value change)` + // ); + // } + updateHASSState(newValue, localValues.brightness, localValues.rgbColor); }, }); @@ -78,14 +109,25 @@ export function useNewLight(state: FullfilledUseState, debug = false) { return localValues.brightness; }, set(newValue) { + if (newValue > 254) { + newValue = 254; + } else if (newValue < 0) { + newValue = 0; + } + newValue = Math.floor(newValue); localValues.brightness = newValue; - localValues.lastChanged = new Date(); - if (debug) { - console.log( - `call(${state.value.entity_id}): updateHASSState (via brightness change)` - ); + if (newValue === 0 && localValues.value) { + localValues.value = false; + } else if (newValue > 0 && !localValues.value) { + localValues.value = true; } - updateHASSState(localValues.value, newValue); + localValues.lastChanged = new Date(); + // if (debug) { + // console.log( + // `call(${state.value.entity_id}): updateHASSState (via brightness change)` + // ); + // } + updateHASSState(localValues.value, newValue, localValues.rgbColor); }, }); @@ -98,26 +140,42 @@ export function useNewLight(state: FullfilledUseState, debug = false) { }, }); + const exposedRgbColor = computed({ + get() { + return localValues.rgbColor; + }, + set(newValue) { + localValues.rgbColor = newValue; + localValues.lastChanged = new Date(); + + updateHASSState( + localValues.value, + localValues.brightness, + localValues.rgbColor + ); + }, + }); + // Incoming state changes from hass watch( () => state.value, (newEntityState) => { if (debug) { - console.log( - `incoming(${state.value.entity_id}): value=${stringBoolToBool( - newEntityState.state - )} brightness=${getBrightnessFromAttribute( - newEntityState - )} lastChanged=${new Date(newEntityState.last_changed)}` - ); + // console.log( + // `incoming(${state.value.entity_id}): value=${stringBoolToBool( + // newEntityState.state + // )} brightness=${getBrightnessFromAttribute( + // newEntityState + // )} lastChanged=${new Date(newEntityState.last_changed)}` + // ); } if (newEntityState.state === "unavailable") { - if (debug) { - console.log( - `incoming(${state.value.entity_id}): skip. New state is unavailable` - ); - } + // if (debug) { + // console.log( + // `incoming(${state.value.entity_id}): skip. New state is unavailable` + // ); + // } return; } @@ -140,6 +198,9 @@ export function useNewLight(state: FullfilledUseState, debug = false) { ) { localValues.brightness = getBrightnessFromAttribute(newEntityState); } + if (localValues.rgbColor !== newEntityState.attributes.rgb_color) { + localValues.rgbColor = newEntityState.attributes.rgb_color; + } } ); @@ -147,6 +208,7 @@ export function useNewLight(state: FullfilledUseState, debug = false) { brightness: exposedBrightness, entity_id: state.value.entity_id, lastChanged: exposedLastChanged, + rgbColor: exposedRgbColor, }; return extendRef(exposedValue, extendObject); diff --git a/reactive_home/src/composeables/useState.ts b/reactive_home/src/composeables/useState.ts index 960485b..e37412d 100644 --- a/reactive_home/src/composeables/useState.ts +++ b/reactive_home/src/composeables/useState.ts @@ -1,6 +1,7 @@ import { connection } from "../hass/connection.ts"; -import { getStates, HassEntities, entitiesColl } from "../dep.ts"; -import { ref, computed } from "../dep.ts"; +import { getStates, HassEntities, entitiesColl, watch } from "../dep.ts"; +import { ref, computed, red, gray, deepEqual } from "../dep.ts"; +import { formatTime } from "../lib/time.ts"; const collection = entitiesColl(connection); @@ -14,12 +15,19 @@ export function useState(entity: string) { return computed(() => currentStates.value?.[entity]); } +export type UseAsyncStateOption = { + debug?: boolean; +}; + /** * Like useState, but it fetches the current state first * @param entity entity_id * @returns */ -export async function useAsyncState(entity: string) { +export async function useAsyncState( + entity: string, + options: UseAsyncStateOption = {} +) { const initialStates = await getStates(connection); const initialState = initialStates.find( @@ -30,9 +38,33 @@ export async function useAsyncState(entity: string) { throw new Error("Failed to fetch initial state for entity " + entity); } - return computed(() => { + const computedValue = computed(() => { return currentStates.value ? currentStates.value[entity] : initialState; }); + + if (options.debug) { + watch( + () => computedValue.value, + (newValue, oldValue) => { + if (!deepEqual(newValue, oldValue)) + console.log( + `[${red("<-")}][${formatTime(new Date())}] ${entity}: ${gray( + `${oldValue.state}` + )}->${newValue.state} ${ + "brightness" in newValue.attributes || + "brightness" in oldValue.attributes + ? `${gray(`${oldValue.attributes.brightness}` ?? "")}->${ + newValue.attributes.brightness ?? "" + }` + : "" + }` + ); + }, + { deep: true } + ); + } + + return computedValue; } export type FullfilledUseState = Awaited>; diff --git a/reactive_home/src/dep.ts b/reactive_home/src/dep.ts index f6501b0..64d8bab 100644 --- a/reactive_home/src/dep.ts +++ b/reactive_home/src/dep.ts @@ -1,5 +1,7 @@ import "./define-window.ts"; +import colors from "https://esm.noim.io/color-name@2.0.0"; + export * from "https://esm.noim.io/home-assistant-js-websocket@9.1.0"; export { @@ -18,6 +20,10 @@ export type { ComputedRef, } from "https://esm.noim.io/@vue/reactivity@3.3.11"; +export * from "https://deno.land/std@0.209.0/fmt/colors.ts"; + +export * from "https://esm.noim.io/fast-equals@5.0.1"; + export { useNow } from "./composeables/useNow.ts"; export { @@ -48,6 +54,6 @@ import SunCalc from "https://esm.noim.io/suncalc3@2.0.5"; import parse from "https://esm.noim.io/parse-duration@1.1.0"; -export { join } from "https://deno.land/std@0.208.0/path/mod.ts"; +export { join } from "https://deno.land/std@0.209.0/path/mod.ts"; -export { SunCalc, parse as parseDuration }; +export { SunCalc, parse as parseDuration, colors }; diff --git a/reactive_home/src/lib/time.ts b/reactive_home/src/lib/time.ts new file mode 100644 index 0000000..043b2e7 --- /dev/null +++ b/reactive_home/src/lib/time.ts @@ -0,0 +1,7 @@ +export function formatTime(date: Date) { + const hours = String(date.getHours()).padStart(2, "0"); + const minutes = String(date.getMinutes()).padStart(2, "0"); + const seconds = String(date.getSeconds()).padStart(2, "0"); + + return `${hours}:${minutes}:${seconds}`; +} diff --git a/reactive_home/src/public.ts b/reactive_home/src/public.ts index 0d5f03d..162f222 100644 --- a/reactive_home/src/public.ts +++ b/reactive_home/src/public.ts @@ -18,5 +18,6 @@ export * from "./lib/light.ts"; export * from "./lib/sun.ts"; export * from "./lib/types.ts"; export * from "./lib/util.ts"; +export { colors } from "./dep.ts"; export { connection } from "./hass/connection.ts";