@bloxwap/hig 0.0.0-stage → 0.5.1
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/LICENSE +5 -0
- package/README.md +44 -2
- package/chart/README.md +23 -0
- package/chart/dist/index.d.ts +8 -0
- package/chart/dist/index.js +12 -0
- package/contracts/README.md +3 -0
- package/contracts/dist/announcements.d.ts +12 -0
- package/contracts/dist/announcements.js +8 -0
- package/contracts/dist/feedback.d.ts +40 -0
- package/contracts/dist/feedback.js +1 -0
- package/contracts/dist/index.d.ts +41 -0
- package/contracts/dist/index.js +52 -0
- package/contracts/dist/messages.d.ts +300 -0
- package/contracts/dist/messages.js +114 -0
- package/css.d.ts +2 -0
- package/feedback/README.md +7 -0
- package/feedback/assets/error.wav +0 -0
- package/feedback/assets/manifest.json +78 -0
- package/feedback/assets/success.wav +0 -0
- package/feedback/assets/tick.wav +0 -0
- package/feedback/assets/toggle.wav +0 -0
- package/feedback/dist/browser-haptic.d.ts +23 -0
- package/feedback/dist/browser-haptic.js +41 -0
- package/feedback/dist/contract.d.ts +40 -0
- package/feedback/dist/contract.js +59 -0
- package/feedback/dist/native.d.ts +28 -0
- package/feedback/dist/native.js +63 -0
- package/feedback/dist/preferences.d.ts +8 -0
- package/feedback/dist/preferences.js +24 -0
- package/feedback/dist/presets.d.ts +57 -0
- package/feedback/dist/presets.js +1 -0
- package/feedback/dist/react.d.ts +19 -0
- package/feedback/dist/react.js +23 -0
- package/feedback/dist/web-haptic.d.ts +6 -0
- package/feedback/dist/web-haptic.js +6 -0
- package/feedback/dist/web-sound.d.ts +5 -0
- package/feedback/dist/web-sound.js +32 -0
- package/feedback/dist/web.d.ts +3 -0
- package/feedback/dist/web.js +4 -0
- package/native/README.md +16 -0
- package/native/android/build.gradle +28 -0
- package/native/android/src/main/java/com/bloxwap/hig/HIGAdjustableView.java +173 -0
- package/native/android/src/main/java/com/bloxwap/hig/HIGAdjustableViewManager.java +23 -0
- package/native/android/src/main/java/com/bloxwap/hig/HIGPackage.java +24 -0
- package/native/dist/animated-number-model.d.ts +24 -0
- package/native/dist/animated-number-model.js +110 -0
- package/native/dist/animated-number.d.ts +9 -0
- package/native/dist/animated-number.js +97 -0
- package/native/dist/brand.d.ts +7 -0
- package/native/dist/brand.js +7 -0
- package/native/dist/button.d.ts +30 -0
- package/native/dist/button.js +36 -0
- package/native/dist/checkbox.d.ts +3 -0
- package/native/dist/checkbox.js +11 -0
- package/native/dist/data.d.ts +57 -0
- package/native/dist/data.js +47 -0
- package/native/dist/field.d.ts +16 -0
- package/native/dist/field.js +26 -0
- package/native/dist/gesture-sheet.d.ts +73 -0
- package/native/dist/gesture-sheet.js +153 -0
- package/native/dist/icons.d.ts +21 -0
- package/native/dist/icons.js +20 -0
- package/native/dist/navigation.d.ts +48 -0
- package/native/dist/navigation.js +58 -0
- package/native/dist/overlay.d.ts +36 -0
- package/native/dist/overlay.js +65 -0
- package/native/dist/pickers.d.ts +54 -0
- package/native/dist/pickers.js +60 -0
- package/native/dist/provider.d.ts +62 -0
- package/native/dist/provider.js +67 -0
- package/native/dist/radio-group.d.ts +21 -0
- package/native/dist/radio-group.js +91 -0
- package/native/dist/recipes.d.ts +45 -0
- package/native/dist/recipes.js +32 -0
- package/native/dist/roles.d.ts +6 -0
- package/native/dist/roles.js +4 -0
- package/native/dist/select.d.ts +3 -0
- package/native/dist/select.js +9 -0
- package/native/dist/selection-types.d.ts +22 -0
- package/native/dist/selection-types.js +1 -0
- package/native/dist/selection.d.ts +8 -0
- package/native/dist/selection.js +7 -0
- package/native/dist/slider.d.ts +11 -0
- package/native/dist/slider.js +42 -0
- package/native/dist/status.d.ts +86 -0
- package/native/dist/status.js +112 -0
- package/native/dist/surface.d.ts +19 -0
- package/native/dist/surface.js +42 -0
- package/native/dist/swap-panel.d.ts +125 -0
- package/native/dist/swap-panel.js +177 -0
- package/native/dist/swap-parts.d.ts +86 -0
- package/native/dist/swap-parts.js +66 -0
- package/native/dist/swap-shared.d.ts +65 -0
- package/native/dist/swap-shared.js +76 -0
- package/native/dist/swap-sheet.d.ts +14 -0
- package/native/dist/swap-sheet.js +26 -0
- package/native/dist/swap-views.d.ts +41 -0
- package/native/dist/swap-views.js +37 -0
- package/native/dist/switch-row.d.ts +8 -0
- package/native/dist/switch-row.js +18 -0
- package/native/dist/switch.d.ts +10 -0
- package/native/dist/switch.js +30 -0
- package/native/dist/text-content.d.ts +5 -0
- package/native/dist/text-content.js +6 -0
- package/native/dist/wallet-address.d.ts +37 -0
- package/native/dist/wallet-address.js +50 -0
- package/native-fonts/README.md +17 -0
- package/native-fonts/dist/index.d.ts +164 -0
- package/native-fonts/dist/index.js +164 -0
- package/native-fonts/fonts/BloxwapMono-Bold.ttf +0 -0
- package/native-fonts/fonts/BloxwapMono-ExtraBold.ttf +0 -0
- package/native-fonts/fonts/BloxwapMono-Medium.ttf +0 -0
- package/native-fonts/fonts/BloxwapMono-SemiBold.ttf +0 -0
- package/native-fonts/fonts/BloxwapMono.ttf +0 -0
- package/native-fonts/fonts/BloxwapSans-Black.ttf +0 -0
- package/native-fonts/fonts/BloxwapSans-Bold.ttf +0 -0
- package/native-fonts/fonts/BloxwapSans-ExtraBold.ttf +0 -0
- package/native-fonts/fonts/BloxwapSans-Medium.ttf +0 -0
- package/native-fonts/fonts/BloxwapSans-SemiBold.ttf +0 -0
- package/native-fonts/fonts/BloxwapSans.ttf +0 -0
- package/native-fonts/fonts/BloxwapSansKR-SemiBold.ttf +0 -0
- package/native-fonts/fonts/BloxwapSansKR.ttf +0 -0
- package/native-fonts/fonts/BloxwapSansSC-SemiBold.ttf +0 -0
- package/native-fonts/fonts/BloxwapSansSC.ttf +0 -0
- package/native-fonts/fonts/OFL.txt +93 -0
- package/native-fonts/fonts/manifest.json +164 -0
- package/og-fonts/README.md +34 -0
- package/og-fonts/dist/index.d.ts +116 -0
- package/og-fonts/dist/index.js +102 -0
- package/og-fonts/dist/node.d.ts +11 -0
- package/og-fonts/dist/node.js +39 -0
- package/og-fonts/fonts/BloxwapMono-Medium.ttf +0 -0
- package/og-fonts/fonts/BloxwapSans-Black.ttf +0 -0
- package/og-fonts/fonts/BloxwapSans-Bold.ttf +0 -0
- package/og-fonts/fonts/BloxwapSans-Medium.ttf +0 -0
- package/og-fonts/fonts/BloxwapSans.ttf +0 -0
- package/og-fonts/fonts/OFL.txt +93 -0
- package/og-fonts/fonts/manifest.json +65 -0
- package/package.json +476 -4
- package/react/README.md +30 -0
- package/react/dist/animated-number-model.d.ts +20 -0
- package/react/dist/animated-number-model.js +92 -0
- package/react/dist/animated-number.d.ts +8 -0
- package/react/dist/animated-number.js +72 -0
- package/react/dist/base.css +9 -0
- package/react/dist/brand.d.ts +7 -0
- package/react/dist/brand.js +5 -0
- package/react/dist/button.d.ts +14 -0
- package/react/dist/button.js +20 -0
- package/react/dist/data.d.ts +78 -0
- package/react/dist/data.js +36 -0
- package/react/dist/dialog.d.ts +29 -0
- package/react/dist/dialog.js +21 -0
- package/react/dist/field.d.ts +16 -0
- package/react/dist/field.js +20 -0
- package/react/dist/gesture-sheet.d.ts +41 -0
- package/react/dist/gesture-sheet.js +128 -0
- package/react/dist/navigation.d.ts +48 -0
- package/react/dist/navigation.js +69 -0
- package/react/dist/notify.d.ts +14 -0
- package/react/dist/notify.js +6 -0
- package/react/dist/overlay.d.ts +17 -0
- package/react/dist/overlay.js +18 -0
- package/react/dist/provider.d.ts +25 -0
- package/react/dist/provider.js +50 -0
- package/react/dist/recipes/activity-list.d.ts +8 -0
- package/react/dist/recipes/activity-list.js +6 -0
- package/react/dist/recipes/balance-card.d.ts +6 -0
- package/react/dist/recipes/balance-card.js +5 -0
- package/react/dist/recipes/code-window.d.ts +4 -0
- package/react/dist/recipes/code-window.js +4 -0
- package/react/dist/recipes/install-command.d.ts +6 -0
- package/react/dist/recipes/install-command.js +15 -0
- package/react/dist/recipes/market-row.d.ts +25 -0
- package/react/dist/recipes/market-row.js +8 -0
- package/react/dist/recipes/marketing-hero.d.ts +7 -0
- package/react/dist/recipes/marketing-hero.js +5 -0
- package/react/dist/recipes/pickers.d.ts +57 -0
- package/react/dist/recipes/pickers.js +78 -0
- package/react/dist/recipes/swap/amount-card.d.ts +40 -0
- package/react/dist/recipes/swap/amount-card.js +7 -0
- package/react/dist/recipes/swap/picker.d.ts +26 -0
- package/react/dist/recipes/swap/picker.js +20 -0
- package/react/dist/recipes/swap/settings.d.ts +24 -0
- package/react/dist/recipes/swap/settings.js +25 -0
- package/react/dist/recipes/swap/shared.d.ts +98 -0
- package/react/dist/recipes/swap/shared.js +106 -0
- package/react/dist/recipes/swap-panel.d.ts +127 -0
- package/react/dist/recipes/swap-panel.js +170 -0
- package/react/dist/recipes/swap-sheet.d.ts +16 -0
- package/react/dist/recipes/swap-sheet.js +22 -0
- package/react/dist/recipes/trade-entry.d.ts +11 -0
- package/react/dist/recipes/trade-entry.js +12 -0
- package/react/dist/recipes.d.ts +10 -0
- package/react/dist/recipes.js +11 -0
- package/react/dist/select.d.ts +4 -0
- package/react/dist/select.js +174 -0
- package/react/dist/selection.d.ts +40 -0
- package/react/dist/selection.js +23 -0
- package/react/dist/slider.d.ts +11 -0
- package/react/dist/slider.js +10 -0
- package/react/dist/status.d.ts +63 -0
- package/react/dist/status.js +47 -0
- package/react/dist/styles.css +542 -0
- package/react/dist/surface.d.ts +291 -0
- package/react/dist/surface.js +9 -0
- package/react/dist/toast.d.ts +17 -0
- package/react/dist/toast.js +21 -0
- package/react/dist/wallet-address.d.ts +23 -0
- package/react/dist/wallet-address.js +24 -0
- package/tokens/README.md +17 -0
- package/tokens/assets/bloxwap-icon.svg +1 -0
- package/tokens/dist/brand.d.ts +19 -0
- package/tokens/dist/brand.js +24 -0
- package/tokens/dist/index.d.ts +437 -0
- package/tokens/dist/index.js +514 -0
- package/tokens/dist/manifest.json +200 -0
- package/tokens/dist/theme.d.ts +11 -0
- package/tokens/dist/theme.js +22 -0
- package/tokens/dist/tokens.css +120 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bloxwap
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to inclusion of this notice. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
|
package/README.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @bloxwap/hig
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Bloxwap Human Interface Guidelines in one package: semantic tokens, platform-neutral contracts, React and
|
|
4
|
+
React Native components, the `@bloxwap/chart` adapter, optional sound and haptic feedback, and the native and
|
|
5
|
+
Open Graph font faces.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install @bloxwap/hig
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Import only the entries you use. Nothing loads from a root barrel.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import '@bloxwap/hig/tokens/css';
|
|
15
|
+
import '@bloxwap/hig/react/css';
|
|
16
|
+
import {HIGProvider} from '@bloxwap/hig/react/provider';
|
|
17
|
+
import {Button} from '@bloxwap/hig/react/button';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
| Entry | Contents |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `@bloxwap/hig/tokens` | Tokens, `resolvePrimaryColor`, `./tokens/css`, `./tokens/manifest` ([README](tokens/README.md)) |
|
|
23
|
+
| `@bloxwap/hig/contracts` | Types, formatting, feedback, announcements and messages ([README](contracts/README.md)) |
|
|
24
|
+
| `@bloxwap/hig/react/*` | Web components, recipes, `./react/css` and `./react/css/base` ([README](react/README.md)) |
|
|
25
|
+
| `@bloxwap/hig/native/*` | React Native components ([README](native/README.md)) |
|
|
26
|
+
| `@bloxwap/hig/chart` | `PriceChart` and `chartTheme` for `@bloxwap/chart` ([README](chart/README.md)) |
|
|
27
|
+
| `@bloxwap/hig/feedback/*` | Opt-in web and native sound/haptic adapters ([README](feedback/README.md)) |
|
|
28
|
+
| `@bloxwap/hig/native-fonts` | Static TTFs for React Native and Expo ([README](native-fonts/README.md)) |
|
|
29
|
+
| `@bloxwap/hig/og-fonts` | Satori / `next/og` faces and the Node loader ([README](og-fonts/README.md)) |
|
|
30
|
+
|
|
31
|
+
## Peers
|
|
32
|
+
|
|
33
|
+
Every renderer, device and overlay peer is optional: install React DOM and Radix for web overlays, React Native
|
|
34
|
+
and its community modules for native, `vaul` for the web gesture sheet, and the Expo or Bloxwap audio/haptic
|
|
35
|
+
packages for feedback, only when you import those entries. `@bloxwap/chart` `^0.3.0 || ^0.4.0` is the one required peer;
|
|
36
|
+
an optional peer on it makes npm 11 drop a host's workspace `@bloxwap/chart` (bloxwap/hig#96).
|
|
37
|
+
|
|
38
|
+
## Moving from 0.1
|
|
39
|
+
|
|
40
|
+
HIG 0.1 published eight packages (`@bloxwap/hig-tokens`, `-contracts`, `-react`, `-native`, `-chart`,
|
|
41
|
+
`-feedback`, `-native-fonts`, `-og-fonts`). Replace them with `@bloxwap/hig` and change the hyphen after `hig`
|
|
42
|
+
to a slash in each import: `@bloxwap/hig-react/button` becomes `@bloxwap/hig/react/button`. Entry names and
|
|
43
|
+
exports are unchanged. In Next, list `'@bloxwap/hig'` in `transpilePackages` or `serverExternalPackages`.
|
|
44
|
+
|
|
45
|
+
MIT licensed. Font binaries are derived from `@bloxwap/font` (OFL-1.1).
|
package/chart/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# @bloxwap/hig/chart
|
|
2
|
+
|
|
3
|
+
Version 0.5.1, an entry of `@bloxwap/hig`. The HIG adapter for [`@bloxwap/chart`](https://github.com/bloxwap/chart): `PriceChart` (a
|
|
4
|
+
`<figure>` with a required text `summary`, lazy-loading `@bloxwap/chart/react` inside `Suspense`) and
|
|
5
|
+
`chartTheme` (HIG token colors in sRGB for the canvas). Web only; React Native uses labeled readouts and lists
|
|
6
|
+
from `@bloxwap/hig/native/data`.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install @bloxwap/hig @bloxwap/chart@^0.5.0
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
import {PriceChart, chartTheme} from '@bloxwap/hig/chart';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Needs `react` and `@bloxwap/chart` `^0.3.0 || ^0.4.0 || ^0.5.0` (0.5.0 is the tested baseline); `HIGProvider` from `@bloxwap/hig/react/provider` supplies the
|
|
17
|
+
loading messages. `@bloxwap/chart` is the one required peer of `@bloxwap/hig`, and deliberately not optional: npm 11 drops a workspace copy of
|
|
18
|
+
`@bloxwap/chart` from a lockfile regenerated from scratch when an installed package declares it as an optional
|
|
19
|
+
peer (bloxwap/hig#96).
|
|
20
|
+
|
|
21
|
+
Moved from `@bloxwap/hig/react/chart` in bloxwap/hig#96; there is no `./react/chart` entry, and no other entry
|
|
22
|
+
imports `@bloxwap/chart`. Replace `@bloxwap/hig/react/chart` with `@bloxwap/hig/chart` in imports; the
|
|
23
|
+
exports and props are unchanged.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ChartProps } from '@bloxwap/chart/react';
|
|
3
|
+
import type { DeepPartial, ChartConfig } from '@bloxwap/chart/config';
|
|
4
|
+
export declare const chartTheme: DeepPartial<ChartConfig>;
|
|
5
|
+
/** Web canvas only. Native uses labeled price rows; no embedded engine or WebView claim. */
|
|
6
|
+
export declare function PriceChart({ summary, ...props }: ChartProps & {
|
|
7
|
+
summary: string;
|
|
8
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
// @bloxwap/hig/chart: the HIG adapter for @bloxwap/chart (#96). No other entry imports @bloxwap/chart, and
|
|
4
|
+
// @bloxwap/hig declares it as a required peer, never optional.
|
|
5
|
+
import { Suspense, lazy, useMemo } from 'react';
|
|
6
|
+
import { tokens } from '@bloxwap/hig/tokens';
|
|
7
|
+
import * as en from '@bloxwap/hig/contracts/messages';
|
|
8
|
+
import { useHIG, useColors } from '@bloxwap/hig/react/provider';
|
|
9
|
+
const Chart = lazy(() => import('@bloxwap/chart/react').then(m => ({ default: m.Chart })));
|
|
10
|
+
export const chartTheme = { theme: { background: tokens.colors.surface.srgb, textColor: tokens.colors.text.srgb, borderColor: tokens.colors.border.srgb, fontFamily: 'Bloxwap Sans, system-ui, sans-serif', monoFamily: 'Bloxwap Mono, monospace' }, grid: { color: tokens.colors.border.srgb }, crosshair: { color: tokens.colors.muted.srgb, labelBackground: tokens.colors.action.srgb, labelColor: tokens.colors.onAction.srgb }, series: { upColor: tokens.colors.buy.srgb, downColor: tokens.colors.sell.srgb } };
|
|
11
|
+
/** Web canvas only. Native uses labeled price rows; no embedded engine or WebView claim. */
|
|
12
|
+
export function PriceChart({ summary, ...props }) { const { messages } = useHIG(); const colors = useColors(); const theme = useMemo(() => ({ ...chartTheme, crosshair: { ...chartTheme.crosshair, labelBackground: colors.action, labelColor: colors.onAction } }), [colors]); return _jsxs("figure", { children: [_jsx("figcaption", { children: summary }), _jsx(Suspense, { fallback: _jsx("p", { role: 'status', children: messages.loadingChart ?? en.loadingChart }), children: _jsx(Chart, { ...props, preset: theme }) })] }); }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface NotificationMessage {
|
|
2
|
+
id: string;
|
|
3
|
+
message: string;
|
|
4
|
+
severity: 'info' | 'success' | 'warning' | 'error';
|
|
5
|
+
}
|
|
6
|
+
/** One announcement per committed burst; repeated ids/content do not create repeated effects. */
|
|
7
|
+
export declare function notificationDelta(previous: ReadonlyMap<string, string>, notices: readonly NotificationMessage[]): {
|
|
8
|
+
next: Map<string, string>;
|
|
9
|
+
id: string | undefined;
|
|
10
|
+
message: string | undefined;
|
|
11
|
+
severity: "error" | "info" | "success" | "warning";
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** One announcement per committed burst; repeated ids/content do not create repeated effects. */
|
|
2
|
+
export function notificationDelta(previous, notices) {
|
|
3
|
+
const unique = [...new Map(notices.map(notice => [notice.id, notice])).values()];
|
|
4
|
+
const next = new Map(unique.map(notice => [notice.id, JSON.stringify([notice.message, notice.severity])]));
|
|
5
|
+
const changed = unique.filter(notice => previous.get(notice.id) !== next.get(notice.id));
|
|
6
|
+
const important = changed.find(notice => notice.severity === 'error') ?? changed.at(-1);
|
|
7
|
+
return { next, id: important?.id, message: important?.message, severity: important?.severity ?? 'info' };
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type FeedbackIntent = 'press' | 'activate' | 'release' | 'cancel' | 'selection' | 'toggle' | 'disclosure' | 'success' | 'warning' | 'error' | 'notification';
|
|
2
|
+
export type FeedbackOrigin = 'pointer' | 'keyboard' | 'native' | 'programmatic';
|
|
3
|
+
/** Async outcomes use the host operation id. A successful call is not proof of physical output. */
|
|
4
|
+
export interface FeedbackEvent {
|
|
5
|
+
id: string;
|
|
6
|
+
source: string;
|
|
7
|
+
intent: FeedbackIntent;
|
|
8
|
+
origin: FeedbackOrigin;
|
|
9
|
+
impact?: 'light' | 'medium' | 'heavy';
|
|
10
|
+
cancelled?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
busy?: boolean;
|
|
13
|
+
suppressed?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface FeedbackSink {
|
|
16
|
+
emit: (event: FeedbackEvent) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface FeedbackPreferences {
|
|
19
|
+
version: 1;
|
|
20
|
+
sound: boolean;
|
|
21
|
+
haptics: boolean;
|
|
22
|
+
volume: number;
|
|
23
|
+
motion: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface FeedbackCapability {
|
|
26
|
+
available: boolean;
|
|
27
|
+
mechanism: 'none' | 'web-audio' | 'browser-vibration' | 'physical-tap' | 'native-audio' | 'native-haptics';
|
|
28
|
+
observed: boolean;
|
|
29
|
+
reason?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface FeedbackAdapter {
|
|
32
|
+
capability: FeedbackCapability;
|
|
33
|
+
play: (event: FeedbackEvent, preferences: FeedbackPreferences) => void | Promise<void>;
|
|
34
|
+
cancel?: () => void | Promise<void>;
|
|
35
|
+
dispose?: () => void | Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
export interface PreferenceStorage {
|
|
38
|
+
read: () => unknown | Promise<unknown>;
|
|
39
|
+
write: (value: FeedbackPreferences) => void | Promise<void>;
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type Density = 'comfortable' | 'compact';
|
|
2
|
+
export type Intent = 'primary' | 'secondary' | 'destructive' | 'ghost';
|
|
3
|
+
export type Direction = 'ltr' | 'rtl';
|
|
4
|
+
export interface Environment {
|
|
5
|
+
density: Density;
|
|
6
|
+
locale: string;
|
|
7
|
+
direction: Direction;
|
|
8
|
+
reducedMotion: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultEnvironment: Environment;
|
|
11
|
+
/** A host-supplied locale: a BCP 47 tag (`ar-EG`), a Java/Android identifier (`ar_EG`, `az_IR_#Arab`), or a locale object that may carry its own `textDirection`, such as expo-localization's `getLocales()[0]`. */
|
|
12
|
+
export type HostLocale = string | {
|
|
13
|
+
readonly textDirection?: Direction | null;
|
|
14
|
+
readonly languageTag?: string | null;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Writing direction of a host-supplied locale, or `undefined` when the value names no language (empty, `und`, malformed).
|
|
18
|
+
* An explicit `textDirection` wins; otherwise a script subtag decides, then the language. Pass the result to `HIGProvider direction`
|
|
19
|
+
* only in apps that lay out right to left: it reports the locale's direction, not whether the host allows RTL (#86).
|
|
20
|
+
*/
|
|
21
|
+
export declare function localeDirection(locale: HostLocale | null | undefined): Direction | undefined;
|
|
22
|
+
/** Display only. Keep raw decimal strings in transaction logic. */
|
|
23
|
+
export declare function formatNumber(value: number | null | undefined, locale?: string, options?: Intl.NumberFormatOptions): string;
|
|
24
|
+
/** Leverage multiplier display (`10×`). Never percent-styled; the `×` suffix is untranslated. Unknown → `—`. */
|
|
25
|
+
export declare function formatLeverage(value: number | null | undefined, locale?: string, options?: Intl.NumberFormatOptions): string;
|
|
26
|
+
/** Amount followed by an untranslated ticker such as `USDC` (not an ISO 4217 currency), joined by a no-break space. Unknown → `—`. */
|
|
27
|
+
export declare function formatTicker(value: number | null | undefined, ticker: string, locale?: string, options?: Intl.NumberFormatOptions): string;
|
|
28
|
+
/** Clock display for funding and other protocol instants. The host must name the zone; the zone name is always shown. Unknown → `—`. */
|
|
29
|
+
export declare function formatZonedTime(value: Date | number | null | undefined, locale: string, timeZone: string, options?: Intl.DateTimeFormatOptions): string;
|
|
30
|
+
/** Font 0.1.2 publishes CSS/Next loaders, native faces are derived by the optional pinned HIG font generator. */
|
|
31
|
+
export interface FontManifest {
|
|
32
|
+
version: string;
|
|
33
|
+
faces: ReadonlyArray<{
|
|
34
|
+
family: string;
|
|
35
|
+
weight: number;
|
|
36
|
+
asset: string;
|
|
37
|
+
script: string;
|
|
38
|
+
registration?: string;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
export declare function nativeFont(manifest: FontManifest, family: string, weight: number, script?: string): string;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export const defaultEnvironment = { density: 'comfortable', locale: 'en-US', direction: 'ltr', reducedMotion: false };
|
|
2
|
+
// Scripts written right to left (ISO 15924), and languages whose default script is one of them when no script subtag is given.
|
|
3
|
+
const rtlScripts = new Set(['adlm', 'arab', 'aran', 'armi', 'avst', 'chrs', 'cprt', 'elym', 'hatr', 'hebr', 'hung', 'khar', 'lydi', 'mand', 'mani', 'mend', 'merc', 'mero', 'narb', 'nbat', 'nkoo', 'orkh', 'ougr', 'palm', 'phli', 'phlp', 'phnx', 'prti', 'rohg', 'samr', 'sarb', 'sogd', 'sogo', 'syrc', 'thaa', 'yezi']);
|
|
4
|
+
const rtlLanguages = new Set(['ar', 'arc', 'azb', 'bal', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'iw', 'ji', 'khw', 'ks', 'lrc', 'mzn', 'nqo', 'pnb', 'prs', 'ps', 'rhg', 'sd', 'sdh', 'skr', 'syr', 'ug', 'ur', 'yi']);
|
|
5
|
+
/**
|
|
6
|
+
* Writing direction of a host-supplied locale, or `undefined` when the value names no language (empty, `und`, malformed).
|
|
7
|
+
* An explicit `textDirection` wins; otherwise a script subtag decides, then the language. Pass the result to `HIGProvider direction`
|
|
8
|
+
* only in apps that lay out right to left: it reports the locale's direction, not whether the host allows RTL (#86).
|
|
9
|
+
*/
|
|
10
|
+
export function localeDirection(locale) {
|
|
11
|
+
if (locale == null)
|
|
12
|
+
return undefined;
|
|
13
|
+
if (typeof locale === 'object') {
|
|
14
|
+
if (locale.textDirection === 'rtl' || locale.textDirection === 'ltr')
|
|
15
|
+
return locale.textDirection;
|
|
16
|
+
return localeDirection(locale.languageTag);
|
|
17
|
+
}
|
|
18
|
+
const [language = '', ...rest] = locale.trim().toLowerCase().split(/[-_#]+/);
|
|
19
|
+
if (!/^[a-z]{2,3}$/.test(language) || language === 'und')
|
|
20
|
+
return undefined;
|
|
21
|
+
// The script precedes any singleton extension (`-u-nu-arab` names Arabic digits, not Arabic script).
|
|
22
|
+
const singleton = rest.findIndex(subtag => subtag.length === 1);
|
|
23
|
+
const script = (singleton < 0 ? rest : rest.slice(0, singleton)).find(subtag => /^[a-z]{4}$/.test(subtag));
|
|
24
|
+
return (script ? rtlScripts.has(script) : rtlLanguages.has(language)) ? 'rtl' : 'ltr';
|
|
25
|
+
}
|
|
26
|
+
/** Display only. Keep raw decimal strings in transaction logic. */
|
|
27
|
+
export function formatNumber(value, locale = 'en-US', options = {}) {
|
|
28
|
+
return value == null || !Number.isFinite(value) ? '—' : new Intl.NumberFormat(locale, options).format(value);
|
|
29
|
+
}
|
|
30
|
+
/** Leverage multiplier display (`10×`). Never percent-styled; the `×` suffix is untranslated. Unknown → `—`. */
|
|
31
|
+
export function formatLeverage(value, locale = 'en-US', options = { maximumFractionDigits: 2 }) {
|
|
32
|
+
const amount = formatNumber(value, locale, { ...options, style: 'decimal' });
|
|
33
|
+
return amount === '—' ? amount : `${amount}×`;
|
|
34
|
+
}
|
|
35
|
+
/** Amount followed by an untranslated ticker such as `USDC` (not an ISO 4217 currency), joined by a no-break space. Unknown → `—`. */
|
|
36
|
+
export function formatTicker(value, ticker, locale = 'en-US', options = {}) {
|
|
37
|
+
const amount = formatNumber(value, locale, { ...options, style: 'decimal' });
|
|
38
|
+
return amount === '—' ? amount : `${amount}\u00a0${ticker}`;
|
|
39
|
+
}
|
|
40
|
+
/** Clock display for funding and other protocol instants. The host must name the zone; the zone name is always shown. Unknown → `—`. */
|
|
41
|
+
export function formatZonedTime(value, locale, timeZone, options = { hour: 'numeric', minute: '2-digit' }) {
|
|
42
|
+
const time = value instanceof Date ? value.getTime() : value;
|
|
43
|
+
if (time == null || !Number.isFinite(time))
|
|
44
|
+
return '—';
|
|
45
|
+
return new Intl.DateTimeFormat(locale, { timeZoneName: 'short', ...options, timeZone }).format(time);
|
|
46
|
+
}
|
|
47
|
+
export function nativeFont(manifest, family, weight, script = 'latin') {
|
|
48
|
+
const face = manifest.faces.find(f => f.family === family && f.weight === weight && f.script === script);
|
|
49
|
+
if (!face)
|
|
50
|
+
throw new Error(`Register a pinned ${family} ${weight} ${script} native face`);
|
|
51
|
+
return face.registration ?? face.family;
|
|
52
|
+
}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in copy rendered by HIG React and React Native components (visible text and accessible names).
|
|
3
|
+
* English (`en-US`) defaults only: HIG ships no translations. Hosts pass their own catalog through
|
|
4
|
+
* `HIGProvider messages`; components with a `closeLabel`/`cancelLabel`/`dismissLabel`/`busyLabel` prop take a
|
|
5
|
+
* per-instance override. Keys and wording are documented in docs/foundations/localization.md.
|
|
6
|
+
*
|
|
7
|
+
* Each English default is also a named export so a component bundles only the copy it renders
|
|
8
|
+
* (`import * as en from '@bloxwap/hig/contracts/messages'; messages.close ?? en.close`).
|
|
9
|
+
*/
|
|
10
|
+
export interface HIGMessages {
|
|
11
|
+
/** Button that closes Dialog, Sheet, Popover, native Menu and GestureSheet. UI dismissal, not the glossary “close” of a position. */
|
|
12
|
+
close: string;
|
|
13
|
+
/** Web AlertDialog's explicit decline button. */
|
|
14
|
+
cancel: string;
|
|
15
|
+
/** Visible Toast dismiss button. */
|
|
16
|
+
dismiss: string;
|
|
17
|
+
/** Toast dismiss accessible name. Must contain `dismiss` (the visible label) so voice control still matches. */
|
|
18
|
+
dismissNotice: (message: string, dismiss: string) => string;
|
|
19
|
+
/** Visible and announced Button busy suffix (` · Working`). An empty string hides the suffix; busy state is still exposed. On Android the platform's busy state description replaces the suffix in the accessible name. */
|
|
20
|
+
busy: string;
|
|
21
|
+
/** Web Toast landmark name. */
|
|
22
|
+
notifications: string;
|
|
23
|
+
/** Spinner default label (an ellipsis is appended on web). */
|
|
24
|
+
loading: string;
|
|
25
|
+
/** Skeleton default label. */
|
|
26
|
+
loadingContent: string;
|
|
27
|
+
/** List loading row. */
|
|
28
|
+
loadingItems: string;
|
|
29
|
+
/** Web PriceChart fallback while the chart engine loads. */
|
|
30
|
+
loadingChart: string;
|
|
31
|
+
/** List default empty text. */
|
|
32
|
+
noItems: string;
|
|
33
|
+
/** Web Table empty text. */
|
|
34
|
+
noRows: string;
|
|
35
|
+
/** List retry button. */
|
|
36
|
+
retry: string;
|
|
37
|
+
/** List load-more button. */
|
|
38
|
+
loadMore: string;
|
|
39
|
+
/** Stale marker appended to a NumberReadout reading and its accessible name. */
|
|
40
|
+
stale: string;
|
|
41
|
+
/** Marker appended to a required Field label and its accessible name. */
|
|
42
|
+
required: string;
|
|
43
|
+
/** Web Breadcrumb landmark name. */
|
|
44
|
+
breadcrumb: string;
|
|
45
|
+
/** Web Pagination landmark name. */
|
|
46
|
+
pagination: string;
|
|
47
|
+
/** Pagination previous-page button. */
|
|
48
|
+
previous: string;
|
|
49
|
+
/** Pagination next-page button. */
|
|
50
|
+
next: string;
|
|
51
|
+
/** Pagination position; `page` and `total` arrive already formatted for the provider locale. */
|
|
52
|
+
pageOf: (page: string, total: string) => string;
|
|
53
|
+
/** Search field label. */
|
|
54
|
+
search: string;
|
|
55
|
+
/** Search in-progress status. */
|
|
56
|
+
searching: string;
|
|
57
|
+
/** Search empty status. */
|
|
58
|
+
noResults: string;
|
|
59
|
+
/** Native Search result count status. Use Intl.PluralRules for locales with more plural forms. */
|
|
60
|
+
resultCount: (count: number, locale: string) => string;
|
|
61
|
+
/** Native BackButton. */
|
|
62
|
+
back: string;
|
|
63
|
+
/** Native Menu sheet description. */
|
|
64
|
+
menuDescription: string;
|
|
65
|
+
/** Native Select trigger value before a choice. */
|
|
66
|
+
choose: string;
|
|
67
|
+
/** Native Select sheet description. */
|
|
68
|
+
chooseOne: string;
|
|
69
|
+
/** Native indeterminate Progress value text. */
|
|
70
|
+
inProgress: string;
|
|
71
|
+
/** Native determinate Progress value text; numbers arrive formatted for the provider locale. */
|
|
72
|
+
progressValue: (value: string, max: string) => string;
|
|
73
|
+
/** InstallCommand success status. */
|
|
74
|
+
copied: string;
|
|
75
|
+
/** InstallCommand failure status. */
|
|
76
|
+
copyFailed: string;
|
|
77
|
+
/** InstallCommand copy button. */
|
|
78
|
+
copyInstallCommand: string;
|
|
79
|
+
/** TradeEntry heading. */
|
|
80
|
+
reviewAssetOrder: (asset: string) => string;
|
|
81
|
+
/** TradeEntry amount field label. */
|
|
82
|
+
amountInAsset: (asset: string) => string;
|
|
83
|
+
/** TradeEntry amount field description. */
|
|
84
|
+
availableAmount: (available: string) => string;
|
|
85
|
+
/** TradeEntry review button. */
|
|
86
|
+
reviewOrder: string;
|
|
87
|
+
/** TradeEntry confirmation dialog title and confirm button. */
|
|
88
|
+
confirmOrder: string;
|
|
89
|
+
/** TradeEntry confirmation dialog description. */
|
|
90
|
+
confirmOrderDescription: (amount: string, asset: string) => string;
|
|
91
|
+
/** TradeEntry error alert title (web). */
|
|
92
|
+
orderUnavailable: string;
|
|
93
|
+
/** ActivityList empty text. */
|
|
94
|
+
noActivity: string;
|
|
95
|
+
/** StatusIndicator `online` state. */
|
|
96
|
+
statusOnline: string;
|
|
97
|
+
/** StatusIndicator `offline` state. */
|
|
98
|
+
statusOffline: string;
|
|
99
|
+
/** StatusIndicator `stale` state. */
|
|
100
|
+
statusStale: string;
|
|
101
|
+
/** Native Slider increment accessibility action label (Android action list; RN 0.83 otherwise exposes an empty label). */
|
|
102
|
+
increase: string;
|
|
103
|
+
/** Native Slider decrement accessibility action label. */
|
|
104
|
+
decrease: string;
|
|
105
|
+
/** Swap panel source side: card placeholder (with an ellipsis) and picker title. */
|
|
106
|
+
swapFrom: string;
|
|
107
|
+
/** Swap panel destination side: card placeholder (with an ellipsis) and picker title. */
|
|
108
|
+
swapTo: string;
|
|
109
|
+
/** Accessible name of a swap card's token slot; receives `swapFrom` or `swapTo`. */
|
|
110
|
+
swapSelectToken: (side: string) => string;
|
|
111
|
+
/** Accessible name of a swap card's amount; receives `swapFrom` or `swapTo`. */
|
|
112
|
+
swapAmount: (side: string) => string;
|
|
113
|
+
/** Accessible name of the conversion capsule that switches an amount between dollars and token units. */
|
|
114
|
+
swapSwitchDenomination: string;
|
|
115
|
+
/** Accessible name of the button that exchanges the two tokens. */
|
|
116
|
+
swapFlip: string;
|
|
117
|
+
/** Swap panel action when both sides are the same asset. */
|
|
118
|
+
swapActionSend: string;
|
|
119
|
+
/** Swap panel action for different assets on one chain. */
|
|
120
|
+
swapActionSwap: string;
|
|
121
|
+
/** Swap panel action for different assets across chains. */
|
|
122
|
+
swapActionBridge: string;
|
|
123
|
+
/** Swap panel action text while a side has no token. */
|
|
124
|
+
swapChooseToken: string;
|
|
125
|
+
/** Swap panel action text while its destination is still to be chosen. */
|
|
126
|
+
swapChooseDestination: string;
|
|
127
|
+
/** Swap panel action text while the amount is zero. */
|
|
128
|
+
swapEnterAmount: string;
|
|
129
|
+
/** Swap panel action text when the amount exceeds the known balance. */
|
|
130
|
+
swapInsufficient: (symbol: string) => string;
|
|
131
|
+
/** Swap panel action text in the receive view. */
|
|
132
|
+
swapSendFromWallet: string;
|
|
133
|
+
/** Accessible name of the swap panel reset button. */
|
|
134
|
+
swapReset: string;
|
|
135
|
+
/** Swap panel settings button and sheet title. */
|
|
136
|
+
swapSettings: string;
|
|
137
|
+
/** Capsule that enters the whole balance. */
|
|
138
|
+
swapMax: string;
|
|
139
|
+
/** Capsule that enters a small trial amount. */
|
|
140
|
+
swapTest: string;
|
|
141
|
+
/** Slippage capsule on the destination card; receives a percent such as `0.5%`. */
|
|
142
|
+
swapSlippage: (percent: string) => string;
|
|
143
|
+
/** Slippage setting row, view title and preset group. */
|
|
144
|
+
swapSlippageTitle: string;
|
|
145
|
+
/** Label of the custom slippage field. */
|
|
146
|
+
swapSlippageCustom: string;
|
|
147
|
+
/** Fee line on the destination card; receives a formatted amount, an ellipsis while loading, or a dash. */
|
|
148
|
+
swapFee: (amount: string) => string;
|
|
149
|
+
/** Fee breakdown setting row and view title. */
|
|
150
|
+
swapFees: string;
|
|
151
|
+
/** Total row of the fee breakdown. */
|
|
152
|
+
swapFeeTotal: string;
|
|
153
|
+
/** Label of the default amount denomination setting. */
|
|
154
|
+
swapDenomination: string;
|
|
155
|
+
/** Dollar denomination option. */
|
|
156
|
+
swapDollars: string;
|
|
157
|
+
/** Token unit denomination option. */
|
|
158
|
+
swapUnits: string;
|
|
159
|
+
/** Token picker search placeholder and accessible name. */
|
|
160
|
+
swapSearchTokens: string;
|
|
161
|
+
/** Accessible name of the token picker chain filter. */
|
|
162
|
+
swapChains: string;
|
|
163
|
+
/** Chain filter option that clears the filter. */
|
|
164
|
+
swapAllChains: string;
|
|
165
|
+
/** Token picker section of host-ranked tokens. */
|
|
166
|
+
swapHot: string;
|
|
167
|
+
/** Token picker section after the hot tokens. */
|
|
168
|
+
swapAllTokens: string;
|
|
169
|
+
/** Token picker empty state. */
|
|
170
|
+
swapNoTokens: string;
|
|
171
|
+
/** Marks the token picker row that is already selected. */
|
|
172
|
+
swapSelected: string;
|
|
173
|
+
/** Token picker button that asks the host to connect a wallet. */
|
|
174
|
+
swapConnectWallet: string;
|
|
175
|
+
/** Accessible name of the token picker disconnect button. */
|
|
176
|
+
swapDisconnect: string;
|
|
177
|
+
/** Switch in the From picker that asks for a deposit address in place of a connected wallet. */
|
|
178
|
+
swapGenerateAddress: string;
|
|
179
|
+
/** Recipient address field placeholder and accessible name. */
|
|
180
|
+
swapRecipient: string;
|
|
181
|
+
/** Accessible name of the recipient QR scan button. */
|
|
182
|
+
swapScan: string;
|
|
183
|
+
/** Accessible name of a wallet address that copies on press (WalletAddress, the SwapPanel receive view); the address follows it. */
|
|
184
|
+
copyAddress: string;
|
|
185
|
+
/** Notice after a wallet address is copied. */
|
|
186
|
+
addressCopied: string;
|
|
187
|
+
/** Visible hint under a wallet address that copies on press. */
|
|
188
|
+
tapToCopy: string;
|
|
189
|
+
/** Accessible name of a wallet address QR code. */
|
|
190
|
+
qrCode: string;
|
|
191
|
+
/** Control key legend in the swap panel's shortcut hint on non-Apple keyboards (`Ctrl K`). Apple keyboards show ⌘. */
|
|
192
|
+
swapControlKey: string;
|
|
193
|
+
/** Accessible name of the swap panel keypad. */
|
|
194
|
+
swapKeypad: string;
|
|
195
|
+
/** Accessible name of the keypad delete key. */
|
|
196
|
+
swapDelete: string;
|
|
197
|
+
}
|
|
198
|
+
export declare const close = "Close";
|
|
199
|
+
export declare const cancel = "Cancel";
|
|
200
|
+
export declare const dismiss = "Dismiss";
|
|
201
|
+
export declare const dismissNotice: (message: string, dismiss: string) => string;
|
|
202
|
+
export declare const busy = "Working";
|
|
203
|
+
export declare const notifications = "Notifications";
|
|
204
|
+
export declare const loading = "Loading";
|
|
205
|
+
export declare const loadingContent = "Loading content";
|
|
206
|
+
export declare const loadingItems = "Loading items";
|
|
207
|
+
export declare const loadingChart = "Loading chart\u2026";
|
|
208
|
+
export declare const noItems = "No items";
|
|
209
|
+
export declare const noRows = "No rows";
|
|
210
|
+
export declare const retry = "Retry";
|
|
211
|
+
export declare const loadMore = "Load more";
|
|
212
|
+
export declare const stale = "(stale)";
|
|
213
|
+
export declare const required = "(required)";
|
|
214
|
+
export declare const breadcrumb = "Breadcrumb";
|
|
215
|
+
export declare const pagination = "Pagination";
|
|
216
|
+
export declare const previous = "Previous";
|
|
217
|
+
export declare const next = "Next";
|
|
218
|
+
export declare const pageOf: (page: string, total: string) => string;
|
|
219
|
+
export declare const search = "Search";
|
|
220
|
+
export declare const searching = "Searching\u2026";
|
|
221
|
+
export declare const noResults = "No results";
|
|
222
|
+
export declare const resultCount: (count: number, locale: string) => string;
|
|
223
|
+
export declare const back = "Back";
|
|
224
|
+
export declare const menuDescription = "Available actions";
|
|
225
|
+
export declare const choose = "Choose";
|
|
226
|
+
export declare const chooseOne = "Choose one option.";
|
|
227
|
+
export declare const inProgress = "In progress";
|
|
228
|
+
export declare const progressValue: (value: string, max: string) => string;
|
|
229
|
+
export declare const copied = "Copied";
|
|
230
|
+
export declare const copyFailed = "Copy failed. Select the command and copy manually.";
|
|
231
|
+
export declare const copyInstallCommand = "Copy install command";
|
|
232
|
+
export declare const reviewAssetOrder: (asset: string) => string;
|
|
233
|
+
export declare const amountInAsset: (asset: string) => string;
|
|
234
|
+
export declare const availableAmount: (available: string) => string;
|
|
235
|
+
export declare const reviewOrder = "Review order";
|
|
236
|
+
export declare const confirmOrder = "Confirm order";
|
|
237
|
+
export declare const confirmOrderDescription: (amount: string, asset: string) => string;
|
|
238
|
+
export declare const orderUnavailable = "Order unavailable";
|
|
239
|
+
export declare const noActivity = "No activity yet";
|
|
240
|
+
export declare const statusOnline = "online";
|
|
241
|
+
export declare const statusOffline = "offline";
|
|
242
|
+
export declare const statusStale = "stale";
|
|
243
|
+
export declare const increase = "Increase";
|
|
244
|
+
export declare const decrease = "Decrease";
|
|
245
|
+
export declare const swapFrom = "From";
|
|
246
|
+
export declare const swapTo = "To";
|
|
247
|
+
export declare const swapSelectToken: (side: string) => string;
|
|
248
|
+
export declare const swapAmount: (side: string) => string;
|
|
249
|
+
export declare const swapSwitchDenomination = "Switch between dollars and token units";
|
|
250
|
+
export declare const swapFlip = "Swap direction";
|
|
251
|
+
export declare const swapActionSend = "Send";
|
|
252
|
+
export declare const swapActionSwap = "Swap";
|
|
253
|
+
export declare const swapActionBridge = "Bridge";
|
|
254
|
+
export declare const swapChooseToken = "Select a token";
|
|
255
|
+
export declare const swapChooseDestination = "Pick a destination";
|
|
256
|
+
export declare const swapEnterAmount = "Enter an amount";
|
|
257
|
+
export declare const swapInsufficient: (symbol: string) => string;
|
|
258
|
+
export declare const swapSendFromWallet = "Send from your wallet";
|
|
259
|
+
export declare const swapReset = "Reset";
|
|
260
|
+
export declare const swapSettings = "Settings";
|
|
261
|
+
export declare const swapMax = "Max";
|
|
262
|
+
export declare const swapTest = "Test";
|
|
263
|
+
export declare const swapSlippage: (percent: string) => string;
|
|
264
|
+
export declare const swapSlippageTitle = "Slippage";
|
|
265
|
+
export declare const swapSlippageCustom = "Custom slippage (%)";
|
|
266
|
+
export declare const swapFee: (amount: string) => string;
|
|
267
|
+
export declare const swapFees = "Fees";
|
|
268
|
+
export declare const swapFeeTotal = "Total";
|
|
269
|
+
export declare const swapDenomination = "Show amounts in";
|
|
270
|
+
export declare const swapDollars = "Dollars";
|
|
271
|
+
export declare const swapUnits = "Units";
|
|
272
|
+
export declare const swapSearchTokens = "Search name or paste address";
|
|
273
|
+
export declare const swapChains = "Chains";
|
|
274
|
+
export declare const swapAllChains = "All";
|
|
275
|
+
export declare const swapHot = "Hot";
|
|
276
|
+
export declare const swapAllTokens = "All tokens";
|
|
277
|
+
export declare const swapNoTokens = "No tokens found";
|
|
278
|
+
export declare const swapSelected = "Selected";
|
|
279
|
+
export declare const swapConnectWallet = "Connect wallet";
|
|
280
|
+
export declare const swapDisconnect = "Disconnect wallet";
|
|
281
|
+
export declare const swapGenerateAddress = "Generate address";
|
|
282
|
+
export declare const swapRecipient = "Recipient address";
|
|
283
|
+
export declare const swapScan = "Scan QR code";
|
|
284
|
+
export declare const copyAddress = "Copy address";
|
|
285
|
+
export declare const addressCopied = "Address copied";
|
|
286
|
+
export declare const tapToCopy = "Tap to copy";
|
|
287
|
+
export declare const qrCode = "QR code";
|
|
288
|
+
export declare const swapControlKey = "Ctrl";
|
|
289
|
+
export declare const swapKeypad = "Keypad";
|
|
290
|
+
export declare const swapDelete = "Delete";
|
|
291
|
+
/** The complete English catalog. */
|
|
292
|
+
export declare const defaultMessages: Readonly<HIGMessages>;
|
|
293
|
+
/** Every message key, in documentation order. */
|
|
294
|
+
export declare const messageKeys: readonly (keyof HIGMessages)[];
|
|
295
|
+
/**
|
|
296
|
+
* Overlays host overrides on a base catalog (both may be partial). `undefined` entries keep the base copy, and a
|
|
297
|
+
* value of the wrong kind (a string for a formatter key, or the reverse) is ignored, so a partial or untyped catalog
|
|
298
|
+
* never blanks a label or throws while rendering.
|
|
299
|
+
*/
|
|
300
|
+
export declare function resolveMessages<T extends Partial<HIGMessages>>(base: T, overrides?: Partial<HIGMessages>): T;
|