@romedb/studio 0.0.0-stage → 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.
Files changed (38) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +15 -2
  3. package/package.json +36 -4
  4. package/src/components/CodeEditor.ts +298 -0
  5. package/src/components/studio/BrowseTab.ts +457 -0
  6. package/src/components/studio/CellEditorSheet.ts +165 -0
  7. package/src/components/studio/DatabaseTab.ts +148 -0
  8. package/src/components/studio/GraphCanvas.ts +90 -0
  9. package/src/components/studio/GraphTab.ts +110 -0
  10. package/src/components/studio/InsertRowSheet.ts +180 -0
  11. package/src/components/studio/MapCanvas.ts +177 -0
  12. package/src/components/studio/MapTab.ts +121 -0
  13. package/src/components/studio/NewObjectSheet.ts +235 -0
  14. package/src/components/studio/QueryHistorySheet.ts +111 -0
  15. package/src/components/studio/RowSheets.ts +226 -0
  16. package/src/components/studio/SqlConsole.ts +281 -0
  17. package/src/components/studio/StructureTab.ts +209 -0
  18. package/src/components/studio/icon-button.ts +21 -0
  19. package/src/lib/filters.ts +44 -0
  20. package/src/lib/graph.ts +214 -0
  21. package/src/lib/romeql.ts +106 -0
  22. package/src/lib/spatial.ts +518 -0
  23. package/src/lib/sql-text.ts +208 -0
  24. package/src/lib/studio-types.ts +268 -0
  25. package/src/lib/values.ts +305 -0
  26. package/src/monaco-standalone.d.ts +27 -0
  27. package/src/schema-draft.ts +41 -0
  28. package/src/schema-store.ts +8 -0
  29. package/src/server/backend.ts +77 -0
  30. package/src/server/data.ts +142 -0
  31. package/src/server/edits.ts +92 -0
  32. package/src/server/graph.ts +66 -0
  33. package/src/server/queries.ts +108 -0
  34. package/src/server/schema.ts +272 -0
  35. package/src/server/spatial.ts +74 -0
  36. package/src/studio-page.ts +84 -0
  37. package/src/workspace/StudioWorkspace.ts +1984 -0
  38. package/src/workspace/workspace.css +38 -0
@@ -0,0 +1,38 @@
1
+ /* Styles of the database workspace. Studio imports them; an application that embeds the
2
+ workspace imports them too and puts the class studio-embed on the element around it. */
3
+ .studio-code-editor .monaco-editor { border-radius: 0.375rem; }
4
+
5
+ :is(.studio-grid, .studio-embed) .cs-input,
6
+ :is(.studio-grid, .studio-embed) .cs-textarea,
7
+ :is(.studio-grid, .studio-embed) select { background-color: var(--background); }
8
+
9
+ :is(.studio-grid, .studio-embed) .cs-input:disabled,
10
+ :is(.studio-grid, .studio-embed) .cs-textarea:disabled,
11
+ :is(.studio-grid, .studio-embed) select:disabled { background-color: color-mix(in oklch, var(--muted) 70%, var(--background)); }
12
+
13
+ :is(.studio-grid, .studio-embed) .studio-insert-option { color: var(--foreground); -webkit-text-fill-color: var(--foreground); }
14
+
15
+ .studio-cell { max-width: 28rem; min-width: 8rem; }
16
+
17
+ .studio-cell-value {
18
+ display: block;
19
+ max-width: 26rem;
20
+ overflow: hidden;
21
+ text-overflow: ellipsis;
22
+ white-space: nowrap;
23
+ }
24
+
25
+ .studio-code-editor,
26
+ .studio-code-editor .monaco-editor,
27
+ .studio-code-editor .overflow-guard { border-radius: inherit; }
28
+
29
+ .studio-tab-panel { view-transition-name: studio-tab-panel; }
30
+ ::view-transition-old(studio-tab-panel) { animation: studio-tab-out 140ms ease both; }
31
+ ::view-transition-new(studio-tab-panel) { animation: studio-tab-in 190ms ease both; }
32
+ @keyframes studio-tab-out { to { opacity: 0; transform: translateY(-4px); } }
33
+ @keyframes studio-tab-in { from { opacity: 0; transform: translateY(5px); } }
34
+
35
+ @media (prefers-reduced-motion: reduce) {
36
+ ::view-transition-old(studio-tab-panel),
37
+ ::view-transition-new(studio-tab-panel) { animation-duration: 1ms; }
38
+ }