collabmd 0.1.21 → 0.1.23

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 (99) hide show
  1. package/README.md +94 -7
  2. package/bin/collabmd.js +3 -2
  3. package/docker-compose.yml +13 -1
  4. package/package.json +2 -1
  5. package/public/assets/css/style.css +1 -1
  6. package/public/assets/js/chunks/{chunk-HEWVH67U.js → chunk-CYK7KO7W.js} +8 -8
  7. package/public/assets/js/chunks/editor-session-S5AT7BMV.js +22 -0
  8. package/public/assets/js/{excalidraw-editor-TCIH6GJL.js → excalidraw-editor-5YWMGLKF.js} +145 -62
  9. package/public/assets/js/excalidraw-editor.js +1 -1
  10. package/public/assets/js/main.js +503 -182
  11. package/public/index.html +104 -84
  12. package/src/client/application/app-shell/git-feature.js +247 -9
  13. package/src/client/application/app-shell/ui-feature.js +65 -7
  14. package/src/client/application/app-shell/workspace-feature.js +46 -0
  15. package/src/client/application/app-shell-elements.js +2 -0
  16. package/src/client/application/mermaid-preview-hydrator.js +1 -1
  17. package/src/client/application/plantuml-preview-hydrator.js +1 -1
  18. package/src/client/application/workspace-coordinator.js +147 -18
  19. package/src/client/application/workspace-preview-controller.js +34 -0
  20. package/src/client/application/workspace-route-controller.js +104 -0
  21. package/src/client/bootstrap/collabmd-app-shell.js +95 -0
  22. package/src/client/domain/runtime-paths.js +5 -0
  23. package/src/client/excalidraw-editor.js +50 -2
  24. package/src/client/infrastructure/auth-client.js +219 -52
  25. package/src/client/infrastructure/browser-navigation-port.js +20 -0
  26. package/src/client/infrastructure/editor-collaboration-client.js +4 -0
  27. package/src/client/infrastructure/editor-session.js +47 -7
  28. package/src/client/infrastructure/editor-view-adapter.js +122 -58
  29. package/src/client/infrastructure/runtime-config.js +66 -0
  30. package/src/client/presentation/comment-ui-controller.js +82 -26
  31. package/src/client/presentation/comments-panel.js +2 -2
  32. package/src/client/presentation/excalidraw-embed-controller.js +60 -2
  33. package/src/client/presentation/file-history-view-controller.js +806 -0
  34. package/src/client/presentation/git-diff-view-controller.js +718 -121
  35. package/src/client/presentation/git-panel-controller.js +458 -66
  36. package/src/client/presentation/layout-controller.js +1 -1
  37. package/src/client/styles/components/actions.css +89 -0
  38. package/src/client/styles/components/feedback.css +43 -0
  39. package/src/client/styles/components/navigation.css +68 -0
  40. package/src/client/styles/components/scrollbars.css +104 -0
  41. package/src/client/styles/components/states.css +289 -0
  42. package/src/client/styles/components/surfaces.css +155 -0
  43. package/src/client/styles/features/backlinks.css +213 -0
  44. package/src/client/styles/features/collaboration-chat.css +228 -0
  45. package/src/client/styles/features/collaboration-dialogs.css +154 -0
  46. package/src/client/styles/features/collaboration-presence.css +103 -0
  47. package/src/client/styles/features/collaboration-ui.css +3 -0
  48. package/src/client/styles/features/comment-card.css +236 -0
  49. package/src/client/styles/features/comment-markdown.css +127 -0
  50. package/src/client/styles/features/comment-overlays.css +60 -0
  51. package/src/client/styles/features/comments-drawer.css +120 -0
  52. package/src/client/styles/features/comments.css +4 -0
  53. package/src/client/styles/features/diagram-preview.css +227 -0
  54. package/src/client/styles/features/diff-commit.css +268 -0
  55. package/src/client/styles/features/diff-lines.css +160 -0
  56. package/src/client/styles/features/diff-toolbar.css +98 -0
  57. package/src/client/styles/features/diff.css +3 -0
  58. package/src/client/styles/features/embedded-preview.css +218 -0
  59. package/src/client/styles/features/git-branch.css +155 -0
  60. package/src/client/styles/features/git-files.css +105 -0
  61. package/src/client/styles/features/git-history.css +339 -0
  62. package/src/client/styles/features/git.css +3 -0
  63. package/src/client/styles/features/media-lightbox.css +157 -0
  64. package/src/client/styles/features/outline.css +115 -0
  65. package/src/client/styles/features/preview-content.css +3 -0
  66. package/src/client/styles/features/preview-markdown.css +201 -0
  67. package/src/client/styles/features/preview-sidebars.css +2 -0
  68. package/src/client/styles/features/quick-switcher.css +167 -0
  69. package/src/client/styles/foundation/themes.css +347 -0
  70. package/src/client/styles/foundation/tokens.css +66 -0
  71. package/src/client/styles/foundation/utilities.css +36 -0
  72. package/src/client/styles/layout/editor-page.css +203 -0
  73. package/src/client/styles/layout/overlays.css +132 -0
  74. package/src/client/styles/layout/responsive.css +251 -0
  75. package/src/client/styles/layout/shell.css +314 -0
  76. package/src/client/styles/layout/sidebar.css +176 -0
  77. package/src/client/styles/layout/view-modes.css +92 -0
  78. package/src/client/styles/overrides/codemirror.css +53 -0
  79. package/src/client/styles/overrides/highlightjs.css +7 -0
  80. package/src/client/styles/overrides/vendor.css +2 -0
  81. package/src/client/styles/primitives/controls.css +276 -0
  82. package/src/client/styles/style.css +25 -4945
  83. package/src/server/auth/create-auth-service.js +373 -15
  84. package/src/server/auth/session-cookie.js +30 -4
  85. package/src/server/config/env.js +121 -5
  86. package/src/server/create-app-server.js +8 -0
  87. package/src/server/domain/collaboration/collaboration-room.js +90 -47
  88. package/src/server/index.js +3 -1
  89. package/src/server/infrastructure/git/command-runner.js +2 -1
  90. package/src/server/infrastructure/git/git-service.js +48 -2
  91. package/src/server/infrastructure/git/history-service.js +683 -0
  92. package/src/server/infrastructure/git/parsers.js +30 -0
  93. package/src/server/infrastructure/git/responses.js +73 -0
  94. package/src/server/infrastructure/http/create-auth-api-handler.js +30 -2
  95. package/src/server/infrastructure/http/create-git-api-command-handler.js +2 -0
  96. package/src/server/infrastructure/http/create-git-api-handler.js +2 -0
  97. package/src/server/infrastructure/http/create-git-api-query-handler.js +61 -0
  98. package/src/server/infrastructure/http/create-request-handler.js +15 -0
  99. package/public/assets/js/chunks/editor-session-EAUBJCHH.js +0 -22
@@ -0,0 +1,132 @@
1
+ /* ===== SHARED OVERLAYS ===== */
2
+
3
+ .editor-loading {
4
+ display: flex;
5
+ flex-direction: column;
6
+ height: 100%;
7
+ gap: var(--space-2);
8
+ padding: var(--space-6) var(--space-8);
9
+ }
10
+
11
+ .editor-loading.hidden {
12
+ display: none;
13
+ }
14
+
15
+ .skeleton-line {
16
+ height: 16px;
17
+ border-radius: var(--radius-xs);
18
+ background: var(--color-surface-offset);
19
+ animation: pulse-skeleton 1.5s ease-in-out infinite;
20
+ }
21
+
22
+ .skeleton-line--title {
23
+ width: 40%;
24
+ height: 32px;
25
+ }
26
+
27
+ .skeleton-line--full {
28
+ width: 100%;
29
+ }
30
+
31
+ .skeleton-line--ninety {
32
+ width: 90%;
33
+ }
34
+
35
+ .skeleton-line--ninety-five {
36
+ width: 95%;
37
+ }
38
+
39
+ .skeleton-line--eighty {
40
+ width: 80%;
41
+ }
42
+
43
+ .skeleton-line--eighty-five {
44
+ width: 85%;
45
+ }
46
+
47
+ .skeleton-line--break {
48
+ margin-bottom: 24px;
49
+ }
50
+
51
+ @keyframes pulse-skeleton {
52
+ 0% {
53
+ opacity: 0.6;
54
+ }
55
+
56
+ 50% {
57
+ opacity: 0.3;
58
+ }
59
+
60
+ 100% {
61
+ opacity: 0.6;
62
+ }
63
+ }
64
+
65
+ .file-context-menu {
66
+ position: fixed;
67
+ z-index: 1000;
68
+ min-width: 120px;
69
+ padding: var(--space-1);
70
+ border: 1px solid var(--color-border);
71
+ border-radius: var(--radius-md);
72
+ background: var(--color-surface);
73
+ box-shadow: var(--shadow-md);
74
+ transform-origin: top left;
75
+ opacity: 1;
76
+ transform: scale(1);
77
+ transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
78
+ }
79
+
80
+ @starting-style {
81
+ .file-context-menu {
82
+ opacity: 0;
83
+ transform: scale(0.9);
84
+ }
85
+ }
86
+
87
+ .file-context-item {
88
+ display: block;
89
+ width: 100%;
90
+ padding: var(--space-1) var(--space-3);
91
+ border: none;
92
+ border-radius: var(--radius-sm);
93
+ background: none;
94
+ color: var(--color-text);
95
+ text-align: left;
96
+ cursor: pointer;
97
+ transition: background var(--transition-interactive);
98
+ font-family: var(--font-body);
99
+ font-size: var(--text-ui-sm);
100
+ }
101
+
102
+ .file-context-item:hover {
103
+ background: var(--color-surface-offset);
104
+ }
105
+
106
+ .file-context-danger {
107
+ color: var(--color-error);
108
+ }
109
+
110
+ .wiki-link {
111
+ color: var(--color-primary);
112
+ text-decoration: underline;
113
+ text-decoration-style: dotted;
114
+ text-underline-offset: 2px;
115
+ cursor: pointer;
116
+ }
117
+
118
+ .wiki-link:hover {
119
+ text-decoration-style: solid;
120
+ }
121
+
122
+ .wiki-link-new {
123
+ color: var(--color-text-muted);
124
+ text-decoration-style: dashed;
125
+ opacity: 0.7;
126
+ }
127
+
128
+ .wiki-link-new:hover {
129
+ color: var(--color-primary);
130
+ opacity: 1;
131
+ text-decoration-style: dashed;
132
+ }
@@ -0,0 +1,251 @@
1
+ /* ===== MOBILE / RESPONSIVE ===== */
2
+
3
+ @media (max-width: 768px) {
4
+ .input,
5
+ .sidebar-search-input,
6
+ .qs-input,
7
+ .chat-input,
8
+ .editor-container .cm-editor {
9
+ font-size: 16px;
10
+ }
11
+
12
+ .sidebar {
13
+ position: fixed;
14
+ top: 0;
15
+ left: 0;
16
+ bottom: 0;
17
+ z-index: 100;
18
+ box-shadow: var(--shadow-lg);
19
+ }
20
+
21
+ .sidebar.collapsed {
22
+ display: none;
23
+ }
24
+
25
+ .ui-toolbar-button-label {
26
+ display: none;
27
+ }
28
+
29
+ .toolbar-center {
30
+ display: none;
31
+ }
32
+
33
+ .mobile-view-toggle {
34
+ display: flex !important;
35
+ }
36
+
37
+ .ui-toolbar-button--name {
38
+ max-width: none;
39
+ }
40
+
41
+ .sidebar-close-btn {
42
+ display: inline-flex;
43
+ }
44
+
45
+ .ui-nav-tabs {
46
+ padding: 0 var(--space-1);
47
+ }
48
+
49
+ .ui-nav-tab {
50
+ padding: var(--space-2);
51
+ }
52
+
53
+ .editor-layout {
54
+ flex-direction: column;
55
+ }
56
+
57
+ .resizer {
58
+ display: none !important;
59
+ }
60
+
61
+ .editor-layout[data-view="split"] .preview-pane {
62
+ display: none;
63
+ }
64
+
65
+ .editor-layout[data-view="split"] .editor-pane {
66
+ flex: 1;
67
+ }
68
+
69
+ .preview-content {
70
+ padding: var(--space-4);
71
+ }
72
+
73
+ .backlinks-panel-layer {
74
+ display: none !important;
75
+ }
76
+
77
+ .diff-toolbar {
78
+ flex-wrap: wrap;
79
+ padding: var(--space-2) var(--space-3);
80
+ }
81
+
82
+ .diff-toolbar-left,
83
+ .diff-toolbar-right {
84
+ width: 100%;
85
+ justify-content: space-between;
86
+ }
87
+
88
+ .diff-toolbar-left {
89
+ flex-wrap: wrap;
90
+ }
91
+
92
+ .diff-toolbar-actions {
93
+ width: 100%;
94
+ justify-content: space-between;
95
+ }
96
+
97
+ .diff-toolbar-actions-group-git {
98
+ flex: 1;
99
+ }
100
+
101
+ .diff-toolbar-actions-group-git .ui-action-button {
102
+ flex: 1;
103
+ min-width: 0;
104
+ }
105
+
106
+ .diff-toolbar-actions-divider {
107
+ display: none;
108
+ }
109
+
110
+ .diff-mode-btn {
111
+ min-width: 74px;
112
+ }
113
+
114
+ .diff-layout-btn {
115
+ min-width: 78px;
116
+ }
117
+
118
+ .diff-split-row {
119
+ grid-template-columns: 1fr;
120
+ }
121
+
122
+ .diff-commit-shell {
123
+ grid-template-columns: 1fr;
124
+ padding: var(--space-3);
125
+ }
126
+
127
+ .diff-commit-index {
128
+ position: static;
129
+ max-height: none;
130
+ }
131
+
132
+ .diff-commit-section-header {
133
+ flex-direction: column;
134
+ align-items: flex-start;
135
+ }
136
+
137
+ .diff-commit-section-meta {
138
+ width: 100%;
139
+ justify-content: flex-start;
140
+ }
141
+
142
+ .diff-split-line:first-child {
143
+ border-right: none;
144
+ border-bottom: 1px solid var(--color-divider);
145
+ }
146
+
147
+ .markdown-toolbar {
148
+ overflow-x: auto;
149
+ flex-wrap: nowrap;
150
+ scrollbar-width: thin;
151
+ }
152
+
153
+ .outline-panel {
154
+ position: absolute;
155
+ inset: 0;
156
+ width: auto;
157
+ border-top: 1px solid var(--color-divider);
158
+ border-left: none;
159
+ background: oklch(from var(--color-surface) l c h / 0.98);
160
+ backdrop-filter: blur(10px);
161
+ box-shadow: var(--shadow-lg);
162
+ z-index: 6;
163
+ }
164
+
165
+ .outline-panel.hidden {
166
+ display: none !important;
167
+ }
168
+
169
+ #outlineToggle {
170
+ display: inline-flex !important;
171
+ }
172
+
173
+ .toolbar {
174
+ padding: 0 var(--space-2);
175
+ }
176
+
177
+ .toolbar-room-name {
178
+ max-width: 120px;
179
+ font-size: var(--text-xs);
180
+ }
181
+
182
+ .chat-panel {
183
+ position: fixed;
184
+ top: calc(var(--toolbar-h) + var(--space-2));
185
+ right: var(--space-2);
186
+ left: var(--space-2);
187
+ width: auto;
188
+ max-height: calc(100vh - var(--toolbar-h) - var(--space-6));
189
+ }
190
+
191
+ .chat-form {
192
+ align-items: stretch;
193
+ }
194
+
195
+ .chat-send-btn {
196
+ padding-inline: var(--space-3);
197
+ }
198
+
199
+ .comment-card {
200
+ width: min(100vw - 32px, 520px);
201
+ max-height: min(72vh, 680px);
202
+ }
203
+
204
+ .comment-thread-card-actions {
205
+ width: 100%;
206
+ margin-left: 0;
207
+ justify-content: flex-start;
208
+ }
209
+
210
+ .comment-reaction-picker {
211
+ left: 0;
212
+ right: auto;
213
+ min-width: min(240px, calc(100vw - 64px));
214
+ }
215
+
216
+ .excalidraw-embed.is-maximized {
217
+ inset: var(--space-3);
218
+ width: auto;
219
+ }
220
+
221
+ .excalidraw-embed.is-maximized .excalidraw-embed-iframe {
222
+ height: auto !important;
223
+ }
224
+
225
+ .image-lightbox-toolbar {
226
+ top: var(--space-3);
227
+ left: var(--space-3);
228
+ right: var(--space-3);
229
+ flex-direction: column;
230
+ align-items: flex-start;
231
+ }
232
+
233
+ .image-lightbox-controls {
234
+ justify-content: flex-start;
235
+ }
236
+
237
+ .image-lightbox-btn {
238
+ flex: 0 0 auto;
239
+ }
240
+
241
+ .image-lightbox-image {
242
+ max-width: calc(100vw - (var(--space-4) * 2));
243
+ max-height: calc(100vh - (var(--space-4) * 2));
244
+ }
245
+ }
246
+
247
+ @media (min-width: 769px) {
248
+ .mobile-view-toggle {
249
+ display: none !important;
250
+ }
251
+ }
@@ -0,0 +1,314 @@
1
+ /* ===== APP SHELL ===== */
2
+
3
+ .app-shell {
4
+ display: flex;
5
+ height: 100dvh;
6
+ overflow: hidden;
7
+ }
8
+
9
+ .main-area {
10
+ flex: 1;
11
+ display: flex;
12
+ flex-direction: column;
13
+ min-width: 0;
14
+ overflow: hidden;
15
+ }
16
+
17
+ .editor-layout {
18
+ position: relative;
19
+ display: flex;
20
+ flex: 1;
21
+ overflow: hidden;
22
+ }
23
+
24
+ .editor-pane,
25
+ .preview-pane {
26
+ display: flex;
27
+ flex-direction: column;
28
+ overflow: hidden;
29
+ }
30
+
31
+ .editor-pane,
32
+ .preview-pane {
33
+ flex: 1;
34
+ min-width: 200px;
35
+ }
36
+
37
+ .pane-header {
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: space-between;
41
+ flex-shrink: 0;
42
+ height: 28px;
43
+ padding: var(--space-1) var(--space-3);
44
+ border-bottom: 1px solid var(--color-divider);
45
+ background: var(--color-surface-offset);
46
+ }
47
+
48
+ .pane-header-actions {
49
+ display: flex;
50
+ align-items: center;
51
+ gap: var(--space-1);
52
+ }
53
+
54
+ .pane-header-meta {
55
+ display: flex;
56
+ align-items: baseline;
57
+ gap: var(--space-3);
58
+ min-width: 0;
59
+ }
60
+
61
+ .pane-label {
62
+ color: var(--color-text-muted);
63
+ text-transform: uppercase;
64
+ letter-spacing: 0.06em;
65
+ font-size: var(--text-meta);
66
+ font-weight: 500;
67
+ }
68
+
69
+ .pane-label-meta {
70
+ color: var(--color-text-muted);
71
+ font-family: var(--font-mono);
72
+ font-size: var(--text-meta);
73
+ }
74
+
75
+ .resizer {
76
+ position: relative;
77
+ z-index: 5;
78
+ width: 4px;
79
+ flex-shrink: 0;
80
+ background: var(--color-divider);
81
+ cursor: col-resize;
82
+ transition: background var(--transition-interactive);
83
+ }
84
+
85
+ .resizer:hover,
86
+ .resizer.dragging {
87
+ background: var(--color-primary);
88
+ }
89
+
90
+ .resizer::after {
91
+ content: '';
92
+ position: absolute;
93
+ top: 0;
94
+ right: -6px;
95
+ bottom: 0;
96
+ left: -6px;
97
+ }
98
+
99
+ .editor-container {
100
+ position: relative;
101
+ flex: 1;
102
+ overflow: hidden;
103
+ background: var(--color-bg);
104
+ }
105
+
106
+ .editor-container > .editor-loading {
107
+ position: absolute;
108
+ inset: 0;
109
+ z-index: 2;
110
+ background: var(--color-bg);
111
+ }
112
+
113
+ .editor-container.is-loading-editor .cm-editor {
114
+ visibility: hidden;
115
+ }
116
+
117
+ .editor-container .cm-editor {
118
+ height: 100%;
119
+ font-family: var(--font-mono);
120
+ font-size: var(--text-ui-md);
121
+ }
122
+
123
+ .editor-container .cm-editor .cm-scroller {
124
+ overflow: auto;
125
+ font-family: var(--font-mono);
126
+ }
127
+
128
+ .editor-container .cm-editor.cm-focused {
129
+ outline: none;
130
+ }
131
+
132
+ .cm-editor .cm-ySelectionInfo {
133
+ position: absolute;
134
+ top: -1.2em;
135
+ left: -1px;
136
+ z-index: 10;
137
+ padding: 1px 4px;
138
+ border-radius: var(--radius-2xs) var(--radius-2xs) var(--radius-2xs) 0;
139
+ opacity: 1;
140
+ white-space: nowrap;
141
+ transition: opacity 0.3s;
142
+ font-family: var(--font-body);
143
+ font-size: var(--text-meta);
144
+ font-weight: 600;
145
+ }
146
+
147
+ .preview-body {
148
+ --preview-floating-sidebar-gap: var(--space-3);
149
+ --preview-floating-comments-width: var(--panel-comments-width);
150
+ --preview-floating-outline-width: var(--panel-outline-width);
151
+ --preview-content-max-width: var(--preview-content-width);
152
+ --preview-comment-rail-inset: 10px;
153
+ position: relative;
154
+ display: flex;
155
+ flex: 1;
156
+ min-height: 0;
157
+ overflow: hidden;
158
+ }
159
+
160
+ .preview-container {
161
+ flex: 1;
162
+ min-width: 0;
163
+ overflow-x: hidden;
164
+ overflow-y: auto;
165
+ background: var(--color-bg);
166
+ overscroll-behavior: contain;
167
+ }
168
+
169
+ .preview-content {
170
+ --preview-comment-rail-reserved: 0px;
171
+ --preview-comment-rail-offset: 0px;
172
+ position: relative;
173
+ min-width: 0;
174
+ max-width: var(--preview-content-max-width);
175
+ margin: 0 auto;
176
+ overflow: visible;
177
+ padding: var(--space-6) calc(var(--space-6) + var(--preview-comment-rail-reserved)) var(--space-12) var(--space-6);
178
+ color: var(--color-text);
179
+ font-family: var(--font-body);
180
+ font-size: var(--text-sm);
181
+ line-height: 1.7;
182
+ }
183
+
184
+ .preview-content[data-render-phase='shell'] {
185
+ color: var(--color-text-muted);
186
+ }
187
+
188
+ @media (min-width: 769px) {
189
+ .preview-content {
190
+ padding-bottom: calc(var(--space-12) + 96px);
191
+ }
192
+ }
193
+
194
+ .preview-content.is-excalidraw-file-preview {
195
+ position: relative;
196
+ display: flex;
197
+ box-sizing: border-box;
198
+ width: 100%;
199
+ min-height: 100%;
200
+ height: 100%;
201
+ max-width: none;
202
+ margin: 0;
203
+ padding: var(--space-3);
204
+ }
205
+
206
+ .preview-content.is-image-file-preview {
207
+ position: relative;
208
+ display: flex;
209
+ box-sizing: border-box;
210
+ width: 100%;
211
+ min-height: 100%;
212
+ max-width: none;
213
+ margin: 0;
214
+ padding: var(--space-4);
215
+ }
216
+
217
+ .preview-content.is-plantuml-file-preview,
218
+ .preview-content.is-mermaid-file-preview {
219
+ width: 100%;
220
+ min-height: 100%;
221
+ max-width: none;
222
+ }
223
+
224
+ .preview-content.is-mermaid-file-preview [data-preview-render-host='true'],
225
+ .preview-content.is-plantuml-file-preview [data-preview-render-host='true'] {
226
+ min-height: 100%;
227
+ }
228
+
229
+ .preview-content.is-excalidraw-file-preview [data-preview-render-host='true'],
230
+ .preview-content.is-image-file-preview [data-preview-render-host='true'] {
231
+ display: flex;
232
+ flex: 1;
233
+ min-width: 0;
234
+ min-height: 100%;
235
+ }
236
+
237
+ .image-file-preview-shell {
238
+ display: flex;
239
+ align-items: center;
240
+ justify-content: center;
241
+ width: 100%;
242
+ min-height: 100%;
243
+ margin: 0;
244
+ }
245
+
246
+ .image-file-preview-image {
247
+ max-width: min(100%, 1200px);
248
+ max-height: calc(100vh - 180px);
249
+ object-fit: contain;
250
+ border-radius: var(--radius-lg);
251
+ background: var(--color-surface);
252
+ box-shadow: var(--shadow-lg);
253
+ }
254
+
255
+ .preview-content.is-mermaid-file-preview .mermaid-shell,
256
+ .preview-content.is-plantuml-file-preview .plantuml-shell {
257
+ min-height: 100%;
258
+ margin: 0;
259
+ }
260
+
261
+ .preview-content.is-excalidraw-file-preview .excalidraw-embed,
262
+ .preview-content.is-excalidraw-file-preview .excalidraw-embed-placeholder {
263
+ width: 100%;
264
+ min-height: 100%;
265
+ margin: 0;
266
+ }
267
+
268
+ .preview-content.is-excalidraw-file-preview .excalidraw-embed {
269
+ display: flex;
270
+ flex-direction: column;
271
+ height: 100%;
272
+ }
273
+
274
+ .preview-content.is-excalidraw-file-preview .excalidraw-embed-placeholder {
275
+ display: flex;
276
+ align-items: stretch;
277
+ }
278
+
279
+ .preview-content.is-excalidraw-file-preview .preview-shell {
280
+ width: 100%;
281
+ min-height: 100%;
282
+ }
283
+
284
+ .preview-content.is-excalidraw-file-preview .excalidraw-embed-iframe {
285
+ flex: 1;
286
+ min-height: 0;
287
+ height: 100% !important;
288
+ }
289
+
290
+ .preview-content.is-excalidraw-file-preview .excalidraw-embed-resizer {
291
+ display: none;
292
+ }
293
+
294
+ .preview-content.is-excalidraw-file-preview .excalidraw-embed.is-maximized {
295
+ position: absolute;
296
+ inset: var(--space-3);
297
+ z-index: 2;
298
+ box-sizing: border-box;
299
+ max-width: calc(100% - (var(--space-3) * 2));
300
+ margin: 0;
301
+ }
302
+
303
+ .preview-content.is-excalidraw-file-preview .excalidraw-embed.is-maximized .excalidraw-embed-iframe {
304
+ height: 100% !important;
305
+ }
306
+
307
+ .preview-shell {
308
+ display: flex;
309
+ align-items: center;
310
+ justify-content: center;
311
+ min-height: 60vh;
312
+ color: var(--color-text-muted);
313
+ font-size: var(--text-sm);
314
+ }