@bze/bze-ui-kit 0.4.2 → 0.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/README.md +12 -0
- package/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +39 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -123,6 +123,18 @@ The library reads these `NEXT_PUBLIC_*` env vars at build time (inlined by Next.
|
|
|
123
123
|
| `NEXT_PUBLIC_REST_URL_FLIX` | OmniFlix REST |
|
|
124
124
|
| `NEXT_PUBLIC_REST_URL_ATOMONE` | AtomOne REST |
|
|
125
125
|
|
|
126
|
+
### Ecosystem navigation
|
|
127
|
+
|
|
128
|
+
Override links and labels for the "Other" dropdown in the navbar, or exclude apps entirely. Useful for testnet deployments.
|
|
129
|
+
|
|
130
|
+
| Env var | Default | Description |
|
|
131
|
+
|---------|---------|-------------|
|
|
132
|
+
| `NEXT_PUBLIC_ECOSYSTEM_EXCLUDED` | _(empty)_ | Comma-separated keys to hide from the dropdown (e.g. `staking,factory`). Valid keys: `website`, `staking`, `dex`, `burner`, `factory` |
|
|
133
|
+
| `NEXT_PUBLIC_ECOSYSTEM_LINK_{KEY}` | _(per app)_ | Override the URL for an app. Key is uppercased (e.g. `NEXT_PUBLIC_ECOSYSTEM_LINK_WEBSITE=https://testnet.getbze.com`) |
|
|
134
|
+
| `NEXT_PUBLIC_ECOSYSTEM_LABEL_{KEY}` | _(per app)_ | Override the display label (e.g. `NEXT_PUBLIC_ECOSYSTEM_LABEL_DEX=TestDEX`) |
|
|
135
|
+
|
|
136
|
+
Call `getEcosystemApps()` to get the filtered and overridden list. Each app should exclude itself via `NEXT_PUBLIC_ECOSYSTEM_EXCLUDED`.
|
|
137
|
+
|
|
126
138
|
### AtomOne validator (dex-only)
|
|
127
139
|
|
|
128
140
|
| Env var | Default | Description |
|
package/dist/index.d.mts
CHANGED
|
@@ -484,10 +484,16 @@ interface EcosystemApp {
|
|
|
484
484
|
href: string;
|
|
485
485
|
disabled: boolean;
|
|
486
486
|
icon: IconType;
|
|
487
|
+
/** Unique key used for env var overrides and exclusions (e.g. 'website', 'staking', 'dex') */
|
|
488
|
+
key: string;
|
|
487
489
|
}
|
|
488
490
|
/**
|
|
489
|
-
* Returns the list of ecosystem apps
|
|
490
|
-
*
|
|
491
|
+
* Returns the list of ecosystem apps with env var overrides applied and exclusions removed.
|
|
492
|
+
*
|
|
493
|
+
* Env vars:
|
|
494
|
+
* - NEXT_PUBLIC_ECOSYSTEM_LINK_{KEY} — override the href for an app (key uppercased, e.g. NEXT_PUBLIC_ECOSYSTEM_LINK_WEBSITE)
|
|
495
|
+
* - NEXT_PUBLIC_ECOSYSTEM_LABEL_{KEY} — override the label for an app (e.g. NEXT_PUBLIC_ECOSYSTEM_LABEL_DEX)
|
|
496
|
+
* - NEXT_PUBLIC_ECOSYSTEM_EXCLUDED — comma-separated keys to exclude (e.g. "staking,factory")
|
|
491
497
|
*/
|
|
492
498
|
declare const getEcosystemApps: () => EcosystemApp[];
|
|
493
499
|
|
package/dist/index.d.ts
CHANGED
|
@@ -484,10 +484,16 @@ interface EcosystemApp {
|
|
|
484
484
|
href: string;
|
|
485
485
|
disabled: boolean;
|
|
486
486
|
icon: IconType;
|
|
487
|
+
/** Unique key used for env var overrides and exclusions (e.g. 'website', 'staking', 'dex') */
|
|
488
|
+
key: string;
|
|
487
489
|
}
|
|
488
490
|
/**
|
|
489
|
-
* Returns the list of ecosystem apps
|
|
490
|
-
*
|
|
491
|
+
* Returns the list of ecosystem apps with env var overrides applied and exclusions removed.
|
|
492
|
+
*
|
|
493
|
+
* Env vars:
|
|
494
|
+
* - NEXT_PUBLIC_ECOSYSTEM_LINK_{KEY} — override the href for an app (key uppercased, e.g. NEXT_PUBLIC_ECOSYSTEM_LINK_WEBSITE)
|
|
495
|
+
* - NEXT_PUBLIC_ECOSYSTEM_LABEL_{KEY} — override the label for an app (e.g. NEXT_PUBLIC_ECOSYSTEM_LABEL_DEX)
|
|
496
|
+
* - NEXT_PUBLIC_ECOSYSTEM_EXCLUDED — comma-separated keys to exclude (e.g. "staking,factory")
|
|
491
497
|
*/
|
|
492
498
|
declare const getEcosystemApps: () => EcosystemApp[];
|
|
493
499
|
|
package/dist/index.js
CHANGED
|
@@ -1683,19 +1683,47 @@ var EXCLUDED_MARKETS = {
|
|
|
1683
1683
|
// src/constants/ecosystem.ts
|
|
1684
1684
|
var import_lu = require("react-icons/lu");
|
|
1685
1685
|
var ECOSYSTEM_MENU_LABEL = "Other";
|
|
1686
|
-
var
|
|
1687
|
-
{ name: "Website", href: "https://getbze.com", disabled: false, icon: import_lu.LuGlobe },
|
|
1688
|
-
{ name: "Staking", href: "https://staking.getbze.com", disabled: false, icon: import_lu.LuCoins },
|
|
1689
|
-
{ name: "DEX", href: "https://dex.getbze.com", disabled: false, icon: import_lu.LuChartColumn },
|
|
1690
|
-
{ name: "Burner", href: "https://burner.getbze.com", disabled: false, icon: import_lu.LuFlame },
|
|
1691
|
-
{ name: "Factory", href: "#", disabled: true, icon: import_lu.LuFactory }
|
|
1686
|
+
var DEFAULT_APPS = [
|
|
1687
|
+
{ key: "website", name: "Website", href: "https://getbze.com", disabled: false, icon: import_lu.LuGlobe },
|
|
1688
|
+
{ key: "staking", name: "Staking", href: "https://staking.getbze.com", disabled: false, icon: import_lu.LuCoins },
|
|
1689
|
+
{ key: "dex", name: "DEX", href: "https://dex.getbze.com", disabled: false, icon: import_lu.LuChartColumn },
|
|
1690
|
+
{ key: "burner", name: "Burner", href: "https://burner.getbze.com", disabled: false, icon: import_lu.LuFlame },
|
|
1691
|
+
{ key: "factory", name: "Factory", href: "#", disabled: true, icon: import_lu.LuFactory }
|
|
1692
1692
|
];
|
|
1693
|
+
var getExcludedKeys = () => {
|
|
1694
|
+
const raw = process.env.NEXT_PUBLIC_ECOSYSTEM_EXCLUDED || "";
|
|
1695
|
+
if (!raw.trim()) {
|
|
1696
|
+
return /* @__PURE__ */ new Set();
|
|
1697
|
+
}
|
|
1698
|
+
return new Set(raw.split(",").map((k) => k.trim().toLowerCase()).filter(Boolean));
|
|
1699
|
+
};
|
|
1700
|
+
var LINK_OVERRIDES = {
|
|
1701
|
+
website: process.env.NEXT_PUBLIC_ECOSYSTEM_LINK_WEBSITE,
|
|
1702
|
+
staking: process.env.NEXT_PUBLIC_ECOSYSTEM_LINK_STAKING,
|
|
1703
|
+
dex: process.env.NEXT_PUBLIC_ECOSYSTEM_LINK_DEX,
|
|
1704
|
+
burner: process.env.NEXT_PUBLIC_ECOSYSTEM_LINK_BURNER,
|
|
1705
|
+
factory: process.env.NEXT_PUBLIC_ECOSYSTEM_LINK_FACTORY
|
|
1706
|
+
};
|
|
1707
|
+
var LABEL_OVERRIDES = {
|
|
1708
|
+
website: process.env.NEXT_PUBLIC_ECOSYSTEM_LABEL_WEBSITE,
|
|
1709
|
+
staking: process.env.NEXT_PUBLIC_ECOSYSTEM_LABEL_STAKING,
|
|
1710
|
+
dex: process.env.NEXT_PUBLIC_ECOSYSTEM_LABEL_DEX,
|
|
1711
|
+
burner: process.env.NEXT_PUBLIC_ECOSYSTEM_LABEL_BURNER,
|
|
1712
|
+
factory: process.env.NEXT_PUBLIC_ECOSYSTEM_LABEL_FACTORY
|
|
1713
|
+
};
|
|
1693
1714
|
var getEcosystemApps = () => {
|
|
1694
|
-
const
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1715
|
+
const excluded = getExcludedKeys();
|
|
1716
|
+
return DEFAULT_APPS.filter((app) => !excluded.has(app.key)).map((app) => {
|
|
1717
|
+
const linkOverride = LINK_OVERRIDES[app.key];
|
|
1718
|
+
const labelOverride = LABEL_OVERRIDES[app.key];
|
|
1719
|
+
return {
|
|
1720
|
+
key: app.key,
|
|
1721
|
+
name: labelOverride || app.name,
|
|
1722
|
+
href: linkOverride || app.href,
|
|
1723
|
+
disabled: linkOverride ? false : app.disabled,
|
|
1724
|
+
icon: app.icon
|
|
1725
|
+
};
|
|
1726
|
+
});
|
|
1699
1727
|
};
|
|
1700
1728
|
|
|
1701
1729
|
// src/constants/keplr.ts
|