@celestia-island/hikari 0.55.362 → 0.55.364

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 (39) hide show
  1. package/package.json +1 -1
  2. package/src/components/HkAuthSubmitButton.tsx +4 -0
  3. package/src/components/HkCardList.tsx +11 -2
  4. package/src/components/HkCurrencySelect.scss +250 -0
  5. package/src/components/HkCurrencySelect.test.tsx +565 -0
  6. package/src/components/HkCurrencySelect.tsx +568 -0
  7. package/src/components/HkEditableTable.scss +105 -0
  8. package/src/components/HkEditableTable.test.tsx +324 -0
  9. package/src/components/HkEditableTable.tsx +310 -0
  10. package/src/components/HkKanban.tsx +10 -3
  11. package/src/components/HkMoneyInput.scss +146 -0
  12. package/src/components/HkMoneyInput.test.tsx +410 -0
  13. package/src/components/HkMoneyInput.tsx +277 -0
  14. package/src/components/HkPlaceholderMarquee.tsx +2 -0
  15. package/src/components/HkPrice.scss +111 -0
  16. package/src/components/HkPrice.test.tsx +209 -0
  17. package/src/components/HkPrice.tsx +174 -0
  18. package/src/components/HkScrollContainer.dock.test.tsx +18 -0
  19. package/src/components/HkTabs.test.ts +13 -0
  20. package/src/components/HkTabs.tsx +11 -1
  21. package/src/components/currencyMoney.barrel.test.ts +55 -0
  22. package/src/i18n/locales/ar/components.json +17 -1
  23. package/src/i18n/locales/de/components.json +17 -1
  24. package/src/i18n/locales/en/components.json +17 -1
  25. package/src/i18n/locales/es/components.json +17 -1
  26. package/src/i18n/locales/fr/components.json +17 -1
  27. package/src/i18n/locales/ja/components.json +17 -1
  28. package/src/i18n/locales/ko/components.json +17 -1
  29. package/src/i18n/locales/pt/components.json +17 -1
  30. package/src/i18n/locales/ru/components.json +17 -1
  31. package/src/i18n/locales/zh-Hans/components.json +17 -1
  32. package/src/i18n/locales/zh-Hant/components.json +17 -1
  33. package/src/index.ts +23 -0
  34. package/src/plugins/bootScriptsPlugin.ts +8 -4
  35. package/src/res/boot-chrome.js +27 -12
  36. package/src/res/bootChrome.test.ts +22 -0
  37. package/src/runtime/windowChrome.ts +16 -7
  38. package/src/utils/currency.test.ts +302 -0
  39. package/src/utils/currency.ts +421 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celestia-island/hikari",
3
- "version": "0.55.362",
3
+ "version": "0.55.364",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Hikari UI library, Vue 3 runtime — one design system for Vue 3 and Rust/WASM applications",
@@ -1,6 +1,10 @@
1
1
  import { computed, defineComponent, ref, type PropType } from "vue";
2
2
  import { HButton, useI18n } from "@celestia-island/hikari";
3
3
  import { solvePow, type PowChallenge, type PowSolution } from "../utils/pow";
4
+ // The component paints `.s-auth-submit` / `.s-auth-submit-error`; this stylesheet
5
+ // defines them. It existed but nothing imported it, so both classes shipped
6
+ // unstyled to every consumer.
7
+ import "./HkAuthSubmitButton.scss";
4
8
 
5
9
  export interface AuthSubmitContext {
6
10
  /** Solved PoW for the challenge the backend issued (if any). */
@@ -7,7 +7,12 @@ import HkMenu from "./HkMenu";
7
7
  import type { HkMenuItem } from "./HkMenu";
8
8
  import HkTooltip from "./HkTooltip";
9
9
  import { hasRenderedContent } from "../runtime/hasRenderedContent";
10
- import { useMediaQuery } from "../runtime/useMediaQuery";
10
+ import { releaseMediaQuery, useMediaQuery } from "../runtime/useMediaQuery";
11
+
12
+ /** The touch-first predicate, kept as ONE literal: use and release must
13
+ * name the same registry entry, or the release silently no-ops and the
14
+ * shared listener leaks. */
15
+ const TOUCH_FIRST_QUERY = "(hover: none), (pointer: coarse)";
11
16
  import type { StatTone } from "./HkStatCard";
12
17
  import { HK_SCROLL_PROGRESS_REGISTRAR, type HkScrollProgressHandle } from "./HkScrollProgressDock";
13
18
  import "./HkCardList.scss";
@@ -176,7 +181,11 @@ export const HkListRow = defineComponent({
176
181
  setup(props, { emit, slots }) {
177
182
  // Touch-first clients get the named menu (tooltips never fire there);
178
183
  // pointer clients get the inline icon lane whose names ride tooltips.
179
- const touchFirst = useMediaQuery("(hover: none), (pointer: coarse)");
184
+ // Paired with releaseMediaQuery in onBeforeUnmount (the composable's
185
+ // contract): the theme panel mounts/unmounts rows per theme add and
186
+ // remove, so an unpaired handle would pin the shared listener forever.
187
+ const touchFirst = useMediaQuery(TOUCH_FIRST_QUERY);
188
+ onBeforeUnmount(() => releaseMediaQuery(TOUCH_FIRST_QUERY));
180
189
  /** Touch-driven overlay reveal. Pointer devices reveal through CSS
181
190
  * :hover/:focus-within — the common path stays declarative. */
182
191
  const revealed = ref(false);
@@ -0,0 +1,250 @@
1
+ // AI-generated: developed with the DeepSeek Harness agent (model DeepSeek V4.1 Flash); human-directed.
2
+ @use "../tokens";
3
+
4
+ /* HkCurrencySelect — rich currency picker.
5
+ *
6
+ * The field chrome follows the house select (HkSelect): same caption
7
+ * treatment, same trigger box, same error line. The row/list/search styles
8
+ * are deliberately TOP-LEVEL: the panel content is teleported to the
9
+ * overlay root, so they can never be nested under `.hk-currency-select`
10
+ * (a descendant selector would stop matching the moment the surface opens).
11
+ */
12
+
13
+ .hk-currency-select {
14
+ display: block;
15
+ width: 100%;
16
+ }
17
+
18
+ .hk-currency-select-label {
19
+ display: block;
20
+ font-size: var(--text-xs);
21
+ font-weight: 600;
22
+ letter-spacing: 0.02em;
23
+ margin-bottom: var(--space-4);
24
+ color: rgb(var(--color-text) / var(--hk-field-label-alpha, 72%));
25
+ }
26
+
27
+ .hk-currency-select-required {
28
+ margin-inline-start: var(--space-2);
29
+ color: rgb(var(--color-error));
30
+ }
31
+
32
+ .hk-currency-select-trigger {
33
+ display: flex;
34
+ align-items: center;
35
+ gap: var(--space-8);
36
+ width: 100%;
37
+ padding-block: var(--space-8);
38
+ padding-inline: var(--space-12) var(--space-32);
39
+ min-height: var(--space-40);
40
+ background: color-mix(in srgb, rgb(var(--color-surface)) 55%, transparent);
41
+ border: 1px solid color-mix(in srgb, rgb(var(--color-text)) 14%, transparent);
42
+ border-radius: var(--radius-md);
43
+ font-family: inherit;
44
+ font-size: var(--text-base);
45
+ line-height: 1.5;
46
+ color: rgb(var(--color-text));
47
+ text-align: start;
48
+ cursor: pointer;
49
+ transition-property: background-color, border-color, box-shadow, opacity;
50
+ transition-duration: var(--duration-normal);
51
+ transition-timing-function: var(--ease-standard);
52
+
53
+ &:hover:not([data-disabled]) {
54
+ border-color: var(--c-primary-strong);
55
+ }
56
+
57
+ &:focus-visible {
58
+ outline: none;
59
+ border-color: rgb(var(--color-focused-border));
60
+ box-shadow: var(--shadow-focus);
61
+ }
62
+
63
+ &[data-state="open"] {
64
+ border-color: rgb(var(--color-focused-border));
65
+ box-shadow: var(--shadow-focus);
66
+ background: rgb(var(--color-surface));
67
+ }
68
+
69
+ &[data-disabled] {
70
+ opacity: 0.5;
71
+ cursor: not-allowed;
72
+ }
73
+ }
74
+
75
+ .hk-currency-select-trigger-error {
76
+ border-color: var(--c-error-strong);
77
+ }
78
+
79
+ .hk-currency-select-value {
80
+ display: flex;
81
+ align-items: center;
82
+ gap: var(--space-8);
83
+ flex: 1;
84
+ min-width: 0;
85
+ overflow: hidden;
86
+ }
87
+
88
+ .hk-currency-select-placeholder {
89
+ color: rgb(var(--color-muted) / 70%);
90
+ }
91
+
92
+ /* symbol + code + name, whether in the trigger or on a row */
93
+ .hk-currency-select-symbol {
94
+ display: inline-flex;
95
+ align-items: center;
96
+ justify-content: center;
97
+ min-width: 1.75rem;
98
+ padding-inline: var(--space-4);
99
+ border-radius: var(--radius-sm);
100
+ background: color-mix(in srgb, rgb(var(--color-text)) 7%, transparent);
101
+ font-size: var(--text-xs);
102
+ font-weight: 600;
103
+ font-variant-numeric: tabular-nums;
104
+ color: rgb(var(--color-text) / 78%);
105
+ flex-shrink: 0;
106
+ }
107
+
108
+ .hk-currency-select-code {
109
+ font-size: var(--text-sm);
110
+ font-weight: 600;
111
+ letter-spacing: 0.03em;
112
+ font-variant-numeric: tabular-nums;
113
+ flex-shrink: 0;
114
+ }
115
+
116
+ .hk-currency-select-name {
117
+ font-size: var(--text-sm);
118
+ color: rgb(var(--color-text) / 68%);
119
+ overflow: hidden;
120
+ text-overflow: ellipsis;
121
+ white-space: nowrap;
122
+ }
123
+
124
+ .hk-currency-select-arrow {
125
+ flex-shrink: 0;
126
+ color: rgb(var(--color-muted) / 80%);
127
+ transition: transform var(--duration-normal) var(--ease-standard);
128
+ }
129
+
130
+ .hk-currency-select-trigger[data-state="open"] .hk-currency-select-arrow {
131
+ transform: rotate(180deg);
132
+ }
133
+
134
+ .hk-currency-select-error {
135
+ margin-top: var(--space-4);
136
+ font-size: var(--text-xs);
137
+ color: rgb(var(--color-error));
138
+ }
139
+
140
+ /* ── opened surface content ──────────────────────────────────────── */
141
+
142
+ .hk-currency-select-panel {
143
+ display: flex;
144
+ flex-direction: column;
145
+ min-height: 0;
146
+ }
147
+
148
+ .hk-currency-select-search-row {
149
+ display: flex;
150
+ align-items: center;
151
+ gap: var(--space-8);
152
+ margin: var(--space-8);
153
+ padding: var(--space-8) var(--space-12);
154
+ border: 1px solid color-mix(in srgb, rgb(var(--color-text)) 12%, transparent);
155
+ border-radius: var(--radius-md);
156
+ background: rgb(var(--color-background) / 45%);
157
+ flex-shrink: 0;
158
+ }
159
+
160
+ .hk-currency-select-search-icon {
161
+ flex-shrink: 0;
162
+ color: rgb(var(--color-muted) / 75%);
163
+ }
164
+
165
+ .hk-currency-select-search {
166
+ flex: 1;
167
+ min-width: 0;
168
+ border: none;
169
+ background: transparent;
170
+ color: inherit;
171
+ font-family: inherit;
172
+ font-size: var(--text-sm);
173
+ line-height: 1.5;
174
+
175
+ &:focus,
176
+ &:focus-visible {
177
+ outline: none;
178
+ box-shadow: none;
179
+ }
180
+
181
+ &::placeholder {
182
+ color: rgb(var(--color-muted) / 55%);
183
+ }
184
+ }
185
+
186
+ .hk-currency-select-list {
187
+ display: flex;
188
+ flex-direction: column;
189
+ gap: var(--space-2);
190
+ padding-block: var(--space-4) var(--space-8);
191
+ padding-inline: var(--space-8);
192
+ min-height: 0;
193
+ /* NO overflow here: the panel surface owns the one scrollbar (desktop
194
+ * popout / mobile sheet list band, with the overlay bar attached). A
195
+ * nested scroller would paint a second, native bar inside the panel. */
196
+ }
197
+
198
+ .hk-currency-select-group {
199
+ display: flex;
200
+ flex-direction: column;
201
+ gap: var(--space-2);
202
+ }
203
+
204
+ .hk-currency-select-group-label {
205
+ padding-block: var(--space-4);
206
+ padding-inline: var(--space-8);
207
+ font-size: var(--text-xs);
208
+ font-weight: 600;
209
+ letter-spacing: 0.04em;
210
+ text-transform: uppercase;
211
+ color: rgb(var(--color-muted) / 75%);
212
+ }
213
+
214
+ .hk-currency-select-option {
215
+ display: flex;
216
+ align-items: center;
217
+ gap: var(--space-8);
218
+ padding: var(--space-8);
219
+ border-radius: var(--radius-md);
220
+ cursor: pointer;
221
+ color: rgb(var(--color-text));
222
+ transition-property: background-color, color;
223
+ transition-duration: var(--duration-fast);
224
+ transition-timing-function: var(--ease-standard);
225
+
226
+ &[data-highlighted] {
227
+ background: color-mix(in srgb, rgb(var(--color-text)) 8%, transparent);
228
+ }
229
+
230
+ &[data-checked] {
231
+ color: rgb(var(--color-primary));
232
+ }
233
+
234
+ &[data-checked] .hk-currency-select-name {
235
+ color: rgb(var(--color-text) / 78%);
236
+ }
237
+ }
238
+
239
+ .hk-currency-select-check {
240
+ margin-inline-start: auto;
241
+ flex-shrink: 0;
242
+ color: rgb(var(--color-primary));
243
+ }
244
+
245
+ .hk-currency-select-empty {
246
+ padding: var(--space-24) var(--space-16);
247
+ text-align: center;
248
+ font-size: var(--text-sm);
249
+ color: rgb(var(--color-muted) / 75%);
250
+ }