@zendir/ui 0.3.0 → 0.3.1

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 (103) hide show
  1. package/dist/index.js +62 -62
  2. package/dist/react/3d/ZenSpace3D.js +3 -2
  3. package/dist/react/3d/ZenSpace3DShaders.js +478 -0
  4. package/dist/react/3d/ZenSpace3DShaders.js.map +1 -0
  5. package/dist/react/3d/capturePngAnalysis.js +42 -0
  6. package/dist/react/3d/capturePngAnalysis.js.map +1 -0
  7. package/dist/react/3d/index.js +57 -0
  8. package/dist/react/3d/index.js.map +1 -0
  9. package/dist/react/3d/threeLoader.js +4 -0
  10. package/dist/react/3d/threeLoader.js.map +1 -1
  11. package/dist/react/astro/ClassificationBanner.js +1 -1
  12. package/dist/react/astro/GlobalStatusBar.js +1 -1
  13. package/dist/react/astro/MissionClock.js +8 -5
  14. package/dist/react/astro/MissionClock.js.map +1 -1
  15. package/dist/react/astro/MonitoringIcon.js +1 -1
  16. package/dist/react/astro/Notification.js +1 -1
  17. package/dist/react/astro/Progress.js +1 -1
  18. package/dist/react/astro/SimulationControls.js +1 -1
  19. package/dist/react/astro/StatusIndicator.js +1 -1
  20. package/dist/react/astro/UnifiedTimeline.js +1 -1
  21. package/dist/react/astro/index.js +34 -0
  22. package/dist/react/astro/index.js.map +1 -0
  23. package/dist/react/cards/AccessCard.js +410 -0
  24. package/dist/react/cards/AccessCard.js.map +1 -0
  25. package/dist/react/cards/OrbitCard.js +372 -0
  26. package/dist/react/cards/OrbitCard.js.map +1 -0
  27. package/dist/react/cards/SpacecraftCard.js +941 -0
  28. package/dist/react/cards/SpacecraftCard.js.map +1 -0
  29. package/dist/react/cards/TelemetryCard.js +742 -0
  30. package/dist/react/cards/TelemetryCard.js.map +1 -0
  31. package/dist/react/cards/TelemetryStreamCard.js +309 -0
  32. package/dist/react/cards/TelemetryStreamCard.js.map +1 -0
  33. package/dist/react/cards/index.js +13 -0
  34. package/dist/react/cards/index.js.map +1 -0
  35. package/dist/react/charts/GroundTrackMap.js +1 -1
  36. package/dist/react/charts/GroundTrackMapLeaflet.js +1 -1
  37. package/dist/react/charts/index.js +104 -0
  38. package/dist/react/charts/index.js.map +1 -0
  39. package/dist/react/charts/unified/AstroChart.js +1 -1
  40. package/dist/react/charts/unified/PowerOverviewChart.js +488 -0
  41. package/dist/react/charts/unified/PowerOverviewChart.js.map +1 -0
  42. package/dist/react/charts/unified/domain.js +3168 -0
  43. package/dist/react/charts/unified/domain.js.map +1 -0
  44. package/dist/react/charts/unified/generators.js +518 -0
  45. package/dist/react/charts/unified/generators.js.map +1 -0
  46. package/dist/react/charts/unified/presets.js +1000 -0
  47. package/dist/react/charts/unified/presets.js.map +1 -0
  48. package/dist/react/charts/unified/sync.js +219 -0
  49. package/dist/react/charts/unified/sync.js.map +1 -0
  50. package/dist/react/charts/unified/theme.js +331 -4
  51. package/dist/react/charts/unified/theme.js.map +1 -1
  52. package/dist/react/charts/unified/useChartStream.js +226 -0
  53. package/dist/react/charts/unified/useChartStream.js.map +1 -0
  54. package/dist/react/chatgpt/index.js +163 -0
  55. package/dist/react/chatgpt/index.js.map +1 -0
  56. package/dist/react/core/data/DataTable.js +1 -1
  57. package/dist/react/core/data/DataValue.js +1 -1
  58. package/dist/react/core/display/AstroIcon.js +1 -1
  59. package/dist/react/core/display/Badge.js +1 -1
  60. package/dist/react/core/display/CardHeader.js +1 -1
  61. package/dist/react/core/display/Container.js +1 -1
  62. package/dist/react/core/display/GlassCard.js +1 -1
  63. package/dist/react/core/display/HeaderIconWithStatus.js +1 -1
  64. package/dist/react/core/feedback/Dialog.js +1 -1
  65. package/dist/react/core/feedback/Toast.js +1 -1
  66. package/dist/react/core/index.js +161 -0
  67. package/dist/react/core/index.js.map +1 -0
  68. package/dist/react/core/inputs/Button.js +1 -1
  69. package/dist/react/core/inputs/Checkbox.js +1 -1
  70. package/dist/react/core/inputs/Input.js +1 -1
  71. package/dist/react/core/inputs/NumberInput.js +1 -1
  72. package/dist/react/core/inputs/PinInput.js +1 -1
  73. package/dist/react/core/inputs/Select.js +1 -1
  74. package/dist/react/core/inputs/Toggle.js +1 -1
  75. package/dist/react/core/layout/Box.js +1 -1
  76. package/dist/react/core/layout/Flex.js +1 -1
  77. package/dist/react/core/layout/Grid.js +1 -1
  78. package/dist/react/core/layout/Stack.js +1 -1
  79. package/dist/react/core/navigation/AppBar.js +1 -1
  80. package/dist/react/core/navigation/Pagination.js +1 -1
  81. package/dist/react/core/navigation/SideNav.js +1 -1
  82. package/dist/react/core/navigation/Tabs.js +1 -1
  83. package/dist/react/core/overlays/SidePanel.js +1 -1
  84. package/dist/react/core/overlays/Tooltip.js +1 -1
  85. package/dist/react/core/widgets/Capture.js +1 -1
  86. package/dist/react/core/widgets/ChatPanel.js +1 -1
  87. package/dist/react/core/widgets/ColorPickerPanel.js +1 -1
  88. package/dist/react/core/widgets/ConnectionForm.js +1 -1
  89. package/dist/react/core/widgets/FileExplorer.js +1 -1
  90. package/dist/react/core/widgets/ImageGallery.js +1 -1
  91. package/dist/react/core/widgets/MessageStream.js +1 -1
  92. package/dist/react/core/widgets/MissionCalendar.js +1 -1
  93. package/dist/react/hooks/useCompactMode.js +1 -1
  94. package/dist/react/panels/index.js +8 -0
  95. package/dist/react/panels/index.js.map +1 -0
  96. package/dist/react/theme/config.js +30 -0
  97. package/dist/react/theme/config.js.map +1 -0
  98. package/dist/react/theme/index.js +19 -0
  99. package/dist/react/theme/index.js.map +1 -0
  100. package/dist/react/utils/index.js +8 -0
  101. package/dist/react/utils/index.js.map +1 -1
  102. package/dist/react.js +62 -62
  103. package/package.json +45 -37
@@ -0,0 +1,161 @@
1
+ import { Icon, getIconNames, isValidIconName } from "./display/Icon.js";
2
+ import { Button } from "./inputs/Button.js";
3
+ import { Input } from "./inputs/Input.js";
4
+ import { Select } from "./inputs/Select.js";
5
+ import { Toggle } from "./inputs/Toggle.js";
6
+ import { Checkbox } from "./inputs/Checkbox.js";
7
+ import { Tooltip } from "./overlays/Tooltip.js";
8
+ import { Dialog } from "./feedback/Dialog.js";
9
+ import { Badge } from "./display/Badge.js";
10
+ import { Tabs } from "./navigation/Tabs.js";
11
+ import { Container } from "./display/Container.js";
12
+ import { GLASS_COLOR_OVERLAYS, GlassCard } from "./display/GlassCard.js";
13
+ import { Pagination } from "./navigation/Pagination.js";
14
+ import { DataValue, DataValueGroup } from "./data/DataValue.js";
15
+ import { HeaderIconWithStatus } from "./display/HeaderIconWithStatus.js";
16
+ import { CardHeader } from "./display/CardHeader.js";
17
+ import { CATEGORY_ICONS, CATEGORY_LABELS, PROPERTY_PRESETS, createPropertyConfig, deriveBatteryStatus, deriveStatus, formatPropertyLabel, formatPropertyValue, getPropertiesByCategory, getPropertyConfig } from "./data/propertyConfig.js";
18
+ import { MessageStream } from "./widgets/MessageStream.js";
19
+ import { AppBar } from "./navigation/AppBar.js";
20
+ import { ColorPickerPanel } from "./widgets/ColorPickerPanel.js";
21
+ import { Body1, Body2, Body3, Compact, DataText, Display1, Display2, FONT_FAMILY_MONO, FONT_FAMILY_PRIMARY, FONT_WEIGHTS, H1, H2, H3, H4, H5, H6, Label, Micro, Mono, Typography } from "./display/Typography.js";
22
+ import { NumberInput } from "./inputs/NumberInput.js";
23
+ import { SIDENAV_HEADER_LOGO_SLOT_HEIGHT_PX, SideNav } from "./navigation/SideNav.js";
24
+ import { ToastProvider, useToast, useToastManager } from "./feedback/Toast.js";
25
+ import { Menu, Popover } from "./overlays/Popover.js";
26
+ import { Box } from "./layout/Box.js";
27
+ import { Flex } from "./layout/Flex.js";
28
+ import { Grid } from "./layout/Grid.js";
29
+ import { HStack, Stack, VStack } from "./layout/Stack.js";
30
+ import { Center } from "./layout/Center.js";
31
+ import { Spacer } from "./layout/Spacer.js";
32
+ import { Divider } from "./layout/Divider.js";
33
+ import { BREAKPOINTS, useBreakpoint } from "./layout/useBreakpoint.js";
34
+ import { resolveResponsive, resolveSpacing } from "./layout/responsive.js";
35
+ import { ConfirmDialog, ConfirmProvider, useConfirm } from "./feedback/ConfirmDialog.js";
36
+ import { PinInput } from "./inputs/PinInput.js";
37
+ import { CopyButton, useCopyToClipboard } from "./display/CopyButton.js";
38
+ import { DataTable, DataTableRowDetail } from "./data/DataTable.js";
39
+ import { ImageGallery } from "./widgets/ImageGallery.js";
40
+ import { CHAT_RESPONSE_JSON_PROMPT, CHAT_RESPONSE_MCP_TOOL, CHAT_RESPONSE_TOOL_SCHEMA, CHAT_RESPONSE_YAML_PROMPT, CHAT_STATUS_RULES_PROMPT, ChatPanel, createChatResponseParser, parseChatResponse, parseMcpToolResult } from "./widgets/ChatPanel.js";
41
+ import { ConnectionForm } from "./widgets/ConnectionForm.js";
42
+ import { SidePanel } from "./overlays/SidePanel.js";
43
+ import { HexViewer, REGION_BORDER_COLORS, REGION_COLORS } from "./widgets/HexViewer.js";
44
+ import { LimitsBar } from "./inputs/LimitsBar.js";
45
+ import { LogViewer } from "./widgets/LogViewer.js";
46
+ import { PacketViewer } from "./widgets/PacketViewer.js";
47
+ import { CommandBuilder } from "./widgets/CommandBuilder.js";
48
+ import { FileExplorer } from "./widgets/FileExplorer.js";
49
+ import { MissionCalendar } from "./widgets/MissionCalendar.js";
50
+ import { ActivityPlanner } from "./widgets/ActivityPlanner.js";
51
+ import { Capture, loadCapturePlaceholderImage, useCapture } from "./widgets/Capture.js";
52
+ export {
53
+ ActivityPlanner,
54
+ AppBar,
55
+ BREAKPOINTS,
56
+ Badge,
57
+ Body1,
58
+ Body2,
59
+ Body3,
60
+ Box,
61
+ Button,
62
+ CATEGORY_ICONS,
63
+ CATEGORY_LABELS,
64
+ CHAT_RESPONSE_JSON_PROMPT,
65
+ CHAT_RESPONSE_MCP_TOOL,
66
+ CHAT_RESPONSE_TOOL_SCHEMA,
67
+ CHAT_RESPONSE_YAML_PROMPT,
68
+ CHAT_STATUS_RULES_PROMPT,
69
+ Capture,
70
+ CardHeader,
71
+ Center,
72
+ ChatPanel,
73
+ Checkbox,
74
+ ColorPickerPanel,
75
+ CommandBuilder,
76
+ Compact,
77
+ ConfirmDialog,
78
+ ConfirmProvider,
79
+ ConnectionForm,
80
+ Container,
81
+ CopyButton,
82
+ DataTable,
83
+ DataTableRowDetail,
84
+ DataText,
85
+ DataValue,
86
+ DataValueGroup,
87
+ Dialog,
88
+ Display1,
89
+ Display2,
90
+ Divider,
91
+ FONT_FAMILY_MONO,
92
+ FONT_FAMILY_PRIMARY,
93
+ FONT_WEIGHTS,
94
+ FileExplorer,
95
+ Flex,
96
+ GLASS_COLOR_OVERLAYS,
97
+ GlassCard,
98
+ Grid,
99
+ H1,
100
+ H2,
101
+ H3,
102
+ H4,
103
+ H5,
104
+ H6,
105
+ HStack,
106
+ HeaderIconWithStatus,
107
+ HexViewer,
108
+ Icon,
109
+ ImageGallery,
110
+ Input,
111
+ Label,
112
+ LimitsBar,
113
+ LogViewer,
114
+ Menu,
115
+ MessageStream,
116
+ Micro,
117
+ MissionCalendar,
118
+ Mono,
119
+ NumberInput,
120
+ PROPERTY_PRESETS,
121
+ PacketViewer,
122
+ Pagination,
123
+ PinInput,
124
+ Popover,
125
+ REGION_BORDER_COLORS,
126
+ REGION_COLORS,
127
+ SIDENAV_HEADER_LOGO_SLOT_HEIGHT_PX,
128
+ Select,
129
+ SideNav,
130
+ SidePanel,
131
+ Spacer,
132
+ Stack,
133
+ Tabs,
134
+ ToastProvider,
135
+ Toggle,
136
+ Tooltip,
137
+ Typography,
138
+ VStack,
139
+ createChatResponseParser,
140
+ createPropertyConfig,
141
+ deriveBatteryStatus,
142
+ deriveStatus,
143
+ formatPropertyLabel,
144
+ formatPropertyValue,
145
+ getIconNames,
146
+ getPropertiesByCategory,
147
+ getPropertyConfig,
148
+ isValidIconName,
149
+ loadCapturePlaceholderImage,
150
+ parseChatResponse,
151
+ parseMcpToolResult,
152
+ resolveResponsive,
153
+ resolveSpacing,
154
+ useBreakpoint,
155
+ useCapture,
156
+ useConfirm,
157
+ useCopyToClipboard,
158
+ useToast,
159
+ useToastManager
160
+ };
161
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { memo, forwardRef, useState, useMemo, useRef, useCallback, useLayoutEffect } from "react";
3
3
  import ReactDOM from "react-dom";
4
- import { safeAccentText, classNames } from "../../utils/index.js";
5
4
  import { useTheme } from "../../theme/ThemeProvider.js";
5
+ import { safeAccentText, classNames } from "../../utils/index.js";
6
6
  const Button = memo(forwardRef(function Button2({
7
7
  variant = "primary",
8
8
  size = "medium",
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { memo, forwardRef, useState, useId } from "react";
3
- import { classNames } from "../../utils/index.js";
4
3
  import { useTheme } from "../../theme/ThemeProvider.js";
4
+ import { classNames } from "../../utils/index.js";
5
5
  const Checkbox = memo(forwardRef(function Checkbox2({
6
6
  type = "checkbox",
7
7
  checked = false,
@@ -1,8 +1,8 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { memo, forwardRef, useState, useId } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { safeAccentText, classNames } from "../../utils/index.js";
4
5
  import { useBreakpoint } from "../layout/useBreakpoint.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  const Input = memo(forwardRef(function Input2({
7
7
  label,
8
8
  helperText,
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { memo, forwardRef, useState, useRef, useId, useMemo, useEffect, useCallback } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { deriveStatus } from "../data/propertyConfig.js";
4
5
  import { StatusIndicator } from "../../astro/StatusIndicator.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  const DEFAULT_DECIMAL_PLACES = 0;
7
7
  const NumberInput = memo(forwardRef(function NumberInput2({
8
8
  value,
@@ -1,7 +1,7 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { memo, useRef, useState, useEffect, useCallback } from "react";
3
- import { useBreakpoint } from "../layout/useBreakpoint.js";
4
3
  import { useTheme } from "../../theme/ThemeProvider.js";
4
+ import { useBreakpoint } from "../layout/useBreakpoint.js";
5
5
  const PinInput = memo(function PinInput2({
6
6
  length = 6,
7
7
  type = "alphanumeric",
@@ -1,9 +1,9 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { memo, forwardRef, useState, useRef, useId, useLayoutEffect, useEffect } from "react";
3
3
  import { createPortal } from "react-dom";
4
+ import { useTheme } from "../../theme/ThemeProvider.js";
4
5
  import { classNames } from "../../utils/index.js";
5
6
  import { useBreakpoint } from "../layout/useBreakpoint.js";
6
- import { useTheme } from "../../theme/ThemeProvider.js";
7
7
  const Select = memo(forwardRef(function Select2({
8
8
  label,
9
9
  options,
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { memo, forwardRef, useState, useId } from "react";
3
- import { classNames } from "../../utils/index.js";
4
3
  import { useTheme } from "../../theme/ThemeProvider.js";
4
+ import { classNames } from "../../utils/index.js";
5
5
  const Toggle = memo(forwardRef(function Toggle2({
6
6
  checked = false,
7
7
  onChange,
@@ -1,8 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { memo, forwardRef } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { useBreakpoint } from "./useBreakpoint.js";
4
5
  import { resolveResponsive, resolveResponsiveSpacing } from "./responsive.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  const Box = memo(forwardRef(function Box2({
7
7
  as: Component = "div",
8
8
  padding,
@@ -1,8 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { memo, forwardRef } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { useBreakpoint } from "./useBreakpoint.js";
4
5
  import { resolveResponsive, resolveResponsiveSpacing } from "./responsive.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  const Flex = memo(forwardRef(function Flex2({
7
7
  direction,
8
8
  wrap,
@@ -1,8 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { memo, forwardRef } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { useBreakpoint } from "./useBreakpoint.js";
4
5
  import { resolveResponsive, resolveResponsiveSpacing } from "./responsive.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  const Grid = memo(forwardRef(function Grid2({
7
7
  columns,
8
8
  autoFit,
@@ -1,8 +1,8 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import React, { memo, forwardRef } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { useBreakpoint } from "./useBreakpoint.js";
4
5
  import { resolveResponsiveSpacing } from "./responsive.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  const Stack = memo(forwardRef(function Stack2({
7
7
  as: Component = "div",
8
8
  direction = "column",
@@ -1,12 +1,12 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import React, { memo, useState, useRef, useEffect, useMemo } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { useDisplaySettingsOptional } from "../../context/DisplaySettingsContext.js";
4
5
  import { classNames, safeAccentText } from "../../utils/index.js";
5
6
  import { AstroIcon } from "../display/AstroIcon.js";
6
7
  import { ColorPickerPanel } from "../widgets/ColorPickerPanel.js";
7
8
  import { Tooltip } from "../overlays/Tooltip.js";
8
9
  import { useBreakpoint } from "../layout/useBreakpoint.js";
9
- import { useTheme } from "../../theme/ThemeProvider.js";
10
10
  const THEME_VARIANTS = [
11
11
  { key: "hybrid", label: "Zen (Hybrid)", tooltip: "Default theme - Astro status colors with purple accents" },
12
12
  { key: "purple-hue", label: "Zen (Purple Hue)", tooltip: "Purple accent theme - vibrant purple tones" },
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { memo, useMemo } from "react";
3
- import { classNames } from "../../utils/index.js";
4
3
  import { useTheme } from "../../theme/ThemeProvider.js";
4
+ import { classNames } from "../../utils/index.js";
5
5
  const Pagination = memo(function Pagination2({
6
6
  currentPage,
7
7
  totalPages,
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { memo, useState, useEffect, useCallback, useContext, useLayoutEffect, createContext } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { safeAccentText } from "../../utils/index.js";
4
5
  import { Icon } from "../display/Icon.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
7
7
  const SIDENAV_STATUS_COLORS = {
8
8
  off: "#a4abb6",
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { memo, useId, createContext, useContext } from "react";
3
- import { classNames, safeAccentText } from "../../utils/index.js";
4
3
  import { useTheme } from "../../theme/ThemeProvider.js";
4
+ import { classNames, safeAccentText } from "../../utils/index.js";
5
5
  const TabsContext = createContext(null);
6
6
  const useTabsContext = () => {
7
7
  const context = useContext(TabsContext);
@@ -1,8 +1,8 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { memo, useRef, useState, useEffect, useCallback } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { classNames } from "../../utils/index.js";
4
5
  import { useBreakpoint } from "../layout/useBreakpoint.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  let sidePanelInstanceCount = 0;
7
7
  const SidePanel = memo(function SidePanel2({
8
8
  open,
@@ -1,8 +1,8 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { memo, useState, useRef, useCallback, useLayoutEffect, useEffect } from "react";
3
3
  import ReactDOM from "react-dom";
4
- import { classNames } from "../../utils/index.js";
5
4
  import { useTheme } from "../../theme/ThemeProvider.js";
5
+ import { classNames } from "../../utils/index.js";
6
6
  const Tooltip = memo(function Tooltip2({
7
7
  content,
8
8
  placement = "top",
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { memo, forwardRef, useState, useRef, useEffect, useCallback, useImperativeHandle } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { useCopyToClipboard } from "../display/CopyButton.js";
4
5
  import placeholderImageUrl from "./capture-placeholder.png.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  async function generateCanvasFallback() {
7
7
  try {
8
8
  const size = 256;
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import React, { memo, useState, useRef, useEffect, useCallback } from "react";
3
- import { safeAccentText } from "../../utils/index.js";
4
3
  import { useTheme } from "../../theme/ThemeProvider.js";
4
+ import { safeAccentText } from "../../utils/index.js";
5
5
  function parseYamlLite(text) {
6
6
  const lines = [];
7
7
  for (const raw of text.split("\n")) {
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { memo, useState, useRef, useEffect } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { PRESET_COLORS } from "../../context/DisplaySettingsContext.js";
4
5
  import { AstroIcon } from "../display/AstroIcon.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  const COLOR_SWATCHES = Object.entries(PRESET_COLORS).map(([key, color]) => ({
7
7
  key,
8
8
  color,
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { memo, useMemo, useId, useRef, useState, useEffect, useCallback } from "react";
3
- import { useBreakpoint } from "../layout/useBreakpoint.js";
4
3
  import { useTheme } from "../../theme/ThemeProvider.js";
4
+ import { useBreakpoint } from "../layout/useBreakpoint.js";
5
5
  const PROTOCOLS = ["wss", "ws", "mqtts", "mqtt", "tcp"];
6
6
  const DEFAULT_PORTS = {
7
7
  ws: 80,
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import React, { memo, useState, useMemo, useCallback } from "react";
3
- import { AstroIcon } from "../display/AstroIcon.js";
4
3
  import { useTheme } from "../../theme/ThemeProvider.js";
4
+ import { AstroIcon } from "../display/AstroIcon.js";
5
5
  function formatFileSize(bytes) {
6
6
  if (bytes === void 0 || bytes === null) return "—";
7
7
  if (bytes === 0) return "0 B";
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { memo, useState, useEffect, useCallback } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { useBreakpoint, resolveResponsiveValue } from "../layout/useBreakpoint.js";
4
5
  import { Pagination } from "../navigation/Pagination.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  const ImageGallery = memo(function ImageGallery2({
7
7
  images,
8
8
  columns = [2, 3, 4],
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { memo, useMemo } from "react";
3
+ import { useTheme } from "../../theme/ThemeProvider.js";
3
4
  import { classNames } from "../../utils/index.js";
4
5
  import { Icon } from "../display/Icon.js";
5
- import { useTheme } from "../../theme/ThemeProvider.js";
6
6
  import { useCompactMode } from "../../hooks/useCompactMode.js";
7
7
  const STATUS_SHAPES = {
8
8
  off: (size, color) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 12 12", width: size, height: size, "aria-hidden": "true", children: /* @__PURE__ */ jsx("circle", { cx: "6", cy: "6", r: "5", fill: color }) }),
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { memo, useState, useRef, useMemo, useCallback } from "react";
3
- import { AstroIcon } from "../display/AstroIcon.js";
4
3
  import { useTheme } from "../../theme/ThemeProvider.js";
4
+ import { AstroIcon } from "../display/AstroIcon.js";
5
5
  function getStatusColor(status, tokens) {
6
6
  if (!status) return tokens.colors.text.muted ?? tokens.colors.text.secondary;
7
7
  switch (status) {
@@ -1,6 +1,6 @@
1
1
  import { useState, useCallback, useMemo } from "react";
2
- import { useDisplaySettingsOptional } from "../context/DisplaySettingsContext.js";
3
2
  import { useTheme } from "../theme/ThemeProvider.js";
3
+ import { useDisplaySettingsOptional } from "../context/DisplaySettingsContext.js";
4
4
  function useCompactMode(options = {}) {
5
5
  const { compact: compactProp, defaultExpanded = false, onPinChange } = options;
6
6
  const { prefersReducedMotion } = useTheme();
@@ -0,0 +1,8 @@
1
+ import { ObjectInventoryPanel, recommendedFlyDistance } from "./ObjectInventoryPanel.js";
2
+ import { LayerControlPanel } from "./LayerControlPanel.js";
3
+ export {
4
+ LayerControlPanel,
5
+ ObjectInventoryPanel,
6
+ recommendedFlyDistance
7
+ };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,30 @@
1
+ const DEFAULT_THEME_CONFIG = {
2
+ defaultTheme: "hybrid",
3
+ // Zen (Hybrid) is the default
4
+ defaultMode: "dark",
5
+ persist: true
6
+ };
7
+ function getThemeConfig() {
8
+ if (typeof window !== "undefined") {
9
+ const envTheme = window.__ZENDIR_UI_THEME__;
10
+ if (envTheme === "astro" || envTheme === "purple-hue" || envTheme === "hybrid") {
11
+ return {
12
+ ...DEFAULT_THEME_CONFIG,
13
+ defaultTheme: envTheme
14
+ };
15
+ }
16
+ }
17
+ return DEFAULT_THEME_CONFIG;
18
+ }
19
+ function setDefaultTheme(theme) {
20
+ if (typeof window !== "undefined") {
21
+ window.__ZENDIR_UI_THEME__ = theme;
22
+ localStorage.setItem("zendir-ui-theme", theme);
23
+ }
24
+ }
25
+ export {
26
+ DEFAULT_THEME_CONFIG,
27
+ getThemeConfig,
28
+ setDefaultTheme
29
+ };
30
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sources":["../../../src/react/theme/config.ts"],"sourcesContent":["/**\n * @zendir/ui - Theme Configuration\n * \n * Easy configuration for default theme settings.\n * Import and use in your app root to set defaults.\n */\n\nimport type { ThemeVariant, ThemeMode } from './ThemeProvider';\n\nexport interface ThemeConfig {\n /** Default theme variant */\n defaultTheme?: ThemeVariant;\n /** Default theme mode */\n defaultMode?: ThemeMode;\n /** Persist theme selection to localStorage */\n persist?: boolean;\n}\n\n/**\n * Default theme configuration\n * \n * Available themes:\n * - 'hybrid' - Zen (Hybrid): default; Astro status colors with purple accents\n * - 'astro' - Astro UX (U.S. Space Force) compliant theme\n * - 'purple-hue' - Zen (Purple Hue) theme with modern aesthetics\n * - 'transparent' / 'transparent-bold' / 'transparent-minimal' - Glassmorphic themes\n */\nexport const DEFAULT_THEME_CONFIG: ThemeConfig = {\n defaultTheme: 'hybrid', // Zen (Hybrid) is the default\n defaultMode: 'dark',\n persist: true,\n};\n\n/**\n * Get theme configuration from environment or use defaults\n */\nexport function getThemeConfig(): ThemeConfig {\n // Allow override via environment variable or build-time config\n if (typeof window !== 'undefined') {\n const envTheme = (window as any).__ZENDIR_UI_THEME__;\n if (envTheme === 'astro' || envTheme === 'purple-hue' || envTheme === 'hybrid') {\n return {\n ...DEFAULT_THEME_CONFIG,\n defaultTheme: envTheme,\n };\n }\n }\n \n return DEFAULT_THEME_CONFIG;\n}\n\n/**\n * Set default theme at build/runtime\n * \n * @example\n * ```tsx\n * // In your app root\n * import { setDefaultTheme } from '@zendir/ui/react/theme/config';\n * \n * // Zen (Hybrid) is the default; override if needed:\n * setDefaultTheme('hybrid');\n * setDefaultTheme('purple-hue');\n * setDefaultTheme('astro');\n * ```\n */\nexport function setDefaultTheme(theme: ThemeVariant): void {\n if (typeof window !== 'undefined') {\n (window as any).__ZENDIR_UI_THEME__ = theme;\n // Also update localStorage if persist is enabled\n localStorage.setItem('zendir-ui-theme', theme);\n }\n}\n"],"names":[],"mappings":"AA2BO,MAAM,uBAAoC;AAAA,EAC/C,cAAc;AAAA;AAAA,EACd,aAAa;AAAA,EACb,SAAS;AACX;AAKO,SAAS,iBAA8B;AAE5C,MAAI,OAAO,WAAW,aAAa;AACjC,UAAM,WAAY,OAAe;AACjC,QAAI,aAAa,WAAW,aAAa,gBAAgB,aAAa,UAAU;AAC9E,aAAO;AAAA,QACL,GAAG;AAAA,QACH,cAAc;AAAA,MAAA;AAAA,IAElB;AAAA,EACF;AAEA,SAAO;AACT;AAgBO,SAAS,gBAAgB,OAA2B;AACzD,MAAI,OAAO,WAAW,aAAa;AAChC,WAAe,sBAAsB;AAEtC,iBAAa,QAAQ,mBAAmB,KAAK;AAAA,EAC/C;AACF;"}
@@ -0,0 +1,19 @@
1
+ import { ThemeProvider, useScrollbarStyles, useTheme, useThemeTokens } from "./ThemeProvider.js";
2
+ import { DEFAULT_THEME_CONFIG, getThemeConfig, setDefaultTheme } from "./config.js";
3
+ import { CARD_ACCENT_COLORS, CardAccentProvider, SPACE_SYSTEM_COLORS, getAccentColorOptions, getSystemAccentColor, useCardAccent } from "./cardAccent.js";
4
+ export {
5
+ CARD_ACCENT_COLORS,
6
+ CardAccentProvider,
7
+ DEFAULT_THEME_CONFIG,
8
+ SPACE_SYSTEM_COLORS,
9
+ ThemeProvider,
10
+ getAccentColorOptions,
11
+ getSystemAccentColor,
12
+ getThemeConfig,
13
+ setDefaultTheme,
14
+ useCardAccent,
15
+ useScrollbarStyles,
16
+ useTheme,
17
+ useThemeTokens
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -230,6 +230,13 @@ const STATUS_COLORS = {
230
230
  function getStatusColor(status) {
231
231
  return STATUS_COLORS[status ?? "off"];
232
232
  }
233
+ function deriveBatteryStatus(level) {
234
+ if (level === void 0 || level === null) return "off";
235
+ if (level <= 10) return "critical";
236
+ if (level <= 20) return "serious";
237
+ if (level <= 30) return "caution";
238
+ return "normal";
239
+ }
233
240
  function getStatusFromValue(value, thresholds, higherIsBetter = true) {
234
241
  if (value === null || value === void 0 || !Number.isFinite(value)) {
235
242
  return "off";
@@ -378,6 +385,7 @@ export {
378
385
  addAlpha,
379
386
  clamp,
380
387
  classNames,
388
+ deriveBatteryStatus,
381
389
  focusRingStyle,
382
390
  formatAltitude,
383
391
  formatCoordinate,