@cypress-design/react-docmenu 0.4.2 → 0.5.0

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,5 +2,5 @@ $ yarn build:module && yarn build:types
2
2
  $ rollup -c ./rollup.config.mjs
3
3
  
4
4
  ./index.ts → ./dist/index.umd.js, ./dist/index.es.mjs...
5
- created ./dist/index.umd.js, ./dist/index.es.mjs in 15.2s
5
+ created ./dist/index.umd.js, ./dist/index.es.mjs in 15.7s
6
6
  $ tsc --project ./tsconfig.build.json
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @cypress-design/react-docmenu
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#357](https://github.com/cypress-io/cypress-design/pull/357) [`d0ed7c5`](https://github.com/cypress-io/cypress-design/commit/d0ed7c513df09d24639895ae1c7f2633eab8c254) Thanks [@elevatebart](https://github.com/elevatebart)! - feat: add transition when open/close collapsible menu
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`d0ed7c5`](https://github.com/cypress-io/cypress-design/commit/d0ed7c513df09d24639895ae1c7f2633eab8c254)]:
12
+ - @cypress-design/constants-docmenu@0.2.0
13
+
14
+ ## 0.4.3
15
+
16
+ ### Patch Changes
17
+
18
+ - [`02ff747`](https://github.com/cypress-io/cypress-design/commit/02ff747ed7aac0ad10a10b250d71d844d910a09c) Thanks [@elevatebart](https://github.com/elevatebart)! - fix: stop using open when it does not exist
19
+
3
20
  ## 0.4.2
4
21
 
5
22
  ### Patch Changes
package/DocMenu.tsx CHANGED
@@ -2,6 +2,7 @@ import * as React from 'react'
2
2
  import { NavGroup, NavItemLink } from '@cypress-design/constants-docmenu'
3
3
  import type { LinkComponentType } from './_DocLink'
4
4
  import { DocGroupElements } from './_DocGroup'
5
+ import { MarkerIsMovingContext } from './markerIsMoving'
5
6
 
6
7
  export type NavItem = NavGroup | NavItemLink
7
8
 
@@ -22,6 +23,7 @@ export const DocMenu: React.FC<DocMenuProps> = ({
22
23
  const [activeTop, setActiveTop] = React.useState(0)
23
24
  const [activeHeight, setActiveHeight] = React.useState(36)
24
25
  const [showMarker, setShowMarker] = React.useState(false)
26
+ const [markerIsMoving, setMarkerIsMoving] = React.useState(false)
25
27
 
26
28
  const container = React.useRef<HTMLDivElement>(null)
27
29
 
@@ -35,29 +37,34 @@ export const DocMenu: React.FC<DocMenuProps> = ({
35
37
  [],
36
38
  )
37
39
 
40
+ const setShowMarkerFalse = React.useCallback(() => setShowMarker(false), [])
41
+
38
42
  return (
39
- <div ref={container} className="relative">
40
- {showMarker && collapsible ? (
41
- <div
42
- className="absolute h-[36px] w-[4px] z-50 rounded-full bg-indigo-500 transition-all duration-300 ml-[6.5px] mt-[4px]"
43
- style={{
44
- top: `${activeTop + 4}px`,
45
- height: `${activeHeight - 8}px`,
46
- }}
43
+ <MarkerIsMovingContext.Provider
44
+ value={{ markerIsMoving, setMarkerIsMoving }}
45
+ >
46
+ <div ref={container} className="relative">
47
+ {showMarker && !markerIsMoving && collapsible ? (
48
+ <div
49
+ className="absolute h-[36px] w-[4px] z-50 rounded-full bg-indigo-500 transition-all duration-300 ml-[6.5px] mt-[4px]"
50
+ style={{
51
+ top: `${activeTop}px`,
52
+ height: `${activeHeight - 8}px`,
53
+ }}
54
+ />
55
+ ) : null}
56
+ <DocGroupElements
57
+ {...rest}
58
+ items={items}
59
+ activePath={activePath}
60
+ collapsible={collapsible}
61
+ depth={-1}
62
+ onActivePosition={setActivePosition}
63
+ LinkComponent={LinkComponent}
64
+ hideMarker={setShowMarkerFalse}
47
65
  />
48
- ) : null}
49
- <DocGroupElements
50
- {...rest}
51
- className={!open ? 'hidden' : undefined}
52
- items={items}
53
- activePath={activePath}
54
- collapsible={collapsible}
55
- depth={-1}
56
- onActivePosition={setActivePosition}
57
- LinkComponent={LinkComponent}
58
- hideMarker={() => setShowMarker(false)}
59
- />
60
- </div>
66
+ </div>
67
+ </MarkerIsMovingContext.Provider>
61
68
  )
62
69
  }
63
70
 
@@ -48,8 +48,12 @@ describe('<DocMenu/>', () => {
48
48
  <div className="w-[200px] mt-[60px] absolute">
49
49
  <DocMenu
50
50
  activePath={activeHref}
51
- LinkComponent={({ href, className, children }) => (
52
- <div className={className} onClick={() => setActiveHref(href)}>
51
+ LinkComponent={({ href, className, children, style }) => (
52
+ <div
53
+ style={style}
54
+ className={className}
55
+ onClick={() => setActiveHref(href)}
56
+ >
53
57
  {children}
54
58
  </div>
55
59
  )}
package/_DocGroup.tsx CHANGED
@@ -11,6 +11,19 @@ import {
11
11
  type DocLinkForward,
12
12
  type LinkComponentType,
13
13
  } from './_DocLink'
14
+ import { MarkerIsMovingContext } from './markerIsMoving'
15
+
16
+ const useIsMounted = () => {
17
+ const isMounted = React.useRef(false)
18
+
19
+ React.useEffect(() => {
20
+ isMounted.current = true
21
+ return () => {
22
+ isMounted.current = false
23
+ }
24
+ }, [])
25
+ return isMounted
26
+ }
14
27
 
15
28
  export interface DocGroupProps {
16
29
  group: NavGroup
@@ -43,6 +56,8 @@ export const DocGroup = React.forwardRef<DocGroupForward, DocGroupProps>(
43
56
  ) => {
44
57
  const [open, setOpen] = React.useState(group.collapsed !== true)
45
58
  const $groupElements = React.useRef<DocGroupElementsForward>(null)
59
+ const $listWrapper = React.useRef<HTMLDivElement>(null)
60
+ const didMount = useIsMounted()
46
61
 
47
62
  function toggleMenu(open: boolean) {
48
63
  if (!collapsible) return
@@ -72,29 +87,67 @@ export const DocGroup = React.forwardRef<DocGroupForward, DocGroupProps>(
72
87
  [onActivePosition, open],
73
88
  )
74
89
 
75
- function reTriggerSetActiveGroup() {
90
+ const { setMarkerIsMoving } = React.useContext(MarkerIsMovingContext)
91
+
92
+ function reTriggerSetActiveGroupParent() {
76
93
  $groupElements.current?.reTriggerSetActiveGroup()
77
94
  }
78
95
 
79
96
  React.useEffect(() => {
80
- if (hasActiveItemRecursively()) {
81
- if (open) {
82
- reTriggerSetActiveGroup()
97
+ if (didMount.current) {
98
+ $listWrapper.current?.addEventListener(
99
+ 'transitionstart',
100
+ () => {
101
+ setMarkerIsMoving(true)
102
+ },
103
+ { once: true },
104
+ )
105
+ $listWrapper.current?.addEventListener(
106
+ 'transitionend',
107
+ () => {
108
+ setMarkerIsMoving(false)
109
+ if (open || !hasActiveItemRecursively()) {
110
+ updateMarkerPosition?.()
111
+ }
112
+ },
113
+ { once: true },
114
+ )
115
+ }
116
+ }, [
117
+ open,
118
+ setMarkerIsMoving,
119
+ updateMarkerPosition,
120
+ hasActiveItemRecursively,
121
+ didMount,
122
+ ])
123
+
124
+ React.useEffect(() => {
125
+ if (didMount.current) {
126
+ if (hasActiveItemRecursively()) {
127
+ if (open) {
128
+ reTriggerSetActiveGroupParent()
129
+ } else {
130
+ hideMarker()
131
+ }
83
132
  } else {
84
- hideMarker()
133
+ updateMarkerPosition?.()
85
134
  }
86
- } else {
87
- updateMarkerPosition?.()
88
135
  }
89
- }, [open, updateMarkerPosition, hideMarker, hasActiveItemRecursively])
136
+ }, [
137
+ open,
138
+ updateMarkerPosition,
139
+ hideMarker,
140
+ hasActiveItemRecursively,
141
+ didMount,
142
+ ])
90
143
 
91
144
  React.useImperativeHandle(ref, () => ({
92
- reTriggerSetActiveGroup,
145
+ reTriggerSetActiveGroup: reTriggerSetActiveGroupParent,
93
146
  }))
94
147
 
95
148
  const onUpdateMarkerPosition = React.useCallback(() => {
96
149
  if (hasActiveItemRecursively()) {
97
- reTriggerSetActiveGroup()
150
+ reTriggerSetActiveGroupParent()
98
151
  } else {
99
152
  updateMarkerPosition?.()
100
153
  }
@@ -115,30 +168,38 @@ export const DocGroup = React.forwardRef<DocGroupForward, DocGroupProps>(
115
168
  <IconChevronDownSmall
116
169
  stroke-color="gray-400"
117
170
  size={depth ? '8' : '16'}
118
- className={clsx(
119
- 'absolute transform transition-transform left-0',
120
- {
121
- 'rotate-0': open,
122
- '-rotate-90': !open,
123
- 'ml-[16px]': depth,
124
- },
125
- )}
171
+ className={clsx(classes.expandedIcon, {
172
+ 'rotate-0': open,
173
+ '-rotate-90': !open,
174
+ 'ml-[28px]': depth,
175
+ })}
126
176
  />
127
177
  ) : null}
128
178
  {group.label}
129
179
  </Head>
130
- <DocGroupElements
131
- ref={$groupElements}
132
- className={!open ? 'hidden' : undefined}
133
- items={group.items}
134
- activePath={activePath}
135
- collapsible={collapsible}
136
- depth={depth}
137
- onActivePosition={setActivePosition}
138
- updateMarkerPosition={onUpdateMarkerPosition}
139
- LinkComponent={LinkComponent}
140
- hideMarker={hideMarker}
141
- />
180
+ <div
181
+ className={clsx('grid transition-all relative', {
182
+ 'grid-rows-[0fr]': !open && collapsible,
183
+ 'grid-rows-[1fr]': open || !collapsible,
184
+ })}
185
+ ref={$listWrapper}
186
+ >
187
+ {open && collapsible && depth === 0 ? (
188
+ <div className={classes.openListBorderLeft} />
189
+ ) : null}
190
+ <DocGroupElements
191
+ ref={$groupElements}
192
+ className="overflow-hidden"
193
+ items={group.items}
194
+ activePath={activePath}
195
+ collapsible={collapsible}
196
+ depth={depth}
197
+ onActivePosition={setActivePosition}
198
+ updateMarkerPosition={onUpdateMarkerPosition}
199
+ LinkComponent={LinkComponent}
200
+ hideMarker={hideMarker}
201
+ />
202
+ </div>
142
203
  </>
143
204
  )
144
205
  },
@@ -154,11 +215,11 @@ export interface DocGroupElementsProps
154
215
  depth: number
155
216
  LinkComponent: LinkComponentType
156
217
  hideMarker: () => void
157
- className: string | undefined
218
+ className?: string
158
219
  }
159
220
 
160
221
  export interface DocGroupElementsForward {
161
- reTriggerSetActiveGroup: () => void
222
+ reTriggerSetActiveGroup: (index?: number) => void
162
223
  }
163
224
 
164
225
  export const DocGroupElements = React.forwardRef<
@@ -195,35 +256,44 @@ export const DocGroupElements = React.forwardRef<
195
256
  [items, activePath],
196
257
  )
197
258
 
198
- function reTriggerSetActiveGroup() {
199
- $groups.current.forEach((group) => {
200
- group?.reTriggerSetActiveGroup()
201
- })
202
- $items.current.forEach((item) => {
203
- item?.setActiveMarkerPosition()
204
- })
205
- }
259
+ const reTriggerSetActiveGroup = React.useCallback(
260
+ (index: number = 0) => {
261
+ $items.current.forEach((item) => {
262
+ item?.setActiveMarkerPosition()
263
+ })
264
+ // calculate the index of the calling group in the list of groups
265
+ const indexGroup =
266
+ index -
267
+ // remove all the items that are not groups from the array and count them
268
+ items.slice(0, index).filter((item) => !('items' in item)).length
269
+
270
+ // only update groups that come after the toggled one
271
+ // others will not need to update the marker
272
+ // since they are "before" in the rendering tree
273
+ $groups.current.slice(indexGroup + 1).forEach((group) => {
274
+ group?.reTriggerSetActiveGroup()
275
+ })
276
+ },
277
+ [items],
278
+ )
206
279
 
207
280
  React.useImperativeHandle(ref, () => ({
208
281
  reTriggerSetActiveGroup,
209
282
  }))
210
283
 
211
- const onUpdateMarkerPosition = React.useCallback(() => {
212
- if (hasActiveItemRecursively()) {
213
- reTriggerSetActiveGroup()
214
- } else {
215
- updateMarkerPosition?.()
216
- }
217
- }, [hasActiveItemRecursively, updateMarkerPosition])
284
+ const onUpdateMarkerPosition = React.useCallback(
285
+ (index: number) => {
286
+ if (hasActiveItemRecursively()) {
287
+ reTriggerSetActiveGroup(index)
288
+ } else {
289
+ updateMarkerPosition?.()
290
+ }
291
+ },
292
+ [hasActiveItemRecursively, updateMarkerPosition, reTriggerSetActiveGroup],
293
+ )
218
294
 
219
295
  return (
220
- <ul
221
- {...rest}
222
- className={clsx('list-none p-0', className, {
223
- 'border-l border-gray-100': depth === 0 && collapsible,
224
- 'ml-[8px]': depth >= 0,
225
- })}
226
- >
296
+ <ul {...rest} className={clsx('list-none p-0', className)}>
227
297
  {items.map((item, index) =>
228
298
  'items' in item ? (
229
299
  <li key={index} className="relative list-none p-0">
@@ -238,7 +308,7 @@ export const DocGroupElements = React.forwardRef<
238
308
  LinkComponent={LinkComponent}
239
309
  hideMarker={hideMarker}
240
310
  onActivePosition={onActivePosition}
241
- updateMarkerPosition={onUpdateMarkerPosition}
311
+ updateMarkerPosition={() => onUpdateMarkerPosition(index)}
242
312
  />
243
313
  </li>
244
314
  ) : (
@@ -251,7 +321,9 @@ export const DocGroupElements = React.forwardRef<
251
321
  active={item.href === activePath}
252
322
  collapsible={collapsible}
253
323
  depth={depth}
254
- onActive={onActivePosition}
324
+ onActive={(opts) =>
325
+ depth < 0 ? hideMarker() : onActivePosition(opts)
326
+ }
255
327
  LinkComponent={LinkComponent}
256
328
  />
257
329
  ),
package/_DocLink.tsx CHANGED
@@ -1,11 +1,13 @@
1
1
  import * as React from 'react'
2
2
  import clsx from 'clsx'
3
3
  import { NavItemLink } from '@cypress-design/constants-docmenu'
4
+ import { MarkerIsMovingContext } from './markerIsMoving'
4
5
 
5
6
  export type LinkComponentType = React.ElementType<{
6
7
  href: string
7
- className?: string
8
- children?: React.ReactNode
8
+ className: string
9
+ style: React.CSSProperties
10
+ children: React.ReactNode
9
11
  }>
10
12
 
11
13
  export interface DocLinkProps {
@@ -28,13 +30,14 @@ export const DocLink = React.forwardRef<DocLinkForward, DocLinkProps>(
28
30
  ) => {
29
31
  const activeLIRef = React.useRef<HTMLLIElement>(null)
30
32
 
31
- // on mount, if the item is active,
32
- // send the top position to the parent
33
- React.useEffect(setActiveMarkerPosition, [onActive, active])
33
+ const { markerIsMoving, setMarkerIsMoving } = React.useContext(
34
+ MarkerIsMovingContext,
35
+ )
34
36
 
35
- function setActiveMarkerPosition() {
37
+ const setActiveMarkerPosition = () => {
36
38
  if (active) {
37
39
  const box = activeLIRef?.current?.getBoundingClientRect()
40
+
38
41
  onActive?.({
39
42
  top: box?.top || 0,
40
43
  height: box?.height || 0,
@@ -42,36 +45,42 @@ export const DocLink = React.forwardRef<DocLinkForward, DocLinkProps>(
42
45
  }
43
46
  }
44
47
 
48
+ // on mount, if the item is active,
49
+ // send the top position to the parent
50
+ React.useEffect(setActiveMarkerPosition, [
51
+ onActive,
52
+ active,
53
+ setMarkerIsMoving,
54
+ ])
55
+
45
56
  React.useImperativeHandle(ref, () => ({
46
57
  setActiveMarkerPosition,
47
58
  }))
48
59
 
49
60
  return (
50
- <li
51
- ref={activeLIRef}
52
- className={clsx('list-none p-0', {
53
- 'pl-[16px]': depth >= 0,
54
- })}
55
- >
61
+ <li ref={activeLIRef} className="list-none p-0">
56
62
  <LinkComponent
57
- className={clsx('group relative inline-block pl-[24px]', {
63
+ className={clsx('group relative block w-full pl-[24px]', {
58
64
  'text-indigo-500': active,
65
+ 'text-gray-700 dark:text-gray-500': !active,
59
66
  'py-[8px] text-[16px] leading-[24px]': depth < 0,
60
- 'py-[12px] leading-[20px] text-[14px]': depth >= 0,
67
+ 'leading-[20px] text-[14px] py-[12px]': depth >= 0,
61
68
  })}
62
69
  href={item.href}
70
+ style={{
71
+ paddingLeft: depth >= 0 ? `${depth * 12 + 48}px` : undefined,
72
+ }}
63
73
  >
64
74
  {depth >= 0 ? (
65
75
  <div
66
76
  className={clsx(
67
- 'absolute w-[4px] z-10 top-[4px] bottom-[4px] rounded-full hidden',
77
+ 'left-[6.5px] absolute top-[4px] bottom-[4px] w-[4px] z-10 rounded-full',
68
78
  {
79
+ hidden: !markerIsMoving || !active,
69
80
  'group-hover:block bg-gray-300': !active && collapsible,
81
+ 'bg-indigo-500': active && markerIsMoving,
70
82
  },
71
83
  )}
72
- style={{
73
- left: `-${18.5 + depth * 8}px`,
74
- }}
75
84
  />
76
85
  ) : null}
77
86
  {item.label}
@@ -1 +1 @@
1
- {"version":3,"file":"DocMenu.d.ts","sourceRoot":"./","sources":["DocMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAGnD,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAA;AAE5C,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IAC1E,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,EAAE,iBAAiB,CAAA;CAClC;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA+C1C,CAAA;AAED,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"DocMenu.d.ts","sourceRoot":"./","sources":["DocMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAInD,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAA;AAE5C,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IAC1E,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,EAAE,iBAAiB,CAAA;CAClC;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAqD1C,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -30,10 +30,10 @@ export interface DocGroupElementsProps extends React.HTMLAttributes<HTMLUListEle
30
30
  depth: number;
31
31
  LinkComponent: LinkComponentType;
32
32
  hideMarker: () => void;
33
- className: string | undefined;
33
+ className?: string;
34
34
  }
35
35
  export interface DocGroupElementsForward {
36
- reTriggerSetActiveGroup: () => void;
36
+ reTriggerSetActiveGroup: (index?: number) => void;
37
37
  }
38
38
  export declare const DocGroupElements: React.ForwardRefExoticComponent<DocGroupElementsProps & React.RefAttributes<DocGroupElementsForward>>;
39
39
  //# sourceMappingURL=_DocGroup.d.ts.map
@@ -1 +1 @@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CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,iBAAiB,CAAA;IAChC,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,uBAAuB,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAClD;AAED,eAAO,MAAM,gBAAgB,uGA6G5B,CAAA"}
@@ -2,8 +2,9 @@ import * as React from 'react';
2
2
  import { NavItemLink } from '@cypress-design/constants-docmenu';
3
3
  export type LinkComponentType = React.ElementType<{
4
4
  href: string;
5
- className?: string;
6
- children?: React.ReactNode;
5
+ className: string;
6
+ style: React.CSSProperties;
7
+ children: React.ReactNode;
7
8
  }>;
8
9
  export interface DocLinkProps {
9
10
  item: NavItemLink;
@@ -1 +1 @@
1
- {"version":3,"file":"_DocLink.d.ts","sourceRoot":"./","sources":["_DocLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAE/D,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CAAC;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAC,CAAA;AAEF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAC1D,aAAa,CAAC,EAAE,iBAAiB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