diff --git a/package.json b/package.json index 9f1ad841c..444872eba 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "flexsearch": "^0.7.31", "glob": "^8.1.0", "gray-matter": "^4.0.3", + "jsdom": "^22.1.0", "linkinator": "^5.0.2", "mdast-util-to-string": "^3.1.1", "mermaid": "^9.3.0", @@ -42,7 +43,6 @@ "unist-util-find-after": "^4.0.1", "unist-util-visit": "^4.1.2", "vitest": "^0.28.3", - "vue": "^3.2.47", - "jsdom": "^22.1.0" + "vue": "^3.2.47" } } diff --git a/src/__tests__/__snapshots__/links.integration.test.js.snap b/src/__tests__/__snapshots__/links.integration.test.js.snap index b07dd6855..6cd6fe44d 100644 --- a/src/__tests__/__snapshots__/links.integration.test.js.snap +++ b/src/__tests__/__snapshots__/links.integration.test.js.snap @@ -304,8 +304,12 @@ exports[`the build should not break any links 1`] = ` "/api/managed-integrations#paypal-referral", "/api/managed-integrations#top", "/api/media-uploads", + "/api/media-uploads#attributes", + "/api/media-uploads#attributes-1", "/api/media-uploads#contents", + "/api/media-uploads#create-a-presigned-url-for-media-upload", "/api/media-uploads#create-a-presigned-url-for-media-upload-experimental", + "/api/media-uploads#get-media-upload-location", "/api/media-uploads#get-media-upload-location-experimental", "/api/media-uploads#media-upload", "/api/media-uploads#media-uploads", diff --git a/src/components/CodeGroup.astro b/src/components/CodeGroup.astro new file mode 100644 index 000000000..d16fb0883 --- /dev/null +++ b/src/components/CodeGroup.astro @@ -0,0 +1,3 @@ +
+ +
diff --git a/src/components/Column.astro b/src/components/Column.astro new file mode 100644 index 000000000..7eb86336b --- /dev/null +++ b/src/components/Column.astro @@ -0,0 +1,8 @@ + +--- +const { sticky = false } = Astro.props; +--- + +
:first-child]:mt-0 [&>:last-child]:mb-0 xl:sticky xl:top-24' : '[&>:first-child]:mt-0 [&>:last-child]:mb-0'}`> + +
diff --git a/src/components/Endpoint.astro b/src/components/Endpoint.astro new file mode 100644 index 000000000..b29ad194e --- /dev/null +++ b/src/components/Endpoint.astro @@ -0,0 +1,18 @@ +--- +import Eyebrow from './Eyebrow.astro'; +import Row from './Row.astro'; +import Column from './Column.astro'; + +const { method, path, experimental = false } = Astro.props; +--- + + + + + + + + + + + diff --git a/src/components/Eyebrow.astro b/src/components/Eyebrow.astro new file mode 100644 index 000000000..34fca3d95 --- /dev/null +++ b/src/components/Eyebrow.astro @@ -0,0 +1,24 @@ +--- +const { method, path } = Astro.props; +const valueColorMap = { + GET: 'emerald', + POST: 'sky', + PUT: 'amber', + DELETE: 'rose', +}; +const color = valueColorMap[method] || 'emerald'; +const colorStyles = { + emerald: 'ring-emerald-300 dark:ring-emerald-400/30 bg-emerald-400/10 text-emerald-500 dark:text-emerald-400', + sky: 'ring-sky-300 bg-sky-400/10 text-sky-500 dark:ring-sky-400/30 dark:bg-sky-400/10 dark:text-sky-400', + amber: 'ring-amber-300 bg-amber-400/10 text-amber-500 dark:ring-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400', + rose: 'ring-rose-200 bg-rose-50 text-red-500 dark:ring-rose-500/20 dark:bg-rose-400/10 dark:text-rose-400', +} +--- + +
+
+ { method } + + { path } +
+
diff --git a/src/components/ProseCode.vue b/src/components/ProseCode.vue index 72c0a27ff..225f6bcbb 100644 --- a/src/components/ProseCode.vue +++ b/src/components/ProseCode.vue @@ -1,6 +1,6 @@