@vouched-id/ui 0.0.0-stage → 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 (228) hide show
  1. package/dist/Accordion.d.ts +8 -0
  2. package/dist/Accordion.d.ts.map +1 -0
  3. package/dist/Accordion.js +20 -0
  4. package/dist/Accordion.js.map +1 -0
  5. package/dist/Alert.d.ts +12 -0
  6. package/dist/Alert.d.ts.map +1 -0
  7. package/dist/Alert.js +64 -0
  8. package/dist/Alert.js.map +1 -0
  9. package/dist/AlertDialog.d.ts +90 -0
  10. package/dist/AlertDialog.d.ts.map +1 -0
  11. package/dist/AlertDialog.js +148 -0
  12. package/dist/AlertDialog.js.map +1 -0
  13. package/dist/Avatar.d.ts +43 -0
  14. package/dist/Avatar.d.ts.map +1 -0
  15. package/dist/Avatar.js +29 -0
  16. package/dist/Avatar.js.map +1 -0
  17. package/dist/Badge.d.ts +31 -0
  18. package/dist/Badge.d.ts.map +1 -0
  19. package/dist/Badge.js +22 -0
  20. package/dist/Badge.js.map +1 -0
  21. package/dist/Banner.d.ts +57 -0
  22. package/dist/Banner.d.ts.map +1 -0
  23. package/dist/Banner.js +30 -0
  24. package/dist/Banner.js.map +1 -0
  25. package/dist/Button.d.ts +56 -0
  26. package/dist/Button.d.ts.map +1 -0
  27. package/dist/Button.js +106 -0
  28. package/dist/Button.js.map +1 -0
  29. package/dist/Card.d.ts +79 -0
  30. package/dist/Card.d.ts.map +1 -0
  31. package/dist/Card.js +50 -0
  32. package/dist/Card.js.map +1 -0
  33. package/dist/Chart.d.ts +63 -0
  34. package/dist/Chart.d.ts.map +1 -0
  35. package/dist/Chart.js +120 -0
  36. package/dist/Chart.js.map +1 -0
  37. package/dist/Checkbox.d.ts +4 -0
  38. package/dist/Checkbox.d.ts.map +1 -0
  39. package/dist/Checkbox.js +10 -0
  40. package/dist/Checkbox.js.map +1 -0
  41. package/dist/CodeBlock.d.ts +101 -0
  42. package/dist/CodeBlock.d.ts.map +1 -0
  43. package/dist/CodeBlock.js +99 -0
  44. package/dist/CodeBlock.js.map +1 -0
  45. package/dist/Collapsible.d.ts +6 -0
  46. package/dist/Collapsible.d.ts.map +1 -0
  47. package/dist/Collapsible.js +14 -0
  48. package/dist/Collapsible.js.map +1 -0
  49. package/dist/DataTable.d.ts +59 -0
  50. package/dist/DataTable.d.ts.map +1 -0
  51. package/dist/DataTable.js +162 -0
  52. package/dist/DataTable.js.map +1 -0
  53. package/dist/Dialog.d.ts +71 -0
  54. package/dist/Dialog.d.ts.map +1 -0
  55. package/dist/Dialog.js +185 -0
  56. package/dist/Dialog.js.map +1 -0
  57. package/dist/DropdownMenu.d.ts +82 -0
  58. package/dist/DropdownMenu.d.ts.map +1 -0
  59. package/dist/DropdownMenu.js +111 -0
  60. package/dist/DropdownMenu.js.map +1 -0
  61. package/dist/EditorialHeading.d.ts +42 -0
  62. package/dist/EditorialHeading.d.ts.map +1 -0
  63. package/dist/EditorialHeading.js +36 -0
  64. package/dist/EditorialHeading.js.map +1 -0
  65. package/dist/EmptyState.d.ts +40 -0
  66. package/dist/EmptyState.d.ts.map +1 -0
  67. package/dist/EmptyState.js +7 -0
  68. package/dist/EmptyState.js.map +1 -0
  69. package/dist/Eyebrow.d.ts +27 -0
  70. package/dist/Eyebrow.d.ts.map +1 -0
  71. package/dist/Eyebrow.js +23 -0
  72. package/dist/Eyebrow.js.map +1 -0
  73. package/dist/Field.d.ts +33 -0
  74. package/dist/Field.d.ts.map +1 -0
  75. package/dist/Field.js +26 -0
  76. package/dist/Field.js.map +1 -0
  77. package/dist/HoverCard.d.ts +7 -0
  78. package/dist/HoverCard.d.ts.map +1 -0
  79. package/dist/HoverCard.js +17 -0
  80. package/dist/HoverCard.js.map +1 -0
  81. package/dist/Input.d.ts +20 -0
  82. package/dist/Input.d.ts.map +1 -0
  83. package/dist/Input.js +17 -0
  84. package/dist/Input.js.map +1 -0
  85. package/dist/InstallCommand.d.ts +48 -0
  86. package/dist/InstallCommand.d.ts.map +1 -0
  87. package/dist/InstallCommand.js +60 -0
  88. package/dist/InstallCommand.js.map +1 -0
  89. package/dist/Kbd.d.ts +23 -0
  90. package/dist/Kbd.d.ts.map +1 -0
  91. package/dist/Kbd.js +7 -0
  92. package/dist/Kbd.js.map +1 -0
  93. package/dist/Label.d.ts +5 -0
  94. package/dist/Label.d.ts.map +1 -0
  95. package/dist/Label.js +9 -0
  96. package/dist/Label.js.map +1 -0
  97. package/dist/Popover.d.ts +41 -0
  98. package/dist/Popover.d.ts.map +1 -0
  99. package/dist/Popover.js +27 -0
  100. package/dist/Popover.js.map +1 -0
  101. package/dist/Progress.d.ts +6 -0
  102. package/dist/Progress.d.ts.map +1 -0
  103. package/dist/Progress.js +9 -0
  104. package/dist/Progress.js.map +1 -0
  105. package/dist/RadioGroup.d.ts +5 -0
  106. package/dist/RadioGroup.d.ts.map +1 -0
  107. package/dist/RadioGroup.js +15 -0
  108. package/dist/RadioGroup.js.map +1 -0
  109. package/dist/ScrollArea.d.ts +32 -0
  110. package/dist/ScrollArea.d.ts.map +1 -0
  111. package/dist/ScrollArea.js +13 -0
  112. package/dist/ScrollArea.js.map +1 -0
  113. package/dist/SegmentedControl.d.ts +37 -0
  114. package/dist/SegmentedControl.d.ts.map +1 -0
  115. package/dist/SegmentedControl.js +85 -0
  116. package/dist/SegmentedControl.js.map +1 -0
  117. package/dist/Select.d.ts +21 -0
  118. package/dist/Select.d.ts.map +1 -0
  119. package/dist/Select.js +52 -0
  120. package/dist/Select.js.map +1 -0
  121. package/dist/Separator.d.ts +4 -0
  122. package/dist/Separator.d.ts.map +1 -0
  123. package/dist/Separator.js +9 -0
  124. package/dist/Separator.js.map +1 -0
  125. package/dist/Sheet.d.ts +71 -0
  126. package/dist/Sheet.d.ts.map +1 -0
  127. package/dist/Sheet.js +173 -0
  128. package/dist/Sheet.js.map +1 -0
  129. package/dist/Skeleton.d.ts +26 -0
  130. package/dist/Skeleton.d.ts.map +1 -0
  131. package/dist/Skeleton.js +9 -0
  132. package/dist/Skeleton.js.map +1 -0
  133. package/dist/Slider.d.ts +5 -0
  134. package/dist/Slider.d.ts.map +1 -0
  135. package/dist/Slider.js +12 -0
  136. package/dist/Slider.js.map +1 -0
  137. package/dist/StatusDot.d.ts +29 -0
  138. package/dist/StatusDot.d.ts.map +1 -0
  139. package/dist/StatusDot.js +55 -0
  140. package/dist/StatusDot.js.map +1 -0
  141. package/dist/StatusText.d.ts +15 -0
  142. package/dist/StatusText.d.ts.map +1 -0
  143. package/dist/StatusText.js +49 -0
  144. package/dist/StatusText.js.map +1 -0
  145. package/dist/Switch.d.ts +47 -0
  146. package/dist/Switch.d.ts.map +1 -0
  147. package/dist/Switch.js +17 -0
  148. package/dist/Switch.js.map +1 -0
  149. package/dist/Table.d.ts +22 -0
  150. package/dist/Table.d.ts.map +1 -0
  151. package/dist/Table.js +42 -0
  152. package/dist/Table.js.map +1 -0
  153. package/dist/Tabs.d.ts +96 -0
  154. package/dist/Tabs.d.ts.map +1 -0
  155. package/dist/Tabs.js +319 -0
  156. package/dist/Tabs.js.map +1 -0
  157. package/dist/Tag.d.ts +19 -0
  158. package/dist/Tag.d.ts.map +1 -0
  159. package/dist/Tag.js +50 -0
  160. package/dist/Tag.js.map +1 -0
  161. package/dist/Textarea.d.ts +32 -0
  162. package/dist/Textarea.d.ts.map +1 -0
  163. package/dist/Textarea.js +11 -0
  164. package/dist/Textarea.js.map +1 -0
  165. package/dist/Toast.d.ts +47 -0
  166. package/dist/Toast.d.ts.map +1 -0
  167. package/dist/Toast.js +110 -0
  168. package/dist/Toast.js.map +1 -0
  169. package/dist/ToggleGroup.d.ts +48 -0
  170. package/dist/ToggleGroup.d.ts.map +1 -0
  171. package/dist/ToggleGroup.js +27 -0
  172. package/dist/ToggleGroup.js.map +1 -0
  173. package/dist/Tooltip.d.ts +8 -0
  174. package/dist/Tooltip.d.ts.map +1 -0
  175. package/dist/Tooltip.js +81 -0
  176. package/dist/Tooltip.js.map +1 -0
  177. package/dist/_code-copy-button.d.ts +9 -0
  178. package/dist/_code-copy-button.d.ts.map +1 -0
  179. package/dist/_code-copy-button.js +72 -0
  180. package/dist/_code-copy-button.js.map +1 -0
  181. package/dist/_code-syntax.d.ts +81 -0
  182. package/dist/_code-syntax.d.ts.map +1 -0
  183. package/dist/_code-syntax.js +293 -0
  184. package/dist/_code-syntax.js.map +1 -0
  185. package/dist/_status-icons.d.ts +22 -0
  186. package/dist/_status-icons.d.ts.map +1 -0
  187. package/dist/_status-icons.js +40 -0
  188. package/dist/_status-icons.js.map +1 -0
  189. package/dist/index.d.ts +11 -0
  190. package/dist/index.d.ts.map +1 -0
  191. package/dist/index.js +11 -0
  192. package/dist/index.js.map +1 -0
  193. package/dist/lib/format-numbers.d.ts +51 -0
  194. package/dist/lib/format-numbers.d.ts.map +1 -0
  195. package/dist/lib/format-numbers.js +158 -0
  196. package/dist/lib/format-numbers.js.map +1 -0
  197. package/dist/lib/utils.d.ts +20 -0
  198. package/dist/lib/utils.d.ts.map +1 -0
  199. package/dist/lib/utils.js +23 -0
  200. package/dist/lib/utils.js.map +1 -0
  201. package/dist/public.d.ts +61 -0
  202. package/dist/public.d.ts.map +1 -0
  203. package/dist/public.js +65 -0
  204. package/dist/public.js.map +1 -0
  205. package/dist/theme-scope.d.ts +55 -0
  206. package/dist/theme-scope.d.ts.map +1 -0
  207. package/dist/theme-scope.js +90 -0
  208. package/dist/theme-scope.js.map +1 -0
  209. package/dist/tokens.generated.d.ts +335 -0
  210. package/dist/tokens.generated.d.ts.map +1 -0
  211. package/dist/tokens.generated.js +349 -0
  212. package/dist/tokens.generated.js.map +1 -0
  213. package/package.json +100 -3
  214. package/styles/README.md +104 -0
  215. package/styles/base.css +301 -0
  216. package/styles/canvas.css +147 -0
  217. package/styles/colors_and_type.css +136 -0
  218. package/styles/component-contracts.css +471 -0
  219. package/styles/fonts.css +28 -0
  220. package/styles/package.css +6 -0
  221. package/styles/primitive-skins.css +104 -0
  222. package/styles/semantic-bindings.css +119 -0
  223. package/styles/shell.css +50 -0
  224. package/styles/source.css +4 -0
  225. package/styles/tailwind-bridge.css +255 -0
  226. package/styles/theme.css +14 -0
  227. package/styles/tokens.css +1281 -0
  228. package/README.md +0 -3
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Most specific first, because one scope can match several prefixes
3
+ * (keyword.operator.assignment is both keyword.operator and keyword). A
4
+ * null kind is a deliberate "leave uncolored" that also stops the walk up
5
+ * to ancestor scopes.
6
+ */
7
+ const SCOPE_RULES = [
8
+ ['comment', 'comment'],
9
+ ['punctuation.definition.comment', 'comment'],
10
+ ['support.type.property-name', 'property'],
11
+ ['punctuation.support.type.property-name', 'property'],
12
+ ['meta.object-literal.key', 'property'],
13
+ ['variable.other.property', 'property'],
14
+ // A bare shell argument (`git clone`, `-v`) is scoped as a string, but
15
+ // painting every argument as a string drowns the command line.
16
+ ['string.unquoted', null],
17
+ ['punctuation.definition.string', 'string'],
18
+ ['string', 'string'],
19
+ ['constant.numeric', 'number'],
20
+ ['constant.language', 'number'],
21
+ // Word operators read as keywords; symbol operators read as punctuation.
22
+ ['keyword.operator.new', 'keyword'],
23
+ ['keyword.operator.expression', 'keyword'],
24
+ ['keyword.operator.word', 'keyword'],
25
+ ['keyword.operator', 'punctuation'],
26
+ ['keyword', 'keyword'],
27
+ ['storage.type', 'keyword'],
28
+ ['storage.modifier', 'keyword'],
29
+ ['entity.name.command', 'keyword'],
30
+ ['support.function.builtin', 'keyword'],
31
+ ['punctuation', 'punctuation'],
32
+ ['meta.brace', 'punctuation'],
33
+ ['meta.delimiter', 'punctuation'],
34
+ ];
35
+ /** TextMate selector matching: a prefix only counts on a dot boundary. */
36
+ function scopeMatches(scope, prefix) {
37
+ return scope === prefix || scope.startsWith(`${prefix}.`);
38
+ }
39
+ /**
40
+ * Classify a root-first TextMate scope stack. Walks from the leaf up so the
41
+ * most specific scope decides (a JSON key is `string.json` by ancestry but
42
+ * `support.type.property-name.json` at the leaf).
43
+ *
44
+ * @example kindForScopes(['source.ts', 'keyword.operator.assignment.ts']) // 'punctuation'
45
+ * @example kindForScopes(['source.shell', 'string.unquoted.argument.shell']) // null
46
+ */
47
+ export function kindForScopes(scopes) {
48
+ for (let index = scopes.length - 1; index >= 0; index--) {
49
+ const scope = scopes[index];
50
+ const rule = SCOPE_RULES.find(([prefix]) => scopeMatches(scope, prefix));
51
+ if (rule)
52
+ return rule[1];
53
+ }
54
+ return null;
55
+ }
56
+ const GRAMMAR_FOR_LANGUAGE = {
57
+ bash: 'shellscript',
58
+ sh: 'shellscript',
59
+ shell: 'shellscript',
60
+ shellscript: 'shellscript',
61
+ zsh: 'shellscript',
62
+ json: 'json',
63
+ jsonc: 'jsonc',
64
+ typescript: 'typescript',
65
+ ts: 'typescript',
66
+ tsx: 'tsx',
67
+ javascript: 'javascript',
68
+ js: 'javascript',
69
+ jsx: 'jsx',
70
+ http: 'http',
71
+ yaml: 'yaml',
72
+ yml: 'yaml',
73
+ html: 'html',
74
+ css: 'css',
75
+ sql: 'sql',
76
+ python: 'python',
77
+ py: 'python',
78
+ diff: 'diff',
79
+ csharp: 'csharp',
80
+ hcl: 'hcl',
81
+ xml: 'xml',
82
+ };
83
+ // A Set, not an `in` check on the record: `'constructor' in {}` is true.
84
+ const SUPPORTED_LANGUAGES = new Set(Object.keys(GRAMMAR_FOR_LANGUAGE));
85
+ /**
86
+ * One literal import() per grammar, so a bundler emits a chunk for each
87
+ * allowlisted grammar (plus the ones it embeds, such as html's css and
88
+ * javascript) and nothing for the rest of shiki's catalog.
89
+ */
90
+ const GRAMMAR_LOADERS = {
91
+ shellscript: () => import('shiki/langs/shellscript.mjs'),
92
+ json: () => import('shiki/langs/json.mjs'),
93
+ jsonc: () => import('shiki/langs/jsonc.mjs'),
94
+ typescript: () => import('shiki/langs/typescript.mjs'),
95
+ tsx: () => import('shiki/langs/tsx.mjs'),
96
+ javascript: () => import('shiki/langs/javascript.mjs'),
97
+ jsx: () => import('shiki/langs/jsx.mjs'),
98
+ http: () => import('shiki/langs/http.mjs'),
99
+ yaml: () => import('shiki/langs/yaml.mjs'),
100
+ html: () => import('shiki/langs/html.mjs'),
101
+ css: () => import('shiki/langs/css.mjs'),
102
+ sql: () => import('shiki/langs/sql.mjs'),
103
+ python: () => import('shiki/langs/python.mjs'),
104
+ diff: () => import('shiki/langs/diff.mjs'),
105
+ csharp: () => import('shiki/langs/csharp.mjs'),
106
+ hcl: () => import('shiki/langs/hcl.mjs'),
107
+ xml: () => import('shiki/langs/xml.mjs'),
108
+ };
109
+ /**
110
+ * Whether CodeBlock colors this language id or alias.
111
+ *
112
+ * @example isHighlightable('bash') // true
113
+ * @example isHighlightable('cedar') // false, no shiki grammar
114
+ * @example isHighlightable('rust') // false, shiki has one but it is not allowlisted
115
+ */
116
+ export function isHighlightable(language) {
117
+ return typeof language === 'string' && SUPPORTED_LANGUAGES.has(language);
118
+ }
119
+ /**
120
+ * Tokenizing is linear in the code length and runs on the main thread:
121
+ * about 26k characters of TypeScript measured near 100ms, so longer code
122
+ * stays plain rather than risk a visible stall.
123
+ */
124
+ export const MAX_HIGHLIGHT_LENGTH = 10_000;
125
+ /**
126
+ * Whether CodeBlock should colorize this code at all. A plain boolean, not a
127
+ * type guard: it also refuses a valid language when the code is too long,
128
+ * so a `false` says nothing about the language.
129
+ */
130
+ export function canHighlight(code, language) {
131
+ return code.length <= MAX_HIGHLIGHT_LENGTH && isHighlightable(language);
132
+ }
133
+ const SCOPE_THEME_NAME = 'checkpoint-scopes';
134
+ // Deliberately empty: this theme exists only because shiki requires one.
135
+ const SCOPE_THEME = {
136
+ name: SCOPE_THEME_NAME,
137
+ type: 'dark',
138
+ settings: [],
139
+ };
140
+ let highlighterPromise = null;
141
+ // Keyed by grammar, so aliases of one grammar (bash, sh, zsh) share a load.
142
+ const grammarLoads = new Map();
143
+ function getHighlighter() {
144
+ if (!highlighterPromise) {
145
+ // Imported on first use so pages that never colorize a block do not
146
+ // pay for the tokenizer in their initial bundle.
147
+ highlighterPromise = Promise.all([import('shiki/core'), import('shiki/engine/javascript')])
148
+ .then(([{ createHighlighterCore }, { createJavaScriptRegexEngine }]) => createHighlighterCore({
149
+ themes: [SCOPE_THEME],
150
+ langs: [],
151
+ engine: createJavaScriptRegexEngine(),
152
+ }))
153
+ .catch((error) => {
154
+ // Forget the failure so a later block can retry.
155
+ highlighterPromise = null;
156
+ throw error;
157
+ });
158
+ }
159
+ return highlighterPromise;
160
+ }
161
+ function loadGrammar(highlighter, language) {
162
+ const grammar = GRAMMAR_FOR_LANGUAGE[language];
163
+ let load = grammarLoads.get(grammar);
164
+ if (!load) {
165
+ load = highlighter.loadLanguage(GRAMMAR_LOADERS[grammar]).catch((error) => {
166
+ // Forget the failure (a chunk that did not load) so a later block can retry.
167
+ grammarLoads.delete(grammar);
168
+ throw error;
169
+ });
170
+ grammarLoads.set(grammar, load);
171
+ }
172
+ return load;
173
+ }
174
+ function piecesFromToken(token) {
175
+ const explanation = token.explanation ?? [];
176
+ const explained = explanation.map((part) => part.content).join('');
177
+ // Explanation runs are expected to tile the token exactly; if a shiki
178
+ // change ever breaks that, keep the text and drop the color.
179
+ if (explained !== token.content)
180
+ return [{ content: token.content, kind: null }];
181
+ return explanation.map((part) => ({
182
+ content: part.content,
183
+ kind: kindForScopes(part.scopes.map((scope) => scope.scopeName)),
184
+ }));
185
+ }
186
+ /** Fewer DOM nodes: neighbouring runs of the same kind render as one span. */
187
+ function coalesce(pieces) {
188
+ const merged = [];
189
+ for (const piece of pieces) {
190
+ if (piece.content === '')
191
+ continue;
192
+ const previous = merged.at(-1);
193
+ if (previous && previous.kind === piece.kind) {
194
+ merged[merged.length - 1] = { content: previous.content + piece.content, kind: piece.kind };
195
+ }
196
+ else {
197
+ merged.push(piece);
198
+ }
199
+ }
200
+ return merged;
201
+ }
202
+ /**
203
+ * Shiki splits on CRLF and drops the CR, and any other drift would make the
204
+ * colored block read differently from its copy payload. Every line is
205
+ * checked against the source and falls back to uncolored text if it differs.
206
+ */
207
+ function alignToSource(code, tokenLines) {
208
+ const sourceLines = code.split('\n');
209
+ const plain = (source) => source ? [{ content: source, kind: null }] : [];
210
+ if (tokenLines.length !== sourceLines.length)
211
+ return sourceLines.map(plain);
212
+ return sourceLines.map((source, index) => {
213
+ const pieces = tokenLines[index];
214
+ const text = pieces.map((piece) => piece.content).join('');
215
+ if (text === source)
216
+ return pieces;
217
+ if (`${text}\r` === source)
218
+ return coalesce([...pieces, { content: '\r', kind: null }]);
219
+ return plain(source);
220
+ });
221
+ }
222
+ async function tokenize(code, language) {
223
+ const highlighter = await getHighlighter();
224
+ await loadGrammar(highlighter, language);
225
+ const { tokens } = highlighter.codeToTokens(code, {
226
+ lang: language,
227
+ theme: SCOPE_THEME_NAME,
228
+ includeExplanation: 'scopeName',
229
+ });
230
+ const tokenLines = tokens.map((line) => coalesce(line.flatMap(piecesFromToken)));
231
+ return alignToSource(code, tokenLines);
232
+ }
233
+ const RESULT_CACHE_MAX = 200;
234
+ const resultCache = new Map();
235
+ // Every caller awaiting the same (code, language) shares one promise, so a
236
+ // page with repeated snippets tokenizes each only once.
237
+ const inFlight = new Map();
238
+ function hashCode(text) {
239
+ let hash = 0;
240
+ for (let index = 0; index < text.length; index++) {
241
+ hash = (hash * 31 + text.charCodeAt(index)) | 0;
242
+ }
243
+ return hash >>> 0;
244
+ }
245
+ function cacheKey(code, language) {
246
+ return `${language}:${code.length}:${hashCode(code)}`;
247
+ }
248
+ function readCache(key, code) {
249
+ const entry = resultCache.get(key);
250
+ // The stored source guards against a hash collision rendering another
251
+ // snippet's tokens.
252
+ return entry && entry.code === code ? entry.lines : undefined;
253
+ }
254
+ function writeCache(key, code, lines) {
255
+ if (resultCache.size >= RESULT_CACHE_MAX) {
256
+ resultCache.delete(resultCache.keys().next().value);
257
+ }
258
+ resultCache.set(key, { code, lines });
259
+ }
260
+ /**
261
+ * Tokenize `code` as `language` into kind-classified lines. Resolves from
262
+ * the cache when this exact code was colorized before. Rejects when the
263
+ * language is not supported or shiki fails; callers keep the plain text.
264
+ */
265
+ export function highlightCode(code, language) {
266
+ if (!isHighlightable(language)) {
267
+ return Promise.reject(new Error(`CodeBlock loads no grammar for "${language}"`));
268
+ }
269
+ const key = cacheKey(code, language);
270
+ const cached = readCache(key, code);
271
+ if (cached)
272
+ return Promise.resolve(cached);
273
+ const pending = inFlight.get(key);
274
+ if (pending && pending.code === code)
275
+ return pending.task;
276
+ const task = tokenize(code, language).then((lines) => {
277
+ writeCache(key, code, lines);
278
+ return lines;
279
+ });
280
+ // A colliding key already in flight keeps its slot; this call just runs
281
+ // without sharing.
282
+ if (pending)
283
+ return task;
284
+ inFlight.set(key, { code, task });
285
+ const release = () => {
286
+ inFlight.delete(key);
287
+ };
288
+ // Settles the bookkeeping on both outcomes without creating a second,
289
+ // unobserved rejection: the caller still receives `task` itself.
290
+ task.then(release, release);
291
+ return task;
292
+ }
293
+ //# sourceMappingURL=_code-syntax.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_code-syntax.js","sourceRoot":"","sources":["../src/_code-syntax.ts"],"names":[],"mappings":"AA2CA;;;;;GAKG;AACH,MAAM,WAAW,GAAyE;IACxF,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,CAAC,gCAAgC,EAAE,SAAS,CAAC;IAC7C,CAAC,4BAA4B,EAAE,UAAU,CAAC;IAC1C,CAAC,wCAAwC,EAAE,UAAU,CAAC;IACtD,CAAC,yBAAyB,EAAE,UAAU,CAAC;IACvC,CAAC,yBAAyB,EAAE,UAAU,CAAC;IACvC,uEAAuE;IACvE,+DAA+D;IAC/D,CAAC,iBAAiB,EAAE,IAAI,CAAC;IACzB,CAAC,+BAA+B,EAAE,QAAQ,CAAC;IAC3C,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACpB,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC9B,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IAC/B,yEAAyE;IACzE,CAAC,sBAAsB,EAAE,SAAS,CAAC;IACnC,CAAC,6BAA6B,EAAE,SAAS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;IACjE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5B,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shared status glyphs for the status-bearing primitives (Toast,
3
+ * Banner, future cp-primitives that surface allow / deny / warn /
4
+ * info state).
5
+ *
6
+ * Single source so all four icons stay byte-identical across the
7
+ * codebase — bugbot caught earlier that Toast.tsx and Banner.tsx
8
+ * had byte-for-byte duplicate SVG bodies. Extracted here so any
9
+ * future glyph tuning lands in one place.
10
+ *
11
+ * All four are feather-style, stroke-only, 24×24 viewBox,
12
+ * `currentColor` strokes — the consuming primitive supplies the
13
+ * status hue via the surrounding text color.
14
+ *
15
+ * Prefixed with `_` so the file is treated as a private internal —
16
+ * not re-exported from the barrel.
17
+ */
18
+ export declare function InfoGlyph(): import("react").JSX.Element;
19
+ export declare function WarnGlyph(): import("react").JSX.Element;
20
+ export declare function DenyGlyph(): import("react").JSX.Element;
21
+ export declare function SuccessGlyph(): import("react").JSX.Element;
22
+ //# sourceMappingURL=_status-icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_status-icons.d.ts","sourceRoot":"","sources":["../src/_status-icons.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAYH,wBAAgB,SAAS,gCAQxB;AAED,wBAAgB,SAAS,gCAQxB;AAED,wBAAgB,SAAS,gCAQxB;AAED,wBAAgB,YAAY,gCAM3B"}
@@ -0,0 +1,40 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Shared status glyphs for the status-bearing primitives (Toast,
4
+ * Banner, future cp-primitives that surface allow / deny / warn /
5
+ * info state).
6
+ *
7
+ * Single source so all four icons stay byte-identical across the
8
+ * codebase — bugbot caught earlier that Toast.tsx and Banner.tsx
9
+ * had byte-for-byte duplicate SVG bodies. Extracted here so any
10
+ * future glyph tuning lands in one place.
11
+ *
12
+ * All four are feather-style, stroke-only, 24×24 viewBox,
13
+ * `currentColor` strokes — the consuming primitive supplies the
14
+ * status hue via the surrounding text color.
15
+ *
16
+ * Prefixed with `_` so the file is treated as a private internal —
17
+ * not re-exported from the barrel.
18
+ */
19
+ const common = {
20
+ viewBox: '0 0 24 24',
21
+ fill: 'none',
22
+ stroke: 'currentColor',
23
+ strokeWidth: 2,
24
+ strokeLinecap: 'round',
25
+ strokeLinejoin: 'round',
26
+ 'aria-hidden': true,
27
+ };
28
+ export function InfoGlyph() {
29
+ return (_jsxs("svg", { ...common, children: [_jsx("circle", { cx: "12", cy: "12", r: "10" }), _jsx("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" }), _jsx("line", { x1: "12", y1: "12", x2: "12", y2: "16" })] }));
30
+ }
31
+ export function WarnGlyph() {
32
+ return (_jsxs("svg", { ...common, children: [_jsx("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }), _jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }), _jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })] }));
33
+ }
34
+ export function DenyGlyph() {
35
+ return (_jsxs("svg", { ...common, children: [_jsx("circle", { cx: "12", cy: "12", r: "10" }), _jsx("line", { x1: "15", y1: "9", x2: "9", y2: "15" }), _jsx("line", { x1: "9", y1: "9", x2: "15", y2: "15" })] }));
36
+ }
37
+ export function SuccessGlyph() {
38
+ return (_jsx("svg", { ...common, children: _jsx("polyline", { points: "20 6 9 17 4 12" }) }));
39
+ }
40
+ //# sourceMappingURL=_status-icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_status-icons.js","sourceRoot":"","sources":["../src/_status-icons.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,MAAe;IACrB,MAAM,EAAE,c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AAU,YAAY;IAC1B,OAAO,CACL,iBAAS,MAAM,YACb,mBAAU,MAAM,EAAC,gBAAgB,GAAG,GAChC,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The package entry, `@vouched-id/ui`.
3
+ *
4
+ * import { Button, Field, Input, SegmentedControl, Eyebrow, EditorialHeading } from '@vouched-id/ui';
5
+ *
6
+ * The primitives live in `./public.ts`, which the shadcn registry also
7
+ * installs as the consumer's barrel, so a package consumer and a registry
8
+ * consumer import the same set.
9
+ */
10
+ export * from './public.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The package entry, `@vouched-id/ui`.
3
+ *
4
+ * import { Button, Field, Input, SegmentedControl, Eyebrow, EditorialHeading } from '@vouched-id/ui';
5
+ *
6
+ * The primitives live in `./public.ts`, which the shadcn registry also
7
+ * installs as the consumer's barrel, so a package consumer and a registry
8
+ * consumer import the same set.
9
+ */
10
+ export * from './public.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,aAAa,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Number formatting utilities for dashboard display
3
+ */
4
+ /**
5
+ * Format numbers for display in stat cards and overview cards
6
+ * - Numbers < 1,000: Show as is (e.g., "999")
7
+ * - Numbers 1,000-9,999: Show with commas (e.g., "1,234")
8
+ * - Numbers ≥10,000: Show abbreviated with 2 decimals (e.g., "12.35K")
9
+ * - Numbers ≥1M: Show with 1 decimal (e.g., "1.2M")
10
+ * - Numbers ≥1B: Show with 1 decimal (e.g., "2.5B")
11
+ */
12
+ export declare function formatStatValue(value: number | string): string;
13
+ /**
14
+ * Format percentage values with appropriate precision
15
+ * Use this for actual percentages (parts of 100%)
16
+ * - < 0.01%: Display as "<0.01%"
17
+ * - Whole numbers: "30%" not "30.00%"
18
+ * - Decimals: Show up to 2 decimal places, trimming trailing zeros
19
+ */
20
+ export declare function formatPercentage(percentage: number): string;
21
+ /**
22
+ * Format percentage change values (for comparisons/growth indicators)
23
+ * Use this for changes over time (e.g., "↑ 67%" or "↓ 12%")
24
+ * Always shows whole numbers for cleaner display in comparison contexts
25
+ */
26
+ export declare function formatPercentageChange(percentage: number): string;
27
+ /**
28
+ * Compact number formatter with 3 significant figures + k/M/B suffix.
29
+ *
30
+ * Matches the v2 dashboard's display convention (`index-new.html`):
31
+ * 1,234 → "1.23k"
32
+ * 12,345 → "12.3k"
33
+ * 123,456 → "123k"
34
+ * 1,234,567 → "1.23M"
35
+ * 12,345,678 → "12.3M"
36
+ * 123,456,789 → "123M"
37
+ *
38
+ * Below 1000 the integer is shown verbatim (no comma, no decimal) so
39
+ * counts like "3 reqs" or "5 new" stay legible.
40
+ *
41
+ * Distinct from `formatStatValue`, which uses uppercase `K` and a single
42
+ * decimal place at the thousand scale — kept for v1 callers and any v2
43
+ * surface that explicitly opts out.
44
+ */
45
+ export declare function formatCompactNumber(value: number): string;
46
+ /**
47
+ * Format byte values into human-readable strings (B, KB, MB, GB, TB, PB).
48
+ * Clamps the unit index to avoid undefined lookups for very large values.
49
+ */
50
+ export declare function formatBytes(bytes: number): string;
51
+ //# sourceMappingURL=format-numbers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-numbers.d.ts","sourceRoot":"","sources":["../../src/lib/format-numbers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CA2C9D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAyB3D;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAMjE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA2CzD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMjD"}
@@ -0,0 +1,158 @@
1
+ /**
2
+ * Number formatting utilities for dashboard display
3
+ */
4
+ /**
5
+ * Format numbers for display in stat cards and overview cards
6
+ * - Numbers < 1,000: Show as is (e.g., "999")
7
+ * - Numbers 1,000-9,999: Show with commas (e.g., "1,234")
8
+ * - Numbers ≥10,000: Show abbreviated with 2 decimals (e.g., "12.35K")
9
+ * - Numbers ≥1M: Show with 1 decimal (e.g., "1.2M")
10
+ * - Numbers ≥1B: Show with 1 decimal (e.g., "2.5B")
11
+ */
12
+ export function formatStatValue(value) {
13
+ const num = typeof value === 'number' ? value : Number(String(value).replace(/[^0-9.-]/g, ''));
14
+ if (!Number.isFinite(num)) {
15
+ return '0';
16
+ }
17
+ const absNum = Math.abs(num);
18
+ const sign = num < 0 ? '-' : '';
19
+ // Numbers less than 1,000: no formatting
20
+ if (absNum < 1000) {
21
+ return num.toString();
22
+ }
23
+ // Numbers 1,000-9,999: add commas
24
+ if (absNum < 10000) {
25
+ return num.toLocaleString();
26
+ }
27
+ // Numbers 10,000+: abbreviate with consistent decimal places
28
+ if (absNum >= 1000000000) {
29
+ // Billions: 1 decimal place
30
+ const billions = absNum / 1000000000;
31
+ return sign + billions.toFixed(1).replace(/\.0$/, '') + 'B';
32
+ }
33
+ if (absNum >= 1000000) {
34
+ // Millions: 1 decimal place
35
+ const millions = absNum / 1000000;
36
+ return sign + millions.toFixed(1).replace(/\.0$/, '') + 'M';
37
+ }
38
+ if (absNum >= 10000) {
39
+ // Thousands (10k+): 2 decimal places
40
+ const thousands = absNum / 1000;
41
+ // Remove trailing zeros but keep at least one decimal if needed
42
+ const formatted = thousands.toFixed(2);
43
+ const trimmed = formatted.replace(/\.00$/, '').replace(/(\.\d)0$/, '$1');
44
+ return sign + trimmed + 'K';
45
+ }
46
+ return num.toLocaleString();
47
+ }
48
+ /**
49
+ * Format percentage values with appropriate precision
50
+ * Use this for actual percentages (parts of 100%)
51
+ * - < 0.01%: Display as "<0.01%"
52
+ * - Whole numbers: "30%" not "30.00%"
53
+ * - Decimals: Show up to 2 decimal places, trimming trailing zeros
54
+ */
55
+ export function formatPercentage(percentage) {
56
+ if (!Number.isFinite(percentage)) {
57
+ return '0';
58
+ }
59
+ const absPercentage = Math.abs(percentage);
60
+ const sign = percentage < 0 ? '-' : '';
61
+ // Exactly 0%
62
+ if (absPercentage === 0) {
63
+ return '0';
64
+ }
65
+ // Very small percentages
66
+ if (absPercentage > 0 && absPercentage < 0.01) {
67
+ return sign ? `${sign}<0.01` : '<0.01';
68
+ }
69
+ // Format with up to 2 decimals, removing trailing zeros
70
+ // e.g., 30.00 -> "30", 30.10 -> "30.1", 30.12 -> "30.12"
71
+ const formatted = absPercentage
72
+ .toFixed(2)
73
+ .replace(/\.00$/, '')
74
+ .replace(/(\.\d)0$/, '$1');
75
+ return sign + formatted;
76
+ }
77
+ /**
78
+ * Format percentage change values (for comparisons/growth indicators)
79
+ * Use this for changes over time (e.g., "↑ 67%" or "↓ 12%")
80
+ * Always shows whole numbers for cleaner display in comparison contexts
81
+ */
82
+ export function formatPercentageChange(percentage) {
83
+ if (!Number.isFinite(percentage)) {
84
+ return '0%';
85
+ }
86
+ return `${Math.round(Math.abs(percentage))}%`;
87
+ }
88
+ /**
89
+ * Compact number formatter with 3 significant figures + k/M/B suffix.
90
+ *
91
+ * Matches the v2 dashboard's display convention (`index-new.html`):
92
+ * 1,234 → "1.23k"
93
+ * 12,345 → "12.3k"
94
+ * 123,456 → "123k"
95
+ * 1,234,567 → "1.23M"
96
+ * 12,345,678 → "12.3M"
97
+ * 123,456,789 → "123M"
98
+ *
99
+ * Below 1000 the integer is shown verbatim (no comma, no decimal) so
100
+ * counts like "3 reqs" or "5 new" stay legible.
101
+ *
102
+ * Distinct from `formatStatValue`, which uses uppercase `K` and a single
103
+ * decimal place at the thousand scale — kept for v1 callers and any v2
104
+ * surface that explicitly opts out.
105
+ */
106
+ export function formatCompactNumber(value) {
107
+ if (!Number.isFinite(value))
108
+ return '0';
109
+ const sign = value < 0 ? '-' : '';
110
+ const abs = Math.abs(value);
111
+ if (abs < 1000)
112
+ return sign + Math.trunc(abs).toString();
113
+ const units = [
114
+ { divisor: 1e9, suffix: 'B' },
115
+ { divisor: 1e6, suffix: 'M' },
116
+ { divisor: 1e3, suffix: 'k' },
117
+ ];
118
+ let chosenIdx = units.findIndex((u) => abs >= u.divisor);
119
+ if (chosenIdx === -1)
120
+ return sign + Math.trunc(abs).toString();
121
+ let chosen = units[chosenIdx];
122
+ let scaled = abs / chosen.divisor;
123
+ let decimals = scaled >= 100 ? 0 : scaled >= 10 ? 1 : 2;
124
+ let rounded = Number(scaled.toFixed(decimals));
125
+ // If rounding pushed the coefficient to the next unit (e.g. 999,500 →
126
+ // scaled 999.5 → rounded "1000" in the k range), promote to the next
127
+ // larger unit so the output is "1.00M" instead of "1000k". The B
128
+ // range has no larger unit; "1000B" still renders honestly there.
129
+ if (rounded >= 1000 && chosenIdx > 0) {
130
+ chosenIdx -= 1;
131
+ chosen = units[chosenIdx];
132
+ scaled = abs / chosen.divisor;
133
+ decimals = scaled >= 100 ? 0 : scaled >= 10 ? 1 : 2;
134
+ rounded = Number(scaled.toFixed(decimals));
135
+ }
136
+ // If rounding pushed the coefficient into a wider integer bucket
137
+ // within the same unit (e.g. 99,950 → scaled 99.95 → rounded "100.0"
138
+ // in the k range), drop a decimal so we emit "100k" instead of
139
+ // "100.0k". Cross-unit overflow is already handled above.
140
+ const recomputedDecimals = rounded >= 100 ? 0 : rounded >= 10 ? 1 : 2;
141
+ if (recomputedDecimals < decimals) {
142
+ decimals = recomputedDecimals;
143
+ }
144
+ return `${sign}${rounded.toFixed(decimals)}${chosen.suffix}`;
145
+ }
146
+ /**
147
+ * Format byte values into human-readable strings (B, KB, MB, GB, TB, PB).
148
+ * Clamps the unit index to avoid undefined lookups for very large values.
149
+ */
150
+ export function formatBytes(bytes) {
151
+ if (bytes === 0)
152
+ return '0 B';
153
+ const k = 1024;
154
+ const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];
155
+ const i = Math.min(Math.floor(Math.log(bytes) / Math.log(k)), sizes.length - 1);
156
+ return `${parseFloat((bytes / Math.pow(k, i)).toFixed(1))} ${sizes[i]}`;
157
+ }
158
+ //# sourceMappingURL=format-numbers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-numbers.js","sourceRoot":"","sources":["../../src/lib/format-numbers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,KAAsB;IACpD,MAAM,GAAG,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;IAE/F,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAEhC,yCAAyC;IACzC,IAAI,MAAM,GAAG,IAAI,EAAE,CAAC;QAClB,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED,kCAAkC;IAClC,IAAI,MAAM,GAAG,KAAK,EAAE,CAAC;QACnB,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