@playpilot/tpi 6.2.10-beta.6 → 6.2.10

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": "6.2.10-beta.6",
3
+ "version": "6.2.10",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -44,7 +44,6 @@
44
44
  let closeElement: HTMLElement | null = $state(null)
45
45
  let dialogOffset: number = $state(0)
46
46
  let hasPreviousModal = $state(false)
47
- let isTransitioningIn = $state(false)
48
47
 
49
48
  const isMobile = $derived(windowWidth < mobileBreakpoint)
50
49
 
@@ -104,6 +103,14 @@
104
103
  onhashchange={close}
105
104
  bind:innerWidth={windowWidth} />
106
105
 
106
+ {#snippet closeButton()}
107
+ <div class="close {closeButtonStyle}" transition:scaleOrFly|global bind:this={closeElement}>
108
+ <RoundButton onclick={close} aria-label="Close">
109
+ <IconClose />
110
+ </RoundButton>
111
+ </div>
112
+ {/snippet}
113
+
107
114
  <!-- svelte-ignore a11y_click_events_have_key_events -->
108
115
  <!-- svelte-ignore a11y_no_static_element_interactions -->
109
116
  <div
@@ -141,14 +148,11 @@
141
148
 
142
149
  <div
143
150
  class="dialog"
144
- class:transitioning={isTransitioningIn}
145
151
  {onscroll}
146
152
  bind:this={dialogElement}
147
153
  role="dialog"
148
154
  aria-labelledby="title"
149
155
  data-view-transition-new="playpilot-title-content"
150
- onintrostart={() => isTransitioningIn = true}
151
- onintroend={() => isTransitioningIn = false}
152
156
  transition:scaleOrFly|global>
153
157
  {#if hasPreviousModal}
154
158
  <div class="close back {closeButtonStyle}">
@@ -159,13 +163,15 @@
159
163
  {/if}
160
164
 
161
165
  {@render children()}
162
- </div>
163
166
 
164
- <div class="close {closeButtonStyle}" transition:scaleOrFly|global bind:this={closeElement}>
165
- <RoundButton onclick={close} aria-label="Close">
166
- <IconClose />
167
- </RoundButton>
167
+ {#if !isMobile}
168
+ {@render closeButton()}
169
+ {/if}
168
170
  </div>
171
+
172
+ {#if isMobile}
173
+ {@render closeButton()}
174
+ {/if}
169
175
  </div>
170
176
 
171
177
  <style lang="scss">
@@ -301,11 +307,6 @@
301
307
  }
302
308
  }
303
309
  }
304
-
305
- .transitioning & {
306
- top: margin(1);
307
- transition: none;
308
- }
309
310
  }
310
311
 
311
312
  .prepend {