@expo/styleguide-search-ui 3.1.4 → 3.2.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.
package/dist/expo-search-ui.css
CHANGED
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
@keyframes searchUIBarLoader {
|
|
2
|
-
0% {
|
|
3
|
-
width: 0;
|
|
4
|
-
}
|
|
5
|
-
80% {
|
|
6
|
-
width: 100%;
|
|
7
|
-
opacity: 1;
|
|
8
|
-
}
|
|
9
|
-
100% {
|
|
10
|
-
width: 100%;
|
|
11
|
-
opacity: 0;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
#__next[aria-hidden] {
|
|
16
|
-
filter: blur(3.33px);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
1
|
[cmdk-overlay] {
|
|
20
2
|
background-color: rgba(0, 0, 0, 0.33);
|
|
21
3
|
height: 100vh;
|
|
@@ -42,16 +24,6 @@
|
|
|
42
24
|
z-index: 1001;
|
|
43
25
|
}
|
|
44
26
|
|
|
45
|
-
@media screen and (max-width: 788px) {
|
|
46
|
-
[cmdk-root] {
|
|
47
|
-
top: 50%;
|
|
48
|
-
width: 96vw;
|
|
49
|
-
min-width: 96vw;
|
|
50
|
-
min-height: 96dvh;
|
|
51
|
-
max-height: 96dvh;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
27
|
[cmdk-root] kbd, .cmdk-trigger kbd {
|
|
56
28
|
font-size: 0.8125rem;
|
|
57
29
|
line-height: 19px;
|
|
@@ -77,16 +49,16 @@
|
|
|
77
49
|
color: var(--expo-theme-text-default);
|
|
78
50
|
flex: 1;
|
|
79
51
|
font: inherit;
|
|
80
|
-
height: 100%;
|
|
81
52
|
outline: none;
|
|
82
|
-
padding: 0
|
|
53
|
+
padding: 0 40px;
|
|
83
54
|
min-height: 46px;
|
|
84
|
-
margin: 16px
|
|
55
|
+
margin: 16px 0 12px;
|
|
85
56
|
border: 1px solid var(--expo-theme-border-default);
|
|
86
57
|
border-radius: 6px;
|
|
87
|
-
width: calc(100% - 32px);
|
|
88
58
|
box-sizing: border-box;
|
|
89
59
|
box-shadow: var(--expo-theme-shadows-xs);
|
|
60
|
+
position: relative;
|
|
61
|
+
z-index: 100;
|
|
90
62
|
}
|
|
91
63
|
|
|
92
64
|
[cmdk-input]::placeholder {
|
|
@@ -132,15 +104,153 @@
|
|
|
132
104
|
}
|
|
133
105
|
|
|
134
106
|
[cmdk-list], .result-container {
|
|
135
|
-
height: calc(75vh - 50px -
|
|
136
|
-
max-height: calc(75vh - 50px -
|
|
107
|
+
height: calc(75vh - 50px - 54px - 20px);
|
|
108
|
+
max-height: calc(75vh - 50px - 54px - 20px);
|
|
137
109
|
overflow: auto;
|
|
138
110
|
overscroll-behavior: contain;
|
|
139
|
-
border-top: 1px solid var(--expo-theme-border-default);
|
|
140
|
-
border-bottom: 1px solid var(--expo-theme-border-default);
|
|
141
111
|
padding: 0 16px 12px;
|
|
112
|
+
margin: 1px 0;
|
|
142
113
|
}
|
|
143
114
|
|
|
115
|
+
[cmdk-separator] {
|
|
116
|
+
height: 1px;
|
|
117
|
+
width: 100%;
|
|
118
|
+
background: var(--expo-theme-border-default);
|
|
119
|
+
margin: 4px 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[cmdk-group-heading] {
|
|
123
|
+
font-size: 0.75rem;
|
|
124
|
+
line-height: 1.58;
|
|
125
|
+
user-select: none;
|
|
126
|
+
color: var(--expo-theme-text-secondary);
|
|
127
|
+
padding: 16px 8px 8px;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
gap: 4px;
|
|
131
|
+
margin: 0 2px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
[cmdk-empty] {
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
justify-content: center;
|
|
138
|
+
white-space: pre-wrap;
|
|
139
|
+
padding: 32px 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
html.dark-theme [cmdk-item] mark {
|
|
143
|
+
background: var(--blue-6);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
html.dark-theme [cmdk-item][data-selected='true'] mark {
|
|
147
|
+
background: var(--blue-7);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
[cmdk-list]::-webkit-scrollbar, .result-container::-webkit-scrollbar {
|
|
151
|
+
width: 6px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
[cmdk-list]::-webkit-scrollbar-track, .result-container::-webkit-scrollbar-track {
|
|
155
|
+
background-color: transparent;
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
[cmdk-list]::-webkit-scrollbar-thumb, .result-container::-webkit-scrollbar-thumb {
|
|
160
|
+
background-color: var(--slate-5);
|
|
161
|
+
border-radius: 10px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
[cmdk-list]::-webkit-scrollbar-thumb:hover, .result-container::-webkit-scrollbar-thumb:hover {
|
|
165
|
+
background-color: var(--slate-6);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Mobile */
|
|
169
|
+
|
|
170
|
+
@media screen and (max-width: 788px) {
|
|
171
|
+
[cmdk-root] {
|
|
172
|
+
top: 50%;
|
|
173
|
+
width: 96vw;
|
|
174
|
+
min-width: 96vw;
|
|
175
|
+
min-height: 96dvh;
|
|
176
|
+
max-height: 96dvh;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@media screen and (max-width: 788px) {
|
|
181
|
+
[cmdk-list], .result-container {
|
|
182
|
+
height: calc(96dvh - 50px - 108px - 20px);
|
|
183
|
+
max-height: calc(96dvh - 50px - 108px - 20px);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Mode tabs */
|
|
188
|
+
|
|
189
|
+
.tabs-container {
|
|
190
|
+
box-shadow: inset 0 0 4px var(--expo-theme-background-hover);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
html.dark-theme .tabs-container {
|
|
194
|
+
box-shadow: inset 0 0 4px var(--expo-theme-background-screen);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.tabs-container-ai {
|
|
198
|
+
&:before {
|
|
199
|
+
content: '';
|
|
200
|
+
position: absolute;
|
|
201
|
+
top: -2px;
|
|
202
|
+
left: -2px;
|
|
203
|
+
width: calc(100% + 4px);
|
|
204
|
+
height: calc(100% + 4px);
|
|
205
|
+
filter: blur(7px);
|
|
206
|
+
opacity: 0.15;
|
|
207
|
+
background: linear-gradient(
|
|
208
|
+
45deg,
|
|
209
|
+
#fb0094,
|
|
210
|
+
#0000ff,
|
|
211
|
+
#00ff00,
|
|
212
|
+
#ffff00,
|
|
213
|
+
#ff0000,
|
|
214
|
+
#fb0094,
|
|
215
|
+
#0000ff,
|
|
216
|
+
#00ff00,
|
|
217
|
+
#ffff00,
|
|
218
|
+
#ff0000
|
|
219
|
+
);
|
|
220
|
+
background-size: 400%;
|
|
221
|
+
z-index: -1;
|
|
222
|
+
animation: rainbow 30s linear infinite;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
html.dark-theme .tabs-container-ai {
|
|
227
|
+
&:before {
|
|
228
|
+
opacity: 0.13;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.mode-tab {
|
|
233
|
+
box-shadow: inset 0 0 14px var(--slate-11);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
html.dark-theme .mode-tab {
|
|
237
|
+
box-shadow: inset 0 0 14px var(--slate-9);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@keyframes rainbow {
|
|
241
|
+
0% {
|
|
242
|
+
background-position: 0 0;
|
|
243
|
+
}
|
|
244
|
+
50.01% {
|
|
245
|
+
background-position: 200% 0;
|
|
246
|
+
}
|
|
247
|
+
100% {
|
|
248
|
+
background-position: 0 0;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* AI prompt */
|
|
253
|
+
|
|
144
254
|
.prompt-result {
|
|
145
255
|
> * {
|
|
146
256
|
@apply mb-2.5 last:mb-0;
|
|
@@ -203,64 +313,52 @@
|
|
|
203
313
|
}
|
|
204
314
|
}
|
|
205
315
|
|
|
206
|
-
|
|
207
|
-
[cmdk-list], .result-container {
|
|
208
|
-
height: calc(96dvh - 50px - 50px - 20px);
|
|
209
|
-
max-height: calc(96dvh - 50px - 50px - 20px);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
[cmdk-separator] {
|
|
214
|
-
height: 1px;
|
|
215
|
-
width: 100%;
|
|
216
|
-
background: var(--expo-theme-border-default);
|
|
217
|
-
margin: 4px 0;
|
|
218
|
-
}
|
|
316
|
+
/* Loaders */
|
|
219
317
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
318
|
+
@keyframes searchUIBarLoader {
|
|
319
|
+
0% {
|
|
320
|
+
width: 0;
|
|
321
|
+
}
|
|
322
|
+
80% {
|
|
323
|
+
width: 100%;
|
|
324
|
+
opacity: 1;
|
|
325
|
+
}
|
|
326
|
+
100% {
|
|
327
|
+
width: 100%;
|
|
328
|
+
opacity: 0;
|
|
329
|
+
}
|
|
230
330
|
}
|
|
231
331
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
justify-content: center;
|
|
236
|
-
white-space: pre-wrap;
|
|
237
|
-
padding: 32px 0;
|
|
332
|
+
.dots-loader span {
|
|
333
|
+
opacity: 0;
|
|
334
|
+
animation: fade 1s infinite;
|
|
238
335
|
}
|
|
239
336
|
|
|
240
|
-
|
|
241
|
-
|
|
337
|
+
.dots-loader span:nth-child(1) {
|
|
338
|
+
animation-delay: 0s;
|
|
242
339
|
}
|
|
243
340
|
|
|
244
|
-
|
|
245
|
-
|
|
341
|
+
.dots-loader span:nth-child(2) {
|
|
342
|
+
animation-delay: 0.2s;
|
|
246
343
|
}
|
|
247
344
|
|
|
248
|
-
|
|
249
|
-
|
|
345
|
+
.dots-loader span:nth-child(3) {
|
|
346
|
+
animation-delay: 0.4s;
|
|
250
347
|
}
|
|
251
348
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
349
|
+
@keyframes fade {
|
|
350
|
+
0%, 80%, 100% {
|
|
351
|
+
opacity: 0;
|
|
352
|
+
}
|
|
353
|
+
40% {
|
|
354
|
+
opacity: 1;
|
|
355
|
+
}
|
|
255
356
|
}
|
|
256
357
|
|
|
257
|
-
|
|
258
|
-
background-color: var(--slate-5);
|
|
259
|
-
border-radius: 10px;
|
|
260
|
-
}
|
|
358
|
+
/* Misc */
|
|
261
359
|
|
|
262
|
-
[
|
|
263
|
-
|
|
360
|
+
#__next[aria-hidden] {
|
|
361
|
+
filter: blur(3.33px);
|
|
264
362
|
}
|
|
265
363
|
|
|
266
364
|
.grecaptcha-badge {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { addHighlight } from './src/utils';
|
|
|
5
5
|
export * from './src/types';
|
|
6
6
|
export declare const CommandItemBase: import("react").ForwardRefExoticComponent<{
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
-
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "value" | "
|
|
8
|
+
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "value" | "disabled" | "onSelect"> & {
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
onSelect?: (value: string) => void;
|
|
11
11
|
value?: string;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("cmdk"),t=require("@kapaai/react-sdk"),a=require("react"),l=require("@expo/styleguide-icons/outline/SearchSmIcon"),n=require("@expo/styleguide-icons/outline/Stars02Icon"),r=require("@expo/styleguide-icons/outline/XIcon"),s=require("lodash.groupby"),c=require("@expo/styleguide"),m=require("@expo/styleguide-icons/outline/ArrowUpRightIcon"),o=require("@expo/styleguide-icons/outline/ChevronRightIcon"),i=require("@sanity/client"),u=require("@sanity/image-url"),d=require("@expo/styleguide-icons/custom/GithubIcon"),p=require("@expo/styleguide-icons/outline/Download01Icon"),g=require("@expo/styleguide-icons/outline/Star01Icon"),x=require("@expo/styleguide-icons/custom/PlanEnterpriseIcon"),E=require("@expo/styleguide-icons/outline/BookOpen02Icon"),h=require("@expo/styleguide-icons/outline/GraduationHat02Icon"),C=require("@expo/styleguide-icons/outline/Hash02Icon"),v=require("@expo/styleguide-icons/outline/Home02Icon"),y=require("@expo/styleguide-icons/outline/ClipboardIcon"),f=require("@expo/styleguide-icons/outline/ThumbsDownIcon"),N=require("@expo/styleguide-icons/outline/ThumbsUpIcon"),b=require("@expo/styleguide-icons/solid/ThumbsDownSolidIcon"),k=require("@expo/styleguide-icons/solid/ThumbsUpSolidIcon"),I=require("markdown-to-jsx");const w=({isLoading:e,className:t})=>a.createElement("div",{role:"progressbar",className:c.mergeClasses("bg-palette-blue9 h-0.5 absolute left-px",e&&"animate-[searchUIBarLoader_2s_infinite_ease-in-out]",t)});function S(){return a.createElement(o.ChevronRightIcon,{className:"icon-xs text-icon-quaternary inline-block relative mx-1 -top-px"})}const q=()=>a.createElement(m.ArrowUpRightIcon,{className:"text-icon-tertiary self-center ml-auto shrink-0"}),L=({className:e})=>a.createElement("svg",{viewBox:"-11.5 -10.23174 23 20.46348",className:c.mergeClasses("icon-md text-icon-secondary",e)},a.createElement("circle",{cx:"0",cy:"0",r:"2.05",fill:"currentColor"}),a.createElement("g",{stroke:"currentColor",strokeWidth:"1",fill:"none"},a.createElement("ellipse",{rx:"11",ry:"4.2"}),a.createElement("ellipse",{rx:"11",ry:"4.2",transform:"rotate(60)"}),a.createElement("ellipse",{rx:"11",ry:"4.2",transform:"rotate(120)"}))),H=({className:e})=>a.createElement("svg",{width:"77",height:"19",viewBox:"0 0 2197 500",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-label":"Algolia",className:e,role:"img"},a.createElement("g",{clipPath:"url(#clip0_1_2)"},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1070.38 275.3V5.90999C1070.38 2.27998 1067.14 -0.480015 1063.56 0.0799852L1013.1 8.01999C1010.23 8.46999 1008.11 10.95 1008.11 13.86L1008.28 287.08C1008.28 300 1008.28 379.78 1104.25 382.57C1107.58 382.67 1110.34 379.99 1110.34 376.66V335.88C1110.34 332.92 1108.15 330.37 1105.22 330.04C1070.37 326.03 1070.37 282.47 1070.37 275.32L1070.38 275.3Z"}),a.createElement("path",{d:"M1902.56 104.73H1851.78C1848.52 104.73 1845.88 107.372 1845.88 110.63V376.73C1845.88 379.988 1848.52 382.63 1851.78 382.63H1902.56C1905.82 382.63 1908.46 379.988 1908.46 376.73V110.63C1908.46 107.372 1905.82 104.73 1902.56 104.73Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1851.78 71.38H1902.55C1905.81 71.38 1908.45 68.74 1908.45 65.48V5.90001C1908.45 2.28001 1905.21 -0.489988 1901.63 0.0700121L1850.86 8.02001C1847.99 8.47001 1845.87 10.94 1845.87 13.85V65.47C1845.87 68.73 1848.51 71.37 1851.77 71.37L1851.78 71.38Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1764.03 275.3V5.90999C1764.03 2.27998 1760.79 -0.480015 1757.21 0.0799852L1706.75 8.01999C1703.88 8.46999 1701.76 10.95 1701.76 13.86L1701.93 287.08C1701.93 300 1701.93 379.78 1797.9 382.57C1801.23 382.67 1803.99 379.99 1803.99 376.66V335.88C1803.99 332.92 1801.8 330.37 1798.87 330.04C1764.02 326.03 1764.02 282.47 1764.02 275.32L1764.03 275.3Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1631.95 142.72C1620.81 130.47 1607.12 121.07 1591.17 114.41C1575.25 107.88 1557.91 104.56 1539.1 104.56C1520.32 104.56 1502.95 107.73 1487.18 114.41C1471.59 121.07 1457.89 130.46 1446.42 142.72C1434.95 154.95 1426.04 169.59 1419.66 186.75C1413.28 203.92 1410.42 224.12 1410.42 245.11C1410.42 266.1 1413.61 281.98 1419.97 299.32C1426.35 316.64 1435.11 331.43 1446.42 343.68C1457.71 355.91 1471.25 365.3 1487.02 372.14C1502.79 378.97 1527.14 382.47 1539.42 382.62C1551.67 382.62 1576.2 378.8 1592.12 372.14C1608.04 365.46 1621.58 355.91 1632.9 343.68C1644.19 331.43 1652.95 316.64 1659.15 299.32C1665.37 281.98 1668.39 266.1 1668.39 245.11C1668.39 224.12 1665.05 203.92 1658.36 186.75C1651.98 169.58 1643.22 154.95 1631.93 142.72H1631.95ZM1587.52 306.47C1576.05 322.22 1559.96 330.17 1539.43 330.17C1518.88 330.17 1502.8 322.37 1491.33 306.47C1479.86 290.72 1474.12 272.46 1474.12 245.27C1474.12 218.38 1479.71 196.13 1491.18 180.4C1502.63 164.65 1518.72 156.88 1539.25 156.88C1559.8 156.88 1575.88 164.66 1587.34 180.4C1598.81 195.97 1604.7 218.38 1604.7 245.27C1604.7 272.46 1598.98 290.57 1587.51 306.47H1587.52Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M894.42 104.73H845.09C796.73 104.73 754.18 130.21 729.34 168.83C714.82 191.41 706.35 218.46 706.35 247.56C706.35 292.45 726.48 332.48 757.94 358.66C760.87 361.26 763.99 363.64 767.25 365.8C780.11 374.29 795.36 379.27 811.77 379.27C813 379.27 814.23 379.24 815.45 379.18C815.81 379.16 816.16 379.13 816.52 379.11C817.39 379.06 818.27 379 819.14 378.91C819.48 378.88 819.82 378.83 820.16 378.79C821.07 378.69 821.98 378.58 822.89 378.45C823.1 378.42 823.31 378.38 823.52 378.35C856.41 373.28 885.08 347.53 894.42 315.54V373.37C894.42 376.63 897.06 379.27 900.32 379.27H950.74C954 379.27 956.64 376.63 956.64 373.37V110.63C956.64 107.37 954 104.73 950.74 104.73H894.42ZM894.42 311.65C882.22 321.81 866.45 325.63 849.58 326.77C849.42 326.78 849.25 326.8 849.09 326.81C847.97 326.88 846.85 326.91 845.73 326.91C803.49 326.91 768.61 291.02 768.61 247.54C768.61 237.29 770.57 227.53 774.03 218.56C785.25 189.44 812.8 168.82 845.09 168.82H894.42V311.65Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2133.97 104.73H2084.64C2036.28 104.73 1993.73 130.21 1968.89 168.83C1954.37 191.41 1945.9 218.46 1945.9 247.56C1945.9 292.45 1966.03 332.48 1997.49 358.66C2000.42 361.26 2003.54 363.64 2006.8 365.8C2019.66 374.29 2034.91 379.27 2051.32 379.27C2052.55 379.27 2053.78 379.24 2055 379.18C2055.36 379.16 2055.71 379.13 2056.07 379.11C2056.94 379.06 2057.82 379 2058.69 378.91C2059.03 378.88 2059.37 378.83 2059.71 378.79C2060.62 378.69 2061.53 378.58 2062.44 378.45C2062.65 378.42 2062.86 378.38 2063.07 378.35C2095.96 373.28 2124.63 347.53 2133.97 315.54V373.37C2133.97 376.63 2136.61 379.27 2139.87 379.27H2190.29C2193.55 379.27 2196.19 376.63 2196.19 373.37V110.63C2196.19 107.37 2193.55 104.73 2190.29 104.73H2133.97ZM2133.97 311.65C2121.77 321.81 2106 325.63 2089.13 326.77C2088.97 326.78 2088.8 326.8 2088.64 326.81C2087.52 326.88 2086.4 326.91 2085.28 326.91C2043.04 326.91 2008.16 291.02 2008.16 247.54C2008.16 237.29 2010.12 227.53 2013.58 218.56C2024.8 189.44 2052.35 168.82 2084.64 168.82H2133.97V311.65Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1314.05 104.73H1264.72C1216.36 104.73 1173.81 130.21 1148.97 168.83C1137.18 187.17 1129.37 208.47 1126.86 231.42C1126.28 236.72 1125.98 242.1 1125.98 247.56C1125.98 253.02 1126.29 258.71 1126.91 264.15C1131.19 302.24 1150.05 335.76 1177.57 358.67C1180.5 361.27 1183.62 363.65 1186.88 365.81C1199.74 374.3 1214.99 379.28 1231.4 379.28C1249.39 379.28 1266.01 373.35 1279.56 363.31C1295.85 351.73 1308.44 334.77 1314.04 315.56V365.82H1313.93V376.9C1313.93 398.74 1308.22 415.17 1296.59 426.26C1284.98 437.34 1265.55 442.89 1238.34 442.89C1227.22 442.89 1209.55 442.3 1191.74 440.48C1188.91 440.19 1186.28 441.98 1185.47 444.7L1172.69 487.81C1171.67 491.27 1173.96 494.83 1177.52 495.34C1199.04 498.42 1220.04 500.02 1232.17 500.02C1281.08 500.02 1317.33 489.27 1341.06 467.81C1362.54 448.4 1374.21 418.92 1376.26 379.29V110.63C1376.26 107.37 1373.62 104.73 1370.36 104.73H1314.04H1314.05ZM1314.05 168.83C1314.05 168.83 1314.7 307.96 1314.05 312.19C1301.97 321.96 1286.94 325.78 1270.56 326.89C1270.4 326.9 1270.23 326.92 1270.07 326.93C1268.95 327 1267.83 327.03 1266.71 327.03C1265.39 327.03 1264.08 327 1262.77 326.93C1222.36 324.82 1188.25 289.67 1188.25 247.55C1188.25 237.3 1190.21 227.54 1193.67 218.57C1204.89 189.45 1232.44 168.83 1264.73 168.83H1314.06H1314.05Z"}),a.createElement("path",{d:"M249.83 0C113.3 0 2.00001 110.09 0.0300098 246.16C-1.96999 384.35 110.15 498.86 248.36 499.66C291.04 499.91 332.15 489.47 368.66 469.63C372.22 467.7 372.77 462.8 369.74 460.12L346.36 439.4C341.61 435.19 334.85 434 329 436.48C303.52 447.32 275.83 452.86 247.29 452.51C135.61 451.14 45.38 358.22 47.16 246.55C48.92 136.29 139.16 47.14 249.83 47.14H452.52V407.41L337.52 305.23C333.8 301.92 328.1 302.57 325.1 306.54C306.64 330.98 276.57 346.18 243.17 343.88C196.84 340.68 159.3 303.38 155.83 257.07C151.68 201.83 195.46 155.55 249.83 155.55C299.01 155.55 339.51 193.4 343.74 241.5C344.12 245.78 346.05 249.77 349.26 252.62L379.21 279.17C382.61 282.18 388 280.34 388.84 275.87C391 264.32 391.76 252.29 390.91 239.95C386.09 169.61 329.11 113.02 258.74 108.69C178.06 103.72 110.61 166.83 108.47 245.94C106.38 323.04 169.55 389.5 246.66 391.2C278.85 391.91 308.69 381.79 332.8 364.25L483.06 497.45C489.5 503.16 499.67 498.59 499.67 489.98V9.48C499.66 4.25 495.42 0 490.18 0H249.83Z"})),a.createElement("defs",null,a.createElement("clipPath",null,a.createElement("rect",{width:2196.2,height:500})))),M=({className:e})=>a.createElement("svg",{height:"19",width:"72",viewBox:"0 0 989 262",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:e},a.createElement("path",{d:"m345.202 187.216c-1.602 0-2.9-1.3-2.898-2.903l.192-131.3758c.003-1.599 1.3-2.8941 2.899-2.8941h21.913c1.601 0 2.899 1.2977 2.899 2.8983v68.9056c0 2.83 3.639 3.982 5.268 1.668l30.607-43.4845c.543-.7712 1.427-1.2301 2.37-1.2301h26.556c2.365 0 3.734 2.6785 2.35 4.5952l-34.565 47.8594c-.751 1.04-.73 2.45.053 3.466l36.845 47.828c1.468 1.905.11 4.667-2.296 4.667h-28.159c-.933 0-1.808-.449-2.353-1.206l-31.425-43.693c-1.644-2.285-5.251-1.123-5.251 1.692v40.308c0 1.601-1.298 2.899-2.899 2.899z"}),a.createElement("path",{d:"m477.369 190.227c-7.763 0-14.355-1.472-19.776-4.417-5.354-3.011-9.436-6.993-12.247-11.945-2.744-5.02-4.116-10.541-4.116-16.564 0-5.019.77-9.603 2.309-13.753 1.539-4.149 4.016-7.796 7.429-10.941 3.48-3.213 8.131-5.89 13.953-8.031 4.016-1.473 8.801-2.778 14.355-3.915 5.555-1.138 11.846-2.209 18.872-3.213 4.589-.699 9.476-1.441 14.664-2.225 1.701-.258 2.481 2.042.974 2.873-1.028.566-2.292-.179-2.378-1.35-.372-5.108-1.881-8.956-4.526-11.544-3.079-3.012-8.232-4.518-15.459-4.518-4.016 0-8.198.971-12.548 2.911-3.548 1.583-6.228 4.168-8.04 7.754-.706 1.398-2.282 2.21-3.774 1.737l-19.281-6.114c-1.515-.48-2.37-2.096-1.811-3.583 2.906-7.7358 7.751-14.125 14.535-19.1678 7.563-5.6216 17.869-8.4323 30.919-8.4323 9.57 0 18.069 1.4723 25.497 4.4169 7.429 2.9446 13.05 8.0307 16.865 15.2584 2.142 4.0154 3.413 8.0308 3.815 12.0458.401 4.016.602 8.5.602 13.452v63.355c0 1.601-1.298 2.899-2.898 2.899h-18.095c-1.601 0-2.899-1.298-2.899-2.899v-14.76c0-1.47 1.876-2.088 2.75-.906.395.534.399 1.264.002 1.796-5.102 6.832-10.603 11.819-16.504 14.962-6.09 3.212-13.82 4.818-23.189 4.818zm5.822-21.482c5.019 0 9.236-.87 12.649-2.61 3.48-1.807 6.223-3.848 8.231-6.123 2.075-2.276 3.48-4.183 4.216-5.722 1.406-2.945 2.209-6.358 2.41-10.24.211-3.117.339-5.818.383-8.101.017-.882.847-1.529 1.703-1.315 1.428.357 1.345 2.42-.106 2.665-5.205.882-9.612 1.66-13.224 2.334-5.019.87-9.068 1.674-12.146 2.41-3.079.736-5.789 1.539-8.131 2.409-2.677 1.071-4.852 2.242-6.525 3.513-1.606 1.205-2.811 2.543-3.614 4.016-.736 1.472-1.104 3.112-1.104 4.919 0 2.476.602 4.617 1.807 6.424 1.271 1.74 3.045 3.079 5.32 4.016s4.986 1.405 8.131 1.405z"}),a.createElement("path",{d:"m611.484 190.227c-10.774 0-19.775-2.509-27.003-7.529-7.228-5.019-12.682-11.845-16.363-20.478-3.614-8.633-5.421-18.37-5.421-29.212 0-10.841 1.807-20.579 5.421-29.212 3.614-8.6329 8.934-15.4591 15.961-20.4783s15.694-7.5288 26-7.5288c10.373 0 19.408 2.4761 27.104 7.4284s13.652 11.745 17.868 20.3777c4.283 8.567 6.425 18.371 6.425 29.413 0 10.842-2.108 20.579-6.324 29.212-4.15 8.633-9.972 15.459-17.467 20.478-7.496 5.02-16.229 7.529-26.201 7.529zm-50.506 45.173c-1.601 0-2.898-1.297-2.898-2.898v-150.8033c0-1.6007 1.297-2.8983 2.898-2.8983h18.296c1.6 0 2.898 1.2976 2.898 2.8983v69.6793c0 .943.764 1.707 1.706 1.707.943 0 1.707.764 1.707 1.707v77.71c0 1.601-1.298 2.898-2.898 2.898zm46.089-69.466c5.89 0 10.708-1.472 14.456-4.417 3.747-2.944 6.525-6.893 8.332-11.845 1.807-5.019 2.71-10.574 2.71-16.664 0-6.023-.937-11.511-2.811-16.463-1.874-5.019-4.785-9.001-8.733-11.946-3.882-3.011-8.868-4.517-14.958-4.517-5.688 0-10.306 1.372-13.853 4.116-3.48 2.744-6.023 6.592-7.629 11.544s-2.409 10.708-2.409 17.266c0 6.559.803 12.314 2.409 17.266 1.606 4.953 4.216 8.801 7.83 11.544 3.681 2.744 8.566 4.116 14.656 4.116z"}),a.createElement("path",{d:"m707.657 190.227c-7.763 0-14.355-1.472-19.775-4.417-5.354-3.011-9.437-6.993-12.247-11.945-2.744-5.02-4.116-10.541-4.116-16.564 0-5.019.77-9.603 2.309-13.753 1.539-4.149 4.015-7.796 7.428-10.941 3.48-3.213 8.131-5.89 13.954-8.031 4.015-1.473 8.8-2.778 14.355-3.915 5.554-1.138 11.845-2.209 18.872-3.213 4.588-.699 9.476-1.441 14.663-2.225 1.702-.258 2.482 2.042.974 2.873-1.027.566-2.292-.179-2.377-1.35-.372-5.108-1.881-8.956-4.526-11.544-3.079-3.012-8.232-4.518-15.46-4.518-4.015 0-8.198.971-12.548 2.911-3.548 1.583-6.227 4.168-8.039 7.754-.706 1.398-2.282 2.21-3.775 1.737l-19.281-6.114c-1.514-.48-2.369-2.096-1.81-3.583 2.906-7.7358 7.751-14.125 14.535-19.1678 7.562-5.6216 17.868-8.4323 30.918-8.4323 9.57 0 18.069 1.4723 25.498 4.4169 7.428 2.9446 13.05 8.0307 16.865 15.2584 2.141 4.0154 3.413 8.0308 3.814 12.0458.402 4.016.603 8.5.603 13.452v63.355c0 1.601-1.298 2.899-2.899 2.899h-18.095c-1.6 0-2.898-1.298-2.898-2.899v-14.76c0-1.47 1.876-2.088 2.75-.906.395.534.399 1.264.001 1.796-5.101 6.832-10.603 11.819-16.504 14.962-6.09 3.212-13.819 4.818-23.189 4.818zm5.823-21.482c5.019 0 9.235-.87 12.648-2.61 3.48-1.807 6.224-3.848 8.232-6.123 2.074-2.276 3.48-4.183 4.216-5.722 1.405-2.945 2.208-6.358 2.409-10.24.211-3.117.339-5.818.384-8.101.017-.882.847-1.529 1.702-1.315 1.428.357 1.346 2.42-.105 2.665-5.205.882-9.613 1.66-13.224 2.334-5.019.87-9.068 1.674-12.147 2.41-3.078.736-5.788 1.539-8.131 2.409-2.677 1.071-4.852 2.242-6.525 3.513-1.606 1.205-2.81 2.543-3.614 4.016-.736 1.472-1.104 3.112-1.104 4.919 0 2.476.603 4.617 1.807 6.424 1.272 1.74 3.045 3.079 5.321 4.016 2.275.937 4.985 1.405 8.131 1.405z"}),a.createElement("path",{d:"m795.884 187.216c-1.601 0-2.898-1.298-2.898-2.899v-21.508c0-1.6 1.297-2.898 2.898-2.898h21.508c1.601 0 2.899 1.298 2.899 2.898v21.508c0 1.601-1.298 2.899-2.899 2.899z"}),a.createElement("path",{d:"m876.97 190.227c-7.763 0-14.355-1.472-19.776-4.417-5.353-3.011-9.436-6.993-12.247-11.945-2.743-5.02-4.115-10.541-4.115-16.564 0-5.019.769-9.603 2.309-13.753 1.539-4.149 4.015-7.796 7.428-10.941 3.48-3.213 8.131-5.89 13.954-8.031 4.015-1.473 8.8-2.778 14.355-3.915 5.554-1.138 11.845-2.209 18.872-3.213 4.588-.699 9.476-1.441 14.663-2.225 1.702-.258 2.482 2.042.974 2.873-1.027.566-2.292-.179-2.377-1.35-.372-5.108-1.881-8.956-4.527-11.544-3.078-3.012-8.231-4.518-15.459-4.518-4.015 0-8.198.971-12.548 2.911-3.548 1.583-6.228 4.168-8.039 7.754-.706 1.398-2.282 2.21-3.775 1.737l-19.281-6.114c-1.515-.48-2.37-2.096-1.811-3.583 2.907-7.7358 7.752-14.125 14.536-19.1678 7.562-5.6216 17.868-8.4323 30.918-8.4323 9.57 0 18.069 1.4723 25.498 4.4169 7.428 2.9446 13.05 8.0307 16.864 15.2584 2.142 4.0154 3.413 8.0308 3.815 12.0458.401 4.016.602 8.5.602 13.452v63.355c0 1.601-1.297 2.899-2.898 2.899h-18.095c-1.601 0-2.898-1.298-2.898-2.899v-14.76c0-1.47 1.876-2.088 2.75-.906.395.534.399 1.264.001 1.796-5.102 6.832-10.603 11.819-16.504 14.962-6.09 3.212-13.82 4.818-23.189 4.818zm5.823-21.482c5.019 0 9.235-.87 12.648-2.61 3.48-1.807 6.224-3.848 8.232-6.123 2.074-2.276 3.479-4.183 4.216-5.722 1.405-2.945 2.208-6.358 2.409-10.24.211-3.117.339-5.818.384-8.101.017-.882.846-1.529 1.702-1.315 1.428.357 1.345 2.42-.106 2.665-5.204.882-9.612 1.66-13.223 2.334-5.019.87-9.068 1.674-12.147 2.41-3.078.736-5.789 1.539-8.131 2.409-2.677 1.071-4.852 2.242-6.525 3.513-1.606 1.205-2.811 2.543-3.614 4.016-.736 1.472-1.104 3.112-1.104 4.919 0 2.476.602 4.617 1.807 6.424 1.272 1.74 3.045 3.079 5.32 4.016 2.276.937 4.986 1.405 8.132 1.405z"}),a.createElement("path",{d:"m962.788 63.7427c-1.601 0-2.899-1.2976-2.899-2.8983v-18.2957c0-1.6007 1.298-2.8983 2.899-2.8983h21.508c1.6 0 2.898 1.2976 2.898 2.8983v18.2957c0 1.6007-1.298 2.8983-2.898 2.8983zm0 123.4733c-1.601 0-2.899-1.298-2.899-2.899v-102.6183c0-1.6007 1.298-2.8983 2.899-2.8983h21.508c1.6 0 2.898 1.2976 2.898 2.8983v102.6183c0 1.601-1.298 2.899-2.898 2.899z"}),a.createElement("path",{d:"m195.824.5c36.051 0 65.277 29.2254 65.277 65.2764v130.4476c0 36.051-29.226 65.276-65.277 65.276h-130.447c-36.051 0-65.276414-29.225-65.276414-65.276v-130.4476c0-36.051 29.225414-65.2764 65.276414-65.2764zm-116.5564 56.5498c-.9608 0-1.7401.7785-1.7403 1.7393v136.5899c0 .961.7794 1.74 1.7403 1.74h30.3914c.961 0 1.74-.779 1.74-1.74v-38.541c0-.961.779-1.74 1.74-1.74h14.775c.614 0 1.182.323 1.495.851l23.995 40.32c.313.527.881.85 1.495.85h35.002c1.36 0 2.194-1.49 1.483-2.65l-34.842-56.785c-.357-.582-.341-1.319.042-1.884l34.817-51.466c.781-1.1555-.046-2.7149-1.442-2.7149h-34.843c-.608 0-1.172.3172-1.487.837l-24.899 41.0349c-.316.52-.88.838-1.488.838h-14.103c-.961 0-1.74-.779-1.74-1.74v-63.7999c0-.9609-.779-1.7392-1.74-1.7393z"}));function T({isPromptMode:e}){return a.createElement("div",{className:"flex gap-4 px-4 h-11 items-center"},a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-2 items-center max-md-gutters:hidden"},a.createElement("kbd",null,"↵"),a.createElement("span",null,"to select")),a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-2 items-center max-md-gutters:hidden"},a.createElement("kbd",null,"↑"),a.createElement("kbd",null,"↓"),a.createElement("span",null,"to navigate")),a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-2 items-center max-md-gutters:hidden"},a.createElement("kbd",null,"esc"),a.createElement("span",null,"to close")),e?a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-1.5 items-center ml-auto"},a.createElement("span",null,"AI assistant by"),a.createElement("a",{href:"https://www.kapa.ai/",target:"_blank"},a.createElement(M,{className:"hocus:opacity-80"}))):a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-2 items-center ml-auto"},a.createElement("span",null,"Search by"),a.createElement("a",{href:"https://www.algolia.com/developers/?utm_medium=referral&utm_content=powered_by&utm_source=expo.dev.com&utm_campaign=docsearch",target:"_blank"},a.createElement(H,{className:"hocus:opacity-80"}))))}const _="9r24npb8",R="production",P=i.createClient({projectId:_,dataset:R,useCdn:!0,apiVersion:"v2025-02-19"}),A=u({projectId:_,dataset:R});const V=async(e,t,a,l)=>{const{hits:n,libraries:r}=await t(e,l).then((e=>e.json()));a(n||r||[])},$=(e,t,a,l,n,r={})=>[`https://${t}-dsn.algolia.net/1/indexes/${l}/query`,{method:"POST",headers:{"X-Algolia-Application-Id":t,"X-Algolia-API-Key":a},body:JSON.stringify({params:`query=${e}&hitsPerPage=${n}`,highlightPreTag:"<mark>",highlightPostTag:"</mark>",...r})}],z=(e,t)=>fetch(...$(e,"QEX7PB7D46","6652d26570e8628af4601e1d78ad456b","expo",20,{facetFilters:[["version:none",`version:${t}`]]})),F=e=>fetch(...$(e,"8TDSE0OHGQ","c9c791d9d5fd7f315d7f3859b32c1f3b","react-native-v2",5,{facetFilters:[["version:current"]]})),D=e=>P.fetch(`*[_type == "post" && publishAt < now() && (title match "${e}*" || metadataDescription match "${e}*")] | order(publishAt desc)[0...10] {\n title,\n slug,\n tags,\n metadataDescription,\n mainImage\n }`),K=e=>fetch(`https://reactnative.directory/api/libraries?search=${encodeURI(e)}&limit=5`),U=(e,t)=>({dangerouslySetInnerHTML:{__html:e._highlightResult.hierarchy[`${t}`]?.value||""}}),G=(e,t=36)=>{if(!e||!e.length)return"";const a=Math.max(e.indexOf("<mark>")-t,0),l=Math.min(e.indexOf("</mark>")+t+6,e.length);return`${0!==a?"…":""}${e.substring(a,l).trim()}${l!==e.length?"…":""}`},B=(e,t=!1)=>t?{}:{dangerouslySetInnerHTML:{__html:e._highlightResult.content?.value?G(e._highlightResult.content?.value):G(e._highlightResult.hierarchy.lvl1?.value||"",82)}},j=["/versions/","/more/"],Z=e=>j.some((t=>e.includes(t))),O=["/app-signing/","/build/","/build-reference/","/development/","/eas/","/eas/metadata/","/eas-update/","/submit/"],X=e=>O.some((t=>e.includes(t))),Q=["/get-started/","/develop/","/deploy/","/faq/","/core-concepts/","/debugging/","/config-plugins/"],W=e=>Q.some((t=>e.includes(t))),J=["/tutorial","/ui-programming/","/additional-resources/"],Y=e=>J.some((t=>e.includes(t))),ee=()=>/(Mac|iPhone|iPod|iPad)/i.test(navigator?.platform??navigator?.userAgentData?.platform??""),te=(e,t)=>{if(!e||!e.length)return"";const a=e.toLowerCase().indexOf(t.toLowerCase());if(-1===a)return e;const l=a+t.length;return e.substring(0,a)+"<mark>"+e.substring(a,l)+"</mark>"+e.substring(l)},ae=({children:t,url:l,isExternalLink:n,isNested:r,onSelect:s,className:m,value:o})=>{const[i,u]=a.useState(!1),[d,p]=a.useState(!1);return a.createElement(e.Command.Item,{className:c.mergeClasses("relative",m),value:o,"data-nested":!!r||void 0,onMouseDown:e=>{(e.metaKey||e.ctrlKey)&&p(!0)},onMouseUp:e=>{!l||1!==e.button&&2!==e.button||function(e){navigator.clipboard?.writeText(e),u(!0),setTimeout((()=>u(!1)),1500)}(l)},onSelect:()=>{l&&((e,t=!1)=>{const a=document.createElement("a");t&&(a.target="_blank",a.rel="noopener noreferrer"),a.href=e,a.click()})(l,!!d||n),d?p(!1):s&&s()},onContextMenu:e=>{e.preventDefault()}},t,i&&a.createElement("div",{className:"text-2xs font-medium absolute rounded-full px-2 right-2.5 top-[calc(50%-13px)] border-secondary bg-info text-info"},"Copied!"))},le=new Intl.NumberFormat,ne=({item:e,onSelect:t,query:l})=>a.createElement(ae,{value:`rnd-${e.npmPkg}`,url:e.githubUrl,isExternalLink:!0,onSelect:t},a.createElement("div",{className:"inline-flex gap-3 items-center"},a.createElement(d.GithubIcon,{className:"text-icon-secondary"}),a.createElement("div",null,a.createElement("p",{className:"text-xs font-medium",dangerouslySetInnerHTML:{__html:te(e.npmPkg,l)}}),a.createElement("p",{className:"flex items-center gap-1 text-3xs text-quaternary"},a.createElement(g.Star01Icon,{className:"icon-2xs text-icon-quaternary"}),le.format(e.github.stats.stars)," stars",e.npm.downloads?a.createElement(a.Fragment,null," ","· ",a.createElement(p.Download01Icon,{className:"icon-2xs text-icon-quaternary"}),le.format(e.npm.downloads)," downloads"):void 0)),a.createElement(q,null))),re=({item:e,levelKey:t="lvl0"})=>e.hierarchy[t]?a.createElement(a.Fragment,null,a.createElement(S,null),a.createElement("span",{...U(e,t)})):null,se=({item:e,onSelect:t})=>{const{lvl0:l,lvl1:n,lvl2:r,lvl3:s,lvl4:c}=e.hierarchy;return a.createElement(ae,{value:`rn-${e.objectID}`,url:e.url,isExternalLink:!0,onSelect:t},a.createElement("div",{className:"inline-flex gap-3 items-center"},a.createElement(L,{className:"shrink-0"}),a.createElement("div",null,c&&a.createElement(a.Fragment,null,a.createElement("p",{className:"text-xs font-medium",...U(e,"lvl4")}),a.createElement("p",{className:"text-3xs text-quaternary"},a.createElement("span",{...U(e,"lvl0")}),a.createElement(re,{item:e,levelKey:"lvl1"}),a.createElement(re,{item:e,levelKey:"lvl2"}),a.createElement(re,{item:e,levelKey:"lvl3"}))),!c&&s&&a.createElement(a.Fragment,null,a.createElement("p",{className:"text-xs font-medium",...U(e,"lvl3")}),a.createElement("p",{className:"text-3xs text-quaternary"},a.createElement("span",{...U(e,"lvl0")}),a.createElement(re,{item:e,levelKey:"lvl1"}),a.createElement(re,{item:e,levelKey:"lvl2"}))),!s&&r&&a.createElement(a.Fragment,null,a.createElement("p",{className:"text-xs font-medium",...U(e,"lvl2")}),a.createElement("p",{className:"text-3xs text-quaternary"},a.createElement("span",{...U(e,"lvl0")}),a.createElement(re,{item:e,levelKey:"lvl1"}))),!s&&!r&&n&&a.createElement(a.Fragment,null,a.createElement("p",{className:"text-xs font-medium",...U(e,"lvl1")}),a.createElement("p",{className:"text-3xs text-quaternary",...U(e,"lvl0")})),!s&&!r&&!n&&l&&a.createElement("p",{className:"text-xs font-medium",...U(e,"lvl0")}),a.createElement("p",{className:"text-2xs text-secondary",...B(e,!0)})),a.createElement(q,null)))},ce=({url:e,className:t,isNested:l})=>l?a.createElement(C.Hash02Icon,{className:c.mergeClasses("icon-sm text-icon-quaternary",t)}):Z(e)?a.createElement(c.DocsLogo,{className:c.mergeClasses("text-icon-secondary",t)}):X(e)?a.createElement(x.PlanEnterpriseIcon,{className:c.mergeClasses("text-icon-secondary",t)}):W(e)?a.createElement(v.Home02Icon,{className:c.mergeClasses("text-icon-secondary",t)}):Y(e)?a.createElement(h.GraduationHat02Icon,{className:c.mergeClasses("text-icon-secondary",t)}):a.createElement(E.BookOpen02Icon,{className:c.mergeClasses("text-icon-secondary",t)}),me=e=>Z(e)?"Reference":X(e)?"Expo Application Services":W(e)?"Home":Y(e)?"Learn":"Guides",oe=({url:e,isNested:t=!1})=>t?a.createElement(a.Fragment,null,a.createElement("span",{className:"text-3xs text-quaternary"},me(e)),a.createElement(S,null)):a.createElement("p",{className:"text-3xs text-quaternary"},me(e)),ie=({item:e,onSelect:t,isNested:l,transformUrl:n})=>{const{lvl0:r,lvl2:s,lvl3:m,lvl4:o,lvl6:i}=e.hierarchy,u=c.mergeClasses(l?"text-2xs":"text-xs font-medium"),d=c.mergeClasses("text-3xs text-quaternary",l&&"hidden");return a.createElement(ae,{className:c.mergeClasses(l&&"ml-8 !min-h-[32px]"),value:`expodocs-${e.objectID}`,onSelect:t,url:n?n(e.url):e.url,isNested:l,isExternalLink:!n},a.createElement("div",{className:"flex gap-3 justify-between"},a.createElement("div",{className:"inline-flex items-center gap-3 break-words"},a.createElement(ce,{url:e.url,isNested:l,className:"shrink-0"}),a.createElement("div",null,i&&a.createElement(a.Fragment,null,a.createElement("p",{className:u,...U(e,"lvl6")}),!l&&a.createElement("p",{className:"text-3xs text-quaternary"},a.createElement(oe,{url:e.url,isNested:!0}),a.createElement("span",{...U(e,"lvl0")}),a.createElement(re,{item:e,levelKey:"lvl2"}),a.createElement(re,{item:e,levelKey:"lvl3"}),a.createElement(re,{item:e,levelKey:"lvl4"}))),!i&&o&&a.createElement(a.Fragment,null,a.createElement("p",{className:u,...U(e,"lvl4")}),!l&&a.createElement("p",{className:d},a.createElement(oe,{url:e.url,isNested:!0}),a.createElement("span",{...U(e,"lvl0")}),a.createElement(re,{item:e,levelKey:"lvl2"}),a.createElement(re,{item:e,levelKey:"lvl3"}))),!i&&!o&&m&&a.createElement(a.Fragment,null,a.createElement("p",{className:u,...U(e,"lvl3")}),!l&&a.createElement("p",{className:d},a.createElement(oe,{url:e.url,isNested:!0}),a.createElement("span",{...U(e,"lvl0")}),a.createElement(re,{item:e,levelKey:"lvl2"}))),!i&&!o&&!m&&s&&a.createElement(a.Fragment,null,a.createElement("p",{className:u,...U(e,"lvl2")}),!l&&a.createElement("p",{className:d},a.createElement(oe,{url:e.url,isNested:!0}),a.createElement("span",{...U(e,"lvl0")}))),!i&&!o&&!m&&!s&&r&&a.createElement(a.Fragment,null,a.createElement("p",{className:u,...U(e,"lvl0")}),a.createElement(oe,{url:e.url})),(!l||e.content)&&a.createElement("p",{className:c.mergeClasses("text-secondary",l?"text-3xs":"text-2xs"),...B(e)}))),!n&&a.createElement(q,null)))},ue=({item:e,onSelect:t,query:l})=>{return a.createElement(ae,{value:`expo-blog-${e.slug.current}`,url:`https://expo.dev/blog/${e.slug.current}`,isExternalLink:!0,onSelect:t},a.createElement("div",{className:"inline-flex gap-3 items-center"},a.createElement("img",{src:(n=e.mainImage.image.asset._ref,A.image(n).auto("format").height(150).url()),alt:e.mainImage.altText,className:"size-11 object-cover rounded-md my-0.5"}),a.createElement("div",null,a.createElement("p",{className:"text-xs font-medium",dangerouslySetInnerHTML:{__html:te(e.title,l)}}),a.createElement("p",{className:"text-3xs text-quaternary",dangerouslySetInnerHTML:{__html:te(e.metadataDescription,l)}})),a.createElement(q,null)));var n};function de({children:e,isLoading:t}){const[l,n]=a.useState(!1),[r,s]=a.useState(!1);return a.useEffect((()=>{if(a.isValidElement(e)&&"string"==typeof e.props.children)return n(!0)}),[t]),a.createElement("pre",{className:"relative shadow-xs"},e,a.createElement(c.Button,{className:"absolute right-1.5 top-1.5",leftSlot:a.createElement(y.ClipboardIcon,{className:"text-icon-secondary"}),size:"xs",theme:"quaternary",disabled:r||!l,onClick:()=>{a.isValidElement(e)&&"string"==typeof e.props.children&&(navigator.clipboard?.writeText(e?.props?.children),s(!0),setTimeout((()=>s(!1)),1500))}}))}function pe({conversation:e,isGeneratingAnswer:t,isPreparingAnswer:l,addFeedback:n}){const[r,s]=a.useState(!1),[m,o]=a.useState(void 0),i=l||t,u=e?.getLatest();return a.createElement(a.Fragment,null,a.createElement(w,{isLoading:i}),a.createElement("div",{className:"result-container flex flex-col gap-4 !pt-3 w-full"},l&&a.createElement("div",{className:"flex text-xs size-full items-center justify-center text-quaternary"},"Preparing answer..."),a.createElement(I,{children:u?.answer??"",options:{overrides:{a:{component:c.Link},pre:{component:de,props:{isLoading:i}}}},className:"prompt-result text-xs"}),!i&&u?.id&&a.createElement(a.Fragment,null,a.createElement("div",{className:c.mergeClasses("inline-flex items-center w-full gap-2","max-md-gutters:flex-col")},a.createElement(c.Button,{skipCapitalization:!0,theme:"secondary",size:"xs",leftSlot:a.createElement(y.ClipboardIcon,null),disabled:r,onClick:()=>{u?.answer&&(navigator.clipboard?.writeText(u.answer),s(!0),setTimeout((()=>s(!1)),1500))}},"Copy answer"),a.createElement("p",{className:c.mergeClasses("text-tertiary text-2xs mx-auto","max-md-gutters:mt-0.5")},"Expo AI assistant is an experimental feature."),a.createElement("div",{className:c.mergeClasses("contents items-center w-full gap-x-2 gap-y-3","max-md-gutters:justify-center max-md-gutters:inline-flex")},a.createElement("p",{className:"text-tertiary text-2xs"},"Rate answer:"),a.createElement(c.Button,{theme:"secondary",size:"xs",className:"shrink-0",disabled:m,leftSlot:!0===m?a.createElement(k.ThumbsUpSolidIcon,{className:"text-icon-success"}):a.createElement(N.ThumbsUpIcon,{className:"text-icon-success"}),onClick:()=>{n?.(u.id,"upvote"),o(!0)}}),a.createElement(c.Button,{theme:"secondary",size:"xs",className:"shrink-0",disabled:m,leftSlot:!1===m?a.createElement(b.ThumbsDownSolidIcon,{className:"text-icon-danger"}):a.createElement(f.ThumbsDownIcon,{className:"text-icon-danger"}),onClick:()=>{n?.(u.id,"downvote"),o(!1)}}))))))}const ge=({config:{docsVersion:c,docsTransformUrl:m},open:o,setOpen:i,customSections:u=[]})=>{const[d,p]=a.useState(!1),[g,x]=a.useState(!0),[E,h]=a.useState(""),[C,v]=a.useState(null),[y,f]=a.useState(!1),{conversation:N,submitQuery:b,isGeneratingAnswer:k,isPreparingAnswer:I,addFeedback:S,stopGeneration:q,resetConversation:L}=t.useChat(),[H,M]=a.useState([]),[_,R]=a.useState([]),[P,A]=a.useState([]),[$,U]=a.useState([]),G=async()=>V(E,z,M,c),B=async()=>(async(e,t,a)=>{a(await t(e))})(E,D,R),j=async()=>V(E,F,A),Z=async()=>V(E,K,U),O=()=>i(!1),X=e=>{Promise.all([G(),B(),j(),Z(),...u?.map((e=>e.getItemsAsync(E)))]).then(e)};a.useEffect((()=>{v("undefined"!=typeof navigator&&ee())}),[]),a.useEffect((()=>{if(null!==C){const e=e=>{"k"===e.key&&(C?e.metaKey:e.ctrlKey)&&(e.preventDefault(),i((e=>!e)))};return document.addEventListener("keydown",e,!1),()=>document.removeEventListener("keydown",e)}}),[C]),a.useEffect((()=>{o&&!d&&X((()=>{p(!0),x(!1)}))}),[o]),a.useEffect((()=>{if(o){x(!0),f(!1),(I||k)&&(q(),L());const e=setTimeout((()=>X((()=>x(!1)))),150);return()=>clearTimeout(e)}}),[E]);const Q=s(H.map((e=>({...e,baseUrl:e.url.replace(/#.+/,"")}))),"baseUrl"),W=[E.length>0&&a.createElement(e.Command.Group,{heading:"Ask AI",key:"expo-ai-prompt"},a.createElement(ae,{value:"expo-ai-prompt",onSelect:()=>{b(E),f(!0)}},a.createElement("div",{className:"inline-flex gap-3 items-center"},a.createElement(n.Stars02Icon,{className:"text-icon-secondary"}),a.createElement("div",{className:"flex flex-col"},a.createElement("p",{className:"text-xs font-medium leading-snug"},"Ask Expo's AI assistant"),a.createElement("p",{className:"text-2xs text-tertiary leading-snug"},"Experimental feature"))))),H.length>0&&a.createElement(e.Command.Group,{heading:"Expo documentation",key:"expo-docs-group"},Object.values(Q).map((e=>e.sort(((e,t)=>e.url.localeCompare(e.baseUrl)-t.url.localeCompare(t.baseUrl))).slice(0,6).map(((e,t)=>a.createElement(ie,{isNested:0!==t,item:e,onSelect:O,key:`hit-expo-docs-${e.objectID}`,transformUrl:m})))))),_.length>0&&a.createElement(e.Command.Group,{heading:"Expo blog",key:"expo-blog-group"},_.map((e=>a.createElement(ue,{item:e,onSelect:O,key:`hit-expo-blog-${e.slug.current}`,query:E})))),P.length>0&&a.createElement(e.Command.Group,{heading:"React Native documentation",key:"rn-docs-group"},P.map((e=>a.createElement(se,{item:e,onSelect:O,key:`hit-rn-docs-${e.objectID}`})))),$.length>0&&a.createElement(e.Command.Group,{heading:"React Native directory",key:"rn-directory-group"},$.map((e=>a.createElement(ne,{item:e,onSelect:O,key:`hit-rn-dir-${e.npmPkg}`,query:E}))))];return u?.forEach((({items:t,heading:l,sectionIndex:n})=>t.length>0&&W.splice(n,0,a.createElement(e.Command.Group,{heading:l,key:`${n}-${l}`},t)))),a.createElement(t.KapaProvider,{userTrackingMode:"none",integrationId:"bf5bd579-bb83-4591-8cc9-d87b6cdcb712",callbacks:{}},a.createElement(e.Command.Dialog,{open:o,onOpenChange:i,label:"Search Menu",shouldFilter:!1},a.createElement(l.SearchSmIcon,{className:"text-icon-secondary absolute top-[29px] left-[29px] transition-opacity duration-200"}),a.createElement("div",{className:"absolute top-[25px] right-[25px] cursor-pointer p-1 rounded-sm hocus:bg-element"},a.createElement(r.XIcon,{className:"text-icon-secondary",onClick:()=>i(!1)})),a.createElement(e.Command.Input,{value:E,onValueChange:h,placeholder:"Search or ask AI…",autoFocus:!0}),a.createElement(w,{isLoading:g}),y?a.createElement(pe,{conversation:N,isGeneratingAnswer:k,isPreparingAnswer:I,addFeedback:S}):a.createElement(e.Command.List,null,d&&W,0===W.filter(Boolean).length&&a.createElement(e.Command.Empty,{key:"no-results-group"},a.createElement("p",{className:"text-secondary text-xs"},"No results found."))),a.createElement(T,{isPromptMode:y})))},xe=e.Command.Item;exports.CommandItemBase=xe,exports.CommandItemBaseWithCopy=ae,exports.CommandMenu=e=>a.createElement(t.KapaProvider,{userTrackingMode:"none",integrationId:"bf5bd579-bb83-4591-8cc9-d87b6cdcb712",callbacks:{}},a.createElement(ge,{...e})),exports.CommandMenuTrigger=({setOpen:e,className:t})=>{const[n,r]=a.useState(null);return a.useEffect((()=>{r("undefined"!=typeof navigator&&ee())}),[]),a.createElement(c.Button,{theme:"secondary",leftSlot:a.createElement(l.SearchSmIcon,{className:"icon-md text-icon-secondary"}),rightSlot:null!==n?a.createElement("div",{className:"ml-auto max-md-gutters:hidden"},a.createElement("kbd",{className:"!h-5 !leading-[19px]"},n?"⌘":"Ctrl")," ",a.createElement("kbd",{className:"!h-5 !leading-[19px]"},"K")):void 0,className:c.mergeClasses("cmdk-trigger bg-default pl-2.5 pr-3 border border-default shadow-xs min-h-[40px]",t),onClick:()=>e(!0)},a.createElement("p",{className:"text-secondary font-normal leading-normal text-xs"},"Search"))},exports.addHighlight=te;
|
|
1
|
+
"use strict";var e=require("cmdk"),t=require("@kapaai/react-sdk"),a=require("react"),l=require("@expo/styleguide"),n=require("@expo/styleguide-icons/outline/MessageQuestionCircleIcon"),r=require("@expo/styleguide-icons/outline/SearchSmIcon"),s=require("@expo/styleguide-icons/outline/Stars02Icon"),c=require("@expo/styleguide-icons/outline/XIcon"),o=require("lodash.groupby"),m=require("@expo/styleguide-icons/outline/ArrowUpRightIcon"),i=require("@expo/styleguide-icons/outline/ChevronRightIcon"),u=require("@sanity/client"),d=require("@sanity/image-url"),p=require("@expo/styleguide-icons/custom/GithubIcon"),g=require("@expo/styleguide-icons/outline/Download01Icon"),x=require("@expo/styleguide-icons/outline/Star01Icon"),E=require("@expo/styleguide-icons/custom/PlanEnterpriseIcon"),h=require("@expo/styleguide-icons/outline/BookOpen02Icon"),C=require("@expo/styleguide-icons/outline/GraduationHat02Icon"),v=require("@expo/styleguide-icons/outline/Hash02Icon"),f=require("@expo/styleguide-icons/outline/Home02Icon"),y=require("@expo/styleguide-icons/outline/ClipboardIcon"),b=require("@expo/styleguide-icons/outline/RefreshCcw02Icon"),N=require("@expo/styleguide-icons/outline/ThumbsDownIcon"),k=require("@expo/styleguide-icons/outline/ThumbsUpIcon"),w=require("@expo/styleguide-icons/solid/ThumbsDownSolidIcon"),I=require("@expo/styleguide-icons/solid/ThumbsUpSolidIcon"),S=require("markdown-to-jsx");const q=({isLoading:e,className:t})=>a.createElement("div",{role:"progressbar",className:l.mergeClasses("bg-palette-blue9 h-0.5 absolute z-20",e&&"animate-[searchUIBarLoader_2s_infinite_ease-in-out]",t)});function L(){return a.createElement(i.ChevronRightIcon,{className:"icon-xs text-icon-quaternary inline-block relative mx-1 -top-px"})}const A=()=>a.createElement(m.ArrowUpRightIcon,{className:"text-icon-tertiary self-center ml-auto shrink-0"}),H=({className:e})=>a.createElement("svg",{viewBox:"-11.5 -10.23174 23 20.46348",className:l.mergeClasses("icon-md text-icon-secondary",e)},a.createElement("circle",{cx:"0",cy:"0",r:"2.05",fill:"currentColor"}),a.createElement("g",{stroke:"currentColor",strokeWidth:"1",fill:"none"},a.createElement("ellipse",{rx:"11",ry:"4.2"}),a.createElement("ellipse",{rx:"11",ry:"4.2",transform:"rotate(60)"}),a.createElement("ellipse",{rx:"11",ry:"4.2",transform:"rotate(120)"}))),M=({className:e})=>a.createElement("svg",{width:"77",height:"19",viewBox:"0 0 2197 500",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-label":"Algolia",className:e,role:"img"},a.createElement("g",{clipPath:"url(#clip0_1_2)"},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1070.38 275.3V5.90999C1070.38 2.27998 1067.14 -0.480015 1063.56 0.0799852L1013.1 8.01999C1010.23 8.46999 1008.11 10.95 1008.11 13.86L1008.28 287.08C1008.28 300 1008.28 379.78 1104.25 382.57C1107.58 382.67 1110.34 379.99 1110.34 376.66V335.88C1110.34 332.92 1108.15 330.37 1105.22 330.04C1070.37 326.03 1070.37 282.47 1070.37 275.32L1070.38 275.3Z"}),a.createElement("path",{d:"M1902.56 104.73H1851.78C1848.52 104.73 1845.88 107.372 1845.88 110.63V376.73C1845.88 379.988 1848.52 382.63 1851.78 382.63H1902.56C1905.82 382.63 1908.46 379.988 1908.46 376.73V110.63C1908.46 107.372 1905.82 104.73 1902.56 104.73Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1851.78 71.38H1902.55C1905.81 71.38 1908.45 68.74 1908.45 65.48V5.90001C1908.45 2.28001 1905.21 -0.489988 1901.63 0.0700121L1850.86 8.02001C1847.99 8.47001 1845.87 10.94 1845.87 13.85V65.47C1845.87 68.73 1848.51 71.37 1851.77 71.37L1851.78 71.38Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1764.03 275.3V5.90999C1764.03 2.27998 1760.79 -0.480015 1757.21 0.0799852L1706.75 8.01999C1703.88 8.46999 1701.76 10.95 1701.76 13.86L1701.93 287.08C1701.93 300 1701.93 379.78 1797.9 382.57C1801.23 382.67 1803.99 379.99 1803.99 376.66V335.88C1803.99 332.92 1801.8 330.37 1798.87 330.04C1764.02 326.03 1764.02 282.47 1764.02 275.32L1764.03 275.3Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1631.95 142.72C1620.81 130.47 1607.12 121.07 1591.17 114.41C1575.25 107.88 1557.91 104.56 1539.1 104.56C1520.32 104.56 1502.95 107.73 1487.18 114.41C1471.59 121.07 1457.89 130.46 1446.42 142.72C1434.95 154.95 1426.04 169.59 1419.66 186.75C1413.28 203.92 1410.42 224.12 1410.42 245.11C1410.42 266.1 1413.61 281.98 1419.97 299.32C1426.35 316.64 1435.11 331.43 1446.42 343.68C1457.71 355.91 1471.25 365.3 1487.02 372.14C1502.79 378.97 1527.14 382.47 1539.42 382.62C1551.67 382.62 1576.2 378.8 1592.12 372.14C1608.04 365.46 1621.58 355.91 1632.9 343.68C1644.19 331.43 1652.95 316.64 1659.15 299.32C1665.37 281.98 1668.39 266.1 1668.39 245.11C1668.39 224.12 1665.05 203.92 1658.36 186.75C1651.98 169.58 1643.22 154.95 1631.93 142.72H1631.95ZM1587.52 306.47C1576.05 322.22 1559.96 330.17 1539.43 330.17C1518.88 330.17 1502.8 322.37 1491.33 306.47C1479.86 290.72 1474.12 272.46 1474.12 245.27C1474.12 218.38 1479.71 196.13 1491.18 180.4C1502.63 164.65 1518.72 156.88 1539.25 156.88C1559.8 156.88 1575.88 164.66 1587.34 180.4C1598.81 195.97 1604.7 218.38 1604.7 245.27C1604.7 272.46 1598.98 290.57 1587.51 306.47H1587.52Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M894.42 104.73H845.09C796.73 104.73 754.18 130.21 729.34 168.83C714.82 191.41 706.35 218.46 706.35 247.56C706.35 292.45 726.48 332.48 757.94 358.66C760.87 361.26 763.99 363.64 767.25 365.8C780.11 374.29 795.36 379.27 811.77 379.27C813 379.27 814.23 379.24 815.45 379.18C815.81 379.16 816.16 379.13 816.52 379.11C817.39 379.06 818.27 379 819.14 378.91C819.48 378.88 819.82 378.83 820.16 378.79C821.07 378.69 821.98 378.58 822.89 378.45C823.1 378.42 823.31 378.38 823.52 378.35C856.41 373.28 885.08 347.53 894.42 315.54V373.37C894.42 376.63 897.06 379.27 900.32 379.27H950.74C954 379.27 956.64 376.63 956.64 373.37V110.63C956.64 107.37 954 104.73 950.74 104.73H894.42ZM894.42 311.65C882.22 321.81 866.45 325.63 849.58 326.77C849.42 326.78 849.25 326.8 849.09 326.81C847.97 326.88 846.85 326.91 845.73 326.91C803.49 326.91 768.61 291.02 768.61 247.54C768.61 237.29 770.57 227.53 774.03 218.56C785.25 189.44 812.8 168.82 845.09 168.82H894.42V311.65Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2133.97 104.73H2084.64C2036.28 104.73 1993.73 130.21 1968.89 168.83C1954.37 191.41 1945.9 218.46 1945.9 247.56C1945.9 292.45 1966.03 332.48 1997.49 358.66C2000.42 361.26 2003.54 363.64 2006.8 365.8C2019.66 374.29 2034.91 379.27 2051.32 379.27C2052.55 379.27 2053.78 379.24 2055 379.18C2055.36 379.16 2055.71 379.13 2056.07 379.11C2056.94 379.06 2057.82 379 2058.69 378.91C2059.03 378.88 2059.37 378.83 2059.71 378.79C2060.62 378.69 2061.53 378.58 2062.44 378.45C2062.65 378.42 2062.86 378.38 2063.07 378.35C2095.96 373.28 2124.63 347.53 2133.97 315.54V373.37C2133.97 376.63 2136.61 379.27 2139.87 379.27H2190.29C2193.55 379.27 2196.19 376.63 2196.19 373.37V110.63C2196.19 107.37 2193.55 104.73 2190.29 104.73H2133.97ZM2133.97 311.65C2121.77 321.81 2106 325.63 2089.13 326.77C2088.97 326.78 2088.8 326.8 2088.64 326.81C2087.52 326.88 2086.4 326.91 2085.28 326.91C2043.04 326.91 2008.16 291.02 2008.16 247.54C2008.16 237.29 2010.12 227.53 2013.58 218.56C2024.8 189.44 2052.35 168.82 2084.64 168.82H2133.97V311.65Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1314.05 104.73H1264.72C1216.36 104.73 1173.81 130.21 1148.97 168.83C1137.18 187.17 1129.37 208.47 1126.86 231.42C1126.28 236.72 1125.98 242.1 1125.98 247.56C1125.98 253.02 1126.29 258.71 1126.91 264.15C1131.19 302.24 1150.05 335.76 1177.57 358.67C1180.5 361.27 1183.62 363.65 1186.88 365.81C1199.74 374.3 1214.99 379.28 1231.4 379.28C1249.39 379.28 1266.01 373.35 1279.56 363.31C1295.85 351.73 1308.44 334.77 1314.04 315.56V365.82H1313.93V376.9C1313.93 398.74 1308.22 415.17 1296.59 426.26C1284.98 437.34 1265.55 442.89 1238.34 442.89C1227.22 442.89 1209.55 442.3 1191.74 440.48C1188.91 440.19 1186.28 441.98 1185.47 444.7L1172.69 487.81C1171.67 491.27 1173.96 494.83 1177.52 495.34C1199.04 498.42 1220.04 500.02 1232.17 500.02C1281.08 500.02 1317.33 489.27 1341.06 467.81C1362.54 448.4 1374.21 418.92 1376.26 379.29V110.63C1376.26 107.37 1373.62 104.73 1370.36 104.73H1314.04H1314.05ZM1314.05 168.83C1314.05 168.83 1314.7 307.96 1314.05 312.19C1301.97 321.96 1286.94 325.78 1270.56 326.89C1270.4 326.9 1270.23 326.92 1270.07 326.93C1268.95 327 1267.83 327.03 1266.71 327.03C1265.39 327.03 1264.08 327 1262.77 326.93C1222.36 324.82 1188.25 289.67 1188.25 247.55C1188.25 237.3 1190.21 227.54 1193.67 218.57C1204.89 189.45 1232.44 168.83 1264.73 168.83H1314.06H1314.05Z"}),a.createElement("path",{d:"M249.83 0C113.3 0 2.00001 110.09 0.0300098 246.16C-1.96999 384.35 110.15 498.86 248.36 499.66C291.04 499.91 332.15 489.47 368.66 469.63C372.22 467.7 372.77 462.8 369.74 460.12L346.36 439.4C341.61 435.19 334.85 434 329 436.48C303.52 447.32 275.83 452.86 247.29 452.51C135.61 451.14 45.38 358.22 47.16 246.55C48.92 136.29 139.16 47.14 249.83 47.14H452.52V407.41L337.52 305.23C333.8 301.92 328.1 302.57 325.1 306.54C306.64 330.98 276.57 346.18 243.17 343.88C196.84 340.68 159.3 303.38 155.83 257.07C151.68 201.83 195.46 155.55 249.83 155.55C299.01 155.55 339.51 193.4 343.74 241.5C344.12 245.78 346.05 249.77 349.26 252.62L379.21 279.17C382.61 282.18 388 280.34 388.84 275.87C391 264.32 391.76 252.29 390.91 239.95C386.09 169.61 329.11 113.02 258.74 108.69C178.06 103.72 110.61 166.83 108.47 245.94C106.38 323.04 169.55 389.5 246.66 391.2C278.85 391.91 308.69 381.79 332.8 364.25L483.06 497.45C489.5 503.16 499.67 498.59 499.67 489.98V9.48C499.66 4.25 495.42 0 490.18 0H249.83Z"})),a.createElement("defs",null,a.createElement("clipPath",null,a.createElement("rect",{width:2196.2,height:500})))),R=({className:e})=>a.createElement("svg",{height:"19",width:"72",viewBox:"0 0 989 262",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:e},a.createElement("path",{d:"m345.202 187.216c-1.602 0-2.9-1.3-2.898-2.903l.192-131.3758c.003-1.599 1.3-2.8941 2.899-2.8941h21.913c1.601 0 2.899 1.2977 2.899 2.8983v68.9056c0 2.83 3.639 3.982 5.268 1.668l30.607-43.4845c.543-.7712 1.427-1.2301 2.37-1.2301h26.556c2.365 0 3.734 2.6785 2.35 4.5952l-34.565 47.8594c-.751 1.04-.73 2.45.053 3.466l36.845 47.828c1.468 1.905.11 4.667-2.296 4.667h-28.159c-.933 0-1.808-.449-2.353-1.206l-31.425-43.693c-1.644-2.285-5.251-1.123-5.251 1.692v40.308c0 1.601-1.298 2.899-2.899 2.899z"}),a.createElement("path",{d:"m477.369 190.227c-7.763 0-14.355-1.472-19.776-4.417-5.354-3.011-9.436-6.993-12.247-11.945-2.744-5.02-4.116-10.541-4.116-16.564 0-5.019.77-9.603 2.309-13.753 1.539-4.149 4.016-7.796 7.429-10.941 3.48-3.213 8.131-5.89 13.953-8.031 4.016-1.473 8.801-2.778 14.355-3.915 5.555-1.138 11.846-2.209 18.872-3.213 4.589-.699 9.476-1.441 14.664-2.225 1.701-.258 2.481 2.042.974 2.873-1.028.566-2.292-.179-2.378-1.35-.372-5.108-1.881-8.956-4.526-11.544-3.079-3.012-8.232-4.518-15.459-4.518-4.016 0-8.198.971-12.548 2.911-3.548 1.583-6.228 4.168-8.04 7.754-.706 1.398-2.282 2.21-3.774 1.737l-19.281-6.114c-1.515-.48-2.37-2.096-1.811-3.583 2.906-7.7358 7.751-14.125 14.535-19.1678 7.563-5.6216 17.869-8.4323 30.919-8.4323 9.57 0 18.069 1.4723 25.497 4.4169 7.429 2.9446 13.05 8.0307 16.865 15.2584 2.142 4.0154 3.413 8.0308 3.815 12.0458.401 4.016.602 8.5.602 13.452v63.355c0 1.601-1.298 2.899-2.898 2.899h-18.095c-1.601 0-2.899-1.298-2.899-2.899v-14.76c0-1.47 1.876-2.088 2.75-.906.395.534.399 1.264.002 1.796-5.102 6.832-10.603 11.819-16.504 14.962-6.09 3.212-13.82 4.818-23.189 4.818zm5.822-21.482c5.019 0 9.236-.87 12.649-2.61 3.48-1.807 6.223-3.848 8.231-6.123 2.075-2.276 3.48-4.183 4.216-5.722 1.406-2.945 2.209-6.358 2.41-10.24.211-3.117.339-5.818.383-8.101.017-.882.847-1.529 1.703-1.315 1.428.357 1.345 2.42-.106 2.665-5.205.882-9.612 1.66-13.224 2.334-5.019.87-9.068 1.674-12.146 2.41-3.079.736-5.789 1.539-8.131 2.409-2.677 1.071-4.852 2.242-6.525 3.513-1.606 1.205-2.811 2.543-3.614 4.016-.736 1.472-1.104 3.112-1.104 4.919 0 2.476.602 4.617 1.807 6.424 1.271 1.74 3.045 3.079 5.32 4.016s4.986 1.405 8.131 1.405z"}),a.createElement("path",{d:"m611.484 190.227c-10.774 0-19.775-2.509-27.003-7.529-7.228-5.019-12.682-11.845-16.363-20.478-3.614-8.633-5.421-18.37-5.421-29.212 0-10.841 1.807-20.579 5.421-29.212 3.614-8.6329 8.934-15.4591 15.961-20.4783s15.694-7.5288 26-7.5288c10.373 0 19.408 2.4761 27.104 7.4284s13.652 11.745 17.868 20.3777c4.283 8.567 6.425 18.371 6.425 29.413 0 10.842-2.108 20.579-6.324 29.212-4.15 8.633-9.972 15.459-17.467 20.478-7.496 5.02-16.229 7.529-26.201 7.529zm-50.506 45.173c-1.601 0-2.898-1.297-2.898-2.898v-150.8033c0-1.6007 1.297-2.8983 2.898-2.8983h18.296c1.6 0 2.898 1.2976 2.898 2.8983v69.6793c0 .943.764 1.707 1.706 1.707.943 0 1.707.764 1.707 1.707v77.71c0 1.601-1.298 2.898-2.898 2.898zm46.089-69.466c5.89 0 10.708-1.472 14.456-4.417 3.747-2.944 6.525-6.893 8.332-11.845 1.807-5.019 2.71-10.574 2.71-16.664 0-6.023-.937-11.511-2.811-16.463-1.874-5.019-4.785-9.001-8.733-11.946-3.882-3.011-8.868-4.517-14.958-4.517-5.688 0-10.306 1.372-13.853 4.116-3.48 2.744-6.023 6.592-7.629 11.544s-2.409 10.708-2.409 17.266c0 6.559.803 12.314 2.409 17.266 1.606 4.953 4.216 8.801 7.83 11.544 3.681 2.744 8.566 4.116 14.656 4.116z"}),a.createElement("path",{d:"m707.657 190.227c-7.763 0-14.355-1.472-19.775-4.417-5.354-3.011-9.437-6.993-12.247-11.945-2.744-5.02-4.116-10.541-4.116-16.564 0-5.019.77-9.603 2.309-13.753 1.539-4.149 4.015-7.796 7.428-10.941 3.48-3.213 8.131-5.89 13.954-8.031 4.015-1.473 8.8-2.778 14.355-3.915 5.554-1.138 11.845-2.209 18.872-3.213 4.588-.699 9.476-1.441 14.663-2.225 1.702-.258 2.482 2.042.974 2.873-1.027.566-2.292-.179-2.377-1.35-.372-5.108-1.881-8.956-4.526-11.544-3.079-3.012-8.232-4.518-15.46-4.518-4.015 0-8.198.971-12.548 2.911-3.548 1.583-6.227 4.168-8.039 7.754-.706 1.398-2.282 2.21-3.775 1.737l-19.281-6.114c-1.514-.48-2.369-2.096-1.81-3.583 2.906-7.7358 7.751-14.125 14.535-19.1678 7.562-5.6216 17.868-8.4323 30.918-8.4323 9.57 0 18.069 1.4723 25.498 4.4169 7.428 2.9446 13.05 8.0307 16.865 15.2584 2.141 4.0154 3.413 8.0308 3.814 12.0458.402 4.016.603 8.5.603 13.452v63.355c0 1.601-1.298 2.899-2.899 2.899h-18.095c-1.6 0-2.898-1.298-2.898-2.899v-14.76c0-1.47 1.876-2.088 2.75-.906.395.534.399 1.264.001 1.796-5.101 6.832-10.603 11.819-16.504 14.962-6.09 3.212-13.819 4.818-23.189 4.818zm5.823-21.482c5.019 0 9.235-.87 12.648-2.61 3.48-1.807 6.224-3.848 8.232-6.123 2.074-2.276 3.48-4.183 4.216-5.722 1.405-2.945 2.208-6.358 2.409-10.24.211-3.117.339-5.818.384-8.101.017-.882.847-1.529 1.702-1.315 1.428.357 1.346 2.42-.105 2.665-5.205.882-9.613 1.66-13.224 2.334-5.019.87-9.068 1.674-12.147 2.41-3.078.736-5.788 1.539-8.131 2.409-2.677 1.071-4.852 2.242-6.525 3.513-1.606 1.205-2.81 2.543-3.614 4.016-.736 1.472-1.104 3.112-1.104 4.919 0 2.476.603 4.617 1.807 6.424 1.272 1.74 3.045 3.079 5.321 4.016 2.275.937 4.985 1.405 8.131 1.405z"}),a.createElement("path",{d:"m795.884 187.216c-1.601 0-2.898-1.298-2.898-2.899v-21.508c0-1.6 1.297-2.898 2.898-2.898h21.508c1.601 0 2.899 1.298 2.899 2.898v21.508c0 1.601-1.298 2.899-2.899 2.899z"}),a.createElement("path",{d:"m876.97 190.227c-7.763 0-14.355-1.472-19.776-4.417-5.353-3.011-9.436-6.993-12.247-11.945-2.743-5.02-4.115-10.541-4.115-16.564 0-5.019.769-9.603 2.309-13.753 1.539-4.149 4.015-7.796 7.428-10.941 3.48-3.213 8.131-5.89 13.954-8.031 4.015-1.473 8.8-2.778 14.355-3.915 5.554-1.138 11.845-2.209 18.872-3.213 4.588-.699 9.476-1.441 14.663-2.225 1.702-.258 2.482 2.042.974 2.873-1.027.566-2.292-.179-2.377-1.35-.372-5.108-1.881-8.956-4.527-11.544-3.078-3.012-8.231-4.518-15.459-4.518-4.015 0-8.198.971-12.548 2.911-3.548 1.583-6.228 4.168-8.039 7.754-.706 1.398-2.282 2.21-3.775 1.737l-19.281-6.114c-1.515-.48-2.37-2.096-1.811-3.583 2.907-7.7358 7.752-14.125 14.536-19.1678 7.562-5.6216 17.868-8.4323 30.918-8.4323 9.57 0 18.069 1.4723 25.498 4.4169 7.428 2.9446 13.05 8.0307 16.864 15.2584 2.142 4.0154 3.413 8.0308 3.815 12.0458.401 4.016.602 8.5.602 13.452v63.355c0 1.601-1.297 2.899-2.898 2.899h-18.095c-1.601 0-2.898-1.298-2.898-2.899v-14.76c0-1.47 1.876-2.088 2.75-.906.395.534.399 1.264.001 1.796-5.102 6.832-10.603 11.819-16.504 14.962-6.09 3.212-13.82 4.818-23.189 4.818zm5.823-21.482c5.019 0 9.235-.87 12.648-2.61 3.48-1.807 6.224-3.848 8.232-6.123 2.074-2.276 3.479-4.183 4.216-5.722 1.405-2.945 2.208-6.358 2.409-10.24.211-3.117.339-5.818.384-8.101.017-.882.846-1.529 1.702-1.315 1.428.357 1.345 2.42-.106 2.665-5.204.882-9.612 1.66-13.223 2.334-5.019.87-9.068 1.674-12.147 2.41-3.078.736-5.789 1.539-8.131 2.409-2.677 1.071-4.852 2.242-6.525 3.513-1.606 1.205-2.811 2.543-3.614 4.016-.736 1.472-1.104 3.112-1.104 4.919 0 2.476.602 4.617 1.807 6.424 1.272 1.74 3.045 3.079 5.32 4.016 2.276.937 4.986 1.405 8.132 1.405z"}),a.createElement("path",{d:"m962.788 63.7427c-1.601 0-2.899-1.2976-2.899-2.8983v-18.2957c0-1.6007 1.298-2.8983 2.899-2.8983h21.508c1.6 0 2.898 1.2976 2.898 2.8983v18.2957c0 1.6007-1.298 2.8983-2.898 2.8983zm0 123.4733c-1.601 0-2.899-1.298-2.899-2.899v-102.6183c0-1.6007 1.298-2.8983 2.899-2.8983h21.508c1.6 0 2.898 1.2976 2.898 2.8983v102.6183c0 1.601-1.298 2.899-2.898 2.899z"}),a.createElement("path",{d:"m195.824.5c36.051 0 65.277 29.2254 65.277 65.2764v130.4476c0 36.051-29.226 65.276-65.277 65.276h-130.447c-36.051 0-65.276414-29.225-65.276414-65.276v-130.4476c0-36.051 29.225414-65.2764 65.276414-65.2764zm-116.5564 56.5498c-.9608 0-1.7401.7785-1.7403 1.7393v136.5899c0 .961.7794 1.74 1.7403 1.74h30.3914c.961 0 1.74-.779 1.74-1.74v-38.541c0-.961.779-1.74 1.74-1.74h14.775c.614 0 1.182.323 1.495.851l23.995 40.32c.313.527.881.85 1.495.85h35.002c1.36 0 2.194-1.49 1.483-2.65l-34.842-56.785c-.357-.582-.341-1.319.042-1.884l34.817-51.466c.781-1.1555-.046-2.7149-1.442-2.7149h-34.843c-.608 0-1.172.3172-1.487.837l-24.899 41.0349c-.316.52-.88.838-1.488.838h-14.103c-.961 0-1.74-.779-1.74-1.74v-63.7999c0-.9609-.779-1.7392-1.74-1.7393z"}));function T({isPromptMode:e}){return a.createElement("div",{className:"flex gap-4 px-4 h-11 items-center border-t border-secondary"},a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-2 items-center max-md-gutters:hidden"},a.createElement("kbd",null,"↵"),a.createElement("span",null,"to ",e?"send question":"select")),!e&&a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-2 items-center max-md-gutters:hidden"},a.createElement("kbd",null,"↑"),a.createElement("kbd",null,"↓"),a.createElement("span",null,"to navigate")),a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-2 items-center max-md-gutters:hidden"},a.createElement("kbd",null,"tab"),a.createElement("span",null,"to switch mode")),a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-2 items-center max-md-gutters:hidden"},a.createElement("kbd",null,"esc"),a.createElement("span",null,"to close")),e?a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-1.5 items-center ml-auto"},a.createElement("span",null,"AI assistant by"),a.createElement("a",{href:"https://www.kapa.ai/",target:"_blank"},a.createElement(R,{className:"hocus:opacity-80"}))):a.createElement("p",{className:"text-3xs text-tertiary inline-flex gap-2 items-center ml-auto"},a.createElement("span",null,"Search by"),a.createElement("a",{href:"https://www.algolia.com/developers/?utm_medium=referral&utm_content=powered_by&utm_source=expo.dev.com&utm_campaign=docsearch",target:"_blank"},a.createElement(M,{className:"hocus:opacity-80"}))))}const z="9r24npb8",_="production",$=u.createClient({projectId:z,dataset:_,useCdn:!0,apiVersion:"v2025-02-19"}),P=d({projectId:z,dataset:_});const D=async(e,t,a,l)=>{const{hits:n,libraries:r}=await t(e,l).then((e=>e.json()));a(n||r||[])},V=(e,t,a,l,n,r={})=>[`https://${t}-dsn.algolia.net/1/indexes/${l}/query`,{method:"POST",headers:{"X-Algolia-Application-Id":t,"X-Algolia-API-Key":a},body:JSON.stringify({params:`query=${e}&hitsPerPage=${n}`,highlightPreTag:"<mark>",highlightPostTag:"</mark>",...r})}],F=(e,t)=>fetch(...V(e,"QEX7PB7D46","6652d26570e8628af4601e1d78ad456b","expo",20,{facetFilters:[["version:none",`version:${t}`]]})),K=e=>fetch(...V(e,"8TDSE0OHGQ","c9c791d9d5fd7f315d7f3859b32c1f3b","react-native-v2",5,{facetFilters:[["version:current"]]})),G=e=>$.fetch(`*[_type == "post" && publishAt < now() && (title match "${e}*" || metadataDescription match "${e}*")] | order(publishAt desc)[0...10] {\n title,\n slug,\n tags,\n metadataDescription,\n mainImage\n }`),U=e=>fetch(`https://reactnative.directory/api/libraries?search=${encodeURI(e)}&limit=5`),B=(e,t)=>({dangerouslySetInnerHTML:{__html:e._highlightResult.hierarchy[`${t}`]?.value||""}}),j=(e,t=36)=>{if(!e||!e.length)return"";const a=Math.max(e.indexOf("<mark>")-t,0),l=Math.min(e.indexOf("</mark>")+t+6,e.length);return`${0!==a?"…":""}${e.substring(a,l).trim()}${l!==e.length?"…":""}`},Z=(e,t=!1)=>t?{}:{dangerouslySetInnerHTML:{__html:e._highlightResult.content?.value?j(e._highlightResult.content?.value):j(e._highlightResult.hierarchy.lvl1?.value||"",82)}},O=["/versions/","/more/"],Q=e=>O.some((t=>e.includes(t))),X=["/app-signing/","/build/","/build-reference/","/development/","/eas/","/eas/metadata/","/eas-update/","/submit/"],W=e=>X.some((t=>e.includes(t))),J=["/get-started/","/develop/","/deploy/","/faq/","/core-concepts/","/debugging/","/config-plugins/"],Y=e=>J.some((t=>e.includes(t))),ee=["/tutorial","/ui-programming/","/additional-resources/"],te=e=>ee.some((t=>e.includes(t))),ae=()=>/(Mac|iPhone|iPod|iPad)/i.test(navigator?.platform??navigator?.userAgentData?.platform??""),le=(e,t)=>{if(!e||!e.length)return"";const a=e.toLowerCase().indexOf(t.toLowerCase());if(-1===a)return e;const l=a+t.length;return e.substring(0,a)+"<mark>"+e.substring(a,l)+"</mark>"+e.substring(l)},ne=({children:t,url:n,isExternalLink:r,isNested:s,onSelect:c,className:o,value:m})=>{const[i,u]=a.useState(!1),[d,p]=a.useState(!1);return a.createElement(e.Command.Item,{className:l.mergeClasses("relative",o),value:m,"data-nested":!!s||void 0,onMouseDown:e=>{(e.metaKey||e.ctrlKey)&&p(!0)},onMouseUp:e=>{!n||1!==e.button&&2!==e.button||function(e){navigator.clipboard?.writeText(e),u(!0),setTimeout((()=>u(!1)),1500)}(n)},onSelect:()=>{n&&((e,t=!1)=>{const a=document.createElement("a");t&&(a.target="_blank",a.rel="noopener noreferrer"),a.href=e,a.click()})(n,!!d||r),d?p(!1):c&&c()},onContextMenu:e=>{e.preventDefault()}},t,i&&a.createElement("div",{className:"text-2xs font-medium absolute rounded-full px-2 right-2.5 top-[calc(50%-13px)] border-secondary bg-info text-info"},"Copied!"))},re=new Intl.NumberFormat,se=({item:e,onSelect:t,query:l})=>a.createElement(ne,{value:`rnd-${e.npmPkg}`,url:e.githubUrl,isExternalLink:!0,onSelect:t},a.createElement("div",{className:"inline-flex gap-3 items-center"},a.createElement(p.GithubIcon,{className:"text-icon-secondary"}),a.createElement("div",null,a.createElement("p",{className:"text-xs font-medium",dangerouslySetInnerHTML:{__html:le(e.npmPkg,l)}}),a.createElement("p",{className:"flex items-center gap-1 text-3xs text-quaternary"},a.createElement(x.Star01Icon,{className:"icon-2xs text-icon-quaternary"}),re.format(e.github.stats.stars)," stars",e.npm.downloads?a.createElement(a.Fragment,null," ","· ",a.createElement(g.Download01Icon,{className:"icon-2xs text-icon-quaternary"}),re.format(e.npm.downloads)," downloads"):void 0)),a.createElement(A,null))),ce=({item:e,levelKey:t="lvl0"})=>e.hierarchy[t]?a.createElement(a.Fragment,null,a.createElement(L,null),a.createElement("span",{...B(e,t)})):null,oe=({item:e,onSelect:t})=>{const{lvl0:l,lvl1:n,lvl2:r,lvl3:s,lvl4:c}=e.hierarchy;return a.createElement(ne,{value:`rn-${e.objectID}`,url:e.url,isExternalLink:!0,onSelect:t},a.createElement("div",{className:"inline-flex gap-3 items-center"},a.createElement(H,{className:"shrink-0"}),a.createElement("div",null,c&&a.createElement(a.Fragment,null,a.createElement("p",{className:"text-xs font-medium",...B(e,"lvl4")}),a.createElement("p",{className:"text-3xs text-quaternary"},a.createElement("span",{...B(e,"lvl0")}),a.createElement(ce,{item:e,levelKey:"lvl1"}),a.createElement(ce,{item:e,levelKey:"lvl2"}),a.createElement(ce,{item:e,levelKey:"lvl3"}))),!c&&s&&a.createElement(a.Fragment,null,a.createElement("p",{className:"text-xs font-medium",...B(e,"lvl3")}),a.createElement("p",{className:"text-3xs text-quaternary"},a.createElement("span",{...B(e,"lvl0")}),a.createElement(ce,{item:e,levelKey:"lvl1"}),a.createElement(ce,{item:e,levelKey:"lvl2"}))),!s&&r&&a.createElement(a.Fragment,null,a.createElement("p",{className:"text-xs font-medium",...B(e,"lvl2")}),a.createElement("p",{className:"text-3xs text-quaternary"},a.createElement("span",{...B(e,"lvl0")}),a.createElement(ce,{item:e,levelKey:"lvl1"}))),!s&&!r&&n&&a.createElement(a.Fragment,null,a.createElement("p",{className:"text-xs font-medium",...B(e,"lvl1")}),a.createElement("p",{className:"text-3xs text-quaternary",...B(e,"lvl0")})),!s&&!r&&!n&&l&&a.createElement("p",{className:"text-xs font-medium",...B(e,"lvl0")}),a.createElement("p",{className:"text-2xs text-secondary",...Z(e,!0)})),a.createElement(A,null)))},me=({url:e,className:t,isNested:n})=>n?a.createElement(v.Hash02Icon,{className:l.mergeClasses("icon-sm text-icon-quaternary",t)}):Q(e)?a.createElement(l.DocsLogo,{className:l.mergeClasses("text-icon-secondary",t)}):W(e)?a.createElement(E.PlanEnterpriseIcon,{className:l.mergeClasses("text-icon-secondary",t)}):Y(e)?a.createElement(f.Home02Icon,{className:l.mergeClasses("text-icon-secondary",t)}):te(e)?a.createElement(C.GraduationHat02Icon,{className:l.mergeClasses("text-icon-secondary",t)}):a.createElement(h.BookOpen02Icon,{className:l.mergeClasses("text-icon-secondary",t)}),ie=e=>Q(e)?"Reference":W(e)?"Expo Application Services":Y(e)?"Home":te(e)?"Learn":"Guides",ue=({url:e,isNested:t=!1})=>t?a.createElement(a.Fragment,null,a.createElement("span",{className:"text-3xs text-quaternary"},ie(e)),a.createElement(L,null)):a.createElement("p",{className:"text-3xs text-quaternary"},ie(e)),de=({item:e,onSelect:t,isNested:n,transformUrl:r})=>{const{lvl0:s,lvl2:c,lvl3:o,lvl4:m,lvl6:i}=e.hierarchy,u=l.mergeClasses(n?"text-2xs":"text-xs font-medium"),d=l.mergeClasses("text-3xs text-quaternary",n&&"hidden");return a.createElement(ne,{className:l.mergeClasses(n&&"ml-8 !min-h-[32px]"),value:`expodocs-${e.objectID}`,onSelect:t,url:r?r(e.url):e.url,isNested:n,isExternalLink:!r},a.createElement("div",{className:"flex gap-3 justify-between"},a.createElement("div",{className:"inline-flex items-center gap-3 break-words"},a.createElement(me,{url:e.url,isNested:n,className:"shrink-0"}),a.createElement("div",null,i&&a.createElement(a.Fragment,null,a.createElement("p",{className:u,...B(e,"lvl6")}),!n&&a.createElement("p",{className:"text-3xs text-quaternary"},a.createElement(ue,{url:e.url,isNested:!0}),a.createElement("span",{...B(e,"lvl0")}),a.createElement(ce,{item:e,levelKey:"lvl2"}),a.createElement(ce,{item:e,levelKey:"lvl3"}),a.createElement(ce,{item:e,levelKey:"lvl4"}))),!i&&m&&a.createElement(a.Fragment,null,a.createElement("p",{className:u,...B(e,"lvl4")}),!n&&a.createElement("p",{className:d},a.createElement(ue,{url:e.url,isNested:!0}),a.createElement("span",{...B(e,"lvl0")}),a.createElement(ce,{item:e,levelKey:"lvl2"}),a.createElement(ce,{item:e,levelKey:"lvl3"}))),!i&&!m&&o&&a.createElement(a.Fragment,null,a.createElement("p",{className:u,...B(e,"lvl3")}),!n&&a.createElement("p",{className:d},a.createElement(ue,{url:e.url,isNested:!0}),a.createElement("span",{...B(e,"lvl0")}),a.createElement(ce,{item:e,levelKey:"lvl2"}))),!i&&!m&&!o&&c&&a.createElement(a.Fragment,null,a.createElement("p",{className:u,...B(e,"lvl2")}),!n&&a.createElement("p",{className:d},a.createElement(ue,{url:e.url,isNested:!0}),a.createElement("span",{...B(e,"lvl0")}))),!i&&!m&&!o&&!c&&s&&a.createElement(a.Fragment,null,a.createElement("p",{className:u,...B(e,"lvl0")}),a.createElement(ue,{url:e.url})),(!n||e.content)&&a.createElement("p",{className:l.mergeClasses("text-secondary",n?"text-3xs":"text-2xs"),...Z(e)}))),!r&&a.createElement(A,null)))},pe=({item:e,onSelect:t,query:l})=>{return a.createElement(ne,{value:`expo-blog-${e.slug.current}`,url:`https://expo.dev/blog/${e.slug.current}`,isExternalLink:!0,onSelect:t},a.createElement("div",{className:"inline-flex gap-3 items-center"},a.createElement("img",{src:(n=e.mainImage.image.asset._ref,P.image(n).auto("format").height(150).url()),alt:e.mainImage.altText,className:"size-11 object-cover rounded-md my-0.5"}),a.createElement("div",null,a.createElement("p",{className:"text-xs font-medium",dangerouslySetInnerHTML:{__html:le(e.title,l)}}),a.createElement("p",{className:"text-3xs text-quaternary",dangerouslySetInnerHTML:{__html:le(e.metadataDescription,l)}})),a.createElement(A,null)));var n};function ge({className:e}){return a.createElement("span",{className:l.mergeClasses("dots-loader inline-flex",e)},Array.from({length:3}).map(((e,t)=>a.createElement("span",{key:t,className:"opacity-0",style:{animationDelay:.2*t+"s"}},"."))))}function xe({children:e,isLoading:t}){const[n,r]=a.useState(!1),[s,c]=a.useState(!1);return a.useEffect((()=>{if(a.isValidElement(e)&&"string"==typeof e.props.children)return r(!0)}),[t]),a.createElement("pre",{className:"relative shadow-xs"},e,a.createElement(l.Button,{className:"absolute right-1.5 top-1.5",leftSlot:a.createElement(y.ClipboardIcon,{className:"text-icon-secondary"}),size:"xs",theme:"quaternary",disabled:s||!n,onClick:()=>{a.isValidElement(e)&&"string"==typeof e.props.children&&(navigator.clipboard?.writeText(e?.props?.children),c(!0),setTimeout((()=>c(!1)),1500))}}))}function Ee({conversation:e,isGeneratingAnswer:t,isPreparingAnswer:n,addFeedback:r,resetConversation:s,resetInput:c}){const[o,m]=a.useState(!1),[i,u]=a.useState(void 0),d=n||t,p=e?.getLatest();return a.createElement(a.Fragment,null,a.createElement(q,{isLoading:d}),a.createElement("div",{className:"result-container flex flex-col gap-3 !pt-3 w-full"},p?.isGenerationAborted&&a.createElement("div",{className:"text-xs bg-info text-info border border-info px-3 py-2.5 rounded-md"},"The generation has been aborted. Press Enter ",a.createElement("kbd",{className:"mx-0.5"},"↵")," to send a new question."),!d&&!p?.question&&a.createElement("div",{className:l.mergeClasses("flex flex-wrap text-xs size-full items-center justify-center text-quaternary","max-md-gutters:text-center max-md-gutters:px-5")},a.createElement("span",null,"Ask the question above and then press Enter ",a.createElement("kbd",{className:"mx-0.5"},"↵")," to send it.")),p?.question&&a.createElement("div",{className:"font-semibold mt-1 leading-relaxed"},'You asked: "',p?.question??"",'"'),n&&a.createElement("div",{className:"flex text-xs size-full items-center justify-center text-quaternary"},"Preparing answer",a.createElement(ge,null)),a.createElement(S,{children:(()=>{if(!p?.answer)return"";let e=p.answer;return e=e.replace(/\[([^\]]+)\]\(([^)]+)\)/g,"Source: [$1]($2)"),e=e.replace(/\]\(([^)]+)\)\s*Source:/g,"]($1) | Source:"),e=e.replace(/([^.!?])\s*Source:/g,"$1. Source:"),e=e.replace(/\|\s*\./g,"|"),e})(),options:{overrides:{a:{component:l.Link},pre:{component:xe,props:{isLoading:d}}}},className:"prompt-result text-xs"}),!d&&p?.id&&a.createElement(a.Fragment,null,a.createElement("div",{className:l.mergeClasses("inline-flex items-center w-full gap-2 mt-1","max-md-gutters:flex-col")},a.createElement(l.Button,{skipCapitalization:!0,theme:"secondary",size:"xs",leftSlot:a.createElement(y.ClipboardIcon,null),disabled:o,onClick:()=>{p?.answer&&(navigator.clipboard?.writeText(p.answer),m(!0),setTimeout((()=>m(!1)),1500))}},"Copy answer"),a.createElement(l.Button,{skipCapitalization:!0,theme:"secondary",size:"xs",leftSlot:a.createElement(b.RefreshCcw02Icon,null),className:"mr-auto max-md-gutters:mx-auto",onClick:()=>{s?.(),c?.()}},"Reset conversation"),a.createElement("div",{className:l.mergeClasses("contents items-center w-full gap-x-2 gap-y-3","max-md-gutters:justify-center max-md-gutters:inline-flex")},a.createElement("p",{className:"text-tertiary text-2xs"},"Rate answer:"),a.createElement(l.Button,{theme:"secondary",size:"xs",className:"shrink-0",disabled:i,leftSlot:!0===i?a.createElement(I.ThumbsUpSolidIcon,{className:"text-icon-success"}):a.createElement(k.ThumbsUpIcon,{className:"text-icon-success"}),onClick:()=>{r?.(p.id,"upvote"),u(!0)}}),a.createElement(l.Button,{theme:"secondary",size:"xs",className:"shrink-0",disabled:i,leftSlot:!1===i?a.createElement(w.ThumbsDownSolidIcon,{className:"text-icon-danger"}):a.createElement(N.ThumbsDownIcon,{className:"text-icon-danger"}),onClick:()=>{r?.(p.id,"downvote"),u(!1)}}))),a.createElement("p",{className:l.mergeClasses("text-quaternary text-2xs my-1 mx-auto","max-md-gutters:mt-0.5")},"Expo AI assistant is an experimental feature."))))}function he({label:e,isActive:t,onClick:n}){return a.createElement("div",{onClick:n,className:l.mergeClasses("flex items-center text-xs px-2.5 rounded-md h-full cursor-pointer transition text-tertiary whitespace-nowrap select-none min-h-8","hocus:bg-hover dark:hocus:bg-element","active:!scale-[0.975]","max-md-gutters:w-1/2 max-md-gutters:justify-center",t&&"mode-tab",t&&"bg-gradient-to-b from-palette-gray11 to-palette-black text-palette-white",t&&"dark:from-palette-gray12 dark:to-palette-white dark:text-palette-black")},e)}const Ce=({config:{docsVersion:m,docsTransformUrl:i},open:u,setOpen:d,customSections:p=[]})=>{const[g,x]=a.useState(!1),[E,h]=a.useState(!0),[C,v]=a.useState(""),[f,y]=a.useState(null),[b,N]=a.useState(!1),k=a.useRef(null),{conversation:w,submitQuery:I,isGeneratingAnswer:S,isPreparingAnswer:L,addFeedback:A,stopGeneration:H,resetConversation:M}=t.useChat(),[R,z]=a.useState([]),[_,$]=a.useState([]),[P,V]=a.useState([]),[B,j]=a.useState([]),Z=async()=>D(C,F,z,m),O=async()=>(async(e,t,a)=>{a(await t(e))})(C,G,$),Q=async()=>D(C,K,V),X=async()=>D(C,U,j),W=()=>d(!1),J=w.getLatest(),Y=e=>{Promise.all([Z(),O(),Q(),X(),...p?.map((e=>e.getItemsAsync(C)))]).then(e)},ee=()=>{if(u&&!b){h(!0);const e=setTimeout((()=>{Y((()=>h(!1)))}),150);return()=>clearTimeout(e)}},te=e=>{if("Tab"===e.key&&(e.preventDefault(),N((e=>!e)),k?.current?.focus()),b&&"Enter"===e.key&&(e.preventDefault(),C.length>0)){if(L||S)return void H();if(J?.question===C&&!J?.isGenerationAborted)return;M(),h(!0),I(C)}};a.useEffect((()=>{y("undefined"!=typeof navigator&&ae())}),[]),a.useEffect((()=>{L||S||h(!1)}),[L,S]),a.useEffect((()=>{b||ee()}),[b]),a.useEffect((()=>{if(null!==f){const e=e=>{"k"===e.key&&(f?e.metaKey:e.ctrlKey)&&(e.preventDefault(),d((e=>!e)))};return document.addEventListener("keydown",e,!1),()=>document.removeEventListener("keydown",e)}}),[f]),a.useEffect((()=>{if(u&&!g&&Y((()=>{x(!0),h(!1)})),u)return document.addEventListener("keydown",te,!1),()=>document.removeEventListener("keydown",te);document.removeEventListener("keydown",te)}),[u,b,J,C]),a.useEffect(ee,[C]);const le=o(R.map((e=>({...e,baseUrl:e.url.replace(/#.+/,"")}))),"baseUrl"),re=[C.length>10&&0===R.length&&a.createElement(e.Command.Group,{heading:"Ask AI",key:"expo-ai-prompt"},a.createElement(ne,{value:"expo-ai-prompt",onSelect:()=>{N(!0)}},a.createElement("div",{className:"inline-flex gap-3 items-center"},a.createElement(s.Stars02Icon,{className:"text-icon-secondary"}),a.createElement("div",{className:"flex flex-col"},a.createElement("p",{className:"text-xs font-medium leading-snug"},"Ask Expo's AI assistant"),a.createElement("p",{className:"text-2xs text-tertiary leading-snug"},"Experimental feature"))))),R.length>0&&a.createElement(e.Command.Group,{heading:"Expo documentation",key:"expo-docs-group"},Object.values(le).map((e=>e.sort(((e,t)=>e.url.localeCompare(e.baseUrl)-t.url.localeCompare(t.baseUrl))).slice(0,6).map(((e,t)=>a.createElement(de,{isNested:0!==t,item:e,onSelect:W,key:`hit-expo-docs-${e.objectID}`,transformUrl:i})))))),_.length>0&&a.createElement(e.Command.Group,{heading:"Expo blog",key:"expo-blog-group"},_.map((e=>a.createElement(pe,{item:e,onSelect:W,key:`hit-expo-blog-${e.slug.current}`,query:C})))),P.length>0&&a.createElement(e.Command.Group,{heading:"React Native documentation",key:"rn-docs-group"},P.map((e=>a.createElement(oe,{item:e,onSelect:W,key:`hit-rn-docs-${e.objectID}`})))),B.length>0&&a.createElement(e.Command.Group,{heading:"React Native directory",key:"rn-directory-group"},B.map((e=>a.createElement(se,{item:e,onSelect:W,key:`hit-rn-dir-${e.npmPkg}`,query:C}))))];p?.forEach((({items:t,heading:l,sectionIndex:n})=>t.length>0&&re.splice(n,0,a.createElement(e.Command.Group,{heading:l,key:`${n}-${l}`},t))));const ce=b?n.MessageQuestionCircleIcon:r.SearchSmIcon;return a.createElement(e.Command.Dialog,{open:u,onOpenChange:d,label:"Search Menu",shouldFilter:!1},a.createElement("div",{className:l.mergeClasses("relative flex px-4 gap-x-3 border-b border-secondary","max-md-gutters:flex-col")},a.createElement("div",{className:"flex relative w-full overflow-hidden"},a.createElement(ce,{className:"text-icon-tertiary absolute top-[29px] left-[13px] transition-opacity duration-200"}),a.createElement("div",{className:l.mergeClasses("absolute top-[25px] right-[9px] z-[101] cursor-pointer p-1 rounded-sm","hocus:bg-element","active:scale-[0.975]")},a.createElement(c.XIcon,{className:"text-icon-tertiary",onClick:()=>d(!1)})),a.createElement(e.Command.Input,{value:C,onValueChange:v,placeholder:b?"Ask AI…":"Search…",autoFocus:!0,ref:k})),a.createElement("div",{className:l.mergeClasses("tabs-container relative flex mt-4 mb-3 px-1.5 py-1.5 gap-1 items-center rounded-lg border border-palette-gray5 bg-subtle","dark:bg-screen dark:border-palette-gray4","max-md-gutters:mt-0",b&&"tabs-container-ai")},a.createElement(he,{label:"Search",isActive:!b,onClick:()=>{N(!1),k?.current?.focus()}}),a.createElement(he,{label:"Ask AI",isActive:b,onClick:()=>{N(!0),C.length>0&&(w.getLatest()||(h(!0),I(C))),k?.current?.focus()}}))),a.createElement(q,{isLoading:E}),a.createElement("div",{className:"relative"},a.createElement("div",{className:l.mergeClasses("pointer-events-none absolute left-0 -top-px z-10 h-6 w-[calc(100%-8px)]","bg-gradient-to-b from-default to-transparent opacity-90")}),b?a.createElement(Ee,{conversation:w,isGeneratingAnswer:S,isPreparingAnswer:L,addFeedback:A,resetConversation:M,resetInput:()=>v("")}):a.createElement(e.Command.List,null,g&&re,0===re.filter(Boolean).length&&a.createElement(e.Command.Empty,{key:"no-results-group"},a.createElement("p",{className:"text-secondary text-xs"},"No results found."))),a.createElement("div",{className:l.mergeClasses("pointer-events-none absolute left-0 -bottom-px z-10 h-6 w-[calc(100%-8px)]","bg-gradient-to-t from-default to-transparent opacity-90")})),a.createElement(T,{isPromptMode:b}))},ve=e.Command.Item;exports.CommandItemBase=ve,exports.CommandItemBaseWithCopy=ne,exports.CommandMenu=e=>a.createElement(t.KapaProvider,{userTrackingMode:"none",integrationId:"bf5bd579-bb83-4591-8cc9-d87b6cdcb712",callbacks:{}},a.createElement(Ce,{...e})),exports.CommandMenuTrigger=({setOpen:e,className:t})=>{const[n,s]=a.useState(null);return a.useEffect((()=>{s("undefined"!=typeof navigator&&ae())}),[]),a.createElement(l.Button,{theme:"secondary",leftSlot:a.createElement(r.SearchSmIcon,{className:"icon-md text-icon-secondary"}),rightSlot:null!==n?a.createElement("div",{className:"ml-auto max-md-gutters:hidden"},a.createElement("kbd",{className:"!h-5 !leading-[19px]"},n?"⌘":"Ctrl")," ",a.createElement("kbd",{className:"!h-5 !leading-[19px]"},"K")):void 0,className:l.mergeClasses("cmdk-trigger bg-default pl-2.5 pr-3 border border-default shadow-xs min-h-[40px]",t),onClick:()=>e(!0)},a.createElement("p",{className:"text-secondary font-normal leading-normal text-xs"},"Search"))},exports.addHighlight=le;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type UseChat } from '@kapaai/react-sdk';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
type Props = Partial<UseChat
|
|
4
|
-
|
|
3
|
+
type Props = Partial<UseChat> & {
|
|
4
|
+
resetInput: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function AIPromptResult({ conversation, isGeneratingAnswer, isPreparingAnswer, addFeedback, resetConversation, resetInput, }: Props): React.JSX.Element;
|
|
5
7
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/styleguide-search-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Expo's common search component for use on the web.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,6 +51,5 @@
|
|
|
51
51
|
},
|
|
52
52
|
"eslintConfig": {
|
|
53
53
|
"extends": "universe/web"
|
|
54
|
-
}
|
|
55
|
-
"gitHead": "3cc62d88c7f636542fd737699280f6f1048dc1f2"
|
|
54
|
+
}
|
|
56
55
|
}
|