@realminc/ui 0.9.0 → 0.10.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/README.md +15 -0
- package/dist/components/chart/chart.d.ts +1 -1
- package/dist/components/chart/chart_pane.d.ts +1 -1
- package/dist/components/chart/indicators.d.ts +1 -1
- package/dist/components/chart/types.d.ts +1 -1
- package/dist/components/display/line_table.d.ts +1 -1
- package/dist/components/display/side_line.d.ts +1 -1
- package/dist/components/feedback/modal.d.ts +1 -1
- package/dist/components/form/button.d.ts +3 -3
- package/dist/components/form/input.d.ts +1 -1
- package/dist/components/form/number_input.d.ts +1 -1
- package/dist/components/fx/scramble_button.d.ts +3 -3
- package/dist/components/fx/scramble_control.d.ts +2 -2
- package/dist/components/fx/scramble_link.d.ts +2 -2
- package/dist/components/fx/scramble_text.d.ts +1 -1
- package/dist/index.js +14701 -10840
- package/dist/styles/tailwind.preset.d.ts +14 -1
- package/dist/tailwind.js +102 -12
- package/dist/theme.js +31 -48
- package/package.json +7 -9
package/README.md
CHANGED
|
@@ -13,6 +13,21 @@ bun add @realminc/ui
|
|
|
13
13
|
bun link ../ui
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
## Build and watch
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
bun ci
|
|
20
|
+
bun run --bun build
|
|
21
|
+
bun run --bun dev
|
|
22
|
+
bun run --bun typecheck
|
|
23
|
+
bun pm pack --dry-run
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Bun bundles the three public JavaScript entry points; TypeScript emits the
|
|
27
|
+
per-module declarations into `dist`. The build keeps React as a peer dependency,
|
|
28
|
+
preserves the React client directive, and copies font CSS. Watch mode rebuilds
|
|
29
|
+
when source files change. Package exports and publication remain unchanged.
|
|
30
|
+
|
|
16
31
|
## Typography System
|
|
17
32
|
|
|
18
33
|
### IBM Design Language
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { OaChartProps } from './types';
|
|
1
|
+
import type { OaChartProps } from './types';
|
|
2
2
|
export declare function OaChart({ data, type, theme, custom_theme, show_volume, indicators, show_time_scale, show_price_scale, auto_fit, crosshairMode, price_formatter, on_candle_click, on_crosshair_move, loading, className, }: OaChartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OaChartPaneProps, OaIndicatorData, OaMacdData } from './types';
|
|
1
|
+
import type { OaChartPaneProps, OaIndicatorData, OaMacdData } from './types';
|
|
2
2
|
export declare function OaRsiPane({ data, height, theme, colors, }: Omit<OaChartPaneProps, 'type'> & {
|
|
3
3
|
data: OaIndicatorData[];
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OaCandle, OaIndicatorData, OaBollingerData, OaMacdData } from './types';
|
|
1
|
+
import type { OaCandle, OaIndicatorData, OaBollingerData, OaMacdData } from './types';
|
|
2
2
|
export declare function calculate_sma(candles: OaCandle[], period: number): OaIndicatorData[];
|
|
3
3
|
export declare function calculate_ema(candles: OaCandle[], period: number): OaIndicatorData[];
|
|
4
4
|
export declare function calculate_bollinger_bands(candles: OaCandle[], period?: number, std_dev?: number): OaBollingerData[];
|
|
@@ -26,4 +26,4 @@ export interface OaModalProps {
|
|
|
26
26
|
*
|
|
27
27
|
* Accessible modal with backdrop, keyboard support, and focus trapping.
|
|
28
28
|
*/
|
|
29
|
-
export declare function OaModal({ is_open, on_close, title, children, size, show_close, close_on_backdrop, close_on_escape, className, footer, }: OaModalProps): import(
|
|
29
|
+
export declare function OaModal({ is_open, on_close, title, children, size, show_close, close_on_backdrop, close_on_escape, className, footer, }: OaModalProps): import("react").ReactPortal | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
export type OaButtonVariant = 'primary' | 'secondary' | 'ghost' | 'buy' | 'sell' | 'outline';
|
|
3
3
|
export type OaButtonSize = 'sm' | 'md' | 'lg';
|
|
4
4
|
export interface OaButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -24,7 +24,7 @@ export interface OaButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElem
|
|
|
24
24
|
* <OaButton variant="primary">Click me</OaButton>
|
|
25
25
|
* <OaButton variant="outline" size="lg">Secondary</OaButton>
|
|
26
26
|
*/
|
|
27
|
-
export declare const OaButton: import(
|
|
27
|
+
export declare const OaButton: import("react").ForwardRefExoticComponent<OaButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
28
28
|
export interface OaButtonLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
29
29
|
/** Button variant */
|
|
30
30
|
variant?: OaButtonVariant;
|
|
@@ -46,7 +46,7 @@ export interface OaButtonLinkProps extends React.AnchorHTMLAttributes<HTMLAnchor
|
|
|
46
46
|
* @example
|
|
47
47
|
* <OaButtonLink href="/path" variant="primary">Go</OaButtonLink>
|
|
48
48
|
*/
|
|
49
|
-
export declare const OaButtonLink: import(
|
|
49
|
+
export declare const OaButtonLink: import("react").ForwardRefExoticComponent<OaButtonLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
50
50
|
export declare const oa_button_styles: {
|
|
51
51
|
base: string;
|
|
52
52
|
variant: Record<OaButtonVariant, string>;
|
|
@@ -15,4 +15,4 @@ export interface OaInputProps extends React.InputHTMLAttributes<HTMLInputElement
|
|
|
15
15
|
/**
|
|
16
16
|
* OaInput - Realm Input Component
|
|
17
17
|
*/
|
|
18
|
-
export declare const OaInput: import(
|
|
18
|
+
export declare const OaInput: import("react").ForwardRefExoticComponent<OaInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -38,4 +38,4 @@ export interface OaNumberInputProps {
|
|
|
38
38
|
* Handles decimal input, min/max validation, and optional +/- buttons.
|
|
39
39
|
* Value is always stored/returned as a string for precision.
|
|
40
40
|
*/
|
|
41
|
-
export declare const OaNumberInput: import(
|
|
41
|
+
export declare const OaNumberInput: import("react").ForwardRefExoticComponent<OaNumberInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { OaScrambleIcon } from './scramble_text';
|
|
1
|
+
import { type ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { type OaScrambleIcon } from './scramble_text';
|
|
3
3
|
export interface OaScrambleButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
4
4
|
children: string;
|
|
5
5
|
icon?: OaScrambleIcon | null;
|
|
6
6
|
icon_class_name?: string;
|
|
7
7
|
uppercase?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const OaScrambleButton: import(
|
|
9
|
+
export declare const OaScrambleButton: import("react").ForwardRefExoticComponent<OaScrambleButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OaScrambleTextHandle } from './scramble_text';
|
|
1
|
+
import type { OaScrambleTextHandle } from './scramble_text';
|
|
2
2
|
export declare function use_oa_scramble_control(): {
|
|
3
3
|
cycle: number;
|
|
4
|
-
text_ref: import(
|
|
4
|
+
text_ref: import("react").RefObject<OaScrambleTextHandle | null>;
|
|
5
5
|
mouseEnter(): void;
|
|
6
6
|
mouseLeave(): void;
|
|
7
7
|
focus(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnchorHTMLAttributes, ElementType } from 'react';
|
|
2
|
-
import { OaScrambleIcon } from './scramble_text';
|
|
1
|
+
import type { AnchorHTMLAttributes, ElementType } from 'react';
|
|
2
|
+
import { type OaScrambleIcon } from './scramble_text';
|
|
3
3
|
export interface OaScrambleLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
4
4
|
children: string;
|
|
5
5
|
as?: ElementType;
|
|
@@ -10,4 +10,4 @@ export interface OaScrambleTextProps {
|
|
|
10
10
|
icon?: OaScrambleIcon | null;
|
|
11
11
|
icon_class_name?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare const OaScrambleText: import(
|
|
13
|
+
export declare const OaScrambleText: import("react").ForwardRefExoticComponent<OaScrambleTextProps & import("react").RefAttributes<OaScrambleTextHandle>>;
|