@puredesktop/puredesktop-ui-bridge 2.1.4 → 2.1.7
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 +19 -1
- package/src/agents/runtime/mapAgentSnapshot.test.ts +1 -3
- package/src/agents/runtime/mapAgentSnapshot.ts +8 -4
- package/src/agents/runtime/mergeUsageTurn.ts +1 -2
- package/src/agents/runtime/pendingToolCalls.test.ts +1 -3
- package/src/agents/runtime/unresolvedToolCalls.ts +1 -2
- package/src/bridge/agentModelTiers.ts +9 -4
- package/src/bridge/agents.mjs +3 -1
- package/src/bridge/calendarDraftIntent.ts +12 -4
- package/src/bridge/calendarInviteIntent.ts +18 -5
- package/src/bridge/client.mjs +45 -45
- package/src/bridge/dialog.d.mts +8 -8
- package/src/bridge/dialog.mjs +40 -40
- package/src/bridge/dialog.test.ts +73 -73
- package/src/bridge/fs.d.mts +41 -41
- package/src/bridge/fs.mjs +56 -56
- package/src/bridge/fs.test.ts +83 -83
- package/src/bridge/fs.ts +28 -28
- package/src/bridge/googleAuth.ts +3 -1
- package/src/bridge/methods.d.mts +6 -0
- package/src/bridge/methods.mjs +7 -0
- package/src/bridge/network.d.mts +17 -17
- package/src/bridge/network.mjs +22 -22
- package/src/bridge/pureRender/base.css +324 -76
- package/src/bridge/pureRender/compiler.ts +1 -1
- package/src/bridge/pureRender/document.test.ts +2 -2
- package/src/bridge/pureRender/extraction.test.ts +24 -12
- package/src/bridge/pureRender/extraction.ts +10 -7
- package/src/bridge/pureRender/flow.css +17 -3
- package/src/bridge/pureRender/normalize.ts +28 -26
- package/src/bridge/pureRender/presets.ts +7 -7
- package/src/bridge/pureRender/profiles/book.css +122 -19
- package/src/bridge/pureRender/profiles/manuscript.css +57 -11
- package/src/bridge/pureRender/profiles/writer.css +48 -10
- package/src/bridge/pureRender/reset.css +20 -5
- package/src/bridge/pureRender/theme.ts +37 -9
- package/src/bridge/pureRender/tokens/default.css +45 -33
- package/src/bridge/react/usePlatformAgentRunLiveState.tsx +4 -1
- package/src/bridge/react/usePlatformAgentSessionDrive.tsx +13 -4
- package/src/bridge/screenAnnotation.test.ts +4 -1
- package/src/bridge/screenAnnotation.ts +6 -2
- package/src/bridge/storage.d.mts +26 -24
- package/src/bridge/storage.mjs +18 -18
- package/src/bridge/storage.test.ts +45 -45
- package/src/bridge/types.ts +62 -58
- package/src/bridge/window.d.mts +3 -1
- package/src/bridge/workspace.d.mts +7 -0
- package/src/bridge/workspace.mjs +8 -0
- package/src/bridge/workspace.ts +1 -0
- package/src/commitments/commitments.test.ts +10 -3
- package/src/commitments/commitments.ts +18 -4
- package/src/components/accessibility/AccessibilityReviewDialog.tsx +7 -2
- package/src/components/accessibility/accessibilityReview.test.ts +11 -4
- package/src/components/accessibility/accessibilityReview.ts +18 -10
- package/src/components/agent-feedback/ScreenAnnotationAgentDialog.tsx +9 -2
- package/src/components/agents/AgentContextUsageBar.tsx +5 -3
- package/src/components/agents/AgentDrawerPanel.test.tsx +15 -3
- package/src/components/agents/AgentMessageBubble.tsx +1 -3
- package/src/components/agents/AgentQuestionPromptList.tsx +3 -3
- package/src/components/agents/AgentToolApprovalActions.tsx +1 -3
- package/src/components/agents/agentPanelStyles.ts +1 -3
- package/src/components/agents/agentToolDisplay.ts +4 -1
- package/src/components/assets/asset-library/AssetLibraryDialog.tsx +2 -0
- package/src/components/assets/asset-library/AssetLibraryWorkspace.tsx +2 -0
- package/src/components/assets/asset-library/detail/AssetLibraryDetailHeader.test.tsx +40 -0
- package/src/components/assets/asset-library/detail/AssetLibraryDetailHeader.tsx +7 -3
- package/src/components/assets/asset-library/detail/AssetLibraryDetailPreview.tsx +8 -8
- package/src/components/assets/asset-library/hooks/useAssetLibraryDialog.ts +13 -2
- package/src/components/assets/asset-library/hooks/useAssetLibraryMutations.ts +18 -1
- package/src/components/assets/asset-library/sidebar/AssetLibraryListRow.tsx +9 -6
- package/src/components/assets/asset-library/sidebar/AssetLibrarySidebarToolbar.tsx +3 -1
- package/src/components/assets/asset-library/sidebar/AssetListThumbnail.tsx +1 -1
- package/src/components/assets/asset-library/types.ts +6 -0
- package/src/components/chrome/OverlayActionCapsule.tsx +2 -2
- package/src/components/chrome/PanelTabStrip.tsx +3 -2
- package/src/components/chrome/PureAppWordmark.tsx +15 -15
- package/src/components/chrome/WorkspaceTabStrip.tsx +19 -14
- package/src/components/chrome/documentChromePolicy.test.ts +34 -0
- package/src/components/chrome/documentChromePolicy.ts +15 -0
- package/src/components/chrome/index.ts +4 -0
- package/src/components/chrome/workspaceTabTypes.ts +2 -0
- package/src/components/common/buttons/Button.tsx +60 -10
- package/src/components/common/buttons/ChoiceChip.tsx +2 -2
- package/src/components/common/buttons/IconButton.tsx +26 -0
- package/src/components/common/buttons/SegmentedControl.tsx +23 -7
- package/src/components/common/canvas/CanvasElementFrame.tsx +37 -28
- package/src/components/common/canvas/canvasGeometry.test.ts +4 -5
- package/src/components/common/canvas/canvasGeometry.ts +1 -4
- package/src/components/common/canvas/useCanvasDragResize.test.tsx +10 -10
- package/src/components/common/canvas/useCanvasDragResize.ts +1 -4
- package/src/components/common/cards/OpenReviewCard.tsx +6 -6
- package/src/components/common/chat/ChatBox.test.tsx +9 -1
- package/src/components/common/chat/ChatBox.tsx +3 -4
- package/src/components/common/chat/ChatMarkdown.tsx +1 -1
- package/src/components/common/chat/ChatModelMenu.tsx +1 -1
- package/src/components/common/chat/ChatThinkingIndicator.tsx +1 -1
- package/src/components/common/chat/ChatThread.tsx +2 -1
- package/src/components/common/chat/ChatToolRow.tsx +2 -2
- package/src/components/common/chat/ChatUserBubble.tsx +1 -1
- package/src/components/common/connections/ConnectionSetup.tsx +6 -6
- package/src/components/common/containers/AppFrame.test.tsx +37 -36
- package/src/components/common/containers/AppFrame.tsx +15 -0
- package/src/components/common/containers/AppHeader.tsx +6 -3
- package/src/components/common/containers/SurfacePanel.tsx +1 -0
- package/src/components/common/containers/useOpacityPresence.ts +10 -15
- package/src/components/common/context/ContextSelector.tsx +10 -10
- package/src/components/common/desk/CreationDesk.tsx +23 -11
- package/src/components/common/desk/DailyBrief.tsx +18 -7
- package/src/components/common/desk/DeskCard.tsx +11 -6
- package/src/components/common/dropdown/MenuButtonDropdown.tsx +58 -6
- package/src/components/common/dropdown/MenuDropdownItem.tsx +23 -3
- package/src/components/common/dropdown/MenuPanel.tsx +8 -8
- package/src/components/common/dropdown/SelectMenu.tsx +8 -3
- package/src/components/common/dropdown/menuTypes.ts +2 -1
- package/src/components/common/evidence/StructuredEvidenceView.tsx +9 -5
- package/src/components/common/feedback/Badge.tsx +19 -5
- package/src/components/common/feedback/CapabilityPills.tsx +1 -1
- package/src/components/common/feedback/InfoHint.tsx +2 -2
- package/src/components/common/feedback/PlatformChip.tsx +9 -9
- package/src/components/common/feedback/QuietPill.tsx +5 -8
- package/src/components/common/feedback/WorkProgressPanel.tsx +14 -14
- package/src/components/common/files/FileTable.tsx +8 -2
- package/src/components/common/inputs/Checkbox.tsx +1 -1
- package/src/components/common/inputs/EditableSecretField.tsx +1 -3
- package/src/components/common/inputs/InlineComposer.tsx +2 -2
- package/src/components/common/inputs/PaletteDropdown.tsx +33 -23
- package/src/components/common/inputs/SurfacePalettePicker.tsx +1 -1
- package/src/components/common/inputs/ToggleSwitch.tsx +2 -2
- package/src/components/common/inputs/WorkspacePicker.tsx +3 -3
- package/src/components/common/lists/listRowStyles.ts +4 -2
- package/src/components/common/lists/quiet-ledger/index.ts +1 -4
- package/src/components/common/lists/reorderable/DragHandle.tsx +1 -1
- package/src/components/common/lists/reorderable/ReorderableSections.tsx +2 -1
- package/src/components/common/media/ImageReferencePicker.tsx +22 -14
- package/src/components/common/narrative/NarrativeMention.tsx +15 -9
- package/src/components/common/navigation/NavigationCardRow.tsx +2 -2
- package/src/components/common/navigation/UnderlineTabs.tsx +1 -0
- package/src/components/common/overlays/Modal.tsx +52 -3
- package/src/components/common/overlays/ObjectActionStrip.tsx +2 -2
- package/src/components/common/people/AutoUpdateReviewList.tsx +2 -2
- package/src/components/common/people/EntityList.tsx +7 -3
- package/src/components/common/people/EntityPortrait.tsx +6 -1
- package/src/components/common/people/LinkedDossierList.tsx +3 -1
- package/src/components/common/people/RelationshipMap.tsx +3 -9
- package/src/components/common/research/EvidenceDossier.tsx +24 -20
- package/src/components/common/tiles/CatalogCard.tsx +1 -1
- package/src/components/credentials/CredentialsPanel.tsx +2 -6
- package/src/components/data/DataChart.tsx +119 -94
- package/src/components/data/dataTable.ts +4 -1
- package/src/components/editor/DocumentAppChrome.tsx +172 -0
- package/src/components/editor/EditorCommentPromptDialog.tsx +1 -1
- package/src/components/editor/EditorLinkPromptDialog.tsx +1 -1
- package/src/components/print-design/PrintDesignPanel.test.tsx +8 -6
- package/src/components/print-design/PrintDesignPanel.tsx +18 -25
- package/src/components/proofing/PagedProofDialog.tsx +17 -4
- package/src/editor/EditorViewModeToggle.tsx +6 -2
- package/src/editor/index.ts +6 -0
- package/src/theme/ThemeProvider.tsx +5 -2
- package/src/theme/appAccents.test.ts +51 -0
- package/src/theme/appAccents.ts +151 -88
- package/src/theme/appIdentityCss.mjs +256 -0
- package/src/theme/appIdentityCss.ts +256 -0
- package/src/theme/composePlatformTheme.test.ts +43 -14
- package/src/theme/platformFont.d.mts +2 -2
- package/src/theme/platformFont.mjs +4 -3
- package/src/theme/reportsShellChromeSelectors.ts +14 -132
- package/src/theme/surfaceCss.mjs +37 -0
- package/src/theme/surfaceCss.ts +37 -0
- package/src/theme/surfacePalettes.ts +120 -79
- package/src/theme/surfaceRoleSelectors.ts +135 -71
- package/src/theme/themes/dark.ts +44 -43
- package/src/theme/themes/light.ts +40 -38
- package/src/theme/themes/palette.ts +32 -30
- package/src/theme/themes/shared.ts +17 -17
- package/src/theme/utils/GlobalStyles.ts +10 -6
- package/src/theme/utils/appFrameDocumentStyles.mjs +6 -1
- package/src/theme/utils/cssVariables.ts +169 -0
- package/src/writing/DraftAssistantDialog.tsx +85 -85
- package/src/writing/WritingStyleManager.tsx +6 -3
- package/src/writing/draftTextWithAgent.ts +47 -50
- package/src/writing/styleStore.ts +4 -3
- package/src/writing/writingStyle.test.ts +8 -2
- package/src/writing/writingStyle.ts +19 -8
|
@@ -162,7 +162,7 @@ export const PURE_RENDER_THEME_PRESETS: readonly PureRenderThemePreset[] = [
|
|
|
162
162
|
fonts: {
|
|
163
163
|
display: '"Newsreader", Georgia, serif',
|
|
164
164
|
serif: '"Source Serif 4", Georgia, serif',
|
|
165
|
-
sans: '"
|
|
165
|
+
sans: '"Archivo", system-ui, sans-serif',
|
|
166
166
|
mono: '"JetBrains Mono", ui-monospace, monospace',
|
|
167
167
|
},
|
|
168
168
|
},
|
|
@@ -204,9 +204,9 @@ export const PURE_RENDER_THEME_PRESETS: readonly PureRenderThemePreset[] = [
|
|
|
204
204
|
measure: '34rem',
|
|
205
205
|
scaleRatio: 1.25,
|
|
206
206
|
fonts: {
|
|
207
|
-
display: '"
|
|
207
|
+
display: '"Archivo", system-ui, sans-serif',
|
|
208
208
|
serif: '"Source Serif 4", Georgia, serif',
|
|
209
|
-
sans: '"
|
|
209
|
+
sans: '"Archivo", system-ui, sans-serif',
|
|
210
210
|
mono: '"JetBrains Mono", ui-monospace, monospace',
|
|
211
211
|
},
|
|
212
212
|
},
|
|
@@ -297,9 +297,9 @@ export const PURE_RENDER_THEME_PRESETS: readonly PureRenderThemePreset[] = [
|
|
|
297
297
|
measure: '25rem',
|
|
298
298
|
scaleRatio: 1.2,
|
|
299
299
|
fonts: {
|
|
300
|
-
display: '"
|
|
300
|
+
display: '"Archivo", system-ui, sans-serif',
|
|
301
301
|
serif: '"Source Serif 4", Georgia, serif',
|
|
302
|
-
sans: '"
|
|
302
|
+
sans: '"Archivo", system-ui, sans-serif',
|
|
303
303
|
mono: '"JetBrains Mono", ui-monospace, monospace',
|
|
304
304
|
},
|
|
305
305
|
},
|
|
@@ -341,9 +341,9 @@ export const PURE_RENDER_THEME_PRESETS: readonly PureRenderThemePreset[] = [
|
|
|
341
341
|
measure: '33rem',
|
|
342
342
|
scaleRatio: 1.2,
|
|
343
343
|
fonts: {
|
|
344
|
-
display: '"
|
|
344
|
+
display: '"Archivo", system-ui, sans-serif',
|
|
345
345
|
serif: '"Source Serif 4", Georgia, serif',
|
|
346
|
-
sans: '"
|
|
346
|
+
sans: '"Archivo", system-ui, sans-serif',
|
|
347
347
|
mono: '"JetBrains Mono", ui-monospace, monospace',
|
|
348
348
|
},
|
|
349
349
|
},
|
|
@@ -1,19 +1,122 @@
|
|
|
1
|
-
@page
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
@page {
|
|
2
|
+
size: 152mm 229mm;
|
|
3
|
+
margin: 18mm 16mm 22mm 20mm;
|
|
4
|
+
@bottom-center {
|
|
5
|
+
content: counter(page);
|
|
6
|
+
font: 500 8pt var(--mono);
|
|
7
|
+
color: var(--muted);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
@page: right{
|
|
11
|
+
margin-left: 20mm;
|
|
12
|
+
margin-right: 16mm;
|
|
13
|
+
@top-right {
|
|
14
|
+
content: string(chaptitle);
|
|
15
|
+
font: 600 7.5pt var(--sans);
|
|
16
|
+
letter-spacing: 0.1em;
|
|
17
|
+
text-transform: uppercase;
|
|
18
|
+
color: var(--muted);
|
|
19
|
+
}
|
|
20
|
+
@bottom-right {
|
|
21
|
+
content: counter(page);
|
|
22
|
+
}
|
|
23
|
+
@bottom-center {
|
|
24
|
+
content: none;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
@page: left{
|
|
28
|
+
margin-left: 16mm;
|
|
29
|
+
margin-right: 20mm;
|
|
30
|
+
@top-left {
|
|
31
|
+
content: string(doctitle);
|
|
32
|
+
font: 600 7.5pt var(--sans);
|
|
33
|
+
letter-spacing: 0.1em;
|
|
34
|
+
text-transform: uppercase;
|
|
35
|
+
color: var(--muted);
|
|
36
|
+
}
|
|
37
|
+
@bottom-left {
|
|
38
|
+
content: counter(page);
|
|
39
|
+
}
|
|
40
|
+
@bottom-center {
|
|
41
|
+
content: none;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
.pure-render-book > article > .doc-title {
|
|
45
|
+
break-after: page;
|
|
46
|
+
max-width: none;
|
|
47
|
+
padding-top: 35%;
|
|
48
|
+
text-align: center;
|
|
49
|
+
font-size: 30pt;
|
|
50
|
+
line-height: 1.05;
|
|
51
|
+
margin: 0;
|
|
52
|
+
}
|
|
53
|
+
.pure-render-book > article > .authors {
|
|
54
|
+
max-width: none;
|
|
55
|
+
text-align: center;
|
|
56
|
+
margin-top: 1rem;
|
|
57
|
+
}
|
|
58
|
+
section[data-type='toc'] {
|
|
59
|
+
break-before: right;
|
|
60
|
+
break-after: page;
|
|
61
|
+
max-width: none;
|
|
62
|
+
}
|
|
63
|
+
section[data-type='toc'] > h2 {
|
|
64
|
+
font-size: 20pt;
|
|
65
|
+
margin: 0 0 calc(var(--rhythm) * 1.2);
|
|
66
|
+
}
|
|
67
|
+
section[data-type='toc'] > h2::before {
|
|
68
|
+
content: none;
|
|
69
|
+
}
|
|
70
|
+
section[data-type='toc'] ol {
|
|
71
|
+
list-style: none;
|
|
72
|
+
padding: 0;
|
|
73
|
+
margin: 0;
|
|
74
|
+
max-width: none;
|
|
75
|
+
}
|
|
76
|
+
section[data-type='toc'] li {
|
|
77
|
+
margin: 0.35rem 0;
|
|
78
|
+
}
|
|
79
|
+
section[data-type='toc'] a {
|
|
80
|
+
display: flex;
|
|
81
|
+
gap: 0.35rem;
|
|
82
|
+
color: var(--ink);
|
|
83
|
+
}
|
|
84
|
+
section[data-type='toc'] a::after {
|
|
85
|
+
content: leader('.') target-counter(attr(href), page);
|
|
86
|
+
flex: 1;
|
|
87
|
+
text-align: right;
|
|
88
|
+
color: var(--muted);
|
|
89
|
+
}
|
|
90
|
+
section[data-type='part'] {
|
|
91
|
+
break-before: right;
|
|
92
|
+
text-align: center;
|
|
93
|
+
padding-top: 40%;
|
|
94
|
+
}
|
|
95
|
+
section[data-type='chapter'] {
|
|
96
|
+
break-before: right;
|
|
97
|
+
counter-increment: sec;
|
|
98
|
+
counter-reset: sub;
|
|
99
|
+
}
|
|
100
|
+
section[data-type='chapter'] > h2 {
|
|
101
|
+
string-set: chaptitle content(text);
|
|
102
|
+
font-size: 26pt;
|
|
103
|
+
margin: 0 0 calc(var(--rhythm) * 2);
|
|
104
|
+
}
|
|
105
|
+
section[data-type='chapter']::before {
|
|
106
|
+
content: 'Chapter ' counter(sec);
|
|
107
|
+
display: block;
|
|
108
|
+
font: 600 10pt var(--sans);
|
|
109
|
+
letter-spacing: 0.1em;
|
|
110
|
+
text-transform: uppercase;
|
|
111
|
+
color: var(--accent);
|
|
112
|
+
margin-bottom: 0.6rem;
|
|
113
|
+
}
|
|
114
|
+
section[data-type='chapter'] > h2 {
|
|
115
|
+
counter-increment: none;
|
|
116
|
+
}
|
|
117
|
+
section[data-type='chapter'] > h2::before {
|
|
118
|
+
content: none;
|
|
119
|
+
}
|
|
120
|
+
figcaption::before {
|
|
121
|
+
content: 'Figure ' attr(data-label) '.\00a0';
|
|
122
|
+
}
|
|
@@ -1,11 +1,57 @@
|
|
|
1
|
-
@page
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
@
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
@page {
|
|
2
|
+
size: A4;
|
|
3
|
+
margin: 28mm 24mm 26mm 24mm;
|
|
4
|
+
@bottom-center {
|
|
5
|
+
content: counter(page);
|
|
6
|
+
font: 500 8.4pt var(--mono);
|
|
7
|
+
color: var(--muted);
|
|
8
|
+
letter-spacing: 0.04em;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
@page: right{
|
|
12
|
+
margin-left: 26mm;
|
|
13
|
+
margin-right: 22mm;
|
|
14
|
+
@top-right {
|
|
15
|
+
content: string(sectitle);
|
|
16
|
+
font: 600 8pt var(--sans);
|
|
17
|
+
letter-spacing: 0.08em;
|
|
18
|
+
text-transform: uppercase;
|
|
19
|
+
color: var(--muted);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
@page: left{
|
|
23
|
+
margin-left: 22mm;
|
|
24
|
+
margin-right: 26mm;
|
|
25
|
+
@top-left {
|
|
26
|
+
content: string(doctitle);
|
|
27
|
+
font: 600 8pt var(--sans);
|
|
28
|
+
letter-spacing: 0.08em;
|
|
29
|
+
text-transform: uppercase;
|
|
30
|
+
color: var(--muted);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
@page: first{
|
|
34
|
+
margin-top: 24mm;
|
|
35
|
+
@top-left {
|
|
36
|
+
content: none;
|
|
37
|
+
}
|
|
38
|
+
@top-right {
|
|
39
|
+
content: none;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
[data-variant='two-column'] {
|
|
43
|
+
column-count: 2;
|
|
44
|
+
column-gap: 7mm;
|
|
45
|
+
column-fill: auto;
|
|
46
|
+
}
|
|
47
|
+
[data-variant='two-column'] > .doc-title,
|
|
48
|
+
[data-variant='two-column'] > .authors,
|
|
49
|
+
[data-variant='two-column'] > .affil,
|
|
50
|
+
[data-variant='two-column'] > .keywords,
|
|
51
|
+
[data-variant='two-column'] > section[data-type='abstract'] {
|
|
52
|
+
column-span: all;
|
|
53
|
+
}
|
|
54
|
+
[data-variant='two-column'] figure[data-span='page'],
|
|
55
|
+
[data-variant='two-column'] .table-wrap[data-span='page'] {
|
|
56
|
+
column-span: all;
|
|
57
|
+
}
|
|
@@ -1,10 +1,48 @@
|
|
|
1
|
-
@page
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
@page {
|
|
2
|
+
size: A4;
|
|
3
|
+
margin: 25mm;
|
|
4
|
+
@bottom-center {
|
|
5
|
+
content: counter(page);
|
|
6
|
+
font: 500 8.4pt var(--mono);
|
|
7
|
+
color: var(--muted);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
@page: first{
|
|
11
|
+
@top-left {
|
|
12
|
+
content: none;
|
|
13
|
+
}
|
|
14
|
+
@top-right {
|
|
15
|
+
content: none;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
.pure-render-writer {
|
|
19
|
+
--text-align: var(--theme-text-align, left);
|
|
20
|
+
--hyphenate: var(--theme-hyphenate, manual);
|
|
21
|
+
}
|
|
22
|
+
.pure-render-writer p + p {
|
|
23
|
+
text-indent: 0;
|
|
24
|
+
margin-top: calc(var(--rhythm) * 0.55);
|
|
25
|
+
}
|
|
26
|
+
section > h2 {
|
|
27
|
+
counter-increment: none;
|
|
28
|
+
}
|
|
29
|
+
h2::before,
|
|
30
|
+
h3::before {
|
|
31
|
+
content: none;
|
|
32
|
+
}
|
|
33
|
+
section[data-type='abstract'] {
|
|
34
|
+
border: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
}
|
|
37
|
+
.pure-render-writer section[data-type='references'] ol {
|
|
38
|
+
list-style: decimal;
|
|
39
|
+
padding-left: 1.4rem;
|
|
40
|
+
}
|
|
41
|
+
.pure-render-writer section[data-type='references'] li {
|
|
42
|
+
counter-increment: none;
|
|
43
|
+
padding-left: 0;
|
|
44
|
+
text-indent: 0;
|
|
45
|
+
}
|
|
46
|
+
.pure-render-writer section[data-type='references'] li::before {
|
|
47
|
+
content: none;
|
|
48
|
+
}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
*{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
* {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
html,
|
|
5
|
+
body {
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
}
|
|
9
|
+
img,
|
|
10
|
+
svg {
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
height: auto;
|
|
13
|
+
display: block;
|
|
14
|
+
}
|
|
15
|
+
table {
|
|
16
|
+
border-collapse: collapse;
|
|
17
|
+
}
|
|
18
|
+
html[data-pagedjs-rendered='true'] body > :not(.pagedjs_pages) {
|
|
19
|
+
display: none !important;
|
|
20
|
+
}
|
|
@@ -48,8 +48,14 @@ export function themeToPureRenderTokenCss(
|
|
|
48
48
|
const profileVars = profileRuleCssVariables(theme)
|
|
49
49
|
|
|
50
50
|
return `:root{
|
|
51
|
-
--ink:${theme.color.ink}; --ink-soft:${theme.color['ink-soft']}; --muted:${
|
|
52
|
-
|
|
51
|
+
--ink:${theme.color.ink}; --ink-soft:${theme.color['ink-soft']}; --muted:${
|
|
52
|
+
theme.color.muted
|
|
53
|
+
}; --paper:${paper};
|
|
54
|
+
--rule:${theme.color.rule}; --rule-soft:${
|
|
55
|
+
theme.color['rule-soft']
|
|
56
|
+
}; --accent:${theme.color.accent}; --accent-ink:${
|
|
57
|
+
theme.color['accent-ink'] ?? theme.color.accent
|
|
58
|
+
};
|
|
53
59
|
|
|
54
60
|
--body:${theme.type.body}; --lead:${theme.type.lead};
|
|
55
61
|
--measure:${theme.type.measure};
|
|
@@ -60,7 +66,9 @@ export function themeToPureRenderTokenCss(
|
|
|
60
66
|
|
|
61
67
|
--t-cap:${cap}pt; --t-body:${body}pt; --t-h3:${h3}pt; --t-h2:${h2}pt; --t-h1:${h1}pt; --t-title:${title}pt;
|
|
62
68
|
--rhythm:${theme.rhythm};
|
|
63
|
-
--theme-text-align:${
|
|
69
|
+
--theme-text-align:${
|
|
70
|
+
theme.setting?.align === 'flush-left' ? 'left' : 'justify'
|
|
71
|
+
};
|
|
64
72
|
--theme-hyphenate:${theme.setting?.hyphenate === false ? 'manual' : 'auto'};
|
|
65
73
|
--text-align:var(--theme-text-align);
|
|
66
74
|
--hyphenate:var(--theme-hyphenate);
|
|
@@ -142,11 +150,27 @@ function profileRuleCssVariables(theme: PureRenderTheme): string {
|
|
|
142
150
|
const density = tableDensity(rules.table?.density)
|
|
143
151
|
const header = tableHeader(rules.table?.header_treatment)
|
|
144
152
|
return [
|
|
145
|
-
` --running-head-transform:${textTransform(
|
|
146
|
-
|
|
147
|
-
|
|
153
|
+
` --running-head-transform:${textTransform(
|
|
154
|
+
rules.running_heads?.transform,
|
|
155
|
+
)};`,
|
|
156
|
+
` --running-head-rule:${
|
|
157
|
+
rules.running_heads?.rule === 'hairline'
|
|
158
|
+
? '.5px'
|
|
159
|
+
: rules.running_heads?.rule === 'solid'
|
|
160
|
+
? '1px'
|
|
161
|
+
: '0'
|
|
162
|
+
};`,
|
|
163
|
+
` --folio-display:${
|
|
164
|
+
rules.folio?.position === 'none' ? 'none' : 'initial'
|
|
165
|
+
};`,
|
|
148
166
|
` --chapter-opener-padding:${openerPadding(rules.opener?.spacing)};`,
|
|
149
|
-
` --chapter-ornament-display:${
|
|
167
|
+
` --chapter-ornament-display:${
|
|
168
|
+
rules.opener?.ornament && rules.opener.ornament !== 'none'
|
|
169
|
+
? 'block'
|
|
170
|
+
: rules.ornaments?.kind && rules.ornaments.kind !== 'none'
|
|
171
|
+
? 'block'
|
|
172
|
+
: 'none'
|
|
173
|
+
};`,
|
|
150
174
|
` --chapter-ornament-border:${ornamentWidth};`,
|
|
151
175
|
` --table-rule-width:${tableRule};`,
|
|
152
176
|
` --table-row-rule-width:${density.rowRuleWidth};`,
|
|
@@ -158,8 +182,12 @@ function profileRuleCssVariables(theme: PureRenderTheme): string {
|
|
|
158
182
|
` --table-cell-padding-x:${density.paddingX};`,
|
|
159
183
|
` --table-header-transform:${header.transform};`,
|
|
160
184
|
` --table-header-letter-spacing:${header.letterSpacing};`,
|
|
161
|
-
` --caption-label-weight:${
|
|
162
|
-
|
|
185
|
+
` --caption-label-weight:${
|
|
186
|
+
rules.caption?.label_style === 'plain' ? '400' : '700'
|
|
187
|
+
};`,
|
|
188
|
+
` --caption-label-transform:${
|
|
189
|
+
rules.caption?.label_style === 'small-caps' ? 'uppercase' : 'none'
|
|
190
|
+
};`,
|
|
163
191
|
].join('\n')
|
|
164
192
|
}
|
|
165
193
|
|
|
@@ -1,36 +1,48 @@
|
|
|
1
|
-
:root{
|
|
2
|
-
--ink
|
|
3
|
-
--
|
|
1
|
+
:root {
|
|
2
|
+
--ink: #16181d;
|
|
3
|
+
--ink-soft: #3c4049;
|
|
4
|
+
--muted: #71757e;
|
|
5
|
+
--paper: #ffffff;
|
|
6
|
+
--rule: #c9cbd0;
|
|
7
|
+
--rule-soft: #e4e5e9;
|
|
8
|
+
--accent: #1f39c4;
|
|
9
|
+
--accent-ink: #1426c9;
|
|
4
10
|
|
|
5
|
-
--body:10.6pt;
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
+
--body: 10.6pt;
|
|
12
|
+
--lead: 1.5;
|
|
13
|
+
--measure: 34rem;
|
|
14
|
+
--display: 'Archivo', system-ui, sans-serif;
|
|
15
|
+
--serif: 'Source Serif 4', Georgia, serif;
|
|
16
|
+
--sans: 'Archivo', system-ui, sans-serif;
|
|
17
|
+
--mono: 'JetBrains Mono', ui-monospace, monospace;
|
|
11
18
|
|
|
12
|
-
--t-cap:8.4pt;
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
--
|
|
17
|
-
--
|
|
18
|
-
--
|
|
19
|
-
--
|
|
20
|
-
--
|
|
21
|
-
--
|
|
22
|
-
--
|
|
23
|
-
--
|
|
24
|
-
--
|
|
25
|
-
--
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
--table-
|
|
30
|
-
--table-
|
|
31
|
-
--table-
|
|
32
|
-
--table-header-
|
|
33
|
-
--table-header-
|
|
34
|
-
--
|
|
35
|
-
--
|
|
19
|
+
--t-cap: 8.4pt;
|
|
20
|
+
--t-body: 10.6pt;
|
|
21
|
+
--t-h3: 12.5pt;
|
|
22
|
+
--t-h2: 15pt;
|
|
23
|
+
--t-h1: 18pt;
|
|
24
|
+
--t-title: 22.5pt;
|
|
25
|
+
--rhythm: 15.9pt;
|
|
26
|
+
--theme-text-align: justify;
|
|
27
|
+
--theme-hyphenate: auto;
|
|
28
|
+
--text-align: var(--theme-text-align);
|
|
29
|
+
--hyphenate: var(--theme-hyphenate);
|
|
30
|
+
--running-head-transform: uppercase;
|
|
31
|
+
--running-head-rule: 0;
|
|
32
|
+
--folio-display: initial;
|
|
33
|
+
--chapter-opener-padding: 0;
|
|
34
|
+
--chapter-ornament-display: none;
|
|
35
|
+
--chapter-ornament-border: 0;
|
|
36
|
+
--table-rule-width: 1px;
|
|
37
|
+
--table-row-rule-width: 0.5px;
|
|
38
|
+
--table-header-bg: transparent;
|
|
39
|
+
--table-header-ink: var(--ink);
|
|
40
|
+
--table-header-rule-color: var(--rule);
|
|
41
|
+
--table-row-rule-color: var(--rule-soft);
|
|
42
|
+
--table-cell-padding-y: 0.32rem;
|
|
43
|
+
--table-cell-padding-x: 0.6rem;
|
|
44
|
+
--table-header-transform: uppercase;
|
|
45
|
+
--table-header-letter-spacing: 0.04em;
|
|
46
|
+
--caption-label-weight: 700;
|
|
47
|
+
--caption-label-transform: none;
|
|
36
48
|
}
|
|
@@ -50,7 +50,10 @@ export function usePlatformAgentRunLiveState(runId: string | undefined): {
|
|
|
50
50
|
setLiveRunSnapshot(payload.snapshot)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
if (
|
|
53
|
+
if (
|
|
54
|
+
payload.type === AgentRunEventType.UsageUpdated &&
|
|
55
|
+
'usage' in payload
|
|
56
|
+
) {
|
|
54
57
|
setLiveRunSnapshot(current => {
|
|
55
58
|
if (!current) return current
|
|
56
59
|
const usage = mergeUsageTurn(
|
|
@@ -27,7 +27,10 @@ import type {
|
|
|
27
27
|
PlatformAgentSessionSummary,
|
|
28
28
|
PlatformAgentSessionToolPolicy,
|
|
29
29
|
} from '../agentTypes.js'
|
|
30
|
-
import {
|
|
30
|
+
import {
|
|
31
|
+
isAgentAutoModelId,
|
|
32
|
+
DEFAULT_AGENT_HIGH_LEVEL_MODEL_ID,
|
|
33
|
+
} from '../agentModelTiers.js'
|
|
31
34
|
import {
|
|
32
35
|
getPlatformPreferences,
|
|
33
36
|
patchPlatformPreferences,
|
|
@@ -401,8 +404,7 @@ export function usePlatformAgentSessionDrive({
|
|
|
401
404
|
: 'This model is not available. Check API keys or local runtime in Settings.'
|
|
402
405
|
}, [modelOptions, selectedModelId])
|
|
403
406
|
|
|
404
|
-
const toolPolicy =
|
|
405
|
-
policy ?? sessionRecord?.config?.toolPolicy ?? undefined
|
|
407
|
+
const toolPolicy = policy ?? sessionRecord?.config?.toolPolicy ?? undefined
|
|
406
408
|
const acceptedPendingToolCallIds = useMemo(
|
|
407
409
|
() =>
|
|
408
410
|
sessionRecord?.runId && sessionRecord.runId === threadSnapshot?.runId
|
|
@@ -534,7 +536,14 @@ export function usePlatformAgentSessionDrive({
|
|
|
534
536
|
setBusy(false)
|
|
535
537
|
}
|
|
536
538
|
},
|
|
537
|
-
[
|
|
539
|
+
[
|
|
540
|
+
applyDriveResult,
|
|
541
|
+
canInterrupt,
|
|
542
|
+
enabled,
|
|
543
|
+
refreshSessionList,
|
|
544
|
+
sessionQuery,
|
|
545
|
+
sessionRecord,
|
|
546
|
+
],
|
|
538
547
|
)
|
|
539
548
|
|
|
540
549
|
const selectSession = useCallback(
|
|
@@ -38,7 +38,10 @@ describe('selectTextFromCandidates', () => {
|
|
|
38
38
|
expect(
|
|
39
39
|
selectTextFromCandidates(
|
|
40
40
|
[
|
|
41
|
-
{
|
|
41
|
+
{
|
|
42
|
+
text: ' Hello world ',
|
|
43
|
+
rect: { x: 0, y: 0, width: 10, height: 10 },
|
|
44
|
+
},
|
|
42
45
|
{ text: 'Hello world', rect: { x: 0, y: 0, width: 10, height: 10 } },
|
|
43
46
|
],
|
|
44
47
|
{ x: 0, y: 0, width: 10, height: 10 },
|
|
@@ -209,7 +209,8 @@ export async function captureAndSendToAgent(
|
|
|
209
209
|
? options.title(result)
|
|
210
210
|
: options.title ?? 'Screen annotation'
|
|
211
211
|
|
|
212
|
-
const scope =
|
|
212
|
+
const scope =
|
|
213
|
+
capture.mode === 'content' ? ('app' as const) : ('global' as const)
|
|
213
214
|
|
|
214
215
|
options.onStatus?.('working')
|
|
215
216
|
try {
|
|
@@ -235,7 +236,10 @@ export async function captureAndSendToAgent(
|
|
|
235
236
|
|
|
236
237
|
for (let step = 0; step < maxSteps; step += 1) {
|
|
237
238
|
if (snapshot.state === 'ready') {
|
|
238
|
-
snapshot = await callAgentRunModel({
|
|
239
|
+
snapshot = await callAgentRunModel({
|
|
240
|
+
runId,
|
|
241
|
+
sessionId: record.sessionId,
|
|
242
|
+
})
|
|
239
243
|
continue
|
|
240
244
|
}
|
|
241
245
|
if (snapshot.state === 'pending_tools') {
|
package/src/bridge/storage.d.mts
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
|
+
export type PlatformStorageJsonFileName = `${string}.json`
|
|
2
|
+
|
|
1
3
|
export interface PlatformStorageJsonRequest {
|
|
2
4
|
appSlug: string
|
|
3
|
-
fileName:
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface PlatformStorageJsonReadResult {
|
|
7
|
-
path: string
|
|
8
|
-
value: unknown | null
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface PlatformStorageJsonWriteRequest
|
|
12
|
-
extends PlatformStorageJsonRequest {
|
|
13
|
-
value: unknown
|
|
5
|
+
fileName: PlatformStorageJsonFileName
|
|
14
6
|
}
|
|
15
|
-
|
|
16
|
-
export interface
|
|
17
|
-
path: string
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
7
|
+
|
|
8
|
+
export interface PlatformStorageJsonReadResult {
|
|
9
|
+
path: string
|
|
10
|
+
value: unknown | null
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface PlatformStorageJsonWriteRequest
|
|
14
|
+
extends PlatformStorageJsonRequest {
|
|
15
|
+
value: unknown
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface PlatformStorageJsonWriteResult {
|
|
19
|
+
path: string
|
|
20
|
+
ok: true
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export declare function readPlatformStorageJson(
|
|
24
|
+
request: PlatformStorageJsonRequest,
|
|
25
|
+
): Promise<PlatformStorageJsonReadResult>
|
|
26
|
+
|
|
27
|
+
export declare function writePlatformStorageJson(
|
|
28
|
+
request: PlatformStorageJsonWriteRequest,
|
|
29
|
+
): Promise<PlatformStorageJsonWriteResult>
|