@lightsparkdev/ui 0.0.11 → 0.0.12

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.
@@ -78,6 +78,7 @@ __export(components_exports, {
78
78
  CardPageFullWidth: () => CardPageFullWidth,
79
79
  CardPageRightContentInner: () => CardPageRightContentInner,
80
80
  CardPageSubtitle: () => CardPageSubtitle,
81
+ CodeBlock: () => CodeBlock,
81
82
  Collapsible: () => Collapsible,
82
83
  CommandKey: () => CommandKey,
83
84
  CopyToClipboardButton: () => CopyToClipboardButton,
@@ -86,6 +87,7 @@ __export(components_exports, {
86
87
  GradientCardHeader: () => GradientCardHeader,
87
88
  Icon: () => Icon,
88
89
  IconContainer: () => IconContainer,
90
+ InlineCode: () => InlineCode,
89
91
  LightTooltip: () => LightTooltip,
90
92
  LightboxImage: () => LightboxImage,
91
93
  LightsparkProvider: () => LightsparkProvider,
@@ -96,6 +98,7 @@ __export(components_exports, {
96
98
  ProgressBar: () => ProgressBar,
97
99
  SecretContainer: () => SecretContainer,
98
100
  StyledButton: () => StyledButton,
101
+ StyledCodeBlock: () => StyledCodeBlock,
99
102
  TextIconAligner: () => TextIconAligner,
100
103
  UnstyledButton: () => UnstyledButton
101
104
  });
@@ -1800,7 +1803,7 @@ function getTextColor({ color, theme, primary: primary2, blue }) {
1800
1803
  return theme.text;
1801
1804
  }
1802
1805
  function getBackgroundColor({
1803
- backgroundColor,
1806
+ backgroundColor: backgroundColor2,
1804
1807
  theme,
1805
1808
  primary: primary2,
1806
1809
  blue,
@@ -1809,8 +1812,8 @@ function getBackgroundColor({
1809
1812
  if (ghost) {
1810
1813
  return "none";
1811
1814
  }
1812
- if (backgroundColor) {
1813
- return backgroundColor;
1815
+ if (backgroundColor2) {
1816
+ return backgroundColor2;
1814
1817
  }
1815
1818
  if (blue) {
1816
1819
  return colors.blue43;
@@ -1861,14 +1864,14 @@ function getBorder({ ghost }) {
1861
1864
  return "1px solid";
1862
1865
  }
1863
1866
  function getInnerBorderColor({
1864
- backgroundColor,
1867
+ backgroundColor: backgroundColor2,
1865
1868
  theme,
1866
1869
  primary: primary2,
1867
1870
  blue
1868
1871
  }) {
1869
- if (primary2 || blue || backgroundColor) {
1872
+ if (primary2 || blue || backgroundColor2) {
1870
1873
  return getBackgroundColor({
1871
- backgroundColor,
1874
+ backgroundColor: backgroundColor2,
1872
1875
  theme,
1873
1876
  primary: primary2,
1874
1877
  blue
@@ -1877,7 +1880,7 @@ function getInnerBorderColor({
1877
1880
  return themeOr(colors.gray90, colors.gray20)({ theme });
1878
1881
  }
1879
1882
  function Button({
1880
- backgroundColor,
1883
+ backgroundColor: backgroundColor2,
1881
1884
  color,
1882
1885
  hoverColor,
1883
1886
  primary: primary2 = false,
@@ -1940,7 +1943,7 @@ function Button({
1940
1943
  ] });
1941
1944
  const isSingleCharRoundButton = Boolean(text && text.length === 1 && !icon);
1942
1945
  const commonProps = {
1943
- backgroundColor,
1946
+ backgroundColor: backgroundColor2,
1944
1947
  color,
1945
1948
  hoverColor,
1946
1949
  type,
@@ -1970,7 +1973,7 @@ function Button({
1970
1973
  }
1971
1974
  var buttonStyle = ({
1972
1975
  color,
1973
- backgroundColor,
1976
+ backgroundColor: backgroundColor2,
1974
1977
  hoverColor,
1975
1978
  theme,
1976
1979
  primary: primary2,
@@ -2008,7 +2011,7 @@ var buttonStyle = ({
2008
2011
  text-align: center;
2009
2012
  white-space: nowrap;
2010
2013
  background-color: ${getBackgroundColor({
2011
- backgroundColor,
2014
+ backgroundColor: backgroundColor2,
2012
2015
  theme,
2013
2016
  primary: primary2,
2014
2017
  blue,
@@ -2016,7 +2019,7 @@ var buttonStyle = ({
2016
2019
  })};
2017
2020
  border: ${getBorder({ ghost })};
2018
2021
  border-color: ${getInnerBorderColor({
2019
- backgroundColor,
2022
+ backgroundColor: backgroundColor2,
2020
2023
  theme,
2021
2024
  primary: primary2,
2022
2025
  blue
@@ -2600,10 +2603,243 @@ var CardPageContent = import_styled9.default.div`
2600
2603
  `}
2601
2604
  `;
2602
2605
 
2603
- // src/components/Collapsible.tsx
2606
+ // src/components/CodeBlock.tsx
2607
+ var import_styled11 = __toESM(require("@emotion/styled"), 1);
2608
+ var import_prismjs = __toESM(require("prismjs"), 1);
2609
+ var import_prism_dart_min = require("prismjs/components/prism-dart.min.js");
2610
+ var import_prism_go_min = require("prismjs/components/prism-go.min.js");
2611
+ var import_prism_graphql_min = require("prismjs/components/prism-graphql.min.js");
2612
+ var import_prism_java_min = require("prismjs/components/prism-java.min.js");
2613
+ var import_prism_json_min = require("prismjs/components/prism-json.min.js");
2614
+ var import_prism_jsx_min = require("prismjs/components/prism-jsx.min.js");
2615
+ var import_prism_kotlin_min = require("prismjs/components/prism-kotlin.min.js");
2616
+ var import_prism_python_min = require("prismjs/components/prism-python.min.js");
2617
+ var import_prism_rust_min = require("prismjs/components/prism-rust.min.js");
2618
+ var import_prism_swift_min = require("prismjs/components/prism-swift.min.js");
2619
+ var import_prism_tomorrow = require("prismjs/themes/prism-tomorrow.css");
2620
+ var import_react15 = require("react");
2621
+ var import_react_select = __toESM(require("react-select"), 1);
2622
+
2623
+ // src/components/CopyToClipboardButton.tsx
2604
2624
  var import_styled10 = __toESM(require("@emotion/styled"), 1);
2625
+ var import_nanoid = require("nanoid");
2605
2626
  var import_react14 = require("react");
2606
2627
  var import_jsx_runtime11 = require("@emotion/react/jsx-runtime");
2628
+ var CopyToClipboardButton = (props) => {
2629
+ var _a;
2630
+ const originalTooltipContent = props.tooltipContent || "Click to copy";
2631
+ const icon = props.icon || "Copy";
2632
+ const id = `copy-node-name-${(_a = props.id) != null ? _a : (0, import_nanoid.nanoid)()}`;
2633
+ const [tooltipContent, setTooltipContent] = (0, import_react14.useState)(originalTooltipContent);
2634
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
2635
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2636
+ Button2,
2637
+ {
2638
+ type: "button",
2639
+ onClick: () => {
2640
+ void (() => __async(void 0, null, function* () {
2641
+ try {
2642
+ yield navigator.clipboard.writeText(props.value);
2643
+ setTooltipContent("Copied!");
2644
+ } catch (err) {
2645
+ setTooltipContent("Unable to copy");
2646
+ }
2647
+ setTimeout(() => {
2648
+ setTooltipContent(originalTooltipContent);
2649
+ }, 2e3);
2650
+ }))();
2651
+ },
2652
+ css: props.buttonCSS,
2653
+ ml: props.ml,
2654
+ "data-tooltip-id": id,
2655
+ children: [
2656
+ props.children ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Children, { children: props.children }) : null,
2657
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: icon, width: props.isSm ? 12 : 16 })
2658
+ ]
2659
+ }
2660
+ ),
2661
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2662
+ LightTooltip,
2663
+ {
2664
+ id,
2665
+ place: props.place || "right",
2666
+ content: tooltipContent
2667
+ }
2668
+ )
2669
+ ] });
2670
+ };
2671
+ var Children = import_styled10.default.span`
2672
+ margin-right: 4px;
2673
+ `;
2674
+ var Button2 = (0, import_styled10.default)(UnstyledButton)`
2675
+ background: rgba(0, 0, 0, 0);
2676
+ vertical-align: middle;
2677
+ ${({ ml }) => ml ? `margin-left: ${ml}px` : ""};
2678
+ `;
2679
+
2680
+ // src/components/CodeBlock.tsx
2681
+ var import_jsx_runtime12 = require("@emotion/react/jsx-runtime");
2682
+ var ProgrammingLanguageOptions = {
2683
+ Bash: "bash",
2684
+ Flutter: "dart",
2685
+ Go: "go",
2686
+ GraphQL: "graphql",
2687
+ Java: "java",
2688
+ JavaScript: "js",
2689
+ JSON: "json",
2690
+ Kotlin: "kotlin",
2691
+ Python: "python",
2692
+ React: "react",
2693
+ ReactNative: "tsx",
2694
+ Rust: "rust",
2695
+ Swift: "swift",
2696
+ Text: "txt"
2697
+ };
2698
+ var backgroundColor = "#2d2d2d";
2699
+ var InlineCode = import_styled11.default.span`
2700
+ font-family: "Roboto Mono", monospace;
2701
+ background-color: #2d2d2d;
2702
+ border: 1px solid ${themeOr(colors.gray90, colors.gray20)};
2703
+ border-radius: 3px;
2704
+ line-height: 24px;
2705
+ padding: 0 4px;
2706
+ `;
2707
+ var codeSelectStyles = {
2708
+ container: (styles2) => __spreadProps(__spreadValues({}, styles2), {
2709
+ display: "flex"
2710
+ }),
2711
+ control: (styles2) => __spreadProps(__spreadValues({}, styles2), {
2712
+ backgroundColor,
2713
+ border: "none",
2714
+ cursor: "pointer",
2715
+ "&:hover": {
2716
+ border: "#none"
2717
+ },
2718
+ boxShadow: "none",
2719
+ minHeight: 0
2720
+ }),
2721
+ dropdownIndicator: (styles2) => __spreadProps(__spreadValues({}, styles2), {
2722
+ color: "#ffffff",
2723
+ padding: "0 0 0 4px",
2724
+ "&:hover": {
2725
+ color: "#ffffff"
2726
+ }
2727
+ }),
2728
+ indicatorSeparator: (styles2) => ({
2729
+ display: "none"
2730
+ }),
2731
+ input: (styles2) => __spreadProps(__spreadValues({}, styles2), {
2732
+ fontSize: "1rem",
2733
+ margin: 0,
2734
+ color: "transparent"
2735
+ }),
2736
+ menu: (styles2) => __spreadProps(__spreadValues({}, styles2), {
2737
+ backgroundColor,
2738
+ width: "auto"
2739
+ }),
2740
+ menuList: (styles2) => __spreadProps(__spreadValues({}, styles2), {
2741
+ borderRadius: "4px",
2742
+ padding: 0
2743
+ }),
2744
+ option: (styles2, state) => __spreadProps(__spreadValues({}, styles2), {
2745
+ cursor: "pointer",
2746
+ backgroundColor: state.isSelected ? colors.gray25 : backgroundColor,
2747
+ "&:hover": {
2748
+ backgroundColor: colors.gray25
2749
+ }
2750
+ }),
2751
+ singleValue: (styles2) => __spreadProps(__spreadValues({}, styles2), {
2752
+ color: "#ffffff",
2753
+ margin: 0
2754
+ }),
2755
+ valueContainer: (styles2) => __spreadProps(__spreadValues({}, styles2), {
2756
+ padding: 0
2757
+ })
2758
+ };
2759
+ var CodeBlock = ({
2760
+ title,
2761
+ children,
2762
+ className,
2763
+ language = "Text",
2764
+ languageOptions,
2765
+ onSelectLanguage,
2766
+ withCopyButton
2767
+ }) => {
2768
+ (0, import_react15.useLayoutEffect)(() => {
2769
+ import_prismjs.default.highlightAll();
2770
+ }, [children, language]);
2771
+ const header = withCopyButton || languageOptions && onSelectLanguage ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(CodeBlockHeader, { children: [
2772
+ title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CodeBlockHeaderTitle, { children: title }),
2773
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2774
+ "div",
2775
+ {
2776
+ css: {
2777
+ display: "flex",
2778
+ alignItems: "center",
2779
+ justifyContent: title ? "flex-end" : "space-between",
2780
+ width: "100%"
2781
+ },
2782
+ children: [
2783
+ languageOptions && onSelectLanguage ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { css: { margin: title ? "0 16px 0 auto" : "0" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2784
+ import_react_select.default,
2785
+ {
2786
+ value: { value: language, label: language },
2787
+ options: languageOptions.map((lang) => ({
2788
+ value: lang,
2789
+ label: lang
2790
+ })),
2791
+ onChange: (selected) => {
2792
+ if (selected == null ? void 0 : selected.value) {
2793
+ onSelectLanguage(selected.value);
2794
+ }
2795
+ },
2796
+ styles: codeSelectStyles
2797
+ }
2798
+ ) }) : null,
2799
+ withCopyButton ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CopyToClipboardButton, { value: children }) : null
2800
+ ]
2801
+ }
2802
+ )
2803
+ ] }) : null;
2804
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(StyledCodeBlock, { className, children: [
2805
+ header,
2806
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CodeBlockContainer, { hasHeader: header !== null, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { className: `language-${ProgrammingLanguageOptions[language]}`, children }) })
2807
+ ] });
2808
+ };
2809
+ var StyledCodeBlock = import_styled11.default.div``;
2810
+ var CodeBlockHeader = import_styled11.default.div`
2811
+ align-items: center;
2812
+ background-color: #2d2d2d;
2813
+ border-bottom: 1px solid ${colors.gray25};
2814
+ border-top-left-radius: 8px;
2815
+ border-top-right-radius: 8px;
2816
+ color: #ffffff;
2817
+ display: flex;
2818
+ flex-direction: row;
2819
+ justify-content: space-between;
2820
+ padding: 16px 20px;
2821
+ `;
2822
+ var CodeBlockContainer = import_styled11.default.pre`
2823
+ ${overflowAutoWithoutScrollbars}
2824
+ &[class*="language-"] {
2825
+ padding: 20px;
2826
+ font-weight: 500;
2827
+ ${standardBorderRadius(8)}
2828
+ ${(props) => props.hasHeader ? `border-top-left-radius: 0;
2829
+ border-top-right-radius: 0;
2830
+ margin-top: 0;` : ""}
2831
+ }
2832
+ `;
2833
+ var CodeBlockHeaderTitle = import_styled11.default.div`
2834
+ width: 100%;
2835
+ font-weight: 500;
2836
+ color: ${({ theme }) => theme.hcNeutralFromBg(backgroundColor)};
2837
+ `;
2838
+
2839
+ // src/components/Collapsible.tsx
2840
+ var import_styled12 = __toESM(require("@emotion/styled"), 1);
2841
+ var import_react16 = require("react");
2842
+ var import_jsx_runtime13 = require("@emotion/react/jsx-runtime");
2607
2843
  function Collapsible({
2608
2844
  children,
2609
2845
  className,
@@ -2616,37 +2852,37 @@ function Collapsible({
2616
2852
  buttonTextElement,
2617
2853
  contentIndent = true
2618
2854
  }) {
2619
- const [isOpen, setIsOpen] = (0, import_react14.useState)(open);
2855
+ const [isOpen, setIsOpen] = (0, import_react16.useState)(open);
2620
2856
  const handleClick = () => {
2621
2857
  if (handleToggle) {
2622
2858
  handleToggle(!isOpen);
2623
2859
  }
2624
2860
  setIsOpen(!isOpen);
2625
2861
  };
2626
- (0, import_react14.useEffect)(() => {
2862
+ (0, import_react16.useEffect)(() => {
2627
2863
  setIsOpen(open);
2628
2864
  }, [open]);
2629
2865
  const iconName = hamburger ? isOpen ? "Close" : "StackedLines" : "Down";
2630
2866
  const iconWidth = iconName === "Close" ? 12 : 14;
2631
- let textElement = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {});
2867
+ let textElement = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", {});
2632
2868
  if (buttonTextElement) {
2633
2869
  textElement = buttonTextElement;
2634
2870
  } else if (text) {
2635
- textElement = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color, children: text });
2871
+ textElement = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color, children: text });
2636
2872
  }
2637
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(StyledCollapsible, { className, children: [
2638
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(StyledCollapsibleButton, { onClick: handleClick, children: [
2873
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(StyledCollapsible, { className, children: [
2874
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(StyledCollapsibleButton, { onClick: handleClick, children: [
2639
2875
  textElement,
2640
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconContainer2, { isOpen, hamburger, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { width: iconWidth, name: iconName }) })
2876
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconContainer2, { isOpen, hamburger, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { width: iconWidth, name: iconName }) })
2641
2877
  ] }),
2642
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CollapsingContainer, { isOpen, full, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(InnerPadding, { contentIndent, children }) })
2878
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CollapsingContainer, { isOpen, full, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(InnerPadding, { contentIndent, children }) })
2643
2879
  ] });
2644
2880
  }
2645
- var StyledCollapsible = import_styled10.default.div`
2881
+ var StyledCollapsible = import_styled12.default.div`
2646
2882
  display: flex;
2647
2883
  flex-direction: column;
2648
2884
  `;
2649
- var StyledCollapsibleButton = import_styled10.default.button`
2885
+ var StyledCollapsibleButton = import_styled12.default.button`
2650
2886
  display: flex;
2651
2887
  flex-direction: row;
2652
2888
  align-items: center;
@@ -2657,7 +2893,7 @@ var StyledCollapsibleButton = import_styled10.default.button`
2657
2893
  ${standardBorderRadius(8)}
2658
2894
  padding: 0;
2659
2895
  `;
2660
- var IconContainer2 = import_styled10.default.div`
2896
+ var IconContainer2 = import_styled12.default.div`
2661
2897
  ${(props) => {
2662
2898
  if (props.hamburger) {
2663
2899
  return;
@@ -2667,7 +2903,7 @@ var IconContainer2 = import_styled10.default.div`
2667
2903
  transition: transform 0.25s ease-out;
2668
2904
  width: 20px;
2669
2905
  `;
2670
- var CollapsingContainer = import_styled10.default.div`
2906
+ var CollapsingContainer = import_styled12.default.div`
2671
2907
  overflow: scroll;
2672
2908
  opacity: 0;
2673
2909
  animation-duration: 0.4s;
@@ -2701,38 +2937,38 @@ var CollapsingContainer = import_styled10.default.div`
2701
2937
  }
2702
2938
  }
2703
2939
  `;
2704
- var InnerPadding = import_styled10.default.div`
2940
+ var InnerPadding = import_styled12.default.div`
2705
2941
  padding: ${"4px" /* 3xs */} 0 ${"4px" /* 3xs */}
2706
2942
  ${(props) => props.contentIndent ? "16px" /* md */ : "0"};
2707
2943
  gap: ${"2px" /* 4xs */};
2708
2944
  display: flex;
2709
2945
  flex-direction: column;
2710
2946
  `;
2711
- var Text = import_styled10.default.span`
2947
+ var Text = import_styled12.default.span`
2712
2948
  ${(props) => props.color ? `color: ${props.color};` : ""}
2713
2949
  line-height: inherit;
2714
2950
  `;
2715
2951
 
2716
2952
  // src/components/CommandKey.tsx
2717
- var import_styled11 = __toESM(require("@emotion/styled"), 1);
2718
- var import_jsx_runtime12 = require("@emotion/react/jsx-runtime");
2953
+ var import_styled13 = __toESM(require("@emotion/styled"), 1);
2954
+ var import_jsx_runtime14 = require("@emotion/react/jsx-runtime");
2719
2955
  var CommandKey = ({
2720
2956
  keyboardKey,
2721
2957
  size: size2,
2722
2958
  color,
2723
- backgroundColor
2959
+ backgroundColor: backgroundColor2
2724
2960
  }) => {
2725
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2961
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2726
2962
  StyledCommandKey,
2727
2963
  {
2728
2964
  color,
2729
2965
  size: size2,
2730
- backgroundColor,
2966
+ backgroundColor: backgroundColor2,
2731
2967
  children: keyboardKey
2732
2968
  }
2733
2969
  );
2734
2970
  };
2735
- var StyledCommandKey = import_styled11.default.div`
2971
+ var StyledCommandKey = import_styled13.default.div`
2736
2972
  height: 24px;
2737
2973
  display: flex;
2738
2974
  align-items: center;
@@ -2747,68 +2983,11 @@ var StyledCommandKey = import_styled11.default.div`
2747
2983
  padding: 3px 6px;
2748
2984
  `;
2749
2985
 
2750
- // src/components/CopyToClipboardButton.tsx
2751
- var import_styled12 = __toESM(require("@emotion/styled"), 1);
2752
- var import_nanoid = require("nanoid");
2753
- var import_react15 = require("react");
2754
- var import_jsx_runtime13 = require("@emotion/react/jsx-runtime");
2755
- var CopyToClipboardButton = (props) => {
2756
- var _a;
2757
- const originalTooltipContent = props.tooltipContent || "Click to copy";
2758
- const icon = props.icon || "Copy";
2759
- const id = `copy-node-name-${(_a = props.id) != null ? _a : (0, import_nanoid.nanoid)()}`;
2760
- const [tooltipContent, setTooltipContent] = (0, import_react15.useState)(originalTooltipContent);
2761
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
2762
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2763
- Button2,
2764
- {
2765
- type: "button",
2766
- onClick: () => {
2767
- void (() => __async(void 0, null, function* () {
2768
- try {
2769
- yield navigator.clipboard.writeText(props.value);
2770
- setTooltipContent("Copied!");
2771
- } catch (err) {
2772
- setTooltipContent("Unable to copy");
2773
- }
2774
- setTimeout(() => {
2775
- setTooltipContent(originalTooltipContent);
2776
- }, 2e3);
2777
- }))();
2778
- },
2779
- css: props.buttonCSS,
2780
- ml: props.ml,
2781
- "data-tooltip-id": id,
2782
- children: [
2783
- props.children ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Children, { children: props.children }) : null,
2784
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: icon, width: props.isSm ? 12 : 16 })
2785
- ]
2786
- }
2787
- ),
2788
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2789
- LightTooltip,
2790
- {
2791
- id,
2792
- place: props.place || "right",
2793
- content: tooltipContent
2794
- }
2795
- )
2796
- ] });
2797
- };
2798
- var Children = import_styled12.default.span`
2799
- margin-right: 4px;
2800
- `;
2801
- var Button2 = (0, import_styled12.default)(UnstyledButton)`
2802
- background: rgba(0, 0, 0, 0);
2803
- vertical-align: middle;
2804
- ${({ ml }) => ml ? `margin-left: ${ml}px` : ""};
2805
- `;
2806
-
2807
2986
  // src/components/CurrencyAmount.tsx
2808
2987
  var import_client = require("@apollo/client");
2809
- var import_styled13 = __toESM(require("@emotion/styled"), 1);
2988
+ var import_styled14 = __toESM(require("@emotion/styled"), 1);
2810
2989
  var import_core = require("@lightsparkdev/core");
2811
- var import_jsx_runtime14 = require("@emotion/react/jsx-runtime");
2990
+ var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
2812
2991
  function CurrencyAmount({
2813
2992
  amount,
2814
2993
  displayUnit = import_core.CurrencyUnit.SATOSHI,
@@ -2840,18 +3019,18 @@ function CurrencyAmount({
2840
3019
  if (showUnits) {
2841
3020
  formattedNumber += ` ${shorttext(unit, value)}`;
2842
3021
  }
2843
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(StyledCurrencyAmount, { ml, children: [
3022
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(StyledCurrencyAmount, { ml, children: [
2844
3023
  includeEstimatedIndicator && "Est. ",
2845
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CurrencyIcon, { unit }),
3024
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CurrencyIcon, { unit }),
2846
3025
  formattedNumber
2847
3026
  ] });
2848
3027
  }
2849
3028
  var CurrencyIcon = ({ unit }) => {
2850
3029
  switch (unit) {
2851
3030
  case import_core.CurrencyUnit.BITCOIN:
2852
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { name: "BitcoinB", width: 8, verticalAlign: -2, mr: 2 });
3031
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "BitcoinB", width: 8, verticalAlign: -2, mr: 2 });
2853
3032
  case import_core.CurrencyUnit.SATOSHI:
2854
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { name: "Satoshi", width: 8, verticalAlign: -2, mr: 2 });
3033
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "Satoshi", width: 8, verticalAlign: -2, mr: 2 });
2855
3034
  default:
2856
3035
  return null;
2857
3036
  }
@@ -2872,7 +3051,7 @@ var shorttext = (unit, value) => {
2872
3051
  }
2873
3052
  return unit;
2874
3053
  };
2875
- var StyledCurrencyAmount = import_styled13.default.span`
3054
+ var StyledCurrencyAmount = import_styled14.default.span`
2876
3055
  color: inherit !important;
2877
3056
  white-space: nowrap;
2878
3057
  font-feature-settings:
@@ -2893,19 +3072,19 @@ CurrencyAmount.fragments = {
2893
3072
  };
2894
3073
 
2895
3074
  // src/components/GradientCardHeader.tsx
2896
- var import_styled14 = __toESM(require("@emotion/styled"), 1);
2897
- var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
3075
+ var import_styled15 = __toESM(require("@emotion/styled"), 1);
3076
+ var import_jsx_runtime16 = require("@emotion/react/jsx-runtime");
2898
3077
  function GradientCardHeader(props) {
2899
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CardHeaderWrapper, { children: [
2900
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Gradients, {}),
2901
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { children: [
3078
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CardHeaderWrapper, { children: [
3079
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Gradients, {}),
3080
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
2902
3081
  props.status,
2903
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CardHeaderTitle, { children: props.title })
3082
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CardHeaderTitle, { children: props.title })
2904
3083
  ] }),
2905
3084
  props.children
2906
3085
  ] });
2907
3086
  }
2908
- var CardHeaderWrapper = import_styled14.default.div`
3087
+ var CardHeaderWrapper = import_styled15.default.div`
2909
3088
  position: relative;
2910
3089
  display: flex;
2911
3090
  flex-direction: column;
@@ -2915,7 +3094,7 @@ var CardHeaderWrapper = import_styled14.default.div`
2915
3094
  color: white;
2916
3095
  height: 264px;
2917
3096
  `;
2918
- var CardHeaderTitle = import_styled14.default.h3`
3097
+ var CardHeaderTitle = import_styled15.default.h3`
2919
3098
  font-size: 21px;
2920
3099
  font-weight: 800;
2921
3100
  color: white;
@@ -2924,12 +3103,12 @@ var CardHeaderTitle = import_styled14.default.h3`
2924
3103
  position: relative;
2925
3104
  `;
2926
3105
  var Gradients = () => {
2927
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }, children: [
2928
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BackgroundGradients, {}),
2929
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AccentGradients, {})
3106
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }, children: [
3107
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BackgroundGradients, {}),
3108
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AccentGradients, {})
2930
3109
  ] });
2931
3110
  };
2932
- var BackgroundGradients = import_styled14.default.div`
3111
+ var BackgroundGradients = import_styled15.default.div`
2933
3112
  &:before,
2934
3113
  &:after {
2935
3114
  content: "";
@@ -2964,7 +3143,7 @@ var BackgroundGradients = import_styled14.default.div`
2964
3143
  );
2965
3144
  }
2966
3145
  `;
2967
- var AccentGradients = import_styled14.default.div`
3146
+ var AccentGradients = import_styled15.default.div`
2968
3147
  position: absolute;
2969
3148
  top: 0;
2970
3149
  left: 0;
@@ -3005,18 +3184,18 @@ var AccentGradients = import_styled14.default.div`
3005
3184
  `;
3006
3185
 
3007
3186
  // src/components/LightboxImage.tsx
3008
- var import_styled15 = __toESM(require("@emotion/styled"), 1);
3009
- var import_react16 = require("react");
3010
- var import_jsx_runtime16 = require("@emotion/react/jsx-runtime");
3187
+ var import_styled16 = __toESM(require("@emotion/styled"), 1);
3188
+ var import_react17 = require("react");
3189
+ var import_jsx_runtime17 = require("@emotion/react/jsx-runtime");
3011
3190
  var LightboxImage = ({ children }) => {
3012
- const [isOpen, setIsOpen] = (0, import_react16.useState)(false);
3013
- const [boundingRect, setBoundingRect] = (0, import_react16.useState)({
3191
+ const [isOpen, setIsOpen] = (0, import_react17.useState)(false);
3192
+ const [boundingRect, setBoundingRect] = (0, import_react17.useState)({
3014
3193
  x: 0,
3015
3194
  y: 0,
3016
3195
  width: 0,
3017
3196
  height: 0
3018
3197
  });
3019
- const imageRef = (0, import_react16.useRef)(null);
3198
+ const imageRef = (0, import_react17.useRef)(null);
3020
3199
  const handleMouseUp = () => {
3021
3200
  setIsOpen(!isOpen);
3022
3201
  };
@@ -3032,12 +3211,12 @@ var LightboxImage = ({ children }) => {
3032
3211
  });
3033
3212
  }
3034
3213
  };
3035
- (0, import_react16.useEffect)(() => {
3214
+ (0, import_react17.useEffect)(() => {
3036
3215
  handleSetBoundingRect(imageRef);
3037
3216
  }, [imageRef]);
3038
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3039
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DummyImage, { isOpen, boundingRect }),
3040
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3217
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
3218
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DummyImage, { isOpen, boundingRect }),
3219
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3041
3220
  StyledImage,
3042
3221
  {
3043
3222
  isOpen,
@@ -3048,13 +3227,13 @@ var LightboxImage = ({ children }) => {
3048
3227
  children
3049
3228
  }
3050
3229
  ),
3051
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Lightbox, { isOpen, onClick: handleMouseUp })
3230
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Lightbox, { isOpen, onClick: handleMouseUp })
3052
3231
  ] });
3053
3232
  };
3054
- var DummyImage = import_styled15.default.div`
3233
+ var DummyImage = import_styled16.default.div`
3055
3234
  ${(props) => props.isOpen ? `height: ${props.boundingRect.height}px; width: ${props.boundingRect.width}px;` : ``}
3056
3235
  `;
3057
- var StyledImage = import_styled15.default.div`
3236
+ var StyledImage = import_styled16.default.div`
3058
3237
  display: flex;
3059
3238
  justify-content: start;
3060
3239
  align-items: center;
@@ -3102,7 +3281,7 @@ var StyledImage = import_styled15.default.div`
3102
3281
  }
3103
3282
  }
3104
3283
  `;
3105
- var Lightbox = import_styled15.default.div`
3284
+ var Lightbox = import_styled16.default.div`
3106
3285
  transition: opacity 0.2s ease-out;
3107
3286
  position: fixed;
3108
3287
  opacity: 0;
@@ -3125,11 +3304,11 @@ var Lightbox = import_styled15.default.div`
3125
3304
  `;
3126
3305
 
3127
3306
  // src/components/LightsparkProvider.tsx
3128
- var import_react19 = require("@emotion/react");
3307
+ var import_react20 = require("@emotion/react");
3129
3308
 
3130
3309
  // src/styles/global.tsx
3131
- var import_react17 = require("@emotion/react");
3132
- var import_react18 = require("react");
3310
+ var import_react18 = require("@emotion/react");
3311
+ var import_react19 = require("react");
3133
3312
  var import_react_tooltip2 = require("react-tooltip/dist/react-tooltip.css");
3134
3313
  var import_fonts = require("../static/fonts.css");
3135
3314
 
@@ -3139,8 +3318,8 @@ var cssVars = {
3139
3318
  };
3140
3319
 
3141
3320
  // src/styles/global.tsx
3142
- var import_jsx_runtime17 = require("@emotion/react/jsx-runtime");
3143
- var globalComponentStyles = ({ theme }) => import_react17.css`
3321
+ var import_jsx_runtime18 = require("@emotion/react/jsx-runtime");
3322
+ var globalComponentStyles = ({ theme }) => import_react18.css`
3144
3323
  @import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
3145
3324
 
3146
3325
  html {
@@ -3215,9 +3394,9 @@ var globalComponentStyles = ({ theme }) => import_react17.css`
3215
3394
  }
3216
3395
  `;
3217
3396
  function GlobalStyles() {
3218
- const theme = (0, import_react17.useTheme)();
3397
+ const theme = (0, import_react18.useTheme)();
3219
3398
  const bg = useThemeBg();
3220
- (0, import_react18.useEffect)(() => {
3399
+ (0, import_react19.useEffect)(() => {
3221
3400
  const documentHeight = () => {
3222
3401
  const doc = document.documentElement;
3223
3402
  doc.style.setProperty(cssVars.docHeight, `${window.innerHeight}px`);
@@ -3226,7 +3405,7 @@ function GlobalStyles() {
3226
3405
  documentHeight();
3227
3406
  return () => window.removeEventListener("resize", documentHeight);
3228
3407
  }, []);
3229
- const globalStyles = import_react17.css`
3408
+ const globalStyles = import_react18.css`
3230
3409
  ${globalComponentStyles({ theme })}
3231
3410
 
3232
3411
  :root {
@@ -3253,29 +3432,29 @@ function GlobalStyles() {
3253
3432
  height: 100%;
3254
3433
  }
3255
3434
  `;
3256
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react17.Global, { styles: globalStyles });
3435
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react18.Global, { styles: globalStyles });
3257
3436
  }
3258
3437
 
3259
3438
  // src/components/LightsparkProvider.tsx
3260
- var import_jsx_runtime18 = require("@emotion/react/jsx-runtime");
3439
+ var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
3261
3440
  function LightsparkProvider({ children }) {
3262
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react19.ThemeProvider, { theme: themes.light, children: [
3263
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(GlobalStyles, {}),
3441
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react20.ThemeProvider, { theme: themes.light, children: [
3442
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(GlobalStyles, {}),
3264
3443
  children
3265
3444
  ] });
3266
3445
  }
3267
3446
 
3268
3447
  // src/components/Modal.tsx
3269
- var import_styled17 = __toESM(require("@emotion/styled"), 1);
3270
- var import_react23 = __toESM(require("react"), 1);
3448
+ var import_styled18 = __toESM(require("@emotion/styled"), 1);
3449
+ var import_react24 = __toESM(require("react"), 1);
3271
3450
  var import_react_dom2 = __toESM(require("react-dom"), 1);
3272
3451
 
3273
3452
  // src/hooks/useLiveRef.tsx
3274
- var import_react20 = require("react");
3453
+ var import_react21 = require("react");
3275
3454
  function useLiveRef() {
3276
- const [ready, setReady] = (0, import_react20.useState)(false);
3277
- const ref = (0, import_react20.useRef)(null);
3278
- const refCb = (0, import_react20.useCallback)((node) => {
3455
+ const [ready, setReady] = (0, import_react21.useState)(false);
3456
+ const ref = (0, import_react21.useRef)(null);
3457
+ const refCb = (0, import_react21.useCallback)((node) => {
3279
3458
  if (node !== null) {
3280
3459
  ref.current = node;
3281
3460
  setReady(true);
@@ -3285,8 +3464,8 @@ function useLiveRef() {
3285
3464
  }
3286
3465
 
3287
3466
  // src/utils/toReactNodes.tsx
3288
- var import_react21 = require("react");
3289
- var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
3467
+ var import_react22 = require("react");
3468
+ var import_jsx_runtime20 = require("@emotion/react/jsx-runtime");
3290
3469
  var ToReactNodesTypes = {
3291
3470
  Link: "link"
3292
3471
  };
@@ -3294,22 +3473,22 @@ function toReactNodes(toReactNodesArg) {
3294
3473
  const toReactNodesArray = Array.isArray(toReactNodesArg) ? toReactNodesArg : [toReactNodesArg];
3295
3474
  const reactNodes = toReactNodesArray.map((node, i) => {
3296
3475
  if (typeof node === "string") {
3297
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.Fragment, { children: node.split("\n").map((str, j, strArr) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react21.Fragment, { children: [
3476
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react22.Fragment, { children: node.split("\n").map((str, j, strArr) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react22.Fragment, { children: [
3298
3477
  str,
3299
- j < strArr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("br", {})
3478
+ j < strArr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("br", {})
3300
3479
  ] }, `str-${i}-break-${j}`)) }, `str-${i}`);
3301
3480
  } else if (node.type === ToReactNodesTypes.Link) {
3302
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Link, { to: node.to, children: node.text }, `link-${i}`);
3481
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Link, { to: node.to, children: node.text }, `link-${i}`);
3303
3482
  }
3304
3483
  return null;
3305
3484
  });
3306
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.Fragment, { children: reactNodes });
3485
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react22.Fragment, { children: reactNodes });
3307
3486
  }
3308
3487
 
3309
3488
  // src/components/ProgressBar.tsx
3310
- var import_styled16 = __toESM(require("@emotion/styled"), 1);
3311
- var import_react22 = require("react");
3312
- var import_jsx_runtime20 = require("@emotion/react/jsx-runtime");
3489
+ var import_styled17 = __toESM(require("@emotion/styled"), 1);
3490
+ var import_react23 = require("react");
3491
+ var import_jsx_runtime21 = require("@emotion/react/jsx-runtime");
3313
3492
  var defaultProps2 = {
3314
3493
  isSm: false,
3315
3494
  stepDuration: 0.5
@@ -3320,8 +3499,8 @@ function ProgressBar({
3320
3499
  isSm = defaultProps2.isSm,
3321
3500
  stepDuration = defaultProps2.stepDuration
3322
3501
  }) {
3323
- const [percentage, setPercentage] = (0, import_react22.useState)(5);
3324
- (0, import_react22.useEffect)(() => {
3502
+ const [percentage, setPercentage] = (0, import_react23.useState)(5);
3503
+ (0, import_react23.useEffect)(() => {
3325
3504
  if (progressPercentage !== void 0) {
3326
3505
  setPercentage(progressPercentage);
3327
3506
  } else {
@@ -3330,7 +3509,7 @@ function ProgressBar({
3330
3509
  }, 0);
3331
3510
  }
3332
3511
  }, [progressPercentage]);
3333
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ProgressBarContainer, { isSm, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Bar, { isSm, percentage, stepDuration, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3512
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ProgressBarContainer, { isSm, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Bar, { isSm, percentage, stepDuration, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3334
3513
  BarBg,
3335
3514
  {
3336
3515
  background,
@@ -3341,7 +3520,7 @@ function ProgressBar({
3341
3520
  ) }) });
3342
3521
  }
3343
3522
  ProgressBar.defaultProps = defaultProps2;
3344
- var ProgressBarContainer = import_styled16.default.div`
3523
+ var ProgressBarContainer = import_styled17.default.div`
3345
3524
  ${standardBorderRadius(16)}
3346
3525
  background-color: ${({ theme }) => themeOr(theme.c05Neutral, theme.c1Neutral)({ theme })};
3347
3526
  box-sizing: border-box;
@@ -3351,7 +3530,7 @@ var ProgressBarContainer = import_styled16.default.div`
3351
3530
  width: 100%;
3352
3531
  position: relative;
3353
3532
  `;
3354
- var BarBg = import_styled16.default.div`
3533
+ var BarBg = import_styled17.default.div`
3355
3534
  ${standardBorderRadius(16)}
3356
3535
  width: ${({ percentage }) => 100 / percentage * 100}%;
3357
3536
  height: 100%;
@@ -3365,7 +3544,7 @@ var BarBg = import_styled16.default.div`
3365
3544
  #3f2e7e 115.32%
3366
3545
  )`};
3367
3546
  `;
3368
- var Bar = import_styled16.default.div`
3547
+ var Bar = import_styled17.default.div`
3369
3548
  ${standardBorderRadius(16)}
3370
3549
  overflow: hidden;
3371
3550
  box-sizing: border-box;
@@ -3377,7 +3556,7 @@ var Bar = import_styled16.default.div`
3377
3556
  `;
3378
3557
 
3379
3558
  // src/components/Modal.tsx
3380
- var import_jsx_runtime21 = require("@emotion/react/jsx-runtime");
3559
+ var import_jsx_runtime22 = require("@emotion/react/jsx-runtime");
3381
3560
  function Modal({
3382
3561
  visible,
3383
3562
  title,
@@ -3399,24 +3578,24 @@ function Modal({
3399
3578
  width = 460,
3400
3579
  progressBar
3401
3580
  }) {
3402
- const visibleChangedRef = (0, import_react23.useRef)(false);
3403
- const nodeRef = (0, import_react23.useRef)(null);
3581
+ const visibleChangedRef = (0, import_react24.useRef)(false);
3582
+ const nodeRef = (0, import_react24.useRef)(null);
3404
3583
  const [defaultFirstFocusRef, defaultFirstFocusRefCb] = useLiveRef();
3405
3584
  const ref = firstFocusRef || defaultFirstFocusRef;
3406
- const [nodeReady, setNodeReady] = import_react23.default.useState(false);
3407
- const overlayRef = (0, import_react23.useRef)(null);
3408
- const prevFocusedElement = (0, import_react23.useRef)();
3409
- const modalContainerRef = (0, import_react23.useRef)(null);
3585
+ const [nodeReady, setNodeReady] = import_react24.default.useState(false);
3586
+ const overlayRef = (0, import_react24.useRef)(null);
3587
+ const prevFocusedElement = (0, import_react24.useRef)();
3588
+ const modalContainerRef = (0, import_react24.useRef)(null);
3410
3589
  const bp2 = useBreakpoints();
3411
3590
  const isSm = bp2.current("sm" /* sm */);
3412
3591
  const formattedDescription = description ? toReactNodes(description) : null;
3413
- (0, import_react23.useEffect)(() => {
3592
+ (0, import_react24.useEffect)(() => {
3414
3593
  if (visible !== visibleChangedRef.current) {
3415
3594
  visibleChangedRef.current = visible;
3416
3595
  }
3417
3596
  }, [visible]);
3418
3597
  const visibleChanged = visible !== visibleChangedRef.current;
3419
- (0, import_react23.useEffect)(() => {
3598
+ (0, import_react24.useEffect)(() => {
3420
3599
  prevFocusedElement.current = document.activeElement;
3421
3600
  if (!nodeRef.current) {
3422
3601
  nodeRef.current = document.createElement("div");
@@ -3430,7 +3609,7 @@ function Modal({
3430
3609
  }
3431
3610
  };
3432
3611
  }, []);
3433
- (0, import_react23.useEffect)(() => {
3612
+ (0, import_react24.useEffect)(() => {
3434
3613
  const handleOutsideClick = (event) => {
3435
3614
  if (visible && overlayRef.current && event.target && overlayRef.current.contains(event.target) && !nonDismissable) {
3436
3615
  onClose();
@@ -3467,7 +3646,7 @@ function Modal({
3467
3646
  }
3468
3647
  };
3469
3648
  }, [onClose, visible, nonDismissable]);
3470
- (0, import_react23.useLayoutEffect)(() => {
3649
+ (0, import_react24.useLayoutEffect)(() => {
3471
3650
  if (visible) {
3472
3651
  if (visibleChanged) {
3473
3652
  prevFocusedElement.current = document.activeElement;
@@ -3496,9 +3675,9 @@ function Modal({
3496
3675
  onClose();
3497
3676
  }
3498
3677
  }
3499
- const modalContent = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react23.Fragment, { children: [
3500
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ModalOverlay, { ref: overlayRef }),
3501
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3678
+ const modalContent = /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react24.Fragment, { children: [
3679
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ModalOverlay, { ref: overlayRef }),
3680
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3502
3681
  ModalContainer,
3503
3682
  {
3504
3683
  "aria-modal": true,
@@ -3506,22 +3685,22 @@ function Modal({
3506
3685
  tabIndex: -1,
3507
3686
  role: "dialog",
3508
3687
  ref: modalContainerRef,
3509
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ModalContent, { width, ghost, children: [
3510
- !firstFocusRef && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DefaultFocusTarget, { ref: defaultFirstFocusRefCb }),
3511
- !(nonDismissable || ghost) && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CloseButton, { onClick: onClickCloseButton, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "Close", width: 9 }) }),
3512
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ModalContentInner, { ghost, children: [
3513
- progressBar ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { css: { marginBottom: "20px" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3688
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(ModalContent, { width, ghost, children: [
3689
+ !firstFocusRef && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DefaultFocusTarget, { ref: defaultFirstFocusRefCb }),
3690
+ !(nonDismissable || ghost) && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CloseButton, { onClick: onClickCloseButton, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "Close", width: 9 }) }),
3691
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(ModalContentInner, { ghost, children: [
3692
+ progressBar ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { css: { marginBottom: "20px" }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3514
3693
  ProgressBar,
3515
3694
  {
3516
3695
  progressPercentage: progressBar.progressPercentage,
3517
3696
  isSm: progressBar.isSm
3518
3697
  }
3519
3698
  ) }) : null,
3520
- title ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h4", { children: title }) : null,
3521
- formattedDescription ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Description, { children: formattedDescription }) : null,
3522
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children }),
3523
- onSubmit || onCancel ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ModalButtonRow, { children: [
3524
- !isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3699
+ title ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h4", { children: title }) : null,
3700
+ formattedDescription ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Description, { children: formattedDescription }) : null,
3701
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children }),
3702
+ onSubmit || onCancel ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(ModalButtonRow, { children: [
3703
+ !isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3525
3704
  Button,
3526
3705
  {
3527
3706
  disabled: cancelDisabled,
@@ -3529,7 +3708,7 @@ function Modal({
3529
3708
  text: cancelText
3530
3709
  }
3531
3710
  ),
3532
- onSubmit && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3711
+ onSubmit && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3533
3712
  Button,
3534
3713
  {
3535
3714
  disabled: submitDisabled,
@@ -3539,7 +3718,7 @@ function Modal({
3539
3718
  type: "submit"
3540
3719
  }
3541
3720
  ),
3542
- isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { onClick: onClose, text: cancelText })
3721
+ isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Button, { onClick: onClose, text: cancelText })
3543
3722
  ] }) : null
3544
3723
  ] })
3545
3724
  ] })
@@ -3547,17 +3726,17 @@ function Modal({
3547
3726
  )
3548
3727
  ] });
3549
3728
  return visible && nodeReady && nodeRef.current ? import_react_dom2.default.createPortal(
3550
- onSubmit ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("form", { onSubmit: onSubmitForm, children: modalContent }) : modalContent,
3729
+ onSubmit ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("form", { onSubmit: onSubmitForm, children: modalContent }) : modalContent,
3551
3730
  nodeRef.current
3552
3731
  ) : null;
3553
3732
  }
3554
- var DefaultFocusTarget = (0, import_styled17.default)(UnstyledButton)`
3733
+ var DefaultFocusTarget = (0, import_styled18.default)(UnstyledButton)`
3555
3734
  position: absolute;
3556
3735
  top: -30px;
3557
3736
  width: 0;
3558
3737
  height: 0;
3559
3738
  `;
3560
- var ModalOverlay = import_styled17.default.div`
3739
+ var ModalOverlay = import_styled18.default.div`
3561
3740
  position: fixed;
3562
3741
  bottom: 0;
3563
3742
  left: 0;
@@ -3567,7 +3746,7 @@ var ModalOverlay = import_styled17.default.div`
3567
3746
  background: rgba(0, 0, 0, 0.5);
3568
3747
  backdrop-filter: blur(2px);
3569
3748
  `;
3570
- var ModalContainer = import_styled17.default.div`
3749
+ var ModalContainer = import_styled18.default.div`
3571
3750
  pointer-events: none;
3572
3751
  position: fixed;
3573
3752
  top: 0;
@@ -3585,14 +3764,14 @@ var ModalContainer = import_styled17.default.div`
3585
3764
  padding-top: ${standardContentInset.smPx}px;
3586
3765
  `;
3587
3766
  var contentTopMarginPx = 24;
3588
- var Description = import_styled17.default.div`
3767
+ var Description = import_styled18.default.div`
3589
3768
  color: ${({ theme }) => theme.mcNeutral};
3590
3769
  margin-top: 4px;
3591
3770
  & + * {
3592
3771
  margin-top: ${contentTopMarginPx}px;
3593
3772
  }
3594
3773
  `;
3595
- var ModalButtonRow = import_styled17.default.div`
3774
+ var ModalButtonRow = import_styled18.default.div`
3596
3775
  margin-top: 32px;
3597
3776
  ${bp.minSm(`display: flex;`)}
3598
3777
  gap: 10px;
@@ -3610,7 +3789,7 @@ var ModalButtonRow = import_styled17.default.div`
3610
3789
  `)}
3611
3790
  }
3612
3791
  `;
3613
- var ModalContent = import_styled17.default.div`
3792
+ var ModalContent = import_styled18.default.div`
3614
3793
  ${overflowAutoWithoutScrollbars}
3615
3794
  ${standardContentInset.smCSS}
3616
3795
  ${standardBorderRadius(16)}
@@ -3632,12 +3811,12 @@ var ModalContent = import_styled17.default.div`
3632
3811
  }
3633
3812
  }
3634
3813
  `;
3635
- var CloseButton = (0, import_styled17.default)(UnstyledButton)`
3814
+ var CloseButton = (0, import_styled18.default)(UnstyledButton)`
3636
3815
  ${standardFocusOutline}
3637
3816
  width: 24px;
3638
3817
  height: 24px;
3639
3818
  `;
3640
- var ModalContentInner = import_styled17.default.div`
3819
+ var ModalContentInner = import_styled18.default.div`
3641
3820
  ${(props) => props.ghost ? "" : "padding: 32px 24px 0;"}
3642
3821
  ${(props) => props.ghost ? "" : `${bp.sm(`
3643
3822
  padding-left: 10px;
@@ -3646,9 +3825,9 @@ var ModalContentInner = import_styled17.default.div`
3646
3825
  `;
3647
3826
 
3648
3827
  // src/components/Pill.tsx
3649
- var import_styled18 = __toESM(require("@emotion/styled"), 1);
3650
- var import_react24 = require("react");
3651
- var import_jsx_runtime22 = require("@emotion/react/jsx-runtime");
3828
+ var import_styled19 = __toESM(require("@emotion/styled"), 1);
3829
+ var import_react25 = require("react");
3830
+ var import_jsx_runtime23 = require("@emotion/react/jsx-runtime");
3652
3831
  function Pill({
3653
3832
  text,
3654
3833
  onDeleteMouseDown,
@@ -3667,8 +3846,8 @@ function Pill({
3667
3846
  onBlurTextInput = () => {
3668
3847
  }
3669
3848
  }) {
3670
- const textInputRef = (0, import_react24.useRef)(null);
3671
- (0, import_react24.useEffect)(() => {
3849
+ const textInputRef = (0, import_react25.useRef)(null);
3850
+ (0, import_react25.useEffect)(() => {
3672
3851
  if (isEditing && textInputRef.current) {
3673
3852
  textInputRef.current.focus();
3674
3853
  }
@@ -3687,7 +3866,7 @@ function Pill({
3687
3866
  }
3688
3867
  }
3689
3868
  }
3690
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3869
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3691
3870
  StyledPill,
3692
3871
  {
3693
3872
  hasIcon: Boolean(icon || loading || onDeleteMouseDown),
@@ -3699,7 +3878,7 @@ function Pill({
3699
3878
  }
3700
3879
  },
3701
3880
  children: [
3702
- isEditing ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3881
+ isEditing ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3703
3882
  PillInput,
3704
3883
  {
3705
3884
  value: text,
@@ -3708,14 +3887,14 @@ function Pill({
3708
3887
  onBlur: onBlurTextInput,
3709
3888
  ref: textInputRef
3710
3889
  }
3711
- ) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PillText, { children: text }),
3712
- (icon || loading || onDeleteMouseDown) && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3890
+ ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PillText, { children: text }),
3891
+ (icon || loading || onDeleteMouseDown) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3713
3892
  PillIconContainer,
3714
3893
  {
3715
3894
  hasIconInset: Boolean(icon && !loading && !onDeleteMouseDown),
3716
3895
  children: [
3717
- loading && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Loading, { size: 16.1, center: false, ml: 5 }),
3718
- !loading && onDeleteMouseDown && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3896
+ loading && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Loading, { size: 16.1, center: false, ml: 5 }),
3897
+ !loading && onDeleteMouseDown && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3719
3898
  UnstyledButton,
3720
3899
  {
3721
3900
  onMouseDown: handleOnDeleteMouseDown,
@@ -3726,10 +3905,10 @@ function Pill({
3726
3905
  padding: "10px",
3727
3906
  marginRight: "-10px"
3728
3907
  },
3729
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "DeleteIcon", width: 16.1 })
3908
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "DeleteIcon", width: 16.1 })
3730
3909
  }
3731
3910
  ),
3732
- !loading && icon && !onDeleteMouseDown && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: icon, width: 16.1, color: colors.white })
3911
+ !loading && icon && !onDeleteMouseDown && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: icon, width: 16.1, color: colors.white })
3733
3912
  ]
3734
3913
  }
3735
3914
  )
@@ -3737,7 +3916,7 @@ function Pill({
3737
3916
  }
3738
3917
  );
3739
3918
  }
3740
- var PillText = import_styled18.default.div`
3919
+ var PillText = import_styled19.default.div`
3741
3920
  /* For mobile ensure empty values don't prevent div from having height: */
3742
3921
  height: 1.2rem;
3743
3922
  min-width: 100px;
@@ -3747,7 +3926,7 @@ var PillText = import_styled18.default.div`
3747
3926
  overflow: hidden;
3748
3927
  font-weight: 600;
3749
3928
  `;
3750
- var StyledPill = import_styled18.default.div`
3929
+ var StyledPill = import_styled19.default.div`
3751
3930
  * + & {
3752
3931
  margin-top: 16px;
3753
3932
  }
@@ -3761,7 +3940,7 @@ var StyledPill = import_styled18.default.div`
3761
3940
  cursor: ${({ cursor }) => cursor};
3762
3941
  position: relative;
3763
3942
  `;
3764
- var PillIconContainer = import_styled18.default.div`
3943
+ var PillIconContainer = import_styled19.default.div`
3765
3944
  ${flexCenter}
3766
3945
  ${({ hasIconInset }) => hasIconInset ? `
3767
3946
  background-color: ${colors.blue43};
@@ -3772,7 +3951,7 @@ var PillIconContainer = import_styled18.default.div`
3772
3951
  margin-left: 12px;
3773
3952
  position: absolute;
3774
3953
  `;
3775
- var PillInput = import_styled18.default.input`
3954
+ var PillInput = import_styled19.default.input`
3776
3955
  background-color: transparent;
3777
3956
  border: none;
3778
3957
  outline: none;
@@ -3790,11 +3969,11 @@ var PillInput = import_styled18.default.input`
3790
3969
  `;
3791
3970
 
3792
3971
  // src/components/SecretContainer.tsx
3793
- var import_styled19 = __toESM(require("@emotion/styled"), 1);
3794
- var import_jsx_runtime23 = require("@emotion/react/jsx-runtime");
3972
+ var import_styled20 = __toESM(require("@emotion/styled"), 1);
3973
+ var import_jsx_runtime24 = require("@emotion/react/jsx-runtime");
3795
3974
  function SecretContainer(props) {
3796
- return props.secret ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StyledSecretContainer, { hasSecret: true, success: props.success, children: [
3797
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3975
+ return props.secret ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(StyledSecretContainer, { hasSecret: true, success: props.success, children: [
3976
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3798
3977
  "span",
3799
3978
  {
3800
3979
  style: {
@@ -3806,10 +3985,10 @@ function SecretContainer(props) {
3806
3985
  children: props.secret
3807
3986
  }
3808
3987
  ),
3809
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CopyToClipboardButton, { value: props.secret, isSm: true, ml: 4 })
3810
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledSecretContainer, { hasSecret: false, children: "There are no tokens associated with this account" });
3988
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CopyToClipboardButton, { value: props.secret, isSm: true, ml: 4 })
3989
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledSecretContainer, { hasSecret: false, children: "There are no tokens associated with this account" });
3811
3990
  }
3812
- var StyledSecretContainer = import_styled19.default.div`
3991
+ var StyledSecretContainer = import_styled20.default.div`
3813
3992
  background-color: ${({ theme, hasSecret, success }) => hasSecret ? success ? theme.success : theme.c05Neutral : theme.bg};
3814
3993
  ${standardBorderRadius(8)}
3815
3994
  padding: 18px 20px;
@@ -3821,14 +4000,14 @@ var StyledSecretContainer = import_styled19.default.div`
3821
4000
  `;
3822
4001
 
3823
4002
  // src/components/TextIconAligner.tsx
3824
- var import_jsx_runtime24 = require("@emotion/react/jsx-runtime");
4003
+ var import_jsx_runtime25 = require("@emotion/react/jsx-runtime");
3825
4004
  function TextIconAligner({
3826
4005
  text,
3827
4006
  rightIcon,
3828
4007
  leftIcon,
3829
4008
  onClick
3830
4009
  }) {
3831
- const leftIconNode = leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4010
+ const leftIconNode = leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3832
4011
  Icon,
3833
4012
  {
3834
4013
  name: leftIcon.name,
@@ -3837,7 +4016,7 @@ function TextIconAligner({
3837
4016
  color: leftIcon.color
3838
4017
  }
3839
4018
  ) : null;
3840
- const rightIconNode = rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4019
+ const rightIconNode = rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3841
4020
  Icon,
3842
4021
  {
3843
4022
  name: rightIcon.name,
@@ -3846,7 +4025,7 @@ function TextIconAligner({
3846
4025
  color: rightIcon.color
3847
4026
  }
3848
4027
  ) : null;
3849
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
4028
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3850
4029
  "span",
3851
4030
  {
3852
4031
  css: {
@@ -3876,6 +4055,7 @@ function TextIconAligner({
3876
4055
  CardPageFullWidth,
3877
4056
  CardPageRightContentInner,
3878
4057
  CardPageSubtitle,
4058
+ CodeBlock,
3879
4059
  Collapsible,
3880
4060
  CommandKey,
3881
4061
  CopyToClipboardButton,
@@ -3884,6 +4064,7 @@ function TextIconAligner({
3884
4064
  GradientCardHeader,
3885
4065
  Icon,
3886
4066
  IconContainer,
4067
+ InlineCode,
3887
4068
  LightTooltip,
3888
4069
  LightboxImage,
3889
4070
  LightsparkProvider,
@@ -3894,6 +4075,7 @@ function TextIconAligner({
3894
4075
  ProgressBar,
3895
4076
  SecretContainer,
3896
4077
  StyledButton,
4078
+ StyledCodeBlock,
3897
4079
  TextIconAligner,
3898
4080
  UnstyledButton
3899
4081
  });