@playpilot/tpi 8.0.1 → 8.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playpilot/tpi",
3
- "version": "8.0.1",
3
+ "version": "8.1.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -120,7 +120,7 @@
120
120
  class="modal"
121
121
  class:wide
122
122
  class:tall
123
- class:blur
123
+ class:background-blur={blur}
124
124
  class:has-bubble={!!bubble}
125
125
  class:has-prepend={!!prepend}
126
126
  style:--dialog-offset="{dialogOffset}px"
@@ -209,7 +209,7 @@
209
209
  --playpilot-detail-background-border-radius: 0;
210
210
  }
211
211
 
212
- &.blur {
212
+ &.background-blur {
213
213
  backdrop-filter: blur(1.5rem);
214
214
  }
215
215
  }
@@ -168,7 +168,7 @@
168
168
  color: theme(rail-modal-arrow-color, text-color);
169
169
 
170
170
  @media (min-width: 800px) {
171
- --offset: #{margin(-6)};
171
+ --offset: #{margin(-4)};
172
172
  }
173
173
 
174
174
  &:hover,
@@ -26,7 +26,7 @@
26
26
  useVideoBackground?: boolean
27
27
  }
28
28
 
29
- const { title, small = false, useVideoBackground = !small }: Props = $props()
29
+ const { title, small = false, useVideoBackground = true }: Props = $props()
30
30
 
31
31
  const noAffiliate = !!window.PlayPilotLinkInjections?.no_affiliate
32
32
 
@@ -96,7 +96,7 @@
96
96
  </div>
97
97
  </div>
98
98
 
99
- <div class="background">
99
+ <div class="background" class:small>
100
100
  {#if useVideoBackground && hasYouTubeVideoAvailable}
101
101
  <YouTubeEmbedBackground embeddable_url={title.embeddable_url!} />
102
102
  {:else}
@@ -248,10 +248,21 @@
248
248
 
249
249
  @include desktop() {
250
250
  height: margin(12);
251
- aspect-ratio: unset;
252
251
  mask-image: linear-gradient(to bottom, black 60%, transparent);
253
252
  }
254
253
 
254
+ @include mobile {
255
+ :global(.video-background) {
256
+ width: 225%;
257
+ }
258
+ }
259
+
260
+ &.small {
261
+ :global(.video-background) {
262
+ width: 150%;
263
+ }
264
+ }
265
+
255
266
  img {
256
267
  width: 100%;
257
268
  height: 100%;
@@ -271,18 +282,6 @@
271
282
  filter: blur(0.75rem);
272
283
  }
273
284
  }
274
-
275
- @include mobile {
276
- :global(.video-background) {
277
- width: 225%;
278
- margin-left: 50%;
279
- transform: translateX(-50%);
280
-
281
- :global(> iframe) {
282
- transform: translateX(-50%) translateY(-50%);
283
- }
284
- }
285
- }
286
285
  }
287
286
 
288
287
  .capitalize {
@@ -21,6 +21,8 @@
21
21
  .video-background {
22
22
  width: 100%;
23
23
  height: 100%;
24
+ margin-left: 50%;
25
+ transform: translateX(-50%);
24
26
  background: black;
25
27
 
26
28
  :global(iframe) {
@@ -124,13 +124,13 @@ describe('Modal.svelte', () => {
124
124
  it('Should not have blur class by default', () => {
125
125
  const { getByTestId } = render(Modal, { children })
126
126
 
127
- expect(getByTestId('modal').classList).not.toContain('blur')
127
+ expect(getByTestId('modal').classList).not.toContain('background-blur')
128
128
  })
129
129
 
130
130
  it('Should have blur class when prop is given', () => {
131
131
  const { getByTestId } = render(Modal, { children, blur: true })
132
132
 
133
- expect(getByTestId('modal').classList).toContain('blur')
133
+ expect(getByTestId('modal').classList).toContain('background-blur')
134
134
  })
135
135
 
136
136
  it('Should not show back button by default', () => {