@mongoosejs/studio 0.5.12 → 0.5.14

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 (60) hide show
  1. package/AGENTS.md +7 -0
  2. package/CLAUDE.md +7 -0
  3. package/README.md +3 -0
  4. package/backend/actions/ChatMessage/executeScript.js +7 -5
  5. package/backend/actions/ChatThread/createChatMessage.js +4 -2
  6. package/backend/actions/ChatThread/getChatThread.js +5 -2
  7. package/backend/actions/ChatThread/listChatThreads.js +3 -1
  8. package/backend/actions/ChatThread/shareChatThread.js +5 -2
  9. package/backend/actions/ChatThread/streamChatMessage.js +4 -2
  10. package/backend/actions/ChatThread/toggleAgentMode.js +5 -2
  11. package/backend/actions/Dashboard/deleteDashboard.js +7 -3
  12. package/backend/actions/Dashboard/getDashboard.js +21 -10
  13. package/backend/actions/Dashboard/getDashboards.js +3 -1
  14. package/backend/actions/Dashboard/updateDashboard.js +3 -2
  15. package/backend/actions/Model/addField.js +3 -2
  16. package/backend/actions/Model/analyzeSchema.js +6 -4
  17. package/backend/actions/Model/deleteDocument.js +3 -3
  18. package/backend/actions/Model/deleteDocuments.js +3 -1
  19. package/backend/actions/Model/executeDocumentScript.js +25 -29
  20. package/backend/actions/Model/exportQueryResults.js +3 -1
  21. package/backend/actions/Model/getCollectionInfo.js +5 -3
  22. package/backend/actions/Model/getDocument.js +3 -2
  23. package/backend/actions/Model/getDocuments.js +15 -5
  24. package/backend/actions/Model/getDocumentsStream.js +28 -18
  25. package/backend/actions/Model/getEstimatedDocumentCounts.js +5 -2
  26. package/backend/actions/Model/updateDocument.js +4 -2
  27. package/backend/actions/Model/updateDocuments.js +4 -2
  28. package/backend/actions/Model/validateDocument.js +5 -2
  29. package/backend/actions/Task/cancelTask.js +6 -3
  30. package/backend/actions/Task/getTaskOverview.js +3 -2
  31. package/backend/actions/Task/getTasks.js +3 -2
  32. package/backend/actions/Task/getTasksOverTime.js +3 -2
  33. package/backend/actions/Task/rescheduleTask.js +6 -3
  34. package/backend/actions/Task/runTask.js +6 -3
  35. package/backend/helpers/omitNullish.js +5 -0
  36. package/backend/index.js +4 -4
  37. package/backend/sandbox/createSandbox.js +2 -2
  38. package/backend/sandbox/createScriptDb.js +42 -19
  39. package/frontend/public/app.js +3210 -2706
  40. package/frontend/public/tw.css +68 -0
  41. package/frontend/src/api.js +5 -1
  42. package/frontend/src/chat/chat-message/chat-message.js +5 -1
  43. package/frontend/src/detail-default/detail-default.html +0 -10
  44. package/frontend/src/detail-default/detail-default.js +29 -1061
  45. package/frontend/src/document-details/document-property/document-property.html +0 -11
  46. package/frontend/src/document-details/document-property/document-property.js +6 -14
  47. package/frontend/src/edit-geojson/edit-geojson.html +17 -0
  48. package/frontend/src/edit-geojson/edit-geojson.js +1104 -0
  49. package/frontend/src/models/models.html +29 -8
  50. package/frontend/src/models/models.js +30 -2
  51. package/frontend/src/tooltip/tooltip.html +28 -0
  52. package/frontend/src/tooltip/tooltip.js +94 -0
  53. package/index.d.ts +1 -1
  54. package/local.js +3 -2
  55. package/nest.d.ts +1 -0
  56. package/package.json +1 -1
  57. package/seed/connect.js +4 -0
  58. package/seed/index.js +16 -0
  59. package/vercel.d.ts +48 -0
  60. package/vercel.js +3 -0
@@ -664,6 +664,10 @@ video {
664
664
  bottom: 0px;
665
665
  }
666
666
 
667
+ .-bottom-1 {
668
+ bottom: -0.25rem;
669
+ }
670
+
667
671
  .-left-1 {
668
672
  left: -0.25rem;
669
673
  }
@@ -672,6 +676,10 @@ video {
672
676
  left: -0.75rem;
673
677
  }
674
678
 
679
+ .-top-1 {
680
+ top: -0.25rem;
681
+ }
682
+
675
683
  .bottom-0 {
676
684
  bottom: 0px;
677
685
  }
@@ -792,6 +800,10 @@ video {
792
800
  z-index: 10001;
793
801
  }
794
802
 
803
+ .z-\[1000\] {
804
+ z-index: 1000;
805
+ }
806
+
795
807
  .z-\[100\] {
796
808
  z-index: 100;
797
809
  }
@@ -1085,6 +1097,10 @@ video {
1085
1097
  height: 4rem;
1086
1098
  }
1087
1099
 
1100
+ .h-2 {
1101
+ height: 0.5rem;
1102
+ }
1103
+
1088
1104
  .h-20 {
1089
1105
  height: 5rem;
1090
1106
  }
@@ -1265,6 +1281,10 @@ video {
1265
1281
  width: 4rem;
1266
1282
  }
1267
1283
 
1284
+ .w-2 {
1285
+ width: 0.5rem;
1286
+ }
1287
+
1268
1288
  .w-20 {
1269
1289
  width: 5rem;
1270
1290
  }
@@ -1365,6 +1385,11 @@ video {
1365
1385
  width: 100%;
1366
1386
  }
1367
1387
 
1388
+ .w-max {
1389
+ width: -moz-max-content;
1390
+ width: max-content;
1391
+ }
1392
+
1368
1393
  .min-w-0 {
1369
1394
  min-width: 0px;
1370
1395
  }
@@ -1441,6 +1466,10 @@ video {
1441
1466
  max-width: calc(100vw - 4rem);
1442
1467
  }
1443
1468
 
1469
+ .max-w-\[min\(20rem\2c calc\(100vw-1rem\)\)\] {
1470
+ max-width: min(20rem,calc(100vw - 1rem));
1471
+ }
1472
+
1444
1473
  .max-w-full {
1445
1474
  max-width: 100%;
1446
1475
  }
@@ -1555,6 +1584,11 @@ video {
1555
1584
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1556
1585
  }
1557
1586
 
1587
+ .rotate-45 {
1588
+ --tw-rotate: 45deg;
1589
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1590
+ }
1591
+
1558
1592
  .rotate-90 {
1559
1593
  --tw-rotate: 90deg;
1560
1594
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -1608,6 +1642,10 @@ video {
1608
1642
  resize: vertical;
1609
1643
  }
1610
1644
 
1645
+ .resize {
1646
+ resize: both;
1647
+ }
1648
+
1611
1649
  .snap-y {
1612
1650
  scroll-snap-type: y var(--tw-scroll-snap-strictness);
1613
1651
  }
@@ -1861,6 +1899,10 @@ video {
1861
1899
  text-overflow: ellipsis;
1862
1900
  }
1863
1901
 
1902
+ .whitespace-normal {
1903
+ white-space: normal;
1904
+ }
1905
+
1864
1906
  .whitespace-nowrap {
1865
1907
  white-space: nowrap;
1866
1908
  }
@@ -2184,6 +2226,11 @@ video {
2184
2226
  background-color: rgb(55 65 81 / var(--tw-bg-opacity));
2185
2227
  }
2186
2228
 
2229
+ .bg-gray-900 {
2230
+ --tw-bg-opacity: 1;
2231
+ background-color: rgb(17 24 39 / var(--tw-bg-opacity));
2232
+ }
2233
+
2187
2234
  .bg-green-100 {
2188
2235
  --tw-bg-opacity: 1;
2189
2236
  background-color: rgb(220 252 231 / var(--tw-bg-opacity));
@@ -2747,6 +2794,10 @@ video {
2747
2794
  font-weight: 500;
2748
2795
  }
2749
2796
 
2797
+ .font-normal {
2798
+ font-weight: 400;
2799
+ }
2800
+
2750
2801
  .font-semibold {
2751
2802
  font-weight: 600;
2752
2803
  }
@@ -2763,6 +2814,10 @@ video {
2763
2814
  font-style: italic;
2764
2815
  }
2765
2816
 
2817
+ .leading-4 {
2818
+ line-height: 1rem;
2819
+ }
2820
+
2766
2821
  .leading-6 {
2767
2822
  line-height: 1.5rem;
2768
2823
  }
@@ -3216,6 +3271,11 @@ video {
3216
3271
  --tw-ring-color: rgb(176 32 43 / var(--tw-ring-opacity));
3217
3272
  }
3218
3273
 
3274
+ .ring-red-200 {
3275
+ --tw-ring-opacity: 1;
3276
+ --tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity));
3277
+ }
3278
+
3219
3279
  .ring-red-400 {
3220
3280
  --tw-ring-opacity: 1;
3221
3281
  --tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity));
@@ -3837,6 +3897,10 @@ video {
3837
3897
  --tw-ring-offset-width: 2px;
3838
3898
  }
3839
3899
 
3900
+ .focus-visible\:rounded-md:focus-visible {
3901
+ border-radius: 0.375rem;
3902
+ }
3903
+
3840
3904
  .focus-visible\:opacity-100:focus-visible {
3841
3905
  opacity: 1;
3842
3906
  }
@@ -3853,6 +3917,10 @@ video {
3853
3917
  outline-offset: 2px;
3854
3918
  }
3855
3919
 
3920
+ .focus-visible\:outline-blue-600:focus-visible {
3921
+ outline-color: #2563eb;
3922
+ }
3923
+
3856
3924
  .focus-visible\:outline-edge-strong:focus-visible {
3857
3925
  outline-color: var(--color-edge-strong);
3858
3926
  }
@@ -229,7 +229,11 @@ if (window.MONGOOSE_STUDIO_CONFIG.isLambda) {
229
229
  getDocumentsStream: async function* getDocumentsStream(params) {
230
230
  const data = await client.post('', { action: 'Model.getDocuments', ...params }).then(res => res.data);
231
231
  yield { schemaPaths: data.schemaPaths, suggestedFields: data.suggestedFields };
232
- yield { numDocs: data.numDocs };
232
+ if (data.numDocsError) {
233
+ yield { numDocsError: data.numDocsError };
234
+ } else {
235
+ yield { numDocs: data.numDocs };
236
+ }
233
237
  for (const doc of data.docs) {
234
238
  yield { document: doc };
235
239
  }
@@ -2,6 +2,7 @@
2
2
 
3
3
  const api = require('../../api');
4
4
  const marked = require('marked').marked;
5
+ const xss = require('xss');
5
6
  const template = require('./chat-message.html');
6
7
 
7
8
  module.exports = app => app.component('chat-message', {
@@ -52,7 +53,10 @@ module.exports = app => app.component('chat-message', {
52
53
  },
53
54
  methods: {
54
55
  marked(text) {
55
- return marked(text);
56
+ if (text == null || text === '') {
57
+ return '';
58
+ }
59
+ return xss(marked(text));
56
60
  },
57
61
  formatToolInput(input) {
58
62
  if (!input) return '';
@@ -2,15 +2,5 @@
2
2
  <pre v-if="!isGeoJsonGeometry || !mapVisible" class="w-full whitespace-pre-wrap break-words font-mono text-sm text-content-secondary m-0">{{displayValue}}</pre>
3
3
  <div v-show="isGeoJsonGeometry && mapVisible" class="mt-2 border border-edge rounded relative">
4
4
  <div ref="map" class="h-64 w-full" style="min-height: 256px; height: 256px;"></div>
5
- <!-- Undo button below map -->
6
- <div v-if="isEditable && canUndo" class="mt-2 flex justify-end">
7
- <button
8
- @click="undoDelete"
9
- class="text-xs px-3 py-1.5 bg-gray-600 text-white rounded hover:bg-gray-700 transition-colors"
10
- title="Undo all changes"
11
- >
12
- Undo
13
- </button>
14
- </div>
15
5
  </div>
16
6
  </div>