mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-11-01 09:49:53 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 52a61fd1e3 | |||
| 5abe43b451 | |||
| e82744d952 | |||
| 68bfc636b2 | |||
| c008cc7cc2 | |||
| a41fb53445 | |||
| 8f4085d392 | |||
| a4f81c28b0 |
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Avoid multiple <h1> in the page by using a <div> for the title in the header
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': patch
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Adds content-visibility css property to OpenAPI Operation for better render performance
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/cache-do': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Experiment with optimizing billable duration in Cloudflare by using multiple RPC sessions instead of one
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix scroll position when navigating pages on mobile
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add Python support in Code Samples
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add automatic color contrast in site header, restyle search button
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
RND-3532: drop down menu for hidden links at small screen size
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Change dark mode shadow for multi-space search toolbar
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use ellipsis and fix icon color for more links in the header on small screen
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Improve consistency of change request preview by removing cache-control on response
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/icons': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update version for static assets to fix invalid caching
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Revalidate change request cached content when pressing refresh button
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/icons': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix first run of the package in development mode
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add navigation tabs for sections
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Improve performances of loading pages with embeds by caching them
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
bump: scalar from 1.0.5 to 1.0.7
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Support resolution of new site URLs with sections
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Replace all icons, previously imported from Geist, by new package `@gitbook/icons`
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/cache-do': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
First version of a new cache backend powered by Cloudflare Durable Objects
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add support for Norwegian language
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Optimize layout shift while transitioning between pages with full width blocks (ex: OpenAPI blocks)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add support for page icons
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix GitBook specific static assets not being served correctly when deployed on Cloudflare
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Only display spaces dropdown in compact header when site is multi-variants
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Improve perception of fast loading by not rendering skeletons for individual blocks in the top part of the viewport
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/cache-do': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Enable Workers observability with a sampling of 0.1
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/icons': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Initial release for `@gitbook/icons`, a package of content icons to be used for pages, documents, etc.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Automatically scroll to active item in TOC
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add support for searching results in a sections site
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Persist state of tabs and dynamically sync them based on title
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Ensure "Sponsored via GitBook" can be translated in all languages
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update ogimage with new design
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Show the caption for file blocks
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use url hash to open Expandable and scroll to anchor
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix margin for paragraphs in quote blocks
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use new cache backend, powered by Durable Objects, alongside the existing ones (KV, etc).
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Include offset in calculations of whether scrollable element is in view
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add required query parameters to the code sample
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Display pattern if available in parmas in OpenAPI block
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix inconsistent click area in table because of scroll indicator
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Stop using KV cache backend for now, but also improves it for higher performances
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': minor
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Synchronize response and response example tabs
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Show definition title when visible in cards
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix flickering when displaying an "Ask" answer with code blocks
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': minor
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Rollback of scalar modal while fixing perf issue
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Optimize images rendered in community ads
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update design of Checkbox to be more consistent and readable
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-contentkit': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix rendering of webframe with SSR causing wrong communication between frame and renderer
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Disable KV cache for docs.gitbook.com as a test, also disable it for change-request to improve consistency
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add optional env `GITBOOK_INTEGRATIONS_HOST` to configure the host serving the integrations
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix crash when `example` is undefined for a response
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Improve the toolbar for change-requests and revisions to show more actions
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Added support for new Reusable Content block.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add support for icons style customization for sites
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Adds tabs to Response Example section e.g. for status code examples
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Render mandatory headers in code sample
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-openapi': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update Scalar client to latest version
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Prevent search indexation for pages where it's configured as disabled
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix table of contents being visible on mobile when disabled at the page level
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix accessibility of the table of contents by using `aria-current` instead of `aria-selected`
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Update rendering of community ads to match new API response, and make it possible to preview ads.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/react-math': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Export binary `gitbook-math` to copy assets to a directory
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix "ip" being passed to BSA for community ads
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Improving the look and feel of new section tabs
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Changed the alternative URL resolution criteria in order to support site URLs without /v/ prefix
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@gitbook/icons': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix bin gitbook-icons when installed without the Pro token
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Don't show hidden pages in the empty state of a page
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'gitbook': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix linking to a tab itself
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
'gitbook': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update header styling of sections, variant selector, and button links
|
||||||
|
|
||||||
|
- Change position of variant selector depending on context (next to logo or in table of contents)
|
||||||
|
- Update section tab styling and animation
|
||||||
|
- Make header buttons smaller with a new `medium` button size
|
||||||
+11
-43
@@ -13,12 +13,8 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
deployments: write
|
deployments: write
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
checks: write
|
|
||||||
statuses: write
|
|
||||||
outputs:
|
outputs:
|
||||||
deployment_url: ${{ steps.deploy.outputs.url }}
|
deployment_url: ${{ steps.cloudflare.outputs.url }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -56,55 +52,27 @@ jobs:
|
|||||||
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
|
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
|
||||||
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
|
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
|
||||||
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
|
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
|
||||||
- id: deploy
|
- id: cloudflare
|
||||||
name: Deploy to Cloudflare
|
name: Publish to Cloudflare Pages
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: cloudflare/pages-action@v1
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
|
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
|
||||||
|
directory: ./packages/gitbook/.vercel/output/static
|
||||||
|
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
workingDirectory: ./
|
workingDirectory: ./
|
||||||
wranglerVersion: '3.82.0'
|
|
||||||
command: pages deploy ./packages/gitbook/.vercel/output/static --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }} --branch=${{ github.ref == 'refs/heads/main' && 'main' || format('pr{0}', github.event.pull_request.number) }}
|
|
||||||
- name: Outputs
|
- name: Outputs
|
||||||
run: |
|
run: |
|
||||||
echo "URL: ${{ steps.deploy.outputs.url }}"
|
echo "ID: ${{ steps.cloudflare.outputs.id }}"
|
||||||
echo "Alias URL: ${{ steps.deploy.outputs.deployment-alias-url }}"
|
echo "URL: ${{ steps.cloudflare.outputs.url }}"
|
||||||
|
echo "Environment: ${{ steps.cloudflare.outputs.environment }}"
|
||||||
|
echo "Alias: ${{ steps.cloudflare.outputs.alias }}"
|
||||||
- name: Archive build output
|
- name: Archive build output
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-output
|
name: build-output
|
||||||
path: .vercel/
|
path: .vercel/
|
||||||
# Until https://github.com/cloudflare/wrangler-action/issues/301 is done
|
|
||||||
- name: Update Deployment Status to Success
|
|
||||||
env:
|
|
||||||
DEPLOYMENT_URL: ${{ steps.deploy.outputs.url }}
|
|
||||||
run: |
|
|
||||||
curl -X POST \
|
|
||||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
|
||||||
-d '{"state": "success", "target_url": "${{ steps.deploy.outputs.url }}", "description": "Deployed Preview URL for commit", "context": "cloudflare/preview"}' \
|
|
||||||
https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Find GitHub Comment
|
|
||||||
uses: peter-evans/find-comment@v3
|
|
||||||
id: fc
|
|
||||||
if: 1 && !startsWith(github.ref, 'refs/heads/main')
|
|
||||||
with:
|
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
|
||||||
comment-author: 'github-actions[bot]'
|
|
||||||
body-includes: GitBook Preview
|
|
||||||
|
|
||||||
- name: Create or update GitHub comment
|
|
||||||
uses: peter-evans/create-or-update-comment@v4
|
|
||||||
if: 1 && !startsWith(github.ref, 'refs/heads/main')
|
|
||||||
with:
|
|
||||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
|
||||||
body: |
|
|
||||||
**GitBook Preview**
|
|
||||||
Latest commit: [${{ steps.deploy.outputs.url }}](${{ steps.deploy.outputs.url }})
|
|
||||||
PR: [${{ steps.deploy.outputs.alias }}](${{ steps.deploy.outputs.alias }})
|
|
||||||
edit-mode: replace
|
|
||||||
visual-testing:
|
visual-testing:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Visual Testing
|
name: Visual Testing
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
# @gitbook/cache-do
|
|
||||||
|
|
||||||
## 0.1.0
|
|
||||||
|
|
||||||
### Minor Changes
|
|
||||||
|
|
||||||
- 9b8d519: Experiment with optimizing billable duration in Cloudflare by using multiple RPC sessions instead of one
|
|
||||||
- 636b868: First version of a new cache backend powered by Cloudflare Durable Objects
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- 56f5fa1: Enable Workers observability with a sampling of 0.1
|
|
||||||
@@ -14,14 +14,14 @@
|
|||||||
"default": "./dist/api.js"
|
"default": "./dist/api.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "0.1.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@msgpack/msgpack": "^3.0.0-beta2",
|
"@msgpack/msgpack": "^3.0.0-beta2",
|
||||||
"lru_map": "^0.4.1"
|
"lru_map": "^0.4.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5.5.3",
|
"typescript": "^5.5.3",
|
||||||
"wrangler": "3.82.0"
|
"wrangler": "^3.78.7"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"generate": "wrangler types --experimental-include-runtime",
|
"generate": "wrangler types --experimental-include-runtime",
|
||||||
|
|||||||
@@ -1,100 +1,5 @@
|
|||||||
# gitbook
|
# gitbook
|
||||||
|
|
||||||
## 0.4.0
|
|
||||||
|
|
||||||
### Minor Changes
|
|
||||||
|
|
||||||
- e09f747: Revalidate change request cached content when pressing refresh button
|
|
||||||
- 2fa0851: Add navigation tabs for sections
|
|
||||||
- a4b63b8: Support resolution of new site URLs with sections
|
|
||||||
- 5c35f36: Replace all icons, previously imported from Geist, by new package `@gitbook/icons`
|
|
||||||
- e9b31a5: Unify section tab styles with page item styles
|
|
||||||
- f12a215: Add support for Norwegian language
|
|
||||||
- f4c9536: Optimize layout shift while transitioning between pages with full width blocks (ex: OpenAPI blocks)
|
|
||||||
- 1f24fe4: Add support for page icons
|
|
||||||
- cda08a9: Add support for searching results in a sections site
|
|
||||||
- b32e40c: Persist state of tabs and dynamically sync them based on title
|
|
||||||
- 15d2ee3: Show the caption for file blocks
|
|
||||||
- f885e88: Improve the toolbar for change-requests and revisions to show more actions
|
|
||||||
- 07ea45b: Remove deprecated synced block from GitBook Open
|
|
||||||
- c3675fd: Added support for new Reusable Content block.
|
|
||||||
- 1f24fe4: Add support for icons style customization for sites
|
|
||||||
- 4c19014: Prevent search indexation for pages where it's configured as disabled
|
|
||||||
- 3422ad4: Update rendering of community ads to match new API response, and make it possible to preview ads.
|
|
||||||
- 1152445: Changed the alternative URL resolution criteria in order to support site URLs without /v/ prefix
|
|
||||||
- 2c437f7: Fix linking to a tab itself
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- aa32198: Avoid multiple <h1> in the page by using a <div> for the title in the header
|
|
||||||
- 51fa3ab: Adds content-visibility css property to OpenAPI Operation for better render performance
|
|
||||||
- a7066cc: Fix scroll position when navigating pages on mobile
|
|
||||||
- c754fc9: Add automatic color contrast in site header, restyle search button
|
|
||||||
- 5fe7adb: RND-3532: drop down menu for hidden links at small screen size
|
|
||||||
- 6295881: Change dark mode shadow for multi-space search toolbar
|
|
||||||
- f89b31c: Upgrade the scalar api client package
|
|
||||||
- 13c7534: Use ellipsis and fix icon color for more links in the header on small screen
|
|
||||||
- f885e88: Improve consistency of change request preview by removing cache-control on response
|
|
||||||
- 16e6171: Improve performances of loading pages with embeds by caching them
|
|
||||||
- 34d36c6: Fix GitBook specific static assets not being served correctly when deployed on Cloudflare
|
|
||||||
- af9e66e: Only display spaces dropdown in compact header when site is multi-variants
|
|
||||||
- e3a3d6a: Improve perception of fast loading by not rendering skeletons for individual blocks in the top part of the viewport
|
|
||||||
- 042b850: Automatically scroll to active item in TOC
|
|
||||||
- d43202f: Optimize bundle size of the server output by reducing bundle size of shiki (skipping themes)
|
|
||||||
- bfbed1a: Ensure "Sponsored via GitBook" can be translated in all languages
|
|
||||||
- fe9e6c1: Update ogimage with new design
|
|
||||||
- 17f71ba: Use url hash to open Expandable and scroll to anchor
|
|
||||||
- 3c07e65: Fix margin for paragraphs in quote blocks
|
|
||||||
- 636b868: Use new cache backend, powered by Durable Objects, alongside the existing ones (KV, etc).
|
|
||||||
- f16560c: Include offset in calculations of whether scrollable element is in view
|
|
||||||
- 689f553: Fix inconsistent click area in table because of scroll indicator
|
|
||||||
- 6ce3cea: Stop using KV cache backend for now, but also improves it for higher performances
|
|
||||||
- e914903: Synchronize response and response example tabs
|
|
||||||
- 0f990c7: Show definition title when visible in cards
|
|
||||||
- e3a3d6a: Fix flickering when displaying an "Ask" answer with code blocks
|
|
||||||
- 4cbcc5b: Rollback of scalar modal while fixing perf issue
|
|
||||||
- 3996110: Optimize images rendered in community ads
|
|
||||||
- 133c3e7: Update design of Checkbox to be more consistent and readable
|
|
||||||
- 5096f7f: Disable KV cache for docs.gitbook.com as a test, also disable it for change-request to improve consistency
|
|
||||||
- 0f1565c: Add optional env `GITBOOK_INTEGRATIONS_HOST` to configure the host serving the integrations
|
|
||||||
- 2ff7ed1: Fix table of contents being visible on mobile when disabled at the page level
|
|
||||||
- b075f0f: Fix accessibility of the table of contents by using `aria-current` instead of `aria-selected`
|
|
||||||
- cb782a7: Fix "ip" being passed to BSA for community ads
|
|
||||||
- a7af3ca: Improving the look and feel of new section tabs
|
|
||||||
- 0bf985a: Don't show hidden pages in the empty state of a page
|
|
||||||
- d6c28a0: Update header styling of sections, variant selector, and button links
|
|
||||||
|
|
||||||
- Change position of variant selector depending on context (next to logo or in table of contents)
|
|
||||||
- Update section tab styling and animation
|
|
||||||
- Make header buttons smaller with a new `medium` button size
|
|
||||||
|
|
||||||
- Updated dependencies [51fa3ab]
|
|
||||||
- Updated dependencies [9b8d519]
|
|
||||||
- Updated dependencies [cf3045a]
|
|
||||||
- Updated dependencies [f89b31c]
|
|
||||||
- Updated dependencies [d0f4860]
|
|
||||||
- Updated dependencies [ef9d012]
|
|
||||||
- Updated dependencies [094e9cd]
|
|
||||||
- Updated dependencies [636b868]
|
|
||||||
- Updated dependencies [56f5fa1]
|
|
||||||
- Updated dependencies [5c35f36]
|
|
||||||
- Updated dependencies [4247361]
|
|
||||||
- Updated dependencies [aa8c49e]
|
|
||||||
- Updated dependencies [e914903]
|
|
||||||
- Updated dependencies [4cbcc5b]
|
|
||||||
- Updated dependencies [0f1565c]
|
|
||||||
- Updated dependencies [237b703]
|
|
||||||
- Updated dependencies [51955da]
|
|
||||||
- Updated dependencies [a679e72]
|
|
||||||
- Updated dependencies [c079c3c]
|
|
||||||
- Updated dependencies [5c35f36]
|
|
||||||
- Updated dependencies [776bc31]
|
|
||||||
- @gitbook/react-openapi@0.7.0
|
|
||||||
- @gitbook/cache-do@0.1.0
|
|
||||||
- @gitbook/icons@0.1.0
|
|
||||||
- @gitbook/react-contentkit@0.5.1
|
|
||||||
- @gitbook/react-math@0.6.0
|
|
||||||
|
|
||||||
## 0.3.0
|
## 0.3.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
@@ -466,11 +466,13 @@ const testCases: TestsCase[] = [
|
|||||||
{
|
{
|
||||||
title: 'Secondary button',
|
title: 'Secondary button',
|
||||||
to: { kind: 'url', url: 'https://www.gitbook.com' },
|
to: { kind: 'url', url: 'https://www.gitbook.com' },
|
||||||
|
// @ts-ignore Remove once we upgrade to the latest version of the API
|
||||||
style: 'button-secondary',
|
style: 'button-secondary',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Primary button',
|
title: 'Primary button',
|
||||||
to: { kind: 'url', url: 'https://www.gitbook.com' },
|
to: { kind: 'url', url: 'https://www.gitbook.com' },
|
||||||
|
// @ts-ignore Remove once we upgrade to the latest version of the API
|
||||||
style: 'button-primary',
|
style: 'button-primary',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gitbook",
|
"name": "gitbook",
|
||||||
"version": "0.4.0",
|
"version": "0.3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "env-cmd --silent -f ../../.env.local next dev",
|
"dev": "env-cmd --silent -f ../../.env.local next dev",
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
"clean": "rm -rf ./.next && rm -rf ./public/~gitbook/static"
|
"clean": "rm -rf ./.next && rm -rf ./public/~gitbook/static"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gitbook/api": "^0.73.0",
|
"@gitbook/api": "^0.72.0",
|
||||||
"@gitbook/cache-do": "workspace:*",
|
"@gitbook/cache-do": "workspace:*",
|
||||||
"@gitbook/emoji-codepoints": "workspace:*",
|
"@gitbook/emoji-codepoints": "workspace:*",
|
||||||
"@gitbook/icons": "workspace:*",
|
"@gitbook/icons": "workspace:*",
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
"remark-rehype": "^11.1.0",
|
"remark-rehype": "^11.1.0",
|
||||||
"rison": "^0.1.1",
|
"rison": "^0.1.1",
|
||||||
"server-only": "^0.0.1",
|
"server-only": "^0.0.1",
|
||||||
"shiki": "^1.22.0",
|
"shiki": "^1.11.1",
|
||||||
"tailwind-merge": "^2.2.0",
|
"tailwind-merge": "^2.2.0",
|
||||||
"tailwind-shades": "^1.1.2",
|
"tailwind-shades": "^1.1.2",
|
||||||
"unified": "^11.0.4",
|
"unified": "^11.0.4",
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@argos-ci/playwright": "^2.0.0",
|
"@argos-ci/playwright": "^2.0.0",
|
||||||
"@playwright/test": "^1.42.1",
|
"@playwright/test": "^1.42.1",
|
||||||
"@cloudflare/next-on-pages": "^1.13.5",
|
"@cloudflare/next-on-pages": "^1.13.3",
|
||||||
"@cloudflare/workers-types": "^4.20240725.0",
|
"@cloudflare/workers-types": "^4.20240725.0",
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"@types/jsontoxml": "^1.0.5",
|
"@types/jsontoxml": "^1.0.5",
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
import { ClassValue } from '@/lib/tailwind';
|
import { ClassValue } from '@/lib/tailwind';
|
||||||
|
|
||||||
import { BlockContentRef } from './BlockContentRef';
|
import { BlockContentRef } from './BlockContentRef';
|
||||||
|
import { BlockSyncedBlock } from './BlockSyncedBlock';
|
||||||
import { CodeBlock } from './CodeBlock';
|
import { CodeBlock } from './CodeBlock';
|
||||||
import { Divider } from './Divider';
|
import { Divider } from './Divider';
|
||||||
import { DocumentContextProps } from './DocumentView';
|
import { DocumentContextProps } from './DocumentView';
|
||||||
@@ -106,6 +107,8 @@ export function Block<T extends DocumentBlock>(props: BlockProps<T>) {
|
|||||||
throw new Error('Blocks should be directly rendered by parent');
|
throw new Error('Blocks should be directly rendered by parent');
|
||||||
case 'integration':
|
case 'integration':
|
||||||
return <IntegrationBlock {...props} block={block} />;
|
return <IntegrationBlock {...props} block={block} />;
|
||||||
|
case 'synced-block':
|
||||||
|
return <BlockSyncedBlock {...props} block={block} />;
|
||||||
case 'reusable-content':
|
case 'reusable-content':
|
||||||
return <ReusableContent {...props} block={block} />;
|
return <ReusableContent {...props} block={block} />;
|
||||||
case 'stepper':
|
case 'stepper':
|
||||||
@@ -162,6 +165,7 @@ export function BlockSkeleton(props: { block: DocumentBlock; style: ClassValue }
|
|||||||
case 'content-ref':
|
case 'content-ref':
|
||||||
case 'integration':
|
case 'integration':
|
||||||
case 'stepper':
|
case 'stepper':
|
||||||
|
case 'synced-block':
|
||||||
case 'reusable-content':
|
case 'reusable-content':
|
||||||
return <SkeletonCard id={id} style={style} />;
|
return <SkeletonCard id={id} style={style} />;
|
||||||
case 'embed':
|
case 'embed':
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import { DocumentBlockSyncedBlock } from '@gitbook/api';
|
||||||
|
|
||||||
|
import { getSyncedBlockContent } from '@/lib/api';
|
||||||
|
import { resolveContentRefWithFiles } from '@/lib/references';
|
||||||
|
|
||||||
|
import { BlockProps } from './Block';
|
||||||
|
import { Blocks, UnwrappedBlocks } from './Blocks';
|
||||||
|
|
||||||
|
export async function BlockSyncedBlock(props: BlockProps<DocumentBlockSyncedBlock>) {
|
||||||
|
const { block, ancestorBlocks, context, style } = props;
|
||||||
|
|
||||||
|
const apiToken = block.meta?.apiToken;
|
||||||
|
if (!apiToken) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We can't resolve the synced block without an organization context.
|
||||||
|
if (!context.contentRefContext) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const syncedBlock = await getSyncedBlockContent(
|
||||||
|
apiToken,
|
||||||
|
context.contentRefContext.space.organization,
|
||||||
|
block.data.ref.syncedBlock,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!syncedBlock) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<UnwrappedBlocks
|
||||||
|
nodes={syncedBlock.document.nodes}
|
||||||
|
document={syncedBlock.document}
|
||||||
|
ancestorBlocks={[...ancestorBlocks, block]}
|
||||||
|
context={{
|
||||||
|
...context,
|
||||||
|
resolveContentRef: async (ref, options) => {
|
||||||
|
if (!syncedBlock?.files) {
|
||||||
|
return context.resolveContentRef(ref, options);
|
||||||
|
}
|
||||||
|
const result = resolveContentRefWithFiles(syncedBlock.files, ref);
|
||||||
|
if (result !== undefined) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return context.resolveContentRef(ref, options);
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
import { DocumentBlockCode, DocumentBlockCodeLine, DocumentInlineAnnotation } from '@gitbook/api';
|
import { DocumentBlockCode, DocumentBlockCodeLine, DocumentInlineAnnotation } from '@gitbook/api';
|
||||||
import {
|
import {
|
||||||
createdBundledHighlighter,
|
loadWasm,
|
||||||
ThemedToken,
|
ThemedToken,
|
||||||
|
getHighlighter,
|
||||||
createCssVariablesTheme,
|
createCssVariablesTheme,
|
||||||
HighlighterGeneric,
|
HighlighterGeneric,
|
||||||
} from 'shiki/core';
|
bundledLanguages,
|
||||||
import { loadWasm, createOnigurumaEngine } from 'shiki/engine/oniguruma';
|
bundledThemes,
|
||||||
import { bundledLanguages } from 'shiki/langs';
|
} from 'shiki';
|
||||||
// @ts-ignore - onigWasm is a Wasm module
|
// @ts-ignore - onigWasm is a Wasm module
|
||||||
import onigWasm from 'shiki/onig.wasm?module';
|
import onigWasm from 'shiki/onig.wasm?module';
|
||||||
|
|
||||||
@@ -14,6 +15,8 @@ import { asyncMutexFunction, singleton } from '@/lib/async';
|
|||||||
import { getNodeText } from '@/lib/document';
|
import { getNodeText } from '@/lib/document';
|
||||||
import { trace } from '@/lib/tracing';
|
import { trace } from '@/lib/tracing';
|
||||||
|
|
||||||
|
import { DocumentContext } from '../DocumentView';
|
||||||
|
|
||||||
export type HighlightLine = {
|
export type HighlightLine = {
|
||||||
highlighted: boolean;
|
highlighted: boolean;
|
||||||
tokens: HighlightToken[];
|
tokens: HighlightToken[];
|
||||||
@@ -296,12 +299,6 @@ function cleanupLine(line: string): string {
|
|||||||
return line.replace(/\r/g, '');
|
return line.replace(/\r/g, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
const createHighlighter = createdBundledHighlighter<any, any>({
|
|
||||||
langs: bundledLanguages,
|
|
||||||
themes: {},
|
|
||||||
engine: () => createOnigurumaEngine(import('shiki/wasm')),
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the highlighter, only once, and reuse it.
|
* Load the highlighter, only once, and reuse it.
|
||||||
* It makes sure to handle concurrent calls.
|
* It makes sure to handle concurrent calls.
|
||||||
@@ -315,8 +312,7 @@ const loadHighlighter = singleton(async () => {
|
|||||||
// Otherwise for Vercel/Cloudflare, we need to load it ourselves.
|
// Otherwise for Vercel/Cloudflare, we need to load it ourselves.
|
||||||
await loadWasm((obj) => WebAssembly.instantiate(onigWasm, obj));
|
await loadWasm((obj) => WebAssembly.instantiate(onigWasm, obj));
|
||||||
}
|
}
|
||||||
|
const highlighter = await getHighlighter({
|
||||||
const highlighter = await createHighlighter({
|
|
||||||
themes: [createCssVariablesTheme()],
|
themes: [createCssVariablesTheme()],
|
||||||
langs: [],
|
langs: [],
|
||||||
});
|
});
|
||||||
@@ -326,7 +322,7 @@ const loadHighlighter = singleton(async () => {
|
|||||||
|
|
||||||
const loadLanguagesMutex = asyncMutexFunction();
|
const loadLanguagesMutex = asyncMutexFunction();
|
||||||
async function loadHighlighterLanguage(
|
async function loadHighlighterLanguage(
|
||||||
highlighter: HighlighterGeneric<any, any>,
|
highlighter: HighlighterGeneric<keyof typeof bundledLanguages, keyof typeof bundledThemes>,
|
||||||
lang: keyof typeof bundledLanguages,
|
lang: keyof typeof bundledLanguages,
|
||||||
) {
|
) {
|
||||||
await loadLanguagesMutex.runBlocking(async () => {
|
await loadLanguagesMutex.runBlocking(async () => {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export async function OpenAPI(props: BlockProps<DocumentBlockSwagger>) {
|
|||||||
|
|
||||||
async function OpenAPIBody(props: BlockProps<DocumentBlockSwagger>) {
|
async function OpenAPIBody(props: BlockProps<DocumentBlockSwagger>) {
|
||||||
const { block, context } = props;
|
const { block, context } = props;
|
||||||
const { data, specUrl, error } = await fetchOpenAPIBlock(block, context.resolveContentRef);
|
const { data, error } = await fetchOpenAPIBlock(block, context.resolveContentRef);
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return (
|
return (
|
||||||
@@ -41,7 +41,7 @@ async function OpenAPIBody(props: BlockProps<DocumentBlockSwagger>) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data || !specUrl) {
|
if (!data) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +49,6 @@ async function OpenAPIBody(props: BlockProps<DocumentBlockSwagger>) {
|
|||||||
<OpenAPIOperation
|
<OpenAPIOperation
|
||||||
data={data}
|
data={data}
|
||||||
context={{
|
context={{
|
||||||
specUrl,
|
|
||||||
icons: {
|
icons: {
|
||||||
chevronDown: <Icon icon="chevron-down" />,
|
chevronDown: <Icon icon="chevron-down" />,
|
||||||
chevronRight: <Icon icon="chevron-right" />,
|
chevronRight: <Icon icon="chevron-right" />,
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
@import '@scalar/api-client-react/style.css';
|
|
||||||
|
|
||||||
.light .scalar-modal-layout,
|
.light .scalar-modal-layout,
|
||||||
.light .scalar-app,
|
|
||||||
.light .scalar {
|
.light .scalar {
|
||||||
--scalar-color-1: color-mix(
|
--scalar-color-1: color-mix(
|
||||||
in srgb,
|
in srgb,
|
||||||
@@ -53,13 +50,8 @@
|
|||||||
--scalar-button-1: rgb(49 53 56);
|
--scalar-button-1: rgb(49 53 56);
|
||||||
--scalar-button-1-color: #fff;
|
--scalar-button-1-color: #fff;
|
||||||
--scalar-button-1-hover: rgb(28 31 33);
|
--scalar-button-1-hover: rgb(28 31 33);
|
||||||
|
|
||||||
--scalar-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.11);
|
|
||||||
--scalar-shadow-2: rgba(0, 0, 0, 0.08) 0px 13px 20px 0px, rgba(0, 0, 0, 0.08) 0px 3px 8px 0px,
|
|
||||||
#eeeeed 0px 0 0 1px;
|
|
||||||
}
|
}
|
||||||
.dark .scalar-modal-layout,
|
.dark .scalar-modal-layout,
|
||||||
.dark .scalar-app,
|
|
||||||
.dark .scalar {
|
.dark .scalar {
|
||||||
--scalar-color-1: color-mix(
|
--scalar-color-1: color-mix(
|
||||||
in srgb,
|
in srgb,
|
||||||
@@ -110,13 +102,8 @@
|
|||||||
--scalar-button-1: #f6f6f6;
|
--scalar-button-1: #f6f6f6;
|
||||||
--scalar-button-1-color: #000;
|
--scalar-button-1-color: #000;
|
||||||
--scalar-button-1-hover: #e7e7e7;
|
--scalar-button-1-hover: #e7e7e7;
|
||||||
|
|
||||||
--scalar-shadow-1: 0 1px 3px 0 rgb(0, 0, 0, 0.1);
|
|
||||||
--scalar-shadow-2: rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px,
|
|
||||||
0 0 0 1px rgba(255, 255, 255, 0.1);
|
|
||||||
}
|
}
|
||||||
.scalar-modal-layout,
|
.scalar-modal-layout,
|
||||||
.scalar-app,
|
|
||||||
.scalar {
|
.scalar {
|
||||||
--scalar-font: initial;
|
--scalar-font: initial;
|
||||||
--scalar-font-code: var(--font-mono);
|
--scalar-font-code: var(--font-mono);
|
||||||
@@ -178,7 +165,7 @@
|
|||||||
.scalar-api-client__close:hover {
|
.scalar-api-client__close:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.scalar .scalar-app-layout {
|
.scalar .scalar-app {
|
||||||
background: var(--scalar-background-3);
|
background: var(--scalar-background-3);
|
||||||
height: calc(100dvh - 100px);
|
height: calc(100dvh - 100px);
|
||||||
max-width: 1280px;
|
max-width: 1280px;
|
||||||
@@ -215,6 +202,23 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
animation: scalardrawerexitfadein 0.35s forwards;
|
animation: scalardrawerexitfadein 0.35s forwards;
|
||||||
}
|
}
|
||||||
|
.scalar .scalar-app-exit:before {
|
||||||
|
content: '\00d7';
|
||||||
|
font-family: sans-serif;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: 100;
|
||||||
|
line-height: 50px;
|
||||||
|
right: 12px;
|
||||||
|
text-align: center;
|
||||||
|
color: white;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
.scalar .scalar-app-exit:hover:before {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
@keyframes scalardrawerexitfadein {
|
@keyframes scalardrawerexitfadein {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -301,6 +305,11 @@
|
|||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
@supports (-moz-appearance: none) {
|
||||||
|
.scalar .custom-scroll {
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.scalar .custom-scroll:hover {
|
.scalar .custom-scroll:hover {
|
||||||
scrollbar-color: rgba(0, 0, 0, 0.24) transparent;
|
scrollbar-color: rgba(0, 0, 0, 0.24) transparent;
|
||||||
}
|
}
|
||||||
@@ -338,18 +347,3 @@
|
|||||||
padding-right: 12px;
|
padding-right: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.dark .scalar .client-wrapper-bg-color {
|
|
||||||
background: linear-gradient(
|
|
||||||
color-mix(in srgb, var(--tw-bg-base) 6%, transparent) 1%,
|
|
||||||
color-mix(in srgb, var(--scalar-background-1) 30%, black) 9%
|
|
||||||
);
|
|
||||||
}
|
|
||||||
.light .scalar .client-wrapper-bg-color {
|
|
||||||
background-color: var(--scalar-background-2) !important;
|
|
||||||
}
|
|
||||||
.scalar .gitbook-show {
|
|
||||||
display: block !important;
|
|
||||||
}
|
|
||||||
.scalar .gitbook-hidden {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -66,10 +66,8 @@ export async function HeaderLink(props: {
|
|||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
'button-secondary': tcls(
|
'button-secondary': tcls(
|
||||||
'bg:transparent hover:bg-transparent',
|
|
||||||
'dark:bg-transparent dark:hover:bg-transparent',
|
'dark:bg-transparent dark:hover:bg-transparent',
|
||||||
'ring-header-link-500 hover:ring-header-link-300 text-header-link-500',
|
'ring-header-link-500 hover:ring-header-link-300 dark:ring-header-link-500 dark:hover:ring-header-link-300 text-header-link-500 dark:text-header-link-500',
|
||||||
'dark:ring-header-link-500 dark:hover:ring-header-link-300 dark:text-header-link-500',
|
|
||||||
),
|
),
|
||||||
}[linkStyle],
|
}[linkStyle],
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -130,7 +130,11 @@ export function PageAside(props: {
|
|||||||
>
|
>
|
||||||
{withPageFeedback ? (
|
{withPageFeedback ? (
|
||||||
<React.Suspense fallback={null}>
|
<React.Suspense fallback={null}>
|
||||||
<PageFeedbackForm pageId={page.id} className={tcls('mt-2')} />
|
<PageFeedbackForm
|
||||||
|
spaceId={space.id}
|
||||||
|
pageId={page.id}
|
||||||
|
className={tcls('mt-2')}
|
||||||
|
/>
|
||||||
</React.Suspense>
|
</React.Suspense>
|
||||||
) : null}
|
) : null}
|
||||||
{customization.git.showEditLink && space.gitSync?.url && page.git ? (
|
{customization.git.showEditLink && space.gitSync?.url && page.git ? (
|
||||||
|
|||||||
@@ -141,7 +141,11 @@ export function PageBody(props: {
|
|||||||
</p>
|
</p>
|
||||||
) : null}
|
) : null}
|
||||||
{withPageFeedback ? (
|
{withPageFeedback ? (
|
||||||
<PageFeedbackForm orientation="horizontal" pageId={page.id} />
|
<PageFeedbackForm
|
||||||
|
orientation="horizontal"
|
||||||
|
spaceId={space.id}
|
||||||
|
pageId={page.id}
|
||||||
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -15,17 +15,18 @@ import { postPageFeedback } from './server-actions';
|
|||||||
*/
|
*/
|
||||||
export function PageFeedbackForm(props: {
|
export function PageFeedbackForm(props: {
|
||||||
orientation?: 'horizontal' | 'vertical';
|
orientation?: 'horizontal' | 'vertical';
|
||||||
|
spaceId: string;
|
||||||
pageId: string;
|
pageId: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
}) {
|
}) {
|
||||||
const { orientation = 'vertical', pageId, className } = props;
|
const { orientation = 'vertical', spaceId, pageId, className } = props;
|
||||||
const languages = useLanguage();
|
const languages = useLanguage();
|
||||||
const [submitted, setSubmitted] = React.useState(false);
|
const [submitted, setSubmitted] = React.useState(false);
|
||||||
|
|
||||||
const onSubmit = async (rating: PageFeedbackRating) => {
|
const onSubmit = async (rating: PageFeedbackRating) => {
|
||||||
setSubmitted(true);
|
setSubmitted(true);
|
||||||
const visitorId = await getVisitorId();
|
const visitorId = await getVisitorId();
|
||||||
await postPageFeedback({ pageId, visitorId, rating });
|
await postPageFeedback({ spaceId, pageId, visitorId, rating });
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,31 +1,16 @@
|
|||||||
'use server';
|
'use server';
|
||||||
|
|
||||||
import { PageFeedbackRating } from '@gitbook/api';
|
import { PageFeedbackRating } from '@gitbook/api';
|
||||||
import { assert } from 'ts-essentials';
|
|
||||||
|
|
||||||
import { api } from '@/lib/api';
|
import { api } from '@/lib/api';
|
||||||
import { getSiteContentPointer } from '@/lib/pointer';
|
|
||||||
|
|
||||||
export async function postPageFeedback(args: {
|
export async function postPageFeedback(args: {
|
||||||
|
spaceId: string;
|
||||||
pageId: string;
|
pageId: string;
|
||||||
visitorId: string;
|
visitorId: string;
|
||||||
rating: PageFeedbackRating;
|
rating: PageFeedbackRating;
|
||||||
}) {
|
}) {
|
||||||
const { organizationId, siteId, siteSpaceId } = getSiteContentPointer();
|
await api().spaces.createPageFeedback(args.spaceId, args.pageId, args.visitorId, {
|
||||||
|
rating: args.rating,
|
||||||
assert(
|
});
|
||||||
siteSpaceId,
|
|
||||||
`No siteSpaceId in pointer. organizationId: ${organizationId}, siteId: ${siteId}, pageId: ${args.pageId}`,
|
|
||||||
);
|
|
||||||
|
|
||||||
await api().orgs.createSitesPageFeedback(
|
|
||||||
organizationId,
|
|
||||||
siteId,
|
|
||||||
siteSpaceId,
|
|
||||||
args.pageId,
|
|
||||||
args.visitorId,
|
|
||||||
{
|
|
||||||
rating: args.rating,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,8 +119,7 @@ const Tab = React.forwardRef<
|
|||||||
className={tcls(
|
className={tcls(
|
||||||
'px-3 py-1 my-2 rounded straight-corners:rounded-none transition-colors',
|
'px-3 py-1 my-2 rounded straight-corners:rounded-none transition-colors',
|
||||||
active && 'text-primary dark:text-primary-400',
|
active && 'text-primary dark:text-primary-400',
|
||||||
!active &&
|
!active && ' hover:bg-light-2 dark:hover:bg-dark-3',
|
||||||
'text-dark/8 hover:bg-dark/1 hover:text-dark/9 dark:text-light/8 dark:hover:bg-light/2 dark:hover:text-light/9',
|
|
||||||
)}
|
)}
|
||||||
role="tab"
|
role="tab"
|
||||||
href={href}
|
href={href}
|
||||||
|
|||||||
@@ -192,6 +192,48 @@ export const getUserById = cache({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a synced block by its ref.
|
||||||
|
*/
|
||||||
|
export const getSyncedBlockContent = cache({
|
||||||
|
name: 'api.getSyncedBlockContent',
|
||||||
|
tag: (apiToken, organizationId, syncedBlockId) =>
|
||||||
|
getAPICacheTag({
|
||||||
|
tag: 'synced-block',
|
||||||
|
syncedBlock: syncedBlockId,
|
||||||
|
}),
|
||||||
|
get: async (
|
||||||
|
apiToken: string,
|
||||||
|
organizationId: string,
|
||||||
|
syncedBlockId: string,
|
||||||
|
options: CacheFunctionOptions,
|
||||||
|
) => {
|
||||||
|
try {
|
||||||
|
const response = await apiWithToken(apiToken).orgs.getSyncedBlockContent(
|
||||||
|
organizationId,
|
||||||
|
syncedBlockId,
|
||||||
|
{
|
||||||
|
...noCacheFetchOptions,
|
||||||
|
signal: options.signal,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
return cacheResponse(response, {
|
||||||
|
revalidateBefore: 60 * 60,
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
if ((error as GitBookAPIError).code === 404) {
|
||||||
|
return {
|
||||||
|
revalidateBefore: 60 * 60,
|
||||||
|
data: null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// We don't cache apiToken as it's not a stable key
|
||||||
|
getKeyArgs: (args) => [args[1], args[2]],
|
||||||
|
});
|
||||||
/**
|
/**
|
||||||
* Resolve a URL to the content to render.
|
* Resolve a URL to the content to render.
|
||||||
*/
|
*/
|
||||||
@@ -1166,6 +1208,11 @@ export function getAPICacheTag(
|
|||||||
tag: 'collection';
|
tag: 'collection';
|
||||||
collection: string;
|
collection: string;
|
||||||
}
|
}
|
||||||
|
// All data related to a synced block
|
||||||
|
| {
|
||||||
|
tag: 'synced-block';
|
||||||
|
syncedBlock: string;
|
||||||
|
}
|
||||||
// All data related to a site
|
// All data related to a site
|
||||||
| {
|
| {
|
||||||
tag: 'site';
|
tag: 'site';
|
||||||
@@ -1187,6 +1234,8 @@ export function getAPICacheTag(
|
|||||||
return `space:${spec.space}:document:${spec.document}`;
|
return `space:${spec.space}:document:${spec.document}`;
|
||||||
case 'collection':
|
case 'collection':
|
||||||
return `collection:${spec.collection}`;
|
return `collection:${spec.collection}`;
|
||||||
|
case 'synced-block':
|
||||||
|
return `synced-block:${spec.syncedBlock}`;
|
||||||
case 'site':
|
case 'site':
|
||||||
return `site:${spec.site}`;
|
return `site:${spec.site}`;
|
||||||
case 'integration':
|
case 'integration':
|
||||||
|
|||||||
@@ -19,12 +19,12 @@ export async function fetchOpenAPIBlock(
|
|||||||
block: DocumentBlockSwagger,
|
block: DocumentBlockSwagger,
|
||||||
resolveContentRef: (ref: ContentRef) => Promise<ResolvedContentRef | null>,
|
resolveContentRef: (ref: ContentRef) => Promise<ResolvedContentRef | null>,
|
||||||
): Promise<
|
): Promise<
|
||||||
| { data: OpenAPIOperationData | null; specUrl: string | null; error?: undefined }
|
| { data: OpenAPIOperationData | null; error?: undefined }
|
||||||
| { error: OpenAPIFetchError; data?: undefined; specUrl?: undefined }
|
| { error: OpenAPIFetchError; data?: undefined }
|
||||||
> {
|
> {
|
||||||
const resolved = block.data.ref ? await resolveContentRef(block.data.ref) : null;
|
const resolved = block.data.ref ? await resolveContentRef(block.data.ref) : null;
|
||||||
if (!resolved || !block.data.path || !block.data.method) {
|
if (!resolved || !block.data.path || !block.data.method) {
|
||||||
return { data: null, specUrl: null };
|
return { data: null };
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -37,7 +37,7 @@ export async function fetchOpenAPIBlock(
|
|||||||
fetcher,
|
fetcher,
|
||||||
);
|
);
|
||||||
|
|
||||||
return { data, specUrl: resolved.href };
|
return { data };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof OpenAPIFetchError) {
|
if (error instanceof OpenAPIFetchError) {
|
||||||
return { error };
|
return { error };
|
||||||
|
|||||||
@@ -281,6 +281,8 @@ export async function resolveContentRef(
|
|||||||
reusableContent,
|
reusableContent,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
case 'synced-block':
|
||||||
|
return null;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assertNever(contentRef);
|
assertNever(contentRef);
|
||||||
@@ -326,3 +328,22 @@ async function resolveContentRefInSpace(
|
|||||||
subText: space.title,
|
subText: space.title,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function resolveContentRefWithFiles(
|
||||||
|
files: RevisionFile[],
|
||||||
|
contentRef: ContentRef,
|
||||||
|
): ResolvedContentRef | null | undefined {
|
||||||
|
if (contentRef.kind === 'file') {
|
||||||
|
const file = files.find((file) => file.id === contentRef.file);
|
||||||
|
if (file) {
|
||||||
|
return {
|
||||||
|
href: file.downloadURL,
|
||||||
|
text: file.name,
|
||||||
|
active: false,
|
||||||
|
file,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
# @gitbook/icons
|
|
||||||
|
|
||||||
## 0.1.0
|
|
||||||
|
|
||||||
### Minor Changes
|
|
||||||
|
|
||||||
- 5c35f36: Initial release for `@gitbook/icons`, a package of content icons to be used for pages, documents, etc.
|
|
||||||
- 776bc31: Fix bin gitbook-icons when installed without the Pro token
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- d0f4860: Update version for static assets to fix invalid caching
|
|
||||||
- ef9d012: Fix first run of the package in development mode
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
"default": "./src/style.css"
|
"default": "./src/style.css"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "0.1.0",
|
"version": "0.0.3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
||||||
"@fortawesome/fontawesome-free": "^6.6.0"
|
"@fortawesome/fontawesome-free": "^6.6.0"
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
# @gitbook/react-contentkit
|
# @gitbook/react-contentkit
|
||||||
|
|
||||||
## 0.5.1
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- 0f1565c: Fix rendering of webframe with SSR causing wrong communication between frame and renderer
|
|
||||||
|
|
||||||
## 0.5.0
|
## 0.5.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitbook/react-contentkit",
|
"name": "@gitbook/react-contentkit",
|
||||||
"version": "0.5.1",
|
"version": "0.5.0",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
# @gitbook/react-math
|
# @gitbook/react-math
|
||||||
|
|
||||||
## 0.6.0
|
|
||||||
|
|
||||||
### Minor Changes
|
|
||||||
|
|
||||||
- 5c35f36: Export binary `gitbook-math` to copy assets to a directory
|
|
||||||
|
|
||||||
## 0.5.0
|
## 0.5.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"default": "./dist/index.js"
|
"default": "./dist/index.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "0.6.0",
|
"version": "0.5.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"object-hash": "^3.0.0"
|
"object-hash": "^3.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,25 +1,5 @@
|
|||||||
# @gitbook/react-openapi
|
# @gitbook/react-openapi
|
||||||
|
|
||||||
## 0.7.0
|
|
||||||
|
|
||||||
### Minor Changes
|
|
||||||
|
|
||||||
- cf3045a: Add Python support in Code Samples
|
|
||||||
- 4247361: Add required query parameters to the code sample
|
|
||||||
- aa8c49e: Display pattern if available in parmas in OpenAPI block
|
|
||||||
- e914903: Synchronize response and response example tabs
|
|
||||||
- 4cbcc5b: Rollback of scalar modal while fixing perf issue
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- 51fa3ab: Adds content-visibility css property to OpenAPI Operation for better render performance
|
|
||||||
- f89b31c: Upgrade the scalar api client package
|
|
||||||
- 094e9cd: bump: scalar from 1.0.5 to 1.0.7
|
|
||||||
- 237b703: Fix crash when `example` is undefined for a response
|
|
||||||
- 51955da: Adds tabs to Response Example section e.g. for status code examples
|
|
||||||
- a679e72: Render mandatory headers in code sample
|
|
||||||
- c079c3c: Update Scalar client to latest version
|
|
||||||
|
|
||||||
## 0.6.0
|
## 0.6.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
@@ -8,9 +8,10 @@
|
|||||||
"default": "./dist/index.js"
|
"default": "./dist/index.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "0.7.0",
|
"version": "0.6.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@scalar/api-client-react": "1.0.65",
|
"@scalar/api-client-react": "0.3.7",
|
||||||
|
"@scalar/oas-utils": "0.1.6",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
"flatted": "^3.2.9",
|
"flatted": "^3.2.9",
|
||||||
"openapi-types": "^12.1.3",
|
"openapi-types": "^12.1.3",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { CodeSampleInput, codeSampleGenerators } from './code-samples';
|
import { CodeSampleInput, codeSampleGenerators } from './code-samples';
|
||||||
import { OpenAPIOperationData } from './fetchOpenAPIOperation';
|
import { OpenAPIOperationData, toJSON } from './fetchOpenAPIOperation';
|
||||||
import { generateMediaTypeExample, generateSchemaExample } from './generateSchemaExample';
|
import { generateMediaTypeExample, generateSchemaExample } from './generateSchemaExample';
|
||||||
import { InteractiveSection } from './InteractiveSection';
|
import { InteractiveSection } from './InteractiveSection';
|
||||||
import { getServersURL } from './OpenAPIServerURL';
|
import { getServersURL } from './OpenAPIServerURL';
|
||||||
@@ -112,6 +112,11 @@ export function OpenAPICodeSample(props: {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchOperationData() {
|
||||||
|
'use server';
|
||||||
|
return toJSON(data);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InteractiveSection
|
<InteractiveSection
|
||||||
header="Request"
|
header="Request"
|
||||||
@@ -119,7 +124,7 @@ export function OpenAPICodeSample(props: {
|
|||||||
tabs={samples}
|
tabs={samples}
|
||||||
overlay={
|
overlay={
|
||||||
data['x-hideTryItPanel'] || data.operation['x-hideTryItPanel'] ? null : (
|
data['x-hideTryItPanel'] || data.operation['x-hideTryItPanel'] ? null : (
|
||||||
<ScalarApiButton />
|
<ScalarApiButton fetchOperationData={fetchOperationData} />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { ApiClientModalProvider } from '@scalar/api-client-react';
|
|
||||||
|
|
||||||
import { OpenAPIOperationData, toJSON } from './fetchOpenAPIOperation';
|
import { OpenAPIOperationData, toJSON } from './fetchOpenAPIOperation';
|
||||||
import { Markdown } from './Markdown';
|
import { Markdown } from './Markdown';
|
||||||
@@ -9,6 +8,7 @@ import { OpenAPIResponseExample } from './OpenAPIResponseExample';
|
|||||||
import { OpenAPIServerURL } from './OpenAPIServerURL';
|
import { OpenAPIServerURL } from './OpenAPIServerURL';
|
||||||
import { OpenAPISpec } from './OpenAPISpec';
|
import { OpenAPISpec } from './OpenAPISpec';
|
||||||
import { OpenAPIClientContext, OpenAPIContextProps } from './types';
|
import { OpenAPIClientContext, OpenAPIContextProps } from './types';
|
||||||
|
import { ScalarApiClient } from './ScalarApiButton';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display an interactive OpenAPI operation.
|
* Display an interactive OpenAPI operation.
|
||||||
@@ -28,10 +28,7 @@ export function OpenAPIOperation(props: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ApiClientModalProvider
|
<ScalarApiClient>
|
||||||
configuration={{ spec: { url: context.specUrl } }}
|
|
||||||
initialRequest={{ path: data.path, method: data.method }}
|
|
||||||
>
|
|
||||||
<div className={classNames('openapi-operation', className)}>
|
<div className={classNames('openapi-operation', className)}>
|
||||||
<div className="openapi-intro">
|
<div className="openapi-intro">
|
||||||
<h2 className="openapi-summary" id={context.id}>
|
<h2 className="openapi-summary" id={context.id}>
|
||||||
@@ -67,6 +64,6 @@ export function OpenAPIOperation(props: {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ApiClientModalProvider>
|
</ScalarApiClient>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user