animader-cli 0.4.0 → 0.6.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/player/player.css CHANGED
@@ -31,12 +31,23 @@ body {
31
31
  border: 0;
32
32
  }
33
33
 
34
+ /* The page column is exactly the viewport tall. The stage is the one part
35
+ that gives: its flexible basis and min-height: 0 let the flex algorithm
36
+ shrink it below its width-derived 16:9 height, and the width follows the
37
+ shrunken height through aspect-ratio. The max-height is the same 16:9
38
+ relationship expressed against the stage's own maximum width, so a short
39
+ viewport shrinks the stage and a tall one never stretches it past 16:9.
40
+ Chrome rows carry flex: 0 0 auto: only the stage moves when the viewport
41
+ changes. 100vh is the fallback; 100dvh is the live viewport unit. */
34
42
  main {
35
- display: grid;
36
- grid-template-columns: minmax(0, 1fr);
43
+ display: flex;
44
+ flex-direction: column;
37
45
  gap: 12px;
38
46
  width: 100%;
39
47
  max-width: 1312px;
48
+ height: 100vh;
49
+ height: 100dvh;
50
+ min-height: 0;
40
51
  margin: 0 auto;
41
52
  padding: 16px;
42
53
  }
@@ -45,18 +56,40 @@ main {
45
56
  display: flex;
46
57
  flex-direction: column;
47
58
  gap: 12px;
59
+ flex: 1 1 auto;
60
+ min-height: 0;
48
61
  }
49
62
 
50
63
  .stage {
51
64
  position: relative;
52
- width: 100%;
65
+ flex: 1 1 0;
66
+ min-height: 0;
67
+ width: auto;
53
68
  max-width: 1280px;
69
+ max-height: min(720px, calc((100vw - 32px) * 9 / 16));
70
+ align-self: center;
54
71
  aspect-ratio: 16 / 9;
55
72
  overflow: hidden;
56
73
  background: #000;
57
74
  border: 1px solid #2c2026;
58
75
  }
59
76
 
77
+ /* The portrait preset uses the height the page already has: the stage takes
78
+ the flexible vertical track, follows the 720×1280 canvas's ratio and is
79
+ centred. The width-derived 16:9 cap would otherwise reduce it to the
80
+ canvas's width at phone viewports. Landscape presets keep the rule above. */
81
+ .stage--portrait {
82
+ aspect-ratio: 9 / 16;
83
+ max-height: none;
84
+ max-width: 100%;
85
+ /* The 1 px border is painted inside as an outline instead of consuming
86
+ layout: at 390 it costs the canvas exactly the 2 px that separate a
87
+ ~258 px fit from the review's ~260 px target. The frame looks the same. */
88
+ border: 0;
89
+ outline: 1px solid #2c2026;
90
+ outline-offset: -1px;
91
+ }
92
+
60
93
  #canvas {
61
94
  position: absolute;
62
95
  top: 0;
@@ -77,11 +110,15 @@ main {
77
110
  #performance:fullscreen .stage {
78
111
  flex: 1;
79
112
  min-height: 0;
113
+ width: 100%;
80
114
  max-width: none;
115
+ max-height: none;
116
+ align-self: stretch;
81
117
  aspect-ratio: auto;
82
118
  }
83
119
 
84
120
  .status {
121
+ flex: 0 0 auto;
85
122
  margin: 0;
86
123
  color: #8f857a;
87
124
  font-variant-numeric: tabular-nums;
@@ -95,6 +132,245 @@ main {
95
132
  flex-wrap: wrap;
96
133
  }
97
134
 
135
+ /* The dev chrome's timeline column: the shared readout above the 48 px ruler.
136
+ At >=720 px the buttons and timeline share one row; below that the timeline
137
+ takes a full-width row of its own and the buttons may wrap. */
138
+ .timeline {
139
+ display: flex;
140
+ flex: 1 1 100%;
141
+ flex-direction: column;
142
+ gap: 4px;
143
+ min-width: 0;
144
+ }
145
+
146
+ /* The dev chrome's host is a column: one transport row, then the two
147
+ document-projected surfaces on rows of their own. The timeline takes the
148
+ only fluid track, so neither a button label nor a disclosure's open state
149
+ can change the ruler's x or width. */
150
+ .panel--transport {
151
+ flex: 0 0 auto;
152
+ row-gap: 12px;
153
+ }
154
+
155
+ .panel--transport > .disclosure {
156
+ flex: 0 0 100%;
157
+ }
158
+
159
+ /* A rebuild holds the moment: the ruler is quiet rather than pretending it
160
+ can still be scrubbed. The overlay's words carry the actual state. */
161
+ .ruler-track.is-busy {
162
+ opacity: 0.45;
163
+ }
164
+
165
+ /* Fixed label areas so the readout can never run into the centre markers. */
166
+ .readout {
167
+ display: flex;
168
+ align-items: center;
169
+ height: 20px;
170
+ gap: 12px;
171
+ color: #8f857a;
172
+ font-size: 12px;
173
+ line-height: 1.2;
174
+ letter-spacing: 0.04em;
175
+ white-space: nowrap;
176
+ font-variant-numeric: tabular-nums;
177
+ }
178
+
179
+ #readout-position {
180
+ flex: 0 0 236px;
181
+ color: #d8cfc4;
182
+ }
183
+
184
+ #readout-elapsed {
185
+ flex: 0 0 148px;
186
+ margin-left: auto;
187
+ text-align: right;
188
+ color: #d8cfc4;
189
+ }
190
+
191
+ /* The release player's row reuses the one shared readout under the button
192
+ group: a full line 12 px below it, with no second column and no ruler. The
193
+ dev chrome moves the same element into .timeline instead. */
194
+ .panel-release {
195
+ row-gap: 12px;
196
+ }
197
+
198
+ .panel-release .readout {
199
+ flex: 0 0 100%;
200
+ flex-direction: row;
201
+ align-items: center;
202
+ height: 20px;
203
+ gap: 12px;
204
+ white-space: nowrap;
205
+ }
206
+
207
+ /* The dev page stacks its fixed label areas below 720 px; the release keeps
208
+ the one 20 px row at every width, with flexible ends rather than overflow. */
209
+ .panel-release #readout-position {
210
+ flex: 1 1 auto;
211
+ }
212
+
213
+ .panel-release #readout-elapsed {
214
+ flex: 0 0 auto;
215
+ margin-left: auto;
216
+ text-align: right;
217
+ }
218
+
219
+ /* Fullscreen keeps the row: the stage absorbs the spare height, never the
220
+ readout. */
221
+ #performance:fullscreen .readout {
222
+ display: flex;
223
+ }
224
+
225
+ /* Labels are muted, values carry the text tone, and the elapsed slash is a
226
+ separator rather than a value. The release mount writes these spans; the
227
+ dev chrome's plain text keeps the row's own colour. */
228
+ .readout-label {
229
+ color: #8f857a;
230
+ }
231
+
232
+ .readout-separator {
233
+ color: #8f857a;
234
+ }
235
+
236
+ .readout-value {
237
+ color: #d8cfc4;
238
+ }
239
+
240
+ /* The rebuild reassurance sits under the readout while a transition holds the
241
+ moment. The flexible stage absorbs its height, so the ruler keeps its own
242
+ vertical and horizontal geometry. */
243
+ .holding-note {
244
+ margin: 0;
245
+ color: #8f857a;
246
+ font-size: 11px;
247
+ line-height: 1.4;
248
+ }
249
+
250
+ /* The ruler wrapper owns the pointer; the transparent native range over it
251
+ stays the focusable, keyboard and assistive control. */
252
+ .ruler-track {
253
+ position: relative;
254
+ height: 48px;
255
+ min-width: 0;
256
+ cursor: ew-resize;
257
+ touch-action: none;
258
+ user-select: none;
259
+ -webkit-user-select: none;
260
+ }
261
+
262
+ .ruler {
263
+ display: block;
264
+ width: 100%;
265
+ height: 48px;
266
+ }
267
+
268
+ .ruler-range {
269
+ position: absolute;
270
+ inset: 0;
271
+ z-index: 4;
272
+ width: 100%;
273
+ height: 48px;
274
+ margin: 0;
275
+ padding: 0;
276
+ border: 0;
277
+ background: transparent;
278
+ box-shadow: none;
279
+ opacity: 0;
280
+ pointer-events: none;
281
+ appearance: none;
282
+ -webkit-appearance: none;
283
+ }
284
+
285
+ .ruler-track:has(.ruler-range:focus-visible) {
286
+ outline: 2px solid #f0b27a;
287
+ outline-offset: 2px;
288
+ }
289
+
290
+ /* Measured label maxima; reserving them keeps the fluid timeline still while
291
+ a button's label changes. Below 720 px the buttons keep intrinsic widths. */
292
+ @media (min-width: 720px) {
293
+ .panel--transport {
294
+ display: grid;
295
+ grid-template-columns: 73.71875px 156.78125px 112.6875px minmax(0, 1fr);
296
+ column-gap: 16px;
297
+ row-gap: 12px;
298
+ align-items: center;
299
+ }
300
+
301
+ .panel--transport > #primary {
302
+ grid-column: 1;
303
+ grid-row: 1;
304
+ min-width: 73.71875px;
305
+ }
306
+
307
+ .panel--transport > #device {
308
+ grid-column: 2;
309
+ grid-row: 1;
310
+ min-width: 156.78125px;
311
+ }
312
+
313
+ .panel--transport > #fullscreen {
314
+ grid-column: 3;
315
+ grid-row: 1;
316
+ min-width: 112.6875px;
317
+ }
318
+
319
+ .panel--transport > .timeline {
320
+ grid-column: 4;
321
+ grid-row: 1;
322
+ }
323
+
324
+ .panel--transport > .disclosure {
325
+ grid-column: 1 / -1;
326
+ }
327
+
328
+ /* A reserved track is only stable if a longer label cannot paint outside
329
+ it, so clip the three commands at their measured maxima. */
330
+ .panel--transport > button {
331
+ overflow: hidden;
332
+ text-overflow: ellipsis;
333
+ white-space: nowrap;
334
+ }
335
+ }
336
+
337
+ @media (max-width: 719px) {
338
+ /* The phone row keeps its 20 px height and one line at every width; only
339
+ the position half may ellipsise if a very long string arrives. */
340
+ .readout {
341
+ flex-direction: row;
342
+ align-items: center;
343
+ height: 20px;
344
+ gap: 12px;
345
+ white-space: nowrap;
346
+ }
347
+
348
+ #readout-position {
349
+ flex: 1 1 auto;
350
+ min-width: 0;
351
+ width: auto;
352
+ margin-left: 0;
353
+ overflow: hidden;
354
+ text-overflow: ellipsis;
355
+ text-align: left;
356
+ white-space: nowrap;
357
+ }
358
+
359
+ #readout-elapsed {
360
+ flex: 0 0 auto;
361
+ width: auto;
362
+ margin-left: auto;
363
+ text-align: right;
364
+ white-space: nowrap;
365
+ }
366
+
367
+ /* The ruling's phone floor; the desktop commands stay at their 28–32 px
368
+ line box. */
369
+ button {
370
+ min-height: 44px;
371
+ }
372
+ }
373
+
98
374
  button {
99
375
  background: #241a20;
100
376
  color: #d8cfc4;
@@ -113,8 +389,8 @@ button:focus-visible {
113
389
  }
114
390
 
115
391
  #primary {
116
- border-color: #f0b27a;
117
- color: #f0b27a;
392
+ border-color: #d8cfc4;
393
+ color: #d8cfc4;
118
394
  }
119
395
 
120
396
  .secondary {
@@ -356,7 +632,408 @@ button:focus-visible {
356
632
  border-top: 1px solid #2c2026;
357
633
  }
358
634
 
635
+ /* ---- the document-projected surfaces: scenes and piece controls ---- */
636
+
637
+ .disclosure {
638
+ flex: 0 0 auto;
639
+ min-width: 0;
640
+ }
641
+
642
+ .disclosure__summary {
643
+ display: flex;
644
+ align-items: center;
645
+ justify-content: space-between;
646
+ width: 100%;
647
+ height: 32px;
648
+ margin: 0;
649
+ padding: 0;
650
+ border: 0;
651
+ border-top: 1px solid #2c2026;
652
+ border-radius: 0;
653
+ background: transparent;
654
+ color: #8f857a;
655
+ font: 12px/1.2 system-ui, sans-serif;
656
+ font-variant-numeric: tabular-nums;
657
+ list-style: none;
658
+ cursor: pointer;
659
+ appearance: none;
660
+ -webkit-appearance: none;
661
+ }
662
+
663
+ .disclosure__summary::-webkit-details-marker {
664
+ display: none;
665
+ }
666
+
667
+ .disclosure__summary::marker {
668
+ content: "";
669
+ }
670
+
671
+ .disclosure__summary:hover .disclosure__label,
672
+ .disclosure__summary:hover .disclosure__action {
673
+ color: #d8cfc4;
674
+ }
675
+
676
+ .disclosure__summary:focus {
677
+ outline: none;
678
+ }
679
+
680
+ .disclosure__summary:focus-visible {
681
+ outline: 2px solid #f0b27a;
682
+ outline-offset: 2px;
683
+ }
684
+
685
+ .disclosure__label {
686
+ min-width: 0;
687
+ overflow: hidden;
688
+ text-overflow: ellipsis;
689
+ white-space: nowrap;
690
+ }
691
+
692
+ .disclosure__action {
693
+ flex: 0 0 auto;
694
+ margin-left: 16px;
695
+ color: #d8cfc4;
696
+ white-space: nowrap;
697
+ }
698
+
699
+ .scenes-wrap {
700
+ position: relative;
701
+ min-width: 0;
702
+ margin-top: 8px;
703
+ }
704
+
705
+ .scenes {
706
+ display: flex;
707
+ flex-wrap: nowrap;
708
+ align-items: stretch;
709
+ gap: 16px;
710
+ height: 32px;
711
+ min-width: 0;
712
+ overflow-x: auto;
713
+ overflow-y: hidden;
714
+ overscroll-behavior-x: contain;
715
+ scroll-padding-inline: 16px;
716
+ scroll-snap-type: x proximity;
717
+ scrollbar-color: #3a2a33 #0a0608;
718
+ scrollbar-width: thin;
719
+ }
720
+
721
+ /* One pixel at the right edge while more chips remain offscreen. */
722
+ .scenes__cue {
723
+ position: absolute;
724
+ top: 0;
725
+ right: 0;
726
+ bottom: 0;
727
+ z-index: 1;
728
+ width: 1px;
729
+ background: #2c2026;
730
+ pointer-events: none;
731
+ visibility: hidden;
732
+ }
733
+
734
+ .scenes-wrap.is-scrollable-right .scenes__cue {
735
+ visibility: visible;
736
+ }
737
+
738
+ .scene-chip {
739
+ display: inline-flex;
740
+ flex: 0 0 auto;
741
+ align-items: center;
742
+ height: 32px;
743
+ padding: 0 10px;
744
+ border: 1px solid #3a2a33;
745
+ border-radius: 0;
746
+ background: transparent;
747
+ color: #d8cfc4;
748
+ font: 12px/1.2 system-ui, sans-serif;
749
+ font-variant-numeric: tabular-nums;
750
+ white-space: nowrap;
751
+ cursor: pointer;
752
+ scroll-snap-align: start;
753
+ appearance: none;
754
+ -webkit-appearance: none;
755
+ }
756
+
757
+ .scene-chip:not(.current):hover {
758
+ border-color: #8f857a;
759
+ }
760
+
761
+ .scene-chip:focus-visible {
762
+ outline: 2px solid #f0b27a;
763
+ outline-offset: -2px;
764
+ }
765
+
766
+ .scene-chip.current {
767
+ border-color: #8f857a;
768
+ }
769
+
770
+ .scene-chip:not(.current) .scene-chip__current {
771
+ display: none;
772
+ }
773
+
774
+ .scene-chip__current {
775
+ margin-left: 2px;
776
+ color: #8f857a;
777
+ font-size: 11px;
778
+ letter-spacing: 0.04em;
779
+ }
780
+
781
+ .controls {
782
+ padding-top: 12px;
783
+ }
784
+
785
+ .controls__grid {
786
+ display: grid;
787
+ grid-template-columns: repeat(3, minmax(0, 1fr));
788
+ column-gap: 16px;
789
+ row-gap: 12px;
790
+ align-items: start;
791
+ }
792
+
793
+ .control {
794
+ min-width: 0;
795
+ font-size: 12px;
796
+ line-height: 1.2;
797
+ }
798
+
799
+ .control__head {
800
+ display: flex;
801
+ align-items: baseline;
802
+ gap: 6px;
803
+ min-height: 20px;
804
+ white-space: nowrap;
805
+ }
806
+
807
+ .control__label {
808
+ color: #8f857a;
809
+ font-size: 12px;
810
+ }
811
+
812
+ .control__value {
813
+ margin-left: auto;
814
+ color: #d8cfc4;
815
+ font-size: 12px;
816
+ font-variant-numeric: tabular-nums;
817
+ text-align: right;
818
+ }
819
+
820
+ .control__held,
821
+ .control__score,
822
+ .control__hint {
823
+ color: #8f857a;
824
+ font-size: 11px;
825
+ font-variant-numeric: tabular-nums;
826
+ }
827
+
828
+ .control__held {
829
+ margin-left: 6px;
830
+ }
831
+
832
+ .control__score {
833
+ margin-left: 8px;
834
+ }
835
+
836
+ .control__hint {
837
+ margin-left: 0;
838
+ }
839
+
840
+ .control__axis {
841
+ display: grid;
842
+ grid-template-columns: 12px minmax(0, 1fr) 38px;
843
+ align-items: center;
844
+ gap: 8px;
845
+ height: 28px;
846
+ }
847
+
848
+ .control__axis-label {
849
+ color: #8f857a;
850
+ font-size: 12px;
851
+ }
852
+
853
+ .control__axis-value {
854
+ color: #d8cfc4;
855
+ font-size: 12px;
856
+ font-variant-numeric: tabular-nums;
857
+ text-align: right;
858
+ }
859
+
860
+ /* The piece's ranges borrow the transport ruler's vocabulary: one 1 px track,
861
+ a 2 px accent thumb, no progress fill. */
862
+ .control__range {
863
+ display: block;
864
+ width: 100%;
865
+ height: 28px;
866
+ margin: 0;
867
+ padding: 0;
868
+ border: 0;
869
+ background: transparent;
870
+ color: #f0b27a;
871
+ appearance: none;
872
+ -webkit-appearance: none;
873
+ }
874
+
875
+ .control__axis .control__range {
876
+ height: 28px;
877
+ }
878
+
879
+ .control__range:focus-visible {
880
+ outline: 2px solid #f0b27a;
881
+ outline-offset: 2px;
882
+ }
883
+
884
+ .control__range::-webkit-slider-runnable-track {
885
+ height: 1px;
886
+ border: 0;
887
+ background: #3a2a33;
888
+ }
889
+
890
+ .control__range::-webkit-slider-thumb {
891
+ width: 2px;
892
+ height: 14px;
893
+ margin-top: -6.5px;
894
+ border: 0;
895
+ border-radius: 0;
896
+ background: #f0b27a;
897
+ appearance: none;
898
+ -webkit-appearance: none;
899
+ }
900
+
901
+ .control__axis .control__range::-webkit-slider-thumb {
902
+ height: 10px;
903
+ margin-top: -4.5px;
904
+ }
905
+
906
+ .control__range::-moz-range-track {
907
+ height: 1px;
908
+ border: 0;
909
+ background: #3a2a33;
910
+ }
911
+
912
+ .control__range::-moz-range-progress {
913
+ background: transparent;
914
+ }
915
+
916
+ .control__range::-moz-range-thumb {
917
+ width: 2px;
918
+ height: 14px;
919
+ border: 0;
920
+ border-radius: 0;
921
+ background: #f0b27a;
922
+ }
923
+
924
+ .control__axis .control__range::-moz-range-thumb {
925
+ height: 10px;
926
+ }
927
+
928
+ .control__swatch {
929
+ flex: 0 0 auto;
930
+ align-self: center;
931
+ width: 20px;
932
+ height: 20px;
933
+ border: 1px solid #3a2a33;
934
+ background: #0a0608;
935
+ }
936
+
937
+ .control__number-box {
938
+ display: block;
939
+ width: 72px;
940
+ cursor: text;
941
+ }
942
+
943
+ .control__number {
944
+ display: block;
945
+ width: 72px;
946
+ height: 28px;
947
+ margin: 0;
948
+ padding: 0 6px;
949
+ border: 1px solid #3a2a33;
950
+ border-radius: 0;
951
+ background: transparent;
952
+ color: #d8cfc4;
953
+ font: 12px/1.2 system-ui, sans-serif;
954
+ font-variant-numeric: tabular-nums;
955
+ appearance: textfield;
956
+ -moz-appearance: textfield;
957
+ }
958
+
959
+ .control__number:focus-visible {
960
+ outline: 2px solid #f0b27a;
961
+ outline-offset: 2px;
962
+ }
963
+
964
+ .control__number::-webkit-outer-spin-button,
965
+ .control__number::-webkit-inner-spin-button {
966
+ margin: 0;
967
+ appearance: none;
968
+ -webkit-appearance: none;
969
+ }
970
+
971
+ .control--slider,
972
+ .control--numeric,
973
+ .control--virtual {
974
+ min-height: 48px;
975
+ }
976
+
977
+ .control--xy {
978
+ min-height: 76px;
979
+ }
980
+
981
+ .control--color {
982
+ min-height: 104px;
983
+ }
984
+
985
+ @media (max-width: 719px) {
986
+ .disclosure__summary {
987
+ height: 44px;
988
+ }
989
+
990
+ .scenes {
991
+ height: 44px;
992
+ align-items: center;
993
+ }
994
+
995
+ .scene-chip {
996
+ min-height: 44px;
997
+ height: auto;
998
+ font-size: 11px;
999
+ }
1000
+
1001
+ .scene-chip__bar {
1002
+ display: none;
1003
+ }
1004
+
1005
+ .controls__grid {
1006
+ grid-template-columns: minmax(0, 1fr);
1007
+ row-gap: 12px;
1008
+ }
1009
+
1010
+ .control--slider,
1011
+ .control--numeric,
1012
+ .control--virtual,
1013
+ .control--xy,
1014
+ .control--color {
1015
+ min-height: 0;
1016
+ }
1017
+
1018
+ .control__range,
1019
+ .control__axis,
1020
+ .control__axis .control__range {
1021
+ height: 44px;
1022
+ }
1023
+
1024
+ .control__number-box {
1025
+ display: flex;
1026
+ align-items: center;
1027
+ height: 44px;
1028
+ }
1029
+
1030
+ .control__number {
1031
+ height: 44px;
1032
+ }
1033
+ }
1034
+
359
1035
  .diagnostics {
1036
+ flex: 0 0 auto;
360
1037
  padding-top: 8px;
361
1038
  border-top: 1px solid #2c2026;
362
1039
  color: #8f857a;