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