studio-engine 0.54.1 → 0.55.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b79896d29716fe1408c39d86c9e2d19d4e6dc12dd28749ff85054c29e5ba9a77
4
- data.tar.gz: 033a9a7e0e4799ef5ed0522e3fb6b6d1652ab4239d7de625add1e24ac81a5386
3
+ metadata.gz: 203b2f8cf1001d19c7ffb24c778ab0f1bdcb0b9aafa59762ded0ea5689eb2423
4
+ data.tar.gz: a6dbf4164a79cd6b5de2a9cbee178e5455e55c619dfa7197f0db08ba398aaf5b
5
5
  SHA512:
6
- metadata.gz: dcd13075e85ee744c86ec901f62e749320f916a72c7c04b1530a5715dcdbcec3adcaa39dc1b8236327bc5a2de4238ef1585cf42853444ff92eeae0ff7cfcc702
7
- data.tar.gz: 6d242c947ec1d582202bb53652091f6ab4ed111cadfa721aab578df1f89f7b8b9a9bdb4bcd9f57b5b8a15ba9d8c9200b2358668ec2058d59f0c210072e93a79a
6
+ metadata.gz: 0bb5c9bebe4977fef13ab139729ebbc5c560b52f31e573d153e63a00a8a40b970519ac783ad51b45773661e182f5dc848e424b4922e5748117c29560fdfc2b20
7
+ data.tar.gz: 4e16f3663bb43a61139cac420af9a2c265f91c5c5a6f708c32edf1ad5d1e92c6a559b545b148b4e134afe90d614a81de527906988a122b8326b9ae9ef881e6be
data/CHANGELOG.md CHANGED
@@ -4,6 +4,33 @@ The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This pro
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ### Added
8
+
9
+ - **`.studio-team-glow` rings a host that paints its own background**, and can
10
+ carry **two colors**.
11
+
12
+ The ring previously needed an opaque CHILD in front to cover its middle,
13
+ because both wedge layers are pseudo-elements at `z-index: -1 / -2` and CSS
14
+ paints an element's background BEFORE its negative-z descendants. A live board
15
+ card cannot supply that child: Turbo targets the card element itself for
16
+ replace and remove, so a wrapper host is orphaned every time a card leaves the
17
+ board. The primitive now cuts the host's own box out of both layers
18
+ (`padding` + `mask-composite`, the trick §1's `.studio-border-glow` already
19
+ used), so the ring works on the card directly.
20
+
21
+ **No-op for the wrapper shape** — its child was already covering that
22
+ interior. Verified side by side against both live consumers
23
+ (`style/_modal_specimen` and the hub's release-phase-meter): pixel-equivalent
24
+ before and after.
25
+
26
+ `--studio-team-glow-color-b` colors the SECOND of the two opposed wedges and
27
+ defaults to the first, so one-color callers see no change and a caller with a
28
+ pair to show — a Pokémon's two types — gets one per wedge.
29
+
30
+ The bloom twin needed care: a mask applies AFTER a filter, so its box carries a
31
+ transparent border twice the blur radius and its wedges stop at the padding
32
+ box. Without that room the halo ends on a hard line at its own edge.
33
+
7
34
  ### Fixed
8
35
 
9
36
  - **`.conic-surface` keeps its wash inside its own box.** The wash was an
@@ -507,38 +507,56 @@
507
507
  }
508
508
 
509
509
  /* =============================================================================
510
- 9b. studio-team-glow — single-color rotating "selected card" ring glow
510
+ 9b. studio-team-glow — rotating "selected card" ring glow, one or two colors
511
511
  Ported from turf-monster's per-team selected-card glow (.holo-border-glow):
512
- a single-color conic-gradient ring rotates around the element's edge, with a
513
- blurred bloom twin behind it. DISTINCT from .studio-border-glow (an animated
514
- RAINBOW border) and .studio-glow (a static soft box-shadow halo) — this is the
515
- "this card is selected / live" ring, tinted one color.
512
+ a conic-gradient ring rotates around the element's edge, with a blurred bloom
513
+ twin behind it. DISTINCT from .studio-border-glow (an animated RAINBOW border)
514
+ and .studio-glow (a static soft box-shadow halo) — this is the "this card is
515
+ selected / live" ring.
516
516
 
517
517
  The color is a CSS var (default the CTA role, so purple on McRitchie Studio),
518
- just like TM's per-team --glow-c. The wedge is swept by animating a registered
518
+ just like TM's per-team --glow-c. TWO opposed wedges travel the edge, and they
519
+ can carry two colors: --studio-team-glow-color-b defaults to the first, so a
520
+ one-color caller sees no change, and a caller with a pair to show (a Pokémon's
521
+ two types) gets one per wedge. The wedges are swept by animating a registered
519
522
  @property angle (rotating the GRADIENT, not the element — so no oversized-child
520
523
  clipping trick is needed). Opacity is a var (--studio-team-glow-opacity) with a
521
524
  transition, so a consumer can fade the glow in/out (the living style guide
522
525
  slides it between step cards as a modal's step machine advances).
523
526
 
524
- THE HOST IS A BARE WRAPPER, NOT THE CARD. Both wedge layers are pseudo-elements
525
- at z-index -1 / -2, and CSS paints an element's own background FIRST, then its
526
- negative-z descendants on top of it (CSS 2.1 Appendix E, steps 1 and 2). So a
527
- background on the HOST cannot cover the wedges — they wash its whole face, and
528
- the ring is gone. What covers the middle is an opaque CHILD in front: in-flow
529
- descendants paint later (step 3), leaving only the thickness-wide band around
530
- the edge. That is TM's holo-wrap / holo-card split, and it is what both
531
- consumers ship the engine's style/_modal_specimen (bare glow wrapper + the
532
- opaque .card article) and the hub's release-phase-meter (bare host + the bar's
533
- own fill). Demoing it the other way is what shipped a washed card to
534
- admin/style; the host also must NOT be clipped by an overflow-hidden ancestor
535
- near its border.
536
-
537
- Usage: <div class="studio-team-glow rounded-xl">
538
- <div class="rounded-xl bg-surface p-5">Selected</div>
539
- </div>
540
- red glow: style="--studio-team-glow-color: #E11D48"
541
- Tune: --studio-team-glow-color / -opacity / -speed / -thickness / -bloom
527
+ THE HOST MAY CARRY ITS OWN BACKGROUND the ring cuts the host's box out of
528
+ both wedge layers, so only the band around the edge paints. That hole is what
529
+ makes the primitive work in the two shapes its consumers need:
530
+
531
+ · the WRAPPER shape (TM's holo-wrap / holo-card split) a bare host with an
532
+ opaque child in front. The engine's style/_modal_specimen and the hub's
533
+ release-phase-meter both ship this. Unchanged by the hole: the child was
534
+ already covering that interior.
535
+ · the CARD shape the host IS the opaque surface. This is what a live board
536
+ card needs, because it cannot take a wrapper at all: Turbo targets the card
537
+ element for both replace and remove, so a wrapper is orphaned every time a
538
+ card leaves the board.
539
+
540
+ Without the hole the card shape is impossible, and not for a tunable reason:
541
+ both layers are pseudo-elements at z-index -1 / -2, and CSS paints an element's
542
+ own background FIRST, then its negative-z descendants ON TOP of it (CSS 2.1
543
+ Appendix E, steps 1 and 2) — so a background on the host is covered BY the
544
+ wedges, and the ring becomes a wash across the whole face. Only a child, or
545
+ this hole, can cover the middle.
546
+
547
+ The host must still NOT be clipped by an overflow-hidden ancestor near its
548
+ border, or the ring is cut off with it.
549
+
550
+ Usage: <div class="studio-team-glow rounded-xl bg-surface p-5">Selected</div>
551
+ wrapper shape, when the face is its own element:
552
+ <div class="studio-team-glow rounded-xl">
553
+ <div class="rounded-xl bg-surface p-5">Selected</div>
554
+ </div>
555
+ red glow: style="--studio-team-glow-color: #E11D48"
556
+ two types: style="--studio-team-glow-color: #F08030;
557
+ --studio-team-glow-color-b: #6890F0"
558
+ Tune: --studio-team-glow-color / -color-b / -opacity / -speed / -thickness /
559
+ -bloom
542
560
  ========================================================================== */
543
561
  @property --studio-team-glow-angle {
544
562
  syntax: "<angle>";
@@ -547,6 +565,11 @@
547
565
  }
548
566
  .studio-team-glow {
549
567
  --studio-team-glow-color: var(--color-cta);
568
+ /* The SECOND wedge's color. Defaults to the first, so a one-color caller sees
569
+ no change; a caller with two colors to show (a Pokémon's two types, a pair of
570
+ brand colors) gets one per wedge. Resolved on this element, so an inline
571
+ --studio-team-glow-color override feeds this default too. */
572
+ --studio-team-glow-color-b: var(--studio-team-glow-color);
550
573
  --studio-team-glow-opacity: 1;
551
574
  --studio-team-glow-speed: 4s;
552
575
  --studio-team-glow-thickness: 4px;
@@ -571,14 +594,47 @@
571
594
  var(--studio-team-glow-color) 12%,
572
595
  transparent 33%,
573
596
  transparent 50%,
574
- var(--studio-team-glow-color) 62%,
597
+ var(--studio-team-glow-color-b) 62%,
575
598
  transparent 83%
576
599
  );
577
600
  animation: studio-team-glow-spin var(--studio-team-glow-speed) linear infinite;
601
+ /* THE HOST'S OWN BOX IS PUNCHED OUT of both wedge layers, so what paints is the
602
+ band around the edge and nothing else. `padding` makes each layer's CONTENT
603
+ box exactly the host's box; mask-composite then removes that box from the
604
+ layer — the same mask trick §1's .studio-border-glow uses.
605
+ Why it is here: an opaque child in front covers the middle only when the host
606
+ CAN take a child. A live board card cannot — Turbo targets the card element
607
+ itself for replace and remove, so a wrapper is orphaned on every remove. With
608
+ the hole cut here the ring rides the card directly. For a wrapper host this
609
+ changes nothing visible: the child was already covering that interior. */
610
+ padding: var(--studio-team-glow-thickness);
611
+ -webkit-mask:
612
+ linear-gradient(#000 0 0) content-box,
613
+ linear-gradient(#000 0 0);
614
+ -webkit-mask-composite: xor;
615
+ mask:
616
+ linear-gradient(#000 0 0) content-box,
617
+ linear-gradient(#000 0 0);
618
+ mask-composite: exclude;
578
619
  }
579
620
  .studio-team-glow::after {
580
- /* Blurred bloom twin, a touch larger. */
581
- inset: calc(-1 * (var(--studio-team-glow-thickness) + 4px));
621
+ /* Blurred bloom twin, a touch larger: its wedges reach 4px PAST the ring, which
622
+ is what makes the bloom read as a halo, not a soft edge on the ring. Drop the
623
+ 4px and every WRAPPER consumer's ring visibly lightens (measured: 26% of the
624
+ pixels on style/_modal_specimen, 13% on the hub's release-phase-meter). The
625
+ box then carries a transparent BORDER of bloom-reach on top of that, and the
626
+ mask still holes out the host's box — so the blur
627
+ spreads outward into that reach and is cut where it has already faded, while
628
+ the inward half is cut at the host's edge (invisible: that edge is either the
629
+ card's own or the wrapper child's). Mask applies AFTER filter, which is why
630
+ the reach has to out-measure the blur — without it the halo ends on a hard
631
+ line at the layer's own box. */
632
+ inset: calc(-1 * (var(--studio-team-glow-thickness) + 4px + var(--studio-team-glow-bloom) * 2));
633
+ padding: calc(var(--studio-team-glow-thickness) + 4px);
634
+ border: calc(var(--studio-team-glow-bloom) * 2) solid transparent;
635
+ /* The wedges stop at the padding box (host + ring + the 4px); the border is empty
636
+ room the blur is allowed to spread into. */
637
+ background-clip: padding-box;
582
638
  z-index: -2;
583
639
  filter: blur(var(--studio-team-glow-bloom)) saturate(1.35);
584
640
  }
@@ -272,7 +272,7 @@
272
272
  <h3 class="text-xl font-bold text-heading">Effects</h3>
273
273
  <p class="text-muted text-sm">
274
274
  The <code class="font-mono text-2xs">engine-motion.css</code> visual-effect primitives beyond motion -
275
- gradient text, a soft glow halo, a single-color rotating <strong>selection glow</strong>
275
+ gradient text, a soft glow halo, a one- or two-color rotating <strong>selection glow</strong>
276
276
  (ported from Turf Monster's selected-team-card ring), frosted glass, and a conic wash. Each is
277
277
  themed through the role tokens and tunable via CSS-var knobs.
278
278
  </p>
@@ -297,22 +297,18 @@
297
297
  </div>
298
298
  <% end %>
299
299
 
300
- <%# The glow host is a BARE wrapper and the opaque face is a CHILD. The ring
301
- pseudos sit at z-index -1/-2, and a negative-z descendant paints ABOVE its
302
- host's own background so a background on the HOST washes the whole card
303
- face and there is no ring left. The child in front is what covers the
304
- middle, exactly as TM's holo-wrap / holo-card split does. See
305
- engine-motion.css §9b. %>
300
+ <%# The CARD shape: the host carries its own background and the ring still
301
+ rings, because the primitive punches the host's box out of both wedge
302
+ layers. The WRAPPER shape (bare host + opaque child) is staged by the
303
+ Modals section's glow cards both are documented in engine-motion.css
304
+ §9b. Two wedges travel the edge, so a pair of colors reads as a pair. %>
306
305
  <%= render layout: "style/specimen",
307
- locals: { klass: ".studio-team-glow (knob: --studio-team-glow-color)",
308
- usage: %(<div class="studio-team-glow rounded-xl">\n <div class="rounded-xl bg-surface p-5">Selected</div>\n</div>) } do %>
306
+ locals: { klass: ".studio-team-glow (knobs: --studio-team-glow-color / -color-b)",
307
+ usage: %(<div class="studio-team-glow rounded-xl bg-surface p-5">Selected</div>\n<div class="studio-team-glow rounded-xl bg-surface p-5"\n style="--studio-team-glow-color: #F08030; --studio-team-glow-color-b: #6890F0">Fire / Flying</div>) } do %>
309
308
  <div class="flex flex-wrap items-center justify-center gap-6">
310
- <div class="studio-team-glow rounded-xl">
311
- <div class="rounded-xl bg-surface border border-subtle px-5 py-4 text-sm font-semibold text-heading text-center">Selected</div>
312
- </div>
313
- <div class="studio-team-glow rounded-xl" style="--studio-team-glow-color: #E11D48">
314
- <div class="rounded-xl bg-surface border border-subtle px-5 py-4 text-sm font-semibold text-heading text-center">Ravens</div>
315
- </div>
309
+ <div class="studio-team-glow rounded-xl bg-surface border border-subtle px-5 py-4 text-sm font-semibold text-heading text-center">Selected</div>
310
+ <div class="studio-team-glow rounded-xl bg-surface border border-subtle px-5 py-4 text-sm font-semibold text-heading text-center"
311
+ style="--studio-team-glow-color: #F08030; --studio-team-glow-color-b: #6890F0">Fire / Flying</div>
316
312
  </div>
317
313
  <% end %>
318
314
 
@@ -1,3 +1,3 @@
1
1
  module Studio
2
- VERSION = "0.54.1"
2
+ VERSION = "0.55.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: studio-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.54.1
4
+ version: 0.55.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex McRitchie