@luxfi/ui 7.4.2 → 7.4.4

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/next.cjs CHANGED
@@ -1,6 +1,13 @@
1
1
  'use strict';
2
2
 
3
- // src/next.ts
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
4
11
  var GUI_PACKAGES = [
5
12
  "@hanzo/gui",
6
13
  "@hanzogui/accordion",
@@ -21,11 +28,16 @@ var GUI_PACKAGES = [
21
28
  "@hanzogui/create-context",
22
29
  "@hanzogui/create-menu",
23
30
  "@hanzogui/dialog",
31
+ "@hanzogui/dismissable",
24
32
  "@hanzogui/element",
25
33
  "@hanzogui/elements",
34
+ "@hanzogui/floating",
35
+ "@hanzogui/focus-scope",
26
36
  "@hanzogui/font-size",
27
37
  "@hanzogui/form",
38
+ "@hanzogui/get-token",
28
39
  "@hanzogui/group",
40
+ "@hanzogui/helpers",
29
41
  "@hanzogui/image",
30
42
  "@hanzogui/input",
31
43
  "@hanzogui/label",
@@ -37,6 +49,7 @@ var GUI_PACKAGES = [
37
49
  "@hanzogui/progress",
38
50
  "@hanzogui/radio-group",
39
51
  "@hanzogui/react-native-media-driver",
52
+ "@hanzogui/remove-scroll",
40
53
  "@hanzogui/scroll-view",
41
54
  "@hanzogui/select",
42
55
  "@hanzogui/separator",
@@ -56,19 +69,37 @@ var GUI_PACKAGES = [
56
69
  "@hanzogui/use-controllable-state",
57
70
  "@hanzogui/use-debounce",
58
71
  "@hanzogui/use-force-update",
72
+ "@hanzogui/use-presence",
59
73
  "@hanzogui/use-window-dimensions",
60
74
  "@hanzogui/visually-hidden",
61
75
  "@hanzogui/web",
76
+ "@hanzogui/z-index-stack",
62
77
  "@luxfi/ui"
63
78
  ];
64
- var DEFINES = {
79
+ var GUI_DEFINES = {
65
80
  "process.env.EXPO_OS": JSON.stringify("web"),
66
81
  "process.env.IS_WEB": JSON.stringify("true")
67
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
68
97
  function withLuxUi(config = {}) {
69
98
  const userWebpack = config.webpack;
99
+ const engine = guiAliases(config.dir ?? process.cwd());
100
+ const { dir: _dir, ...rest } = config;
70
101
  return {
71
- ...config,
102
+ ...rest,
72
103
  transpilePackages: [.../* @__PURE__ */ new Set([...config.transpilePackages ?? [], ...GUI_PACKAGES])],
73
104
  turbopack: {
74
105
  ...config.turbopack,
@@ -84,11 +115,13 @@ function withLuxUi(config = {}) {
84
115
  const next = userWebpack ? userWebpack(webpackConfig, context) : webpackConfig;
85
116
  next.resolve = {
86
117
  ...next.resolve,
87
- alias: { ...next.resolve?.alias, "react-native$": "react-native-web" }
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 }
88
121
  };
89
122
  const webpackModule = context?.webpack;
90
123
  if (webpackModule?.DefinePlugin) {
91
- next.plugins = [...next.plugins ?? [], new webpackModule.DefinePlugin(DEFINES)];
124
+ next.plugins = [...next.plugins ?? [], new webpackModule.DefinePlugin({ ...GUI_DEFINES })];
92
125
  }
93
126
  return next;
94
127
  }
package/dist/next.d.cts CHANGED
@@ -1,5 +1,6 @@
1
1
  /** Every package `@hanzo/gui` re-exports — the engine, in full. */
2
- declare const GUI_PACKAGES: string[];
2
+ declare const GUI_PACKAGES: ReadonlyArray<string>;
3
+
3
4
  interface WebpackConfig {
4
5
  resolve?: {
5
6
  alias?: Record<string, unknown>;
@@ -9,6 +10,8 @@ interface WebpackConfig {
9
10
  }
10
11
  /** The structural slice of a Next config this wrapper touches. */
11
12
  interface LuxUiNextConfig {
13
+ /** App root, for resolving the engine's single copy. Defaults to `cwd`. */
14
+ dir?: string;
12
15
  transpilePackages?: Array<string>;
13
16
  turbopack?: {
14
17
  resolveAlias?: Record<string, string>;
package/dist/next.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /** Every package `@hanzo/gui` re-exports — the engine, in full. */
2
- declare const GUI_PACKAGES: string[];
2
+ declare const GUI_PACKAGES: ReadonlyArray<string>;
3
+
3
4
  interface WebpackConfig {
4
5
  resolve?: {
5
6
  alias?: Record<string, unknown>;
@@ -9,6 +10,8 @@ interface WebpackConfig {
9
10
  }
10
11
  /** The structural slice of a Next config this wrapper touches. */
11
12
  interface LuxUiNextConfig {
13
+ /** App root, for resolving the engine's single copy. Defaults to `cwd`. */
14
+ dir?: string;
12
15
  transpilePackages?: Array<string>;
13
16
  turbopack?: {
14
17
  resolveAlias?: Record<string, string>;
package/dist/next.js CHANGED
@@ -1,4 +1,11 @@
1
- // src/next.ts
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+ // src/engine.ts
2
9
  var GUI_PACKAGES = [
3
10
  "@hanzo/gui",
4
11
  "@hanzogui/accordion",
@@ -19,11 +26,16 @@ var GUI_PACKAGES = [
19
26
  "@hanzogui/create-context",
20
27
  "@hanzogui/create-menu",
21
28
  "@hanzogui/dialog",
29
+ "@hanzogui/dismissable",
22
30
  "@hanzogui/element",
23
31
  "@hanzogui/elements",
32
+ "@hanzogui/floating",
33
+ "@hanzogui/focus-scope",
24
34
  "@hanzogui/font-size",
25
35
  "@hanzogui/form",
36
+ "@hanzogui/get-token",
26
37
  "@hanzogui/group",
38
+ "@hanzogui/helpers",
27
39
  "@hanzogui/image",
28
40
  "@hanzogui/input",
29
41
  "@hanzogui/label",
@@ -35,6 +47,7 @@ var GUI_PACKAGES = [
35
47
  "@hanzogui/progress",
36
48
  "@hanzogui/radio-group",
37
49
  "@hanzogui/react-native-media-driver",
50
+ "@hanzogui/remove-scroll",
38
51
  "@hanzogui/scroll-view",
39
52
  "@hanzogui/select",
40
53
  "@hanzogui/separator",
@@ -54,19 +67,37 @@ var GUI_PACKAGES = [
54
67
  "@hanzogui/use-controllable-state",
55
68
  "@hanzogui/use-debounce",
56
69
  "@hanzogui/use-force-update",
70
+ "@hanzogui/use-presence",
57
71
  "@hanzogui/use-window-dimensions",
58
72
  "@hanzogui/visually-hidden",
59
73
  "@hanzogui/web",
74
+ "@hanzogui/z-index-stack",
60
75
  "@luxfi/ui"
61
76
  ];
62
- var DEFINES = {
77
+ var GUI_DEFINES = {
63
78
  "process.env.EXPO_OS": JSON.stringify("web"),
64
79
  "process.env.IS_WEB": JSON.stringify("true")
65
80
  };
81
+ function guiAliases(from) {
82
+ const { createRequire } = __require("module");
83
+ const require_ = createRequire(`${from.replace(/\/?$/, "/")}noop.js`);
84
+ const alias = {};
85
+ for (const pkg of GUI_PACKAGES) {
86
+ try {
87
+ alias[`${pkg}$`] = require_.resolve(pkg);
88
+ } catch {
89
+ }
90
+ }
91
+ return alias;
92
+ }
93
+
94
+ // src/next.ts
66
95
  function withLuxUi(config = {}) {
67
96
  const userWebpack = config.webpack;
97
+ const engine = guiAliases(config.dir ?? process.cwd());
98
+ const { dir: _dir, ...rest } = config;
68
99
  return {
69
- ...config,
100
+ ...rest,
70
101
  transpilePackages: [.../* @__PURE__ */ new Set([...config.transpilePackages ?? [], ...GUI_PACKAGES])],
71
102
  turbopack: {
72
103
  ...config.turbopack,
@@ -82,11 +113,13 @@ function withLuxUi(config = {}) {
82
113
  const next = userWebpack ? userWebpack(webpackConfig, context) : webpackConfig;
83
114
  next.resolve = {
84
115
  ...next.resolve,
85
- alias: { ...next.resolve?.alias, "react-native$": "react-native-web" }
116
+ // The app's own aliases win — an app pinning a package on purpose is not
117
+ // something the umbrella should override.
118
+ alias: { "react-native$": "react-native-web", ...engine, ...next.resolve?.alias }
86
119
  };
87
120
  const webpackModule = context?.webpack;
88
121
  if (webpackModule?.DefinePlugin) {
89
- next.plugins = [...next.plugins ?? [], new webpackModule.DefinePlugin(DEFINES)];
122
+ next.plugins = [...next.plugins ?? [], new webpackModule.DefinePlugin({ ...GUI_DEFINES })];
90
123
  }
91
124
  return next;
92
125
  }
package/dist/provider.cjs CHANGED
@@ -36,10 +36,17 @@ var ORGS = {
36
36
  org: "zoo",
37
37
  name: "Zoo",
38
38
  domain: "zoo.ngo",
39
- // Zoo's IdP is `id.zoo.network`, not a `zoo.id` apex — the one row in this
40
- // table where the issuer is not `<org>.id`, and the one every hand-rolled
41
- // per-app branding map got wrong.
42
- iamDomain: "id.zoo.network",
39
+ // Zoo's issuer is `zoolabs.id` — the one row where it is not `<org>.id`,
40
+ // and the one every hand-rolled branding map gets wrong. `id.zoo.network`
41
+ // ANSWERS, which is why it keeps being copied around, but it is an alias:
42
+ // its own discovery document advertises
43
+ // issuer https://zoolabs.id
44
+ // authorization_endpoint https://zoolabs.id/v1/iam/oauth/authorize
45
+ // jwks_uri https://zoolabs.id/v1/iam/.well-known/jwks
46
+ // so a client configured on the alias validates `iss` against a string the
47
+ // IdP never emits and rejects every token it is given — the exact shape of
48
+ // the lux.id outage. `zoo.id` is not an IdP at all (no discovery document).
49
+ iamDomain: "zoolabs.id",
43
50
  accent: LUX_BRAND.zoo,
44
51
  accentForeground: "#FFFFFF"
45
52
  },
@@ -73,15 +80,18 @@ var DOMAIN_ORG = [
73
80
  ["lux.cloud", "lux"],
74
81
  ["lux.id", "lux"],
75
82
  ["lux.finance", "lux"],
83
+ ["lux.market", "lux"],
84
+ ["lux.exchange", "lux"],
76
85
  ["zoo.ngo", "zoo"],
77
86
  ["zoo.network", "zoo"],
78
87
  ["zoo.cloud", "zoo"],
79
- ["zoo.id", "zoo"],
88
+ ["zoolabs.id", "zoo"],
80
89
  ["hanzo.ai", "hanzo"],
81
90
  ["hanzo.cloud", "hanzo"],
82
91
  ["hanzo.id", "hanzo"],
83
- ["pars.id", "pars"],
84
- ["parsdao.org", "pars"],
92
+ ["pars.id", "pars", "app"],
93
+ ["pars.network", "pars", "app"],
94
+ ["parsdao.org", "pars", "app"],
85
95
  ["bootno.de", "bootnode", "platform"]
86
96
  ];
87
97
  var DEFAULT_ORG = "lux";
@@ -101,11 +111,11 @@ function matchDomain(host) {
101
111
  }
102
112
  return best;
103
113
  }
104
- function appSlug(host, domain, apexApp) {
114
+ function appSlug(host, domain, pinned) {
115
+ if (pinned) return pinned;
105
116
  const sub = host === domain ? "" : host.slice(0, -(domain.length + 1));
106
117
  const leftmost = sub.split(".")[0] ?? "";
107
118
  if (leftmost && leftmost !== "www") return leftmost;
108
- if (apexApp) return apexApp;
109
119
  const label = domain.split(".")[0] ?? "";
110
120
  const tld = domain.split(".").slice(1).join(".");
111
121
  return tld.split(".")[0] || label;
package/dist/provider.js CHANGED
@@ -31,10 +31,17 @@ var ORGS = {
31
31
  org: "zoo",
32
32
  name: "Zoo",
33
33
  domain: "zoo.ngo",
34
- // Zoo's IdP is `id.zoo.network`, not a `zoo.id` apex — the one row in this
35
- // table where the issuer is not `<org>.id`, and the one every hand-rolled
36
- // per-app branding map got wrong.
37
- iamDomain: "id.zoo.network",
34
+ // Zoo's issuer is `zoolabs.id` — the one row where it is not `<org>.id`,
35
+ // and the one every hand-rolled branding map gets wrong. `id.zoo.network`
36
+ // ANSWERS, which is why it keeps being copied around, but it is an alias:
37
+ // its own discovery document advertises
38
+ // issuer https://zoolabs.id
39
+ // authorization_endpoint https://zoolabs.id/v1/iam/oauth/authorize
40
+ // jwks_uri https://zoolabs.id/v1/iam/.well-known/jwks
41
+ // so a client configured on the alias validates `iss` against a string the
42
+ // IdP never emits and rejects every token it is given — the exact shape of
43
+ // the lux.id outage. `zoo.id` is not an IdP at all (no discovery document).
44
+ iamDomain: "zoolabs.id",
38
45
  accent: LUX_BRAND.zoo,
39
46
  accentForeground: "#FFFFFF"
40
47
  },
@@ -68,15 +75,18 @@ var DOMAIN_ORG = [
68
75
  ["lux.cloud", "lux"],
69
76
  ["lux.id", "lux"],
70
77
  ["lux.finance", "lux"],
78
+ ["lux.market", "lux"],
79
+ ["lux.exchange", "lux"],
71
80
  ["zoo.ngo", "zoo"],
72
81
  ["zoo.network", "zoo"],
73
82
  ["zoo.cloud", "zoo"],
74
- ["zoo.id", "zoo"],
83
+ ["zoolabs.id", "zoo"],
75
84
  ["hanzo.ai", "hanzo"],
76
85
  ["hanzo.cloud", "hanzo"],
77
86
  ["hanzo.id", "hanzo"],
78
- ["pars.id", "pars"],
79
- ["parsdao.org", "pars"],
87
+ ["pars.id", "pars", "app"],
88
+ ["pars.network", "pars", "app"],
89
+ ["parsdao.org", "pars", "app"],
80
90
  ["bootno.de", "bootnode", "platform"]
81
91
  ];
82
92
  var DEFAULT_ORG = "lux";
@@ -96,11 +106,11 @@ function matchDomain(host) {
96
106
  }
97
107
  return best;
98
108
  }
99
- function appSlug(host, domain, apexApp) {
109
+ function appSlug(host, domain, pinned) {
110
+ if (pinned) return pinned;
100
111
  const sub = host === domain ? "" : host.slice(0, -(domain.length + 1));
101
112
  const leftmost = sub.split(".")[0] ?? "";
102
113
  if (leftmost && leftmost !== "www") return leftmost;
103
- if (apexApp) return apexApp;
104
114
  const label = domain.split(".")[0] ?? "";
105
115
  const tld = domain.split(".").slice(1).join(".");
106
116
  return tld.split(".")[0] || label;
package/dist/tag.cjs CHANGED
@@ -332,8 +332,8 @@ var Tooltip = React4__namespace.forwardRef(
332
332
  }, nextOpen ? openDelay : closeDelay);
333
333
  }, [closeDelay, openDelay, onOpenChange]);
334
334
  const handleClickAway = React4__namespace.useCallback(() => {
335
- handleOpenChangeManual(false);
336
- }, [handleOpenChangeManual]);
335
+ if (open) handleOpenChangeManual(false);
336
+ }, [open, handleOpenChangeManual]);
337
337
  const triggerRef = usehooks.useClickAway(handleClickAway);
338
338
  const handleTriggerClick = React4__namespace.useCallback(() => {
339
339
  handleOpenChangeManual(!open);
@@ -373,7 +373,7 @@ var Tooltip = React4__namespace.forwardRef(
373
373
  /* @__PURE__ */ jsxRuntime.jsx(
374
374
  gui.Tooltip.Trigger,
375
375
  {
376
- ref: open ? triggerRef : void 0,
376
+ ref: triggerRef,
377
377
  asChild: true,
378
378
  ...isMobile ? { onPress: handleTriggerClick } : {},
379
379
  ...triggerProps,
package/dist/tag.js CHANGED
@@ -310,8 +310,8 @@ var Tooltip = React4.forwardRef(
310
310
  }, nextOpen ? openDelay : closeDelay);
311
311
  }, [closeDelay, openDelay, onOpenChange]);
312
312
  const handleClickAway = React4.useCallback(() => {
313
- handleOpenChangeManual(false);
314
- }, [handleOpenChangeManual]);
313
+ if (open) handleOpenChangeManual(false);
314
+ }, [open, handleOpenChangeManual]);
315
315
  const triggerRef = useClickAway(handleClickAway);
316
316
  const handleTriggerClick = React4.useCallback(() => {
317
317
  handleOpenChangeManual(!open);
@@ -351,7 +351,7 @@ var Tooltip = React4.forwardRef(
351
351
  /* @__PURE__ */ jsx(
352
352
  Tooltip$1.Trigger,
353
353
  {
354
- ref: open ? triggerRef : void 0,
354
+ ref: triggerRef,
355
355
  asChild: true,
356
356
  ...isMobile ? { onPress: handleTriggerClick } : {},
357
357
  ...triggerProps,
package/dist/tooltip.cjs CHANGED
@@ -83,8 +83,8 @@ var Tooltip = React2__namespace.forwardRef(
83
83
  }, nextOpen ? openDelay : closeDelay);
84
84
  }, [closeDelay, openDelay, onOpenChange]);
85
85
  const handleClickAway = React2__namespace.useCallback(() => {
86
- handleOpenChangeManual(false);
87
- }, [handleOpenChangeManual]);
86
+ if (open) handleOpenChangeManual(false);
87
+ }, [open, handleOpenChangeManual]);
88
88
  const triggerRef = usehooks.useClickAway(handleClickAway);
89
89
  const handleTriggerClick = React2__namespace.useCallback(() => {
90
90
  handleOpenChangeManual(!open);
@@ -124,7 +124,7 @@ var Tooltip = React2__namespace.forwardRef(
124
124
  /* @__PURE__ */ jsxRuntime.jsx(
125
125
  gui.Tooltip.Trigger,
126
126
  {
127
- ref: open ? triggerRef : void 0,
127
+ ref: triggerRef,
128
128
  asChild: true,
129
129
  ...isMobile ? { onPress: handleTriggerClick } : {},
130
130
  ...triggerProps,
package/dist/tooltip.js CHANGED
@@ -61,8 +61,8 @@ var Tooltip = React2.forwardRef(
61
61
  }, nextOpen ? openDelay : closeDelay);
62
62
  }, [closeDelay, openDelay, onOpenChange]);
63
63
  const handleClickAway = React2.useCallback(() => {
64
- handleOpenChangeManual(false);
65
- }, [handleOpenChangeManual]);
64
+ if (open) handleOpenChangeManual(false);
65
+ }, [open, handleOpenChangeManual]);
66
66
  const triggerRef = useClickAway(handleClickAway);
67
67
  const handleTriggerClick = React2.useCallback(() => {
68
68
  handleOpenChangeManual(!open);
@@ -102,7 +102,7 @@ var Tooltip = React2.forwardRef(
102
102
  /* @__PURE__ */ jsx(
103
103
  Tooltip$1.Trigger,
104
104
  {
105
- ref: open ? triggerRef : void 0,
105
+ ref: triggerRef,
106
106
  asChild: true,
107
107
  ...isMobile ? { onPress: handleTriggerClick } : {},
108
108
  ...triggerProps,
package/dist/vite.cjs CHANGED
@@ -1,13 +1,85 @@
1
1
  'use strict';
2
2
 
3
+ // src/engine.ts
4
+ var GUI_PACKAGES = [
5
+ "@hanzo/gui",
6
+ "@hanzogui/accordion",
7
+ "@hanzogui/adapt",
8
+ "@hanzogui/alert-dialog",
9
+ "@hanzogui/animate",
10
+ "@hanzogui/animate-presence",
11
+ "@hanzogui/avatar",
12
+ "@hanzogui/button",
13
+ "@hanzogui/card",
14
+ "@hanzogui/checkbox",
15
+ "@hanzogui/collapsible",
16
+ "@hanzogui/component-helpers",
17
+ "@hanzogui/compose-refs",
18
+ "@hanzogui/config",
19
+ "@hanzogui/context-menu",
20
+ "@hanzogui/core",
21
+ "@hanzogui/create-context",
22
+ "@hanzogui/create-menu",
23
+ "@hanzogui/dialog",
24
+ "@hanzogui/dismissable",
25
+ "@hanzogui/element",
26
+ "@hanzogui/elements",
27
+ "@hanzogui/floating",
28
+ "@hanzogui/focus-scope",
29
+ "@hanzogui/font-size",
30
+ "@hanzogui/form",
31
+ "@hanzogui/get-token",
32
+ "@hanzogui/group",
33
+ "@hanzogui/helpers",
34
+ "@hanzogui/image",
35
+ "@hanzogui/input",
36
+ "@hanzogui/label",
37
+ "@hanzogui/list-item",
38
+ "@hanzogui/menu",
39
+ "@hanzogui/popover",
40
+ "@hanzogui/popper",
41
+ "@hanzogui/portal",
42
+ "@hanzogui/progress",
43
+ "@hanzogui/radio-group",
44
+ "@hanzogui/react-native-media-driver",
45
+ "@hanzogui/remove-scroll",
46
+ "@hanzogui/scroll-view",
47
+ "@hanzogui/select",
48
+ "@hanzogui/separator",
49
+ "@hanzogui/shapes",
50
+ "@hanzogui/sheet",
51
+ "@hanzogui/slider",
52
+ "@hanzogui/spacer",
53
+ "@hanzogui/spinner",
54
+ "@hanzogui/stacks",
55
+ "@hanzogui/switch",
56
+ "@hanzogui/tabs",
57
+ "@hanzogui/text",
58
+ "@hanzogui/theme",
59
+ "@hanzogui/toast",
60
+ "@hanzogui/toggle-group",
61
+ "@hanzogui/tooltip",
62
+ "@hanzogui/use-controllable-state",
63
+ "@hanzogui/use-debounce",
64
+ "@hanzogui/use-force-update",
65
+ "@hanzogui/use-presence",
66
+ "@hanzogui/use-window-dimensions",
67
+ "@hanzogui/visually-hidden",
68
+ "@hanzogui/web",
69
+ "@hanzogui/z-index-stack",
70
+ "@luxfi/ui"
71
+ ];
72
+ var GUI_DEFINES = {
73
+ "process.env.EXPO_OS": JSON.stringify("web"),
74
+ "process.env.IS_WEB": JSON.stringify("true")
75
+ };
76
+
3
77
  // src/vite.ts
4
78
  var DEDUPE = [
5
79
  "react",
6
80
  "react-dom",
7
81
  "@tanstack/react-query",
8
- "@hanzo/gui",
9
- "@hanzogui/core",
10
- "@hanzogui/web"
82
+ ...GUI_PACKAGES
11
83
  ];
12
84
  var INCLUDE = [
13
85
  "react-native-web",
@@ -21,11 +93,8 @@ function luxUi(options = {}) {
21
93
  name: "@luxfi/ui",
22
94
  config: () => ({
23
95
  // The engine branches on these at module scope; without them it takes the
24
- // native path in a browser bundle.
25
- define: {
26
- "process.env.EXPO_OS": JSON.stringify("web"),
27
- "process.env.IS_WEB": JSON.stringify("true")
28
- },
96
+ // native path in a browser bundle. (./engine)
97
+ define: { ...GUI_DEFINES },
29
98
  resolve: {
30
99
  alias: { "react-native": "react-native-web" },
31
100
  dedupe: [.../* @__PURE__ */ new Set([...DEDUPE, ...options.dedupe ?? []])]
package/dist/vite.js CHANGED
@@ -1,11 +1,83 @@
1
+ // src/engine.ts
2
+ var GUI_PACKAGES = [
3
+ "@hanzo/gui",
4
+ "@hanzogui/accordion",
5
+ "@hanzogui/adapt",
6
+ "@hanzogui/alert-dialog",
7
+ "@hanzogui/animate",
8
+ "@hanzogui/animate-presence",
9
+ "@hanzogui/avatar",
10
+ "@hanzogui/button",
11
+ "@hanzogui/card",
12
+ "@hanzogui/checkbox",
13
+ "@hanzogui/collapsible",
14
+ "@hanzogui/component-helpers",
15
+ "@hanzogui/compose-refs",
16
+ "@hanzogui/config",
17
+ "@hanzogui/context-menu",
18
+ "@hanzogui/core",
19
+ "@hanzogui/create-context",
20
+ "@hanzogui/create-menu",
21
+ "@hanzogui/dialog",
22
+ "@hanzogui/dismissable",
23
+ "@hanzogui/element",
24
+ "@hanzogui/elements",
25
+ "@hanzogui/floating",
26
+ "@hanzogui/focus-scope",
27
+ "@hanzogui/font-size",
28
+ "@hanzogui/form",
29
+ "@hanzogui/get-token",
30
+ "@hanzogui/group",
31
+ "@hanzogui/helpers",
32
+ "@hanzogui/image",
33
+ "@hanzogui/input",
34
+ "@hanzogui/label",
35
+ "@hanzogui/list-item",
36
+ "@hanzogui/menu",
37
+ "@hanzogui/popover",
38
+ "@hanzogui/popper",
39
+ "@hanzogui/portal",
40
+ "@hanzogui/progress",
41
+ "@hanzogui/radio-group",
42
+ "@hanzogui/react-native-media-driver",
43
+ "@hanzogui/remove-scroll",
44
+ "@hanzogui/scroll-view",
45
+ "@hanzogui/select",
46
+ "@hanzogui/separator",
47
+ "@hanzogui/shapes",
48
+ "@hanzogui/sheet",
49
+ "@hanzogui/slider",
50
+ "@hanzogui/spacer",
51
+ "@hanzogui/spinner",
52
+ "@hanzogui/stacks",
53
+ "@hanzogui/switch",
54
+ "@hanzogui/tabs",
55
+ "@hanzogui/text",
56
+ "@hanzogui/theme",
57
+ "@hanzogui/toast",
58
+ "@hanzogui/toggle-group",
59
+ "@hanzogui/tooltip",
60
+ "@hanzogui/use-controllable-state",
61
+ "@hanzogui/use-debounce",
62
+ "@hanzogui/use-force-update",
63
+ "@hanzogui/use-presence",
64
+ "@hanzogui/use-window-dimensions",
65
+ "@hanzogui/visually-hidden",
66
+ "@hanzogui/web",
67
+ "@hanzogui/z-index-stack",
68
+ "@luxfi/ui"
69
+ ];
70
+ var GUI_DEFINES = {
71
+ "process.env.EXPO_OS": JSON.stringify("web"),
72
+ "process.env.IS_WEB": JSON.stringify("true")
73
+ };
74
+
1
75
  // src/vite.ts
2
76
  var DEDUPE = [
3
77
  "react",
4
78
  "react-dom",
5
79
  "@tanstack/react-query",
6
- "@hanzo/gui",
7
- "@hanzogui/core",
8
- "@hanzogui/web"
80
+ ...GUI_PACKAGES
9
81
  ];
10
82
  var INCLUDE = [
11
83
  "react-native-web",
@@ -19,11 +91,8 @@ function luxUi(options = {}) {
19
91
  name: "@luxfi/ui",
20
92
  config: () => ({
21
93
  // The engine branches on these at module scope; without them it takes the
22
- // native path in a browser bundle.
23
- define: {
24
- "process.env.EXPO_OS": JSON.stringify("web"),
25
- "process.env.IS_WEB": JSON.stringify("true")
26
- },
94
+ // native path in a browser bundle. (./engine)
95
+ define: { ...GUI_DEFINES },
27
96
  resolve: {
28
97
  alias: { "react-native": "react-native-web" },
29
98
  dedupe: [.../* @__PURE__ */ new Set([...DEDUPE, ...options.dedupe ?? []])]