@luxfi/ui 7.4.2 → 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/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 ?? []])]
@@ -24,10 +24,17 @@ var ORGS = {
24
24
  org: "zoo",
25
25
  name: "Zoo",
26
26
  domain: "zoo.ngo",
27
- // Zoo's IdP is `id.zoo.network`, not a `zoo.id` apex — the one row in this
28
- // table where the issuer is not `<org>.id`, and the one every hand-rolled
29
- // per-app branding map got wrong.
30
- iamDomain: "id.zoo.network",
27
+ // Zoo's issuer is `zoolabs.id` — the one row where it is not `<org>.id`,
28
+ // and the one every hand-rolled branding map gets wrong. `id.zoo.network`
29
+ // ANSWERS, which is why it keeps being copied around, but it is an alias:
30
+ // its own discovery document advertises
31
+ // issuer https://zoolabs.id
32
+ // authorization_endpoint https://zoolabs.id/v1/iam/oauth/authorize
33
+ // jwks_uri https://zoolabs.id/v1/iam/.well-known/jwks
34
+ // so a client configured on the alias validates `iss` against a string the
35
+ // IdP never emits and rejects every token it is given — the exact shape of
36
+ // the lux.id outage. `zoo.id` is not an IdP at all (no discovery document).
37
+ iamDomain: "zoolabs.id",
31
38
  accent: LUX_BRAND.zoo,
32
39
  accentForeground: "#FFFFFF"
33
40
  },
@@ -61,15 +68,18 @@ var DOMAIN_ORG = [
61
68
  ["lux.cloud", "lux"],
62
69
  ["lux.id", "lux"],
63
70
  ["lux.finance", "lux"],
71
+ ["lux.market", "lux"],
72
+ ["lux.exchange", "lux"],
64
73
  ["zoo.ngo", "zoo"],
65
74
  ["zoo.network", "zoo"],
66
75
  ["zoo.cloud", "zoo"],
67
- ["zoo.id", "zoo"],
76
+ ["zoolabs.id", "zoo"],
68
77
  ["hanzo.ai", "hanzo"],
69
78
  ["hanzo.cloud", "hanzo"],
70
79
  ["hanzo.id", "hanzo"],
71
- ["pars.id", "pars"],
72
- ["parsdao.org", "pars"],
80
+ ["pars.id", "pars", "app"],
81
+ ["pars.network", "pars", "app"],
82
+ ["parsdao.org", "pars", "app"],
73
83
  ["bootno.de", "bootnode", "platform"]
74
84
  ];
75
85
  var DEFAULT_ORG = "lux";
@@ -89,11 +99,11 @@ function matchDomain(host) {
89
99
  }
90
100
  return best;
91
101
  }
92
- function appSlug(host, domain, apexApp) {
102
+ function appSlug(host, domain, pinned) {
103
+ if (pinned) return pinned;
93
104
  const sub = host === domain ? "" : host.slice(0, -(domain.length + 1));
94
105
  const leftmost = sub.split(".")[0] ?? "";
95
106
  if (leftmost && leftmost !== "www") return leftmost;
96
- if (apexApp) return apexApp;
97
107
  const label = domain.split(".")[0] ?? "";
98
108
  const tld = domain.split(".").slice(1).join(".");
99
109
  return tld.split(".")[0] || label;
@@ -42,9 +42,9 @@ interface WhiteLabel extends OrgIdentity {
42
42
  * Pure and total: an unknown or missing host falls back to the Lux row rather
43
43
  * than throwing, so a preview URL or a health probe never blanks the UI.
44
44
  *
45
- * resolveWhiteLabel('mpc.lux.cloud') // org lux, clientId lux-mpc, issuer https://lux.id
46
- * resolveWhiteLabel('zoo.network') // org zoo, clientId zoo-network, issuer https://zoo.id
47
- * resolveWhiteLabel('id.pars.id') // org pars, clientId pars-id, issuer https://pars.id
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
48
  */
49
49
  declare function resolveWhiteLabel(host?: string | null): WhiteLabel;
50
50
  /**
@@ -42,9 +42,9 @@ interface WhiteLabel extends OrgIdentity {
42
42
  * Pure and total: an unknown or missing host falls back to the Lux row rather
43
43
  * than throwing, so a preview URL or a health probe never blanks the UI.
44
44
  *
45
- * resolveWhiteLabel('mpc.lux.cloud') // org lux, clientId lux-mpc, issuer https://lux.id
46
- * resolveWhiteLabel('zoo.network') // org zoo, clientId zoo-network, issuer https://zoo.id
47
- * resolveWhiteLabel('id.pars.id') // org pars, clientId pars-id, issuer https://pars.id
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
48
  */
49
49
  declare function resolveWhiteLabel(host?: string | null): WhiteLabel;
50
50
  /**
@@ -22,10 +22,17 @@ var ORGS = {
22
22
  org: "zoo",
23
23
  name: "Zoo",
24
24
  domain: "zoo.ngo",
25
- // Zoo's IdP is `id.zoo.network`, not a `zoo.id` apex — the one row in this
26
- // table where the issuer is not `<org>.id`, and the one every hand-rolled
27
- // per-app branding map got wrong.
28
- iamDomain: "id.zoo.network",
25
+ // Zoo's issuer is `zoolabs.id` — the one row where it is not `<org>.id`,
26
+ // and the one every hand-rolled branding map gets wrong. `id.zoo.network`
27
+ // ANSWERS, which is why it keeps being copied around, but it is an alias:
28
+ // its own discovery document advertises
29
+ // issuer https://zoolabs.id
30
+ // authorization_endpoint https://zoolabs.id/v1/iam/oauth/authorize
31
+ // jwks_uri https://zoolabs.id/v1/iam/.well-known/jwks
32
+ // so a client configured on the alias validates `iss` against a string the
33
+ // IdP never emits and rejects every token it is given — the exact shape of
34
+ // the lux.id outage. `zoo.id` is not an IdP at all (no discovery document).
35
+ iamDomain: "zoolabs.id",
29
36
  accent: LUX_BRAND.zoo,
30
37
  accentForeground: "#FFFFFF"
31
38
  },
@@ -59,15 +66,18 @@ var DOMAIN_ORG = [
59
66
  ["lux.cloud", "lux"],
60
67
  ["lux.id", "lux"],
61
68
  ["lux.finance", "lux"],
69
+ ["lux.market", "lux"],
70
+ ["lux.exchange", "lux"],
62
71
  ["zoo.ngo", "zoo"],
63
72
  ["zoo.network", "zoo"],
64
73
  ["zoo.cloud", "zoo"],
65
- ["zoo.id", "zoo"],
74
+ ["zoolabs.id", "zoo"],
66
75
  ["hanzo.ai", "hanzo"],
67
76
  ["hanzo.cloud", "hanzo"],
68
77
  ["hanzo.id", "hanzo"],
69
- ["pars.id", "pars"],
70
- ["parsdao.org", "pars"],
78
+ ["pars.id", "pars", "app"],
79
+ ["pars.network", "pars", "app"],
80
+ ["parsdao.org", "pars", "app"],
71
81
  ["bootno.de", "bootnode", "platform"]
72
82
  ];
73
83
  var DEFAULT_ORG = "lux";
@@ -87,11 +97,11 @@ function matchDomain(host) {
87
97
  }
88
98
  return best;
89
99
  }
90
- function appSlug(host, domain, apexApp) {
100
+ function appSlug(host, domain, pinned) {
101
+ if (pinned) return pinned;
91
102
  const sub = host === domain ? "" : host.slice(0, -(domain.length + 1));
92
103
  const leftmost = sub.split(".")[0] ?? "";
93
104
  if (leftmost && leftmost !== "www") return leftmost;
94
- if (apexApp) return apexApp;
95
105
  const label = domain.split(".")[0] ?? "";
96
106
  const tld = domain.split(".").slice(1).join(".");
97
107
  return tld.split(".")[0] || label;