@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.
@@ -64793,6 +64793,34 @@ function stdRichEditorDocumentOrbital(params = {}) {
64793
64793
  {
64794
64794
  "category": "interaction",
64795
64795
  "config": {
64796
+ "editLabel": {
64797
+ "default": "Edit content",
64798
+ "description": "Label of the button above the read-only body that opens the editor.",
64799
+ "label": "Edit button label",
64800
+ "tier": "presentation",
64801
+ "type": "string"
64802
+ },
64803
+ "emptyActionLabel": {
64804
+ "default": "Start writing",
64805
+ "description": "Label of the button that opens the editor from the empty body state.",
64806
+ "label": "Empty action label",
64807
+ "tier": "presentation",
64808
+ "type": "string"
64809
+ },
64810
+ "emptyDescription": {
64811
+ "default": "This page has no content yet. Start writing to fill it in.",
64812
+ "description": "Supporting line shown with the empty body state.",
64813
+ "label": "Empty description",
64814
+ "tier": "presentation",
64815
+ "type": "string"
64816
+ },
64817
+ "emptyTitle": {
64818
+ "default": "Nothing written yet",
64819
+ "description": "Heading shown in place of the body when the row has no blocks yet.",
64820
+ "label": "Empty heading",
64821
+ "tier": "presentation",
64822
+ "type": "string"
64823
+ },
64796
64824
  "placeholder": {
64797
64825
  "default": "Start writing\u2026",
64798
64826
  "description": "Placeholder shown in the block editor when it is empty.",
@@ -64802,7 +64830,7 @@ function stdRichEditorDocumentOrbital(params = {}) {
64802
64830
  },
64803
64831
  "title": {
64804
64832
  "default": "Edit content",
64805
- "description": "Heading shown at the top of the block editor overlay.",
64833
+ "description": "Heading shown above the editor while the body is being edited.",
64806
64834
  "label": "Editor heading",
64807
64835
  "tier": "presentation",
64808
64836
  "type": "string"
@@ -64828,7 +64856,7 @@ function stdRichEditorDocumentOrbital(params = {}) {
64828
64856
  "tier": "domain"
64829
64857
  },
64830
64858
  {
64831
- "description": "Indicates the block editor overlay is being dismissed.",
64859
+ "description": "Leaves the editor without saving; the body returns to its read-only render.",
64832
64860
  "event": "CLOSE",
64833
64861
  "synonyms": "dismiss, hide, cancel, close",
64834
64862
  "tier": "domain"
@@ -64863,7 +64891,7 @@ function stdRichEditorDocumentOrbital(params = {}) {
64863
64891
  "name": "Initialize"
64864
64892
  },
64865
64893
  {
64866
- "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.",
64894
+ "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).",
64867
64895
  "key": "OPEN",
64868
64896
  "name": "Open",
64869
64897
  "payloadSchema": [
@@ -64895,6 +64923,39 @@ function stdRichEditorDocumentOrbital(params = {}) {
64895
64923
  "synonyms": "show, launch, reveal, edit",
64896
64924
  "tier": "domain"
64897
64925
  },
64926
+ {
64927
+ "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.",
64928
+ "key": "OPEN_DRAFT",
64929
+ "name": "Open Draft",
64930
+ "payloadSchema": [
64931
+ {
64932
+ "name": "id",
64933
+ "required": true,
64934
+ "type": "string"
64935
+ },
64936
+ {
64937
+ "name": "blocksJson",
64938
+ "properties": [
64939
+ {
64940
+ "name": "type",
64941
+ "required": true,
64942
+ "type": "string"
64943
+ },
64944
+ {
64945
+ "name": "content",
64946
+ "type": "string"
64947
+ },
64948
+ {
64949
+ "name": "id",
64950
+ "type": "string"
64951
+ }
64952
+ ],
64953
+ "type": "[object]"
64954
+ }
64955
+ ],
64956
+ "synonyms": "new document, start writing, blank draft, compose",
64957
+ "tier": "domain"
64958
+ },
64898
64959
  {
64899
64960
  "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.",
64900
64961
  "key": "BLOCKS_SAVED",
@@ -64913,6 +64974,10 @@ function stdRichEditorDocumentOrbital(params = {}) {
64913
64974
  "synonyms": "saved, persist, update, commit",
64914
64975
  "tier": "domain"
64915
64976
  },
64977
+ {
64978
+ "key": "EDIT_BLOCKS",
64979
+ "name": "Edit Blocks"
64980
+ },
64916
64981
  {
64917
64982
  "description": "Signals that the content of a block has been modified while editing.",
64918
64983
  "key": "BLOCKS_CHANGE",
@@ -64942,11 +65007,11 @@ function stdRichEditorDocumentOrbital(params = {}) {
64942
65007
  "tier": "domain"
64943
65008
  },
64944
65009
  {
64945
- "key": "SAVE",
64946
- "name": "Save"
65010
+ "key": "SAVE_BLOCKS",
65011
+ "name": "Save Blocks"
64947
65012
  },
64948
65013
  {
64949
- "description": "Indicates the block editor overlay is being dismissed.",
65014
+ "description": "Leaves the editor without saving; the body returns to its read-only render.",
64950
65015
  "key": "CLOSE",
64951
65016
  "name": "Close",
64952
65017
  "synonyms": "dismiss, hide, cancel, close",
@@ -64958,6 +65023,9 @@ function stdRichEditorDocumentOrbital(params = {}) {
64958
65023
  "isInitial": true,
64959
65024
  "name": "idle"
64960
65025
  },
65026
+ {
65027
+ "name": "viewing"
65028
+ },
64961
65029
  {
64962
65030
  "name": "editing"
64963
65031
  }
@@ -64982,7 +65050,107 @@ function stdRichEditorDocumentOrbital(params = {}) {
64982
65050
  ],
64983
65051
  [
64984
65052
  "render-ui",
64985
- "modal",
65053
+ "main",
65054
+ {
65055
+ "children": [
65056
+ {
65057
+ "children": [
65058
+ {
65059
+ "action": "EDIT_BLOCKS",
65060
+ "icon": "edit",
65061
+ "label": "@config.editLabel",
65062
+ "type": "button",
65063
+ "variant": "secondary"
65064
+ }
65065
+ ],
65066
+ "direction": "horizontal",
65067
+ "gap": "sm",
65068
+ "justify": "end",
65069
+ "type": "stack"
65070
+ },
65071
+ {
65072
+ "action": "EDIT_BLOCKS",
65073
+ "children": [
65074
+ {
65075
+ "initialBlocks": "@entity.blocksJson",
65076
+ "readOnly": true,
65077
+ "type": "rich-block-editor"
65078
+ }
65079
+ ],
65080
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
65081
+ "type": "box"
65082
+ }
65083
+ ],
65084
+ "direction": "vertical",
65085
+ "gap": "sm",
65086
+ "type": "stack"
65087
+ }
65088
+ ]
65089
+ ],
65090
+ "event": "OPEN",
65091
+ "from": "idle",
65092
+ "guard": [
65093
+ ">",
65094
+ [
65095
+ "array/len",
65096
+ "@payload.blocksJson"
65097
+ ],
65098
+ 0
65099
+ ],
65100
+ "to": "viewing"
65101
+ },
65102
+ {
65103
+ "effects": [
65104
+ [
65105
+ "set",
65106
+ "@entity.id",
65107
+ "@payload.id"
65108
+ ],
65109
+ [
65110
+ "set",
65111
+ "@entity.blocksJson",
65112
+ "@payload.blocksJson"
65113
+ ],
65114
+ [
65115
+ "render-ui",
65116
+ "main",
65117
+ {
65118
+ "actionEvent": "EDIT_BLOCKS",
65119
+ "actionLabel": "@config.emptyActionLabel",
65120
+ "description": "@config.emptyDescription",
65121
+ "icon": "file-text",
65122
+ "title": "@config.emptyTitle",
65123
+ "type": "empty-state"
65124
+ }
65125
+ ]
65126
+ ],
65127
+ "event": "OPEN",
65128
+ "from": "idle",
65129
+ "guard": [
65130
+ "=",
65131
+ [
65132
+ "array/len",
65133
+ "@payload.blocksJson"
65134
+ ],
65135
+ 0
65136
+ ],
65137
+ "to": "viewing"
65138
+ },
65139
+ {
65140
+ "effects": [
65141
+ [
65142
+ "set",
65143
+ "@entity.id",
65144
+ "@payload.id"
65145
+ ],
65146
+ [
65147
+ "set",
65148
+ "@entity.blocksJson",
65149
+ "@payload.blocksJson"
65150
+ ],
65151
+ [
65152
+ "render-ui",
65153
+ "main",
64986
65154
  {
64987
65155
  "children": [
64988
65156
  {
@@ -64995,16 +65163,13 @@ function stdRichEditorDocumentOrbital(params = {}) {
64995
65163
  {
64996
65164
  "content": "@config.title",
64997
65165
  "type": "typography",
64998
- "variant": "h3"
65166
+ "variant": "h4"
64999
65167
  }
65000
65168
  ],
65001
65169
  "direction": "horizontal",
65002
65170
  "gap": "sm",
65003
65171
  "type": "stack"
65004
65172
  },
65005
- {
65006
- "type": "divider"
65007
- },
65008
65173
  {
65009
65174
  "changeEvent": "BLOCKS_CHANGE",
65010
65175
  "initialBlocks": "@entity.blocksJson",
@@ -65013,10 +65178,9 @@ function stdRichEditorDocumentOrbital(params = {}) {
65013
65178
  "type": "rich-block-editor"
65014
65179
  },
65015
65180
  {
65016
- "align": "center",
65017
65181
  "children": [
65018
65182
  {
65019
- "action": "SAVE",
65183
+ "action": "SAVE_BLOCKS",
65020
65184
  "label": "Save",
65021
65185
  "type": "button",
65022
65186
  "variant": "primary"
@@ -65030,6 +65194,7 @@ function stdRichEditorDocumentOrbital(params = {}) {
65030
65194
  ],
65031
65195
  "direction": "horizontal",
65032
65196
  "gap": "sm",
65197
+ "justify": "end",
65033
65198
  "type": "stack"
65034
65199
  }
65035
65200
  ],
@@ -65039,7 +65204,7 @@ function stdRichEditorDocumentOrbital(params = {}) {
65039
65204
  }
65040
65205
  ]
65041
65206
  ],
65042
- "event": "OPEN",
65207
+ "event": "OPEN_DRAFT",
65043
65208
  "from": "idle",
65044
65209
  "to": "editing"
65045
65210
  },
@@ -65050,23 +65215,252 @@ function stdRichEditorDocumentOrbital(params = {}) {
65050
65215
  },
65051
65216
  {
65052
65217
  "effects": [
65218
+ [
65219
+ "set",
65220
+ "@entity.id",
65221
+ "@payload.id"
65222
+ ],
65053
65223
  [
65054
65224
  "set",
65055
65225
  "@entity.blocksJson",
65056
- "@payload.blocks"
65226
+ "@payload.blocksJson"
65227
+ ],
65228
+ [
65229
+ "render-ui",
65230
+ "main",
65231
+ {
65232
+ "children": [
65233
+ {
65234
+ "align": "center",
65235
+ "children": [
65236
+ {
65237
+ "name": "file-text",
65238
+ "type": "icon"
65239
+ },
65240
+ {
65241
+ "content": "@config.title",
65242
+ "type": "typography",
65243
+ "variant": "h4"
65244
+ }
65245
+ ],
65246
+ "direction": "horizontal",
65247
+ "gap": "sm",
65248
+ "type": "stack"
65249
+ },
65250
+ {
65251
+ "changeEvent": "BLOCKS_CHANGE",
65252
+ "initialBlocks": "@entity.blocksJson",
65253
+ "placeholder": "@config.placeholder",
65254
+ "showToolbar": true,
65255
+ "type": "rich-block-editor"
65256
+ },
65257
+ {
65258
+ "children": [
65259
+ {
65260
+ "action": "SAVE_BLOCKS",
65261
+ "label": "Save",
65262
+ "type": "button",
65263
+ "variant": "primary"
65264
+ },
65265
+ {
65266
+ "action": "CLOSE",
65267
+ "label": "Cancel",
65268
+ "type": "button",
65269
+ "variant": "ghost"
65270
+ }
65271
+ ],
65272
+ "direction": "horizontal",
65273
+ "gap": "sm",
65274
+ "justify": "end",
65275
+ "type": "stack"
65276
+ }
65277
+ ],
65278
+ "direction": "vertical",
65279
+ "gap": "md",
65280
+ "type": "stack"
65281
+ }
65057
65282
  ]
65058
65283
  ],
65059
- "event": "BLOCKS_CHANGE",
65060
- "from": "editing",
65284
+ "event": "OPEN_DRAFT",
65285
+ "from": "viewing",
65061
65286
  "to": "editing"
65062
65287
  },
65063
65288
  {
65064
65289
  "effects": [
65290
+ [
65291
+ "set",
65292
+ "@entity.id",
65293
+ "@payload.id"
65294
+ ],
65295
+ [
65296
+ "set",
65297
+ "@entity.blocksJson",
65298
+ "@payload.blocksJson"
65299
+ ],
65300
+ [
65301
+ "render-ui",
65302
+ "main",
65303
+ {
65304
+ "children": [
65305
+ {
65306
+ "children": [
65307
+ {
65308
+ "action": "EDIT_BLOCKS",
65309
+ "icon": "edit",
65310
+ "label": "@config.editLabel",
65311
+ "type": "button",
65312
+ "variant": "secondary"
65313
+ }
65314
+ ],
65315
+ "direction": "horizontal",
65316
+ "gap": "sm",
65317
+ "justify": "end",
65318
+ "type": "stack"
65319
+ },
65320
+ {
65321
+ "action": "EDIT_BLOCKS",
65322
+ "children": [
65323
+ {
65324
+ "initialBlocks": "@entity.blocksJson",
65325
+ "readOnly": true,
65326
+ "type": "rich-block-editor"
65327
+ }
65328
+ ],
65329
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
65330
+ "type": "box"
65331
+ }
65332
+ ],
65333
+ "direction": "vertical",
65334
+ "gap": "sm",
65335
+ "type": "stack"
65336
+ }
65337
+ ]
65338
+ ],
65339
+ "event": "OPEN",
65340
+ "from": "viewing",
65341
+ "guard": [
65342
+ ">",
65343
+ [
65344
+ "array/len",
65345
+ "@payload.blocksJson"
65346
+ ],
65347
+ 0
65348
+ ],
65349
+ "to": "viewing"
65350
+ },
65351
+ {
65352
+ "effects": [
65353
+ [
65354
+ "set",
65355
+ "@entity.id",
65356
+ "@payload.id"
65357
+ ],
65358
+ [
65359
+ "set",
65360
+ "@entity.blocksJson",
65361
+ "@payload.blocksJson"
65362
+ ],
65065
65363
  [
65066
65364
  "render-ui",
65067
- "modal",
65068
- null
65365
+ "main",
65366
+ {
65367
+ "actionEvent": "EDIT_BLOCKS",
65368
+ "actionLabel": "@config.emptyActionLabel",
65369
+ "description": "@config.emptyDescription",
65370
+ "icon": "file-text",
65371
+ "title": "@config.emptyTitle",
65372
+ "type": "empty-state"
65373
+ }
65374
+ ]
65375
+ ],
65376
+ "event": "OPEN",
65377
+ "from": "viewing",
65378
+ "guard": [
65379
+ "=",
65380
+ [
65381
+ "array/len",
65382
+ "@payload.blocksJson"
65069
65383
  ],
65384
+ 0
65385
+ ],
65386
+ "to": "viewing"
65387
+ },
65388
+ {
65389
+ "effects": [
65390
+ [
65391
+ "render-ui",
65392
+ "main",
65393
+ {
65394
+ "children": [
65395
+ {
65396
+ "align": "center",
65397
+ "children": [
65398
+ {
65399
+ "name": "file-text",
65400
+ "type": "icon"
65401
+ },
65402
+ {
65403
+ "content": "@config.title",
65404
+ "type": "typography",
65405
+ "variant": "h4"
65406
+ }
65407
+ ],
65408
+ "direction": "horizontal",
65409
+ "gap": "sm",
65410
+ "type": "stack"
65411
+ },
65412
+ {
65413
+ "changeEvent": "BLOCKS_CHANGE",
65414
+ "initialBlocks": "@entity.blocksJson",
65415
+ "placeholder": "@config.placeholder",
65416
+ "showToolbar": true,
65417
+ "type": "rich-block-editor"
65418
+ },
65419
+ {
65420
+ "children": [
65421
+ {
65422
+ "action": "SAVE_BLOCKS",
65423
+ "label": "Save",
65424
+ "type": "button",
65425
+ "variant": "primary"
65426
+ },
65427
+ {
65428
+ "action": "CLOSE",
65429
+ "label": "Cancel",
65430
+ "type": "button",
65431
+ "variant": "ghost"
65432
+ }
65433
+ ],
65434
+ "direction": "horizontal",
65435
+ "gap": "sm",
65436
+ "justify": "end",
65437
+ "type": "stack"
65438
+ }
65439
+ ],
65440
+ "direction": "vertical",
65441
+ "gap": "md",
65442
+ "type": "stack"
65443
+ }
65444
+ ]
65445
+ ],
65446
+ "event": "EDIT_BLOCKS",
65447
+ "from": "viewing",
65448
+ "to": "editing"
65449
+ },
65450
+ {
65451
+ "effects": [
65452
+ [
65453
+ "set",
65454
+ "@entity.blocksJson",
65455
+ "@payload.blocks"
65456
+ ]
65457
+ ],
65458
+ "event": "BLOCKS_CHANGE",
65459
+ "from": "editing",
65460
+ "to": "editing"
65461
+ },
65462
+ {
65463
+ "effects": [
65070
65464
  [
65071
65465
  "emit",
65072
65466
  "BLOCKS_SAVED",
@@ -65074,23 +65468,94 @@ function stdRichEditorDocumentOrbital(params = {}) {
65074
65468
  "blocksJson": "@entity.blocksJson",
65075
65469
  "id": "@entity.id"
65076
65470
  }
65471
+ ],
65472
+ [
65473
+ "render-ui",
65474
+ "main",
65475
+ {
65476
+ "children": [
65477
+ {
65478
+ "children": [
65479
+ {
65480
+ "action": "EDIT_BLOCKS",
65481
+ "icon": "edit",
65482
+ "label": "@config.editLabel",
65483
+ "type": "button",
65484
+ "variant": "secondary"
65485
+ }
65486
+ ],
65487
+ "direction": "horizontal",
65488
+ "gap": "sm",
65489
+ "justify": "end",
65490
+ "type": "stack"
65491
+ },
65492
+ {
65493
+ "action": "EDIT_BLOCKS",
65494
+ "children": [
65495
+ {
65496
+ "initialBlocks": "@entity.blocksJson",
65497
+ "readOnly": true,
65498
+ "type": "rich-block-editor"
65499
+ }
65500
+ ],
65501
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
65502
+ "type": "box"
65503
+ }
65504
+ ],
65505
+ "direction": "vertical",
65506
+ "gap": "sm",
65507
+ "type": "stack"
65508
+ }
65077
65509
  ]
65078
65510
  ],
65079
- "event": "SAVE",
65511
+ "event": "SAVE_BLOCKS",
65080
65512
  "from": "editing",
65081
- "to": "idle"
65513
+ "to": "viewing"
65082
65514
  },
65083
65515
  {
65084
65516
  "effects": [
65085
65517
  [
65086
65518
  "render-ui",
65087
- "modal",
65088
- null
65519
+ "main",
65520
+ {
65521
+ "children": [
65522
+ {
65523
+ "children": [
65524
+ {
65525
+ "action": "EDIT_BLOCKS",
65526
+ "icon": "edit",
65527
+ "label": "@config.editLabel",
65528
+ "type": "button",
65529
+ "variant": "secondary"
65530
+ }
65531
+ ],
65532
+ "direction": "horizontal",
65533
+ "gap": "sm",
65534
+ "justify": "end",
65535
+ "type": "stack"
65536
+ },
65537
+ {
65538
+ "action": "EDIT_BLOCKS",
65539
+ "children": [
65540
+ {
65541
+ "initialBlocks": "@entity.blocksJson",
65542
+ "readOnly": true,
65543
+ "type": "rich-block-editor"
65544
+ }
65545
+ ],
65546
+ "className": "cursor-text rounded-md transition-colors hover:bg-muted/40",
65547
+ "type": "box"
65548
+ }
65549
+ ],
65550
+ "direction": "vertical",
65551
+ "gap": "sm",
65552
+ "type": "stack"
65553
+ }
65089
65554
  ]
65090
65555
  ],
65091
65556
  "event": "CLOSE",
65092
65557
  "from": "editing",
65093
- "to": "idle"
65558
+ "to": "viewing"
65094
65559
  }
65095
65560
  ]
65096
65561
  }
@@ -137977,6 +138442,13 @@ function stdUiDetailPanelDetailPanelOrbital(params = {}) {
137977
138442
  "tier": "presentation",
137978
138443
  "type": "string"
137979
138444
  },
138445
+ "onTitleCommit": {
138446
+ "default": "",
138447
+ "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.",
138448
+ "label": "On Title Commit",
138449
+ "tier": "presentation",
138450
+ "type": "string"
138451
+ },
137980
138452
  "pageProp": {
137981
138453
  "description": "Current page number",
137982
138454
  "label": "Page",
@@ -138260,6 +138732,7 @@ function stdUiDetailPanelDetailPanelOrbital(params = {}) {
138260
138732
  "isLoading": "@config.isLoading",
138261
138733
  "maxInlineActions": "@config.maxInlineActions",
138262
138734
  "mode": "@config.mode",
138735
+ "onTitleCommit": "@config.onTitleCommit",
138263
138736
  "page": "@config.pageProp",
138264
138737
  "pageSize": "@config.pageSize",
138265
138738
  "position": "@config.position",
@@ -138305,6 +138778,7 @@ function stdUiDetailPanelDetailPanelOrbital(params = {}) {
138305
138778
  "isLoading": "@config.isLoading",
138306
138779
  "maxInlineActions": "@config.maxInlineActions",
138307
138780
  "mode": "@config.mode",
138781
+ "onTitleCommit": "@config.onTitleCommit",
138308
138782
  "page": "@config.pageProp",
138309
138783
  "pageSize": "@config.pageSize",
138310
138784
  "position": "@config.position",