@stacksjs/defaults 0.75.102 → 0.75.104

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.
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.102",
5
+ "version": "0.75.104",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.102",
5
+ "version": "0.75.104",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -55,8 +55,8 @@
55
55
  "dependencies": {
56
56
  "@iconify-json/f7": "^1.2.2",
57
57
  "@iconify-json/hugeicons": "^1.2.35",
58
- "@stacksjs/mobile": "^0.75.102",
59
- "@stacksjs/sanitizer": "^0.2.414",
58
+ "@stacksjs/mobile": "^0.75.104",
59
+ "@stacksjs/sanitizer": "^0.2.419",
60
60
  "@xterm/addon-fit": "^0.11.0",
61
61
  "@xterm/xterm": "^6.0.0",
62
62
  "ts-qr-codes": "^0.1.8"
@@ -10,7 +10,7 @@ const { tabBar = false } = defineProps<NativeAppShellProps>()
10
10
  </script>
11
11
 
12
12
  <script client>
13
- import { deepLinks as deepLinkService, device, followDeepLinks, installNativeChrome, installPressables, isNativeMobile, splash, whenNativeMobile } from '@stacksjs/mobile'
13
+ import { deepLinks as deepLinkService, device, followDeepLinks, installNativeChrome, installPressables, isNativeMobile, splash, tabBar as nativeTabBar, whenNativeMobile } from '@stacksjs/mobile'
14
14
 
15
15
  const className = useReactiveProp<string>('class', '')
16
16
  // A bare attribute arrives as an empty string.
@@ -61,7 +61,12 @@ onMount(() => {
61
61
  if (!root) return
62
62
  stopPressables = installPressables(root.ownerDocument)
63
63
  void whenNativeMobile().then((native) => {
64
- if (native && !destroyed) stopChrome = installNativeChrome(root.ownerDocument)
64
+ if (!native || destroyed) return
65
+ stopChrome = installNativeChrome(root.ownerDocument)
66
+ // A shell without a tab bar (sign-in, a flow of its own) says so: an app
67
+ // whose native bar was configured to show from its first frame, before
68
+ // any page had described one, would otherwise keep it over this screen.
69
+ if (!root.querySelector('.native-app-tab-slot') && nativeTabBar.isAvailable()) nativeTabBar.hide()
65
70
  })
66
71
  })
67
72
  onDestroy(() => {
@@ -102,6 +102,11 @@ describe('Native components', () => {
102
102
  expect(sheet).toContain("useModel('open'")
103
103
  })
104
104
 
105
+ it('hides the native tab bar under a shell that has none, like a sign-in screen', () => {
106
+ const shell = read('NativeAppShell')
107
+ expect(shell).toContain("if (!root.querySelector('.native-app-tab-slot') && nativeTabBar.isAvailable()) nativeTabBar.hide()")
108
+ })
109
+
105
110
  it('covers the tab bar while up, and closes when its screen is left', () => {
106
111
  const sheet = read('NativeSheet')
107
112
  expect(sheet).toContain('coverTabBar(element, true)')
@@ -203,7 +208,8 @@ describe('Native components feel native', () => {
203
208
 
204
209
  it('keeps the native chrome in step with the page once in the phone app', () => {
205
210
  const shell = read('NativeAppShell')
206
- expect(shell).toContain('if (native && !destroyed) stopChrome = installNativeChrome(root.ownerDocument)')
211
+ expect(shell).toContain('if (!native || destroyed) return')
212
+ expect(shell).toContain('stopChrome = installNativeChrome(root.ownerDocument)')
207
213
  })
208
214
 
209
215
  it('links the bar to the scroll a frame at a time, and stretches the large title past the top', () => {
@@ -84,7 +84,7 @@ function tapBack(event: MouseEvent): void {
84
84
  <header :class="barClass()">
85
85
  <div class="native-nav-side">
86
86
  @if(back)
87
- <a href="{{ back }}" class="native-nav-back" :aria-label="backText()" draggable="false" @click="tapBack">
87
+ <a href="{{ back }}" class="native-nav-back" :aria-label="backText()" draggable="false" data-native-back @click="tapBack">
88
88
  <NativeSymbol name="chevron.backward" icon="i-lucide-chevron-left" weight="semibold" class="native-nav-back-icon" />
89
89
  <span class="native-nav-back-label">{{ backText() }}</span>
90
90
  </a>