@sgflabs/storefront-core 0.1.13 → 0.1.15

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": "@sgflabs/storefront-core",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Shared storefront library consumed as raw TypeScript source by the brand apps.",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "sideEffects": [
@@ -55,9 +55,9 @@
55
55
  "devDependencies": {
56
56
  "@sentry/nextjs": "^10.63.0",
57
57
  "@sgflabs/artha-go-sdk": "^0.3.0",
58
- "@sgflabs/gstin": "^0.1.13",
59
- "@sgflabs/page-spec": "^0.1.13",
60
- "@sgflabs/storefront-core-common": "^0.1.13",
58
+ "@sgflabs/gstin": "^0.1.15",
59
+ "@sgflabs/page-spec": "^0.1.15",
60
+ "@sgflabs/storefront-core-common": "^0.1.15",
61
61
  "@testing-library/dom": "^10.4.1",
62
62
  "@testing-library/jest-dom": "^7.0.0",
63
63
  "@testing-library/react": "^16.3.2",
@@ -73,9 +73,9 @@
73
73
  "peerDependencies": {
74
74
  "@sentry/nextjs": "^10.63.0",
75
75
  "@sgflabs/artha-go-sdk": "^0.3.0",
76
- "@sgflabs/gstin": "^0.1.13",
77
- "@sgflabs/page-spec": "^0.1.13",
78
- "@sgflabs/storefront-core-common": "^0.1.13",
76
+ "@sgflabs/gstin": "^0.1.15",
77
+ "@sgflabs/page-spec": "^0.1.15",
78
+ "@sgflabs/storefront-core-common": "^0.1.15",
79
79
  "next": "15.5.27",
80
80
  "react": "^19.2.3",
81
81
  "react-dom": "^19.2.3"
@@ -153,8 +153,20 @@ function ChatPanel({ baseUrl, onClose }: { baseUrl: string; onClose: () => void
153
153
  messages.map((m) => <MessageBubble key={m.id} message={m} />)
154
154
  )}
155
155
  {isLoading && (
156
- <p className="text-xs text-secondary" data-testid="ai-chat-typing">
157
- Assistant is typing…
156
+ <p
157
+ role="status"
158
+ className="flex items-center gap-1 py-2 text-secondary"
159
+ data-testid="ai-chat-typing"
160
+ >
161
+ <span className="sr-only">Assistant is typing…</span>
162
+ {[0, 150, 300].map((delay) => (
163
+ <span
164
+ key={delay}
165
+ aria-hidden="true"
166
+ style={{ animationDelay: `${delay}ms` }}
167
+ className="size-1.5 rounded-full bg-current motion-safe:animate-bounce"
168
+ />
169
+ ))}
158
170
  </p>
159
171
  )}
160
172
  </div>
@@ -25,6 +25,14 @@ export async function finishGoogleLogin(token: string, locale: string, origin: s
25
25
  return NextResponse.redirect(new URL(`/${locale}/register?provider=google`, origin))
26
26
  }
27
27
 
28
- await transferCart()
28
+ // The session cookie is already set, so a cart-merge failure (stale guest cart, saved-cart lookup) must not turn a
29
+ // successful login into a 500. The shopper keeps their session and the guest cart stays as it was.
30
+ try {
31
+ await transferCart()
32
+ } catch (error) {
33
+ // Status only, as in sso-origin-lookup: the error text can carry cart or customer ids.
34
+ const status = (error as { status?: unknown } | null)?.status
35
+ console.warn(`finishGoogleLogin: cart transfer failed after login (status ${typeof status === "number" ? status : "none"}); continuing`)
36
+ }
29
37
  return NextResponse.redirect(new URL(next ?? `/${locale}/user`, origin))
30
38
  }