@bbki.ng/site 5.5.3 → 5.5.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 5.5.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 41f402d: fix: icon
8
+ - 1730cbc: padding top shake
9
+ - Updated dependencies [41f402d]
10
+ - Updated dependencies [1730cbc]
11
+ - @bbki.ng/ui@0.2.5
12
+
13
+ ## 5.5.4
14
+
15
+ ### Patch Changes
16
+
17
+ - 45f9fae: fix: hash
18
+ - Updated dependencies [45f9fae]
19
+ - @bbki.ng/ui@0.2.4
20
+
3
21
  ## 5.5.3
4
22
 
5
23
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/site",
3
- "version": "5.5.3",
3
+ "version": "5.5.5",
4
4
  "description": "code behind bbki.ng",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -14,7 +14,7 @@
14
14
  "react-dom": "^18.0.0",
15
15
  "react-router-dom": "6",
16
16
  "swr": "^2.2.5",
17
- "@bbki.ng/ui": "0.2.3"
17
+ "@bbki.ng/ui": "0.2.5"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@eslint/compat": "^1.0.0",
package/src/blog/app.tsx CHANGED
@@ -29,7 +29,8 @@ const Layout = () => {
29
29
  loading={isLoading}
30
30
  customLogo={logo}
31
31
  style={{
32
- paddingTop: 'calc(env(safe-area-inset-top) + 4px)',
32
+ paddingTop: 'var(--safe-top);',
33
+ transition: 'all .2s ease-in-out',
33
34
  }}
34
35
  />
35
36
  }
package/src/blog/main.css CHANGED
@@ -91,3 +91,31 @@ tr > th {
91
91
  max-width: 100px;
92
92
  width: 100px;
93
93
  }
94
+
95
+ :root {
96
+ --safe-top: 0px; /* 立即确定的初始值 */
97
+ }
98
+
99
+ @supports (padding-top: env(safe-area-inset-top)) {
100
+ :root {
101
+ --safe-top: env(safe-area-inset-top); /* 延迟计算的值 */
102
+ }
103
+ }
104
+ :root {
105
+ --safe-top: 0px; /* 立即确定的初始值 */
106
+ }
107
+
108
+ @supports (padding-top: env(safe-area-inset-top)) {
109
+ :root {
110
+ --safe-top: env(safe-area-inset-top); /* 延迟计算的值 */
111
+ }
112
+ }
113
+ :root {
114
+ --safe-top: 0px; /* 立即确定的初始值 */
115
+ }
116
+
117
+ @supports (padding-top: env(safe-area-inset-top)) {
118
+ :root {
119
+ --safe-top: calc(env(safe-area-inset-top) + 4px);
120
+ }
121
+ }
@@ -263,7 +263,7 @@ async function getAudioFingerprint(): Promise<string | undefined> {
263
263
  }
264
264
 
265
265
  // 主采集函数
266
- export async function getFingerprint(): Promise<FingerprintData> {
266
+ async function getFingerprint(): Promise<FingerprintData> {
267
267
  const components: Partial<FingerprintComponents> = {
268
268
  userAgent: navigator.userAgent,
269
269
  language: navigator.language,
@@ -1,6 +1,6 @@
1
1
  import { API_ENDPOINT } from '@/constants/routes';
2
2
  import { FontType } from '@/types/font';
3
- import { getFingerprint, getStableDeviceId } from './fingerprints';
3
+ import { getStableDeviceId } from './fingerprints';
4
4
 
5
5
  type Fetcher = (resource: string, init?: any) => Promise<any>;
6
6
 
@@ -10,8 +10,8 @@ export const floatNumberToPercentageString = (num: number): string => {
10
10
 
11
11
  export const baseFetcher = async (resource: string, init: RequestInit = {}) => {
12
12
  const headers = new Headers(init.headers || {});
13
- const fp = await getFingerprint();
14
- headers.set('X-Device-Fingerprint', fp.hash);
13
+ const fp = await getStableDeviceId();
14
+ headers.set('X-Device-Fingerprint', fp.id);
15
15
  return fetch(resource, {
16
16
  ...init,
17
17
  headers,
package/vite.config.js CHANGED
@@ -119,11 +119,13 @@ export default defineConfig({
119
119
  src: 'pwa-192x192.png',
120
120
  sizes: '192x192',
121
121
  type: 'image/png',
122
+ purpose: 'maskable',
122
123
  },
123
124
  {
124
125
  src: 'pwa-512x512.png',
125
126
  sizes: '512x512',
126
127
  type: 'image/png',
128
+ purpose: 'maskable',
127
129
  },
128
130
  {
129
131
  src: 'pwa-512x512.png',