@cedros/trade-react 0.1.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/style.css ADDED
@@ -0,0 +1 @@
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.ct-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.ct-fixed{position:fixed}.ct-absolute{position:absolute}.ct-relative{position:relative}.ct-inset-0{top:0;right:0;bottom:0;left:0}.ct-inset-y-0{top:0;bottom:0}.ct-left-0{left:0}.ct-z-50{z-index:50}.ct-mx-auto{margin-left:auto;margin-right:auto}.ct-mb-1{margin-bottom:.25rem}.ct-mb-2{margin-bottom:.5rem}.ct-ml-2{margin-left:.5rem}.ct-mt-1{margin-top:.25rem}.ct-mt-2{margin-top:.5rem}.ct-inline-block{display:inline-block}.ct-flex{display:flex}.ct-inline-flex{display:inline-flex}.ct-grid{display:grid}.ct-hidden{display:none}.ct-h-3{height:.75rem}.ct-h-4{height:1rem}.ct-h-5{height:1.25rem}.ct-h-8{height:2rem}.ct-h-full{height:100%}.ct-max-h-48{max-height:12rem}.ct-max-h-64{max-height:16rem}.ct-max-h-\[80vh\]{max-height:80vh}.ct-min-h-0{min-height:0px}.ct-min-h-\[400px\]{min-height:400px}.ct-min-h-screen{min-height:100vh}.ct-w-16{width:4rem}.ct-w-20{width:5rem}.ct-w-3{width:.75rem}.ct-w-4{width:1rem}.ct-w-5{width:1.25rem}.ct-w-8{width:2rem}.ct-w-80{width:20rem}.ct-w-full{width:100%}.ct-min-w-0{min-width:0px}.ct-min-w-\[100px\]{min-width:100px}.ct-max-w-2xl{max-width:42rem}.ct-max-w-md{max-width:28rem}.ct-flex-1{flex:1 1 0%}.ct-flex-shrink-0{flex-shrink:0}@keyframes ct-pulse{50%{opacity:.5}}.ct-animate-pulse{animation:ct-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes ct-spin{to{transform:rotate(360deg)}}.ct-animate-spin{animation:ct-spin 1s linear infinite}.ct-cursor-pointer{cursor:pointer}.ct-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.ct-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.ct-flex-col{flex-direction:column}.ct-flex-wrap{flex-wrap:wrap}.ct-items-center{align-items:center}.ct-justify-center{justify-content:center}.ct-justify-between{justify-content:space-between}.ct-gap-1{gap:.25rem}.ct-gap-2{gap:.5rem}.ct-gap-3{gap:.75rem}.ct-gap-4{gap:1rem}.ct-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.ct-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.ct-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.ct-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.ct-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.ct-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.ct-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.ct-overflow-x-auto{overflow-x:auto}.ct-overflow-y-auto{overflow-y:auto}.ct-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ct-whitespace-nowrap{white-space:nowrap}.ct-rounded{border-radius:.25rem}.ct-rounded-cedros{border-radius:var(--cedros-radius, .5rem)}.ct-rounded-full{border-radius:9999px}.ct-border{border-width:1px}.ct-border-2{border-width:2px}.ct-border-y{border-top-width:1px;border-bottom-width:1px}.ct-border-b{border-bottom-width:1px}.ct-border-b-2{border-bottom-width:2px}.ct-border-r{border-right-width:1px}.ct-border-t{border-top-width:1px}.ct-border-\[hsl\(var\(--cedros-border\)\)\]{border-color:hsl(var(--cedros-border))}.ct-border-\[hsl\(var\(--cedros-primary\)\)\]{border-color:hsl(var(--cedros-primary))}.ct-border-current{border-color:currentColor}.ct-border-green-500\/30{border-color:#22c55e4d}.ct-border-red-500\/20{border-color:#ef444433}.ct-border-red-500\/30{border-color:#ef44444d}.ct-border-transparent{border-color:transparent}.ct-border-yellow-500\/20{border-color:#eab30833}.ct-border-t-transparent{border-top-color:transparent}.ct-bg-\[hsl\(var\(--cedros-background\)\)\]{background-color:hsl(var(--cedros-background))}.ct-bg-\[hsl\(var\(--cedros-muted\)\)\]{background-color:hsl(var(--cedros-muted))}.ct-bg-\[hsl\(var\(--cedros-primary\)\)\]{background-color:hsl(var(--cedros-primary))}.ct-bg-black\/50{background-color:#00000080}.ct-bg-blue-500\/10{background-color:#3b82f61a}.ct-bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.ct-bg-green-500\/10{background-color:#22c55e1a}.ct-bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.ct-bg-red-500\/10{background-color:#ef44441a}.ct-bg-yellow-500\/10{background-color:#eab3081a}.ct-p-1{padding:.25rem}.ct-p-2{padding:.5rem}.ct-p-3{padding:.75rem}.ct-p-4{padding:1rem}.ct-px-2{padding-left:.5rem;padding-right:.5rem}.ct-px-3{padding-left:.75rem;padding-right:.75rem}.ct-px-4{padding-left:1rem;padding-right:1rem}.ct-py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.ct-py-1{padding-top:.25rem;padding-bottom:.25rem}.ct-py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.ct-py-12{padding-top:3rem;padding-bottom:3rem}.ct-py-2{padding-top:.5rem;padding-bottom:.5rem}.ct-py-3{padding-top:.75rem;padding-bottom:.75rem}.ct-py-8{padding-top:2rem;padding-bottom:2rem}.ct-pb-2{padding-bottom:.5rem}.ct-text-left{text-align:left}.ct-text-center{text-align:center}.ct-text-right{text-align:right}.ct-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ct-text-2xl{font-size:1.5rem;line-height:2rem}.ct-text-base{font-size:1rem;line-height:1.5rem}.ct-text-lg{font-size:1.125rem;line-height:1.75rem}.ct-text-sm{font-size:.875rem;line-height:1.25rem}.ct-text-xl{font-size:1.25rem;line-height:1.75rem}.ct-text-xs{font-size:.75rem;line-height:1rem}.ct-font-bold{font-weight:700}.ct-font-medium{font-weight:500}.ct-font-semibold{font-weight:600}.ct-capitalize{text-transform:capitalize}.ct-leading-none{line-height:1}.ct-text-\[hsl\(var\(--cedros-foreground\)\)\]{color:hsl(var(--cedros-foreground))}.ct-text-\[hsl\(var\(--cedros-muted-foreground\)\)\]{color:hsl(var(--cedros-muted-foreground))}.ct-text-\[hsl\(var\(--cedros-primary\)\)\]{color:hsl(var(--cedros-primary))}.ct-text-\[hsl\(var\(--cedros-primary-foreground\)\)\]{color:hsl(var(--cedros-primary-foreground))}.ct-text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.ct-text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.ct-text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.ct-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.ct-text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.ct-placeholder-\[hsl\(var\(--cedros-muted-foreground\)\)\]::-moz-placeholder{color:hsl(var(--cedros-muted-foreground))}.ct-placeholder-\[hsl\(var\(--cedros-muted-foreground\)\)\]::placeholder{color:hsl(var(--cedros-muted-foreground))}.ct-shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ct-outline-none{outline:2px solid transparent;outline-offset:2px}.ct-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ct-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ct-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--cedros-primary: 210 100% 50%;--cedros-primary-foreground: 0 0% 100%;--cedros-background: 0 0% 100%;--cedros-foreground: 222 47% 11%;--cedros-muted: 210 40% 96%;--cedros-muted-foreground: 215 16% 47%;--cedros-border: 214 32% 91%;--cedros-input: 214 32% 91%;--cedros-ring: 210 100% 50%;--cedros-destructive: 0 72% 51%;--cedros-destructive-foreground: 0 0% 98%;--cedros-success: 142 71% 45%;--cedros-success-foreground: 0 0% 100%;--cedros-radius: .5rem}.cedros-dark{--cedros-background: 222 47% 6%;--cedros-foreground: 210 40% 98%;--cedros-muted: 217 33% 12%;--cedros-muted-foreground: 215 20% 65%;--cedros-border: 217 33% 18%;--cedros-input: 217 33% 18%}.cedros-trade{--ct-buy: #22c55e;--ct-sell: #ef4444;--ct-buy-bg: rgba(34, 197, 94, .1);--ct-sell-bg: rgba(239, 68, 68, .1)}.hover\:ct-bg-\[hsl\(var\(--cedros-border\)\)\]:hover{background-color:hsl(var(--cedros-border))}.hover\:ct-bg-\[hsl\(var\(--cedros-muted\)\)\]:hover{background-color:hsl(var(--cedros-muted))}.hover\:ct-bg-\[hsl\(var\(--cedros-primary\)\)\]:hover{background-color:hsl(var(--cedros-primary))}.hover\:ct-bg-green-500\/10:hover{background-color:#22c55e1a}.hover\:ct-bg-green-600:hover{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.hover\:ct-bg-red-500\/10:hover{background-color:#ef44441a}.hover\:ct-bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.hover\:ct-text-\[hsl\(var\(--cedros-foreground\)\)\]:hover{color:hsl(var(--cedros-foreground))}.hover\:ct-text-\[hsl\(var\(--cedros-primary-foreground\)\)\]:hover{color:hsl(var(--cedros-primary-foreground))}.hover\:ct-text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:ct-text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:ct-text-yellow-400:hover{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.hover\:ct-underline:hover{text-decoration-line:underline}.hover\:ct-opacity-90:hover{opacity:.9}.focus\:ct-ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ct-ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ct-ring-\[hsl\(var\(--cedros-ring\)\)\]:focus{--tw-ring-color: hsl(var(--cedros-ring))}.disabled\:ct-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:ct-opacity-50:disabled{opacity:.5}@media (min-width: 1024px){.lg\:ct-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 1280px){.xl\:ct-block{display:block}.xl\:ct-hidden{display:none}}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@cedros/trade-react",
3
+ "version": "0.1.0",
4
+ "description": "Solana trading UI components — swap, transfer, trading, portfolio",
5
+ "type": "module",
6
+ "main": "dist/index.cjs",
7
+ "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "style": "dist/trade-react.css",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs",
14
+ "types": "./dist/index.d.ts"
15
+ },
16
+ "./admin-only": {
17
+ "import": "./dist/admin-only.js",
18
+ "require": "./dist/admin-only.cjs",
19
+ "types": "./dist/admin-only.d.ts"
20
+ },
21
+ "./style.css": "./dist/trade-react.css"
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "peerDependencies": {
27
+ "react": "^18.0.0 || ^19.0.0",
28
+ "react-dom": "^18.0.0 || ^19.0.0"
29
+ },
30
+ "peerDependenciesMeta": {
31
+ "@cedros/login-react": {
32
+ "optional": true
33
+ },
34
+ "@solana/wallet-adapter-react": {
35
+ "optional": true
36
+ }
37
+ },
38
+ "dependencies": {
39
+ "lightweight-charts": "^4.2.0"
40
+ },
41
+ "license": "MIT"
42
+ }