diff --git a/README.md b/README.md
index 20a5005fb..f011225fa 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,3 @@
-
-
GitBook
@@ -28,8 +24,10 @@
- [Getting Started](#getting-started)
- [Contributing](#contributing)
-- [Types of contributions](#types-of-contributions)
+ - [Types of contributions](#types-of-contributions)
- [Licensing](#license)
+- [Acknowledgements](#acknowledgements)
+- [Legacy GitBook](#legacy-gitbook-deprecated)
## Getting Started
@@ -120,3 +118,7 @@ GitBook wouldn't be possible without these projects:
- [Bun](https://bun.sh/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Framer Motion](https://www.npmjs.com/package/framer-motion)
+
+## Legacy GitBook (Deprecated)
+
+Our previous version of GitBook and it's CLI tool are now deprecated. You can still view the old repository and it's commits on this [branch](https://github.com/GitbookIO/gitbook/tree/legacy).
diff --git a/bun.lockb b/bun.lockb
index f77d3f705..7937bcd8e 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/e2e/pages.spec.ts b/e2e/pages.spec.ts
index e71b6f80c..f032436f9 100644
--- a/e2e/pages.spec.ts
+++ b/e2e/pages.spec.ts
@@ -52,7 +52,6 @@ const testCases: TestsCase[] = [
{
name: 'Search',
url: '?q=',
- fullPage: false,
},
{
name: 'Search Results',
@@ -60,7 +59,6 @@ const testCases: TestsCase[] = [
run: async (page) => {
await page.waitForSelector('[data-test="search-results"]');
},
- fullPage: false,
},
{
name: 'AI Search',
@@ -77,17 +75,6 @@ const testCases: TestsCase[] = [
},
],
},
- {
- name: 'Snyk',
- baseUrl: 'https://docs.snyk.io',
- tests: [
- {
- name: 'Home',
- url: '',
- run: waitForCookiesDialog,
- },
- ],
- },
{
name: 'Versioning',
baseUrl: 'https://gitbook.gitbook.io/test-1-1/',
@@ -127,6 +114,7 @@ const testCases: TestsCase[] = [
name: 'Images',
url: 'blocks/block-images',
run: waitForCookiesDialog,
+ fullPage: true,
},
{
name: 'Inline Images',
@@ -152,6 +140,7 @@ const testCases: TestsCase[] = [
name: 'Tables',
url: 'blocks/tables',
run: waitForCookiesDialog,
+ fullPage: true,
},
{
name: 'Expandables',
@@ -197,6 +186,18 @@ const testCases: TestsCase[] = [
name: 'Math',
url: 'blocks/math',
},
+ {
+ name: 'Embeds',
+ url: 'blocks/embeds',
+ },
+ {
+ name: 'Annotations',
+ url: 'blocks/annotations',
+ run: async (page) => {
+ await page.waitForSelector('[data-testid="annotation-button"]');
+ await page.click('[data-testid="annotation-button"]');
+ },
+ },
],
},
{
@@ -482,7 +483,7 @@ for (const testCase of testCases) {
display: none !important;
}
`,
- fullPage: testEntry.fullPage,
+ fullPage: testEntry.fullPage ?? false,
});
}
});
diff --git a/package.json b/package.json
index 629001e2a..403bacfed 100644
--- a/package.json
+++ b/package.json
@@ -47,7 +47,6 @@
"react": "^18",
"react-dom": "^18",
"react-hotkeys-hook": "^4.4.1",
- "react-medium-image-zoom": "^5.1.10",
"recoil": "^0.7.7",
"rehype-sanitize": "^6.0.0",
"rehype-stringify": "^10.0.0",
diff --git a/packages/react-openapi/src/OpenAPISchema.tsx b/packages/react-openapi/src/OpenAPISchema.tsx
index 8056c15e7..87f0ddb0b 100644
--- a/packages/react-openapi/src/OpenAPISchema.tsx
+++ b/packages/react-openapi/src/OpenAPISchema.tsx
@@ -261,7 +261,9 @@ function getSchemaProperties(schema: OpenAPIV3.SchemaObject): null | OpenAPISche
result.push({
propertyName,
- required: schema.required?.includes(propertyName),
+ required: Array.isArray(schema.required)
+ ? schema.required.includes(propertyName)
+ : undefined,
schema: propertySchema,
});
});
diff --git a/src/components/DocumentView/Annotation/AnnotationPopover.tsx b/src/components/DocumentView/Annotation/AnnotationPopover.tsx
index b2d17a7e3..3b6e776f0 100644
--- a/src/components/DocumentView/Annotation/AnnotationPopover.tsx
+++ b/src/components/DocumentView/Annotation/AnnotationPopover.tsx
@@ -14,6 +14,7 @@ export function AnnotationPopover(props: { children: React.ReactNode; body: Reac