@luxfi/ui 7.4.0 → 7.4.3
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/avatar.cjs +7 -6
- package/dist/avatar.js +7 -5
- package/dist/badge.cjs +33 -35
- package/dist/badge.js +33 -35
- package/dist/bank.d.cts +3 -3
- package/dist/bank.d.ts +3 -3
- package/dist/checkbox.cjs +4 -4
- package/dist/checkbox.d.cts +3 -2
- package/dist/checkbox.d.ts +3 -2
- package/dist/checkbox.js +5 -4
- package/dist/chrome.cjs +960 -0
- package/dist/chrome.d.cts +93 -0
- package/dist/chrome.d.ts +93 -0
- package/dist/chrome.js +931 -0
- package/dist/drawer.cjs +86 -20
- package/dist/drawer.js +85 -19
- package/dist/expiration-selector.cjs +3 -2
- package/dist/expiration-selector.js +3 -2
- package/dist/greeks-display.cjs +6 -6
- package/dist/greeks-display.js +6 -6
- package/dist/gui.cjs +13 -0
- package/dist/gui.d.cts +2 -0
- package/dist/gui.d.ts +2 -0
- package/dist/gui.js +2 -0
- package/dist/heading.cjs +4 -2
- package/dist/heading.js +4 -2
- package/dist/iam.cjs +216 -0
- package/dist/iam.d.cts +65 -0
- package/dist/iam.d.ts +65 -0
- package/dist/iam.js +211 -0
- package/dist/icons.cjs +13 -0
- package/dist/icons.d.cts +1 -0
- package/dist/icons.d.ts +1 -0
- package/dist/icons.js +2 -0
- package/dist/identity.cjs +430 -0
- package/dist/identity.d.cts +64 -0
- package/dist/identity.d.ts +64 -0
- package/dist/identity.js +408 -0
- package/dist/index.cjs +1610 -836
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1587 -831
- package/dist/input.cjs +3 -1
- package/dist/input.d.cts +3 -5
- package/dist/input.d.ts +3 -5
- package/dist/input.js +3 -1
- package/dist/lux.config.cjs +23 -2
- package/dist/lux.config.d.cts +28 -10
- package/dist/lux.config.d.ts +28 -10
- package/dist/lux.config.js +23 -2
- package/dist/menu.cjs +4 -4
- package/dist/menu.js +4 -4
- package/dist/next.cjs +132 -0
- package/dist/next.d.cts +32 -0
- package/dist/next.d.ts +32 -0
- package/dist/next.js +129 -0
- package/dist/option-chain.cjs +1 -1
- package/dist/option-chain.js +1 -1
- package/dist/option-position.cjs +2 -1
- package/dist/option-position.js +2 -1
- package/dist/pnl-diagram.cjs +8 -6
- package/dist/pnl-diagram.js +8 -6
- package/dist/progress.cjs +7 -6
- package/dist/progress.js +7 -5
- package/dist/provider.cjs +146 -4
- package/dist/provider.d.cts +15 -3
- package/dist/provider.d.ts +15 -3
- package/dist/provider.js +146 -5
- package/dist/radio.cjs +9 -7
- package/dist/radio.js +10 -7
- package/dist/separator.cjs +3 -1
- package/dist/separator.js +3 -1
- package/dist/slider.cjs +28 -16
- package/dist/slider.js +28 -15
- package/dist/strategy-builder.cjs +2 -1
- package/dist/strategy-builder.js +2 -1
- package/dist/switch.cjs +11 -12
- package/dist/switch.js +12 -12
- package/dist/tag.cjs +34 -36
- package/dist/tag.js +33 -35
- package/dist/textarea.cjs +3 -1
- package/dist/textarea.js +3 -1
- package/dist/tooltip.cjs +28 -30
- package/dist/tooltip.js +27 -29
- package/dist/use-narrow.cjs +46 -0
- package/dist/use-narrow.d.cts +12 -0
- package/dist/use-narrow.d.ts +12 -0
- package/dist/use-narrow.js +20 -0
- package/dist/vite.cjs +109 -0
- package/dist/vite.d.cts +29 -0
- package/dist/vite.d.ts +29 -0
- package/dist/vite.js +107 -0
- package/dist/white-label.cjs +142 -0
- package/dist/white-label.d.cts +59 -0
- package/dist/white-label.d.ts +59 -0
- package/dist/white-label.js +134 -0
- package/package.json +85 -19
- package/src/avatar.tsx +22 -16
- package/src/checkbox.tsx +15 -10
- package/src/chrome.tsx +459 -0
- package/src/drawer.tsx +83 -10
- package/src/engine.ts +130 -0
- package/src/expiration-selector.tsx +3 -2
- package/src/greeks-display.tsx +9 -6
- package/src/gui.ts +17 -0
- package/src/heading.tsx +12 -8
- package/src/iam.ts +170 -0
- package/src/icons.ts +18 -0
- package/src/identity.tsx +318 -0
- package/src/index.ts +44 -1
- package/src/input.tsx +13 -9
- package/src/lux.config.ts +16 -15
- package/src/menu.tsx +4 -4
- package/src/next.ts +89 -0
- package/src/option-chain.tsx +1 -1
- package/src/option-position.tsx +2 -1
- package/src/pnl-diagram.tsx +11 -6
- package/src/progress.tsx +15 -8
- package/src/provider.tsx +48 -7
- package/src/radio.tsx +15 -11
- package/src/separator.tsx +8 -3
- package/src/slider.tsx +35 -19
- package/src/strategy-builder.tsx +3 -2
- package/src/switch.tsx +17 -16
- package/src/textarea.tsx +8 -4
- package/src/tooltip.tsx +15 -24
- package/src/use-narrow.ts +40 -0
- package/src/vite.ts +80 -0
- package/src/white-label.ts +254 -0
- package/tokens.css +613 -319
- package/src/tokens.css +0 -438
package/dist/input.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var gui = require('@hanzo/gui');
|
|
4
5
|
var React = require('react');
|
|
5
6
|
var clsx = require('clsx');
|
|
6
7
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -47,9 +48,10 @@ var Input = React__default.default.forwardRef(
|
|
|
47
48
|
[onChange, onChangeText]
|
|
48
49
|
);
|
|
49
50
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
50
|
-
|
|
51
|
+
gui.Input,
|
|
51
52
|
{
|
|
52
53
|
ref,
|
|
54
|
+
unstyled: true,
|
|
53
55
|
className: cn(INPUT_BASE, INPUT_SIZE_CLASSES[size], INPUT_VARIANT_CLASSES[variant], className),
|
|
54
56
|
...rest,
|
|
55
57
|
onChange: handleChange
|
package/dist/input.d.cts
CHANGED
|
@@ -6,11 +6,9 @@ interface InputProps extends Omit<React__default.ComponentPropsWithRef<'input'>,
|
|
|
6
6
|
readonly size?: InputSize;
|
|
7
7
|
readonly variant?: InputVariant;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* bridge, RN/Tamagui-style code (e.g. seed-phrase / PIN entry ported from a
|
|
13
|
-
* gui-based surface) passes `onChangeText` and the field silently no-ops.
|
|
9
|
+
* React-Native convention: called with the text value on every change. The gui
|
|
10
|
+
* Input raises it natively; on web we bridge it off `onChange`, so callers
|
|
11
|
+
* using EITHER API get updates on either platform.
|
|
14
12
|
*/
|
|
15
13
|
readonly onChangeText?: (text: string) => void;
|
|
16
14
|
}
|
package/dist/input.d.ts
CHANGED
|
@@ -6,11 +6,9 @@ interface InputProps extends Omit<React__default.ComponentPropsWithRef<'input'>,
|
|
|
6
6
|
readonly size?: InputSize;
|
|
7
7
|
readonly variant?: InputVariant;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* bridge, RN/Tamagui-style code (e.g. seed-phrase / PIN entry ported from a
|
|
13
|
-
* gui-based surface) passes `onChangeText` and the field silently no-ops.
|
|
9
|
+
* React-Native convention: called with the text value on every change. The gui
|
|
10
|
+
* Input raises it natively; on web we bridge it off `onChange`, so callers
|
|
11
|
+
* using EITHER API get updates on either platform.
|
|
14
12
|
*/
|
|
15
13
|
readonly onChangeText?: (text: string) => void;
|
|
16
14
|
}
|
package/dist/input.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Input as Input$1 } from '@hanzo/gui';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { clsx } from 'clsx';
|
|
4
5
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -41,9 +42,10 @@ var Input = React.forwardRef(
|
|
|
41
42
|
[onChange, onChangeText]
|
|
42
43
|
);
|
|
43
44
|
return /* @__PURE__ */ jsx(
|
|
44
|
-
|
|
45
|
+
Input$1,
|
|
45
46
|
{
|
|
46
47
|
ref,
|
|
48
|
+
unstyled: true,
|
|
47
49
|
className: cn(INPUT_BASE, INPUT_SIZE_CLASSES[size], INPUT_VARIANT_CLASSES[variant], className),
|
|
48
50
|
...rest,
|
|
49
51
|
onChange: handleChange
|
package/dist/lux.config.cjs
CHANGED
|
@@ -5,14 +5,33 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var gui = require('@hanzo/gui');
|
|
7
7
|
var v5 = require('@hanzogui/config/v5');
|
|
8
|
+
var v5Css = require('@hanzogui/config/v5-css');
|
|
8
9
|
|
|
10
|
+
// src/white-label.ts
|
|
9
11
|
var LUX_BRAND = {
|
|
10
12
|
lux: "#7000FF",
|
|
11
13
|
zoo: "#6C5EFB",
|
|
12
14
|
hanzo: "#EA580C",
|
|
13
|
-
pars: "#1C3879"
|
|
15
|
+
pars: "#1C3879",
|
|
16
|
+
// bootno.de is its own white label with its own IdP (id.bootno.de) — accent
|
|
17
|
+
// taken from the bootnode console's own brand default, not invented here.
|
|
18
|
+
bootnode: "#3B82F6"
|
|
14
19
|
};
|
|
15
20
|
var PARS_GOLD = "#C8A45C";
|
|
21
|
+
({
|
|
22
|
+
lux: {
|
|
23
|
+
accent: LUX_BRAND.lux},
|
|
24
|
+
zoo: {
|
|
25
|
+
accent: LUX_BRAND.zoo},
|
|
26
|
+
bootnode: {
|
|
27
|
+
accent: LUX_BRAND.lux},
|
|
28
|
+
hanzo: {
|
|
29
|
+
accent: LUX_BRAND.hanzo},
|
|
30
|
+
pars: {
|
|
31
|
+
accent: LUX_BRAND.pars}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// src/lux.config.ts
|
|
16
35
|
var TRUE_BLACK = "#000000";
|
|
17
36
|
var darkBase = {
|
|
18
37
|
...v5.defaultConfig.themes.dark,
|
|
@@ -34,10 +53,12 @@ var luxThemes = {
|
|
|
34
53
|
dark_lux: brandTheme(LUX_BRAND.lux),
|
|
35
54
|
dark_zoo: brandTheme(LUX_BRAND.zoo),
|
|
36
55
|
dark_hanzo: brandTheme(LUX_BRAND.hanzo),
|
|
37
|
-
dark_pars: brandTheme(LUX_BRAND.pars, { accentColor: PARS_GOLD })
|
|
56
|
+
dark_pars: brandTheme(LUX_BRAND.pars, { accentColor: PARS_GOLD }),
|
|
57
|
+
dark_bootnode: brandTheme(LUX_BRAND.bootnode)
|
|
38
58
|
};
|
|
39
59
|
var config = gui.createGui({
|
|
40
60
|
...v5.defaultConfig,
|
|
61
|
+
animations: v5Css.animations,
|
|
41
62
|
settings: {
|
|
42
63
|
...v5.defaultConfig.settings,
|
|
43
64
|
onlyAllowShorthands: false
|
package/dist/lux.config.d.cts
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import * as _hanzogui_web from '@hanzogui/web';
|
|
2
2
|
import * as _hanzogui_themes_v5 from '@hanzogui/themes/v5';
|
|
3
|
+
export { LUX_BRAND, LuxBrand, PARS_GOLD } from './white-label.cjs';
|
|
3
4
|
|
|
4
|
-
declare const LUX_BRAND: {
|
|
5
|
-
readonly lux: "#7000FF";
|
|
6
|
-
readonly zoo: "#6C5EFB";
|
|
7
|
-
readonly hanzo: "#EA580C";
|
|
8
|
-
readonly pars: "#1C3879";
|
|
9
|
-
};
|
|
10
|
-
declare const PARS_GOLD = "#C8A45C";
|
|
11
|
-
type LuxBrand = keyof typeof LUX_BRAND;
|
|
12
5
|
declare const luxThemes: {
|
|
13
6
|
dark: _hanzogui_themes_v5.V5Theme;
|
|
14
7
|
dark_lux: _hanzogui_themes_v5.V5Theme;
|
|
15
8
|
dark_zoo: _hanzogui_themes_v5.V5Theme;
|
|
16
9
|
dark_hanzo: _hanzogui_themes_v5.V5Theme;
|
|
17
10
|
dark_pars: _hanzogui_themes_v5.V5Theme;
|
|
11
|
+
dark_bootnode: _hanzogui_themes_v5.V5Theme;
|
|
18
12
|
};
|
|
19
13
|
declare const config: _hanzogui_web.GuiInternalConfig<{
|
|
20
14
|
readonly radius: {
|
|
@@ -137,6 +131,7 @@ declare const config: _hanzogui_web.GuiInternalConfig<{
|
|
|
137
131
|
dark_zoo: _hanzogui_themes_v5.V5Theme;
|
|
138
132
|
dark_hanzo: _hanzogui_themes_v5.V5Theme;
|
|
139
133
|
dark_pars: _hanzogui_themes_v5.V5Theme;
|
|
134
|
+
dark_bootnode: _hanzogui_themes_v5.V5Theme;
|
|
140
135
|
light: _hanzogui_themes_v5.V5Theme;
|
|
141
136
|
light_accent: _hanzogui_themes_v5.V5Theme;
|
|
142
137
|
dark_accent: _hanzogui_themes_v5.V5Theme;
|
|
@@ -368,7 +363,30 @@ declare const config: _hanzogui_web.GuiInternalConfig<{
|
|
|
368
363
|
readonly 'height-lg': {
|
|
369
364
|
readonly minHeight: number;
|
|
370
365
|
};
|
|
371
|
-
}, {
|
|
366
|
+
}, {
|
|
367
|
+
'0ms': string;
|
|
368
|
+
'50ms': string;
|
|
369
|
+
'75ms': string;
|
|
370
|
+
'100ms': string;
|
|
371
|
+
'200ms': string;
|
|
372
|
+
'250ms': string;
|
|
373
|
+
'300ms': string;
|
|
374
|
+
'400ms': string;
|
|
375
|
+
'500ms': string;
|
|
376
|
+
superBouncy: string;
|
|
377
|
+
bouncy: string;
|
|
378
|
+
superLazy: string;
|
|
379
|
+
lazy: string;
|
|
380
|
+
medium: string;
|
|
381
|
+
slowest: string;
|
|
382
|
+
slow: string;
|
|
383
|
+
quick: string;
|
|
384
|
+
quickLessBouncy: string;
|
|
385
|
+
quicker: string;
|
|
386
|
+
quickerLessBouncy: string;
|
|
387
|
+
quickest: string;
|
|
388
|
+
quickestLessBouncy: string;
|
|
389
|
+
}, {
|
|
372
390
|
body: _hanzogui_web.FillInFont<_hanzogui_web.GenericFont, 9 | 15 | 1 | 10 | 3 | 2 | 5 | 6 | 16 | 11 | 12 | 14 | 4 | 7 | 8 | 13 | "true">;
|
|
373
391
|
heading: _hanzogui_web.FillInFont<_hanzogui_web.GenericFont, 9 | 15 | 1 | 10 | 3 | 2 | 5 | 6 | 16 | 11 | 12 | 14 | 4 | 7 | 8 | 13 | "true">;
|
|
374
392
|
}, {
|
|
@@ -412,4 +430,4 @@ declare module '@hanzo/gui' {
|
|
|
412
430
|
}
|
|
413
431
|
}
|
|
414
432
|
|
|
415
|
-
export { type Conf,
|
|
433
|
+
export { type Conf, config, config as default, luxThemes };
|
package/dist/lux.config.d.ts
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import * as _hanzogui_web from '@hanzogui/web';
|
|
2
2
|
import * as _hanzogui_themes_v5 from '@hanzogui/themes/v5';
|
|
3
|
+
export { LUX_BRAND, LuxBrand, PARS_GOLD } from './white-label.js';
|
|
3
4
|
|
|
4
|
-
declare const LUX_BRAND: {
|
|
5
|
-
readonly lux: "#7000FF";
|
|
6
|
-
readonly zoo: "#6C5EFB";
|
|
7
|
-
readonly hanzo: "#EA580C";
|
|
8
|
-
readonly pars: "#1C3879";
|
|
9
|
-
};
|
|
10
|
-
declare const PARS_GOLD = "#C8A45C";
|
|
11
|
-
type LuxBrand = keyof typeof LUX_BRAND;
|
|
12
5
|
declare const luxThemes: {
|
|
13
6
|
dark: _hanzogui_themes_v5.V5Theme;
|
|
14
7
|
dark_lux: _hanzogui_themes_v5.V5Theme;
|
|
15
8
|
dark_zoo: _hanzogui_themes_v5.V5Theme;
|
|
16
9
|
dark_hanzo: _hanzogui_themes_v5.V5Theme;
|
|
17
10
|
dark_pars: _hanzogui_themes_v5.V5Theme;
|
|
11
|
+
dark_bootnode: _hanzogui_themes_v5.V5Theme;
|
|
18
12
|
};
|
|
19
13
|
declare const config: _hanzogui_web.GuiInternalConfig<{
|
|
20
14
|
readonly radius: {
|
|
@@ -137,6 +131,7 @@ declare const config: _hanzogui_web.GuiInternalConfig<{
|
|
|
137
131
|
dark_zoo: _hanzogui_themes_v5.V5Theme;
|
|
138
132
|
dark_hanzo: _hanzogui_themes_v5.V5Theme;
|
|
139
133
|
dark_pars: _hanzogui_themes_v5.V5Theme;
|
|
134
|
+
dark_bootnode: _hanzogui_themes_v5.V5Theme;
|
|
140
135
|
light: _hanzogui_themes_v5.V5Theme;
|
|
141
136
|
light_accent: _hanzogui_themes_v5.V5Theme;
|
|
142
137
|
dark_accent: _hanzogui_themes_v5.V5Theme;
|
|
@@ -368,7 +363,30 @@ declare const config: _hanzogui_web.GuiInternalConfig<{
|
|
|
368
363
|
readonly 'height-lg': {
|
|
369
364
|
readonly minHeight: number;
|
|
370
365
|
};
|
|
371
|
-
}, {
|
|
366
|
+
}, {
|
|
367
|
+
'0ms': string;
|
|
368
|
+
'50ms': string;
|
|
369
|
+
'75ms': string;
|
|
370
|
+
'100ms': string;
|
|
371
|
+
'200ms': string;
|
|
372
|
+
'250ms': string;
|
|
373
|
+
'300ms': string;
|
|
374
|
+
'400ms': string;
|
|
375
|
+
'500ms': string;
|
|
376
|
+
superBouncy: string;
|
|
377
|
+
bouncy: string;
|
|
378
|
+
superLazy: string;
|
|
379
|
+
lazy: string;
|
|
380
|
+
medium: string;
|
|
381
|
+
slowest: string;
|
|
382
|
+
slow: string;
|
|
383
|
+
quick: string;
|
|
384
|
+
quickLessBouncy: string;
|
|
385
|
+
quicker: string;
|
|
386
|
+
quickerLessBouncy: string;
|
|
387
|
+
quickest: string;
|
|
388
|
+
quickestLessBouncy: string;
|
|
389
|
+
}, {
|
|
372
390
|
body: _hanzogui_web.FillInFont<_hanzogui_web.GenericFont, 9 | 15 | 1 | 10 | 3 | 2 | 5 | 6 | 16 | 11 | 12 | 14 | 4 | 7 | 8 | 13 | "true">;
|
|
373
391
|
heading: _hanzogui_web.FillInFont<_hanzogui_web.GenericFont, 9 | 15 | 1 | 10 | 3 | 2 | 5 | 6 | 16 | 11 | 12 | 14 | 4 | 7 | 8 | 13 | "true">;
|
|
374
392
|
}, {
|
|
@@ -412,4 +430,4 @@ declare module '@hanzo/gui' {
|
|
|
412
430
|
}
|
|
413
431
|
}
|
|
414
432
|
|
|
415
|
-
export { type Conf,
|
|
433
|
+
export { type Conf, config, config as default, luxThemes };
|
package/dist/lux.config.js
CHANGED
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createGui } from '@hanzo/gui';
|
|
3
3
|
import { defaultConfig } from '@hanzogui/config/v5';
|
|
4
|
+
import { animations } from '@hanzogui/config/v5-css';
|
|
4
5
|
|
|
6
|
+
// src/white-label.ts
|
|
5
7
|
var LUX_BRAND = {
|
|
6
8
|
lux: "#7000FF",
|
|
7
9
|
zoo: "#6C5EFB",
|
|
8
10
|
hanzo: "#EA580C",
|
|
9
|
-
pars: "#1C3879"
|
|
11
|
+
pars: "#1C3879",
|
|
12
|
+
// bootno.de is its own white label with its own IdP (id.bootno.de) — accent
|
|
13
|
+
// taken from the bootnode console's own brand default, not invented here.
|
|
14
|
+
bootnode: "#3B82F6"
|
|
10
15
|
};
|
|
11
16
|
var PARS_GOLD = "#C8A45C";
|
|
17
|
+
({
|
|
18
|
+
lux: {
|
|
19
|
+
accent: LUX_BRAND.lux},
|
|
20
|
+
zoo: {
|
|
21
|
+
accent: LUX_BRAND.zoo},
|
|
22
|
+
bootnode: {
|
|
23
|
+
accent: LUX_BRAND.lux},
|
|
24
|
+
hanzo: {
|
|
25
|
+
accent: LUX_BRAND.hanzo},
|
|
26
|
+
pars: {
|
|
27
|
+
accent: LUX_BRAND.pars}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// src/lux.config.ts
|
|
12
31
|
var TRUE_BLACK = "#000000";
|
|
13
32
|
var darkBase = {
|
|
14
33
|
...defaultConfig.themes.dark,
|
|
@@ -30,10 +49,12 @@ var luxThemes = {
|
|
|
30
49
|
dark_lux: brandTheme(LUX_BRAND.lux),
|
|
31
50
|
dark_zoo: brandTheme(LUX_BRAND.zoo),
|
|
32
51
|
dark_hanzo: brandTheme(LUX_BRAND.hanzo),
|
|
33
|
-
dark_pars: brandTheme(LUX_BRAND.pars, { accentColor: PARS_GOLD })
|
|
52
|
+
dark_pars: brandTheme(LUX_BRAND.pars, { accentColor: PARS_GOLD }),
|
|
53
|
+
dark_bootnode: brandTheme(LUX_BRAND.bootnode)
|
|
34
54
|
};
|
|
35
55
|
var config = createGui({
|
|
36
56
|
...defaultConfig,
|
|
57
|
+
animations,
|
|
37
58
|
settings: {
|
|
38
59
|
...defaultConfig.settings,
|
|
39
60
|
onlyAllowShorthands: false
|
package/dist/menu.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var DropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var lucideReact = require('lucide-react');
|
|
7
7
|
var clsx = require('clsx');
|
|
8
8
|
var tailwindMerge = require('tailwind-merge');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -222,7 +222,7 @@ var MenuCheckboxItem = React__namespace.forwardRef(function MenuCheckboxItem2(pr
|
|
|
222
222
|
),
|
|
223
223
|
...rest,
|
|
224
224
|
children: [
|
|
225
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
225
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
226
226
|
children
|
|
227
227
|
]
|
|
228
228
|
}
|
|
@@ -257,7 +257,7 @@ var MenuRadioItem = React__namespace.forwardRef(function MenuRadioItem2(props, r
|
|
|
257
257
|
className
|
|
258
258
|
),
|
|
259
259
|
children: [
|
|
260
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
260
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
261
261
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children })
|
|
262
262
|
]
|
|
263
263
|
}
|
|
@@ -283,7 +283,7 @@ var MenuTriggerItem = React__namespace.forwardRef(function MenuTriggerItem2(prop
|
|
|
283
283
|
children: [
|
|
284
284
|
startIcon,
|
|
285
285
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1", children }),
|
|
286
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
286
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
|
|
287
287
|
]
|
|
288
288
|
}
|
|
289
289
|
) });
|
package/dist/menu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { Check, ChevronRight } from 'lucide-react';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -199,7 +199,7 @@ var MenuCheckboxItem = React.forwardRef(function MenuCheckboxItem2(props, ref) {
|
|
|
199
199
|
),
|
|
200
200
|
...rest,
|
|
201
201
|
children: [
|
|
202
|
-
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
202
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
203
203
|
children
|
|
204
204
|
]
|
|
205
205
|
}
|
|
@@ -234,7 +234,7 @@ var MenuRadioItem = React.forwardRef(function MenuRadioItem2(props, ref) {
|
|
|
234
234
|
className
|
|
235
235
|
),
|
|
236
236
|
children: [
|
|
237
|
-
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
237
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
238
238
|
/* @__PURE__ */ jsx("span", { children })
|
|
239
239
|
]
|
|
240
240
|
}
|
|
@@ -260,7 +260,7 @@ var MenuTriggerItem = React.forwardRef(function MenuTriggerItem2(props, ref) {
|
|
|
260
260
|
children: [
|
|
261
261
|
startIcon,
|
|
262
262
|
/* @__PURE__ */ jsx("span", { className: "flex-1", children }),
|
|
263
|
-
/* @__PURE__ */ jsx(
|
|
263
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
264
264
|
]
|
|
265
265
|
}
|
|
266
266
|
) });
|
package/dist/next.cjs
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
|
+
}) : x)(function(x) {
|
|
6
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
7
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// src/engine.ts
|
|
11
|
+
var GUI_PACKAGES = [
|
|
12
|
+
"@hanzo/gui",
|
|
13
|
+
"@hanzogui/accordion",
|
|
14
|
+
"@hanzogui/adapt",
|
|
15
|
+
"@hanzogui/alert-dialog",
|
|
16
|
+
"@hanzogui/animate",
|
|
17
|
+
"@hanzogui/animate-presence",
|
|
18
|
+
"@hanzogui/avatar",
|
|
19
|
+
"@hanzogui/button",
|
|
20
|
+
"@hanzogui/card",
|
|
21
|
+
"@hanzogui/checkbox",
|
|
22
|
+
"@hanzogui/collapsible",
|
|
23
|
+
"@hanzogui/component-helpers",
|
|
24
|
+
"@hanzogui/compose-refs",
|
|
25
|
+
"@hanzogui/config",
|
|
26
|
+
"@hanzogui/context-menu",
|
|
27
|
+
"@hanzogui/core",
|
|
28
|
+
"@hanzogui/create-context",
|
|
29
|
+
"@hanzogui/create-menu",
|
|
30
|
+
"@hanzogui/dialog",
|
|
31
|
+
"@hanzogui/dismissable",
|
|
32
|
+
"@hanzogui/element",
|
|
33
|
+
"@hanzogui/elements",
|
|
34
|
+
"@hanzogui/floating",
|
|
35
|
+
"@hanzogui/focus-scope",
|
|
36
|
+
"@hanzogui/font-size",
|
|
37
|
+
"@hanzogui/form",
|
|
38
|
+
"@hanzogui/get-token",
|
|
39
|
+
"@hanzogui/group",
|
|
40
|
+
"@hanzogui/helpers",
|
|
41
|
+
"@hanzogui/image",
|
|
42
|
+
"@hanzogui/input",
|
|
43
|
+
"@hanzogui/label",
|
|
44
|
+
"@hanzogui/list-item",
|
|
45
|
+
"@hanzogui/menu",
|
|
46
|
+
"@hanzogui/popover",
|
|
47
|
+
"@hanzogui/popper",
|
|
48
|
+
"@hanzogui/portal",
|
|
49
|
+
"@hanzogui/progress",
|
|
50
|
+
"@hanzogui/radio-group",
|
|
51
|
+
"@hanzogui/react-native-media-driver",
|
|
52
|
+
"@hanzogui/remove-scroll",
|
|
53
|
+
"@hanzogui/scroll-view",
|
|
54
|
+
"@hanzogui/select",
|
|
55
|
+
"@hanzogui/separator",
|
|
56
|
+
"@hanzogui/shapes",
|
|
57
|
+
"@hanzogui/sheet",
|
|
58
|
+
"@hanzogui/slider",
|
|
59
|
+
"@hanzogui/spacer",
|
|
60
|
+
"@hanzogui/spinner",
|
|
61
|
+
"@hanzogui/stacks",
|
|
62
|
+
"@hanzogui/switch",
|
|
63
|
+
"@hanzogui/tabs",
|
|
64
|
+
"@hanzogui/text",
|
|
65
|
+
"@hanzogui/theme",
|
|
66
|
+
"@hanzogui/toast",
|
|
67
|
+
"@hanzogui/toggle-group",
|
|
68
|
+
"@hanzogui/tooltip",
|
|
69
|
+
"@hanzogui/use-controllable-state",
|
|
70
|
+
"@hanzogui/use-debounce",
|
|
71
|
+
"@hanzogui/use-force-update",
|
|
72
|
+
"@hanzogui/use-presence",
|
|
73
|
+
"@hanzogui/use-window-dimensions",
|
|
74
|
+
"@hanzogui/visually-hidden",
|
|
75
|
+
"@hanzogui/web",
|
|
76
|
+
"@hanzogui/z-index-stack",
|
|
77
|
+
"@luxfi/ui"
|
|
78
|
+
];
|
|
79
|
+
var GUI_DEFINES = {
|
|
80
|
+
"process.env.EXPO_OS": JSON.stringify("web"),
|
|
81
|
+
"process.env.IS_WEB": JSON.stringify("true")
|
|
82
|
+
};
|
|
83
|
+
function guiAliases(from) {
|
|
84
|
+
const { createRequire } = __require("module");
|
|
85
|
+
const require_ = createRequire(`${from.replace(/\/?$/, "/")}noop.js`);
|
|
86
|
+
const alias = {};
|
|
87
|
+
for (const pkg of GUI_PACKAGES) {
|
|
88
|
+
try {
|
|
89
|
+
alias[`${pkg}$`] = require_.resolve(pkg);
|
|
90
|
+
} catch {
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return alias;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// src/next.ts
|
|
97
|
+
function withLuxUi(config = {}) {
|
|
98
|
+
const userWebpack = config.webpack;
|
|
99
|
+
const engine = guiAliases(config.dir ?? process.cwd());
|
|
100
|
+
const { dir: _dir, ...rest } = config;
|
|
101
|
+
return {
|
|
102
|
+
...rest,
|
|
103
|
+
transpilePackages: [.../* @__PURE__ */ new Set([...config.transpilePackages ?? [], ...GUI_PACKAGES])],
|
|
104
|
+
turbopack: {
|
|
105
|
+
...config.turbopack,
|
|
106
|
+
resolveAlias: {
|
|
107
|
+
"react-native": "react-native-web",
|
|
108
|
+
...config.turbopack?.resolveAlias
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
// Next inlines `env` into the client bundle, which is how the engine's
|
|
112
|
+
// module-scope platform checks get their answer under Turbopack too.
|
|
113
|
+
env: { EXPO_OS: "web", IS_WEB: "true", ...config.env },
|
|
114
|
+
webpack(webpackConfig, context) {
|
|
115
|
+
const next = userWebpack ? userWebpack(webpackConfig, context) : webpackConfig;
|
|
116
|
+
next.resolve = {
|
|
117
|
+
...next.resolve,
|
|
118
|
+
// The app's own aliases win — an app pinning a package on purpose is not
|
|
119
|
+
// something the umbrella should override.
|
|
120
|
+
alias: { "react-native$": "react-native-web", ...engine, ...next.resolve?.alias }
|
|
121
|
+
};
|
|
122
|
+
const webpackModule = context?.webpack;
|
|
123
|
+
if (webpackModule?.DefinePlugin) {
|
|
124
|
+
next.plugins = [...next.plugins ?? [], new webpackModule.DefinePlugin({ ...GUI_DEFINES })];
|
|
125
|
+
}
|
|
126
|
+
return next;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
exports.GUI_PACKAGES = GUI_PACKAGES;
|
|
132
|
+
exports.withLuxUi = withLuxUi;
|
package/dist/next.d.cts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Every package `@hanzo/gui` re-exports — the engine, in full. */
|
|
2
|
+
declare const GUI_PACKAGES: ReadonlyArray<string>;
|
|
3
|
+
|
|
4
|
+
interface WebpackConfig {
|
|
5
|
+
resolve?: {
|
|
6
|
+
alias?: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
plugins?: Array<unknown>;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
/** The structural slice of a Next config this wrapper touches. */
|
|
12
|
+
interface LuxUiNextConfig {
|
|
13
|
+
/** App root, for resolving the engine's single copy. Defaults to `cwd`. */
|
|
14
|
+
dir?: string;
|
|
15
|
+
transpilePackages?: Array<string>;
|
|
16
|
+
turbopack?: {
|
|
17
|
+
resolveAlias?: Record<string, string>;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
env?: Record<string, string>;
|
|
21
|
+
webpack?: (config: WebpackConfig, context: unknown) => WebpackConfig;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Wrap a Next config so `@luxfi/ui` and the gui engine build.
|
|
26
|
+
*
|
|
27
|
+
* Additive: an existing `transpilePackages`, `turbopack.resolveAlias`,
|
|
28
|
+
* `env` and `webpack()` are all preserved and extended, never replaced.
|
|
29
|
+
*/
|
|
30
|
+
declare function withLuxUi(config?: LuxUiNextConfig): LuxUiNextConfig;
|
|
31
|
+
|
|
32
|
+
export { GUI_PACKAGES, type LuxUiNextConfig, withLuxUi };
|
package/dist/next.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Every package `@hanzo/gui` re-exports — the engine, in full. */
|
|
2
|
+
declare const GUI_PACKAGES: ReadonlyArray<string>;
|
|
3
|
+
|
|
4
|
+
interface WebpackConfig {
|
|
5
|
+
resolve?: {
|
|
6
|
+
alias?: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
plugins?: Array<unknown>;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
/** The structural slice of a Next config this wrapper touches. */
|
|
12
|
+
interface LuxUiNextConfig {
|
|
13
|
+
/** App root, for resolving the engine's single copy. Defaults to `cwd`. */
|
|
14
|
+
dir?: string;
|
|
15
|
+
transpilePackages?: Array<string>;
|
|
16
|
+
turbopack?: {
|
|
17
|
+
resolveAlias?: Record<string, string>;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
env?: Record<string, string>;
|
|
21
|
+
webpack?: (config: WebpackConfig, context: unknown) => WebpackConfig;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Wrap a Next config so `@luxfi/ui` and the gui engine build.
|
|
26
|
+
*
|
|
27
|
+
* Additive: an existing `transpilePackages`, `turbopack.resolveAlias`,
|
|
28
|
+
* `env` and `webpack()` are all preserved and extended, never replaced.
|
|
29
|
+
*/
|
|
30
|
+
declare function withLuxUi(config?: LuxUiNextConfig): LuxUiNextConfig;
|
|
31
|
+
|
|
32
|
+
export { GUI_PACKAGES, type LuxUiNextConfig, withLuxUi };
|