the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add unique sandbox indexes and Notyf assets

+1094 -78
+20 -13
apps/api/src/schema/sandbox-files.ts
··· 1 1 import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; 2 - import { pgTable, text } from "drizzle-orm/pg-core"; 2 + import { pgTable, text, uniqueIndex } from "drizzle-orm/pg-core"; 3 3 import sandboxes from "./sandboxes"; 4 4 import files from "./files"; 5 5 6 - const sandboxFiles = pgTable("sandbox_files", { 7 - id: text("id") 8 - .primaryKey() 9 - .default(sql`xata_id()`), 10 - sandboxId: text("sandbox_id") 11 - .notNull() 12 - .references(() => sandboxes.id), 13 - fileId: text("file_id") 14 - .notNull() 15 - .references(() => files.id), 16 - path: text("path").notNull(), 17 - }); 6 + const sandboxFiles = pgTable( 7 + "sandbox_files", 8 + { 9 + id: text("id") 10 + .primaryKey() 11 + .default(sql`xata_id()`), 12 + sandboxId: text("sandbox_id") 13 + .notNull() 14 + .references(() => sandboxes.id), 15 + fileId: text("file_id") 16 + .notNull() 17 + .references(() => files.id), 18 + path: text("path").notNull(), 19 + }, 20 + (t) => [ 21 + uniqueIndex("unique_sandbox_file").on(t.sandboxId, t.fileId), 22 + uniqueIndex("unique_sandbox_file_path").on(t.sandboxId, t.path), 23 + ], 24 + ); 18 25 19 26 export type SelectSandboxFile = InferSelectModel<typeof sandboxFiles>; 20 27 export type InsertSandboxFile = InferInsertModel<typeof sandboxFiles>;
+20 -13
apps/api/src/schema/sandbox-volumes.ts
··· 1 1 import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; 2 - import { pgTable, text } from "drizzle-orm/pg-core"; 2 + import { pgTable, text, uniqueIndex } from "drizzle-orm/pg-core"; 3 3 import sandboxes from "./sandboxes"; 4 4 import volumes from "./volumes"; 5 5 6 - const sandboxVolumes = pgTable("sandbox_volumes", { 7 - id: text("id") 8 - .primaryKey() 9 - .default(sql`xata_id()`), 10 - sandboxId: text("sandbox_id") 11 - .notNull() 12 - .references(() => sandboxes.id), 13 - volumeId: text("volume_id") 14 - .notNull() 15 - .references(() => volumes.id), 16 - path: text("path").notNull(), 17 - }); 6 + const sandboxVolumes = pgTable( 7 + "sandbox_volumes", 8 + { 9 + id: text("id") 10 + .primaryKey() 11 + .default(sql`xata_id()`), 12 + sandboxId: text("sandbox_id") 13 + .notNull() 14 + .references(() => sandboxes.id), 15 + volumeId: text("volume_id") 16 + .notNull() 17 + .references(() => volumes.id), 18 + path: text("path").notNull(), 19 + }, 20 + (t) => [ 21 + uniqueIndex("unique_sandbox_volume").on(t.sandboxId, t.volumeId), 22 + uniqueIndex("unique_sandbox_volume_path").on(t.sandboxId, t.path), 23 + ], 24 + ); 18 25 19 26 export type SelectSandboxVolume = InferSelectModel<typeof sandboxVolumes>; 20 27 export type InsertSandboxVolume = InferInsertModel<typeof sandboxVolumes>;
+4
apps/cf-sandbox/drizzle/0015_yellow_lester.sql
··· 1 + CREATE UNIQUE INDEX "unique_sandbox_file" ON "sandbox_files" USING btree ("sandbox_id","file_id");--> statement-breakpoint 2 + CREATE UNIQUE INDEX "unique_sandbox_file_path" ON "sandbox_files" USING btree ("sandbox_id","path");--> statement-breakpoint 3 + CREATE UNIQUE INDEX "unique_sandbox_volume" ON "sandbox_volumes" USING btree ("sandbox_id","volume_id");--> statement-breakpoint 4 + CREATE UNIQUE INDEX "unique_sandbox_volume_path" ON "sandbox_volumes" USING btree ("sandbox_id","path");
+954
apps/cf-sandbox/drizzle/meta/0015_snapshot.json
··· 1 + { 2 + "id": "328548c9-a059-4546-9135-0d66f4d3f606", 3 + "prevId": "e3be2b18-e17a-43de-b948-e7bfc91860ba", 4 + "version": "7", 5 + "dialect": "postgresql", 6 + "tables": { 7 + "public.authorized_keys": { 8 + "name": "authorized_keys", 9 + "schema": "", 10 + "columns": { 11 + "id": { 12 + "name": "id", 13 + "type": "text", 14 + "primaryKey": true, 15 + "notNull": true, 16 + "default": "xata_id()" 17 + }, 18 + "sandbox_id": { 19 + "name": "sandbox_id", 20 + "type": "text", 21 + "primaryKey": false, 22 + "notNull": false 23 + }, 24 + "public_key": { 25 + "name": "public_key", 26 + "type": "text", 27 + "primaryKey": false, 28 + "notNull": true 29 + }, 30 + "created_at": { 31 + "name": "created_at", 32 + "type": "timestamp", 33 + "primaryKey": false, 34 + "notNull": true, 35 + "default": "now()" 36 + } 37 + }, 38 + "indexes": {}, 39 + "foreignKeys": { 40 + "authorized_keys_sandbox_id_sandboxes_id_fk": { 41 + "name": "authorized_keys_sandbox_id_sandboxes_id_fk", 42 + "tableFrom": "authorized_keys", 43 + "tableTo": "sandboxes", 44 + "columnsFrom": [ 45 + "sandbox_id" 46 + ], 47 + "columnsTo": [ 48 + "id" 49 + ], 50 + "onDelete": "no action", 51 + "onUpdate": "no action" 52 + } 53 + }, 54 + "compositePrimaryKeys": {}, 55 + "uniqueConstraints": {}, 56 + "policies": {}, 57 + "checkConstraints": {}, 58 + "isRLSEnabled": false 59 + }, 60 + "public.files": { 61 + "name": "files", 62 + "schema": "", 63 + "columns": { 64 + "id": { 65 + "name": "id", 66 + "type": "text", 67 + "primaryKey": true, 68 + "notNull": true, 69 + "default": "variable_id()" 70 + }, 71 + "content": { 72 + "name": "content", 73 + "type": "text", 74 + "primaryKey": false, 75 + "notNull": true 76 + }, 77 + "created_at": { 78 + "name": "created_at", 79 + "type": "timestamp", 80 + "primaryKey": false, 81 + "notNull": true, 82 + "default": "now()" 83 + }, 84 + "updated_at": { 85 + "name": "updated_at", 86 + "type": "timestamp", 87 + "primaryKey": false, 88 + "notNull": true, 89 + "default": "now()" 90 + } 91 + }, 92 + "indexes": {}, 93 + "foreignKeys": {}, 94 + "compositePrimaryKeys": {}, 95 + "uniqueConstraints": {}, 96 + "policies": {}, 97 + "checkConstraints": {}, 98 + "isRLSEnabled": false 99 + }, 100 + "public.sandbox_files": { 101 + "name": "sandbox_files", 102 + "schema": "", 103 + "columns": { 104 + "id": { 105 + "name": "id", 106 + "type": "text", 107 + "primaryKey": true, 108 + "notNull": true, 109 + "default": "xata_id()" 110 + }, 111 + "sandbox_id": { 112 + "name": "sandbox_id", 113 + "type": "text", 114 + "primaryKey": false, 115 + "notNull": true 116 + }, 117 + "file_id": { 118 + "name": "file_id", 119 + "type": "text", 120 + "primaryKey": false, 121 + "notNull": true 122 + }, 123 + "path": { 124 + "name": "path", 125 + "type": "text", 126 + "primaryKey": false, 127 + "notNull": true 128 + } 129 + }, 130 + "indexes": { 131 + "unique_sandbox_file": { 132 + "name": "unique_sandbox_file", 133 + "columns": [ 134 + { 135 + "expression": "sandbox_id", 136 + "isExpression": false, 137 + "asc": true, 138 + "nulls": "last" 139 + }, 140 + { 141 + "expression": "file_id", 142 + "isExpression": false, 143 + "asc": true, 144 + "nulls": "last" 145 + } 146 + ], 147 + "isUnique": true, 148 + "concurrently": false, 149 + "method": "btree", 150 + "with": {} 151 + }, 152 + "unique_sandbox_file_path": { 153 + "name": "unique_sandbox_file_path", 154 + "columns": [ 155 + { 156 + "expression": "sandbox_id", 157 + "isExpression": false, 158 + "asc": true, 159 + "nulls": "last" 160 + }, 161 + { 162 + "expression": "path", 163 + "isExpression": false, 164 + "asc": true, 165 + "nulls": "last" 166 + } 167 + ], 168 + "isUnique": true, 169 + "concurrently": false, 170 + "method": "btree", 171 + "with": {} 172 + } 173 + }, 174 + "foreignKeys": { 175 + "sandbox_files_sandbox_id_sandboxes_id_fk": { 176 + "name": "sandbox_files_sandbox_id_sandboxes_id_fk", 177 + "tableFrom": "sandbox_files", 178 + "tableTo": "sandboxes", 179 + "columnsFrom": [ 180 + "sandbox_id" 181 + ], 182 + "columnsTo": [ 183 + "id" 184 + ], 185 + "onDelete": "no action", 186 + "onUpdate": "no action" 187 + }, 188 + "sandbox_files_file_id_files_id_fk": { 189 + "name": "sandbox_files_file_id_files_id_fk", 190 + "tableFrom": "sandbox_files", 191 + "tableTo": "files", 192 + "columnsFrom": [ 193 + "file_id" 194 + ], 195 + "columnsTo": [ 196 + "id" 197 + ], 198 + "onDelete": "no action", 199 + "onUpdate": "no action" 200 + } 201 + }, 202 + "compositePrimaryKeys": {}, 203 + "uniqueConstraints": {}, 204 + "policies": {}, 205 + "checkConstraints": {}, 206 + "isRLSEnabled": false 207 + }, 208 + "public.sandbox_secrets": { 209 + "name": "sandbox_secrets", 210 + "schema": "", 211 + "columns": { 212 + "id": { 213 + "name": "id", 214 + "type": "text", 215 + "primaryKey": true, 216 + "notNull": true, 217 + "default": "xata_id()" 218 + }, 219 + "sandbox_id": { 220 + "name": "sandbox_id", 221 + "type": "text", 222 + "primaryKey": false, 223 + "notNull": true 224 + }, 225 + "secret_id": { 226 + "name": "secret_id", 227 + "type": "text", 228 + "primaryKey": false, 229 + "notNull": true 230 + } 231 + }, 232 + "indexes": { 233 + "unique_sandbox_secret": { 234 + "name": "unique_sandbox_secret", 235 + "columns": [ 236 + { 237 + "expression": "sandbox_id", 238 + "isExpression": false, 239 + "asc": true, 240 + "nulls": "last" 241 + }, 242 + { 243 + "expression": "secret_id", 244 + "isExpression": false, 245 + "asc": true, 246 + "nulls": "last" 247 + } 248 + ], 249 + "isUnique": true, 250 + "concurrently": false, 251 + "method": "btree", 252 + "with": {} 253 + } 254 + }, 255 + "foreignKeys": { 256 + "sandbox_secrets_sandbox_id_sandboxes_id_fk": { 257 + "name": "sandbox_secrets_sandbox_id_sandboxes_id_fk", 258 + "tableFrom": "sandbox_secrets", 259 + "tableTo": "sandboxes", 260 + "columnsFrom": [ 261 + "sandbox_id" 262 + ], 263 + "columnsTo": [ 264 + "id" 265 + ], 266 + "onDelete": "no action", 267 + "onUpdate": "no action" 268 + }, 269 + "sandbox_secrets_secret_id_secrets_id_fk": { 270 + "name": "sandbox_secrets_secret_id_secrets_id_fk", 271 + "tableFrom": "sandbox_secrets", 272 + "tableTo": "secrets", 273 + "columnsFrom": [ 274 + "secret_id" 275 + ], 276 + "columnsTo": [ 277 + "id" 278 + ], 279 + "onDelete": "no action", 280 + "onUpdate": "no action" 281 + } 282 + }, 283 + "compositePrimaryKeys": {}, 284 + "uniqueConstraints": {}, 285 + "policies": {}, 286 + "checkConstraints": {}, 287 + "isRLSEnabled": false 288 + }, 289 + "public.sandbox_variables": { 290 + "name": "sandbox_variables", 291 + "schema": "", 292 + "columns": { 293 + "id": { 294 + "name": "id", 295 + "type": "text", 296 + "primaryKey": true, 297 + "notNull": true, 298 + "default": "xata_id()" 299 + }, 300 + "sandbox_id": { 301 + "name": "sandbox_id", 302 + "type": "text", 303 + "primaryKey": false, 304 + "notNull": true 305 + }, 306 + "variable_id": { 307 + "name": "variable_id", 308 + "type": "text", 309 + "primaryKey": false, 310 + "notNull": true 311 + } 312 + }, 313 + "indexes": { 314 + "unique_sandbox_variables": { 315 + "name": "unique_sandbox_variables", 316 + "columns": [ 317 + { 318 + "expression": "sandbox_id", 319 + "isExpression": false, 320 + "asc": true, 321 + "nulls": "last" 322 + }, 323 + { 324 + "expression": "variable_id", 325 + "isExpression": false, 326 + "asc": true, 327 + "nulls": "last" 328 + } 329 + ], 330 + "isUnique": true, 331 + "concurrently": false, 332 + "method": "btree", 333 + "with": {} 334 + } 335 + }, 336 + "foreignKeys": { 337 + "sandbox_variables_sandbox_id_sandboxes_id_fk": { 338 + "name": "sandbox_variables_sandbox_id_sandboxes_id_fk", 339 + "tableFrom": "sandbox_variables", 340 + "tableTo": "sandboxes", 341 + "columnsFrom": [ 342 + "sandbox_id" 343 + ], 344 + "columnsTo": [ 345 + "id" 346 + ], 347 + "onDelete": "no action", 348 + "onUpdate": "no action" 349 + }, 350 + "sandbox_variables_variable_id_variables_id_fk": { 351 + "name": "sandbox_variables_variable_id_variables_id_fk", 352 + "tableFrom": "sandbox_variables", 353 + "tableTo": "variables", 354 + "columnsFrom": [ 355 + "variable_id" 356 + ], 357 + "columnsTo": [ 358 + "id" 359 + ], 360 + "onDelete": "no action", 361 + "onUpdate": "no action" 362 + } 363 + }, 364 + "compositePrimaryKeys": {}, 365 + "uniqueConstraints": {}, 366 + "policies": {}, 367 + "checkConstraints": {}, 368 + "isRLSEnabled": false 369 + }, 370 + "public.sandbox_volumes": { 371 + "name": "sandbox_volumes", 372 + "schema": "", 373 + "columns": { 374 + "id": { 375 + "name": "id", 376 + "type": "text", 377 + "primaryKey": true, 378 + "notNull": true, 379 + "default": "xata_id()" 380 + }, 381 + "sandbox_id": { 382 + "name": "sandbox_id", 383 + "type": "text", 384 + "primaryKey": false, 385 + "notNull": true 386 + }, 387 + "volume_id": { 388 + "name": "volume_id", 389 + "type": "text", 390 + "primaryKey": false, 391 + "notNull": true 392 + }, 393 + "path": { 394 + "name": "path", 395 + "type": "text", 396 + "primaryKey": false, 397 + "notNull": true 398 + } 399 + }, 400 + "indexes": { 401 + "unique_sandbox_volume": { 402 + "name": "unique_sandbox_volume", 403 + "columns": [ 404 + { 405 + "expression": "sandbox_id", 406 + "isExpression": false, 407 + "asc": true, 408 + "nulls": "last" 409 + }, 410 + { 411 + "expression": "volume_id", 412 + "isExpression": false, 413 + "asc": true, 414 + "nulls": "last" 415 + } 416 + ], 417 + "isUnique": true, 418 + "concurrently": false, 419 + "method": "btree", 420 + "with": {} 421 + }, 422 + "unique_sandbox_volume_path": { 423 + "name": "unique_sandbox_volume_path", 424 + "columns": [ 425 + { 426 + "expression": "sandbox_id", 427 + "isExpression": false, 428 + "asc": true, 429 + "nulls": "last" 430 + }, 431 + { 432 + "expression": "path", 433 + "isExpression": false, 434 + "asc": true, 435 + "nulls": "last" 436 + } 437 + ], 438 + "isUnique": true, 439 + "concurrently": false, 440 + "method": "btree", 441 + "with": {} 442 + } 443 + }, 444 + "foreignKeys": { 445 + "sandbox_volumes_sandbox_id_sandboxes_id_fk": { 446 + "name": "sandbox_volumes_sandbox_id_sandboxes_id_fk", 447 + "tableFrom": "sandbox_volumes", 448 + "tableTo": "sandboxes", 449 + "columnsFrom": [ 450 + "sandbox_id" 451 + ], 452 + "columnsTo": [ 453 + "id" 454 + ], 455 + "onDelete": "no action", 456 + "onUpdate": "no action" 457 + }, 458 + "sandbox_volumes_volume_id_volumes_id_fk": { 459 + "name": "sandbox_volumes_volume_id_volumes_id_fk", 460 + "tableFrom": "sandbox_volumes", 461 + "tableTo": "volumes", 462 + "columnsFrom": [ 463 + "volume_id" 464 + ], 465 + "columnsTo": [ 466 + "id" 467 + ], 468 + "onDelete": "no action", 469 + "onUpdate": "no action" 470 + } 471 + }, 472 + "compositePrimaryKeys": {}, 473 + "uniqueConstraints": {}, 474 + "policies": {}, 475 + "checkConstraints": {}, 476 + "isRLSEnabled": false 477 + }, 478 + "public.sandboxes": { 479 + "name": "sandboxes", 480 + "schema": "", 481 + "columns": { 482 + "id": { 483 + "name": "id", 484 + "type": "text", 485 + "primaryKey": true, 486 + "notNull": true, 487 + "default": "sandbox_id()" 488 + }, 489 + "base": { 490 + "name": "base", 491 + "type": "text", 492 + "primaryKey": false, 493 + "notNull": false 494 + }, 495 + "name": { 496 + "name": "name", 497 + "type": "text", 498 + "primaryKey": false, 499 + "notNull": true 500 + }, 501 + "display_name": { 502 + "name": "display_name", 503 + "type": "text", 504 + "primaryKey": false, 505 + "notNull": false 506 + }, 507 + "uri": { 508 + "name": "uri", 509 + "type": "text", 510 + "primaryKey": false, 511 + "notNull": false 512 + }, 513 + "cid": { 514 + "name": "cid", 515 + "type": "text", 516 + "primaryKey": false, 517 + "notNull": false 518 + }, 519 + "repo": { 520 + "name": "repo", 521 + "type": "text", 522 + "primaryKey": false, 523 + "notNull": false 524 + }, 525 + "provider": { 526 + "name": "provider", 527 + "type": "text", 528 + "primaryKey": false, 529 + "notNull": true, 530 + "default": "'cloudflare'" 531 + }, 532 + "description": { 533 + "name": "description", 534 + "type": "text", 535 + "primaryKey": false, 536 + "notNull": false 537 + }, 538 + "logo": { 539 + "name": "logo", 540 + "type": "text", 541 + "primaryKey": false, 542 + "notNull": false 543 + }, 544 + "readme": { 545 + "name": "readme", 546 + "type": "text", 547 + "primaryKey": false, 548 + "notNull": false 549 + }, 550 + "public_key": { 551 + "name": "public_key", 552 + "type": "text", 553 + "primaryKey": false, 554 + "notNull": true 555 + }, 556 + "user_id": { 557 + "name": "user_id", 558 + "type": "text", 559 + "primaryKey": false, 560 + "notNull": false 561 + }, 562 + "instance_type": { 563 + "name": "instance_type", 564 + "type": "text", 565 + "primaryKey": false, 566 + "notNull": false 567 + }, 568 + "vcpus": { 569 + "name": "vcpus", 570 + "type": "integer", 571 + "primaryKey": false, 572 + "notNull": false 573 + }, 574 + "memory": { 575 + "name": "memory", 576 + "type": "integer", 577 + "primaryKey": false, 578 + "notNull": false 579 + }, 580 + "disk": { 581 + "name": "disk", 582 + "type": "integer", 583 + "primaryKey": false, 584 + "notNull": false 585 + }, 586 + "status": { 587 + "name": "status", 588 + "type": "text", 589 + "primaryKey": false, 590 + "notNull": true 591 + }, 592 + "keep_alive": { 593 + "name": "keep_alive", 594 + "type": "boolean", 595 + "primaryKey": false, 596 + "notNull": true, 597 + "default": false 598 + }, 599 + "sleep_after": { 600 + "name": "sleep_after", 601 + "type": "text", 602 + "primaryKey": false, 603 + "notNull": false 604 + }, 605 + "sandbox_id": { 606 + "name": "sandbox_id", 607 + "type": "text", 608 + "primaryKey": false, 609 + "notNull": false 610 + }, 611 + "installs": { 612 + "name": "installs", 613 + "type": "integer", 614 + "primaryKey": false, 615 + "notNull": true, 616 + "default": 0 617 + }, 618 + "started_at": { 619 + "name": "started_at", 620 + "type": "timestamp", 621 + "primaryKey": false, 622 + "notNull": false 623 + }, 624 + "created_at": { 625 + "name": "created_at", 626 + "type": "timestamp", 627 + "primaryKey": false, 628 + "notNull": true, 629 + "default": "now()" 630 + }, 631 + "updated_at": { 632 + "name": "updated_at", 633 + "type": "timestamp", 634 + "primaryKey": false, 635 + "notNull": true, 636 + "default": "now()" 637 + } 638 + }, 639 + "indexes": {}, 640 + "foreignKeys": { 641 + "sandboxes_user_id_users_id_fk": { 642 + "name": "sandboxes_user_id_users_id_fk", 643 + "tableFrom": "sandboxes", 644 + "tableTo": "users", 645 + "columnsFrom": [ 646 + "user_id" 647 + ], 648 + "columnsTo": [ 649 + "id" 650 + ], 651 + "onDelete": "no action", 652 + "onUpdate": "no action" 653 + } 654 + }, 655 + "compositePrimaryKeys": {}, 656 + "uniqueConstraints": { 657 + "sandboxes_name_unique": { 658 + "name": "sandboxes_name_unique", 659 + "nullsNotDistinct": false, 660 + "columns": [ 661 + "name" 662 + ] 663 + }, 664 + "sandboxes_uri_unique": { 665 + "name": "sandboxes_uri_unique", 666 + "nullsNotDistinct": false, 667 + "columns": [ 668 + "uri" 669 + ] 670 + }, 671 + "sandboxes_cid_unique": { 672 + "name": "sandboxes_cid_unique", 673 + "nullsNotDistinct": false, 674 + "columns": [ 675 + "cid" 676 + ] 677 + } 678 + }, 679 + "policies": {}, 680 + "checkConstraints": {}, 681 + "isRLSEnabled": false 682 + }, 683 + "public.secrets": { 684 + "name": "secrets", 685 + "schema": "", 686 + "columns": { 687 + "id": { 688 + "name": "id", 689 + "type": "text", 690 + "primaryKey": true, 691 + "notNull": true, 692 + "default": "secret_id()" 693 + }, 694 + "name": { 695 + "name": "name", 696 + "type": "text", 697 + "primaryKey": false, 698 + "notNull": true 699 + }, 700 + "value": { 701 + "name": "value", 702 + "type": "text", 703 + "primaryKey": false, 704 + "notNull": true 705 + }, 706 + "created_at": { 707 + "name": "created_at", 708 + "type": "timestamp", 709 + "primaryKey": false, 710 + "notNull": true, 711 + "default": "now()" 712 + } 713 + }, 714 + "indexes": {}, 715 + "foreignKeys": {}, 716 + "compositePrimaryKeys": {}, 717 + "uniqueConstraints": {}, 718 + "policies": {}, 719 + "checkConstraints": {}, 720 + "isRLSEnabled": false 721 + }, 722 + "public.snapshots": { 723 + "name": "snapshots", 724 + "schema": "", 725 + "columns": { 726 + "id": { 727 + "name": "id", 728 + "type": "text", 729 + "primaryKey": true, 730 + "notNull": true, 731 + "default": "snapshot_id()" 732 + }, 733 + "slug": { 734 + "name": "slug", 735 + "type": "text", 736 + "primaryKey": false, 737 + "notNull": true 738 + }, 739 + "created_at": { 740 + "name": "created_at", 741 + "type": "timestamp", 742 + "primaryKey": false, 743 + "notNull": true, 744 + "default": "now()" 745 + } 746 + }, 747 + "indexes": {}, 748 + "foreignKeys": {}, 749 + "compositePrimaryKeys": {}, 750 + "uniqueConstraints": { 751 + "snapshots_slug_unique": { 752 + "name": "snapshots_slug_unique", 753 + "nullsNotDistinct": false, 754 + "columns": [ 755 + "slug" 756 + ] 757 + } 758 + }, 759 + "policies": {}, 760 + "checkConstraints": {}, 761 + "isRLSEnabled": false 762 + }, 763 + "public.users": { 764 + "name": "users", 765 + "schema": "", 766 + "columns": { 767 + "id": { 768 + "name": "id", 769 + "type": "text", 770 + "primaryKey": true, 771 + "notNull": true, 772 + "default": "xata_id()" 773 + }, 774 + "did": { 775 + "name": "did", 776 + "type": "text", 777 + "primaryKey": false, 778 + "notNull": true 779 + }, 780 + "display_name": { 781 + "name": "display_name", 782 + "type": "text", 783 + "primaryKey": false, 784 + "notNull": false 785 + }, 786 + "handle": { 787 + "name": "handle", 788 + "type": "text", 789 + "primaryKey": false, 790 + "notNull": true 791 + }, 792 + "avatar": { 793 + "name": "avatar", 794 + "type": "text", 795 + "primaryKey": false, 796 + "notNull": false 797 + }, 798 + "created_at": { 799 + "name": "created_at", 800 + "type": "timestamp", 801 + "primaryKey": false, 802 + "notNull": true, 803 + "default": "now()" 804 + }, 805 + "updated_at": { 806 + "name": "updated_at", 807 + "type": "timestamp", 808 + "primaryKey": false, 809 + "notNull": true, 810 + "default": "now()" 811 + } 812 + }, 813 + "indexes": {}, 814 + "foreignKeys": {}, 815 + "compositePrimaryKeys": {}, 816 + "uniqueConstraints": { 817 + "users_did_unique": { 818 + "name": "users_did_unique", 819 + "nullsNotDistinct": false, 820 + "columns": [ 821 + "did" 822 + ] 823 + }, 824 + "users_handle_unique": { 825 + "name": "users_handle_unique", 826 + "nullsNotDistinct": false, 827 + "columns": [ 828 + "handle" 829 + ] 830 + } 831 + }, 832 + "policies": {}, 833 + "checkConstraints": {}, 834 + "isRLSEnabled": false 835 + }, 836 + "public.variables": { 837 + "name": "variables", 838 + "schema": "", 839 + "columns": { 840 + "id": { 841 + "name": "id", 842 + "type": "text", 843 + "primaryKey": true, 844 + "notNull": true, 845 + "default": "variable_id()" 846 + }, 847 + "name": { 848 + "name": "name", 849 + "type": "text", 850 + "primaryKey": false, 851 + "notNull": true 852 + }, 853 + "value": { 854 + "name": "value", 855 + "type": "text", 856 + "primaryKey": false, 857 + "notNull": true 858 + }, 859 + "created_at": { 860 + "name": "created_at", 861 + "type": "timestamp", 862 + "primaryKey": false, 863 + "notNull": true, 864 + "default": "now()" 865 + }, 866 + "updated_at": { 867 + "name": "updated_at", 868 + "type": "timestamp", 869 + "primaryKey": false, 870 + "notNull": true, 871 + "default": "now()" 872 + } 873 + }, 874 + "indexes": {}, 875 + "foreignKeys": {}, 876 + "compositePrimaryKeys": {}, 877 + "uniqueConstraints": {}, 878 + "policies": {}, 879 + "checkConstraints": {}, 880 + "isRLSEnabled": false 881 + }, 882 + "public.volumes": { 883 + "name": "volumes", 884 + "schema": "", 885 + "columns": { 886 + "id": { 887 + "name": "id", 888 + "type": "text", 889 + "primaryKey": true, 890 + "notNull": true, 891 + "default": "volume_id()" 892 + }, 893 + "slug": { 894 + "name": "slug", 895 + "type": "text", 896 + "primaryKey": false, 897 + "notNull": true 898 + }, 899 + "size": { 900 + "name": "size", 901 + "type": "integer", 902 + "primaryKey": false, 903 + "notNull": true 904 + }, 905 + "size_unit": { 906 + "name": "size_unit", 907 + "type": "text", 908 + "primaryKey": false, 909 + "notNull": true 910 + }, 911 + "created_at": { 912 + "name": "created_at", 913 + "type": "timestamp", 914 + "primaryKey": false, 915 + "notNull": true, 916 + "default": "now()" 917 + }, 918 + "updated_at": { 919 + "name": "updated_at", 920 + "type": "timestamp", 921 + "primaryKey": false, 922 + "notNull": true, 923 + "default": "now()" 924 + } 925 + }, 926 + "indexes": {}, 927 + "foreignKeys": {}, 928 + "compositePrimaryKeys": {}, 929 + "uniqueConstraints": { 930 + "volumes_slug_unique": { 931 + "name": "volumes_slug_unique", 932 + "nullsNotDistinct": false, 933 + "columns": [ 934 + "slug" 935 + ] 936 + } 937 + }, 938 + "policies": {}, 939 + "checkConstraints": {}, 940 + "isRLSEnabled": false 941 + } 942 + }, 943 + "enums": {}, 944 + "schemas": {}, 945 + "sequences": {}, 946 + "roles": {}, 947 + "policies": {}, 948 + "views": {}, 949 + "_meta": { 950 + "columns": {}, 951 + "schemas": {}, 952 + "tables": {} 953 + } 954 + }
+7
apps/cf-sandbox/drizzle/meta/_journal.json
··· 106 106 "when": 1772772046957, 107 107 "tag": "0014_wakeful_kingpin", 108 108 "breakpoints": true 109 + }, 110 + { 111 + "idx": 15, 112 + "version": "7", 113 + "when": 1772855509416, 114 + "tag": "0015_yellow_lester", 115 + "breakpoints": true 109 116 } 110 117 ] 111 118 }
+20 -13
apps/cf-sandbox/src/schema/sandbox-files.ts
··· 1 1 import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; 2 - import { pgTable, text } from "drizzle-orm/pg-core"; 2 + import { pgTable, text, uniqueIndex } from "drizzle-orm/pg-core"; 3 3 import sandboxes from "./sandboxes"; 4 4 import files from "./files"; 5 5 6 - const sandboxFiles = pgTable("sandbox_files", { 7 - id: text("id") 8 - .primaryKey() 9 - .default(sql`xata_id()`), 10 - sandboxId: text("sandbox_id") 11 - .notNull() 12 - .references(() => sandboxes.id), 13 - fileId: text("file_id") 14 - .notNull() 15 - .references(() => files.id), 16 - path: text("path").notNull(), 17 - }); 6 + const sandboxFiles = pgTable( 7 + "sandbox_files", 8 + { 9 + id: text("id") 10 + .primaryKey() 11 + .default(sql`xata_id()`), 12 + sandboxId: text("sandbox_id") 13 + .notNull() 14 + .references(() => sandboxes.id), 15 + fileId: text("file_id") 16 + .notNull() 17 + .references(() => files.id), 18 + path: text("path").notNull(), 19 + }, 20 + (t) => [ 21 + uniqueIndex("unique_sandbox_file").on(t.sandboxId, t.fileId), 22 + uniqueIndex("unique_sandbox_file_path").on(t.sandboxId, t.path), 23 + ], 24 + ); 18 25 19 26 export type SelectSandboxFile = InferSelectModel<typeof sandboxFiles>; 20 27 export type InsertSandboxFile = InferInsertModel<typeof sandboxFiles>;
+20 -13
apps/cf-sandbox/src/schema/sandbox-volumes.ts
··· 1 1 import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; 2 - import { pgTable, text } from "drizzle-orm/pg-core"; 2 + import { pgTable, text, uniqueIndex } from "drizzle-orm/pg-core"; 3 3 import sandboxes from "./sandboxes"; 4 4 import volumes from "./volumes"; 5 5 6 - const sandboxVolumes = pgTable("sandbox_volumes", { 7 - id: text("id") 8 - .primaryKey() 9 - .default(sql`xata_id()`), 10 - sandboxId: text("sandbox_id") 11 - .notNull() 12 - .references(() => sandboxes.id), 13 - volumeId: text("volume_id") 14 - .notNull() 15 - .references(() => volumes.id), 16 - path: text("path").notNull(), 17 - }); 6 + const sandboxVolumes = pgTable( 7 + "sandbox_volumes", 8 + { 9 + id: text("id") 10 + .primaryKey() 11 + .default(sql`xata_id()`), 12 + sandboxId: text("sandbox_id") 13 + .notNull() 14 + .references(() => sandboxes.id), 15 + volumeId: text("volume_id") 16 + .notNull() 17 + .references(() => volumes.id), 18 + path: text("path").notNull(), 19 + }, 20 + (t) => [ 21 + uniqueIndex("unique_sandbox_volume").on(t.sandboxId, t.volumeId), 22 + uniqueIndex("unique_sandbox_volume_path").on(t.sandboxId, t.path), 23 + ], 24 + ); 18 25 19 26 export type SelectSandboxVolume = InferSelectModel<typeof sandboxVolumes>; 20 27 export type InsertSandboxVolume = InferInsertModel<typeof sandboxVolumes>;
+20 -13
apps/sandbox/src/schema/sandbox-files.ts
··· 1 1 import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; 2 - import { pgTable, text } from "drizzle-orm/pg-core"; 2 + import { pgTable, text, uniqueIndex } from "drizzle-orm/pg-core"; 3 3 import sandboxes from "./sandboxes.ts"; 4 4 import files from "./files.ts"; 5 5 6 - const sandboxFiles = pgTable("sandbox_files", { 7 - id: text("id") 8 - .primaryKey() 9 - .default(sql`xata_id()`), 10 - sandboxId: text("sandbox_id") 11 - .notNull() 12 - .references(() => sandboxes.id), 13 - fileId: text("file_id") 14 - .notNull() 15 - .references(() => files.id), 16 - path: text("path").notNull(), 17 - }); 6 + const sandboxFiles = pgTable( 7 + "sandbox_files", 8 + { 9 + id: text("id") 10 + .primaryKey() 11 + .default(sql`xata_id()`), 12 + sandboxId: text("sandbox_id") 13 + .notNull() 14 + .references(() => sandboxes.id), 15 + fileId: text("file_id") 16 + .notNull() 17 + .references(() => files.id), 18 + path: text("path").notNull(), 19 + }, 20 + (t) => [ 21 + uniqueIndex("unique_sandbox_file").on(t.sandboxId, t.fileId), 22 + uniqueIndex("unique_sandbox_file_path").on(t.sandboxId, t.path), 23 + ], 24 + ); 18 25 19 26 export type SelectSandboxFile = InferSelectModel<typeof sandboxFiles>; 20 27 export type InsertSandboxFile = InferInsertModel<typeof sandboxFiles>;
+20 -13
apps/sandbox/src/schema/sandbox-volumes.ts
··· 1 1 import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; 2 - import { pgTable, text } from "drizzle-orm/pg-core"; 2 + import { pgTable, text, uniqueIndex } from "drizzle-orm/pg-core"; 3 3 import sandboxes from "./sandboxes.ts"; 4 4 import volumes from "./volumes.ts"; 5 5 6 - const sandboxVolumes = pgTable("sandbox_volumes", { 7 - id: text("id") 8 - .primaryKey() 9 - .default(sql`xata_id()`), 10 - sandboxId: text("sandbox_id") 11 - .notNull() 12 - .references(() => sandboxes.id), 13 - volumeId: text("volume_id") 14 - .notNull() 15 - .references(() => volumes.id), 16 - path: text("path").notNull(), 17 - }); 6 + const sandboxVolumes = pgTable( 7 + "sandbox_volumes", 8 + { 9 + id: text("id") 10 + .primaryKey() 11 + .default(sql`xata_id()`), 12 + sandboxId: text("sandbox_id") 13 + .notNull() 14 + .references(() => sandboxes.id), 15 + volumeId: text("volume_id") 16 + .notNull() 17 + .references(() => volumes.id), 18 + path: text("path").notNull(), 19 + }, 20 + (t) => [ 21 + uniqueIndex("unique_sandbox_volume").on(t.sandboxId, t.volumeId), 22 + uniqueIndex("unique_sandbox_volume_path").on(t.sandboxId, t.path), 23 + ], 24 + ); 18 25 19 26 export type SelectSandboxVolume = InferSelectModel<typeof sandboxVolumes>; 20 27 export type InsertSandboxVolume = InferInsertModel<typeof sandboxVolumes>;
+3
apps/web/bun.lock
··· 26 26 "jotai": "^2.17.1", 27 27 "libsodium-wrappers": "^0.8.2", 28 28 "lodash": "^4.17.23", 29 + "notyf": "^3.10.0", 29 30 "numeral": "^2.0.6", 30 31 "ramda": "^0.32.0", 31 32 "react": "^19.2.0", ··· 710 711 "node-releases": ["node-releases@2.0.27", "", {}, "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA=="], 711 712 712 713 "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], 714 + 715 + "notyf": ["notyf@3.10.0", "", {}, "sha512-Mtnp+0qiZxgrH+TzVlzhWyZceHdAZ/UWK0/ju9U0HQeDpap1mZ8cC7H5wSI5mwgni6yeAjaxsTw0sbMK+aSuHw=="], 713 716 714 717 "nth-check": ["nth-check@2.1.1", "", { "dependencies": { "boolbase": "^1.0.0" } }, "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w=="], 715 718
+2
apps/web/index.html
··· 3 3 <head> 4 4 <meta charset="UTF-8" /> 5 5 <link rel="icon" type="image/png]" href="/favicon.png" /> 6 + <link rel="stylesheet" href="/notyf.min.css" /> 6 7 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 7 8 <title>Pocketenv</title> 8 9 <script> ··· 22 23 <body> 23 24 <div id="root"></div> 24 25 <script type="module" src="/src/main.tsx"></script> 26 + <script type="module" src="/notyf.min.js"></script> 25 27 </body> 26 28 </html>
+1
apps/web/package.json
··· 32 32 "jotai": "^2.17.1", 33 33 "libsodium-wrappers": "^0.8.2", 34 34 "lodash": "^4.17.23", 35 + "notyf": "^3.10.0", 35 36 "numeral": "^2.0.6", 36 37 "ramda": "^0.32.0", 37 38 "react": "^19.2.0",
+1
apps/web/public/notyf.min.css
··· 1 + @-webkit-keyframes notyf-fadeinup{0%{opacity:0;transform:translateY(25%)}to{opacity:1;transform:translateY(0)}}@keyframes notyf-fadeinup{0%{opacity:0;transform:translateY(25%)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes notyf-fadeinleft{0%{opacity:0;transform:translateX(25%)}to{opacity:1;transform:translateX(0)}}@keyframes notyf-fadeinleft{0%{opacity:0;transform:translateX(25%)}to{opacity:1;transform:translateX(0)}}@-webkit-keyframes notyf-fadeoutright{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(25%)}}@keyframes notyf-fadeoutright{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(25%)}}@-webkit-keyframes notyf-fadeoutdown{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(25%)}}@keyframes notyf-fadeoutdown{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(25%)}}@-webkit-keyframes ripple{0%{transform:scale(0) translateY(-45%) translateX(13%)}to{transform:scale(1) translateY(-45%) translateX(13%)}}@keyframes ripple{0%{transform:scale(0) translateY(-45%) translateX(13%)}to{transform:scale(1) translateY(-45%) translateX(13%)}}.notyf{position:fixed;top:0;left:0;height:100%;width:100%;color:#fff;z-index:9999;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;pointer-events:none;box-sizing:border-box;padding:20px}.notyf__icon--error,.notyf__icon--success{height:21px;width:21px;background:#fff;border-radius:50%;display:block;margin:0 auto;position:relative}.notyf__icon--error:after,.notyf__icon--error:before{content:"";background:currentColor;display:block;position:absolute;width:3px;border-radius:3px;left:9px;height:12px;top:5px}.notyf__icon--error:after{transform:rotate(-45deg)}.notyf__icon--error:before{transform:rotate(45deg)}.notyf__icon--success:after,.notyf__icon--success:before{content:"";background:currentColor;display:block;position:absolute;width:3px;border-radius:3px}.notyf__icon--success:after{height:6px;transform:rotate(-45deg);top:9px;left:6px}.notyf__icon--success:before{height:11px;transform:rotate(45deg);top:5px;left:10px}.notyf__toast{display:block;overflow:hidden;pointer-events:auto;-webkit-animation:notyf-fadeinup .3s ease-in forwards;animation:notyf-fadeinup .3s ease-in forwards;box-shadow:0 3px 7px 0 rgba(0,0,0,.25);position:relative;padding:0 15px;border-radius:2px;max-width:300px;transform:translateY(25%);box-sizing:border-box;flex-shrink:0}.notyf__toast--disappear{transform:translateY(0);-webkit-animation:notyf-fadeoutdown .3s forwards;animation:notyf-fadeoutdown .3s forwards;-webkit-animation-delay:.25s;animation-delay:.25s}.notyf__toast--disappear .notyf__icon,.notyf__toast--disappear .notyf__message{-webkit-animation:notyf-fadeoutdown .3s forwards;animation:notyf-fadeoutdown .3s forwards;opacity:1;transform:translateY(0)}.notyf__toast--disappear .notyf__dismiss{-webkit-animation:notyf-fadeoutright .3s forwards;animation:notyf-fadeoutright .3s forwards;opacity:1;transform:translateX(0)}.notyf__toast--disappear .notyf__message{-webkit-animation-delay:.05s;animation-delay:.05s}.notyf__toast--upper{margin-bottom:20px}.notyf__toast--lower{margin-top:20px}.notyf__toast--dismissible .notyf__wrapper{padding-right:30px}.notyf__ripple{height:400px;width:400px;position:absolute;transform-origin:bottom right;right:0;top:0;border-radius:50%;transform:scale(0) translateY(-51%) translateX(13%);z-index:5;-webkit-animation:ripple .4s ease-out forwards;animation:ripple .4s ease-out forwards}.notyf__wrapper{display:flex;align-items:center;padding-top:17px;padding-bottom:17px;padding-right:15px;border-radius:3px;position:relative;z-index:10}.notyf__icon{width:22px;text-align:center;font-size:1.3em;opacity:0;-webkit-animation:notyf-fadeinup .3s forwards;animation:notyf-fadeinup .3s forwards;-webkit-animation-delay:.3s;animation-delay:.3s;margin-right:13px}.notyf__dismiss{position:absolute;top:0;right:0;height:100%;width:26px;margin-right:-15px;-webkit-animation:notyf-fadeinleft .3s forwards;animation:notyf-fadeinleft .3s forwards;-webkit-animation-delay:.35s;animation-delay:.35s;opacity:0}.notyf__dismiss-btn{background-color:rgba(0,0,0,.25);border:none;cursor:pointer;transition:opacity .2s ease,background-color .2s ease;outline:none;opacity:.35;height:100%;width:100%}.notyf__dismiss-btn:after,.notyf__dismiss-btn:before{content:"";background:#fff;height:12px;width:2px;border-radius:3px;position:absolute;left:calc(50% - 1px);top:calc(50% - 5px)}.notyf__dismiss-btn:after{transform:rotate(-45deg)}.notyf__dismiss-btn:before{transform:rotate(45deg)}.notyf__dismiss-btn:hover{opacity:.7;background-color:rgba(0,0,0,.15)}.notyf__dismiss-btn:active{opacity:.8}.notyf__message{vertical-align:middle;position:relative;opacity:0;-webkit-animation:notyf-fadeinup .3s forwards;animation:notyf-fadeinup .3s forwards;-webkit-animation-delay:.25s;animation-delay:.25s;line-height:1.5em}@media only screen and (max-width:480px){.notyf{padding:0}.notyf__ripple{height:600px;width:600px;-webkit-animation-duration:.5s;animation-duration:.5s}.notyf__toast{max-width:none;border-radius:0;box-shadow:0 -2px 7px 0 rgba(0,0,0,.13);width:100%}.notyf__dismiss{width:56px}}
+1
apps/web/public/notyf.min.js
··· 1 + var Notyf=function(){"use strict";var e,o=function(){return(o=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var o in i=arguments[e])Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o]);return t}).apply(this,arguments)},n=(t.prototype.on=function(t,i){var e=this.listeners[t]||[];this.listeners[t]=e.concat([i])},t.prototype.triggerEvent=function(t,i){var e=this;(this.listeners[t]||[]).forEach(function(t){return t({target:e,event:i})})},t);function t(t){this.options=t,this.listeners={}}(i=e=e||{})[i.Add=0]="Add",i[i.Remove=1]="Remove";var f,i,s=(a.prototype.push=function(t){this.notifications.push(t),this.updateFn(t,e.Add,this.notifications)},a.prototype.splice=function(t,i){i=this.notifications.splice(t,i)[0];return this.updateFn(i,e.Remove,this.notifications),i},a.prototype.indexOf=function(t){return this.notifications.indexOf(t)},a.prototype.onUpdate=function(t){this.updateFn=t},a);function a(){this.notifications=[]}(i=f=f||{}).Dismiss="dismiss";var r={types:[{type:"success",className:"notyf__toast--success",backgroundColor:"#3dc763",icon:{className:"notyf__icon--success",tagName:"i"}},{type:"error",className:"notyf__toast--error",backgroundColor:"#ed3d3d",icon:{className:"notyf__icon--error",tagName:"i"}}],duration:2e3,ripple:!0,position:{x:"right",y:"bottom"},dismissible:!(i.Click="click")},c=(p.prototype.on=function(t,i){var e;this.events=o(o({},this.events),((e={})[t]=i,e))},p.prototype.update=function(t,i){i===e.Add?this.addNotification(t):i===e.Remove&&this.removeNotification(t)},p.prototype.removeNotification=function(t){var i,e,n=this,t=this._popRenderedNotification(t);t&&((e=t.node).classList.add("notyf__toast--disappear"),e.addEventListener(this.animationEndEventName,i=function(t){t.target===e&&(e.removeEventListener(n.animationEndEventName,i),n.container.removeChild(e))}))},p.prototype.addNotification=function(t){var i=this._renderNotification(t);this.notifications.push({notification:t,node:i}),this._announce(t.options.message||"Notification")},p.prototype._renderNotification=function(t){var i=this._buildNotificationCard(t),e=t.options.className;return e&&(t=i.classList).add.apply(t,e.split(" ")),this.container.appendChild(i),i},p.prototype._popRenderedNotification=function(t){for(var i=-1,e=0;e<this.notifications.length&&i<0;e++)this.notifications[e].notification===t&&(i=e);if(-1!==i)return this.notifications.splice(i,1)[0]},p.prototype.getXPosition=function(t){return(null===(t=null==t?void 0:t.position)||void 0===t?void 0:t.x)||"right"},p.prototype.getYPosition=function(t){return(null===(t=null==t?void 0:t.position)||void 0===t?void 0:t.y)||"bottom"},p.prototype.adjustContainerAlignment=function(t){var i=this.X_POSITION_FLEX_MAP[this.getXPosition(t)],e=this.Y_POSITION_FLEX_MAP[this.getYPosition(t)],t=this.container.style;t.setProperty("justify-content",e),t.setProperty("align-items",i)},p.prototype._buildNotificationCard=function(n){var o=this,t=n.options,i=t.icon;this.adjustContainerAlignment(t);var e=this._createHTMLElement({tagName:"div",className:"notyf__toast"}),s=this._createHTMLElement({tagName:"div",className:"notyf__ripple"}),a=this._createHTMLElement({tagName:"div",className:"notyf__wrapper"}),r=this._createHTMLElement({tagName:"div",className:"notyf__message"});r.innerHTML=t.message||"";var c,p,d,l,u=t.background||t.backgroundColor;i&&(c=this._createHTMLElement({tagName:"div",className:"notyf__icon"}),("string"==typeof i||i instanceof String)&&(c.innerHTML=new String(i).valueOf()),"object"==typeof i&&(p=i.tagName,d=i.className,l=i.text,i=void 0===(i=i.color)?u:i,l=this._createHTMLElement({tagName:void 0===p?"i":p,className:d,text:l}),i&&(l.style.color=i),c.appendChild(l)),a.appendChild(c)),a.appendChild(r),e.appendChild(a),u&&(t.ripple?(s.style.background=u,e.appendChild(s)):e.style.background=u),t.dismissible&&(s=this._createHTMLElement({tagName:"div",className:"notyf__dismiss"}),u=this._createHTMLElement({tagName:"button",className:"notyf__dismiss-btn"}),s.appendChild(u),a.appendChild(s),e.classList.add("notyf__toast--dismissible"),u.addEventListener("click",function(t){var i,e;null!==(e=(i=o.events)[f.Dismiss])&&void 0!==e&&e.call(i,{target:n,event:t}),t.stopPropagation()})),e.addEventListener("click",function(t){var i,e;return null===(e=(i=o.events)[f.Click])||void 0===e?void 0:e.call(i,{target:n,event:t})});t="top"===this.getYPosition(t)?"upper":"lower";return e.classList.add("notyf__toast--"+t),e},p.prototype._createHTMLElement=function(t){var i=t.tagName,e=t.className,t=t.text,i=document.createElement(i);return e&&(i.className=e),i.textContent=t||null,i},p.prototype._createA11yContainer=function(){var t=this._createHTMLElement({tagName:"div",className:"notyf-announcer"});t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),t.style.border="0",t.style.clip="rect(0 0 0 0)",t.style.height="1px",t.style.margin="-1px",t.style.overflow="hidden",t.style.padding="0",t.style.position="absolute",t.style.width="1px",t.style.outline="0",document.body.appendChild(t),this.a11yContainer=t},p.prototype._announce=function(t){var i=this;this.a11yContainer.textContent="",setTimeout(function(){i.a11yContainer.textContent=t},100)},p.prototype._getAnimationEndEventName=function(){var t,i=document.createElement("_fake"),e={MozTransition:"animationend",OTransition:"oAnimationEnd",WebkitTransition:"webkitAnimationEnd",transition:"animationend"};for(t in e)if(void 0!==i.style[t])return e[t];return"animationend"},p);function p(){this.notifications=[],this.events={},this.X_POSITION_FLEX_MAP={left:"flex-start",center:"center",right:"flex-end"},this.Y_POSITION_FLEX_MAP={top:"flex-start",center:"center",bottom:"flex-end"};var t=document.createDocumentFragment(),i=this._createHTMLElement({tagName:"div",className:"notyf"});t.appendChild(i),document.body.appendChild(t),this.container=i,this.animationEndEventName=this._getAnimationEndEventName(),this._createA11yContainer()}function d(t){var e=this;this.dismiss=this._removeNotification,this.notifications=new s,this.view=new c;var i=this.registerTypes(t);this.options=o(o({},r),t),this.options.types=i,this.notifications.onUpdate(function(t,i){return e.view.update(t,i)}),this.view.on(f.Dismiss,function(t){var i=t.target,t=t.event;e._removeNotification(i),i.triggerEvent(f.Dismiss,t)}),this.view.on(f.Click,function(t){var i=t.target,t=t.event;return i.triggerEvent(f.Click,t)})}return d.prototype.error=function(t){t=this.normalizeOptions("error",t);return this.open(t)},d.prototype.success=function(t){t=this.normalizeOptions("success",t);return this.open(t)},d.prototype.open=function(i){var t=this.options.types.find(function(t){return t.type===i.type})||{},t=o(o({},t),i);this.assignProps(["ripple","position","dismissible"],t);t=new n(t);return this._pushNotification(t),t},d.prototype.dismissAll=function(){for(;this.notifications.splice(0,1););},d.prototype.assignProps=function(t,i){var e=this;t.forEach(function(t){i[t]=(null==i[t]?e.options:i)[t]})},d.prototype._pushNotification=function(t){var i=this;this.notifications.push(t);var e=(void 0!==t.options.duration?t:this).options.duration;e&&setTimeout(function(){return i._removeNotification(t)},e)},d.prototype._removeNotification=function(t){t=this.notifications.indexOf(t);-1!==t&&this.notifications.splice(t,1)},d.prototype.normalizeOptions=function(t,i){t={type:t};return"string"==typeof i?t.message=i:"object"==typeof i&&(t=o(o({},t),i)),t},d.prototype.registerTypes=function(t){var i=(t&&t.types||[]).slice();return r.types.map(function(e){var n=-1;i.forEach(function(t,i){t.type===e.type&&(n=i)});var t=-1!==n?i.splice(n,1)[0]:{};return o(o({},e),t)}).concat(i)},d}();
+1
apps/web/src/index.css
··· 6 6 @import "../node_modules/flyonui/variants.css"; 7 7 @source "../node_modules/flyonui/dist/index.js"; 8 8 @source "../node_modules/flyonui/dist/accordion.js"; 9 + @import "flyonui/src/vendor/notyf.css"; 9 10 10 11 @font-face { 11 12 font-family: "RockfordSansLight";