proto-plugin 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +350 -0
- package/README.md +279 -0
- package/components.json +18 -0
- package/package.json +73 -0
- package/scripts/download-mobbin-reference-images.mjs +112 -0
- package/scripts/lib/host-config.example.sh +48 -0
- package/scripts/lib/host-config.sh +25 -0
- package/scripts/lib/resolve-host-root.mjs +18 -0
- package/scripts/lib/source-path.sh +49 -0
- package/scripts/link-source-db.sh +128 -0
- package/scripts/link-source.sh +40 -0
- package/scripts/publish-package.sh +147 -0
- package/scripts/share-prototype.sh +279 -0
- package/scripts/sync-from-source.sh +74 -0
- package/scripts/verify-prototype-component-ids.mjs +151 -0
- package/scripts/verify-prototype-preview-states.mjs +135 -0
- package/src/app.ts +4 -0
- package/src/components/platform-ui/code-block.tsx +21 -0
- package/src/components/platform-ui/controls-panel-options.tsx +71 -0
- package/src/components/platform-ui/controls-panel-select.tsx +438 -0
- package/src/components/platform-ui/empty-state.tsx +15 -0
- package/src/components/platform-ui/icon-button.tsx +18 -0
- package/src/components/platform-ui/panel-select.tsx +123 -0
- package/src/components/platform-ui/panel.tsx +97 -0
- package/src/components/platform-ui/review-dropdown-menu.tsx +35 -0
- package/src/components/platform-ui/sidebar.tsx +293 -0
- package/src/components/platform-ui/toolbar-icon-button.tsx +34 -0
- package/src/components/platform-ui/toolbar.tsx +37 -0
- package/src/components/prototype-gallery-client.tsx +57 -0
- package/src/components/prototype-provider.tsx +20 -0
- package/src/components/prototypes/mini-pill-label.tsx +37 -0
- package/src/components/prototypes/prototype-change-log-panel.tsx +207 -0
- package/src/components/prototypes/prototype-comment-provider.tsx +61 -0
- package/src/components/prototypes/prototype-comment-toolbar.tsx +65 -0
- package/src/components/prototypes/prototype-control.tsx +31 -0
- package/src/components/prototypes/prototype-controls.tsx +553 -0
- package/src/components/prototypes/prototype-create-exploration-modal.tsx +117 -0
- package/src/components/prototypes/prototype-create-state-modal.tsx +117 -0
- package/src/components/prototypes/prototype-default-state-map-page.tsx +66 -0
- package/src/components/prototypes/prototype-design-brief-modal.tsx +128 -0
- package/src/components/prototypes/prototype-design-brief-panel.tsx +525 -0
- package/src/components/prototypes/prototype-design-context-panel.tsx +65 -0
- package/src/components/prototypes/prototype-floating-pill.module.scss +1341 -0
- package/src/components/prototypes/prototype-mobbin-gallery.tsx +330 -0
- package/src/components/prototypes/prototype-reference-docs.tsx +222 -0
- package/src/components/prototypes/prototype-review-chrome.module.scss +630 -0
- package/src/components/prototypes/prototype-review-chrome.tsx +1241 -0
- package/src/components/prototypes/prototype-review-dropdown-menu-item.tsx +1 -0
- package/src/components/prototypes/prototype-review-dropdown-menu-separator.tsx +1 -0
- package/src/components/prototypes/prototype-review-panel-menu-item.tsx +1 -0
- package/src/components/prototypes/prototype-review-panel-menu-separator.tsx +1 -0
- package/src/components/prototypes/prototype-review-panel-select.tsx +4 -0
- package/src/components/prototypes/prototype-review-sidebar.tsx +167 -0
- package/src/components/prototypes/prototype-share-link-restore.tsx +75 -0
- package/src/components/prototypes/prototype-share-mode.tsx +206 -0
- package/src/components/prototypes/prototype-spec-panel-content.tsx +538 -0
- package/src/components/prototypes/prototype-state-canvas-overlay.module.scss +336 -0
- package/src/components/prototypes/prototype-state-canvas-overlay.tsx +1023 -0
- package/src/components/prototypes/prototype-state-canvas.tsx +38 -0
- package/src/components/prototypes/prototype-state-screenshot-preview.tsx +47 -0
- package/src/components/prototypes/prototype-target.tsx +120 -0
- package/src/components/prototypes/prototype-tweak-highlight.tsx +132 -0
- package/src/components/prototypes/prototype-tweaks.tsx +48 -0
- package/src/components/prototypes/prototype-variant-explorer.tsx +347 -0
- package/src/components/prototypes/prototype-variant-rationale-panel.tsx +49 -0
- package/src/components/prototypes/prototype-variant-tabs.tsx +207 -0
- package/src/components/prototypes/prototype-vercel-preview-modal.tsx +120 -0
- package/src/components/prototypes/state-map-annotation-tooltip.module.scss +89 -0
- package/src/components/prototypes/state-map-annotation-tooltip.tsx +137 -0
- package/src/components/prototypes/state-map-wireframe-highlight.module.scss +25 -0
- package/src/components/prototypes/state-map-wireframe-highlight.tsx +82 -0
- package/src/components/shell/prototype-gallery-shell.tsx +79 -0
- package/src/components/shell/prototype-screenshot-capture.tsx +45 -0
- package/src/components/shell/prototype-shell.module.scss +194 -0
- package/src/components/shell/prototype-shell.tsx +160 -0
- package/src/components/shell/prototype-state-screenshot-capture.tsx +68 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/dialog.module.scss +81 -0
- package/src/components/ui/dialog.tsx +127 -0
- package/src/components/ui/dropdown-menu.tsx +200 -0
- package/src/components/ui/input.tsx +22 -0
- package/src/components/ui/label.tsx +26 -0
- package/src/components/ui/option-select.tsx +81 -0
- package/src/components/ui/scroll-area.tsx +48 -0
- package/src/components/ui/separator.tsx +31 -0
- package/src/components/ui/slider.tsx +28 -0
- package/src/components/ui/switch.tsx +29 -0
- package/src/components/ui/tabs.tsx +55 -0
- package/src/components/ui/toggle-group.tsx +80 -0
- package/src/components/ui/tooltip.tsx +32 -0
- package/src/config/create-prototype-gallery-page.tsx +65 -0
- package/src/config/create-prototype-host-app.tsx +121 -0
- package/src/config/create-prototype-page.tsx +41 -0
- package/src/config/create-prototype-site-layout.tsx +28 -0
- package/src/config/define-prototype-config.ts +7 -0
- package/src/config/prototype-icon.tsx +25 -0
- package/src/config/prototype-site-layout-client.tsx +35 -0
- package/src/config/with-prototype.ts +20 -0
- package/src/index.ts +303 -0
- package/src/lib/pr-split/build-pr-agent-prompt.ts +68 -0
- package/src/lib/pr-split/build-pr-split-prototype-url.ts +12 -0
- package/src/lib/pr-split/pr-split-highlight.ts +6 -0
- package/src/lib/pr-split/pr-split-types.ts +58 -0
- package/src/lib/pr-split/resolve-source-preview-url.ts +45 -0
- package/src/lib/pr-split/use-pr-vercel-previews.ts +69 -0
- package/src/lib/prototype-comments/core/annotation-channel.ts +41 -0
- package/src/lib/prototype-comments/core/annotation-status.ts +60 -0
- package/src/lib/prototype-comments/core/annotation-target.ts +567 -0
- package/src/lib/prototype-comments/core/capture-theme.ts +41 -0
- package/src/lib/prototype-comments/core/capture.ts +11 -0
- package/src/lib/prototype-comments/core/comment-capture-blocked.ts +47 -0
- package/src/lib/prototype-comments/core/comment-threads.ts +52 -0
- package/src/lib/prototype-comments/core/element-identification.ts +615 -0
- package/src/lib/prototype-comments/core/export.ts +35 -0
- package/src/lib/prototype-comments/core/freeze-animations.ts +266 -0
- package/src/lib/prototype-comments/core/identify-element.ts +76 -0
- package/src/lib/prototype-comments/core/normalize-viewport.ts +35 -0
- package/src/lib/prototype-comments/core/react-detection.ts +704 -0
- package/src/lib/prototype-comments/core/restore.ts +7 -0
- package/src/lib/prototype-comments/core/screenshot.ts +428 -0
- package/src/lib/prototype-comments/core/source-location.ts +906 -0
- package/src/lib/prototype-comments/core/storage.ts +80 -0
- package/src/lib/prototype-comments/core/types.ts +79 -0
- package/src/lib/prototype-comments/core/validation.ts +17 -0
- package/src/lib/prototype-comments/hooks/useLayoutShift.ts +61 -0
- package/src/lib/prototype-comments/index.ts +58 -0
- package/src/lib/prototype-comments/react/CommentCaptureToolbar.tsx +1398 -0
- package/src/lib/prototype-comments/react/CommentProvider.tsx +298 -0
- package/src/lib/prototype-comments/scss.d.ts +10 -0
- package/src/lib/prototype-comments/ui/CommentAnnotationOverlay.tsx +253 -0
- package/src/lib/prototype-comments/ui/CommentDetailPage.tsx +56 -0
- package/src/lib/prototype-comments/ui/CommentHeaderCount.tsx +28 -0
- package/src/lib/prototype-comments/ui/CommentThread.tsx +331 -0
- package/src/lib/prototype-comments/ui/CommentsGrid.tsx +780 -0
- package/src/lib/prototype-comments/ui/CommentsListPage.tsx +25 -0
- package/src/lib/prototype-comments/ui/CommentsSidebar.tsx +77 -0
- package/src/lib/prototype-comments/ui/annotation-marker/index.tsx +200 -0
- package/src/lib/prototype-comments/ui/annotation-marker/styles.module.scss +194 -0
- package/src/lib/prototype-comments/ui/annotation-popup/index.tsx +335 -0
- package/src/lib/prototype-comments/ui/annotation-popup/styles.module.scss +469 -0
- package/src/lib/prototype-comments/ui/capture-styles.module.scss +2225 -0
- package/src/lib/prototype-comments/ui/comment-highlight.ts +48 -0
- package/src/lib/prototype-comments/ui/comment-thread.module.scss +203 -0
- package/src/lib/prototype-comments/ui/comments-grid-card.module.scss +253 -0
- package/src/lib/prototype-comments/ui/comments-sidebar.module.scss +123 -0
- package/src/lib/prototype-comments/ui/icon-transitions.module.scss +51 -0
- package/src/lib/prototype-comments/ui/icons.tsx +1086 -0
- package/src/lib/prototype-comments/ui/is-comment-detail-path.ts +7 -0
- package/src/lib/prototypes/capture-prototype-viewport.ts +32 -0
- package/src/lib/prototypes/changelog-meta-context.tsx +162 -0
- package/src/lib/prototypes/changelog-meta-storage.ts +62 -0
- package/src/lib/prototypes/changelog-meta.ts +95 -0
- package/src/lib/prototypes/create-prototype-registry.ts +74 -0
- package/src/lib/prototypes/create-state-screenshot-thumbnail.ts +46 -0
- package/src/lib/prototypes/design-exploration-default-storage.ts +68 -0
- package/src/lib/prototypes/design-exploration-default.ts +51 -0
- package/src/lib/prototypes/design-exploration-types.ts +203 -0
- package/src/lib/prototypes/prototype-comment-registry.tsx +145 -0
- package/src/lib/prototypes/prototype-comment-review-bridge.tsx +40 -0
- package/src/lib/prototypes/prototype-comment-review-state.ts +57 -0
- package/src/lib/prototypes/prototype-component-registry.ts +40 -0
- package/src/lib/prototypes/prototype-config-types.ts +34 -0
- package/src/lib/prototypes/prototype-preview-state-registry.ts +443 -0
- package/src/lib/prototypes/prototype-preview-state-types.ts +89 -0
- package/src/lib/prototypes/prototype-review-context.tsx +905 -0
- package/src/lib/prototypes/prototype-review-url.ts +134 -0
- package/src/lib/prototypes/prototype-share-link.ts +175 -0
- package/src/lib/prototypes/prototype-state-canvas-constants.ts +118 -0
- package/src/lib/prototypes/prototype-state-canvas-types.ts +159 -0
- package/src/lib/prototypes/prototype-state-screenshot.ts +39 -0
- package/src/lib/prototypes/prototype-tweak-registry.ts +96 -0
- package/src/lib/prototypes/prototype-tweak-types.ts +31 -0
- package/src/lib/prototypes/reference-docs.ts +137 -0
- package/src/lib/prototypes/screenshot-manifest.ts +33 -0
- package/src/lib/prototypes/screenshot-src.ts +7 -0
- package/src/lib/prototypes/share-command.ts +8 -0
- package/src/lib/prototypes/state-map-annotation.ts +70 -0
- package/src/lib/prototypes/use-design-exploration-default.ts +114 -0
- package/src/lib/prototypes/use-persisted-local-state.ts +140 -0
- package/src/lib/prototypes/use-prototype-comments.ts +63 -0
- package/src/lib/prototypes/use-prototype-mobile-viewport-frame.ts +46 -0
- package/src/lib/prototypes/use-prototype-state-screenshot-src.ts +71 -0
- package/src/lib/prototypes/use-prototype-tool-theme.tsx +115 -0
- package/src/lib/prototypes/use-prototype-viewport-frame.ts +34 -0
- package/src/lib/prototypes/use-register-prototype-reference-docs.ts +16 -0
- package/src/lib/prototypes/use-snap-corner-position.ts +417 -0
- package/src/lib/prototypes/use-toolbar-hover-panel.ts +98 -0
- package/src/lib/prototypes/variant-set-lucide-icon.tsx +55 -0
- package/src/lib/tool-portal.ts +33 -0
- package/src/lib/use-copy-to-clipboard.ts +81 -0
- package/src/lib/utils.ts +6 -0
- package/src/lib/vercel-preview/parse-vercel-github-comment.ts +81 -0
- package/src/server/create-host-api-route.ts +100 -0
- package/src/server/create-prototype-api-routes.ts +428 -0
- package/src/server/gallery/create-gallery-api.ts +56 -0
- package/src/server/gallery/folders-route.ts +156 -0
- package/src/server/gallery/gallery-env.ts +39 -0
- package/src/server/gallery/gallery-route.ts +150 -0
- package/src/server/gallery/gallery-types.ts +15 -0
- package/src/server/gallery/image-route.ts +59 -0
- package/src/server/gallery/item-route.ts +92 -0
- package/src/server/pr-vercel-preview-route.ts +162 -0
- package/src/server/redis/client.ts +55 -0
- package/src/server/redis/prototype-changelog-meta.ts +31 -0
- package/src/server/redis/prototype-comments.ts +92 -0
- package/src/server/redis/prototype-design-exploration-default.ts +32 -0
- package/src/server.ts +51 -0
- package/src/styles/globals.css +624 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
$morph-ease: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
2
|
+
$morph-duration: 0.25s;
|
|
3
|
+
|
|
4
|
+
.footerRoot {
|
|
5
|
+
width: 100%;
|
|
6
|
+
user-select: none;
|
|
7
|
+
background: var(--bg-ground);
|
|
8
|
+
|
|
9
|
+
::selection {
|
|
10
|
+
background: rgba(255, 255, 255, 0.12);
|
|
11
|
+
color: #e0e0e0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.footerBar {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
gap: 0.75rem;
|
|
20
|
+
min-height: 3rem;
|
|
21
|
+
padding: 0.375rem 0.75rem;
|
|
22
|
+
background: var(--bg-ground);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.footerGroup {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 0.25rem;
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.footerBarControls {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.root {
|
|
39
|
+
--review-morph-duration: #{$morph-duration};
|
|
40
|
+
--review-morph-ease: #{$morph-ease};
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
position: absolute;
|
|
43
|
+
z-index: 1050;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
// Keep the positioning shell transparent so only the rounded morphToolbar pill shows.
|
|
47
|
+
&[data-prototype-root] {
|
|
48
|
+
background: transparent;
|
|
49
|
+
}
|
|
50
|
+
user-select: none;
|
|
51
|
+
|
|
52
|
+
::selection {
|
|
53
|
+
background: rgba(255, 255, 255, 0.12);
|
|
54
|
+
color: #e0e0e0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.cornerBottomRight {
|
|
58
|
+
right: 1rem;
|
|
59
|
+
bottom: 1rem;
|
|
60
|
+
align-items: flex-end;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.cornerBottomLeft {
|
|
64
|
+
left: 1rem;
|
|
65
|
+
bottom: 1rem;
|
|
66
|
+
align-items: flex-start;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&.cornerTopRight {
|
|
70
|
+
right: 1rem;
|
|
71
|
+
top: 1rem;
|
|
72
|
+
align-items: flex-end;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.cornerTopLeft {
|
|
76
|
+
left: 1rem;
|
|
77
|
+
top: 1rem;
|
|
78
|
+
align-items: flex-start;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.cornerTopCenter {
|
|
82
|
+
left: 50%;
|
|
83
|
+
top: 1rem;
|
|
84
|
+
transform: translateX(-50%);
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.cornerBottomCenter {
|
|
89
|
+
left: 50%;
|
|
90
|
+
bottom: 1rem;
|
|
91
|
+
transform: translateX(-50%);
|
|
92
|
+
align-items: center;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&.cornerLeftCenter {
|
|
96
|
+
left: 1rem;
|
|
97
|
+
top: 50%;
|
|
98
|
+
transform: translateY(-50%);
|
|
99
|
+
align-items: flex-start;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.cornerRightCenter {
|
|
103
|
+
right: 1rem;
|
|
104
|
+
top: 50%;
|
|
105
|
+
transform: translateY(-50%);
|
|
106
|
+
align-items: flex-end;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&.isDragging {
|
|
110
|
+
right: auto !important;
|
|
111
|
+
bottom: auto !important;
|
|
112
|
+
left: auto;
|
|
113
|
+
top: auto;
|
|
114
|
+
transform: none !important;
|
|
115
|
+
align-items: flex-start;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&.isSnapping {
|
|
119
|
+
transition:
|
|
120
|
+
left 0.25s cubic-bezier(0.215, 0.61, 0.355, 1),
|
|
121
|
+
top 0.25s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (prefers-reduced-motion: reduce) {
|
|
125
|
+
&.isSnapping {
|
|
126
|
+
transition: none;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&.cornerBottomRight,
|
|
131
|
+
&.cornerTopRight,
|
|
132
|
+
&.cornerRightCenter {
|
|
133
|
+
.morphToolbar.morphCollapsed:active {
|
|
134
|
+
transform-origin: center right;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&.cornerBottomLeft,
|
|
139
|
+
&.cornerTopLeft,
|
|
140
|
+
&.cornerLeftCenter {
|
|
141
|
+
.morphToolbar.morphCollapsed:active {
|
|
142
|
+
transform-origin: center left;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&.cornerTopCenter,
|
|
147
|
+
&.cornerBottomCenter {
|
|
148
|
+
.morphToolbar.morphCollapsed:active {
|
|
149
|
+
transform-origin: center center;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.bar {
|
|
155
|
+
pointer-events: auto;
|
|
156
|
+
touch-action: none;
|
|
157
|
+
cursor: grab;
|
|
158
|
+
background: transparent;
|
|
159
|
+
|
|
160
|
+
&.barExpanded {
|
|
161
|
+
cursor: default;
|
|
162
|
+
touch-action: auto;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&.dragging {
|
|
166
|
+
cursor: grabbing;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.barGroup {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
gap: 0.5rem;
|
|
174
|
+
flex: 0 0 auto;
|
|
175
|
+
width: auto;
|
|
176
|
+
user-select: none;
|
|
177
|
+
background: transparent;
|
|
178
|
+
|
|
179
|
+
::selection {
|
|
180
|
+
background: transparent;
|
|
181
|
+
color: inherit;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.controlPills {
|
|
186
|
+
pointer-events: auto;
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
align-items: flex-end;
|
|
190
|
+
justify-content: center;
|
|
191
|
+
flex: 0 0 auto;
|
|
192
|
+
width: auto;
|
|
193
|
+
max-width: none;
|
|
194
|
+
gap: 0.5rem;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.controlPillsRow {
|
|
198
|
+
display: inline-flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
flex: 0 0 auto;
|
|
201
|
+
width: auto;
|
|
202
|
+
max-width: none;
|
|
203
|
+
gap: 0.625rem;
|
|
204
|
+
|
|
205
|
+
> * {
|
|
206
|
+
flex: 0 0 auto;
|
|
207
|
+
width: auto;
|
|
208
|
+
max-width: none;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
[data-prototype-target] {
|
|
212
|
+
display: inline-flex;
|
|
213
|
+
width: auto;
|
|
214
|
+
max-width: none;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.floatingBarControls {
|
|
219
|
+
pointer-events: auto;
|
|
220
|
+
display: flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
flex-shrink: 0;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Portaled via @prototype/components/ui/tooltip (not clipped by morph overflow).
|
|
226
|
+
.toolbarTooltipContent {
|
|
227
|
+
border: none;
|
|
228
|
+
border-radius: 8px;
|
|
229
|
+
padding: 6px 10px;
|
|
230
|
+
font-size: 12px;
|
|
231
|
+
font-weight: 500;
|
|
232
|
+
line-height: 1.2;
|
|
233
|
+
letter-spacing: -0.01em;
|
|
234
|
+
background: #1e1e1e;
|
|
235
|
+
color: #e0e0e0;
|
|
236
|
+
box-shadow:
|
|
237
|
+
0 2px 8px rgba(0, 0, 0, 0.2),
|
|
238
|
+
0 0 0 1px #333333;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Dropdown triggers: pressed look only while the menu is open (not focus after Esc).
|
|
242
|
+
.toolbarMenuTrigger {
|
|
243
|
+
&:focus:not(:focus-visible) {
|
|
244
|
+
outline: none;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
&:focus-visible:not([data-menu-open="true"]) {
|
|
248
|
+
background: transparent;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.morphToolbar {
|
|
253
|
+
position: relative;
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
justify-content: center;
|
|
257
|
+
align-self: center;
|
|
258
|
+
overflow: hidden;
|
|
259
|
+
width: auto;
|
|
260
|
+
min-width: 44px;
|
|
261
|
+
height: 44px;
|
|
262
|
+
border: none;
|
|
263
|
+
background: #1e1e1e;
|
|
264
|
+
color: var(--tool-chrome-icon, #888888);
|
|
265
|
+
box-shadow:
|
|
266
|
+
0 2px 8px rgba(0, 0, 0, 0.2),
|
|
267
|
+
0 0 0 1px #333333;
|
|
268
|
+
pointer-events: auto;
|
|
269
|
+
user-select: none;
|
|
270
|
+
transition:
|
|
271
|
+
max-width $morph-duration $morph-ease,
|
|
272
|
+
border-radius $morph-duration $morph-ease,
|
|
273
|
+
padding $morph-duration $morph-ease,
|
|
274
|
+
background-color 150ms ease;
|
|
275
|
+
|
|
276
|
+
&.morphCollapsed {
|
|
277
|
+
max-width: 44px;
|
|
278
|
+
border-radius: 22px;
|
|
279
|
+
padding: 0;
|
|
280
|
+
cursor: pointer;
|
|
281
|
+
outline: none;
|
|
282
|
+
|
|
283
|
+
&:focus:not(:focus-visible) {
|
|
284
|
+
outline: none;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
&:focus-visible {
|
|
288
|
+
outline: none;
|
|
289
|
+
background: #252525;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@media (hover: hover) and (pointer: fine) {
|
|
293
|
+
&:hover {
|
|
294
|
+
background: #252525;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&.morphExpanded {
|
|
301
|
+
max-width: 48rem;
|
|
302
|
+
border-radius: 1.5rem;
|
|
303
|
+
padding: 0.375rem;
|
|
304
|
+
overflow: visible;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.morphInner {
|
|
309
|
+
display: flex;
|
|
310
|
+
width: max-content;
|
|
311
|
+
align-items: center;
|
|
312
|
+
gap: 0.375rem;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.morphSection {
|
|
316
|
+
display: grid;
|
|
317
|
+
min-width: 0;
|
|
318
|
+
// visibility is included so it stays visible through the close animation
|
|
319
|
+
// (CSS makes visibility:hidden wait until the end, visibility:visible fires immediately on open).
|
|
320
|
+
transition:
|
|
321
|
+
grid-template-columns $morph-duration $morph-ease,
|
|
322
|
+
opacity $morph-duration $morph-ease,
|
|
323
|
+
visibility $morph-duration;
|
|
324
|
+
|
|
325
|
+
&.sectionCollapsed {
|
|
326
|
+
grid-template-columns: 0fr;
|
|
327
|
+
overflow: hidden;
|
|
328
|
+
opacity: 0;
|
|
329
|
+
visibility: hidden;
|
|
330
|
+
pointer-events: none;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&.sectionExpanded {
|
|
334
|
+
grid-template-columns: 1fr;
|
|
335
|
+
visibility: visible;
|
|
336
|
+
overflow: visible;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.morphSectionInner {
|
|
341
|
+
display: flex;
|
|
342
|
+
min-width: 0;
|
|
343
|
+
overflow: hidden;
|
|
344
|
+
align-items: center;
|
|
345
|
+
gap: 0.375rem;
|
|
346
|
+
white-space: nowrap;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.sectionExpanded .morphSectionInner {
|
|
350
|
+
overflow: visible;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.morphCloseInner {
|
|
354
|
+
justify-content: center;
|
|
355
|
+
gap: 0.375rem;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.morphAnchor {
|
|
359
|
+
position: absolute;
|
|
360
|
+
inset: 0;
|
|
361
|
+
display: flex;
|
|
362
|
+
align-items: center;
|
|
363
|
+
justify-content: center;
|
|
364
|
+
pointer-events: none;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
@media (prefers-reduced-motion: reduce) {
|
|
368
|
+
.morphToolbar,
|
|
369
|
+
.morphSection {
|
|
370
|
+
transition: none;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.toolbarButtonHovered {
|
|
375
|
+
background: #252525;
|
|
376
|
+
color: var(--tool-chrome-icon-hover, #a3a3a3);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.panel {
|
|
380
|
+
pointer-events: auto;
|
|
381
|
+
width: 18rem;
|
|
382
|
+
margin-bottom: 0.5rem;
|
|
383
|
+
padding: 0.5rem 0.625rem 0.625rem;
|
|
384
|
+
border-radius: 1rem;
|
|
385
|
+
background: #1e1e1e;
|
|
386
|
+
color: #e0e0e0;
|
|
387
|
+
user-select: text;
|
|
388
|
+
box-shadow:
|
|
389
|
+
0 4px 20px rgba(0, 0, 0, 0.24),
|
|
390
|
+
0 0 0 1px #333333;
|
|
391
|
+
|
|
392
|
+
// Let nested prototype controls inherit a dark surface.
|
|
393
|
+
--bg-main: #1e1e1e;
|
|
394
|
+
--bg-top: #252525;
|
|
395
|
+
--bg-subtle: #181818;
|
|
396
|
+
--bg-layered: #252525;
|
|
397
|
+
--text-primary: #e0e0e0;
|
|
398
|
+
--text-secondary: #888888;
|
|
399
|
+
--text-tertiary: #666666;
|
|
400
|
+
--border-solid: #333333;
|
|
401
|
+
--border-faint: #2a2a2a;
|
|
402
|
+
--border-medium: #404040;
|
|
403
|
+
--color-active: var(--prototype-comment-color-blue);
|
|
404
|
+
--accent: var(--prototype-comment-color-blue);
|
|
405
|
+
--accent-foreground: #fff;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.panelHeader {
|
|
409
|
+
display: flex;
|
|
410
|
+
align-items: center;
|
|
411
|
+
justify-content: space-between;
|
|
412
|
+
gap: 0.75rem;
|
|
413
|
+
margin-bottom: 0.5rem;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.panelTitle {
|
|
417
|
+
font-size: 0.8125rem;
|
|
418
|
+
font-weight: 600;
|
|
419
|
+
letter-spacing: -0.01em;
|
|
420
|
+
color: rgba(255, 255, 255, 0.92);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.panelHeaderActions {
|
|
424
|
+
display: flex;
|
|
425
|
+
align-items: center;
|
|
426
|
+
gap: 0.125rem;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.panelContent {
|
|
430
|
+
display: flex;
|
|
431
|
+
flex-direction: column;
|
|
432
|
+
gap: 1rem;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.panelSectionLabel {
|
|
436
|
+
font-size: 0.6875rem;
|
|
437
|
+
font-weight: 500;
|
|
438
|
+
letter-spacing: 0.04em;
|
|
439
|
+
text-transform: uppercase;
|
|
440
|
+
color: rgba(255, 255, 255, 0.45);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.panelSection {
|
|
444
|
+
display: flex;
|
|
445
|
+
flex-direction: column;
|
|
446
|
+
align-items: flex-start;
|
|
447
|
+
gap: 0.5rem;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.panelTweakButton {
|
|
451
|
+
display: inline-flex;
|
|
452
|
+
align-items: center;
|
|
453
|
+
gap: 0.375rem;
|
|
454
|
+
padding: 0.4375rem 0.75rem;
|
|
455
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
456
|
+
border-radius: 0.5rem;
|
|
457
|
+
background: rgba(255, 255, 255, 0.06);
|
|
458
|
+
color: rgba(255, 255, 255, 0.88);
|
|
459
|
+
font-size: 0.8125rem;
|
|
460
|
+
font-weight: 500;
|
|
461
|
+
cursor: pointer;
|
|
462
|
+
transition:
|
|
463
|
+
background-color 0.15s ease,
|
|
464
|
+
border-color 0.15s ease,
|
|
465
|
+
color 0.15s ease;
|
|
466
|
+
|
|
467
|
+
@media (hover: hover) and (pointer: fine) {
|
|
468
|
+
&:hover {
|
|
469
|
+
background: rgba(255, 255, 255, 0.1);
|
|
470
|
+
border-color: rgba(255, 255, 255, 0.16);
|
|
471
|
+
color: #fff;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.panelTweakButtonIcon {
|
|
477
|
+
color: var(--tool-chrome-icon, #888888);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.panelIconButton {
|
|
481
|
+
display: flex;
|
|
482
|
+
align-items: center;
|
|
483
|
+
justify-content: center;
|
|
484
|
+
width: 1.75rem;
|
|
485
|
+
height: 1.75rem;
|
|
486
|
+
border: none;
|
|
487
|
+
border-radius: 0.375rem;
|
|
488
|
+
background: transparent;
|
|
489
|
+
color: var(--tool-chrome-icon, #888888);
|
|
490
|
+
cursor: pointer;
|
|
491
|
+
outline: none;
|
|
492
|
+
box-shadow: none;
|
|
493
|
+
-webkit-tap-highlight-color: transparent;
|
|
494
|
+
transition:
|
|
495
|
+
background-color 0.15s ease,
|
|
496
|
+
color 0.15s ease;
|
|
497
|
+
|
|
498
|
+
&:focus:not(:focus-visible) {
|
|
499
|
+
outline: none;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
&:focus-visible {
|
|
503
|
+
outline: none;
|
|
504
|
+
background: rgba(255, 255, 255, 0.08);
|
|
505
|
+
color: var(--tool-chrome-icon-hover, #a3a3a3);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
@media (hover: hover) and (pointer: fine) {
|
|
509
|
+
&:hover {
|
|
510
|
+
background: rgba(255, 255, 255, 0.08);
|
|
511
|
+
color: var(--tool-chrome-icon-hover, #a3a3a3);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
// Light mode — keep in sync with capture-styles.module.scss [data-prototype-comment-theme="light"].
|
|
517
|
+
.root[data-prototype-comment-theme="light"],
|
|
518
|
+
.footerRoot[data-prototype-comment-theme="light"] {
|
|
519
|
+
::selection {
|
|
520
|
+
background: rgba(0, 0, 0, 0.08);
|
|
521
|
+
color: rgba(0, 0, 0, 0.92);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.morphToolbar {
|
|
525
|
+
background: #fff;
|
|
526
|
+
color: rgba(0, 0, 0, 0.85);
|
|
527
|
+
box-shadow:
|
|
528
|
+
0 2px 8px rgba(0, 0, 0, 0.08),
|
|
529
|
+
0 4px 16px rgba(0, 0, 0, 0.06),
|
|
530
|
+
0 0 0 1px rgba(0, 0, 0, 0.04);
|
|
531
|
+
|
|
532
|
+
&.morphCollapsed {
|
|
533
|
+
&:focus-visible {
|
|
534
|
+
background: #f5f5f5;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
@media (hover: hover) and (pointer: fine) {
|
|
538
|
+
&:hover {
|
|
539
|
+
background: #f5f5f5;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.toolbarButtonHovered {
|
|
546
|
+
background: rgba(0, 0, 0, 0.06);
|
|
547
|
+
color: rgba(0, 0, 0, 0.85);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.toolbarMenuTrigger {
|
|
551
|
+
&:focus-visible:not([data-menu-open="true"]) {
|
|
552
|
+
background: transparent;
|
|
553
|
+
color: rgba(0, 0, 0, 0.5);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.panel {
|
|
558
|
+
background: #fff;
|
|
559
|
+
color: rgba(0, 0, 0, 0.88);
|
|
560
|
+
box-shadow:
|
|
561
|
+
0 4px 20px rgba(0, 0, 0, 0.1),
|
|
562
|
+
0 8px 32px rgba(0, 0, 0, 0.06),
|
|
563
|
+
0 0 0 1px rgba(0, 0, 0, 0.04);
|
|
564
|
+
|
|
565
|
+
--bg-main: #fff;
|
|
566
|
+
--bg-top: #fafafa;
|
|
567
|
+
--bg-subtle: #f5f5f5;
|
|
568
|
+
--bg-layered: #f0f0f0;
|
|
569
|
+
--text-primary: rgba(0, 0, 0, 0.92);
|
|
570
|
+
--text-secondary: rgba(0, 0, 0, 0.68);
|
|
571
|
+
--text-tertiary: rgba(0, 0, 0, 0.45);
|
|
572
|
+
--border-solid: rgba(0, 0, 0, 0.1);
|
|
573
|
+
--border-faint: rgba(0, 0, 0, 0.06);
|
|
574
|
+
--border-medium: rgba(0, 0, 0, 0.16);
|
|
575
|
+
--accent-foreground: rgba(0, 0, 0, 0.92);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.panelTitle {
|
|
579
|
+
color: rgba(0, 0, 0, 0.92);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.panelSectionLabel {
|
|
583
|
+
color: rgba(0, 0, 0, 0.45);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.panelTweakButton {
|
|
587
|
+
border-color: rgba(0, 0, 0, 0.1);
|
|
588
|
+
background: rgba(0, 0, 0, 0.04);
|
|
589
|
+
color: rgba(0, 0, 0, 0.88);
|
|
590
|
+
|
|
591
|
+
@media (hover: hover) and (pointer: fine) {
|
|
592
|
+
&:hover {
|
|
593
|
+
background: rgba(0, 0, 0, 0.06);
|
|
594
|
+
border-color: rgba(0, 0, 0, 0.14);
|
|
595
|
+
color: rgba(0, 0, 0, 0.92);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.panelTweakButtonIcon {
|
|
601
|
+
color: rgba(0, 0, 0, 0.45);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.panelIconButton {
|
|
605
|
+
color: rgba(0, 0, 0, 0.55);
|
|
606
|
+
|
|
607
|
+
&:focus-visible {
|
|
608
|
+
background: rgba(0, 0, 0, 0.06);
|
|
609
|
+
color: rgba(0, 0, 0, 0.92);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
@media (hover: hover) and (pointer: fine) {
|
|
613
|
+
&:hover {
|
|
614
|
+
background: rgba(0, 0, 0, 0.06);
|
|
615
|
+
color: rgba(0, 0, 0, 0.92);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
// Portaled into [data-prototype-root], not the footer chrome node.
|
|
622
|
+
:global([data-prototype-root][data-prototype-comment-theme="light"]) {
|
|
623
|
+
.toolbarTooltipContent {
|
|
624
|
+
background: #fff;
|
|
625
|
+
color: rgba(0, 0, 0, 0.88);
|
|
626
|
+
box-shadow:
|
|
627
|
+
0 2px 8px rgba(0, 0, 0, 0.08),
|
|
628
|
+
0 0 0 1px rgba(0, 0, 0, 0.1);
|
|
629
|
+
}
|
|
630
|
+
}
|