@mosetta/editor 0.0.0-stage → 0.0.29

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 (115) hide show
  1. package/CHANGELOG.md +190 -0
  2. package/LICENSE +21 -0
  3. package/README.md +10 -2
  4. package/mosetta.json +6 -0
  5. package/package.json +35 -3
  6. package/prefabs/workbench/prefab.json +11 -0
  7. package/prefabs/workbench/versions/1.json +120 -0
  8. package/prefabs/workbench/versions/2.json +13 -0
  9. package/prefabs/workbench/versions/3.json +19 -0
  10. package/prefabs/workbench/versions/4.json +29 -0
  11. package/prefabs/workbench/versions/5.json +29 -0
  12. package/tiles/canvas/canvas.component.tsx +2038 -0
  13. package/tiles/canvas/canvas.css +973 -0
  14. package/tiles/canvas/canvasTools.ts +66 -0
  15. package/tiles/canvas/chromeNodes.ts +35 -0
  16. package/tiles/canvas/ghosts.ts +33 -0
  17. package/tiles/canvas/insertPopover.tsx +56 -0
  18. package/tiles/canvas/popoverPlacement.ts +104 -0
  19. package/tiles/canvas/popoverSize.ts +87 -0
  20. package/tiles/canvas/providerChrome.tsx +191 -0
  21. package/tiles/canvas/scrollWatch.ts +43 -0
  22. package/tiles/canvas/settingsPopover.tsx +257 -0
  23. package/tiles/canvas/settingsTabs.ts +78 -0
  24. package/tiles/canvas/toolPanel.tsx +86 -0
  25. package/tiles/content/autoBind.ts +61 -0
  26. package/tiles/content/blockPage.css +390 -0
  27. package/tiles/content/blockPage.tsx +379 -0
  28. package/tiles/content/blockPicker.css +215 -0
  29. package/tiles/content/blockPicker.tsx +501 -0
  30. package/tiles/content/blockUpgrades.ts +145 -0
  31. package/tiles/content/blockVariants.ts +185 -0
  32. package/tiles/content/blockVocabulary.ts +77 -0
  33. package/tiles/content/catalogVersions.ts +106 -0
  34. package/tiles/content/componentPreview.css +82 -0
  35. package/tiles/content/componentPreview.tsx +249 -0
  36. package/tiles/content/content.server.ts +593 -0
  37. package/tiles/content/contentCommon.ts +133 -0
  38. package/tiles/content/disconnected.ts +56 -0
  39. package/tiles/content/distributions.css +256 -0
  40. package/tiles/content/distributions.tsx +271 -0
  41. package/tiles/content/editingAutosave.ts +125 -0
  42. package/tiles/content/editingClipboard.ts +185 -0
  43. package/tiles/content/editingConflicts.ts +223 -0
  44. package/tiles/content/editingHotkeys.ts +59 -0
  45. package/tiles/content/editingNotices.ts +105 -0
  46. package/tiles/content/formRoot.ts +18 -0
  47. package/tiles/content/fuzzySearch.ts +121 -0
  48. package/tiles/content/mediaUpload.ts +55 -0
  49. package/tiles/content/moduleSiblings.ts +9 -0
  50. package/tiles/content/mountedTree.ts +136 -0
  51. package/tiles/content/nodeSettings.css +483 -0
  52. package/tiles/content/nodeSettings.tsx +963 -0
  53. package/tiles/content/pasteText.ts +131 -0
  54. package/tiles/content/prefabFields.tsx +158 -0
  55. package/tiles/content/prefabParts.ts +105 -0
  56. package/tiles/content/previewEnvironment.ts +46 -0
  57. package/tiles/content/projectConfig.ts +46 -0
  58. package/tiles/content/projectPrefabs.ts +57 -0
  59. package/tiles/content/publishModal.css +109 -0
  60. package/tiles/content/publishModal.tsx +92 -0
  61. package/tiles/content/refsEditing.ts +412 -0
  62. package/tiles/content/scaledStage.ts +63 -0
  63. package/tiles/content/searchField.css +32 -0
  64. package/tiles/content/searchField.tsx +32 -0
  65. package/tiles/content/settingsDraft.ts +178 -0
  66. package/tiles/content/settingsIssues.tsx +124 -0
  67. package/tiles/content/themeScope.ts +72 -0
  68. package/tiles/content/themeVariables.ts +47 -0
  69. package/tiles/content/tooltipPlacement.ts +17 -0
  70. package/tiles/content/tooltips.tsx +131 -0
  71. package/tiles/content/treeMounter.ts +33 -0
  72. package/tiles/content/updatesModal.css +124 -0
  73. package/tiles/content/updatesModal.tsx +110 -0
  74. package/tiles/content/useCtrlHeld.ts +24 -0
  75. package/tiles/content/useEditingSession.ts +115 -0
  76. package/tiles/content/useMountedTree.ts +47 -0
  77. package/tiles/content/workbenchScale.css +27 -0
  78. package/tiles/hostFallback/hostFallback.component.tsx +32 -0
  79. package/tiles/hostFallback/hostFallback.css +12 -0
  80. package/tiles/hostFallback/hostFallback.editor.tsx +10 -0
  81. package/tiles/page/page.component.tsx +7 -0
  82. package/tiles/page/page.script.tsx +5 -0
  83. package/tiles/pageModules/pageModules.component.tsx +740 -0
  84. package/tiles/pageModules/pageModules.css +383 -0
  85. package/tiles/pageModules/pageModules.icon.svg +1 -0
  86. package/tiles/pageModules/servedPage.ts +465 -0
  87. package/tiles/pagesPanel/pagesPanel.component.tsx +1645 -0
  88. package/tiles/pagesPanel/pagesPanel.css +713 -0
  89. package/tiles/pagesPanel/pagesPanel.editor.tsx +23 -0
  90. package/tiles/pagesPanel/pagesSearch.ts +194 -0
  91. package/tiles/pagesPanel/routeTree.ts +98 -0
  92. package/tiles/previewBridge/landing.ts +66 -0
  93. package/tiles/previewBridge/previewAgent.ts +457 -0
  94. package/tiles/previewBridge/previewBridge.component.tsx +137 -0
  95. package/tiles/previewBridge/previewBridge.editor.tsx +10 -0
  96. package/tiles/previewBridge/previewBridgeCommon.ts +172 -0
  97. package/tiles/previewBridge/standIn.ts +22 -0
  98. package/tiles/treeView/treeView.component.tsx +514 -0
  99. package/tiles/treeView/treeView.css +303 -0
  100. package/tiles/treeView/treeView.editor.tsx +12 -0
  101. package/tiles/workbench/assistant.css +401 -0
  102. package/tiles/workbench/assistant.tsx +516 -0
  103. package/tiles/workbench/assistantChat.ts +165 -0
  104. package/tiles/workbench/dictation.ts +354 -0
  105. package/tiles/workbench/projectInfo.ts +72 -0
  106. package/tiles/workbench/recent.ts +67 -0
  107. package/tiles/workbench/workbench.component.tsx +476 -0
  108. package/tiles/workbench/workbench.css +376 -0
  109. package/tiles/workbench/workbenchAddress.ts +202 -0
  110. package/tiles/workbench/workspace.ts +775 -0
  111. package/tiles/workbenchEditor/workbenchEditor.component.tsx +461 -0
  112. package/tiles/workbenchEditor/workbenchEditor.css +370 -0
  113. package/tiles/workbenchHome/workbenchHome.component.tsx +196 -0
  114. package/tiles/workbenchHome/workbenchHome.css +271 -0
  115. package/tsconfig.json +3 -0
@@ -0,0 +1,271 @@
1
+ /* Home of the workbench: the project card, the site in its window, the facts beside it. */
2
+
3
+ /* ---- home ----------------------------------------------------------------------------------- */
4
+
5
+ .workbench__home {
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 22px;
9
+ min-height: 0;
10
+ padding: 28px 32px;
11
+ overflow-y: auto;
12
+ }
13
+
14
+ .workbench__home-head {
15
+ display: flex;
16
+ align-items: center;
17
+ gap: 16px;
18
+ }
19
+
20
+ .workbench__home-mosaic {
21
+ flex: none;
22
+ border-radius: 10px;
23
+ }
24
+
25
+ .workbench__home-name {
26
+ margin: 0;
27
+ font-size: calc(var(--mosetta-wb-font) + 10px);
28
+ font-weight: 700;
29
+ line-height: 1.2;
30
+ }
31
+
32
+ .workbench__home-addresses {
33
+ display: flex;
34
+ flex-wrap: wrap;
35
+ gap: 4px 14px;
36
+ margin-top: 4px;
37
+ }
38
+
39
+ .workbench__home-address {
40
+ display: inline-flex;
41
+ align-items: center;
42
+ gap: 3px;
43
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
44
+ font-size: var(--mosetta-wb-font-sm);
45
+ color: var(--wb-muted);
46
+ text-decoration: none;
47
+ }
48
+
49
+ .workbench__home-address:hover {
50
+ color: var(--wb-blue);
51
+ }
52
+
53
+ .workbench__home-address svg {
54
+ width: var(--mosetta-wb-icon-sm);
55
+ height: var(--mosetta-wb-icon-sm);
56
+ }
57
+
58
+ /* the body: the site's window on the left, the facts on the right — half and half on a wide
59
+ screen, stacked where there is no room for two */
60
+ .workbench__home-body {
61
+ display: grid;
62
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
63
+ gap: 20px;
64
+ align-items: start;
65
+ }
66
+
67
+ @media (max-width: 1100px) {
68
+ .workbench__home-body {
69
+ grid-template-columns: minmax(0, 1fr);
70
+ }
71
+ }
72
+
73
+ .workbench__home-card {
74
+ display: flex;
75
+ flex-direction: column;
76
+ min-width: 0;
77
+ border: 1px solid var(--wb-border);
78
+ border-radius: 12px;
79
+ background: #ffffff;
80
+ overflow: hidden;
81
+ }
82
+
83
+ .workbench__home-card-head {
84
+ display: flex;
85
+ flex-wrap: wrap;
86
+ align-items: center;
87
+ gap: 8px 12px;
88
+ padding: 10px 14px;
89
+ border-bottom: 1px solid var(--wb-border);
90
+ background: #fafafa;
91
+ }
92
+
93
+ .workbench__home-card-title {
94
+ font-weight: 600;
95
+ }
96
+
97
+ .workbench__home-card-actions {
98
+ display: flex;
99
+ gap: 8px;
100
+ margin-left: auto;
101
+ }
102
+
103
+ /* the site at 16:10 of its half, never taller than the screen allows */
104
+ .workbench__home-preview {
105
+ position: relative;
106
+ aspect-ratio: 16 / 10;
107
+ min-height: 280px;
108
+ max-height: 72vh;
109
+ background: #f4f4f5;
110
+ overflow: hidden;
111
+ }
112
+
113
+ /* the frame is laid out at a desktop's size and scaled down from its top-left corner into the
114
+ box (the size and the scale are set inline, from the box's measure) */
115
+ .workbench__home-frame {
116
+ position: absolute;
117
+ top: 0;
118
+ left: 0;
119
+ border: 0;
120
+ background: #ffffff;
121
+ transform-origin: 0 0;
122
+ transition: filter 320ms ease, opacity 320ms ease;
123
+ }
124
+
125
+ /* loading: the frame behind a blur, a spinner over it — the page arrives into focus */
126
+ .workbench__home-preview--loading .workbench__home-frame {
127
+ filter: blur(6px);
128
+ opacity: 0.6;
129
+ }
130
+
131
+ .workbench__home-veil {
132
+ position: absolute;
133
+ inset: 0;
134
+ display: flex;
135
+ align-items: center;
136
+ justify-content: center;
137
+ background: rgb(255 255 255 / 35%);
138
+ pointer-events: none;
139
+ }
140
+
141
+ .workbench__spinner {
142
+ width: 28px;
143
+ height: 28px;
144
+ border: 3px solid rgb(37 99 235 / 20%);
145
+ border-top-color: var(--wb-blue);
146
+ border-radius: 50%;
147
+ animation: workbench-spin 0.8s linear infinite;
148
+ }
149
+
150
+ @keyframes workbench-spin {
151
+ to { transform: rotate(360deg); }
152
+ }
153
+
154
+ /* the facts: cards in a column — the counts side by side, the address, the live routes */
155
+ .workbench__home-facts {
156
+ display: flex;
157
+ flex-direction: column;
158
+ gap: 12px;
159
+ min-width: 0;
160
+ }
161
+
162
+ .workbench__home-fact-row {
163
+ display: grid;
164
+ grid-template-columns: 1fr 1fr;
165
+ gap: 12px;
166
+ }
167
+
168
+ .workbench__home-fact {
169
+ display: flex;
170
+ flex-direction: column;
171
+ gap: 2px;
172
+ min-width: 0;
173
+ padding: 14px 16px;
174
+ border: 1px solid var(--wb-border);
175
+ border-radius: 10px;
176
+ background: #ffffff;
177
+ font: inherit;
178
+ text-align: left;
179
+ }
180
+
181
+ .workbench__home-fact--button {
182
+ cursor: pointer;
183
+ }
184
+
185
+ .workbench__home-fact--button:hover {
186
+ border-color: #c4c4c9;
187
+ background: #fafafa;
188
+ }
189
+
190
+ .workbench__home-fact-value {
191
+ font-size: calc(var(--mosetta-wb-font) + 10px);
192
+ font-weight: 600;
193
+ line-height: 1.2;
194
+ }
195
+
196
+ .workbench__home-fact-value--address {
197
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
198
+ font-size: calc(var(--mosetta-wb-font) + 2px);
199
+ overflow: hidden;
200
+ text-overflow: ellipsis;
201
+ white-space: nowrap;
202
+ }
203
+
204
+ .workbench__home-fact-label {
205
+ font-size: var(--mosetta-wb-font-xs);
206
+ color: var(--wb-muted);
207
+ }
208
+
209
+ .workbench__home-route-list {
210
+ display: flex;
211
+ flex-direction: column;
212
+ gap: 1px;
213
+ margin: 6px 0 0;
214
+ padding: 0;
215
+ list-style: none;
216
+ }
217
+
218
+ .workbench__home-route {
219
+ display: flex;
220
+ align-items: center;
221
+ gap: 8px;
222
+ width: 100%;
223
+ padding: 4px 6px;
224
+ margin: 0 -6px;
225
+ border: 0;
226
+ border-radius: 6px;
227
+ background: none;
228
+ font: inherit;
229
+ text-align: left;
230
+ cursor: pointer;
231
+ }
232
+
233
+ .workbench__home-route:hover {
234
+ background: #f4f4f5;
235
+ }
236
+
237
+ .workbench__home-route-path {
238
+ min-width: 0;
239
+ overflow: hidden;
240
+ text-overflow: ellipsis;
241
+ white-space: nowrap;
242
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
243
+ font-size: var(--mosetta-wb-font-sm);
244
+ color: var(--wb-ink);
245
+ }
246
+
247
+ .workbench__home-route-rev {
248
+ margin-left: auto;
249
+ padding: 0 6px;
250
+ border-radius: 4px;
251
+ font-size: var(--mosetta-wb-font-xs);
252
+ color: #166534;
253
+ background: #d3f2dc;
254
+ }
255
+
256
+ .workbench__home-route-more {
257
+ padding: 4px 0;
258
+ font-size: var(--mosetta-wb-font-xs);
259
+ color: var(--wb-muted);
260
+ }
261
+
262
+ /* the facts and the routes are links now (they move in place): no underline, the card's own colours */
263
+ .workbench__home-fact--button,
264
+ .workbench__home-route {
265
+ color: inherit;
266
+ text-decoration: none;
267
+ }
268
+
269
+ a.workbench__button {
270
+ text-decoration: none;
271
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "@mosetta/core/tsconfig.base.json"
3
+ }