@almadar/std 14.26.0 → 14.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  2. package/behaviors/registry/app/atoms/std-approval-chain.orb +106 -0
  3. package/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  4. package/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  5. package/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  6. package/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  7. package/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  8. package/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  9. package/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  10. package/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  11. package/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  12. package/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  13. package/behaviors/registry/app/atoms/std-donor.orb +445 -135
  14. package/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  15. package/behaviors/registry/app/atoms/std-driver.orb +465 -480
  16. package/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  17. package/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  18. package/behaviors/registry/app/atoms/std-event.orb +465 -667
  19. package/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  20. package/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  21. package/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  22. package/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  23. package/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  24. package/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  25. package/behaviors/registry/app/atoms/std-lease.orb +506 -190
  26. package/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  27. package/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  28. package/behaviors/registry/app/atoms/std-matter.orb +486 -318
  29. package/behaviors/registry/app/atoms/std-membership.orb +512 -102
  30. package/behaviors/registry/app/atoms/std-menu.orb +775 -183
  31. package/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  32. package/behaviors/registry/app/atoms/std-multi-party-transaction.orb +130 -0
  33. package/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  34. package/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  35. package/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  36. package/behaviors/registry/app/atoms/std-pipeline.orb +139 -0
  37. package/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  38. package/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  39. package/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  40. package/behaviors/registry/app/atoms/std-recurring-schedule.orb +94 -0
  41. package/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  42. package/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  43. package/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  44. package/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  45. package/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  46. package/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  47. package/behaviors/registry/app/atoms/std-segment.orb +360 -98
  48. package/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  49. package/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  50. package/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  51. package/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  52. package/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  53. package/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  54. package/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  55. package/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  56. package/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  57. package/behaviors/registry/app/atoms/std-timeline.orb +108 -0
  58. package/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  59. package/behaviors/registry/app/atoms/std-trial.orb +410 -317
  60. package/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  61. package/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  62. package/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  63. package/behaviors/registry/app/atoms/std-wizard-branching.orb +129 -0
  64. package/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  65. package/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  66. package/behaviors/registry/app/molecules/std-application.orb +178 -263
  67. package/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  68. package/behaviors/registry/app/molecules/std-cart.orb +78 -72
  69. package/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  70. package/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  71. package/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  72. package/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  73. package/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  74. package/behaviors/registry/core/atoms/std-board.orb +1367 -0
  75. package/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  76. package/behaviors/registry/core/atoms/std-event-log.orb +777 -0
  77. package/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  78. package/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  79. package/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  80. package/behaviors/registry/core/atoms/std-multi-party-flow.orb +1313 -0
  81. package/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  82. package/behaviors/registry/core/atoms/std-recurrence.orb +937 -0
  83. package/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  84. package/behaviors/registry/core/atoms/std-step-flow.orb +1155 -0
  85. package/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  86. package/behaviors/registry/core/atoms/std-wizard.orb +1085 -0
  87. package/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  88. package/dist/behaviors/registry/app/atoms/std-applicant.orb +496 -42
  89. package/dist/behaviors/registry/app/atoms/std-approval-chain.orb +106 -0
  90. package/dist/behaviors/registry/app/atoms/std-approval-request.orb +433 -593
  91. package/dist/behaviors/registry/app/atoms/std-campaign-goal.orb +438 -228
  92. package/dist/behaviors/registry/app/atoms/std-change-order.orb +565 -307
  93. package/dist/behaviors/registry/app/atoms/std-chart-of-accounts.orb +434 -97
  94. package/dist/behaviors/registry/app/atoms/std-checkin.orb +434 -270
  95. package/dist/behaviors/registry/app/atoms/std-class-roster.orb +495 -61
  96. package/dist/behaviors/registry/app/atoms/std-class-session.orb +485 -104
  97. package/dist/behaviors/registry/app/atoms/std-court-deadline.orb +519 -88
  98. package/dist/behaviors/registry/app/atoms/std-customer-account.orb +577 -97
  99. package/dist/behaviors/registry/app/atoms/std-donation-receipt.orb +498 -55
  100. package/dist/behaviors/registry/app/atoms/std-donor.orb +445 -135
  101. package/dist/behaviors/registry/app/atoms/std-drip-sequence.orb +445 -62
  102. package/dist/behaviors/registry/app/atoms/std-driver.orb +465 -480
  103. package/dist/behaviors/registry/app/atoms/std-dunning.orb +450 -512
  104. package/dist/behaviors/registry/app/atoms/std-email-broadcast.orb +517 -64
  105. package/dist/behaviors/registry/app/atoms/std-event.orb +465 -667
  106. package/dist/behaviors/registry/app/atoms/std-health-score.orb +368 -371
  107. package/dist/behaviors/registry/app/atoms/std-help-article.orb +373 -506
  108. package/dist/behaviors/registry/app/atoms/std-help-category.orb +344 -359
  109. package/dist/behaviors/registry/app/atoms/std-interview-slot.orb +490 -48
  110. package/dist/behaviors/registry/app/atoms/std-invoice.orb +494 -291
  111. package/dist/behaviors/registry/app/atoms/std-kitchen-display.orb +588 -96
  112. package/dist/behaviors/registry/app/atoms/std-lease.orb +506 -190
  113. package/dist/behaviors/registry/app/atoms/std-ledger-entry.orb +483 -154
  114. package/dist/behaviors/registry/app/atoms/std-maintenance-request.orb +642 -192
  115. package/dist/behaviors/registry/app/atoms/std-matter.orb +486 -318
  116. package/dist/behaviors/registry/app/atoms/std-membership.orb +512 -102
  117. package/dist/behaviors/registry/app/atoms/std-menu.orb +775 -183
  118. package/dist/behaviors/registry/app/atoms/std-modifier-group.orb +522 -104
  119. package/dist/behaviors/registry/app/atoms/std-multi-party-transaction.orb +130 -0
  120. package/dist/behaviors/registry/app/atoms/std-nps-survey.orb +319 -327
  121. package/dist/behaviors/registry/app/atoms/std-offer-letter.orb +497 -47
  122. package/dist/behaviors/registry/app/atoms/std-payout-ledger.orb +378 -362
  123. package/dist/behaviors/registry/app/atoms/std-pipeline.orb +139 -0
  124. package/dist/behaviors/registry/app/atoms/std-question-bank.orb +379 -346
  125. package/dist/behaviors/registry/app/atoms/std-receipt.orb +553 -44
  126. package/dist/behaviors/registry/app/atoms/std-recurring-charge.orb +419 -832
  127. package/dist/behaviors/registry/app/atoms/std-recurring-schedule.orb +94 -0
  128. package/dist/behaviors/registry/app/atoms/std-renewal-risk.orb +370 -421
  129. package/dist/behaviors/registry/app/atoms/std-rent-charge.orb +657 -55
  130. package/dist/behaviors/registry/app/atoms/std-reorder-rule.orb +510 -59
  131. package/dist/behaviors/registry/app/atoms/std-response-collector.orb +451 -144
  132. package/dist/behaviors/registry/app/atoms/std-rfi.orb +502 -461
  133. package/dist/behaviors/registry/app/atoms/std-route-optimize.orb +448 -158
  134. package/dist/behaviors/registry/app/atoms/std-segment.orb +360 -98
  135. package/dist/behaviors/registry/app/atoms/std-stock-level.orb +486 -103
  136. package/dist/behaviors/registry/app/atoms/std-submittal.orb +538 -526
  137. package/dist/behaviors/registry/app/atoms/std-table-map.orb +88 -51
  138. package/dist/behaviors/registry/app/atoms/std-technician-dispatch.orb +653 -71
  139. package/dist/behaviors/registry/app/atoms/std-telematics-event.orb +310 -215
  140. package/dist/behaviors/registry/app/atoms/std-template-editor.orb +513 -90
  141. package/dist/behaviors/registry/app/atoms/std-tenant.orb +525 -66
  142. package/dist/behaviors/registry/app/atoms/std-ticket-tier.orb +472 -460
  143. package/dist/behaviors/registry/app/atoms/std-time-entry.orb +354 -317
  144. package/dist/behaviors/registry/app/atoms/std-timeline.orb +108 -0
  145. package/dist/behaviors/registry/app/atoms/std-timesheet.orb +551 -284
  146. package/dist/behaviors/registry/app/atoms/std-trial.orb +410 -317
  147. package/dist/behaviors/registry/app/atoms/std-vehicle.orb +398 -563
  148. package/dist/behaviors/registry/app/atoms/std-waitlist.orb +372 -283
  149. package/dist/behaviors/registry/app/atoms/std-warehouse.orb +273 -214
  150. package/dist/behaviors/registry/app/atoms/std-wizard-branching.orb +129 -0
  151. package/dist/behaviors/registry/app/atoms/std-work-order.orb +628 -240
  152. package/dist/behaviors/registry/app/molecules/std-applicant-form.orb +89 -83
  153. package/dist/behaviors/registry/app/molecules/std-application.orb +178 -263
  154. package/dist/behaviors/registry/app/molecules/std-broadcast-builder.orb +67 -176
  155. package/dist/behaviors/registry/app/molecules/std-cart.orb +78 -72
  156. package/dist/behaviors/registry/app/molecules/std-form-builder.orb +437 -176
  157. package/dist/behaviors/registry/app/molecules/std-ledger-entry-form.orb +608 -89
  158. package/dist/behaviors/registry/app/molecules/std-stock-adjustment.orb +501 -102
  159. package/dist/behaviors/registry/app/molecules/std-vendor-onboarding.orb +383 -469
  160. package/dist/behaviors/registry/core/atoms/std-billable-hour.orb +495 -91
  161. package/dist/behaviors/registry/core/atoms/std-board.orb +1367 -0
  162. package/dist/behaviors/registry/core/atoms/std-branching-logic.orb +271 -600
  163. package/dist/behaviors/registry/core/atoms/std-event-log.orb +777 -0
  164. package/dist/behaviors/registry/core/atoms/std-file-store.orb +534 -164
  165. package/dist/behaviors/registry/core/atoms/std-gallery.orb +118 -101
  166. package/dist/behaviors/registry/core/atoms/std-image-upload-multi.orb +87 -57
  167. package/dist/behaviors/registry/core/atoms/std-multi-party-flow.orb +1313 -0
  168. package/dist/behaviors/registry/core/atoms/std-page-tree.orb +342 -484
  169. package/dist/behaviors/registry/core/atoms/std-recurrence.orb +937 -0
  170. package/dist/behaviors/registry/core/atoms/std-rich-editor.orb +288 -416
  171. package/dist/behaviors/registry/core/atoms/std-step-flow.orb +1155 -0
  172. package/dist/behaviors/registry/core/atoms/std-version-history.orb +454 -430
  173. package/dist/behaviors/registry/core/atoms/std-wizard.orb +1085 -0
  174. package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +222 -147
  175. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-rich-editor",
3
3
  "version": "1.0.0",
4
- "description": "std-rich-editor — wiki / CMS Notion-style block editor. Owns a Document entity (page / doc / post) with a serialized RichBlock[] payload, browses documents in a data-grid, opens the rich-block-editor on a selected row, and persists block edits + publish status back to the row.",
4
+ "description": "std-rich-editor — wiki/CMS Notion-style block editor. Browses documents in `browsing`; opens the rich-block-editor on a selected row; persists block edits + publish status.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "DocumentOrbital",
@@ -80,7 +80,7 @@
80
80
  "event": "OPEN",
81
81
  "payloadSchema": [
82
82
  {
83
- "name": "documentId",
83
+ "name": "id",
84
84
  "type": "string",
85
85
  "required": true
86
86
  },
@@ -128,6 +128,9 @@
128
128
  }
129
129
  ]
130
130
  },
131
+ {
132
+ "event": "CLOSE_VIEW"
133
+ },
131
134
  {
132
135
  "event": "BLOCKS_CHANGE",
133
136
  "payloadSchema": [
@@ -141,13 +144,9 @@
141
144
  "event": "SAVE",
142
145
  "payloadSchema": [
143
146
  {
144
- "name": "documentId",
147
+ "name": "id",
145
148
  "type": "string",
146
149
  "required": true
147
- },
148
- {
149
- "name": "blocks",
150
- "type": "[object]"
151
150
  }
152
151
  ]
153
152
  },
@@ -155,51 +154,9 @@
155
154
  "event": "PUBLISH",
156
155
  "payloadSchema": [
157
156
  {
158
- "name": "documentId",
159
- "type": "string",
160
- "required": true
161
- },
162
- {
163
- "name": "row.id",
164
- "type": "string",
165
- "required": true
166
- },
167
- {
168
- "name": "row.title",
157
+ "name": "id",
169
158
  "type": "string",
170
159
  "required": true
171
- },
172
- {
173
- "name": "row.blocksJson",
174
- "type": "[object]"
175
- },
176
- {
177
- "name": "row.authorId",
178
- "type": "string"
179
- },
180
- {
181
- "name": "row.parentId",
182
- "type": "string"
183
- },
184
- {
185
- "name": "row.kind",
186
- "type": "string"
187
- },
188
- {
189
- "name": "row.status",
190
- "type": "string"
191
- },
192
- {
193
- "name": "row.version",
194
- "type": "number"
195
- },
196
- {
197
- "name": "row.createdAt",
198
- "type": "string"
199
- },
200
- {
201
- "name": "row.updatedAt",
202
- "type": "string"
203
160
  }
204
161
  ]
205
162
  },
@@ -364,6 +321,40 @@
364
321
  }
365
322
  ]
366
323
  },
324
+ {
325
+ "key": "DocumentSaved",
326
+ "name": "Document saved",
327
+ "payloadSchema": [
328
+ {
329
+ "name": "row",
330
+ "type": "Document"
331
+ }
332
+ ]
333
+ },
334
+ {
335
+ "key": "DocumentPublished",
336
+ "name": "Document published",
337
+ "payloadSchema": [
338
+ {
339
+ "name": "row",
340
+ "type": "Document"
341
+ }
342
+ ]
343
+ },
344
+ {
345
+ "key": "DocumentSaveFailed",
346
+ "name": "Document save failed",
347
+ "payloadSchema": [
348
+ {
349
+ "name": "error",
350
+ "type": "string"
351
+ },
352
+ {
353
+ "name": "code",
354
+ "type": "string"
355
+ }
356
+ ]
357
+ },
367
358
  {
368
359
  "key": "DocumentLoadFailed",
369
360
  "name": "Document load failed",
@@ -383,7 +374,7 @@
383
374
  "name": "Open",
384
375
  "payloadSchema": [
385
376
  {
386
- "name": "documentId",
377
+ "name": "id",
387
378
  "type": "string",
388
379
  "required": true
389
380
  },
@@ -398,13 +389,9 @@
398
389
  "name": "Publish",
399
390
  "payloadSchema": [
400
391
  {
401
- "name": "documentId",
392
+ "name": "id",
402
393
  "type": "string",
403
394
  "required": true
404
- },
405
- {
406
- "name": "row",
407
- "type": "Document"
408
395
  }
409
396
  ]
410
397
  },
@@ -418,52 +405,18 @@
418
405
  }
419
406
  ]
420
407
  },
408
+ {
409
+ "key": "CLOSE_VIEW",
410
+ "name": "Close View"
411
+ },
421
412
  {
422
413
  "key": "SAVE",
423
414
  "name": "Save",
424
415
  "payloadSchema": [
425
416
  {
426
- "name": "documentId",
417
+ "name": "id",
427
418
  "type": "string",
428
419
  "required": true
429
- },
430
- {
431
- "name": "blocks",
432
- "type": "[object]"
433
- }
434
- ]
435
- },
436
- {
437
- "key": "DocumentSaved",
438
- "name": "Document saved",
439
- "payloadSchema": [
440
- {
441
- "name": "row",
442
- "type": "Document"
443
- }
444
- ]
445
- },
446
- {
447
- "key": "DocumentPublished",
448
- "name": "Document published",
449
- "payloadSchema": [
450
- {
451
- "name": "row",
452
- "type": "Document"
453
- }
454
- ]
455
- },
456
- {
457
- "key": "DocumentSaveFailed",
458
- "name": "Document save failed",
459
- "payloadSchema": [
460
- {
461
- "name": "error",
462
- "type": "string"
463
- },
464
- {
465
- "name": "code",
466
- "type": "string"
467
420
  }
468
421
  ]
469
422
  }
@@ -488,22 +441,22 @@
488
441
  "render-ui",
489
442
  "main",
490
443
  {
491
- "direction": "vertical",
492
- "gap": "md",
444
+ "type": "stack",
445
+ "className": "py-12",
493
446
  "children": [
494
447
  {
495
448
  "type": "spinner"
496
449
  },
497
450
  {
498
- "content": "Loading documents…",
499
451
  "color": "muted",
500
452
  "type": "typography",
501
- "variant": "caption"
453
+ "variant": "caption",
454
+ "content": "Loading documents…"
502
455
  }
503
456
  ],
504
- "align": "center",
505
- "type": "stack",
506
- "className": "py-12"
457
+ "gap": "md",
458
+ "direction": "vertical",
459
+ "align": "center"
507
460
  }
508
461
  ]
509
462
  ]
@@ -517,184 +470,78 @@
517
470
  "render-ui",
518
471
  "main",
519
472
  {
473
+ "type": "stack",
520
474
  "direction": "vertical",
521
475
  "gap": "md",
522
476
  "children": [
523
- {
524
- "subtitle": "Wiki / CMS Notion-style Docs",
525
- "author": "Team Knowledge Base",
526
- "type": "book-cover-page",
527
- "title": "@config.title",
528
- "coverImageUrl": "https://picsum.photos/seed/notes-cover/1200/400"
529
- },
530
- {
531
- "totalPages": 24.0,
532
- "type": "book-nav-bar",
533
- "chapterTitle": "Getting Started",
534
- "currentPage": 1.0
535
- },
536
477
  {
537
478
  "gap": "sm",
479
+ "direction": "horizontal",
480
+ "type": "stack",
481
+ "align": "center",
538
482
  "children": [
539
483
  {
540
484
  "type": "icon",
541
485
  "name": "file-text"
542
486
  },
543
487
  {
544
- "content": "@config.title",
488
+ "variant": "h3",
545
489
  "type": "typography",
546
- "variant": "h3"
547
- }
548
- ],
549
- "type": "stack",
550
- "direction": "horizontal"
551
- },
552
- {
553
- "activeId": "blocks",
554
- "type": "doc-toc",
555
- "items": [
556
- {
557
- "id": "intro",
558
- "level": 1.0,
559
- "label": "Introduction"
560
- },
561
- {
562
- "id": "blocks",
563
- "level": 1.0,
564
- "label": "Block Types"
565
- },
566
- {
567
- "level": 1.0,
568
- "id": "publish",
569
- "label": "Publishing Workflow"
570
- },
571
- {
572
- "level": 2.0,
573
- "id": "archive",
574
- "label": "Archived Docs"
490
+ "content": "@config.title"
575
491
  }
576
492
  ]
577
493
  },
578
494
  {
579
- "type": "tag-cloud",
580
- "tags": [
581
- {
582
- "label": "Engineering"
583
- },
584
- {
585
- "label": "Product"
586
- },
495
+ "children": [
587
496
  {
588
- "label": "Design"
497
+ "label": "Total docs",
498
+ "icon": "file-text",
499
+ "value": "@payload.data.length",
500
+ "type": "stat-display"
589
501
  },
590
502
  {
591
- "label": "Operations"
503
+ "value": "12",
504
+ "type": "stat-display",
505
+ "icon": "edit-3",
506
+ "label": "Drafts"
592
507
  },
593
508
  {
594
- "label": "Onboarding"
509
+ "icon": "check-circle",
510
+ "type": "stat-display",
511
+ "label": "Published",
512
+ "value": "84"
595
513
  },
596
514
  {
597
- "label": "Runbooks"
515
+ "label": "Archived",
516
+ "icon": "archive",
517
+ "type": "stat-display",
518
+ "value": "9"
598
519
  }
599
520
  ],
600
- "variant": "primary"
601
- },
602
- {
603
- "type": "accordion",
604
- "items": [
605
- {
606
- "id": "drafts",
607
- "content": "All in-progress documents that have not yet been published.",
608
- "title": "Drafts"
609
- },
610
- {
611
- "id": "published",
612
- "title": "Published",
613
- "content": "Documents visible to readers across the workspace."
614
- },
615
- {
616
- "title": "Archived",
617
- "content": "Read-only legacy documents preserved for historical reference.",
618
- "id": "archived"
619
- }
620
- ]
621
- },
622
- {
623
- "children": "Documents are the long-term memory of the organization.",
624
- "type": "pull-quote"
625
- },
626
- {
627
- "direction": "ltr",
628
- "type": "markdown-content",
629
- "content": "Welcome to the wiki workspace."
630
- },
631
- {
632
- "chapter": {
633
- "title": "Introduction",
634
- "content": "This chapter walks through composing your first document and publishing it to the workspace.",
635
- "id": "intro"
636
- },
637
- "type": "book-chapter-view"
638
- },
639
- {
640
- "language": "javascript",
641
- "code": "const greet = name => 'Hello ' + name",
642
- "type": "code-block",
643
- "showCopyButton": true,
644
- "showLanguageBadge": true,
645
- "foldable": true
646
- },
647
- {
648
- "title": "Sample document payload",
649
- "code": "title: Release Notes, version: 1.2.0, status: published",
650
- "type": "doc-code-block",
651
- "language": "json",
652
- "showLineNumbers": true
653
- },
654
- {
655
- "type": "code-view",
656
- "label": "Inspect document JSON",
657
- "defaultExpanded": false,
658
- "data": {
659
- "kind": "document",
660
- "blocks": 7.0,
661
- "version": 12.0,
662
- "status": "published"
663
- }
664
- },
665
- {
666
- "annotationId": "tip-1",
667
- "type": "text-highlight",
668
- "highlightType": "note",
669
- "children": [
670
- {
671
- "content": "Pro tip: pin the most-edited document to the workspace home for one-click access.",
672
- "type": "typography",
673
- "variant": "body"
674
- }
675
- ]
521
+ "cols": 4.0,
522
+ "type": "simple-grid"
676
523
  },
677
524
  {
678
525
  "type": "divider"
679
526
  },
680
527
  {
528
+ "gap": "sm",
529
+ "type": "data-grid",
681
530
  "itemActions": [
682
531
  {
683
- "label": "Open",
684
- "event": "OPEN",
685
532
  "variant": "primary",
686
- "icon": "edit"
533
+ "icon": "edit",
534
+ "label": "Open",
535
+ "event": "OPEN"
687
536
  },
688
537
  {
689
538
  "variant": "secondary",
539
+ "label": "Publish",
690
540
  "event": "PUBLISH",
691
- "icon": "send",
692
- "label": "Publish"
541
+ "icon": "send"
693
542
  }
694
543
  ],
695
544
  "entity": "@payload.data",
696
- "type": "data-grid",
697
- "gap": "sm",
698
545
  "fields": [
699
546
  {
700
547
  "label": "Title",
@@ -702,30 +549,63 @@
702
549
  "name": "title"
703
550
  },
704
551
  {
705
- "label": "Kind",
552
+ "variant": "badge",
706
553
  "name": "kind",
707
- "variant": "badge"
554
+ "label": "Kind"
708
555
  },
709
556
  {
710
- "variant": "badge",
711
557
  "name": "status",
712
- "label": "Status"
558
+ "label": "Status",
559
+ "variant": "badge"
713
560
  },
714
561
  {
715
- "name": "version",
562
+ "label": "v",
716
563
  "variant": "caption",
717
- "label": "v"
564
+ "name": "version"
718
565
  },
719
566
  {
720
- "label": "Updated",
721
567
  "variant": "caption",
722
- "name": "updatedAt"
568
+ "name": "updatedAt",
569
+ "label": "Updated"
723
570
  }
724
571
  ],
725
572
  "cols": 1.0
726
573
  }
727
- ],
728
- "type": "stack"
574
+ ]
575
+ }
576
+ ]
577
+ ]
578
+ },
579
+ {
580
+ "from": "loading",
581
+ "to": "loading",
582
+ "event": "DocumentSaved",
583
+ "effects": [
584
+ [
585
+ "fetch",
586
+ "Document",
587
+ {
588
+ "emit": {
589
+ "success": "DocumentLoaded",
590
+ "failure": "DocumentLoadFailed"
591
+ }
592
+ }
593
+ ]
594
+ ]
595
+ },
596
+ {
597
+ "from": "loading",
598
+ "to": "loading",
599
+ "event": "DocumentPublished",
600
+ "effects": [
601
+ [
602
+ "fetch",
603
+ "Document",
604
+ {
605
+ "emit": {
606
+ "success": "DocumentLoaded",
607
+ "failure": "DocumentLoadFailed"
608
+ }
729
609
  }
730
610
  ]
731
611
  ]
@@ -733,15 +613,31 @@
733
613
  {
734
614
  "from": "loading",
735
615
  "to": "error",
736
- "event": "DocumentLoadFailed",
616
+ "event": "DocumentSaveFailed",
737
617
  "effects": [
738
618
  [
739
619
  "render-ui",
740
620
  "main",
741
621
  {
742
622
  "variant": "error",
623
+ "message": "@payload.error",
624
+ "type": "alert"
625
+ }
626
+ ]
627
+ ]
628
+ },
629
+ {
630
+ "from": "loading",
631
+ "to": "error",
632
+ "event": "DocumentLoadFailed",
633
+ "effects": [
634
+ [
635
+ "render-ui",
636
+ "main",
637
+ {
743
638
  "type": "alert",
744
- "message": "@payload.error"
639
+ "message": "@payload.error",
640
+ "variant": "error"
745
641
  }
746
642
  ]
747
643
  ]
@@ -754,7 +650,7 @@
754
650
  [
755
651
  "set",
756
652
  "@entity.id",
757
- "@payload.documentId"
653
+ "@payload.row.id"
758
654
  ],
759
655
  [
760
656
  "set",
@@ -805,61 +701,73 @@
805
701
  "render-ui",
806
702
  "main",
807
703
  {
808
- "gap": "md",
809
- "direction": "vertical",
810
704
  "type": "stack",
705
+ "direction": "vertical",
706
+ "gap": "md",
811
707
  "children": [
812
708
  {
813
- "gap": "sm",
814
709
  "children": [
710
+ {
711
+ "variant": "ghost",
712
+ "action": "CLOSE_VIEW",
713
+ "type": "button",
714
+ "label": "Back"
715
+ },
815
716
  {
816
717
  "name": "file-text",
817
718
  "type": "icon"
818
719
  },
819
720
  {
721
+ "type": "typography",
820
722
  "content": "@entity.title",
821
- "variant": "h3",
822
- "type": "typography"
723
+ "variant": "h3"
823
724
  },
824
725
  {
825
- "type": "badge",
826
726
  "variant": "secondary",
827
- "label": "@entity.status"
727
+ "label": "@entity.status",
728
+ "type": "badge"
828
729
  }
829
730
  ],
830
731
  "direction": "horizontal",
732
+ "gap": "sm",
733
+ "align": "center",
831
734
  "type": "stack"
832
735
  },
833
736
  {
834
737
  "type": "divider"
835
738
  },
836
739
  {
837
- "showToolbar": true,
838
740
  "placeholder": "Start writing…",
741
+ "changeEvent": "BLOCKS_CHANGE",
839
742
  "type": "rich-block-editor",
840
- "initialBlocks": "@entity.blocksJson",
841
- "changeEvent": "BLOCKS_CHANGE"
743
+ "showToolbar": true,
744
+ "initialBlocks": "@entity.blocksJson"
842
745
  },
843
746
  {
844
- "gap": "sm",
747
+ "type": "stack",
845
748
  "children": [
846
749
  {
847
- "label": "Save",
848
- "variant": "primary",
849
- "icon": "save",
850
750
  "type": "button",
851
- "action": "SAVE"
751
+ "label": "Save",
752
+ "actionPayload": {
753
+ "id": "@entity.id"
754
+ },
755
+ "action": "SAVE",
756
+ "variant": "primary"
852
757
  },
853
758
  {
759
+ "type": "button",
760
+ "label": "Publish",
854
761
  "variant": "secondary",
855
- "icon": "send",
856
762
  "action": "PUBLISH",
857
- "label": "Publish",
858
- "type": "button"
763
+ "actionPayload": {
764
+ "id": "@entity.id"
765
+ }
859
766
  }
860
767
  ],
768
+ "align": "center",
861
769
  "direction": "horizontal",
862
- "type": "stack"
770
+ "gap": "sm"
863
771
  }
864
772
  ]
865
773
  }
@@ -868,70 +776,45 @@
868
776
  },
869
777
  {
870
778
  "from": "browsing",
871
- "to": "browsing",
779
+ "to": "loading",
872
780
  "event": "PUBLISH",
873
781
  "effects": [
874
782
  [
875
783
  "set",
876
784
  "@entity.id",
877
- "@payload.documentId"
878
- ],
879
- [
880
- "set",
881
- "@entity.title",
882
- "@payload.row.title"
883
- ],
884
- [
885
- "set",
886
- "@entity.blocksJson",
887
- "@payload.row.blocksJson"
888
- ],
889
- [
890
- "set",
891
- "@entity.authorId",
892
- "@payload.row.authorId"
893
- ],
894
- [
895
- "set",
896
- "@entity.parentId",
897
- "@payload.row.parentId"
898
- ],
899
- [
900
- "set",
901
- "@entity.kind",
902
- "@payload.row.kind"
903
- ],
904
- [
905
- "set",
906
- "@entity.status",
907
- "published"
785
+ "@payload.id"
908
786
  ],
909
787
  [
910
- "set",
911
- "@entity.version",
912
- "@payload.row.version"
913
- ],
914
- [
915
- "set",
916
- "@entity.createdAt",
917
- "@payload.row.createdAt"
918
- ],
919
- [
920
- "set",
921
- "@entity.updatedAt",
922
- "@payload.row.updatedAt"
923
- ],
924
- [
925
- "persist",
926
- "update",
788
+ "fetch",
927
789
  "Document",
928
- "@entity",
929
790
  {
930
791
  "emit": {
931
- "success": "DocumentPublished",
932
- "failure": "DocumentSaveFailed"
792
+ "failure": "DocumentLoadFailed",
793
+ "success": "DocumentLoaded"
933
794
  }
934
795
  }
796
+ ],
797
+ [
798
+ "render-ui",
799
+ "main",
800
+ {
801
+ "align": "center",
802
+ "children": [
803
+ {
804
+ "type": "spinner"
805
+ },
806
+ {
807
+ "variant": "caption",
808
+ "color": "muted",
809
+ "content": "Publishing document…",
810
+ "type": "typography"
811
+ }
812
+ ],
813
+ "type": "stack",
814
+ "direction": "vertical",
815
+ "className": "py-12",
816
+ "gap": "md"
817
+ }
935
818
  ]
936
819
  ]
937
820
  },
@@ -949,87 +832,52 @@
949
832
  },
950
833
  {
951
834
  "from": "editing",
952
- "to": "editing",
953
- "event": "SAVE",
835
+ "to": "loading",
836
+ "event": "CLOSE_VIEW",
954
837
  "effects": [
955
838
  [
956
- "set",
957
- "@entity.id",
958
- "@payload.documentId"
959
- ],
960
- [
961
- "set",
962
- "@entity.blocksJson",
963
- "@payload.blocks"
964
- ],
965
- [
966
- "persist",
967
- "update",
839
+ "fetch",
968
840
  "Document",
969
- "@entity",
970
841
  {
971
842
  "emit": {
972
- "success": "DocumentSaved",
973
- "failure": "DocumentSaveFailed"
843
+ "success": "DocumentLoaded",
844
+ "failure": "DocumentLoadFailed"
974
845
  }
975
846
  }
847
+ ],
848
+ [
849
+ "render-ui",
850
+ "main",
851
+ {
852
+ "children": [
853
+ {
854
+ "type": "spinner"
855
+ },
856
+ {
857
+ "color": "muted",
858
+ "content": "Loading documents…",
859
+ "variant": "caption",
860
+ "type": "typography"
861
+ }
862
+ ],
863
+ "className": "py-12",
864
+ "gap": "md",
865
+ "align": "center",
866
+ "type": "stack",
867
+ "direction": "vertical"
868
+ }
976
869
  ]
977
870
  ]
978
871
  },
979
872
  {
980
873
  "from": "editing",
981
- "to": "editing",
982
- "event": "PUBLISH",
874
+ "to": "loading",
875
+ "event": "SAVE",
983
876
  "effects": [
984
877
  [
985
878
  "set",
986
879
  "@entity.id",
987
- "@payload.documentId"
988
- ],
989
- [
990
- "set",
991
- "@entity.title",
992
- "@payload.row.title"
993
- ],
994
- [
995
- "set",
996
- "@entity.blocksJson",
997
- "@payload.row.blocksJson"
998
- ],
999
- [
1000
- "set",
1001
- "@entity.authorId",
1002
- "@payload.row.authorId"
1003
- ],
1004
- [
1005
- "set",
1006
- "@entity.parentId",
1007
- "@payload.row.parentId"
1008
- ],
1009
- [
1010
- "set",
1011
- "@entity.kind",
1012
- "@payload.row.kind"
1013
- ],
1014
- [
1015
- "set",
1016
- "@entity.status",
1017
- "published"
1018
- ],
1019
- [
1020
- "set",
1021
- "@entity.version",
1022
- "@payload.row.version"
1023
- ],
1024
- [
1025
- "set",
1026
- "@entity.createdAt",
1027
- "@payload.row.createdAt"
1028
- ],
1029
- [
1030
- "set",
1031
- "@entity.updatedAt",
1032
- "@payload.row.updatedAt"
880
+ "@payload.id"
1033
881
  ],
1034
882
  [
1035
883
  "persist",
@@ -1038,25 +886,31 @@
1038
886
  "@entity",
1039
887
  {
1040
888
  "emit": {
1041
- "success": "DocumentPublished",
889
+ "success": "DocumentSaved",
1042
890
  "failure": "DocumentSaveFailed"
1043
891
  }
1044
892
  }
1045
- ]
1046
- ]
1047
- },
1048
- {
1049
- "from": "editing",
1050
- "to": "editing",
1051
- "event": "DocumentSaved",
1052
- "effects": [
893
+ ],
1053
894
  [
1054
895
  "render-ui",
1055
896
  "main",
1056
897
  {
1057
- "variant": "success",
1058
- "type": "alert",
1059
- "message": "Saved"
898
+ "children": [
899
+ {
900
+ "type": "spinner"
901
+ },
902
+ {
903
+ "type": "typography",
904
+ "color": "muted",
905
+ "content": "Saving document…",
906
+ "variant": "caption"
907
+ }
908
+ ],
909
+ "gap": "md",
910
+ "type": "stack",
911
+ "direction": "vertical",
912
+ "align": "center",
913
+ "className": "py-12"
1060
914
  }
1061
915
  ]
1062
916
  ]
@@ -1064,32 +918,50 @@
1064
918
  {
1065
919
  "from": "editing",
1066
920
  "to": "loading",
1067
- "event": "DocumentPublished",
921
+ "event": "PUBLISH",
1068
922
  "effects": [
1069
923
  [
1070
- "fetch",
924
+ "set",
925
+ "@entity.id",
926
+ "@payload.id"
927
+ ],
928
+ [
929
+ "set",
930
+ "@entity.status",
931
+ "published"
932
+ ],
933
+ [
934
+ "persist",
935
+ "update",
1071
936
  "Document",
937
+ "@entity",
1072
938
  {
1073
939
  "emit": {
1074
- "success": "DocumentLoaded",
1075
- "failure": "DocumentLoadFailed"
940
+ "success": "DocumentPublished",
941
+ "failure": "DocumentSaveFailed"
1076
942
  }
1077
943
  }
1078
- ]
1079
- ]
1080
- },
1081
- {
1082
- "from": "editing",
1083
- "to": "editing",
1084
- "event": "DocumentSaveFailed",
1085
- "effects": [
944
+ ],
1086
945
  [
1087
946
  "render-ui",
1088
947
  "main",
1089
948
  {
1090
- "message": "@payload.error",
1091
- "variant": "error",
1092
- "type": "alert"
949
+ "type": "stack",
950
+ "className": "py-12",
951
+ "gap": "md",
952
+ "direction": "vertical",
953
+ "align": "center",
954
+ "children": [
955
+ {
956
+ "type": "spinner"
957
+ },
958
+ {
959
+ "color": "muted",
960
+ "type": "typography",
961
+ "content": "Publishing document…",
962
+ "variant": "caption"
963
+ }
964
+ ]
1093
965
  }
1094
966
  ]
1095
967
  ]