@playpilot/tpi 8.19.1-beta.2 → 8.19.1-beta.3

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.19.1-beta.2",
3
+ "version": "8.19.1-beta.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -25,7 +25,7 @@
25
25
 
26
26
  onMount(() => {
27
27
  setTimeout(() => {
28
- slider?.setIndex(initialIndex)
28
+ if (initialIndex !== 0) slider?.setIndex(initialIndex)
29
29
  requestAnimationFrame(() => initialized = true)
30
30
  })
31
31
  })
@@ -38,7 +38,7 @@
38
38
 
39
39
  <Modal blur {onclose} {...restProps}>
40
40
  {#snippet dialog()}
41
- <div class="rail-modal" style:--transition-duration="{transitionDuration}ms">
41
+ <div class="rail-modal" class:initialized style:--transition-duration="{transitionDuration}ms">
42
42
  <TinySlider threshold={40} moveThreshold={40} transitionDuration={initialized ? transitionDuration : 0} bind:this={slider}>
43
43
  {#snippet children({ currentIndex })}
44
44
  {#each items as item, index}
@@ -87,11 +87,16 @@
87
87
  position: relative;
88
88
  width: $size;
89
89
  margin: auto auto 0;
90
+ opacity: 0;
90
91
 
91
92
  @include desktop() {
92
93
  margin: auto;
93
94
  }
94
95
 
96
+ &.initialized {
97
+ opacity: 1;
98
+ }
99
+
95
100
  :global(> .slider) {
96
101
  overflow: visible;
97
102
 
@@ -125,6 +130,10 @@
125
130
  pointer-events: none;
126
131
  }
127
132
  }
133
+
134
+ .rail-modal:not(.initialized) & {
135
+ transition: none;
136
+ }
128
137
  }
129
138
 
130
139
  .content {