Skip to content

Commit a85cee4

Browse files
authored
Merge branch 'cloudflare:production' into production
2 parents ca79e81 + 76e7afb commit a85cee4

File tree

9 files changed

+286
-42
lines changed

9 files changed

+286
-42
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
diff --git a/node_modules/@astrojs/starlight-docsearch/DocSearch.astro b/node_modules/@astrojs/starlight-docsearch/DocSearch.astro
2+
index f50c208..5309557 100644
3+
--- a/node_modules/@astrojs/starlight-docsearch/DocSearch.astro
4+
+++ b/node_modules/@astrojs/starlight-docsearch/DocSearch.astro
5+
@@ -109,15 +109,20 @@ const docsearchTranslations: DocSearchTranslationProps = {
6+
.DocSearch-Button-Keys {
7+
margin-inline-start: auto;
8+
}
9+
- .DocSearch-Button-Keys::before {
10+
- content: '';
11+
- width: 1em;
12+
- height: 1em;
13+
- -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E");
14+
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E");
15+
- -webkit-mask-size: 100%;
16+
- mask-size: 100%;
17+
- background-color: currentColor;
18+
+ .DocSearch-Button-Key:first-child {
19+
+ margin-right: 0.4em;
20+
+ }
21+
+ .DocSearch-Button-Key {
22+
+ display: inline-block;
23+
+ font-size: 0.75em;
24+
+ font-weight: 600;
25+
+ opacity: 0.8;
26+
+ border: 1px solid var(--sl-color-gray-4);
27+
+ border-radius: 0.25rem;
28+
+ padding: 0.125rem 0.375rem;
29+
+ background-color: var(--sl-color-gray-6);
30+
+ color: var(--sl-color-gray-1);
31+
+ line-height: 1;
32+
}
33+
}
34+
</style>
35+
@@ -128,6 +133,7 @@ const docsearchTranslations: DocSearchTranslationProps = {
36+
class StarlightDocSearch extends HTMLElement {
37+
constructor() {
38+
super();
39+
+
40+
window.addEventListener('DOMContentLoaded', async () => {
41+
const { default: docsearch } = await import('@docsearch/js');
42+
const options = { ...config, container: 'sl-doc-search' };
43+
@@ -136,6 +142,27 @@ const docsearchTranslations: DocSearchTranslationProps = {
44+
Object.assign(options, translations);
45+
} catch {}
46+
docsearch(options);
47+
+
48+
+ const keyboardShortcuts = options.keyboardShortcuts ?? {};
49+
+ const slashEnabled = keyboardShortcuts?.['/'] !== false;
50+
+ const ctrlCmdKEnabled = keyboardShortcuts?.['Ctrl/Cmd+K'] !== false;
51+
+
52+
+ if (slashEnabled && !ctrlCmdKEnabled) {
53+
+ const styleContainer = document.createElement('style');
54+
+ styleContainer.innerHTML = `
55+
+ .DocSearch-Button-Keys::before {
56+
+ content: '';
57+
+ width: 1em;
58+
+ height: 1em;
59+
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E");
60+
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E");
61+
+ -webkit-mask-size: 100%;
62+
+ mask-size: 100%;
63+
+ background-color: currentColor;
64+
+ }
65+
+ `;
66+
+ document.head.appendChild(styleContainer);
67+
+ }
68+
});
69+
}
70+
}
71+
diff --git a/node_modules/@astrojs/starlight-docsearch/index.ts b/node_modules/@astrojs/starlight-docsearch/index.ts
72+
index e8cc7e5..6c88e07 100644
73+
--- a/node_modules/@astrojs/starlight-docsearch/index.ts
74+
+++ b/node_modules/@astrojs/starlight-docsearch/index.ts
75+
@@ -43,6 +43,18 @@ const DocSearchConfigSchema = z
76+
* @see https://www.algolia.com/doc/api-reference/search-api-parameters/
77+
*/
78+
searchParameters: z.custom<SearchOptions>(),
79+
+ /**
80+
+ * Configuration for keyboard shortcuts that trigger the DocSearch modal.
81+
+ * @see https://docsearch.algolia.com/docs/api/#keyboardshortcuts
82+
+ */
83+
+ keyboardShortcuts: z
84+
+ .object({
85+
+ /** Enable/disable Ctrl/Cmd+K shortcut. @default true */
86+
+ 'Ctrl/Cmd+K': z.boolean().optional(),
87+
+ /** Enable/disable / shortcut. @default true */
88+
+ '/': z.boolean().optional(),
89+
+ })
90+
+ .optional(),
91+
})
92+
.strict()
93+
.or(

patches/@docsearch+js+3.8.2.patch

Lines changed: 38 additions & 0 deletions
Large diffs are not rendered by default.

src/components/404.astro

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,37 @@
1010

1111
<script>
1212
import { track } from "~/util/zaraz";
13+
import { openGlobalSearch } from "~/util/search";
1314

1415
const { pathname } = window.location;
1516

1617
const anchor = document.getElementById("404-search-link");
18+
const pretty = decodeURIComponent(
19+
pathname.replaceAll("/", " ").replaceAll("-", " ").trim(),
20+
);
1721

1822
if (anchor) {
19-
const pretty = pathname.replaceAll("/", " ").replaceAll("-", " ").trim();
20-
2123
anchor.setAttribute("href", `/search/?q=${encodeURIComponent(pretty)}`);
2224
anchor.addEventListener("click", () => {
2325
track("serp from location", { value: "404", query: pretty });
2426
});
2527
}
28+
29+
document.addEventListener(
30+
"keydown",
31+
(keyboardEvent) => {
32+
if (
33+
(keyboardEvent.metaKey || keyboardEvent.ctrlKey) &&
34+
keyboardEvent.key === "k"
35+
) {
36+
keyboardEvent.preventDefault();
37+
keyboardEvent.stopPropagation();
38+
39+
openGlobalSearch(pretty);
40+
}
41+
},
42+
{
43+
capture: true,
44+
},
45+
);
2646
</script>

src/components/overrides/Sidebar.astro

Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ const [product, module] = Astro.url.pathname.split("/").filter(Boolean);
2222
type="text"
2323
id="sidebar-search"
2424
placeholder="Search sidebar..."
25-
class="w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-orange-500 dark:focus:border-orange-500 transition-colors duration-200"
25+
class="w-full px-3 py-2 pr-10 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-orange-500 dark:focus:border-orange-500 transition-colors duration-200"
2626
/>
27+
<div class="sidebar-search-icon"></div>
2728
</div>
2829

2930
<!-- No Results Message -->
@@ -37,7 +38,9 @@ const [product, module] = Astro.url.pathname.split("/").filter(Boolean);
3738
<Default><slot /></Default>
3839

3940
<script>
40-
import { track } from "~/util/zaraz"
41+
import { track } from "~/util/zaraz";
42+
import { openGlobalSearch } from "~/util/search";
43+
4144
function initSidebarSearch() {
4245
const searchInput = document.getElementById('sidebar-search') as HTMLInputElement;
4346
const noResultsMessage = document.getElementById('sidebar-no-results') as HTMLElement;
@@ -230,31 +233,33 @@ const [product, module] = Astro.url.pathname.split("/").filter(Boolean);
230233
globalSearchLink.addEventListener('click', () => {
231234
const currentQuery = searchInput.value.trim();
232235
if (currentQuery) {
233-
// Try multiple selectors for DocSearch
234-
const docSearchButton = document.querySelector('#docsearch button') as HTMLButtonElement ||
235-
document.querySelector('.DocSearch-Button') as HTMLButtonElement ||
236-
document.querySelector('[data-docsearch-button]') as HTMLButtonElement;
237-
238-
if (docSearchButton) {
239-
// Click the DocSearch button to open the modal
240-
docSearchButton.click();
241-
242-
// Wait for modal to open and set the search term
243-
setTimeout(() => {
244-
const searchInput = document.querySelector('.DocSearch-Input') as HTMLInputElement ||
245-
document.querySelector('#docsearch-input') as HTMLInputElement ||
246-
document.querySelector('[data-docsearch-input]') as HTMLInputElement;
247-
248-
if (searchInput) {
249-
searchInput.value = currentQuery;
250-
searchInput.focus();
251-
// Trigger search
252-
searchInput.dispatchEvent(new Event('input', { bubbles: true }));
253-
}
254-
}, 100);
255-
}
236+
openGlobalSearch(currentQuery);
256237
}
257238
});
239+
240+
document.addEventListener(
241+
"keydown",
242+
(keyboardEvent) => {
243+
const target = keyboardEvent.target;
244+
245+
const isInput =
246+
target instanceof EventTarget &&
247+
(("tagName" in target &&
248+
(target.tagName === "INPUT" ||
249+
target.tagName === "TEXTAREA" ||
250+
target.tagName === "SELECT")) ||
251+
("isContentEditable" in target && target.isContentEditable));
252+
253+
if (keyboardEvent.key === "/" && !isInput) {
254+
keyboardEvent.preventDefault();
255+
keyboardEvent.stopPropagation();
256+
searchInput.focus();
257+
}
258+
},
259+
{
260+
capture: true,
261+
},
262+
);
258263
}
259264

260265
// Initialize when DOM is loaded
@@ -269,6 +274,21 @@ const [product, module] = Astro.url.pathname.split("/").filter(Boolean);
269274
</script>
270275

271276
<style is:global>
277+
.sidebar-search-icon {
278+
position: absolute;
279+
right: 12px;
280+
top: 50%;
281+
transform: translateY(-50%);
282+
width: 1em;
283+
height: 1em;
284+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E");
285+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E");
286+
-webkit-mask-size: 100%;
287+
mask-size: 100%;
288+
background-color: currentColor;
289+
pointer-events: none;
290+
}
291+
272292
:root {
273293
.sidebar-content {
274294
--sl-color-hairline-light: #cacaca !important;

src/content/docs/cloudflare-one/policies/data-loss-prevention/detection-entries.mdx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,19 @@ Your new document entry will replace the original document entry. If your file u
135135

136136
## AI prompt topics
137137

138-
DLP uses [Application Granular Controls](/cloudflare-one/policies/gateway/http-policies/#application-granular-controls) to detect and categorize prompts submitted to generative AI tools. Application Granular Controls analyzes prompts for both content and user intent. Supported prompt topic detections include:
139-
140-
| Detection entry | Description |
141-
| ------------------------------------- | ------------------------------------------------------------------------------------------------ |
142-
| Content: PII | Prompt contains personal information such as names, SSNs, or email addresses |
143-
| Content: Credentials and Secrets | Prompt contains API keys, passwords, or other sensitive credentials |
144-
| Content: Source Code | Prompt contains actual source code, code snippets, or proprietary algorithms |
145-
| Content: Customer Data | Prompt contains customer names, projects, business activities, or confidential customer contexts |
146-
| Content: Financial Information | Prompt contains financial numbers or confidential business data |
147-
| Intent: PII | Prompt requests specific personal information about individuals |
148-
| Intent: Code Abuse and Malicious Code | Prompt requests malicious code for attacks, exploits, or harmful activities |
149-
| Intent: Jailbreak | Prompt attempts to circumvent AI security policies |
150-
151-
To use an AI prompt topic, add it as an existing entry to a [custom DLP profile](/cloudflare-one/policies/data-loss-prevention/dlp-profiles/#build-a-custom-profile).
138+
DLP uses [Application Granular Controls](/cloudflare-one/policies/gateway/http-policies/#application-granular-controls) to detect and categorize prompts submitted to generative AI tools. Application Granular Controls analyzes prompts for both content and user intent. Supported AI prompt protection detections include:
139+
140+
| Detection entry | Description |
141+
| ------------------------------------- | ------------------------------------------------------------------------------------------------- |
142+
| Content: PII | Prompt contains personal information such as names, SSNs, or email addresses. |
143+
| Content: Credentials and Secrets | Prompt contains API keys, passwords, or other sensitive credentials. |
144+
| Content: Source Code | Prompt contains actual source code, code snippets, or proprietary algorithms. |
145+
| Content: Customer Data | Prompt contains customer names, projects, business activities, or confidential customer contexts. |
146+
| Content: Financial Information | Prompt contains financial numbers or confidential business data. |
147+
| Intent: PII | Prompt requests specific personal information about individuals. |
148+
| Intent: Code Abuse and Malicious Code | Prompt requests malicious code for attacks, exploits, or harmful activities. |
149+
| Intent: Jailbreak | Prompt attempts to circumvent AI security policies. |
150+
151+
Each detection entry is categorized as either Content or Intent. Content focuses on the specific text or data the user provides the generative AI tool. It is the information the AI needs to process and analyze to generate a response. Intent focuses on the user's goal or objective for the AI's response. It dictates the type of output the user wants to receive. This category is particularly useful for customers who are using SaaS connectors or MCPs that provide the AI application access to internal data sources that contain sensitive information.
152+
153+
To use an AI prompt topic, configure the corresponding [predefined DLP profile](/cloudflare-one/policies/data-loss-prevention/dlp-profiles/predefined-profiles/#ai-prompt) or add it as an existing entry to a [custom DLP profile](/cloudflare-one/policies/data-loss-prevention/dlp-profiles/#build-a-custom-profile). AI prompt protection is available for ChatGPT, Google Gemini, Perplexity, and Claude.

src/content/docs/cloudflare-one/policies/data-loss-prevention/dlp-profiles/predefined-profiles.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ import { Render } from "~/components";
99

1010
Cloudflare Zero Trust provides predefined DLP profiles for common types of sensitive data. Some profiles include built-in validation checks to increase detection granularity. Additionally, you can configure [advanced settings](/cloudflare-one/policies/data-loss-prevention/dlp-profiles/advanced-settings/) for predefined profiles.
1111

12+
## AI Prompt
13+
14+
DLP provides AI prompt protection with the following predefined profiles:
15+
16+
- AI Prompt: AI Security
17+
- AI Prompt: Customer
18+
- AI Prompt: Financial Information
19+
- AI Prompt: PII
20+
- AI Prompt: Technical
21+
22+
For more information on included detection entries, refer to [AI prompt topics](/cloudflare-one/policies/data-loss-prevention/detection-entries/#ai-prompt-topics).
23+
1224
## Credentials and Secrets
1325

1426
The following secrets are validated with regex.

src/content/docs/magic-wan/zero-trust/cloudflare-gateway.mdx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Render } from "~/components";
1010

1111
[Cloudflare Gateway](/cloudflare-one/policies/gateway/), our comprehensive Secure Web Gateway, allows you to set up policies to inspect DNS, network, HTTP, and egress traffic.
1212

13-
You can apply network and HTTP Gateway policies alongside [Magic Firewall](/magic-firewall/) policies (for L3/4 traffic filtering) to Internet-bound traffic or private traffic entering the Cloudflare network via Magic WAN.
13+
You can apply network and HTTP Gateway policies alongside [Magic Firewall](/magic-firewall/) policies (for L3/4 traffic filtering) to Internet-bound traffic or private traffic entering the Cloudflare network via Magic WAN. Additionally, you can configure Gateway to [resolve DNS queries](#dns-filtering) from Magic WAN.
1414

1515
## HTTPS filtering
1616

@@ -32,6 +32,28 @@ If your organization onboards users to Magic WAN via an [on-ramp other than WARP
3232
| --------- | -------- | ---------------- | -------------- |
3333
| Source IP | in | `203.0.113.0/24` | Do Not Inspect |
3434

35+
## DNS filtering
36+
37+
You can configure the DNS resolver for your Magic WAN networks to the shared IP addresses for the Gateway DNS resolver. The Gateway DNS resolver IPs are `172.64.36.1` and `172.64.36.2`. When you resolve DNS queries from Magic WAN through Gateway, Gateway will log the queries with the private source IP. You can use the private source IP to create [resolver policies](/cloudflare-one/policies/gateway/resolver-policies/) for queries intended for [internal DNS records](/cloudflare-one/policies/gateway/resolver-policies/#internal-dns).
38+
39+
```mermaid
40+
flowchart LR
41+
subgraph subGraph0["Data center"]
42+
direction TB
43+
InternalDNS(["Internal DNS"])
44+
ResolverPolicies["Resolver policies"]
45+
CloudflareGatewayDNSResolver["Gateway DNS resolver"]
46+
end
47+
ResolverPolicies -- Retain and use</br>Source Internal IP --> InternalDNS
48+
CloudflareGatewayDNSResolver -- <br> --> ResolverPolicies
49+
WarpConnector["WARP Connector"] -- DHCP/DNS resolver --> IPSecTunnel["IPsec tunnel"]
50+
MagicWAN["Magic WAN"] -- DHCP/DNS resolver --> IPSecTunnel
51+
IPSecTunnel -- Shared IP endpoints --> CloudflareGatewayDNSResolver
52+
ResolverPolicies@{ shape: proc}
53+
WarpConnector@{ shape: in-out}
54+
MagicWAN@{ shape: in-out}
55+
```
56+
3557
## Outbound Internet traffic
3658

3759
By default, the following traffic routed through Magic WAN tunnels and destined to public IP addresses is proxied/filtered through Cloudflare Gateway:
@@ -50,6 +72,7 @@ By default, TCP, UDP, and ICMP traffic routed through Magic WAN tunnels and dest
5072
Contact your account team to enable Gateway filtering for traffic destined to routes behind Magic WAN tunnels.
5173

5274
If enabled, by default TCP/UDP traffic meeting **all** the following criteria will be proxied/filtered by Cloudflare Gateway:
75+
5376
- Both source and destination IPs are part of either [RFC1918](https://datatracker.ietf.org/doc/html/rfc1918) space, [WARP](/cloudflare-one/connections/connect-devices/warp/), [BYO](/byoip/) or [Leased IPs](/magic-transit/cloudflare-ips/)
5477
- Source port must be a client port strictly higher than `1023`
5578
- Destination port is a well-known port lower than `1024`

src/plugins/docsearch/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,9 @@ export default {
4343
},
4444
};
4545
},
46+
// @ts-expect-error Will be fixed with the next release of @docsearch/js
47+
keyboardShortcuts: {
48+
"Ctrl/Cmd+K": true,
49+
"/": false,
50+
},
4651
} satisfies DocSearchClientOptions;

src/util/search.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
export const openGlobalSearch = (searchTerm?: string) => {
2+
// Try multiple selectors for DocSearch
3+
const docSearchButton =
4+
(document.querySelector("#docsearch button") as HTMLButtonElement) ||
5+
(document.querySelector(".DocSearch-Button") as HTMLButtonElement) ||
6+
(document.querySelector("[data-docsearch-button]") as HTMLButtonElement);
7+
8+
if (docSearchButton) {
9+
// Click the DocSearch button to open the modal
10+
docSearchButton.click();
11+
12+
if (searchTerm) {
13+
// Wait for modal to open and set the search term
14+
setTimeout(() => {
15+
const searchInput =
16+
(document.querySelector(".DocSearch-Input") as HTMLInputElement) ||
17+
(document.querySelector("#docsearch-input") as HTMLInputElement) ||
18+
(document.querySelector(
19+
"[data-docsearch-input]",
20+
) as HTMLInputElement);
21+
22+
if (searchInput) {
23+
searchInput.value = searchTerm;
24+
searchInput.focus();
25+
// Trigger search
26+
searchInput.dispatchEvent(new Event("input", { bubbles: true }));
27+
}
28+
}, 100);
29+
}
30+
}
31+
};

0 commit comments

Comments
 (0)