@plusguard/reels 1.9.0 → 1.9.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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/index.css +14 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -23,9 +23,9 @@ From npm, through jsDelivr — the npm package is the code alone (about
23
23
  jsDelivr's GitHub route.
24
24
 
25
25
  ```html
26
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@plusguard/reels@1.9.0/index.css" />
26
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@plusguard/reels@1.9.1/index.css" />
27
27
  <script type="module">
28
- import { initReels } from "https://cdn.jsdelivr.net/npm/@plusguard/reels@1.9.0/dist/index.js";
28
+ import { initReels } from "https://cdn.jsdelivr.net/npm/@plusguard/reels@1.9.1/dist/index.js";
29
29
  initReels();
30
30
  </script>
31
31
  ```
package/index.css CHANGED
@@ -65,7 +65,11 @@
65
65
  inset: 0;
66
66
  margin: 0;
67
67
  }
68
- [data-pg-reels-card] [data-pg-reels-clip]:not([data-pg-reels-current]) {
68
+ /* The playing clip shows. Before the script has chosen one — the first
69
+ paint, the page still loading — the first does: the card is never
70
+ blank, and nothing comes and goes as the script starts. */
71
+ [data-pg-reels-card]:has([data-pg-reels-clip][data-pg-reels-current]) [data-pg-reels-clip]:not([data-pg-reels-current]),
72
+ [data-pg-reels-card]:not(:has([data-pg-reels-clip][data-pg-reels-current])) [data-pg-reels-clip] ~ [data-pg-reels-clip] {
69
73
  visibility: hidden;
70
74
  }
71
75
  [data-pg-reels-clip] > video,
@@ -82,6 +86,9 @@
82
86
  [data-pg-reels-bars] {
83
87
  display: flex;
84
88
  gap: 0.25rem;
89
+ /* Its row's room from the first paint, before the script fills it:
90
+ nothing under it moves down when the bars come. */
91
+ min-height: 0.75rem;
85
92
  }
86
93
  [data-pg-reels-bar],
87
94
  [data-pg-reels-view-bar] {
@@ -136,9 +143,12 @@
136
143
  display: none !important;
137
144
  }
138
145
 
139
- /* The products and the view counts: only the playing clip's show. */
140
- [data-pg-reels-group] [data-pg-reels-product]:not([data-pg-reels-current]),
141
- [data-pg-reels-group] [data-pg-reels-views]:not([data-pg-reels-current]) {
146
+ /* The products and the view counts: only the playing clip's show —
147
+ before the script has chosen, the first. */
148
+ [data-pg-reels-group]:has([data-pg-reels-product][data-pg-reels-current]) [data-pg-reels-product]:not([data-pg-reels-current]),
149
+ [data-pg-reels-group]:not(:has([data-pg-reels-product][data-pg-reels-current])) [data-pg-reels-product] ~ [data-pg-reels-product],
150
+ [data-pg-reels-group]:has([data-pg-reels-views][data-pg-reels-current]) [data-pg-reels-views]:not([data-pg-reels-current]),
151
+ [data-pg-reels-group]:not(:has([data-pg-reels-views][data-pg-reels-current])) [data-pg-reels-views] ~ [data-pg-reels-views] {
142
152
  display: none !important;
143
153
  }
144
154
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusguard/reels",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Shoppable reels for a store: a strip of video cards — each a group of clips, each clip with its own product — that opens into a full view. Up and down between groups, left and right within one, the product beside the video on a computer and under it on a phone. No dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",