@stats-forge/github-stats-forge-core 0.0.2 → 0.1.0

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 (208) hide show
  1. package/README.md +0 -10
  2. package/build/api/api-result.d.ts +6 -7
  3. package/build/api/api-result.d.ts.map +1 -1
  4. package/build/api/api-result.js +4 -5
  5. package/build/api/gist.d.ts +3 -10
  6. package/build/api/gist.d.ts.map +1 -1
  7. package/build/api/gist.js +4 -11
  8. package/build/api/index.d.ts +12 -12
  9. package/build/api/params.d.ts +11 -8
  10. package/build/api/params.d.ts.map +1 -1
  11. package/build/api/params.js +16 -14
  12. package/build/api/pin.d.ts +3 -19
  13. package/build/api/pin.d.ts.map +1 -1
  14. package/build/api/pin.js +6 -22
  15. package/build/api/stats.d.ts +10 -4
  16. package/build/api/stats.d.ts.map +1 -1
  17. package/build/api/stats.js +6 -32
  18. package/build/api/top-langs.d.ts +12 -6
  19. package/build/api/top-langs.d.ts.map +1 -1
  20. package/build/api/top-langs.js +6 -26
  21. package/build/api/wakatime.d.ts +13 -5
  22. package/build/api/wakatime.d.ts.map +1 -1
  23. package/build/api/wakatime.js +4 -21
  24. package/build/calculateRank.d.ts +0 -9
  25. package/build/calculateRank.d.ts.map +1 -1
  26. package/build/calculateRank.js +12 -17
  27. package/build/cards/gist.d.ts +2 -4
  28. package/build/cards/gist.d.ts.map +1 -1
  29. package/build/cards/gist.js +27 -36
  30. package/build/cards/options.d.ts +1 -1
  31. package/build/cards/repo.d.ts +2 -4
  32. package/build/cards/repo.d.ts.map +1 -1
  33. package/build/cards/repo.js +61 -93
  34. package/build/cards/stats.d.ts +3 -8
  35. package/build/cards/stats.d.ts.map +1 -1
  36. package/build/cards/stats.js +119 -165
  37. package/build/cards/top-languages.d.ts +5 -31
  38. package/build/cards/top-languages.d.ts.map +1 -1
  39. package/build/cards/top-languages.js +176 -384
  40. package/build/cards/wakatime.d.ts +4 -6
  41. package/build/cards/wakatime.d.ts.map +1 -1
  42. package/build/cards/wakatime.js +118 -185
  43. package/build/common/Card.d.ts +14 -62
  44. package/build/common/Card.d.ts.map +1 -1
  45. package/build/common/Card.js +97 -199
  46. package/build/common/I18n.d.ts +0 -6
  47. package/build/common/I18n.d.ts.map +1 -1
  48. package/build/common/I18n.js +3 -6
  49. package/build/common/color.d.ts +4 -17
  50. package/build/common/color.d.ts.map +1 -1
  51. package/build/common/color.js +67 -49
  52. package/build/common/config.d.ts +4 -14
  53. package/build/common/config.d.ts.map +1 -1
  54. package/build/common/config.js +3 -16
  55. package/build/common/constants.d.ts +4 -2
  56. package/build/common/constants.d.ts.map +1 -1
  57. package/build/common/constants.js +3 -1
  58. package/build/common/date.d.ts +0 -2
  59. package/build/common/date.d.ts.map +1 -1
  60. package/build/common/date.js +0 -2
  61. package/build/common/emojiMap.d.ts +8 -0
  62. package/build/common/emojiMap.d.ts.map +1 -0
  63. package/build/common/emojiMap.js +10 -0
  64. package/build/common/emojiMap.json +1915 -0
  65. package/build/common/error.d.ts +1 -10
  66. package/build/common/error.d.ts.map +1 -1
  67. package/build/common/error.js +1 -10
  68. package/build/common/fmt.d.ts +3 -15
  69. package/build/common/fmt.d.ts.map +1 -1
  70. package/build/common/fmt.js +7 -35
  71. package/build/common/http.d.ts +2 -7
  72. package/build/common/http.d.ts.map +1 -1
  73. package/build/common/http.js +8 -17
  74. package/build/common/icons.d.ts +18 -20
  75. package/build/common/icons.d.ts.map +1 -1
  76. package/build/common/icons.js +103 -67
  77. package/build/common/languageColors.d.ts +0 -1
  78. package/build/common/languageColors.d.ts.map +1 -1
  79. package/build/common/languageColors.js +1 -4
  80. package/build/common/languageColors.json +18 -2
  81. package/build/common/ops.d.ts +3 -14
  82. package/build/common/ops.d.ts.map +1 -1
  83. package/build/common/ops.js +19 -30
  84. package/build/common/render.d.ts +28 -82
  85. package/build/common/render.d.ts.map +1 -1
  86. package/build/common/render.js +175 -211
  87. package/build/common/retryer.d.ts +2 -7
  88. package/build/common/retryer.d.ts.map +1 -1
  89. package/build/common/retryer.js +4 -11
  90. package/build/fetchers/gist.d.ts +2 -5
  91. package/build/fetchers/gist.d.ts.map +1 -1
  92. package/build/fetchers/gist.js +1 -5
  93. package/build/fetchers/index.d.ts +12 -12
  94. package/build/fetchers/repo.d.ts +2 -11
  95. package/build/fetchers/repo.d.ts.map +1 -1
  96. package/build/fetchers/repo.js +20 -33
  97. package/build/fetchers/stats.d.ts +2 -32
  98. package/build/fetchers/stats.d.ts.map +1 -1
  99. package/build/fetchers/stats.js +27 -86
  100. package/build/fetchers/top-languages.d.ts +2 -9
  101. package/build/fetchers/top-languages.d.ts.map +1 -1
  102. package/build/fetchers/top-languages.js +15 -31
  103. package/build/fetchers/types.d.ts +1 -1
  104. package/build/fetchers/wakatime.d.ts +2 -6
  105. package/build/fetchers/wakatime.d.ts.map +1 -1
  106. package/build/fetchers/wakatime.js +1 -5
  107. package/build/graphql/contributionsDocument.d.ts +3 -3
  108. package/build/graphql/contributionsDocument.d.ts.map +1 -1
  109. package/build/graphql/contributionsDocument.js +0 -1
  110. package/build/graphql/generated/gist.d.ts +1 -1
  111. package/build/graphql/generated/repo.d.ts +1 -1
  112. package/build/graphql/generated/stats.d.ts +3 -3
  113. package/build/graphql/generated/top-languages.d.ts +2 -2
  114. package/build/graphql/graphqlDocument.d.ts +0 -1
  115. package/build/graphql/graphqlDocument.d.ts.map +1 -1
  116. package/build/graphql/graphqlDocument.js +0 -1
  117. package/build/graphql/reposContributedToDocument.d.ts +4 -5
  118. package/build/graphql/reposContributedToDocument.d.ts.map +1 -1
  119. package/build/graphql/reposContributedToDocument.js +0 -2
  120. package/build/markup/css.d.ts +35 -0
  121. package/build/markup/css.d.ts.map +1 -0
  122. package/build/markup/css.js +64 -0
  123. package/build/markup/element.d.ts +41 -0
  124. package/build/markup/element.d.ts.map +1 -0
  125. package/build/markup/element.js +127 -0
  126. package/build/markup/html.d.ts +13 -0
  127. package/build/markup/html.d.ts.map +1 -0
  128. package/build/markup/html.js +27 -0
  129. package/build/markup/index.d.ts +9 -0
  130. package/build/markup/index.d.ts.map +1 -0
  131. package/build/markup/index.js +6 -0
  132. package/build/markup/serialize.d.ts +16 -0
  133. package/build/markup/serialize.d.ts.map +1 -0
  134. package/build/markup/serialize.js +17 -0
  135. package/build/themes/index.d.ts +332 -333
  136. package/build/themes/index.d.ts.map +1 -1
  137. package/build/themes/index.js +1 -1
  138. package/build/translations.d.ts +2 -6
  139. package/build/translations.d.ts.map +1 -1
  140. package/build/translations.js +621 -628
  141. package/package.json +17 -26
  142. package/src/api/api-result.ts +10 -9
  143. package/src/api/gist.ts +11 -18
  144. package/src/api/index.ts +12 -12
  145. package/src/api/params.ts +27 -21
  146. package/src/api/pin.ts +13 -28
  147. package/src/api/stats.ts +13 -39
  148. package/src/api/top-langs.ts +13 -33
  149. package/src/api/wakatime.ts +11 -28
  150. package/src/calculateRank.ts +12 -23
  151. package/src/cards/gist.ts +40 -43
  152. package/src/cards/options.ts +1 -1
  153. package/src/cards/repo.ts +97 -107
  154. package/src/cards/stats.ts +165 -184
  155. package/src/cards/top-languages.ts +297 -413
  156. package/src/cards/wakatime.ts +193 -221
  157. package/src/common/Card.ts +165 -217
  158. package/src/common/I18n.ts +3 -6
  159. package/src/common/color.ts +80 -57
  160. package/src/common/config.ts +5 -18
  161. package/src/common/constants.ts +5 -2
  162. package/src/common/date.ts +0 -2
  163. package/src/common/emojiMap.json +1915 -0
  164. package/src/common/emojiMap.ts +13 -0
  165. package/src/common/error.ts +2 -11
  166. package/src/common/fmt.ts +7 -44
  167. package/src/common/http.ts +9 -15
  168. package/src/common/icons.ts +117 -42
  169. package/src/common/languageColors.json +18 -2
  170. package/src/common/languageColors.ts +1 -4
  171. package/src/common/ops.ts +26 -34
  172. package/src/common/render.ts +279 -232
  173. package/src/common/retryer.ts +8 -15
  174. package/src/fetchers/gist.ts +8 -12
  175. package/src/fetchers/index.ts +12 -12
  176. package/src/fetchers/repo.ts +27 -40
  177. package/src/fetchers/stats.ts +44 -102
  178. package/src/fetchers/top-languages.ts +26 -40
  179. package/src/fetchers/types.ts +1 -1
  180. package/src/fetchers/wakatime.ts +5 -9
  181. package/src/graphql/contributionsDocument.ts +7 -5
  182. package/src/graphql/generated/gist.ts +1 -1
  183. package/src/graphql/generated/repo.ts +1 -1
  184. package/src/graphql/generated/stats.ts +2 -2
  185. package/src/graphql/generated/top-languages.ts +2 -2
  186. package/src/graphql/graphqlDocument.ts +0 -1
  187. package/src/graphql/reposContributedToDocument.ts +6 -7
  188. package/src/markup/css.ts +118 -0
  189. package/src/markup/element.ts +246 -0
  190. package/src/markup/html.ts +34 -0
  191. package/src/markup/index.ts +9 -0
  192. package/src/markup/serialize.ts +27 -0
  193. package/src/themes/index.ts +1 -1
  194. package/src/translations.ts +622 -629
  195. package/build/cards/index.d.ts +0 -11
  196. package/build/cards/index.d.ts.map +0 -1
  197. package/build/cards/index.js +0 -7
  198. package/build/common/html.d.ts +0 -8
  199. package/build/common/html.d.ts.map +0 -1
  200. package/build/common/html.js +0 -14
  201. package/build/index.d.ts +0 -15
  202. package/build/index.d.ts.map +0 -1
  203. package/build/index.js +0 -10
  204. package/src/_emoji-name-map.d.ts +0 -10
  205. package/src/_github-username-regex.d.ts +0 -4
  206. package/src/cards/index.ts +0 -21
  207. package/src/common/html.ts +0 -17
  208. package/src/index.ts +0 -18
@@ -1 +1 @@
1
- {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/cards/stats.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AASnE,qFAAqF;AACrF,QAAA,MAAM,UAAU,8CAA+C,CAAC;AAChE,KAAK,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C,UAAU,eAAgB,SAAQ,iBAAiB;IACjD,MAAM,EAAE,MAAM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AM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,QAAQ,CAAC;IACpB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACrB;AAoJD;;;;GAIG;AACH,QAAA,MAAM,eAAe,UACZ,SAAS,YACP,WAAW,CAAC,eAAe,CAAC,aAC1B,MAAM,SACX,KAAK,CAAC,MAAM,CAAC,UACZ,KAAK,CAAC,MAAM,CAAC,KACnB,MA0XF,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
@@ -5,6 +5,7 @@ import { I18n } from '../common/I18n.js';
5
5
  import { icons, rankIcon } from '../common/icons.js';
6
6
  import { buildSearchFilter, clampValue } from '../common/ops.js';
7
7
  import { createTextNode, flexLayout, measureText } from '../common/render.js';
8
+ import { atRule, cssComment, el, rule } from '../markup/index.js';
8
9
  import { statCardLocales, wakatimeCardLocales } from '../translations.js';
9
10
  const CARD_MIN_WIDTH = 287;
10
11
  const CARD_DEFAULT_WIDTH = 287;
@@ -12,10 +13,21 @@ const RANK_CARD_MIN_WIDTH = 420;
12
13
  const RANK_CARD_DEFAULT_WIDTH = 450;
13
14
  const RANK_ONLY_CARD_MIN_WIDTH = 290;
14
15
  const RANK_ONLY_CARD_DEFAULT_WIDTH = 290;
16
+ const STAT_FONT_SIZE = 14;
17
+ /** Padding the card keeps at its edges; matches `Card`'s own `paddingX`. */
18
+ const CARD_PADDING_X = 25;
19
+ /** How far a stat row is translated into the card; see `createTextNode`. */
20
+ const STAT_ROW_X = 25;
21
+ /** Room the rank ring needs at the right edge, so a value never runs into it. */
22
+ const RANK_GUTTER = 120;
23
+ /** `createTextNode`'s own label offset, which it applies only when icons are shown. */
24
+ const LABEL_X_OFFSET = 25;
25
+ /** Smallest gap kept between the longest label and its value. */
26
+ const LABEL_VALUE_GAP = 16;
15
27
  /** Rank indicators the card can draw; the api validates `rank_icon` against this. */
16
28
  const RANK_ICONS = ['default', 'github', 'percentile'];
17
29
  /** Long locales that need more space for text. Keep sorted alphabetically. */
18
- const LONG_LOCALES = [
30
+ const LONG_LOCALES = new Set([
19
31
  'az',
20
32
  'bg',
21
33
  'cs',
@@ -42,112 +54,75 @@ const LONG_LOCALES = [
42
54
  'uk-ua',
43
55
  'uz',
44
56
  'zh-tw',
45
- ];
57
+ ]);
46
58
  /**
47
59
  * Calculates progress along the boundary of the circle, i.e. its circumference.
48
60
  *
49
- * @param value The rank value to calculate progress for.
50
61
  * @returns Progress value.
51
62
  */
52
63
  const calculateCircleProgress = (value) => {
53
64
  const radius = 40;
54
- const c = Math.PI * (radius * 2);
55
- if (value < 0) {
56
- value = 0;
57
- }
58
- if (value > 100) {
59
- value = 100;
60
- }
61
- return ((100 - value) / 100) * c;
65
+ const circumference = Math.PI * (radius * 2);
66
+ const clamped = Math.min(Math.max(value, 0), 100);
67
+ return ((100 - clamped) / 100) * circumference;
62
68
  };
63
69
  /**
64
70
  * Retrieves the animation to display progress along the circumference of circle
65
71
  * from the beginning to the given value in a clockwise direction.
66
72
  *
67
- * @param props The props object.
68
- * @param props.progress The progress value to animate to.
69
73
  * @returns Progress animation css.
70
74
  */
71
- const getProgressAnimation = ({ progress }) => {
72
- return `
73
- @keyframes rankAnimation {
74
- from {
75
- stroke-dashoffset: ${calculateCircleProgress(0)};
76
- }
77
- to {
78
- stroke-dashoffset: ${calculateCircleProgress(progress)};
79
- }
80
- }
81
- `;
82
- };
75
+ const getProgressAnimation = ({ progress }) => atRule('@keyframes rankAnimation', rule('from', { 'stroke-dashoffset': calculateCircleProgress(0) }), rule('to', { 'stroke-dashoffset': calculateCircleProgress(progress) }));
83
76
  /**
84
77
  * Retrieves CSS styles for a card.
85
78
  *
86
- * @param colors The colors to use for the card.
87
- * @param colors.textColor The text color.
88
- * @param colors.iconColor The icon color.
89
- * @param colors.ringColor The ring color.
90
- * @param colors.show_icons Whether to show icons.
91
- * @param colors.progress The progress value to animate to.
92
79
  * @returns Card CSS styles.
93
80
  */
94
- const getStyles = ({ textColor, iconColor, ringColor, show_icons, progress, }) => {
95
- return `
96
- .stat {
97
- font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: ${textColor};
98
- }
99
- @supports(-moz-appearance: auto) {
100
- /* Selector detects Firefox */
101
- .stat { font-size:12px; }
102
- }
103
- .stagger {
104
- opacity: 0;
105
- animation: fadeInAnimation 0.3s ease-in-out forwards;
106
- }
107
- .rank-text {
108
- font: 800 24px 'Segoe UI', Ubuntu, Sans-Serif; fill: ${textColor};
109
- animation: scaleInAnimation 0.3s ease-in-out forwards;
110
- }
111
- .rank-percentile-header {
112
- font-size: 14px;
113
- }
114
- .rank-percentile-text {
115
- font-size: 16px;
116
- }
117
-
118
- .not_bold { font-weight: 400 }
119
- .bold { font-weight: 700 }
120
- .icon {
121
- fill: ${iconColor};
122
- display: ${show_icons ? 'block' : 'none'};
123
- }
124
-
125
- .rank-circle-rim {
126
- stroke: ${ringColor};
127
- fill: none;
128
- stroke-width: 6;
129
- opacity: 0.2;
130
- }
131
- .rank-circle {
132
- stroke: ${ringColor};
133
- stroke-dasharray: 250;
134
- fill: none;
135
- stroke-width: 6;
136
- stroke-linecap: round;
137
- opacity: 0.8;
138
- transform-origin: -10px 8px;
139
- transform: rotate(-90deg);
140
- animation: rankAnimation 1s forwards ease-in-out;
141
- }
142
- ${getProgressAnimation({ progress })}
143
- `;
144
- };
81
+ const getStyles = ({ textColor, iconColor, ringColor, show_icons, progress, }) => [
82
+ rule('.stat', {
83
+ font: `400 ${STAT_FONT_SIZE}px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif`,
84
+ fill: textColor,
85
+ 'font-variant-numeric': 'tabular-nums',
86
+ }),
87
+ atRule('@supports(-moz-appearance: auto)', cssComment('Selector detects Firefox'), rule('.stat', { 'font-size': '12px' })),
88
+ rule('.stagger', { opacity: 0, animation: 'fadeInAnimation 0.3s ease-in-out forwards' }),
89
+ rule('.rank-text', {
90
+ font: "700 22px 'Segoe UI', Ubuntu, Sans-Serif",
91
+ fill: textColor,
92
+ animation: 'scaleInAnimation 0.3s ease-in-out forwards',
93
+ }),
94
+ rule('.rank-percentile-header', { 'font-size': '14px' }),
95
+ rule('.rank-percentile-text', { 'font-size': '16px' }),
96
+ cssComment('Labels recede so that the values read first.'),
97
+ rule('.not_bold', { 'font-weight': 400, opacity: 0.75 }),
98
+ rule('.bold', { 'font-weight': 600 }),
99
+ rule('.icon', {
100
+ fill: iconColor,
101
+ opacity: 0.75,
102
+ display: show_icons ? 'block' : 'none',
103
+ }),
104
+ rule('.rank-circle-rim', {
105
+ stroke: ringColor,
106
+ fill: 'none',
107
+ 'stroke-width': 4,
108
+ opacity: 0.15,
109
+ }),
110
+ rule('.rank-circle', {
111
+ stroke: ringColor,
112
+ 'stroke-dasharray': 250,
113
+ fill: 'none',
114
+ 'stroke-width': 4,
115
+ 'stroke-linecap': 'round',
116
+ opacity: 1,
117
+ 'transform-origin': '-10px 8px',
118
+ transform: 'rotate(-90deg)',
119
+ animation: 'rankAnimation 0.8s forwards ease-in-out',
120
+ }),
121
+ getProgressAnimation({ progress }),
122
+ ];
145
123
  /**
146
124
  * Return the label for commits according to the selected options
147
125
  *
148
- * @param include_all_commits Option to include all years
149
- * @param commits_year Option to include only selected year
150
- * @param i18n The I18n instance.
151
126
  * @returns The label corresponding to the options.
152
127
  */
153
128
  const getTotalCommitsYearLabel = (include_all_commits, commits_year, i18n) => include_all_commits
@@ -158,17 +133,12 @@ const getTotalCommitsYearLabel = (include_all_commits, commits_year, i18n) => in
158
133
  /**
159
134
  * Renders the stats card.
160
135
  *
161
- * @param stats The stats data.
162
- * @param options The card options.
163
- * @param username GitHub username, used to build stat search links.
164
- * @param repo Repositories to scope the search links to.
165
- * @param owner Owners to scope the search links to.
166
136
  * @returns The stats card SVG object.
167
137
  */
168
138
  const renderStatsCard = (stats, options = {}, username, repo = [], owner = []) => {
169
139
  const { name, totalStars, totalCommits, totalIssues, totalPRs, totalPRsMerged, mergedPRsPercentage, totalReviews, totalDiscussionsStarted, totalDiscussionsAnswered, contributedTo, allTimeContributedTo, totalPRsAuthored, totalPRsCommented, totalPRsReviewed, totalIssuesAuthored, totalIssuesCommented, totalContributions, rank, } = stats;
170
140
  const { hide = [], show_icons = false, hide_title = false, hide_border = false, card_width, hide_rank = false, include_all_commits = false, commits_year, line_height = 25, text_bold = true, custom_title, border_radius, number_format = 'short', number_precision, locale, disable_animations = false, rank_icon = 'default', show = [], } = options;
171
- const lheight = parseInt(String(line_height), 10);
141
+ const lheight = Number.parseInt(String(line_height), 10);
172
142
  const { lightColors, darkColors } = getLightDarkColors(options);
173
143
  const apostrophe = /s$/i.test(name.trim()) ? '' : 's';
174
144
  const i18n = new I18n({
@@ -179,12 +149,13 @@ const renderStatsCard = (stats, options = {}, username, repo = [], owner = []) =
179
149
  },
180
150
  });
181
151
  // Meta data for creating text nodes with createTextNode function
182
- const STATS = {};
183
- STATS['stars'] = {
184
- icon: icons.star,
185
- label: i18n.t('statcard.totalstars'),
186
- value: totalStars,
187
- id: 'stars',
152
+ const STATS = {
153
+ stars: {
154
+ icon: icons.star,
155
+ label: i18n.t('statcard.totalstars'),
156
+ value: totalStars,
157
+ id: 'stars',
158
+ },
188
159
  };
189
160
  if (show.includes('contributions')) {
190
161
  STATS['contributions'] = {
@@ -316,71 +287,70 @@ const renderStatsCard = (stats, options = {}, username, repo = [], owner = []) =
316
287
  id: 'all_time_contribs',
317
288
  };
318
289
  }
319
- const isLongLocale = locale ? LONG_LOCALES.includes(locale) : false;
320
- // check if all used labels are short
321
- const longLabels = Object.entries(STATS)
322
- .filter(([key]) => !hide.includes(key))
323
- .some(([, stat]) => stat.label.length > 18);
324
- // filter out hidden stats defined by user & create the text nodes
325
- const statItems = Object.entries(STATS)
326
- .filter(([key]) => !hide.includes(key))
327
- // pass index so that we can calculate the line spacing
328
- .map(([, stat], index) => createTextNode({
329
- icon: stat.icon,
330
- label: stat.label,
331
- value: stat.value,
332
- id: stat.id,
333
- unitSymbol: stat.unitSymbol,
334
- index,
335
- showIcons: show_icons,
336
- shiftValuePos: 29.01 + (longLabels ? 50 : 0) + (isLongLocale ? 50 : 0),
337
- bold: text_bold,
338
- numberFormat: number_format,
339
- numberPrecision: number_precision,
340
- link: stat.link,
341
- }));
342
- if (statItems.length === 0 && hide_rank) {
290
+ const isLongLocale = locale ? LONG_LOCALES.has(locale) : false;
291
+ // filter out hidden stats defined by user
292
+ const visibleStats = Object.entries(STATS).filter(([key]) => !hide.includes(key));
293
+ if (visibleStats.length === 0 && hide_rank) {
343
294
  throw new CardError('Could not render stats card.', {
344
295
  code: 'invalid_param',
345
296
  secondaryMessage: 'Either stats or rank are required.',
346
297
  });
347
298
  }
348
- // Calculate the card height depending on how many items there are
349
- // but if rank circle is visible clamp the minimum height to `150`
350
- const height = Math.max(45 + (statItems.length + 1) * lheight, hide_rank ? 0 : statItems.length ? 150 : 180);
299
+ // check if all used labels are short
300
+ const longLabels = visibleStats.some(([, stat]) => stat.label.length > 18);
301
+ // The rank ring sets the floor: 150 beside the stats, 180 when it is the whole card.
302
+ const height = Math.max(45 + (visibleStats.length + 1) * lheight, hide_rank ? 0 : visibleStats.length > 0 ? 150 : 180);
351
303
  // the lower the user's percentile the better
352
304
  const progress = 100 - rank.percentile;
353
- const calculateTextWidth = () => {
354
- return measureText(custom_title
355
- ? custom_title
356
- : statItems.length
357
- ? i18n.t('statcard.title')
358
- : i18n.t('statcard.ranktitle'));
359
- };
305
+ const calculateTextWidth = () => measureText(custom_title ||
306
+ (visibleStats.length > 0 ? i18n.t('statcard.title') : i18n.t('statcard.ranktitle')));
360
307
  /*
361
308
  When hide_rank=true, the minimum card width is 270 px + the title length and padding.
362
309
  When hide_rank=false, the minimum card_width is 340 px + the icon width (if show_icons=true).
363
310
  Numbers are picked by looking at existing dimensions on production.
364
311
  */
365
- const iconWidth = show_icons && statItems.length ? 16 + /* padding */ 1 : 0;
312
+ const iconWidth = show_icons && visibleStats.length > 0 ? 16 + /* padding */ 1 : 0;
366
313
  const minCardWidth = (hide_rank
367
314
  ? clampValue(50 /* padding */ + calculateTextWidth() * 2, CARD_MIN_WIDTH, Infinity)
368
- : statItems.length
315
+ : visibleStats.length > 0
369
316
  ? RANK_CARD_MIN_WIDTH
370
317
  : RANK_ONLY_CARD_MIN_WIDTH) + iconWidth;
371
318
  const defaultCardWidth = (hide_rank
372
319
  ? CARD_DEFAULT_WIDTH
373
- : statItems.length
320
+ : visibleStats.length > 0
374
321
  ? RANK_CARD_DEFAULT_WIDTH
375
322
  : RANK_ONLY_CARD_DEFAULT_WIDTH) + iconWidth;
376
323
  const width = card_width
377
- ? isNaN(card_width)
324
+ ? Number.isNaN(card_width)
378
325
  ? Math.max(defaultCardWidth, minCardWidth)
379
326
  : card_width
380
327
  : Math.max(defaultCardWidth, minCardWidth);
328
+ // A value ends at the card's inner edge, clear of the rank ring — or right after
329
+ // the longest label, on a card too narrow for that.
330
+ const widestLabel = visibleStats.length > 0
331
+ ? Math.max(...visibleStats.map(([, stat]) => measureText(`${stat.label}:`, STAT_FONT_SIZE)))
332
+ : 0;
333
+ const valueAnchorX = Math.round(Math.max(width - CARD_PADDING_X - STAT_ROW_X - (hide_rank ? 0 : RANK_GUTTER), (show_icons ? LABEL_X_OFFSET : 0) + widestLabel + LABEL_VALUE_GAP));
334
+ // pass index so that we can calculate the line spacing
335
+ const statItems = visibleStats.map(([, stat], index) => createTextNode({
336
+ icon: stat.icon,
337
+ label: stat.label,
338
+ value: stat.value,
339
+ id: stat.id,
340
+ unitSymbol: stat.unitSymbol,
341
+ index,
342
+ showIcons: show_icons,
343
+ shiftValuePos: 29.01 + (longLabels ? 50 : 0) + (isLongLocale ? 50 : 0),
344
+ valueAnchorX,
345
+ bold: text_bold,
346
+ labelBold: false,
347
+ numberFormat: number_format,
348
+ numberPrecision: number_precision,
349
+ link: stat.link,
350
+ }));
381
351
  const card = new Card({
382
352
  customTitle: custom_title,
383
- defaultTitle: statItems.length ? i18n.t('statcard.title') : i18n.t('statcard.ranktitle'),
353
+ defaultTitle: visibleStats.length > 0 ? i18n.t('statcard.title') : i18n.t('statcard.ranktitle'),
384
354
  width,
385
355
  height,
386
356
  border_radius,
@@ -404,34 +374,24 @@ const renderStatsCard = (stats, options = {}, username, repo = [], owner = []) =
404
374
  * @returns Rank circle translation value.
405
375
  */
406
376
  const calculateRankXTranslation = () => {
407
- if (statItems.length) {
377
+ if (visibleStats.length > 0) {
408
378
  const minXTranslation = RANK_CARD_MIN_WIDTH + iconWidth - 70;
409
379
  if (width > RANK_CARD_DEFAULT_WIDTH) {
410
380
  const xMaxExpansion = minXTranslation + (450 - minCardWidth) / 2;
411
381
  return xMaxExpansion + width - RANK_CARD_DEFAULT_WIDTH;
412
382
  }
413
- else {
414
- return minXTranslation + (width - minCardWidth) / 2;
415
- }
416
- }
417
- else {
418
- return width / 2 + 20 - 10;
383
+ return minXTranslation + (width - minCardWidth) / 2;
419
384
  }
385
+ return width / 2 + 20 - 10;
420
386
  };
421
387
  // Conditionally rendered elements
422
- const rankCircle = hide_rank
423
- ? ''
424
- : `<g data-testid="rank-circle"
425
- transform="translate(${calculateRankXTranslation()}, ${height / 2 - 50})">
426
- <circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
427
- <circle class="rank-circle" cx="-10" cy="8" r="40" />
428
- <g class="rank-text">
429
- ${rankIcon(rank_icon, rank.level, rank.percentile)}
430
- </g>
431
- </g>`;
388
+ const rankCircle = !hide_rank &&
389
+ el('g', {
390
+ 'data-testid': 'rank-circle',
391
+ transform: `translate(${calculateRankXTranslation()}, ${height / 2 - 50})`,
392
+ }, el('circle', { class: 'rank-circle-rim', cx: -10, cy: 8, r: 40 }), el('circle', { class: 'rank-circle', cx: -10, cy: 8, r: 40 }), el('g', { class: 'rank-text' }, rankIcon(rank_icon, rank.level, rank.percentile)));
432
393
  // Accessibility Labels
433
- const labels = Object.entries(STATS)
434
- .filter(([key]) => !hide.includes(key))
394
+ const labels = visibleStats
435
395
  .map(([key, stat]) => {
436
396
  if (key === 'commits') {
437
397
  return `${i18n.t('statcard.commits')} ${getTotalCommitsYearLabel(include_all_commits, commits_year, i18n)} : ${stat.value}`;
@@ -443,15 +403,9 @@ const renderStatsCard = (stats, options = {}, username, repo = [], owner = []) =
443
403
  title: `${card.title}, Rank: ${rank.level}`,
444
404
  desc: labels,
445
405
  });
446
- return card.render(`
447
- ${rankCircle}
448
- <svg x="0" y="0">
449
- ${flexLayout({
450
- items: statItems,
451
- gap: lheight,
452
- direction: 'column',
453
- }).join('')}
454
- </svg>
455
- `);
406
+ return card.render([
407
+ rankCircle,
408
+ el('svg', { x: 0, y: 0 }, flexLayout({ items: statItems, gap: lheight, direction: 'column' })),
409
+ ]);
456
410
  };
457
411
  export { RANK_ICONS, renderStatsCard };
@@ -1,11 +1,11 @@
1
- import type { Lang, TopLangData } from '../fetchers/types.js';
2
- import type { CardOptions, CommonCardOptions } from './options.js';
1
+ import type { Lang, TopLangData } from '../fetchers/types.ts';
2
+ import type { CardOptions, CommonCardOptions } from './options.ts';
3
3
  declare const MIN_CARD_WIDTH = 280;
4
4
  /** Layouts the card can draw; the api validates `layout` against this. */
5
- declare const TOP_LANG_LAYOUTS: readonly ["compact", "normal", "donut", "donut-vertical", "pie"];
5
+ declare const TOP_LANG_LAYOUTS: readonly ['compact', 'normal', 'donut', 'donut-vertical', 'pie'];
6
6
  type TopLangLayout = (typeof TOP_LANG_LAYOUTS)[number];
7
7
  /** How a language's value is shown; the api validates `stats_format` against this. */
8
- declare const TOP_LANG_STATS_FORMATS: readonly ["percentages", "bytes"];
8
+ declare const TOP_LANG_STATS_FORMATS: readonly ['percentages', 'bytes'];
9
9
  type TopLangStatsFormat = (typeof TOP_LANG_STATS_FORMATS)[number];
10
10
  interface TopLangOptions extends CommonCardOptions {
11
11
  locale: string;
@@ -24,31 +24,24 @@ interface TopLangOptions extends CommonCardOptions {
24
24
  /**
25
25
  * Retrieves the programming language whose name is the longest.
26
26
  *
27
- * @param arr Array of programming languages.
28
27
  * @returns Longest programming language object.
29
28
  */
30
- declare const getLongestLang: (arr: Array<Lang>) => Pick<Lang, "name" | "size" | "color">;
29
+ declare const getLongestLang: (arr: Array<Lang>) => Pick<Lang, 'name' | 'size' | 'color'>;
31
30
  /**
32
31
  * Convert degrees to radians.
33
32
  *
34
- * @param angleInDegrees Angle in degrees.
35
33
  * @returns Angle in radians.
36
34
  */
37
35
  declare const degreesToRadians: (angleInDegrees: number) => number;
38
36
  /**
39
37
  * Convert radians to degrees.
40
38
  *
41
- * @param angleInRadians Angle in radians.
42
39
  * @returns Angle in degrees.
43
40
  */
44
41
  declare const radiansToDegrees: (angleInRadians: number) => number;
45
42
  /**
46
43
  * Convert polar coordinates to cartesian coordinates.
47
44
  *
48
- * @param centerX Center x coordinate.
49
- * @param centerY Center y coordinate.
50
- * @param radius Radius of the circle.
51
- * @param angleInDegrees Angle in degrees.
52
45
  * @returns Cartesian coordinates.
53
46
  */
54
47
  declare const polarToCartesian: (centerX: number, centerY: number, radius: number, angleInDegrees: number) => {
@@ -58,10 +51,6 @@ declare const polarToCartesian: (centerX: number, centerY: number, radius: numbe
58
51
  /**
59
52
  * Convert cartesian coordinates to polar coordinates.
60
53
  *
61
- * @param centerX Center x coordinate.
62
- * @param centerY Center y coordinate.
63
- * @param x Point x coordinate.
64
- * @param y Point y coordinate.
65
54
  * @returns Polar coordinates.
66
55
  */
67
56
  declare const cartesianToPolar: (centerX: number, centerY: number, x: number, y: number) => {
@@ -71,58 +60,48 @@ declare const cartesianToPolar: (centerX: number, centerY: number, x: number, y:
71
60
  /**
72
61
  * Calculates length of circle.
73
62
  *
74
- * @param radius Radius of the circle.
75
63
  * @returns The length of the circle.
76
64
  */
77
65
  declare const getCircleLength: (radius: number) => number;
78
66
  /**
79
67
  * Calculates height for the compact layout.
80
68
  *
81
- * @param totalLangs Total number of languages.
82
69
  * @returns Card height.
83
70
  */
84
71
  declare const calculateCompactLayoutHeight: (totalLangs: number) => number;
85
72
  /**
86
73
  * Calculates height for the normal layout.
87
74
  *
88
- * @param totalLangs Total number of languages.
89
75
  * @returns Card height.
90
76
  */
91
77
  declare const calculateNormalLayoutHeight: (totalLangs: number) => number;
92
78
  /**
93
79
  * Calculates height for the donut layout.
94
80
  *
95
- * @param totalLangs Total number of languages.
96
81
  * @returns Card height.
97
82
  */
98
83
  declare const calculateDonutLayoutHeight: (totalLangs: number) => number;
99
84
  /**
100
85
  * Calculates height for the donut vertical layout.
101
86
  *
102
- * @param totalLangs Total number of languages.
103
87
  * @returns Card height.
104
88
  */
105
89
  declare const calculateDonutVerticalLayoutHeight: (totalLangs: number) => number;
106
90
  /**
107
91
  * Calculates height for the pie layout.
108
92
  *
109
- * @param totalLangs Total number of languages.
110
93
  * @returns Card height.
111
94
  */
112
95
  declare const calculatePieLayoutHeight: (totalLangs: number) => number;
113
96
  /**
114
97
  * Calculates the center translation needed to keep the donut chart centred.
115
98
  *
116
- * @param totalLangs Total number of languages.
117
99
  * @returns Donut center translation.
118
100
  */
119
101
  declare const donutCenterTranslation: (totalLangs: number) => number;
120
102
  /**
121
103
  * Trim top languages to lang_count while also hiding certain languages.
122
104
  *
123
- * @param topLangs Top languages.
124
- * @param langs_count Number of languages to show.
125
- * @param hide Languages to hide.
126
105
  * @returns Trimmed top languages and total size.
127
106
  */
128
107
  declare const trimTopLanguages: (topLangs: TopLangData, langs_count: number, hide?: Array<string>) => {
@@ -132,9 +111,6 @@ declare const trimTopLanguages: (topLangs: TopLangData, langs_count: number, hid
132
111
  /**
133
112
  * Get default languages count for provided card layout.
134
113
  *
135
- * @param props Function properties.
136
- * @param props.layout Input layout string.
137
- * @param props.hide_progress Input hide_progress parameter value.
138
114
  * @returns Default languages count for input layout.
139
115
  */
140
116
  declare const getDefaultLanguagesCountByLayout: ({ layout, hide_progress, }: {
@@ -144,8 +120,6 @@ declare const getDefaultLanguagesCountByLayout: ({ layout, hide_progress, }: {
144
120
  /**
145
121
  * Renders card that display user's most frequently used programming languages.
146
122
  *
147
- * @param topLangs User's most frequently used programming languages.
148
- * @param options Card options.
149
123
  * @returns Language card SVG object.
150
124
  */
151
125
  declare const renderTopLanguages: (topLangs: TopLangData, options?: CardOptions<TopLangOptions>) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"top-languages.d.ts","sourceRoot":"","sources":["../../src/cards/top-languages.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAG9D,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGnE,QAAA,MAAM,cAAc,MAAM,CAAC;AAW3B,0EAA0E;AAC1E,QAAA,MAAM,gBAAgB,kEAAmE,CAAC;AAC1F,KAAK,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,sFAAsF;AACtF,QAAA,MAAM,sBAAsB,mCAAoC,CAAC;AACjE,KAAK,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,UAAU,cAAe,SAAQ,iBAAiB;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,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