Spaces:
Sleeping
Sleeping
File size: 5,940 Bytes
2303095 ca5ce6b 30a2a5d 2303095 30a2a5d 2a2105a 30a2a5d 2303095 ca5ce6b 2303095 30a2a5d 2303095 30a2a5d 2a2105a 30a2a5d 2a2105a 30a2a5d 2a2105a 30a2a5d 528f558 2a2105a 30a2a5d 2a2105a 30a2a5d 2a2105a 30a2a5d 528f558 30a2a5d 2a2105a 30a2a5d 528f558 30a2a5d 2a2105a 30a2a5d 2a2105a 30a2a5d 2a2105a 30a2a5d 528f558 2303095 ca5ce6b 2303095 528f558 9212968 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | @keyframes running-glow {
0% { box-shadow: 0 0 3px 0px #f0ad4e; }
50% { box-shadow: 0 0 10px 3px #f0ad4e; }
100% { box-shadow: 0 0 3px 0px #f0ad4e; }
}
@keyframes polling-glow {
0% { box-shadow: 0 0 3px 0px #007bff; }
50% { box-shadow: 0 0 10px 3px #007bff; }
100% { box-shadow: 0 0 3px 0px #007bff; }
}
.custom-node {
border: 2px solid #777; /* Increased border width */
border-radius: 8px;
background: #f9f9f9;
width: 350px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
transition: border-color 0.3s, box-shadow 0.3s; /* Smooth transition */
}
.custom-node.running {
border-color: #f0ad4e;
animation: running-glow 1.5s infinite;
}
.custom-node.polling {
border-color: #007bff;
animation: polling-glow 1.5s infinite;
}
.custom-node.success {
border-color: #5cb85c;
}
.custom-node.error {
border-color: #d9534f;
}
.custom-node-header {
background: #e0e0e0;
padding: 10px;
border-top-left-radius: 6px; /* Adjusted for new border width */
border-top-right-radius: 6px;
border-bottom: 1px solid #ccc;
}
.custom-node-header strong {
font-size: 14px;
display: block;
}
.custom-node-header p {
font-family: monospace;
font-size: 12px;
color: #333;
margin: 4px 0 0;
}
.custom-node-content {
padding: 0;
}
.custom-node-section {
padding: 10px;
border-bottom: 1px solid #eee;
position: relative;
}
.custom-node-section:last-child {
border-bottom: none;
}
.custom-node-section-title {
font-weight: bold;
font-size: 11px;
color: #888;
text-transform: uppercase;
margin-bottom: 10px;
}
.custom-node-input-row, .custom-node-output-row {
position: relative;
display: flex;
flex-direction: column;
margin-bottom: 12px;
padding-left: 15px; /* Make space for handles */
padding-right: 15px; /* Make space for handles */
}
.custom-node-input-row:last-child, .custom-node-output-row:last-child {
margin-bottom: 0;
}
.custom-node-input-row .react-flow__handle,
.custom-node-output-row .react-flow__handle {
width: 8px;
height: 8px;
top: 50%; /* Vertically center on the row */
transform: translateY(-50%);
}
.custom-node-input-row .react-flow__handle-left {
left: -4px;
}
.custom-node-output-row .react-flow__handle-right {
right: -4px;
}
.custom-node-input-row label, .custom-node-output-row label {
font-size: 12px;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
.custom-node-input-row.connected {
padding-top: 8px;
padding-bottom: 8px;
}
.custom-node-input-row.connected label {
color: #999;
margin-bottom: 0;
}
.custom-node-input-row.connected span {
font-size: 12px;
color: #007bff;
background-color: #e7f3ff;
padding: 8px;
border-radius: 4px;
border: 1px solid #b3d7ff;
margin-top: 5px;
}
.custom-node-output-row {
flex-direction: row;
justify-content: space-between;
align-items: center;
padding-top: 4px;
padding-bottom: 4px;
}
.custom-node-output-row label {
margin-bottom: 0;
}
.custom-node-input-row input[type="text"],
.custom-node-input-row input[type="number"],
.custom-node-input-row textarea,
.custom-node-input-row select {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
font-size: 12px;
}
.custom-node-input-row input[type="range"] {
width: 100%;
}
.checkbox-wrapper {
display: flex;
flex-direction: row;
align-items: center;
}
.checkbox-wrapper input {
margin-right: 8px;
}
.checkbox-wrapper label {
margin-bottom: 0;
font-weight: normal;
}
.file-input-wrapper {
display: flex;
align-items: center;
}
.file-input-wrapper input[type="file"] {
flex-grow: 1;
font-size: 11px;
}
.file-input-wrapper button {
padding: 6px 10px;
font-size: 12px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
margin-left: 8px;
}
.file-input-wrapper button:hover {
background-color: #0056b3;
}
.advanced-settings {
margin-top: 15px;
border-top: 1px solid #eee;
padding-top: 10px;
}
.advanced-settings-toggle {
background: none;
border: none;
cursor: pointer;
font-size: 12px;
font-weight: bold;
color: #007bff;
padding: 0;
margin-bottom: 10px;
}
.advanced-settings-toggle:hover {
text-decoration: underline;
}
.custom-node.running .custom-node-header {
background-color: #fff3cd;
color: #856404;
border-color: #ffeeba;
}
.custom-node.polling .custom-node-header {
background-color: #e7f3ff;
color: #004085;
border-color: #b8daff;
}
.custom-node.success .custom-node-header {
background-color: #d4edda;
color: #155724;
border-color: #c3e6cb;
}
.custom-node.error .custom-node-header {
background-color: #f8d7da;
color: #721c24;
border-color: #f5c6cb;
}
.node-status {
float: right;
font-size: 10px;
font-weight: bold;
text-transform: uppercase;
padding: 3px 6px;
border-radius: 3px;
background: rgba(0,0,0,0.1);
}
/* New styles for JSON path selector */
.json-path-selector {
min-width: 120px;
margin-right: 12px;
position: relative;
}
.json-path-select {
width: 100%;
font-size: 11px;
padding: 6px;
border: 1px solid #ccc;
border-radius: 4px;
background-color: #fff;
color: #555;
appearance: menulist; /* Show dropdown arrow */
}
/* Style for the JSON output row to make it more distinguishable */
.custom-node-output-row:has(.json-path-selector) {
margin-bottom: 8px;
border-bottom: 1px dashed #e0e0e0;
padding-bottom: 8px;
}
/* Highlight the JSON output row when hovered */
.custom-node-output-row:has(.json-path-selector):hover {
background-color: #f5f9ff;
}
/* Style for the label when using JSON selector */
.custom-node-output-row:has(.json-path-selector) label {
color: #0275d8;
font-size: 11px;
}
/* Make the output row with JSON selector look more organized */
.custom-node-output-row:has(.json-path-selector) {
display: grid;
grid-template-columns: auto minmax(120px, 1fr) 20px;
gap: 8px;
align-items: center;
} |