@bloxwap/hig 0.0.0-stage → 0.2.0
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 +162 -0
- package/contracts/dist/messages.js +68 -0
- package/feedback/README.md +7 -0
- package/feedback/assets/error.wav +0 -0
- package/feedback/assets/manifest.json +68 -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 +96 -0
- package/feedback/dist/contract.js +58 -0
- package/feedback/dist/native.d.ts +27 -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/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 +11 -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 +93 -0
- package/native/dist/brand.d.ts +7 -0
- package/native/dist/brand.js +6 -0
- package/native/dist/button.d.ts +29 -0
- package/native/dist/button.js +34 -0
- package/native/dist/checkbox.d.ts +3 -0
- package/native/dist/checkbox.js +11 -0
- package/native/dist/data.d.ts +40 -0
- package/native/dist/data.js +27 -0
- package/native/dist/field.d.ts +15 -0
- package/native/dist/field.js +13 -0
- package/native/dist/gesture-sheet.d.ts +73 -0
- package/native/dist/gesture-sheet.js +151 -0
- package/native/dist/navigation.d.ts +47 -0
- package/native/dist/navigation.js +16 -0
- package/native/dist/overlay.d.ts +36 -0
- package/native/dist/overlay.js +65 -0
- package/native/dist/provider.d.ts +43 -0
- package/native/dist/provider.js +52 -0
- package/native/dist/radio-group.d.ts +5 -0
- package/native/dist/radio-group.js +53 -0
- package/native/dist/recipes.d.ts +42 -0
- package/native/dist/recipes.js +19 -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 +7 -0
- package/native/dist/selection.js +6 -0
- package/native/dist/slider.d.ts +11 -0
- package/native/dist/slider.js +41 -0
- package/native/dist/status.d.ts +75 -0
- package/native/dist/status.js +72 -0
- package/native/dist/surface.d.ts +18 -0
- package/native/dist/surface.js +41 -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 +23 -0
- package/native/dist/text-content.d.ts +5 -0
- package/native/dist/text-content.js +6 -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 +358 -4
- package/react/README.md +9 -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 +71 -0
- package/react/dist/base.css +9 -0
- package/react/dist/brand.d.ts +7 -0
- package/react/dist/brand.js +4 -0
- package/react/dist/button.d.ts +14 -0
- package/react/dist/button.js +20 -0
- package/react/dist/data.d.ts +63 -0
- package/react/dist/data.js +23 -0
- package/react/dist/dialog.d.ts +29 -0
- package/react/dist/dialog.js +21 -0
- package/react/dist/field.d.ts +15 -0
- package/react/dist/field.js +19 -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/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 +5 -0
- package/react/dist/recipes/install-command.js +8 -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/trade-entry.d.ts +11 -0
- package/react/dist/recipes/trade-entry.js +12 -0
- package/react/dist/recipes.d.ts +8 -0
- package/react/dist/recipes.js +9 -0
- package/react/dist/select.d.ts +4 -0
- package/react/dist/select.js +172 -0
- package/react/dist/selection.d.ts +27 -0
- package/react/dist/selection.js +16 -0
- package/react/dist/slider.d.ts +11 -0
- package/react/dist/slider.js +10 -0
- package/react/dist/status.d.ts +53 -0
- package/react/dist/status.js +43 -0
- package/react/dist/styles.css +228 -0
- package/react/dist/surface.d.ts +291 -0
- package/react/dist/surface.js +9 -0
- package/tokens/README.md +9 -0
- package/tokens/assets/bloxwap-icon.svg +1 -0
- package/tokens/dist/index.d.ts +429 -0
- package/tokens/dist/index.js +507 -0
- package/tokens/dist/manifest.json +197 -0
- package/tokens/dist/theme.d.ts +11 -0
- package/tokens/dist/theme.js +22 -0
- package/tokens/dist/tokens.css +119 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { Choice, CheckedProps, ChoicesProps } from './selection-types.js';
|
|
2
|
+
export { Switch, SwitchRow, type SwitchRowProps } from './switch.js';
|
|
3
|
+
export { Checkbox } from './checkbox.js';
|
|
4
|
+
export { RadioGroup } from './radio-group.js';
|
|
5
|
+
export { Select } from './select.js';
|
|
6
|
+
export { Slider } from './slider.js';
|
|
7
|
+
export { SegmentedControl } from './radio-group.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Switch, SwitchRow } from './switch.js';
|
|
2
|
+
export { Checkbox } from './checkbox.js';
|
|
3
|
+
export { RadioGroup } from './radio-group.js';
|
|
4
|
+
export { Select } from './select.js';
|
|
5
|
+
export { Slider } from './slider.js';
|
|
6
|
+
export { SegmentedControl } from './radio-group.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function Slider({ label, value, defaultValue, min, max, step, disabled, onValueChange }: {
|
|
3
|
+
label: string;
|
|
4
|
+
value?: number;
|
|
5
|
+
defaultValue?: number;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
step?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onValueChange?: (v: number) => void;
|
|
11
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View, Platform, UIManager, requireNativeComponent } from 'react-native';
|
|
3
|
+
import SliderBackend from '@react-native-community/slider';
|
|
4
|
+
import * as en from '@bloxwap/hig/contracts/messages';
|
|
5
|
+
import { useColors, useControllable, useHIG } from './provider.js';
|
|
6
|
+
import { Text } from './surface.js';
|
|
7
|
+
// RN maps accessibilityActions names to fixed or synthetic Android ids and drops action arguments, so a plain View
|
|
8
|
+
// cannot offer ACTION_SET_PROGRESS. The package's autolinked HIGAdjustableView (android/) adds it and reports
|
|
9
|
+
// {actionName:'setProgress',value}; without native linking (Expo Go, web, tests) the wrapper stays a plain View.
|
|
10
|
+
const AndroidAdjustable = Platform.OS === 'android' && UIManager.hasViewManagerConfig?.('HIGAdjustableView') ? requireNativeComponent('HIGAdjustableView') : null;
|
|
11
|
+
export function Slider({ label, value, defaultValue = 0, min = 0, max = 100, step = 1, disabled, onValueChange }) {
|
|
12
|
+
const [current, set] = useControllable(value, defaultValue, onValueChange);
|
|
13
|
+
const { messages } = useHIG();
|
|
14
|
+
const colors = useColors();
|
|
15
|
+
// Explicit action labels (#87): RN 0.83 Android lists an unlabeled increment/decrement action with an empty label "".
|
|
16
|
+
const actions = [{ name: 'increment', label: messages.increase ?? en.increase }, { name: 'decrement', label: messages.decrease ?? en.decrease }];
|
|
17
|
+
// A plain 48dp adjustable View owns label/value/increment/decrement on iOS and Android and hides the backend:
|
|
18
|
+
// @react-native-community/slider 5 drops onAccessibilityAction and its iOS Fabric view ignores accessibilityIncrement
|
|
19
|
+
// (iOS Simulator AX actions 2004/2005 left the value unchanged), and its Android SeekBar node measured 18dp
|
|
20
|
+
// (emulator UiAutomation audit). Steps are 5% of the range, matching Android's native SeekBar increment.
|
|
21
|
+
const accessibilityStep = Math.max(step, Math.round((max - min) / 20 / step) * step);
|
|
22
|
+
const semantics = { accessibilityRole: 'adjustable', accessibilityState: { disabled: !!disabled }, accessibilityLabel: label, accessibilityValue: { min, max, now: current } };
|
|
23
|
+
const clamp = (next) => Math.min(max, Math.max(min, next));
|
|
24
|
+
const adjust = (event) => { if (disabled)
|
|
25
|
+
return; const { actionName, value: requested } = event.nativeEvent; if (actionName === 'setProgress') {
|
|
26
|
+
if (typeof requested === 'number' && Number.isFinite(requested))
|
|
27
|
+
set(clamp(min + Math.round((requested - min) / step) * step));
|
|
28
|
+
return;
|
|
29
|
+
} const direction = actionName === 'increment' ? 1 : actionName === 'decrement' ? -1 : 0; if (direction)
|
|
30
|
+
set(clamp(current + direction * accessibilityStep)); };
|
|
31
|
+
const webProps = Platform.OS === 'web' ? { 'aria-valuemin': min, 'aria-valuemax': max, 'aria-valuenow': current, 'aria-disabled': !!disabled, tabIndex: disabled ? -1 : 0, onKeyDown: (e) => { if (disabled)
|
|
32
|
+
return; const next = e.key === 'Home' ? min : e.key === 'End' ? max : e.key === 'ArrowRight' || e.key === 'ArrowUp' ? current + step : e.key === 'ArrowLeft' || e.key === 'ArrowDown' ? current - step : e.key === 'PageUp' ? current + step * 10 : e.key === 'PageDown' ? current - step * 10 : undefined; if (next !== undefined) {
|
|
33
|
+
e.preventDefault();
|
|
34
|
+
set(Math.min(max, Math.max(min, next)));
|
|
35
|
+
} } } : {};
|
|
36
|
+
const wrap = Platform.OS !== 'web';
|
|
37
|
+
const Adjustable = AndroidAdjustable ?? View;
|
|
38
|
+
const backend = _jsx(SliderBackend, { ...webProps, ...(wrap ? { accessibilityElementsHidden: true, importantForAccessibility: 'no-hide-descendants' } : semantics), minimumValue: min, maximumValue: max, step: step, value: current, disabled: disabled, onValueChange: next => { if (!disabled)
|
|
39
|
+
set(next); }, minimumTrackTintColor: colors.action, maximumTrackTintColor: colors.border, thumbTintColor: colors.text, style: { minHeight: 48 } });
|
|
40
|
+
return _jsxs(View, { children: [_jsxs(Text, { children: [label, ": ", current] }), wrap ? _jsx(Adjustable, { accessible: true, ...semantics, accessibilityActions: actions, onAccessibilityAction: adjust, style: { minHeight: 48, justifyContent: 'center' }, children: backend }) : backend] });
|
|
41
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DimensionValue, type ImageSourcePropType, type ViewProps, type TextProps } from 'react-native';
|
|
3
|
+
import { type AccentRole } from './roles.js';
|
|
4
|
+
export type { AccentRole } from './roles.js';
|
|
5
|
+
declare const severityRole: {
|
|
6
|
+
readonly info: 'info';
|
|
7
|
+
readonly note: 'info';
|
|
8
|
+
readonly success: 'positive';
|
|
9
|
+
readonly tip: 'positive';
|
|
10
|
+
readonly warning: 'warning';
|
|
11
|
+
readonly error: 'negative';
|
|
12
|
+
};
|
|
13
|
+
/** `note` and `tip` are documentation callout severities that reuse the info and positive token roles; `default` is the neutral variant (border stroke, soft white glow). */
|
|
14
|
+
export type AlertSeverity = keyof typeof severityRole | 'default';
|
|
15
|
+
export declare function Badge({ children }: React.PropsWithChildren): React.JSX.Element;
|
|
16
|
+
/** Severity sets the glowing stroke from a token role (info/note → info, success/tip → positive, warning, error → negative, default → neutral border); `tone` swaps in another approved token role, never a raw colour. A non-string title renders inside the Heading, so pass strings or inline Text; its visible text is announced. */
|
|
17
|
+
export declare function Alert({ title, children, severity, tone, action, announce }: React.PropsWithChildren<{
|
|
18
|
+
title: React.ReactNode;
|
|
19
|
+
severity?: AlertSeverity;
|
|
20
|
+
tone?: AccentRole;
|
|
21
|
+
action?: React.ReactNode;
|
|
22
|
+
announce?: boolean;
|
|
23
|
+
}>): React.JSX.Element;
|
|
24
|
+
export declare const Callout: typeof Alert;
|
|
25
|
+
export interface Notice {
|
|
26
|
+
id: string;
|
|
27
|
+
message: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
severity: 'info' | 'success' | 'warning' | 'error';
|
|
30
|
+
action?: React.ReactNode;
|
|
31
|
+
/** Defaults to true when Toast has an onDismiss handler. */
|
|
32
|
+
closable?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface ToastProps {
|
|
35
|
+
notices: readonly Notice[];
|
|
36
|
+
onDismiss?: (id: string) => void;
|
|
37
|
+
/** Dismiss button text; defaults to HIGProvider messages.dismiss. */
|
|
38
|
+
dismissLabel?: string;
|
|
39
|
+
/** Scroll viewport limit, in dp or a percentage of the parent. Defaults to 60% of the window height. */
|
|
40
|
+
maxHeight?: DimensionValue;
|
|
41
|
+
testID?: string;
|
|
42
|
+
}
|
|
43
|
+
/** Compact, scrollable notices remain visible until their host removes them. */
|
|
44
|
+
export declare function Toast({ notices, onDismiss, dismissLabel, maxHeight, testID }: ToastProps): React.JSX.Element;
|
|
45
|
+
export declare function Spinner({ label }: {
|
|
46
|
+
label?: string;
|
|
47
|
+
}): React.JSX.Element;
|
|
48
|
+
export declare function Progress({ label, value, max }: {
|
|
49
|
+
label: string;
|
|
50
|
+
value?: number;
|
|
51
|
+
max?: number;
|
|
52
|
+
}): React.JSX.Element;
|
|
53
|
+
export declare function Skeleton({ label }: {
|
|
54
|
+
label?: string;
|
|
55
|
+
}): React.JSX.Element;
|
|
56
|
+
export interface EmptyStateProps extends Omit<ViewProps, 'children'> {
|
|
57
|
+
title: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
action?: React.ReactNode;
|
|
60
|
+
/** Decorative content, hidden from accessibility; the title and description supply its meaning. */
|
|
61
|
+
illustration?: React.ReactNode;
|
|
62
|
+
titleStyle?: TextProps['style'];
|
|
63
|
+
descriptionStyle?: TextProps['style'];
|
|
64
|
+
/** Applies to both actual text nodes; omitted values retain the provider's scaling policy. */
|
|
65
|
+
maxFontSizeMultiplier?: number;
|
|
66
|
+
}
|
|
67
|
+
export declare function EmptyState({ title, description, action, illustration, titleStyle, descriptionStyle, maxFontSizeMultiplier, ...props }: EmptyStateProps): React.JSX.Element;
|
|
68
|
+
export declare function Avatar({ name, source }: {
|
|
69
|
+
name: string;
|
|
70
|
+
source?: ImageSourcePropType;
|
|
71
|
+
}): React.JSX.Element;
|
|
72
|
+
export declare function StatusIndicator({ label, state }: {
|
|
73
|
+
label: string;
|
|
74
|
+
state: 'online' | 'offline' | 'stale';
|
|
75
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { notificationDelta } from '@bloxwap/hig/contracts/announcements';
|
|
4
|
+
import { ActivityIndicator, View, Image, ScrollView, useWindowDimensions, AccessibilityInfo, Platform } from 'react-native';
|
|
5
|
+
import { Text, Heading, Surface, Stack } from './surface.js';
|
|
6
|
+
import { formatNumber } from '@bloxwap/hig/contracts';
|
|
7
|
+
import { Button } from './button.js';
|
|
8
|
+
import * as en from '@bloxwap/hig/contracts/messages';
|
|
9
|
+
import { useColors, useHIG } from './provider.js';
|
|
10
|
+
import { withAlpha } from '@bloxwap/hig/tokens';
|
|
11
|
+
import { blockText, plainText } from './text-content.js';
|
|
12
|
+
import { roleColor } from './roles.js';
|
|
13
|
+
const severityRole = { info: 'info', note: 'info', success: 'positive', tip: 'positive', warning: 'warning', error: 'negative' };
|
|
14
|
+
function speak(message, severity) { if (Platform.OS === 'web' || !message)
|
|
15
|
+
return; try {
|
|
16
|
+
if (Platform.OS === 'ios' && typeof AccessibilityInfo.announceForAccessibilityWithOptions === 'function')
|
|
17
|
+
AccessibilityInfo.announceForAccessibilityWithOptions(message, { queue: severity !== 'error' });
|
|
18
|
+
else
|
|
19
|
+
AccessibilityInfo.announceForAccessibility(message);
|
|
20
|
+
}
|
|
21
|
+
catch { /* The visible message and navigable text remain available. */ } }
|
|
22
|
+
export function Badge({ children }) { const colors = useColors(); return _jsx(Text, { style: { alignSelf: 'flex-start', maxWidth: '100%', backgroundColor: colors.nested, borderRadius: 9999, paddingVertical: 4, paddingHorizontal: 10 }, children: children }); }
|
|
23
|
+
/** Severity sets the glowing stroke from a token role (info/note → info, success/tip → positive, warning, error → negative, default → neutral border); `tone` swaps in another approved token role, never a raw colour. A non-string title renders inside the Heading, so pass strings or inline Text; its visible text is announced. */
|
|
24
|
+
export function Alert({ title, children, severity = 'info', tone, action, announce = true }) { const colors = useColors(); const neutral = severity === 'default' && tone === undefined; const accent = neutral ? colors.border : roleColor(tone, severityRole[severity] ?? 'info', colors); const message = [plainText(title), blockText(children)].filter(Boolean).join('. '); const previous = useRef(''); useEffect(() => { const key = severity + message; if (announce && key !== previous.current) {
|
|
25
|
+
previous.current = key;
|
|
26
|
+
if (Platform.OS === 'ios')
|
|
27
|
+
speak(message, severity);
|
|
28
|
+
} }); return _jsxs(Surface, { style: { gap: 12, borderWidth: 2, borderColor: accent, borderRadius: 16, backgroundColor: withAlpha(colors.surface, 0.95), boxShadow: neutral ? `0 0 20px ${withAlpha(colors.text, 0.12)}` : `0 0 24px ${withAlpha(accent, 0.55)}` }, accessibilityLiveRegion: announce && Platform.OS !== 'ios' ? (severity === 'error' ? 'assertive' : 'polite') : 'none', children: [_jsx(Heading, { children: title }), children, action] }); }
|
|
29
|
+
export const Callout = Alert;
|
|
30
|
+
/** Compact, scrollable notices remain visible until their host removes them. */
|
|
31
|
+
export function Toast({ notices, onDismiss, dismissLabel, maxHeight, testID }) {
|
|
32
|
+
const { messages } = useHIG();
|
|
33
|
+
const colors = useColors();
|
|
34
|
+
const { height } = useWindowDimensions();
|
|
35
|
+
const dismiss = dismissLabel ?? messages.dismiss ?? en.dismiss;
|
|
36
|
+
const unique = [...new Map(notices.map(n => [n.id, n])).values()];
|
|
37
|
+
const spoken = unique.map(n => ({ ...n, message: [n.message, n.description].filter(Boolean).join('. ') }));
|
|
38
|
+
const previous = useRef(new Map()), [announcement, setAnnouncement] = useState('');
|
|
39
|
+
const timer = useRef(null);
|
|
40
|
+
const key = JSON.stringify(spoken.map(n => [n.id, n.message, n.severity]));
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const delta = notificationDelta(previous.current, spoken);
|
|
43
|
+
previous.current = delta.next;
|
|
44
|
+
if (!delta.message)
|
|
45
|
+
return;
|
|
46
|
+
if (Platform.OS !== 'web') {
|
|
47
|
+
speak(delta.message, delta.severity);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
setAnnouncement('');
|
|
51
|
+
if (timer.current !== null)
|
|
52
|
+
clearTimeout(timer.current);
|
|
53
|
+
timer.current = setTimeout(() => { timer.current = null; if (previous.current.get(delta.id) === delta.next.get(delta.id))
|
|
54
|
+
setAnnouncement(delta.message); }, 25);
|
|
55
|
+
}, [key]);
|
|
56
|
+
useEffect(() => () => { if (timer.current !== null)
|
|
57
|
+
clearTimeout(timer.current); }, []);
|
|
58
|
+
return _jsxs(View, { testID: testID, style: { maxHeight: maxHeight ?? height * .6, flexShrink: 1 }, children: [_jsx(ScrollView, { style: { flexGrow: 0, flexShrink: 1 }, nestedScrollEnabled: true, keyboardShouldPersistTaps: 'handled', accessibilityLabel: messages.notifications ?? en.notifications, children: _jsx(Stack, { style: { gap: 8 }, children: unique.map(n => _jsxs(Surface, { accessibilityLiveRegion: 'none', style: { padding: 12, gap: 8, borderWidth: 2, borderColor: colors[severityRole[n.severity]], borderRadius: 999, backgroundColor: withAlpha(colors.surface, 0.95), boxShadow: `0 0 24px ${withAlpha(colors[severityRole[n.severity]], 0.55)}` }, children: [_jsx(Text, { style: { fontWeight: '600' }, children: n.message }), n.description ? _jsx(Text, { children: n.description }) : null, n.action, n.closable !== false && onDismiss ? _jsx(Button, { intent: 'ghost', accessibilityLabel: (messages.dismissNotice ?? en.dismissNotice)(n.message, dismiss), onPress: () => onDismiss(n.id), children: dismiss }) : null] }, n.id)) }) }), Platform.OS === 'web' && _jsx(Text, { accessibilityLiveRegion: 'polite', style: { position: 'absolute', width: 1, height: 1, overflow: 'hidden' }, children: announcement })] });
|
|
59
|
+
}
|
|
60
|
+
export function Spinner({ label }) { const { messages } = useHIG(); const colors = useColors(); const text = label ?? messages.loading ?? en.loading; return _jsxs(View, { accessible: true, accessibilityLabel: text, children: [_jsx(ActivityIndicator, { color: colors.action }), _jsx(Text, { children: text })] }); }
|
|
61
|
+
export function Progress({ label, value, max = 100 }) {
|
|
62
|
+
const { locale, messages, direction } = useHIG();
|
|
63
|
+
const colors = useColors();
|
|
64
|
+
const fill = value === undefined ? 35 : Math.min(100, Math.max(0, Number.isFinite(value) && max > 0 ? value / max * 100 : 0));
|
|
65
|
+
return _jsxs(View, { style: { gap: 12, direction }, accessibilityRole: 'progressbar', accessibilityLabel: label, accessibilityValue: { min: 0, max, now: value, text: value === undefined ? messages.inProgress ?? en.inProgress : (messages.progressValue ?? en.progressValue)(formatNumber(value, locale), formatNumber(max, locale)) }, children: [_jsxs(Text, { children: [label, value === undefined ? '…' : ` ${value}/${max}`] }), _jsx(View, { accessible: false, accessibilityElementsHidden: true, importantForAccessibility: 'no-hide-descendants', style: { height: 6, borderRadius: 9999, overflow: 'hidden', backgroundColor: colors.nested }, children: _jsx(View, { style: { width: `${fill}%`, height: '100%', alignSelf: value === undefined ? 'center' : 'flex-start', borderRadius: 9999, backgroundColor: colors.action } }) })] });
|
|
66
|
+
}
|
|
67
|
+
export function Skeleton({ label }) { const { messages } = useHIG(); const colors = useColors(); return _jsx(View, { accessible: true, accessibilityLabel: label ?? messages.loadingContent ?? en.loadingContent, style: { minHeight: 48, backgroundColor: colors.nested, borderRadius: 10 } }); }
|
|
68
|
+
export function EmptyState({ title, description, action, illustration, titleStyle, descriptionStyle, maxFontSizeMultiplier, ...props }) {
|
|
69
|
+
return _jsxs(Surface, { ...props, style: [{ gap: 12 }, props.style], children: [illustration != null && _jsx(View, { accessible: false, accessibilityElementsHidden: true, importantForAccessibility: 'no-hide-descendants', children: illustration }), _jsx(Heading, { style: titleStyle, maxFontSizeMultiplier: maxFontSizeMultiplier, children: title }), description ? _jsx(Text, { style: descriptionStyle, maxFontSizeMultiplier: maxFontSizeMultiplier, children: description }) : null, action] });
|
|
70
|
+
}
|
|
71
|
+
export function Avatar({ name, source }) { return source ? _jsx(Image, { source: source, accessibilityLabel: name, style: { width: 40, height: 40, borderRadius: 20 } }) : _jsx(Text, { accessibilityLabel: name, children: name.slice(0, 2) }); }
|
|
72
|
+
export function StatusIndicator({ label, state }) { const { messages } = useHIG(); const text = { online: messages.statusOnline ?? en.statusOnline, offline: messages.statusOffline ?? en.statusOffline, stale: messages.statusStale ?? en.statusStale }[state] ?? state; return _jsxs(Text, { children: [label, ": ", text] }); }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text as RNText, type TextProps, type ViewProps } from 'react-native';
|
|
3
|
+
export type TextScript = 'latin' | 'ko' | 'zh';
|
|
4
|
+
/** Korean and Chinese companion faces are set at their own spacing (0em): Latin tracking spreads CJK glyphs apart. Hosts override per script through HIGProvider `letterSpacingByScript`. */
|
|
5
|
+
export declare const scriptLetterSpacing: Readonly<Record<Exclude<TextScript, 'latin'>, number>>;
|
|
6
|
+
/** Hangul selects the Korean companion; Han (which the KR face does not carry) the Chinese one; shared CJK punctuation follows the locale. */
|
|
7
|
+
export declare function detectScript(text: string, locale: string): TextScript;
|
|
8
|
+
export interface HIGTextProps extends TextProps {
|
|
9
|
+
script?: TextScript; /** Caps Dynamic Type / Android font scale for dense numeric readouts (2 = 200%). Defaults to HIGProvider `maxFontSizeMultiplier`; never disable scaling. */
|
|
10
|
+
maxFontSizeMultiplier?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const Text: React.ForwardRefExoticComponent<HIGTextProps & React.RefAttributes<React.ComponentRef<typeof RNText>>>;
|
|
13
|
+
export declare const Heading: React.ForwardRefExoticComponent<HIGTextProps & React.RefAttributes<React.ComponentRef<typeof RNText>>>;
|
|
14
|
+
export declare function Stack({ style, ...props }: ViewProps): React.JSX.Element;
|
|
15
|
+
export declare function Inline({ style, ...props }: ViewProps): React.JSX.Element;
|
|
16
|
+
export declare function Surface({ style, ...props }: ViewProps): React.JSX.Element;
|
|
17
|
+
export declare const Card: typeof Surface;
|
|
18
|
+
export declare function Separator(): React.JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Text as RNText, View, StyleSheet } from 'react-native';
|
|
4
|
+
import { nativeMetrics as tokens } from '@bloxwap/hig/tokens';
|
|
5
|
+
import { useColors, useHIG } from './provider.js';
|
|
6
|
+
import { plainText } from './text-content.js';
|
|
7
|
+
/** Korean and Chinese companion faces are set at their own spacing (0em): Latin tracking spreads CJK glyphs apart. Hosts override per script through HIGProvider `letterSpacingByScript`. */
|
|
8
|
+
export const scriptLetterSpacing = { ko: 0, zh: 0 };
|
|
9
|
+
const HANGUL = /[\u1100-\u11ff\u3130-\u318f\uac00-\ud7af]/u, HAN = /[\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff]/u, CJK_PUNCTUATION = /[\u3000-\u303f\uff01-\uff60\uffe0-\uffe6]/u;
|
|
10
|
+
/** Hangul selects the Korean companion; Han (which the KR face does not carry) the Chinese one; shared CJK punctuation follows the locale. */
|
|
11
|
+
export function detectScript(text, locale) { if (HANGUL.test(text))
|
|
12
|
+
return 'ko'; if (HAN.test(text))
|
|
13
|
+
return 'zh'; if (CJK_PUNCTUATION.test(text))
|
|
14
|
+
return /^ko\b/i.test(locale) ? 'ko' : 'zh'; return 'latin'; }
|
|
15
|
+
/** Keep a script in its registered companion face even when that family ships fewer static weights. */
|
|
16
|
+
function scriptFont(families, weight) {
|
|
17
|
+
if (!families)
|
|
18
|
+
return undefined;
|
|
19
|
+
if (families[weight])
|
|
20
|
+
return families[weight];
|
|
21
|
+
const weights = Object.keys(families).map(Number).filter(value => Number.isFinite(value) && !!families[value]);
|
|
22
|
+
weights.sort((a, b) => Math.abs(a - Number(weight)) - Math.abs(b - Number(weight)) || a - b);
|
|
23
|
+
return weights.length ? families[weights[0]] : undefined;
|
|
24
|
+
}
|
|
25
|
+
export const Text = forwardRef(function Text({ style, script, maxFontSizeMultiplier, ...props }, ref) {
|
|
26
|
+
const env = useHIG();
|
|
27
|
+
const colors = useColors();
|
|
28
|
+
const resolved = StyleSheet.flatten(style);
|
|
29
|
+
const requested = resolved?.fontWeight ?? 400;
|
|
30
|
+
const weight = requested === 'normal' ? 400 : requested === 'bold' ? 700 : requested;
|
|
31
|
+
const resolvedScript = script ?? detectScript(plainText(props.children), props.accessibilityLanguage ?? env.locale);
|
|
32
|
+
const registered = resolved?.fontFamily ? undefined : scriptFont(env.fontFamiliesByScript?.[resolvedScript], weight) ?? env.fontFamilies?.[weight];
|
|
33
|
+
const tracking = resolvedScript === 'latin' ? undefined : { letterSpacing: (env.letterSpacingByScript?.[resolvedScript] ?? scriptLetterSpacing[resolvedScript]) * (resolved?.fontSize ?? 16) };
|
|
34
|
+
return _jsx(RNText, { ...props, ref: ref, maxFontSizeMultiplier: maxFontSizeMultiplier ?? env.maxFontSizeMultiplier, style: [{ color: colors.text, fontSize: 16, lineHeight: 24, fontFamily: env.fontFamily, writingDirection: env.direction }, style, registered ? { fontFamily: registered, fontWeight: 'normal' } : undefined, tracking] });
|
|
35
|
+
});
|
|
36
|
+
export const Heading = forwardRef(function Heading({ style, ...props }, ref) { return _jsx(Text, { ...props, ref: ref, accessibilityRole: 'header', style: [{ fontSize: 24, lineHeight: 30, fontWeight: '600' }, style] }); });
|
|
37
|
+
export function Stack({ style, ...props }) { const env = useHIG(); return _jsx(View, { ...props, style: [{ direction: env.direction, gap: tokens.space.md }, style] }); }
|
|
38
|
+
export function Inline({ style, ...props }) { const env = useHIG(); return _jsx(View, { ...props, style: [{ direction: env.direction, flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', gap: tokens.space.md }, style] }); }
|
|
39
|
+
export function Surface({ style, ...props }) { const env = useHIG(); const colors = useColors(); return _jsx(View, { ...props, style: [{ direction: env.direction, backgroundColor: colors.surface, borderWidth: 1, borderColor: colors.border, borderRadius: tokens.radius.xl, padding: tokens.space.xl, minWidth: 0 }, style] }); }
|
|
40
|
+
export const Card = Surface;
|
|
41
|
+
export function Separator() { const colors = useColors(); return _jsx(View, { accessibilityRole: 'none', style: { height: 1, backgroundColor: colors.border } }); }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PressableProps } from 'react-native';
|
|
3
|
+
import type { CheckedProps } from './selection-types.js';
|
|
4
|
+
/** One named switch around a host's noninteractive label, description and track. */
|
|
5
|
+
export interface SwitchRowProps extends CheckedProps, Omit<PressableProps, 'children' | 'onPress' | 'disabled' | 'role' | 'accessibilityRole' | 'accessibilityLabel' | 'accessibilityLabelledBy' | 'aria-label' | 'aria-labelledby' | 'aria-checked' | 'aria-disabled'> {
|
|
6
|
+
/** Custom anatomy is decorative. `label` names the switch and `accessibilityHint` describes it. */ children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function SwitchRow({ label, checked, defaultChecked, disabled, onCheckedChange, children, style, accessibilityState, ...props }: SwitchRowProps): React.JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Platform, Pressable, View } from 'react-native';
|
|
3
|
+
import { useControllable, useHIG } from './provider.js';
|
|
4
|
+
export function SwitchRow({ label, checked, defaultChecked = false, disabled, onCheckedChange, children, style, accessibilityState, ...props }) {
|
|
5
|
+
const env = useHIG(), [current, set] = useControllable(checked, defaultChecked, onCheckedChange);
|
|
6
|
+
const toggle = () => { if (!disabled)
|
|
7
|
+
set(!current); };
|
|
8
|
+
// RN Web handles Enter on a switch; its PressResponder reserves Space for buttons.
|
|
9
|
+
const webKeys = Platform.OS === 'web' ? { onKeyDown: (event) => {
|
|
10
|
+
if (event.key === ' ') {
|
|
11
|
+
event.preventDefault();
|
|
12
|
+
event.stopPropagation();
|
|
13
|
+
if (!event.repeat)
|
|
14
|
+
toggle();
|
|
15
|
+
}
|
|
16
|
+
} } : {};
|
|
17
|
+
return _jsx(Pressable, { ...props, ...webKeys, accessible: true, accessibilityRole: 'switch', accessibilityLabel: label, accessibilityState: { ...accessibilityState, checked: current, disabled: !!disabled }, "aria-checked": current, "aria-busy": accessibilityState?.busy, disabled: disabled, onPress: toggle, style: state => [{ direction: env.direction, minHeight: 48, flexDirection: 'row' }, typeof style === 'function' ? style(state) : style], children: _jsx(View, { pointerEvents: 'none', accessibilityElementsHidden: true, importantForAccessibility: 'no-hide-descendants', "aria-hidden": true, style: { flex: 1 }, children: children }) });
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CheckedProps } from './selection-types.js';
|
|
3
|
+
import { type AccentRole } from './roles.js';
|
|
4
|
+
export type { AccentRole } from './roles.js';
|
|
5
|
+
export interface SwitchProps extends CheckedProps {
|
|
6
|
+
tone?: AccentRole;
|
|
7
|
+
}
|
|
8
|
+
/** On iOS/Android the whole labeled row is one 48dp switch target; the platform track is a hidden visual indicator. */
|
|
9
|
+
export declare function Switch({ label, checked, defaultChecked, disabled, tone, onCheckedChange }: SwitchProps): React.JSX.Element;
|
|
10
|
+
export { SwitchRow, type SwitchRowProps } from './switch-row.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Platform, Pressable, Switch as RNSwitch, View } from 'react-native';
|
|
3
|
+
import { nativeMetrics as tokens } from '@bloxwap/hig/tokens';
|
|
4
|
+
import { useColors, useControllable, useHIG } from './provider.js';
|
|
5
|
+
import { Text, Inline } from './surface.js';
|
|
6
|
+
import { roleColor } from './roles.js';
|
|
7
|
+
/** On iOS/Android the whole labeled row is one 48dp switch target; the platform track is a hidden visual indicator. */
|
|
8
|
+
export function Switch({ label, checked, defaultChecked = false, disabled, tone, onCheckedChange }) {
|
|
9
|
+
const env = useHIG();
|
|
10
|
+
const colors = useColors();
|
|
11
|
+
const track = { true: roleColor(tone, 'action', colors), false: colors.nested };
|
|
12
|
+
// Android otherwise paints the thumb with the app theme accent (Material teal on the emulator), a colour outside the token roles; iOS keeps its native white thumb.
|
|
13
|
+
const thumb = Platform.OS === 'android' ? colors.text : undefined;
|
|
14
|
+
const [current, set] = useControllable(checked, defaultChecked, onCheckedChange);
|
|
15
|
+
// react-native-web renders the track as a labeled native checkbox switch; wrapping it would nest interactive controls (axe).
|
|
16
|
+
if (Platform.OS === 'web')
|
|
17
|
+
return _jsxs(Inline, { children: [_jsx(Text, { children: label }), _jsx(RNSwitch, { accessibilityLabel: label, value: current, disabled: disabled, accessibilityState: { checked: current, disabled: !!disabled }, onValueChange: next => { if (!disabled)
|
|
18
|
+
set(next); }, trackColor: track })] });
|
|
19
|
+
return _jsxs(Pressable, { accessibilityRole: 'switch', accessibilityLabel: label, accessibilityState: { checked: current, disabled: !!disabled }, "aria-checked": current, "aria-disabled": !!disabled, disabled: disabled, onPress: () => { if (!disabled)
|
|
20
|
+
set(!current); }, style: { direction: env.direction, minHeight: 48, flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', gap: tokens.space.md }, children: [_jsx(Text, { children: label }), _jsx(View, { pointerEvents: 'none', accessibilityElementsHidden: true, importantForAccessibility: 'no-hide-descendants', children: _jsx(RNSwitch, { value: current, disabled: disabled, onValueChange: next => { if (!disabled)
|
|
21
|
+
set(next); }, trackColor: track, thumbColor: thumb, ios_backgroundColor: colors.nested }) })] });
|
|
22
|
+
}
|
|
23
|
+
export { SwitchRow } from './switch-row.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** Visible string content of a node tree, for announcements, accessible names and script detection. Text nodes are concatenated as rendered (no separator is added) and whitespace runs collapse to one space, so `<>Display-only <Text>value</Text> strings</>` reads `Display-only value strings`. */
|
|
3
|
+
export declare function plainText(children: React.ReactNode): string;
|
|
4
|
+
/** Text of children laid out as separate blocks (siblings in a View, such as an Alert body): each top-level child is read as its own run, joined by a space. */
|
|
5
|
+
export declare function blockText(children: React.ReactNode): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
function concat(children) { return React.Children.toArray(children).map(child => typeof child === 'string' || typeof child === 'number' ? String(child) : React.isValidElement(child) ? concat(child.props.children) : '').join(''); }
|
|
3
|
+
/** Visible string content of a node tree, for announcements, accessible names and script detection. Text nodes are concatenated as rendered (no separator is added) and whitespace runs collapse to one space, so `<>Display-only <Text>value</Text> strings</>` reads `Display-only value strings`. */
|
|
4
|
+
export function plainText(children) { return concat(children).replace(/\s+/gu, ' ').trim(); }
|
|
5
|
+
/** Text of children laid out as separate blocks (siblings in a View, such as an Alert body): each top-level child is read as its own run, joined by a space. */
|
|
6
|
+
export function blockText(children) { return React.Children.toArray(children).map(plainText).filter(Boolean).join(' '); }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @bloxwap/hig/native-fonts
|
|
2
|
+
|
|
3
|
+
Version 0.2.0, an entry of `@bloxwap/hig`. Static Bloxwap Sans/Mono (and Korean/Simplified Chinese Sans) TTF faces for React Native and Expo hosts, derived reproducibly from pinned `@bloxwap/font` 0.1.2 by `npm run generate:fonts`.
|
|
4
|
+
|
|
5
|
+
Web hosts never import this entry: load fonts through `@bloxwap/font` and use `@bloxwap/hig/tokens/css`. Open Graph card renderers (Satori, `next/og`) use the much smaller `@bloxwap/hig/og-fonts` entry instead (#99).
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import {useFonts} from 'expo-font';
|
|
9
|
+
import {fontManifest} from '@bloxwap/hig/native-fonts';
|
|
10
|
+
|
|
11
|
+
const [loaded] = useFonts({
|
|
12
|
+
BloxwapSansRegular: require('@bloxwap/hig/native-fonts/fonts/BloxwapSans.ttf'),
|
|
13
|
+
BloxwapSansSemiBold: require('@bloxwap/hig/native-fonts/fonts/BloxwapSans-SemiBold.ttf'),
|
|
14
|
+
});
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`fontManifest` (also `@bloxwap/hig/native-fonts/manifest`) lists every face with its registration key, PostScript name, weight, script, byte count and SHA-256, plus the hashes of the `@bloxwap/font` sources. It satisfies the `FontManifest` contract in `@bloxwap/hig/contracts`, so `nativeFont(fontManifest, 'BloxwapSans', 600)` resolves a registered family. OFL attribution ships in `fonts/OFL.txt`.
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
export interface NativeFontFace {
|
|
2
|
+
readonly family: string;
|
|
3
|
+
readonly weight: number;
|
|
4
|
+
readonly asset: string;
|
|
5
|
+
readonly script: string;
|
|
6
|
+
readonly registration: string;
|
|
7
|
+
readonly postscript: string;
|
|
8
|
+
readonly bytes: number;
|
|
9
|
+
}
|
|
10
|
+
export interface NativeFontManifest {
|
|
11
|
+
readonly package: string;
|
|
12
|
+
readonly version: string;
|
|
13
|
+
readonly sources: Readonly<Record<string, string>>;
|
|
14
|
+
readonly faces: ReadonlyArray<NativeFontFace>;
|
|
15
|
+
readonly outputs: Readonly<Record<string, string>>;
|
|
16
|
+
}
|
|
17
|
+
export declare const fontManifest: {
|
|
18
|
+
readonly package: "@bloxwap/font";
|
|
19
|
+
readonly version: "0.1.2";
|
|
20
|
+
readonly sources: {
|
|
21
|
+
readonly "fonts/BloxwapSans/BloxwapSans-Variable.woff2": "96f6be58023b1d22152c797336282a4330a47ab4a3c0ab87451be887903746b7";
|
|
22
|
+
readonly "fonts/BloxwapMono/BloxwapMono-Variable.woff2": "fa66e41575807c3d260d8f5b493be349cac127836b0174976c7d4876237d2632";
|
|
23
|
+
readonly "fonts/BloxwapSansKR/BloxwapSansKR-Variable.woff2": "ac41500ba7546e204d07499266cadb848e24c0e9935c2616124aedcfba5a9737";
|
|
24
|
+
readonly "fonts/BloxwapSansSC/BloxwapSansSC-Variable.woff2": "c0244998e334bbd997dc9acfaf3f10bce169facfec1cf2bbcfc4db38c7122893";
|
|
25
|
+
};
|
|
26
|
+
readonly faces: readonly [{
|
|
27
|
+
readonly family: "BloxwapSans";
|
|
28
|
+
readonly weight: 400;
|
|
29
|
+
readonly asset: "BloxwapSans.ttf";
|
|
30
|
+
readonly script: "latin";
|
|
31
|
+
readonly registration: "BloxwapSansRegular";
|
|
32
|
+
readonly postscript: "BloxwapSans-Regular";
|
|
33
|
+
readonly bytes: 446440;
|
|
34
|
+
}, {
|
|
35
|
+
readonly family: "BloxwapSans";
|
|
36
|
+
readonly weight: 500;
|
|
37
|
+
readonly asset: "BloxwapSans-Medium.ttf";
|
|
38
|
+
readonly script: "latin";
|
|
39
|
+
readonly registration: "BloxwapSansMedium";
|
|
40
|
+
readonly postscript: "BloxwapSans-Medium";
|
|
41
|
+
readonly bytes: 447024;
|
|
42
|
+
}, {
|
|
43
|
+
readonly family: "BloxwapSans";
|
|
44
|
+
readonly weight: 600;
|
|
45
|
+
readonly asset: "BloxwapSans-SemiBold.ttf";
|
|
46
|
+
readonly script: "latin";
|
|
47
|
+
readonly registration: "BloxwapSansSemiBold";
|
|
48
|
+
readonly postscript: "BloxwapSans-SemiBold";
|
|
49
|
+
readonly bytes: 447104;
|
|
50
|
+
}, {
|
|
51
|
+
readonly family: "BloxwapSans";
|
|
52
|
+
readonly weight: 700;
|
|
53
|
+
readonly asset: "BloxwapSans-Bold.ttf";
|
|
54
|
+
readonly script: "latin";
|
|
55
|
+
readonly registration: "BloxwapSansBold";
|
|
56
|
+
readonly postscript: "BloxwapSans-Bold";
|
|
57
|
+
readonly bytes: 447388;
|
|
58
|
+
}, {
|
|
59
|
+
readonly family: "BloxwapSans";
|
|
60
|
+
readonly weight: 800;
|
|
61
|
+
readonly asset: "BloxwapSans-ExtraBold.ttf";
|
|
62
|
+
readonly script: "latin";
|
|
63
|
+
readonly registration: "BloxwapSansExtraBold";
|
|
64
|
+
readonly postscript: "BloxwapSans-ExtraBold";
|
|
65
|
+
readonly bytes: 446820;
|
|
66
|
+
}, {
|
|
67
|
+
readonly family: "BloxwapSans";
|
|
68
|
+
readonly weight: 900;
|
|
69
|
+
readonly asset: "BloxwapSans-Black.ttf";
|
|
70
|
+
readonly script: "latin";
|
|
71
|
+
readonly registration: "BloxwapSansBlack";
|
|
72
|
+
readonly postscript: "BloxwapSans-Black";
|
|
73
|
+
readonly bytes: 445912;
|
|
74
|
+
}, {
|
|
75
|
+
readonly family: "BloxwapMono";
|
|
76
|
+
readonly weight: 400;
|
|
77
|
+
readonly asset: "BloxwapMono.ttf";
|
|
78
|
+
readonly script: "latin";
|
|
79
|
+
readonly registration: "BloxwapMonoRegular";
|
|
80
|
+
readonly postscript: "BloxwapMono-Regular";
|
|
81
|
+
readonly bytes: 385336;
|
|
82
|
+
}, {
|
|
83
|
+
readonly family: "BloxwapMono";
|
|
84
|
+
readonly weight: 500;
|
|
85
|
+
readonly asset: "BloxwapMono-Medium.ttf";
|
|
86
|
+
readonly script: "latin";
|
|
87
|
+
readonly registration: "BloxwapMonoMedium";
|
|
88
|
+
readonly postscript: "BloxwapMono-Medium";
|
|
89
|
+
readonly bytes: 385628;
|
|
90
|
+
}, {
|
|
91
|
+
readonly family: "BloxwapMono";
|
|
92
|
+
readonly weight: 600;
|
|
93
|
+
readonly asset: "BloxwapMono-SemiBold.ttf";
|
|
94
|
+
readonly script: "latin";
|
|
95
|
+
readonly registration: "BloxwapMonoSemiBold";
|
|
96
|
+
readonly postscript: "BloxwapMono-SemiBold";
|
|
97
|
+
readonly bytes: 385372;
|
|
98
|
+
}, {
|
|
99
|
+
readonly family: "BloxwapMono";
|
|
100
|
+
readonly weight: 700;
|
|
101
|
+
readonly asset: "BloxwapMono-Bold.ttf";
|
|
102
|
+
readonly script: "latin";
|
|
103
|
+
readonly registration: "BloxwapMonoBold";
|
|
104
|
+
readonly postscript: "BloxwapMono-Bold";
|
|
105
|
+
readonly bytes: 384964;
|
|
106
|
+
}, {
|
|
107
|
+
readonly family: "BloxwapMono";
|
|
108
|
+
readonly weight: 800;
|
|
109
|
+
readonly asset: "BloxwapMono-ExtraBold.ttf";
|
|
110
|
+
readonly script: "latin";
|
|
111
|
+
readonly registration: "BloxwapMonoExtraBold";
|
|
112
|
+
readonly postscript: "BloxwapMono-ExtraBold";
|
|
113
|
+
readonly bytes: 384608;
|
|
114
|
+
}, {
|
|
115
|
+
readonly family: "BloxwapSansKR";
|
|
116
|
+
readonly weight: 400;
|
|
117
|
+
readonly asset: "BloxwapSansKR.ttf";
|
|
118
|
+
readonly script: "korean";
|
|
119
|
+
readonly registration: "BloxwapSansKRRegular";
|
|
120
|
+
readonly postscript: "BloxwapSansKR-Regular";
|
|
121
|
+
readonly bytes: 1294968;
|
|
122
|
+
}, {
|
|
123
|
+
readonly family: "BloxwapSansKR";
|
|
124
|
+
readonly weight: 600;
|
|
125
|
+
readonly asset: "BloxwapSansKR-SemiBold.ttf";
|
|
126
|
+
readonly script: "korean";
|
|
127
|
+
readonly registration: "BloxwapSansKRSemiBold";
|
|
128
|
+
readonly postscript: "BloxwapSansKR-SemiBold";
|
|
129
|
+
readonly bytes: 1295432;
|
|
130
|
+
}, {
|
|
131
|
+
readonly family: "BloxwapSansSC";
|
|
132
|
+
readonly weight: 400;
|
|
133
|
+
readonly asset: "BloxwapSansSC.ttf";
|
|
134
|
+
readonly script: "simplified-chinese";
|
|
135
|
+
readonly registration: "BloxwapSansSCRegular";
|
|
136
|
+
readonly postscript: "BloxwapSansSC-Regular";
|
|
137
|
+
readonly bytes: 2422672;
|
|
138
|
+
}, {
|
|
139
|
+
readonly family: "BloxwapSansSC";
|
|
140
|
+
readonly weight: 600;
|
|
141
|
+
readonly asset: "BloxwapSansSC-SemiBold.ttf";
|
|
142
|
+
readonly script: "simplified-chinese";
|
|
143
|
+
readonly registration: "BloxwapSansSCSemiBold";
|
|
144
|
+
readonly postscript: "BloxwapSansSC-SemiBold";
|
|
145
|
+
readonly bytes: 2422976;
|
|
146
|
+
}];
|
|
147
|
+
readonly outputs: {
|
|
148
|
+
readonly "BloxwapSans.ttf": "778520981b42b408c19e43fc6d62e513ff0c47bd9870d62159e2e74cda2f79f5";
|
|
149
|
+
readonly "BloxwapSans-Medium.ttf": "add342361cd444c59fb05bb072ac71b32ed27d2fd2f9a364bddb6a930c6bd6bd";
|
|
150
|
+
readonly "BloxwapSans-SemiBold.ttf": "7257cb505ec841dae8f5ff3160c629d08003bfd31b9d94334dd4a31798444c8c";
|
|
151
|
+
readonly "BloxwapSans-Bold.ttf": "13e10451ecec4e33733b196454f1232a16d34d5014dce66daaee4d0c58600e1b";
|
|
152
|
+
readonly "BloxwapSans-ExtraBold.ttf": "83cd52444039e62c49d691103fb8ab6329f3135ec8c80e8348e448d03a05cb0a";
|
|
153
|
+
readonly "BloxwapSans-Black.ttf": "a99894c158cff3cff828b7d17ec12f075352848843944a730caa9d64c0362ea2";
|
|
154
|
+
readonly "BloxwapMono.ttf": "6469eea2fc3fbad052301a6e0febf0182aef280b888acbbf1390c623ff168b65";
|
|
155
|
+
readonly "BloxwapMono-Medium.ttf": "f969fd1e4d3b81a7fac108a21a8130b7618f04c39ce7fd5e598fb70fd1230b1f";
|
|
156
|
+
readonly "BloxwapMono-SemiBold.ttf": "88389198a85cb655404e67f3c9ae683b61ee1d85e57f5222d0228833f6c7f7b2";
|
|
157
|
+
readonly "BloxwapMono-Bold.ttf": "3246a540d8bd8d8dda8ee965d0e1f38b9e00cb373cc1756500a052631d01623a";
|
|
158
|
+
readonly "BloxwapMono-ExtraBold.ttf": "89cc3282a7781f08b66d72c0d1b105fdfaa1531e48cfcc50c6eeb5b2b5db64bd";
|
|
159
|
+
readonly "BloxwapSansKR.ttf": "d8eae9352bd2d4ae09eeecdb3ffd9cf9c914982f24db3ff816bb16d8ea329c1e";
|
|
160
|
+
readonly "BloxwapSansKR-SemiBold.ttf": "0897de89055aa2d30722a5bee8a97443a373c5105b726846508477ae49a03e8c";
|
|
161
|
+
readonly "BloxwapSansSC.ttf": "1a6802ac902328f3cd5040d7400a2e9e46f15871fa6ea2c9d8138dfffb8333cb";
|
|
162
|
+
readonly "BloxwapSansSC-SemiBold.ttf": "9af551f298cc13fdffe4f58e7373099f1a84d3caca86a67399acf2cc35970d4b";
|
|
163
|
+
};
|
|
164
|
+
};
|