@buffcore/admin-shell 0.8.44 → 0.8.46

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 (151) hide show
  1. package/dist/components/Markdown.d.ts +9 -3
  2. package/dist/components/Markdown.js +84 -34
  3. package/dist/components/Sheet.d.ts +5 -1
  4. package/dist/components/Sheet.js +8 -2
  5. package/dist/components/TextArea.d.ts +3 -1
  6. package/dist/components/TextArea.js +3 -3
  7. package/dist/components/icons.d.ts +1 -0
  8. package/dist/components/icons.js +1 -0
  9. package/dist/prototype/SceneSignal.d.ts +2 -1
  10. package/dist/prototype/SceneSignal.js +12 -1
  11. package/dist/prototype/scene-status.d.ts +1 -2
  12. package/dist/prototype/scene-status.js +1 -2
  13. package/dist/prototype/scene.d.ts +1 -1
  14. package/dist/prototype/scene.js +20 -3
  15. package/dist/workbench/app/ServedPrototype.js +5 -0
  16. package/dist/workbench/app/__snapshots__/places-dom.test.tsx.snap +7 -7
  17. package/dist/workbench/app/actions.d.ts +4 -2
  18. package/dist/workbench/app/actions.js +9 -4
  19. package/dist/workbench/app/brief-short.d.ts +14 -0
  20. package/dist/workbench/app/brief-short.js +103 -0
  21. package/dist/workbench/app/chat-session.d.ts +3 -3
  22. package/dist/workbench/app/chat-session.js +8 -3
  23. package/dist/workbench/app/chat.d.ts +15 -2
  24. package/dist/workbench/app/chat.js +9 -4
  25. package/dist/workbench/app/loop.js +2 -18
  26. package/dist/workbench/app/prototype.js +3 -0
  27. package/dist/workbench/app/test/loop-fixture.d.ts +10 -0
  28. package/dist/workbench/app/useStudio.d.ts +2 -1
  29. package/dist/workbench/studio/frame/AgentPanel.js +24 -1
  30. package/dist/workbench/studio/frame/PanelList.js +1 -1
  31. package/dist/workbench/studio/frame/Segmented.d.ts +3 -1
  32. package/dist/workbench/studio/frame/Segmented.js +4 -3
  33. package/dist/workbench/studio/frame/StudioFrame.js +3 -3
  34. package/dist/workbench/studio/frame/StudioRegions.js +4 -1
  35. package/dist/workbench/studio/frame/TurnControls.d.ts +2 -1
  36. package/dist/workbench/studio/frame/TurnControls.js +4 -1
  37. package/dist/workbench/studio/frame/layout.d.ts +2 -0
  38. package/dist/workbench/studio/frame/layout.js +2 -0
  39. package/dist/workbench/studio/frame/panelControls.d.ts +21 -1
  40. package/dist/workbench/studio/frame/scrollbars.d.ts +1 -1
  41. package/dist/workbench/studio/frame/scrollbars.js +5 -3
  42. package/dist/workbench/studio/frame/useTurnDraft.d.ts +20 -2
  43. package/dist/workbench/studio/frame/useTurnDraft.js +39 -10
  44. package/dist/workbench/studio/i18n/index.js +6 -0
  45. package/dist/workbench/studio/i18n/loop.en.d.ts +11 -38
  46. package/dist/workbench/studio/i18n/loop.en.js +11 -38
  47. package/dist/workbench/studio/i18n/loop.es.json +11 -38
  48. package/dist/workbench/studio/i18n/marks.en.d.ts +41 -0
  49. package/dist/workbench/studio/i18n/marks.en.js +42 -0
  50. package/dist/workbench/studio/i18n/marks.es.json +40 -0
  51. package/dist/workbench/studio/i18n/start.en.d.ts +5 -0
  52. package/dist/workbench/studio/i18n/start.en.js +7 -2
  53. package/dist/workbench/studio/i18n/start.es.json +7 -2
  54. package/dist/workbench/studio/i18n/workspace.en.d.ts +45 -0
  55. package/dist/workbench/studio/i18n/workspace.en.js +46 -0
  56. package/dist/workbench/studio/i18n/workspace.es.json +44 -0
  57. package/dist/workbench/studio/loop/BriefDocument.d.ts +9 -6
  58. package/dist/workbench/studio/loop/BriefDocument.js +48 -76
  59. package/dist/workbench/studio/loop/BriefLists.d.ts +11 -0
  60. package/dist/workbench/studio/loop/BriefLists.js +42 -0
  61. package/dist/workbench/studio/loop/BriefPage.d.ts +6 -2
  62. package/dist/workbench/studio/loop/BriefPage.js +32 -4
  63. package/dist/workbench/studio/loop/BriefReading.d.ts +19 -0
  64. package/dist/workbench/studio/loop/BriefReading.js +22 -0
  65. package/dist/workbench/studio/loop/BriefSection.d.ts +22 -0
  66. package/dist/workbench/studio/loop/BriefSection.js +47 -0
  67. package/dist/workbench/studio/loop/BriefWho.d.ts +6 -0
  68. package/dist/workbench/studio/loop/BriefWho.js +56 -0
  69. package/dist/workbench/studio/loop/CanvasBar.d.ts +0 -1
  70. package/dist/workbench/studio/loop/CanvasBar.js +2 -3
  71. package/dist/workbench/studio/loop/ConsoleFrame.d.ts +13 -0
  72. package/dist/workbench/studio/loop/ConsoleFrame.js +29 -0
  73. package/dist/workbench/studio/loop/NotThisCard.d.ts +6 -1
  74. package/dist/workbench/studio/loop/NotThisCard.js +28 -20
  75. package/dist/workbench/studio/loop/ProtoJourneys.d.ts +1 -8
  76. package/dist/workbench/studio/loop/ProtoJourneys.js +0 -14
  77. package/dist/workbench/studio/loop/PrototypeApp.d.ts +3 -1
  78. package/dist/workbench/studio/loop/PrototypeApp.js +24 -9
  79. package/dist/workbench/studio/loop/PrototypeAttempt.js +55 -14
  80. package/dist/workbench/studio/loop/PrototypePage.d.ts +4 -2
  81. package/dist/workbench/studio/loop/PrototypePage.js +25 -1
  82. package/dist/workbench/studio/loop/PrototypePreview.d.ts +35 -6
  83. package/dist/workbench/studio/loop/PrototypePreview.js +126 -80
  84. package/dist/workbench/studio/loop/PrototypePreviewSlot.d.ts +13 -0
  85. package/dist/workbench/studio/loop/PrototypePreviewSlot.js +23 -0
  86. package/dist/workbench/studio/loop/PrototypeScenes.d.ts +1 -1
  87. package/dist/workbench/studio/loop/ServedPlanning.js +1 -1
  88. package/dist/workbench/studio/loop/StudioLoop.d.ts +7 -2
  89. package/dist/workbench/studio/loop/StudioLoop.js +4 -10
  90. package/dist/workbench/studio/loop/WorkspaceBar.d.ts +15 -0
  91. package/dist/workbench/studio/loop/WorkspaceBar.js +52 -0
  92. package/dist/workbench/studio/loop/WorkspaceJourneys.d.ts +17 -0
  93. package/dist/workbench/studio/loop/WorkspaceJourneys.js +99 -0
  94. package/dist/workbench/studio/loop/WorkspaceLeft.d.ts +14 -0
  95. package/dist/workbench/studio/loop/WorkspaceLeft.js +42 -0
  96. package/dist/workbench/studio/loop/WorkspaceStage.d.ts +24 -0
  97. package/dist/workbench/studio/loop/WorkspaceStage.js +142 -0
  98. package/dist/workbench/studio/loop/WorkspaceSteps.d.ts +20 -0
  99. package/dist/workbench/studio/loop/WorkspaceSteps.js +96 -0
  100. package/dist/workbench/studio/loop/moments.js +0 -3
  101. package/dist/workbench/studio/loop/prototype-document.d.ts +2 -0
  102. package/dist/workbench/studio/loop/prototype-document.js +12 -0
  103. package/dist/workbench/studio/loop/prototype-part.d.ts +43 -0
  104. package/dist/workbench/studio/loop/prototype-part.js +104 -0
  105. package/dist/workbench/studio/loop/types.d.ts +26 -26
  106. package/dist/workbench/studio/loop/types.js +0 -3
  107. package/dist/workbench/studio/loop/usePrototypeFrame.d.ts +3 -0
  108. package/dist/workbench/studio/loop/usePrototypeFrame.js +2 -0
  109. package/dist/workbench/studio/loop/workspace-journeys.d.ts +22 -0
  110. package/dist/workbench/studio/loop/workspace-journeys.js +63 -0
  111. package/dist/workbench/studio/loop/workspace-state.d.ts +94 -0
  112. package/dist/workbench/studio/loop/workspace-state.js +50 -0
  113. package/dist/workbench/studio/marks/ChangeList.d.ts +7 -0
  114. package/dist/workbench/studio/marks/ChangeList.js +70 -0
  115. package/dist/workbench/studio/marks/MarkHint.d.ts +18 -0
  116. package/dist/workbench/studio/marks/MarkHint.js +58 -0
  117. package/dist/workbench/studio/marks/MarkNumber.d.ts +6 -0
  118. package/dist/workbench/studio/marks/MarkNumber.js +24 -0
  119. package/dist/workbench/studio/marks/MarksLayer.d.ts +15 -0
  120. package/dist/workbench/studio/marks/MarksLayer.js +144 -0
  121. package/dist/workbench/studio/marks/PinNote.d.ts +13 -0
  122. package/dist/workbench/studio/marks/PinNote.js +49 -0
  123. package/dist/workbench/studio/marks/QueuedChanges.d.ts +6 -0
  124. package/dist/workbench/studio/marks/QueuedChanges.js +51 -0
  125. package/dist/workbench/studio/marks/WorkspaceMarks.d.ts +15 -0
  126. package/dist/workbench/studio/marks/WorkspaceMarks.js +67 -0
  127. package/dist/workbench/studio/marks/marks-message.d.ts +13 -0
  128. package/dist/workbench/studio/marks/marks-message.js +93 -0
  129. package/dist/workbench/studio/marks/marks.d.ts +105 -0
  130. package/dist/workbench/studio/marks/marks.js +133 -0
  131. package/dist/workbench/studio/marks/useMarking.d.ts +36 -0
  132. package/dist/workbench/studio/marks/useMarking.js +111 -0
  133. package/dist/workbench/studio/marks/useSendMarks.d.ts +18 -0
  134. package/dist/workbench/studio/marks/useSendMarks.js +80 -0
  135. package/dist/workbench/studio/work/StudioLater.js +0 -1
  136. package/dist/workbench/studio/work/work-test-data.d.ts +5 -0
  137. package/package.json +6 -6
  138. package/dist/workbench/studio/loop/FsPlan.d.ts +0 -7
  139. package/dist/workbench/studio/loop/FsPlan.js +0 -64
  140. package/dist/workbench/studio/loop/FsStage.d.ts +0 -6
  141. package/dist/workbench/studio/loop/FsStage.js +0 -74
  142. package/dist/workbench/studio/loop/FsToolbar.d.ts +0 -6
  143. package/dist/workbench/studio/loop/FsToolbar.js +0 -61
  144. package/dist/workbench/studio/loop/FullScreen.d.ts +0 -5
  145. package/dist/workbench/studio/loop/FullScreen.js +0 -89
  146. package/dist/workbench/studio/loop/PrototypePreviewMenus.d.ts +0 -18
  147. package/dist/workbench/studio/loop/PrototypePreviewMenus.js +0 -75
  148. package/dist/workbench/studio/loop/PrototypePreviewToolbar.d.ts +0 -27
  149. package/dist/workbench/studio/loop/PrototypePreviewToolbar.js +0 -52
  150. package/dist/workbench/studio/loop/fsViews.d.ts +0 -12
  151. package/dist/workbench/studio/loop/fsViews.js +0 -6
@@ -0,0 +1,46 @@
1
+ // The prototype workspace's words (0.8.45): the bar along the top, the journeys and screens on the
2
+ // left, the device with its line and step bar, and the foot bar on a phone-wide studio.
3
+ export default {
4
+ 'studio.workspace.where': 'What you are looking at',
5
+ 'studio.workspace.app': 'Customer app',
6
+ 'studio.workspace.console': 'Console',
7
+ 'studio.workspace.device': 'Device',
8
+ 'studio.workspace.device.mobile': 'Mobile',
9
+ 'studio.workspace.device.tablet': 'Tablet',
10
+ 'studio.workspace.device.desktop': 'Desktop',
11
+ 'studio.workspace.rotate': 'Turn the tablet',
12
+ 'studio.workspace.tools': 'Tools',
13
+ 'studio.workspace.tool.select': 'Select: use the app (V)',
14
+ 'studio.workspace.tool.comment': 'Comment: pin a note on a part (C)',
15
+ 'studio.workspace.tool.draw': 'Draw: mark it freehand (P)',
16
+ 'studio.workspace.tool.area': 'Area: drag a box round it (R)',
17
+ 'studio.workspace.hint.select': 'Using the app',
18
+ 'studio.workspace.hint.comment': 'Click a part to pin a comment',
19
+ 'studio.workspace.hint.tap': 'Tap a part to pin a comment',
20
+ 'studio.workspace.hint.draw': 'Draw on the screen',
21
+ 'studio.workspace.hint.area': 'Drag to mark an area',
22
+ 'studio.workspace.hint.console': 'Marks go on the customer app: the console is not pictured yet',
23
+ 'studio.workspace.screen': '{app} · {screen} · {device}',
24
+ 'studio.workspace.stepOf': '{journey} · Step {n} of {total}',
25
+ 'studio.workspace.stepName': 'Step {n}',
26
+ 'studio.workspace.play': 'Play the steps',
27
+ 'studio.workspace.pause': 'Pause',
28
+ 'studio.workspace.left': 'Journeys and screens',
29
+ 'studio.workspace.journeys': 'Journeys',
30
+ 'studio.workspace.screens': 'Screens',
31
+ 'studio.workspace.group': '{role} · {app}',
32
+ 'studio.workspace.other': 'Other journeys · {app}',
33
+ 'studio.workspace.steps': 'Steps of {journey}',
34
+ 'studio.workspace.stepGo': 'Step {n}: {name}',
35
+ 'studio.workspace.none': 'No journeys yet. The plan’s journeys show here.',
36
+ 'studio.workspace.notPlayable': 'The running app does not play this journey yet.',
37
+ 'studio.workspace.byHand': 'Follow these steps in the console.',
38
+ 'studio.workspace.screens.none': 'No screens listed yet.',
39
+ 'studio.workspace.screens.open': '{screen} (opens in a new tab)',
40
+ 'studio.workspace.data': 'Sample data',
41
+ 'studio.workspace.changes': 'Changes',
42
+ 'studio.workspace.changes.count': 'Changes: {count, plural, one {# mark} other {# marks}}',
43
+ 'studio.workspace.console.stopped': 'The console is not running. Start it on the Dev server page.',
44
+ 'studio.workspace.console.blocked': 'The console cannot be shown here.',
45
+ 'studio.workspace.console.frame': 'The console, as the team will see it',
46
+ };
@@ -0,0 +1,44 @@
1
+ {
2
+ "studio.workspace.where": "Qué estás viendo",
3
+ "studio.workspace.app": "App de clientes",
4
+ "studio.workspace.console": "Consola",
5
+ "studio.workspace.device": "Dispositivo",
6
+ "studio.workspace.device.mobile": "Móvil",
7
+ "studio.workspace.device.tablet": "Tableta",
8
+ "studio.workspace.device.desktop": "Escritorio",
9
+ "studio.workspace.rotate": "Girar la tableta",
10
+ "studio.workspace.tools": "Herramientas",
11
+ "studio.workspace.tool.select": "Seleccionar: usar la app (V)",
12
+ "studio.workspace.tool.comment": "Comentar: fijar una nota en una parte (C)",
13
+ "studio.workspace.tool.draw": "Dibujar: marcar a mano alzada (P)",
14
+ "studio.workspace.tool.area": "Área: arrastrar un recuadro alrededor (R)",
15
+ "studio.workspace.hint.select": "Usando la app",
16
+ "studio.workspace.hint.comment": "Haz clic en una parte para fijar un comentario",
17
+ "studio.workspace.hint.tap": "Toca una parte para fijar un comentario",
18
+ "studio.workspace.hint.draw": "Dibuja sobre la pantalla",
19
+ "studio.workspace.hint.area": "Arrastra para marcar un área",
20
+ "studio.workspace.hint.console": "Las marcas van en la app del cliente: la consola aún no se captura",
21
+ "studio.workspace.screen": "{app} · {screen} · {device}",
22
+ "studio.workspace.stepOf": "{journey} · Paso {n} de {total}",
23
+ "studio.workspace.stepName": "Paso {n}",
24
+ "studio.workspace.play": "Reproducir los pasos",
25
+ "studio.workspace.pause": "Pausar",
26
+ "studio.workspace.left": "Recorridos y pantallas",
27
+ "studio.workspace.journeys": "Recorridos",
28
+ "studio.workspace.screens": "Pantallas",
29
+ "studio.workspace.group": "{role} · {app}",
30
+ "studio.workspace.other": "Otros recorridos · {app}",
31
+ "studio.workspace.steps": "Pasos de {journey}",
32
+ "studio.workspace.stepGo": "Paso {n}: {name}",
33
+ "studio.workspace.none": "Aún no hay recorridos. Los del plan aparecen aquí.",
34
+ "studio.workspace.notPlayable": "La app en marcha aún no reproduce este recorrido.",
35
+ "studio.workspace.byHand": "Sigue estos pasos en la consola.",
36
+ "studio.workspace.screens.none": "Aún no hay pantallas.",
37
+ "studio.workspace.screens.open": "{screen} (se abre en otra pestaña)",
38
+ "studio.workspace.data": "Datos de ejemplo",
39
+ "studio.workspace.changes": "Cambios",
40
+ "studio.workspace.changes.count": "Cambios: {count, plural, one {# marca} other {# marcas}}",
41
+ "studio.workspace.console.stopped": "La consola no está en marcha. Iníciala en la página Servidor de desarrollo.",
42
+ "studio.workspace.console.blocked": "La consola no se puede mostrar aquí.",
43
+ "studio.workspace.console.frame": "La consola, como la verá el equipo"
44
+ }
@@ -1,8 +1,11 @@
1
+ import type { BriefRead } from './BriefReading.tsx';
2
+ import { type NotThisCardProps } from './NotThisCard.tsx';
1
3
  import type { BriefDoc } from './types.ts';
2
- /**
3
- * The brief, short first: what it is, who uses it, the kind and the first must-have, then each
4
- * section folded under its heading with a one-line preview. The product's words stay as written.
5
- */
6
- export declare function BriefDocument({ brief }: {
4
+ export declare function BriefDocument({ brief, title, onRead, notThis, }: {
7
5
  brief: BriefDoc;
8
- }): import("react").JSX.Element;
6
+ /** The whole brief's title in the reading sheet. */
7
+ title: string;
8
+ onRead?: (read: BriefRead) => void;
9
+ /** "Not this project"; unset draws none. */
10
+ notThis?: Omit<NotThisCardProps, 'first'>;
11
+ }): import("react").JSX.Element | null;
@@ -1,86 +1,58 @@
1
- import { createElement as _createElement } from "react";
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // The brief, short first: What it is, Who uses it, Kind, How it earns, Must have and Not now, each
3
+ // a sentence or a few items with Read more; the rest of the brief one Read the whole brief away.
4
+ // A section the brief does not have is left out, never a placeholder.
3
5
  import { useLocale, useT } from '@buffcore/i18n/react';
4
- import { useState } from 'react';
5
6
  import { Button } from '../../../components/Button.js';
6
7
  import { Chip } from '../../../components/Chip.js';
7
- import { Icon } from '../../../components/Icon.js';
8
- import { KV } from '../../../components/KV.js';
9
8
  import { Panel } from '../../../components/Panel.js';
10
- import { bodyText, captionText } from '../../../components/styles.js';
9
+ import { captionText } from '../../../components/styles.js';
10
+ import { BriefLists } from './BriefLists.js';
11
+ import { BriefSection, briefMuted, briefText, hairline } from './BriefSection.js';
12
+ import { BriefWho } from './BriefWho.js';
13
+ import { NotThisCard } from './NotThisCard.js';
11
14
  import { Seal } from './parts.js';
12
- const h = {
13
- margin: 0,
14
- fontSize: 'var(--font-size-body)',
15
- fontWeight: 'var(--weight-heading)',
16
- color: 'var(--text-strong)',
17
- display: 'flex',
18
- alignItems: 'center',
19
- gap: 'var(--space-2)',
20
- };
21
- const list = {
22
- margin: 0,
23
- padding: 0,
24
- listStyle: 'none',
25
- display: 'grid',
26
- gap: 'var(--space-2)',
27
- };
28
- /**
29
- * The brief, short first: what it is, who uses it, the kind and the first must-have, then each
30
- * section folded under its heading with a one-line preview. The product's words stay as written.
31
- */
32
- export function BriefDocument({ brief }) {
33
- const [all, setAll] = useState(false);
34
- return (_jsxs(_Fragment, { children: [_jsx(Summary, { brief: brief, all: all, onAll: () => setAll((open) => !open) }), _jsx(Panel, { children: _jsx(Sections, { brief: brief, all: all }) })] }));
35
- }
36
- /** What it is, who uses it, the kind and the first must-have; the whole brief a click away. */
37
- function Summary({ brief, all, onAll }) {
15
+ /** The rest of the brief: the sections the page does not show, named, and the button to read all. */
16
+ function WholeBrief({ brief, onRead }) {
38
17
  const t = useT();
39
18
  const { locale } = useLocale();
40
- const who = new Intl.ListFormat(locale, { type: 'conjunction' }).format(brief.who.map((w) => w.role));
41
- const [first, ...rest] = brief.must ?? [];
42
- return (_jsxs(Panel, { children: [_jsxs("section", { style: { display: 'grid', gap: 'var(--space-2)' }, children: [_jsx("h2", { style: h, children: t('studio.loop.brief.what') }), _jsx("p", { style: { ...bodyText, margin: 0 }, children: brief.what })] }), _jsx(KV, { cols: 1, items: [
43
- [t('studio.loop.brief.who'), who],
44
- [
45
- t('studio.loop.brief.kind'),
46
- brief.kind ? (_jsx(Chip, { size: "sm", children: brief.kind }, "kind")) : (''),
47
- ],
48
- [
49
- t('studio.loop.brief.must'),
50
- first ? t('studio.loop.brief.firstMust', { first, count: rest.length }) : '',
51
- ],
52
- ] }), _jsx("div", { children: _jsx(Button, { size: "sm", variant: "ghost", "aria-expanded": all, onClick: onAll, children: t(all ? 'studio.loop.brief.foldAll' : 'studio.loop.brief.readAll') }) })] }));
53
- }
54
- /** One section of the brief, folded: its heading and a line of what it says. */
55
- function Fold({ title, preview, open, children, }) {
56
- return (_jsxs("details", { open: open, children: [_jsxs("summary", { style: {
57
- display: 'flex',
58
- alignItems: 'center',
59
- gap: 'var(--space-3)',
60
- minBlockSize: 'var(--control-sm)',
61
- cursor: 'pointer',
62
- }, children: [_jsx("h2", { style: { ...h, flexShrink: 0 }, children: title }), _jsx("span", { style: {
63
- ...captionText,
64
- flex: 1,
65
- minWidth: 0,
66
- overflow: 'hidden',
67
- textOverflow: 'ellipsis',
68
- whiteSpace: 'nowrap',
69
- fontWeight: 'var(--weight-regular)',
70
- }, children: preview }), _jsx(Icon, { name: "chevron-down", size: "var(--icon-sm)" })] }), _jsx("div", { style: { display: 'grid', gap: 'var(--space-2)', paddingBlock: 'var(--space-2)' }, children: children })] }));
19
+ const shown = new Set(Object.values(brief.read ?? {}).map((part) => part.heading));
20
+ const others = (brief.whole ?? []).filter((part) => !shown.has(part.heading));
21
+ return (_jsxs("section", { style: {
22
+ display: 'flex',
23
+ flexWrap: 'wrap',
24
+ alignItems: 'center',
25
+ gap: 'var(--space-3)',
26
+ paddingBlock: 'var(--space-5)',
27
+ borderBlockStart: hairline,
28
+ }, children: [others.length > 0 && (_jsx("span", { style: { ...captionText, flex: '1 1 16rem', minWidth: 0 }, children: t('studio.loop.brief.alsoIn', {
29
+ sections: new Intl.ListFormat(locale, { type: 'conjunction' }).format(others.map((part) => part.heading)),
30
+ }) })), _jsx(Button, { variant: "secondary", icon: "book-open", onClick: onRead, children: t('studio.loop.brief.readAll') })] }));
71
31
  }
72
- function Sections({ brief, all }) {
32
+ export function BriefDocument({ brief, title, onRead, notThis, }) {
73
33
  const t = useT();
74
- const kind = brief.kind ? t(`studio.loop.brief.kind.${brief.kind}`) : '';
75
- // Each key carries `all`: the button opens or folds every section at once; each still opens alone.
76
- const fold = { open: all };
77
- return (_jsxs(_Fragment, { children: [_createElement(Fold, { ...fold, key: `who:${all}`, title: t('studio.loop.brief.who'), preview: brief.who.map((w) => w.role).join(' · ') },
78
- _jsx(KV, { cols: 1, items: brief.who.map((w) => [
79
- w.role,
80
- `${w.where ? `${t(`studio.loop.where.${w.where}`)}. ` : ''}${w.note ?? ''}`,
81
- ]) })), _createElement(Fold, { ...fold, key: `kind:${all}`, title: _jsxs(_Fragment, { children: [t('studio.loop.brief.kind'), " ", brief.kind && _jsx(Chip, { size: "sm", children: brief.kind })] }), preview: kind },
82
- _jsx("p", { style: { ...bodyText, margin: 0, color: 'var(--text-muted)' }, children: kind })), _createElement(Fold, { ...fold, key: `earns:${all}`, title: _jsxs(_Fragment, { children: [t('studio.loop.brief.earns'), " ", _jsx(Seal, { children: t('studio.loop.money') })] }), preview: brief.earns ?? '' },
83
- _jsx("p", { style: { ...bodyText, margin: 0 }, children: brief.earns })), _createElement(Fold, { ...fold, key: `must:${all}`, title: t('studio.loop.brief.must'), preview: brief.must?.join(' · ') ?? '' },
84
- _jsx("ul", { style: list, children: brief.must?.map((m) => (_jsxs("li", { style: { ...bodyText, display: 'flex', gap: 'var(--space-2)' }, children: [_jsx(Icon, { name: "check", size: "var(--icon-md)" }), m] }, m))) })), _createElement(Fold, { ...fold, key: `later:${all}`, title: t('studio.loop.brief.later'), preview: brief.later?.join(' · ') ?? '' },
85
- _jsx("ul", { style: list, children: brief.later?.map((m) => (_jsx("li", { style: { ...bodyText, color: 'var(--text-muted)' }, children: m }, m))) }))] }));
34
+ const kindLine = brief.kindLine ?? (brief.kind ? t(`studio.loop.brief.kind.${brief.kind}`) : undefined);
35
+ const has = {
36
+ what: Boolean(brief.what),
37
+ who: brief.who.length > 0,
38
+ kind: Boolean(brief.kind || kindLine),
39
+ earns: Boolean(brief.earns),
40
+ must: Boolean(brief.must?.length),
41
+ later: Boolean(brief.later?.length),
42
+ };
43
+ const first = ['what', 'who', 'kind', 'earns'].find((key) => has[key]);
44
+ const listsFirst = !first && (has.must || has.later);
45
+ const whole = Boolean(onRead && brief.whole?.length);
46
+ const open = (key, name) => {
47
+ const part = brief.read?.[key];
48
+ return onRead && part ? () => onRead({ title: name, part }) : undefined;
49
+ };
50
+ const section = (key, name) => ({
51
+ first: first === key,
52
+ title: name,
53
+ onMore: open(key, name),
54
+ });
55
+ if (!first && !listsFirst && !whole && !notThis)
56
+ return null;
57
+ return (_jsx(Panel, { children: _jsxs("div", { style: { display: 'grid', minWidth: 0 }, children: [has.what && (_jsx(BriefSection, { ...section('what', t('studio.loop.brief.what')), children: _jsx("p", { style: briefText, children: brief.what }) })), has.who && (_jsx(BriefSection, { ...section('who', t('studio.loop.brief.who')), children: _jsx(BriefWho, { who: brief.who }) })), has.kind && (_jsx(BriefSection, { ...section('kind', t('studio.loop.brief.kind')), badge: brief.kind && _jsx(Chip, { size: "sm", children: brief.kind }), children: kindLine && _jsx("p", { style: briefMuted, children: kindLine }) })), has.earns && (_jsx(BriefSection, { ...section('earns', t('studio.loop.brief.earns')), badge: _jsx(Seal, { children: t('studio.loop.money') }), children: _jsx("p", { style: briefText, children: brief.earns }) })), _jsx(BriefLists, { brief: brief, first: listsFirst, onRead: onRead && ((key, name) => open(key, name)?.()) }), whole && onRead && (_jsx(WholeBrief, { brief: brief, onRead: () => onRead({ title, whole: true }) })), notThis && _jsx(NotThisCard, { ...notThis, first: !first && !listsFirst && !whole })] }) }));
86
58
  }
@@ -0,0 +1,11 @@
1
+ import type { BriefDoc, BriefShort } from './types.ts';
2
+ /** How many of each list the page shows before "N more". */
3
+ export declare const SHOWN: {
4
+ readonly must: 4;
5
+ readonly later: 3;
6
+ };
7
+ export declare function BriefLists({ brief, first, onRead, }: {
8
+ brief: BriefDoc;
9
+ first?: boolean;
10
+ onRead?: (key: BriefShort, title: string) => void;
11
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Must have and Not now, side by side: the first few of each, then how many more the brief holds
3
+ // and the button that opens the section whole. A list the brief does not have is left out.
4
+ import { useT } from '@buffcore/i18n/react';
5
+ import { Icon } from '../../../components/Icon.js';
6
+ import { briefHeading, briefMuted, briefText, hairline, plainList, RestLine, } from './BriefSection.js';
7
+ /** How many of each list the page shows before "N more". */
8
+ export const SHOWN = { must: 4, later: 3 };
9
+ function Column({ title, items, total, mark, muted, onRead, }) {
10
+ const t = useT();
11
+ const shown = items.slice(0, SHOWN[muted ? 'later' : 'must']);
12
+ const rest = total - shown.length;
13
+ return (_jsxs("div", { style: { display: 'grid', gap: 'var(--space-3)', alignContent: 'start', minWidth: 0 }, children: [_jsx("h2", { style: briefHeading, children: title }), _jsx("ul", { style: plainList, children: shown.map((item, i) => (_jsxs("li", { style: { ...(muted ? briefMuted : briefText), display: 'flex', gap: 'var(--space-2)' }, children: [mark, _jsx("span", { style: { minWidth: 0 }, children: item })] }, i))) }), _jsx(RestLine, { rest: rest > 0 ? t('studio.loop.brief.more', { count: rest }) : undefined, action: rest > 0 && !muted
14
+ ? t('studio.loop.brief.readAllOf', { count: total })
15
+ : t('studio.loop.brief.readMore'), label: t('studio.loop.brief.readMoreAbout', { section: title }), onClick: onRead })] }));
16
+ }
17
+ export function BriefLists({ brief, first, onRead, }) {
18
+ const t = useT();
19
+ const must = brief.must ?? [];
20
+ const later = brief.later ?? [];
21
+ if (!must.length && !later.length)
22
+ return null;
23
+ const opener = (key, title) => onRead && brief.read?.[key] ? () => onRead(key, title) : undefined;
24
+ return (_jsxs("section", { style: {
25
+ display: 'grid',
26
+ gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 16rem), 1fr))',
27
+ gap: 'var(--space-5)',
28
+ paddingBlock: 'var(--space-5)',
29
+ ...(first ? { paddingBlockStart: 0 } : { borderBlockStart: hairline }),
30
+ }, children: [must.length > 0 && (_jsx(Column, { title: t('studio.loop.brief.must'), items: must, total: Math.max(brief.mustCount ?? 0, must.length), mark: _jsx("span", { style: {
31
+ color: 'var(--success-ink)',
32
+ display: 'flex',
33
+ paddingBlockStart: 'var(--space-1)',
34
+ }, children: _jsx(Icon, { name: "check", size: "var(--icon-sm)" }) }), onRead: opener('must', t('studio.loop.brief.must')) })), later.length > 0 && (_jsx(Column, { title: t('studio.loop.brief.later'), items: later, total: Math.max(brief.laterCount ?? 0, later.length), mark: _jsx("span", { "aria-hidden": true, style: {
35
+ flexShrink: 0,
36
+ inlineSize: 'var(--space-2)',
37
+ blockSize: 'var(--border-width-hairline)',
38
+ marginBlockStart: 'calc(var(--line-height-body) / 2)',
39
+ marginInline: 'var(--space-1)',
40
+ background: 'var(--text-subtle)',
41
+ } }), muted: true, onRead: opener('later', t('studio.loop.brief.later')) }))] }));
42
+ }
@@ -1,7 +1,7 @@
1
1
  import type { Level } from '../types.ts';
2
2
  import type { QuestionControls } from './QuestionReply.tsx';
3
3
  import { type StepDraft } from './SaveStep.tsx';
4
- import type { BriefDoc, LoopSample } from './types.ts';
4
+ import type { BriefDoc, BriefShort, LoopSample } from './types.ts';
5
5
  export interface BriefSample {
6
6
  product: {
7
7
  name: string;
@@ -27,6 +27,10 @@ interface BriefPageProps {
27
27
  notThis?: readonly string[];
28
28
  notThisTyping?: string;
29
29
  onAddNot?: (line: string) => void;
30
+ /** Asks the agent to change a line of plan/not-this.md. */
31
+ onEditNot?: (line: string, to: string) => void;
32
+ /** A section open to read at the start (a scene or a test). */
33
+ reading?: BriefShort | 'whole';
30
34
  }
31
- export declare function BriefPage({ sample, level, saved, onNext, onAction, onAnswer, questionControls, draft, notThis, notThisTyping, onAddNot, }: BriefPageProps): import("react").JSX.Element;
35
+ export declare function BriefPage({ sample, level, saved, onNext, onAction, onAnswer, questionControls, draft, notThis, notThisTyping, onAddNot, onEditNot, reading, }: BriefPageProps): import("react").JSX.Element;
32
36
  export {};
@@ -1,18 +1,46 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useT } from '@buffcore/i18n/react';
3
+ import { useState } from 'react';
3
4
  import { Badge } from '../../../components/Badge.js';
4
5
  import { Page } from '../../../components/Page.js';
5
6
  import { Place } from '../frame/Place.js';
6
7
  import { BriefDocument } from './BriefDocument.js';
7
8
  import { BriefSide } from './BriefQuestions.js';
8
- import { NotThisCard } from './NotThisCard.js';
9
- import { Path, TwoColumns } from './parts.js';
9
+ import { BriefReading } from './BriefReading.js';
10
+ import { Path } from './parts.js';
10
11
  import { ReasonButton } from './ReasonButton.js';
11
12
  import { nextReason, StepNotes } from './SaveStep.js';
12
- export function BriefPage({ sample, level, saved = true, onNext, onAction, onAnswer, questionControls, draft, notThis, notThisTyping, onAddNot, }) {
13
+ /** What a section is called on the page, for its reading sheet's title. */
14
+ const NAMES = {
15
+ what: 'studio.loop.brief.what',
16
+ who: 'studio.loop.brief.who',
17
+ kind: 'studio.loop.brief.kind',
18
+ earns: 'studio.loop.brief.earns',
19
+ must: 'studio.loop.brief.must',
20
+ later: 'studio.loop.brief.later',
21
+ };
22
+ export function BriefPage({ sample, level, saved = true, onNext, onAction, onAnswer, questionControls, draft, notThis, notThisTyping, onAddNot, onEditNot, reading, }) {
13
23
  const t = useT();
14
24
  const label = t('studio.loop.brief.next');
15
25
  const { brief } = sample;
16
26
  const agent = sample.product.agent.name;
17
- return (_jsxs(Page, { crumbs: [t('studio.frame.rail.step', { n: 1 }), t('studio.frame.page.brief')], title: t('studio.loop.brief.title', { name: sample.product.name }), sub: saved ? t('studio.loop.brief.lead', { agent }) : undefined, actions: _jsxs(_Fragment, { children: [_jsx(Path, { children: "plan/brief.md" }), saved && !draft?.save && (_jsx(Badge, { tone: "success", icon: "check", children: t('studio.loop.brief.saved') })), _jsx(ReasonButton, { size: "sm", why: nextReason(draft, t), disabled: !onNext, onClick: () => onNext?.(label), children: label })] }), children: [_jsx(Place, { id: "tabs:brief" }), draft && _jsx(StepNotes, { draft: draft, agent: agent }), _jsx(TwoColumns, { main: _jsx(BriefDocument, { brief: brief }), side: _jsxs(_Fragment, { children: [_jsx(BriefSide, { sample: sample, level: level, onAction: onAction, onAnswer: onAnswer, questionControls: questionControls }), notThis && _jsx(NotThisCard, { lines: notThis, typing: notThisTyping, onAdd: onAddNot }), _jsx(Place, { id: "side:brief" })] }) })] }));
27
+ const title = t('studio.loop.brief.title', { name: sample.product.name });
28
+ const [read, setRead] = useState(() => {
29
+ if (reading === 'whole')
30
+ return { title, whole: true };
31
+ const part = reading && brief.read?.[reading];
32
+ return reading && part ? { title: t(NAMES[reading]), part } : undefined;
33
+ });
34
+ return (_jsxs(Page, { crumbs: [t('studio.frame.rail.step', { n: 1 }), t('studio.frame.page.brief')], title: title, sub: saved ? t('studio.loop.brief.lead', { agent }) : undefined, actions: _jsxs(_Fragment, { children: [_jsx(Path, { children: "plan/brief.md" }), saved && !draft?.save && (_jsx(Badge, { tone: "success", icon: "check", children: t('studio.loop.brief.saved') })), _jsx(ReasonButton, { size: "sm", why: nextReason(draft, t), disabled: !onNext, onClick: () => onNext?.(label), children: label })] }), children: [_jsx(Place, { id: "tabs:brief" }), draft && _jsx(StepNotes, { draft: draft, agent: agent }), _jsxs("div", { style: {
35
+ display: 'flex',
36
+ flexWrap: 'wrap',
37
+ gap: 'var(--space-4)',
38
+ alignItems: 'flex-start',
39
+ }, children: [_jsx("div", { style: { flex: '3 1 34rem', minWidth: 0, display: 'grid', gap: 'var(--space-4)' }, children: _jsx(BriefDocument, { brief: brief, title: title, onRead: setRead, notThis: notThis && {
40
+ lines: notThis,
41
+ name: sample.product.name,
42
+ typing: notThisTyping,
43
+ onAdd: onAddNot,
44
+ onEdit: onEditNot,
45
+ } }) }), _jsxs("div", { style: { flex: '1 1 20rem', minWidth: 0, display: 'grid', gap: 'var(--space-4)' }, children: [_jsx(BriefSide, { sample: sample, level: level, onAction: onAction, onAnswer: onAnswer, questionControls: questionControls }), _jsx(Place, { id: "side:brief" })] })] }), read && (_jsx(BriefReading, { read: read, parts: brief.whole ?? [], onAsk: onAnswer, onClose: () => setRead(undefined) }))] }));
18
46
  }
@@ -0,0 +1,19 @@
1
+ import type { BriefPart } from './types.ts';
2
+ /** What the sheet shows: a section by the name the page gives it, or every section in order. */
3
+ export type BriefRead = {
4
+ title: string;
5
+ part: BriefPart;
6
+ } | {
7
+ title: string;
8
+ whole: true;
9
+ };
10
+ /** The whole brief as one text: each section under its own heading. */
11
+ export declare const wholeText: (parts: readonly BriefPart[]) => string;
12
+ export declare function BriefReading({ read, parts, onAsk, onClose, }: {
13
+ read: BriefRead;
14
+ /** Every section, for the whole brief. */
15
+ parts: readonly BriefPart[];
16
+ /** Puts the cursor in the chat about this section; none, no button. */
17
+ onAsk?: (about: string) => void;
18
+ onClose: () => void;
19
+ }): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // The reading sheet: one section of the brief, or the whole brief, set for reading (headings, real
3
+ // lists, about 68 characters a line). The product's own Markdown as text: nothing in it can run.
4
+ import { useT } from '@buffcore/i18n/react';
5
+ import { Button } from '../../../components/Button.js';
6
+ import { Markdown } from '../../../components/Markdown.js';
7
+ import { Sheet } from '../../../components/Sheet.js';
8
+ import { monoText } from '../../../components/styles.js';
9
+ /** The whole brief as one text: each section under its own heading. */
10
+ export const wholeText = (parts) => parts.map((part) => `## ${part.heading}\n\n${part.text}`).join('\n\n');
11
+ export function BriefReading({ read, parts, onAsk, onClose, }) {
12
+ const t = useT();
13
+ const section = 'part' in read ? read.part : undefined;
14
+ return (_jsx(Sheet, { title: read.title, size: "read", onClose: onClose, sub: _jsx("span", { translate: "no", style: { ...monoText, color: 'var(--text-muted)' }, children: section
15
+ ? t('studio.loop.brief.read.where', { section: section.heading })
16
+ : 'plan/brief.md' }), footer: _jsxs(_Fragment, { children: [onAsk && (_jsx(Button, { variant: "ghost", icon: "message-square", onClick: () => {
17
+ onAsk(section
18
+ ? t('studio.loop.brief.read.about', { section: section.heading })
19
+ : read.title);
20
+ onClose();
21
+ }, children: t('studio.loop.brief.read.ask') })), _jsx(Button, { variant: "secondary", onClick: onClose, children: t('admin.common.close') })] }), children: _jsx(Markdown, { size: "read", source: section ? section.text : wholeText(parts) }) }));
22
+ }
@@ -0,0 +1,22 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ export declare const briefText: CSSProperties;
3
+ export declare const briefMuted: CSSProperties;
4
+ export declare const briefHeading: CSSProperties;
5
+ export declare const plainList: CSSProperties;
6
+ export declare const hairline = "var(--border-width-hairline) solid var(--border-hairline)";
7
+ /** One section: its heading and badge, Read more when there is more, then the short form. */
8
+ export declare function BriefSection({ title, badge, onMore, children, first, }: {
9
+ title: string;
10
+ badge?: ReactNode;
11
+ onMore?: () => void;
12
+ children: ReactNode;
13
+ /** The panel's first section: no rule above it, no room before it. */
14
+ first?: boolean;
15
+ }): import("react").JSX.Element;
16
+ /** "30 more", with the button that opens the section; only the button when nothing is left. */
17
+ export declare function RestLine({ rest, action, label, onClick, }: {
18
+ rest?: string;
19
+ action: string;
20
+ label: string;
21
+ onClick?: () => void;
22
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // The Brief's sections share one shape: a heading (with its badge), Read more when the brief has
3
+ // the section's whole text, then the short form. And the line under a short list: "30 more".
4
+ import { useT } from '@buffcore/i18n/react';
5
+ import { Button } from '../../../components/Button.js';
6
+ import { captionText } from '../../../components/styles.js';
7
+ export const briefText = {
8
+ margin: 0,
9
+ fontSize: 'var(--font-size-body)',
10
+ lineHeight: 'var(--line-height-body)',
11
+ color: 'var(--text-body)',
12
+ overflowWrap: 'break-word',
13
+ };
14
+ export const briefMuted = { ...briefText, color: 'var(--text-muted)' };
15
+ export const briefHeading = {
16
+ margin: 0,
17
+ fontFamily: 'var(--font-display)',
18
+ fontSize: 'var(--font-size-body-lg)',
19
+ lineHeight: 'var(--line-height-body-lg)',
20
+ fontWeight: 'var(--weight-heading)',
21
+ color: 'var(--text-strong)',
22
+ };
23
+ export const plainList = {
24
+ margin: 0,
25
+ padding: 0,
26
+ listStyle: 'none',
27
+ display: 'grid',
28
+ gap: 'var(--space-2)',
29
+ };
30
+ export const hairline = 'var(--border-width-hairline) solid var(--border-hairline)';
31
+ /** One section: its heading and badge, Read more when there is more, then the short form. */
32
+ export function BriefSection({ title, badge, onMore, children, first, }) {
33
+ const t = useT();
34
+ return (_jsxs("section", { style: {
35
+ display: 'grid',
36
+ gap: 'var(--space-3)',
37
+ paddingBlock: 'var(--space-5)',
38
+ ...(first ? { paddingBlockStart: 0 } : { borderBlockStart: hairline }),
39
+ minWidth: 0,
40
+ }, children: [_jsxs("header", { style: { display: 'flex', flexWrap: 'wrap', alignItems: 'center', gap: 'var(--space-2)' }, children: [_jsx("h2", { style: briefHeading, children: title }), badge, onMore && (_jsx(Button, { variant: "ghost", iconEnd: "chevron-right", "aria-label": t('studio.loop.brief.readMoreAbout', { section: title }), onClick: onMore, style: { marginInlineStart: 'auto', flexShrink: 0 }, children: t('studio.loop.brief.readMore') }))] }), children] }));
41
+ }
42
+ /** "30 more", with the button that opens the section; only the button when nothing is left. */
43
+ export function RestLine({ rest, action, label, onClick, }) {
44
+ if (!rest && !onClick)
45
+ return null;
46
+ return (_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 'var(--space-2)', flexWrap: 'wrap' }, children: [rest && _jsx("span", { style: captionText, children: rest }), onClick && (_jsx(Button, { variant: "ghost", iconEnd: "chevron-right", "aria-label": label, onClick: onClick, children: action }))] }));
47
+ }
@@ -0,0 +1,6 @@
1
+ import type { BriefDoc } from './types.ts';
2
+ type Who = BriefDoc['who'];
3
+ export declare function BriefWho({ who }: {
4
+ who: Who;
5
+ }): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,56 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Who uses it: a table (role, where, what we know) where there is room, a short card per role on a
3
+ // phone. A column the brief says nothing about is left out.
4
+ import { useT } from '@buffcore/i18n/react';
5
+ import { captionText } from '../../../components/styles.js';
6
+ import { useNarrow } from '../../../use-narrow.js';
7
+ import { NARROW_BELOW } from '../frame/layout.js';
8
+ import { briefMuted, briefText, hairline, plainList } from './BriefSection.js';
9
+ /** A long word (a link, a made-up name) wraps instead of pushing the page sideways. */
10
+ const wraps = { overflowWrap: 'anywhere', minWidth: 0 };
11
+ const strong = {
12
+ ...briefText,
13
+ ...wraps,
14
+ color: 'var(--text-strong)',
15
+ fontWeight: 'var(--weight-semibold)',
16
+ };
17
+ function WhoCards({ who }) {
18
+ const t = useT();
19
+ return (_jsx("ul", { style: { ...plainList, gap: 0 }, children: who.map((w, i) => (_jsxs("li", { style: {
20
+ display: 'grid',
21
+ gap: 'var(--space-1)',
22
+ paddingBlock: 'var(--space-3)',
23
+ ...(i ? { borderBlockStart: hairline } : {}),
24
+ }, children: [_jsxs("span", { style: {
25
+ display: 'flex',
26
+ alignItems: 'baseline',
27
+ gap: 'var(--space-2)',
28
+ flexWrap: 'wrap',
29
+ }, children: [_jsx("strong", { style: strong, children: w.role }), w.where && _jsx("span", { style: captionText, children: t(`studio.loop.where.${w.where}`) })] }), w.note && _jsx("span", { style: { ...briefMuted, ...wraps }, children: w.note })] }, i))) }));
30
+ }
31
+ export function BriefWho({ who }) {
32
+ const t = useT();
33
+ const phone = useNarrow(NARROW_BELOW);
34
+ if (phone)
35
+ return _jsx(WhoCards, { who: who });
36
+ const where = who.some((w) => w.where);
37
+ const know = who.some((w) => w.note);
38
+ const cell = {
39
+ ...briefText,
40
+ ...wraps,
41
+ textAlign: 'start',
42
+ verticalAlign: 'top',
43
+ padding: 'var(--space-3) var(--space-3) var(--space-3) 0',
44
+ borderBlockEnd: hairline,
45
+ };
46
+ const head = {
47
+ ...cell,
48
+ ...captionText,
49
+ paddingBlock: 'var(--space-2)',
50
+ fontWeight: 'var(--weight-medium)',
51
+ };
52
+ return (_jsxs("table", { style: { inlineSize: '100%', borderCollapse: 'collapse' }, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { style: head, children: t('studio.loop.brief.who.role') }), where && _jsx("th", { style: head, children: t('studio.loop.brief.who.where') }), know && _jsx("th", { style: head, children: t('studio.loop.brief.who.know') })] }) }), _jsx("tbody", { children: who.map((w, i) => {
53
+ const c = i === who.length - 1 ? { ...cell, borderBlockEnd: 0 } : cell;
54
+ return (_jsxs("tr", { children: [_jsx("th", { scope: "row", style: { ...c, ...strong }, children: w.role }), where && (_jsx("td", { style: { ...c, whiteSpace: 'nowrap' }, children: w.where ? t(`studio.loop.where.${w.where}`) : '' })), know && _jsx("td", { style: { ...c, color: 'var(--text-muted)' }, children: w.note ?? '' })] }, i));
55
+ }) })] }));
56
+ }
@@ -6,7 +6,6 @@ interface Props {
6
6
  onFocus?: (focus: ProtoView['focus']) => void;
7
7
  onData?: (data: DataState) => void;
8
8
  onMarks?: (on: boolean) => void;
9
- onFullScreen?: () => void;
10
9
  }
11
10
  /** All canvas controls use the page's width; marks and playback sit below. */
12
11
  export declare function CanvasBar(props: Props): import("react").JSX.Element;
@@ -7,15 +7,14 @@ import { captionText } from '../../../components/styles.js';
7
7
  import { Tabs } from '../../../components/Tabs.js';
8
8
  import { ControlReason } from './ControlReason.js';
9
9
  import { group, row } from './parts.js';
10
- import { ReasonButton } from './ReasonButton.js';
11
10
  import { TabletOrientation } from './TabletOrientation.js';
12
11
  const DATA = ['full', 'empty', 'loading', 'error'];
13
12
  const SHOW = ['both', 'patient', 'console'];
14
13
  /** All canvas controls use the page's width; marks and playback sit below. */
15
14
  export function CanvasBar(props) {
16
- const { view, onDevice, onFocus, onData, onMarks, onFullScreen } = props;
15
+ const { view, onDevice, onFocus, onData, onMarks } = props;
17
16
  const t = useT();
18
- return (_jsxs("div", { style: { display: 'grid', gap: 'var(--space-2)' }, children: [_jsxs("div", { "data-canvas-controls": true, style: { ...row, gap: 'var(--space-2)', alignItems: 'start' }, children: [_jsx(ControlReason, { disabled: !onFocus, children: _jsx(Tabs, { label: t('studio.loop.proto.show'), value: view.focus, onChange: onFocus, disabled: !onFocus, tabs: SHOW.map((s) => [s, t(`studio.loop.proto.show.${s}`)]) }) }), _jsx(Devices, { view: view, onDevice: onDevice }), _jsx(Select, { size: "sm", labelHidden: true, label: t('studio.loop.proto.data'), value: view.data, disabled: !onData, help: !onData ? t('studio.loop.design.why.unavailable') : undefined, onChange: (value) => onData?.(value), options: DATA.map((s) => ({ value: s, label: t(`studio.loop.proto.data.${s}`) })) }), _jsx("span", { style: { flex: 1 } }), _jsx(ReasonButton, { size: "sm", variant: "secondary", icon: "eye", disabled: !onFullScreen, why: !onFullScreen ? t('studio.loop.design.why.unavailable') : undefined, onClick: onFullScreen, children: t('studio.loop.proto.fullScreen') })] }), _jsx(TabletOrientation, { view: view, onOrientation: props.onOrientation }), _jsx(CanvasStatus, { view: view, onMarks: onMarks })] }));
17
+ return (_jsxs("div", { style: { display: 'grid', gap: 'var(--space-2)' }, children: [_jsxs("div", { "data-canvas-controls": true, style: { ...row, gap: 'var(--space-2)', alignItems: 'start' }, children: [_jsx(ControlReason, { disabled: !onFocus, children: _jsx(Tabs, { label: t('studio.loop.proto.show'), value: view.focus, onChange: onFocus, disabled: !onFocus, tabs: SHOW.map((s) => [s, t(`studio.loop.proto.show.${s}`)]) }) }), _jsx(Devices, { view: view, onDevice: onDevice }), _jsx(Select, { size: "sm", labelHidden: true, label: t('studio.loop.proto.data'), value: view.data, disabled: !onData, help: !onData ? t('studio.loop.design.why.unavailable') : undefined, onChange: (value) => onData?.(value), options: DATA.map((s) => ({ value: s, label: t(`studio.loop.proto.data.${s}`) })) })] }), _jsx(TabletOrientation, { view: view, onOrientation: props.onOrientation }), _jsx(CanvasStatus, { view: view, onMarks: onMarks })] }));
19
18
  }
20
19
  function CanvasStatus({ view, onMarks }) {
21
20
  const t = useT();
@@ -0,0 +1,13 @@
1
+ export declare function consoleAddress(url: string | undefined, locale: string, mode: string): {
2
+ status: 'stopped';
3
+ href?: undefined;
4
+ } | {
5
+ status: 'blocked';
6
+ href?: undefined;
7
+ } | {
8
+ status?: undefined;
9
+ href: string;
10
+ };
11
+ export declare function ConsoleFrame({ url }: {
12
+ url?: string;
13
+ }): import("react").JSX.Element;