mechanica 2.1.0-beta.7 → 2.2.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.
- package/README.md +29 -2
- package/dist/browser.js +2 -0
- package/dist/chunks/{assets-nujjbCx8.js → assets-5a2WdmFg.js} +67 -45
- package/dist/chunks/browser-BCfAv8bW.js +558 -0
- package/dist/chunks/{node-adapter-CSkDXYGO.js → node-adapter-Bm_SloHQ.js} +2 -2
- package/dist/chunks/{rich-text-codec-BSD35k2U.js → rich-text-codec-DCv1X0eZ.js} +8 -2
- package/dist/chunks/{site-DfazSr3_.js → site-BVqx8iKj.js} +1 -1
- package/dist/cli.js +462 -509
- package/dist/editor.css +63 -63
- package/dist/editor.js +5 -4
- package/dist/export.js +13 -5
- package/dist/plugin.js +4 -4
- package/dist/server.js +3 -3
- package/dist/types/cli/args.d.ts +12 -1
- package/dist/types/cli/browser.d.ts +116 -0
- package/dist/types/cli/dev-server.d.ts +13 -0
- package/dist/types/cli/headless.d.ts +25 -16
- package/dist/types/cli/platform/api.d.ts +0 -2
- package/dist/types/cli/platform/credentials.d.ts +22 -0
- package/dist/types/cli/platform/login.d.ts +8 -1
- package/dist/types/cli/platform/session.d.ts +31 -0
- package/dist/types/cli/shot.d.ts +105 -8
- package/package.json +6 -2
package/dist/editor.css
CHANGED
|
@@ -5027,7 +5027,7 @@ from {
|
|
|
5027
5027
|
justify-content: flex-end;
|
|
5028
5028
|
gap: 8px;
|
|
5029
5029
|
margin-top: 4px;
|
|
5030
|
-
}.mech-pages[data-v-
|
|
5030
|
+
}.mech-pages[data-v-56e0f852] {
|
|
5031
5031
|
display: flex;
|
|
5032
5032
|
align-items: stretch;
|
|
5033
5033
|
justify-content: center;
|
|
@@ -5036,7 +5036,7 @@ from {
|
|
|
5036
5036
|
max-width: 1200px;
|
|
5037
5037
|
height: min(620px, 82vh);
|
|
5038
5038
|
}
|
|
5039
|
-
.mech-pages__card[data-v-
|
|
5039
|
+
.mech-pages__card[data-v-56e0f852] {
|
|
5040
5040
|
display: flex;
|
|
5041
5041
|
flex-direction: column;
|
|
5042
5042
|
flex: 0 1 840px;
|
|
@@ -5046,20 +5046,20 @@ from {
|
|
|
5046
5046
|
box-shadow: var(--mech-shadow-dialog);
|
|
5047
5047
|
overflow: hidden;
|
|
5048
5048
|
}
|
|
5049
|
-
.mech-pages__header[data-v-
|
|
5049
|
+
.mech-pages__header[data-v-56e0f852] {
|
|
5050
5050
|
display: flex;
|
|
5051
5051
|
align-items: center;
|
|
5052
5052
|
gap: 10px;
|
|
5053
5053
|
padding: 18px 14px 12px 24px;
|
|
5054
5054
|
flex: none;
|
|
5055
5055
|
}
|
|
5056
|
-
.mech-pages__title[data-v-
|
|
5056
|
+
.mech-pages__title[data-v-56e0f852] {
|
|
5057
5057
|
margin: 0;
|
|
5058
5058
|
font-size: 16px;
|
|
5059
5059
|
font-weight: 600;
|
|
5060
5060
|
letter-spacing: -0.01em;
|
|
5061
5061
|
}
|
|
5062
|
-
.mech-pages__count[data-v-
|
|
5062
|
+
.mech-pages__count[data-v-56e0f852] {
|
|
5063
5063
|
padding: 2px 8px;
|
|
5064
5064
|
border-radius: var(--mech-radius-pill);
|
|
5065
5065
|
background: var(--mech-active);
|
|
@@ -5067,7 +5067,7 @@ from {
|
|
|
5067
5067
|
font-size: 11.5px;
|
|
5068
5068
|
font-weight: 600;
|
|
5069
5069
|
}
|
|
5070
|
-
.mech-pages__close[data-v-
|
|
5070
|
+
.mech-pages__close[data-v-56e0f852] {
|
|
5071
5071
|
display: flex;
|
|
5072
5072
|
align-items: center;
|
|
5073
5073
|
justify-content: center;
|
|
@@ -5080,25 +5080,25 @@ from {
|
|
|
5080
5080
|
border-radius: var(--mech-radius-pill);
|
|
5081
5081
|
cursor: pointer;
|
|
5082
5082
|
}
|
|
5083
|
-
.mech-pages__close .vicon[data-v-
|
|
5083
|
+
.mech-pages__close .vicon[data-v-56e0f852] {
|
|
5084
5084
|
width: 18px;
|
|
5085
5085
|
height: 18px;
|
|
5086
5086
|
}
|
|
5087
|
-
.mech-pages__close[data-v-
|
|
5087
|
+
.mech-pages__close[data-v-56e0f852]:hover {
|
|
5088
5088
|
background: var(--mech-hover);
|
|
5089
5089
|
color: var(--mech-fg);
|
|
5090
5090
|
}
|
|
5091
|
-
.mech-pages__toolbar[data-v-
|
|
5091
|
+
.mech-pages__toolbar[data-v-56e0f852] {
|
|
5092
5092
|
display: flex;
|
|
5093
5093
|
gap: 8px;
|
|
5094
5094
|
padding: 0 24px 12px;
|
|
5095
5095
|
flex: none;
|
|
5096
5096
|
}
|
|
5097
|
-
.mech-pages__search-wrap[data-v-
|
|
5097
|
+
.mech-pages__search-wrap[data-v-56e0f852] {
|
|
5098
5098
|
position: relative;
|
|
5099
5099
|
flex: 1;
|
|
5100
5100
|
}
|
|
5101
|
-
.mech-pages__filters[data-v-
|
|
5101
|
+
.mech-pages__filters[data-v-56e0f852] {
|
|
5102
5102
|
display: flex;
|
|
5103
5103
|
align-items: center;
|
|
5104
5104
|
justify-content: space-between;
|
|
@@ -5106,23 +5106,23 @@ from {
|
|
|
5106
5106
|
padding: 0 24px 14px;
|
|
5107
5107
|
flex: none;
|
|
5108
5108
|
}
|
|
5109
|
-
.mech-pages__sort[data-v-
|
|
5109
|
+
.mech-pages__sort[data-v-56e0f852] {
|
|
5110
5110
|
display: flex;
|
|
5111
5111
|
align-items: center;
|
|
5112
5112
|
gap: 9px;
|
|
5113
5113
|
}
|
|
5114
|
-
.mech-pages__sort-label[data-v-
|
|
5114
|
+
.mech-pages__sort-label[data-v-56e0f852] {
|
|
5115
5115
|
font-size: 10.5px;
|
|
5116
5116
|
font-weight: 600;
|
|
5117
5117
|
text-transform: uppercase;
|
|
5118
5118
|
letter-spacing: 0.05em;
|
|
5119
5119
|
color: var(--mech-muted);
|
|
5120
5120
|
}
|
|
5121
|
-
.mech-pages__toggle[data-v-
|
|
5121
|
+
.mech-pages__toggle[data-v-56e0f852] {
|
|
5122
5122
|
flex: none;
|
|
5123
5123
|
white-space: nowrap;
|
|
5124
5124
|
}
|
|
5125
|
-
.mech-pages__search-icon[data-v-
|
|
5125
|
+
.mech-pages__search-icon[data-v-56e0f852] {
|
|
5126
5126
|
position: absolute;
|
|
5127
5127
|
left: 12px;
|
|
5128
5128
|
top: 50%;
|
|
@@ -5132,18 +5132,18 @@ from {
|
|
|
5132
5132
|
color: var(--mech-muted);
|
|
5133
5133
|
pointer-events: none;
|
|
5134
5134
|
}
|
|
5135
|
-
.mech-pages__search[data-v-
|
|
5135
|
+
.mech-pages__search[data-v-56e0f852] {
|
|
5136
5136
|
width: 100%;
|
|
5137
5137
|
padding-left: 36px;
|
|
5138
5138
|
}
|
|
5139
|
-
.mech-pages__content[data-v-
|
|
5139
|
+
.mech-pages__content[data-v-56e0f852] {
|
|
5140
5140
|
display: flex;
|
|
5141
5141
|
gap: 14px;
|
|
5142
5142
|
flex: 1;
|
|
5143
5143
|
min-height: 0;
|
|
5144
5144
|
padding: 0 24px 20px;
|
|
5145
5145
|
}
|
|
5146
|
-
.mech-pages__rail[data-v-
|
|
5146
|
+
.mech-pages__rail[data-v-56e0f852] {
|
|
5147
5147
|
flex: none;
|
|
5148
5148
|
width: 172px;
|
|
5149
5149
|
display: flex;
|
|
@@ -5152,7 +5152,7 @@ from {
|
|
|
5152
5152
|
overflow-y: auto;
|
|
5153
5153
|
padding-right: 2px;
|
|
5154
5154
|
}
|
|
5155
|
-
.mech-pages__rail-item[data-v-
|
|
5155
|
+
.mech-pages__rail-item[data-v-56e0f852] {
|
|
5156
5156
|
display: flex;
|
|
5157
5157
|
align-items: center;
|
|
5158
5158
|
gap: 8px;
|
|
@@ -5166,51 +5166,51 @@ from {
|
|
|
5166
5166
|
color: var(--mech-fg-alt);
|
|
5167
5167
|
cursor: pointer;
|
|
5168
5168
|
}
|
|
5169
|
-
.mech-pages__rail-item .vicon[data-v-
|
|
5169
|
+
.mech-pages__rail-item .vicon[data-v-56e0f852] {
|
|
5170
5170
|
flex: none;
|
|
5171
5171
|
width: 15px;
|
|
5172
5172
|
height: 15px;
|
|
5173
5173
|
color: var(--mech-muted);
|
|
5174
5174
|
}
|
|
5175
|
-
.mech-pages__rail-item[data-v-
|
|
5175
|
+
.mech-pages__rail-item[data-v-56e0f852]:hover {
|
|
5176
5176
|
background: var(--mech-hover);
|
|
5177
5177
|
}
|
|
5178
|
-
.mech-pages__rail-item.is-active[data-v-
|
|
5178
|
+
.mech-pages__rail-item.is-active[data-v-56e0f852] {
|
|
5179
5179
|
background: var(--mech-accent-soft);
|
|
5180
5180
|
color: var(--mech-accent);
|
|
5181
5181
|
font-weight: 500;
|
|
5182
5182
|
}
|
|
5183
|
-
.mech-pages__rail-item.is-active .vicon[data-v-
|
|
5183
|
+
.mech-pages__rail-item.is-active .vicon[data-v-56e0f852] {
|
|
5184
5184
|
color: var(--mech-accent);
|
|
5185
5185
|
}
|
|
5186
|
-
.mech-pages__rail-name[data-v-
|
|
5186
|
+
.mech-pages__rail-name[data-v-56e0f852] {
|
|
5187
5187
|
flex: 1;
|
|
5188
5188
|
min-width: 0;
|
|
5189
5189
|
overflow: hidden;
|
|
5190
5190
|
text-overflow: ellipsis;
|
|
5191
5191
|
white-space: nowrap;
|
|
5192
5192
|
}
|
|
5193
|
-
.mech-pages__rail-count[data-v-
|
|
5193
|
+
.mech-pages__rail-count[data-v-56e0f852] {
|
|
5194
5194
|
flex: none;
|
|
5195
5195
|
font-size: 11px;
|
|
5196
5196
|
color: var(--mech-placeholder);
|
|
5197
5197
|
}
|
|
5198
|
-
.mech-pages__rail-item.is-active .mech-pages__rail-count[data-v-
|
|
5198
|
+
.mech-pages__rail-item.is-active .mech-pages__rail-count[data-v-56e0f852] {
|
|
5199
5199
|
color: var(--mech-accent);
|
|
5200
5200
|
opacity: 0.7;
|
|
5201
5201
|
}
|
|
5202
|
-
.mech-pages__list[data-v-
|
|
5202
|
+
.mech-pages__list[data-v-56e0f852] {
|
|
5203
5203
|
flex: 1;
|
|
5204
5204
|
min-width: 0;
|
|
5205
5205
|
overflow-y: auto;
|
|
5206
5206
|
}
|
|
5207
|
-
.mech-pages__row[data-v-
|
|
5207
|
+
.mech-pages__row[data-v-56e0f852], .mech-pages__thead[data-v-56e0f852] {
|
|
5208
5208
|
display: grid;
|
|
5209
5209
|
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 96px;
|
|
5210
5210
|
align-items: center;
|
|
5211
5211
|
column-gap: 12px;
|
|
5212
5212
|
}
|
|
5213
|
-
.mech-pages__thead[data-v-
|
|
5213
|
+
.mech-pages__thead[data-v-56e0f852] {
|
|
5214
5214
|
position: sticky;
|
|
5215
5215
|
top: 0;
|
|
5216
5216
|
z-index: 1;
|
|
@@ -5218,14 +5218,14 @@ from {
|
|
|
5218
5218
|
background: var(--mech-bg);
|
|
5219
5219
|
box-shadow: 0 1px 0 var(--mech-border);
|
|
5220
5220
|
}
|
|
5221
|
-
.mech-pages__thead span[data-v-
|
|
5221
|
+
.mech-pages__thead span[data-v-56e0f852] {
|
|
5222
5222
|
font-size: 10.5px;
|
|
5223
5223
|
font-weight: 600;
|
|
5224
5224
|
text-transform: uppercase;
|
|
5225
5225
|
letter-spacing: 0.05em;
|
|
5226
5226
|
color: var(--mech-muted);
|
|
5227
5227
|
}
|
|
5228
|
-
.mech-pages__group[data-v-
|
|
5228
|
+
.mech-pages__group[data-v-56e0f852] {
|
|
5229
5229
|
display: flex;
|
|
5230
5230
|
align-items: center;
|
|
5231
5231
|
gap: 7px;
|
|
@@ -5244,36 +5244,36 @@ from {
|
|
|
5244
5244
|
border-radius: var(--mech-radius-sm);
|
|
5245
5245
|
cursor: pointer;
|
|
5246
5246
|
}
|
|
5247
|
-
.mech-pages__group .vicon[data-v-
|
|
5247
|
+
.mech-pages__group .vicon[data-v-56e0f852] {
|
|
5248
5248
|
width: 13px;
|
|
5249
5249
|
height: 13px;
|
|
5250
5250
|
}
|
|
5251
|
-
.mech-pages__group[data-v-
|
|
5251
|
+
.mech-pages__group[data-v-56e0f852]:hover {
|
|
5252
5252
|
color: var(--mech-fg);
|
|
5253
5253
|
}
|
|
5254
|
-
.mech-pages__row[data-v-
|
|
5254
|
+
.mech-pages__row[data-v-56e0f852] {
|
|
5255
5255
|
padding: 0 10px;
|
|
5256
5256
|
height: 38px;
|
|
5257
5257
|
border-radius: var(--mech-radius-sm);
|
|
5258
5258
|
cursor: pointer;
|
|
5259
5259
|
}
|
|
5260
|
-
.mech-pages__row.is-active[data-v-
|
|
5260
|
+
.mech-pages__row.is-active[data-v-56e0f852] {
|
|
5261
5261
|
background: var(--mech-accent-soft);
|
|
5262
5262
|
}
|
|
5263
|
-
.mech-pages__cell-name[data-v-
|
|
5263
|
+
.mech-pages__cell-name[data-v-56e0f852] {
|
|
5264
5264
|
display: flex;
|
|
5265
5265
|
align-items: center;
|
|
5266
5266
|
gap: 8px;
|
|
5267
5267
|
min-width: 0;
|
|
5268
5268
|
}
|
|
5269
|
-
.mech-pages__name[data-v-
|
|
5269
|
+
.mech-pages__name[data-v-56e0f852] {
|
|
5270
5270
|
font-size: 13.5px;
|
|
5271
5271
|
font-weight: 500;
|
|
5272
5272
|
overflow: hidden;
|
|
5273
5273
|
text-overflow: ellipsis;
|
|
5274
5274
|
white-space: nowrap;
|
|
5275
5275
|
}
|
|
5276
|
-
.mech-pages__badge[data-v-
|
|
5276
|
+
.mech-pages__badge[data-v-56e0f852] {
|
|
5277
5277
|
flex: none;
|
|
5278
5278
|
font-size: 10px;
|
|
5279
5279
|
font-weight: 600;
|
|
@@ -5285,17 +5285,17 @@ from {
|
|
|
5285
5285
|
border-radius: var(--mech-radius-pill);
|
|
5286
5286
|
padding: 1px 7px;
|
|
5287
5287
|
}
|
|
5288
|
-
.mech-pages__badge.is-draft[data-v-
|
|
5288
|
+
.mech-pages__badge.is-draft[data-v-56e0f852] {
|
|
5289
5289
|
color: var(--mech-muted);
|
|
5290
5290
|
}
|
|
5291
|
-
.mech-pages__locales[data-v-
|
|
5291
|
+
.mech-pages__locales[data-v-56e0f852] {
|
|
5292
5292
|
flex: none;
|
|
5293
5293
|
display: inline-flex;
|
|
5294
5294
|
align-items: center;
|
|
5295
5295
|
gap: 3px;
|
|
5296
5296
|
margin-left: 2px;
|
|
5297
5297
|
}
|
|
5298
|
-
.mech-pages__loc[data-v-
|
|
5298
|
+
.mech-pages__loc[data-v-56e0f852] {
|
|
5299
5299
|
min-width: 15px;
|
|
5300
5300
|
padding: 1px 4px;
|
|
5301
5301
|
border-radius: var(--mech-radius-sm);
|
|
@@ -5309,12 +5309,12 @@ from {
|
|
|
5309
5309
|
letter-spacing: 0.02em;
|
|
5310
5310
|
opacity: 0.5;
|
|
5311
5311
|
}
|
|
5312
|
-
.mech-pages__loc.is-on[data-v-
|
|
5312
|
+
.mech-pages__loc.is-on[data-v-56e0f852] {
|
|
5313
5313
|
background: var(--mech-accent-soft);
|
|
5314
5314
|
color: var(--mech-accent);
|
|
5315
5315
|
opacity: 1;
|
|
5316
5316
|
}
|
|
5317
|
-
.mech-pages__cell-path[data-v-
|
|
5317
|
+
.mech-pages__cell-path[data-v-56e0f852] {
|
|
5318
5318
|
min-width: 0;
|
|
5319
5319
|
overflow: hidden;
|
|
5320
5320
|
text-overflow: ellipsis;
|
|
@@ -5322,16 +5322,16 @@ from {
|
|
|
5322
5322
|
font-size: 12.5px;
|
|
5323
5323
|
color: var(--mech-muted);
|
|
5324
5324
|
}
|
|
5325
|
-
.mech-pages__actions[data-v-
|
|
5325
|
+
.mech-pages__actions[data-v-56e0f852] {
|
|
5326
5326
|
display: flex;
|
|
5327
5327
|
justify-content: flex-end;
|
|
5328
5328
|
gap: 1px;
|
|
5329
5329
|
opacity: 0;
|
|
5330
5330
|
}
|
|
5331
|
-
.mech-pages__row.is-active .mech-pages__actions[data-v-
|
|
5331
|
+
.mech-pages__row.is-active .mech-pages__actions[data-v-56e0f852], .mech-pages__row:hover .mech-pages__actions[data-v-56e0f852] {
|
|
5332
5332
|
opacity: 1;
|
|
5333
5333
|
}
|
|
5334
|
-
.mech-pages__actions button[data-v-
|
|
5334
|
+
.mech-pages__actions button[data-v-56e0f852] {
|
|
5335
5335
|
display: flex;
|
|
5336
5336
|
align-items: center;
|
|
5337
5337
|
justify-content: center;
|
|
@@ -5344,24 +5344,24 @@ from {
|
|
|
5344
5344
|
cursor: pointer;
|
|
5345
5345
|
line-height: 1;
|
|
5346
5346
|
}
|
|
5347
|
-
.mech-pages__actions button .vicon[data-v-
|
|
5347
|
+
.mech-pages__actions button .vicon[data-v-56e0f852] {
|
|
5348
5348
|
width: 15px;
|
|
5349
5349
|
height: 15px;
|
|
5350
5350
|
}
|
|
5351
|
-
.mech-pages__actions button[data-v-
|
|
5351
|
+
.mech-pages__actions button[data-v-56e0f852]:hover {
|
|
5352
5352
|
background: var(--mech-active);
|
|
5353
5353
|
color: var(--mech-fg);
|
|
5354
5354
|
}
|
|
5355
|
-
.mech-pages__actions button.is-danger[data-v-
|
|
5355
|
+
.mech-pages__actions button.is-danger[data-v-56e0f852]:hover {
|
|
5356
5356
|
color: var(--mech-error);
|
|
5357
5357
|
}
|
|
5358
|
-
.mech-pages__empty[data-v-
|
|
5358
|
+
.mech-pages__empty[data-v-56e0f852] {
|
|
5359
5359
|
padding: 24px 10px;
|
|
5360
5360
|
margin: 0;
|
|
5361
5361
|
color: var(--mech-muted);
|
|
5362
5362
|
font-size: 13px;
|
|
5363
5363
|
}
|
|
5364
|
-
.mech-pages__preview[data-v-
|
|
5364
|
+
.mech-pages__preview[data-v-56e0f852] {
|
|
5365
5365
|
flex: none;
|
|
5366
5366
|
align-self: flex-start;
|
|
5367
5367
|
max-height: 100%;
|
|
@@ -5373,18 +5373,18 @@ from {
|
|
|
5373
5373
|
box-shadow: var(--mech-shadow-dialog);
|
|
5374
5374
|
overflow: hidden;
|
|
5375
5375
|
}
|
|
5376
|
-
.mech-pages__preview-frame[data-v-
|
|
5376
|
+
.mech-pages__preview-frame[data-v-56e0f852] {
|
|
5377
5377
|
flex: 0 1 auto;
|
|
5378
5378
|
min-height: 0;
|
|
5379
5379
|
overflow: hidden;
|
|
5380
5380
|
background: var(--mech-app-bg);
|
|
5381
5381
|
}
|
|
5382
|
-
.mech-pages__preview-frame img[data-v-
|
|
5382
|
+
.mech-pages__preview-frame img[data-v-56e0f852] {
|
|
5383
5383
|
display: block;
|
|
5384
5384
|
width: 100%;
|
|
5385
5385
|
height: auto;
|
|
5386
5386
|
}
|
|
5387
|
-
.mech-pages__preview-empty[data-v-
|
|
5387
|
+
.mech-pages__preview-empty[data-v-56e0f852] {
|
|
5388
5388
|
display: flex;
|
|
5389
5389
|
flex-direction: column;
|
|
5390
5390
|
align-items: center;
|
|
@@ -5393,16 +5393,16 @@ from {
|
|
|
5393
5393
|
padding: 48px 16px;
|
|
5394
5394
|
color: var(--mech-muted);
|
|
5395
5395
|
}
|
|
5396
|
-
.mech-pages__preview-empty p[data-v-
|
|
5396
|
+
.mech-pages__preview-empty p[data-v-56e0f852] {
|
|
5397
5397
|
margin: 8px 0 0;
|
|
5398
5398
|
font-size: 13px;
|
|
5399
5399
|
font-weight: 500;
|
|
5400
5400
|
}
|
|
5401
|
-
.mech-pages__preview-empty code[data-v-
|
|
5401
|
+
.mech-pages__preview-empty code[data-v-56e0f852] {
|
|
5402
5402
|
font-size: 11.5px;
|
|
5403
5403
|
color: var(--mech-placeholder);
|
|
5404
5404
|
}
|
|
5405
|
-
.mech-pages__preview-monogram[data-v-
|
|
5405
|
+
.mech-pages__preview-monogram[data-v-56e0f852] {
|
|
5406
5406
|
display: flex;
|
|
5407
5407
|
align-items: center;
|
|
5408
5408
|
justify-content: center;
|
|
@@ -5413,7 +5413,7 @@ from {
|
|
|
5413
5413
|
font-size: 22px;
|
|
5414
5414
|
font-weight: 600;
|
|
5415
5415
|
}
|
|
5416
|
-
.mech-pages__preview-caption[data-v-
|
|
5416
|
+
.mech-pages__preview-caption[data-v-56e0f852] {
|
|
5417
5417
|
flex: none;
|
|
5418
5418
|
display: flex;
|
|
5419
5419
|
flex-direction: column;
|
|
@@ -5421,21 +5421,21 @@ from {
|
|
|
5421
5421
|
padding: 12px 16px 14px;
|
|
5422
5422
|
border-top: 1px solid var(--mech-border);
|
|
5423
5423
|
}
|
|
5424
|
-
.mech-pages__preview-name[data-v-
|
|
5424
|
+
.mech-pages__preview-name[data-v-56e0f852] {
|
|
5425
5425
|
font-size: 13px;
|
|
5426
5426
|
font-weight: 600;
|
|
5427
5427
|
overflow: hidden;
|
|
5428
5428
|
text-overflow: ellipsis;
|
|
5429
5429
|
white-space: nowrap;
|
|
5430
5430
|
}
|
|
5431
|
-
.mech-pages__preview-path[data-v-
|
|
5431
|
+
.mech-pages__preview-path[data-v-56e0f852] {
|
|
5432
5432
|
font-size: 11.5px;
|
|
5433
5433
|
color: var(--mech-muted);
|
|
5434
5434
|
overflow: hidden;
|
|
5435
5435
|
text-overflow: ellipsis;
|
|
5436
5436
|
white-space: nowrap;
|
|
5437
5437
|
}
|
|
5438
|
-
.mech-pages__preview-tag[data-v-
|
|
5438
|
+
.mech-pages__preview-tag[data-v-56e0f852] {
|
|
5439
5439
|
display: inline-flex;
|
|
5440
5440
|
align-items: center;
|
|
5441
5441
|
gap: 5px;
|
|
@@ -5449,13 +5449,13 @@ from {
|
|
|
5449
5449
|
color: var(--mech-fg-alt);
|
|
5450
5450
|
background: var(--mech-active);
|
|
5451
5451
|
}
|
|
5452
|
-
.mech-pages__preview-tag .vicon[data-v-
|
|
5452
|
+
.mech-pages__preview-tag .vicon[data-v-56e0f852] {
|
|
5453
5453
|
width: 12px;
|
|
5454
5454
|
height: 12px;
|
|
5455
5455
|
color: var(--mech-muted);
|
|
5456
5456
|
}
|
|
5457
5457
|
@media (max-width: 1160px) {
|
|
5458
|
-
.mech-pages__preview[data-v-
|
|
5458
|
+
.mech-pages__preview[data-v-56e0f852] {
|
|
5459
5459
|
display: none;
|
|
5460
5460
|
}
|
|
5461
5461
|
}.mech-pagebar[data-v-43756991] {
|
package/dist/editor.js
CHANGED
|
@@ -2133,7 +2133,8 @@ var _hoisted_18 = { class: "mech-pages__cell-name" };
|
|
|
2133
2133
|
var _hoisted_19 = { class: "mech-pages__name" };
|
|
2134
2134
|
var _hoisted_20 = {
|
|
2135
2135
|
key: 0,
|
|
2136
|
-
class: "mech-pages__badge is-draft"
|
|
2136
|
+
class: "mech-pages__badge is-draft",
|
|
2137
|
+
title: "Editable, but not on the site"
|
|
2137
2138
|
};
|
|
2138
2139
|
var _hoisted_21 = {
|
|
2139
2140
|
key: 1,
|
|
@@ -2318,7 +2319,7 @@ var PagesDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
2318
2319
|
onClick: () => startDuplicate(page)
|
|
2319
2320
|
},
|
|
2320
2321
|
{
|
|
2321
|
-
label: page.draft ? "
|
|
2322
|
+
label: page.draft ? "Show on site" : "Hide from site",
|
|
2322
2323
|
separatorBefore: true,
|
|
2323
2324
|
onClick: () => void toggleDraft(page)
|
|
2324
2325
|
},
|
|
@@ -2467,7 +2468,7 @@ var PagesDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
2467
2468
|
}, [
|
|
2468
2469
|
createElementVNode("span", _hoisted_18, [
|
|
2469
2470
|
createElementVNode("span", _hoisted_19, toDisplayString(page.name || page.path), 1),
|
|
2470
|
-
page.draft ? (openBlock(), createElementBlock("span", _hoisted_20, "
|
|
2471
|
+
page.draft ? (openBlock(), createElementBlock("span", _hoisted_20, "Hidden")) : createCommentVNode("", true),
|
|
2471
2472
|
page.generated ? (openBlock(), createElementBlock("span", _hoisted_21, "Generated")) : createCommentVNode("", true),
|
|
2472
2473
|
page.path === currentLogical.value ? (openBlock(), createElementBlock("span", _hoisted_22, "Current")) : createCommentVNode("", true),
|
|
2473
2474
|
unref(localeConfig) && page.locales ? (openBlock(), createElementBlock("span", _hoisted_23, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(localeCodes), (code) => {
|
|
@@ -2519,7 +2520,7 @@ var PagesDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
2519
2520
|
])) : createCommentVNode("", true)])]);
|
|
2520
2521
|
};
|
|
2521
2522
|
}
|
|
2522
|
-
}), [["__scopeId", "data-v-
|
|
2523
|
+
}), [["__scopeId", "data-v-56e0f852"]]);
|
|
2523
2524
|
//#endregion
|
|
2524
2525
|
//#region src/editor/components/PageBar.vue?vue&type=script&setup=true&lang.ts
|
|
2525
2526
|
var _hoisted_1$3 = { class: "mech-pagebar__icon" };
|
package/dist/export.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as withHostedAssets, E as listPages, F as setPageCodec, H as assetFileOf, K as isDerivedAsset, S as getPagePath, V as UPLOADS_PREFIX$1, W as fsAssetStore, d as readFoldersData, f as readSiteData, i as toBlockMeta, nt as analyzeImageBuffer, p as readSiteLocaleOverride, r as composedBlockMeta, rt as hasSharp, t as buildRichTextCodec, u as readFolderData } from "./chunks/rich-text-codec-
|
|
1
|
+
import { $ as withHostedAssets, E as listPages, F as setPageCodec, H as assetFileOf, K as isDerivedAsset, S as getPagePath, V as UPLOADS_PREFIX$1, W as fsAssetStore, d as readFoldersData, f as readSiteData, i as toBlockMeta, nt as analyzeImageBuffer, p as readSiteLocaleOverride, r as composedBlockMeta, rt as hasSharp, t as buildRichTextCodec, u as readFolderData } from "./chunks/rich-text-codec-DCv1X0eZ.js";
|
|
2
2
|
import { n as blockAssetLinks, t as BLOCKS_MANIFEST_FILE } from "./chunks/page-assets-DsJXmoDs.js";
|
|
3
3
|
import { dirname, join, parse, relative, resolve } from "node:path";
|
|
4
4
|
import { EDITOR_DIST_DIR, SITE_MANIFEST_FILE, applySeoTags, auditPageHtml, buildRobotsTxt, buildSitemap, findUnknownBlocks, generateProject, isPaginatedQuery, localePath, mergeTranslation, migrateContent, paginationVariantPath, registerFieldSchemas, resolveQueryKey, templateBlockIds, validateLinks, walkSchema, walkTree } from "mechanica-shared";
|
|
5
|
-
import { parsePage } from "mechanica-shared/page-format";
|
|
5
|
+
import { PageParseError, parsePage } from "mechanica-shared/page-format";
|
|
6
6
|
import { access, copyFile, cp, mkdir, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
8
8
|
//#region src/cli/export.ts
|
|
@@ -13,6 +13,14 @@ function setHtmlLang(html, lang) {
|
|
|
13
13
|
if (/<html\b[^>]*\blang\s*=/i.test(html)) return html;
|
|
14
14
|
return html.replace(/<html\b([^>]*)>/i, `<html$1 lang="${lang}">`);
|
|
15
15
|
}
|
|
16
|
+
/** Parse a page file's text, naming the file (relative to `.mech`) in a parse error. */
|
|
17
|
+
function parsePageFile(raw, file, richText) {
|
|
18
|
+
try {
|
|
19
|
+
return parsePage(raw, richText ? { richText } : void 0);
|
|
20
|
+
} catch (error) {
|
|
21
|
+
throw error instanceof PageParseError ? error.inFile(file) : error;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
16
24
|
/** Read every page JSON under `<mech>/pages` as an exportable page. */
|
|
17
25
|
async function readPages(pagesDir, foldersData = {}, richText) {
|
|
18
26
|
let entries;
|
|
@@ -30,7 +38,7 @@ async function readPages(pagesDir, foldersData = {}, richText) {
|
|
|
30
38
|
const base = parsed.base.slice(0, -8);
|
|
31
39
|
if (VARIANT_STEM_RE.test(base)) continue;
|
|
32
40
|
const filePath = join(pagesDir, relative);
|
|
33
|
-
const file =
|
|
41
|
+
const file = parsePageFile(await readFile(filePath, "utf-8"), `pages/${relative.replace(/\\/g, "/")}`, richText);
|
|
34
42
|
if (file.draft) continue;
|
|
35
43
|
const path = `/${dir}/${base === "index" ? "" : base}`.replace("//", "/").replace(/\/$/, "") || "/";
|
|
36
44
|
const data = {
|
|
@@ -71,9 +79,9 @@ async function readTranslation(mechDir, base, locale, config, richText) {
|
|
|
71
79
|
} catch {
|
|
72
80
|
return null;
|
|
73
81
|
}
|
|
74
|
-
const doc = parsePage(raw, richText ? { richText } : void 0);
|
|
75
|
-
if (doc.draft) return null;
|
|
76
82
|
const rel = relative(join(mechDir, "pages"), file).replace(/\\/g, "/");
|
|
83
|
+
const doc = parsePageFile(raw, `pages/${rel}`, richText);
|
|
84
|
+
if (doc.draft) return null;
|
|
77
85
|
const dir = dirname(rel) === "." ? "" : dirname(rel);
|
|
78
86
|
let content = doc.content ?? [];
|
|
79
87
|
let pageData = doc.data ?? {};
|
package/dist/plugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as collectGeneratedPages, n as configureSite, r as indexGeneratedPages, t as buildSiteManifest } from "./chunks/site-
|
|
2
|
-
import { a as renderEditablePage, c as fillStateImages, d as loadComposedDefinitions, n as toNodeMiddleware, o as buildGeneratedState, r as createEditorService, s as buildPageState, t as toAssetMiddleware, u as collectComposed } from "./chunks/node-adapter-
|
|
3
|
-
import { W as fsAssetStore, et as withRemoteAssets, k as pageUrlOf, tt as wasRecentlyMutated } from "./chunks/rich-text-codec-
|
|
4
|
-
import { i as uploadsIgnored, n as remoteAssetsFor } from "./chunks/assets-
|
|
1
|
+
import { a as collectGeneratedPages, n as configureSite, r as indexGeneratedPages, t as buildSiteManifest } from "./chunks/site-BVqx8iKj.js";
|
|
2
|
+
import { a as renderEditablePage, c as fillStateImages, d as loadComposedDefinitions, n as toNodeMiddleware, o as buildGeneratedState, r as createEditorService, s as buildPageState, t as toAssetMiddleware, u as collectComposed } from "./chunks/node-adapter-Bm_SloHQ.js";
|
|
3
|
+
import { W as fsAssetStore, et as withRemoteAssets, k as pageUrlOf, tt as wasRecentlyMutated } from "./chunks/rich-text-codec-DCv1X0eZ.js";
|
|
4
|
+
import { i as uploadsIgnored, n as remoteAssetsFor } from "./chunks/assets-5a2WdmFg.js";
|
|
5
5
|
import { t as BLOCKS_MANIFEST_FILE } from "./chunks/page-assets-DsJXmoDs.js";
|
|
6
6
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
7
7
|
import { join, relative } from "node:path";
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as readSiteManifest, n as configureSite, t as buildSiteManifest } from "./chunks/site-
|
|
2
|
-
import { a as renderEditablePage, i as readEditorTemplate, n as toNodeMiddleware, r as createEditorService, t as toAssetMiddleware } from "./chunks/node-adapter-
|
|
3
|
-
import { $ as withHostedAssets, B as memoryContentFiles, G as isAssetName, K as isDerivedAsset, O as pageOfFile, Q as uploadResponse, U as contentTypeOf, W as fsAssetStore, Z as uploadName, et as withRemoteAssets, z as fsContentFiles } from "./chunks/rich-text-codec-
|
|
1
|
+
import { i as readSiteManifest, n as configureSite, t as buildSiteManifest } from "./chunks/site-BVqx8iKj.js";
|
|
2
|
+
import { a as renderEditablePage, i as readEditorTemplate, n as toNodeMiddleware, r as createEditorService, t as toAssetMiddleware } from "./chunks/node-adapter-Bm_SloHQ.js";
|
|
3
|
+
import { $ as withHostedAssets, B as memoryContentFiles, G as isAssetName, K as isDerivedAsset, O as pageOfFile, Q as uploadResponse, U as contentTypeOf, W as fsAssetStore, Z as uploadName, et as withRemoteAssets, z as fsContentFiles } from "./chunks/rich-text-codec-DCv1X0eZ.js";
|
|
4
4
|
import { EDITOR_DIST_DIR, SITE_MANIFEST_FILE, UPLOADS_PREFIX, uploadNameOf } from "mechanica-shared";
|
|
5
5
|
export { EDITOR_DIST_DIR, SITE_MANIFEST_FILE, UPLOADS_PREFIX, buildSiteManifest, configureSite, contentTypeOf, createEditorService, fsAssetStore, fsContentFiles, isAssetName, isDerivedAsset, memoryContentFiles, pageOfFile, readEditorTemplate, readSiteManifest, renderEditablePage, toAssetMiddleware, toNodeMiddleware, uploadName, uploadNameOf, uploadResponse, withHostedAssets, withRemoteAssets };
|
package/dist/types/cli/args.d.ts
CHANGED
|
@@ -2,7 +2,18 @@ export interface ParsedArgs {
|
|
|
2
2
|
command?: string;
|
|
3
3
|
/** Positional arguments after the command (excluding `--flag` values). */
|
|
4
4
|
args: string[];
|
|
5
|
+
/** Flag values; a flag given several times keeps its last value (see {@link flagValues}). */
|
|
5
6
|
flags: Record<string, string | boolean>;
|
|
6
7
|
}
|
|
8
|
+
export interface ParseOptions {
|
|
9
|
+
/** Flags that never take a value, so `--full hero` keeps `hero` positional. */
|
|
10
|
+
booleans?: string[];
|
|
11
|
+
}
|
|
7
12
|
/** Parse `argv` (without node/script) into a command, positionals and a `--flag[=value]` map. */
|
|
8
|
-
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
13
|
+
export declare function parseArgs(argv: string[], options?: ParseOptions): ParsedArgs;
|
|
14
|
+
/**
|
|
15
|
+
* Every value a repeatable flag was given, in order — `--section a --section b`
|
|
16
|
+
* → `['a', 'b']`; a bare `--section` contributes `true`. Takes the same `argv`
|
|
17
|
+
* as {@link parseArgs} (command first).
|
|
18
|
+
*/
|
|
19
|
+
export declare function flagValues(argv: string[], name: string, options?: ParseOptions): Array<string | boolean>;
|