reifyui 0.9.1 → 0.10.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/dist/index.cjs +374 -99
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +375 -100
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/timeline/Timeline.jsx +362 -115
- package/styles/timeline.css +69 -12
package/styles/timeline.css
CHANGED
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
/* ── a clip ────────────────────────────────────────────────────────────────────────────────── */
|
|
61
61
|
.rui-tl-clip {
|
|
62
62
|
position: absolute; top: 4px; bottom: 4px; overflow: hidden; isolation: isolate;
|
|
63
|
+
touch-action: none;
|
|
63
64
|
border: 1px solid var(--rui-tl-accent, var(--uic-line, #DDDFE6));
|
|
64
65
|
border-radius: 6px; background: var(--uic-surface, #FFFFFF);
|
|
65
66
|
cursor: pointer; padding: 0; text-align: left;
|
|
@@ -69,7 +70,9 @@
|
|
|
69
70
|
border-color: var(--uic-brand, #6E55FF);
|
|
70
71
|
box-shadow: 0 0 0 1px var(--uic-brand, #6E55FF);
|
|
71
72
|
}
|
|
72
|
-
.rui-tl-
|
|
73
|
+
.rui-tl-strip {
|
|
74
|
+
position: absolute; inset: 0; background-repeat: repeat-x; background-position: left center;
|
|
75
|
+
}
|
|
73
76
|
.rui-tl-blank {
|
|
74
77
|
position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
|
75
78
|
color: var(--uic-mute-2, #8E9199);
|
|
@@ -118,20 +121,74 @@
|
|
|
118
121
|
background: var(--uic-brand, #6E55FF);
|
|
119
122
|
}
|
|
120
123
|
|
|
121
|
-
/* ──
|
|
122
|
-
.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
/* ── toolbar ───────────────────────────────────────────────────────────────────────────────
|
|
125
|
+
A bar, not a pill floating over the lanes. Controls that hover in the corner of the content
|
|
126
|
+
read as debris; these are the timeline's own commands and they belong in its chrome. */
|
|
127
|
+
.rui-tl-bar {
|
|
128
|
+
flex-shrink: 0; display: flex; align-items: center; gap: 5px; padding: 5px 8px;
|
|
129
|
+
border-bottom: 1px solid var(--uic-line, #DDDFE6);
|
|
130
|
+
background: var(--uic-surface, #FFFFFF);
|
|
126
131
|
}
|
|
127
|
-
.rui-tl-
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
.rui-tl-btn {
|
|
133
|
+
display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px;
|
|
134
|
+
border: 1px solid var(--uic-line, #DDDFE6); border-radius: 6px;
|
|
135
|
+
background: var(--uic-surface, #FFFFFF); color: var(--uic-ink-2, #374151);
|
|
136
|
+
font: inherit; font-size: 12px; line-height: 1; cursor: pointer;
|
|
137
|
+
}
|
|
138
|
+
.rui-tl-btn:hover:not(:disabled) { background: var(--uic-line-soft, #EFF1F4); }
|
|
139
|
+
.rui-tl-btn:disabled { opacity: .4; cursor: default; }
|
|
140
|
+
.rui-tl-btn:focus-visible { outline: 2px solid var(--uic-brand, #6E55FF); outline-offset: 1px; }
|
|
141
|
+
/* On/off is a state, so it is a word AND a colour, never colour alone. */
|
|
142
|
+
.rui-tl-btn.is-on {
|
|
143
|
+
border-color: var(--uic-brand, #6E55FF); color: var(--uic-brand, #6E55FF);
|
|
144
|
+
background: var(--uic-brand-50, #F3F0FF);
|
|
145
|
+
}
|
|
146
|
+
.rui-tl-icon { width: 26px; padding: 0; justify-content: center; font-size: 14px; }
|
|
147
|
+
.rui-tl-time {
|
|
148
|
+
margin-left: 4px; font-size: 12px; color: var(--uic-mute, #6B7280);
|
|
149
|
+
font-variant-numeric: tabular-nums;
|
|
150
|
+
}
|
|
151
|
+
.rui-tl-spacer { flex: 1; }
|
|
152
|
+
|
|
153
|
+
/* ── gesture feedback ──────────────────────────────────────────────────────────────────────── */
|
|
154
|
+
/* The cursor belongs to the DRAG, not the handle: without this it flickers back to an arrow the
|
|
155
|
+
moment the pointer leaves the 10px grip, and dragging over the page selects text. */
|
|
156
|
+
body.rui-tl-gesturing { cursor: ew-resize !important; user-select: none !important; }
|
|
157
|
+
|
|
158
|
+
.rui-tl-guide {
|
|
159
|
+
position: absolute; top: 0; bottom: 0; width: 1px; z-index: 6; pointer-events: none;
|
|
160
|
+
background: var(--uic-ok, #10B981);
|
|
161
|
+
}
|
|
162
|
+
.rui-tl-annot {
|
|
163
|
+
position: absolute; top: 26px; z-index: 7; transform: translateX(-50%);
|
|
164
|
+
padding: 2px 6px; border-radius: 5px; font-size: 11px; white-space: nowrap;
|
|
165
|
+
background: rgba(17, 24, 39, .86); color: #fff; pointer-events: none;
|
|
166
|
+
font-variant-numeric: tabular-nums;
|
|
130
167
|
}
|
|
131
|
-
.rui-tl-zoombtn:hover:not(:disabled) { background: var(--uic-line-soft, #EFF1F4); }
|
|
132
|
-
.rui-tl-zoombtn:disabled { opacity: .35; cursor: default; }
|
|
133
|
-
.rui-tl-fit { font-size: 12px; }
|
|
134
168
|
|
|
135
169
|
@media (prefers-reduced-motion: reduce) {
|
|
136
170
|
.rui-tl-scroll { scroll-behavior: auto; }
|
|
137
171
|
}
|
|
172
|
+
|
|
173
|
+
/* ── trim handles ──────────────────────────────────────────────────────────────────────────────
|
|
174
|
+
10px targets with a 3px visible grip: the grip is what you see, the target is what you hit.
|
|
175
|
+
They appear on hover and on selection, so a lane at rest is clips rather than controls. */
|
|
176
|
+
.rui-tl-trim {
|
|
177
|
+
position: absolute; top: 0; bottom: 0; width: 10px; z-index: 3;
|
|
178
|
+
cursor: ew-resize; opacity: 0; touch-action: none;
|
|
179
|
+
}
|
|
180
|
+
.rui-tl-trim.l { left: 0; }
|
|
181
|
+
.rui-tl-trim.r { right: 0; }
|
|
182
|
+
.rui-tl-trim::after {
|
|
183
|
+
content: ''; position: absolute; top: 5px; bottom: 5px; width: 3px; border-radius: 2px;
|
|
184
|
+
background: #fff; box-shadow: 0 0 0 1px rgba(17, 24, 39, .35);
|
|
185
|
+
}
|
|
186
|
+
.rui-tl-trim.l::after { left: 3px; }
|
|
187
|
+
.rui-tl-trim.r::after { right: 3px; }
|
|
188
|
+
.rui-tl-clip:hover .rui-tl-trim,
|
|
189
|
+
.rui-tl-clip.is-selected .rui-tl-trim { opacity: .9; }
|
|
190
|
+
.rui-tl-trim:hover { opacity: 1; }
|
|
191
|
+
/* Mid-gesture the clip follows the pointer: it should read as lifted, and it must not animate. */
|
|
192
|
+
.rui-tl-clip.is-live { box-shadow: 0 4px 14px rgba(17, 24, 39, .22); z-index: 4; }
|
|
193
|
+
.rui-tl-clip { cursor: grab; }
|
|
194
|
+
.rui-tl-clip.is-live { cursor: grabbing; }
|