@buoy-gg/shared-ui 7.0.26 → 7.0.28

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 (221) 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 +35 -18
  26. package/lib/commonjs/ui/components/CopyButton.js +6 -4
  27. package/lib/commonjs/ui/components/DevToolsCard.js +16 -9
  28. package/lib/commonjs/ui/components/DynamicFilterView.js +43 -41
  29. package/lib/commonjs/ui/components/EventStepperFooter.js +38 -10
  30. package/lib/commonjs/ui/components/FilterComponents.js +11 -11
  31. package/lib/commonjs/ui/components/ModalHeader.js +28 -15
  32. package/lib/commonjs/ui/components/SectionHeader.js +3 -1
  33. package/lib/commonjs/ui/components/StorageTypeBadge.js +3 -2
  34. package/lib/commonjs/ui/components/TabSelector.js +56 -38
  35. package/lib/commonjs/ui/components/ValueTypeBadge.js +7 -6
  36. package/lib/commonjs/ui/components/WindowControls.js +37 -10
  37. package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +8 -0
  38. package/lib/commonjs/ui/night/nightTheme.js +120 -0
  39. package/lib/commonjs/ui/night/primitives.js +498 -0
  40. package/lib/module/JsModal.js +156 -20
  41. package/lib/module/JsModal.web.js +83 -39
  42. package/lib/module/dataViewer/VirtualizedDataExplorer.js +14 -4
  43. package/lib/module/dataViewer/diffThemes.js +20 -18
  44. package/lib/module/dataViewer/tree/TreeDiffViewer.js +9 -9
  45. package/lib/module/hooks/safe-area-impl.js +1 -1
  46. package/lib/module/icons/lucide-icons.js +74 -15
  47. package/lib/module/index.js +4 -0
  48. package/lib/module/ui/backgrounds/BackgroundSwitcher.js +250 -76
  49. package/lib/module/ui/backgrounds/README.md +102 -20
  50. package/lib/module/ui/backgrounds/backgroundStore.js +19 -5
  51. package/lib/module/ui/backgrounds/index.js +11 -2
  52. package/lib/module/ui/backgrounds/primitives.js +53 -16
  53. package/lib/module/ui/backgrounds/registry.js +41 -64
  54. package/lib/module/ui/backgrounds/rng.js +20 -0
  55. package/lib/module/ui/backgrounds/skyClock.js +39 -0
  56. package/lib/module/ui/backgrounds/variants/daylight.js +449 -0
  57. package/lib/module/ui/backgrounds/variants/deepField.js +62 -31
  58. package/lib/module/ui/backgrounds/variants/hyperspace.js +214 -0
  59. package/lib/module/ui/backgrounds/variants/liveSky.js +893 -0
  60. package/lib/module/ui/backgrounds/variants/meteors.js +253 -0
  61. package/lib/module/ui/backgrounds/variants/moonlight.js +468 -0
  62. package/lib/module/ui/backgrounds/variants/underwater.js +753 -0
  63. package/lib/module/ui/components/Badge.js +11 -10
  64. package/lib/module/ui/components/CompactRow.js +35 -18
  65. package/lib/module/ui/components/CopyButton.js +6 -4
  66. package/lib/module/ui/components/DevToolsCard.js +16 -9
  67. package/lib/module/ui/components/DynamicFilterView.js +43 -41
  68. package/lib/module/ui/components/EventStepperFooter.js +38 -10
  69. package/lib/module/ui/components/FilterComponents.js +11 -11
  70. package/lib/module/ui/components/ModalHeader.js +28 -15
  71. package/lib/module/ui/components/SectionHeader.js +3 -1
  72. package/lib/module/ui/components/StorageTypeBadge.js +3 -2
  73. package/lib/module/ui/components/TabSelector.js +57 -39
  74. package/lib/module/ui/components/ValueTypeBadge.js +7 -6
  75. package/lib/module/ui/components/WindowControls.js +37 -10
  76. package/lib/module/ui/gameUI/constants/gameUIColors.js +8 -0
  77. package/lib/module/ui/night/nightTheme.js +116 -0
  78. package/lib/module/ui/night/primitives.js +485 -0
  79. package/lib/typescript/commonjs/JsModal.d.ts +18 -0
  80. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/JsModal.web.d.ts +13 -0
  82. package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
  83. package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts +3 -1
  85. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  88. package/lib/typescript/commonjs/icons/lucide-icons.d.ts +12 -1
  89. package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/index.d.ts +3 -0
  91. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  92. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
  93. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
  94. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts +3 -0
  95. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +7 -1
  97. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts +18 -3
  99. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts +8 -0
  101. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts +6 -0
  103. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts +17 -0
  105. package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts.map +1 -0
  106. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +1 -1
  107. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts +30 -0
  109. package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts.map +1 -0
  110. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts +19 -4
  111. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts +39 -0
  113. package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
  114. package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts +41 -0
  115. package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
  116. package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts +26 -0
  117. package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts +35 -0
  119. package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts +51 -0
  121. package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/ui/components/Badge.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts +3 -1
  124. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/ui/components/CopyButton.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts +3 -1
  127. package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts +2 -0
  130. package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/ui/components/TabSelector.d.ts +9 -0
  134. package/lib/typescript/commonjs/ui/components/TabSelector.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts.map +1 -1
  136. package/lib/typescript/commonjs/ui/components/WindowControls.d.ts +4 -2
  137. package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +1 -1
  138. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +8 -0
  139. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  140. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts +113 -0
  141. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +1 -0
  142. package/lib/typescript/commonjs/ui/night/primitives.d.ts +111 -0
  143. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -0
  144. package/lib/typescript/module/JsModal.d.ts +18 -0
  145. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  146. package/lib/typescript/module/JsModal.web.d.ts +13 -0
  147. package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
  148. package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  149. package/lib/typescript/module/dataViewer/diffThemes.d.ts +3 -1
  150. package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +1 -1
  151. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  152. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  153. package/lib/typescript/module/icons/lucide-icons.d.ts +12 -1
  154. package/lib/typescript/module/icons/lucide-icons.d.ts.map +1 -1
  155. package/lib/typescript/module/index.d.ts +3 -0
  156. package/lib/typescript/module/index.d.ts.map +1 -1
  157. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
  158. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
  159. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts +3 -0
  160. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +1 -1
  161. package/lib/typescript/module/ui/backgrounds/index.d.ts +7 -1
  162. package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -1
  163. package/lib/typescript/module/ui/backgrounds/primitives.d.ts +18 -3
  164. package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +1 -1
  165. package/lib/typescript/module/ui/backgrounds/registry.d.ts +8 -0
  166. package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -1
  167. package/lib/typescript/module/ui/backgrounds/rng.d.ts +6 -0
  168. package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +1 -1
  169. package/lib/typescript/module/ui/backgrounds/skyClock.d.ts +17 -0
  170. package/lib/typescript/module/ui/backgrounds/skyClock.d.ts.map +1 -0
  171. package/lib/typescript/module/ui/backgrounds/types.d.ts +1 -1
  172. package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -1
  173. package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts +30 -0
  174. package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts.map +1 -0
  175. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts +19 -4
  176. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +1 -1
  177. package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts +39 -0
  178. package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
  179. package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts +41 -0
  180. package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
  181. package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts +26 -0
  182. package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts.map +1 -0
  183. package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts +35 -0
  184. package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
  185. package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts +51 -0
  186. package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts.map +1 -0
  187. package/lib/typescript/module/ui/components/Badge.d.ts.map +1 -1
  188. package/lib/typescript/module/ui/components/CompactRow.d.ts +3 -1
  189. package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
  190. package/lib/typescript/module/ui/components/CopyButton.d.ts.map +1 -1
  191. package/lib/typescript/module/ui/components/DevToolsCard.d.ts +3 -1
  192. package/lib/typescript/module/ui/components/DevToolsCard.d.ts.map +1 -1
  193. package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +1 -1
  194. package/lib/typescript/module/ui/components/EventStepperFooter.d.ts +2 -0
  195. package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +1 -1
  196. package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +1 -1
  197. package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts.map +1 -1
  198. package/lib/typescript/module/ui/components/TabSelector.d.ts +9 -0
  199. package/lib/typescript/module/ui/components/TabSelector.d.ts.map +1 -1
  200. package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts.map +1 -1
  201. package/lib/typescript/module/ui/components/WindowControls.d.ts +4 -2
  202. package/lib/typescript/module/ui/components/WindowControls.d.ts.map +1 -1
  203. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +8 -0
  204. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  205. package/lib/typescript/module/ui/night/nightTheme.d.ts +113 -0
  206. package/lib/typescript/module/ui/night/nightTheme.d.ts.map +1 -0
  207. package/lib/typescript/module/ui/night/primitives.d.ts +111 -0
  208. package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -0
  209. package/package.json +4 -4
  210. package/lib/commonjs/ui/backgrounds/variants/lattice.js +0 -579
  211. package/lib/commonjs/ui/backgrounds/variants/starfield.js +0 -210
  212. package/lib/module/ui/backgrounds/variants/lattice.js +0 -575
  213. package/lib/module/ui/backgrounds/variants/starfield.js +0 -206
  214. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts +0 -33
  215. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts.map +0 -1
  216. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts +0 -12
  217. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts.map +0 -1
  218. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts +0 -33
  219. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts.map +0 -1
  220. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts +0 -12
  221. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts.map +0 -1
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.night = exports.NIGHT_LABEL_TRACKING = void 0;
7
+ /**
8
+ * "Night" design tokens — the Everlights surface language, ported.
9
+ *
10
+ * A near-black, smooth, borderless-feeling system built to sit ON TOP of the
11
+ * shared ToolBackground star field: one `#050505` sheet the field shows
12
+ * through, `#0C0C0C` cards with hairline `#1A1A1C` borders, `#161618` rows
13
+ * inside them, uppercase section labels OUTSIDE the cards, and a single green
14
+ * accent that takes dark ink.
15
+ *
16
+ * Values are lifted 1:1 from the Everlights app's `constants/theme.ts`
17
+ * (`Palette` + `DarkColors`) and its modal tokens — that app is the design
18
+ * reference, so when in doubt match it, don't invent.
19
+ *
20
+ * THE ACCENT IS ONE SEAM: everything green reads `night.color.accent*`. The
21
+ * family is Buoy's brand green (`buoyColors.primary`, #20C997 — kept as
22
+ * literals so this module stays import-free); swapping it is a seven-line
23
+ * change here and nowhere else. `onAccent` stays black — this green wants
24
+ * dark ink.
25
+ *
26
+ * SCOPE: piloted on the dial menu's settings modal (JsModal `variant="night"`
27
+ * + DevToolsSettingsModal). If it sticks, convert the other tools to it.
28
+ */
29
+
30
+ const night = exports.night = {
31
+ color: {
32
+ /** The sheet itself — also the inset track of a segmented control. */
33
+ bg: "#050505",
34
+ /** A card. */
35
+ surface: "#0C0C0C",
36
+ /** A row or control inside a card. */
37
+ surfaceElevated: "#161618",
38
+ /** Hairline card border. */
39
+ border: "#1A1A1C",
40
+ /** Hairline between rows inside a card. */
41
+ separator: "rgba(255, 255, 255, 0.08)",
42
+ /** Neutral fills, lightest → strongest. */
43
+ fill: "rgba(255, 255, 255, 0.06)",
44
+ fillSecondary: "rgba(255, 255, 255, 0.08)",
45
+ fillTertiary: "rgba(255, 255, 255, 0.12)",
46
+ /** Chip resting fill — dark glass, readable over the star field. */
47
+ buttonSurface: "rgba(8, 10, 14, 0.85)",
48
+ /** Secondary/destructive button plate. */
49
+ button: "#1C1C1C",
50
+ buttonPressed: "#2C2C2E",
51
+ text: "#ECEDEE",
52
+ textSecondary: "#9BA1A6",
53
+ textTertiary: "#636366",
54
+ /** Drag handles, input placeholders. */
55
+ placeholder: "rgba(255, 255, 255, 0.30)",
56
+ /** The one accent (Buoy brand green). See the header note — one seam. */
57
+ accent: "#20C997",
58
+ accentPressed: "#1BAB80",
59
+ accentSoft: "rgba(32, 201, 151, 0.12)",
60
+ accentFill: "rgba(32, 201, 151, 0.18)",
61
+ accentBorder: "rgba(32, 201, 151, 0.20)",
62
+ accentBorderStrong: "rgba(32, 201, 151, 0.35)",
63
+ /** Ink on a filled accent surface — the accent takes DARK ink. */
64
+ onAccent: "#000000",
65
+ danger: "#FF3B30",
66
+ dangerSoft: "rgba(255, 59, 48, 0.10)",
67
+ warning: "#FF8329",
68
+ warningSoft: "rgba(255, 131, 41, 0.12)",
69
+ info: "#1E6DFF",
70
+ infoSoft: "rgba(30, 109, 255, 0.12)",
71
+ /** Switch thumb at rest (Everlights moon gray). */
72
+ knob: "#D4D8DC"
73
+ },
74
+ radius: {
75
+ /** Sheets and dialogs. */
76
+ sheet: 16,
77
+ /** Cards. */
78
+ card: 14,
79
+ /** Inputs and code blocks. */
80
+ input: 12,
81
+ /** Rows and inner controls; also the segmented-control track. */
82
+ row: 10,
83
+ /** Segment thumb inside a radius-10 track. */
84
+ segment: 8,
85
+ /** Small badges. */
86
+ badge: 6,
87
+ /** Zone-style chips. */
88
+ chip: 20,
89
+ /** Fully rounded pills (buttons use height/2 instead). */
90
+ pill: 999
91
+ },
92
+ /** Screen/sheet horizontal margin. */
93
+ gutter: 16,
94
+ /** Section labels sit 4pt in from the card edge. */
95
+ labelInset: 4,
96
+ /** Vertical rhythm between labeled card groups. */
97
+ groupGap: 24,
98
+ /** Card interior padding. */
99
+ cardPad: 14,
100
+ /** Row padding inside an edge-to-edge card. */
101
+ rowPadH: 16,
102
+ rowPadV: 14,
103
+ font: {
104
+ /** Sheet/modal titles. */
105
+ title: 17,
106
+ /** Row labels and values. */
107
+ row: 15,
108
+ /** Body copy, chip labels. */
109
+ body: 14,
110
+ /** Segmented-control labels, captions, footnotes. */
111
+ caption: 13,
112
+ /** Uppercase section labels. */
113
+ label: 12,
114
+ /** Uppercase micro labels (START/END style). */
115
+ micro: 11
116
+ }
117
+ };
118
+
119
+ /** Section labels track wide open, Everlights-style. */
120
+ const NIGHT_LABEL_TRACKING = exports.NIGHT_LABEL_TRACKING = 0.8;
@@ -0,0 +1,498 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.NightBadge = NightBadge;
7
+ exports.NightButton = NightButton;
8
+ exports.NightCard = NightCard;
9
+ exports.NightChip = NightChip;
10
+ exports.NightFootnote = NightFootnote;
11
+ exports.NightRows = NightRows;
12
+ exports.NightSectionLabel = NightSectionLabel;
13
+ exports.NightSegmented = NightSegmented;
14
+ exports.NightSeparator = NightSeparator;
15
+ exports.NightSwitch = NightSwitch;
16
+ var _react = require("react");
17
+ var _reactNative = require("react-native");
18
+ var _nightTheme = require("./nightTheme.js");
19
+ var _jsxRuntime = require("react/jsx-runtime");
20
+ /**
21
+ * Night primitives — the building blocks of the Everlights-style surface
22
+ * (see ./nightTheme for the tokens and where the look comes from).
23
+ *
24
+ * The shape they compose to:
25
+ *
26
+ * NightSectionLabel STORAGE ← outside the card, uppercase
27
+ * NightCard ┌──────────────────┐
28
+ * NightRows │ row │ ← hairline-separated children
29
+ * │ ──────────── │
30
+ * │ row │
31
+ * └──────────────────┘
32
+ * NightFootnote Settings persist through…
33
+ *
34
+ * Controls: NightSwitch (the Everlights 56×32 toggle), NightChip (zone-style
35
+ * pill), NightButton (primary = filled accent w/ dark ink, everything else on
36
+ * the #1C1C1C plate), NightSegmented (the All/Day control with the accent
37
+ * underline), NightBadge (small status caps).
38
+ */
39
+
40
+ /** Uppercase section label that sits ABOVE a NightCard. */
41
+ function NightSectionLabel({
42
+ children,
43
+ style
44
+ }) {
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
46
+ style: [styles.sectionLabel, style],
47
+ children: children
48
+ });
49
+ }
50
+
51
+ /** Explanatory line under a NightCard (or above a CTA, `centered`). */
52
+ function NightFootnote({
53
+ children,
54
+ centered,
55
+ tone = "tertiary",
56
+ style
57
+ }) {
58
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
59
+ style: [styles.footnote, tone === "secondary" ? styles.footnoteSecondary : null, tone === "warning" ? styles.footnoteWarning : null, tone === "danger" ? styles.footnoteDanger : null, centered ? styles.footnoteCentered : null, style],
60
+ children: children
61
+ });
62
+ }
63
+
64
+ /** A card: `#0C0C0C`, radius 14, hairline border. `padded` = interior 14. */
65
+ function NightCard({
66
+ children,
67
+ padded,
68
+ style
69
+ }) {
70
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
71
+ style: [styles.card, padded ? styles.cardPadded : null, style],
72
+ children: children
73
+ });
74
+ }
75
+
76
+ /** Hairline separator between rows, inset from the left like iOS. */
77
+ function NightSeparator({
78
+ inset = _nightTheme.night.rowPadH
79
+ }) {
80
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
81
+ style: [styles.separator, {
82
+ marginLeft: inset
83
+ }]
84
+ });
85
+ }
86
+
87
+ /**
88
+ * Interleaves a hairline between consecutive children so rows never track
89
+ * their own position. Meant to live inside an unpadded NightCard.
90
+ */
91
+ function NightRows({
92
+ children,
93
+ inset = _nightTheme.night.rowPadH
94
+ }) {
95
+ const rows = _react.Children.toArray(children);
96
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
97
+ children: rows.map((row, index) =>
98
+ /*#__PURE__*/
99
+ // Children.toArray assigns stable synthetic keys for keyed children.
100
+ (0, _jsxRuntime.jsxs)(_reactNative.View, {
101
+ children: [index > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(NightSeparator, {
102
+ inset: inset
103
+ }) : null, row]
104
+ }, row.key ?? index))
105
+ });
106
+ }
107
+
108
+ // Everlights toggle geometry, verbatim.
109
+ const TRACK_W = 56;
110
+ const TRACK_H = 32;
111
+ const THUMB = 22;
112
+ const TRACK_PAD = 5;
113
+ const TRAVEL = TRACK_W - THUMB - TRACK_PAD * 2;
114
+
115
+ /**
116
+ * The Everlights 56×32 switch. The thumb slides on the native driver; the
117
+ * colors snap with the state change, which reads fine at this size.
118
+ */
119
+ function NightSwitch({
120
+ value,
121
+ onValueChange,
122
+ disabled
123
+ }) {
124
+ const progress = (0, _react.useRef)(new _reactNative.Animated.Value(value ? 1 : 0)).current;
125
+ (0, _react.useEffect)(() => {
126
+ _reactNative.Animated.timing(progress, {
127
+ toValue: value ? 1 : 0,
128
+ duration: 200,
129
+ useNativeDriver: true
130
+ }).start();
131
+ }, [value, progress]);
132
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
133
+ activeOpacity: 0.8,
134
+ disabled: disabled,
135
+ onPress: () => onValueChange(!value),
136
+ accessibilityRole: "switch",
137
+ accessibilityState: {
138
+ checked: value,
139
+ disabled
140
+ },
141
+ hitSlop: {
142
+ top: 8,
143
+ bottom: 8,
144
+ left: 8,
145
+ right: 8
146
+ },
147
+ style: [styles.switchTrack, value ? styles.switchTrackOn : null, disabled ? styles.switchDisabled : null],
148
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
149
+ style: [styles.switchThumb, value ? styles.switchThumbOn : null, {
150
+ transform: [{
151
+ translateX: progress.interpolate({
152
+ inputRange: [0, 1],
153
+ outputRange: [0, TRAVEL]
154
+ })
155
+ }]
156
+ }]
157
+ })
158
+ });
159
+ }
160
+
161
+ /**
162
+ * Zone-style pill chip. The fill never changes — selection is signaled by the
163
+ * border and label color only, exactly like the Everlights zone row.
164
+ */
165
+ function NightChip({
166
+ label,
167
+ selected,
168
+ onPress,
169
+ disabled,
170
+ icon
171
+ }) {
172
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
173
+ activeOpacity: 0.7,
174
+ disabled: disabled || !onPress,
175
+ onPress: onPress,
176
+ style: [styles.chip, selected ? styles.chipSelected : null, disabled ? styles.chipDisabled : null],
177
+ children: [icon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
178
+ style: [styles.chipText, selected ? styles.chipTextSelected : null],
179
+ children: label
180
+ })]
181
+ });
182
+ }
183
+ /**
184
+ * Everlights button. `primary` fills with the accent and takes DARK ink;
185
+ * every other variant sits on the `#1C1C1C` plate and differs only in label
186
+ * color. `lg` is the fully-rounded 50pt CTA.
187
+ */
188
+ function NightButton({
189
+ label,
190
+ onPress,
191
+ variant = "secondary",
192
+ size = "lg",
193
+ icon,
194
+ disabled,
195
+ fullWidth = true
196
+ }) {
197
+ const labelColor = variant === "primary" ? _nightTheme.night.color.onAccent : variant === "tertiary" ? _nightTheme.night.color.text : variant === "destructive" ? _nightTheme.night.color.danger : _nightTheme.night.color.accent;
198
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
199
+ activeOpacity: 0.7,
200
+ disabled: disabled,
201
+ onPress: onPress,
202
+ style: [styles.button, size === "md" ? styles.buttonMd : styles.buttonLg, variant === "primary" ? styles.buttonPrimary : variant === "ghost" ? styles.buttonGhost : styles.buttonPlate, fullWidth ? styles.buttonFullWidth : null, disabled ? styles.buttonDisabled : null],
203
+ children: [icon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
204
+ style: [size === "md" ? styles.buttonTextMd : styles.buttonTextLg, {
205
+ color: labelColor
206
+ }],
207
+ children: label
208
+ })]
209
+ });
210
+ }
211
+ /**
212
+ * Segmented control: `#050505` track, `#161618` thumb, and the accent
213
+ * underline glow beneath the active label (the Everlights All/Day tabs).
214
+ *
215
+ * THE shared tab control for night-theme tool headers — the dial settings
216
+ * and the network tool both mount this one. `size="sm"` is the compact
217
+ * variant for in-tool headers where the full-height control reads too tall.
218
+ */
219
+ function NightSegmented({
220
+ tabs,
221
+ activeKey,
222
+ onChange,
223
+ size = "md"
224
+ }) {
225
+ const small = size === "sm";
226
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
227
+ style: styles.segmentTrack,
228
+ children: tabs.map(tab => {
229
+ const active = tab.key === activeKey;
230
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
231
+ activeOpacity: 0.7,
232
+ accessibilityRole: "tab",
233
+ accessibilityState: {
234
+ selected: active
235
+ },
236
+ accessibilityLabel: tab.label,
237
+ onPress: () => onChange(tab.key),
238
+ style: [styles.segment, small ? styles.segmentSm : null, active ? styles.segmentActive : null],
239
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
240
+ style: [styles.segmentText, small ? styles.segmentTextSm : null, active ? styles.segmentTextActive : null],
241
+ children: tab.label
242
+ }), active ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
243
+ style: [styles.segmentUnderline, small ? styles.segmentUnderlineSm : null]
244
+ }) : null]
245
+ }, tab.key);
246
+ })
247
+ });
248
+ }
249
+ /** Small uppercase status cap ("FILE SYSTEM", "CONNECTED"). */
250
+ function NightBadge({
251
+ label,
252
+ tone = "neutral"
253
+ }) {
254
+ const fill = tone === "accent" ? styles.badgeAccent : tone === "warning" ? styles.badgeWarning : tone === "danger" ? styles.badgeDanger : tone === "info" ? styles.badgeInfo : styles.badgeNeutral;
255
+ const ink = tone === "accent" ? styles.badgeTextAccent : tone === "warning" ? styles.badgeTextWarning : tone === "danger" ? styles.badgeTextDanger : tone === "info" ? styles.badgeTextInfo : styles.badgeTextNeutral;
256
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
257
+ style: [styles.badge, fill],
258
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
259
+ style: [styles.badgeText, ink],
260
+ children: label
261
+ })
262
+ });
263
+ }
264
+ const styles = _reactNative.StyleSheet.create({
265
+ sectionLabel: {
266
+ color: _nightTheme.night.color.textSecondary,
267
+ fontSize: _nightTheme.night.font.label,
268
+ fontWeight: "600",
269
+ letterSpacing: _nightTheme.NIGHT_LABEL_TRACKING,
270
+ textTransform: "uppercase",
271
+ marginBottom: 8,
272
+ marginLeft: _nightTheme.night.labelInset
273
+ },
274
+ footnote: {
275
+ color: _nightTheme.night.color.textTertiary,
276
+ fontSize: _nightTheme.night.font.caption,
277
+ fontWeight: "500",
278
+ lineHeight: _nightTheme.night.font.caption * 1.4,
279
+ marginTop: 8,
280
+ marginLeft: _nightTheme.night.labelInset
281
+ },
282
+ footnoteSecondary: {
283
+ color: _nightTheme.night.color.textSecondary
284
+ },
285
+ footnoteWarning: {
286
+ color: _nightTheme.night.color.warning
287
+ },
288
+ footnoteDanger: {
289
+ color: _nightTheme.night.color.danger
290
+ },
291
+ footnoteCentered: {
292
+ textAlign: "center",
293
+ marginLeft: 0
294
+ },
295
+ card: {
296
+ backgroundColor: _nightTheme.night.color.surface,
297
+ borderRadius: _nightTheme.night.radius.card,
298
+ borderWidth: 1,
299
+ borderColor: _nightTheme.night.color.border,
300
+ overflow: "hidden"
301
+ },
302
+ cardPadded: {
303
+ padding: _nightTheme.night.cardPad,
304
+ gap: 10
305
+ },
306
+ separator: {
307
+ height: _reactNative.StyleSheet.hairlineWidth,
308
+ backgroundColor: _nightTheme.night.color.separator
309
+ },
310
+ switchTrack: {
311
+ width: TRACK_W,
312
+ height: TRACK_H,
313
+ borderRadius: TRACK_H / 2,
314
+ borderWidth: 1,
315
+ borderColor: _nightTheme.night.color.fillTertiary,
316
+ backgroundColor: _nightTheme.night.color.surfaceElevated,
317
+ paddingHorizontal: TRACK_PAD,
318
+ justifyContent: "center",
319
+ overflow: "hidden"
320
+ },
321
+ switchTrackOn: {
322
+ backgroundColor: _nightTheme.night.color.accentFill,
323
+ borderColor: _nightTheme.night.color.accentBorderStrong
324
+ },
325
+ switchDisabled: {
326
+ opacity: 0.4
327
+ },
328
+ switchThumb: {
329
+ width: THUMB,
330
+ height: THUMB,
331
+ borderRadius: THUMB / 2,
332
+ backgroundColor: _nightTheme.night.color.knob
333
+ },
334
+ switchThumbOn: {
335
+ backgroundColor: _nightTheme.night.color.accent
336
+ },
337
+ chip: {
338
+ flexDirection: "row",
339
+ alignItems: "center",
340
+ gap: 6,
341
+ paddingHorizontal: 14,
342
+ paddingVertical: 9,
343
+ borderRadius: _nightTheme.night.radius.chip,
344
+ borderWidth: 1.5,
345
+ backgroundColor: _nightTheme.night.color.buttonSurface,
346
+ borderColor: _nightTheme.night.color.fillTertiary
347
+ },
348
+ chipSelected: {
349
+ borderColor: _nightTheme.night.color.accentBorderStrong
350
+ },
351
+ chipDisabled: {
352
+ opacity: 0.4
353
+ },
354
+ chipText: {
355
+ fontSize: _nightTheme.night.font.body,
356
+ fontWeight: "500",
357
+ color: _nightTheme.night.color.textSecondary
358
+ },
359
+ chipTextSelected: {
360
+ color: _nightTheme.night.color.accent
361
+ },
362
+ button: {
363
+ flexDirection: "row",
364
+ alignItems: "center",
365
+ justifyContent: "center",
366
+ gap: 8
367
+ },
368
+ buttonMd: {
369
+ height: 34,
370
+ paddingHorizontal: 16,
371
+ borderRadius: 17
372
+ },
373
+ buttonLg: {
374
+ height: 50,
375
+ paddingHorizontal: 20,
376
+ borderRadius: 25
377
+ },
378
+ buttonPrimary: {
379
+ backgroundColor: _nightTheme.night.color.accent
380
+ },
381
+ buttonPlate: {
382
+ backgroundColor: _nightTheme.night.color.button
383
+ },
384
+ buttonGhost: {
385
+ backgroundColor: "transparent"
386
+ },
387
+ buttonFullWidth: {
388
+ alignSelf: "stretch"
389
+ },
390
+ buttonDisabled: {
391
+ opacity: 0.4
392
+ },
393
+ buttonTextMd: {
394
+ fontSize: 15,
395
+ fontWeight: "600"
396
+ },
397
+ buttonTextLg: {
398
+ fontSize: 17,
399
+ fontWeight: "600"
400
+ },
401
+ segmentTrack: {
402
+ flex: 1,
403
+ flexDirection: "row",
404
+ backgroundColor: _nightTheme.night.color.bg,
405
+ borderRadius: _nightTheme.night.radius.row,
406
+ borderWidth: 1,
407
+ borderColor: _nightTheme.night.color.border,
408
+ padding: 3
409
+ },
410
+ segment: {
411
+ flex: 1,
412
+ paddingVertical: 8,
413
+ alignItems: "center",
414
+ justifyContent: "center",
415
+ borderRadius: _nightTheme.night.radius.segment
416
+ },
417
+ segmentActive: {
418
+ backgroundColor: _nightTheme.night.color.surfaceElevated
419
+ },
420
+ segmentText: {
421
+ fontSize: _nightTheme.night.font.caption,
422
+ fontWeight: "500",
423
+ color: _nightTheme.night.color.textSecondary
424
+ },
425
+ segmentTextActive: {
426
+ fontWeight: "600",
427
+ color: _nightTheme.night.color.text
428
+ },
429
+ segmentUnderline: {
430
+ position: "absolute",
431
+ bottom: 2,
432
+ width: 24,
433
+ height: 2.5,
434
+ borderRadius: 1.25,
435
+ backgroundColor: _nightTheme.night.color.accent,
436
+ shadowColor: _nightTheme.night.color.accent,
437
+ shadowOffset: {
438
+ width: 0,
439
+ height: 0
440
+ },
441
+ shadowOpacity: 0.6,
442
+ shadowRadius: 6
443
+ },
444
+ segmentSm: {
445
+ paddingVertical: 5
446
+ },
447
+ segmentTextSm: {
448
+ fontSize: 12
449
+ },
450
+ segmentUnderlineSm: {
451
+ bottom: 1.5,
452
+ width: 20,
453
+ height: 2,
454
+ borderRadius: 1
455
+ },
456
+ badge: {
457
+ paddingHorizontal: 8,
458
+ paddingVertical: 4,
459
+ borderRadius: _nightTheme.night.radius.badge,
460
+ alignSelf: "flex-start"
461
+ },
462
+ badgeText: {
463
+ fontSize: _nightTheme.night.font.micro,
464
+ fontWeight: "600",
465
+ letterSpacing: 0.5,
466
+ textTransform: "uppercase"
467
+ },
468
+ badgeAccent: {
469
+ backgroundColor: _nightTheme.night.color.accentSoft
470
+ },
471
+ badgeTextAccent: {
472
+ color: _nightTheme.night.color.accent
473
+ },
474
+ badgeWarning: {
475
+ backgroundColor: _nightTheme.night.color.warningSoft
476
+ },
477
+ badgeTextWarning: {
478
+ color: _nightTheme.night.color.warning
479
+ },
480
+ badgeDanger: {
481
+ backgroundColor: _nightTheme.night.color.dangerSoft
482
+ },
483
+ badgeTextDanger: {
484
+ color: _nightTheme.night.color.danger
485
+ },
486
+ badgeInfo: {
487
+ backgroundColor: _nightTheme.night.color.infoSoft
488
+ },
489
+ badgeTextInfo: {
490
+ color: _nightTheme.night.color.info
491
+ },
492
+ badgeNeutral: {
493
+ backgroundColor: _nightTheme.night.color.fillSecondary
494
+ },
495
+ badgeTextNeutral: {
496
+ color: _nightTheme.night.color.textSecondary
497
+ }
498
+ });