@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
|
@@ -1,136 +1,18 @@
|
|
|
1
1
|
import { css } from 'styled-components'
|
|
2
|
+
import { surfaceRoleSelectors } from './surfaceRoleSelectors.js'
|
|
2
3
|
|
|
3
|
-
/** Reports builder chrome
|
|
4
|
+
/** Reports builder chrome aliases, derived from the shared factory variables. */
|
|
4
5
|
export const reportsShellChromeSelectors = css`
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
[data-platform-surface-palette='sepia'] & {
|
|
20
|
-
--text: #3a342c;
|
|
21
|
-
--muted: #7d7468;
|
|
22
|
-
--faint: #a89e90;
|
|
23
|
-
--accent: #6b5d49;
|
|
24
|
-
--bg: #f2f0eb;
|
|
25
|
-
--surface: #fffdf6;
|
|
26
|
-
--surface-soft: #f4efe6;
|
|
27
|
-
--border: #d9dee5;
|
|
28
|
-
--soft-border: #e7ebf0;
|
|
29
|
-
--report-desk: #f4efe6;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
[data-platform-surface-palette='slate'] & {
|
|
33
|
-
--text: #2b323c;
|
|
34
|
-
--muted: #6e7a88;
|
|
35
|
-
--faint: #97a2af;
|
|
36
|
-
--accent: #4d6378;
|
|
37
|
-
--bg: #eef1f4;
|
|
38
|
-
--surface: #fdfeff;
|
|
39
|
-
--surface-soft: #f7f8fa;
|
|
40
|
-
--border: #d9dee5;
|
|
41
|
-
--soft-border: #e7ebf0;
|
|
42
|
-
--report-desk: #eef1f4;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
[data-platform-surface-palette='forest'] & {
|
|
46
|
-
--text: #2d352f;
|
|
47
|
-
--muted: #6f7b72;
|
|
48
|
-
--faint: #98a39b;
|
|
49
|
-
--accent: #4e6b58;
|
|
50
|
-
--bg: #eff2ee;
|
|
51
|
-
--surface: #fdfffd;
|
|
52
|
-
--surface-soft: #f7f8fa;
|
|
53
|
-
--border: #d9dee5;
|
|
54
|
-
--soft-border: #e7ebf0;
|
|
55
|
-
--report-desk: #eff2ee;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
[data-platform-surface-palette='plum'] & {
|
|
59
|
-
--text: #342e38;
|
|
60
|
-
--muted: #7a7280;
|
|
61
|
-
--faint: #a59dab;
|
|
62
|
-
--accent: #66506e;
|
|
63
|
-
--bg: #f3f0f4;
|
|
64
|
-
--surface: #fffdff;
|
|
65
|
-
--surface-soft: #f7f8fa;
|
|
66
|
-
--border: #d9dee5;
|
|
67
|
-
--soft-border: #e7ebf0;
|
|
68
|
-
--report-desk: #f3f0f4;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
[data-platform-theme='dark']:not([data-platform-surface-palette]) &,
|
|
72
|
-
[data-platform-theme='dark'][data-platform-surface-palette='ink'] & {
|
|
73
|
-
--text: #e8eaed;
|
|
74
|
-
--muted: #9aa2ad;
|
|
75
|
-
--faint: #6e7681;
|
|
76
|
-
--accent: #8a929d;
|
|
77
|
-
--bg: #141618;
|
|
78
|
-
--surface: #1c1f23;
|
|
79
|
-
--surface-soft: #20242a;
|
|
80
|
-
--border: #2a2f36;
|
|
81
|
-
--soft-border: #252a31;
|
|
82
|
-
--report-desk: #141618;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
[data-platform-theme='dark'][data-platform-surface-palette='sepia'] & {
|
|
86
|
-
--text: #ece6dc;
|
|
87
|
-
--muted: #a89e90;
|
|
88
|
-
--faint: #7d7468;
|
|
89
|
-
--accent: #9a8468;
|
|
90
|
-
--bg: #1a1814;
|
|
91
|
-
--surface: #242019;
|
|
92
|
-
--surface-soft: #242019;
|
|
93
|
-
--border: #2a2f36;
|
|
94
|
-
--soft-border: #252a31;
|
|
95
|
-
--report-desk: #1a1814;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
[data-platform-theme='dark'][data-platform-surface-palette='slate'] & {
|
|
99
|
-
--text: #e3e8ef;
|
|
100
|
-
--muted: #97a2af;
|
|
101
|
-
--faint: #6e7a88;
|
|
102
|
-
--accent: #7a94ad;
|
|
103
|
-
--bg: #13171c;
|
|
104
|
-
--surface: #1a2028;
|
|
105
|
-
--surface-soft: #1a2028;
|
|
106
|
-
--border: #2a2f36;
|
|
107
|
-
--soft-border: #252a31;
|
|
108
|
-
--report-desk: #13171c;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
[data-platform-theme='dark'][data-platform-surface-palette='forest'] & {
|
|
112
|
-
--text: #e2ebe4;
|
|
113
|
-
--muted: #98a39b;
|
|
114
|
-
--faint: #6f7b72;
|
|
115
|
-
--accent: #6d9479;
|
|
116
|
-
--bg: #141916;
|
|
117
|
-
--surface: #1b221d;
|
|
118
|
-
--surface-soft: #1b221d;
|
|
119
|
-
--border: #2a2f36;
|
|
120
|
-
--soft-border: #252a31;
|
|
121
|
-
--report-desk: #141916;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
[data-platform-theme='dark'][data-platform-surface-palette='plum'] & {
|
|
125
|
-
--text: #ebe6ef;
|
|
126
|
-
--muted: #a59dab;
|
|
127
|
-
--faint: #7a7280;
|
|
128
|
-
--accent: #8f74a0;
|
|
129
|
-
--bg: #17141a;
|
|
130
|
-
--surface: #201c24;
|
|
131
|
-
--surface-soft: #201c24;
|
|
132
|
-
--border: #2a2f36;
|
|
133
|
-
--soft-border: #252a31;
|
|
134
|
-
--report-desk: #17141a;
|
|
135
|
-
}
|
|
6
|
+
${surfaceRoleSelectors('report')}
|
|
7
|
+
|
|
8
|
+
--text: var(--report-ink, var(--platform-colors-text));
|
|
9
|
+
--muted: var(--report-muted, var(--platform-colors-text-secondary));
|
|
10
|
+
--faint: var(--report-faint, var(--platform-colors-text-disabled));
|
|
11
|
+
--accent: var(--report-accent, var(--platform-colors-text));
|
|
12
|
+
--bg: var(--report-bg, var(--platform-colors-bg));
|
|
13
|
+
--surface: var(--report-paper, var(--platform-colors-surface));
|
|
14
|
+
--surface-soft: var(--platform-colors-surface-hover);
|
|
15
|
+
--border: var(--platform-colors-border);
|
|
16
|
+
--soft-border: var(--platform-colors-divider);
|
|
17
|
+
--report-desk: var(--bg);
|
|
136
18
|
`
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const surfaceCss = `
|
|
2
|
+
.pure-well {
|
|
3
|
+
background: var(--well, var(--platform-colors-surface-active));
|
|
4
|
+
padding: 44px 40px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pure-page {
|
|
9
|
+
background: var(--page, var(--platform-colors-elevated));
|
|
10
|
+
border: 1px solid var(--line, var(--platform-colors-divider));
|
|
11
|
+
box-shadow: var(--page-shadow, var(--platform-shadow-lg));
|
|
12
|
+
max-width: 660px;
|
|
13
|
+
margin: 0 auto;
|
|
14
|
+
padding: 44px 54px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pure-rail {
|
|
18
|
+
background: var(--surface, var(--platform-colors-surface));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.pure-board {
|
|
22
|
+
background: var(--canvas, var(--platform-colors-bg));
|
|
23
|
+
padding: 18px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pure-panel {
|
|
27
|
+
background: var(--surface, var(--platform-colors-surface));
|
|
28
|
+
border: 1px solid var(--line, var(--platform-colors-divider));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pure-panel--active {
|
|
32
|
+
background: var(--surface, var(--platform-colors-surface));
|
|
33
|
+
border: 1px solid var(--app-acc, var(--line-strong, var(--platform-colors-border-strong)));
|
|
34
|
+
border-top-width: 2px;
|
|
35
|
+
box-shadow: inset 3px 0 0 var(--app-acc, var(--line-strong, var(--platform-colors-border-strong)));
|
|
36
|
+
}
|
|
37
|
+
`
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const surfaceCss = `
|
|
2
|
+
.pure-well {
|
|
3
|
+
background: var(--well, var(--platform-colors-surface-active));
|
|
4
|
+
padding: 44px 40px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pure-page {
|
|
9
|
+
background: var(--page, var(--platform-colors-elevated));
|
|
10
|
+
border: 1px solid var(--line, var(--platform-colors-divider));
|
|
11
|
+
box-shadow: var(--page-shadow, var(--platform-shadow-lg));
|
|
12
|
+
max-width: 660px;
|
|
13
|
+
margin: 0 auto;
|
|
14
|
+
padding: 44px 54px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pure-rail {
|
|
18
|
+
background: var(--surface, var(--platform-colors-surface));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.pure-board {
|
|
22
|
+
background: var(--canvas, var(--platform-colors-bg));
|
|
23
|
+
padding: 18px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pure-panel {
|
|
27
|
+
background: var(--surface, var(--platform-colors-surface));
|
|
28
|
+
border: 1px solid var(--line, var(--platform-colors-divider));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pure-panel--active {
|
|
32
|
+
background: var(--surface, var(--platform-colors-surface));
|
|
33
|
+
border: 1px solid var(--app-acc, var(--line-strong, var(--platform-colors-border-strong)));
|
|
34
|
+
border-top-width: 2px;
|
|
35
|
+
box-shadow: inset 3px 0 0 var(--app-acc, var(--line-strong, var(--platform-colors-border-strong)));
|
|
36
|
+
}
|
|
37
|
+
`
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import type { PlatformTheme } from './tokens.js'
|
|
2
2
|
import type { PlatformThemeMode } from './tokens.js'
|
|
3
|
+
import { neutral } from './themes/palette.js'
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
+
/** Theme roles: text ladder, surfaces, and the one active accent. */
|
|
5
6
|
export interface SurfacePaletteRoles {
|
|
6
7
|
ink: string
|
|
8
|
+
soft: string
|
|
7
9
|
muted: string
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
desk: string
|
|
10
|
+
line: string
|
|
11
|
+
surface: string
|
|
11
12
|
paper: string
|
|
13
|
+
accent: string
|
|
14
|
+
accentBg: string
|
|
15
|
+
accentText: string
|
|
12
16
|
}
|
|
13
17
|
|
|
14
18
|
export interface SurfacePalette {
|
|
@@ -26,100 +30,130 @@ export const SURFACE_PALETTES: SurfacePalette[] = [
|
|
|
26
30
|
id: 'ink',
|
|
27
31
|
label: 'Ink',
|
|
28
32
|
light: {
|
|
29
|
-
ink: '#
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
paper: '#
|
|
33
|
+
ink: '#171b21',
|
|
34
|
+
soft: '#48515c',
|
|
35
|
+
muted: '#828b96',
|
|
36
|
+
line: '#dde2e9',
|
|
37
|
+
surface: '#fcfdfe',
|
|
38
|
+
paper: '#eef2f7',
|
|
39
|
+
accent: '#34506f',
|
|
40
|
+
accentBg: '#dde7f1',
|
|
41
|
+
accentText: '#283a4f',
|
|
35
42
|
},
|
|
36
43
|
dark: {
|
|
37
|
-
ink:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
paper:
|
|
44
|
+
ink: neutral[50],
|
|
45
|
+
soft: neutral[400],
|
|
46
|
+
muted: neutral[400],
|
|
47
|
+
line: neutral[850],
|
|
48
|
+
surface: neutral[850],
|
|
49
|
+
paper: neutral[900],
|
|
50
|
+
accent: neutral[50],
|
|
51
|
+
accentBg: neutral[850],
|
|
52
|
+
accentText: neutral[50],
|
|
43
53
|
},
|
|
44
54
|
},
|
|
45
55
|
{
|
|
46
56
|
id: 'sepia',
|
|
47
57
|
label: 'Sepia',
|
|
48
58
|
light: {
|
|
49
|
-
ink: '#
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
paper: '#
|
|
59
|
+
ink: '#33260f',
|
|
60
|
+
soft: '#675135',
|
|
61
|
+
muted: '#9a8460',
|
|
62
|
+
line: '#e7dcc4',
|
|
63
|
+
surface: '#fcf8ef',
|
|
64
|
+
paper: '#f4ecd8',
|
|
65
|
+
accent: '#a25c00',
|
|
66
|
+
accentBg: '#ecd49b',
|
|
67
|
+
accentText: '#6e4400',
|
|
55
68
|
},
|
|
56
69
|
dark: {
|
|
57
|
-
ink:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
paper:
|
|
70
|
+
ink: neutral[100],
|
|
71
|
+
soft: neutral[400],
|
|
72
|
+
muted: neutral[400],
|
|
73
|
+
line: neutral[850],
|
|
74
|
+
surface: neutral[825],
|
|
75
|
+
paper: neutral[875],
|
|
76
|
+
accent: neutral[300],
|
|
77
|
+
accentBg: neutral[850],
|
|
78
|
+
accentText: neutral[100],
|
|
63
79
|
},
|
|
64
80
|
},
|
|
65
81
|
{
|
|
66
82
|
id: 'slate',
|
|
67
83
|
label: 'Slate',
|
|
68
84
|
light: {
|
|
69
|
-
ink: '#
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
paper: '#
|
|
85
|
+
ink: '#152233',
|
|
86
|
+
soft: '#465467',
|
|
87
|
+
muted: '#798596',
|
|
88
|
+
line: '#dde6f1',
|
|
89
|
+
surface: '#fbfcff',
|
|
90
|
+
paper: '#eef4fb',
|
|
91
|
+
accent: '#1f63c9',
|
|
92
|
+
accentBg: '#d2e3f8',
|
|
93
|
+
accentText: '#1a528f',
|
|
75
94
|
},
|
|
76
95
|
dark: {
|
|
77
|
-
ink:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
paper:
|
|
96
|
+
ink: neutral[50],
|
|
97
|
+
soft: neutral[400],
|
|
98
|
+
muted: neutral[400],
|
|
99
|
+
line: neutral[850],
|
|
100
|
+
surface: neutral[850],
|
|
101
|
+
paper: neutral[900],
|
|
102
|
+
accent: neutral[300],
|
|
103
|
+
accentBg: neutral[850],
|
|
104
|
+
accentText: neutral[50],
|
|
83
105
|
},
|
|
84
106
|
},
|
|
85
107
|
{
|
|
86
108
|
id: 'forest',
|
|
87
109
|
label: 'Forest',
|
|
88
110
|
light: {
|
|
89
|
-
ink: '#
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
paper: '#
|
|
111
|
+
ink: '#122618',
|
|
112
|
+
soft: '#425046',
|
|
113
|
+
muted: '#75897a',
|
|
114
|
+
line: '#dae8dd',
|
|
115
|
+
surface: '#f9fcf8',
|
|
116
|
+
paper: '#ecf4ed',
|
|
117
|
+
accent: '#107a43',
|
|
118
|
+
accentBg: '#cce8d2',
|
|
119
|
+
accentText: '#0e5532',
|
|
95
120
|
},
|
|
96
121
|
dark: {
|
|
97
|
-
ink:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
paper:
|
|
122
|
+
ink: neutral[50],
|
|
123
|
+
soft: neutral[400],
|
|
124
|
+
muted: neutral[400],
|
|
125
|
+
line: neutral[850],
|
|
126
|
+
surface: neutral[850],
|
|
127
|
+
paper: neutral[900],
|
|
128
|
+
accent: '#58bd80',
|
|
129
|
+
accentBg: neutral[850],
|
|
130
|
+
accentText: neutral[50],
|
|
103
131
|
},
|
|
104
132
|
},
|
|
105
133
|
{
|
|
106
134
|
id: 'plum',
|
|
107
135
|
label: 'Plum',
|
|
108
136
|
light: {
|
|
109
|
-
ink: '#
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
paper: '#
|
|
137
|
+
ink: '#261426',
|
|
138
|
+
soft: '#554656',
|
|
139
|
+
muted: '#8b7d90',
|
|
140
|
+
line: '#e6dbeb',
|
|
141
|
+
surface: '#fdfafd',
|
|
142
|
+
paper: '#f3ecf6',
|
|
143
|
+
accent: '#8a2ba6',
|
|
144
|
+
accentBg: '#e9d0f3',
|
|
145
|
+
accentText: '#622970',
|
|
115
146
|
},
|
|
116
147
|
dark: {
|
|
117
|
-
ink:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
paper:
|
|
148
|
+
ink: neutral[50],
|
|
149
|
+
soft: neutral[400],
|
|
150
|
+
muted: neutral[400],
|
|
151
|
+
line: neutral[850],
|
|
152
|
+
surface: neutral[825],
|
|
153
|
+
paper: neutral[875],
|
|
154
|
+
accent: neutral[300],
|
|
155
|
+
accentBg: neutral[850],
|
|
156
|
+
accentText: neutral[50],
|
|
123
157
|
},
|
|
124
158
|
},
|
|
125
159
|
]
|
|
@@ -141,7 +175,7 @@ export function surfacePaletteRolesForMode(
|
|
|
141
175
|
/** Swatch dots for the palette dropdown trigger. */
|
|
142
176
|
export function surfacePaletteSwatches(palette: SurfacePalette): string[] {
|
|
143
177
|
const roles = palette.light
|
|
144
|
-
return [roles.ink, roles.accent, roles.
|
|
178
|
+
return [roles.ink, roles.accent, roles.surface, roles.paper]
|
|
145
179
|
}
|
|
146
180
|
|
|
147
181
|
/** Overlay a surface palette onto the platform theme (light and dark). */
|
|
@@ -157,23 +191,30 @@ export function applySurfacePaletteToTheme(
|
|
|
157
191
|
...theme,
|
|
158
192
|
colors: {
|
|
159
193
|
...theme.colors,
|
|
160
|
-
bg: roles.
|
|
161
|
-
surface: roles.
|
|
162
|
-
surfaceHover: roles.
|
|
163
|
-
surfaceActive: roles.
|
|
164
|
-
elevated: roles.
|
|
165
|
-
appViewport: roles.
|
|
194
|
+
bg: roles.paper,
|
|
195
|
+
surface: roles.surface,
|
|
196
|
+
surfaceHover: roles.surface,
|
|
197
|
+
surfaceActive: roles.paper,
|
|
198
|
+
elevated: roles.surface,
|
|
199
|
+
appViewport: roles.paper,
|
|
166
200
|
text: roles.ink,
|
|
167
|
-
textSecondary: roles.
|
|
168
|
-
textDisabled: roles.
|
|
169
|
-
textInverse:
|
|
201
|
+
textSecondary: roles.soft,
|
|
202
|
+
textDisabled: roles.muted,
|
|
203
|
+
textInverse:
|
|
204
|
+
theme.mode === 'dark' ? roles.paper : theme.colors.textInverse,
|
|
170
205
|
accent: roles.accent,
|
|
171
206
|
accentHover: roles.ink,
|
|
172
|
-
accentMuted: roles.
|
|
173
|
-
border:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
207
|
+
accentMuted: roles.accentBg,
|
|
208
|
+
border: roles.line,
|
|
209
|
+
borderStrong: roles.soft,
|
|
210
|
+
divider: roles.line,
|
|
211
|
+
focus: roles.accent,
|
|
212
|
+
semanticGreen: roles.accent,
|
|
213
|
+
semanticGreenText: roles.accentText,
|
|
214
|
+
semanticGreenMuted: roles.accentBg,
|
|
215
|
+
semanticGreenBorder: roles.accent,
|
|
216
|
+
chromeTitlebar: roles.paper,
|
|
217
|
+
chromeTabStrip: roles.paper,
|
|
177
218
|
},
|
|
178
219
|
}
|
|
179
220
|
}
|