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

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.5",
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,12 +45,11 @@
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
53
  color: white;
55
54
  }
56
55
  }
@@ -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 ParticipantsRail from '../Rails/ParticipantsRail.svelte'
14
15
 
15
16
  interface Props {
16
17
  titles: TitleData[],
@@ -65,6 +66,8 @@
65
66
  <div class="details">
66
67
  <Description text={title.description!} blurb={title.blurb} limit={80} />
67
68
 
69
+ <ParticipantsRail {title} heading="" />
70
+
68
71
  <div class="playlinks-heading" use:heading={3}>{t('Where To Stream Online')}</div>
69
72
 
70
73
  <PlaylinksCompact playlinks={title.providers} size={24} />
@@ -128,6 +131,7 @@
128
131
  }
129
132
 
130
133
  .content {
134
+ --rail-margin: #{margin(2)};
131
135
  position: relative;
132
136
  display: flex;
133
137
  flex-direction: column;
@@ -167,7 +171,7 @@
167
171
  }
168
172
 
169
173
  .playlinks-heading {
170
- margin: margin(0.5) 0;
174
+ margin: margin(1) 0 margin(0.5);
171
175
  color: theme(reel-playlinks-title-color, text-color-alt);
172
176
  font-family: theme(reel-playlinks-title-font-family, inherit);
173
177
  font-weight: theme(reel-playlinks-title-font-weight, lighter);
@@ -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>