@luxfi/ui 7.4.5 → 7.4.7

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 (159) hide show
  1. package/dist/accordion.d.cts +74 -0
  2. package/dist/accordion.d.ts +74 -0
  3. package/dist/alert.cjs +3 -7
  4. package/dist/alert.d.cts +30 -0
  5. package/dist/alert.d.ts +30 -0
  6. package/dist/alert.js +3 -7
  7. package/dist/auth.cjs +481 -0
  8. package/dist/auth.d.cts +80 -0
  9. package/dist/auth.d.ts +80 -0
  10. package/dist/auth.js +456 -0
  11. package/dist/avatar.d.cts +25 -0
  12. package/dist/avatar.d.ts +25 -0
  13. package/dist/badge.cjs +4 -8
  14. package/dist/badge.d.cts +19 -0
  15. package/dist/badge.d.ts +19 -0
  16. package/dist/badge.js +4 -8
  17. package/dist/bank.d.cts +83 -0
  18. package/dist/bank.d.ts +83 -0
  19. package/dist/button.cjs +3 -7
  20. package/dist/button.d.cts +55 -0
  21. package/dist/button.d.ts +55 -0
  22. package/dist/button.js +3 -7
  23. package/dist/checkbox.d.cts +32 -0
  24. package/dist/checkbox.d.ts +32 -0
  25. package/dist/chrome.d.cts +93 -0
  26. package/dist/chrome.d.ts +93 -0
  27. package/dist/close-button.d.cts +9 -0
  28. package/dist/close-button.d.ts +9 -0
  29. package/dist/collapsible.cjs +3 -7
  30. package/dist/collapsible.d.cts +23 -0
  31. package/dist/collapsible.d.ts +23 -0
  32. package/dist/collapsible.js +3 -7
  33. package/dist/color-mode.d.cts +25 -0
  34. package/dist/color-mode.d.ts +25 -0
  35. package/dist/dialog.d.cts +118 -0
  36. package/dist/dialog.d.ts +118 -0
  37. package/dist/drawer.d.cts +36 -0
  38. package/dist/drawer.d.ts +36 -0
  39. package/dist/empty-state.d.cts +13 -0
  40. package/dist/empty-state.d.ts +13 -0
  41. package/dist/expiration-selector.d.cts +16 -0
  42. package/dist/expiration-selector.d.ts +16 -0
  43. package/dist/field.d.cts +24 -0
  44. package/dist/field.d.ts +24 -0
  45. package/dist/greeks-display.d.cts +14 -0
  46. package/dist/greeks-display.d.ts +14 -0
  47. package/dist/gui.d.cts +2 -0
  48. package/dist/gui.d.ts +2 -0
  49. package/dist/heading.d.cts +10 -0
  50. package/dist/heading.d.ts +10 -0
  51. package/dist/iam.d.cts +65 -0
  52. package/dist/iam.d.ts +65 -0
  53. package/dist/icon-button.cjs +3 -7
  54. package/dist/icon-button.d.cts +33 -0
  55. package/dist/icon-button.d.ts +33 -0
  56. package/dist/icon-button.js +3 -7
  57. package/dist/icons.cjs +0 -1
  58. package/dist/icons.d.cts +1 -0
  59. package/dist/icons.d.ts +1 -0
  60. package/dist/icons.js +0 -1
  61. package/dist/identity.d.cts +64 -0
  62. package/dist/identity.d.ts +64 -0
  63. package/dist/image.cjs +3 -7
  64. package/dist/image.d.cts +57 -0
  65. package/dist/image.d.ts +57 -0
  66. package/dist/image.js +3 -7
  67. package/dist/index.cjs +9 -8
  68. package/dist/index.d.cts +64 -0
  69. package/dist/index.d.ts +64 -0
  70. package/dist/index.js +9 -9
  71. package/dist/input-group.d.cts +17 -0
  72. package/dist/input-group.d.ts +17 -0
  73. package/dist/input.d.cts +17 -0
  74. package/dist/input.d.ts +17 -0
  75. package/dist/link.cjs +3 -7
  76. package/dist/link.d.cts +37 -0
  77. package/dist/link.d.ts +37 -0
  78. package/dist/link.js +3 -7
  79. package/dist/lux.config.d.cts +433 -0
  80. package/dist/lux.config.d.ts +433 -0
  81. package/dist/menu.d.cts +84 -0
  82. package/dist/menu.d.ts +84 -0
  83. package/dist/next.cjs +11 -1
  84. package/dist/next.d.cts +32 -0
  85. package/dist/next.d.ts +32 -0
  86. package/dist/next.js +11 -1
  87. package/dist/option-chain.d.cts +37 -0
  88. package/dist/option-chain.d.ts +37 -0
  89. package/dist/option-position.d.cts +29 -0
  90. package/dist/option-position.d.ts +29 -0
  91. package/dist/pin-input.d.cts +25 -0
  92. package/dist/pin-input.d.ts +25 -0
  93. package/dist/pnl-diagram.d.cts +11 -0
  94. package/dist/pnl-diagram.d.ts +11 -0
  95. package/dist/popover.d.cts +73 -0
  96. package/dist/popover.d.ts +73 -0
  97. package/dist/progress-circle.d.cts +47 -0
  98. package/dist/progress-circle.d.ts +47 -0
  99. package/dist/progress.d.cts +28 -0
  100. package/dist/progress.d.ts +28 -0
  101. package/dist/provider.d.cts +25 -0
  102. package/dist/provider.d.ts +25 -0
  103. package/dist/radio.d.cts +53 -0
  104. package/dist/radio.d.ts +53 -0
  105. package/dist/rating.d.cts +14 -0
  106. package/dist/rating.d.ts +14 -0
  107. package/dist/select.cjs +3 -7
  108. package/dist/select.d.cts +130 -0
  109. package/dist/select.d.ts +130 -0
  110. package/dist/select.js +3 -7
  111. package/dist/separator.d.cts +13 -0
  112. package/dist/separator.d.ts +13 -0
  113. package/dist/skeleton.cjs +8 -7
  114. package/dist/skeleton.d.cts +76 -0
  115. package/dist/skeleton.d.ts +76 -0
  116. package/dist/skeleton.js +8 -8
  117. package/dist/slider.d.cts +24 -0
  118. package/dist/slider.d.ts +24 -0
  119. package/dist/strategy-builder.d.cts +26 -0
  120. package/dist/strategy-builder.d.ts +26 -0
  121. package/dist/switch.d.cts +27 -0
  122. package/dist/switch.d.ts +27 -0
  123. package/dist/table.cjs +3 -7
  124. package/dist/table.d.cts +107 -0
  125. package/dist/table.d.ts +107 -0
  126. package/dist/table.js +3 -7
  127. package/dist/tabs.d.cts +78 -0
  128. package/dist/tabs.d.ts +78 -0
  129. package/dist/tag.cjs +4 -8
  130. package/dist/tag.d.cts +21 -0
  131. package/dist/tag.d.ts +21 -0
  132. package/dist/tag.js +4 -8
  133. package/dist/textarea.d.cts +13 -0
  134. package/dist/textarea.d.ts +13 -0
  135. package/dist/toaster.d.cts +29 -0
  136. package/dist/toaster.d.ts +29 -0
  137. package/dist/tooltip.cjs +1 -1
  138. package/dist/tooltip.d.cts +38 -0
  139. package/dist/tooltip.d.ts +38 -0
  140. package/dist/tooltip.js +1 -1
  141. package/dist/use-narrow.d.cts +12 -0
  142. package/dist/use-narrow.d.ts +12 -0
  143. package/dist/utils.d.cts +5 -0
  144. package/dist/utils.d.ts +5 -0
  145. package/dist/vite.cjs +4 -3
  146. package/dist/vite.d.cts +29 -0
  147. package/dist/vite.d.ts +29 -0
  148. package/dist/vite.js +4 -3
  149. package/dist/white-label.d.cts +59 -0
  150. package/dist/white-label.d.ts +59 -0
  151. package/package.json +12 -2
  152. package/src/auth.tsx +198 -0
  153. package/src/engine.ts +24 -3
  154. package/src/index.ts +1 -1
  155. package/src/next.ts +10 -0
  156. package/src/skeleton.tsx +36 -7
  157. package/src/tooltip.tsx +13 -5
  158. package/src/vite.ts +4 -9
  159. package/tokens.css +828 -317
package/dist/tabs.d.ts ADDED
@@ -0,0 +1,78 @@
1
+ import * as RadixTabs from '@radix-ui/react-tabs';
2
+ import * as React from 'react';
3
+
4
+ type TabsVariant = 'solid' | 'secondary' | 'segmented' | 'unstyled';
5
+ type TabsSize = 'sm' | 'md' | 'free';
6
+ interface TabsProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixTabs.Root>, 'onValueChange'> {
7
+ /** Visual variant. Default: "solid". */
8
+ variant?: TabsVariant;
9
+ /** Size preset. Default: "md". */
10
+ size?: TabsSize;
11
+ /** Stretch triggers to fill the list width. */
12
+ fitted?: boolean;
13
+ /**
14
+ * @deprecated Chakra-compat. Radix mounts lazily by default (content only
15
+ * renders when active). Kept so call-sites don't break at compile time.
16
+ */
17
+ lazyMount?: boolean;
18
+ /**
19
+ * @deprecated Chakra-compat. Radix unmounts inactive content by default.
20
+ * Kept so call-sites don't break at compile time.
21
+ */
22
+ unmountOnExit?: boolean;
23
+ /**
24
+ * Chakra-compatible value-change handler.
25
+ * Accepts both `(details: { value: string }) => void` (Chakra convention)
26
+ * and `(value: string) => void` (Radix convention).
27
+ */
28
+ onValueChange?: ((details: {
29
+ value: string;
30
+ }) => void) | ((value: string) => void);
31
+ }
32
+ declare const TabsRoot: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
33
+ interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
34
+ asChild?: boolean;
35
+ loop?: boolean;
36
+ flexWrap?: string;
37
+ alignItems?: string;
38
+ whiteSpace?: string;
39
+ bgColor?: string;
40
+ marginBottom?: number | string;
41
+ mx?: string | Record<string, string>;
42
+ px?: string | Record<string, string>;
43
+ w?: string | Record<string, string>;
44
+ overflowX?: string | Record<string, string>;
45
+ overscrollBehaviorX?: string;
46
+ css?: Record<string, unknown>;
47
+ position?: string;
48
+ boxShadow?: string | Record<string, string>;
49
+ top?: number | string;
50
+ zIndex?: string | Record<string, string>;
51
+ }
52
+ declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
53
+ interface TabsTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixTabs.Trigger>, 'dir'> {
54
+ scrollSnapAlign?: string;
55
+ flexShrink?: number;
56
+ bgColor?: string | Record<string, string>;
57
+ w?: string;
58
+ py?: string;
59
+ borderRadius?: string;
60
+ fontWeight?: string;
61
+ color?: string;
62
+ _hover?: Record<string, string>;
63
+ position?: string;
64
+ top?: string;
65
+ left?: string;
66
+ visibility?: string;
67
+ }
68
+ declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
69
+ interface TabsContentProps extends React.ComponentPropsWithoutRef<typeof RadixTabs.Content> {
70
+ padding?: number | string;
71
+ }
72
+ declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
73
+ interface TabsCounterProps {
74
+ count?: number | null;
75
+ }
76
+ declare const TabsCounter: ({ count }: TabsCounterProps) => React.ReactElement | null;
77
+
78
+ export { TabsContent, type TabsContentProps, TabsCounter, type TabsCounterProps, TabsList, type TabsListProps, type TabsProps, TabsRoot, TabsTrigger, type TabsTriggerProps };
package/dist/tag.cjs CHANGED
@@ -208,11 +208,7 @@ function stripShims(props) {
208
208
  for (const k of SHIM_PROPS) delete out[k];
209
209
  return out;
210
210
  }
211
- var SKELETON_CLASSES = [
212
- "animate-skeleton-shimmer rounded-sm",
213
- "bg-[linear-gradient(90deg,var(--color-skeleton-start)_0%,var(--color-skeleton-end)_50%,var(--color-skeleton-start)_100%)]",
214
- "bg-[length:200%_100%]"
215
- ].join(" ");
211
+ var SKELETON_CLASSES = "lux-skeleton rounded-sm";
216
212
  var HIDE_BELOW_MAP = { lg: "lg:hidden", md: "md:hidden", sm: "sm:hidden" };
217
213
  var Skeleton = React4__namespace.forwardRef(
218
214
  function Skeleton2(props, ref) {
@@ -232,7 +228,7 @@ var Skeleton = React4__namespace.forwardRef(
232
228
  {
233
229
  ref,
234
230
  "data-loading": true,
235
- className: cn(SKELETON_CLASSES, "text-transparent [&_*]:invisible", cls),
231
+ className: cn(SKELETON_CLASSES, "[&_*]:invisible", cls),
236
232
  style: mergedStyle,
237
233
  ...htmlRest,
238
234
  children
@@ -244,7 +240,7 @@ var Skeleton = React4__namespace.forwardRef(
244
240
  {
245
241
  ref,
246
242
  "data-loading": true,
247
- className: cn(SKELETON_CLASSES, children ? "text-transparent [&_*]:invisible" : "min-h-5", cls),
243
+ className: cn(SKELETON_CLASSES, children ? "[&_*]:invisible" : "min-h-5", cls),
248
244
  style: mergedStyle,
249
245
  ...htmlRest,
250
246
  children
@@ -375,7 +371,7 @@ var Tooltip = React4__namespace.forwardRef(
375
371
  {
376
372
  ref: triggerRef,
377
373
  asChild: true,
378
- ...isMobile ? { onPress: handleTriggerClick } : {},
374
+ ...isMobile ? { onClick: handleTriggerClick } : {},
379
375
  ...triggerProps,
380
376
  children
381
377
  }
package/dist/tag.d.cts ADDED
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+
3
+ type TagVariant = 'subtle' | 'clickable' | 'filter' | 'select';
4
+ type TagSize = 'sm' | 'md' | 'lg';
5
+ interface TagProps extends Omit<React.ComponentPropsWithRef<'span'>, 'size'> {
6
+ readonly variant?: TagVariant;
7
+ readonly size?: TagSize;
8
+ readonly startElement?: React.ReactNode;
9
+ readonly endElement?: React.ReactNode;
10
+ readonly endElementProps?: React.HTMLAttributes<HTMLSpanElement>;
11
+ readonly label?: string;
12
+ readonly onClose?: VoidFunction;
13
+ readonly closable?: boolean;
14
+ readonly truncated?: boolean;
15
+ readonly loading?: boolean;
16
+ readonly selected?: boolean;
17
+ readonly disabled?: boolean;
18
+ }
19
+ declare const Tag: React.ForwardRefExoticComponent<Omit<TagProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
20
+
21
+ export { Tag, type TagProps };
package/dist/tag.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+
3
+ type TagVariant = 'subtle' | 'clickable' | 'filter' | 'select';
4
+ type TagSize = 'sm' | 'md' | 'lg';
5
+ interface TagProps extends Omit<React.ComponentPropsWithRef<'span'>, 'size'> {
6
+ readonly variant?: TagVariant;
7
+ readonly size?: TagSize;
8
+ readonly startElement?: React.ReactNode;
9
+ readonly endElement?: React.ReactNode;
10
+ readonly endElementProps?: React.HTMLAttributes<HTMLSpanElement>;
11
+ readonly label?: string;
12
+ readonly onClose?: VoidFunction;
13
+ readonly closable?: boolean;
14
+ readonly truncated?: boolean;
15
+ readonly loading?: boolean;
16
+ readonly selected?: boolean;
17
+ readonly disabled?: boolean;
18
+ }
19
+ declare const Tag: React.ForwardRefExoticComponent<Omit<TagProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
20
+
21
+ export { Tag, type TagProps };
package/dist/tag.js CHANGED
@@ -186,11 +186,7 @@ function stripShims(props) {
186
186
  for (const k of SHIM_PROPS) delete out[k];
187
187
  return out;
188
188
  }
189
- var SKELETON_CLASSES = [
190
- "animate-skeleton-shimmer rounded-sm",
191
- "bg-[linear-gradient(90deg,var(--color-skeleton-start)_0%,var(--color-skeleton-end)_50%,var(--color-skeleton-start)_100%)]",
192
- "bg-[length:200%_100%]"
193
- ].join(" ");
189
+ var SKELETON_CLASSES = "lux-skeleton rounded-sm";
194
190
  var HIDE_BELOW_MAP = { lg: "lg:hidden", md: "md:hidden", sm: "sm:hidden" };
195
191
  var Skeleton = React4.forwardRef(
196
192
  function Skeleton2(props, ref) {
@@ -210,7 +206,7 @@ var Skeleton = React4.forwardRef(
210
206
  {
211
207
  ref,
212
208
  "data-loading": true,
213
- className: cn(SKELETON_CLASSES, "text-transparent [&_*]:invisible", cls),
209
+ className: cn(SKELETON_CLASSES, "[&_*]:invisible", cls),
214
210
  style: mergedStyle,
215
211
  ...htmlRest,
216
212
  children
@@ -222,7 +218,7 @@ var Skeleton = React4.forwardRef(
222
218
  {
223
219
  ref,
224
220
  "data-loading": true,
225
- className: cn(SKELETON_CLASSES, children ? "text-transparent [&_*]:invisible" : "min-h-5", cls),
221
+ className: cn(SKELETON_CLASSES, children ? "[&_*]:invisible" : "min-h-5", cls),
226
222
  style: mergedStyle,
227
223
  ...htmlRest,
228
224
  children
@@ -353,7 +349,7 @@ var Tooltip = React4.forwardRef(
353
349
  {
354
350
  ref: triggerRef,
355
351
  asChild: true,
356
- ...isMobile ? { onPress: handleTriggerClick } : {},
352
+ ...isMobile ? { onClick: handleTriggerClick } : {},
357
353
  ...triggerProps,
358
354
  children
359
355
  }
@@ -0,0 +1,13 @@
1
+ import React__default from 'react';
2
+
3
+ type TextareaSize = 'xs' | 'sm' | 'md' | 'lg' | '2xl';
4
+ type TextareaVariant = 'outline' | 'filled' | 'unstyled';
5
+ interface TextareaProps extends Omit<React__default.ComponentPropsWithRef<'textarea'>, 'size'> {
6
+ readonly size?: TextareaSize;
7
+ readonly variant?: TextareaVariant;
8
+ /** Tamagui / React-Native convention — bridged to native `onChange` (see Input). */
9
+ readonly onChangeText?: (text: string) => void;
10
+ }
11
+ declare const Textarea: React__default.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React__default.RefAttributes<HTMLTextAreaElement>>;
12
+
13
+ export { Textarea, type TextareaProps };
@@ -0,0 +1,13 @@
1
+ import React__default from 'react';
2
+
3
+ type TextareaSize = 'xs' | 'sm' | 'md' | 'lg' | '2xl';
4
+ type TextareaVariant = 'outline' | 'filled' | 'unstyled';
5
+ interface TextareaProps extends Omit<React__default.ComponentPropsWithRef<'textarea'>, 'size'> {
6
+ readonly size?: TextareaSize;
7
+ readonly variant?: TextareaVariant;
8
+ /** Tamagui / React-Native convention — bridged to native `onChange` (see Input). */
9
+ readonly onChangeText?: (text: string) => void;
10
+ }
11
+ declare const Textarea: React__default.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React__default.RefAttributes<HTMLTextAreaElement>>;
12
+
13
+ export { Textarea, type TextareaProps };
@@ -0,0 +1,29 @@
1
+ import React__default from 'react';
2
+
3
+ interface ToastOptions {
4
+ readonly id?: string | number;
5
+ readonly title?: string;
6
+ readonly description?: string;
7
+ readonly type?: 'info' | 'warning' | 'success' | 'error' | 'loading';
8
+ readonly duration?: number;
9
+ readonly action?: {
10
+ readonly label: string;
11
+ readonly onClick: () => void;
12
+ };
13
+ readonly onStatusChange?: (details: {
14
+ readonly status: string;
15
+ }) => void;
16
+ }
17
+ declare function create(opts: ToastOptions): string | number;
18
+ declare function update(id: string | number, opts: ToastOptions): void;
19
+ declare const toaster: {
20
+ readonly create: typeof create;
21
+ readonly success: (opts: ToastOptions) => string | number;
22
+ readonly error: (opts: ToastOptions) => string | number;
23
+ readonly loading: (opts: ToastOptions) => string | number;
24
+ readonly update: typeof update;
25
+ readonly remove: (id: string | number) => string | number;
26
+ };
27
+ declare const Toaster: React__default.FC;
28
+
29
+ export { Toaster, toaster };
@@ -0,0 +1,29 @@
1
+ import React__default from 'react';
2
+
3
+ interface ToastOptions {
4
+ readonly id?: string | number;
5
+ readonly title?: string;
6
+ readonly description?: string;
7
+ readonly type?: 'info' | 'warning' | 'success' | 'error' | 'loading';
8
+ readonly duration?: number;
9
+ readonly action?: {
10
+ readonly label: string;
11
+ readonly onClick: () => void;
12
+ };
13
+ readonly onStatusChange?: (details: {
14
+ readonly status: string;
15
+ }) => void;
16
+ }
17
+ declare function create(opts: ToastOptions): string | number;
18
+ declare function update(id: string | number, opts: ToastOptions): void;
19
+ declare const toaster: {
20
+ readonly create: typeof create;
21
+ readonly success: (opts: ToastOptions) => string | number;
22
+ readonly error: (opts: ToastOptions) => string | number;
23
+ readonly loading: (opts: ToastOptions) => string | number;
24
+ readonly update: typeof update;
25
+ readonly remove: (id: string | number) => string | number;
26
+ };
27
+ declare const Toaster: React__default.FC;
28
+
29
+ export { Toaster, toaster };
package/dist/tooltip.cjs CHANGED
@@ -126,7 +126,7 @@ var Tooltip = React2__namespace.forwardRef(
126
126
  {
127
127
  ref: triggerRef,
128
128
  asChild: true,
129
- ...isMobile ? { onPress: handleTriggerClick } : {},
129
+ ...isMobile ? { onClick: handleTriggerClick } : {},
130
130
  ...triggerProps,
131
131
  children
132
132
  }
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+
3
+ interface TooltipProps {
4
+ selected?: boolean;
5
+ showArrow?: boolean;
6
+ portalled?: boolean;
7
+ portalRef?: React.RefObject<HTMLElement>;
8
+ content: React.ReactNode;
9
+ contentProps?: React.HTMLAttributes<HTMLDivElement>;
10
+ triggerProps?: React.HTMLAttributes<HTMLButtonElement>;
11
+ disabled?: boolean;
12
+ disableOnMobile?: boolean;
13
+ children?: React.ReactNode;
14
+ variant?: string;
15
+ open?: boolean;
16
+ defaultOpen?: boolean;
17
+ onOpenChange?: (details: {
18
+ open: boolean;
19
+ }) => void;
20
+ closeDelay?: number;
21
+ openDelay?: number;
22
+ interactive?: boolean;
23
+ lazyMount?: boolean;
24
+ unmountOnExit?: boolean;
25
+ positioning?: {
26
+ placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
27
+ overflowPadding?: number;
28
+ offset?: {
29
+ mainAxis?: number;
30
+ crossAxis?: number;
31
+ };
32
+ };
33
+ closeOnClick?: boolean;
34
+ closeOnPointerDown?: boolean;
35
+ }
36
+ declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
37
+
38
+ export { Tooltip, type TooltipProps };
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+
3
+ interface TooltipProps {
4
+ selected?: boolean;
5
+ showArrow?: boolean;
6
+ portalled?: boolean;
7
+ portalRef?: React.RefObject<HTMLElement>;
8
+ content: React.ReactNode;
9
+ contentProps?: React.HTMLAttributes<HTMLDivElement>;
10
+ triggerProps?: React.HTMLAttributes<HTMLButtonElement>;
11
+ disabled?: boolean;
12
+ disableOnMobile?: boolean;
13
+ children?: React.ReactNode;
14
+ variant?: string;
15
+ open?: boolean;
16
+ defaultOpen?: boolean;
17
+ onOpenChange?: (details: {
18
+ open: boolean;
19
+ }) => void;
20
+ closeDelay?: number;
21
+ openDelay?: number;
22
+ interactive?: boolean;
23
+ lazyMount?: boolean;
24
+ unmountOnExit?: boolean;
25
+ positioning?: {
26
+ placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
27
+ overflowPadding?: number;
28
+ offset?: {
29
+ mainAxis?: number;
30
+ crossAxis?: number;
31
+ };
32
+ };
33
+ closeOnClick?: boolean;
34
+ closeOnPointerDown?: boolean;
35
+ }
36
+ declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
37
+
38
+ export { Tooltip, type TooltipProps };
package/dist/tooltip.js CHANGED
@@ -104,7 +104,7 @@ var Tooltip = React2.forwardRef(
104
104
  {
105
105
  ref: triggerRef,
106
106
  asChild: true,
107
- ...isMobile ? { onPress: handleTriggerClick } : {},
107
+ ...isMobile ? { onClick: handleTriggerClick } : {},
108
108
  ...triggerProps,
109
109
  children
110
110
  }
@@ -0,0 +1,12 @@
1
+ /** Below this the UI is a phone: menus become sheets, drawers drag. */
2
+ declare const NARROW_PX = 640;
3
+ /** Below this the pointer is a finger: hover-only affordances are suppressed. */
4
+ declare const TOUCH_PX = 1024;
5
+ /** True while the viewport is narrower than `px`. */
6
+ declare function useBelow(px: number): boolean;
7
+ /** Phone-sized: present menus as sheets. */
8
+ declare const useIsNarrow: () => boolean;
9
+ /** Touch-sized: no hover, so hover-only affordances must not be the only path. */
10
+ declare const useIsTouch: () => boolean;
11
+
12
+ export { NARROW_PX, TOUCH_PX, useBelow, useIsNarrow, useIsTouch };
@@ -0,0 +1,12 @@
1
+ /** Below this the UI is a phone: menus become sheets, drawers drag. */
2
+ declare const NARROW_PX = 640;
3
+ /** Below this the pointer is a finger: hover-only affordances are suppressed. */
4
+ declare const TOUCH_PX = 1024;
5
+ /** True while the viewport is narrower than `px`. */
6
+ declare function useBelow(px: number): boolean;
7
+ /** Phone-sized: present menus as sheets. */
8
+ declare const useIsNarrow: () => boolean;
9
+ /** Touch-sized: no hover, so hover-only affordances must not be the only path. */
10
+ declare const useIsTouch: () => boolean;
11
+
12
+ export { NARROW_PX, TOUCH_PX, useBelow, useIsNarrow, useIsTouch };
@@ -0,0 +1,5 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ declare function cn(...inputs: ClassValue[]): string;
4
+
5
+ export { cn };
@@ -0,0 +1,5 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ declare function cn(...inputs: ClassValue[]): string;
4
+
5
+ export { cn };
package/dist/vite.cjs CHANGED
@@ -73,14 +73,15 @@ var GUI_DEFINES = {
73
73
  "process.env.EXPO_OS": JSON.stringify("web"),
74
74
  "process.env.IS_WEB": JSON.stringify("true")
75
75
  };
76
-
77
- // src/vite.ts
78
- var DEDUPE = [
76
+ var ENGINE_DEDUPE = [
79
77
  "react",
80
78
  "react-dom",
81
79
  "@tanstack/react-query",
82
80
  ...GUI_PACKAGES
83
81
  ];
82
+
83
+ // src/vite.ts
84
+ var DEDUPE = ENGINE_DEDUPE;
84
85
  var INCLUDE = [
85
86
  "react-native-web",
86
87
  "@react-native/normalize-color",
@@ -0,0 +1,29 @@
1
+ interface LuxUiViteOptions {
2
+ /**
3
+ * Extra packages to keep to a single physical copy. React, the gui engine and
4
+ * TanStack Query are always deduped.
5
+ */
6
+ readonly dedupe?: ReadonlyArray<string>;
7
+ /**
8
+ * Extra packages to pre-bundle. The engine, react-native-web and the CJS-only
9
+ * colour helper are always included.
10
+ */
11
+ readonly include?: ReadonlyArray<string>;
12
+ }
13
+ /** Minimal structural shape of a Vite plugin — avoids a hard `vite` type dep. */
14
+ interface LuxUiVitePlugin {
15
+ readonly name: string;
16
+ readonly config: () => {
17
+ define: Record<string, string>;
18
+ resolve: {
19
+ alias: Record<string, string>;
20
+ dedupe: Array<string>;
21
+ };
22
+ optimizeDeps: {
23
+ include: Array<string>;
24
+ };
25
+ };
26
+ }
27
+ declare function luxUi(options?: LuxUiViteOptions): LuxUiVitePlugin;
28
+
29
+ export { type LuxUiViteOptions, luxUi };
package/dist/vite.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ interface LuxUiViteOptions {
2
+ /**
3
+ * Extra packages to keep to a single physical copy. React, the gui engine and
4
+ * TanStack Query are always deduped.
5
+ */
6
+ readonly dedupe?: ReadonlyArray<string>;
7
+ /**
8
+ * Extra packages to pre-bundle. The engine, react-native-web and the CJS-only
9
+ * colour helper are always included.
10
+ */
11
+ readonly include?: ReadonlyArray<string>;
12
+ }
13
+ /** Minimal structural shape of a Vite plugin — avoids a hard `vite` type dep. */
14
+ interface LuxUiVitePlugin {
15
+ readonly name: string;
16
+ readonly config: () => {
17
+ define: Record<string, string>;
18
+ resolve: {
19
+ alias: Record<string, string>;
20
+ dedupe: Array<string>;
21
+ };
22
+ optimizeDeps: {
23
+ include: Array<string>;
24
+ };
25
+ };
26
+ }
27
+ declare function luxUi(options?: LuxUiViteOptions): LuxUiVitePlugin;
28
+
29
+ export { type LuxUiViteOptions, luxUi };
package/dist/vite.js CHANGED
@@ -71,14 +71,15 @@ var GUI_DEFINES = {
71
71
  "process.env.EXPO_OS": JSON.stringify("web"),
72
72
  "process.env.IS_WEB": JSON.stringify("true")
73
73
  };
74
-
75
- // src/vite.ts
76
- var DEDUPE = [
74
+ var ENGINE_DEDUPE = [
77
75
  "react",
78
76
  "react-dom",
79
77
  "@tanstack/react-query",
80
78
  ...GUI_PACKAGES
81
79
  ];
80
+
81
+ // src/vite.ts
82
+ var DEDUPE = ENGINE_DEDUPE;
82
83
  var INCLUDE = [
83
84
  "react-native-web",
84
85
  "@react-native/normalize-color",
@@ -0,0 +1,59 @@
1
+ declare const LUX_BRAND: {
2
+ readonly lux: "#7000FF";
3
+ readonly zoo: "#6C5EFB";
4
+ readonly hanzo: "#EA580C";
5
+ readonly pars: "#1C3879";
6
+ readonly bootnode: "#3B82F6";
7
+ };
8
+ declare const PARS_GOLD = "#C8A45C";
9
+ type LuxBrand = keyof typeof LUX_BRAND;
10
+ type Org = LuxBrand;
11
+ interface OrgIdentity {
12
+ /** Org id — also the gui child-theme suffix (`dark_lux`, `dark_zoo`, …). */
13
+ readonly org: Org;
14
+ /** Display name for chrome (header, title, sign-in copy). */
15
+ readonly name: string;
16
+ /** Canonical apex domain. */
17
+ readonly domain: string;
18
+ /** IAM/OIDC host. The issuer is `https://` + this. */
19
+ readonly iamDomain: string;
20
+ /** Brand accent hex — the same value the gui child-theme row is built from. */
21
+ readonly accent: string;
22
+ /** Foreground used on top of the accent. */
23
+ readonly accentForeground: string;
24
+ }
25
+ declare const ORGS: Readonly<Record<Org, OrgIdentity>>;
26
+ declare const DEFAULT_ORG: Org;
27
+ interface WhiteLabel extends OrgIdentity {
28
+ /** Hostname the identity was resolved from, port stripped, lowercased. */
29
+ readonly host: string;
30
+ /** App slug taken from the hostname — `mpc.lux.cloud` → `mpc`. */
31
+ readonly app: string;
32
+ /** gui child-theme row to hand GuiProvider — `dark_lux`, `dark_zoo`, … */
33
+ readonly theme: string;
34
+ /** OIDC issuer — `https://lux.id`. */
35
+ readonly issuer: string;
36
+ /** IAM client id, `<org>-<app>` per the fleet naming scheme — `lux-mpc`. */
37
+ readonly clientId: string;
38
+ }
39
+ /**
40
+ * Resolve the full white-label identity from a Host header value.
41
+ *
42
+ * Pure and total: an unknown or missing host falls back to the Lux row rather
43
+ * than throwing, so a preview URL or a health probe never blanks the UI.
44
+ *
45
+ * resolveWhiteLabel('mpc.lux.network') // org lux, clientId lux-mpc, issuer https://lux.id
46
+ * resolveWhiteLabel('zoo.cloud') // org zoo, clientId zoo-cloud, issuer https://zoolabs.id
47
+ * resolveWhiteLabel('cloud.pars.network') // org pars, clientId pars-app, issuer https://pars.id
48
+ */
49
+ declare function resolveWhiteLabel(host?: string | null): WhiteLabel;
50
+ /**
51
+ * The current host in a browser, or '' during SSR / prerender.
52
+ * Server code must pass `req.headers.host` to resolveWhiteLabel explicitly —
53
+ * there is no ambient request here, and guessing would bake in a brand.
54
+ */
55
+ declare function currentHost(): string;
56
+ /** Identity for the org id itself, for the rare surface that is not host-routed. */
57
+ declare function orgIdentity(org: Org): OrgIdentity;
58
+
59
+ export { DEFAULT_ORG, LUX_BRAND, type LuxBrand, type Org, type OrgIdentity, PARS_GOLD, type WhiteLabel, currentHost, orgIdentity, ORGS as orgs, resolveWhiteLabel };
@@ -0,0 +1,59 @@
1
+ declare const LUX_BRAND: {
2
+ readonly lux: "#7000FF";
3
+ readonly zoo: "#6C5EFB";
4
+ readonly hanzo: "#EA580C";
5
+ readonly pars: "#1C3879";
6
+ readonly bootnode: "#3B82F6";
7
+ };
8
+ declare const PARS_GOLD = "#C8A45C";
9
+ type LuxBrand = keyof typeof LUX_BRAND;
10
+ type Org = LuxBrand;
11
+ interface OrgIdentity {
12
+ /** Org id — also the gui child-theme suffix (`dark_lux`, `dark_zoo`, …). */
13
+ readonly org: Org;
14
+ /** Display name for chrome (header, title, sign-in copy). */
15
+ readonly name: string;
16
+ /** Canonical apex domain. */
17
+ readonly domain: string;
18
+ /** IAM/OIDC host. The issuer is `https://` + this. */
19
+ readonly iamDomain: string;
20
+ /** Brand accent hex — the same value the gui child-theme row is built from. */
21
+ readonly accent: string;
22
+ /** Foreground used on top of the accent. */
23
+ readonly accentForeground: string;
24
+ }
25
+ declare const ORGS: Readonly<Record<Org, OrgIdentity>>;
26
+ declare const DEFAULT_ORG: Org;
27
+ interface WhiteLabel extends OrgIdentity {
28
+ /** Hostname the identity was resolved from, port stripped, lowercased. */
29
+ readonly host: string;
30
+ /** App slug taken from the hostname — `mpc.lux.cloud` → `mpc`. */
31
+ readonly app: string;
32
+ /** gui child-theme row to hand GuiProvider — `dark_lux`, `dark_zoo`, … */
33
+ readonly theme: string;
34
+ /** OIDC issuer — `https://lux.id`. */
35
+ readonly issuer: string;
36
+ /** IAM client id, `<org>-<app>` per the fleet naming scheme — `lux-mpc`. */
37
+ readonly clientId: string;
38
+ }
39
+ /**
40
+ * Resolve the full white-label identity from a Host header value.
41
+ *
42
+ * Pure and total: an unknown or missing host falls back to the Lux row rather
43
+ * than throwing, so a preview URL or a health probe never blanks the UI.
44
+ *
45
+ * resolveWhiteLabel('mpc.lux.network') // org lux, clientId lux-mpc, issuer https://lux.id
46
+ * resolveWhiteLabel('zoo.cloud') // org zoo, clientId zoo-cloud, issuer https://zoolabs.id
47
+ * resolveWhiteLabel('cloud.pars.network') // org pars, clientId pars-app, issuer https://pars.id
48
+ */
49
+ declare function resolveWhiteLabel(host?: string | null): WhiteLabel;
50
+ /**
51
+ * The current host in a browser, or '' during SSR / prerender.
52
+ * Server code must pass `req.headers.host` to resolveWhiteLabel explicitly —
53
+ * there is no ambient request here, and guessing would bake in a brand.
54
+ */
55
+ declare function currentHost(): string;
56
+ /** Identity for the org id itself, for the rare surface that is not host-routed. */
57
+ declare function orgIdentity(org: Org): OrgIdentity;
58
+
59
+ export { DEFAULT_ORG, LUX_BRAND, type LuxBrand, type Org, type OrgIdentity, PARS_GOLD, type WhiteLabel, currentHost, orgIdentity, ORGS as orgs, resolveWhiteLabel };