@stacksjs/defaults 0.74.7 → 0.74.9
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.
|
@@ -86,6 +86,11 @@ const db = createBrowserDb({ baseUrl: '/api' })
|
|
|
86
86
|
## Utility Functions
|
|
87
87
|
|
|
88
88
|
```typescript
|
|
89
|
+
// API URLs: one canonical `/api` root, legacy-prefixed paths do not double it
|
|
90
|
+
resolveApiBaseUrl() // https://app.example/api in a browser
|
|
91
|
+
resolveApiUrl('/users', 'https://app.example/api') // https://app.example/api/users
|
|
92
|
+
resolveApiUrl('/api/users', 'https://app.example/api') // same URL
|
|
93
|
+
|
|
89
94
|
// Date
|
|
90
95
|
useDateFormat(date, 'YYYY-MM-DD')
|
|
91
96
|
useNow()
|
package/ide/vscode/package.json
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.74.
|
|
5
|
+
"version": "0.74.9",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@iconify-json/f7": "^1.2.2",
|
|
56
56
|
"@iconify-json/hugeicons": "^1.2.27",
|
|
57
|
-
"@stacksjs/mobile": "^0.74.
|
|
57
|
+
"@stacksjs/mobile": "^0.74.9",
|
|
58
58
|
"@stacksjs/sanitizer": "^0.2.113",
|
|
59
59
|
"ts-qr-codes": "^0.1.8"
|
|
60
60
|
}
|
|
@@ -12,9 +12,13 @@ const className = useReactiveProp<string>('class', '')
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<div data-native-app-shell class="native-app-shell" :class="className()">
|
|
15
|
-
<main
|
|
15
|
+
<!-- The application layout owns the single <main> landmark. This shell is
|
|
16
|
+
structural chrome; making it another <main> creates invalid nested
|
|
17
|
+
landmarks and gives both elements the router's stx-content view-
|
|
18
|
+
transition name. -->
|
|
19
|
+
<div class="native-app-content">
|
|
16
20
|
<slot />
|
|
17
|
-
</
|
|
21
|
+
</div>
|
|
18
22
|
@if(tabBar)
|
|
19
23
|
<footer class="native-app-tab-slot">
|
|
20
24
|
<slot name="tab-bar" />
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test'
|
|
2
|
+
import { readFileSync } from 'node:fs'
|
|
3
|
+
import { join } from 'node:path'
|
|
4
|
+
|
|
5
|
+
const source = readFileSync(join(import.meta.dir, 'NativeAppShell.stx'), 'utf8')
|
|
6
|
+
|
|
7
|
+
describe('NativeAppShell landmarks', () => {
|
|
8
|
+
it('does not introduce a main landmark around the application layout', () => {
|
|
9
|
+
expect(source).not.toContain('<main class="native-app-content">')
|
|
10
|
+
expect(source).toContain('<div class="native-app-content">')
|
|
11
|
+
})
|
|
12
|
+
})
|