@playpilot/tpi 8.15.1 → 8.15.2
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.15.
|
|
3
|
+
"version": "8.15.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"release": "node release.js"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@playpilot/retargeting-tracking": "^
|
|
19
|
+
"@playpilot/retargeting-tracking": "^1.0.0",
|
|
20
20
|
"@sveltejs/adapter-auto": "^7.0.1",
|
|
21
21
|
"@sveltejs/kit": "^2.56.1",
|
|
22
22
|
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
package/src/lib/modal.ts
CHANGED
|
@@ -6,7 +6,6 @@ import type { ParticipantData } from './types/participant'
|
|
|
6
6
|
import { mobileBreakpoint } from './constants'
|
|
7
7
|
import TitleModal from '../routes/components/Modals/TitleModal.svelte'
|
|
8
8
|
import ParticipantModal from '../routes/components/Modals/ParticipantModal.svelte'
|
|
9
|
-
import ExploreModal from '../routes/components/Modals/ExploreModal.svelte'
|
|
10
9
|
import { getPlayPilotWrapperElement, keyDataAttribute, keySelector } from './injection'
|
|
11
10
|
import { playFallbackViewTransition } from './viewTransition'
|
|
12
11
|
import { destroyLinkPopover } from './popover'
|
|
@@ -16,7 +15,7 @@ import TitlesRailModal from '../routes/components/Modals/TitlesRailModal.svelte'
|
|
|
16
15
|
type Modal = {
|
|
17
16
|
injection?: LinkInjection | null
|
|
18
17
|
component?: object
|
|
19
|
-
type: 'title' | 'participant' | '
|
|
18
|
+
type: 'title' | 'participant' | 'titles-rail'
|
|
20
19
|
data: TitleData | TitleData[] | ParticipantData | null
|
|
21
20
|
scrollPosition?: number
|
|
22
21
|
}
|
|
@@ -52,7 +51,6 @@ function getModalComponentByType(
|
|
|
52
51
|
{ type = 'title', target, data, props = {} }:
|
|
53
52
|
{ type: Modal['type'], target: Element, data: Modal['data'], props?: Record<string, any> }): ReturnType<typeof mount> {
|
|
54
53
|
if (type === 'participant') return mount(ParticipantModal, { target, props: { participant: data as ParticipantData, ...props } })
|
|
55
|
-
if (type === 'explore') return mount(ExploreModal, { target, props: { ...props } })
|
|
56
54
|
if (type === 'titles-rail') return mount(TitlesRailModal, { target, props: { titles: data as TitleData[], ...props } })
|
|
57
55
|
return mount(TitleModal, { target, props: { title: data as TitleData, ...props } })
|
|
58
56
|
}
|
|
@@ -197,10 +197,6 @@
|
|
|
197
197
|
{/key}
|
|
198
198
|
</div>
|
|
199
199
|
|
|
200
|
-
<div class="item">
|
|
201
|
-
<button onclick={() => openModal({ type: 'explore' })}>Show explore modal</button>
|
|
202
|
-
</div>
|
|
203
|
-
|
|
204
200
|
<div class="item">
|
|
205
201
|
<button onclick={insertExplore}>Insert explore component</button>
|
|
206
202
|
<button onclick={insertExploreIntoNavigation}>Insert explore into navigation</button>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<script lang="ts">
|
|
3
|
-
import Modal from './Modal.svelte'
|
|
4
|
-
import ExploreRouter from '../Explore/ExploreRouter.svelte'
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
initialScrollPosition?: number
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const { initialScrollPosition = 0 }: Props = $props()
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<Modal {initialScrollPosition} closeButtonStyle="flat" wide>
|
|
14
|
-
<div class="content">
|
|
15
|
-
<ExploreRouter />
|
|
16
|
-
</div>
|
|
17
|
-
</Modal>
|
|
18
|
-
|
|
19
|
-
<style lang="scss">
|
|
20
|
-
.content {
|
|
21
|
-
padding-top: margin(2);
|
|
22
|
-
}
|
|
23
|
-
</style>
|