Compare commits

..

3 Commits

Author SHA1 Message Date
Claire Chabas 0780396e81 keep useless import to keep PR in scope 2025-01-30 19:01:19 +01:00
Claire Chabas ce082549d8 Merge branch 'main' into claire/update-node-version-required
* main:
  Avoid dereferencing before caching (#2793)
2025-01-30 18:56:30 +01:00
Claire Chabas bae43d08ff Update Node version required 2025-01-30 17:05:35 +01:00
1394 changed files with 25041 additions and 117794 deletions
+1
View File
@@ -0,0 +1 @@
1.2.1
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix "View activity" disclosure in AI Chat not opening after the Base UI migration.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Scroll to an in-page heading even when the URL hash is unchanged (e.g. clicking the same anchor again).
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix UI search without ask AI enabled and fix error with questions not returned from API
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix empty sitemap
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Force software rendering (SwiftShader) in Playwright Chromium to eliminate image downscaling drift between GPU-equipped local runs and headless CI runs in Argos screenshots.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop showing previously asked questions as suggestions in the GitBook Assistant
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Add an assistant tool to rate its own previous response when the user reacts to it.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Add an assistant tool to submit feedback about the current page on behalf of the user.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Assistant: you can now send follow-up questions while an answer is still being written. Each one appears as your own message with a "Queued" badge (hover for when it will send, × to cancel), and they're sent automatically one at a time as each answer completes.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Support llms.txt
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Adapt code to pull token from customer backend generated custom cookies
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Simplify carousel overflow with symmetric edge masks and visible-item paging. Replaces complex negative-margin bleed logic with transparent edge fades and page-by-visible-item scrolling.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Add support for keyboard marks
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep the breadcrumbs from covering the page actions' hit area.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix search no results error showing while there are results
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Bump Next.js to 16.3.3.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": minor
---
Add a carousel layout option to cards blocks, rendering them as a horizontally-scrolling, scroll-snapping row instead of a wrapping grid.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Log component stack in Sentry
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Reintroduce a safety check around search whilst we continue investigating caching.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Track new events for site insights when ads are being clicked
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Chunk oversized visitor auth cookies to fix an infinite redirect loop when the visitor token exceeds the browser cookie size limit.
-5
View File
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Fix inline Ask AI buttons opening a configured custom assistant.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Apply antialiasing on any text that are not code inline/blocks to avoid contrast issues
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Handle security issue with cookies on Safari
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': minor
---
Add in HTTP example code blocks
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Assistant: the "Explored briefly" activity heading no longer appears when there's nothing to show. It now renders only when the answer is preceded by a real preamble or one or more tool calls, so a simple answer with an empty reasoning step no longer surfaces an empty collapsible.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop the built-in cookie banner from flashing on sites using a consent integration such as Osano or OneTrust.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix breadcrumbs for cross-space page links in grouped sites.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Investigate an issue causing caches to return empty objects instead of null/undefined.
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': minor
---
Add an optional client context to get a callback called when the Scalar client is opened for a block.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Show the theme toggle in the footer whenever the outline column that hosts the other toggle isn't pinned open, so it stays reachable on laptop-sized screens in wide layouts and while the AI chat is open.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix vertical section overflow color
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Disable click-to-zoom for inline line sized images.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Reduce gap between subsequent header buttons
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix pass Sentry release properly
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix shrinking page icons
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Add support for sidebar background styles
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Start using tint in more places, TOC and PageAside
+7
View File
@@ -0,0 +1,7 @@
---
'gitbook': patch
---
Ignore invalid API calls to `getSiteRedirectFromSource` API
To reduce the load on the API and also avoid errors.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Remove KV cache backend and only rely on DO as an external cache backend
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix default outline list styling
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix host action buttons in the Docs Embed not reaching the assistant.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the docs embed `navigateToPage` API on multi-space sites. Deep-linking to a page in a different space/section (e.g. `navigateToPage('/help-center/integrations')`) previously 404'd because the section base was not placed before `~gitbook/embed/page`. The target is now resolved to its space server-side, so pages in any space resolve correctly. The input accepts the page path, an absolute path, or the full published URL.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the Docs Embed widget rendering with a dark surface when the visitor's OS is in dark mode, even on a light page or a site published with a light theme. The embed script now accepts `?theme=light|dark` to force a scheme.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix suggested question clicks in the embed search not opening the assistant.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix switching from the Search tab to the Docs or Assistant tab in the embed doing nothing.
-5
View File
@@ -1,5 +0,0 @@
---
"@gitbook/embed": patch
---
Make the Docs Embed widget match the page it is embedded in rather than the visitor's OS: a widget on a light page stays light even when the visitor's system is in dark mode, and the widget's own chrome and the docs inside it always render in the same scheme. Sites published with a single theme impose it on the widget too, since they render in it regardless. The standalone script takes `?theme=light` on its URL, and calling `init` twice now updates the options instead of throwing.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Add configurable default visibility to Prompt block
@@ -1,6 +0,0 @@
---
"@gitbook/colors": patch
"gitbook": patch
---
A near-white tint color (e.g. a warm `#F5F3EF`) is now taken as the exact page background, mirroring the existing behavior for near-black tints. The tint's exact lightness, hue and chroma are preserved, and the color is anchored to whichever scale step the active theme renders as the background — so it matches exactly on `muted` (which uses the second step) as well as `clean`. This applies only to near-neutral tints that are light enough to read as a background; saturated or merely light-ish colors keep their normal accent scale. The `bold` theme is unaffected: it already uses the tint for the header and stays intentionally two-tone.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": minor
---
Support external links in published site navigation.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Ignore errors from event flushing
-7
View File
@@ -1,7 +0,0 @@
---
"gitbook": patch
---
Introduce client-side content selection (`select`): a site-wide, recency-ordered list of selected slugs, persisted in localStorage and shareable via `?select=`, applied to `<html>` before first paint so the right variant renders with no flash. All variants stay server-rendered, so pages are byte-identical for every visitor (no cache impact).
Tabs now use it: switching a tab activates its slug, and every tab group offering that slug follows, across pages. Tabs no longer write to the URL fragment (`#` returns to anchors only); deep-links into a tab still activate and scroll to it.
-7
View File
@@ -1,7 +0,0 @@
---
"@gitbook/openapi-parser": patch
"@gitbook/react-openapi": patch
"gitbook": patch
---
Add missing link reference to OpenAPI models
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Simplify search results logic to investigate a bug
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Skip internal paths (`~gitbook/*`, `.well-known/oauth-protected-resource`, `llms.txt`, `robots.txt`, `sitemap.xml`, `rss.xml`) when building URL lookup alternatives, to avoid resolving URLs that can never match content.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep published search results within the selected site-space scope during local and remote result fusion.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Cache API spec for 24 hours, revalidated every 2 hours
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix page link titles showing the site section name instead of the target space title.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Try to fix error on og image generation
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Improve emoji setup, align with GitBook app
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Downgrade to Next.js v14 to fix incompatibilities with next-on-pages causing multiple bugs.
-5
View File
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Update the URL hash when a tab is selected, so a copied link scrolls back to that tab
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Fix an issue where the redirects of potentially malicious images were not going through.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix zoom image view transition on Safari
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Position the variant picker in the ToC
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Update footer styling and allow for more than 4 footer groups
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Make cookies access safer
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix Image blocks zoomable behaviour
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Handle Firefox security error on localStorage
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Self-host default Google fonts and inline only the @font-face rules of the fonts a site uses, instead of shipping render-blocking stylesheets covering all 23 families on every page.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Hide card fields that render no content, along with their title
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix errors from customization not found
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Improve contrast of search box placeholder
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Add cover image background mode and masks
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Upgrade react-hotkeys-hook to v5 and use its native `useKey` option so keyboard shortcuts match the produced key on non-QWERTY layouts.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Button blocks now respect the `size` option, so you can render small, medium, or large buttons.
-7
View File
@@ -1,7 +0,0 @@
---
"@gitbook/browser-types": patch
"@gitbook/embed": patch
"gitbook": patch
---
Add an optional `context` property (string, up to 512 characters) to the `confirmation` of custom AI tools, shown above the confirmation dialog to help the user understand what they are approving or rejecting. The `confirmation` can now also be a function that receives the AI-provided input and returns the confirmation, so the context can be derived dynamically from the arguments the tool is about to run with. Available both to integrations (`GitBookIntegrationTool`) and to embed consumers (`GitBookToolDefinition`).
-5
View File
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Keep embed demos and frames on the deployment that served them.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix a hydration mismatch on every page load caused by the AI chat time-based greeting being computed in the server timezone.
+6
View File
@@ -0,0 +1,6 @@
---
'@gitbook/react-openapi': patch
'gitbook': patch
---
Do not dereference before caching OpenAPI spec.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix regression issue with page icons for multi-line titles
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Fix OG image generation for non-latin characters
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Simplify the `useHash` algo used.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Ignore cache invalidation error from local backend
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Lazy-load the Mermaid code block so pages that have code blocks but no diagram no longer ship its rendering dependencies.
-8
View File
@@ -1,8 +0,0 @@
---
"@gitbook/react-openapi": major
"gitbook": patch
---
Lazy load the Scalar API client modal and stop preloading the Scalar runtime. The modal is now code-split into its own chunk, fetched in parallel with the runtime only when a reader clicks "Test it", and a spinner is shown on the button until the client opens.
Breaking: the package no longer ships the modal in its main entry — consumers must serve the emitted `ScalarApiModal` chunk and use a bundler that supports dynamic `import()`, and the Scalar runtime is no longer preloaded on page load. The internal `preloadScalarRuntime` helper is removed.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop preloading the zoom-modal variant of every zoomable image at render time; it downloaded each image twice during the initial page load. The modal image still loads on hover or click.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': minor
---
Track events for site insights using the new dedicated API.
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': patch
---
Fix an issue where a response object using a special ref would crash the page.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Allow only good values for theme query parameter. Avoid having a 500 error when we pass an invalid value.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Serve an indexable `X-Robots-Tag` on markdown pages requested by AI agents
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Bump `@gitbook/api` to 0.199.0, and record a markdown request made from the page actions menu as a page action rather than an agent request.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": minor
---
Add an `askQuestion` tool to the site MCP server. Alongside `searchDocumentation` and `getPage`, MCP clients can now ask a natural-language question and get a synthesized answer with links to the source pages, powered by the same AI search backend as the site's "ask a question" experience. The tool accepts an optional `goal` param so calling agents can attach the intent they're trying to accomplish, which tailors the answer and is tracked in analytics. The tool is only exposed on sites that have AI enabled.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the page-actions dropdown closing before the "Copied" confirmation could be shown when copying the MCP server URL, an MCP install command, or the page as Markdown.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Submit `sendFeedback` MCP tool findings through the dedicated `submitSiteAgentFeedback` API endpoint. The `pageUrl` is now required and an optional `goal` can be provided.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Improve colour contrast of list item decoration
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Mermaid diagrams no longer hijack page scrolling: zooming with the wheel now requires holding Ctrl/Cmd inline, while the fullscreen view keeps free wheel zoom.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Migrate the headless UI primitives from Radix and react-aria to Base UI.
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Set Sentry release

Some files were not shown because too many files have changed in this diff Show More