@playpilot/tpi 8.23.0-beta.4 → 8.23.0-beta.6

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.23.0-beta.4",
3
+ "version": "8.23.0-beta.6",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -38,7 +38,7 @@
38
38
  "svelte": "5.55.7",
39
39
  "svelte-check": "^4.6.0",
40
40
  "svelte-preprocess": "^6.0.5",
41
- "svelte-tiny-slider": "^2.8.0",
41
+ "svelte-tiny-slider": "^2.8.1",
42
42
  "typescript": "^6.0.3",
43
43
  "typescript-eslint": "^8.62.0",
44
44
  "vite": "^5.4.21",
@@ -45,13 +45,12 @@
45
45
  transform: scale(1.025);
46
46
 
47
47
  :global(button) {
48
- text-decoration-thickness: 2px;
48
+ text-decoration: underline;
49
49
  }
50
50
  }
51
51
 
52
52
  :global(button) {
53
- text-decoration: underline;
54
- color: white;
53
+ color: theme(modal-close-text-color, white);
55
54
  }
56
55
  }
57
56
 
@@ -11,6 +11,7 @@
11
11
  import PlaylinksCompact from '../Playlinks/PlaylinksCompact.svelte'
12
12
  import PlaylinksDisclaimer from '../Playlinks/PlaylinksDisclaimer.svelte'
13
13
  import ModalCloseOverlay from './ModalCloseOverlay.svelte'
14
+ import IconArrow from '../Icons/IconArrow.svelte'
14
15
 
15
16
  interface Props {
16
17
  titles: TitleData[],
@@ -48,7 +49,7 @@
48
49
  <Modal>
49
50
  {#snippet dialog()}
50
51
  <div class="slider">
51
- <TinySlider vertical threshold={100} moveThreshold={20} onchange={pauseAndPlay}>
52
+ <TinySlider vertical threshold={100} moveThreshold={10} onchange={pauseAndPlay}>
52
53
  {#snippet children({ currentIndex, setIndex })}
53
54
  {#each titles as title, index}
54
55
  <!-- svelte-ignore a11y_click_events_have_key_events -->
@@ -76,6 +77,12 @@
76
77
  <TitleBackground {title} useVideoBackground autoplay={false} inline />
77
78
 
78
79
  <div class="gradient"></div>
80
+
81
+ {#if index === 0 && currentIndex === 0}
82
+ <div class="arrow">
83
+ <IconArrow direction="down" size={24} />
84
+ </div>
85
+ {/if}
79
86
  {/if}
80
87
  </div>
81
88
  {/each}
@@ -89,18 +96,20 @@
89
96
  </div>
90
97
 
91
98
  <style lang="scss">
92
- $modal-height: calc(100dvh - margin(4.5));
99
+ $modal-height: calc(100vh - margin(4.5));
93
100
  $item-height: calc($modal-height - margin(7));
94
101
 
95
102
  .reel {
96
103
  --playpilot-detail-background-height: #{$item-height};
97
104
  --playpilot-detail-background-border-radius: 0;
98
105
  --playpilot-detail-background-width: 400%;
99
- --playpilot-detail-backdrop: rgba(0, 0, 0, 0.85);
100
- --playpilot-description-max-height: 40dvh;
106
+ --playpilot-detail-backdrop: black;
107
+ --playpilot-description-max-height: 40vh;
108
+ --playpilot-modal-close-text-color: rgba(255, 255, 255, 0.75);
101
109
 
102
110
  :global(*) {
103
111
  box-sizing: border-box;
112
+ overscroll-behavior: contain;
104
113
  }
105
114
 
106
115
  :global(iframe) {
@@ -114,7 +123,7 @@
114
123
  }
115
124
 
116
125
  .slider {
117
- margin-top: calc(100dvh - $modal-height);
126
+ margin-top: calc(100vh - $modal-height);
118
127
  height: $modal-height;
119
128
  width: 100%;
120
129
  }
@@ -124,10 +133,12 @@
124
133
  width: 100dvw;
125
134
  height: $item-height;
126
135
  background: theme(detail-background, light);
136
+ border-bottom: 1px solid theme(reel-modal-item-border, content);
127
137
  overflow: hidden;
128
138
  }
129
139
 
130
140
  .content {
141
+ --rail-margin: #{margin(2)};
131
142
  position: relative;
132
143
  display: flex;
133
144
  flex-direction: column;
@@ -167,7 +178,7 @@
167
178
  }
168
179
 
169
180
  .playlinks-heading {
170
- margin: margin(0.5) 0;
181
+ margin: margin(1) 0 margin(0.5);
171
182
  color: theme(reel-playlinks-title-color, text-color-alt);
172
183
  font-family: theme(reel-playlinks-title-font-family, inherit);
173
184
  font-weight: theme(reel-playlinks-title-font-weight, lighter);
@@ -184,4 +195,25 @@
184
195
  height: margin(7);
185
196
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
186
197
  }
198
+
199
+ @keyframes wiggle {
200
+ 90%,
201
+ 100% {
202
+ transform: translateX(-50%);
203
+ }
204
+
205
+ 95% {
206
+ transform: translateX(-50%) translateY(margin(0.5));
207
+ }
208
+ }
209
+
210
+ .arrow {
211
+ z-index: 1;
212
+ position: absolute;
213
+ bottom: margin(1);
214
+ left: 50%;
215
+ transform: translateX(-50%);
216
+ animation: wiggle 5000ms infinite ease-out;
217
+ color: theme(detail-text-color, text-color);
218
+ }
187
219
  </style>
@@ -10,11 +10,18 @@
10
10
 
11
11
  const { playlinks, size = 30 }: Props = $props()
12
12
 
13
- const limitedPlaylinks = $derived(mergePlaylinks(playlinks).slice(0, 3))
13
+ let limit = $state(3)
14
+
15
+ const mergedPlaylinks = mergePlaylinks(playlinks)
16
+ const limitedPlaylinks = $derived(mergedPlaylinks.slice(0, limit))
14
17
 
15
18
  function onPlaylinkClick(event: MouseEvent): void {
16
19
  event.stopPropagation()
17
20
  }
21
+
22
+ function expand(): void {
23
+ limit = mergedPlaylinks.length
24
+ }
18
25
  </script>
19
26
 
20
27
  <div class="playlinks">
@@ -22,13 +29,13 @@
22
29
  <PlaylinkIcon {playlink} onclick={onPlaylinkClick} {size} />
23
30
  {/each}
24
31
 
25
- {#if playlinks.length > limitedPlaylinks.length}
26
- <span class="more">
27
- +{playlinks.length - limitedPlaylinks.length}
28
- </span>
32
+ {#if mergedPlaylinks.length > limit}
33
+ <button class="button more" onclick={expand}>
34
+ +{mergedPlaylinks.length - limit}
35
+ </button>
29
36
  {/if}
30
37
 
31
- {#if !playlinks.length}
38
+ {#if !mergedPlaylinks.length}
32
39
  <div class="empty" data-testid="playlinks-empty">
33
40
  Unavailable to stream
34
41
  </div>
@@ -44,15 +51,25 @@
44
51
  }
45
52
 
46
53
  .more {
54
+ appearance: none;
47
55
  display: flex;
48
56
  align-items: center;
49
57
  padding: 0 margin(0.125);
58
+ background: transparent;
59
+ border: 0;
50
60
  color: theme(list-item-more-text-color, text-color-alt);
51
61
  font-size: theme(detail-font-size-small, font-size-small);
62
+ font-family: inherit;
52
63
  line-height: normal;
64
+
65
+ &:hover {
66
+ cursor: pointer;
67
+ color: theme(text-color);
68
+ }
53
69
  }
54
70
 
55
71
  .empty {
72
+ appearance: none;
56
73
  margin-top: margin(0.25);
57
74
  opacity: 0.65;
58
75
  font-style: italic;
@@ -12,9 +12,10 @@
12
12
 
13
13
  interface Props {
14
14
  title: TitleData
15
+ heading?: string
15
16
  }
16
17
 
17
- const { title }: Props = $props()
18
+ const { title, heading = t('Cast') }: Props = $props()
18
19
 
19
20
  /**
20
21
  * Order participants by how often their name appears in an the page text. This only takes into account
@@ -48,14 +49,14 @@
48
49
  </script>
49
50
 
50
51
  {#await fetchParticipantsForTitle(title)}
51
- <Rail heading={t('Cast')}>
52
+ <Rail {heading}>
52
53
  {#each { length: 5 }}
53
54
  <div class="participant"></div>
54
55
  {/each}
55
56
  </Rail>
56
57
  {:then participants}
57
58
  {#if participants?.length}
58
- <Rail heading={t('Cast')}>
59
+ <Rail {heading}>
59
60
  {#each orderParticipantsByPageTextOccurrence(participants).slice(0, 15) as participant}
60
61
  <button class="participant" data-testid="participant" onclick={event => onclick(event, participant)}>
61
62
  <span class="truncate">{participant.name}</span>