@realminc/ui 0.10.0 → 0.11.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/dist/index.js
CHANGED
|
@@ -57,7 +57,7 @@ import { useMemo as useMemo2, useRef as useRef3, useState, useContext as useCont
|
|
|
57
57
|
|
|
58
58
|
// node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs
|
|
59
59
|
import { createContext } from "react";
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
var LayoutGroupContext = createContext({});
|
|
62
62
|
|
|
63
63
|
// node_modules/framer-motion/dist/es/utils/use-constant.mjs
|
|
@@ -77,7 +77,7 @@ import { useId as useId2, useCallback, useMemo } from "react";
|
|
|
77
77
|
|
|
78
78
|
// node_modules/framer-motion/dist/es/context/PresenceContext.mjs
|
|
79
79
|
import { createContext as createContext2 } from "react";
|
|
80
|
-
|
|
80
|
+
|
|
81
81
|
var PresenceContext = createContext2(null);
|
|
82
82
|
|
|
83
83
|
// node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs
|
|
@@ -87,7 +87,7 @@ import { useId, useRef as useRef2, useContext, useInsertionEffect } from "react"
|
|
|
87
87
|
|
|
88
88
|
// node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs
|
|
89
89
|
import { createContext as createContext3 } from "react";
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
var MotionConfigContext = createContext3({
|
|
92
92
|
transformPagePoint: (p) => p,
|
|
93
93
|
isStatic: false,
|
|
@@ -95,7 +95,7 @@ var MotionConfigContext = createContext3({
|
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
// node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
|
|
100
100
|
class PopChildMeasure extends React.Component {
|
|
101
101
|
getSnapshotBeforeUpdate(prevProps) {
|
|
@@ -152,7 +152,7 @@ function PopChild({ children, isPresent }) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs
|
|
155
|
-
|
|
155
|
+
|
|
156
156
|
var PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode }) => {
|
|
157
157
|
const presenceChildren = useConstant(newChildrenMap);
|
|
158
158
|
const id = useId2();
|
|
@@ -228,7 +228,7 @@ var isBrowser = typeof window !== "undefined";
|
|
|
228
228
|
var useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect3;
|
|
229
229
|
|
|
230
230
|
// node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs
|
|
231
|
-
|
|
231
|
+
|
|
232
232
|
var AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = "sync", propagate = false }) => {
|
|
233
233
|
const [isParentPresent, safeToRemove] = usePresence(propagate);
|
|
234
234
|
const presentChildren = useMemo2(() => onlyElements(children), [children]);
|
|
@@ -4510,7 +4510,7 @@ import { useContext as useContext4, Component as Component2 } from "react";
|
|
|
4510
4510
|
|
|
4511
4511
|
// node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs
|
|
4512
4512
|
import { createContext as createContext4 } from "react";
|
|
4513
|
-
|
|
4513
|
+
|
|
4514
4514
|
var SwitchLayoutGroupContext = createContext4({});
|
|
4515
4515
|
|
|
4516
4516
|
// node_modules/framer-motion/dist/es/projection/node/state.mjs
|
|
@@ -4574,7 +4574,7 @@ function addScaleCorrector(correctors) {
|
|
|
4574
4574
|
var { schedule: microtask, cancel: cancelMicrotask } = createRenderBatcher(queueMicrotask, false);
|
|
4575
4575
|
|
|
4576
4576
|
// node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs
|
|
4577
|
-
|
|
4577
|
+
|
|
4578
4578
|
|
|
4579
4579
|
class MeasureLayoutWithContext extends Component2 {
|
|
4580
4580
|
componentDidMount() {
|
|
@@ -6270,12 +6270,12 @@ import { forwardRef, useContext as useContext7 } from "react";
|
|
|
6270
6270
|
|
|
6271
6271
|
// node_modules/framer-motion/dist/es/context/LazyContext.mjs
|
|
6272
6272
|
import { createContext as createContext5 } from "react";
|
|
6273
|
-
|
|
6273
|
+
|
|
6274
6274
|
var LazyContext = createContext5({ strict: false });
|
|
6275
6275
|
|
|
6276
6276
|
// node_modules/framer-motion/dist/es/context/MotionContext/index.mjs
|
|
6277
6277
|
import { createContext as createContext6 } from "react";
|
|
6278
|
-
|
|
6278
|
+
|
|
6279
6279
|
var MotionContext = createContext6({});
|
|
6280
6280
|
|
|
6281
6281
|
// node_modules/framer-motion/dist/es/context/MotionContext/create.mjs
|
|
@@ -6456,7 +6456,7 @@ function getClosestProjectingNode(visualElement) {
|
|
|
6456
6456
|
}
|
|
6457
6457
|
|
|
6458
6458
|
// node_modules/framer-motion/dist/es/motion/index.mjs
|
|
6459
|
-
|
|
6459
|
+
|
|
6460
6460
|
function createRendererMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component }) {
|
|
6461
6461
|
var _a, _b;
|
|
6462
6462
|
preloadedFeatures && loadFeatures(preloadedFeatures);
|
|
@@ -7540,7 +7540,7 @@ var createMotionComponent = /* @__PURE__ */ createMotionComponentFactory({
|
|
|
7540
7540
|
var motion = /* @__PURE__ */ createDOMMotionComponentProxy(createMotionComponent);
|
|
7541
7541
|
|
|
7542
7542
|
// node_modules/framer-motion/dist/es/index.mjs
|
|
7543
|
-
|
|
7543
|
+
|
|
7544
7544
|
// node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
7545
7545
|
import { forwardRef as forwardRef3, createElement as createElement3 } from "react";
|
|
7546
7546
|
|
|
@@ -7692,7 +7692,7 @@ var __iconNode15 = [
|
|
|
7692
7692
|
var X = createLucideIcon("x", __iconNode15);
|
|
7693
7693
|
// src/components/nav/navbar.tsx
|
|
7694
7694
|
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
7695
|
-
|
|
7695
|
+
|
|
7696
7696
|
var OaDefaultLink = ({ href, className, children }) => /* @__PURE__ */ jsx7("a", {
|
|
7697
7697
|
href,
|
|
7698
7698
|
className,
|
|
@@ -7890,7 +7890,7 @@ function OaWidget({
|
|
|
7890
7890
|
// src/components/layout/tabs.tsx
|
|
7891
7891
|
import { useState as useState2 } from "react";
|
|
7892
7892
|
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
7893
|
-
|
|
7893
|
+
|
|
7894
7894
|
function OaTabs({
|
|
7895
7895
|
tabs,
|
|
7896
7896
|
default_tab,
|
|
@@ -7961,7 +7961,7 @@ function OaContainer({
|
|
|
7961
7961
|
// src/components/layout/table.tsx
|
|
7962
7962
|
import { useState as useState3, useMemo as useMemo7, useCallback as useCallback4 } from "react";
|
|
7963
7963
|
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
7964
|
-
|
|
7964
|
+
|
|
7965
7965
|
function OaTable({
|
|
7966
7966
|
data,
|
|
7967
7967
|
columns,
|
|
@@ -10886,7 +10886,7 @@ prismjs/prism.js:
|
|
|
10886
10886
|
|
|
10887
10887
|
// src/components/display/code_block.tsx
|
|
10888
10888
|
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
10889
|
-
|
|
10889
|
+
|
|
10890
10890
|
var vscode_dark_modern = {
|
|
10891
10891
|
plain: {
|
|
10892
10892
|
color: "#cccccc",
|
|
@@ -11386,7 +11386,7 @@ function OaTokenIcon({
|
|
|
11386
11386
|
}
|
|
11387
11387
|
// src/components/display/side_line.tsx
|
|
11388
11388
|
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
11389
|
-
|
|
11389
|
+
|
|
11390
11390
|
function OaSideLine({
|
|
11391
11391
|
title,
|
|
11392
11392
|
description,
|
|
@@ -11420,7 +11420,7 @@ function OaSideLine({
|
|
|
11420
11420
|
}
|
|
11421
11421
|
// src/components/display/image_card.tsx
|
|
11422
11422
|
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
11423
|
-
|
|
11423
|
+
|
|
11424
11424
|
function OaImageCard({
|
|
11425
11425
|
src,
|
|
11426
11426
|
alt,
|
|
@@ -11467,7 +11467,7 @@ function OaImageCard({
|
|
|
11467
11467
|
}
|
|
11468
11468
|
// src/components/display/marquee.tsx
|
|
11469
11469
|
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
11470
|
-
|
|
11470
|
+
|
|
11471
11471
|
function OaMarquee({
|
|
11472
11472
|
items,
|
|
11473
11473
|
speed = 30,
|
|
@@ -11543,8 +11543,51 @@ function OaLabel({
|
|
|
11543
11543
|
children
|
|
11544
11544
|
});
|
|
11545
11545
|
}
|
|
11546
|
-
// src/components/display/
|
|
11546
|
+
// src/components/display/footnotes.tsx
|
|
11547
11547
|
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
11548
|
+
|
|
11549
|
+
function OaFootnotes({ items, variant = "dark", on_marker_click, className }) {
|
|
11550
|
+
const is_dark = variant === "dark";
|
|
11551
|
+
return /* @__PURE__ */ jsx21("ul", {
|
|
11552
|
+
className: clsx("space-y-4 text-base leading-relaxed", is_dark ? "text-realm-text-tertiary" : "text-light-text-muted", className),
|
|
11553
|
+
children: items.map((item, index) => {
|
|
11554
|
+
const marker = typeof item === "string" ? "*" : item.marker ?? "*";
|
|
11555
|
+
const children = typeof item === "string" ? item : item.children;
|
|
11556
|
+
const id = typeof item === "string" ? undefined : item.id;
|
|
11557
|
+
const href = typeof item === "string" ? undefined : item.href;
|
|
11558
|
+
const marker_class = clsx("w-8 shrink-0 transition-colors", href && (is_dark ? "hover:text-white" : "hover:text-light-text-primary"));
|
|
11559
|
+
return /* @__PURE__ */ jsxs13("li", {
|
|
11560
|
+
id,
|
|
11561
|
+
className: "flex",
|
|
11562
|
+
children: [
|
|
11563
|
+
href ? /* @__PURE__ */ jsxs13("a", {
|
|
11564
|
+
href,
|
|
11565
|
+
onClick: on_marker_click,
|
|
11566
|
+
className: marker_class,
|
|
11567
|
+
children: [
|
|
11568
|
+
"[",
|
|
11569
|
+
marker,
|
|
11570
|
+
"]"
|
|
11571
|
+
]
|
|
11572
|
+
}) : /* @__PURE__ */ jsxs13("span", {
|
|
11573
|
+
className: marker_class,
|
|
11574
|
+
children: [
|
|
11575
|
+
"[",
|
|
11576
|
+
marker,
|
|
11577
|
+
"]"
|
|
11578
|
+
]
|
|
11579
|
+
}),
|
|
11580
|
+
/* @__PURE__ */ jsx21("p", {
|
|
11581
|
+
className: "min-w-0",
|
|
11582
|
+
children
|
|
11583
|
+
})
|
|
11584
|
+
]
|
|
11585
|
+
}, index);
|
|
11586
|
+
})
|
|
11587
|
+
});
|
|
11588
|
+
}
|
|
11589
|
+
// src/components/display/side_indicator.tsx
|
|
11590
|
+
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
11548
11591
|
var is_bullish = (side) => side === "buy" || side === "long";
|
|
11549
11592
|
var size_styles2 = {
|
|
11550
11593
|
xs: "text-[10px]",
|
|
@@ -11581,13 +11624,13 @@ function OaSideIndicator({
|
|
|
11581
11624
|
const dot_class = bullish ? "bg-realm-buy" : "bg-realm-sell";
|
|
11582
11625
|
const display_label = label || default_labels[side] || side;
|
|
11583
11626
|
if (variant === "dot") {
|
|
11584
|
-
return /* @__PURE__ */
|
|
11627
|
+
return /* @__PURE__ */ jsxs14("span", {
|
|
11585
11628
|
className: clsx("inline-flex items-center gap-1.5", className),
|
|
11586
11629
|
children: [
|
|
11587
|
-
/* @__PURE__ */
|
|
11630
|
+
/* @__PURE__ */ jsx22("span", {
|
|
11588
11631
|
className: clsx("rounded-full", dot_sizes[size], dot_class)
|
|
11589
11632
|
}),
|
|
11590
|
-
show_label && /* @__PURE__ */
|
|
11633
|
+
show_label && /* @__PURE__ */ jsx22("span", {
|
|
11591
11634
|
className: clsx(size_styles2[size], color_class),
|
|
11592
11635
|
children: display_label
|
|
11593
11636
|
})
|
|
@@ -11595,19 +11638,19 @@ function OaSideIndicator({
|
|
|
11595
11638
|
});
|
|
11596
11639
|
}
|
|
11597
11640
|
if (variant === "badge") {
|
|
11598
|
-
return /* @__PURE__ */
|
|
11641
|
+
return /* @__PURE__ */ jsx22("span", {
|
|
11599
11642
|
className: clsx("inline-flex items-center rounded font-medium uppercase", size_styles2[size], badge_padding[size], color_class, bg_class, className),
|
|
11600
11643
|
children: display_label
|
|
11601
11644
|
});
|
|
11602
11645
|
}
|
|
11603
|
-
return /* @__PURE__ */
|
|
11646
|
+
return /* @__PURE__ */ jsx22("span", {
|
|
11604
11647
|
className: clsx(size_styles2[size], color_class, className),
|
|
11605
11648
|
children: display_label
|
|
11606
11649
|
});
|
|
11607
11650
|
}
|
|
11608
11651
|
// src/components/display/price_display.tsx
|
|
11609
11652
|
import { useMemo as useMemo9 } from "react";
|
|
11610
|
-
import { jsx as
|
|
11653
|
+
import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
11611
11654
|
var size_styles3 = {
|
|
11612
11655
|
xs: "text-[10px]",
|
|
11613
11656
|
sm: "text-[11px]",
|
|
@@ -11667,13 +11710,13 @@ function OaPriceDisplay({
|
|
|
11667
11710
|
return { formatted, sign };
|
|
11668
11711
|
}, [value, decimals, locale, show_sign]);
|
|
11669
11712
|
const color_class = get_color_class(color, value, reference_value);
|
|
11670
|
-
return /* @__PURE__ */
|
|
11713
|
+
return /* @__PURE__ */ jsxs15("span", {
|
|
11671
11714
|
className: clsx("tabular-nums", size_styles3[size], color_class, className),
|
|
11672
11715
|
children: [
|
|
11673
11716
|
formattedValue.sign,
|
|
11674
11717
|
currency,
|
|
11675
11718
|
formattedValue.formatted,
|
|
11676
|
-
token && /* @__PURE__ */
|
|
11719
|
+
token && /* @__PURE__ */ jsx23("span", {
|
|
11677
11720
|
className: "text-realm-text-tertiary ml-1",
|
|
11678
11721
|
children: token
|
|
11679
11722
|
})
|
|
@@ -11682,7 +11725,7 @@ function OaPriceDisplay({
|
|
|
11682
11725
|
}
|
|
11683
11726
|
// src/components/display/number_display.tsx
|
|
11684
11727
|
import { useMemo as useMemo10 } from "react";
|
|
11685
|
-
import { jsxs as
|
|
11728
|
+
import { jsxs as jsxs16 } from "react/jsx-runtime";
|
|
11686
11729
|
var size_styles4 = {
|
|
11687
11730
|
xs: "text-[10px]",
|
|
11688
11731
|
sm: "text-[11px]",
|
|
@@ -11731,7 +11774,7 @@ function OaNumberDisplay({
|
|
|
11731
11774
|
const sign = show_sign && value > 0 ? "+" : value < 0 ? "-" : "";
|
|
11732
11775
|
return sign + formatted;
|
|
11733
11776
|
}, [value, decimals, locale, show_sign]);
|
|
11734
|
-
return /* @__PURE__ */
|
|
11777
|
+
return /* @__PURE__ */ jsxs16("span", {
|
|
11735
11778
|
className: clsx("tabular-nums", size_styles4[size], variant_styles2[variant], className),
|
|
11736
11779
|
children: [
|
|
11737
11780
|
prefix,
|
|
@@ -11741,8 +11784,8 @@ function OaNumberDisplay({
|
|
|
11741
11784
|
});
|
|
11742
11785
|
}
|
|
11743
11786
|
// src/components/display/benchmark_table.tsx
|
|
11744
|
-
import { jsx as
|
|
11745
|
-
|
|
11787
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
11788
|
+
|
|
11746
11789
|
function OaBenchmarkTable({
|
|
11747
11790
|
title,
|
|
11748
11791
|
subtitle,
|
|
@@ -11769,44 +11812,44 @@ function OaBenchmarkTable({
|
|
|
11769
11812
|
}
|
|
11770
11813
|
}
|
|
11771
11814
|
}
|
|
11772
|
-
return /* @__PURE__ */
|
|
11815
|
+
return /* @__PURE__ */ jsxs17("div", {
|
|
11773
11816
|
className: clsx("my-4 sm:my-6 overflow-hidden rounded-lg sm:rounded-xl", is_dark ? "bg-[#0a0a0a]" : "bg-white border border-black/[0.08]", className),
|
|
11774
11817
|
children: [
|
|
11775
|
-
(title || subtitle) && /* @__PURE__ */
|
|
11818
|
+
(title || subtitle) && /* @__PURE__ */ jsxs17("div", {
|
|
11776
11819
|
className: "px-4 sm:px-5 pt-4 sm:pt-5 pb-2",
|
|
11777
11820
|
children: [
|
|
11778
|
-
title && /* @__PURE__ */
|
|
11821
|
+
title && /* @__PURE__ */ jsx24("h3", {
|
|
11779
11822
|
className: clsx("text-[11px] font-semibold uppercase tracking-[0.15em]", is_dark ? "text-white/60" : "text-black/50"),
|
|
11780
11823
|
children: title
|
|
11781
11824
|
}),
|
|
11782
|
-
subtitle && /* @__PURE__ */
|
|
11825
|
+
subtitle && /* @__PURE__ */ jsx24("p", {
|
|
11783
11826
|
className: clsx("text-xs mt-1", is_dark ? "text-white/40" : "text-black/40"),
|
|
11784
11827
|
children: subtitle
|
|
11785
11828
|
})
|
|
11786
11829
|
]
|
|
11787
11830
|
}),
|
|
11788
|
-
/* @__PURE__ */
|
|
11831
|
+
/* @__PURE__ */ jsx24("div", {
|
|
11789
11832
|
className: "overflow-x-auto",
|
|
11790
|
-
children: /* @__PURE__ */
|
|
11833
|
+
children: /* @__PURE__ */ jsxs17("table", {
|
|
11791
11834
|
className: "w-full text-[13px]",
|
|
11792
11835
|
children: [
|
|
11793
|
-
/* @__PURE__ */
|
|
11794
|
-
children: /* @__PURE__ */
|
|
11836
|
+
/* @__PURE__ */ jsx24("thead", {
|
|
11837
|
+
children: /* @__PURE__ */ jsx24("tr", {
|
|
11795
11838
|
className: clsx("border-b", is_dark ? "border-white/[0.06]" : "border-black/[0.06]"),
|
|
11796
|
-
children: columns.map((col) => /* @__PURE__ */
|
|
11839
|
+
children: columns.map((col) => /* @__PURE__ */ jsx24("th", {
|
|
11797
11840
|
className: clsx("px-4 sm:px-5 py-2.5 font-medium", "text-[10px] uppercase tracking-[0.15em]", is_dark ? "text-white/40" : "text-black/40", col.align === "right" ? "text-right" : col.align === "center" ? "text-center" : "text-left"),
|
|
11798
11841
|
children: col.label
|
|
11799
11842
|
}, col.key))
|
|
11800
11843
|
})
|
|
11801
11844
|
}),
|
|
11802
|
-
/* @__PURE__ */
|
|
11803
|
-
children: rows.map((row, i) => /* @__PURE__ */
|
|
11845
|
+
/* @__PURE__ */ jsx24("tbody", {
|
|
11846
|
+
children: rows.map((row, i) => /* @__PURE__ */ jsx24("tr", {
|
|
11804
11847
|
className: clsx("border-b last:border-b-0", is_dark ? "border-white/[0.04]" : "border-black/[0.04]"),
|
|
11805
11848
|
children: columns.map((col) => {
|
|
11806
11849
|
const val = row[col.key];
|
|
11807
11850
|
const num_val = Number(val);
|
|
11808
11851
|
const is_best = highlight_best && best_values[col.key] !== undefined && num_val === best_values[col.key];
|
|
11809
|
-
return /* @__PURE__ */
|
|
11852
|
+
return /* @__PURE__ */ jsx24("td", {
|
|
11810
11853
|
className: clsx("px-4 sm:px-5 py-2.5 whitespace-nowrap", col.align === "right" ? "text-right tabular-nums" : col.align === "center" ? "text-center" : "text-left", is_dark ? "text-white/80" : "text-black/80", is_best && "font-semibold text-[#28c840]"),
|
|
11811
11854
|
children: val ?? "—"
|
|
11812
11855
|
}, col.key);
|
|
@@ -11816,20 +11859,20 @@ function OaBenchmarkTable({
|
|
|
11816
11859
|
]
|
|
11817
11860
|
})
|
|
11818
11861
|
}),
|
|
11819
|
-
comparisons && comparisons.length > 0 && /* @__PURE__ */
|
|
11862
|
+
comparisons && comparisons.length > 0 && /* @__PURE__ */ jsx24("div", {
|
|
11820
11863
|
className: clsx("px-4 sm:px-5 py-3 sm:py-4 border-t flex flex-wrap gap-x-6 gap-y-2", is_dark ? "border-white/[0.06]" : "border-black/[0.06]"),
|
|
11821
|
-
children: comparisons.map((cmp, i) => /* @__PURE__ */
|
|
11864
|
+
children: comparisons.map((cmp, i) => /* @__PURE__ */ jsxs17("div", {
|
|
11822
11865
|
className: "flex items-baseline gap-2",
|
|
11823
11866
|
children: [
|
|
11824
|
-
/* @__PURE__ */
|
|
11867
|
+
/* @__PURE__ */ jsx24("span", {
|
|
11825
11868
|
className: clsx("text-[10px] uppercase tracking-[0.15em]", is_dark ? "text-white/40" : "text-black/40"),
|
|
11826
11869
|
children: cmp.label
|
|
11827
11870
|
}),
|
|
11828
|
-
/* @__PURE__ */
|
|
11871
|
+
/* @__PURE__ */ jsx24("span", {
|
|
11829
11872
|
className: clsx("text-sm font-semibold tabular-nums", is_dark ? "text-white/90" : "text-black/90"),
|
|
11830
11873
|
children: cmp.value
|
|
11831
11874
|
}),
|
|
11832
|
-
cmp.delta && /* @__PURE__ */
|
|
11875
|
+
cmp.delta && /* @__PURE__ */ jsx24("span", {
|
|
11833
11876
|
className: clsx("text-xs font-medium tabular-nums", cmp.positive ? "text-[#28c840]" : "text-[#ff453a]"),
|
|
11834
11877
|
children: cmp.delta
|
|
11835
11878
|
})
|
|
@@ -11840,8 +11883,8 @@ function OaBenchmarkTable({
|
|
|
11840
11883
|
});
|
|
11841
11884
|
}
|
|
11842
11885
|
// src/components/display/line_table.tsx
|
|
11843
|
-
import { jsx as
|
|
11844
|
-
|
|
11886
|
+
import { jsx as jsx25, jsxs as jsxs18, Fragment as Fragment4 } from "react/jsx-runtime";
|
|
11887
|
+
|
|
11845
11888
|
function surface_classes(variant) {
|
|
11846
11889
|
return variant === "dark" ? "border-white/15 bg-realm-bg-line" : "border-black/10 bg-light-bg-widget";
|
|
11847
11890
|
}
|
|
@@ -11857,25 +11900,25 @@ function OaLineTableGrid({
|
|
|
11857
11900
|
}) {
|
|
11858
11901
|
const is_dark = variant === "dark";
|
|
11859
11902
|
const has_two_columns = columns === 2;
|
|
11860
|
-
return /* @__PURE__ */
|
|
11903
|
+
return /* @__PURE__ */ jsx25("div", {
|
|
11861
11904
|
className: clsx("not-prose grid overflow-hidden rounded-xl border-2", has_two_columns && "md:grid-cols-2", surface_classes(variant), className),
|
|
11862
11905
|
children: items.map((item, index) => {
|
|
11863
11906
|
const number = item.number ?? String(index + 1).padStart(2, "0");
|
|
11864
11907
|
const itemClassName = clsx("grid grid-cols-[2rem_minmax(0,1fr)] gap-4 px-5 py-7 sm:px-6 md:gap-6 md:px-8 md:py-9 lg:px-10", rule_classes(variant), index < items.length - 1 && "border-b-2", has_two_columns && index >= items.length - 2 && "md:border-b-0", has_two_columns && index % 2 === 0 && "md:border-r-2");
|
|
11865
|
-
const content = /* @__PURE__ */
|
|
11908
|
+
const content = /* @__PURE__ */ jsxs18(Fragment4, {
|
|
11866
11909
|
children: [
|
|
11867
|
-
/* @__PURE__ */
|
|
11910
|
+
/* @__PURE__ */ jsx25("span", {
|
|
11868
11911
|
className: clsx("text-center font-mono text-[11px]", is_dark ? "text-white/35" : "text-light-text-muted"),
|
|
11869
11912
|
children: number
|
|
11870
11913
|
}),
|
|
11871
|
-
/* @__PURE__ */
|
|
11914
|
+
/* @__PURE__ */ jsxs18("div", {
|
|
11872
11915
|
className: "min-w-0",
|
|
11873
11916
|
children: [
|
|
11874
|
-
/* @__PURE__ */
|
|
11917
|
+
/* @__PURE__ */ jsx25("h3", {
|
|
11875
11918
|
className: clsx("text-base font-medium md:text-lg", is_dark ? "text-white" : "text-light-text-primary"),
|
|
11876
11919
|
children: item.title
|
|
11877
11920
|
}),
|
|
11878
|
-
/* @__PURE__ */
|
|
11921
|
+
/* @__PURE__ */ jsx25("div", {
|
|
11879
11922
|
className: clsx("mt-3 max-w-lg text-sm leading-relaxed [overflow-wrap:anywhere]", is_dark ? "text-white/55" : "text-light-text-tertiary"),
|
|
11880
11923
|
children: item.description
|
|
11881
11924
|
})
|
|
@@ -11883,14 +11926,14 @@ function OaLineTableGrid({
|
|
|
11883
11926
|
})
|
|
11884
11927
|
]
|
|
11885
11928
|
});
|
|
11886
|
-
return animated ? /* @__PURE__ */
|
|
11929
|
+
return animated ? /* @__PURE__ */ jsx25(motion.article, {
|
|
11887
11930
|
initial: { opacity: 0, y: 18 },
|
|
11888
11931
|
whileInView: { opacity: 1, y: 0 },
|
|
11889
11932
|
viewport: { once: true },
|
|
11890
11933
|
transition: { duration: 0.5, delay: index * 0.06 },
|
|
11891
11934
|
className: itemClassName,
|
|
11892
11935
|
children: content
|
|
11893
|
-
}, index) : /* @__PURE__ */
|
|
11936
|
+
}, index) : /* @__PURE__ */ jsx25("article", {
|
|
11894
11937
|
className: itemClassName,
|
|
11895
11938
|
children: content
|
|
11896
11939
|
}, index);
|
|
@@ -11910,37 +11953,37 @@ function OaLineTableContract({
|
|
|
11910
11953
|
className
|
|
11911
11954
|
}) {
|
|
11912
11955
|
const is_dark = variant === "dark";
|
|
11913
|
-
return /* @__PURE__ */
|
|
11956
|
+
return /* @__PURE__ */ jsxs18("article", {
|
|
11914
11957
|
id,
|
|
11915
11958
|
className: clsx("not-prose scroll-mt-24 overflow-hidden rounded-xl border-2 font-sans text-sm leading-relaxed md:text-base [&_code]:!rounded-none [&_code]:!border-0 [&_code]:!bg-transparent [&_code]:!p-0 [&_code]:!font-sans [&_code]:!text-[1em] [&_code]:!leading-[inherit] [&_code]:!shadow-none", surface_classes(variant), className),
|
|
11916
11959
|
children: [
|
|
11917
|
-
/* @__PURE__ */
|
|
11960
|
+
/* @__PURE__ */ jsxs18("header", {
|
|
11918
11961
|
className: clsx("border-b-2 px-5 py-5 sm:px-6 md:px-8 md:py-6", rule_classes(variant)),
|
|
11919
11962
|
children: [
|
|
11920
|
-
title || meta ? /* @__PURE__ */
|
|
11963
|
+
title || meta ? /* @__PURE__ */ jsxs18("div", {
|
|
11921
11964
|
className: "mb-3 flex flex-wrap items-center justify-between gap-3",
|
|
11922
11965
|
children: [
|
|
11923
|
-
title ? /* @__PURE__ */
|
|
11966
|
+
title ? /* @__PURE__ */ jsx25("h3", {
|
|
11924
11967
|
className: clsx("m-0 font-mono text-sm font-medium md:text-base", is_dark ? "text-white" : "text-light-text-primary"),
|
|
11925
11968
|
children: title
|
|
11926
11969
|
}) : null,
|
|
11927
|
-
meta ? /* @__PURE__ */
|
|
11970
|
+
meta ? /* @__PURE__ */ jsx25("div", {
|
|
11928
11971
|
className: clsx("font-mono text-[10px] uppercase tracking-wider", is_dark ? "text-white/35" : "text-light-text-muted"),
|
|
11929
11972
|
children: meta
|
|
11930
11973
|
}) : null
|
|
11931
11974
|
]
|
|
11932
11975
|
}) : null,
|
|
11933
|
-
/* @__PURE__ */
|
|
11976
|
+
/* @__PURE__ */ jsxs18("div", {
|
|
11934
11977
|
className: "flex items-start justify-between gap-5",
|
|
11935
11978
|
children: [
|
|
11936
|
-
/* @__PURE__ */
|
|
11979
|
+
/* @__PURE__ */ jsx25("div", {
|
|
11937
11980
|
className: "min-w-0 flex-1 overflow-x-auto",
|
|
11938
|
-
children: /* @__PURE__ */
|
|
11981
|
+
children: /* @__PURE__ */ jsx25("code", {
|
|
11939
11982
|
className: clsx("block min-w-max whitespace-pre-wrap [overflow-wrap:anywhere]", is_dark ? "text-white/70" : "text-light-text-secondary"),
|
|
11940
11983
|
children: signature
|
|
11941
11984
|
})
|
|
11942
11985
|
}),
|
|
11943
|
-
headerAction ? /* @__PURE__ */
|
|
11986
|
+
headerAction ? /* @__PURE__ */ jsx25("div", {
|
|
11944
11987
|
className: "shrink-0",
|
|
11945
11988
|
children: headerAction
|
|
11946
11989
|
}) : null
|
|
@@ -11948,15 +11991,15 @@ function OaLineTableContract({
|
|
|
11948
11991
|
})
|
|
11949
11992
|
]
|
|
11950
11993
|
}),
|
|
11951
|
-
/* @__PURE__ */
|
|
11994
|
+
/* @__PURE__ */ jsxs18("div", {
|
|
11952
11995
|
className: "px-5 py-6 sm:px-6 md:px-8 md:py-7",
|
|
11953
11996
|
children: [
|
|
11954
|
-
/* @__PURE__ */
|
|
11997
|
+
/* @__PURE__ */ jsx25("div", {
|
|
11955
11998
|
className: clsx("max-w-3xl", is_dark ? "text-white/70" : "text-light-text-secondary"),
|
|
11956
11999
|
children: description
|
|
11957
12000
|
}),
|
|
11958
12001
|
children,
|
|
11959
|
-
footer ? /* @__PURE__ */
|
|
12002
|
+
footer ? /* @__PURE__ */ jsx25("div", {
|
|
11960
12003
|
className: "mt-6 flex flex-wrap items-center gap-x-6 gap-y-3",
|
|
11961
12004
|
children: footer
|
|
11962
12005
|
}) : null
|
|
@@ -11966,16 +12009,16 @@ function OaLineTableContract({
|
|
|
11966
12009
|
});
|
|
11967
12010
|
}
|
|
11968
12011
|
function OaLineTable(props) {
|
|
11969
|
-
return props.layout === "contract" ? /* @__PURE__ */
|
|
12012
|
+
return props.layout === "contract" ? /* @__PURE__ */ jsx25(OaLineTableContract, {
|
|
11970
12013
|
...props
|
|
11971
|
-
}) : /* @__PURE__ */
|
|
12014
|
+
}) : /* @__PURE__ */ jsx25(OaLineTableGrid, {
|
|
11972
12015
|
...props
|
|
11973
12016
|
});
|
|
11974
12017
|
}
|
|
11975
12018
|
// src/components/display/hero.tsx
|
|
11976
12019
|
import { useState as useState5, useEffect as useEffect5, useCallback as useCallback6 } from "react";
|
|
11977
|
-
import { jsx as
|
|
11978
|
-
|
|
12020
|
+
import { jsx as jsx26, jsxs as jsxs19, Fragment as Fragment5 } from "react/jsx-runtime";
|
|
12021
|
+
|
|
11979
12022
|
var preset_aspects = {
|
|
11980
12023
|
hero: "aspect-[4/3] md:aspect-[16/9]",
|
|
11981
12024
|
product: "aspect-[3/4] sm:aspect-[4/3] md:aspect-[16/7]",
|
|
@@ -11988,9 +12031,9 @@ function OaHeroIndicators({
|
|
|
11988
12031
|
}) {
|
|
11989
12032
|
if (count <= 1)
|
|
11990
12033
|
return null;
|
|
11991
|
-
return /* @__PURE__ */
|
|
12034
|
+
return /* @__PURE__ */ jsx26("div", {
|
|
11992
12035
|
className: "hidden md:flex absolute bottom-8 lg:bottom-12 left-1/2 -translate-x-1/2 gap-2.5 z-20",
|
|
11993
|
-
children: Array.from({ length: count }, (_, i) => /* @__PURE__ */
|
|
12036
|
+
children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx26("button", {
|
|
11994
12037
|
onClick: () => on_select(i),
|
|
11995
12038
|
className: clsx("h-3 rounded-md transition-all duration-300 cursor-pointer", i === current ? "bg-white w-12" : "bg-white/30 w-3 hover:bg-white/50"),
|
|
11996
12039
|
"aria-label": `View image ${i + 1}`
|
|
@@ -12003,11 +12046,11 @@ function OaHeroArrow({
|
|
|
12003
12046
|
}) {
|
|
12004
12047
|
const Icon = direction === "left" ? ChevronLeft : ChevronRight;
|
|
12005
12048
|
const pos_class = direction === "left" ? "left-4 lg:left-6" : "right-4 lg:right-6";
|
|
12006
|
-
return /* @__PURE__ */
|
|
12049
|
+
return /* @__PURE__ */ jsx26("button", {
|
|
12007
12050
|
onClick,
|
|
12008
12051
|
className: clsx("hidden md:flex absolute top-1/2 -translate-y-1/2 z-20", "w-10 h-10 rounded-full items-center justify-center", "bg-black/30 backdrop-blur-sm border border-white/10", "opacity-0 group-hover:opacity-100 transition-opacity duration-300", "cursor-pointer hover:bg-black/50", pos_class),
|
|
12009
12052
|
"aria-label": direction === "left" ? "Previous image" : "Next image",
|
|
12010
|
-
children: /* @__PURE__ */
|
|
12053
|
+
children: /* @__PURE__ */ jsx26(Icon, {
|
|
12011
12054
|
size: 20,
|
|
12012
12055
|
className: "text-white"
|
|
12013
12056
|
})
|
|
@@ -12044,25 +12087,25 @@ function OaHero({
|
|
|
12044
12087
|
right: clsx("flex items-end justify-end text-right px-6 pt-6 lg:px-10 lg:pt-10", is_carousel ? "pb-16 lg:pb-24" : "pb-6 lg:pb-10")
|
|
12045
12088
|
};
|
|
12046
12089
|
const content_width_class = preset === "hero" ? "w-full" : align !== "left" ? "w-full lg:max-w-[50%]" : "max-w-lg lg:max-w-[50%]";
|
|
12047
|
-
return /* @__PURE__ */
|
|
12090
|
+
return /* @__PURE__ */ jsxs19("div", {
|
|
12048
12091
|
className: clsx("relative w-full rounded-2xl overflow-hidden bg-black font-sans group", preset_aspects[preset], className),
|
|
12049
12092
|
children: [
|
|
12050
|
-
mode === "video" && video_src ? /* @__PURE__ */
|
|
12093
|
+
mode === "video" && video_src ? /* @__PURE__ */ jsx26("video", {
|
|
12051
12094
|
autoPlay: true,
|
|
12052
12095
|
muted: true,
|
|
12053
12096
|
loop: true,
|
|
12054
12097
|
playsInline: true,
|
|
12055
12098
|
className: "absolute inset-0 w-full h-full object-cover",
|
|
12056
|
-
children: /* @__PURE__ */
|
|
12099
|
+
children: /* @__PURE__ */ jsx26("source", {
|
|
12057
12100
|
src: video_src
|
|
12058
12101
|
})
|
|
12059
|
-
}) : images.map((img, index) => /* @__PURE__ */
|
|
12102
|
+
}) : images.map((img, index) => /* @__PURE__ */ jsx26(motion.div, {
|
|
12060
12103
|
initial: false,
|
|
12061
12104
|
animate: { opacity: is_carousel ? index === current ? 1 : 0 : 1 },
|
|
12062
12105
|
transition: { duration: 0.8 },
|
|
12063
12106
|
className: "absolute inset-0",
|
|
12064
12107
|
"aria-hidden": is_carousel && index !== current,
|
|
12065
|
-
children: /* @__PURE__ */
|
|
12108
|
+
children: /* @__PURE__ */ jsx26("img", {
|
|
12066
12109
|
src: img.src,
|
|
12067
12110
|
alt: img.alt ?? "",
|
|
12068
12111
|
loading: index === 0 ? "eager" : "lazy",
|
|
@@ -12070,31 +12113,31 @@ function OaHero({
|
|
|
12070
12113
|
style: { objectPosition: img.position ?? "center" }
|
|
12071
12114
|
})
|
|
12072
12115
|
}, img.src)),
|
|
12073
|
-
film_grain && /* @__PURE__ */
|
|
12116
|
+
film_grain && /* @__PURE__ */ jsx26("div", {
|
|
12074
12117
|
className: "absolute inset-0 film-grain pointer-events-none"
|
|
12075
12118
|
}),
|
|
12076
|
-
/* @__PURE__ */
|
|
12119
|
+
/* @__PURE__ */ jsx26("div", {
|
|
12077
12120
|
className: clsx("absolute inset-0 z-10", align_classes[align]),
|
|
12078
|
-
children: /* @__PURE__ */
|
|
12121
|
+
children: /* @__PURE__ */ jsx26("div", {
|
|
12079
12122
|
className: clsx(content_width_class, "text-white"),
|
|
12080
12123
|
children
|
|
12081
12124
|
})
|
|
12082
12125
|
}),
|
|
12083
|
-
is_carousel && /* @__PURE__ */
|
|
12126
|
+
is_carousel && /* @__PURE__ */ jsxs19(Fragment5, {
|
|
12084
12127
|
children: [
|
|
12085
|
-
show_arrows && /* @__PURE__ */
|
|
12128
|
+
show_arrows && /* @__PURE__ */ jsxs19(Fragment5, {
|
|
12086
12129
|
children: [
|
|
12087
|
-
/* @__PURE__ */
|
|
12130
|
+
/* @__PURE__ */ jsx26(OaHeroArrow, {
|
|
12088
12131
|
direction: "left",
|
|
12089
12132
|
onClick: prev
|
|
12090
12133
|
}),
|
|
12091
|
-
/* @__PURE__ */
|
|
12134
|
+
/* @__PURE__ */ jsx26(OaHeroArrow, {
|
|
12092
12135
|
direction: "right",
|
|
12093
12136
|
onClick: next
|
|
12094
12137
|
})
|
|
12095
12138
|
]
|
|
12096
12139
|
}),
|
|
12097
|
-
/* @__PURE__ */
|
|
12140
|
+
/* @__PURE__ */ jsx26(OaHeroIndicators, {
|
|
12098
12141
|
count: images.length,
|
|
12099
12142
|
current,
|
|
12100
12143
|
on_select: goTo
|
|
@@ -12106,7 +12149,7 @@ function OaHero({
|
|
|
12106
12149
|
}
|
|
12107
12150
|
// src/components/form/button.tsx
|
|
12108
12151
|
import { forwardRef as forwardRef4 } from "react";
|
|
12109
|
-
import { jsx as
|
|
12152
|
+
import { jsx as jsx27, jsxs as jsxs20, Fragment as Fragment6 } from "react/jsx-runtime";
|
|
12110
12153
|
var variant_styles3 = {
|
|
12111
12154
|
primary: "bg-white text-[#0a0a0a] hover:bg-white/90",
|
|
12112
12155
|
secondary: "bg-realm-bg-widget text-realm-text-primary hover:bg-realm-bg-hover border border-white/10",
|
|
@@ -12133,16 +12176,16 @@ var OaButton = forwardRef4(({
|
|
|
12133
12176
|
...props
|
|
12134
12177
|
}, ref) => {
|
|
12135
12178
|
const base_styles = "inline-flex items-center justify-center font-medium rounded-lg transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed";
|
|
12136
|
-
return /* @__PURE__ */
|
|
12179
|
+
return /* @__PURE__ */ jsx27("button", {
|
|
12137
12180
|
ref,
|
|
12138
12181
|
className: clsx(base_styles, variant_styles3[variant], size_styles5[size], full_width && "w-full", className),
|
|
12139
12182
|
disabled: disabled || loading,
|
|
12140
12183
|
...props,
|
|
12141
|
-
children: loading ? /* @__PURE__ */
|
|
12184
|
+
children: loading ? /* @__PURE__ */ jsxs20("svg", {
|
|
12142
12185
|
className: "animate-spin h-4 w-4",
|
|
12143
12186
|
viewBox: "0 0 24 24",
|
|
12144
12187
|
children: [
|
|
12145
|
-
/* @__PURE__ */
|
|
12188
|
+
/* @__PURE__ */ jsx27("circle", {
|
|
12146
12189
|
className: "opacity-25",
|
|
12147
12190
|
cx: "12",
|
|
12148
12191
|
cy: "12",
|
|
@@ -12151,13 +12194,13 @@ var OaButton = forwardRef4(({
|
|
|
12151
12194
|
strokeWidth: "4",
|
|
12152
12195
|
fill: "none"
|
|
12153
12196
|
}),
|
|
12154
|
-
/* @__PURE__ */
|
|
12197
|
+
/* @__PURE__ */ jsx27("path", {
|
|
12155
12198
|
className: "opacity-75",
|
|
12156
12199
|
fill: "currentColor",
|
|
12157
12200
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
12158
12201
|
})
|
|
12159
12202
|
]
|
|
12160
|
-
}) : /* @__PURE__ */
|
|
12203
|
+
}) : /* @__PURE__ */ jsxs20(Fragment6, {
|
|
12161
12204
|
children: [
|
|
12162
12205
|
left_icon,
|
|
12163
12206
|
children,
|
|
@@ -12178,7 +12221,7 @@ var OaButtonLink = forwardRef4(({
|
|
|
12178
12221
|
...props
|
|
12179
12222
|
}, ref) => {
|
|
12180
12223
|
const base_styles = "inline-flex items-center justify-center font-medium rounded-lg transition-all duration-200";
|
|
12181
|
-
return /* @__PURE__ */
|
|
12224
|
+
return /* @__PURE__ */ jsxs20("a", {
|
|
12182
12225
|
ref,
|
|
12183
12226
|
className: clsx(base_styles, variant_styles3[variant], size_styles5[size], full_width && "w-full", className),
|
|
12184
12227
|
...props,
|
|
@@ -12197,7 +12240,7 @@ var oa_button_styles = {
|
|
|
12197
12240
|
};
|
|
12198
12241
|
// src/components/form/input.tsx
|
|
12199
12242
|
import { forwardRef as forwardRef5 } from "react";
|
|
12200
|
-
import { jsx as
|
|
12243
|
+
import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
12201
12244
|
var OaInput = forwardRef5(({
|
|
12202
12245
|
label,
|
|
12203
12246
|
error,
|
|
@@ -12208,32 +12251,32 @@ var OaInput = forwardRef5(({
|
|
|
12208
12251
|
className,
|
|
12209
12252
|
...props
|
|
12210
12253
|
}, ref) => {
|
|
12211
|
-
return /* @__PURE__ */
|
|
12254
|
+
return /* @__PURE__ */ jsxs21("div", {
|
|
12212
12255
|
className: clsx(full_width && "w-full"),
|
|
12213
12256
|
children: [
|
|
12214
|
-
label && /* @__PURE__ */
|
|
12257
|
+
label && /* @__PURE__ */ jsx28("label", {
|
|
12215
12258
|
className: "block text-[11px] uppercase tracking-wider text-realm-text-tertiary mb-1.5",
|
|
12216
12259
|
children: label
|
|
12217
12260
|
}),
|
|
12218
|
-
/* @__PURE__ */
|
|
12261
|
+
/* @__PURE__ */ jsxs21("div", {
|
|
12219
12262
|
className: "relative",
|
|
12220
12263
|
children: [
|
|
12221
|
-
left_addon && /* @__PURE__ */
|
|
12264
|
+
left_addon && /* @__PURE__ */ jsx28("div", {
|
|
12222
12265
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-realm-text-muted",
|
|
12223
12266
|
children: left_addon
|
|
12224
12267
|
}),
|
|
12225
|
-
/* @__PURE__ */
|
|
12268
|
+
/* @__PURE__ */ jsx28("input", {
|
|
12226
12269
|
ref,
|
|
12227
12270
|
className: clsx("w-full bg-realm-bg-input border rounded-lg", "text-[13px] text-realm-text-primary placeholder:text-realm-text-muted", "transition-colors duration-200", "focus:outline-none focus:ring-1", error ? "border-realm-sell focus:ring-realm-sell/50" : "border-white/10 focus:border-white/20 focus:ring-white/10", left_addon ? "pl-10" : "pl-3", right_addon ? "pr-10" : "pr-3", "py-2.5", className),
|
|
12228
12271
|
...props
|
|
12229
12272
|
}),
|
|
12230
|
-
right_addon && /* @__PURE__ */
|
|
12273
|
+
right_addon && /* @__PURE__ */ jsx28("div", {
|
|
12231
12274
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-realm-text-muted",
|
|
12232
12275
|
children: right_addon
|
|
12233
12276
|
})
|
|
12234
12277
|
]
|
|
12235
12278
|
}),
|
|
12236
|
-
(error || helper) && /* @__PURE__ */
|
|
12279
|
+
(error || helper) && /* @__PURE__ */ jsx28("p", {
|
|
12237
12280
|
className: clsx("text-[11px] mt-1.5", error ? "text-realm-sell" : "text-realm-text-muted"),
|
|
12238
12281
|
children: error || helper
|
|
12239
12282
|
})
|
|
@@ -12243,7 +12286,7 @@ var OaInput = forwardRef5(({
|
|
|
12243
12286
|
OaInput.displayName = "OaInput";
|
|
12244
12287
|
// src/components/form/number_input.tsx
|
|
12245
12288
|
import { forwardRef as forwardRef6, useState as useState6, useCallback as useCallback7 } from "react";
|
|
12246
|
-
import { jsx as
|
|
12289
|
+
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
12247
12290
|
var OaNumberInput = forwardRef6(({
|
|
12248
12291
|
value,
|
|
12249
12292
|
onChange,
|
|
@@ -12336,33 +12379,33 @@ var OaNumberInput = forwardRef6(({
|
|
|
12336
12379
|
onChange(decimals !== undefined ? new_val.toFixed(decimals) : String(new_val));
|
|
12337
12380
|
}, [value, step, min, decimals, onChange]);
|
|
12338
12381
|
const display_value = is_focused ? value : formatValue(value);
|
|
12339
|
-
return /* @__PURE__ */
|
|
12382
|
+
return /* @__PURE__ */ jsxs22("div", {
|
|
12340
12383
|
className: clsx(full_width && "w-full", className),
|
|
12341
12384
|
children: [
|
|
12342
|
-
label && /* @__PURE__ */
|
|
12385
|
+
label && /* @__PURE__ */ jsx29("label", {
|
|
12343
12386
|
className: "block text-[11px] uppercase tracking-wider text-realm-text-tertiary mb-1.5",
|
|
12344
12387
|
children: label
|
|
12345
12388
|
}),
|
|
12346
|
-
/* @__PURE__ */
|
|
12389
|
+
/* @__PURE__ */ jsxs22("div", {
|
|
12347
12390
|
className: "relative",
|
|
12348
12391
|
children: [
|
|
12349
|
-
show_buttons && /* @__PURE__ */
|
|
12392
|
+
show_buttons && /* @__PURE__ */ jsx29("button", {
|
|
12350
12393
|
type: "button",
|
|
12351
12394
|
onClick: handleDecrement,
|
|
12352
12395
|
disabled: disabled || min !== undefined && parseFloat(value) <= min,
|
|
12353
12396
|
className: clsx("absolute left-0 top-0 bottom-0 flex items-center justify-center", "text-realm-text-tertiary hover:text-realm-text-primary transition-colors", "disabled:opacity-30 disabled:cursor-not-allowed", size === "sm" ? "w-8" : size === "md" ? "w-10" : "w-12"),
|
|
12354
|
-
children: /* @__PURE__ */
|
|
12397
|
+
children: /* @__PURE__ */ jsx29(Minus, {
|
|
12355
12398
|
className: size === "sm" ? "w-3 h-3" : "w-4 h-4"
|
|
12356
12399
|
})
|
|
12357
12400
|
}),
|
|
12358
|
-
/* @__PURE__ */
|
|
12401
|
+
/* @__PURE__ */ jsxs22("div", {
|
|
12359
12402
|
className: "relative flex items-center",
|
|
12360
12403
|
children: [
|
|
12361
|
-
prefix && /* @__PURE__ */
|
|
12404
|
+
prefix && /* @__PURE__ */ jsx29("span", {
|
|
12362
12405
|
className: clsx("absolute text-realm-text-muted pointer-events-none", show_buttons ? size === "sm" ? "left-9" : size === "md" ? "left-11" : "left-13" : "left-3"),
|
|
12363
12406
|
children: prefix
|
|
12364
12407
|
}),
|
|
12365
|
-
/* @__PURE__ */
|
|
12408
|
+
/* @__PURE__ */ jsx29("input", {
|
|
12366
12409
|
ref,
|
|
12367
12410
|
type: "text",
|
|
12368
12411
|
inputMode: "decimal",
|
|
@@ -12374,24 +12417,24 @@ var OaNumberInput = forwardRef6(({
|
|
|
12374
12417
|
disabled,
|
|
12375
12418
|
className: clsx("w-full bg-realm-bg-input border rounded-lg tabular-nums text-center", "text-realm-text-primary placeholder:text-realm-text-muted", "transition-colors duration-200", "focus:outline-none focus:ring-1", error ? "border-realm-sell focus:ring-realm-sell/50" : "border-white/10 focus:border-white/20 focus:ring-white/10", size_classes[size], padding_classes[size], prefix && "pl-8", suffix && "pr-12", disabled && "opacity-50 cursor-not-allowed")
|
|
12376
12419
|
}),
|
|
12377
|
-
suffix && /* @__PURE__ */
|
|
12420
|
+
suffix && /* @__PURE__ */ jsx29("span", {
|
|
12378
12421
|
className: clsx("absolute right-0 text-realm-text-muted pointer-events-none", show_buttons ? size === "sm" ? "right-9" : size === "md" ? "right-11" : "right-13" : "right-3"),
|
|
12379
12422
|
children: suffix
|
|
12380
12423
|
})
|
|
12381
12424
|
]
|
|
12382
12425
|
}),
|
|
12383
|
-
show_buttons && /* @__PURE__ */
|
|
12426
|
+
show_buttons && /* @__PURE__ */ jsx29("button", {
|
|
12384
12427
|
type: "button",
|
|
12385
12428
|
onClick: handleIncrement,
|
|
12386
12429
|
disabled: disabled || max !== undefined && parseFloat(value) >= max,
|
|
12387
12430
|
className: clsx("absolute right-0 top-0 bottom-0 flex items-center justify-center", "text-realm-text-tertiary hover:text-realm-text-primary transition-colors", "disabled:opacity-30 disabled:cursor-not-allowed", size === "sm" ? "w-8" : size === "md" ? "w-10" : "w-12"),
|
|
12388
|
-
children: /* @__PURE__ */
|
|
12431
|
+
children: /* @__PURE__ */ jsx29(Plus, {
|
|
12389
12432
|
className: size === "sm" ? "w-3 h-3" : "w-4 h-4"
|
|
12390
12433
|
})
|
|
12391
12434
|
})
|
|
12392
12435
|
]
|
|
12393
12436
|
}),
|
|
12394
|
-
error && /* @__PURE__ */
|
|
12437
|
+
error && /* @__PURE__ */ jsx29("p", {
|
|
12395
12438
|
className: "text-[11px] mt-1.5 text-realm-sell",
|
|
12396
12439
|
children: error
|
|
12397
12440
|
})
|
|
@@ -12402,7 +12445,7 @@ OaNumberInput.displayName = "OaNumberInput";
|
|
|
12402
12445
|
// src/components/form/select.tsx
|
|
12403
12446
|
import { useState as useState7, useRef as useRef5, useEffect as useEffect6, useCallback as useCallback8, useMemo as useMemo11 } from "react";
|
|
12404
12447
|
import { createPortal } from "react-dom";
|
|
12405
|
-
import { jsx as
|
|
12448
|
+
import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12406
12449
|
function OaSelect({
|
|
12407
12450
|
options,
|
|
12408
12451
|
value,
|
|
@@ -12503,7 +12546,7 @@ function OaSelect({
|
|
|
12503
12546
|
const render_dropdown = () => {
|
|
12504
12547
|
if (!is_open)
|
|
12505
12548
|
return null;
|
|
12506
|
-
return createPortal(/* @__PURE__ */
|
|
12549
|
+
return createPortal(/* @__PURE__ */ jsxs23("div", {
|
|
12507
12550
|
ref: dropdownRef,
|
|
12508
12551
|
className: "fixed z-[200] bg-realm-bg-widget border border-white/10 rounded-xl shadow-2xl overflow-hidden animate-in fade-in slide-in-from-top-1 duration-150",
|
|
12509
12552
|
style: {
|
|
@@ -12513,15 +12556,15 @@ function OaSelect({
|
|
|
12513
12556
|
maxHeight: 320
|
|
12514
12557
|
},
|
|
12515
12558
|
children: [
|
|
12516
|
-
searchable && /* @__PURE__ */
|
|
12559
|
+
searchable && /* @__PURE__ */ jsx30("div", {
|
|
12517
12560
|
className: "p-2 border-b border-white/5",
|
|
12518
|
-
children: /* @__PURE__ */
|
|
12561
|
+
children: /* @__PURE__ */ jsxs23("div", {
|
|
12519
12562
|
className: "relative",
|
|
12520
12563
|
children: [
|
|
12521
|
-
/* @__PURE__ */
|
|
12564
|
+
/* @__PURE__ */ jsx30(Search, {
|
|
12522
12565
|
className: "absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-realm-text-muted pointer-events-none"
|
|
12523
12566
|
}),
|
|
12524
|
-
/* @__PURE__ */
|
|
12567
|
+
/* @__PURE__ */ jsx30("input", {
|
|
12525
12568
|
ref: searchInputRef,
|
|
12526
12569
|
type: "text",
|
|
12527
12570
|
value: search,
|
|
@@ -12532,37 +12575,37 @@ function OaSelect({
|
|
|
12532
12575
|
]
|
|
12533
12576
|
})
|
|
12534
12577
|
}),
|
|
12535
|
-
/* @__PURE__ */
|
|
12578
|
+
/* @__PURE__ */ jsx30("div", {
|
|
12536
12579
|
className: "overflow-y-auto py-1",
|
|
12537
12580
|
style: { maxHeight: searchable ? 260 : 304 },
|
|
12538
|
-
children: filtered_options.length === 0 ? /* @__PURE__ */
|
|
12581
|
+
children: filtered_options.length === 0 ? /* @__PURE__ */ jsx30("div", {
|
|
12539
12582
|
className: "px-3 py-4 text-center text-[12px] text-realm-text-tertiary",
|
|
12540
12583
|
children: "No options found"
|
|
12541
12584
|
}) : filtered_options.map((option) => {
|
|
12542
12585
|
const is_selected = option.value === value;
|
|
12543
|
-
return /* @__PURE__ */
|
|
12586
|
+
return /* @__PURE__ */ jsxs23("button", {
|
|
12544
12587
|
onClick: () => !option.disabled && handleSelect(option.value),
|
|
12545
12588
|
disabled: option.disabled,
|
|
12546
12589
|
className: clsx("w-full px-3 py-2.5 flex items-center gap-3 text-left transition-colors", option.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-realm-bg-hover cursor-pointer", is_selected && "bg-realm-bg-active"),
|
|
12547
12590
|
children: [
|
|
12548
|
-
option.icon && /* @__PURE__ */
|
|
12591
|
+
option.icon && /* @__PURE__ */ jsx30("div", {
|
|
12549
12592
|
className: "flex-shrink-0 w-5 h-5 flex items-center justify-center",
|
|
12550
12593
|
children: option.icon
|
|
12551
12594
|
}),
|
|
12552
|
-
/* @__PURE__ */
|
|
12595
|
+
/* @__PURE__ */ jsxs23("div", {
|
|
12553
12596
|
className: "flex-1 min-w-0",
|
|
12554
12597
|
children: [
|
|
12555
|
-
/* @__PURE__ */
|
|
12598
|
+
/* @__PURE__ */ jsx30("div", {
|
|
12556
12599
|
className: clsx("text-[13px] truncate", is_selected ? "text-realm-text-primary font-medium" : "text-realm-text-secondary"),
|
|
12557
12600
|
children: option.label
|
|
12558
12601
|
}),
|
|
12559
|
-
option.description && /* @__PURE__ */
|
|
12602
|
+
option.description && /* @__PURE__ */ jsx30("div", {
|
|
12560
12603
|
className: "text-[11px] text-realm-text-tertiary truncate",
|
|
12561
12604
|
children: option.description
|
|
12562
12605
|
})
|
|
12563
12606
|
]
|
|
12564
12607
|
}),
|
|
12565
|
-
is_selected && /* @__PURE__ */
|
|
12608
|
+
is_selected && /* @__PURE__ */ jsx30(Check, {
|
|
12566
12609
|
className: "flex-shrink-0 w-4 h-4 text-realm-buy"
|
|
12567
12610
|
})
|
|
12568
12611
|
]
|
|
@@ -12572,34 +12615,34 @@ function OaSelect({
|
|
|
12572
12615
|
]
|
|
12573
12616
|
}), document.body);
|
|
12574
12617
|
};
|
|
12575
|
-
return /* @__PURE__ */
|
|
12618
|
+
return /* @__PURE__ */ jsxs23("div", {
|
|
12576
12619
|
className: clsx(full_width && "w-full"),
|
|
12577
12620
|
children: [
|
|
12578
|
-
label && /* @__PURE__ */
|
|
12621
|
+
label && /* @__PURE__ */ jsx30("label", {
|
|
12579
12622
|
className: "block text-[10px] uppercase tracking-wider text-realm-text-muted mb-1.5",
|
|
12580
12623
|
children: label
|
|
12581
12624
|
}),
|
|
12582
|
-
/* @__PURE__ */
|
|
12625
|
+
/* @__PURE__ */ jsxs23("button", {
|
|
12583
12626
|
ref: trigger_ref,
|
|
12584
12627
|
type: "button",
|
|
12585
12628
|
onClick: () => is_open ? handleClose() : handleOpen(),
|
|
12586
12629
|
disabled,
|
|
12587
12630
|
className: clsx("w-full bg-realm-bg-input border rounded-lg", "text-left transition-colors duration-200", "focus:outline-none focus:ring-1", error ? "border-realm-sell focus:ring-realm-sell/50" : "border-white/5 hover:border-white/10 focus:border-white/20 focus:ring-white/10", disabled && "opacity-50 cursor-not-allowed", compact ? "px-3 py-2" : "px-4 py-2.5", "flex items-center gap-2", className),
|
|
12588
12631
|
children: [
|
|
12589
|
-
selected_option?.icon && /* @__PURE__ */
|
|
12632
|
+
selected_option?.icon && /* @__PURE__ */ jsx30("div", {
|
|
12590
12633
|
className: "flex-shrink-0 w-5 h-5 flex items-center justify-center",
|
|
12591
12634
|
children: selected_option.icon
|
|
12592
12635
|
}),
|
|
12593
|
-
/* @__PURE__ */
|
|
12636
|
+
/* @__PURE__ */ jsx30("span", {
|
|
12594
12637
|
className: clsx("flex-1 min-w-0 truncate text-[13px]", selected_option ? "text-realm-text-primary" : "text-realm-text-muted"),
|
|
12595
12638
|
children: selected_option?.label || placeholder
|
|
12596
12639
|
}),
|
|
12597
|
-
/* @__PURE__ */
|
|
12640
|
+
/* @__PURE__ */ jsx30(ChevronDown, {
|
|
12598
12641
|
className: clsx("flex-shrink-0 w-4 h-4 text-realm-text-tertiary transition-transform", is_open && "rotate-180")
|
|
12599
12642
|
})
|
|
12600
12643
|
]
|
|
12601
12644
|
}),
|
|
12602
|
-
(error || helper) && /* @__PURE__ */
|
|
12645
|
+
(error || helper) && /* @__PURE__ */ jsx30("p", {
|
|
12603
12646
|
className: clsx("text-[11px] mt-1.5", error ? "text-realm-sell" : "text-realm-text-muted"),
|
|
12604
12647
|
children: error || helper
|
|
12605
12648
|
}),
|
|
@@ -12608,7 +12651,7 @@ function OaSelect({
|
|
|
12608
12651
|
});
|
|
12609
12652
|
}
|
|
12610
12653
|
// src/components/feedback/loading.tsx
|
|
12611
|
-
import { jsx as
|
|
12654
|
+
import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
12612
12655
|
function OaSpinner({ size = "md", color = "default", className }) {
|
|
12613
12656
|
const size_classes = {
|
|
12614
12657
|
xs: "h-3 w-3",
|
|
@@ -12623,12 +12666,12 @@ function OaSpinner({ size = "md", color = "default", className }) {
|
|
|
12623
12666
|
sell: "text-realm-sell",
|
|
12624
12667
|
muted: "text-realm-text-muted"
|
|
12625
12668
|
};
|
|
12626
|
-
return /* @__PURE__ */
|
|
12669
|
+
return /* @__PURE__ */ jsxs24("svg", {
|
|
12627
12670
|
className: clsx("animate-spin", size_classes[size], color_classes[color], className),
|
|
12628
12671
|
viewBox: "0 0 24 24",
|
|
12629
12672
|
fill: "none",
|
|
12630
12673
|
children: [
|
|
12631
|
-
/* @__PURE__ */
|
|
12674
|
+
/* @__PURE__ */ jsx31("circle", {
|
|
12632
12675
|
className: "opacity-25",
|
|
12633
12676
|
cx: "12",
|
|
12634
12677
|
cy: "12",
|
|
@@ -12636,7 +12679,7 @@ function OaSpinner({ size = "md", color = "default", className }) {
|
|
|
12636
12679
|
stroke: "currentColor",
|
|
12637
12680
|
strokeWidth: "4"
|
|
12638
12681
|
}),
|
|
12639
|
-
/* @__PURE__ */
|
|
12682
|
+
/* @__PURE__ */ jsx31("path", {
|
|
12640
12683
|
className: "opacity-75",
|
|
12641
12684
|
fill: "currentColor",
|
|
12642
12685
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
@@ -12645,9 +12688,9 @@ function OaSpinner({ size = "md", color = "default", className }) {
|
|
|
12645
12688
|
});
|
|
12646
12689
|
}
|
|
12647
12690
|
function OaLoadingDots({ className }) {
|
|
12648
|
-
return /* @__PURE__ */
|
|
12691
|
+
return /* @__PURE__ */ jsx31("div", {
|
|
12649
12692
|
className: clsx("flex items-center gap-1", className),
|
|
12650
|
-
children: [0, 1, 2].map((i) => /* @__PURE__ */
|
|
12693
|
+
children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx31("div", {
|
|
12651
12694
|
className: "w-1.5 h-1.5 bg-realm-text-tertiary rounded-full animate-pulse",
|
|
12652
12695
|
style: { animationDelay: `${i * 150}ms` }
|
|
12653
12696
|
}, i))
|
|
@@ -12665,19 +12708,19 @@ function OaSkeleton({
|
|
|
12665
12708
|
lg: "rounded-lg",
|
|
12666
12709
|
full: "rounded-full"
|
|
12667
12710
|
};
|
|
12668
|
-
return /* @__PURE__ */
|
|
12711
|
+
return /* @__PURE__ */ jsx31("div", {
|
|
12669
12712
|
className: clsx("bg-realm-bg-hover animate-pulse", rounded_classes[rounded], className),
|
|
12670
12713
|
style: { width, height }
|
|
12671
12714
|
});
|
|
12672
12715
|
}
|
|
12673
12716
|
function OaLoadingOverlay({ loading, children, className }) {
|
|
12674
|
-
return /* @__PURE__ */
|
|
12717
|
+
return /* @__PURE__ */ jsxs24("div", {
|
|
12675
12718
|
className: clsx("relative", className),
|
|
12676
12719
|
children: [
|
|
12677
12720
|
children,
|
|
12678
|
-
loading && /* @__PURE__ */
|
|
12721
|
+
loading && /* @__PURE__ */ jsx31("div", {
|
|
12679
12722
|
className: "absolute inset-0 bg-realm-bg-base/80 backdrop-blur-sm flex items-center justify-center z-50",
|
|
12680
|
-
children: /* @__PURE__ */
|
|
12723
|
+
children: /* @__PURE__ */ jsx31(OaSpinner, {
|
|
12681
12724
|
size: "lg"
|
|
12682
12725
|
})
|
|
12683
12726
|
})
|
|
@@ -12687,8 +12730,8 @@ function OaLoadingOverlay({ loading, children, className }) {
|
|
|
12687
12730
|
// src/components/feedback/modal.tsx
|
|
12688
12731
|
import { useEffect as useEffect7, useRef as useRef6 } from "react";
|
|
12689
12732
|
import { createPortal as createPortal2 } from "react-dom";
|
|
12690
|
-
import { jsx as
|
|
12691
|
-
|
|
12733
|
+
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
12734
|
+
|
|
12692
12735
|
var size_classes4 = {
|
|
12693
12736
|
sm: "max-w-sm",
|
|
12694
12737
|
md: "max-w-md",
|
|
@@ -12752,44 +12795,44 @@ function OaModal({
|
|
|
12752
12795
|
}, [is_open]);
|
|
12753
12796
|
if (!is_open)
|
|
12754
12797
|
return null;
|
|
12755
|
-
const modal_content = /* @__PURE__ */
|
|
12798
|
+
const modal_content = /* @__PURE__ */ jsxs25("div", {
|
|
12756
12799
|
className: "fixed inset-0 z-[60] flex items-center justify-center p-4",
|
|
12757
12800
|
role: "dialog",
|
|
12758
12801
|
"aria-modal": "true",
|
|
12759
12802
|
"aria-labelledby": title ? "modal-title" : undefined,
|
|
12760
12803
|
children: [
|
|
12761
|
-
/* @__PURE__ */
|
|
12804
|
+
/* @__PURE__ */ jsx32("div", {
|
|
12762
12805
|
className: "absolute inset-0 bg-black/60 backdrop-blur-sm",
|
|
12763
12806
|
onClick: close_on_backdrop ? on_close : undefined,
|
|
12764
12807
|
"aria-hidden": "true"
|
|
12765
12808
|
}),
|
|
12766
|
-
/* @__PURE__ */
|
|
12809
|
+
/* @__PURE__ */ jsxs25("div", {
|
|
12767
12810
|
ref: modal_ref,
|
|
12768
12811
|
className: clsx("relative w-full", size_classes4[size], "bg-realm-bg-widget rounded-xl", "shadow-2xl shadow-black/50", "animate-in fade-in zoom-in-95 duration-200", className),
|
|
12769
12812
|
children: [
|
|
12770
|
-
(title || show_close) && /* @__PURE__ */
|
|
12813
|
+
(title || show_close) && /* @__PURE__ */ jsxs25("div", {
|
|
12771
12814
|
className: "flex items-center justify-between px-5 py-4 border-b border-white/5",
|
|
12772
12815
|
children: [
|
|
12773
|
-
title && /* @__PURE__ */
|
|
12816
|
+
title && /* @__PURE__ */ jsx32("h2", {
|
|
12774
12817
|
id: "modal-title",
|
|
12775
12818
|
className: "text-[15px] font-medium text-realm-text-primary",
|
|
12776
12819
|
children: title
|
|
12777
12820
|
}),
|
|
12778
|
-
show_close && /* @__PURE__ */
|
|
12821
|
+
show_close && /* @__PURE__ */ jsx32("button", {
|
|
12779
12822
|
onClick: on_close,
|
|
12780
12823
|
className: "p-1 rounded hover:bg-realm-bg-hover transition-colors -mr-1",
|
|
12781
12824
|
"aria-label": "Close modal",
|
|
12782
|
-
children: /* @__PURE__ */
|
|
12825
|
+
children: /* @__PURE__ */ jsx32(X, {
|
|
12783
12826
|
className: "w-5 h-5 text-realm-text-tertiary hover:text-realm-text-primary"
|
|
12784
12827
|
})
|
|
12785
12828
|
})
|
|
12786
12829
|
]
|
|
12787
12830
|
}),
|
|
12788
|
-
/* @__PURE__ */
|
|
12831
|
+
/* @__PURE__ */ jsx32("div", {
|
|
12789
12832
|
className: "px-5 py-4",
|
|
12790
12833
|
children
|
|
12791
12834
|
}),
|
|
12792
|
-
footer && /* @__PURE__ */
|
|
12835
|
+
footer && /* @__PURE__ */ jsx32("div", {
|
|
12793
12836
|
className: "px-5 py-4 border-t border-white/5 flex items-center justify-end gap-3",
|
|
12794
12837
|
children: footer
|
|
12795
12838
|
})
|
|
@@ -12800,7 +12843,7 @@ function OaModal({
|
|
|
12800
12843
|
return createPortal2(modal_content, document.body);
|
|
12801
12844
|
}
|
|
12802
12845
|
// src/components/feedback/callout.tsx
|
|
12803
|
-
import { jsx as
|
|
12846
|
+
import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
12804
12847
|
var type_config = {
|
|
12805
12848
|
info: { accent: "border-l-white/30", label: "Note" },
|
|
12806
12849
|
note: { accent: "border-l-white/30", label: "Note" },
|
|
@@ -12816,14 +12859,14 @@ function OaCallout({
|
|
|
12816
12859
|
className
|
|
12817
12860
|
}) {
|
|
12818
12861
|
const config = type_config[type];
|
|
12819
|
-
return /* @__PURE__ */
|
|
12862
|
+
return /* @__PURE__ */ jsxs26("div", {
|
|
12820
12863
|
className: clsx("border-l-2 pl-6 py-3 transition-colors", config.accent, "hover:border-l-white/60", className),
|
|
12821
12864
|
children: [
|
|
12822
|
-
title && /* @__PURE__ */
|
|
12865
|
+
title && /* @__PURE__ */ jsx33("p", {
|
|
12823
12866
|
className: "text-[13px] font-medium text-realm-text-primary mb-1",
|
|
12824
12867
|
children: title
|
|
12825
12868
|
}),
|
|
12826
|
-
/* @__PURE__ */
|
|
12869
|
+
/* @__PURE__ */ jsx33("div", {
|
|
12827
12870
|
className: "text-[13px] text-realm-text-secondary leading-relaxed",
|
|
12828
12871
|
children
|
|
12829
12872
|
})
|
|
@@ -12832,8 +12875,8 @@ function OaCallout({
|
|
|
12832
12875
|
}
|
|
12833
12876
|
// src/components/transition/page_transition.tsx
|
|
12834
12877
|
import { useState as useState8 } from "react";
|
|
12835
|
-
import { jsx as
|
|
12836
|
-
|
|
12878
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
12879
|
+
|
|
12837
12880
|
function OaPageTransition({
|
|
12838
12881
|
is_active,
|
|
12839
12882
|
direction = "left",
|
|
@@ -12845,8 +12888,8 @@ function OaPageTransition({
|
|
|
12845
12888
|
}) {
|
|
12846
12889
|
const initial_x = direction === "left" ? "-100%" : "100%";
|
|
12847
12890
|
const easing = [0.76, 0, 0.24, 1];
|
|
12848
|
-
return /* @__PURE__ */
|
|
12849
|
-
children: is_active && /* @__PURE__ */
|
|
12891
|
+
return /* @__PURE__ */ jsx34(AnimatePresence, {
|
|
12892
|
+
children: is_active && /* @__PURE__ */ jsx34(motion.div, {
|
|
12850
12893
|
initial: { x: initial_x },
|
|
12851
12894
|
animate: { x: 0 },
|
|
12852
12895
|
exit: { x: direction === "left" ? "100%" : "-100%" },
|
|
@@ -12854,12 +12897,12 @@ function OaPageTransition({
|
|
|
12854
12897
|
onAnimationComplete: on_complete,
|
|
12855
12898
|
className: "fixed inset-0 bg-[#0a0a0a] flex items-center justify-center",
|
|
12856
12899
|
style: { zIndex },
|
|
12857
|
-
children: children ? children : show_logo ? /* @__PURE__ */
|
|
12900
|
+
children: children ? children : show_logo ? /* @__PURE__ */ jsx34(motion.div, {
|
|
12858
12901
|
initial: { opacity: 0, scale: 0.95 },
|
|
12859
12902
|
animate: { opacity: 1, scale: 1 },
|
|
12860
12903
|
transition: { delay: duration * 0.4, duration: duration * 0.4 },
|
|
12861
12904
|
className: "flex items-center justify-center",
|
|
12862
|
-
children: /* @__PURE__ */
|
|
12905
|
+
children: /* @__PURE__ */ jsx34(OaLogo, {
|
|
12863
12906
|
variant: "dark",
|
|
12864
12907
|
type: "icon",
|
|
12865
12908
|
size: "lg",
|
|
@@ -12892,8 +12935,8 @@ function use_page_transition(delay = 700) {
|
|
|
12892
12935
|
}
|
|
12893
12936
|
// src/components/transition/page_entrance.tsx
|
|
12894
12937
|
import { useState as useState9, useEffect as useEffect8 } from "react";
|
|
12895
|
-
import { jsx as
|
|
12896
|
-
|
|
12938
|
+
import { jsx as jsx35, jsxs as jsxs27, Fragment as Fragment7 } from "react/jsx-runtime";
|
|
12939
|
+
|
|
12897
12940
|
var TRANSITION_EASING = "cubic-bezier(0.76, 0, 0.24, 1)";
|
|
12898
12941
|
function OaPageEntrance({
|
|
12899
12942
|
children,
|
|
@@ -12920,29 +12963,29 @@ function OaPageEntrance({
|
|
|
12920
12963
|
};
|
|
12921
12964
|
}, [delay, duration, on_complete]);
|
|
12922
12965
|
if (phase === "hidden") {
|
|
12923
|
-
return /* @__PURE__ */
|
|
12966
|
+
return /* @__PURE__ */ jsx35(Fragment7, {
|
|
12924
12967
|
children
|
|
12925
12968
|
});
|
|
12926
12969
|
}
|
|
12927
12970
|
const exit_transform = exit_direction === "right" ? "translateX(100%)" : "translateX(-100%)";
|
|
12928
|
-
return /* @__PURE__ */
|
|
12971
|
+
return /* @__PURE__ */ jsxs27(Fragment7, {
|
|
12929
12972
|
children: [
|
|
12930
12973
|
children,
|
|
12931
|
-
/* @__PURE__ */
|
|
12974
|
+
/* @__PURE__ */ jsx35("div", {
|
|
12932
12975
|
style: {
|
|
12933
12976
|
transform: phase === "exiting" ? exit_transform : "translateX(0)",
|
|
12934
12977
|
transition: `transform ${duration}ms ${TRANSITION_EASING}`,
|
|
12935
12978
|
zIndex
|
|
12936
12979
|
},
|
|
12937
12980
|
className: "fixed inset-0 bg-[#0a0a0a] flex items-center justify-center",
|
|
12938
|
-
children: entrance_content ? entrance_content : show_logo ? /* @__PURE__ */
|
|
12981
|
+
children: entrance_content ? entrance_content : show_logo ? /* @__PURE__ */ jsx35("div", {
|
|
12939
12982
|
className: "flex items-center justify-center",
|
|
12940
12983
|
style: {
|
|
12941
12984
|
opacity: phase === "exiting" ? 0 : 1,
|
|
12942
12985
|
transform: phase === "visible" ? "scale(1)" : "scale(0.95)",
|
|
12943
12986
|
transition: "opacity 200ms, transform 200ms"
|
|
12944
12987
|
},
|
|
12945
|
-
children: /* @__PURE__ */
|
|
12988
|
+
children: /* @__PURE__ */ jsx35(OaLogo, {
|
|
12946
12989
|
variant: "dark",
|
|
12947
12990
|
type: "icon",
|
|
12948
12991
|
size: "lg",
|
|
@@ -12955,8 +12998,8 @@ function OaPageEntrance({
|
|
|
12955
12998
|
}
|
|
12956
12999
|
// src/components/fx/scramble_text.tsx
|
|
12957
13000
|
import { forwardRef as forwardRef7, useCallback as useCallback9, useEffect as useEffect9, useImperativeHandle, useRef as useRef7, useState as useState10 } from "react";
|
|
12958
|
-
import { jsx as
|
|
12959
|
-
|
|
13001
|
+
import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
13002
|
+
|
|
12960
13003
|
var SCRAMBLE_GLYPHS = "abcdefghijklmnopqrstuvwxyz!@#$%&*+-=?/<>[]{}";
|
|
12961
13004
|
var EXTERNAL_ICON_SENTINEL = "\x00";
|
|
12962
13005
|
var SCRAMBLE_DURATION_MS = 420;
|
|
@@ -13036,7 +13079,7 @@ var OaScrambleText = forwardRef7(function OaScrambleText({
|
|
|
13036
13079
|
}, [finish, resolved_icon, target, trigger]);
|
|
13037
13080
|
useEffect9(() => () => settleAnimationRef.current?.cancel(), []);
|
|
13038
13081
|
const Icon = resolved_icon === "external" ? ExternalLink : ArrowRight;
|
|
13039
|
-
return /* @__PURE__ */
|
|
13082
|
+
return /* @__PURE__ */ jsxs28("span", {
|
|
13040
13083
|
className: "oa-scramble-text",
|
|
13041
13084
|
"aria-hidden": true,
|
|
13042
13085
|
style: {
|
|
@@ -13047,27 +13090,27 @@ var OaScrambleText = forwardRef7(function OaScrambleText({
|
|
|
13047
13090
|
textTransform: "none"
|
|
13048
13091
|
},
|
|
13049
13092
|
children: [
|
|
13050
|
-
/* @__PURE__ */
|
|
13093
|
+
/* @__PURE__ */ jsxs28("span", {
|
|
13051
13094
|
style: { visibility: "hidden", display: "inline-flex", alignItems: "center", gap: "0.375rem" },
|
|
13052
13095
|
children: [
|
|
13053
|
-
/* @__PURE__ */
|
|
13096
|
+
/* @__PURE__ */ jsx36("span", {
|
|
13054
13097
|
children: target
|
|
13055
13098
|
}),
|
|
13056
|
-
resolved_icon && /* @__PURE__ */
|
|
13099
|
+
resolved_icon && /* @__PURE__ */ jsx36(Icon, {
|
|
13057
13100
|
className: `${icon_class_name} shrink-0`
|
|
13058
13101
|
})
|
|
13059
13102
|
]
|
|
13060
13103
|
}),
|
|
13061
|
-
/* @__PURE__ */
|
|
13104
|
+
/* @__PURE__ */ jsxs28("span", {
|
|
13062
13105
|
ref: visibleRef,
|
|
13063
13106
|
style: { position: "absolute", inset: 0, display: "inline-flex", alignItems: "center", gap: "0.375rem" },
|
|
13064
13107
|
children: [
|
|
13065
|
-
/* @__PURE__ */
|
|
13108
|
+
/* @__PURE__ */ jsx36("span", {
|
|
13066
13109
|
children: display.text
|
|
13067
13110
|
}),
|
|
13068
|
-
resolved_icon && /* @__PURE__ */
|
|
13111
|
+
resolved_icon && /* @__PURE__ */ jsx36("span", {
|
|
13069
13112
|
className: `inline-flex ${icon_class_name} shrink-0 items-center justify-center text-[0.8em] leading-none`,
|
|
13070
|
-
children: display.icon === EXTERNAL_ICON_SENTINEL ? /* @__PURE__ */
|
|
13113
|
+
children: display.icon === EXTERNAL_ICON_SENTINEL ? /* @__PURE__ */ jsx36(Icon, {
|
|
13071
13114
|
className: "h-full w-full"
|
|
13072
13115
|
}) : display.icon
|
|
13073
13116
|
})
|
|
@@ -13080,7 +13123,7 @@ OaScrambleText.displayName = "OaScrambleText";
|
|
|
13080
13123
|
// src/components/fx/scramble_control.ts
|
|
13081
13124
|
import { useRef as useRef8, useState as useState11 } from "react";
|
|
13082
13125
|
import { flushSync } from "react-dom";
|
|
13083
|
-
|
|
13126
|
+
|
|
13084
13127
|
function use_oa_scramble_control() {
|
|
13085
13128
|
const [cycle, setCycle] = useState11(0);
|
|
13086
13129
|
const text_ref = useRef8(null);
|
|
@@ -13144,8 +13187,8 @@ function use_oa_scramble_control() {
|
|
|
13144
13187
|
}
|
|
13145
13188
|
|
|
13146
13189
|
// src/components/fx/scramble_link.tsx
|
|
13147
|
-
import { jsx as
|
|
13148
|
-
|
|
13190
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
13191
|
+
|
|
13149
13192
|
function OaScrambleLink({
|
|
13150
13193
|
children,
|
|
13151
13194
|
as,
|
|
@@ -13163,7 +13206,7 @@ function OaScrambleLink({
|
|
|
13163
13206
|
}) {
|
|
13164
13207
|
const scramble = use_oa_scramble_control();
|
|
13165
13208
|
const Component = as ?? "a";
|
|
13166
|
-
return /* @__PURE__ */
|
|
13209
|
+
return /* @__PURE__ */ jsx37(Component, {
|
|
13167
13210
|
...props,
|
|
13168
13211
|
"aria-label": props["aria-label"] ?? children,
|
|
13169
13212
|
onMouseEnter: (event) => {
|
|
@@ -13194,7 +13237,7 @@ function OaScrambleLink({
|
|
|
13194
13237
|
scramble.keyDown(event.key);
|
|
13195
13238
|
onKeyDown?.(event);
|
|
13196
13239
|
},
|
|
13197
|
-
children: /* @__PURE__ */
|
|
13240
|
+
children: /* @__PURE__ */ jsx37(OaScrambleText, {
|
|
13198
13241
|
ref: scramble.text_ref,
|
|
13199
13242
|
trigger: scramble.cycle,
|
|
13200
13243
|
uppercase,
|
|
@@ -13206,8 +13249,8 @@ function OaScrambleLink({
|
|
|
13206
13249
|
}
|
|
13207
13250
|
// src/components/fx/scramble_button.tsx
|
|
13208
13251
|
import { forwardRef as forwardRef8 } from "react";
|
|
13209
|
-
import { jsx as
|
|
13210
|
-
|
|
13252
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
13253
|
+
|
|
13211
13254
|
var OaScrambleButton = forwardRef8(function OaScrambleButton({
|
|
13212
13255
|
children,
|
|
13213
13256
|
icon = null,
|
|
@@ -13224,7 +13267,7 @@ var OaScrambleButton = forwardRef8(function OaScrambleButton({
|
|
|
13224
13267
|
...props
|
|
13225
13268
|
}, ref) {
|
|
13226
13269
|
const scramble = use_oa_scramble_control();
|
|
13227
|
-
return /* @__PURE__ */
|
|
13270
|
+
return /* @__PURE__ */ jsx38("button", {
|
|
13228
13271
|
ref,
|
|
13229
13272
|
...props,
|
|
13230
13273
|
type,
|
|
@@ -13257,7 +13300,7 @@ var OaScrambleButton = forwardRef8(function OaScrambleButton({
|
|
|
13257
13300
|
scramble.keyDown(event.key);
|
|
13258
13301
|
onKeyDown?.(event);
|
|
13259
13302
|
},
|
|
13260
|
-
children: /* @__PURE__ */
|
|
13303
|
+
children: /* @__PURE__ */ jsx38(OaScrambleText, {
|
|
13261
13304
|
ref: scramble.text_ref,
|
|
13262
13305
|
trigger: scramble.cycle,
|
|
13263
13306
|
uppercase,
|
|
@@ -20262,8 +20305,8 @@ function calculate_macd(candles, fast_period = 12, slow_period = 26, signal_peri
|
|
|
20262
20305
|
}
|
|
20263
20306
|
|
|
20264
20307
|
// src/components/chart/chart.tsx
|
|
20265
|
-
import { jsx as
|
|
20266
|
-
|
|
20308
|
+
import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
20309
|
+
|
|
20267
20310
|
function OaChart({
|
|
20268
20311
|
data,
|
|
20269
20312
|
type = "candlestick",
|
|
@@ -20519,15 +20562,15 @@ function OaChart({
|
|
|
20519
20562
|
useEffect10(() => {
|
|
20520
20563
|
updateChart();
|
|
20521
20564
|
}, [updateChart]);
|
|
20522
|
-
return /* @__PURE__ */
|
|
20565
|
+
return /* @__PURE__ */ jsx39("div", {
|
|
20523
20566
|
ref: container_ref,
|
|
20524
20567
|
className: clsx("relative w-full h-full", className),
|
|
20525
|
-
children: loading && /* @__PURE__ */
|
|
20568
|
+
children: loading && /* @__PURE__ */ jsx39("div", {
|
|
20526
20569
|
className: "absolute inset-0 flex items-center justify-center bg-black/50 z-10",
|
|
20527
|
-
children: /* @__PURE__ */
|
|
20570
|
+
children: /* @__PURE__ */ jsxs29("div", {
|
|
20528
20571
|
className: "flex items-center gap-2 text-sm text-white/70",
|
|
20529
20572
|
children: [
|
|
20530
|
-
/* @__PURE__ */
|
|
20573
|
+
/* @__PURE__ */ jsx39("div", {
|
|
20531
20574
|
className: "w-4 h-4 border-2 border-white/20 border-t-white rounded-full animate-spin"
|
|
20532
20575
|
}),
|
|
20533
20576
|
"Loading..."
|
|
@@ -20538,8 +20581,8 @@ function OaChart({
|
|
|
20538
20581
|
}
|
|
20539
20582
|
// src/components/chart/chart_pane.tsx
|
|
20540
20583
|
import { useEffect as useEffect11, useRef as useRef10 } from "react";
|
|
20541
|
-
import { jsx as
|
|
20542
|
-
|
|
20584
|
+
import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
20585
|
+
|
|
20543
20586
|
function OaRsiPane({
|
|
20544
20587
|
data,
|
|
20545
20588
|
height = 100,
|
|
@@ -20633,26 +20676,26 @@ function OaRsiPane({
|
|
|
20633
20676
|
series_ref.current.setData(data);
|
|
20634
20677
|
}
|
|
20635
20678
|
}, [data]);
|
|
20636
|
-
return /* @__PURE__ */
|
|
20679
|
+
return /* @__PURE__ */ jsxs30("div", {
|
|
20637
20680
|
className: clsx("w-full border-t", theme === "dark" ? "border-white/5" : "border-black/5"),
|
|
20638
20681
|
children: [
|
|
20639
|
-
/* @__PURE__ */
|
|
20682
|
+
/* @__PURE__ */ jsxs30("div", {
|
|
20640
20683
|
className: "flex items-center justify-between px-3 py-1.5",
|
|
20641
20684
|
style: { backgroundColor: chart_theme.background },
|
|
20642
20685
|
children: [
|
|
20643
|
-
/* @__PURE__ */
|
|
20686
|
+
/* @__PURE__ */ jsx40("span", {
|
|
20644
20687
|
className: "text-[10px] uppercase tracking-wider",
|
|
20645
20688
|
style: { color: line_color },
|
|
20646
20689
|
children: "RSI (14)"
|
|
20647
20690
|
}),
|
|
20648
|
-
/* @__PURE__ */
|
|
20691
|
+
/* @__PURE__ */ jsx40("span", {
|
|
20649
20692
|
className: "text-[10px] tabular-nums",
|
|
20650
20693
|
style: { color: chart_theme.textSecondary },
|
|
20651
20694
|
children: data.length > 0 ? data[data.length - 1].value.toFixed(2) : "—"
|
|
20652
20695
|
})
|
|
20653
20696
|
]
|
|
20654
20697
|
}),
|
|
20655
|
-
/* @__PURE__ */
|
|
20698
|
+
/* @__PURE__ */ jsx40("div", {
|
|
20656
20699
|
ref: container_ref,
|
|
20657
20700
|
style: { height }
|
|
20658
20701
|
})
|
|
@@ -20741,29 +20784,29 @@ function OaMacdPane({
|
|
|
20741
20784
|
};
|
|
20742
20785
|
}, [theme, height, data, macd_color, signal_color, hist_positive, hist_negative]);
|
|
20743
20786
|
const last_data = data[data.length - 1];
|
|
20744
|
-
return /* @__PURE__ */
|
|
20787
|
+
return /* @__PURE__ */ jsxs30("div", {
|
|
20745
20788
|
className: clsx("w-full border-t", theme === "dark" ? "border-white/5" : "border-black/5"),
|
|
20746
20789
|
children: [
|
|
20747
|
-
/* @__PURE__ */
|
|
20790
|
+
/* @__PURE__ */ jsxs30("div", {
|
|
20748
20791
|
className: "flex items-center justify-between px-3 py-1.5",
|
|
20749
20792
|
style: { backgroundColor: chart_theme.background },
|
|
20750
20793
|
children: [
|
|
20751
|
-
/* @__PURE__ */
|
|
20794
|
+
/* @__PURE__ */ jsx40("span", {
|
|
20752
20795
|
className: "text-[10px] uppercase tracking-wider",
|
|
20753
20796
|
style: { color: macd_color },
|
|
20754
20797
|
children: "MACD (12, 26, 9)"
|
|
20755
20798
|
}),
|
|
20756
|
-
/* @__PURE__ */
|
|
20799
|
+
/* @__PURE__ */ jsxs30("div", {
|
|
20757
20800
|
className: "flex items-center gap-3 text-[10px] tabular-nums",
|
|
20758
20801
|
children: [
|
|
20759
|
-
/* @__PURE__ */
|
|
20802
|
+
/* @__PURE__ */ jsxs30("span", {
|
|
20760
20803
|
style: { color: macd_color },
|
|
20761
20804
|
children: [
|
|
20762
20805
|
"MACD: ",
|
|
20763
20806
|
last_data ? last_data.macd.toFixed(4) : "—"
|
|
20764
20807
|
]
|
|
20765
20808
|
}),
|
|
20766
|
-
/* @__PURE__ */
|
|
20809
|
+
/* @__PURE__ */ jsxs30("span", {
|
|
20767
20810
|
style: { color: signal_color },
|
|
20768
20811
|
children: [
|
|
20769
20812
|
"Signal: ",
|
|
@@ -20774,7 +20817,7 @@ function OaMacdPane({
|
|
|
20774
20817
|
})
|
|
20775
20818
|
]
|
|
20776
20819
|
}),
|
|
20777
|
-
/* @__PURE__ */
|
|
20820
|
+
/* @__PURE__ */ jsx40("div", {
|
|
20778
20821
|
ref: container_ref,
|
|
20779
20822
|
style: { height }
|
|
20780
20823
|
})
|
|
@@ -20948,6 +20991,7 @@ export {
|
|
|
20948
20991
|
OaContainer,
|
|
20949
20992
|
OaFeatureCard,
|
|
20950
20993
|
OaFooter,
|
|
20994
|
+
OaFootnotes,
|
|
20951
20995
|
OaHero,
|
|
20952
20996
|
OaImageCard,
|
|
20953
20997
|
OaInput,
|