@tbox.cn/app-module-mall-core 1.0.0-alpha.1 → 1.0.0-alpha.11

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.
Files changed (33) hide show
  1. package/AGENTS.md +3 -3
  2. package/README.md +4 -4
  3. package/dist/{chunk-QPBYZO27.js → chunk-ZBHJWURF.js} +1399 -1611
  4. package/dist/{chunk-FIHBQMON.js → chunk-ZVXAPBVE.js} +1 -1
  5. package/dist/client/index.d.ts +0 -11
  6. package/dist/client/index.js +1 -1
  7. package/dist/index.js +2 -2
  8. package/dist/server/index.d.ts +16 -16
  9. package/dist/server/index.js +1 -1
  10. package/package.json +7 -7
  11. package/src/client/HomeActivityDetailDialog.tsx +21 -81
  12. package/src/client/MallHome.tsx +109 -54
  13. package/src/client/cards/overrides/BumpInActivityChatCard.tsx +1 -1
  14. package/src/client/components/ActivityDetailPresentation/index.tsx +102 -9
  15. package/src/client/components/MemberGateSheet/index.tsx +38 -92
  16. package/src/client/home-slot.tsx +8 -64
  17. package/src/client/index.ts +4 -3
  18. package/src/client/member-gate-overlay.tsx +89 -0
  19. package/src/server/module-ports.ts +1 -1
  20. package/tbox.module.json +1 -2
  21. package/tests/MemberGateSheet.test.tsx +9 -0
  22. package/tests/home-slot.test.tsx +110 -30
  23. package/tsup.config.ts +0 -1
  24. package/dist/HomeActivityDetailDialog-2GJFYSMZ.less +0 -178
  25. package/dist/MallHome-PABCNS6D.less +0 -623
  26. package/dist/home-slot-WBZ6ONDP.less +0 -4
  27. package/dist/index-ELJ55M66.less +0 -256
  28. package/dist/index-U5YRUY7P.less +0 -352
  29. package/src/client/HomeActivityDetailDialog.less +0 -178
  30. package/src/client/MallHome.less +0 -623
  31. package/src/client/components/ActivityDetailPresentation/index.less +0 -352
  32. package/src/client/components/MemberGateSheet/index.less +0 -256
  33. package/src/client/home-slot.less +0 -4
@@ -85,6 +85,46 @@ vi.mock('../../../packages/agent-ui-kit/src/components/QuickCommands/index.tsx',
85
85
  return <div className={`mock-quick-commands${props.hidden ? ' mock-quick-commands--hidden' : ''}`} />;
86
86
  },
87
87
  }));
88
+ // 同一组 mock 的模板副本路径:@tbox.cn/app-agent-ui-kit 是「真源 + 模板副本」两个同名包,
89
+ // pnpm 按锁解析其一(当前解析到副本)。ChatPage 内部用相对导入,entry mock 拦不住,
90
+ // 因此两条路径都要 mock——测试不依赖解析落点。
91
+ vi.mock('../../../templates/template-agent/packages/agent-ui-kit/src/components/MessageBubble/index.tsx', () => ({
92
+ MessageBubble: ({ message }: { message: { id: string } }) => <div data-order={message.id} />,
93
+ }));
94
+ vi.mock('../../../templates/template-agent/packages/agent-ui-kit/src/components/ScrollToBottomButton/index.tsx', () => ({
95
+ default: () => <div />,
96
+ }));
97
+ vi.mock('../../../templates/template-agent/packages/agent-ui-kit/src/components/CardRenderer.tsx', () => ({
98
+ CardRenderer: ({ card }: { card: TboxCardPayload }) => <div data-inline-card={card.id} />,
99
+ RawCardRenderer: ({ card }: { card: TboxCardPayload }) => <div data-raw-card={card.id} />,
100
+ }));
101
+ vi.mock('../../../templates/template-agent/packages/agent-ui-kit/src/components/ChatInput/index.tsx', () => ({
102
+ ChatInput: (props: {
103
+ blocked?: { message: string; onRetry?: () => void };
104
+ onNewChat?: () => void;
105
+ onVoiceActivityChange?: (active: boolean) => void;
106
+ }) => {
107
+ mocks.chatInputProps = props;
108
+ return props.blocked ? (
109
+ <div className="mock-chat-blocked">
110
+ <span className="mock-chat-blocked-msg">{props.blocked.message}</span>
111
+ {props.blocked.onRetry && (
112
+ <button className="mock-chat-blocked-retry" onClick={props.blocked.onRetry}>
113
+ 重试
114
+ </button>
115
+ )}
116
+ </div>
117
+ ) : (
118
+ <div className="mock-chat-input" />
119
+ );
120
+ },
121
+ }));
122
+ vi.mock('../../../templates/template-agent/packages/agent-ui-kit/src/components/QuickCommands/index.tsx', () => ({
123
+ QuickCommands: (props: { hidden?: boolean }) => {
124
+ mocks.quickCommandsProps = props;
125
+ return <div className={`mock-quick-commands${props.hidden ? ' mock-quick-commands--hidden' : ''}`} />;
126
+ },
127
+ }));
88
128
  // 应用侧(home-slot)经包入口消费 toast——entry 级覆盖
89
129
  vi.mock('@tbox.cn/app-agent-ui-kit', async (importOriginal) => {
90
130
  const actual = await importOriginal<typeof import('@tbox.cn/app-agent-ui-kit')>();
@@ -96,20 +136,32 @@ vi.mock('@tbox.cn/app-agent-ui-kit', async (importOriginal) => {
96
136
 
97
137
  // W2-3:usePullDownHistory 宿主迁 kit(ChatPage 内部相对消费)——文件级 mock 拦截
98
138
  // (双态相对路径先例:workspace 真源与模板副本同解——与 MessageBubble mock 同构)
99
- vi.mock('../../../packages/agent-ui-kit/src/hooks/use-pull-down-history', () => ({
100
- usePullDownHistory: (options: {
101
- disabled?: boolean;
102
- onLoad?: () => Promise<void>;
103
- scrollRef?: { current: HTMLElement | null };
104
- }) => {
105
- mocks.pullOptions = options;
106
- return {
107
- pullStatus: mocks.pullStatus,
108
- pullDistance: mocks.pullDistance ?? 0,
109
- resetPull: () => {},
110
- };
111
- },
112
- }));
139
+ // 钩子 mock 与当前 API 同形(ChatPage 读 pullStatus/pullDistance + 五个手势回调):
140
+ // 少一个回调,React 就会在渲染期拿到 undefined 属性——stub 必须完整。
141
+ function pullDownHistoryMock() {
142
+ return {
143
+ usePullDownHistory: (options: {
144
+ disabled?: boolean;
145
+ onLoad?: () => Promise<void>;
146
+ scrollRef?: { current: HTMLElement | null };
147
+ }) => {
148
+ mocks.pullOptions = options;
149
+ return {
150
+ pullStatus: mocks.pullStatus,
151
+ pullDistance: mocks.pullDistance ?? 0,
152
+ handleTouchStart: () => {},
153
+ handleTouchMove: () => {},
154
+ handleTouchEnd: () => {},
155
+ handleTouchCancel: () => {},
156
+ handleWheel: () => {},
157
+ };
158
+ },
159
+ };
160
+ }
161
+ // 双世界同解:workspace 真源与模板副本(templates/template-agent/packages/agent-ui-kit)
162
+ // 是同名包,pnpm 按锁解析其一——两条路径都 mock,测试不依赖解析落点。
163
+ vi.mock('../../../packages/agent-ui-kit/src/hooks/use-pull-down-history', pullDownHistoryMock);
164
+ vi.mock('../../../templates/template-agent/packages/agent-ui-kit/src/hooks/use-pull-down-history', pullDownHistoryMock);
113
165
 
114
166
  vi.mock('@tbox.cn/app-agent-sdk-client', async (importOriginal) => {
115
167
  const actual = await importOriginal<typeof import('@tbox.cn/app-agent-sdk-client')>();
@@ -157,24 +209,31 @@ vi.mock('../src/client/MallHome', () => ({
157
209
 
158
210
  import { useChatConfigStore, ChatPage as KitChatPage } from '@tbox.cn/app-agent-ui-kit';
159
211
  import { createClientContext } from '@tbox.cn/app-agent-sdk-client';
212
+ import { homeSlotValue } from '../src/client/home-slot';
160
213
  import { clientModule as mallHomeClientModule } from '../src/client/index.js';
161
214
 
162
215
  // 页级装配(镜像 app registry.ts/index.tsx 组装;W3-2:域注册经模块 clientModule.register——
163
216
  // home 槽/覆盖卡/内联过滤全链经真实注册面)
217
+ // 默认装配与保留 MallHome 的显式装配分别验证。
164
218
  const clientCtx = createClientContext();
165
219
  mallHomeClientModule.register(clientCtx);
220
+ const legacySlots = createClientContext().slots;
221
+ legacySlots.register('home', homeSlotValue);
222
+ const customSlots = createClientContext().slots;
223
+ customSlots.register('home', () => <div data-custom-home>商圈推荐服务</div>);
224
+ customSlots.register('conversationOverlay', clientCtx.slots.resolve('conversationOverlay')!);
166
225
  const useFakeChatStore = Object.assign(
167
226
  (selector: (state: Record<string, unknown>) => unknown) => selector(mocks.state),
168
227
  { getState: () => mocks.state },
169
228
  );
170
229
 
171
- function IndexPage() {
230
+ function IndexPage({ slots = legacySlots }: { slots?: typeof clientCtx.slots }) {
172
231
  return (
173
232
  <KitChatPage
174
233
  store={useFakeChatStore as never}
175
234
  cards={{ ...clientCtx.cards.getAll(), ...clientCtx.cards.getOverrides() }}
176
235
  rawCards={clientCtx.cards.getAll()}
177
- slots={clientCtx.slots}
236
+ slots={slots}
178
237
  filterInlineCards={(cards) => clientCtx.cards.applyInlineFilters(cards)}
179
238
  />
180
239
  );
@@ -262,6 +321,26 @@ describe('IndexPage 首屏历史布局', () => {
262
321
  vi.unstubAllGlobals();
263
322
  });
264
323
 
324
+ it('mall 默认释放首页槽,空会话无需请求原首页数据', () => {
325
+ expect(clientCtx.slots.resolve('home')).toBeUndefined();
326
+ flushSync(() => root.render(<IndexPage slots={clientCtx.slots} />));
327
+ expect(container.querySelector('.mall-home')).toBeNull();
328
+ expect(mocks.loadHomeConfig).not.toHaveBeenCalled();
329
+ expect(mocks.loadLinkedPanelState).not.toHaveBeenCalled();
330
+ });
331
+
332
+ it.each(['member-login-cta', 'member-enrollment-cta'])('自定义首页与 %s 门禁共存,会话开始后浮层仍挂载', (cardType) => {
333
+ mocks.state.orphanCards = [card('gate-new', cardType, 30)];
334
+ flushSync(() => root.render(<IndexPage slots={customSlots} />));
335
+ expect(container.querySelector('[data-custom-home]')).not.toBeNull();
336
+ expect(container.querySelector('.mall-home')).toBeNull();
337
+ expect(document.body.querySelectorAll('[role="dialog"]')).toHaveLength(1);
338
+ expect(container.querySelector('[data-inline-card="gate-new"]')).toBeNull();
339
+ mocks.state.messages = [message('current-1')];
340
+ flushSync(() => root.render(<IndexPage slots={customSlots} />));
341
+ expect(document.body.querySelectorAll('[role="dialog"]')).toHaveLength(1);
342
+ });
343
+
265
344
  it('保留轻量下拉历史手势,但不再挂载原生吞滚动监听与整页回弹层', () => {
266
345
  flushSync(() => root.render(<IndexPage />));
267
346
  expect(mocks.pullOptions?.disabled).toBe(false);
@@ -425,7 +504,7 @@ describe('IndexPage 首屏历史布局', () => {
425
504
  expect(mocks.mallHomeProps?.showDevServices).toBe(true);
426
505
  });
427
506
 
428
- it('远离底部时主动发送 query,在新消息提交后滚动到底部', () => {
507
+ it('远离底部时主动发送 query,不抢回底部(回合锚定)', () => {
429
508
  mocks.state.messages = [message('current-1')];
430
509
  flushSync(() => root.render(<IndexPage />));
431
510
 
@@ -443,7 +522,8 @@ describe('IndexPage 首屏历史布局', () => {
443
522
 
444
523
  mocks.state.messages = [message('current-1'), message('current-2')];
445
524
  flushSync(() => root.render(<IndexPage />));
446
- expect(scrollTop).toBe(1600);
525
+ // 回合锚定:发送后不追底;anchor 元素在 mock 里无 rect,位置保持不变。
526
+ expect(scrollTop).toBe(200);
447
527
  });
448
528
 
449
529
  it('新对话立即回到首页顶部,并关闭自动落底意图', () => {
@@ -483,7 +563,7 @@ describe('IndexPage 首屏历史布局', () => {
483
563
  expect(container.querySelector('.mock-quick-commands')).not.toBeNull();
484
564
  });
485
565
 
486
- it('主动发送后跟随流式回复,用户再次上翻后后续更新不抢回底部', () => {
566
+ it('主动发送后流式更新不抢回底部(回合锚定)', () => {
487
567
  mocks.state.messages = [message('current-1')];
488
568
  flushSync(() => root.render(<IndexPage />));
489
569
 
@@ -500,7 +580,7 @@ describe('IndexPage 首屏历史布局', () => {
500
580
  flushSync(() => mocks.mallHomeProps?.onSend?.('最近有什么活动?'));
501
581
  mocks.state.messages = [message('current-1'), message('current-2')];
502
582
  flushSync(() => root.render(<IndexPage />));
503
- expect(scrollTop).toBe(1800);
583
+ expect(scrollTop).toBe(250);
504
584
 
505
585
  scrollHeight = 1900;
506
586
  mocks.state.messages = [
@@ -509,7 +589,7 @@ describe('IndexPage 首屏历史布局', () => {
509
589
  { ...message('assistant-1'), role: 'assistant', content: '正在查询', status: 'streaming' },
510
590
  ];
511
591
  flushSync(() => root.render(<IndexPage />));
512
- expect(scrollTop).toBe(1900);
592
+ expect(scrollTop).toBe(250);
513
593
 
514
594
  scrollHeight = 2000;
515
595
  mocks.state.messages = [
@@ -518,7 +598,7 @@ describe('IndexPage 首屏历史布局', () => {
518
598
  { ...message('assistant-1'), role: 'assistant', content: '正在查询活动', status: 'streaming' },
519
599
  ];
520
600
  flushSync(() => root.render(<IndexPage />));
521
- expect(scrollTop).toBe(2000);
601
+ expect(scrollTop).toBe(250);
522
602
 
523
603
  scrollTop = 800;
524
604
  flushSync(() => body.dispatchEvent(new Event('scroll', { bubbles: true })));
@@ -560,7 +640,7 @@ describe('IndexPage 首屏历史布局', () => {
560
640
  card('coupon-1', 'coupon-detail', 20),
561
641
  card('login-new', 'member-login-cta', 30),
562
642
  ];
563
- flushSync(() => root.render(<IndexPage />));
643
+ flushSync(() => root.render(<IndexPage slots={customSlots} />));
564
644
 
565
645
  expect(container.querySelector('[data-inline-card="coupon-1"]')).not.toBeNull();
566
646
  expect(container.querySelector('[data-inline-card="login-old"]')).toBeNull();
@@ -586,7 +666,7 @@ describe('IndexPage 首屏历史布局', () => {
586
666
  card('enroll-1', 'member-enrollment-cta', 10),
587
667
  card('coupon-1', 'coupon-detail', 20),
588
668
  ];
589
- flushSync(() => root.render(<IndexPage />));
669
+ flushSync(() => root.render(<IndexPage slots={customSlots} />));
590
670
 
591
671
  expect(container.querySelector('[data-inline-card="enroll-1"]')).toBeNull();
592
672
  expect(container.querySelector('[data-inline-card="coupon-1"]')).not.toBeNull();
@@ -604,7 +684,7 @@ describe('IndexPage 首屏历史布局', () => {
604
684
  mocks.state.messages = [message('user-1')];
605
685
  // URL mallId 直读(与 configureHelloContext 同源)
606
686
  window.history.replaceState({}, '', '/?mallId=mall-001');
607
- flushSync(() => root.render(<IndexPage />));
687
+ flushSync(() => root.render(<IndexPage slots={customSlots} />));
608
688
  expect(document.body.querySelector('[role="dialog"]')?.textContent).toContain('入会后继续');
609
689
 
610
690
  const button = document.body.querySelector('.member-login-sheet__login') as HTMLButtonElement;
@@ -624,7 +704,7 @@ describe('IndexPage 首屏历史布局', () => {
624
704
 
625
705
  it('authBlocked → 输入禁用 + QuickCommands 隐藏 + 重试入口触发 retryBootstrap', () => {
626
706
  mocks.state.authBlocked = '登录状态失效,无法连接对话服务,请重试';
627
- flushSync(() => root.render(<IndexPage />));
707
+ flushSync(() => root.render(<IndexPage slots={customSlots} />));
628
708
 
629
709
  // ChatInput 收到 blocked(message + onRetry)
630
710
  expect(mocks.chatInputProps?.blocked?.message).toBe('登录状态失效,无法连接对话服务,请重试');
@@ -638,7 +718,7 @@ describe('IndexPage 首屏历史布局', () => {
638
718
 
639
719
  it('runtimeStatus=failed(无 authBlocked)→ 同样禁用(提示兜底文案)', () => {
640
720
  mocks.state.runtimeStatus = 'failed';
641
- flushSync(() => root.render(<IndexPage />));
721
+ flushSync(() => root.render(<IndexPage slots={customSlots} />));
642
722
 
643
723
  expect(mocks.chatInputProps?.blocked?.message).toBe('登录失败,暂时无法对话');
644
724
  expect(container.querySelector('.mock-quick-commands')).toBeNull();
@@ -646,7 +726,7 @@ describe('IndexPage 首屏历史布局', () => {
646
726
 
647
727
  it('bootstrapping 过渡态不闪现禁用(回归钉:门控仅 failed 或 authBlocked)', () => {
648
728
  mocks.state.runtimeStatus = 'bootstrapping';
649
- flushSync(() => root.render(<IndexPage />));
729
+ flushSync(() => root.render(<IndexPage slots={customSlots} />));
650
730
 
651
731
  expect(mocks.chatInputProps?.blocked).toBeUndefined();
652
732
  expect(container.querySelector('.mock-chat-blocked')).toBeNull();
@@ -655,7 +735,7 @@ describe('IndexPage 首屏历史布局', () => {
655
735
 
656
736
  it('深链 query 消费后经 runAutoSend 移交发送(sendMessage 咽喉为 send 参数)', async () => {
657
737
  mocks.consumeAutoSendQuery.mockReturnValue('深链测试');
658
- flushSync(() => root.render(<IndexPage />));
738
+ flushSync(() => root.render(<IndexPage slots={customSlots} />));
659
739
  await vi.waitFor(() => {
660
740
  expect(mocks.runAutoSend).toHaveBeenCalledWith('深链测试', expect.any(Function));
661
741
  });
@@ -665,7 +745,7 @@ describe('IndexPage 首屏历史布局', () => {
665
745
  });
666
746
 
667
747
  it('无深链参数(consume 返回 null)→ 不动 runAutoSend', async () => {
668
- flushSync(() => root.render(<IndexPage />));
748
+ flushSync(() => root.render(<IndexPage slots={customSlots} />));
669
749
  await vi.waitFor(() => {
670
750
  expect(mocks.state.initConversation).toHaveBeenCalled();
671
751
  });
package/tsup.config.ts CHANGED
@@ -28,7 +28,6 @@ export default defineConfig({
28
28
  ],
29
29
  // 模块自持样式/素材出货链(kit 先例):顶层 loader 写法(esbuildOptions 内设被 tsup 覆盖失效)
30
30
  loader: {
31
- '.less': 'copy',
32
31
  '.jpg': 'copy',
33
32
  '.png': 'copy',
34
33
  '.svg': 'copy',
@@ -1,178 +0,0 @@
1
- .home-activity-detail {
2
- position: fixed;
3
- inset: 0;
4
- z-index: 1200;
5
-
6
- &__mask {
7
- position: absolute;
8
- inset: 0;
9
- width: 100%;
10
- height: 100%;
11
- padding: 0;
12
- background: rgba(19, 26, 16, 0);
13
- border: 0;
14
- transition: background-color 220ms ease-out;
15
- -webkit-tap-highlight-color: transparent;
16
- }
17
-
18
- &[data-phase='open'] &__mask { background: rgba(19, 26, 16, 0.42); }
19
-
20
- &__surface {
21
- position: fixed;
22
- z-index: 1;
23
- min-width: 0;
24
- min-height: 0;
25
- margin: 0;
26
- overflow: hidden;
27
- background: #ffffff;
28
- border-radius: 14PX;
29
- box-shadow: 0 20PX 60PX rgba(22, 42, 30, 0.22);
30
- contain: layout paint;
31
- transition:
32
- top 300ms cubic-bezier(0.22, 0.72, 0.24, 1),
33
- left 300ms cubic-bezier(0.22, 0.72, 0.24, 1),
34
- width 300ms cubic-bezier(0.22, 0.72, 0.24, 1),
35
- height 300ms cubic-bezier(0.22, 0.72, 0.24, 1),
36
- border-radius 300ms cubic-bezier(0.22, 0.72, 0.24, 1),
37
- opacity 180ms ease-out,
38
- transform 180ms ease-out;
39
- will-change: top, left, width, height, border-radius, transform;
40
- }
41
-
42
- &[data-phase='open'] &__surface { border-radius: 24PX; }
43
-
44
- &[data-motion='fade'][data-phase='opening'] &__surface {
45
- opacity: 0;
46
- transform: scale(0.985);
47
- }
48
-
49
- &[data-motion='fade'][data-phase='open'] &__surface {
50
- opacity: 1;
51
- transform: scale(1);
52
- }
53
-
54
- &[data-phase='closing'][data-return-origin='false'] &__surface {
55
- opacity: 0;
56
- transform: scale(0.98);
57
- }
58
-
59
- &__transition-visual,
60
- &__content {
61
- position: absolute;
62
- inset: 0;
63
- }
64
-
65
- &__transition-visual {
66
- z-index: 2;
67
- overflow: hidden;
68
- background: #fff8e9;
69
- opacity: 1;
70
- transition: opacity 150ms ease-out;
71
-
72
- .mall-home__linked-order {
73
- width: 100%;
74
- height: auto;
75
- margin: 0;
76
- aspect-ratio: 353 / 240;
77
- border-radius: 0;
78
- box-shadow: none;
79
- }
80
- }
81
-
82
- &[data-phase='open'] &__transition-visual {
83
- pointer-events: none;
84
- opacity: 0;
85
- transition-delay: 150ms;
86
- }
87
-
88
- &__content {
89
- z-index: 1;
90
- min-height: 0;
91
- padding-bottom: env(safe-area-inset-bottom, 0PX);
92
- overflow-y: auto;
93
- overscroll-behavior: contain;
94
- scrollbar-width: none;
95
- background: #ffffff;
96
- opacity: 0;
97
- transform: translateY(12PX);
98
- transition: opacity 170ms ease-out, transform 170ms ease-out;
99
- -webkit-overflow-scrolling: touch;
100
-
101
- &::-webkit-scrollbar { display: none; }
102
- }
103
-
104
- &[data-phase='open'] &__content {
105
- opacity: 1;
106
- transform: translateY(0);
107
- transition-delay: 150ms;
108
- }
109
-
110
- &[data-motion='fade'][data-phase='open'] &__content {
111
- transition-delay: 0ms;
112
- }
113
-
114
- &__close {
115
- position: absolute;
116
- top: max(14PX, env(safe-area-inset-top, 0PX));
117
- right: 14PX;
118
- z-index: 4;
119
- display: grid;
120
- width: 42PX;
121
- height: 42PX;
122
- padding: 0;
123
- color: #263022;
124
- background: rgba(255, 255, 255, 0.92);
125
- border: 1PX solid rgba(61, 71, 56, 0.1);
126
- border-radius: 50%;
127
- box-shadow: 0 8PX 24PX rgba(34, 50, 38, 0.16);
128
- opacity: 0;
129
- place-items: center;
130
- transition: opacity 140ms ease-out;
131
- -webkit-tap-highlight-color: transparent;
132
-
133
- &:focus-visible {
134
- outline: 3PX solid rgba(82, 126, 56, 0.38);
135
- outline-offset: 2PX;
136
- }
137
- }
138
-
139
- &[data-phase='open'] &__close {
140
- opacity: 1;
141
- transition-delay: 170ms;
142
- }
143
-
144
- &[data-motion='fade'][data-phase='open'] &__close {
145
- transition-delay: 80ms;
146
- }
147
-
148
- &__sr-title {
149
- position: absolute;
150
- width: 1PX;
151
- height: 1PX;
152
- margin: -1PX;
153
- padding: 0;
154
- overflow: hidden;
155
- white-space: nowrap;
156
- border: 0;
157
- clip: rect(0 0 0 0);
158
- }
159
- }
160
-
161
- @media (max-width: 600PX) {
162
- .home-activity-detail[data-phase='open'] .home-activity-detail__surface {
163
- width: 100vw !important;
164
- height: 100dvh !important;
165
- border-radius: 0;
166
- }
167
- }
168
-
169
- @media (prefers-reduced-motion: reduce) {
170
- .home-activity-detail__mask,
171
- .home-activity-detail__surface,
172
- .home-activity-detail__transition-visual,
173
- .home-activity-detail__content,
174
- .home-activity-detail__close {
175
- transition-duration: 1ms;
176
- transition-delay: 0ms;
177
- }
178
- }