@proulr/sdui-contract 0.1.20 → 0.1.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proulr/sdui-contract",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -387,6 +387,18 @@ export type SduiScreenChromeMetaWire = {
387
387
  self_managed?: boolean;
388
388
  hub_kind?: 'inbox' | null;
389
389
  wide_layout?: 'chat_master_detail' | 'vibes_rail' | null;
390
+ /**
391
+ * Screen id da listagem que ocupa o painel mestre no wide. Obrigatório quando a
392
+ * rota é a própria tela de detalhe (`/s/chat.thread?conversation_id=…`): sem ele
393
+ * o shell renderizaria o wire do detalhe também na master — thread duplicada.
394
+ */
395
+ wide_master_screen_id?: string;
396
+ /**
397
+ * Destino fixo do botão voltar, ignorando o histórico. Usado quando a tela que
398
+ * antecedeu esta deixou de fazer sentido (ex.: conversa do Randoms que virou DM —
399
+ * voltar cai na lista de mensagens, não na fila).
400
+ */
401
+ back_screen_id?: string;
390
402
  surface?: 'discover' | 'vibes' | null;
391
403
  header_slot?: boolean;
392
404
  pull_refresh?: boolean;
@@ -453,6 +465,10 @@ export type SduiScreenChromeMeta = {
453
465
  selfManaged?: boolean;
454
466
  hubKind?: 'inbox' | null;
455
467
  wideLayout?: 'chat_master_detail' | 'vibes_rail' | null;
468
+ /** Listing screen rendered in the wide master pane when this screen is the detail. */
469
+ wideMasterScreenId?: string;
470
+ /** Screen the back button goes to, bypassing history (the previous screen no longer makes sense). */
471
+ backScreenId?: string;
456
472
  surface?: 'discover' | 'vibes' | null;
457
473
  headerSlot?: boolean;
458
474
  pullRefresh?: boolean;
@@ -73,6 +73,8 @@ describe('decodeSduiScreenWire', () => {
73
73
  surface: 'discover',
74
74
  hub_kind: 'inbox',
75
75
  wide_layout: 'chat_master_detail',
76
+ wide_master_screen_id: 'chat.inbox',
77
+ back_screen_id: 'chat.inbox',
76
78
  owns_header: false,
77
79
  self_managed: false,
78
80
  auto_action_id: 'open_random_thread',
@@ -86,6 +88,8 @@ describe('decodeSduiScreenWire', () => {
86
88
  selfManaged: false,
87
89
  hubKind: 'inbox',
88
90
  wideLayout: 'chat_master_detail',
91
+ wideMasterScreenId: 'chat.inbox',
92
+ backScreenId: 'chat.inbox',
89
93
  surface: 'discover',
90
94
  headerSlot: true,
91
95
  pullRefresh: true,
@@ -76,6 +76,8 @@ function mapChromeMetaWire(
76
76
  selfManaged: wire.self_managed,
77
77
  hubKind: wire.hub_kind,
78
78
  wideLayout: wire.wide_layout,
79
+ wideMasterScreenId: wire.wide_master_screen_id,
80
+ backScreenId: wire.back_screen_id,
79
81
  surface: wire.surface,
80
82
  headerSlot: wire.header_slot,
81
83
  pullRefresh: wire.pull_refresh,