@agg-market/ui 6.0.0 → 8.0.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.
Files changed (89) hide show
  1. package/README.md +17 -2
  2. package/dist/{chunk-G6YKGVQR.mjs → chunk-JE4MV5RL.mjs} +18 -60
  3. package/dist/{chunk-2ICOSP7N.mjs → chunk-KRCRD4AJ.mjs} +11 -14
  4. package/dist/{chunk-5ZKPBMRK.mjs → chunk-SBLIHCN2.mjs} +21 -24
  5. package/dist/{chunk-LMOJKJOY.mjs → chunk-TLFRGJ5B.mjs} +334 -217
  6. package/dist/chunk-WKY3IN52.mjs +4907 -0
  7. package/dist/events.js +3364 -2660
  8. package/dist/events.mjs +2 -5
  9. package/dist/index.js +2693 -1764
  10. package/dist/index.mjs +610 -38
  11. package/dist/modals.js +1356 -815
  12. package/dist/modals.mjs +2 -4
  13. package/dist/pages.js +3023 -2248
  14. package/dist/pages.mjs +4 -7
  15. package/dist/primitives.js +1072 -355
  16. package/dist/primitives.mjs +38 -30
  17. package/dist/styles.css +1 -1
  18. package/dist/tailwind.css +1 -1
  19. package/dist/trading.js +1153 -558
  20. package/dist/trading.mjs +2 -4
  21. package/dist/types/auth/connect-button-view/connect-button-view.constants.d.mts +31 -0
  22. package/dist/types/auth/connect-button-view/connect-button-view.constants.d.ts +31 -0
  23. package/dist/types/auth/connect-button-view/connect-button-view.types.d.mts +83 -0
  24. package/dist/types/auth/connect-button-view/connect-button-view.types.d.ts +83 -0
  25. package/dist/types/auth/connect-button-view/index.d.mts +7 -0
  26. package/dist/types/auth/connect-button-view/index.d.ts +7 -0
  27. package/dist/types/auth/index.d.mts +1 -1
  28. package/dist/types/auth/index.d.ts +1 -1
  29. package/dist/types/index.d.mts +1 -1
  30. package/dist/types/index.d.ts +1 -1
  31. package/dist/types/primitives/chart/chart-type-switch.d.mts +10 -0
  32. package/dist/types/primitives/chart/chart-type-switch.d.ts +10 -0
  33. package/dist/types/primitives/chart/index.d.mts +7 -1
  34. package/dist/types/primitives/chart/index.d.ts +7 -1
  35. package/dist/types/primitives/icon/index.d.mts +9 -1
  36. package/dist/types/primitives/icon/index.d.ts +9 -1
  37. package/dist/types/primitives/icon/registry.d.mts +32 -0
  38. package/dist/types/primitives/icon/registry.d.ts +32 -0
  39. package/dist/types/primitives/icon/svg/apple.d.mts +5 -0
  40. package/dist/types/primitives/icon/svg/apple.d.ts +5 -0
  41. package/dist/types/primitives/icon/svg/chart-candlestick.d.mts +5 -0
  42. package/dist/types/primitives/icon/svg/chart-candlestick.d.ts +5 -0
  43. package/dist/types/primitives/icon/svg/chart-line.d.mts +5 -0
  44. package/dist/types/primitives/icon/svg/chart-line.d.ts +5 -0
  45. package/dist/types/primitives/icon/svg/error-filled.d.mts +5 -0
  46. package/dist/types/primitives/icon/svg/error-filled.d.ts +5 -0
  47. package/dist/types/primitives/icon/svg/ethereum.d.mts +5 -0
  48. package/dist/types/primitives/icon/svg/ethereum.d.ts +5 -0
  49. package/dist/types/primitives/icon/svg/google.d.mts +5 -0
  50. package/dist/types/primitives/icon/svg/google.d.ts +5 -0
  51. package/dist/types/primitives/icon/svg/image.d.mts +5 -0
  52. package/dist/types/primitives/icon/svg/image.d.ts +5 -0
  53. package/dist/types/primitives/icon/svg/solana.d.mts +5 -0
  54. package/dist/types/primitives/icon/svg/solana.d.ts +5 -0
  55. package/dist/types/primitives/index.d.mts +2 -0
  56. package/dist/types/primitives/index.d.ts +2 -0
  57. package/dist/types/primitives/inline-alert/index.d.mts +16 -0
  58. package/dist/types/primitives/inline-alert/index.d.ts +16 -0
  59. package/dist/types/primitives/remote-image/index.d.mts +6 -0
  60. package/dist/types/primitives/remote-image/index.d.ts +6 -0
  61. package/dist/types/primitives/remote-image/remote-image.constants.d.mts +4 -0
  62. package/dist/types/primitives/remote-image/remote-image.constants.d.ts +4 -0
  63. package/dist/types/primitives/remote-image/remote-image.types.d.mts +16 -0
  64. package/dist/types/primitives/remote-image/remote-image.types.d.ts +16 -0
  65. package/dist/types/primitives/venue-logo/svg/logo-limitless.d.mts +5 -0
  66. package/dist/types/primitives/venue-logo/svg/logo-limitless.d.ts +5 -0
  67. package/dist/types/primitives/venue-logo/venue-logo.types.d.mts +1 -1
  68. package/dist/types/primitives/venue-logo/venue-logo.types.d.ts +1 -1
  69. package/dist/types/trading/types.d.mts +26 -26
  70. package/dist/types/trading/types.d.ts +26 -26
  71. package/package.json +3 -15
  72. package/dist/auth.d.mts +0 -1
  73. package/dist/auth.d.ts +0 -1
  74. package/dist/auth.js +0 -2290
  75. package/dist/auth.mjs +0 -8
  76. package/dist/chunk-ADGL6RFX.mjs +0 -214
  77. package/dist/chunk-CN7GI2RJ.mjs +0 -585
  78. package/dist/chunk-HI4EEDN5.mjs +0 -1880
  79. package/dist/chunk-INRG3D4M.mjs +0 -450
  80. package/dist/chunk-JE3Z52FD.mjs +0 -345
  81. package/dist/chunk-MHCHR65A.mjs +0 -165
  82. package/dist/chunk-PASXFYKQ.mjs +0 -81
  83. package/dist/chunk-UBBOLLOS.mjs +0 -999
  84. package/dist/types/auth/connect-button/connect-button.constants.d.mts +0 -10
  85. package/dist/types/auth/connect-button/connect-button.constants.d.ts +0 -10
  86. package/dist/types/auth/connect-button/connect-button.types.d.mts +0 -33
  87. package/dist/types/auth/connect-button/connect-button.types.d.ts +0 -33
  88. package/dist/types/auth/connect-button/index.d.mts +0 -7
  89. package/dist/types/auth/connect-button/index.d.ts +0 -7
package/dist/auth.mjs DELETED
@@ -1,8 +0,0 @@
1
- import {
2
- ConnectButton
3
- } from "./chunk-INRG3D4M.mjs";
4
- import "./chunk-PASXFYKQ.mjs";
5
- import "./chunk-HI4EEDN5.mjs";
6
- export {
7
- ConnectButton
8
- };
@@ -1,214 +0,0 @@
1
- import {
2
- AGG_ROOT_CLASS_NAME,
3
- CloseIcon,
4
- cn,
5
- getMotionClassName
6
- } from "./chunk-HI4EEDN5.mjs";
7
-
8
- // src/primitives/modal/index.tsx
9
- import * as Dialog from "@radix-ui/react-dialog";
10
- import { useSdkUiConfig, useLabels } from "@agg-market/hooks";
11
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
- var Modal = ({
13
- open,
14
- onOpenChange,
15
- children,
16
- "aria-label": _ariaLabel,
17
- "aria-labelledby": _ariaLabelledBy
18
- }) => {
19
- return /* @__PURE__ */ jsx(Dialog.Root, { open, onOpenChange, children });
20
- };
21
- var ModalContainer = ({
22
- children,
23
- maxWidth = "600px",
24
- classNames,
25
- "aria-label": ariaLabel,
26
- "aria-labelledby": ariaLabelledBy
27
- }) => {
28
- const { rootClassName, enableAnimations } = useSdkUiConfig();
29
- const overlayAnimationClassName = enableAnimations ? "motion-safe:data-[state=open]:animate-agg-modal-overlay-in motion-safe:data-[state=closed]:animate-agg-modal-overlay-out motion-reduce:animate-none" : void 0;
30
- const panelAnimationClassName = enableAnimations ? "motion-safe:data-[state=open]:animate-agg-modal-panel-in motion-safe:data-[state=closed]:animate-agg-modal-panel-out motion-reduce:animate-none" : void 0;
31
- return /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
32
- /* @__PURE__ */ jsx(
33
- Dialog.Overlay,
34
- {
35
- className: cn(
36
- "fixed inset-0 z-agg-overlay bg-agg-overlay",
37
- overlayAnimationClassName,
38
- classNames == null ? void 0 : classNames.overlay
39
- )
40
- }
41
- ),
42
- /* @__PURE__ */ jsx(
43
- Dialog.Content,
44
- {
45
- className: cn(
46
- "group/agg-modal",
47
- "fixed inset-0 z-agg-modal",
48
- "flex items-center justify-center p-4",
49
- "sm:p-5",
50
- classNames == null ? void 0 : classNames.content
51
- ),
52
- "aria-label": ariaLabel,
53
- "aria-labelledby": ariaLabelledBy,
54
- onCloseAutoFocus: (event) => {
55
- event.preventDefault();
56
- },
57
- children: /* @__PURE__ */ jsx(
58
- "div",
59
- {
60
- className: cn(
61
- AGG_ROOT_CLASS_NAME,
62
- rootClassName,
63
- "flex w-full max-h-[calc(100%-2rem)] flex-col font-agg-sans",
64
- "rounded-agg-2xl border border-agg-separator",
65
- "bg-agg-secondary text-agg-foreground shadow-agg-modal",
66
- "origin-bottom overflow-hidden will-change-transform",
67
- panelAnimationClassName,
68
- classNames == null ? void 0 : classNames.container
69
- ),
70
- "data-agg-animations": enableAnimations ? "true" : "false",
71
- style: { maxWidth },
72
- children
73
- }
74
- )
75
- }
76
- )
77
- ] });
78
- };
79
- Modal.Container = ModalContainer;
80
- var ModalHeader = ({
81
- title,
82
- subtitle,
83
- leftElement,
84
- rightElement,
85
- hideClose = false,
86
- closeIcon,
87
- classNames,
88
- children,
89
- hideBorder = false
90
- }) => {
91
- const { enableAnimations } = useSdkUiConfig();
92
- const labels = useLabels();
93
- const defaultCloseIcon = /* @__PURE__ */ jsx(CloseIcon, { className: "h-6 w-6" });
94
- const resolvedCloseIcon = closeIcon != null ? closeIcon : defaultCloseIcon;
95
- return /* @__PURE__ */ jsxs(
96
- "div",
97
- {
98
- className: cn(
99
- "group/agg-modal-header",
100
- "flex flex-col",
101
- "sticky top-0 z-20",
102
- "bg-agg-secondary",
103
- hideBorder ? "border-0" : "border-b border-agg-separator",
104
- subtitle ? "min-h-20" : "min-h-16",
105
- classNames == null ? void 0 : classNames.root
106
- ),
107
- children: [
108
- /* @__PURE__ */ jsxs(
109
- "div",
110
- {
111
- className: cn(
112
- "flex items-center justify-between",
113
- "px-4 py-4",
114
- "sm:px-8 sm:py-6",
115
- subtitle && "sm:py-4",
116
- children ? "pb-3 sm:pb-4" : void 0,
117
- classNames == null ? void 0 : classNames.container
118
- ),
119
- children: [
120
- leftElement ? /* @__PURE__ */ jsx(Fragment, { children: leftElement }) : null,
121
- /* @__PURE__ */ jsxs("div", { className: cn("max-w-[calc(100%-1rem)] flex-1", classNames == null ? void 0 : classNames.titleContainer), children: [
122
- /* @__PURE__ */ jsx(
123
- Dialog.Title,
124
- {
125
- className: cn(
126
- !title && "invisible",
127
- "flex items-center text-agg-lg font-agg-bold leading-agg-6",
128
- "sm:text-agg-2xl sm:leading-agg-8",
129
- "text-ellipsis overflow-hidden whitespace-nowrap",
130
- classNames == null ? void 0 : classNames.title
131
- ),
132
- children: title
133
- }
134
- ),
135
- subtitle ? /* @__PURE__ */ jsx(
136
- "span",
137
- {
138
- className: cn(
139
- "text-agg-sm leading-agg-4 text-agg-muted-foreground sm:leading-agg-5",
140
- classNames == null ? void 0 : classNames.subtitle
141
- ),
142
- children: subtitle
143
- }
144
- ) : null
145
- ] }),
146
- /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-6 items-center justify-end", children: [
147
- rightElement ? /* @__PURE__ */ jsx(Fragment, { children: rightElement }) : null,
148
- !hideClose && /* @__PURE__ */ jsx(
149
- Dialog.Close,
150
- {
151
- className: cn(
152
- "outline-0 flex items-center hover:cursor-pointer justify-center text-agg-foreground hover:text-agg-foreground/80",
153
- getMotionClassName(enableAnimations, "transition-colors"),
154
- classNames == null ? void 0 : classNames.close
155
- ),
156
- "aria-label": labels.common.close,
157
- children: resolvedCloseIcon
158
- }
159
- )
160
- ] })
161
- ]
162
- }
163
- ),
164
- children ? /* @__PURE__ */ jsx("div", { children }) : null
165
- ]
166
- }
167
- );
168
- };
169
- Modal.Header = ModalHeader;
170
- var ModalBody = ({ children, classNames }) => {
171
- return /* @__PURE__ */ jsx(
172
- "div",
173
- {
174
- className: cn(
175
- "group/agg-modal-body",
176
- "grow overflow-y-auto",
177
- "px-4 py-6",
178
- "sm:p-8",
179
- "bg-agg-secondary text-agg-foreground",
180
- classNames == null ? void 0 : classNames.root
181
- ),
182
- children
183
- }
184
- );
185
- };
186
- Modal.Body = ModalBody;
187
- var ModalFooter = ({
188
- children,
189
- classNames,
190
- hideBorder = false
191
- }) => {
192
- return /* @__PURE__ */ jsx(
193
- "div",
194
- {
195
- className: cn(
196
- "group/agg-modal-footer",
197
- "sticky bottom-0",
198
- "bg-agg-secondary",
199
- "flex h-[73px] w-full flex-row items-center justify-between gap-3",
200
- "border-agg-separator p-4",
201
- "sm:h-20 sm:justify-end sm:px-8 sm:py-5",
202
- hideBorder ? "border-0" : "border-t",
203
- classNames == null ? void 0 : classNames.root
204
- ),
205
- children
206
- }
207
- );
208
- };
209
- Modal.Footer = ModalFooter;
210
- Modal.displayName = "Modal";
211
-
212
- export {
213
- Modal
214
- };