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,469 @@
|
|
|
1
|
+
// Annotation Popup - CSS-only version (no framer-motion)
|
|
2
|
+
// Uses CSS animations for all transitions
|
|
3
|
+
|
|
4
|
+
// Protect stroke-based icons from host page `svg { fill: currentColor }` rules.
|
|
5
|
+
// Scoped to prototype comment system's own containers to avoid breaking host SVGs that use
|
|
6
|
+
// fill="none" with CSS-based fills (e.g. Tailwind's fill-current).
|
|
7
|
+
// See: https://github.com/prototype-comments/issues/58
|
|
8
|
+
.popup {
|
|
9
|
+
svg[fill="none"] {
|
|
10
|
+
fill: none !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
svg[fill="none"] :not([fill]) {
|
|
14
|
+
fill: none !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// =============================================================================
|
|
19
|
+
// Animation Keyframes
|
|
20
|
+
// =============================================================================
|
|
21
|
+
|
|
22
|
+
@keyframes popupEnter {
|
|
23
|
+
from {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
transform: translateX(-50%) translateY(4px);
|
|
26
|
+
}
|
|
27
|
+
to {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
transform: translateX(-50%) translateY(0);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes popupExit {
|
|
34
|
+
from {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
transform: translateX(-50%) translateY(0);
|
|
37
|
+
}
|
|
38
|
+
to {
|
|
39
|
+
opacity: 0;
|
|
40
|
+
transform: translateX(-50%) translateY(4px);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes shake {
|
|
45
|
+
0%,
|
|
46
|
+
100% {
|
|
47
|
+
transform: translateX(-50%) scale(1) translateY(0) translateX(0);
|
|
48
|
+
}
|
|
49
|
+
20% {
|
|
50
|
+
transform: translateX(-50%) scale(1) translateY(0) translateX(-3px);
|
|
51
|
+
}
|
|
52
|
+
40% {
|
|
53
|
+
transform: translateX(-50%) scale(1) translateY(0) translateX(3px);
|
|
54
|
+
}
|
|
55
|
+
60% {
|
|
56
|
+
transform: translateX(-50%) scale(1) translateY(0) translateX(-2px);
|
|
57
|
+
}
|
|
58
|
+
80% {
|
|
59
|
+
transform: translateX(-50%) scale(1) translateY(0) translateX(2px);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// =============================================================================
|
|
64
|
+
// Popup Container
|
|
65
|
+
// =============================================================================
|
|
66
|
+
|
|
67
|
+
.popup {
|
|
68
|
+
position: fixed;
|
|
69
|
+
transform: translateX(-50%);
|
|
70
|
+
width: 280px;
|
|
71
|
+
padding: 0.75rem 1rem 14px;
|
|
72
|
+
background: #1e1e1e;
|
|
73
|
+
border-radius: 16px;
|
|
74
|
+
box-shadow:
|
|
75
|
+
0 4px 20px rgba(0, 0, 0, 0.35),
|
|
76
|
+
0 8px 32px rgba(0, 0, 0, 0.18),
|
|
77
|
+
0 0 0 1px #333333;
|
|
78
|
+
z-index: 100001;
|
|
79
|
+
font-family:
|
|
80
|
+
var(--tool-font-body, "DM Sans", ui-sans-serif, system-ui, sans-serif);
|
|
81
|
+
will-change: transform, opacity;
|
|
82
|
+
|
|
83
|
+
// Initial state (before animation)
|
|
84
|
+
opacity: 0;
|
|
85
|
+
|
|
86
|
+
&.enter {
|
|
87
|
+
animation: popupEnter 0.15s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// After enter animation completes, set stable state
|
|
91
|
+
&.entered {
|
|
92
|
+
opacity: 1;
|
|
93
|
+
transform: translateX(-50%) scale(1) translateY(0);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.exit {
|
|
97
|
+
animation: popupExit 0.15s ease-in forwards;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Shake needs entered state to be stable first
|
|
101
|
+
&.entered.shake {
|
|
102
|
+
animation: shake 0.25s ease-out;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// =============================================================================
|
|
107
|
+
// Header
|
|
108
|
+
// =============================================================================
|
|
109
|
+
|
|
110
|
+
.header {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
margin-bottom: 0.5625rem;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.element {
|
|
118
|
+
font-size: 0.75rem;
|
|
119
|
+
font-weight: 400;
|
|
120
|
+
color: rgba(255, 255, 255, 0.5);
|
|
121
|
+
max-width: 100%;
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
text-overflow: ellipsis;
|
|
124
|
+
white-space: nowrap;
|
|
125
|
+
flex: 1;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.headerToggle {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
gap: 0.25rem;
|
|
132
|
+
background: none;
|
|
133
|
+
border: none;
|
|
134
|
+
padding: 0;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
flex: 1;
|
|
137
|
+
min-width: 0;
|
|
138
|
+
text-align: left;
|
|
139
|
+
|
|
140
|
+
.element {
|
|
141
|
+
flex: 1;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Chevron icon that rotates when computed styles are expanded
|
|
146
|
+
.chevron {
|
|
147
|
+
color: rgba(255, 255, 255, 0.5);
|
|
148
|
+
transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); // Matches FAQ accordion easing
|
|
149
|
+
flex-shrink: 0;
|
|
150
|
+
|
|
151
|
+
&.expanded {
|
|
152
|
+
transform: rotate(90deg);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// =============================================================================
|
|
157
|
+
// Computed Styles Block
|
|
158
|
+
// =============================================================================
|
|
159
|
+
|
|
160
|
+
// Accordion animation using grid-template-rows technique for smooth height transitions
|
|
161
|
+
// See: https://css-tricks.com/css-grid-can-do-auto-height-transitions/
|
|
162
|
+
.stylesWrapper {
|
|
163
|
+
display: grid;
|
|
164
|
+
grid-template-rows: 0fr;
|
|
165
|
+
transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1); // Matches FAQ accordion easing
|
|
166
|
+
|
|
167
|
+
&.expanded {
|
|
168
|
+
grid-template-rows: 1fr;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Inner container with overflow:hidden is required for the grid animation to work
|
|
173
|
+
.stylesInner {
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Code-block styling for computed CSS properties display
|
|
178
|
+
.stylesBlock {
|
|
179
|
+
background: rgba(255, 255, 255, 0.05);
|
|
180
|
+
border-radius: 0.375rem;
|
|
181
|
+
padding: 0.5rem 0.625rem;
|
|
182
|
+
margin-bottom: 0.5rem;
|
|
183
|
+
font-family:
|
|
184
|
+
var(--tool-font-body, "DM Sans", ui-sans-serif, system-ui, sans-serif);
|
|
185
|
+
font-size: 0.6875rem;
|
|
186
|
+
line-height: 1.5;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.styleLine {
|
|
190
|
+
color: rgba(255, 255, 255, 0.85);
|
|
191
|
+
word-break: break-word;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Syntax highlighting colors (purple for properties, light for values)
|
|
195
|
+
.styleProperty {
|
|
196
|
+
color: #c792ea;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.styleValue {
|
|
200
|
+
color: rgba(255, 255, 255, 0.85);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.timestamp {
|
|
204
|
+
font-size: 0.625rem;
|
|
205
|
+
font-weight: 500;
|
|
206
|
+
color: rgba(255, 255, 255, 0.35);
|
|
207
|
+
font-variant-numeric: tabular-nums;
|
|
208
|
+
margin-left: 0.5rem;
|
|
209
|
+
flex-shrink: 0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// =============================================================================
|
|
213
|
+
// Quote
|
|
214
|
+
// =============================================================================
|
|
215
|
+
|
|
216
|
+
.quote {
|
|
217
|
+
font-size: 12px;
|
|
218
|
+
font-style: italic;
|
|
219
|
+
color: rgba(255, 255, 255, 0.6);
|
|
220
|
+
margin-bottom: 0.5rem;
|
|
221
|
+
padding: 0.4rem 0.5rem;
|
|
222
|
+
background: rgba(255, 255, 255, 0.05);
|
|
223
|
+
border-radius: 0.25rem;
|
|
224
|
+
line-height: 1.45;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// =============================================================================
|
|
228
|
+
// Read-only comment text
|
|
229
|
+
// =============================================================================
|
|
230
|
+
|
|
231
|
+
.commentText {
|
|
232
|
+
margin: 0;
|
|
233
|
+
font-size: 0.8125rem;
|
|
234
|
+
line-height: 1.5;
|
|
235
|
+
color: rgba(255, 255, 255, 0.9);
|
|
236
|
+
white-space: pre-wrap;
|
|
237
|
+
word-break: break-word;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// =============================================================================
|
|
241
|
+
// Textarea
|
|
242
|
+
// =============================================================================
|
|
243
|
+
|
|
244
|
+
.textarea {
|
|
245
|
+
box-sizing: border-box;
|
|
246
|
+
width: 100%;
|
|
247
|
+
padding: 0.5rem 0.625rem;
|
|
248
|
+
font-size: 0.8125rem;
|
|
249
|
+
font-family: inherit;
|
|
250
|
+
background: rgba(255, 255, 255, 0.05);
|
|
251
|
+
color: #fff;
|
|
252
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
253
|
+
border-radius: 8px;
|
|
254
|
+
resize: none;
|
|
255
|
+
outline: none;
|
|
256
|
+
transition: border-color 0.15s ease;
|
|
257
|
+
|
|
258
|
+
&:focus {
|
|
259
|
+
border-color: var(--prototype-comment-color-blue);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
&.green:focus {
|
|
263
|
+
border-color: var(--prototype-comment-color-green);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&.readOnly {
|
|
267
|
+
cursor: default;
|
|
268
|
+
resize: none;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
&::placeholder {
|
|
272
|
+
color: rgba(255, 255, 255, 0.35);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
&::-webkit-scrollbar {
|
|
276
|
+
width: 6px;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&::-webkit-scrollbar-track {
|
|
280
|
+
background: transparent;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
&::-webkit-scrollbar-thumb {
|
|
284
|
+
background: rgba(255, 255, 255, 0.2);
|
|
285
|
+
border-radius: 3px;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// =============================================================================
|
|
290
|
+
// Actions
|
|
291
|
+
// =============================================================================
|
|
292
|
+
|
|
293
|
+
.actions {
|
|
294
|
+
display: flex;
|
|
295
|
+
justify-content: flex-end;
|
|
296
|
+
gap: 0.375rem;
|
|
297
|
+
margin-top: 0.5rem;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.cancel,
|
|
301
|
+
.submit {
|
|
302
|
+
padding: 0.4rem 0.875rem;
|
|
303
|
+
font-size: 0.75rem;
|
|
304
|
+
font-weight: 500;
|
|
305
|
+
border-radius: 1rem;
|
|
306
|
+
border: none;
|
|
307
|
+
cursor: pointer;
|
|
308
|
+
transition:
|
|
309
|
+
background-color 0.15s ease,
|
|
310
|
+
color 0.15s ease,
|
|
311
|
+
opacity 0.15s ease;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.cancel {
|
|
315
|
+
background: transparent;
|
|
316
|
+
color: rgba(255, 255, 255, 0.5);
|
|
317
|
+
|
|
318
|
+
&:hover {
|
|
319
|
+
background: rgba(255, 255, 255, 0.1);
|
|
320
|
+
color: rgba(255, 255, 255, 0.8);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.submit {
|
|
325
|
+
color: white;
|
|
326
|
+
|
|
327
|
+
&:hover:not(:disabled) {
|
|
328
|
+
filter: brightness(0.9);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
&:disabled {
|
|
332
|
+
cursor: not-allowed;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// Delete button wrapper
|
|
337
|
+
.deleteWrapper {
|
|
338
|
+
margin-right: auto;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.deleteButton {
|
|
342
|
+
cursor: pointer;
|
|
343
|
+
display: flex;
|
|
344
|
+
align-items: center;
|
|
345
|
+
justify-content: center;
|
|
346
|
+
width: 28px;
|
|
347
|
+
height: 28px;
|
|
348
|
+
border-radius: 50%;
|
|
349
|
+
border: none;
|
|
350
|
+
background: transparent;
|
|
351
|
+
color: rgba(255, 255, 255, 0.4);
|
|
352
|
+
transition:
|
|
353
|
+
background-color 0.15s ease,
|
|
354
|
+
color 0.15s ease,
|
|
355
|
+
transform 0.1s ease;
|
|
356
|
+
|
|
357
|
+
&:hover {
|
|
358
|
+
background-color: color-mix(
|
|
359
|
+
in srgb,
|
|
360
|
+
var(--prototype-comment-color-red) 25%,
|
|
361
|
+
transparent
|
|
362
|
+
);
|
|
363
|
+
color: var(--prototype-comment-color-red);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
&:active {
|
|
367
|
+
transform: scale(0.92);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// =============================================================================
|
|
372
|
+
// Light Mode
|
|
373
|
+
// =============================================================================
|
|
374
|
+
|
|
375
|
+
.light {
|
|
376
|
+
&.popup {
|
|
377
|
+
background: #fff;
|
|
378
|
+
box-shadow:
|
|
379
|
+
0 4px 24px rgba(0, 0, 0, 0.12),
|
|
380
|
+
0 0 0 1px rgba(0, 0, 0, 0.06);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.element {
|
|
384
|
+
color: rgba(0, 0, 0, 0.6);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.timestamp {
|
|
388
|
+
color: rgba(0, 0, 0, 0.4);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.chevron {
|
|
392
|
+
color: rgba(0, 0, 0, 0.4);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.stylesBlock {
|
|
396
|
+
background: rgba(0, 0, 0, 0.03);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.styleLine {
|
|
400
|
+
color: rgba(0, 0, 0, 0.75);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.styleProperty {
|
|
404
|
+
color: #7c3aed;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.styleValue {
|
|
408
|
+
color: rgba(0, 0, 0, 0.75);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.quote {
|
|
412
|
+
color: rgba(0, 0, 0, 0.55);
|
|
413
|
+
background: rgba(0, 0, 0, 0.04);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.commentText {
|
|
417
|
+
color: rgba(0, 0, 0, 0.85);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.textarea {
|
|
421
|
+
background: rgba(0, 0, 0, 0.03);
|
|
422
|
+
color: #121212;
|
|
423
|
+
border-color: rgba(0, 0, 0, 0.12);
|
|
424
|
+
|
|
425
|
+
&::placeholder {
|
|
426
|
+
color: rgba(0, 0, 0, 0.4);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
&::-webkit-scrollbar-thumb {
|
|
430
|
+
background: rgba(0, 0, 0, 0.15);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.cancel {
|
|
435
|
+
color: rgba(0, 0, 0, 0.5);
|
|
436
|
+
|
|
437
|
+
&:hover {
|
|
438
|
+
background: rgba(0, 0, 0, 0.06);
|
|
439
|
+
color: rgba(0, 0, 0, 0.75);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.submit {
|
|
444
|
+
background: transparent;
|
|
445
|
+
color: rgba(0, 0, 0, 0.5);
|
|
446
|
+
|
|
447
|
+
&:hover:not(:disabled) {
|
|
448
|
+
background: rgba(0, 0, 0, 0.06);
|
|
449
|
+
filter: none;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
&:disabled {
|
|
453
|
+
color: rgba(0, 0, 0, 0.3);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.deleteButton {
|
|
458
|
+
color: rgba(0, 0, 0, 0.4);
|
|
459
|
+
|
|
460
|
+
&:hover {
|
|
461
|
+
background-color: color-mix(
|
|
462
|
+
in srgb,
|
|
463
|
+
var(--prototype-comment-color-red) 25%,
|
|
464
|
+
transparent
|
|
465
|
+
);
|
|
466
|
+
color: var(--prototype-comment-color-red);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|