Compare commits

..

322 Commits

Author SHA1 Message Date
5ce92130b4 2.3.2 2025-02-01 00:32:57 +01:00
b0774b0cba fix(scroller): Rename method from scrollToElement to toElement for consistency 2025-02-01 00:32:56 +01:00
c44e19f3e0 2.3.1 2025-01-31 23:57:07 +01:00
07f09b4457 fix(scroller): Removed passive option from scroll event listener 2025-01-31 23:57:07 +01:00
10ea4ca265 2.3.0 2025-01-31 23:10:33 +01:00
dfd61ce744 feat(scroller): Enhance Scroller class with callback execution and adaptive scroll listener 2025-01-31 23:10:33 +01:00
3093ccd4f6 2.2.0 2025-01-31 23:03:10 +01:00
eb1ac75e49 feat(core): Enhance scrolling capabilities by integrating Scroller class and adding lenis support 2025-01-31 23:03:10 +01:00
0683378e39 2.1.1 2025-01-09 00:33:46 +01:00
25a813d35f fix(themamanager): Fixed automatic global theme change subscription for background updates. 2025-01-09 00:33:46 +01:00
916fd48858 2.1.0 2025-01-09 00:24:17 +01:00
90bb1eb432 feat(themeManager): Exposed method to enable automatic global theme change. 2025-01-09 00:24:17 +01:00
126e0fc900 2.0.65 2024-10-21 17:25:08 +02:00
a20b321bb0 fix(ThemeManager): Refactor ThemeManager class to separate global style setting logic 2024-10-21 17:25:08 +02:00
33721f86ab 2.0.64 2024-10-06 23:37:21 +02:00
987c821eed fix(pluginexports): Add missing import for smartrouter in pluginexports. 2024-10-06 23:37:21 +02:00
b0bed44810 2.0.63 2024-10-06 23:31:45 +02:00
0a7da5132d fix(dependencies): Update @push.rocks/smartrouter to version ^1.3.2 for better compatibility 2024-10-06 23:31:44 +02:00
b0bb8e9e2b 2.0.62 2024-10-06 21:42:11 +02:00
1f346e24db fix(dependencies): Update dependencies to resolve potential issues and improve stability 2024-10-06 21:42:10 +02:00
c34cca7eb6 2.0.61 2024-10-04 15:28:01 +02:00
15e58fbf5d fix(core): Correct import statement for SweetScroll. 2024-10-04 15:28:01 +02:00
2383e6ec21 2.0.60 2024-10-02 17:49:28 +02:00
5820bf81f6 fix(dependencies): Update dependencies to latest versions 2024-10-02 17:49:27 +02:00
9c6cfa3603 2.0.59 2024-10-02 15:45:46 +02:00
cc934a9c0e fix(core): Refactor plugin exports to improve modularity 2024-10-02 15:45:45 +02:00
16fd982c57 2.0.58 2024-07-01 11:23:15 +02:00
843c873254 fix(dependencies): Update dependencies and correct font family in styles 2024-07-01 11:23:14 +02:00
de1532627d update documentation 2024-04-20 23:18:09 +02:00
618b6c5ba0 2.0.57 2024-01-20 01:25:19 +01:00
185b8a3947 fix(core): update 2024-01-20 01:25:19 +01:00
77dddfc300 2.0.56 2024-01-20 01:08:26 +01:00
bb6b4788b8 fix(core): update 2024-01-20 01:08:25 +01:00
c223038b39 2.0.55 2023-10-23 17:22:15 +02:00
bd4fab872f fix(core): update 2023-10-23 17:22:14 +02:00
385cab0b1b 2.0.54 2023-10-23 17:04:11 +02:00
b6620120e9 fix(core): update 2023-10-23 17:04:11 +02:00
20e2149fd9 2.0.53 2023-10-23 16:34:33 +02:00
af2eaf010f fix(core): update 2023-10-23 16:34:32 +02:00
fdfc7b4963 2.0.52 2023-10-22 16:03:38 +02:00
28be3f3095 fix(core): update 2023-10-22 16:03:37 +02:00
3b946d7700 2.0.51 2023-10-07 12:25:44 +02:00
20e14bf14d fix(core): update 2023-10-07 12:25:44 +02:00
23a9ea9dfc 2.0.50 2023-10-05 14:08:44 +02:00
a64af6f0ff fix(core): update 2023-10-05 14:08:43 +02:00
e456df08d1 2.0.49 2023-10-03 19:23:24 +02:00
fd758e5ec1 fix(core): update 2023-10-03 19:23:23 +02:00
c45eac1796 2.0.48 2023-10-03 19:20:39 +02:00
5530642c3e fix(core): update 2023-10-03 19:20:38 +02:00
6b8bd28057 2.0.47 2023-10-03 18:58:21 +02:00
1ba907d2cc fix(core): update 2023-10-03 18:58:20 +02:00
6a7da41c98 2.0.46 2023-10-03 13:20:28 +02:00
b67a602f78 fix(core): update 2023-10-03 13:20:27 +02:00
fa093e6f5b 2.0.45 2023-10-03 12:48:23 +02:00
29f26d2ea7 fix(core): update 2023-10-03 12:48:22 +02:00
77fe34ebac 2.0.44 2023-10-03 12:38:18 +02:00
9ccd2fb2cf fix(core): update 2023-10-03 12:38:17 +02:00
02f67c64df 2.0.43 2023-10-03 11:46:15 +02:00
31dd8aa258 fix(core): update 2023-10-03 11:46:14 +02:00
5f66725c6b 2.0.42 2023-10-03 11:33:39 +02:00
89af82d2c4 fix(core): update 2023-10-03 11:33:38 +02:00
98dab6c683 2.0.41 2023-09-17 14:30:55 +02:00
805ce5ed88 fix(core): update 2023-09-17 14:30:55 +02:00
6f30b7618d 2.0.40 2023-09-09 23:36:32 +02:00
42fd443ad8 fix(core): update 2023-09-09 23:36:31 +02:00
b2cb49a314 2.0.39 2023-08-27 13:33:37 +02:00
d580df7e0a fix(core): update 2023-08-27 13:33:36 +02:00
68ea3052fd 2.0.38 2023-08-20 17:10:11 +02:00
252d56a321 fix(core): update 2023-08-20 17:10:10 +02:00
497e6d1c11 2.0.37 2023-08-07 04:20:36 +02:00
f1949bdc5d fix(core): update 2023-08-07 04:20:36 +02:00
d36d4a921a 2.0.36 2023-08-06 19:38:53 +02:00
e6194045d1 fix(core): update 2023-08-06 19:38:52 +02:00
6147e5f02f 2.0.35 2023-08-06 19:37:29 +02:00
0e64232e26 fix(core): update 2023-08-06 19:37:28 +02:00
fa66a51612 2.0.34 2023-08-06 19:36:49 +02:00
b26cc004c1 fix(core): update 2023-08-06 19:36:48 +02:00
f923802ba1 2.0.33 2023-05-08 15:26:18 +02:00
cf589d727f fix(core): update 2023-05-08 15:26:17 +02:00
b6720aef9d 2.0.32 2023-05-08 10:14:48 +02:00
ce945173ec fix(core): update 2023-05-08 10:14:47 +02:00
0c016ea6d9 2.0.31 2023-05-07 20:56:08 +02:00
467b0d3011 fix(core): update 2023-05-07 20:56:08 +02:00
333e991231 2.0.30 2023-04-05 16:46:13 +02:00
94c6c5a525 fix(core): update 2023-04-05 16:46:13 +02:00
bb64a8ecac 2.0.29 2023-04-05 16:38:44 +02:00
a4a26e44aa fix(core): update 2023-04-05 16:38:43 +02:00
f350905907 2.0.28 2023-01-07 08:24:38 +01:00
a90e326f5e fix(core): update 2023-01-07 08:24:37 +01:00
7c9aef342d 2.0.27 2023-01-03 17:02:40 +01:00
99eab4e35f fix(core): update 2023-01-03 17:02:40 +01:00
6d12aed53e 2.0.26 2023-01-02 17:25:17 +01:00
29bcd17350 fix(core): update 2023-01-02 17:25:17 +01:00
f2e858d0b8 2.0.25 2022-12-31 12:12:59 +01:00
83a78a2c97 fix(core): update 2022-12-31 12:12:58 +01:00
d77c657d6a 2.0.24 2022-12-31 11:34:05 +01:00
f8f2f05396 fix(core): update 2022-12-31 11:34:04 +01:00
7ee0d63a2c 2.0.23 2022-08-01 16:19:45 +02:00
e01f1a6a72 fix(core): update 2022-08-01 16:19:45 +02:00
c7b9374169 2.0.22 2022-05-01 20:07:30 +02:00
dfe189ff1c fix(core): update 2022-05-01 20:07:29 +02:00
b777508b7a 2.0.21 2022-05-01 19:24:16 +02:00
52664d8ea1 fix(core): update 2022-05-01 19:24:16 +02:00
7bad85a1fa 2.0.20 2022-05-01 16:42:37 +02:00
e5056a7be3 fix(core): update 2022-05-01 16:42:37 +02:00
989d4d35d2 2.0.19 2022-04-22 10:39:35 +02:00
c5e75419b3 fix(core): update 2022-04-22 10:39:34 +02:00
ca52d06c60 2.0.18 2022-04-22 09:37:50 +02:00
d33366c487 fix(core): update 2022-04-22 09:37:50 +02:00
3bc5e1d0e2 2.0.17 2022-04-22 09:25:10 +02:00
96a88112dc fix(core): update 2022-04-22 09:25:10 +02:00
6c0c1e165f 2.0.16 2022-04-21 23:53:02 +02:00
653a4138a9 fix(core): update 2022-04-21 23:53:02 +02:00
d776843494 2.0.15 2022-04-21 23:52:45 +02:00
79e64c4cc2 fix(core): update 2022-04-21 23:52:45 +02:00
7192d3fbf7 2.0.14 2022-04-21 23:10:14 +02:00
42bcb8243d fix(core): update 2022-04-21 23:10:14 +02:00
52fb046fa8 2.0.13 2022-04-21 22:53:59 +02:00
b83d3e1aed fix(core): update 2022-04-21 22:53:58 +02:00
4ec8707596 2.0.12 2022-04-21 19:16:07 +02:00
69e1b52e72 fix(core): update 2022-04-21 19:16:06 +02:00
a5ff175913 2.0.11 2022-04-21 19:05:53 +02:00
f84e7c48ae fix(core): update 2022-04-21 19:05:52 +02:00
185d9ff957 2.0.10 2022-04-21 18:01:55 +02:00
6145bd66dc fix(core): update 2022-04-21 18:01:54 +02:00
d58272a604 2.0.9 2022-04-20 23:56:09 +02:00
68ca1e8906 fix(core): update 2022-04-20 23:56:09 +02:00
7023888f38 2.0.8 2022-04-19 18:16:21 +02:00
1356666700 fix(core): update 2022-04-19 18:16:20 +02:00
b436fe77b0 2.0.7 2022-04-19 18:13:26 +02:00
3de788bb75 fix(core): update 2022-04-19 18:13:26 +02:00
d50e320f17 2.0.6 2022-04-14 16:42:52 +02:00
a7532c8816 fix(core): update 2022-04-14 16:42:51 +02:00
2d5944cdd7 2.0.5 2022-03-29 15:54:06 +02:00
5a8527068a fix(core): update 2022-03-29 15:54:06 +02:00
ffd0bb925a 2.0.4 2022-03-25 16:03:40 +01:00
4a5fb3ef4b fix(core): update 2022-03-25 16:03:40 +01:00
a059c268af 2.0.3 2022-03-25 14:01:44 +01:00
714aa77839 fix(core): update 2022-03-25 14:01:44 +01:00
2527e6e586 2.0.2 2022-03-25 02:28:39 +01:00
88f7f20b6f fix(core): update 2022-03-25 02:28:39 +01:00
8e23b7ebec 2.0.1 2022-03-18 14:26:31 +01:00
b3d12c39bf fix(core): update 2022-03-18 14:26:31 +01:00
d102d5a7e6 2.0.0 2022-03-16 13:42:30 +01:00
8be31958b4 1.0.115 2022-03-16 13:39:50 +01:00
e21f6c3920 fix(core): update 2022-03-16 13:39:50 +01:00
356a756962 1.0.114 2022-03-04 08:21:58 +01:00
0bb66e8221 fix(core): update 2022-03-04 08:21:57 +01:00
b70077c43f 1.0.113 2022-03-02 19:18:40 +01:00
9c5f024e5f 1.0.112 2022-03-02 19:00:52 +01:00
5eea208924 fix(core): update 2022-03-02 19:00:52 +01:00
f21fdb2eb8 1.0.111 2022-03-02 18:00:35 +01:00
d6ea74cb71 fix(core): update 2022-03-02 18:00:35 +01:00
10375576a7 1.0.110 2022-03-02 17:44:46 +01:00
367be854ff fix(core): update 2022-03-02 17:44:45 +01:00
0933c1d83b 1.0.109 2022-01-28 18:05:57 +01:00
af1eb73028 fix(core): update 2022-01-28 18:05:57 +01:00
4bff0091c9 1.0.108 2022-01-28 16:03:13 +01:00
7bae4585f3 fix(core): update 2022-01-28 16:03:13 +01:00
d9cdff2897 1.0.107 2022-01-24 06:56:32 +01:00
189060f11d fix(core): update 2022-01-24 06:56:30 +01:00
fc2dfa8018 1.0.106 2022-01-22 18:59:30 +01:00
be44cb7a78 fix(core): update 2022-01-22 18:59:29 +01:00
de6aba4289 1.0.105 2022-01-22 18:56:31 +01:00
3babbce2c5 fix(core): update 2022-01-22 18:56:30 +01:00
707956b7ee 1.0.104 2022-01-14 18:20:46 +01:00
c71a6170d5 fix(core): update 2022-01-14 18:20:45 +01:00
3f98f2867c 1.0.103 2021-12-13 23:18:07 +01:00
7c86f5a8f6 fix(core): update 2021-12-13 23:18:06 +01:00
472ec3158e 1.0.102 2021-11-26 17:36:00 +01:00
9a0d09d9de fix(core): update 2021-11-26 17:36:00 +01:00
5975ca7320 1.0.101 2021-11-26 16:21:11 +01:00
97583c650d fix(core): update 2021-11-26 16:21:11 +01:00
f5fd0662d3 1.0.100 2021-11-26 15:26:16 +01:00
14c91ed81f fix(core): update 2021-11-26 15:26:15 +01:00
1aabacdf87 1.0.99 2021-11-21 16:14:28 +01:00
1747afe04a fix(core): update 2021-11-21 16:14:27 +01:00
a1bd7f74a7 1.0.98 2021-11-21 16:08:28 +01:00
6ff89390b7 fix(core): update 2021-11-21 16:08:27 +01:00
2ad8d0a9fd 1.0.97 2021-11-21 15:52:49 +01:00
ae01670361 fix(core): update 2021-11-21 15:52:49 +01:00
5657b0be1d 1.0.96 2021-09-27 12:35:39 +02:00
781ae3c3b1 fix(core): update 2021-09-27 12:35:39 +02:00
da79e623cc 1.0.95 2021-09-16 16:49:24 +02:00
3ca6b5e34e fix(core): update 2021-09-16 16:49:24 +02:00
98f0bc013d 1.0.94 2021-09-13 20:35:34 +02:00
d32a544de2 fix(core): update 2021-09-13 20:35:33 +02:00
070221d6c9 1.0.93 2021-09-08 23:10:04 +02:00
19714854ba fix(core): update 2021-09-08 23:10:04 +02:00
50ebea1b5f 1.0.92 2021-09-08 22:42:33 +02:00
df0527f3c1 fix(core): update 2021-09-08 22:42:32 +02:00
b620b7393e 1.0.91 2021-09-01 21:05:55 +02:00
ab5b9511fd fix(core): update 2021-09-01 21:05:54 +02:00
da86e64056 1.0.90 2021-09-01 00:37:05 +02:00
effc331a67 fix(core): update 2021-09-01 00:37:05 +02:00
fa24708a47 1.0.89 2021-08-26 20:24:29 +02:00
31126e30eb fix(core): update 2021-08-26 20:24:28 +02:00
ef0a4eae80 1.0.88 2021-08-19 22:12:22 +02:00
e711302c28 fix(core): update 2021-08-19 22:12:22 +02:00
1cfc07fe8e 1.0.87 2021-03-28 21:51:12 +00:00
7f221c1a8c fix(core): update 2021-03-28 21:51:11 +00:00
09f927c0d4 1.0.86 2021-03-10 17:01:33 +00:00
1042e79625 fix(core): update 2021-03-10 17:01:32 +00:00
fced2efcbd 1.0.85 2021-03-10 16:57:26 +00:00
83fe1d62e7 fix(core): update 2021-03-10 16:57:25 +00:00
78bce9600c 1.0.84 2020-12-07 23:23:02 +00:00
2860b5b6e0 fix(core): update 2020-12-07 23:23:02 +00:00
b802935d27 1.0.83 2020-12-07 21:54:54 +00:00
b73a702b74 fix(core): update 2020-12-07 21:54:53 +00:00
b3deb31ab5 1.0.82 2020-12-07 05:25:26 +00:00
6ea5482e3d fix(core): update 2020-12-07 05:25:25 +00:00
0ead7215ff 1.0.81 2020-12-07 03:47:39 +00:00
286bb0887a fix(core): update 2020-12-07 03:47:39 +00:00
4456f00816 1.0.80 2020-12-07 03:13:34 +00:00
b60a1bebe0 fix(core): update 2020-12-07 03:13:34 +00:00
94127227a6 1.0.79 2020-12-01 21:06:54 +00:00
b5af1b1226 fix(core): update 2020-12-01 21:06:53 +00:00
a6f382dd7f 1.0.78 2020-12-01 17:31:38 +00:00
0de00cb2c1 fix(core): update 2020-12-01 17:31:37 +00:00
570a026cf8 1.0.77 2020-11-30 20:03:05 +00:00
48b5cc770c fix(core): update 2020-11-30 20:03:05 +00:00
7ae2de5843 1.0.76 2020-11-30 10:25:00 +00:00
e4d87ae882 fix(core): update 2020-11-30 10:25:00 +00:00
259a669e24 1.0.75 2020-11-29 23:56:20 +00:00
bf461dd1a0 fix(core): update 2020-11-29 23:56:19 +00:00
63c9ae97d4 1.0.74 2020-11-25 15:42:56 +00:00
a83239e0d9 fix(core): update 2020-11-25 15:42:55 +00:00
8da64f1b50 1.0.73 2020-11-25 15:14:48 +00:00
2d4c0e4e49 fix(core): update 2020-11-25 15:14:48 +00:00
1c8f7fa59e 1.0.72 2020-11-25 14:56:09 +00:00
a613c0aca2 fix(core): update 2020-11-25 14:56:08 +00:00
127564cd71 1.0.71 2020-11-25 14:43:23 +00:00
e077bf5b25 fix(core): update 2020-11-25 14:43:23 +00:00
64a3f57813 1.0.70 2020-11-24 20:57:42 +00:00
1315e8c3f6 fix(core): update 2020-11-24 20:57:41 +00:00
d059862841 1.0.69 2020-11-24 19:48:14 +00:00
ad34affb9e fix(core): update 2020-11-24 19:48:14 +00:00
011b3fb76a 1.0.68 2020-11-24 19:23:07 +00:00
47099d02b5 fix(core): update 2020-11-24 19:23:06 +00:00
f4029ed008 1.0.67 2020-11-24 19:19:00 +00:00
d5732822e4 fix(core): update 2020-11-24 19:18:59 +00:00
c467a92e7c 1.0.66 2020-11-24 16:55:58 +00:00
746c1148e3 fix(core): update 2020-11-24 16:55:57 +00:00
d75e66ba78 1.0.65 2020-11-23 20:41:27 +00:00
7c805a075e fix(core): update 2020-11-23 20:41:26 +00:00
5e1a44ad88 1.0.64 2020-11-21 16:50:14 +00:00
093eae2c97 fix(core): update 2020-11-21 16:50:13 +00:00
991d318de6 1.0.63 2020-11-06 01:27:47 +00:00
c7c3650fe9 fix(core): update 2020-11-06 01:27:46 +00:00
8d355f234f 1.0.62 2020-11-05 20:08:07 +00:00
a5c22ec1db fix(core): update 2020-11-05 20:08:07 +00:00
f5263a0cc4 1.0.61 2020-11-05 18:50:28 +00:00
4a022a7d1d fix(core): update 2020-11-05 18:50:28 +00:00
bd6ba6d6db 1.0.60 2020-11-05 18:08:42 +00:00
317bc63bc7 fix(core): update 2020-11-05 18:08:42 +00:00
22eeb7809b 1.0.59 2020-11-05 17:37:45 +00:00
fdd550ec21 fix(core): update 2020-11-05 17:37:45 +00:00
9db1f92ba3 1.0.58 2020-11-05 17:20:01 +00:00
772d0b0b97 fix(core): update 2020-11-05 17:20:01 +00:00
a68e9e1bf9 1.0.57 2020-11-05 15:40:35 +00:00
f9507b0dbd fix(core): update 2020-11-05 15:40:35 +00:00
f8c1a0135a 1.0.56 2020-11-04 18:35:46 +00:00
7d884f6556 fix(core): update 2020-11-04 18:35:45 +00:00
8a8ee5cd7b 1.0.55 2020-10-07 13:13:22 +00:00
1660381be6 fix(core): update 2020-10-07 13:13:21 +00:00
f0ad441415 1.0.54 2020-10-06 22:08:27 +00:00
27c087b693 fix(core): update 2020-10-06 22:08:26 +00:00
63463a751c 1.0.53 2020-09-16 15:10:53 +00:00
a01f5a5b8a fix(core): update 2020-09-16 15:10:52 +00:00
bb1ad4e037 1.0.52 2020-09-16 13:57:16 +00:00
eb871161f9 fix(core): update 2020-09-16 13:57:16 +00:00
090e5b4d42 1.0.51 2020-09-16 11:29:27 +00:00
8168dd1a0c fix(core): update 2020-09-16 11:29:26 +00:00
de15bc0d1c 1.0.50 2020-09-16 10:06:23 +00:00
13fa3d655e fix(core): update 2020-09-16 10:06:22 +00:00
18b93b860d 1.0.49 2020-09-15 20:56:34 +00:00
e8e6416b6f fix(core): update 2020-09-15 20:56:33 +00:00
fbe2f381c9 1.0.48 2020-09-15 20:24:12 +00:00
3cb0aceaad fix(core): update 2020-09-15 20:24:11 +00:00
6d6c92eee4 1.0.47 2020-09-13 15:53:31 +00:00
4385909677 fix(core): update 2020-09-13 15:53:30 +00:00
2dc36d8170 1.0.46 2020-09-13 14:58:27 +00:00
ffbde62744 fix(core): update 2020-09-13 14:58:26 +00:00
7bde843e43 1.0.45 2020-09-13 14:57:31 +00:00
faa7adcffe fix(core): update 2020-09-13 14:57:30 +00:00
7977538c05 1.0.44 2020-09-12 14:00:12 +00:00
afaa88047c 1.0.43 2020-09-12 13:14:17 +00:00
8aabe2820e fix(core): update 2020-09-12 13:14:17 +00:00
570d370c97 1.0.42 2020-09-12 13:11:11 +00:00
73552ad80f fix(core): update 2020-09-12 13:11:10 +00:00
537902aa53 1.0.41 2020-07-29 17:32:28 +00:00
e033bfa5b3 fix(core): update 2020-07-29 17:32:28 +00:00
4983e1ed90 1.0.40 2020-07-27 18:23:48 +00:00
899775b050 fix(core): update 2020-07-27 18:23:47 +00:00
7655fc0348 1.0.39 2020-07-27 17:11:01 +00:00
8aa5576318 fix(core): update 2020-07-27 17:11:00 +00:00
1ff54b0fcd 1.0.38 2020-07-15 18:58:40 +00:00
3901258272 fix(core): update 2020-07-15 18:58:40 +00:00
27380d1483 1.0.37 2020-07-15 18:12:27 +00:00
e2f9991f96 fix(core): update 2020-07-15 18:12:27 +00:00
133ce80b0a 1.0.36 2020-06-30 14:08:35 +00:00
cf12f45c9b fix(core): update 2020-06-30 14:08:35 +00:00
6cc5ec315e 1.0.35 2020-06-28 21:26:57 +00:00
88810bae2c fix(core): update 2020-06-28 21:26:57 +00:00
21369d8da5 1.0.34 2020-06-28 18:03:23 +00:00
a5973944ee fix(core): update 2020-06-28 18:03:22 +00:00
ad3f4b31fa 1.0.33 2020-06-28 17:40:03 +00:00
91b50ecde5 fix(core): update 2020-06-28 17:40:03 +00:00
45fecfbde8 1.0.32 2020-06-28 16:59:15 +00:00
e3e6d06969 fix(core): update 2020-06-28 16:59:14 +00:00
50ace4c236 1.0.31 2020-06-28 16:42:31 +00:00
90f68965bb fix(core): update 2020-06-28 16:42:30 +00:00
6c92a9cdf8 1.0.30 2020-06-28 15:49:47 +00:00
d4e24d615a fix(core): update 2020-06-28 15:49:46 +00:00
37b7dca212 1.0.29 2020-06-26 01:39:10 +00:00
7d9dc1ad65 fix(core): update 2020-06-26 01:39:10 +00:00
20f06e5935 1.0.28 2020-06-03 10:34:10 +00:00
d3fa33f0cc fix(core): update 2020-06-03 10:34:09 +00:00
aa91dad272 1.0.27 2020-06-03 09:07:32 +00:00
05a22599b8 fix(core): update 2020-06-03 09:07:31 +00:00
bd0b279fc2 1.0.26 2020-06-01 12:30:22 +00:00
8276a5b09b fix(core): update 2020-06-01 12:30:21 +00:00
29 changed files with 11315 additions and 3699 deletions

View File

@ -12,30 +12,38 @@ stages:
- release
- metadata
before_script:
- pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ====================
# security stage
# ====================
mirror:
stage: security
script:
- npmci git mirror
tags:
- lossless
- docker
- notpriv
audit:
# ====================
# security stage
# ====================
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --prod
tags:
- lossless
- docker
- notpriv
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --dev
tags:
- lossless
- docker
allow_failure: true
# ====================
# test stage
@ -44,28 +52,22 @@ audit:
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- lossless
- docker
- priv
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
- npmci npm build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- lossless
- docker
- notpriv
release:
stage: release
@ -85,11 +87,12 @@ release:
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- lossless
- docker
@ -109,11 +112,9 @@ trigger:
pages:
stage: metadata
script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command tsdoc
- npmci command npm run buildDocs
tags:
- lossless
- docker

24
.vscode/launch.json vendored
View File

@ -2,28 +2,10 @@
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
"type": "node-terminal"
}
]
}

View File

@ -15,7 +15,7 @@
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm"]
"enum": ["website", "element", "service", "npm", "wcc"]
}
}
}

358
changelog.md Normal file
View File

@ -0,0 +1,358 @@
# Changelog
## 2025-02-01 - 2.3.2 - fix(scroller)
Rename method from scrollToElement to toElement for consistency
- Updated method name in Scroller class for better coherence with existing naming conventions.
## 2025-01-31 - 2.3.1 - fix(scroller)
Removed passive option from scroll event listener
- The 'passive: true' option was removed from the native scroll event listener attachment.
## 2025-01-31 - 2.3.0 - feat(scroller)
Enhance Scroller class with callback execution and adaptive scroll listener
- Added support for executing scroll callbacks in the Scroller class.
- Integrated adaptive scrolling mechanism using Lenis, with native smooth scrolling detection.
- Ensured seamless switching between native scroll listener and Lenis scroll listener.
## 2025-01-31 - 2.2.0 - feat(core)
Enhance scrolling capabilities by integrating Scroller class and adding lenis support
- Replaced SweetScroll setup in domtools.classes.domtools.ts with Scroller class.
- Moved SweetScroll initialization and methods to new Scroller class.
- Added lenis support in the Scroller class for enhanced scrolling capabilities.
- Updated dev and dependencies versions in package.json.
## 2025-01-09 - 2.1.1 - fix(themamanager)
Fixed automatic global theme change subscription for background updates.
- Corrected the logic for updating the document's background color upon theme changes using themeObservable subscription.
## 2025-01-09 - 2.1.0 - feat(themeManager)
Exposed method to enable automatic global theme change.
- Enable easier application of dark and bright themes by exposing a method.
- Updated devDependencies and dependencies in package.json to latest versions.
## 2024-10-21 - 2.0.65 - fix(ThemeManager)
Refactor ThemeManager class to separate global style setting logic
- Moved logic to set global styles into a dedicated function setGlobalStylesOnPurpose in ThemeManager.
## 2024-10-06 - 2.0.64 - fix(pluginexports)
Add missing import for smartrouter in pluginexports.
- Fixed a missing import for smartrouter in ts/domtools.pluginexports.ts.
## 2024-10-06 - 2.0.63 - fix(dependencies)
Update @push.rocks/smartrouter to version ^1.3.2 for better compatibility
- Updated @push.rocks/smartrouter from version ^1.2.1 to ^1.3.2 in package.json.
## 2024-10-06 - 2.0.62 - fix(dependencies)
Update dependencies to resolve potential issues and improve stability
## 2024-10-04 - 2.0.61 - fix(core)
Correct import statement for SweetScroll.
- Fix import syntax for SweetScroll in domtools.pluginexports.ts
## 2024-10-02 - 2.0.60 - fix(dependencies)
Update dependencies to latest versions
- Bump @git.zone/tsbuild version from 2.1.82 to 2.1.84
- Bump @push.rocks/tapbundle version from 5.0.23 to 5.3.0
- Bump @types/node version from 20.14.9 to 22.7.4
- Bump @api.global/typedrequest version from 3.0.30 to 3.0.32
- Bump @push.rocks/smartstate version from 2.0.17 to 2.0.18
- Bump lit version from 3.1.4 to 3.2.0
## 2024-10-02 - 2.0.59 - fix(core)
Refactor plugin exports to improve modularity
- Refactored the plugin exports to be more modular and organized.
- Replaced redundant plugin object definition in ts/index.ts with a simpler import and export pattern.
## 2024-07-01 - 2.0.58 - fix(dependencies)
Update dependencies and correct font family in styles
- Updated @git.zone/tsbuild to ^2.1.82
- Updated @git.zone/tstest to ^1.0.90
- Updated @push.rocks/tapbundle to ^5.0.23
- Updated @types/node to ^20.14.9
- Updated @api.global/typedrequest to ^3.0.30
- Updated @design.estate/dees-comms to ^1.0.27
- Updated @push.rocks/lik to ^6.0.15
- Updated @push.rocks/smartjson to ^5.0.20
- Updated @push.rocks/smartpromise to ^4.0.4
- Updated @push.rocks/webrequest to ^3.0.37
- Updated @push.rocks/webstore to ^2.0.20
- Updated lit to ^3.1.4
- Updated default font family to 'Geist Sans', 'Inter', sans-serif
## 2024-04-20 - 2.0.57 - Documentation
Update to project documentation
- Updated existing documentation to reflect recent changes
## 2023-10-23 - 2.0.42...2.0.55 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2023-10-07 - 2.0.41...2.0.51 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2023-09-17 - 2.0.40 - Core
Fixes in core functionality
- Fix(core): update
## 2023-08-07 - 2.0.36...2.0.38 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2023-04-05 - 2.0.28...2.0.30 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2023-01-07 - 2.0.26...2.0.27 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
## 2022-12-31 - 2.0.24...2.0.25 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
## 2022-08-01 - 2.0.22...2.0.23 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
## 2022-05-01 - 2.0.19...2.0.21 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2022-04-22 - 2.0.18...2.0.19 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
## 2022-04-21 - 2.0.10...2.0.17 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2022-03-18 - 2.0.0 - Core
Major release
- Fix(core): update
## 2021-11-21 - 1.0.98...1.0.99 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
## 2021-09-16 - 1.0.94...1.0.95 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
## 2021-09-08 - 1.0.91...1.0.93 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2021-09-01 - 1.0.89...1.0.90 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
## 2021-08-19 - 1.0.87 - Core
Fixes in core functionality
- Fix(core): update
## 2021-03-10 - 1.0.84...1.0.86 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-12-07 - 1.0.79...1.0.83 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-11-30 - 1.0.74...1.0.77 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-11-24 - 1.0.66...1.0.70 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-11-23 - 1.0.64...1.0.65 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
## 2020-11-06 - 1.0.61...1.0.63 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-10-07 - 1.0.53...1.0.55 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-09-16 - 1.0.49...1.0.52 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-09-13 - 1.0.45...1.0.47 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-09-12 - 1.0.41...1.0.44 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-07-27 - 1.0.38...1.0.40 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-06-28 - 1.0.29...1.0.36 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-06-03 - 1.0.26...1.0.28 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-05-28 - 1.0.21...1.0.25 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-05-27 - 1.0.18...1.0.20 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-05-26 - 1.0.16...1.0.17 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
## 2020-05-25 - 1.0.14...1.0.15 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
## 2020-05-24 - 1.0.11...1.0.13 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...
## 2020-05-23 - 1.0.3...1.0.10 - Core
Multiple updates and fixes
- Fix(core): update
- Fix(core): update
- Fix(core): update
- ...

View File

@ -1,4 +1,5 @@
Copyright (c) 2020 Lossless GmbH (hello@lossless.com)
Copyright (c) 2017 Nathan Friend (ts-keycode-enum)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -2,17 +2,36 @@
"gitzone": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "designestate",
"githost": "code.foss.global",
"gitscope": "design.estate",
"gitrepo": "dees-domtools",
"shortDescription": "tools to simplify complex css structures",
"npmPackagename": "@designestate/dees-domtools",
"description": "A package providing tools to simplify complex CSS structures and web development tasks, featuring TypeScript support and integration with various web technologies.",
"npmPackagename": "@design.estate/dees-domtools",
"license": "MIT",
"projectDomain": "design.estate"
"projectDomain": "design.estate",
"keywords": [
"CSS tools",
"web development",
"TypeScript support",
"CSS structure simplification",
"web components",
"theme management",
"DOM manipulation",
"responsive design",
"design system",
"lit element",
"keyboard event handling",
"state management",
"routing",
"performance optimization"
]
}
},
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}

3435
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +1,45 @@
{
"name": "@designestate/dees-domtools",
"version": "1.0.25",
"name": "@design.estate/dees-domtools",
"version": "2.3.2",
"private": false,
"description": "tools to simplify complex css structures",
"description": "A package providing tools to simplify complex CSS structures and web development tasks, featuring TypeScript support and integration with various web technologies.",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"author": "Lossless GmbH",
"license": "MIT",
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web && tsbundle npm)",
"format": "(gitzone format)"
"build": "(tsbuild --web --allowimplicitany && tsbundle npm)",
"format": "(gitzone format)",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.0.22",
"@gitzone/tsbundle": "^1.0.69",
"@gitzone/tstest": "^1.0.15",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^14.0.5",
"tslint": "^6.1.2",
"tslint-config-prettier": "^1.15.0"
"@git.zone/tsbuild": "^2.2.1",
"@git.zone/tsbundle": "^2.2.5",
"@git.zone/tstest": "^1.0.96",
"@push.rocks/tapbundle": "^5.5.6",
"@types/node": "^22.12.0"
},
"dependencies": {
"@pushrocks/lik": "^4.0.13",
"@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartstate": "^1.0.16",
"lit-element": "^2.3.1"
"@api.global/typedrequest": "^3.1.10",
"@design.estate/dees-comms": "^1.0.27",
"@push.rocks/lik": "^6.1.0",
"@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/smartjson": "^5.0.20",
"@push.rocks/smartmarkdown": "^3.0.3",
"@push.rocks/smartpromise": "^4.2.2",
"@push.rocks/smartrouter": "^1.3.2",
"@push.rocks/smartrx": "^3.0.7",
"@push.rocks/smartstate": "^2.0.19",
"@push.rocks/smartstring": "^4.0.15",
"@push.rocks/smarturl": "^3.1.0",
"@push.rocks/webrequest": "^3.0.37",
"@push.rocks/websetup": "^3.0.19",
"@push.rocks/webstore": "^2.0.20",
"lenis": "^1.1.20",
"lit": "^3.2.1",
"sweet-scroll": "^4.0.0"
},
"files": [
"ts/**/*",
@ -38,5 +52,24 @@
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
],
"keywords": [
"CSS tools",
"web development",
"TypeScript support",
"CSS structure simplification",
"web components",
"theme management",
"DOM manipulation",
"responsive design",
"design system",
"lit element",
"keyboard event handling",
"state management",
"routing",
"performance optimization"
]
}

9894
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

126
readme.md
View File

@ -1,32 +1,116 @@
# @designestate/dees-domtools
# @design.estate/dees-domtools
tools to simplify complex css structures
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@designestate/dees-domtools)
* [gitlab.com (source)](https://gitlab.com/designestate/dees-domtools)
* [github.com (source mirror)](https://github.com/designestate/dees-domtools)
* [docs (typedoc)](https://designestate.gitlab.io/dees-domtools/)
## Install
## Status for master
[![pipeline status](https://gitlab.com/designestate/dees-domtools/badges/master/pipeline.svg)](https://gitlab.com/designestate/dees-domtools/commits/master)
[![coverage report](https://gitlab.com/designestate/dees-domtools/badges/master/coverage.svg)](https://gitlab.com/designestate/dees-domtools/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@designestate/dees-domtools.svg)](https://www.npmjs.com/package/@designestate/dees-domtools)
[![Known Vulnerabilities](https://snyk.io/test/npm/@designestate/dees-domtools/badge.svg)](https://snyk.io/test/npm/@designestate/dees-domtools)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)
To install `@design.estate/dees-domtools`, simply use npm:
```bash
npm install --save @design.estate/dees-domtools
```
Ensure your project supports TypeScript and ESM syntax for the best development experience.
## Usage
Use TypeScript for best in class intellisense
This documentation aims to give you comprehensive guidance on how to utilize `@design.estate/dees-domtools` in your web projects to simplify complex CSS structures. Whether you're building a sophisticated web application or need a more manageable way to handle your CSS, this toolkit offers a variety of features designed to enhance and streamline your workflow. Throughout this guide, we'll cover the installation process, key features, examples, and best practices when working with `@design.estate/dees-domtools`.
## Contribution
Before diving into the examples, please ensure that you've completed the installation step as described above.
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
### Key Features
For further information read the linked docs at the top of this readme.
- **CSS Simplification**: Tools and utilities designed to abstract and simplify the handling of complex CSS structures.
- **Responsive Design Helpers**: Tools for managing responsive designs more easily, with utilities for breakpoints, and adaptable grids.
- **Element Utilities**: Simplified interactions with DOM elements, including dynamic style manipulations and more.
- **Theme Management**: Simplify the process of theme toggling (dark mode/light mode) in your applications.
- **Keyboard Event Handling**: Utilities for managing keyboard events, facilitating better interaction handling.
- **External Resources Management**: Easily manage external CSS and JavaScript resources within your project.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
### Getting Started
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)
To get started with `@design.estate/dees-domtools`, you first need to import the modules you intend to use in your project. Here's a simple example to illustrate how to import and use the package:
```typescript
import { DomTools, elementBasic, breakpoints, css } from '@design.estate/dees-domtools';
// Setting up DomTools for your application
const domToolsInstance = await DomTools.setupDomTools();
// Example: Using elementBasic utilities
elementBasic.setup();
```
### Simplifying CSS with CSS Utilities
The package offers a variety of CSS utilities that simplify the handling of complex CSS structures. Here's how you can use them in your project:
```typescript
import { css } from '@design.estate/dees-domtools';
// Example: Creating a CSS grid with a specified number of columns and gap size
const gridStyles = css.cssGridColumns(3, 10); // 3 columns with a 10px gap
```
### Managing Responsive Design
Responsive design is critical for modern web development. `@design.estate/dees-domtools` provides utilities to make it easier to manage responsive designs and breakpoints.
```typescript
import { breakpoints } from '@design.estate/dees-domtools';
// Example: Applying styles for different viewport sizes
const tabletStyles = breakpoints.cssForTablet(myCssStyles);
const phoneStyles = breakpoints.cssForPhone(myCssStyles);
```
### Theme Management
Managing themes (such as toggling between dark and light mode) is simplified with the built-in theme management tools.
```typescript
// Toggle between light and dark themes
domToolsInstance.themeManager.toggleDarkBright();
```
### Handling Keyboard Events
Keyboard event handling is made easy with the utilities provided by the toolkit. This can be particularly useful for adding keyboard navigation and shortcuts.
```typescript
import { Keyboard } from '@design.estate/dees-domtools';
// Initialize keyboard handling
const keyboard = new Keyboard(document.body);
// Bind an event to a specific key combination
keyboard.on([Keyboard.Key.Ctrl, Keyboard.Key.S]).subscribe(() => {
console.log('Ctrl+S was pressed');
});
```
### Best Practices
- **Organize Your CSS**: Use the provided CSS utilities to structure your styles in a way that makes them easy to maintain and scale.
- **Embrace Responsiveness**: Leverage the responsive design helpers to ensure your application looks great on any device.
- **Consistent Theme Handling**: Utilize the theme management tools to provide a seamless experience for your users, allowing them to choose their preferred theme.
By integrating `@design.estate/dees-domtools` into your project, you can leverage a comprehensive suite of utilities designed to simplify complex CSS structures and enhance your web development workflow.
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.

9
test/test.browser.ts Normal file
View File

@ -0,0 +1,9 @@
import { expect, tap } from '@push.rocks/tapbundle';
import * as domtools from '../ts/index.js';
tap.test('first test', async () => {
const domtoolsInstance = await domtools.DomTools.setupDomTools();
expect(domtoolsInstance).toBeInstanceOf(domtools.DomTools);
});
tap.start();

View File

@ -1,8 +0,0 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as deesCsstools from '../ts/index';
tap.test('first test', async () => {
console.log('hi');
});
tap.start();

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '@design.estate/dees-domtools',
version: '2.3.2',
description: 'A package providing tools to simplify complex CSS structures and web development tasks, featuring TypeScript support and integration with various web technologies.'
}

View File

@ -1,68 +0,0 @@
import { DomTools } from './domtools.classes.domtools';
export const desktop = 1240;
export const tablet = 700;
export const phablet = 500;
export const phone = 340;
export type TViewport = 'native' | 'desktop' | 'tablet' | 'phablet' | 'phone';
export const getEnvironment = (): TViewport => {
if (globalThis.deesDomTools && globalThis.deesDomTools.domToolsStatePart.getState().virtualViewport) {
return globalThis.deesDomTools.domToolsStatePart.getState().virtualViewport;
} else {
return 'native';
}
};
export const cssForTablet = (contentArg) => {
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
return `
@media (max-width: ${tablet}px) {
${contentArg}
}
`;
} else if (
getEnvironment() === 'tablet' ||
getEnvironment() === 'phablet' ||
getEnvironment() === 'phone'
) {
return `
@media (min-width: 0px) {
${contentArg}
}
`;
}
};
export const cssForPhablet = (contentArg) => {
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
return `
@media (max-width: ${phablet}px) {
${contentArg}
}
`;
} else if (getEnvironment() === 'phablet' || getEnvironment() === 'phone') {
return `
@media (min-width: 0px) {
${contentArg}
}
`;
}
};
export const cssForPhone = (contentArg) => {
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
return `
@media (max-width: ${phone}px) {
${contentArg}
}
`;
} else if (getEnvironment() === 'phone') {
return `
@media (min-width: 0px) {
${contentArg}
}
`;
}
};

View File

@ -1,18 +1,32 @@
import * as plugins from './domtools.plugins';
import { Stringmap } from '@pushrocks/lik/dist_ts/lik.stringmap';
import { FastMap } from '@pushrocks/lik/dist_ts/lik.fastmap';
import { TViewport } from './domtools.breakpoints';
import * as plugins from './domtools.plugins.js';
import { type TViewport } from './domtools.css.breakpoints.js';
import { Scroller } from './domtools.classes.scroller.js';
import { WebSetup } from '@push.rocks/websetup';
import { ThemeManager } from './domtools.classes.thememanager.js';
import { Keyboard } from './domtools.classes.keyboard.js';
export interface IDomToolsState {
virtualViewport: TViewport;
jwt: string;
}
export interface IDomToolsContructorOptions {
ignoreGlobal?: boolean;
}
export class DomTools {
public static async setupDomTools() {
// ======
// STATIC
// ======
/**
* setups domtools
*/
public static async setupDomTools(optionsArg: IDomToolsContructorOptions = {}) {
let domToolsInstance: DomTools;
if (!globalThis.deesDomTools) {
globalThis.deesDomTools = new DomTools();
if (!globalThis.deesDomTools && !optionsArg.ignoreGlobal) {
globalThis.deesDomTools = new DomTools(optionsArg);
domToolsInstance = globalThis.deesDomTools;
// lets make sure the dom is ready
const readyStateChangedFunc = () => {
if (document.readyState === 'interactive' || document.readyState === 'complete') {
@ -23,6 +37,8 @@ export class DomTools {
};
document.addEventListener('readystatechange', readyStateChangedFunc);
domToolsInstance.domToolsReady.resolve();
} else if (optionsArg.ignoreGlobal) {
domToolsInstance = new DomTools(optionsArg);
} else {
domToolsInstance = globalThis.deesDomTools;
}
@ -30,48 +46,70 @@ export class DomTools {
return domToolsInstance;
}
public smartstate = new plugins.smartstate.Smartstate();
public domToolsStatePart = this.smartstate.getStatePart<IDomToolsState>('domtools', {
virtualViewport: 'native'
});
public actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(async (statePart, payload) => {
const currentState = statePart.getState();
currentState.virtualViewport = payload;
return currentState;
});
public domToolsReady = plugins.smartpromise.defer();
public domReady = plugins.smartpromise.defer();
public globalStylesReady = plugins.smartpromise.defer();
/**
* if you can, use the static asysnc .setupDomTools() function instead since it is safer to use.
*/
public static getGlobalDomToolsSync(): DomTools {
const globalDomTools: DomTools = globalThis.deesDomTools;
if (!globalDomTools) {
throw new Error('You tried to access domtools synchronously too early');
}
return globalThis.deesDomTools;
}
// ========
// INSTANCE
// ========
// elements
public elements: {
headElement: HTMLElement;
bodyElement: HTMLElement;
} = {
headElement: null,
bodyElement: null
bodyElement: null,
};
constructor() {
}
public websetup: WebSetup = new WebSetup({
metaObject: {
title: 'loading...',
},
});
public async setGlobalStyles(stylesText: string) {
await this.domReady.promise;
const styleElement = document.createElement('style');
styleElement.type = 'text/css';
styleElement.appendChild(document.createTextNode(stylesText));
this.elements.headElement.appendChild(styleElement);
}
public smartstate = new plugins.smartstate.Smartstate();
public domToolsStatePart = this.smartstate.getStatePart<IDomToolsState>('domtools', {
virtualViewport: 'native',
jwt: null,
});
public router = new plugins.smartrouter.SmartRouter({
debug: false,
});
public convenience = {
typedrequest: plugins.typedrequest,
smartdelay: plugins.smartdelay,
smartjson: plugins.smartjson,
smarturl: plugins.smarturl,
};
public deesComms = new plugins.deesComms.DeesComms();
public scroller = new Scroller(this);
public themeManager = new ThemeManager(this);
public keyboard = new Keyboard(document.body);
public domToolsReady = plugins.smartpromise.defer();
public domReady = plugins.smartpromise.defer();
public globalStylesReady = plugins.smartpromise.defer();
constructor(optionsArg: IDomToolsContructorOptions) {}
private runOnceTrackerStringMap = new plugins.lik.Stringmap();
private runOnceResultMap = new plugins.lik.FastMap();
private runOnceTrackerStringMap = new Stringmap();
private runOnceResultMap = new FastMap();
/**
* run a function once and always get the Promise of the first execution
* @param identifierArg
* @param funcArg
* @param identifierArg the indentifier arg identifies functions. functions with the same identifier are considered equal
* @param funcArg the actual func arg to run
*/
public async runOnce<T>(identifierArg: string, funcArg: () => Promise<T>) {
const runningId = `${identifierArg}+runningCheck`;
@ -83,7 +121,7 @@ export class DomTools {
this.runOnceTrackerStringMap.removeString(runningId);
}
return await this.runOnceTrackerStringMap.registerUntilTrue(
stringMap => {
(stringMap) => {
return !stringMap.includes(runningId);
},
() => {
@ -92,7 +130,54 @@ export class DomTools {
);
}
setVirtualViewport(environmentArg: TViewport) {
this.domToolsStatePart.dispatchAction(this.actionSetVirtualViewport, environmentArg);
// setStuff
/**
* allows to set global styles
* @param stylesText the css text you want to set
*/
public async setGlobalStyles(stylesText: string) {
await this.domReady.promise;
const styleElement = document.createElement('style');
styleElement.type = 'text/css';
styleElement.appendChild(document.createTextNode(stylesText));
this.elements.headElement.appendChild(styleElement);
}
/**
* allows to set global styles
* @param stylesText the css text you want to set
*/
public async setExternalScript(scriptLinkArg: string) {
await this.domReady.promise;
const done = plugins.smartpromise.defer();
const script = document.createElement('script');
script.src = scriptLinkArg;
script.addEventListener('load', function () {
done.resolve();
});
const parentNode = document.head || document.body;
parentNode.append(script);
await done.promise;
}
/**
* allows setting external css files
* @param cssLinkArg a url to an external stylesheet
*/
public async setExternalCss(cssLinkArg: string) {
const cssTag = document.createElement('link');
cssTag.rel = 'stylesheet';
cssTag.crossOrigin = 'anonymous';
cssTag.href = cssLinkArg;
document.head.append(cssTag);
}
/**
* allows setting of website infos
* @param optionsArg the website info
*/
public async setWebsiteInfo(optionsArg: plugins.websetup.IWebSetupConstructorOptions) {
await this.websetup.setup(optionsArg);
await this.websetup.readyPromise;
}
}

View File

@ -0,0 +1,213 @@
import * as plugins from './domtools.plugins.js';
export enum Key {
Backspace = 8,
Tab = 9,
Enter = 13,
Shift = 16,
Ctrl = 17,
Alt = 18,
PauseBreak = 19,
CapsLock = 20,
Escape = 27,
Space = 32,
PageUp = 33,
PageDown = 34,
End = 35,
Home = 36,
LeftArrow = 37,
UpArrow = 38,
RightArrow = 39,
DownArrow = 40,
Insert = 45,
Delete = 46,
Zero = 48,
ClosedParen = Zero,
One = 49,
ExclamationMark = One,
Two = 50,
AtSign = Two,
Three = 51,
PoundSign = Three,
Hash = PoundSign,
Four = 52,
DollarSign = Four,
Five = 53,
PercentSign = Five,
Six = 54,
Caret = Six,
Hat = Caret,
Seven = 55,
Ampersand = Seven,
Eight = 56,
Star = Eight,
Asterik = Star,
Nine = 57,
OpenParen = Nine,
A = 65,
B = 66,
C = 67,
D = 68,
E = 69,
F = 70,
G = 71,
H = 72,
I = 73,
J = 74,
K = 75,
L = 76,
M = 77,
N = 78,
O = 79,
P = 80,
Q = 81,
R = 82,
S = 83,
T = 84,
U = 85,
V = 86,
W = 87,
X = 88,
Y = 89,
Z = 90,
LeftWindowKey = 91,
RightWindowKey = 92,
SelectKey = 93,
Numpad0 = 96,
Numpad1 = 97,
Numpad2 = 98,
Numpad3 = 99,
Numpad4 = 100,
Numpad5 = 101,
Numpad6 = 102,
Numpad7 = 103,
Numpad8 = 104,
Numpad9 = 105,
Multiply = 106,
Add = 107,
Subtract = 109,
DecimalPoint = 110,
Divide = 111,
F1 = 112,
F2 = 113,
F3 = 114,
F4 = 115,
F5 = 116,
F6 = 117,
F7 = 118,
F8 = 119,
F9 = 120,
F10 = 121,
F11 = 122,
F12 = 123,
NumLock = 144,
ScrollLock = 145,
SemiColon = 186,
Equals = 187,
Comma = 188,
Dash = 189,
Period = 190,
UnderScore = Dash,
PlusSign = Equals,
ForwardSlash = 191,
Tilde = 192,
GraveAccent = Tilde,
OpenBracket = 219,
ClosedBracket = 221,
Quote = 222,
}
export class Keyboard {
private mapCombosToHandlers = new Map<number[], plugins.smartrx.rxjs.Subject<KeyboardEvent>>();
private pressedKeys = new Set<Key>();
constructor(private domNode: Element | Document) {
this.startListening();
}
public keyEnum = Key;
public on(keys: Key[]) {
const subject = new plugins.smartrx.rxjs.Subject<KeyboardEvent>();
this.registerKeys(keys, subject);
return subject;
}
public triggerKeyPress(keysArg: Key[]) {
for (const key of keysArg) {
this.pressedKeys.add(key);
}
this.checkMatchingKeyboardSubjects();
for (const key of keysArg) {
this.pressedKeys.delete(key);
}
}
public startListening() {
this.domNode.addEventListener('keydown', this.handleKeyDown);
this.domNode.addEventListener('keyup', this.handleKeyUp);
}
public stopListening() {
this.domNode.removeEventListener('keydown', this.handleKeyDown);
this.domNode.removeEventListener('keyup', this.handleKeyUp);
}
public clear() {
this.stopListening();
this.mapCombosToHandlers.clear();
this.pressedKeys.clear();
}
private handleKeyDown = (event: KeyboardEvent) => {
this.pressedKeys.add(event.keyCode);
this.checkMatchingKeyboardSubjects(event);
};
private checkMatchingKeyboardSubjects(payloadArg?) {
this.mapCombosToHandlers.forEach((subjectArg, keysArg) => {
if (this.areAllKeysPressed(keysArg)) {
subjectArg.next(payloadArg);
}
});
}
private handleKeyUp = (event: KeyboardEvent) => {
this.pressedKeys.delete(event.keyCode);
};
private areAllKeysPressed(keysArg: Key[]) {
let result = true;
keysArg.forEach((key) => {
if (!this.pressedKeys.has(key)) {
result = false;
}
});
return result;
}
private registerKeys(
keysArg: Array<Key>,
subjectArg: plugins.smartrx.rxjs.Subject<KeyboardEvent>
) {
if (!this.mapCombosToHandlers.has(keysArg)) {
this.mapCombosToHandlers.set(keysArg, subjectArg);
} else {
const subject = this.mapCombosToHandlers.get(keysArg);
return subject;
}
}
}

View File

@ -1 +0,0 @@
import * as plugins from './domtools.plugins';

View File

@ -0,0 +1,175 @@
import type { DomTools } from './domtools.classes.domtools.js';
import * as plugins from './domtools.plugins.js';
export class Scroller {
public domtoolsInstance: DomTools;
// Array to store scroll callback functions.
private scrollCallbacks: Array<() => void> = [];
// Lenis instance (if activated) or null.
private lenisInstance: plugins.Lenis | null = null;
// Bound handlers to allow removal from event listeners.
private handleNativeScroll = (event: Event): void => {
this.executeScrollCallbacks();
};
private handleLenisScroll = (info: any): void => {
this.executeScrollCallbacks();
};
constructor(domtoolsInstanceArg: DomTools) {
this.domtoolsInstance = domtoolsInstanceArg;
// Attach the native scroll listener by default.
this.attachNativeScrollListener();
}
private sweetScroller = new plugins.SweetScroll({});
/**
* Scrolls to a given element with options.
*/
public async toElement(
elementArg: HTMLElement,
optionsArg: Parameters<typeof this.sweetScroller.toElement>[1]
) {
this.sweetScroller.toElement(elementArg, optionsArg);
await plugins.smartdelay.delayFor(optionsArg.duration);
}
/**
* Detects whether native smooth scrolling is enabled.
*/
public async detectNativeSmoothScroll() {
const done = plugins.smartpromise.defer<boolean>();
const sampleSize = 100;
const acceptableDeltaDifference = 3;
const minimumSmoothRatio = 0.75;
const eventDeltas: number[] = [];
function onWheel(event: WheelEvent) {
eventDeltas.push(event.deltaY);
if (eventDeltas.length >= sampleSize) {
window.removeEventListener('wheel', onWheel);
analyzeEvents();
}
}
function analyzeEvents() {
const totalDiffs = eventDeltas.length - 1;
let smallDiffCount = 0;
for (let i = 0; i < totalDiffs; i++) {
const diff = Math.abs(eventDeltas[i + 1] - eventDeltas[i]);
if (diff <= acceptableDeltaDifference) {
smallDiffCount++;
}
}
const smoothRatio = smallDiffCount / totalDiffs;
if (smoothRatio >= minimumSmoothRatio) {
console.log('Smooth scrolling detected.');
done.resolve(true);
} else {
console.log('Smooth scrolling NOT detected.');
done.resolve(false);
}
}
window.addEventListener('wheel', onWheel);
return done.promise;
}
/**
* Enables Lenis scrolling.
* If optionsArg.disableOnNativeSmoothScroll is true and native smooth scrolling is detected,
* Lenis will be destroyed immediately.
*/
public async enableLenisScroll(optionsArg?: { disableOnNativeSmoothScroll?: boolean }) {
const lenis = new plugins.Lenis({
autoRaf: true,
});
if (optionsArg?.disableOnNativeSmoothScroll) {
if (await this.detectNativeSmoothScroll()) {
lenis.destroy();
return;
}
}
// Activate Lenis scrolling.
this.lenisInstance = lenis;
// Switch from native scroll listener to Lenis scroll listener.
this.detachNativeScrollListener();
this.attachLenisScrollListener();
// Monkey-patch the destroy method so that when Lenis is destroyed,
// the native scroll listener is reattached.
const originalDestroy = lenis.destroy.bind(lenis);
lenis.destroy = () => {
originalDestroy();
this.detachLenisScrollListener();
this.attachNativeScrollListener();
this.lenisInstance = null;
};
}
/**
* Registers a callback to be executed on scroll.
* @param callback A function to execute on each scroll event.
*/
public onScroll(callback: () => void): void {
this.scrollCallbacks.push(callback);
}
/**
* Executes all registered scroll callbacks concurrently.
*/
private executeScrollCallbacks(): void {
// Execute all callbacks in parallel.
this.scrollCallbacks.forEach((callback) => {
try {
callback();
} catch (error) {
console.error('Error in scroll callback:', error);
}
});
}
/**
* Attaches the native scroll event listener.
*/
private attachNativeScrollListener(): void {
window.addEventListener('scroll', this.handleNativeScroll);
}
/**
* Detaches the native scroll event listener.
*/
private detachNativeScrollListener(): void {
window.removeEventListener('scroll', this.handleNativeScroll);
}
/**
* Attaches the Lenis scroll event listener.
*/
private attachLenisScrollListener(): void {
if (this.lenisInstance) {
// Assuming that Lenis exposes an `on` method to listen to scroll events.
this.lenisInstance.on('scroll', this.handleLenisScroll);
}
}
/**
* Detaches the Lenis scroll event listener.
*/
private detachLenisScrollListener(): void {
if (this.lenisInstance) {
// Assuming that Lenis exposes an `off` method to remove scroll event listeners.
this.lenisInstance.off('scroll', this.handleLenisScroll);
}
}
}

View File

@ -0,0 +1,61 @@
import { DomTools } from './domtools.classes.domtools.js';
import * as plugins from './domtools.plugins.js';
export class ThemeManager {
public domtoolsRef: DomTools;
public goBrightBoolean = false;
public preferredColorSchemeMediaMatch = window.matchMedia('(prefers-color-scheme: light)');
public themeObservable = new plugins.smartrx.rxjs.ReplaySubject<boolean>(1);
constructor(domtoolsRefArg: DomTools) {
this.domtoolsRef = domtoolsRefArg;
// lets care
this.goBrightBoolean = this.preferredColorSchemeMediaMatch.matches;
this.preferredColorSchemeMediaMatch.addEventListener('change', (eventArg) => {
this.goBrightBoolean = eventArg.matches;
this.updateAllConnectedElements();
});
this.updateAllConnectedElements();
}
public async enableAutomaticGlobalThemeChange() {
if (document.body && document.body.style) {
this.themeObservable.subscribe({
next: (goBright) => {
document.body.style.background = goBright ? '#fff' : '#000';
}
});
}
}
private async updateAllConnectedElements() {
this.themeObservable.next(this.goBrightBoolean);
}
/**
* set the theme of the website to bright
*/
public goBright() {
this.goBrightBoolean = true;
this.updateAllConnectedElements();
}
/**
* set the theme of the website to dark
*/
public goDark() {
this.goBrightBoolean = false;
this.updateAllConnectedElements();
}
/**
* simply toggle between bright and dark
*/
public toggleDarkBright() {
this.goBrightBoolean = !this.goBrightBoolean;
this.updateAllConnectedElements();
}
}

View File

@ -0,0 +1,41 @@
import { DomTools } from './domtools.classes.domtools.js';
import { css, unsafeCSS } from 'lit';
/**
* changes scrollbar styles to be consistent across OS borders
*/
export const scrollBarStyles: string = (() => {
const returnStylesOld = navigator.userAgent.indexOf('Mac OS X') === -1 ? css``.cssText : ``;
const returnStyles = css`
/* width */
::-webkit-scrollbar {
width: 0px;
}
body {
scrollbar-width: none;
}
`.cssText;
return returnStyles;
})();
export const globalBaseStyles: string = css`
/*
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialicons/v42/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2)
format('woff2');
} */
/* global body styles */
body {
margin: 0px;
font-family: 'Geist Sans', 'Inter', sans-serif;
box-sizing: border-box;
}
/* scroll bar styles */
${unsafeCSS(scrollBarStyles)}
`.cssText;

View File

@ -0,0 +1,66 @@
import { DomTools } from './domtools.classes.domtools.js';
import { CSSResult, unsafeCSS } from 'lit';
export const desktop = 1600;
export const notebook = 1240;
export const tablet = 1024;
export const phablet = 600;
export const phone = 400;
export type TViewport = 'native' | 'desktop' | 'tablet' | 'phablet' | 'phone';
export const cssForDesktop = (cssArg: CSSResult) => {
return unsafeCSS(`
@container wccToolsViewport (min-width: ${desktop}px) {
${cssArg.cssText}
}
@media (min-width: ${desktop}px) {
${cssArg.cssText}
}
`);
};
export const cssForNotebook = (cssArg: CSSResult) => {
return unsafeCSS(`
@container wccToolsViewport (max-width: ${notebook}px) {
${cssArg.cssText}
}
@media (max-width: ${notebook}px) {
${cssArg.cssText}
}
`);
};
export const cssForTablet = (cssArg: CSSResult) => {
return unsafeCSS(`
@container wccToolsViewport (max-width: ${tablet}px) {
${cssArg.cssText}
}
@media (max-width: ${tablet}px) {
${cssArg.cssText}
}
`);
};
export const cssForPhablet = (cssArg: CSSResult) => {
return unsafeCSS(`
@container wccToolsViewport (max-width: ${phablet}px) {
${cssArg.cssText}
}
@media (max-width: ${phablet}px) {
${cssArg.cssText}
}
`);
};
export const cssForPhone = (cssArg: CSSResult) => {
return unsafeCSS(`
@container wccToolsViewport (max-width: ${phone}px) {
${cssArg.cssText}
}
@media (max-width: ${phone}px) {
${cssArg.cssText}
}
`);
};

View File

@ -1,8 +1,9 @@
export const cssGridColumns = (amountOfColumnsArg: number, gapSizeArg: number) => {
let returnString = ``;
for (let i = 0; i < amountOfColumnsArg; i++) {
returnString += ` calc((100%/${amountOfColumnsArg}) - (${gapSizeArg *
(amountOfColumnsArg - 1)}px/${amountOfColumnsArg}))`;
returnString += ` calc((100%/${amountOfColumnsArg}) - (${
gapSizeArg * (amountOfColumnsArg - 1)
}px/${amountOfColumnsArg}))`;
}
return returnString;
};

View File

@ -1,13 +1,38 @@
import * as plugins from './domtools.plugins';
import { DomTools } from './domtools.classes.domtools';
import * as plugins from './domtools.plugins.js';
import { DomTools, type IDomToolsContructorOptions } from './domtools.classes.domtools.js';
import { scrollBarStyles, globalBaseStyles } from './domtools.css.basestyles.js';
import { html } from 'lit-element';
import { html, LitElement, css, unsafeCSS } from 'lit';
export const staticStyles = css`
* {
transition: background 0.1s, color 0.1s;
box-sizing: border-box;
}
:host {
box-sizing: border-box;
font-family: 'Geist Sans', 'Inter', sans-serif;
}
${unsafeCSS(scrollBarStyles)}
`;
/**
* styles to be included in every webcomponent
*/
export const styles = html`
<style>
* {
font-family: 'Roboto', sans-serif;
transition: background 0.1s, color 0.1s;
box-sizing: border-box;
}
:host {
font-family: 'Geist Sans', 'Inter', sans-serif;
}
${scrollBarStyles}
</style>
`;
@ -15,31 +40,20 @@ export const styles = html`
* a basic setup for elements
* makes sure everything is in check
*/
export const setup = async () => {
const domTools = await DomTools.setupDomTools();
export const setup = async (
elementArg?: LitElement,
optionsArg: IDomToolsContructorOptions = {}
): Promise<DomTools> => {
const domTools = await DomTools.setupDomTools(optionsArg);
if (elementArg) {
// lets do something with the element
// not used right now
}
domTools.runOnce('elementBasicSetup', async () => {
// bodyStyles
domTools.setGlobalStyles(`
body {
margin: 0px;
font-family: 'Roboto', sans-serif;
box-sizing: border-box;
}
`);
// material font
domTools.setGlobalStyles(`
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialicons/v42/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2) format('woff2');
}
`);
// Roboto Font
domTools.setGlobalStyles(`
@import url('https://fonts.googleapis.com/css?family=Roboto');
`);
domTools.setGlobalStyles(globalBaseStyles);
});
return domTools;
};

View File

@ -0,0 +1,23 @@
import * as smartdelay from '@push.rocks/smartdelay';
import * as smartmarkdown from '@push.rocks/smartmarkdown';
import * as smartpromise from '@push.rocks/smartpromise';
import SweetScroll from 'sweet-scroll';
import * as smartstate from '@push.rocks/smartstate';
import * as smartrouter from '@push.rocks/smartrouter';
import * as smartrx from '@push.rocks/smartrx';
import * as smartstring from '@push.rocks/smartstring';
import * as smarturl from '@push.rocks/smarturl';
import * as typedrequest from '@api.global/typedrequest';
export {
smartdelay,
smartmarkdown,
smartpromise,
SweetScroll,
smartstate,
smartrouter,
smartrx,
smartstring,
smarturl,
typedrequest
};

View File

@ -1,5 +1,55 @@
// pushrocks scope
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartstate from '@pushrocks/smartstate';
// designestate scope
import * as deesComms from '@design.estate/dees-comms';
export { smartpromise, smartstate };
export { deesComms };
// apiglobal scope
import * as typedrequest from '@api.global/typedrequest';
export { typedrequest };
// pushrocks scope
import * as smartdelay from '@push.rocks/smartdelay';
import * as smartjson from '@push.rocks/smartjson';
import * as smartmarkdown from '@push.rocks/smartmarkdown';
import * as smartpromise from '@push.rocks/smartpromise';
import * as smartrouter from '@push.rocks/smartrouter';
import * as smartrx from '@push.rocks/smartrx';
import * as smartstate from '@push.rocks/smartstate';
import * as smartstring from '@push.rocks/smartstring';
import * as smarturl from '@push.rocks/smarturl';
import * as webrequest from '@push.rocks/webrequest';
import * as websetup from '@push.rocks/websetup';
import * as webstore from '@push.rocks/webstore';
// subscope lik
import { ObjectMap } from '@push.rocks/lik/dist_ts/lik.objectmap.js';
import { Stringmap } from '@push.rocks/lik/dist_ts/lik.stringmap.js';
import { FastMap } from '@push.rocks/lik/dist_ts/lik.fastmap.js';
const lik = {
ObjectMap,
Stringmap,
FastMap,
};
export {
lik,
smartdelay,
smartjson,
smartmarkdown,
smartpromise,
smartrouter,
smartrx,
smarturl,
smartstate,
smartstring,
webrequest,
websetup,
webstore,
};
// third party scope
import Lenis from 'lenis'
import SweetScroll from 'sweet-scroll';
export { Lenis, SweetScroll };

View File

@ -1,8 +1,20 @@
export * from './domtools.colors';
export * from './domtools.colors.js';
import * as elementBasic from './domtools.elementbasic';
import * as breakpoints from './domtools.breakpoints';
import * as css from './domtools.css';
import * as elementBasic from './domtools.elementbasic.js';
import * as breakpoints from './domtools.css.breakpoints.js';
import * as css from './domtools.css.js';
export { css, breakpoints, elementBasic };
export { DomTools } from './domtools.classes.domtools';
export { DomTools, type IDomToolsContructorOptions } from './domtools.classes.domtools.js';
export { TypedRequest } from '@api.global/typedrequest';
export { type IWebSetupConstructorOptions } from '@push.rocks/websetup';
import * as plugins from './domtools.pluginexports.js';
export { plugins };
// type exports
import type { rxjs } from '@push.rocks/smartrx';
export type {
rxjs,
}

14
tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}