@buoy-gg/shared-ui 7.0.26 → 7.0.27

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 (209) hide show
  1. package/lib/commonjs/JsModal.js +156 -20
  2. package/lib/commonjs/JsModal.web.js +85 -39
  3. package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +14 -4
  4. package/lib/commonjs/dataViewer/diffThemes.js +20 -18
  5. package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +8 -8
  6. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  7. package/lib/commonjs/icons/lucide-icons.js +74 -15
  8. package/lib/commonjs/index.js +86 -0
  9. package/lib/commonjs/ui/backgrounds/BackgroundSwitcher.js +248 -74
  10. package/lib/commonjs/ui/backgrounds/README.md +102 -20
  11. package/lib/commonjs/ui/backgrounds/backgroundStore.js +20 -6
  12. package/lib/commonjs/ui/backgrounds/index.js +91 -1
  13. package/lib/commonjs/ui/backgrounds/primitives.js +50 -14
  14. package/lib/commonjs/ui/backgrounds/registry.js +41 -64
  15. package/lib/commonjs/ui/backgrounds/rng.js +21 -0
  16. package/lib/commonjs/ui/backgrounds/skyClock.js +45 -0
  17. package/lib/commonjs/ui/backgrounds/variants/daylight.js +453 -0
  18. package/lib/commonjs/ui/backgrounds/variants/deepField.js +60 -30
  19. package/lib/commonjs/ui/backgrounds/variants/hyperspace.js +218 -0
  20. package/lib/commonjs/ui/backgrounds/variants/liveSky.js +898 -0
  21. package/lib/commonjs/ui/backgrounds/variants/meteors.js +257 -0
  22. package/lib/commonjs/ui/backgrounds/variants/moonlight.js +472 -0
  23. package/lib/commonjs/ui/backgrounds/variants/underwater.js +757 -0
  24. package/lib/commonjs/ui/components/Badge.js +11 -10
  25. package/lib/commonjs/ui/components/CompactRow.js +30 -17
  26. package/lib/commonjs/ui/components/DevToolsCard.js +12 -8
  27. package/lib/commonjs/ui/components/DynamicFilterView.js +43 -41
  28. package/lib/commonjs/ui/components/EventStepperFooter.js +38 -10
  29. package/lib/commonjs/ui/components/FilterComponents.js +11 -11
  30. package/lib/commonjs/ui/components/ModalHeader.js +13 -13
  31. package/lib/commonjs/ui/components/SectionHeader.js +3 -1
  32. package/lib/commonjs/ui/components/StorageTypeBadge.js +3 -2
  33. package/lib/commonjs/ui/components/TabSelector.js +56 -38
  34. package/lib/commonjs/ui/components/ValueTypeBadge.js +7 -6
  35. package/lib/commonjs/ui/components/WindowControls.js +37 -10
  36. package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +8 -0
  37. package/lib/commonjs/ui/night/nightTheme.js +120 -0
  38. package/lib/commonjs/ui/night/primitives.js +498 -0
  39. package/lib/module/JsModal.js +156 -20
  40. package/lib/module/JsModal.web.js +83 -39
  41. package/lib/module/dataViewer/VirtualizedDataExplorer.js +14 -4
  42. package/lib/module/dataViewer/diffThemes.js +20 -18
  43. package/lib/module/dataViewer/tree/TreeDiffViewer.js +9 -9
  44. package/lib/module/hooks/safe-area-impl.js +1 -1
  45. package/lib/module/icons/lucide-icons.js +74 -15
  46. package/lib/module/index.js +4 -0
  47. package/lib/module/ui/backgrounds/BackgroundSwitcher.js +250 -76
  48. package/lib/module/ui/backgrounds/README.md +102 -20
  49. package/lib/module/ui/backgrounds/backgroundStore.js +19 -5
  50. package/lib/module/ui/backgrounds/index.js +11 -2
  51. package/lib/module/ui/backgrounds/primitives.js +53 -16
  52. package/lib/module/ui/backgrounds/registry.js +41 -64
  53. package/lib/module/ui/backgrounds/rng.js +20 -0
  54. package/lib/module/ui/backgrounds/skyClock.js +39 -0
  55. package/lib/module/ui/backgrounds/variants/daylight.js +449 -0
  56. package/lib/module/ui/backgrounds/variants/deepField.js +62 -31
  57. package/lib/module/ui/backgrounds/variants/hyperspace.js +214 -0
  58. package/lib/module/ui/backgrounds/variants/liveSky.js +893 -0
  59. package/lib/module/ui/backgrounds/variants/meteors.js +253 -0
  60. package/lib/module/ui/backgrounds/variants/moonlight.js +468 -0
  61. package/lib/module/ui/backgrounds/variants/underwater.js +753 -0
  62. package/lib/module/ui/components/Badge.js +11 -10
  63. package/lib/module/ui/components/CompactRow.js +30 -17
  64. package/lib/module/ui/components/DevToolsCard.js +12 -8
  65. package/lib/module/ui/components/DynamicFilterView.js +43 -41
  66. package/lib/module/ui/components/EventStepperFooter.js +38 -10
  67. package/lib/module/ui/components/FilterComponents.js +11 -11
  68. package/lib/module/ui/components/ModalHeader.js +13 -13
  69. package/lib/module/ui/components/SectionHeader.js +3 -1
  70. package/lib/module/ui/components/StorageTypeBadge.js +3 -2
  71. package/lib/module/ui/components/TabSelector.js +57 -39
  72. package/lib/module/ui/components/ValueTypeBadge.js +7 -6
  73. package/lib/module/ui/components/WindowControls.js +37 -10
  74. package/lib/module/ui/gameUI/constants/gameUIColors.js +8 -0
  75. package/lib/module/ui/night/nightTheme.js +116 -0
  76. package/lib/module/ui/night/primitives.js +485 -0
  77. package/lib/typescript/commonjs/JsModal.d.ts +18 -0
  78. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/JsModal.web.d.ts +13 -0
  80. package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts +3 -1
  83. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  86. package/lib/typescript/commonjs/icons/lucide-icons.d.ts +12 -1
  87. package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/index.d.ts +3 -0
  89. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
  91. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
  92. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts +3 -0
  93. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +1 -1
  94. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +7 -1
  95. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts +18 -3
  97. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts +8 -0
  99. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts +6 -0
  101. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts +17 -0
  103. package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +1 -1
  105. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts +30 -0
  107. package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts.map +1 -0
  108. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts +19 -4
  109. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +1 -1
  110. package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts +39 -0
  111. package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
  112. package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts +41 -0
  113. package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
  114. package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts +26 -0
  115. package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts.map +1 -0
  116. package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts +35 -0
  117. package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts +51 -0
  119. package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/ui/components/Badge.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts +2 -0
  124. package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/ui/components/TabSelector.d.ts +9 -0
  127. package/lib/typescript/commonjs/ui/components/TabSelector.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/ui/components/WindowControls.d.ts +4 -2
  130. package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +8 -0
  132. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts +113 -0
  134. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/ui/night/primitives.d.ts +111 -0
  136. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -0
  137. package/lib/typescript/module/JsModal.d.ts +18 -0
  138. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  139. package/lib/typescript/module/JsModal.web.d.ts +13 -0
  140. package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
  141. package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  142. package/lib/typescript/module/dataViewer/diffThemes.d.ts +3 -1
  143. package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +1 -1
  144. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  145. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  146. package/lib/typescript/module/icons/lucide-icons.d.ts +12 -1
  147. package/lib/typescript/module/icons/lucide-icons.d.ts.map +1 -1
  148. package/lib/typescript/module/index.d.ts +3 -0
  149. package/lib/typescript/module/index.d.ts.map +1 -1
  150. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
  151. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
  152. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts +3 -0
  153. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +1 -1
  154. package/lib/typescript/module/ui/backgrounds/index.d.ts +7 -1
  155. package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -1
  156. package/lib/typescript/module/ui/backgrounds/primitives.d.ts +18 -3
  157. package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +1 -1
  158. package/lib/typescript/module/ui/backgrounds/registry.d.ts +8 -0
  159. package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -1
  160. package/lib/typescript/module/ui/backgrounds/rng.d.ts +6 -0
  161. package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +1 -1
  162. package/lib/typescript/module/ui/backgrounds/skyClock.d.ts +17 -0
  163. package/lib/typescript/module/ui/backgrounds/skyClock.d.ts.map +1 -0
  164. package/lib/typescript/module/ui/backgrounds/types.d.ts +1 -1
  165. package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -1
  166. package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts +30 -0
  167. package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts.map +1 -0
  168. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts +19 -4
  169. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +1 -1
  170. package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts +39 -0
  171. package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
  172. package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts +41 -0
  173. package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
  174. package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts +26 -0
  175. package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts.map +1 -0
  176. package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts +35 -0
  177. package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
  178. package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts +51 -0
  179. package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts.map +1 -0
  180. package/lib/typescript/module/ui/components/Badge.d.ts.map +1 -1
  181. package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
  182. package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +1 -1
  183. package/lib/typescript/module/ui/components/EventStepperFooter.d.ts +2 -0
  184. package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +1 -1
  185. package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts.map +1 -1
  186. package/lib/typescript/module/ui/components/TabSelector.d.ts +9 -0
  187. package/lib/typescript/module/ui/components/TabSelector.d.ts.map +1 -1
  188. package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts.map +1 -1
  189. package/lib/typescript/module/ui/components/WindowControls.d.ts +4 -2
  190. package/lib/typescript/module/ui/components/WindowControls.d.ts.map +1 -1
  191. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +8 -0
  192. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  193. package/lib/typescript/module/ui/night/nightTheme.d.ts +113 -0
  194. package/lib/typescript/module/ui/night/nightTheme.d.ts.map +1 -0
  195. package/lib/typescript/module/ui/night/primitives.d.ts +111 -0
  196. package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -0
  197. package/package.json +4 -4
  198. package/lib/commonjs/ui/backgrounds/variants/lattice.js +0 -579
  199. package/lib/commonjs/ui/backgrounds/variants/starfield.js +0 -210
  200. package/lib/module/ui/backgrounds/variants/lattice.js +0 -575
  201. package/lib/module/ui/backgrounds/variants/starfield.js +0 -206
  202. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts +0 -33
  203. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts.map +0 -1
  204. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts +0 -12
  205. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts.map +0 -1
  206. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts +0 -33
  207. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts.map +0 -1
  208. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts +0 -12
  209. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts.map +0 -1
@@ -17,7 +17,7 @@
17
17
 
18
18
  import React, { useMemo, useState, useEffect, useRef } from "react";
19
19
  import { View, Text, ScrollView, StyleSheet, TouchableOpacity } from "react-native";
20
- import { gameUIColors } from "@buoy-gg/shared-ui";
20
+ import { gameUIColors, night } from "@buoy-gg/shared-ui";
21
21
  import { isAbsent } from "../lineDiff.js";
22
22
 
23
23
  // ============================================
@@ -29,10 +29,10 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
29
29
  // ============================================
30
30
 
31
31
  const darkTheme = {
32
- background: gameUIColors.diff.lineNumberBackground,
33
- // Exact from gameUIColors
34
- text: gameUIColors.diff.unchangedText,
35
- // Exact from gameUIColors
32
+ // Night chrome; the diff DATA colors below stay on the shared diff palette.
33
+ background: night.color.bg,
34
+ text: night.color.textSecondary,
35
+ // "unchanged" stays dimmed vs the diff tints
36
36
  // Line backgrounds - exact from gameUIColors
37
37
  addedBg: gameUIColors.diff.addedBackground,
38
38
  removedBg: gameUIColors.diff.removedBackground,
@@ -47,12 +47,12 @@ const darkTheme = {
47
47
  // UI elements
48
48
  arrowText: gameUIColors.diff.modifiedText,
49
49
  keyText: gameUIColors.diff.modifiedText,
50
- expandIcon: gameUIColors.diff.lineNumberText,
51
- bracketText: gameUIColors.diff.unchangedText,
50
+ expandIcon: night.color.textTertiary,
51
+ bracketText: night.color.textSecondary,
52
52
  nullText: gameUIColors.diff.modifiedText,
53
53
  undefinedText: gameUIColors.diff.modifiedText,
54
- stringText: gameUIColors.diff.unchangedText,
55
- numberText: gameUIColors.diff.unchangedText,
54
+ stringText: night.color.textSecondary,
55
+ numberText: night.color.textSecondary,
56
56
  booleanText: gameUIColors.diff.modifiedText
57
57
  };
58
58
  const lightTheme = {
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Auto-generated safe area implementation
5
5
  * Detected: none
6
- * Generated at: 2026-08-19T21:27:36.627Z
6
+ * Generated at: 2026-08-21T01:33:44.897Z
7
7
  *
8
8
  * DO NOT EDIT - This file is generated by scripts/detect-safe-area.js
9
9
  *
@@ -505,30 +505,89 @@ export const Eye = ({
505
505
  strokeWidth: strokeWidth
506
506
  })]
507
507
  });
508
+
509
+ /**
510
+ * Pushpin at 45°: needle → flange bar → flare → one long rounded handle.
511
+ * The handle is a border-only View rotated about its center; everything else
512
+ * is straight Line segments, so no curve stamping on native.
513
+ *
514
+ * `active` stands the pin upright (needle down — "stuck in"); default is the
515
+ * tilted resting pose. The upright pose scales 0.92 so the needle tip and
516
+ * head corners stay inside the 24-box.
517
+ */
508
518
  export const Pin = ({
509
519
  size = 24,
510
520
  color = "currentColor",
511
521
  strokeWidth = 2,
522
+ active = false,
512
523
  ...props
513
- }) => /*#__PURE__*/_jsxs(Svg, {
524
+ }) => /*#__PURE__*/_jsx(Svg, {
514
525
  width: size,
515
526
  height: size,
516
527
  viewBox: "0 0 24 24",
517
528
  ...props,
518
- children: [/*#__PURE__*/_jsx(Circle, {
519
- cx: 12,
520
- cy: 9,
521
- r: 5,
522
- stroke: color,
523
- strokeWidth: strokeWidth
524
- }), /*#__PURE__*/_jsx(Line, {
525
- x1: 12,
526
- y1: 14,
527
- x2: 12,
528
- y2: 21,
529
- stroke: color,
530
- strokeWidth: strokeWidth
531
- })]
529
+ children: /*#__PURE__*/_jsxs(View, {
530
+ style: {
531
+ position: "absolute",
532
+ width: 24,
533
+ height: 24,
534
+ // Keep the array shape stable across toggles: RN's style differ turns
535
+ // an explicit `transform: undefined` into null and processTransform
536
+ // crashes on it (`null.forEach`) when unpinning.
537
+ transform: active ? [{
538
+ rotate: "-45deg"
539
+ }, {
540
+ scale: 0.92
541
+ }] : [{
542
+ rotate: "0deg"
543
+ }, {
544
+ scale: 1
545
+ }]
546
+ },
547
+ children: [/*#__PURE__*/_jsx(Line, {
548
+ x1: 2.97,
549
+ y1: 21.03,
550
+ x2: 8.18,
551
+ y2: 15.82,
552
+ stroke: color,
553
+ strokeWidth: strokeWidth
554
+ }), /*#__PURE__*/_jsx(Line, {
555
+ x1: 4.4,
556
+ y1: 10.81,
557
+ x2: 13.19,
558
+ y2: 19.6,
559
+ stroke: color,
560
+ strokeWidth: strokeWidth
561
+ }), /*#__PURE__*/_jsx(Line, {
562
+ x1: 5.17,
563
+ y1: 10.54,
564
+ x2: 11.43,
565
+ y2: 8.83,
566
+ stroke: color,
567
+ strokeWidth: strokeWidth
568
+ }), /*#__PURE__*/_jsx(Line, {
569
+ x1: 13.46,
570
+ y1: 18.83,
571
+ x2: 15.17,
572
+ y2: 12.57,
573
+ stroke: color,
574
+ strokeWidth: strokeWidth
575
+ }), /*#__PURE__*/_jsx(View, {
576
+ style: {
577
+ position: "absolute",
578
+ left: 11.15,
579
+ top: 4.4,
580
+ width: 11.38,
581
+ height: 5.52,
582
+ borderWidth: strokeWidth,
583
+ borderColor: color,
584
+ borderRadius: 2.07,
585
+ transform: [{
586
+ rotate: "-45deg"
587
+ }]
588
+ }
589
+ })]
590
+ })
532
591
  });
533
592
 
534
593
  /**
@@ -61,6 +61,10 @@ export { useSafeAreaInsets, useFilterManager, usePersistedState, useDeviceInfo,
61
61
 
62
62
  // JsModal
63
63
  export { JsModal } from "./JsModal";
64
+ // Night theme — the Everlights-style surface language (piloted on the dial
65
+ // menu's settings modal; see ui/night/nightTheme.ts).
66
+ export { night, NIGHT_LABEL_TRACKING } from "./ui/night/nightTheme.js";
67
+ export { NightSectionLabel, NightFootnote, NightCard, NightSeparator, NightRows, NightSwitch, NightChip, NightButton, NightSegmented, NightBadge } from "./ui/night/primitives.js";
64
68
  // game ui colors
65
69
  export { gameUIColors, buoyColors } from "./ui/gameUI/constants/gameUIColors.js";
66
70
  // Runtime re-tint hook — only the desktop dashboard's theme switcher uses it.
@@ -1,92 +1,210 @@
1
1
  "use strict";
2
2
 
3
3
  /**
4
- * The ‹ prev / next › strip for auditioning backgrounds.
4
+ * The ‹ prev / next › strip for choosing a background.
5
5
  *
6
- * This is a REVIEW control, not shipped chrome: it exists so the whole
7
- * catalogue can be walked without a rebuild, with the cost of each preset shown
8
- * next to its name. Mount it at the top of a tool's body while evaluating, and
9
- * pull it once a winner is picked (or keep it behind a setting).
6
+ * Shipping mount: the dial menu's settings modal (pass `embedded` there so the
7
+ * host card supplies the chrome). It can also be dropped at the top of a
8
+ * tool's body while auditioning new presets — the cost of each preset shows
9
+ * next to its name, so it doubles as the review tool it started as.
10
10
  *
11
11
  * It writes to the shared `backgroundStore`, so stepping here changes the
12
12
  * background in every tool at once.
13
+ *
14
+ * While Live Sky is showing, a second row appears: a WALL-clock slider that
15
+ * scrubs the scene through the whole cycle (Live Sky applies its workday
16
+ * remap to whatever wall time the scrub holds, same as it does to the live
17
+ * clock). LIVE snaps back to the real clock. The scrub is quantized to
18
+ * 5-minute steps so a drag re-renders the scene at most once per step, and it
19
+ * is not persisted — it's a preview gesture.
20
+ *
21
+ * ▶ runs the cycle like a movie: one full 24h lap in 15s, starting from the
22
+ * displayed time and finishing exactly where it began (back on LIVE if that's
23
+ * where it was). It drives the SAME scrub value on a JS interval — ~19 5-min
24
+ * steps a second, each one small re-render of the scene — which is fine for a
25
+ * 15s preview gesture and is exactly what a fast drag already does.
13
26
  */
14
27
 
15
- import { memo } from "react";
16
- import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
28
+ import { memo, useEffect, useRef, useState } from "react";
29
+ import { PanResponder, StyleSheet, Text, TouchableOpacity, View } from "react-native";
17
30
  import { ChevronLeft, ChevronRight, Palette } from "../../icons/lucide-icons.js";
18
31
  import { macOSColors } from "../gameUI/constants/macOSDesignSystemColors.js";
19
32
  import { useToolBackground } from "./backgroundStore.js";
20
33
  import { getPreset } from "./registry.js";
34
+ import { getSkyScrub, setSkyScrub, useSkyScrub } from "./skyClock.js";
21
35
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
- export const BackgroundSwitcher = /*#__PURE__*/memo(function BackgroundSwitcher() {
36
+ const THUMB = 14;
37
+ function formatMinutes(m) {
38
+ const h = Math.floor(m / 60) % 24;
39
+ const min = m % 60;
40
+ return `${String(h).padStart(2, "0")}:${String(min).padStart(2, "0")}`;
41
+ }
42
+ const PLAY_DURATION_MS = 15000;
43
+ const PLAY_FRAME_MS = 50;
44
+ const TimeSlider = /*#__PURE__*/memo(function TimeSlider() {
45
+ const scrub = useSkyScrub();
46
+ const [trackW, setTrackW] = useState(0);
47
+ const widthRef = useRef(0);
48
+ const [playing, setPlaying] = useState(false);
49
+ const playTimer = useRef(null);
50
+ const stopPlay = () => {
51
+ if (playTimer.current) clearInterval(playTimer.current);
52
+ playTimer.current = null;
53
+ setPlaying(false);
54
+ };
55
+ // eslint-disable-next-line react-hooks/exhaustive-deps
56
+ useEffect(() => stopPlay, []);
57
+ const startPlay = () => {
58
+ stopPlay();
59
+ const now = new Date();
60
+ const startMinutes = getSkyScrub() ?? now.getHours() * 60 + now.getMinutes();
61
+ const wasLive = getSkyScrub() === null;
62
+ const begin = Date.now();
63
+ setPlaying(true);
64
+ playTimer.current = setInterval(() => {
65
+ const t = (Date.now() - begin) / PLAY_DURATION_MS;
66
+ if (t >= 1) {
67
+ stopPlay();
68
+ // Finish exactly where the day began.
69
+ setSkyScrub(wasLive ? null : startMinutes);
70
+ return;
71
+ }
72
+ setSkyScrub(Math.floor((startMinutes + t * 1440) % 1440 / 5) * 5);
73
+ }, PLAY_FRAME_MS);
74
+ };
75
+ const applyX = x => {
76
+ stopPlay();
77
+ const w = widthRef.current;
78
+ if (w <= 0) return;
79
+ const frac = Math.min(1, Math.max(0, x / w));
80
+ setSkyScrub(Math.round(frac * 1439 / 5) * 5);
81
+ };
82
+ const responder = useRef(PanResponder.create({
83
+ onStartShouldSetPanResponder: () => true,
84
+ onMoveShouldSetPanResponder: () => true,
85
+ onPanResponderGrant: e => applyX(e.nativeEvent.locationX),
86
+ onPanResponderMove: e => applyX(e.nativeEvent.locationX)
87
+ })).current;
88
+ const now = new Date();
89
+ // Wall time throughout — the scene applies its own remap to this.
90
+ const minutes = scrub ?? now.getHours() * 60 + now.getMinutes();
91
+ const frac = minutes / 1440;
92
+ return /*#__PURE__*/_jsxs(View, {
93
+ style: styles.sliderRow,
94
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
95
+ onPress: () => {
96
+ stopPlay();
97
+ setSkyScrub(null);
98
+ },
99
+ style: [styles.live, scrub === null ? styles.liveOn : null],
100
+ hitSlop: HIT_SLOP,
101
+ accessibilityLabel: "Follow the real clock",
102
+ "sentry-label": "ignore background sky live",
103
+ children: /*#__PURE__*/_jsx(Text, {
104
+ style: [styles.liveText, scrub === null ? styles.liveTextOn : null],
105
+ children: "LIVE"
106
+ })
107
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
108
+ onPress: playing ? stopPlay : startPlay,
109
+ style: [styles.live, playing ? styles.playOn : null],
110
+ hitSlop: HIT_SLOP,
111
+ accessibilityLabel: playing ? "Stop the day cycle" : "Play the full day in 15 seconds",
112
+ "sentry-label": "ignore background sky play",
113
+ children: /*#__PURE__*/_jsx(Text, {
114
+ style: [styles.liveText, playing ? styles.playTextOn : null],
115
+ children: playing ? "■" : "▶"
116
+ })
117
+ }), /*#__PURE__*/_jsxs(View, {
118
+ style: styles.track,
119
+ onLayout: e => {
120
+ widthRef.current = e.nativeEvent.layout.width;
121
+ setTrackW(e.nativeEvent.layout.width);
122
+ },
123
+ ...responder.panHandlers,
124
+ children: [/*#__PURE__*/_jsx(View, {
125
+ style: styles.trackBar,
126
+ pointerEvents: "none"
127
+ }), trackW > 0 ? /*#__PURE__*/_jsx(View, {
128
+ pointerEvents: "none",
129
+ style: [styles.thumb, scrub === null ? null : styles.thumbScrub, {
130
+ left: frac * trackW - THUMB / 2
131
+ }]
132
+ }) : null]
133
+ }), /*#__PURE__*/_jsx(Text, {
134
+ style: styles.time,
135
+ children: formatMinutes(minutes)
136
+ })]
137
+ });
138
+ });
139
+ export const BackgroundSwitcher = /*#__PURE__*/memo(function BackgroundSwitcher({
140
+ embedded = false
141
+ }) {
23
142
  const {
24
143
  id,
25
144
  index,
26
145
  count,
27
- motion,
28
146
  next,
29
147
  previous,
30
- setMotion
148
+ setId
31
149
  } = useToolBackground();
32
150
  const preset = getPreset(id);
151
+ const counterpart = preset.counterpart;
33
152
  return /*#__PURE__*/_jsxs(View, {
34
- style: styles.root,
35
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
36
- onPress: previous,
37
- style: styles.step,
38
- hitSlop: HIT_SLOP,
39
- accessibilityLabel: "Previous background",
40
- "sentry-label": "ignore background previous",
41
- children: /*#__PURE__*/_jsx(ChevronLeft, {
42
- size: 16,
43
- color: macOSColors.text.secondary
44
- })
45
- }), /*#__PURE__*/_jsxs(View, {
46
- style: styles.center,
47
- children: [/*#__PURE__*/_jsxs(View, {
48
- style: styles.titleRow,
49
- children: [/*#__PURE__*/_jsx(Palette, {
50
- size: 11,
51
- color: macOSColors.semantic.info
153
+ style: embedded ? styles.rootEmbedded : styles.root,
154
+ children: [/*#__PURE__*/_jsxs(View, {
155
+ style: styles.row,
156
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
157
+ onPress: previous,
158
+ style: styles.step,
159
+ hitSlop: HIT_SLOP,
160
+ accessibilityLabel: "Previous background",
161
+ "sentry-label": "ignore background previous",
162
+ children: /*#__PURE__*/_jsx(ChevronLeft, {
163
+ size: 16,
164
+ color: macOSColors.text.secondary
165
+ })
166
+ }), /*#__PURE__*/_jsxs(View, {
167
+ style: styles.center,
168
+ children: [/*#__PURE__*/_jsxs(View, {
169
+ style: styles.titleRow,
170
+ children: [/*#__PURE__*/_jsx(Palette, {
171
+ size: 11,
172
+ color: macOSColors.semantic.info
173
+ }), /*#__PURE__*/_jsx(Text, {
174
+ style: styles.title,
175
+ numberOfLines: 1,
176
+ children: preset.label
177
+ }), /*#__PURE__*/_jsxs(Text, {
178
+ style: styles.counter,
179
+ children: [index + 1, "/", count]
180
+ })]
52
181
  }), /*#__PURE__*/_jsx(Text, {
53
- style: styles.title,
182
+ style: styles.blurb,
54
183
  numberOfLines: 1,
55
- children: preset.label
56
- }), /*#__PURE__*/_jsxs(Text, {
57
- style: styles.counter,
58
- children: [index + 1, "/", count]
184
+ children: preset.blurb
59
185
  })]
60
- }), /*#__PURE__*/_jsx(Text, {
61
- style: styles.blurb,
62
- numberOfLines: 1,
63
- children: preset.blurb
64
- }), /*#__PURE__*/_jsxs(Text, {
65
- style: styles.cost,
66
- numberOfLines: 1,
67
- children: [preset.nodes === 0 ? "0 animated nodes" : `${preset.nodes} native node${preset.nodes === 1 ? "" : "s"}`, " · ", "~", preset.views, " static views"]
186
+ }), counterpart ? /*#__PURE__*/_jsx(TouchableOpacity, {
187
+ onPress: () => setId(counterpart.id),
188
+ style: styles.motion,
189
+ hitSlop: HIT_SLOP,
190
+ accessibilityLabel: `Switch to ${counterpart.id} background`,
191
+ "sentry-label": "ignore background counterpart",
192
+ children: /*#__PURE__*/_jsx(Text, {
193
+ style: styles.motionText,
194
+ children: counterpart.label
195
+ })
196
+ }) : null, /*#__PURE__*/_jsx(TouchableOpacity, {
197
+ onPress: next,
198
+ style: styles.step,
199
+ hitSlop: HIT_SLOP,
200
+ accessibilityLabel: "Next background",
201
+ "sentry-label": "ignore background next",
202
+ children: /*#__PURE__*/_jsx(ChevronRight, {
203
+ size: 16,
204
+ color: macOSColors.text.secondary
205
+ })
68
206
  })]
69
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
70
- onPress: () => setMotion(!motion),
71
- style: [styles.motion, motion ? styles.motionOn : null],
72
- hitSlop: HIT_SLOP,
73
- accessibilityLabel: motion ? "Turn motion off" : "Turn motion on",
74
- "sentry-label": "ignore background motion",
75
- children: /*#__PURE__*/_jsx(Text, {
76
- style: [styles.motionText, motion ? styles.motionTextOn : null],
77
- children: motion ? "MOTION" : "STATIC"
78
- })
79
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
80
- onPress: next,
81
- style: styles.step,
82
- hitSlop: HIT_SLOP,
83
- accessibilityLabel: "Next background",
84
- "sentry-label": "ignore background next",
85
- children: /*#__PURE__*/_jsx(ChevronRight, {
86
- size: 16,
87
- color: macOSColors.text.secondary
88
- })
89
- })]
207
+ }), id === "livesky" ? /*#__PURE__*/_jsx(TimeSlider, {}) : null]
90
208
  });
91
209
  });
92
210
  const HIT_SLOP = {
@@ -97,9 +215,6 @@ const HIT_SLOP = {
97
215
  };
98
216
  const styles = StyleSheet.create({
99
217
  root: {
100
- flexDirection: "row",
101
- alignItems: "center",
102
- gap: 8,
103
218
  paddingHorizontal: 8,
104
219
  paddingVertical: 6,
105
220
  marginHorizontal: 8,
@@ -112,6 +227,14 @@ const styles = StyleSheet.create({
112
227
  // previewing, so you can see the field through it.
113
228
  backgroundColor: "rgba(26,26,28,0.72)"
114
229
  },
230
+ rootEmbedded: {
231
+ // The host card supplies border/fill/margins.
232
+ },
233
+ row: {
234
+ flexDirection: "row",
235
+ alignItems: "center",
236
+ gap: 8
237
+ },
115
238
  step: {
116
239
  width: 28,
117
240
  height: 28,
@@ -146,12 +269,6 @@ const styles = StyleSheet.create({
146
269
  fontSize: 10,
147
270
  marginTop: 1
148
271
  },
149
- cost: {
150
- color: macOSColors.text.icon,
151
- fontSize: 9,
152
- marginTop: 1,
153
- fontVariant: ["tabular-nums"]
154
- },
155
272
  motion: {
156
273
  paddingHorizontal: 7,
157
274
  paddingVertical: 4,
@@ -160,17 +277,74 @@ const styles = StyleSheet.create({
160
277
  borderColor: macOSColors.border.default,
161
278
  backgroundColor: "rgba(38,38,42,0.8)"
162
279
  },
163
- motionOn: {
164
- borderColor: macOSColors.semantic.info + "55",
165
- backgroundColor: macOSColors.semantic.infoBackground
166
- },
167
280
  motionText: {
168
281
  fontSize: 9,
169
282
  fontWeight: "700",
170
283
  letterSpacing: 0.6,
171
284
  color: macOSColors.text.muted
172
285
  },
173
- motionTextOn: {
286
+ sliderRow: {
287
+ flexDirection: "row",
288
+ alignItems: "center",
289
+ gap: 8,
290
+ marginTop: 7
291
+ },
292
+ live: {
293
+ paddingHorizontal: 7,
294
+ paddingVertical: 3,
295
+ borderRadius: 6,
296
+ borderWidth: 1,
297
+ borderColor: macOSColors.border.default,
298
+ backgroundColor: "rgba(38,38,42,0.8)"
299
+ },
300
+ liveOn: {
301
+ borderColor: macOSColors.semantic.success + "55",
302
+ backgroundColor: macOSColors.semantic.successBackground
303
+ },
304
+ liveText: {
305
+ fontSize: 9,
306
+ fontWeight: "700",
307
+ letterSpacing: 0.6,
308
+ color: macOSColors.text.muted
309
+ },
310
+ liveTextOn: {
311
+ color: macOSColors.semantic.success
312
+ },
313
+ playOn: {
314
+ borderColor: macOSColors.semantic.info + "55",
315
+ backgroundColor: macOSColors.semantic.infoBackground
316
+ },
317
+ playTextOn: {
174
318
  color: macOSColors.semantic.info
319
+ },
320
+ track: {
321
+ flex: 1,
322
+ height: 24,
323
+ justifyContent: "center"
324
+ },
325
+ trackBar: {
326
+ height: 3,
327
+ borderRadius: 1.5,
328
+ backgroundColor: "rgba(120,130,150,0.35)"
329
+ },
330
+ thumb: {
331
+ position: "absolute",
332
+ top: (24 - THUMB) / 2,
333
+ width: THUMB,
334
+ height: THUMB,
335
+ borderRadius: THUMB / 2,
336
+ backgroundColor: macOSColors.text.secondary,
337
+ borderWidth: 1,
338
+ borderColor: "rgba(255,255,255,0.5)"
339
+ },
340
+ thumbScrub: {
341
+ backgroundColor: macOSColors.semantic.info
342
+ },
343
+ time: {
344
+ color: macOSColors.text.secondary,
345
+ fontSize: 10,
346
+ fontVariant: ["tabular-nums"],
347
+ width: 32,
348
+ textAlign: "right"
175
349
  }
176
350
  });