@sequenceholdings/atlas-ui 3.3.0 → 3.4.0

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.
package/dist/index.d.ts CHANGED
@@ -140,6 +140,46 @@ declare interface AppStatusBadgeProps {
140
140
  className?: string;
141
141
  }
142
142
 
143
+ export declare function ArtifactAppShell({ header, status, navigation, footer, children, className, contentClassName, scrollMode, ...props }: ArtifactAppShellProps): JSX.Element;
144
+
145
+ export declare type ArtifactAppShellProps = ComponentProps<'div'> & {
146
+ header?: ReactNode;
147
+ status?: ReactNode;
148
+ navigation?: ReactNode;
149
+ footer?: ReactNode;
150
+ contentClassName?: string;
151
+ scrollMode?: ArtifactAppShellScrollMode;
152
+ };
153
+
154
+ export declare type ArtifactAppShellScrollMode = 'document' | 'contained';
155
+
156
+ export declare function ArtifactOfflineControl({ status, onEnrolledChange, disabled, compact, className, icon, }: {
157
+ status: ArtifactOfflineUiStatus;
158
+ onEnrolledChange: (enrolled: boolean) => void;
159
+ disabled?: boolean;
160
+ compact?: boolean;
161
+ className?: string;
162
+ icon?: ReactNode;
163
+ }): JSX.Element;
164
+
165
+ export declare interface ArtifactOfflineStatusCopy {
166
+ title: string;
167
+ subtitle: string;
168
+ ariaLabel: string;
169
+ tone: 'neutral' | 'ready' | 'warning' | 'danger';
170
+ }
171
+
172
+ export declare interface ArtifactOfflineUiStatus {
173
+ enrolled: boolean;
174
+ online: boolean;
175
+ pending: number;
176
+ failed: number;
177
+ syncing: boolean;
178
+ loading: boolean;
179
+ updating: boolean;
180
+ error?: string | null;
181
+ }
182
+
143
183
  /**
144
184
  * Button that reflects the lifecycle of an async mutation:
145
185
  * idle → pending (spinner) → success/error (auto-resets).
@@ -327,7 +367,7 @@ export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLBu
327
367
 
328
368
  export declare const buttonVariants: (props?: ({
329
369
  variant?: "default" | "link" | "secondary" | "destructive" | "outline" | "ghost" | "submit" | null | undefined;
330
- size?: "default" | "sm" | "icon" | "lg" | "xs" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
370
+ size?: "default" | "touch" | "sm" | "icon" | "lg" | "xs" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-touch" | null | undefined;
331
371
  } & ClassProp) | undefined) => string;
332
372
 
333
373
  export declare function Calendar({ className, classNames, showOutsideDays, ...props }: React_2.ComponentProps<typeof DayPicker>): JSX.Element;
@@ -1532,6 +1572,8 @@ export declare interface FilterSelectProps<T extends string> {
1532
1572
  onChange: (next: T[]) => void;
1533
1573
  }
1534
1574
 
1575
+ export declare function formatArtifactOfflineStatus(status: ArtifactOfflineUiStatus): ArtifactOfflineStatusCopy;
1576
+
1535
1577
  /**
1536
1578
  * Format a byte count to a human-readable string. Matches the
1537
1579
  * conventions users expect in file dialogs: 1024-base, one decimal
@@ -1914,6 +1956,68 @@ declare interface MetricGridProps {
1914
1956
  className?: string;
1915
1957
  }
1916
1958
 
1959
+ /**
1960
+ * Viewport width (px) at or below which Atlas may treat the screen as "mobile".
1961
+ * Single source of truth — do not hard-code the breakpoint anywhere else.
1962
+ *
1963
+ * 640px is deliberately a clean phone/tablet divider: it sits above every
1964
+ * phone's portrait width (the largest are ~480px) and below every iPad's
1965
+ * portrait width (the smallest, the Mini, is ~744px), so phones pivot and
1966
+ * tablets stay on desktop. Avoid 768px — that lands exactly on the historical
1967
+ * iPad-portrait width and ambiguously catches the Mini.
1968
+ */
1969
+ export declare const MOBILE_BREAKPOINT_PX = 640;
1970
+
1971
+ export declare function MobileActionBar({ sticky, className, children, ...props }: MobileActionBarProps): JSX.Element;
1972
+
1973
+ export declare type MobileActionBarProps = ComponentProps<'footer'> & {
1974
+ sticky?: boolean;
1975
+ };
1976
+
1977
+ export declare function MobileAppNav({ items, value, onChange, label, variant, className, ...props }: MobileAppNavProps): JSX.Element;
1978
+
1979
+ export declare type MobileAppNavItem = {
1980
+ value: string;
1981
+ label: string;
1982
+ icon?: ReactNode;
1983
+ badge?: ReactNode;
1984
+ disabled?: boolean;
1985
+ };
1986
+
1987
+ export declare const mobileAppNavItemVariants: (props?: ({
1988
+ variant?: "line" | "segmented" | null | undefined;
1989
+ } & ClassProp) | undefined) => string;
1990
+
1991
+ export declare type MobileAppNavProps = Omit<ComponentProps<'nav'>, 'onChange'> & VariantProps<typeof mobileAppNavItemVariants> & {
1992
+ items: MobileAppNavItem[];
1993
+ value: string;
1994
+ onChange: (value: string) => void;
1995
+ label?: string;
1996
+ };
1997
+
1998
+ export declare function MobileListRow({ title, titleText, description, leading, trailing, showChevron, className, type, ...props }: MobileListRowProps): JSX.Element;
1999
+
2000
+ export declare type MobileListRowProps = Omit<ComponentProps<'button'>, 'title'> & {
2001
+ title: ReactNode;
2002
+ titleText?: string;
2003
+ description?: ReactNode;
2004
+ leading?: ReactNode;
2005
+ trailing?: ReactNode;
2006
+ showChevron?: boolean;
2007
+ };
2008
+
2009
+ export declare function MobilePageHeader({ title, description, leading, actions, onBack, backLabel, sticky, className, ...props }: MobilePageHeaderProps): JSX.Element;
2010
+
2011
+ export declare type MobilePageHeaderProps = Omit<ComponentProps<'header'>, 'title'> & {
2012
+ title: string;
2013
+ description?: string;
2014
+ leading?: ReactNode;
2015
+ actions?: ReactNode;
2016
+ onBack?: () => void;
2017
+ backLabel?: string;
2018
+ sticky?: boolean;
2019
+ };
2020
+
1917
2021
  export declare function MultiSelect({ label, countLabel, options, selected, onChange, searchPlaceholder, emptyMessage, maxStackedIcons, hideWhenEmpty, modal, className, }: MultiSelectProps): JSX.Element | null;
1918
2022
 
1919
2023
  /**
@@ -2826,7 +2930,7 @@ export declare interface SectionLoadingStateProps {
2826
2930
  label?: string;
2827
2931
  }
2828
2932
 
2829
- export declare function SegmentedControl<T extends string>({ options, value, onChange, className, }: SegmentedControlProps<T>): JSX.Element;
2933
+ export declare function SegmentedControl<T extends string>({ options, value, onChange, className, size, }: SegmentedControlProps<T>): JSX.Element;
2830
2934
 
2831
2935
  declare interface SegmentedControlOption<T extends string> {
2832
2936
  value: T;
@@ -2839,6 +2943,7 @@ declare interface SegmentedControlProps<T extends string> {
2839
2943
  value: T;
2840
2944
  onChange: (value: T) => void;
2841
2945
  className?: string;
2946
+ size?: 'default' | 'touch';
2842
2947
  }
2843
2948
 
2844
2949
  export declare const Select: React_2.FC<SelectPrimitive.SelectProps>;
@@ -3917,6 +4022,22 @@ export declare interface UseEditableDraftResult<TDraft> {
3917
4022
  reset: () => void;
3918
4023
  }
3919
4024
 
4025
+ /**
4026
+ * Returns `true` only when the viewport is narrow (at or below
4027
+ * {@link MOBILE_BREAKPOINT_PX}) **and** the primary pointer is coarse (touch).
4028
+ *
4029
+ * This is the canonical "show the mobile UI" gate. It is capability-based, not
4030
+ * user-agent-based: a narrow desktop window driven by a mouse stays on desktop,
4031
+ * while a phone/tablet (or an iPad masquerading as desktop in its UA) pivots.
4032
+ * On the server it returns `false` (assume desktop) and re-gates on the client
4033
+ * after hydration; gated surfaces should tolerate a one-frame flash.
4034
+ *
4035
+ * To exercise this locally, use the browser's device toolbar (which emulates a
4036
+ * coarse pointer) — by design, simply dragging a desktop window narrow will not
4037
+ * trigger it.
4038
+ */
4039
+ export declare function useIsMobileViewport(): boolean;
4040
+
3920
4041
  /**
3921
4042
  * Optimistic mutation over a family of React Query list caches matched by a
3922
4043
  * partial key. Same lifecycle as `useOptimisticResource` (cancel + snapshot +