@celestia-island/hikari 0.43.13 → 0.43.15

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 (96) hide show
  1. package/package.json +1 -1
  2. package/src/components/HkAlert.scss +21 -21
  3. package/src/components/HkAltSignIn.scss +3 -3
  4. package/src/components/HkAuthMethodList.scss +2 -2
  5. package/src/components/HkAuthMethodList.test.tsx +24 -0
  6. package/src/components/HkAuthMethodList.tsx +8 -1
  7. package/src/components/HkAvatar.scss +1 -1
  8. package/src/components/HkBlockingToast.scss +6 -6
  9. package/src/components/HkBoard.scale.test.ts +136 -0
  10. package/src/components/HkBoard.tsx +27 -14
  11. package/src/components/HkCheckbox.scss +11 -11
  12. package/src/components/HkDatePicker.scss +12 -12
  13. package/src/components/HkDateTimePicker.scss +16 -16
  14. package/src/components/HkDivider.scss +3 -3
  15. package/src/components/HkDraggableGrid.scss +11 -11
  16. package/src/components/HkDraggableList.scss +6 -6
  17. package/src/components/HkDrawer.scss +24 -24
  18. package/src/components/HkDrawer.sheetfamily.test.ts +1 -1
  19. package/src/components/HkEmptyState.scss +6 -6
  20. package/src/components/HkFab.scss +12 -12
  21. package/src/components/HkFileField.scss +2 -2
  22. package/src/components/HkFilePickerField.scss +2 -2
  23. package/src/components/HkImagePreview.scss +8 -8
  24. package/src/components/HkImageViewer.tsx +37 -16
  25. package/src/components/HkImageViewerTouch.test.tsx +57 -0
  26. package/src/components/HkInput.scss +2 -2
  27. package/src/components/HkJsonTree.scss +2 -2
  28. package/src/components/HkKeywordSearchModal.scss +22 -22
  29. package/src/components/HkLabel.scss +3 -3
  30. package/src/components/HkListTransition.scss +23 -23
  31. package/src/components/HkLogo.scss +3 -3
  32. package/src/components/HkMarkdownRenderer.scss +9 -9
  33. package/src/components/HkMediaSlider.scss +1 -1
  34. package/src/components/HkMinimap.scale.test.ts +78 -0
  35. package/src/components/HkMinimap.scss +2 -2
  36. package/src/components/HkMinimap.tsx +16 -1
  37. package/src/components/HkModal.scss +14 -14
  38. package/src/components/HkModalBreadcrumb.scss +5 -5
  39. package/src/components/HkNavItem.scss +2 -2
  40. package/src/components/HkNumberInput.scss +3 -3
  41. package/src/components/HkPasswordInput.scss +29 -29
  42. package/src/components/HkPasswordInput.test.ts +48 -0
  43. package/src/components/HkPasswordInput.tsx +9 -1
  44. package/src/components/HkPhaseTransition.scss +5 -5
  45. package/src/components/HkPickerPane.scss +4 -4
  46. package/src/components/HkPopover.scss +2 -2
  47. package/src/components/HkProgressRing.scss +4 -4
  48. package/src/components/HkRadio.scss +4 -4
  49. package/src/components/HkRollingNumber.scss +1 -1
  50. package/src/components/HkScrollContainer.scss +5 -5
  51. package/src/components/HkScrollContainer.test.ts +48 -1
  52. package/src/components/HkScrollContainer.tsx +12 -1
  53. package/src/components/HkSearchInput.scss +3 -3
  54. package/src/components/HkSelect.scss +2 -2
  55. package/src/components/HkSelectionGrid.scss +20 -20
  56. package/src/components/HkSelectionWaterfall.scss +15 -15
  57. package/src/components/HkSidebar.scss +7 -7
  58. package/src/components/HkSkeleton.scss +8 -8
  59. package/src/components/HkSlider.scss +1 -1
  60. package/src/components/HkSplash.scss +3 -3
  61. package/src/components/HkStepFlow.scss +1 -1
  62. package/src/components/HkSwitch.scss +1 -1
  63. package/src/components/HkTable.scss +21 -21
  64. package/src/components/HkTag.scss +18 -18
  65. package/src/components/HkTextarea.scss +1 -1
  66. package/src/components/HkTimeline.scss +2 -2
  67. package/src/components/HkTitleBar.scss +2 -2
  68. package/src/components/HkToast.scss +15 -15
  69. package/src/components/HkTree.scss +16 -16
  70. package/src/components/HkWindowedItem.scale.test.ts +107 -0
  71. package/src/components/HkWindowedItem.tsx +9 -1
  72. package/src/components/window-close.scss +1 -1
  73. package/src/composables/layoutGeometry.test.ts +41 -0
  74. package/src/composables/layoutGeometry.ts +27 -0
  75. package/src/composables/useOverlayScrollbar.test.ts +33 -0
  76. package/src/composables/useOverlayScrollbar.ts +15 -1
  77. package/src/composables/useZoomPan.test.ts +90 -0
  78. package/src/composables/useZoomPan.ts +44 -19
  79. package/src/index.ts +16 -0
  80. package/src/scale.scss +76 -0
  81. package/src/styles/admin-tokens.scss +4 -37
  82. package/src/styles/index.scss +25 -11
  83. package/src/styles/theme/_glass.scss +1 -0
  84. package/src/styles/theme/_layout.scss +1 -0
  85. package/src/styles/theme/_scrollbar.scss +1 -0
  86. package/src/styles/theme/_tokens.scss +1 -0
  87. package/src/styles/theme/base.scss +1 -0
  88. package/src/styles/theme/channels.scss +23 -41
  89. package/src/styles/theme/foundation.scss +1 -0
  90. package/src/styles/theme/mixins.scss +1 -0
  91. package/src/styles/theme/scale.scss +78 -0
  92. package/src/styles/theme/themes.scss +1 -0
  93. package/src/styles/theme/variables.scss +1 -0
  94. package/src/styles/tokenInventory.test.ts +290 -0
  95. package/src/styles/vendoredSync.test.ts +91 -0
  96. package/src/tokens.scss +23 -41
@@ -59,8 +59,8 @@
59
59
  color: inherit;
60
60
  cursor: pointer;
61
61
  white-space: nowrap;
62
- border-radius: var(--hi-radius-sm, 4px);
63
- transition: background var(--hi-duration-fast, 0.15s) ease, color var(--hi-duration-fast, 0.15s) ease;
62
+ border-radius: var(--radius-sm, 4px);
63
+ transition: background var(--duration-fast, 0.15s) ease, color var(--duration-fast, 0.15s) ease;
64
64
 
65
65
  &:hover {
66
66
  background: var(--hi-color-surface);
@@ -80,13 +80,13 @@
80
80
  border: 0;
81
81
  width: 1.75rem;
82
82
  height: 1.75rem;
83
- border-radius: var(--hi-radius-sm, 4px);
83
+ border-radius: var(--radius-sm, 4px);
84
84
  color: var(--hi-color-muted);
85
85
  cursor: pointer;
86
86
  display: inline-flex;
87
87
  align-items: center;
88
88
  justify-content: center;
89
- transition: background var(--hi-duration-fast, 0.15s) ease, color var(--hi-duration-fast, 0.15s) ease;
89
+ transition: background var(--duration-fast, 0.15s) ease, color var(--duration-fast, 0.15s) ease;
90
90
 
91
91
  &:hover {
92
92
  background: var(--hi-color-surface);
@@ -122,7 +122,7 @@
122
122
  appearance: none;
123
123
  background: transparent;
124
124
  border: 0;
125
- border-radius: var(--hi-radius-sm, 4px);
125
+ border-radius: var(--radius-sm, 4px);
126
126
  /* Fixed height keeps the six-row day grid — and therefore the shared
127
127
  * stage height — independent of the picker width, so drilling between
128
128
  * views never changes the picker's size (enlarged on touch). */
@@ -134,7 +134,7 @@
134
134
  cursor: pointer;
135
135
  font-size: var(--text-xs, 0.75rem);
136
136
  font-variant-numeric: tabular-nums;
137
- transition: background var(--hi-duration-fast, 0.15s) ease, color var(--hi-duration-fast, 0.15s) ease;
137
+ transition: background var(--duration-fast, 0.15s) ease, color var(--duration-fast, 0.15s) ease;
138
138
 
139
139
  &:hover:not(:disabled):not(.is-selected) {
140
140
  background: var(--hi-color-surface);
@@ -232,8 +232,8 @@
232
232
  justify-content: center;
233
233
  color: var(--hi-color-muted);
234
234
  cursor: pointer;
235
- border-radius: var(--hi-radius-sm, 4px);
236
- transition: color var(--hi-duration-fast, 0.15s) ease, background var(--hi-duration-fast, 0.15s) ease;
235
+ border-radius: var(--radius-sm, 4px);
236
+ transition: color var(--duration-fast, 0.15s) ease, background var(--duration-fast, 0.15s) ease;
237
237
 
238
238
  &:hover {
239
239
  color: var(--hi-color-text-primary);
@@ -266,13 +266,13 @@
266
266
  appearance: none;
267
267
  background: transparent;
268
268
  border: 1px solid color-mix(in srgb, var(--hi-color-border) 18%, transparent);
269
- border-radius: var(--hi-radius-sm, 4px);
269
+ border-radius: var(--radius-sm, 4px);
270
270
  padding: var(--space-4, 4px) var(--space-10, 10px);
271
271
  font-size: var(--text-xs, 0.75rem);
272
272
  font-weight: 600;
273
273
  color: var(--hi-color-muted);
274
274
  cursor: pointer;
275
- transition: color var(--hi-duration-fast, 0.15s) ease, border-color var(--hi-duration-fast, 0.15s) ease;
275
+ transition: color var(--duration-fast, 0.15s) ease, border-color var(--duration-fast, 0.15s) ease;
276
276
 
277
277
  &:hover {
278
278
  color: var(--hi-color-text-primary);
@@ -300,12 +300,12 @@
300
300
  padding: var(--space-4, 4px) var(--space-10, 10px);
301
301
  background: var(--hi-color-surface);
302
302
  border: 1px solid color-mix(in srgb, var(--hi-color-border) 18%, transparent);
303
- border-radius: var(--hi-radius-sm, 4px);
303
+ border-radius: var(--radius-sm, 4px);
304
304
  color: color-mix(in srgb, var(--hi-color-text-secondary) 70%, transparent);
305
305
  font-size: var(--text-xs, 0.75rem);
306
306
  font-variant-numeric: tabular-nums;
307
307
  cursor: pointer;
308
- transition: border-color var(--hi-duration-fast, 0.15s) ease, color var(--hi-duration-fast, 0.15s) ease;
308
+ transition: border-color var(--duration-fast, 0.15s) ease, color var(--duration-fast, 0.15s) ease;
309
309
 
310
310
  &:hover,
311
311
  &[aria-expanded="true"] {
@@ -330,7 +330,7 @@
330
330
 
331
331
  .hk-dtp-trigger-chev {
332
332
  color: var(--hi-color-muted);
333
- transition: transform var(--hi-duration-fast, 0.15s) ease;
333
+ transition: transform var(--duration-fast, 0.15s) ease;
334
334
  }
335
335
 
336
336
  .hk-dtp-trigger-chev.is-open {
@@ -378,12 +378,12 @@
378
378
  background: var(--hi-color-primary);
379
379
  color: rgb(var(--color-on-solid-text, 255 255 255));
380
380
  border: 0;
381
- border-radius: var(--hi-radius-sm, 4px);
381
+ border-radius: var(--radius-sm, 4px);
382
382
  padding: var(--space-6, 6px) var(--space-14, 14px);
383
383
  font-size: var(--text-xs, 0.75rem);
384
384
  font-weight: 600;
385
385
  cursor: pointer;
386
- transition: filter var(--hi-duration-fast, 0.15s) ease;
386
+ transition: filter var(--duration-fast, 0.15s) ease;
387
387
 
388
388
  &:hover { filter: brightness(1.08); }
389
389
  &:focus-visible { outline: 2px solid color-mix(in srgb, var(--hi-color-primary) 55%, transparent); outline-offset: 2px; }
@@ -400,7 +400,7 @@
400
400
  padding: var(--space-8, 8px) var(--space-12, 12px);
401
401
  background: var(--hi-color-surface);
402
402
  border: 1px solid color-mix(in srgb, var(--hi-color-border) 18%, transparent);
403
- border-radius: var(--hi-radius-sm, 4px);
403
+ border-radius: var(--radius-sm, 4px);
404
404
  color: var(--hi-color-text-primary);
405
405
  font-family: inherit;
406
406
  font-size: var(--text-sm, 0.875rem);
@@ -1,5 +1,5 @@
1
1
  .hk-divider {
2
- --hk-divider-color: var(--hi-color-border, rgba(0, 0, 0, 0.12));
2
+ --hk-divider-color: var(--hi-color-border, rgba(100,100,100,0.12));
3
3
  flex-shrink: 0;
4
4
 
5
5
  width: 100%;
@@ -16,11 +16,11 @@
16
16
  }
17
17
 
18
18
  .hk-divider-faint {
19
- --hk-divider-color: var(--hi-color-border, rgba(0, 0, 0, 0.06));
19
+ --hk-divider-color: var(--hi-color-border, rgba(100,100,100,0.06));
20
20
  }
21
21
 
22
22
  .hk-divider-input {
23
- --hk-divider-color: var(--hi-color-border, rgba(0, 0, 0, 0.15));
23
+ --hk-divider-color: var(--hi-color-border, rgba(100,100,100,0.15));
24
24
  }
25
25
 
26
26
  .hk-divider-dashed.hk-divider-vertical {
@@ -12,9 +12,9 @@
12
12
 
13
13
  .hk-draggable-grid-row-phantom {
14
14
  min-height: 44px;
15
- border: 1px dashed var(--hi-color-primary, #58a6ff);
15
+ border: 1px dashed var(--hi-color-primary, #7aa2f7);
16
16
  border-radius: var(--radius-sm, 4px);
17
- background: rgb(from var(--hi-color-primary, #58a6ff) r g b / 0.04);
17
+ background: rgb(from var(--hi-color-primary, #7aa2f7) r g b / 0.04);
18
18
  }
19
19
 
20
20
  .hk-draggable-grid-cell {
@@ -26,7 +26,7 @@
26
26
  padding: var(--space-8, 0.5rem) var(--space-10, 0.625rem);
27
27
  border-radius: var(--radius-sm, 4px);
28
28
  background: var(--hi-color-bg-subtle, #21262d);
29
- border: 1px solid var(--hi-color-border, #30363d);
29
+ border: 1px solid var(--hi-color-border, #646464);
30
30
  transition:
31
31
  transform 150ms cubic-bezier(0.16, 1, 0.3, 1),
32
32
  opacity 150ms cubic-bezier(0.16, 1, 0.3, 1),
@@ -45,13 +45,13 @@
45
45
  opacity: 0.35;
46
46
  transform: scale(0.96);
47
47
  border-style: dashed;
48
- border-color: var(--hi-color-primary, #58a6ff);
49
- background: rgb(from var(--hi-color-primary, #58a6ff) r g b / 0.04);
48
+ border-color: var(--hi-color-primary, #7aa2f7);
49
+ background: rgb(from var(--hi-color-primary, #7aa2f7) r g b / 0.04);
50
50
  cursor: grabbing;
51
51
  }
52
52
 
53
53
  &[data-placeholder="before"] {
54
- box-shadow: inset 2px 0 0 0 var(--hi-color-primary, #58a6ff);
54
+ box-shadow: inset 2px 0 0 0 var(--hi-color-primary, #7aa2f7);
55
55
  }
56
56
 
57
57
  &[data-locked] {
@@ -61,30 +61,30 @@
61
61
  /* Locked cells never start a drag (tsx returns early) — no hover
62
62
  * affordance and no grab cursor on their surface. */
63
63
  &:hover {
64
- border-color: var(--hi-color-border, #30363d);
64
+ border-color: var(--hi-color-border, #646464);
65
65
  }
66
66
  }
67
67
 
68
68
  .hk-draggable-grid[data-dragging] & {
69
69
  &:hover {
70
- border-color: var(--hi-color-border, #30363d);
70
+ border-color: var(--hi-color-border, #646464);
71
71
  }
72
72
  }
73
73
  }
74
74
 
75
75
  .hk-draggable-grid-row[data-placeholder-row="after"] {
76
- box-shadow: inset -2px 0 0 0 var(--hi-color-primary, #58a6ff);
76
+ box-shadow: inset -2px 0 0 0 var(--hi-color-primary, #7aa2f7);
77
77
  }
78
78
 
79
79
  /* RTL flips the flex flow, so the before/after insertion markers must
80
80
  * swap physical sides to keep pointing at the inline edge (HkBreadcrumb
81
81
  * precedent for the [dir="rtl"] override form). */
82
82
  [dir="rtl"] .hk-draggable-grid-cell[data-placeholder="before"] {
83
- box-shadow: inset -2px 0 0 0 var(--hi-color-primary, #58a6ff);
83
+ box-shadow: inset -2px 0 0 0 var(--hi-color-primary, #7aa2f7);
84
84
  }
85
85
 
86
86
  [dir="rtl"] .hk-draggable-grid-row[data-placeholder-row="after"] {
87
- box-shadow: inset 2px 0 0 0 var(--hi-color-primary, #58a6ff);
87
+ box-shadow: inset 2px 0 0 0 var(--hi-color-primary, #7aa2f7);
88
88
  }
89
89
 
90
90
  .hk-draggable-grid-cell-placeholder-target {
@@ -12,7 +12,7 @@
12
12
  padding: var(--space-8, 0.5rem) var(--space-10, 0.625rem);
13
13
  border-radius: var(--radius-sm, 4px);
14
14
  background: var(--hi-color-bg-subtle, #21262d);
15
- border: 1px solid var(--hi-color-border, #30363d);
15
+ border: 1px solid var(--hi-color-border, #646464);
16
16
  transition:
17
17
  transform 150ms cubic-bezier(0.16, 1, 0.3, 1),
18
18
  opacity 150ms cubic-bezier(0.16, 1, 0.3, 1),
@@ -29,16 +29,16 @@
29
29
  opacity: 0.35;
30
30
  transform: scale(0.96);
31
31
  border-style: dashed;
32
- border-color: var(--hi-color-primary, #58a6ff);
33
- background: rgb(from var(--hi-color-primary, #58a6ff) r g b / 0.04);
32
+ border-color: var(--hi-color-primary, #7aa2f7);
33
+ background: rgb(from var(--hi-color-primary, #7aa2f7) r g b / 0.04);
34
34
  cursor: grabbing;
35
35
  }
36
36
 
37
37
  &[data-placeholder="before"] {
38
- box-shadow: inset 0 2px 0 0 var(--hi-color-primary, #58a6ff);
38
+ box-shadow: inset 0 2px 0 0 var(--hi-color-primary, #7aa2f7);
39
39
  }
40
40
  &[data-placeholder="after"] {
41
- box-shadow: inset 0 -2px 0 0 var(--hi-color-primary, #58a6ff);
41
+ box-shadow: inset 0 -2px 0 0 var(--hi-color-primary, #7aa2f7);
42
42
  }
43
43
 
44
44
  &[data-locked] {
@@ -47,7 +47,7 @@
47
47
 
48
48
  .hk-draggable-list[data-dragging] & {
49
49
  &:hover {
50
- border-color: var(--hi-color-border, #30363d);
50
+ border-color: var(--hi-color-border, #646464);
51
51
  }
52
52
  }
53
53
  }
@@ -11,55 +11,55 @@
11
11
  // contract (./_scrim-fade.scss); the panel below owns all the motion.
12
12
  @include sf.scrim-fade(
13
13
  "hk-drawer-overlay",
14
- $enter-duration: var(--hi-duration-normal, 0.3s),
15
- $enter-ease: var(--hi-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
16
- $leave-duration: var(--hi-duration-normal, 0.3s),
17
- $leave-ease: var(--hi-ease-in, cubic-bezier(0.4, 0, 1, 1))
14
+ $enter-duration: var(--duration-normal, 0.3s),
15
+ $enter-ease: var(--ease-elastic, cubic-bezier(0.16, 1, 0.3, 1)),
16
+ $leave-duration: var(--duration-normal, 0.3s),
17
+ $leave-ease: var(--ease-in, cubic-bezier(0.4, 0, 1, 1))
18
18
  );
19
19
 
20
20
  .hk-drawer-panel {
21
21
  position: fixed;
22
22
  display: flex;
23
23
  flex-direction: column;
24
- background: var(--hk-drawer-bg, var(--hi-color-surface, rgba(255, 255, 255, 0.95)));
24
+ background: var(--hk-drawer-bg, var(--hi-color-surface, rgba(240,244,248,0.95)));
25
25
  backdrop-filter: blur(12px);
26
26
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
27
27
  outline: none;
28
28
  transition:
29
- width var(--hi-duration-normal, 0.3s) ease,
30
- height var(--hi-duration-normal, 0.3s) ease;
29
+ width var(--duration-normal, 0.3s) ease,
30
+ height var(--duration-normal, 0.3s) ease;
31
31
  }
32
32
 
33
33
  .hk-drawer-left {
34
34
  top: 0;
35
35
  bottom: 0;
36
36
  left: 0;
37
- border-right: 1px solid var(--hi-color-border, rgba(0, 0, 0, 0.08));
38
- border-radius: 0 var(--hi-radius-md, 0.5rem) var(--hi-radius-md, 0.5rem) 0;
37
+ border-right: 1px solid var(--hi-color-border, rgba(100,100,100,0.08));
38
+ border-radius: 0 var(--radius-md, 0.5rem) var(--radius-md, 0.5rem) 0;
39
39
  }
40
40
 
41
41
  .hk-drawer-right {
42
42
  top: 0;
43
43
  bottom: 0;
44
44
  right: 0;
45
- border-left: 1px solid var(--hi-color-border, rgba(0, 0, 0, 0.08));
46
- border-radius: var(--hi-radius-md, 0.5rem) 0 0 var(--hi-radius-md, 0.5rem);
45
+ border-left: 1px solid var(--hi-color-border, rgba(100,100,100,0.08));
46
+ border-radius: var(--radius-md, 0.5rem) 0 0 var(--radius-md, 0.5rem);
47
47
  }
48
48
 
49
49
  .hk-drawer-top {
50
50
  top: 0;
51
51
  left: 0;
52
52
  right: 0;
53
- border-bottom: 1px solid var(--hi-color-border, rgba(0, 0, 0, 0.08));
54
- border-radius: 0 0 var(--hi-radius-md, 0.5rem) var(--hi-radius-md, 0.5rem);
53
+ border-bottom: 1px solid var(--hi-color-border, rgba(100,100,100,0.08));
54
+ border-radius: 0 0 var(--radius-md, 0.5rem) var(--radius-md, 0.5rem);
55
55
  }
56
56
 
57
57
  .hk-drawer-bottom {
58
58
  bottom: 0;
59
59
  left: 0;
60
60
  right: 0;
61
- border-top: 1px solid var(--hi-color-border, rgba(0, 0, 0, 0.08));
62
- border-radius: var(--hi-radius-md, 0.5rem) var(--hi-radius-md, 0.5rem) 0 0;
61
+ border-top: 1px solid var(--hi-color-border, rgba(100,100,100,0.08));
62
+ border-radius: var(--radius-md, 0.5rem) var(--radius-md, 0.5rem) 0 0;
63
63
  }
64
64
 
65
65
  .hk-drawer-left-enter-active,
@@ -71,8 +71,8 @@
71
71
  that briefly opens a gap between the panel edge and the screen
72
72
  edge. Both properties use the same plain ease-out. */
73
73
  transition:
74
- opacity var(--hi-duration-normal, 0.3s) cubic-bezier(0.16, 1, 0.3, 1),
75
- transform var(--hi-duration-normal, 0.3s) cubic-bezier(0.16, 1, 0.3, 1);
74
+ opacity var(--duration-normal, 0.3s) cubic-bezier(0.16, 1, 0.3, 1),
75
+ transform var(--duration-normal, 0.3s) cubic-bezier(0.16, 1, 0.3, 1);
76
76
  }
77
77
 
78
78
  .hk-drawer-left-leave-active,
@@ -80,8 +80,8 @@
80
80
  .hk-drawer-top-leave-active,
81
81
  .hk-drawer-bottom-leave-active {
82
82
  transition:
83
- opacity var(--hi-duration-normal, 0.3s) cubic-bezier(0.4, 0, 1, 1),
84
- transform var(--hi-duration-normal, 0.3s) cubic-bezier(0.4, 0, 1, 1);
83
+ opacity var(--duration-normal, 0.3s) cubic-bezier(0.4, 0, 1, 1),
84
+ transform var(--duration-normal, 0.3s) cubic-bezier(0.4, 0, 1, 1);
85
85
  }
86
86
 
87
87
  .hk-drawer-left-enter-from,
@@ -113,14 +113,14 @@
113
113
  align-items: center;
114
114
  justify-content: space-between;
115
115
  padding: var(--space-12, 0.75rem) var(--space-16, 1rem);
116
- border-bottom: 1px solid var(--hi-color-border, rgba(0, 0, 0, 0.06));
116
+ border-bottom: 1px solid var(--hi-color-border, rgba(100,100,100,0.06));
117
117
  flex-shrink: 0;
118
118
  }
119
119
 
120
120
  .hk-drawer-title {
121
121
  font-size: var(--text-base, 0.875rem);
122
122
  font-weight: 700;
123
- color: var(--hi-color-text-primary, #333);
123
+ color: var(--hi-color-text-primary, #1e1e1e);
124
124
  }
125
125
 
126
126
  // Legacy placement hook — the chrome lives on the shared .hk-icon-button
@@ -162,7 +162,7 @@
162
162
  /* HkMenuPanel carries its own inset; zero this variable when the
163
163
  footer hosts one so both edges align. */
164
164
  padding: var(--hk-drawer-footer-padding, var(--space-12, 0.75rem) var(--space-16, 1rem));
165
- border-top: 1px solid var(--hi-color-border, rgba(0, 0, 0, 0.06));
165
+ border-top: 1px solid var(--hi-color-border, rgba(100,100,100,0.06));
166
166
  flex-shrink: 0;
167
167
  }
168
168
 
@@ -180,8 +180,8 @@
180
180
  @media (max-width: 767px) {
181
181
  .hk-drawer-bottom {
182
182
  bottom: var(--hk-sheet-bottom-gap, 0px);
183
- border-radius: var(--hk-modal-radius, var(--hi-radius-lg, 12px))
184
- var(--hk-modal-radius, var(--hi-radius-lg, 12px))
183
+ border-radius: var(--hk-modal-radius, var(--radius-lg, 12px))
184
+ var(--hk-modal-radius, var(--radius-lg, 12px))
185
185
  0 0;
186
186
  // The inline maxHeight from the `size` prop must lose to the family cap
187
187
  // (plain-vh fallback first for dvh-less engines, then dvh) — same
@@ -60,7 +60,7 @@ describe("HkDrawer mobile bottom sheet-family contract", () => {
60
60
  });
61
61
 
62
62
  it("adopts the 12px family corner radius", () => {
63
- expect(drawer).toContain("border-radius: var(--hk-modal-radius, var(--hi-radius-lg, 12px))");
63
+ expect(drawer).toContain("border-radius: var(--hk-modal-radius, var(--radius-lg, 12px))");
64
64
  });
65
65
 
66
66
  it("stacks the home-bar safe area on the mobile footer's BOTTOM axis", () => {
@@ -5,10 +5,10 @@
5
5
  justify-content: center;
6
6
  padding: var(--space-48, 3rem) var(--space-16, 1rem);
7
7
  text-align: center;
8
- background: var(--hk-empty-bg, var(--hi-color-surface, rgba(255, 255, 255, 0.95)));
8
+ background: var(--hk-empty-bg, var(--hi-color-surface, rgba(240,244,248,0.95)));
9
9
  backdrop-filter: blur(var(--blur-sm, 8px));
10
- border: 1px solid var(--hi-color-border, rgba(0, 0, 0, 0.06));
11
- border-radius: var(--hi-radius-md, 0.5rem);
10
+ border: 1px solid var(--hi-color-border, rgba(100,100,100,0.06));
11
+ border-radius: var(--radius-md, 0.5rem);
12
12
  box-sizing: border-box;
13
13
  }
14
14
 
@@ -16,7 +16,7 @@
16
16
  width: var(--space-48, 3rem);
17
17
  height: var(--space-48, 3rem);
18
18
  margin-bottom: var(--space-12, 0.75rem);
19
- color: var(--hi-color-text-secondary, #666);
19
+ color: var(--hi-color-text-secondary, #666666);
20
20
  opacity: 0.5;
21
21
  display: flex;
22
22
  align-items: center;
@@ -26,13 +26,13 @@
26
26
  .hk-empty-title {
27
27
  font-size: var(--text-base, 0.875rem);
28
28
  font-weight: 600;
29
- color: var(--hi-color-text-primary, #333);
29
+ color: var(--hi-color-text-primary, #1e1e1e);
30
30
  margin: 0 0 var(--space-8, 0.5rem);
31
31
  }
32
32
 
33
33
  .hk-empty-desc {
34
34
  font-size: var(--text-sm, 0.8125rem);
35
- color: var(--hi-color-text-secondary, #666);
35
+ color: var(--hi-color-text-secondary, #666666);
36
36
  margin: 0 0 var(--space-16, 1rem);
37
37
  max-width: 24rem;
38
38
  line-height: 1.5;
@@ -51,10 +51,10 @@
51
51
  -webkit-appearance: none;
52
52
  padding: 0;
53
53
  border: none;
54
- border-radius: var(--hi-radius-full, 9999px);
54
+ border-radius: var(--radius-full, 9999px);
55
55
  cursor: pointer;
56
56
  font-family: inherit;
57
- transition: transform var(--hi-duration-fast, 0.15s) ease, box-shadow var(--hi-duration-fast, 0.15s) ease;
57
+ transition: transform var(--duration-fast, 0.15s) ease, box-shadow var(--duration-fast, 0.15s) ease;
58
58
 
59
59
  &:active:not(:disabled) { transform: scale(0.94); }
60
60
  &:focus-visible { outline: 2px solid var(--hi-color-primary, #7aa2f7); outline-offset: 2px; }
@@ -84,13 +84,13 @@ $sizes: (sm: 34px, md: 42px, lg: 50px);
84
84
  }
85
85
 
86
86
  .hk-fab[data-variant="glass"] .hk-fab-button {
87
- color: var(--hi-color-text-secondary, #555);
88
- background: color-mix(in srgb, var(--hi-color-surface, #fff) 78%, transparent);
89
- border: 1px solid color-mix(in srgb, var(--hi-color-border, rgba(0, 0, 0, 0.12)) 25%, transparent);
87
+ color: var(--hi-color-text-secondary, #666666);
88
+ background: color-mix(in srgb, var(--hi-color-surface, #f0f4f8) 78%, transparent);
89
+ border: 1px solid color-mix(in srgb, var(--hi-color-border, rgba(100,100,100,0.12)) 25%, transparent);
90
90
  backdrop-filter: blur(var(--blur-xs, 4px)); // chip language shared with autotag pills
91
91
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
92
92
 
93
- &:hover:not(:disabled) { background: color-mix(in srgb, var(--hi-color-surface, #fff) 92%, transparent); }
93
+ &:hover:not(:disabled) { background: color-mix(in srgb, var(--hi-color-surface, #f0f4f8) 92%, transparent); }
94
94
  }
95
95
 
96
96
  .hk-fab[data-variant="primary"] .hk-fab-button {
@@ -129,16 +129,16 @@ $sizes: (sm: 34px, md: 42px, lg: 50px);
129
129
  font-size: 0.6875rem;
130
130
  letter-spacing: 0.02em;
131
131
  white-space: nowrap;
132
- color: var(--hi-color-text-secondary, #555);
133
- background: color-mix(in srgb, var(--hi-color-surface, #fff) 82%, transparent);
134
- border: 1px solid color-mix(in srgb, var(--hi-color-border, rgba(0, 0, 0, 0.12)) 25%, transparent);
135
- border-radius: var(--hi-radius-full, 9999px);
132
+ color: var(--hi-color-text-secondary, #666666);
133
+ background: color-mix(in srgb, var(--hi-color-surface, #f0f4f8) 82%, transparent);
134
+ border: 1px solid color-mix(in srgb, var(--hi-color-border, rgba(100,100,100,0.12)) 25%, transparent);
135
+ border-radius: var(--radius-full, 9999px);
136
136
  cursor: pointer;
137
137
  backdrop-filter: blur(var(--blur-xs, 4px));
138
138
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
139
139
  opacity: 0;
140
140
  transform: scale(0.4);
141
- transition: opacity var(--hi-duration-fast, 0.15s) ease, transform var(--hi-duration-fast, 0.15s) ease;
141
+ transition: opacity var(--duration-fast, 0.15s) ease, transform var(--duration-fast, 0.15s) ease;
142
142
 
143
143
  .hk-fab-mini-icon {
144
144
  display: inline-flex;
@@ -149,7 +149,7 @@ $sizes: (sm: 34px, md: 42px, lg: 50px);
149
149
  &:focus-visible { outline: 2px solid var(--hi-color-primary, #7aa2f7); outline-offset: 1px; }
150
150
  &:disabled { opacity: 0.35; cursor: not-allowed; }
151
151
  // 82%→94% mirrors the main glass hover ladder (78%→92%).
152
- &:hover:not(:disabled) { background: color-mix(in srgb, var(--hi-color-surface, #fff) 94%, transparent); }
152
+ &:hover:not(:disabled) { background: color-mix(in srgb, var(--hi-color-surface, #f0f4f8) 94%, transparent); }
153
153
  }
154
154
 
155
155
  // Staggered reveal while expanded (CSS only, via nth-child delay).
@@ -69,7 +69,7 @@
69
69
  }
70
70
 
71
71
  &:focus-visible {
72
- outline: 2px solid var(--hi-color-primary, #58a6ff);
72
+ outline: 2px solid var(--hi-color-primary, #7aa2f7);
73
73
  outline-offset: 2px;
74
74
  border-radius: var(--radius-xs, 2px);
75
75
  }
@@ -117,7 +117,7 @@
117
117
  }
118
118
 
119
119
  &:focus-visible {
120
- outline: 2px solid var(--hi-color-primary, #58a6ff);
120
+ outline: 2px solid var(--hi-color-primary, #7aa2f7);
121
121
  outline-offset: 1px;
122
122
  }
123
123
  }
@@ -54,8 +54,8 @@
54
54
  width: 1.75rem;
55
55
  height: 1.75rem;
56
56
  border-radius: var(--radius-xs, 2px);
57
- background: color-mix(in srgb, var(--hi-color-primary, #58a6ff) 14%, transparent);
58
- color: var(--hi-color-primary, #58a6ff);
57
+ background: color-mix(in srgb, var(--hi-color-primary, #7aa2f7) 14%, transparent);
58
+ color: var(--hi-color-primary, #7aa2f7);
59
59
  pointer-events: none;
60
60
  }
61
61
 
@@ -9,7 +9,7 @@
9
9
  width: 100%;
10
10
  overflow: hidden;
11
11
  background: var(--hi-color-gray-100, rgba(0, 0, 0, 0.04));
12
- border: 1px solid var(--hi-color-border, rgba(0, 0, 0, 0.08));
12
+ border: 1px solid var(--hi-color-border, rgba(100,100,100,0.08));
13
13
  border-radius: var(--radius-md, 8px);
14
14
  }
15
15
 
@@ -19,10 +19,10 @@
19
19
  transition: border-color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
20
20
 
21
21
  &:hover {
22
- border-color: var(--hi-color-primary, #58a6ff);
22
+ border-color: var(--hi-color-primary, #7aa2f7);
23
23
  // Emphasis drawn INSIDE the border box (HkSelectionGrid precedent):
24
24
  // outer spread rings get shaved per-side by overlapping chrome.
25
- box-shadow: inset 0 0 0 1px var(--hi-color-primary, #58a6ff);
25
+ box-shadow: inset 0 0 0 1px var(--hi-color-primary, #7aa2f7);
26
26
  }
27
27
 
28
28
  // Press feedback matching the house button pattern (HkButton variants,
@@ -32,7 +32,7 @@
32
32
  }
33
33
 
34
34
  &:focus-visible {
35
- outline: 2px solid var(--hi-color-primary, #58a6ff);
35
+ outline: 2px solid var(--hi-color-primary, #7aa2f7);
36
36
  outline-offset: 2px;
37
37
  }
38
38
  }
@@ -65,9 +65,9 @@
65
65
  justify-content: center;
66
66
  background: linear-gradient(
67
67
  90deg,
68
- color-mix(in srgb, var(--hi-color-primary, #58a6ff) 8%, transparent) 25%,
69
- color-mix(in srgb, var(--hi-color-primary, #58a6ff) 18%, transparent) 50%,
70
- color-mix(in srgb, var(--hi-color-primary, #58a6ff) 8%, transparent) 75%
68
+ color-mix(in srgb, var(--hi-color-primary, #7aa2f7) 8%, transparent) 25%,
69
+ color-mix(in srgb, var(--hi-color-primary, #7aa2f7) 18%, transparent) 50%,
70
+ color-mix(in srgb, var(--hi-color-primary, #7aa2f7) 8%, transparent) 75%
71
71
  );
72
72
  background-size: 200% 100%;
73
73
  animation: hk-image-preview-shimmer 1.5s ease-in-out infinite;
@@ -95,7 +95,7 @@
95
95
  justify-content: center;
96
96
  gap: var(--space-8, 0.5rem);
97
97
  padding: var(--space-12, 0.75rem);
98
- color: var(--hi-color-muted, #666);
98
+ color: var(--hi-color-muted, #6c6c6c);
99
99
  text-align: center;
100
100
  }
101
101
 
@@ -2,6 +2,7 @@ import { computed, defineComponent, onBeforeUnmount, onMounted, ref, watch } fro
2
2
 
3
3
  import HSpinner from "./HkSpinner";
4
4
  import HMinimap from "./HkMinimap";
5
+ import { drawnScale } from "../composables/layoutGeometry";
5
6
  import "./HkImageViewer.scss";
6
7
 
7
8
  /**
@@ -57,6 +58,29 @@ export default defineComponent({
57
58
  return c ? { cw: c.clientWidth, ch: c.clientHeight } : { cw: 0, ch: 0 };
58
59
  }
59
60
 
61
+ /** How many of the container's own pixels one DRAWN pixel is worth.
62
+ * The camera (`panX`/`panY`/`zoom`) lives in the container's local CSS
63
+ * pixels while the pointer arrives in drawn ones, and a scaled or zoomed
64
+ * root makes the two differ — feeding a drawn delta straight into the
65
+ * camera moves the image `k` times as far as the finger went. */
66
+ function pxScale() {
67
+ const el = containerRef.value;
68
+ if (!el) return 1;
69
+ const scale = drawnScale(el);
70
+ const factor = el.offsetWidth > 0 ? scale.x : el.offsetHeight > 0 ? scale.y : 1;
71
+ return factor > 0 ? factor : 1;
72
+ }
73
+
74
+ /** A pointer position inside the container, in the container's own
75
+ * pixels (the space every anchor and the camera are written in). */
76
+ function localPoint(e: { clientX: number; clientY: number }) {
77
+ const el = containerRef.value;
78
+ if (!el) return { x: 0, y: 0 };
79
+ const rect = el.getBoundingClientRect();
80
+ const factor = pxScale();
81
+ return { x: (e.clientX - rect.left) / factor, y: (e.clientY - rect.top) / factor };
82
+ }
83
+
60
84
  function recomputeFit() {
61
85
  const { cw, ch } = dims();
62
86
  if (!imgW.value || !imgH.value || !cw || !ch) return;
@@ -115,11 +139,9 @@ export default defineComponent({
115
139
  e.preventDefault();
116
140
  const el = containerRef.value;
117
141
  if (!el) return;
118
- const rect = el.getBoundingClientRect();
119
- const cx = e.clientX - rect.left;
120
- const cy = e.clientY - rect.top;
142
+ const at = localPoint(e);
121
143
  const factor = e.deltaY < 0 ? 1.15 : 1 / 1.15;
122
- setZoom(zoom.value * factor, cx, cy);
144
+ setZoom(zoom.value * factor, at.x, at.y);
123
145
  }
124
146
 
125
147
  /** Euclidean distance between two pointer positions. */
@@ -172,19 +194,19 @@ export default defineComponent({
172
194
  if (!pair || !el) return;
173
195
  // Anchor the zoom at the fingers' midpoint (container-local
174
196
  // coordinates, same space as the wheel/dblclick anchors).
175
- const rect = el.getBoundingClientRect();
176
197
  const dist = Math.max(pointerDist(pair[0], pair[1]), 1);
177
- setZoom(
178
- pinchStartZoom * (dist / pinchStartDist),
179
- (pair[0].x + pair[1].x) / 2 - rect.left,
180
- (pair[0].y + pair[1].y) / 2 - rect.top,
181
- );
198
+ const mid = localPoint({
199
+ clientX: (pair[0].x + pair[1].x) / 2,
200
+ clientY: (pair[0].y + pair[1].y) / 2,
201
+ });
202
+ setZoom(pinchStartZoom * (dist / pinchStartDist), mid.x, mid.y);
182
203
  return;
183
204
  }
184
205
 
185
206
  if (!dragging.value) return;
186
- const dx = e.clientX - lastPt.value.x;
187
- const dy = e.clientY - lastPt.value.y;
207
+ const factor = pxScale();
208
+ const dx = (e.clientX - lastPt.value.x) / factor;
209
+ const dy = (e.clientY - lastPt.value.y) / factor;
188
210
  lastPt.value = { x: e.clientX, y: e.clientY };
189
211
  panX.value += dx;
190
212
  panY.value += dy;
@@ -235,12 +257,11 @@ export default defineComponent({
235
257
  if (!loaded.value) return;
236
258
  const el = containerRef.value;
237
259
  if (!el) return;
238
- const rect = el.getBoundingClientRect();
239
- const cx = e.clientX - rect.left;
240
- const cy = e.clientY - rect.top;
241
- setZoom(isZoomed.value ? fit.value : Math.min(MAX_ZOOM, fit.value * 3), cx, cy);
260
+ const at = localPoint(e);
261
+ setZoom(isZoomed.value ? fit.value : Math.min(MAX_ZOOM, fit.value * 3), at.x, at.y);
242
262
  }
243
263
 
264
+ /** Panned by another surface (the minimap), in this camera's own units. */
244
265
  function onPanDelta(dx: number, dy: number) {
245
266
  panX.value += dx;
246
267
  panY.value += dy;