@pixelium/web-vue 0.0.2 → 0.0.3-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/README.md +42 -0
  2. package/README.zh.md +6 -3
  3. package/coverage/base.css +224 -0
  4. package/coverage/block-navigation.js +87 -0
  5. package/coverage/coverage-final.json +106 -0
  6. package/coverage/favicon.png +0 -0
  7. package/coverage/index.html +926 -0
  8. package/coverage/prettify.css +1 -0
  9. package/coverage/prettify.js +2 -0
  10. package/coverage/sort-arrow-sprite.png +0 -0
  11. package/coverage/sorter.js +210 -0
  12. package/dist/font.css +1 -1
  13. package/dist/index.d.ts +1593 -248
  14. package/dist/normalize.css +2 -0
  15. package/dist/pixelium-vue-icon-hn.cjs +1 -1
  16. package/dist/pixelium-vue-icon-hn.css +2 -1
  17. package/dist/pixelium-vue-icon-hn.js +8533 -8154
  18. package/dist/pixelium-vue-icon-hn.umd.cjs +1 -1
  19. package/dist/pixelium-vue-icon-pa.cjs +1 -1
  20. package/dist/pixelium-vue-icon-pa.css +2 -1
  21. package/dist/pixelium-vue-icon-pa.js +10625 -10143
  22. package/dist/pixelium-vue-icon-pa.umd.cjs +1 -1
  23. package/dist/pixelium-vue.cjs +2 -2
  24. package/dist/pixelium-vue.css +2 -1
  25. package/dist/pixelium-vue.js +7402 -5852
  26. package/dist/pixelium-vue.umd.cjs +2 -2
  27. package/es/aside/index.js +46 -151
  28. package/es/auto-complete/draw.d.ts +1 -1
  29. package/es/auto-complete/draw.js +26 -51
  30. package/es/auto-complete/index.css +92 -32
  31. package/es/auto-complete/index.d.ts +12 -15
  32. package/es/auto-complete/index.js +338 -400
  33. package/es/auto-complete/type.d.ts +25 -13
  34. package/es/avatar/css.js +2 -0
  35. package/es/avatar/draw.d.ts +2 -0
  36. package/es/avatar/draw.js +11 -0
  37. package/es/avatar/index.css +49 -0
  38. package/es/avatar/index.d.ts +15 -0
  39. package/es/avatar/index.js +110 -0
  40. package/es/avatar/type.d.ts +34 -0
  41. package/es/button/draw.d.ts +4 -4
  42. package/es/button/draw.js +213 -297
  43. package/es/button/index.css +40 -30
  44. package/es/button/index.d.ts +0 -4
  45. package/es/button/index.js +230 -256
  46. package/es/button/type.d.ts +3 -3
  47. package/es/button-group/index.css +0 -3
  48. package/es/button-group/index.d.ts +1 -2
  49. package/es/button-group/index.js +59 -31
  50. package/es/button-group/type.d.ts +21 -4
  51. package/es/checkbox/css.js +2 -0
  52. package/es/checkbox/draw.d.ts +4 -0
  53. package/es/checkbox/draw.js +46 -0
  54. package/es/checkbox/index.css +85 -0
  55. package/es/checkbox/index.d.ts +31 -0
  56. package/es/checkbox/index.js +206 -0
  57. package/es/checkbox/type.d.ts +88 -0
  58. package/es/checkbox-group/css.js +2 -0
  59. package/es/checkbox-group/index.css +20 -0
  60. package/es/checkbox-group/index.d.ts +23 -0
  61. package/es/checkbox-group/index.js +84 -0
  62. package/es/checkbox-group/type.d.ts +78 -0
  63. package/es/col/index.d.ts +2 -2
  64. package/es/col/index.js +43 -58
  65. package/es/container/index.js +18 -31
  66. package/es/divider/index.js +39 -53
  67. package/es/empty/index.css +4 -4
  68. package/es/empty/index.js +16 -71
  69. package/es/entry.js +102 -0
  70. package/es/footer/index.js +31 -40
  71. package/es/form/css.js +1 -0
  72. package/es/form/index.d.ts +27 -0
  73. package/es/form/index.js +125 -0
  74. package/es/form/type.d.ts +238 -0
  75. package/es/form/use-form.d.ts +4 -0
  76. package/es/form/use-form.js +48 -0
  77. package/es/form-item/css.js +2 -0
  78. package/es/form-item/index.css +77 -0
  79. package/es/form-item/index.d.ts +37 -0
  80. package/es/form-item/index.js +318 -0
  81. package/es/form-item/type.d.ts +96 -0
  82. package/es/grid/index.js +56 -75
  83. package/es/grid-item/css.js +0 -1
  84. package/es/grid-item/index.d.ts +1 -1
  85. package/es/grid-item/index.js +85 -121
  86. package/es/header/index.js +31 -40
  87. package/es/icon/index.js +44 -55
  88. package/es/icons/css-hn.js +0 -1
  89. package/es/icons/css-pa.js +0 -1
  90. package/es/icons/icon-hn.js +10337 -15986
  91. package/es/icons/icon-pa.js +12573 -17447
  92. package/es/image/css.js +2 -0
  93. package/es/image/index.css +69 -0
  94. package/es/image/index.d.ts +35 -0
  95. package/es/image/index.js +199 -0
  96. package/es/image/type.d.ts +126 -0
  97. package/es/index.css +1 -515
  98. package/es/index.d.ts +22 -2
  99. package/es/index.js +143 -123
  100. package/es/input/draw.d.ts +1 -1
  101. package/es/input/draw.js +26 -51
  102. package/es/input/index.css +85 -33
  103. package/es/input/index.d.ts +9 -16
  104. package/es/input/index.js +319 -423
  105. package/es/input/type.d.ts +3 -3
  106. package/es/input-group/index.css +0 -1
  107. package/es/input-group/index.d.ts +2 -2
  108. package/es/input-group/index.js +66 -37
  109. package/es/input-group/type.d.ts +16 -4
  110. package/es/input-group-label/draw.d.ts +1 -1
  111. package/es/input-group-label/draw.js +26 -51
  112. package/es/input-group-label/index.css +33 -22
  113. package/es/input-group-label/index.d.ts +1 -4
  114. package/es/input-group-label/index.js +104 -127
  115. package/es/input-group-label/type.d.ts +3 -3
  116. package/es/input-number/draw.d.ts +1 -1
  117. package/es/input-number/draw.js +26 -51
  118. package/es/input-number/index.css +90 -35
  119. package/es/input-number/index.d.ts +9 -16
  120. package/es/input-number/index.js +428 -536
  121. package/es/input-number/type.d.ts +3 -3
  122. package/es/input-tag/draw.d.ts +1 -1
  123. package/es/input-tag/draw.js +26 -48
  124. package/es/input-tag/index.css +100 -33
  125. package/es/input-tag/index.d.ts +7 -13
  126. package/es/input-tag/index.js +442 -467
  127. package/es/input-tag/type.d.ts +24 -13
  128. package/es/link/index.js +75 -106
  129. package/es/main/index.js +11 -15
  130. package/es/mask/index.js +94 -115
  131. package/es/message/index.css +1 -1
  132. package/es/message/index.js +168 -346
  133. package/es/message-box/css.js +1 -1
  134. package/es/message-box/index.js +98 -114
  135. package/es/message-box/message-box-wrapped.js +33 -46
  136. package/es/message-box/message-box.js +79 -111
  137. package/es/option-list/index.css +13 -13
  138. package/es/option-list/index.d.ts +4 -31
  139. package/es/option-list/index.js +99 -167
  140. package/es/option-list/type.d.ts +5 -1
  141. package/es/pixelate/pixel.d.ts +5 -0
  142. package/es/pixelate/pixel.js +70 -0
  143. package/es/pixelate/pixelate.worker.d.ts +1 -0
  144. package/es/popover/index.d.ts +13 -99
  145. package/es/popover/index.js +75 -238
  146. package/es/popover/type.d.ts +7 -2
  147. package/es/popup/css.js +1 -0
  148. package/es/popup/index.d.ts +210 -0
  149. package/es/popup/index.js +203 -0
  150. package/es/popup/type.d.ts +105 -0
  151. package/es/popup-content/draw.d.ts +2 -2
  152. package/es/popup-content/draw.js +98 -143
  153. package/es/popup-content/index.css +11 -11
  154. package/es/popup-content/index.d.ts +1 -0
  155. package/es/popup-content/index.js +253 -1576
  156. package/es/popup-content/type.d.ts +1 -0
  157. package/es/popup-trigger/index.d.ts +8 -2
  158. package/es/popup-trigger/index.js +122 -95
  159. package/es/popup-trigger/type.d.ts +4 -1
  160. package/es/popup-wrapper/css.js +2 -0
  161. package/es/popup-wrapper/index.css +14 -0
  162. package/es/popup-wrapper/index.d.ts +18 -0
  163. package/es/popup-wrapper/index.js +67 -0
  164. package/es/popup-wrapper/type.d.ts +9 -0
  165. package/es/radio/css.js +1 -0
  166. package/es/radio/draw.d.ts +4 -0
  167. package/es/radio/draw.js +47 -0
  168. package/es/radio/index.d.ts +30 -0
  169. package/es/radio/index.js +190 -0
  170. package/es/radio/style.css +73 -0
  171. package/es/radio/type.d.ts +76 -0
  172. package/es/radio-group/css.js +2 -0
  173. package/es/radio-group/index.css +20 -0
  174. package/es/radio-group/index.d.ts +23 -0
  175. package/es/radio-group/index.js +77 -0
  176. package/es/radio-group/type.d.ts +77 -0
  177. package/es/row/index.js +56 -70
  178. package/es/select/draw.d.ts +1 -1
  179. package/es/select/draw.js +26 -51
  180. package/es/select/index.css +118 -36
  181. package/es/select/index.d.ts +14 -16
  182. package/es/select/index.js +625 -672
  183. package/es/select/type.d.ts +60 -25
  184. package/es/share/const/event-bus-key.js +1 -6
  185. package/es/share/const/index.d.ts +4 -0
  186. package/es/share/const/index.js +22 -24
  187. package/es/share/const/provide-key.d.ts +5 -0
  188. package/es/share/const/provide-key.js +6 -5
  189. package/es/share/const/style.d.ts +6 -0
  190. package/es/share/const/style.js +7 -0
  191. package/es/share/hook/use-cancelable-delay.d.ts +1 -0
  192. package/es/share/hook/use-cancelable-delay.js +42 -0
  193. package/es/share/hook/use-click-outside-listener.d.ts +1 -1
  194. package/es/share/hook/use-click-outside-listener.js +28 -41
  195. package/es/share/hook/use-composition.js +17 -15
  196. package/es/share/hook/use-controlled-mode.d.ts +3 -3
  197. package/es/share/hook/use-controlled-mode.js +20 -23
  198. package/es/share/hook/use-dark-mode.js +51 -65
  199. package/es/share/hook/use-index-of-children.d.ts +2 -1
  200. package/es/share/hook/use-index-of-children.js +47 -45
  201. package/es/share/hook/use-lazy-load.d.ts +10 -0
  202. package/es/share/hook/use-lazy-load.js +133 -0
  203. package/es/share/hook/use-props-detect.d.ts +2 -0
  204. package/es/share/hook/use-resize-observer.d.ts +1 -2
  205. package/es/share/hook/use-resize-observer.js +28 -20
  206. package/es/share/hook/use-screen-width.js +27 -36
  207. package/es/share/hook/use-smooth-transition.d.ts +2 -0
  208. package/es/share/hook/use-smooth-transition.js +65 -0
  209. package/es/share/hook/use-textarea-height.js +86 -92
  210. package/es/share/hook/use-theme-mode.js +41 -42
  211. package/es/share/hook/use-transition-end.d.ts +2 -0
  212. package/es/share/hook/use-transition-end.js +12 -0
  213. package/es/share/hook/use-watch-global-css-var.js +12 -16
  214. package/es/share/hook/use-window-resize-listener.d.ts +1 -0
  215. package/es/share/hook/use-window-resize-listener.js +15 -0
  216. package/es/share/hook/use-z-index.js +30 -27
  217. package/es/share/type/index.d.ts +18 -3
  218. package/es/share/util/color.d.ts +5 -3
  219. package/es/share/util/color.js +156 -149
  220. package/es/share/util/common.d.ts +7 -2
  221. package/es/share/util/common.js +127 -65
  222. package/es/share/util/console.d.ts +3 -3
  223. package/es/share/util/console.js +10 -7
  224. package/es/share/util/dom.d.ts +19 -0
  225. package/es/share/util/dom.js +88 -0
  226. package/es/share/util/env.d.ts +1 -0
  227. package/es/share/util/env.js +5 -4
  228. package/es/share/util/event-bus.js +3 -20
  229. package/es/share/util/lru-cache.js +29 -33
  230. package/es/share/util/pixel.d.ts +4 -0
  231. package/es/share/util/plot.d.ts +8 -3
  232. package/es/share/util/plot.js +457 -229
  233. package/es/share/util/reactivity.d.ts +8 -0
  234. package/es/share/util/reactivity.js +23 -0
  235. package/es/share/util/render.js +31 -41
  236. package/es/share/util/theme.d.ts +3 -0
  237. package/es/share/util/theme.js +77 -57
  238. package/es/slider/css.js +2 -0
  239. package/es/slider/draw.d.ts +25 -0
  240. package/es/slider/draw.js +113 -0
  241. package/es/slider/index.css +119 -0
  242. package/es/slider/index.d.ts +66 -0
  243. package/es/slider/index.js +503 -0
  244. package/es/slider/type.d.ts +162 -0
  245. package/es/slider/util.d.ts +37 -0
  246. package/es/slider/util.js +130 -0
  247. package/es/space/index.css +24 -29
  248. package/es/space/index.js +73 -97
  249. package/es/spin/index.css +18 -17
  250. package/es/spin/index.js +72 -102
  251. package/es/spin/type.d.ts +11 -5
  252. package/es/switch/css.js +2 -0
  253. package/es/switch/draw.d.ts +2 -0
  254. package/es/switch/draw.js +18 -0
  255. package/es/switch/index.css +121 -0
  256. package/es/switch/index.d.ts +42 -0
  257. package/es/switch/index.js +259 -0
  258. package/es/switch/type.d.ts +133 -0
  259. package/es/tag/draw.d.ts +2 -2
  260. package/es/tag/draw.js +80 -127
  261. package/es/tag/index.css +38 -22
  262. package/es/tag/index.d.ts +2 -2
  263. package/es/tag/index.js +121 -190
  264. package/es/tag/type.d.ts +3 -3
  265. package/es/text-outline/css.js +2 -0
  266. package/es/text-outline/index.css +4 -0
  267. package/es/text-outline/index.d.ts +17 -0
  268. package/es/text-outline/index.js +33 -0
  269. package/es/text-outline/type.d.ts +23 -0
  270. package/es/textarea/draw.js +9 -11
  271. package/es/textarea/index.css +37 -23
  272. package/es/textarea/index.d.ts +8 -14
  273. package/es/textarea/index.js +274 -262
  274. package/es/tooltip/index.d.ts +100 -4
  275. package/es/tooltip/index.js +70 -226
  276. package/es/tooltip/type.d.ts +7 -2
  277. package/es/vendor.js +504 -0
  278. package/es/virtual-list/css.js +2 -0
  279. package/es/virtual-list/index.css +25 -0
  280. package/es/virtual-list/index.d.ts +11 -0
  281. package/es/virtual-list/index.js +313 -0
  282. package/es/virtual-list/type.d.ts +26 -0
  283. package/package.json +10 -16
  284. package/es/grid-item/index.css +0 -0
  285. /package/es/message-box/{message-box.css → index.css} +0 -0
package/README.md CHANGED
@@ -36,3 +36,45 @@ This project uses the following third-party assets:
36
36
  ---
37
37
 
38
38
  Thank you for using Pixelium Design.
39
+
40
+ # Pixelium Design
41
+
42
+ Pixelium Design – A pixel-art UI component library for Vue, built with TypeScript and Vite. Nostalgic aesthetics, tree-shakable components, dark and light themes, full type safety, ready to use right out of the box.
43
+
44
+ [中文](./README.zh.md)
45
+
46
+ [API Document](https://shika-works.github.io/pixelium-design/)
47
+
48
+ ## 🚀 Tech Stack
49
+
50
+ - **Vue 3** – Full modern features ⚗️ including Composition API
51
+ - **TypeScript** – Built on TS type system ✅ for out-of-the-box type safety
52
+ - **Vite** – Lightning-fast cold start ⚡ + HMR 🔥, production build via Rollup 📦
53
+ - **oxlint** – Blazing-fast Rust linter 🦀 to keep code quality & consistency ✨
54
+
55
+ ## 🎨 Features
56
+
57
+ - **Pixel Aesthetics** – Retro pixel look 👾 with customizable resolution & palette 🎮
58
+ - **OKlab Palette** – Theme generator 🌈 based on the OKlab color model for one-click custom palettes 🎨
59
+ - **Tree-shakable** – Each component individually exported 🧩; unused code auto-dropped 🗑️
60
+ - **Dark Mode** – Supports dark mode 🌙 following system preference or manual toggle 🔦
61
+
62
+ ## Documentation & Support
63
+
64
+ - **Documentation**: [View the documentation](https://shika-works.github.io/pixelium-design/) to learn more about features and usage.
65
+ - **Support**: Encounter any issues? Feel free to submit an [Issue](https://github.com/shika-works/pixelium-design/issues) or [Pull Request](https://github.com/shika-works/pixelium-design/pulls).
66
+ - Please read the [Conventional Commits](./conventional-commits.md) specification before committing.
67
+
68
+ ## License
69
+
70
+ Pixelium Design is released under the [MIT License](./LICENSE).
71
+ This project uses the following third-party assets:
72
+
73
+ - **Font**: [Fusion Pixel](https://github.com/TakWolf/fusion-pixel-font), licensed under [SIL OFL 1.1](https://github.com/TakWolf/fusion-pixel-font/blob/master/LICENSE-OFL).
74
+ - **Icons**:
75
+ - Icons from Pixel Icon Library by HackerNoon, [@hackernoon/pixel-icon-library](https://github.com/hackernoon/pixel-icon-library), licensed under [CC BY 4.0 International](https://pixeliconlibrary.com/license/).
76
+ - The open-source version of [pixelarticons](https://pixelarticons.com/). The open-source version is licensed under [MIT](https://github.com/halfmage/pixelarticons/blob/master/LICENSE).
77
+
78
+ ---
79
+
80
+ Thank you for using Pixelium Design.
package/README.zh.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Pixelium Design
2
2
 
3
- Pixelium Design – 基于 Vue 的像素风 UI 组件库,使用 TypeScript 与 Vite 构建。怀旧像素美学、可树摇组件、深浅主题,开箱即用,类型安全。
3
+ Pixelium Design – 基于 Vue 的像素风 UI 组件库,使用 TypeScript 与 Vite 构建。怀旧像素美学、可树摇组件、深浅主题、开箱即用、类型安全。
4
4
 
5
5
  [English](./README.md)
6
6
 
@@ -24,14 +24,17 @@ Pixelium Design – 基于 Vue 的像素风 UI 组件库,使用 TypeScript 与
24
24
 
25
25
  - **文档**:[查看文档](https://shika-works.github.io/pixelium-design/)以了解更多功能和使用方法。
26
26
  - **支持**:在使用过程中遇到问题?欢迎提交 [Issue](https://github.com/shika-works/pixelium-design/issues) 或 [Pull Request](https://github.com/shika-works/pixelium-design/pulls)。
27
+ - 提交前请阅读 [Conventional Commits](./conventional-commits.zh.md) 规范。
27
28
 
28
29
  ## 许可证
29
30
 
30
31
  Pixelium Design 使用[ MIT 许可证](./LICENSE)发布。
31
32
  本项目使用的第三方资源:
32
33
 
33
- - **字体**:[Fusion Pixel](https://github.com/TakWolf/fusion-pixel-font),采用 [SIL OFL 1.1](https://github.com/TakWolf/fusion-pixel-font/blob/master/LICENSE-OFL) 许可证
34
- - **图标**:Icons from Pixel Icon Library by HackerNoon,[pixel-icon-library](https://github.com/hackernoon/pixel-icon-library),采用 [CC BY 4.0 International](https://pixeliconlibrary.com/license/) 许可证
34
+ - **字体**:[Fusion Pixel](https://github.com/TakWolf/fusion-pixel-font),采用 [SIL OFL 1.1](https://github.com/TakWolf/fusion-pixel-font/blob/master/LICENSE-OFL) 许可证。
35
+ - **图标**:
36
+ - Icons from Pixel Icon Library by HackerNoon,[pixel-icon-library](https://github.com/hackernoon/pixel-icon-library),采用 [CC BY 4.0 International](https://pixeliconlibrary.com/license/) 许可证。
37
+ - [pixelarticons](https://pixelarticons.com/) 的开源版本,开源版本许可证采用了 [MIT](https://github.com/halfmage/pixelarticons/blob/master/LICENSE) 协议。
35
38
 
36
39
  ---
37
40
 
@@ -0,0 +1,224 @@
1
+ body, html {
2
+ margin:0; padding: 0;
3
+ height: 100%;
4
+ }
5
+ body {
6
+ font-family: Helvetica Neue, Helvetica, Arial;
7
+ font-size: 14px;
8
+ color:#333;
9
+ }
10
+ .small { font-size: 12px; }
11
+ *, *:after, *:before {
12
+ -webkit-box-sizing:border-box;
13
+ -moz-box-sizing:border-box;
14
+ box-sizing:border-box;
15
+ }
16
+ h1 { font-size: 20px; margin: 0;}
17
+ h2 { font-size: 14px; }
18
+ pre {
19
+ font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
20
+ margin: 0;
21
+ padding: 0;
22
+ -moz-tab-size: 2;
23
+ -o-tab-size: 2;
24
+ tab-size: 2;
25
+ }
26
+ a { color:#0074D9; text-decoration:none; }
27
+ a:hover { text-decoration:underline; }
28
+ .strong { font-weight: bold; }
29
+ .space-top1 { padding: 10px 0 0 0; }
30
+ .pad2y { padding: 20px 0; }
31
+ .pad1y { padding: 10px 0; }
32
+ .pad2x { padding: 0 20px; }
33
+ .pad2 { padding: 20px; }
34
+ .pad1 { padding: 10px; }
35
+ .space-left2 { padding-left:55px; }
36
+ .space-right2 { padding-right:20px; }
37
+ .center { text-align:center; }
38
+ .clearfix { display:block; }
39
+ .clearfix:after {
40
+ content:'';
41
+ display:block;
42
+ height:0;
43
+ clear:both;
44
+ visibility:hidden;
45
+ }
46
+ .fl { float: left; }
47
+ @media only screen and (max-width:640px) {
48
+ .col3 { width:100%; max-width:100%; }
49
+ .hide-mobile { display:none!important; }
50
+ }
51
+
52
+ .quiet {
53
+ color: #7f7f7f;
54
+ color: rgba(0,0,0,0.5);
55
+ }
56
+ .quiet a { opacity: 0.7; }
57
+
58
+ .fraction {
59
+ font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
60
+ font-size: 10px;
61
+ color: #555;
62
+ background: #E8E8E8;
63
+ padding: 4px 5px;
64
+ border-radius: 3px;
65
+ vertical-align: middle;
66
+ }
67
+
68
+ div.path a:link, div.path a:visited { color: #333; }
69
+ table.coverage {
70
+ border-collapse: collapse;
71
+ margin: 10px 0 0 0;
72
+ padding: 0;
73
+ }
74
+
75
+ table.coverage td {
76
+ margin: 0;
77
+ padding: 0;
78
+ vertical-align: top;
79
+ }
80
+ table.coverage td.line-count {
81
+ text-align: right;
82
+ padding: 0 5px 0 20px;
83
+ }
84
+ table.coverage td.line-coverage {
85
+ text-align: right;
86
+ padding-right: 10px;
87
+ min-width:20px;
88
+ }
89
+
90
+ table.coverage td span.cline-any {
91
+ display: inline-block;
92
+ padding: 0 5px;
93
+ width: 100%;
94
+ }
95
+ .missing-if-branch {
96
+ display: inline-block;
97
+ margin-right: 5px;
98
+ border-radius: 3px;
99
+ position: relative;
100
+ padding: 0 4px;
101
+ background: #333;
102
+ color: yellow;
103
+ }
104
+
105
+ .skip-if-branch {
106
+ display: none;
107
+ margin-right: 10px;
108
+ position: relative;
109
+ padding: 0 4px;
110
+ background: #ccc;
111
+ color: white;
112
+ }
113
+ .missing-if-branch .typ, .skip-if-branch .typ {
114
+ color: inherit !important;
115
+ }
116
+ .coverage-summary {
117
+ border-collapse: collapse;
118
+ width: 100%;
119
+ }
120
+ .coverage-summary tr { border-bottom: 1px solid #bbb; }
121
+ .keyline-all { border: 1px solid #ddd; }
122
+ .coverage-summary td, .coverage-summary th { padding: 10px; }
123
+ .coverage-summary tbody { border: 1px solid #bbb; }
124
+ .coverage-summary td { border-right: 1px solid #bbb; }
125
+ .coverage-summary td:last-child { border-right: none; }
126
+ .coverage-summary th {
127
+ text-align: left;
128
+ font-weight: normal;
129
+ white-space: nowrap;
130
+ }
131
+ .coverage-summary th.file { border-right: none !important; }
132
+ .coverage-summary th.pct { }
133
+ .coverage-summary th.pic,
134
+ .coverage-summary th.abs,
135
+ .coverage-summary td.pct,
136
+ .coverage-summary td.abs { text-align: right; }
137
+ .coverage-summary td.file { white-space: nowrap; }
138
+ .coverage-summary td.pic { min-width: 120px !important; }
139
+ .coverage-summary tfoot td { }
140
+
141
+ .coverage-summary .sorter {
142
+ height: 10px;
143
+ width: 7px;
144
+ display: inline-block;
145
+ margin-left: 0.5em;
146
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
147
+ }
148
+ .coverage-summary .sorted .sorter {
149
+ background-position: 0 -20px;
150
+ }
151
+ .coverage-summary .sorted-desc .sorter {
152
+ background-position: 0 -10px;
153
+ }
154
+ .status-line { height: 10px; }
155
+ /* yellow */
156
+ .cbranch-no { background: yellow !important; color: #111; }
157
+ /* dark red */
158
+ .red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
159
+ .low .chart { border:1px solid #C21F39 }
160
+ .highlighted,
161
+ .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
162
+ background: #C21F39 !important;
163
+ }
164
+ /* medium red */
165
+ .cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
166
+ /* light red */
167
+ .low, .cline-no { background:#FCE1E5 }
168
+ /* light green */
169
+ .high, .cline-yes { background:rgb(230,245,208) }
170
+ /* medium green */
171
+ .cstat-yes { background:rgb(161,215,106) }
172
+ /* dark green */
173
+ .status-line.high, .high .cover-fill { background:rgb(77,146,33) }
174
+ .high .chart { border:1px solid rgb(77,146,33) }
175
+ /* dark yellow (gold) */
176
+ .status-line.medium, .medium .cover-fill { background: #f9cd0b; }
177
+ .medium .chart { border:1px solid #f9cd0b; }
178
+ /* light yellow */
179
+ .medium { background: #fff4c2; }
180
+
181
+ .cstat-skip { background: #ddd; color: #111; }
182
+ .fstat-skip { background: #ddd; color: #111 !important; }
183
+ .cbranch-skip { background: #ddd !important; color: #111; }
184
+
185
+ span.cline-neutral { background: #eaeaea; }
186
+
187
+ .coverage-summary td.empty {
188
+ opacity: .5;
189
+ padding-top: 4px;
190
+ padding-bottom: 4px;
191
+ line-height: 1;
192
+ color: #888;
193
+ }
194
+
195
+ .cover-fill, .cover-empty {
196
+ display:inline-block;
197
+ height: 12px;
198
+ }
199
+ .chart {
200
+ line-height: 0;
201
+ }
202
+ .cover-empty {
203
+ background: white;
204
+ }
205
+ .cover-full {
206
+ border-right: none !important;
207
+ }
208
+ pre.prettyprint {
209
+ border: none !important;
210
+ padding: 0 !important;
211
+ margin: 0 !important;
212
+ }
213
+ .com { color: #999 !important; }
214
+ .ignore-none { color: #999; font-weight: normal; }
215
+
216
+ .wrapper {
217
+ min-height: 100%;
218
+ height: auto !important;
219
+ height: 100%;
220
+ margin: 0 auto -48px;
221
+ }
222
+ .footer, .push {
223
+ height: 48px;
224
+ }
@@ -0,0 +1,87 @@
1
+ /* eslint-disable */
2
+ var jumpToCode = (function init() {
3
+ // Classes of code we would like to highlight in the file view
4
+ var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
+
6
+ // Elements to highlight in the file listing view
7
+ var fileListingElements = ['td.pct.low'];
8
+
9
+ // We don't want to select elements that are direct descendants of another match
10
+ var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
11
+
12
+ // Selector that finds elements on the page to which we can jump
13
+ var selector =
14
+ fileListingElements.join(', ') +
15
+ ', ' +
16
+ notSelector +
17
+ missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
18
+
19
+ // The NodeList of matching elements
20
+ var missingCoverageElements = document.querySelectorAll(selector);
21
+
22
+ var currentIndex;
23
+
24
+ function toggleClass(index) {
25
+ missingCoverageElements
26
+ .item(currentIndex)
27
+ .classList.remove('highlighted');
28
+ missingCoverageElements.item(index).classList.add('highlighted');
29
+ }
30
+
31
+ function makeCurrent(index) {
32
+ toggleClass(index);
33
+ currentIndex = index;
34
+ missingCoverageElements.item(index).scrollIntoView({
35
+ behavior: 'smooth',
36
+ block: 'center',
37
+ inline: 'center'
38
+ });
39
+ }
40
+
41
+ function goToPrevious() {
42
+ var nextIndex = 0;
43
+ if (typeof currentIndex !== 'number' || currentIndex === 0) {
44
+ nextIndex = missingCoverageElements.length - 1;
45
+ } else if (missingCoverageElements.length > 1) {
46
+ nextIndex = currentIndex - 1;
47
+ }
48
+
49
+ makeCurrent(nextIndex);
50
+ }
51
+
52
+ function goToNext() {
53
+ var nextIndex = 0;
54
+
55
+ if (
56
+ typeof currentIndex === 'number' &&
57
+ currentIndex < missingCoverageElements.length - 1
58
+ ) {
59
+ nextIndex = currentIndex + 1;
60
+ }
61
+
62
+ makeCurrent(nextIndex);
63
+ }
64
+
65
+ return function jump(event) {
66
+ if (
67
+ document.getElementById('fileSearch') === document.activeElement &&
68
+ document.activeElement != null
69
+ ) {
70
+ // if we're currently focused on the search input, we don't want to navigate
71
+ return;
72
+ }
73
+
74
+ switch (event.which) {
75
+ case 78: // n
76
+ case 74: // j
77
+ goToNext();
78
+ break;
79
+ case 66: // b
80
+ case 75: // k
81
+ case 80: // p
82
+ goToPrevious();
83
+ break;
84
+ }
85
+ };
86
+ })();
87
+ window.addEventListener('keydown', jumpToCode);