@mosetta/editor 0.0.0-stage → 0.0.28
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.
- package/CHANGELOG.md +185 -0
- package/LICENSE +21 -0
- package/README.md +10 -2
- package/mosetta.json +6 -0
- package/package.json +35 -3
- package/prefabs/workbench/prefab.json +11 -0
- package/prefabs/workbench/versions/1.json +120 -0
- package/prefabs/workbench/versions/2.json +13 -0
- package/prefabs/workbench/versions/3.json +19 -0
- package/prefabs/workbench/versions/4.json +29 -0
- package/prefabs/workbench/versions/5.json +29 -0
- package/tiles/canvas/canvas.component.tsx +2038 -0
- package/tiles/canvas/canvas.css +973 -0
- package/tiles/canvas/canvasTools.ts +66 -0
- package/tiles/canvas/chromeNodes.ts +35 -0
- package/tiles/canvas/ghosts.ts +33 -0
- package/tiles/canvas/insertPopover.tsx +56 -0
- package/tiles/canvas/popoverPlacement.ts +104 -0
- package/tiles/canvas/popoverSize.ts +87 -0
- package/tiles/canvas/providerChrome.tsx +191 -0
- package/tiles/canvas/scrollWatch.ts +43 -0
- package/tiles/canvas/settingsPopover.tsx +257 -0
- package/tiles/canvas/settingsTabs.ts +78 -0
- package/tiles/canvas/toolPanel.tsx +86 -0
- package/tiles/content/autoBind.ts +61 -0
- package/tiles/content/blockPage.css +390 -0
- package/tiles/content/blockPage.tsx +379 -0
- package/tiles/content/blockPicker.css +215 -0
- package/tiles/content/blockPicker.tsx +501 -0
- package/tiles/content/blockUpgrades.ts +145 -0
- package/tiles/content/blockVariants.ts +185 -0
- package/tiles/content/blockVocabulary.ts +77 -0
- package/tiles/content/catalogVersions.ts +106 -0
- package/tiles/content/componentPreview.css +82 -0
- package/tiles/content/componentPreview.tsx +249 -0
- package/tiles/content/content.server.ts +593 -0
- package/tiles/content/contentCommon.ts +133 -0
- package/tiles/content/disconnected.ts +56 -0
- package/tiles/content/distributions.css +256 -0
- package/tiles/content/distributions.tsx +271 -0
- package/tiles/content/editingAutosave.ts +125 -0
- package/tiles/content/editingClipboard.ts +185 -0
- package/tiles/content/editingConflicts.ts +223 -0
- package/tiles/content/editingHotkeys.ts +59 -0
- package/tiles/content/editingNotices.ts +105 -0
- package/tiles/content/formRoot.ts +18 -0
- package/tiles/content/fuzzySearch.ts +121 -0
- package/tiles/content/mediaUpload.ts +55 -0
- package/tiles/content/moduleSiblings.ts +9 -0
- package/tiles/content/mountedTree.ts +136 -0
- package/tiles/content/nodeSettings.css +483 -0
- package/tiles/content/nodeSettings.tsx +963 -0
- package/tiles/content/pasteText.ts +131 -0
- package/tiles/content/prefabFields.tsx +158 -0
- package/tiles/content/prefabParts.ts +105 -0
- package/tiles/content/previewEnvironment.ts +46 -0
- package/tiles/content/projectConfig.ts +46 -0
- package/tiles/content/projectPrefabs.ts +57 -0
- package/tiles/content/publishModal.css +109 -0
- package/tiles/content/publishModal.tsx +92 -0
- package/tiles/content/refsEditing.ts +412 -0
- package/tiles/content/scaledStage.ts +63 -0
- package/tiles/content/searchField.css +32 -0
- package/tiles/content/searchField.tsx +32 -0
- package/tiles/content/settingsDraft.ts +178 -0
- package/tiles/content/settingsIssues.tsx +124 -0
- package/tiles/content/themeScope.ts +72 -0
- package/tiles/content/themeVariables.ts +47 -0
- package/tiles/content/tooltipPlacement.ts +17 -0
- package/tiles/content/tooltips.tsx +131 -0
- package/tiles/content/treeMounter.ts +33 -0
- package/tiles/content/updatesModal.css +124 -0
- package/tiles/content/updatesModal.tsx +110 -0
- package/tiles/content/useCtrlHeld.ts +24 -0
- package/tiles/content/useEditingSession.ts +115 -0
- package/tiles/content/useMountedTree.ts +47 -0
- package/tiles/content/workbenchScale.css +27 -0
- package/tiles/hostFallback/hostFallback.component.tsx +32 -0
- package/tiles/hostFallback/hostFallback.css +12 -0
- package/tiles/hostFallback/hostFallback.editor.tsx +10 -0
- package/tiles/page/page.component.tsx +7 -0
- package/tiles/page/page.script.tsx +5 -0
- package/tiles/pageModules/pageModules.component.tsx +740 -0
- package/tiles/pageModules/pageModules.css +383 -0
- package/tiles/pageModules/pageModules.icon.svg +1 -0
- package/tiles/pageModules/servedPage.ts +465 -0
- package/tiles/pagesPanel/pagesPanel.component.tsx +1645 -0
- package/tiles/pagesPanel/pagesPanel.css +713 -0
- package/tiles/pagesPanel/pagesPanel.editor.tsx +23 -0
- package/tiles/pagesPanel/pagesSearch.ts +194 -0
- package/tiles/pagesPanel/routeTree.ts +98 -0
- package/tiles/previewBridge/landing.ts +66 -0
- package/tiles/previewBridge/previewAgent.ts +457 -0
- package/tiles/previewBridge/previewBridge.component.tsx +137 -0
- package/tiles/previewBridge/previewBridge.editor.tsx +10 -0
- package/tiles/previewBridge/previewBridgeCommon.ts +172 -0
- package/tiles/previewBridge/standIn.ts +22 -0
- package/tiles/treeView/treeView.component.tsx +514 -0
- package/tiles/treeView/treeView.css +303 -0
- package/tiles/treeView/treeView.editor.tsx +12 -0
- package/tiles/workbench/assistant.css +401 -0
- package/tiles/workbench/assistant.tsx +516 -0
- package/tiles/workbench/assistantChat.ts +165 -0
- package/tiles/workbench/dictation.ts +354 -0
- package/tiles/workbench/projectInfo.ts +72 -0
- package/tiles/workbench/recent.ts +67 -0
- package/tiles/workbench/workbench.component.tsx +476 -0
- package/tiles/workbench/workbench.css +376 -0
- package/tiles/workbench/workbenchAddress.ts +202 -0
- package/tiles/workbench/workspace.ts +775 -0
- package/tiles/workbenchEditor/workbenchEditor.component.tsx +461 -0
- package/tiles/workbenchEditor/workbenchEditor.css +370 -0
- package/tiles/workbenchHome/workbenchHome.component.tsx +196 -0
- package/tiles/workbenchHome/workbenchHome.css +271 -0
- package/tsconfig.json +3 -0
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
.pages-panel {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
font-family: ui-sans-serif, system-ui, sans-serif;
|
|
6
|
+
font-size: var(--mosetta-wb-font);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* the top bar: the search owns the width, the "+" keeps to the corner */
|
|
10
|
+
.pages-panel__bar {
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: 6px;
|
|
13
|
+
align-items: center;
|
|
14
|
+
padding: 6px 8px;
|
|
15
|
+
border-bottom: 1px solid #e4e4e7;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pages-panel__search {
|
|
19
|
+
flex: 1;
|
|
20
|
+
min-width: 0;
|
|
21
|
+
height: var(--mosetta-wb-icon-box);
|
|
22
|
+
padding: 0 8px;
|
|
23
|
+
border: 1px solid #d4d4d8;
|
|
24
|
+
border-radius: 5px;
|
|
25
|
+
font: inherit;
|
|
26
|
+
font-size: var(--mosetta-wb-font-sm);
|
|
27
|
+
color: #27272a;
|
|
28
|
+
background: #fff;
|
|
29
|
+
outline: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.pages-panel__search:focus {
|
|
33
|
+
border-color: #2563eb;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.pages-panel__create {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
width: var(--mosetta-wb-icon-box);
|
|
41
|
+
height: var(--mosetta-wb-icon-box);
|
|
42
|
+
flex: none;
|
|
43
|
+
padding: 0;
|
|
44
|
+
border: 0;
|
|
45
|
+
border-radius: 5px;
|
|
46
|
+
color: #2563eb;
|
|
47
|
+
background: none;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.pages-panel__create svg {
|
|
52
|
+
width: var(--mosetta-wb-icon);
|
|
53
|
+
height: var(--mosetta-wb-icon);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.pages-panel__create:hover {
|
|
57
|
+
background: #e4e4e7;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.pages-panel__groups {
|
|
61
|
+
overflow-y: auto;
|
|
62
|
+
padding: 4px 0 8px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* groups keep path families (/a…, then /b…) together in the order; no gap between them — the
|
|
66
|
+
rows read as one list */
|
|
67
|
+
.pages-panel__group {
|
|
68
|
+
list-style: none;
|
|
69
|
+
margin: 0;
|
|
70
|
+
padding: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.pages-panel__route-item {
|
|
74
|
+
margin: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* the route row OPENS the page; the chevron unfolds its versions; folded, the row names them as
|
|
78
|
+
tags right after the path — the path keeps its natural width, the tags take what is left */
|
|
79
|
+
.pages-panel__route {
|
|
80
|
+
box-sizing: border-box;
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
gap: 4px;
|
|
84
|
+
width: 100%;
|
|
85
|
+
padding: 3px 10px 3px 4px;
|
|
86
|
+
color: #27272a;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
outline: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.pages-panel__route:hover,
|
|
92
|
+
.pages-panel__route:focus-visible {
|
|
93
|
+
background: #f4f4f5;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.pages-panel__route-item[data-expanded] > .pages-panel__route {
|
|
97
|
+
background: #eff6ff;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.pages-panel__chevron {
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
flex: none;
|
|
105
|
+
width: var(--mosetta-wb-icon-box);
|
|
106
|
+
height: var(--mosetta-wb-icon-box);
|
|
107
|
+
padding: 0;
|
|
108
|
+
border: 0;
|
|
109
|
+
border-radius: 4px;
|
|
110
|
+
color: #a1a1aa;
|
|
111
|
+
background: none;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.pages-panel__chevron:hover {
|
|
116
|
+
color: #27272a;
|
|
117
|
+
background: #e4e4e7;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.pages-panel__chevron svg {
|
|
121
|
+
width: var(--mosetta-wb-icon-sm);
|
|
122
|
+
height: var(--mosetta-wb-icon-sm);
|
|
123
|
+
transition: transform 120ms ease;
|
|
124
|
+
transform: rotate(90deg); /* unfolded: pointing at what is under the row */
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.pages-panel__chevron[data-folded] svg {
|
|
128
|
+
transform: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* the compact list: the versions of the row behind a button at its end — stacked sheets, open =
|
|
132
|
+
pressed (the tree puts a chevron on the left instead, and nests the versions under the row) */
|
|
133
|
+
.pages-panel__versions {
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
flex: none;
|
|
138
|
+
width: var(--mosetta-wb-icon-box);
|
|
139
|
+
height: var(--mosetta-wb-icon-box);
|
|
140
|
+
margin-left: auto;
|
|
141
|
+
padding: 0;
|
|
142
|
+
border: 0;
|
|
143
|
+
border-radius: 4px;
|
|
144
|
+
color: #a1a1aa;
|
|
145
|
+
background: none;
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.pages-panel__versions svg {
|
|
150
|
+
width: var(--mosetta-wb-icon-sm);
|
|
151
|
+
height: var(--mosetta-wb-icon-sm);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.pages-panel__versions:hover,
|
|
155
|
+
.pages-panel__versions--open {
|
|
156
|
+
color: #27272a;
|
|
157
|
+
background: #e4e4e7;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* the tree's row carries its own actions (a draft from the live revision, the trash) at its end:
|
|
161
|
+
the row has the room, and the trash no longer hides under the drafts */
|
|
162
|
+
.pages-panel__route-actions {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
gap: 2px;
|
|
166
|
+
flex: none;
|
|
167
|
+
margin-left: auto;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* a folder of the tree: a prefix no page owns — quieter words, only the chevron answers */
|
|
171
|
+
.pages-panel__route--folder {
|
|
172
|
+
color: #71717a;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.pages-panel__route--folder .pages-panel__path {
|
|
176
|
+
font-style: italic;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* the compact list has no chevron column: the path gets its room from the row's padding */
|
|
180
|
+
.pages-panel--compact .pages-panel__route {
|
|
181
|
+
padding-left: 10px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* the tree's row actions: a glyph and a word each — the row has the room, and a word reads */
|
|
185
|
+
.pages-panel__route-button {
|
|
186
|
+
display: inline-flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
gap: 5px;
|
|
189
|
+
height: var(--mosetta-wb-icon-box);
|
|
190
|
+
padding: 0 8px 0 6px;
|
|
191
|
+
border: 1px solid transparent;
|
|
192
|
+
border-radius: 5px;
|
|
193
|
+
font: inherit;
|
|
194
|
+
font-size: var(--mosetta-wb-font-xs);
|
|
195
|
+
color: #52525b;
|
|
196
|
+
background: none;
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.pages-panel__route-button svg {
|
|
201
|
+
width: var(--mosetta-wb-icon-sm);
|
|
202
|
+
height: var(--mosetta-wb-icon-sm);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.pages-panel__route-button:hover {
|
|
206
|
+
border-color: #d4d4d8;
|
|
207
|
+
color: #18181b;
|
|
208
|
+
background: #fff;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.pages-panel__route-button--danger:hover {
|
|
212
|
+
border-color: #fecaca;
|
|
213
|
+
color: #b91c1c;
|
|
214
|
+
background: #fef2f2;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.pages-panel__route-button:disabled {
|
|
218
|
+
opacity: 0.5;
|
|
219
|
+
cursor: default;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* …and as a link (opens in a new tab): the same button, no underline */
|
|
223
|
+
a.pages-panel__route-button {
|
|
224
|
+
text-decoration: none;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* the version rows of the tree carry the same worded buttons, a little closer together */
|
|
228
|
+
.pages-panel__row-actions .pages-panel__route-button {
|
|
229
|
+
margin-left: 2px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* the tree: the versions nest under the row one level down — a thin rail under the next level's
|
|
233
|
+
chevron marks the nesting, and the rows start where that level's words would */
|
|
234
|
+
.pages-panel__expander--nested {
|
|
235
|
+
margin-top: 2px;
|
|
236
|
+
margin-bottom: 4px;
|
|
237
|
+
padding-top: 0;
|
|
238
|
+
padding-bottom: 2px;
|
|
239
|
+
border-left: 1px solid #e4e4e7;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* the tree reads at the content's width: rows breathe a little more than the compact list's */
|
|
243
|
+
.pages-panel--tree .pages-panel__groups {
|
|
244
|
+
padding: 6px 8px 12px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.pages-panel--tree .pages-panel__route {
|
|
248
|
+
padding-top: 4px;
|
|
249
|
+
padding-bottom: 4px;
|
|
250
|
+
border-radius: 6px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.pages-panel__path {
|
|
254
|
+
/* its natural width first (the tags get the rest); it shrinks with an ellipsis only when the
|
|
255
|
+
path alone is wider than the row */
|
|
256
|
+
flex: 0 1 auto;
|
|
257
|
+
min-width: 0;
|
|
258
|
+
overflow: hidden;
|
|
259
|
+
text-overflow: ellipsis;
|
|
260
|
+
white-space: nowrap;
|
|
261
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
262
|
+
font-size: var(--mosetta-wb-font-sm);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.pages-panel__path mark {
|
|
266
|
+
padding: 0;
|
|
267
|
+
border-radius: 2px;
|
|
268
|
+
color: inherit;
|
|
269
|
+
background: #fde68a;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.pages-panel__tags {
|
|
273
|
+
position: relative;
|
|
274
|
+
display: flex;
|
|
275
|
+
flex: 1 1 0;
|
|
276
|
+
justify-content: flex-start;
|
|
277
|
+
gap: 4px; /* TAG_GAP in pagesPanel.component.tsx */
|
|
278
|
+
margin-left: 4px;
|
|
279
|
+
min-width: 0;
|
|
280
|
+
overflow: hidden;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* ---- tags: a version named in one chip (the folded row, the version rows, the delete dialog) */
|
|
284
|
+
.pages-panel__tag {
|
|
285
|
+
flex: none;
|
|
286
|
+
padding: 1px 6px;
|
|
287
|
+
border: 0;
|
|
288
|
+
border-radius: 4px;
|
|
289
|
+
font: inherit;
|
|
290
|
+
font-size: var(--mosetta-wb-font-xs);
|
|
291
|
+
line-height: 1.4;
|
|
292
|
+
white-space: nowrap;
|
|
293
|
+
color: #27272a;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
button.pages-panel__tag {
|
|
297
|
+
cursor: pointer;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
button.pages-panel__tag:hover {
|
|
301
|
+
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 20%);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.pages-panel__tag--published {
|
|
305
|
+
background: #d3f2dc;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.pages-panel__tag--archived {
|
|
309
|
+
color: #71717a;
|
|
310
|
+
background: #ececee;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.pages-panel__tag--draft {
|
|
314
|
+
background: #fdf3d0;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* the platform's frozen page: a padlock, not a version */
|
|
318
|
+
.pages-panel__tag--locked {
|
|
319
|
+
display: inline-flex;
|
|
320
|
+
align-items: center;
|
|
321
|
+
color: #52525b;
|
|
322
|
+
background: #ececee;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.pages-panel__tag--locked svg {
|
|
326
|
+
width: var(--mosetta-wb-icon-sm);
|
|
327
|
+
height: var(--mosetta-wb-icon-sm);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.pages-panel__tag--more {
|
|
331
|
+
color: #52525b;
|
|
332
|
+
background: #ececee;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/* a tag the row has no room for: still rendered (its width is measured), out of the flow */
|
|
336
|
+
.pages-panel__tag--unfit {
|
|
337
|
+
position: absolute;
|
|
338
|
+
visibility: hidden;
|
|
339
|
+
pointer-events: none;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/* the created/found route flashes once — the eye lands where the action ended */
|
|
343
|
+
.pages-panel__route-item--flash > .pages-panel__route {
|
|
344
|
+
animation: pages-panel-flash 1.6s ease-out 1;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
@keyframes pages-panel-flash {
|
|
348
|
+
0% { background: #fde68a; }
|
|
349
|
+
100% { background: transparent; }
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/* the expander: published versions and drafts of one route; a row opens its version */
|
|
353
|
+
.pages-panel__expander {
|
|
354
|
+
padding: 2px 10px 6px 26px;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.pages-panel__row {
|
|
358
|
+
display: flex;
|
|
359
|
+
align-items: center;
|
|
360
|
+
justify-content: space-between;
|
|
361
|
+
gap: 8px;
|
|
362
|
+
padding: 1px 0;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* the whole-page row closes the expander: set apart by a hairline, the trash sits where every trash sits */
|
|
366
|
+
.pages-panel__page-row {
|
|
367
|
+
margin-top: 4px;
|
|
368
|
+
padding-top: 4px;
|
|
369
|
+
border-top: 1px solid #f4f4f5;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.pages-panel__row-label,
|
|
373
|
+
.pages-panel__row-open {
|
|
374
|
+
display: flex;
|
|
375
|
+
align-items: baseline;
|
|
376
|
+
gap: 6px;
|
|
377
|
+
min-width: 0;
|
|
378
|
+
overflow: hidden;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.pages-panel__row-open {
|
|
382
|
+
flex: 1;
|
|
383
|
+
padding: 2px 4px;
|
|
384
|
+
margin-left: -4px;
|
|
385
|
+
border: 0;
|
|
386
|
+
border-radius: 4px;
|
|
387
|
+
font: inherit;
|
|
388
|
+
text-align: left;
|
|
389
|
+
color: inherit;
|
|
390
|
+
background: none;
|
|
391
|
+
cursor: pointer;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.pages-panel__row-open:hover {
|
|
395
|
+
background: #f4f4f5;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* a publication's name beside its revision tag */
|
|
399
|
+
.pages-panel__row-name {
|
|
400
|
+
min-width: 0;
|
|
401
|
+
overflow: hidden;
|
|
402
|
+
text-overflow: ellipsis;
|
|
403
|
+
white-space: nowrap;
|
|
404
|
+
font-size: var(--mosetta-wb-font-sm);
|
|
405
|
+
color: #27272a;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.pages-panel__row-note {
|
|
409
|
+
overflow: hidden;
|
|
410
|
+
text-overflow: ellipsis;
|
|
411
|
+
white-space: nowrap;
|
|
412
|
+
font-size: var(--mosetta-wb-font-2xs);
|
|
413
|
+
color: #a1a1aa;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.pages-panel__row-note--moved {
|
|
417
|
+
color: #b45309;
|
|
418
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.pages-panel__row-actions {
|
|
422
|
+
display: flex;
|
|
423
|
+
gap: 2px;
|
|
424
|
+
flex: none;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.pages-panel__icon {
|
|
428
|
+
display: flex;
|
|
429
|
+
align-items: center;
|
|
430
|
+
justify-content: center;
|
|
431
|
+
width: var(--mosetta-wb-icon-box);
|
|
432
|
+
height: var(--mosetta-wb-icon-box);
|
|
433
|
+
padding: 0;
|
|
434
|
+
border: 0;
|
|
435
|
+
border-radius: 4px;
|
|
436
|
+
color: #52525b;
|
|
437
|
+
background: none;
|
|
438
|
+
cursor: pointer;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.pages-panel__icon svg {
|
|
442
|
+
width: var(--mosetta-wb-icon);
|
|
443
|
+
height: var(--mosetta-wb-icon);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.pages-panel__icon:hover {
|
|
447
|
+
background: #e4e4e7;
|
|
448
|
+
color: #2563eb;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.pages-panel__icon:disabled {
|
|
452
|
+
color: #d4d4d8;
|
|
453
|
+
cursor: default;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/* the armed trash: the second click is the destructive one, so it reads differently */
|
|
457
|
+
.pages-panel__confirm {
|
|
458
|
+
font-size: var(--mosetta-wb-font-sm);
|
|
459
|
+
font-weight: 700;
|
|
460
|
+
color: #dc2626;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.pages-panel__empty {
|
|
464
|
+
padding: 14px 10px;
|
|
465
|
+
color: #a1a1aa;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.pages-panel__loading {
|
|
469
|
+
padding: 8px;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.pages-panel__error {
|
|
473
|
+
padding: 2px 0;
|
|
474
|
+
color: #b00;
|
|
475
|
+
font-size: var(--mosetta-wb-font-xs);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/* the create modal: a fixed overlay — the panel may be short, the dialog must not be */
|
|
479
|
+
.pages-panel__modal-overlay {
|
|
480
|
+
position: fixed;
|
|
481
|
+
inset: 0;
|
|
482
|
+
z-index: 60;
|
|
483
|
+
display: flex;
|
|
484
|
+
align-items: flex-start;
|
|
485
|
+
justify-content: center;
|
|
486
|
+
padding-top: 12vh;
|
|
487
|
+
background: rgb(24 24 27 / 35%);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.pages-panel__modal {
|
|
491
|
+
display: flex;
|
|
492
|
+
flex-direction: column;
|
|
493
|
+
gap: 8px;
|
|
494
|
+
width: min(440px, calc(100vw - 32px));
|
|
495
|
+
max-height: 70vh;
|
|
496
|
+
overflow-y: auto;
|
|
497
|
+
padding: 12px;
|
|
498
|
+
border-radius: 8px;
|
|
499
|
+
font-family: ui-sans-serif, system-ui, sans-serif;
|
|
500
|
+
font-size: var(--mosetta-wb-font);
|
|
501
|
+
background: #fff;
|
|
502
|
+
box-shadow: 0 12px 32px rgb(0 0 0 / 25%);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.pages-panel__modal-title {
|
|
506
|
+
font-size: calc(var(--mosetta-wb-font) + 2px);
|
|
507
|
+
font-weight: 600;
|
|
508
|
+
color: #18181b;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/* the name the entity gets, said as the path is typed */
|
|
512
|
+
.pages-panel__modal-name {
|
|
513
|
+
font-size: var(--mosetta-wb-font-xs);
|
|
514
|
+
color: #71717a;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.pages-panel__modal-name code {
|
|
518
|
+
padding: 1px 5px;
|
|
519
|
+
border-radius: 4px;
|
|
520
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
521
|
+
font-size: var(--mosetta-wb-font-xs);
|
|
522
|
+
color: #27272a;
|
|
523
|
+
background: #f4f4f5;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.pages-panel__modal-submit {
|
|
527
|
+
height: calc(var(--mosetta-wb-icon-box) + 10px);
|
|
528
|
+
margin-top: 4px;
|
|
529
|
+
font-weight: 600;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.pages-panel__modal-input {
|
|
533
|
+
height: calc(var(--mosetta-wb-icon-box) + 6px);
|
|
534
|
+
padding: 0 10px;
|
|
535
|
+
border: 1px solid #d4d4d8;
|
|
536
|
+
border-radius: 6px;
|
|
537
|
+
font: inherit;
|
|
538
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
539
|
+
font-size: var(--mosetta-wb-font);
|
|
540
|
+
outline: none;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.pages-panel__modal-input:focus {
|
|
544
|
+
border-color: #2563eb;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.pages-panel__modal-hint {
|
|
548
|
+
padding: 6px 8px;
|
|
549
|
+
border: 0;
|
|
550
|
+
border-radius: 5px;
|
|
551
|
+
font: inherit;
|
|
552
|
+
font-size: var(--mosetta-wb-font-sm);
|
|
553
|
+
text-align: left;
|
|
554
|
+
color: #1d4ed8;
|
|
555
|
+
background: #eff6ff;
|
|
556
|
+
cursor: pointer;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.pages-panel__modal-caption {
|
|
560
|
+
font-size: var(--mosetta-wb-font-xs);
|
|
561
|
+
color: #71717a;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.pages-panel__modal-list {
|
|
565
|
+
list-style: none;
|
|
566
|
+
margin: 0;
|
|
567
|
+
padding: 0;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.pages-panel__modal-item {
|
|
571
|
+
display: block;
|
|
572
|
+
width: 100%;
|
|
573
|
+
padding: 4px 8px;
|
|
574
|
+
border: 0;
|
|
575
|
+
border-radius: 5px;
|
|
576
|
+
font: inherit;
|
|
577
|
+
font-size: var(--mosetta-wb-font-sm);
|
|
578
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
579
|
+
text-align: left;
|
|
580
|
+
color: #27272a;
|
|
581
|
+
background: none;
|
|
582
|
+
cursor: pointer;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.pages-panel__modal-item mark {
|
|
586
|
+
padding: 0;
|
|
587
|
+
color: inherit;
|
|
588
|
+
background: #fde68a;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.pages-panel__modal-item:hover {
|
|
592
|
+
background: #f4f4f5;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.pages-panel__modal-item--root {
|
|
596
|
+
font-family: inherit;
|
|
597
|
+
color: #1d4ed8;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.pages-panel__modal-item:disabled {
|
|
601
|
+
color: #a1a1aa;
|
|
602
|
+
cursor: default;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/* FROZEN while an action and the listing refetch after it run: the old list stays readable but
|
|
606
|
+
takes no clicks — a second click on a row about to change is the mistake this prevents */
|
|
607
|
+
.pages-panel--frozen .pages-panel__groups {
|
|
608
|
+
pointer-events: none;
|
|
609
|
+
opacity: 0.5;
|
|
610
|
+
transition: opacity 0.15s;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.pages-panel__working {
|
|
614
|
+
font-size: var(--mosetta-wb-font-xs);
|
|
615
|
+
color: #71717a;
|
|
616
|
+
white-space: nowrap;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/* ---- the delete-page dialog: the page as the panel shows it, in short — what goes ---- */
|
|
620
|
+
.pages-panel__delete {
|
|
621
|
+
gap: 10px;
|
|
622
|
+
padding: 16px;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.pages-panel__delete-title {
|
|
626
|
+
font-weight: 600;
|
|
627
|
+
font-size: calc(var(--mosetta-wb-font) + 1px);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.pages-panel__delete-text {
|
|
631
|
+
color: #52525b;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.pages-panel__delete-page {
|
|
635
|
+
display: flex;
|
|
636
|
+
flex-direction: column;
|
|
637
|
+
gap: 6px;
|
|
638
|
+
padding: 8px 10px;
|
|
639
|
+
border: 1px solid #fecaca;
|
|
640
|
+
border-radius: 6px;
|
|
641
|
+
background: #fef2f2;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.pages-panel__delete-path {
|
|
645
|
+
overflow-wrap: anywhere;
|
|
646
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
647
|
+
font-size: var(--mosetta-wb-font-sm);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.pages-panel__delete-versions {
|
|
651
|
+
display: flex;
|
|
652
|
+
flex-wrap: wrap;
|
|
653
|
+
gap: 4px;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.pages-panel__delete-buttons {
|
|
657
|
+
display: flex;
|
|
658
|
+
justify-content: flex-end;
|
|
659
|
+
gap: 8px;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.pages-panel__button {
|
|
663
|
+
height: calc(var(--mosetta-wb-icon-box) + 4px);
|
|
664
|
+
padding: 0 12px;
|
|
665
|
+
border: 1px solid #d4d4d8;
|
|
666
|
+
border-radius: 6px;
|
|
667
|
+
font: inherit;
|
|
668
|
+
color: #27272a;
|
|
669
|
+
background: #fff;
|
|
670
|
+
cursor: pointer;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.pages-panel__button:hover {
|
|
674
|
+
background: #f4f4f5;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/* the coloured buttons come AFTER the plain hover: the same specificity, the later rule wins —
|
|
678
|
+
the plain hover painted the primary one grey under white words */
|
|
679
|
+
.pages-panel__button--primary {
|
|
680
|
+
border-color: #2563eb;
|
|
681
|
+
color: #fff;
|
|
682
|
+
background: #2563eb;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.pages-panel__button--primary:hover {
|
|
686
|
+
border-color: #1d4ed8;
|
|
687
|
+
background: #1d4ed8;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.pages-panel__button--danger {
|
|
691
|
+
border-color: #dc2626;
|
|
692
|
+
color: #fff;
|
|
693
|
+
background: #dc2626;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.pages-panel__button--danger:hover {
|
|
697
|
+
background: #b91c1c;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.pages-panel__button:disabled {
|
|
701
|
+
opacity: 0.6;
|
|
702
|
+
cursor: default;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/* the list page asked for a list that does not exist */
|
|
706
|
+
.pages-panel--none {
|
|
707
|
+
padding: 24px;
|
|
708
|
+
color: #52525b;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.pages-panel--none a {
|
|
712
|
+
color: #2563eb;
|
|
713
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineEditorSide, useSettingsDraft } from '@mosetta/react';
|
|
2
|
+
import type { ContentKind } from '@mosetta/content';
|
|
3
|
+
|
|
4
|
+
export default defineEditorSide({
|
|
5
|
+
// the panel itself is the preview: mounted standalone it lists the app's pages live — its own
|
|
6
|
+
// DI, its own requests — which is exactly what a hovering user needs to recognize it
|
|
7
|
+
preview: 'self',
|
|
8
|
+
Component() {
|
|
9
|
+
const { draft, update } = useSettingsDraft<{ kind?: ContentKind }>();
|
|
10
|
+
return (
|
|
11
|
+
<label>
|
|
12
|
+
Lists
|
|
13
|
+
{' '}
|
|
14
|
+
<select data-field="kind"
|
|
15
|
+
value={draft.kind ?? 'pages'}
|
|
16
|
+
onChange={(e) => update({ kind: e.target.value as ContentKind })}>
|
|
17
|
+
<option value="pages">the pages</option>
|
|
18
|
+
<option value="prefabs">the prefabs</option>
|
|
19
|
+
</select>
|
|
20
|
+
</label>
|
|
21
|
+
);
|
|
22
|
+
},
|
|
23
|
+
});
|