@almadar/std 16.184.0 → 16.185.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.
@@ -63030,6 +63030,34 @@ function stdRichEditorDocumentOrbital(params = {}) {
63030
63030
  {
63031
63031
  "category": "interaction",
63032
63032
  "config": {
63033
+ "editLabel": {
63034
+ "default": "Edit content",
63035
+ "description": "Label of the button above the read-only body that opens the editor.",
63036
+ "label": "Edit button label",
63037
+ "tier": "presentation",
63038
+ "type": "string"
63039
+ },
63040
+ "emptyActionLabel": {
63041
+ "default": "Start writing",
63042
+ "description": "Label of the button that opens the editor from the empty body state.",
63043
+ "label": "Empty action label",
63044
+ "tier": "presentation",
63045
+ "type": "string"
63046
+ },
63047
+ "emptyDescription": {
63048
+ "default": "This page has no content yet. Start writing to fill it in.",
63049
+ "description": "Supporting line shown with the empty body state.",
63050
+ "label": "Empty description",
63051
+ "tier": "presentation",
63052
+ "type": "string"
63053
+ },
63054
+ "emptyTitle": {
63055
+ "default": "Nothing written yet",
63056
+ "description": "Heading shown in place of the body when the row has no blocks yet.",
63057
+ "label": "Empty heading",
63058
+ "tier": "presentation",
63059
+ "type": "string"
63060
+ },
63033
63061
  "placeholder": {
63034
63062
  "default": "Start writing\u2026",
63035
63063
  "description": "Placeholder shown in the block editor when it is empty.",
@@ -63039,7 +63067,7 @@ function stdRichEditorDocumentOrbital(params = {}) {
63039
63067
  },
63040
63068
  "title": {
63041
63069
  "default": "Edit content",
63042
- "description": "Heading shown at the top of the block editor overlay.",
63070
+ "description": "Heading shown above the editor while the body is being edited.",
63043
63071
  "label": "Editor heading",
63044
63072
  "tier": "presentation",
63045
63073
  "type": "string"
@@ -63065,7 +63093,7 @@ function stdRichEditorDocumentOrbital(params = {}) {
63065
63093
  "tier": "domain"
63066
63094
  },
63067
63095
  {
63068
- "description": "Indicates the block editor overlay is being dismissed.",
63096
+ "description": "Leaves the editor without saving; the body returns to its read-only render.",
63069
63097
  "event": "CLOSE",
63070
63098
  "synonyms": "dismiss, hide, cancel, close",
63071
63099
  "tier": "domain"
@@ -63100,7 +63128,7 @@ function stdRichEditorDocumentOrbital(params = {}) {
63100
63128
  "name": "Initialize"
63101
63129
  },
63102
63130
  {
63103
- "description": "Requests the block editor overlay open for the given row. The caller supplies the row's id and current blocks \u2014 this trait never fetches them itself.",
63131
+ "description": "Hands the editor the row whose body it renders \u2014 the caller supplies the row's id and current blocks, since this trait never fetches them itself. Re-firing it repaints the body (e.g. after the host refetches a saved row).",
63104
63132
  "key": "OPEN",
63105
63133
  "name": "Open",
63106
63134
  "payloadSchema": [
@@ -63132,6 +63160,39 @@ function stdRichEditorDocumentOrbital(params = {}) {
63132
63160
  "synonyms": "show, launch, reveal, edit",
63133
63161
  "tier": "domain"
63134
63162
  },
63163
+ {
63164
+ "description": "Hands the editor a row that was just created as a blank draft: same payload as OPEN, but the body opens straight in the authoring editor instead of the read-only render, so a document-first 'New page' lands the author on a cursor rather than an empty state.",
63165
+ "key": "OPEN_DRAFT",
63166
+ "name": "Open Draft",
63167
+ "payloadSchema": [
63168
+ {
63169
+ "name": "id",
63170
+ "required": true,
63171
+ "type": "string"
63172
+ },
63173
+ {
63174
+ "name": "blocksJson",
63175
+ "properties": [
63176
+ {
63177
+ "name": "type",
63178
+ "required": true,
63179
+ "type": "string"
63180
+ },
63181
+ {
63182
+ "name": "content",
63183
+ "type": "string"
63184
+ },
63185
+ {
63186
+ "name": "id",
63187
+ "type": "string"
63188
+ }
63189
+ ],
63190
+ "type": "[object]"
63191
+ }
63192
+ ],
63193
+ "synonyms": "new document, start writing, blank draft, compose",
63194
+ "tier": "domain"
63195
+ },
63135
63196
  {
63136
63197
  "description": "Signals a row's block content is ready to persist. This atom never persists \u2014 the composing organism routes BLOCKS_SAVED into its own persistor's update event.",
63137
63198
  "key": "BLOCKS_SAVED",
@@ -63150,6 +63211,10 @@ function stdRichEditorDocumentOrbital(params = {}) {
63150
63211
  "synonyms": "saved, persist, update, commit",
63151
63212
  "tier": "domain"
63152
63213
  },
63214
+ {
63215
+ "key": "EDIT_BLOCKS",
63216
+ "name": "Edit Blocks"
63217
+ },
63153
63218
  {
63154
63219
  "description": "Signals that the content of a block has been modified while editing.",
63155
63220
  "key": "BLOCKS_CHANGE",
@@ -63179,11 +63244,11 @@ function stdRichEditorDocumentOrbital(params = {}) {
63179
63244
  "tier": "domain"
63180
63245
  },
63181
63246
  {
63182
- "key": "SAVE",
63183
- "name": "Save"
63247
+ "key": "SAVE_BLOCKS",
63248
+ "name": "Save Blocks"
63184
63249
  },
63185
63250
  {
63186
- "description": "Indicates the block editor overlay is being dismissed.",
63251
+ "description": "Leaves the editor without saving; the body returns to its read-only render.",
63187
63252
  "key": "CLOSE",
63188
63253
  "name": "Close",
63189
63254
  "synonyms": "dismiss, hide, cancel, close",
@@ -63195,6 +63260,9 @@ function stdRichEditorDocumentOrbital(params = {}) {
63195
63260
  "isInitial": true,
63196
63261
  "name": "idle"
63197
63262
  },
63263
+ {
63264
+ "name": "viewing"
63265
+ },
63198
63266
  {
63199
63267
  "name": "editing"
63200
63268
  }
@@ -63219,7 +63287,107 @@ function stdRichEditorDocumentOrbital(params = {}) {
63219
63287
  ],
63220
63288
  [
63221
63289
  "render-ui",
63222
- "modal",
63290
+ "main",
63291
+ {
63292
+ "children": [
63293
+ {
63294
+ "children": [
63295
+ {
63296
+ "action": "EDIT_BLOCKS",
63297
+ "icon": "edit",
63298
+ "label": "@config.editLabel",
63299
+ "type": "button",
63300
+ "variant": "secondary"
63301
+ }
63302
+ ],
63303
+ "direction": "horizontal",
63304
+ "gap": "sm",
63305
+ "justify": "end",
63306
+ "type": "stack"
63307
+ },
63308
+ {
63309
+ "action": "EDIT_BLOCKS",
63310
+ "children": [
63311
+ {
63312
+ "initialBlocks": "@entity.blocksJson",
63313
+ "readOnly": true,
63314
+ "type": "rich-block-editor"
63315
+ }
63316
+ ],
63317
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
63318
+ "type": "box"
63319
+ }
63320
+ ],
63321
+ "direction": "vertical",
63322
+ "gap": "sm",
63323
+ "type": "stack"
63324
+ }
63325
+ ]
63326
+ ],
63327
+ "event": "OPEN",
63328
+ "from": "idle",
63329
+ "guard": [
63330
+ ">",
63331
+ [
63332
+ "array/len",
63333
+ "@payload.blocksJson"
63334
+ ],
63335
+ 0
63336
+ ],
63337
+ "to": "viewing"
63338
+ },
63339
+ {
63340
+ "effects": [
63341
+ [
63342
+ "set",
63343
+ "@entity.id",
63344
+ "@payload.id"
63345
+ ],
63346
+ [
63347
+ "set",
63348
+ "@entity.blocksJson",
63349
+ "@payload.blocksJson"
63350
+ ],
63351
+ [
63352
+ "render-ui",
63353
+ "main",
63354
+ {
63355
+ "actionEvent": "EDIT_BLOCKS",
63356
+ "actionLabel": "@config.emptyActionLabel",
63357
+ "description": "@config.emptyDescription",
63358
+ "icon": "file-text",
63359
+ "title": "@config.emptyTitle",
63360
+ "type": "empty-state"
63361
+ }
63362
+ ]
63363
+ ],
63364
+ "event": "OPEN",
63365
+ "from": "idle",
63366
+ "guard": [
63367
+ "=",
63368
+ [
63369
+ "array/len",
63370
+ "@payload.blocksJson"
63371
+ ],
63372
+ 0
63373
+ ],
63374
+ "to": "viewing"
63375
+ },
63376
+ {
63377
+ "effects": [
63378
+ [
63379
+ "set",
63380
+ "@entity.id",
63381
+ "@payload.id"
63382
+ ],
63383
+ [
63384
+ "set",
63385
+ "@entity.blocksJson",
63386
+ "@payload.blocksJson"
63387
+ ],
63388
+ [
63389
+ "render-ui",
63390
+ "main",
63223
63391
  {
63224
63392
  "children": [
63225
63393
  {
@@ -63232,16 +63400,13 @@ function stdRichEditorDocumentOrbital(params = {}) {
63232
63400
  {
63233
63401
  "content": "@config.title",
63234
63402
  "type": "typography",
63235
- "variant": "h3"
63403
+ "variant": "h4"
63236
63404
  }
63237
63405
  ],
63238
63406
  "direction": "horizontal",
63239
63407
  "gap": "sm",
63240
63408
  "type": "stack"
63241
63409
  },
63242
- {
63243
- "type": "divider"
63244
- },
63245
63410
  {
63246
63411
  "changeEvent": "BLOCKS_CHANGE",
63247
63412
  "initialBlocks": "@entity.blocksJson",
@@ -63250,10 +63415,9 @@ function stdRichEditorDocumentOrbital(params = {}) {
63250
63415
  "type": "rich-block-editor"
63251
63416
  },
63252
63417
  {
63253
- "align": "center",
63254
63418
  "children": [
63255
63419
  {
63256
- "action": "SAVE",
63420
+ "action": "SAVE_BLOCKS",
63257
63421
  "label": "Save",
63258
63422
  "type": "button",
63259
63423
  "variant": "primary"
@@ -63267,6 +63431,7 @@ function stdRichEditorDocumentOrbital(params = {}) {
63267
63431
  ],
63268
63432
  "direction": "horizontal",
63269
63433
  "gap": "sm",
63434
+ "justify": "end",
63270
63435
  "type": "stack"
63271
63436
  }
63272
63437
  ],
@@ -63276,7 +63441,7 @@ function stdRichEditorDocumentOrbital(params = {}) {
63276
63441
  }
63277
63442
  ]
63278
63443
  ],
63279
- "event": "OPEN",
63444
+ "event": "OPEN_DRAFT",
63280
63445
  "from": "idle",
63281
63446
  "to": "editing"
63282
63447
  },
@@ -63287,23 +63452,252 @@ function stdRichEditorDocumentOrbital(params = {}) {
63287
63452
  },
63288
63453
  {
63289
63454
  "effects": [
63455
+ [
63456
+ "set",
63457
+ "@entity.id",
63458
+ "@payload.id"
63459
+ ],
63290
63460
  [
63291
63461
  "set",
63292
63462
  "@entity.blocksJson",
63293
- "@payload.blocks"
63463
+ "@payload.blocksJson"
63464
+ ],
63465
+ [
63466
+ "render-ui",
63467
+ "main",
63468
+ {
63469
+ "children": [
63470
+ {
63471
+ "align": "center",
63472
+ "children": [
63473
+ {
63474
+ "name": "file-text",
63475
+ "type": "icon"
63476
+ },
63477
+ {
63478
+ "content": "@config.title",
63479
+ "type": "typography",
63480
+ "variant": "h4"
63481
+ }
63482
+ ],
63483
+ "direction": "horizontal",
63484
+ "gap": "sm",
63485
+ "type": "stack"
63486
+ },
63487
+ {
63488
+ "changeEvent": "BLOCKS_CHANGE",
63489
+ "initialBlocks": "@entity.blocksJson",
63490
+ "placeholder": "@config.placeholder",
63491
+ "showToolbar": true,
63492
+ "type": "rich-block-editor"
63493
+ },
63494
+ {
63495
+ "children": [
63496
+ {
63497
+ "action": "SAVE_BLOCKS",
63498
+ "label": "Save",
63499
+ "type": "button",
63500
+ "variant": "primary"
63501
+ },
63502
+ {
63503
+ "action": "CLOSE",
63504
+ "label": "Cancel",
63505
+ "type": "button",
63506
+ "variant": "ghost"
63507
+ }
63508
+ ],
63509
+ "direction": "horizontal",
63510
+ "gap": "sm",
63511
+ "justify": "end",
63512
+ "type": "stack"
63513
+ }
63514
+ ],
63515
+ "direction": "vertical",
63516
+ "gap": "md",
63517
+ "type": "stack"
63518
+ }
63294
63519
  ]
63295
63520
  ],
63296
- "event": "BLOCKS_CHANGE",
63297
- "from": "editing",
63521
+ "event": "OPEN_DRAFT",
63522
+ "from": "viewing",
63298
63523
  "to": "editing"
63299
63524
  },
63300
63525
  {
63301
63526
  "effects": [
63527
+ [
63528
+ "set",
63529
+ "@entity.id",
63530
+ "@payload.id"
63531
+ ],
63532
+ [
63533
+ "set",
63534
+ "@entity.blocksJson",
63535
+ "@payload.blocksJson"
63536
+ ],
63537
+ [
63538
+ "render-ui",
63539
+ "main",
63540
+ {
63541
+ "children": [
63542
+ {
63543
+ "children": [
63544
+ {
63545
+ "action": "EDIT_BLOCKS",
63546
+ "icon": "edit",
63547
+ "label": "@config.editLabel",
63548
+ "type": "button",
63549
+ "variant": "secondary"
63550
+ }
63551
+ ],
63552
+ "direction": "horizontal",
63553
+ "gap": "sm",
63554
+ "justify": "end",
63555
+ "type": "stack"
63556
+ },
63557
+ {
63558
+ "action": "EDIT_BLOCKS",
63559
+ "children": [
63560
+ {
63561
+ "initialBlocks": "@entity.blocksJson",
63562
+ "readOnly": true,
63563
+ "type": "rich-block-editor"
63564
+ }
63565
+ ],
63566
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
63567
+ "type": "box"
63568
+ }
63569
+ ],
63570
+ "direction": "vertical",
63571
+ "gap": "sm",
63572
+ "type": "stack"
63573
+ }
63574
+ ]
63575
+ ],
63576
+ "event": "OPEN",
63577
+ "from": "viewing",
63578
+ "guard": [
63579
+ ">",
63580
+ [
63581
+ "array/len",
63582
+ "@payload.blocksJson"
63583
+ ],
63584
+ 0
63585
+ ],
63586
+ "to": "viewing"
63587
+ },
63588
+ {
63589
+ "effects": [
63590
+ [
63591
+ "set",
63592
+ "@entity.id",
63593
+ "@payload.id"
63594
+ ],
63595
+ [
63596
+ "set",
63597
+ "@entity.blocksJson",
63598
+ "@payload.blocksJson"
63599
+ ],
63302
63600
  [
63303
63601
  "render-ui",
63304
- "modal",
63305
- null
63602
+ "main",
63603
+ {
63604
+ "actionEvent": "EDIT_BLOCKS",
63605
+ "actionLabel": "@config.emptyActionLabel",
63606
+ "description": "@config.emptyDescription",
63607
+ "icon": "file-text",
63608
+ "title": "@config.emptyTitle",
63609
+ "type": "empty-state"
63610
+ }
63611
+ ]
63612
+ ],
63613
+ "event": "OPEN",
63614
+ "from": "viewing",
63615
+ "guard": [
63616
+ "=",
63617
+ [
63618
+ "array/len",
63619
+ "@payload.blocksJson"
63306
63620
  ],
63621
+ 0
63622
+ ],
63623
+ "to": "viewing"
63624
+ },
63625
+ {
63626
+ "effects": [
63627
+ [
63628
+ "render-ui",
63629
+ "main",
63630
+ {
63631
+ "children": [
63632
+ {
63633
+ "align": "center",
63634
+ "children": [
63635
+ {
63636
+ "name": "file-text",
63637
+ "type": "icon"
63638
+ },
63639
+ {
63640
+ "content": "@config.title",
63641
+ "type": "typography",
63642
+ "variant": "h4"
63643
+ }
63644
+ ],
63645
+ "direction": "horizontal",
63646
+ "gap": "sm",
63647
+ "type": "stack"
63648
+ },
63649
+ {
63650
+ "changeEvent": "BLOCKS_CHANGE",
63651
+ "initialBlocks": "@entity.blocksJson",
63652
+ "placeholder": "@config.placeholder",
63653
+ "showToolbar": true,
63654
+ "type": "rich-block-editor"
63655
+ },
63656
+ {
63657
+ "children": [
63658
+ {
63659
+ "action": "SAVE_BLOCKS",
63660
+ "label": "Save",
63661
+ "type": "button",
63662
+ "variant": "primary"
63663
+ },
63664
+ {
63665
+ "action": "CLOSE",
63666
+ "label": "Cancel",
63667
+ "type": "button",
63668
+ "variant": "ghost"
63669
+ }
63670
+ ],
63671
+ "direction": "horizontal",
63672
+ "gap": "sm",
63673
+ "justify": "end",
63674
+ "type": "stack"
63675
+ }
63676
+ ],
63677
+ "direction": "vertical",
63678
+ "gap": "md",
63679
+ "type": "stack"
63680
+ }
63681
+ ]
63682
+ ],
63683
+ "event": "EDIT_BLOCKS",
63684
+ "from": "viewing",
63685
+ "to": "editing"
63686
+ },
63687
+ {
63688
+ "effects": [
63689
+ [
63690
+ "set",
63691
+ "@entity.blocksJson",
63692
+ "@payload.blocks"
63693
+ ]
63694
+ ],
63695
+ "event": "BLOCKS_CHANGE",
63696
+ "from": "editing",
63697
+ "to": "editing"
63698
+ },
63699
+ {
63700
+ "effects": [
63307
63701
  [
63308
63702
  "emit",
63309
63703
  "BLOCKS_SAVED",
@@ -63311,23 +63705,94 @@ function stdRichEditorDocumentOrbital(params = {}) {
63311
63705
  "blocksJson": "@entity.blocksJson",
63312
63706
  "id": "@entity.id"
63313
63707
  }
63708
+ ],
63709
+ [
63710
+ "render-ui",
63711
+ "main",
63712
+ {
63713
+ "children": [
63714
+ {
63715
+ "children": [
63716
+ {
63717
+ "action": "EDIT_BLOCKS",
63718
+ "icon": "edit",
63719
+ "label": "@config.editLabel",
63720
+ "type": "button",
63721
+ "variant": "secondary"
63722
+ }
63723
+ ],
63724
+ "direction": "horizontal",
63725
+ "gap": "sm",
63726
+ "justify": "end",
63727
+ "type": "stack"
63728
+ },
63729
+ {
63730
+ "action": "EDIT_BLOCKS",
63731
+ "children": [
63732
+ {
63733
+ "initialBlocks": "@entity.blocksJson",
63734
+ "readOnly": true,
63735
+ "type": "rich-block-editor"
63736
+ }
63737
+ ],
63738
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
63739
+ "type": "box"
63740
+ }
63741
+ ],
63742
+ "direction": "vertical",
63743
+ "gap": "sm",
63744
+ "type": "stack"
63745
+ }
63314
63746
  ]
63315
63747
  ],
63316
- "event": "SAVE",
63748
+ "event": "SAVE_BLOCKS",
63317
63749
  "from": "editing",
63318
- "to": "idle"
63750
+ "to": "viewing"
63319
63751
  },
63320
63752
  {
63321
63753
  "effects": [
63322
63754
  [
63323
63755
  "render-ui",
63324
- "modal",
63325
- null
63756
+ "main",
63757
+ {
63758
+ "children": [
63759
+ {
63760
+ "children": [
63761
+ {
63762
+ "action": "EDIT_BLOCKS",
63763
+ "icon": "edit",
63764
+ "label": "@config.editLabel",
63765
+ "type": "button",
63766
+ "variant": "secondary"
63767
+ }
63768
+ ],
63769
+ "direction": "horizontal",
63770
+ "gap": "sm",
63771
+ "justify": "end",
63772
+ "type": "stack"
63773
+ },
63774
+ {
63775
+ "action": "EDIT_BLOCKS",
63776
+ "children": [
63777
+ {
63778
+ "initialBlocks": "@entity.blocksJson",
63779
+ "readOnly": true,
63780
+ "type": "rich-block-editor"
63781
+ }
63782
+ ],
63783
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
63784
+ "type": "box"
63785
+ }
63786
+ ],
63787
+ "direction": "vertical",
63788
+ "gap": "sm",
63789
+ "type": "stack"
63790
+ }
63326
63791
  ]
63327
63792
  ],
63328
63793
  "event": "CLOSE",
63329
63794
  "from": "editing",
63330
- "to": "idle"
63795
+ "to": "viewing"
63331
63796
  }
63332
63797
  ]
63333
63798
  }
@@ -136214,6 +136679,13 @@ function stdUiDetailPanelDetailPanelOrbital(params = {}) {
136214
136679
  "tier": "presentation",
136215
136680
  "type": "string"
136216
136681
  },
136682
+ "onTitleCommit": {
136683
+ "default": "",
136684
+ "description": "When bound, the title becomes editable in place: clicking it swaps the heading for an input, Enter or blur commits, Escape reverts. Receives the committed title and the record's id so the host can persist a partial update. Unbound, the title stays a plain heading.",
136685
+ "label": "On Title Commit",
136686
+ "tier": "presentation",
136687
+ "type": "string"
136688
+ },
136217
136689
  "pageProp": {
136218
136690
  "description": "Current page number",
136219
136691
  "label": "Page",
@@ -136497,6 +136969,7 @@ function stdUiDetailPanelDetailPanelOrbital(params = {}) {
136497
136969
  "isLoading": "@config.isLoading",
136498
136970
  "maxInlineActions": "@config.maxInlineActions",
136499
136971
  "mode": "@config.mode",
136972
+ "onTitleCommit": "@config.onTitleCommit",
136500
136973
  "page": "@config.pageProp",
136501
136974
  "pageSize": "@config.pageSize",
136502
136975
  "position": "@config.position",
@@ -136542,6 +137015,7 @@ function stdUiDetailPanelDetailPanelOrbital(params = {}) {
136542
137015
  "isLoading": "@config.isLoading",
136543
137016
  "maxInlineActions": "@config.maxInlineActions",
136544
137017
  "mode": "@config.mode",
137018
+ "onTitleCommit": "@config.onTitleCommit",
136545
137019
  "page": "@config.pageProp",
136546
137020
  "pageSize": "@config.pageSize",
136547
137021
  "position": "@config.position",