diff --git a/scripts/src/generate-llms-txt.ts b/scripts/src/generate-llms-txt.ts deleted file mode 100644 index 2eb18ae16d3..00000000000 --- a/scripts/src/generate-llms-txt.ts +++ /dev/null @@ -1,411 +0,0 @@ -import fs from 'node:fs'; -import https from 'node:https'; -import path from 'node:path'; -import url from 'node:url'; -import ts from 'typescript'; - -const OUTPUT_FILENAME = 'llms.txt'; -const TITLE = 'React Native Documentation'; -const DESCRIPTION = - 'React Native is a framework for building native apps using React. It lets you create mobile apps using only JavaScript and React.'; -const URL_PREFIX = 'https://reactnative.dev'; - -const INPUT_FILE_PATHS = [ - { - name: 'sidebars.ts', - docPath: '../docs/', - prefix: '/docs', - }, - { - name: 'sidebarsArchitecture.ts', - docPath: './architecture/', - prefix: '/architecture', - }, - { - name: 'sidebarsCommunity.ts', - docPath: './community/', - prefix: '/community', - }, - { - name: 'sidebarsContributing.ts', - docPath: './contributing/', - prefix: '/contributing', - }, -]; - -const SLUG_TO_URL = { - 'architecture-overview': 'overview', - 'architecture-glossary': 'glossary', - 'releases/releases': 'releases', -}; - -type SidebarItem = - | string - | {type: string; id?: string; items?: SidebarItem[]; label?: string}; -type Items = SidebarItem[] | {items: SidebarItem[]}; - -type SidebarConfig = { - [section: string]: { - [category: string]: Items; - }; -}; - -type UrlData = { - url: string; - status: number | string; - error?: string | null; -}; - -// Function to convert the TypeScript sidebar config to JSON -async function convertSidebarConfigToJson(fileName: string) { - const inputFileContent = fs.readFileSync( - path.join(import.meta.dirname, '../../website', fileName), - 'utf8' - ); - const tempFilePath = path.join(import.meta.dirname, `temp-${fileName}.cjs`); - - try { - const {outputText} = ts.transpileModule(inputFileContent, { - compilerOptions: { - module: ts.ModuleKind.NodeNext, - target: ts.ScriptTarget.ES2023, - }, - }); - - fs.writeFileSync(tempFilePath, outputText); - - const sidebarModule = await import(`${tempFilePath}?update=${Date.now()}`); - - return sidebarModule.default.default; - } catch (error) { - console.error('Error converting sidebar config:', error); - return null; - } finally { - if (fs.existsSync(tempFilePath)) { - fs.unlinkSync(tempFilePath); - } - } -} - -// Function to extract URLs from sidebar config -function extractUrlsFromSidebar(sidebarConfig: SidebarConfig, prefix: string) { - const urls: string[] = []; - - // Process each section (docs, api, components) - Object.entries(sidebarConfig).forEach(([, categories]) => { - Object.entries(categories).forEach(([, items]) => { - processItemsForUrls(items, urls, prefix); - }); - }); - - // Replace slugs with their mapped URLs - urls.forEach((url, index) => { - for (const [slug, mappedUrl] of Object.entries(SLUG_TO_URL)) { - if (url.includes(slug)) { - urls[index] = url.replace(slug, mappedUrl); - break; - } - } - }); - - return urls; -} - -// Recursive function to process items and extract URLs -function processItemsForUrls(items: Items, urls: string[], prefix: string) { - const itemsArray = getItemsArray(items); - - itemsArray.forEach(item => { - if (typeof item === 'string') { - urls.push(`${URL_PREFIX}${prefix}/${item}`); - } else if (typeof item === 'object') { - if (item.type === 'doc' && item.id) { - urls.push(`${URL_PREFIX}${prefix}/${item.id}`); - } else if (item.type === 'category' && Array.isArray(item.items)) { - processItemsForUrls(item.items, urls, prefix); - } - } - }); -} - -// Function to check URL status -function checkUrl(urlString: string): Promise { - return new Promise(resolve => { - const parsedUrl = url.parse(urlString); - - const options = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'HEAD', - timeout: 5000, - }; - - const req = https.request(options, res => { - resolve({ - url: urlString, - status: res.statusCode ?? 0, - }); - }); - - req.on('error', error => { - resolve({ - url: urlString, - status: 'Error', - error: error.message, - }); - }); - - req.on('timeout', () => { - req.destroy(); - resolve({ - url: urlString, - status: 'Timeout', - }); - }); - - req.end(); - }); -} - -// Process each URL -async function processUrls(urls: string[]) { - const unavailableUrls: UrlData[] = []; - - for (const urlToCheck of urls) { - const result = await checkUrl(urlToCheck); - if (result.status !== 200) { - unavailableUrls.push({ - url: urlToCheck, - status: result.status, - error: result.error || null, - }); - } - } - - return { - totalUrls: urls.length, - unavailableUrls: unavailableUrls, - }; -} - -// Function to extract title from markdown frontmatter -function extractMetadataFromMarkdown(filePath: string) { - try { - const content = fs.readFileSync(filePath, 'utf8'); - const frontmatterMatch = content.match(/---\n([\s\S]*?)\n---/); - if (frontmatterMatch) { - const frontmatter = frontmatterMatch[1]; - const titleMatch = frontmatter.match(/title:\s*(.*)/); - const slugMatch = frontmatter.match(/slug:\s*(.*)/); - - return { - title: titleMatch - ? titleMatch[1].trim() - : filePath.split('/').pop()?.replace('.md', ''), - slug: slugMatch ? slugMatch[1].trim().replace(/^\//, '') : null, - }; - } - } catch (error) { - console.error(`Error reading file ${filePath}:`, error); - } - // If no frontmatter found, on an error occurred use the filename - return { - title: filePath.split('/').pop()?.replace('.md', ''), - slug: null, - }; -} - -// Function to map special cases for file names that don't match the sidebar -interface SpecialCases { - [key: string]: string; -} - -function mapDocPath(item: string | SidebarItem, prefix: string): string { - const specialCases: SpecialCases = { - 'environment-setup': 'getting-started.md', - 'native-platform': 'native-platforms.md', - 'turbo-native-modules-introduction': 'turbo-native-modules.md', - 'fabric-native-components-introduction': 'fabric-native-components.md', - }; - - if (prefix === '/contributing') { - specialCases['overview'] = 'contributing-overview.md'; - } - - if (typeof item === 'string') { - return specialCases[item] || `${item}.md`; - } else if (item.type === 'doc' && item.id) { - return specialCases[item.id] || `${item.id}.md`; - } - return `${item}.md`; -} - -function getItemsArray(items: Items): SidebarItem[] { - if (Array.isArray(items)) { - return items; - } else { - return items.items; - } -} - -// Function to generate output for each sidebar -function generateMarkdown( - sidebarConfig: SidebarConfig, - docPath: string, - prefix: string, - unavailableUrls: UrlData[] -) { - let markdown = ''; - - // Process each section (docs, api, components) - Object.entries(sidebarConfig).forEach(([section, categories]) => { - markdown += `## ${section.charAt(0).toUpperCase() + section.slice(1)}\n\n`; - - // Process each category within the section - Object.entries(categories).forEach(([categoryName, items]) => { - markdown += `### ${categoryName === '0' ? 'General' : categoryName}\n\n`; - - const itemsArray = getItemsArray(items); - const reorderedArray = itemsArray.every(item => typeof item === 'string') - ? itemsArray - : [...itemsArray].sort((a, b) => - typeof a === 'string' && typeof b !== 'string' - ? -1 - : typeof a !== 'string' && typeof b === 'string' - ? 1 - : 0 - ); - - // Process each item in the category - for (const item of reorderedArray) { - if (typeof item === 'string') { - const fullDocPath = `${docPath}${mapDocPath(item, prefix)}`; - if (!isEntryUnavailable(unavailableUrls, fullDocPath)) { - if (item.includes('/')) { - const pathChunks = item.split('/'); - if (pathChunks[0] === pathChunks[1]) { - markdown += appendPageLink(fullDocPath, prefix, pathChunks[0]); - continue; - } - } - markdown += appendPageLink(fullDocPath, prefix, item); - } - } else if (typeof item === 'object') { - if (item.type === 'doc' && item.id) { - const fullDocPath = `${docPath}${mapDocPath(item, prefix)}`; - if (!isEntryUnavailable(unavailableUrls, fullDocPath)) { - markdown += appendPageLink(fullDocPath, prefix, item.id); - } - } else if (item.type === 'category' && Array.isArray(item.items)) { - markdown += `#### ${item.label}\n\n`; - item.items.forEach((nestedItem: SidebarItem) => { - if (typeof nestedItem === 'string') { - const fullDocPath = `${docPath}${mapDocPath(nestedItem, prefix)}`; - if (!isEntryUnavailable(unavailableUrls, fullDocPath)) { - markdown += appendPageLink(fullDocPath, prefix, nestedItem); - } - } else if (nestedItem.type === 'doc' && nestedItem.id) { - const fullDocPath = `${docPath}${mapDocPath(nestedItem, prefix)}`; - if (!isEntryUnavailable(unavailableUrls, fullDocPath)) { - markdown += appendPageLink( - fullDocPath, - prefix, - nestedItem.id - ); - } - } - }); - } - } - } - }); - }); - - // Format and cleanup whitespaces - return markdown.replace(/(#+ .*)\n/g, '\n$1\n').replace(/\n(\n)+/g, '\n\n'); -} - -function appendPageLink(fullDocPath: string, prefix: string, fsPath: string) { - const {title, slug} = extractMetadataFromMarkdown(fullDocPath); - return `- [${title}](${URL_PREFIX}${prefix}/${slug ?? fsPath})\n`; -} - -async function generateOutput() { - const results: {markdown: string; prefix: string}[] = []; - const promises = []; - - let output = `# ${TITLE}\n\n`; - output += `> ${DESCRIPTION}\n\n`; - output += `This documentation covers all aspects of using React Native, from installation to advanced usage.\n\n`; - - for (const {name, docPath, prefix} of INPUT_FILE_PATHS) { - const sidebarConfig = await convertSidebarConfigToJson(name); - - if (sidebarConfig) { - const urls = extractUrlsFromSidebar(sidebarConfig, prefix); - - const promise = processUrls(urls) - .then(result => { - if (result.unavailableUrls.length > 0) { - console.error( - 'Skipping new pages not existing in the latest version docs yet:', - result.unavailableUrls.map(entry => - entry.url.replace('/docs', '/docs/next') - ) - ); - } - const markdown = generateMarkdown( - sidebarConfig, - docPath, - prefix, - result.unavailableUrls - ); - results.push({markdown, prefix}); - - console.log(`Successfully generated output from ${name}`); - }) - .catch(err => { - console.error('Error processing URLs:', err); - process.exit(1); - }); - - promises.push(promise); - } else { - console.error('Failed to convert sidebar config to JSON'); - process.exit(1); - } - } - - // Wait for all promises to complete before writing the file - Promise.all(promises) - .then(() => { - // Sort results to ensure docs section is first - results.sort((a, b) => { - if (a.prefix === '/docs') return -1; - if (b.prefix === '/docs') return 1; - return 0; - }); - - // Combine all markdown content in the correct order - output += results.map(r => r.markdown).join('\n'); - - fs.writeFileSync(path.join('build/', OUTPUT_FILENAME), output); - console.log( - `Successfully generated documentation to: ${OUTPUT_FILENAME}` - ); - }) - .catch(err => { - console.error('Error during processing:', err); - process.exit(1); - }); -} - -function isEntryUnavailable(unavailableUrls: UrlData[], docPath: string) { - return !!unavailableUrls.find(entry => - entry.url.endsWith(docPath.substring(1)) - ); -} - -generateOutput().catch(error => { - console.error(error); -}); diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 16296a92125..3481ef6dc32 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -314,6 +314,56 @@ const config: Config = { ], }, ], + [ + '@signalwire/docusaurus-plugin-llms-txt', + { + siteTitle: 'React Native ยท Learn once, write anywhere', + siteDescription: + 'A framework for building native apps for Android, iOS, and more using React', + depth: 3, + includeOrder: [ + '/docs/getting-started', + '/docs/environment-setup', + '/docs/set-up-your-environment', + '/docs/integration-with-existing-apps', + '/docs/integration-with-android-fragment', + '/docs/intro-react-native-components', + '/docs/intro-react', + '/docs/handling-text-input', + '/docs/using-a-scrollview', + '/docs/using-a-listview', + '/docs/troubleshooting', + '/docs/platform-specific-code', + '/docs/building-for-tv', + '/docs/out-of-tree-platforms', + '/docs/more-resources', + '/docs/**', + '/architecture/**', + '/community/**', + '/showcase/**', + '/contributing/**', + '/versions', + '/blog/**', + ], + content: { + includeBlog: true, + includePages: true, + includeVersionedDocs: false, + enableLlmsFullTxt: true, + excludeRoutes: [ + '/blog/201*/**', + '/blog/2020/**', + '/blog/2021/**', + '/blog/2022/**', + '/blog/page/**', + '/blog/tags/**', + '/blog/archive', + '/blog/authors', + '/search', + ], + }, + }, + ], ], themeConfig: { colorMode: { diff --git a/website/package.json b/website/package.json index 13a921a4597..08bc28948f9 100644 --- a/website/package.json +++ b/website/package.json @@ -12,7 +12,7 @@ "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", - "build": "docusaurus build && yarn run update-redirects ./build/_redirects ./versions.json && yarn run generate-llms-txt", + "build": "docusaurus build && yarn run update-redirects ./build/_redirects ./versions.json", "build:fast": "PREVIEW_DEPLOY=true yarn run build", "tsc": "npx tsc --noEmit", "swizzle": "docusaurus swizzle", @@ -32,7 +32,6 @@ "language:lint:versioned": "cd ../ && alex . && case-police '**/*.md' -d ./website/react-native-dict.json --disable SDK,URI", "ci:lint": "yarn lint && yarn lint:examples && yarn language:lint:versioned && yarn lint:markdown:images && prettier --check src/**/*.scss", "pwa:generate": "npx pwa-asset-generator ./static/img/header_logo.svg ./static/img/pwa --padding '40px' --background 'rgb(32, 35, 42)' --icon-only --opaque true", - "generate-llms-txt": "node ../scripts/src/generate-llms-txt.ts", "update-redirects": "node ../scripts/src/update-redirects.ts" }, "browserslist": { @@ -63,6 +62,7 @@ "@docusaurus/tsconfig": "3.9.2", "@docusaurus/types": "3.9.2", "@react-native-website/lint-examples": "*", + "@signalwire/docusaurus-plugin-llms-txt": "^1.2.2", "@types/google.analytics": "^0.0.46", "@types/react": "^19.1.13", "alex": "^11.0.1", diff --git a/yarn.lock b/yarn.lock index 6dd05bb0546..91758aede4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4729,6 +4729,28 @@ __metadata: languageName: node linkType: hard +"@signalwire/docusaurus-plugin-llms-txt@npm:^1.2.2": + version: 1.2.2 + resolution: "@signalwire/docusaurus-plugin-llms-txt@npm:1.2.2" + dependencies: + fs-extra: "npm:^11.0.0" + hast-util-select: "npm:^6.0.4" + hast-util-to-html: "npm:^9.0.5" + hast-util-to-string: "npm:^3.0.1" + p-map: "npm:^7.0.2" + rehype-parse: "npm:^9" + rehype-remark: "npm:^10" + remark-gfm: "npm:^4" + remark-stringify: "npm:^11" + string-width: "npm:^5.0.0" + unified: "npm:^11" + unist-util-visit: "npm:^5" + peerDependencies: + "@docusaurus/core": ^3.0.0 + checksum: 10c0/f9c47749357fd781b092705860367482383e8d8a92e76d9d77f95f38ed7041a4b3fc5e177ef3dc97423637101dc1a24ae63aafed89a22a0de27acb74ae3552b5 + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -7072,6 +7094,13 @@ __metadata: languageName: node linkType: hard +"bcp-47-match@npm:^2.0.0": + version: 2.0.3 + resolution: "bcp-47-match@npm:2.0.3" + checksum: 10c0/ae5c202854df8a9ad4777dc3b49562578495a69164869f365a88c1a089837a9fbbce4c0c44f6f1a5e44c7841f47e91fe6fea00306ca49ce5ec95a7eb71f839c4 + languageName: node + linkType: hard + "big.js@npm:^5.2.2": version: 5.2.2 resolution: "big.js@npm:5.2.2" @@ -8200,6 +8229,13 @@ __metadata: languageName: node linkType: hard +"css-selector-parser@npm:^3.0.0": + version: 3.2.0 + resolution: "css-selector-parser@npm:3.2.0" + checksum: 10c0/6619166babf75abfe84ae42c620bceb413771a0aafd463b45c73b2a3aa504810c27f2300de107fd6bc3e3a88083c0fe6298a877f572038ab175219ef08328c9a + languageName: node + linkType: hard + "css-tree@npm:^2.3.1": version: 2.3.1 resolution: "css-tree@npm:2.3.1" @@ -8692,6 +8728,15 @@ __metadata: languageName: node linkType: hard +"direction@npm:^2.0.0": + version: 2.0.1 + resolution: "direction@npm:2.0.1" + bin: + direction: cli.js + checksum: 10c0/dce809431cad978e0778769a3818ea797ebe0bd542c85032ad9ad98971e2021a146be62feb259d7ffe4b76739e07b23e861b29c3f184ac8d38cc6ba956d5c586 + languageName: node + linkType: hard + "dns-packet@npm:^5.2.2": version: 5.6.1 resolution: "dns-packet@npm:5.6.1" @@ -10242,14 +10287,14 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^11.1.1, fs-extra@npm:^11.2.0": - version: 11.3.1 - resolution: "fs-extra@npm:11.3.1" +"fs-extra@npm:^11.0.0, fs-extra@npm:^11.1.1, fs-extra@npm:^11.2.0": + version: 11.3.2 + resolution: "fs-extra@npm:11.3.2" dependencies: graceful-fs: "npm:^4.2.0" jsonfile: "npm:^6.0.1" universalify: "npm:^2.0.0" - checksum: 10c0/61e5b7285b1ca72c68dfe1058b2514294a922683afac2a80aa90540f9bd85370763d675e3b408ef500077d355956fece3bd24b546790e261c3d3015967e2b2d9 + checksum: 10c0/f5d629e1bb646d5dedb4d8b24c5aad3deb8cc1d5438979d6f237146cd10e113b49a949ae1b54212c2fbc98e2d0995f38009a9a1d0520f0287943335e65fe919b languageName: node linkType: hard @@ -10794,6 +10839,30 @@ __metadata: languageName: node linkType: hard +"hast-util-embedded@npm:^3.0.0": + version: 3.0.0 + resolution: "hast-util-embedded@npm:3.0.0" + dependencies: + "@types/hast": "npm:^3.0.0" + hast-util-is-element: "npm:^3.0.0" + checksum: 10c0/054c3d3b96fcd5c1d1c6f8d38ce1f7f33022ba6362129a022673d0b539f876acdcababbb9df29812fb927294f98ef7a2f44519a80d637fe3eea1819c9e69eeac + languageName: node + linkType: hard + +"hast-util-from-html@npm:^2.0.0": + version: 2.0.3 + resolution: "hast-util-from-html@npm:2.0.3" + dependencies: + "@types/hast": "npm:^3.0.0" + devlop: "npm:^1.1.0" + hast-util-from-parse5: "npm:^8.0.0" + parse5: "npm:^7.0.0" + vfile: "npm:^6.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10c0/993ef707c1a12474c8d4094fc9706a72826c660a7e308ea54c50ad893353d32e139b7cbc67510c2e82feac572b320e3b05aeb13d0f9c6302d61261f337b46764 + languageName: node + linkType: hard + "hast-util-from-parse5@npm:^7.0.0": version: 7.1.2 resolution: "hast-util-from-parse5@npm:7.1.2" @@ -10832,6 +10901,15 @@ __metadata: languageName: node linkType: hard +"hast-util-has-property@npm:^3.0.0": + version: 3.0.0 + resolution: "hast-util-has-property@npm:3.0.0" + dependencies: + "@types/hast": "npm:^3.0.0" + checksum: 10c0/6e2c0e22ca893c6ebb60f8390e184c4deb041c36d09796756f02cd121c1789c0f5c862ed06caea8f1a80ea8c0ef6a7854dd57946c2eebb76488727bd4a1c952e + languageName: node + linkType: hard + "hast-util-is-body-ok-link@npm:^2.0.0": version: 2.0.0 resolution: "hast-util-is-body-ok-link@npm:2.0.0" @@ -10843,6 +10921,15 @@ __metadata: languageName: node linkType: hard +"hast-util-is-body-ok-link@npm:^3.0.0": + version: 3.0.1 + resolution: "hast-util-is-body-ok-link@npm:3.0.1" + dependencies: + "@types/hast": "npm:^3.0.0" + checksum: 10c0/c320cbd9a9a834b007a6f2f8c271e98b8331c0193adf06e0a7c5ea0acae664e97ce28eb4436e0658bc5cdb8f47390ec1c6cba7c4fe1ded10951fcdd1432f60bf + languageName: node + linkType: hard + "hast-util-is-element@npm:^2.0.0": version: 2.1.3 resolution: "hast-util-is-element@npm:2.1.3" @@ -10853,6 +10940,28 @@ __metadata: languageName: node linkType: hard +"hast-util-is-element@npm:^3.0.0": + version: 3.0.0 + resolution: "hast-util-is-element@npm:3.0.0" + dependencies: + "@types/hast": "npm:^3.0.0" + checksum: 10c0/f5361e4c9859c587ca8eb0d8343492f3077ccaa0f58a44cd09f35d5038f94d65152288dcd0c19336ef2c9491ec4d4e45fde2176b05293437021570aa0bc3613b + languageName: node + linkType: hard + +"hast-util-minify-whitespace@npm:^1.0.0": + version: 1.0.1 + resolution: "hast-util-minify-whitespace@npm:1.0.1" + dependencies: + "@types/hast": "npm:^3.0.0" + hast-util-embedded: "npm:^3.0.0" + hast-util-is-element: "npm:^3.0.0" + hast-util-whitespace: "npm:^3.0.0" + unist-util-is: "npm:^6.0.0" + checksum: 10c0/20a7d64947e080463084f444ad09c7f28c40e7648ca2d9c6c036e42a67f8e945d352560ff599304c988257c1e477abcf6a1f508c0900211fa58ec1ba21b36533 + languageName: node + linkType: hard + "hast-util-parse-selector@npm:^3.0.0": version: 3.1.1 resolution: "hast-util-parse-selector@npm:3.1.1" @@ -10884,6 +10993,19 @@ __metadata: languageName: node linkType: hard +"hast-util-phrasing@npm:^3.0.0": + version: 3.0.1 + resolution: "hast-util-phrasing@npm:3.0.1" + dependencies: + "@types/hast": "npm:^3.0.0" + hast-util-embedded: "npm:^3.0.0" + hast-util-has-property: "npm:^3.0.0" + hast-util-is-body-ok-link: "npm:^3.0.0" + hast-util-is-element: "npm:^3.0.0" + checksum: 10c0/d77e186ea3d7d62f6db9c4a55c3e6d9f1f6affd5f40250e8de9d73f167ae19fcc02fafe1601dfbe36e90f76ed5013ac004f0b6b398aee3a04a7a81de12788600 + languageName: node + linkType: hard + "hast-util-raw@npm:^9.0.0": version: 9.1.0 resolution: "hast-util-raw@npm:9.1.0" @@ -10905,6 +11027,29 @@ __metadata: languageName: node linkType: hard +"hast-util-select@npm:^6.0.4": + version: 6.0.4 + resolution: "hast-util-select@npm:6.0.4" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/unist": "npm:^3.0.0" + bcp-47-match: "npm:^2.0.0" + comma-separated-tokens: "npm:^2.0.0" + css-selector-parser: "npm:^3.0.0" + devlop: "npm:^1.0.0" + direction: "npm:^2.0.0" + hast-util-has-property: "npm:^3.0.0" + hast-util-to-string: "npm:^3.0.0" + hast-util-whitespace: "npm:^3.0.0" + nth-check: "npm:^2.0.0" + property-information: "npm:^7.0.0" + space-separated-tokens: "npm:^2.0.0" + unist-util-visit: "npm:^5.0.0" + zwitch: "npm:^2.0.0" + checksum: 10c0/d6829953f829c24ffe465c2b156f6a7cd352f7d9b4d601e0e6ca38b85cc4a720bb9f027d34881c3b2a05f4b55c9375e256dbf43ca88604230da784e1c9c7d03f + languageName: node + linkType: hard + "hast-util-to-estree@npm:^3.0.0": version: 3.1.1 resolution: "hast-util-to-estree@npm:3.1.1" @@ -10929,6 +11074,25 @@ __metadata: languageName: node linkType: hard +"hast-util-to-html@npm:^9.0.0, hast-util-to-html@npm:^9.0.5": + version: 9.0.5 + resolution: "hast-util-to-html@npm:9.0.5" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/unist": "npm:^3.0.0" + ccount: "npm:^2.0.0" + comma-separated-tokens: "npm:^2.0.0" + hast-util-whitespace: "npm:^3.0.0" + html-void-elements: "npm:^3.0.0" + mdast-util-to-hast: "npm:^13.0.0" + property-information: "npm:^7.0.0" + space-separated-tokens: "npm:^2.0.0" + stringify-entities: "npm:^4.0.0" + zwitch: "npm:^2.0.4" + checksum: 10c0/b7a08c30bab4371fc9b4a620965c40b270e5ae7a8e94cf885f43b21705179e28c8e43b39c72885d1647965fb3738654e6962eb8b58b0c2a84271655b4d748836 + languageName: node + linkType: hard + "hast-util-to-jsx-runtime@npm:^2.0.0": version: 2.3.2 resolution: "hast-util-to-jsx-runtime@npm:2.3.2" @@ -10952,6 +11116,28 @@ __metadata: languageName: node linkType: hard +"hast-util-to-mdast@npm:^10.0.0": + version: 10.1.2 + resolution: "hast-util-to-mdast@npm:10.1.2" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + "@ungap/structured-clone": "npm:^1.0.0" + hast-util-phrasing: "npm:^3.0.0" + hast-util-to-html: "npm:^9.0.0" + hast-util-to-text: "npm:^4.0.0" + hast-util-whitespace: "npm:^3.0.0" + mdast-util-phrasing: "npm:^4.0.0" + mdast-util-to-hast: "npm:^13.0.0" + mdast-util-to-string: "npm:^4.0.0" + rehype-minify-whitespace: "npm:^6.0.0" + trim-trailing-lines: "npm:^2.0.0" + unist-util-position: "npm:^5.0.0" + unist-util-visit: "npm:^5.0.0" + checksum: 10c0/2edd4521b147734078d66e03cd43c571a0a3aeefd3fcc34659c783b25e9222ddb5c8c759b12a86ebc70a25b3888505dc59b913ff36ae17cca04d52050592a963 + languageName: node + linkType: hard + "hast-util-to-nlcst@npm:^2.0.0": version: 2.2.0 resolution: "hast-util-to-nlcst@npm:2.2.0" @@ -10996,6 +11182,27 @@ __metadata: languageName: node linkType: hard +"hast-util-to-string@npm:^3.0.0, hast-util-to-string@npm:^3.0.1": + version: 3.0.1 + resolution: "hast-util-to-string@npm:3.0.1" + dependencies: + "@types/hast": "npm:^3.0.0" + checksum: 10c0/b5fa1912a6ba6131affae52a0f4394406c4c0d23c2b0307f1d69988f1030c7bb830289303e67c5ad8f674f5f23a454c1dcd492c39e45a22c1f46d3c9bce5bd0c + languageName: node + linkType: hard + +"hast-util-to-text@npm:^4.0.0": + version: 4.0.2 + resolution: "hast-util-to-text@npm:4.0.2" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/unist": "npm:^3.0.0" + hast-util-is-element: "npm:^3.0.0" + unist-util-find-after: "npm:^5.0.0" + checksum: 10c0/93ecc10e68fe5391c6e634140eb330942e71dea2724c8e0c647c73ed74a8ec930a4b77043b5081284808c96f73f2bee64ee416038ece75a63a467e8d14f09946 + languageName: node + linkType: hard + "hast-util-whitespace@npm:^2.0.0": version: 2.0.1 resolution: "hast-util-whitespace@npm:2.0.1" @@ -15777,7 +15984,7 @@ __metadata: languageName: node linkType: hard -"nth-check@npm:^2.0.1": +"nth-check@npm:^2.0.0, nth-check@npm:^2.0.1": version: 2.1.1 resolution: "nth-check@npm:2.1.1" dependencies: @@ -17516,6 +17723,13 @@ __metadata: languageName: node linkType: hard +"property-information@npm:^7.0.0": + version: 7.1.0 + resolution: "property-information@npm:7.1.0" + checksum: 10c0/e0fe22cff26103260ad0e82959229106563fa115a54c4d6c183f49d88054e489cc9f23452d3ad584179dc13a8b7b37411a5df873746b5e4086c865874bfa968e + languageName: node + linkType: hard + "proto-list@npm:~1.2.1": version: 1.2.4 resolution: "proto-list@npm:1.2.4" @@ -17818,6 +18032,7 @@ __metadata: "@docusaurus/tsconfig": "npm:3.9.2" "@docusaurus/types": "npm:3.9.2" "@react-native-website/lint-examples": "npm:*" + "@signalwire/docusaurus-plugin-llms-txt": "npm:^1.2.2" "@types/google.analytics": "npm:^0.0.46" "@types/react": "npm:^19.1.13" alex: "npm:^11.0.1" @@ -18216,6 +18431,16 @@ __metadata: languageName: node linkType: hard +"rehype-minify-whitespace@npm:^6.0.0": + version: 6.0.2 + resolution: "rehype-minify-whitespace@npm:6.0.2" + dependencies: + "@types/hast": "npm:^3.0.0" + hast-util-minify-whitespace: "npm:^1.0.0" + checksum: 10c0/e808a452068392070dcba4ea0fdc24c783e21ddc9c70008f90827ddd29afa6fb82f77473bba91e06b48cef8575553f906fa8ab44ae59700f945eb0910927acd9 + languageName: node + linkType: hard + "rehype-parse@npm:^8.0.0": version: 8.0.5 resolution: "rehype-parse@npm:8.0.5" @@ -18228,6 +18453,17 @@ __metadata: languageName: node linkType: hard +"rehype-parse@npm:^9": + version: 9.0.1 + resolution: "rehype-parse@npm:9.0.1" + dependencies: + "@types/hast": "npm:^3.0.0" + hast-util-from-html: "npm:^2.0.0" + unified: "npm:^11.0.0" + checksum: 10c0/efa9ca17673fe70e2d322a1d262796bbed5f6a89382f8f8393352bbd6f6bbf1d4d1d050984b86ff9cb6c0fa2535175ab0829e53c94b1e38fc3c158e6c0ad90bc + languageName: node + linkType: hard + "rehype-raw@npm:^7.0.0": version: 7.0.0 resolution: "rehype-raw@npm:7.0.0" @@ -18250,6 +18486,19 @@ __metadata: languageName: node linkType: hard +"rehype-remark@npm:^10": + version: 10.0.1 + resolution: "rehype-remark@npm:10.0.1" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + hast-util-to-mdast: "npm:^10.0.0" + unified: "npm:^11.0.0" + vfile: "npm:^6.0.0" + checksum: 10c0/e013fad22dd7b3bf653a79cf3dc4fecd434c5eb5f89f41e1932ae12f592b3a83c980f759d4a6ae764a61a6ea7f08330f9908c235c11510d3be731e80290aa0ba + languageName: node + linkType: hard + "rehype-retext@npm:^3.0.0": version: 3.0.2 resolution: "rehype-retext@npm:3.0.2" @@ -18344,9 +18593,9 @@ __metadata: languageName: node linkType: hard -"remark-gfm@npm:^4.0.0": - version: 4.0.0 - resolution: "remark-gfm@npm:4.0.0" +"remark-gfm@npm:^4, remark-gfm@npm:^4.0.0": + version: 4.0.1 + resolution: "remark-gfm@npm:4.0.1" dependencies: "@types/mdast": "npm:^4.0.0" mdast-util-gfm: "npm:^3.0.0" @@ -18354,7 +18603,7 @@ __metadata: remark-parse: "npm:^11.0.0" remark-stringify: "npm:^11.0.0" unified: "npm:^11.0.0" - checksum: 10c0/db0aa85ab718d475c2596e27c95be9255d3b0fc730a4eda9af076b919f7dd812f7be3ac020611a8dbe5253fd29671d7b12750b56e529fdc32dfebad6dbf77403 + checksum: 10c0/427ecc6af3e76222662061a5f670a3e4e33ec5fffe2cabf04034da6a3f9a1bda1fc023e838a636385ba314e66e2bebbf017ca61ebea357eb0f5200fe0625a4b7 languageName: node linkType: hard @@ -18439,7 +18688,7 @@ __metadata: languageName: node linkType: hard -"remark-stringify@npm:^11.0.0": +"remark-stringify@npm:^11, remark-stringify@npm:^11.0.0": version: 11.0.0 resolution: "remark-stringify@npm:11.0.0" dependencies: @@ -20235,6 +20484,13 @@ __metadata: languageName: node linkType: hard +"trim-trailing-lines@npm:^2.0.0": + version: 2.1.0 + resolution: "trim-trailing-lines@npm:2.1.0" + checksum: 10c0/9b010d16b191422d08678f5a4988213dffd8ae9445e1b0f7f7b3e5b28ffdb062a8465a7988b66999b90589b386ddc93b56d23545ba75a74ebaf5838b30594cb9 + languageName: node + linkType: hard + "trough@npm:^2.0.0": version: 2.2.0 resolution: "trough@npm:2.2.0" @@ -20662,7 +20918,7 @@ __metadata: languageName: node linkType: hard -"unified@npm:^11.0.0, unified@npm:^11.0.3, unified@npm:^11.0.4, unified@npm:^11.0.5": +"unified@npm:^11, unified@npm:^11.0.0, unified@npm:^11.0.3, unified@npm:^11.0.4, unified@npm:^11.0.5": version: 11.0.5 resolution: "unified@npm:11.0.5" dependencies: @@ -20713,6 +20969,16 @@ __metadata: languageName: node linkType: hard +"unist-util-find-after@npm:^5.0.0": + version: 5.0.0 + resolution: "unist-util-find-after@npm:5.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-is: "npm:^6.0.0" + checksum: 10c0/a7cea473c4384df8de867c456b797ff1221b20f822e1af673ff5812ed505358b36f47f3b084ac14c3622cb879ed833b71b288e8aa71025352a2aab4c2925a6eb + languageName: node + linkType: hard + "unist-util-inspect@npm:^7.0.0": version: 7.0.2 resolution: "unist-util-inspect@npm:7.0.2" @@ -20917,7 +21183,7 @@ __metadata: languageName: node linkType: hard -"unist-util-visit@npm:^5.0.0": +"unist-util-visit@npm:^5, unist-util-visit@npm:^5.0.0": version: 5.0.0 resolution: "unist-util-visit@npm:5.0.0" dependencies: @@ -22055,7 +22321,7 @@ __metadata: languageName: node linkType: hard -"zwitch@npm:^2.0.0": +"zwitch@npm:^2.0.0, zwitch@npm:^2.0.4": version: 2.0.4 resolution: "zwitch@npm:2.0.4" checksum: 10c0/3c7830cdd3378667e058ffdb4cf2bb78ac5711214e2725900873accb23f3dfe5f9e7e5a06dcdc5f29605da976fc45c26d9a13ca334d6eea2245a15e77b8fc06e