@playpilot/tpi 8.5.4 → 8.5.7

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.5.4",
3
+ "version": "8.5.7",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -251,6 +251,16 @@ export const translations = {
251
251
  [Language.Swedish]: 'Medverkande',
252
252
  [Language.Danish]: 'Medvirkende',
253
253
  },
254
+ 'Home': {
255
+ [Language.English]: 'Home',
256
+ [Language.Swedish]: 'Hem',
257
+ [Language.Danish]: 'Hjem',
258
+ },
259
+ 'Explore': {
260
+ [Language.English]: 'Explore',
261
+ [Language.Swedish]: 'Utforska',
262
+ [Language.Danish]: 'Udforsk',
263
+ },
254
264
 
255
265
  // List titles
256
266
  'List: Trending': {
@@ -2,6 +2,7 @@
2
2
  import type { ExploreRoute } from '$lib/types/explore'
3
3
  import { useExploreRouter } from '$lib/explore'
4
4
  import { track } from '$lib/tracking'
5
+ import { t } from '$lib/localization'
5
6
  import { TrackingEvent } from '$lib/enums/TrackingEvent'
6
7
  import ExploreHome from './Routes/ExploreHome.svelte'
7
8
  import ExploreResults from './Routes/ExploreResults.svelte'
@@ -10,7 +11,7 @@
10
11
  const routes: ExploreRoute[] = [
11
12
  {
12
13
  key: 'results',
13
- label: 'Explore',
14
+ label: t('Explore'),
14
15
  component: ExploreResults,
15
16
  },
16
17
  ]
@@ -18,7 +19,7 @@
18
19
  if (useExploreRouter()) {
19
20
  routes.unshift({
20
21
  key: 'home',
21
- label: 'Home',
22
+ label: t('Home'),
22
23
  component: ExploreHome,
23
24
  })
24
25
  }
@@ -1,3 +1,3 @@
1
- <svg width="18px" height="18px" viewBox="0 -960 960 960" fill="currentColor">
2
- <path d="M200-440v-80h560v80H200Z"/>
1
+ <svg width="18px" height="18px" viewBox="0 -960 960 960">
2
+ <path d="M200-440v-80h560v80H200Z" fill="currentColor" />
3
3
  </svg>
@@ -1,3 +1,3 @@
1
- <svg width="18px" height="18px" viewBox="0 -960 960 960" fill="currentColor">
2
- <path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"/>
1
+ <svg width="18px" height="18px" viewBox="0 -960 960 960">
2
+ <path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z" fill="currentColor" />
3
3
  </svg>
@@ -110,6 +110,7 @@
110
110
 
111
111
  @include desktop() {
112
112
  transform: scale(0.9);
113
+ opacity: 0.35;
113
114
  }
114
115
 
115
116
  :global(*) {
@@ -169,8 +170,8 @@
169
170
  box-shadow: theme(rail-modal-arrow-shadow, 0 margin(0.25) margin(0.5) rgba(0, 0, 0, 0.35));
170
171
  color: theme(rail-modal-arrow-color, text-color);
171
172
 
172
- @media (min-width: 800px) {
173
- --offset: #{margin(-4)};
173
+ @include desktop {
174
+ --offset: #{margin(-3.5)};
174
175
  }
175
176
 
176
177
  &:hover,
@@ -337,6 +337,7 @@
337
337
  padding-top: 0;
338
338
  color: theme(text-color) !important;
339
339
  font-weight: theme(rail-aside-heading-font-weight, font-bold);
340
+ font-family: theme(rail-aside-heading-font-family, font-family);
340
341
  line-clamp: 1;
341
342
  -webkit-line-clamp: 1;
342
343
  }
@@ -349,6 +350,7 @@
349
350
  mask-image: linear-gradient(to top, transparent 0.5lh, white 1.5lh);
350
351
  overflow: hidden;
351
352
  color: theme(rail-text-color, text-color-alt) !important;
353
+ font-family: theme(rail-aside-font-family, font-family);
352
354
  font-size: 0.9em;
353
355
  line-height: 1.3;
354
356
  }
@@ -34,7 +34,7 @@ describe('ExploreResults.svelte', () => {
34
34
  })
35
35
 
36
36
  it('Should render all returned titles', async () => {
37
- vi.mocked(fetchTitles).mockResolvedValueOnce({ results: [title, title, title], next: null, previous: null })
37
+ vi.mocked(fetchTitles).mockResolvedValue({ results: [title, title, title], next: null, previous: null })
38
38
 
39
39
  const { getAllByText } = render(ExploreResults)
40
40
 
@@ -44,7 +44,7 @@ describe('ExploreResults.svelte', () => {
44
44
  })
45
45
 
46
46
  it('Should not render Show more button when no next value is given', async () => {
47
- vi.mocked(fetchTitles).mockResolvedValueOnce({ results: [title], next: null, previous: null })
47
+ vi.mocked(fetchTitles).mockResolvedValue({ results: [title], next: null, previous: null })
48
48
 
49
49
  const { getByText, queryByText } = render(ExploreResults)
50
50
 
@@ -54,7 +54,7 @@ describe('ExploreResults.svelte', () => {
54
54
  })
55
55
 
56
56
  it('Should render Show more button when next value is given', async () => {
57
- vi.mocked(fetchTitles).mockResolvedValueOnce({ results: [title], next: 'truthy', previous: null })
57
+ vi.mocked(fetchTitles).mockResolvedValue({ results: [title], next: 'truthy', previous: null })
58
58
 
59
59
  const { getByText } = render(ExploreResults)
60
60
 
@@ -113,7 +113,7 @@ describe('ExploreResults.svelte', () => {
113
113
  })
114
114
 
115
115
  it('Should include search param when query is given', async () => {
116
- vi.mocked(fetchTitles).mockResolvedValueOnce({ results: [title], next: 'truthy', previous: null })
116
+ vi.mocked(fetchTitles).mockResolvedValue({ results: [title], next: 'truthy', previous: null })
117
117
 
118
118
  const { getAllByTestId } = render(ExploreResults, { searchQuery: 'some query' })
119
119
 
@@ -123,8 +123,8 @@ describe('ExploreResults.svelte', () => {
123
123
  })
124
124
  })
125
125
 
126
- it('Should include search param when query is empty', async () => {
127
- vi.mocked(fetchTitles).mockResolvedValueOnce({ results: [title], next: 'truthy', previous: null })
126
+ it('Should not include search param when query is empty', async () => {
127
+ vi.mocked(fetchTitles).mockResolvedValue({ results: [title], next: 'truthy', previous: null })
128
128
 
129
129
  const { getAllByTestId } = render(ExploreResults, { searchQuery: '' })
130
130