mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-12 14:00:28 +00:00
Compare commits
91 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b6a08bc679 | |||
| 116575c811 | |||
| 4ba7bd5ce1 | |||
| 223ab5377f | |||
| ae43ca146c | |||
| 42342893d6 | |||
| eedefdd5c9 | |||
| f5e152dd74 | |||
| 95ea22d9c5 | |||
| f23023ddfa | |||
| da74077954 | |||
| 29aaba5949 | |||
| daf41fc728 | |||
| b08eb1af59 | |||
| 8322cd3e35 | |||
| 444039c142 | |||
| 3b0eff7f71 | |||
| c765463e38 | |||
| e8ca25b67e | |||
| 528eee3fc6 | |||
| 168a4fa998 | |||
| 3ea75adba4 | |||
| cbd768a095 | |||
| 2d01653a78 | |||
| aa3357a57d | |||
| de53946896 | |||
| d51204148e | |||
| 319761a39e | |||
| 7fbf01a348 | |||
| c22490bd80 | |||
| 860fd6d02e | |||
| c43c524804 | |||
| 66bb938d85 | |||
| 0e6d928496 | |||
| f07982d9f8 | |||
| b92ecfad58 | |||
| 416bde70bc | |||
| 580f7ade15 | |||
| cdffd7c47b | |||
| 5a959cf041 | |||
| 31466546a2 | |||
| 90ead98eaa | |||
| 65e9cb9d5c | |||
| e59076a074 | |||
| 653920dec9 | |||
| 23cedd2d8b | |||
| 70c4182fd8 | |||
| b62b101065 | |||
| b9c929beeb | |||
| 2b6c593289 | |||
| c0b339e406 | |||
| da485f5144 | |||
| 139a8050a5 | |||
| da7b369ffd | |||
| 432da64919 | |||
| 7d0b422200 | |||
| fb90eb0acc | |||
| b647538e41 | |||
| e50797a5c1 | |||
| 5b1e01c786 | |||
| 813b2af06b | |||
| 6f71da88d8 | |||
| fa91eb7eaf | |||
| c756761591 | |||
| 434af90366 | |||
| 0f41e194cb | |||
| bd353489e9 | |||
| 77fd393f15 | |||
| 8701b5e078 | |||
| 61db166f92 | |||
| 0d9b9cea0f | |||
| 7bb37c7f0a | |||
| 5b2bf828e3 | |||
| c85d3f9752 | |||
| 4d7088bbf0 | |||
| dd6ab6044c | |||
| d236bf029c | |||
| d70d566abe | |||
| a25fdedea9 | |||
| 373183a2cd | |||
| e9fa50dfb5 | |||
| 57ca4e0e88 | |||
| bc90adb73a | |||
| 1505ddbd5a | |||
| cd99ed57fb | |||
| 27de1cd01d | |||
| ae78fc5394 | |||
| 40e8e69c6d | |||
| e84a46a558 | |||
| 18a72d4466 | |||
| d7aa5fa003 |
@@ -19,6 +19,12 @@ inputs:
|
|||||||
deploy:
|
deploy:
|
||||||
description: 'Deploy as main version for all traffic instead of uploading versions'
|
description: 'Deploy as main version for all traffic instead of uploading versions'
|
||||||
required: true
|
required: true
|
||||||
|
commitTag:
|
||||||
|
description: 'Commit branch to associate with the deployment'
|
||||||
|
required: true
|
||||||
|
commitMessage:
|
||||||
|
description: 'Commit message to associate with the deployment'
|
||||||
|
required: true
|
||||||
outputs:
|
outputs:
|
||||||
deployment-url:
|
deployment-url:
|
||||||
description: "Deployment URL"
|
description: "Deployment URL"
|
||||||
@@ -53,6 +59,8 @@ runs:
|
|||||||
GITBOOK_FONTS_URL: ${{ inputs.opItem }}/GITBOOK_FONTS_URL
|
GITBOOK_FONTS_URL: ${{ inputs.opItem }}/GITBOOK_FONTS_URL
|
||||||
- name: Build worker
|
- name: Build worker
|
||||||
run: bun run turbo build:v2:cloudflare
|
run: bun run turbo build:v2:cloudflare
|
||||||
|
env:
|
||||||
|
GITBOOK_RUNTIME: cloudflare
|
||||||
shell: bash
|
shell: bash
|
||||||
- id: deploy
|
- id: deploy
|
||||||
name: Deploy to Cloudflare
|
name: Deploy to Cloudflare
|
||||||
@@ -63,7 +71,7 @@ runs:
|
|||||||
workingDirectory: ./
|
workingDirectory: ./
|
||||||
wranglerVersion: '3.112.0'
|
wranglerVersion: '3.112.0'
|
||||||
environment: ${{ inputs.environment }}
|
environment: ${{ inputs.environment }}
|
||||||
command: ${{ fromJSON(inputs.deploy) == true && 'deploy' || 'versions upload' }} --config ./packages/gitbook-v2/wrangler.toml
|
command: ${{ inputs.deploy == 'true' && 'deploy' || format('versions upload --tag {0} --message "{1}"', inputs.commitTag, inputs.commitMessage) }} --config ./packages/gitbook-v2/wrangler.jsonc
|
||||||
- name: Outputs
|
- name: Outputs
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ runs:
|
|||||||
env:
|
env:
|
||||||
VERCEL_ORG_ID: ${{ inputs.vercelOrg }}
|
VERCEL_ORG_ID: ${{ inputs.vercelOrg }}
|
||||||
VERCEL_PROJECT_ID: ${{ inputs.vercelProject }}
|
VERCEL_PROJECT_ID: ${{ inputs.vercelProject }}
|
||||||
|
GITBOOK_RUNTIME: vercel
|
||||||
- name: Deploy Project Artifacts to Vercel
|
- name: Deploy Project Artifacts to Vercel
|
||||||
id: deploy
|
id: deploy
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ jobs:
|
|||||||
run: bun run turbo gitbook#build:cloudflare
|
run: bun run turbo gitbook#build:cloudflare
|
||||||
env:
|
env:
|
||||||
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: ${{ secrets.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY }}
|
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: ${{ secrets.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY }}
|
||||||
|
GITBOOK_RUNTIME: cloudflare
|
||||||
- id: deploy
|
- id: deploy
|
||||||
name: Deploy to Cloudflare
|
name: Deploy to Cloudflare
|
||||||
uses: cloudflare/wrangler-action@v3.14.0
|
uses: cloudflare/wrangler-action@v3.14.0
|
||||||
@@ -81,7 +82,7 @@ jobs:
|
|||||||
name: 2c-preview
|
name: 2c-preview
|
||||||
url: ${{ steps.deploy.outputs.deployment-url }}
|
url: ${{ steps.deploy.outputs.deployment-url }}
|
||||||
outputs:
|
outputs:
|
||||||
deployment-url: ${{ steps.deploy.outputs.deployment-url }}
|
deployment-url: ${{ steps.deploy.outputs.deployment-url || steps.extract-worker-id.outputs.worker-url }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -95,9 +96,19 @@ jobs:
|
|||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
opItem: op://gitbook-open/2c-preview
|
opItem: op://gitbook-open/2c-preview
|
||||||
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
|
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
|
||||||
|
commitTag: ${{ github.ref == 'refs/heads/main' && 'main' || format('pr{0}', github.event.pull_request.number) }}
|
||||||
|
commitMessage: ${{ github.sha }}
|
||||||
|
- name: Extract Worker ID
|
||||||
|
id: extract-worker-id
|
||||||
|
if: ${{ !steps.deploy.outputs.deployment-url }}
|
||||||
|
run: |
|
||||||
|
if [[ "${{ steps.deploy.outputs.command-output }}" =~ Worker\ Version\ ID:\ ([0-9a-f]{8})-([0-9a-f-]+) ]]; then
|
||||||
|
WORKER_ID_FIRST_PART="${BASH_REMATCH[1]}"
|
||||||
|
echo "worker-url=https://${WORKER_ID_FIRST_PART}-gitbook-open-v2-preview.gitbook.workers.dev/" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
- name: Outputs
|
- name: Outputs
|
||||||
run: |
|
run: |
|
||||||
echo "URL: ${{ steps.deploy.outputs.deployment-url }}"
|
echo "URL: ${{ steps.deploy.outputs.deployment-url || steps.extract-worker-id.outputs.worker-url }}"
|
||||||
comment-deployments:
|
comment-deployments:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Comment Deployments (preview)
|
name: Comment Deployments (preview)
|
||||||
@@ -123,14 +134,14 @@ jobs:
|
|||||||
body: |
|
body: |
|
||||||
Summary of the deployments:
|
Summary of the deployments:
|
||||||
|
|
||||||
### Version 1 (production)
|
### Version 1
|
||||||
|
|
||||||
| Version | URL | Status |
|
| Version | URL | Status |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| Latest commit | [${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}](${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}) | ${{ needs.deploy-v1-cloudflare.result == 'success' && '✅' || '❌' }} |
|
| Latest commit | [${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}](${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}) | ${{ needs.deploy-v1-cloudflare.result == 'success' && '✅' || '❌' }} |
|
||||||
| PR | [${{ needs.deploy-v1-cloudflare.outputs.deployment-alias-url }}](${{ needs.deploy-v1-cloudflare.outputs.deployment-alias-url }}) | ${{ needs.deploy-v1-cloudflare.result == 'success' && '✅' || '❌' }} |
|
| PR | [${{ needs.deploy-v1-cloudflare.outputs.deployment-alias-url }}](${{ needs.deploy-v1-cloudflare.outputs.deployment-alias-url }}) | ${{ needs.deploy-v1-cloudflare.result == 'success' && '✅' || '❌' }} |
|
||||||
|
|
||||||
### Version 2 (experimental)
|
### Version 2
|
||||||
|
|
||||||
| Version | URL | Status |
|
| Version | URL | Status |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
@@ -139,10 +150,10 @@ jobs:
|
|||||||
|
|
||||||
### Test content
|
### Test content
|
||||||
|
|
||||||
| Site | v1 | v2 |
|
| Site | `v1` | `2v` | `2c` |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| GitBook | [${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}/docs.gitbook.com](${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}/docs.gitbook.com) | [${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/docs.gitbook.com](${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/docs.gitbook.com) |
|
| GitBook | [${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}/docs.gitbook.com](${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}/docs.gitbook.com) | [${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/docs.gitbook.com](${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/docs.gitbook.com) | [${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/docs.gitbook.com](${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/docs.gitbook.com) |
|
||||||
| E2E | [${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}/gitbook.gitbook.io/test-gitbook-open](${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}/gitbook.gitbook.io/test-gitbook-open) | [${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/gitbook.gitbook.io/test-gitbook-open](${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/gitbook.gitbook.io/test-gitbook-open) |
|
| E2E | [${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}/gitbook.gitbook.io/test-gitbook-open](${{ needs.deploy-v1-cloudflare.outputs.deployment-url }}/gitbook.gitbook.io/test-gitbook-open) | [${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/gitbook.gitbook.io/test-gitbook-open](${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/gitbook.gitbook.io/test-gitbook-open) | [${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/gitbook.gitbook.io/test-gitbook-open](${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/gitbook.gitbook.io/test-gitbook-open) |
|
||||||
edit-mode: replace
|
edit-mode: replace
|
||||||
visual-testing-v1:
|
visual-testing-v1:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -184,11 +195,33 @@ jobs:
|
|||||||
SITE_BASE_URL: ${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/
|
SITE_BASE_URL: ${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/
|
||||||
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
|
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
|
||||||
ARGOS_BUILD_NAME: 'v2-vercel'
|
ARGOS_BUILD_NAME: 'v2-vercel'
|
||||||
|
visual-testing-v2-cloudflare:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Visual Testing v2 (Cloudflare)
|
||||||
|
needs: deploy-v2-cloudflare
|
||||||
|
timeout-minutes: 10
|
||||||
|
if: startsWith(github.ref_name, 'cloudflare/')
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup Bun
|
||||||
|
uses: ./.github/composite/setup-bun
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
- name: Setup Playwright
|
||||||
|
uses: ./.github/actions/setup-playwright
|
||||||
|
- name: Run Playwright tests
|
||||||
|
run: bun e2e
|
||||||
|
env:
|
||||||
|
BASE_URL: ${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}
|
||||||
|
SITE_BASE_URL: ${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/
|
||||||
|
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
|
||||||
|
ARGOS_BUILD_NAME: 'v2-cloudflare'
|
||||||
visual-testing-customers-v1:
|
visual-testing-customers-v1:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Visual Testing Customers v1
|
name: Visual Testing Customers v1
|
||||||
needs: deploy-v1-cloudflare
|
needs: deploy-v1-cloudflare
|
||||||
timeout-minutes: 6
|
timeout-minutes: 8
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -208,7 +241,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Visual Testing Customers v2
|
name: Visual Testing Customers v2
|
||||||
needs: deploy-v2-vercel
|
needs: deploy-v2-vercel
|
||||||
timeout-minutes: 6
|
timeout-minutes: 8
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -225,6 +258,28 @@ jobs:
|
|||||||
SITE_BASE_URL: ${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/
|
SITE_BASE_URL: ${{ needs.deploy-v2-vercel.outputs.deployment-url }}/url/
|
||||||
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
|
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
|
||||||
ARGOS_BUILD_NAME: 'customers-v2'
|
ARGOS_BUILD_NAME: 'customers-v2'
|
||||||
|
visual-testing-customers-v2-cloudflare:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Visual Testing Customers v2 (Cloudflare)
|
||||||
|
needs: deploy-v2-cloudflare
|
||||||
|
timeout-minutes: 8
|
||||||
|
if: startsWith(github.ref_name, 'cloudflare/')
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup Bun
|
||||||
|
uses: ./.github/composite/setup-bun
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bun install --frozen-lockfile
|
||||||
|
- name: Setup Playwright
|
||||||
|
uses: ./.github/actions/setup-playwright
|
||||||
|
- name: Run Playwright tests
|
||||||
|
run: bun e2e-customers
|
||||||
|
env:
|
||||||
|
BASE_URL: ${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}
|
||||||
|
SITE_BASE_URL: ${{ needs.deploy-v2-cloudflare.outputs.deployment-url }}/url/
|
||||||
|
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
|
||||||
|
ARGOS_BUILD_NAME: 'customers-v2'
|
||||||
pagespeed-testing-v1:
|
pagespeed-testing-v1:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: PageSpeed Testing v1
|
name: PageSpeed Testing v1
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Deploy staging
|
- name: Deploy
|
||||||
id: deploy
|
id: deploy
|
||||||
uses: ./.github/composite/deploy-vercel
|
uses: ./.github/composite/deploy-vercel
|
||||||
with:
|
with:
|
||||||
@@ -48,6 +48,8 @@ jobs:
|
|||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
opItem: op://gitbook-open/2c-production
|
opItem: op://gitbook-open/2c-production
|
||||||
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
|
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
|
||||||
|
commitTag: main
|
||||||
|
commitMessage: ${{ github.sha }}
|
||||||
- name: Outputs
|
- name: Outputs
|
||||||
run: |
|
run: |
|
||||||
echo "URL: ${{ steps.deploy.outputs.deployment-url }}"
|
echo "URL: ${{ steps.deploy.outputs.deployment-url }}"
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Deploy staging
|
- name: Deploy
|
||||||
id: deploy
|
id: deploy
|
||||||
uses: ./.github/composite/deploy-vercel
|
uses: ./.github/composite/deploy-vercel
|
||||||
with:
|
with:
|
||||||
@@ -48,6 +48,8 @@ jobs:
|
|||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
opItem: op://gitbook-open/2c-staging
|
opItem: op://gitbook-open/2c-staging
|
||||||
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
|
opServiceAccount: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
|
||||||
|
commitTag: main
|
||||||
|
commitMessage: ${{ github.sha }}
|
||||||
- name: Outputs
|
- name: Outputs
|
||||||
run: |
|
run: |
|
||||||
echo "URL: ${{ steps.deploy.outputs.deployment-url }}"
|
echo "URL: ${{ steps.deploy.outputs.deployment-url }}"
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^1.9.4",
|
"@biomejs/biome": "^1.9.4",
|
||||||
"@changesets/cli": "^2.27.12",
|
"@changesets/cli": "^2.27.12",
|
||||||
"turbo": "^2.4.4",
|
"turbo": "^2.5.0",
|
||||||
"vercel": "^39.3.0",
|
"vercel": "^39.3.0",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
},
|
},
|
||||||
"packages/colors": {
|
"packages/colors": {
|
||||||
"name": "@gitbook/colors",
|
"name": "@gitbook/colors",
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5.5.3",
|
"typescript": "^5.5.3",
|
||||||
},
|
},
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
},
|
},
|
||||||
"packages/gitbook": {
|
"packages/gitbook": {
|
||||||
"name": "gitbook",
|
"name": "gitbook",
|
||||||
"version": "0.8.1",
|
"version": "0.9.2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gitbook/api": "*",
|
"@gitbook/api": "*",
|
||||||
"@gitbook/cache-do": "workspace:*",
|
"@gitbook/cache-do": "workspace:*",
|
||||||
@@ -64,15 +64,15 @@
|
|||||||
"@radix-ui/react-checkbox": "^1.0.4",
|
"@radix-ui/react-checkbox": "^1.0.4",
|
||||||
"@radix-ui/react-navigation-menu": "^1.2.3",
|
"@radix-ui/react-navigation-menu": "^1.2.3",
|
||||||
"@radix-ui/react-popover": "^1.0.7",
|
"@radix-ui/react-popover": "^1.0.7",
|
||||||
|
"@radix-ui/react-tooltip": "^1.1.8",
|
||||||
"@sindresorhus/fnv1a": "^3.1.0",
|
"@sindresorhus/fnv1a": "^3.1.0",
|
||||||
"@tailwindcss/container-queries": "^0.1.1",
|
"@tailwindcss/container-queries": "^0.1.1",
|
||||||
"@tailwindcss/typography": "^0.5.16",
|
"@tailwindcss/typography": "^0.5.16",
|
||||||
"@upstash/redis": "^1.27.1",
|
"ai": "^4.2.2",
|
||||||
"ai": "^4.1.46",
|
|
||||||
"ajv": "^8.12.0",
|
|
||||||
"assert-never": "^1.2.1",
|
"assert-never": "^1.2.1",
|
||||||
"bun-types": "^1.1.20",
|
"bun-types": "^1.1.20",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
|
"event-iterator": "^2.0.0",
|
||||||
"framer-motion": "^10.16.14",
|
"framer-motion": "^10.16.14",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"jsontoxml": "^1.0.1",
|
"jsontoxml": "^1.0.1",
|
||||||
@@ -80,14 +80,15 @@
|
|||||||
"katex": "^0.16.9",
|
"katex": "^0.16.9",
|
||||||
"mathjax": "^3.2.2",
|
"mathjax": "^3.2.2",
|
||||||
"mdast-util-to-markdown": "^2.1.2",
|
"mdast-util-to-markdown": "^2.1.2",
|
||||||
"memoizee": "^0.4.15",
|
"memoizee": "^0.4.17",
|
||||||
"next": "14.2.25",
|
"next": "14.2.26",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"nuqs": "^2.2.3",
|
"nuqs": "^2.2.3",
|
||||||
"object-hash": "^3.0.0",
|
"object-hash": "^3.0.0",
|
||||||
"openapi-types": "^12.1.3",
|
"openapi-types": "^12.1.3",
|
||||||
"p-map": "^7.0.0",
|
"p-map": "^7.0.0",
|
||||||
"parse-cache-control": "^1.0.1",
|
"parse-cache-control": "^1.0.1",
|
||||||
|
"partial-json": "^0.1.7",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-dom": "18.3.1",
|
"react-dom": "18.3.1",
|
||||||
"react-hotkeys-hook": "^4.4.1",
|
"react-hotkeys-hook": "^4.4.1",
|
||||||
@@ -104,6 +105,9 @@
|
|||||||
"unified": "^11.0.5",
|
"unified": "^11.0.5",
|
||||||
"url-join": "^5.0.0",
|
"url-join": "^5.0.0",
|
||||||
"usehooks-ts": "^3.1.0",
|
"usehooks-ts": "^3.1.0",
|
||||||
|
"zod": "^3.24.2",
|
||||||
|
"zod-to-json-schema": "^3.24.5",
|
||||||
|
"zustand": "^5.0.3",
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@argos-ci/playwright": "^4.3.0",
|
"@argos-ci/playwright": "^4.3.0",
|
||||||
@@ -136,13 +140,13 @@
|
|||||||
},
|
},
|
||||||
"packages/gitbook-v2": {
|
"packages/gitbook-v2": {
|
||||||
"name": "gitbook-v2",
|
"name": "gitbook-v2",
|
||||||
"version": "0.2.1",
|
"version": "0.2.3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gitbook/api": "*",
|
"@gitbook/api": "*",
|
||||||
"@gitbook/cache-tags": "workspace:*",
|
"@gitbook/cache-tags": "workspace:*",
|
||||||
"@sindresorhus/fnv1a": "^3.1.0",
|
"@sindresorhus/fnv1a": "^3.1.0",
|
||||||
"jwt-decode": "^4.0.0",
|
"jwt-decode": "^4.0.0",
|
||||||
"next": "^15.2.3",
|
"next": "canary",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "^19.0.0",
|
||||||
"rison": "^0.1.1",
|
"rison": "^0.1.1",
|
||||||
@@ -150,7 +154,7 @@
|
|||||||
"warn-once": "^0.1.1",
|
"warn-once": "^0.1.1",
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@opennextjs/cloudflare": "^0.5.10",
|
"@opennextjs/cloudflare": "https://pkg.pr.new/opennextjs/opennextjs-cloudflare/@opennextjs/cloudflare@7b3b305",
|
||||||
"@types/rison": "^0.0.9",
|
"@types/rison": "^0.0.9",
|
||||||
"gitbook": "*",
|
"gitbook": "*",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
@@ -161,7 +165,7 @@
|
|||||||
"name": "@gitbook/icons",
|
"name": "@gitbook/icons",
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"gitbook-icons": "./bin/gitbook-icons.js"
|
"gitbook-icons": "./bin/gitbook-icons.js",
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^6.6.0",
|
"@fortawesome/fontawesome-free": "^6.6.0",
|
||||||
@@ -179,7 +183,7 @@
|
|||||||
},
|
},
|
||||||
"packages/openapi-parser": {
|
"packages/openapi-parser": {
|
||||||
"name": "@gitbook/openapi-parser",
|
"name": "@gitbook/openapi-parser",
|
||||||
"version": "2.1.0",
|
"version": "2.1.2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@scalar/openapi-parser": "^0.10.10",
|
"@scalar/openapi-parser": "^0.10.10",
|
||||||
"@scalar/openapi-types": "^0.1.9",
|
"@scalar/openapi-types": "^0.1.9",
|
||||||
@@ -192,13 +196,6 @@
|
|||||||
"typescript": "^5.5.3",
|
"typescript": "^5.5.3",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"packages/proxy": {
|
|
||||||
"name": "@gitbook/proxy",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"devDependencies": {
|
|
||||||
"typescript": "^5.5.3",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"packages/react-contentkit": {
|
"packages/react-contentkit": {
|
||||||
"name": "@gitbook/react-contentkit",
|
"name": "@gitbook/react-contentkit",
|
||||||
"version": "0.7.0",
|
"version": "0.7.0",
|
||||||
@@ -218,7 +215,7 @@
|
|||||||
"name": "@gitbook/react-math",
|
"name": "@gitbook/react-math",
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"gitbook-math": "./bin/gitbook-math.js"
|
"gitbook-math": "./bin/gitbook-math.js",
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"object-hash": "^3.0.0",
|
"object-hash": "^3.0.0",
|
||||||
@@ -233,7 +230,7 @@
|
|||||||
},
|
},
|
||||||
"packages/react-openapi": {
|
"packages/react-openapi": {
|
||||||
"name": "@gitbook/react-openapi",
|
"name": "@gitbook/react-openapi",
|
||||||
"version": "1.1.5",
|
"version": "1.1.9",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gitbook/openapi-parser": "workspace:*",
|
"@gitbook/openapi-parser": "workspace:*",
|
||||||
"@scalar/api-client-react": "^1.2.5",
|
"@scalar/api-client-react": "^1.2.5",
|
||||||
@@ -261,18 +258,18 @@
|
|||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@codemirror/state": "6.4.1",
|
"@codemirror/state": "6.4.1",
|
||||||
"@gitbook/api": "0.102.0",
|
"@gitbook/api": "0.109.0",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-dom": "18.3.1",
|
"react-dom": "18.3.1",
|
||||||
},
|
},
|
||||||
"packages": {
|
"packages": {
|
||||||
"@ai-sdk/provider": ["@ai-sdk/provider@1.0.9", "", { "dependencies": { "json-schema": "^0.4.0" } }, "sha512-jie6ZJT2ZR0uVOVCDc9R2xCX5I/Dum/wEK28lx21PJx6ZnFAN9EzD2WsPhcDWfCgGx3OAZZ0GyM3CEobXpa9LA=="],
|
"@ai-sdk/provider": ["@ai-sdk/provider@1.1.0", "", { "dependencies": { "json-schema": "^0.4.0" } }, "sha512-0M+qjp+clUD0R1E5eWQFhxEvWLNaOtGQRUaBn8CUABnSKredagq92hUS9VjOzGsTm37xLfpaxl97AVtbeOsHew=="],
|
||||||
|
|
||||||
"@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@2.1.10", "", { "dependencies": { "@ai-sdk/provider": "1.0.9", "eventsource-parser": "^3.0.0", "nanoid": "^3.3.8", "secure-json-parse": "^2.7.0" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-4GZ8GHjOFxePFzkl3q42AU0DQOtTQ5w09vmaWUf/pKFXJPizlnzKSUkF0f+VkapIUfDugyMqPMT1ge8XQzVI7Q=="],
|
"@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@2.2.4", "", { "dependencies": { "@ai-sdk/provider": "1.1.0", "nanoid": "^3.3.8", "secure-json-parse": "^2.7.0" }, "peerDependencies": { "zod": "^3.23.8" } }, "sha512-13sEGBxB6kgaMPGOgCLYibF6r8iv8mgjhuToFrOTU09bBxbFQd8ZoARarCfJN6VomCUbUvMKwjTBLb1vQnN+WA=="],
|
||||||
|
|
||||||
"@ai-sdk/react": ["@ai-sdk/react@1.1.19", "", { "dependencies": { "@ai-sdk/provider-utils": "2.1.10", "@ai-sdk/ui-utils": "1.1.16", "swr": "^2.2.5", "throttleit": "2.1.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "zod": "^3.0.0" }, "optionalPeers": ["react", "zod"] }, "sha512-zqSOWmJxpB45ZrwZ04+Q7Uo3xeGM0tva2eUYz2T4gv9Yk6MQAfOBA6+scsKg8CyIuUy4M4/C4pCY3eWQf7sfQg=="],
|
"@ai-sdk/react": ["@ai-sdk/react@1.2.6", "", { "dependencies": { "@ai-sdk/provider-utils": "2.2.4", "@ai-sdk/ui-utils": "1.2.5", "swr": "^2.2.5", "throttleit": "2.1.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "zod": "^3.23.8" }, "optionalPeers": ["zod"] }, "sha512-5BFChNbcYtcY9MBStcDev7WZRHf0NpTrk8yfSoedWctB3jfWkFd1HECBvdc8w3mUQshF2MumLHtAhRO7IFtGGQ=="],
|
||||||
|
|
||||||
"@ai-sdk/ui-utils": ["@ai-sdk/ui-utils@1.1.16", "", { "dependencies": { "@ai-sdk/provider": "1.0.9", "@ai-sdk/provider-utils": "2.1.10", "zod-to-json-schema": "^3.24.1" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-jfblR2yZVISmNK2zyNzJZFtkgX57WDAUQXcmn3XUBJyo8LFsADu+/vYMn5AOyBi9qJT0RBk11PEtIxIqvByw3Q=="],
|
"@ai-sdk/ui-utils": ["@ai-sdk/ui-utils@1.2.5", "", { "dependencies": { "@ai-sdk/provider": "1.1.0", "@ai-sdk/provider-utils": "2.2.4", "zod-to-json-schema": "^3.24.1" }, "peerDependencies": { "zod": "^3.23.8" } }, "sha512-XDgqnJcaCkDez7qolvk+PDbs/ceJvgkNkxkOlc9uDWqxfDJxtvCZ+14MP/1qr4IBwGIgKVHzMDYDXvqVhSWLzg=="],
|
||||||
|
|
||||||
"@alloc/quick-lru": ["@alloc/quick-lru@5.2.0", "", {}, "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw=="],
|
"@alloc/quick-lru": ["@alloc/quick-lru@5.2.0", "", {}, "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw=="],
|
||||||
|
|
||||||
@@ -286,25 +283,25 @@
|
|||||||
|
|
||||||
"@argos-ci/util": ["@argos-ci/util@2.3.0", "", {}, "sha512-tkxnCpaj7yN9nCFzo9MX0FJ5YjUepEOGYfdvF8COQqp+EdY1qubOPpc4Z0l1B60BlC8YtjQv/oRxHSh1XzxWFg=="],
|
"@argos-ci/util": ["@argos-ci/util@2.3.0", "", {}, "sha512-tkxnCpaj7yN9nCFzo9MX0FJ5YjUepEOGYfdvF8COQqp+EdY1qubOPpc4Z0l1B60BlC8YtjQv/oRxHSh1XzxWFg=="],
|
||||||
|
|
||||||
"@ast-grep/napi": ["@ast-grep/napi@0.34.3", "", { "optionalDependencies": { "@ast-grep/napi-darwin-arm64": "0.34.3", "@ast-grep/napi-darwin-x64": "0.34.3", "@ast-grep/napi-linux-arm64-gnu": "0.34.3", "@ast-grep/napi-linux-arm64-musl": "0.34.3", "@ast-grep/napi-linux-x64-gnu": "0.34.3", "@ast-grep/napi-linux-x64-musl": "0.34.3", "@ast-grep/napi-win32-arm64-msvc": "0.34.3", "@ast-grep/napi-win32-ia32-msvc": "0.34.3", "@ast-grep/napi-win32-x64-msvc": "0.34.3" } }, "sha512-2yrnMrUw3NVm9hf+YKO+BOY3Aci/qau2vDo0lGtA7qGMma18XPUIOTdzm601k5gPHo4MfxPPZLoe9QdTUviANg=="],
|
"@ast-grep/napi": ["@ast-grep/napi@0.35.0", "", { "optionalDependencies": { "@ast-grep/napi-darwin-arm64": "0.35.0", "@ast-grep/napi-darwin-x64": "0.35.0", "@ast-grep/napi-linux-arm64-gnu": "0.35.0", "@ast-grep/napi-linux-arm64-musl": "0.35.0", "@ast-grep/napi-linux-x64-gnu": "0.35.0", "@ast-grep/napi-linux-x64-musl": "0.35.0", "@ast-grep/napi-win32-arm64-msvc": "0.35.0", "@ast-grep/napi-win32-ia32-msvc": "0.35.0", "@ast-grep/napi-win32-x64-msvc": "0.35.0" } }, "sha512-3ucaaSxV6fxXoqHrE/rxAvP1THnDdY5jNzGlnvx+JvnY9C/dSRKc0jlRMRz59N3El572+/yNRUUpAV1T9aBJug=="],
|
||||||
|
|
||||||
"@ast-grep/napi-darwin-arm64": ["@ast-grep/napi-darwin-arm64@0.34.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-0a8dS+mOP5TYRX3YDiejL1WXWoWga3wpMYZGSs6Ni+SlH1WEO8zyUHe/1z6jNWH8VMHfH9FSCy6+YaPTpiurCA=="],
|
"@ast-grep/napi-darwin-arm64": ["@ast-grep/napi-darwin-arm64@0.35.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-T+MN4Oinc+sXjXCIHzfxDDWY7r2pKgPxM6zVeVlkMTrJV2mJtyKYBIS+CABhRM6kflps2T2I6l4DGaKV/8Ym9w=="],
|
||||||
|
|
||||||
"@ast-grep/napi-darwin-x64": ["@ast-grep/napi-darwin-x64@0.34.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-n70ha95Fk187B8tgnvR+ZW429EAs/rXktD0839Mdm2+fWjD+JSdB3SADzOGo2cKhuLpLOKnsvfF/bmu+C/p0YQ=="],
|
"@ast-grep/napi-darwin-x64": ["@ast-grep/napi-darwin-x64@0.35.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-pEYiN6JI1HY2uWhMYJ9+3yIMyVYKuYdFzeD+dL7odA3qzK0o9N9AM3/NOt4ynU2EhufaWCJr0P5NoQ636qN6MQ=="],
|
||||||
|
|
||||||
"@ast-grep/napi-linux-arm64-gnu": ["@ast-grep/napi-linux-arm64-gnu@0.34.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-2LBUvMVkBcO/CJ4ItgZ1MOSqDq2fRmhiLwFxIYjhjG7Rz+4ZNdRY+d7Sl596g0BChB4ffNv+M5HS8uUBuUax1w=="],
|
"@ast-grep/napi-linux-arm64-gnu": ["@ast-grep/napi-linux-arm64-gnu@0.35.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-NBuzQngABGKz7lhG08IQb+7nPqUx81Ol37xmS3ZhVSdSgM0mtp93rCbgFTkJcAFE8IMfCHQSg7G4g0Iotz4ABQ=="],
|
||||||
|
|
||||||
"@ast-grep/napi-linux-arm64-musl": ["@ast-grep/napi-linux-arm64-musl@0.34.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-vlX4mOyVO1Oy2CdOIFi7HBPwMKzOyLdBpRCcu7pArBOQJkpJ2eS5GR5qSW15f7KPLTkUMpJq7juLz/rP6Rc79Q=="],
|
"@ast-grep/napi-linux-arm64-musl": ["@ast-grep/napi-linux-arm64-musl@0.35.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-1EcvHPwyWpCL/96LuItBYGfeI5FaMTRvL+dHbO/hL5q1npqbb5qn+ppJwtNOjTPz8tayvgggxVk9T4C2O7taYA=="],
|
||||||
|
|
||||||
"@ast-grep/napi-linux-x64-gnu": ["@ast-grep/napi-linux-x64-gnu@0.34.3", "", { "os": "linux", "cpu": "x64" }, "sha512-F9TwAfZT/vjjxoPH9Fk8/PTNB95Hm2V/rtva+xMCxkTnhaSh0swM+ku3vavkZ4rwk+LfKPAY37pifEVWg4JPNQ=="],
|
"@ast-grep/napi-linux-x64-gnu": ["@ast-grep/napi-linux-x64-gnu@0.35.0", "", { "os": "linux", "cpu": "x64" }, "sha512-FDzNdlqmQnsiWXhnLxusw5AOfEcEM+5xtmrnAf3SBRFr86JyWD9qsynnFYC2pnP9hlMfifNH2TTmMpyGJW49Xw=="],
|
||||||
|
|
||||||
"@ast-grep/napi-linux-x64-musl": ["@ast-grep/napi-linux-x64-musl@0.34.3", "", { "os": "linux", "cpu": "x64" }, "sha512-2W0ZYsRxdVnwJ/BfnCOSKgfcZ2UFf5I+vF5aMmeAOplOg7vlFHb8XHSa4GqO0MoBfFTGKTH76bKwxLz8d38y1Q=="],
|
"@ast-grep/napi-linux-x64-musl": ["@ast-grep/napi-linux-x64-musl@0.35.0", "", { "os": "linux", "cpu": "x64" }, "sha512-wlmndjfBafT8u5p4DBnoRQyoCSGNuVSz7rT3TqhvlHcPzUouRWMn95epU9B1LNLyjXvr9xHeRjSktyCN28w57Q=="],
|
||||||
|
|
||||||
"@ast-grep/napi-win32-arm64-msvc": ["@ast-grep/napi-win32-arm64-msvc@0.34.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-XRWHlZnO77dEjC7IM5aQRTBC/hc/08Hdl18baJL7smG2dYGJKonUA7BQns6Vt2i63sOEghclkDw6Pq0PD60dbw=="],
|
"@ast-grep/napi-win32-arm64-msvc": ["@ast-grep/napi-win32-arm64-msvc@0.35.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-gkhJeYc4rrZLX2icLxalPikTLMR57DuIYLwLr9g+StHYXIsGHrbfrE6Nnbdd8Izfs34ArFCrcwdaMrGlvOPSeg=="],
|
||||||
|
|
||||||
"@ast-grep/napi-win32-ia32-msvc": ["@ast-grep/napi-win32-ia32-msvc@0.34.3", "", { "os": "win32", "cpu": "ia32" }, "sha512-0jR3QIkuasSrEvsaGtsgMEvgEY8FVe4pemuW77hUOH/mhO4vxFOWny7w4kUaBxQkzJ5z3lbXVoqO4Uv9rpJsRA=="],
|
"@ast-grep/napi-win32-ia32-msvc": ["@ast-grep/napi-win32-ia32-msvc@0.35.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-OdUuRa3chHCZ65y+qALfkUjz0W0Eg21YZ9TyPquV5why07M6HAK38mmYGzLxFH6294SvRQhs+FA/rAfbKeH0jA=="],
|
||||||
|
|
||||||
"@ast-grep/napi-win32-x64-msvc": ["@ast-grep/napi-win32-x64-msvc@0.34.3", "", { "os": "win32", "cpu": "x64" }, "sha512-OY1Cswkz+0bRZgt9sLjzgyA+y0X164UFjwf5WTYpbCTPUlwdpJP6L7FqJNRMemzQp0qQwwRR7ejpBUF4o/V0Aw=="],
|
"@ast-grep/napi-win32-x64-msvc": ["@ast-grep/napi-win32-x64-msvc@0.35.0", "", { "os": "win32", "cpu": "x64" }, "sha512-pcQRUHqbroTN1oQ56V982a7IZTUUySQYWa2KEyksiifHGuBuitlzcyzFGjT96ThcqD9XW0UVJMvpoF2Qjh006Q=="],
|
||||||
|
|
||||||
"@aws-crypto/crc32": ["@aws-crypto/crc32@5.2.0", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg=="],
|
"@aws-crypto/crc32": ["@aws-crypto/crc32@5.2.0", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg=="],
|
||||||
|
|
||||||
@@ -622,7 +619,7 @@
|
|||||||
|
|
||||||
"@fortawesome/fontawesome-svg-core": ["@fortawesome/fontawesome-svg-core@6.6.0", "", { "dependencies": { "@fortawesome/fontawesome-common-types": "6.6.0" } }, "sha512-KHwPkCk6oRT4HADE7smhfsKudt9N/9lm6EJ5BVg0tD1yPA5hht837fB87F8pn15D8JfTqQOjhKTktwmLMiD7Kg=="],
|
"@fortawesome/fontawesome-svg-core": ["@fortawesome/fontawesome-svg-core@6.6.0", "", { "dependencies": { "@fortawesome/fontawesome-common-types": "6.6.0" } }, "sha512-KHwPkCk6oRT4HADE7smhfsKudt9N/9lm6EJ5BVg0tD1yPA5hht837fB87F8pn15D8JfTqQOjhKTktwmLMiD7Kg=="],
|
||||||
|
|
||||||
"@gitbook/api": ["@gitbook/api@0.102.0", "", { "dependencies": { "event-iterator": "^2.0.0", "eventsource-parser": "^3.0.0" } }, "sha512-9wPr5kyCHhTTwkaCYEMT4q3JjEl1q9mytgvpeusmeREfG4E0RZHYPEL8bmumO7T9wH/0vHjpfW2LSTUUs60AwQ=="],
|
"@gitbook/api": ["@gitbook/api@0.109.0", "", { "dependencies": { "event-iterator": "^2.0.0", "eventsource-parser": "^3.0.0" } }, "sha512-nzhxmiNR2MMHh+HoU7fFdOJ+u4BFyXjtsVquQf3VhZMjeI71yeLx5JEbjkOcijVd/GMAtvpYlYR2qcPqzq27gw=="],
|
||||||
|
|
||||||
"@gitbook/cache-do": ["@gitbook/cache-do@workspace:packages/cache-do"],
|
"@gitbook/cache-do": ["@gitbook/cache-do@workspace:packages/cache-do"],
|
||||||
|
|
||||||
@@ -638,8 +635,6 @@
|
|||||||
|
|
||||||
"@gitbook/openapi-parser": ["@gitbook/openapi-parser@workspace:packages/openapi-parser"],
|
"@gitbook/openapi-parser": ["@gitbook/openapi-parser@workspace:packages/openapi-parser"],
|
||||||
|
|
||||||
"@gitbook/proxy": ["@gitbook/proxy@workspace:packages/proxy"],
|
|
||||||
|
|
||||||
"@gitbook/react-contentkit": ["@gitbook/react-contentkit@workspace:packages/react-contentkit"],
|
"@gitbook/react-contentkit": ["@gitbook/react-contentkit@workspace:packages/react-contentkit"],
|
||||||
|
|
||||||
"@gitbook/react-math": ["@gitbook/react-math@workspace:packages/react-math"],
|
"@gitbook/react-math": ["@gitbook/react-math@workspace:packages/react-math"],
|
||||||
@@ -672,6 +667,8 @@
|
|||||||
|
|
||||||
"@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.0.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA=="],
|
"@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.0.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA=="],
|
||||||
|
|
||||||
|
"@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.1.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-tiXxFZFbhnkWE2LA8oQj7KYR+bWBkiV2nilRldT7bqoEZ4HiDOcePr9wVDAZPi/Id5fT1oY9iGnDq20cwUz8lQ=="],
|
||||||
|
|
||||||
"@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.0.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA=="],
|
"@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.0.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA=="],
|
||||||
|
|
||||||
"@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.0.4", "", { "os": "linux", "cpu": "x64" }, "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw=="],
|
"@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.0.4", "", { "os": "linux", "cpu": "x64" }, "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw=="],
|
||||||
@@ -750,25 +747,25 @@
|
|||||||
|
|
||||||
"@msgpack/msgpack": ["@msgpack/msgpack@3.0.0-beta2", "", {}, "sha512-y+l1PNV0XDyY8sM3YtuMLK5vE3/hkfId+Do8pLo/OPxfxuFAUwcGz3oiiUuV46/aBpwTzZ+mRWVMtlSKbradhw=="],
|
"@msgpack/msgpack": ["@msgpack/msgpack@3.0.0-beta2", "", {}, "sha512-y+l1PNV0XDyY8sM3YtuMLK5vE3/hkfId+Do8pLo/OPxfxuFAUwcGz3oiiUuV46/aBpwTzZ+mRWVMtlSKbradhw=="],
|
||||||
|
|
||||||
"@next/env": ["@next/env@14.2.25", "", {}, "sha512-JnzQ2cExDeG7FxJwqAksZ3aqVJrHjFwZQAEJ9gQZSoEhIow7SNoKZzju/AwQ+PLIR4NY8V0rhcVozx/2izDO0w=="],
|
"@next/env": ["@next/env@14.2.26", "", {}, "sha512-vO//GJ/YBco+H7xdQhzJxF7ub3SUwft76jwaeOyVVQFHCi5DCnkP16WHB+JBylo4vOKPoZBlR94Z8xBxNBdNJA=="],
|
||||||
|
|
||||||
"@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@14.2.25", "", { "os": "darwin", "cpu": "arm64" }, "sha512-09clWInF1YRd6le00vt750s3m7SEYNehz9C4PUcSu3bAdCTpjIV4aTYQZ25Ehrr83VR1rZeqtKUPWSI7GfuKZQ=="],
|
"@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@14.2.26", "", { "os": "darwin", "cpu": "arm64" }, "sha512-zDJY8gsKEseGAxG+C2hTMT0w9Nk9N1Sk1qV7vXYz9MEiyRoF5ogQX2+vplyUMIfygnjn9/A04I6yrUTRTuRiyQ=="],
|
||||||
|
|
||||||
"@next/swc-darwin-x64": ["@next/swc-darwin-x64@14.2.25", "", { "os": "darwin", "cpu": "x64" }, "sha512-V+iYM/QR+aYeJl3/FWWU/7Ix4b07ovsQ5IbkwgUK29pTHmq+5UxeDr7/dphvtXEq5pLB/PucfcBNh9KZ8vWbug=="],
|
"@next/swc-darwin-x64": ["@next/swc-darwin-x64@14.2.26", "", { "os": "darwin", "cpu": "x64" }, "sha512-U0adH5ryLfmTDkahLwG9sUQG2L0a9rYux8crQeC92rPhi3jGQEY47nByQHrVrt3prZigadwj/2HZ1LUUimuSbg=="],
|
||||||
|
|
||||||
"@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@14.2.25", "", { "os": "linux", "cpu": "arm64" }, "sha512-LFnV2899PJZAIEHQ4IMmZIgL0FBieh5keMnriMY1cK7ompR+JUd24xeTtKkcaw8QmxmEdhoE5Mu9dPSuDBgtTg=="],
|
"@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@14.2.26", "", { "os": "linux", "cpu": "arm64" }, "sha512-SINMl1I7UhfHGM7SoRiw0AbwnLEMUnJ/3XXVmhyptzriHbWvPPbbm0OEVG24uUKhuS1t0nvN/DBvm5kz6ZIqpg=="],
|
||||||
|
|
||||||
"@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@14.2.25", "", { "os": "linux", "cpu": "arm64" }, "sha512-QC5y5PPTmtqFExcKWKYgUNkHeHE/z3lUsu83di488nyP0ZzQ3Yse2G6TCxz6nNsQwgAx1BehAJTZez+UQxzLfw=="],
|
"@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@14.2.26", "", { "os": "linux", "cpu": "arm64" }, "sha512-s6JaezoyJK2DxrwHWxLWtJKlqKqTdi/zaYigDXUJ/gmx/72CrzdVZfMvUc6VqnZ7YEvRijvYo+0o4Z9DencduA=="],
|
||||||
|
|
||||||
"@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@14.2.25", "", { "os": "linux", "cpu": "x64" }, "sha512-y6/ML4b9eQ2D/56wqatTJN5/JR8/xdObU2Fb1RBidnrr450HLCKr6IJZbPqbv7NXmje61UyxjF5kvSajvjye5w=="],
|
"@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@14.2.26", "", { "os": "linux", "cpu": "x64" }, "sha512-FEXeUQi8/pLr/XI0hKbe0tgbLmHFRhgXOUiPScz2hk0hSmbGiU8aUqVslj/6C6KA38RzXnWoJXo4FMo6aBxjzg=="],
|
||||||
|
|
||||||
"@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@14.2.25", "", { "os": "linux", "cpu": "x64" }, "sha512-sPX0TSXHGUOZFvv96GoBXpB3w4emMqKeMgemrSxI7A6l55VBJp/RKYLwZIB9JxSqYPApqiREaIIap+wWq0RU8w=="],
|
"@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@14.2.26", "", { "os": "linux", "cpu": "x64" }, "sha512-BUsomaO4d2DuXhXhgQCVt2jjX4B4/Thts8nDoIruEJkhE5ifeQFtvW5c9JkdOtYvE5p2G0hcwQ0UbRaQmQwaVg=="],
|
||||||
|
|
||||||
"@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@14.2.25", "", { "os": "win32", "cpu": "arm64" }, "sha512-ReO9S5hkA1DU2cFCsGoOEp7WJkhFzNbU/3VUF6XxNGUCQChyug6hZdYL/istQgfT/GWE6PNIg9cm784OI4ddxQ=="],
|
"@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@14.2.26", "", { "os": "win32", "cpu": "arm64" }, "sha512-5auwsMVzT7wbB2CZXQxDctpWbdEnEW/e66DyXO1DcgHxIyhP06awu+rHKshZE+lPLIGiwtjo7bsyeuubewwxMw=="],
|
||||||
|
|
||||||
"@next/swc-win32-ia32-msvc": ["@next/swc-win32-ia32-msvc@14.2.25", "", { "os": "win32", "cpu": "ia32" }, "sha512-DZ/gc0o9neuCDyD5IumyTGHVun2dCox5TfPQI/BJTYwpSNYM3CZDI4i6TOdjeq1JMo+Ug4kPSMuZdwsycwFbAw=="],
|
"@next/swc-win32-ia32-msvc": ["@next/swc-win32-ia32-msvc@14.2.26", "", { "os": "win32", "cpu": "ia32" }, "sha512-GQWg/Vbz9zUGi9X80lOeGsz1rMH/MtFO/XqigDznhhhTfDlDoynCM6982mPCbSlxJ/aveZcKtTlwfAjwhyxDpg=="],
|
||||||
|
|
||||||
"@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@14.2.25", "", { "os": "win32", "cpu": "x64" }, "sha512-KSznmS6eFjQ9RJ1nEc66kJvtGIL1iZMYmGEXsZPh2YtnLtqrgdVvKXJY2ScjjoFnG6nGLyPFR0UiEvDwVah4Tw=="],
|
"@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@14.2.26", "", { "os": "win32", "cpu": "x64" }, "sha512-2rdB3T1/Gp7bv1eQTTm9d1Y1sv9UuJ2LAwOE0Pe2prHKe32UNscj7YS13fRB37d0GAiGNR+Y7ZcW8YjDI8Ns0w=="],
|
||||||
|
|
||||||
"@noble/ciphers": ["@noble/ciphers@1.2.1", "", {}, "sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA=="],
|
"@noble/ciphers": ["@noble/ciphers@1.2.1", "", {}, "sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA=="],
|
||||||
|
|
||||||
@@ -788,9 +785,9 @@
|
|||||||
|
|
||||||
"@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="],
|
"@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="],
|
||||||
|
|
||||||
"@opennextjs/aws": ["@opennextjs/aws@https://pkg.pr.new/@opennextjs/aws@756", { "dependencies": { "@aws-sdk/client-cloudfront": "3.398.0", "@aws-sdk/client-dynamodb": "^3.398.0", "@aws-sdk/client-lambda": "^3.398.0", "@aws-sdk/client-s3": "^3.398.0", "@aws-sdk/client-sqs": "^3.398.0", "@node-minify/core": "^8.0.6", "@node-minify/terser": "^8.0.6", "@tsconfig/node18": "^1.0.1", "aws4fetch": "^1.0.18", "chalk": "^5.3.0", "esbuild": "0.19.2", "express": "5.0.1", "path-to-regexp": "^6.3.0", "urlpattern-polyfill": "^10.0.0" }, "bin": { "open-next": "./dist/index.js" } }],
|
"@opennextjs/aws": ["@opennextjs/aws@3.5.5", "", { "dependencies": { "@ast-grep/napi": "^0.35.0", "@aws-sdk/client-cloudfront": "3.398.0", "@aws-sdk/client-dynamodb": "^3.398.0", "@aws-sdk/client-lambda": "^3.398.0", "@aws-sdk/client-s3": "^3.398.0", "@aws-sdk/client-sqs": "^3.398.0", "@node-minify/core": "^8.0.6", "@node-minify/terser": "^8.0.6", "@tsconfig/node18": "^1.0.1", "aws4fetch": "^1.0.18", "chalk": "^5.3.0", "esbuild": "0.19.2", "express": "5.0.1", "path-to-regexp": "^6.3.0", "urlpattern-polyfill": "^10.0.0", "yaml": "^2.7.0" }, "bin": { "open-next": "dist/index.js" } }, "sha512-vIqCcNxy7vPdC5HQQkCN+AXhxdNvagZ8EYw5XvuYIAP2T1Ci9ai/8m6UXtjgd3L9+aBA8pbWfr2Wr/BNLX5m2Q=="],
|
||||||
|
|
||||||
"@opennextjs/cloudflare": ["@opennextjs/cloudflare@0.5.10", "", { "dependencies": { "@ast-grep/napi": "^0.34.1", "@dotenvx/dotenvx": "1.31.0", "@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@756", "enquirer": "^2.4.1", "glob": "^11.0.0", "yaml": "^2.7.0" }, "peerDependencies": { "wrangler": "^3.111.0" }, "bin": { "opennextjs-cloudflare": "dist/cli/index.js" } }, "sha512-L/D472YT5OW1LwpFtD/aVXHJYcVPbFVX7XdphlUjCR4+2osSQIDnsuNgfDRydHMDJZMKxeZDc251ZBzUVKpCqw=="],
|
"@opennextjs/cloudflare": ["@opennextjs/cloudflare@https://pkg.pr.new/opennextjs/opennextjs-cloudflare/@opennextjs/cloudflare@7b3b305", { "dependencies": { "@dotenvx/dotenvx": "1.31.0", "@opennextjs/aws": "3.5.5", "enquirer": "^2.4.1", "glob": "^11.0.0", "ts-tqdm": "^0.8.6" }, "peerDependencies": { "wrangler": "^3.114.3 || ^4.7.0" }, "bin": { "opennextjs-cloudflare": "dist/cli/index.js" } }],
|
||||||
|
|
||||||
"@opentelemetry/api": ["@opentelemetry/api@1.9.0", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="],
|
"@opentelemetry/api": ["@opentelemetry/api@1.9.0", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="],
|
||||||
|
|
||||||
@@ -836,6 +833,8 @@
|
|||||||
|
|
||||||
"@radix-ui/react-slot": ["@radix-ui/react-slot@1.1.0", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw=="],
|
"@radix-ui/react-slot": ["@radix-ui/react-slot@1.1.0", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip": ["@radix-ui/react-tooltip@1.1.8", "", { "dependencies": { "@radix-ui/primitive": "1.1.1", "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", "@radix-ui/react-dismissable-layer": "1.1.5", "@radix-ui/react-id": "1.1.0", "@radix-ui/react-popper": "1.2.2", "@radix-ui/react-portal": "1.1.4", "@radix-ui/react-presence": "1.1.2", "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-slot": "1.1.2", "@radix-ui/react-use-controllable-state": "1.1.0", "@radix-ui/react-visually-hidden": "1.1.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-YAA2cu48EkJZdAMHC0dqo9kialOcRStbtiY4nJPaht7Ptrhcvpo+eDChaM6BIs8kL6a8Z5l5poiqLnXcNduOkA=="],
|
||||||
|
|
||||||
"@radix-ui/react-use-callback-ref": ["@radix-ui/react-use-callback-ref@1.1.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw=="],
|
"@radix-ui/react-use-callback-ref": ["@radix-ui/react-use-callback-ref@1.1.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw=="],
|
||||||
|
|
||||||
"@radix-ui/react-use-controllable-state": ["@radix-ui/react-use-controllable-state@1.1.0", "", { "dependencies": { "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw=="],
|
"@radix-ui/react-use-controllable-state": ["@radix-ui/react-use-controllable-state@1.1.0", "", { "dependencies": { "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw=="],
|
||||||
@@ -1314,8 +1313,6 @@
|
|||||||
|
|
||||||
"@unhead/schema": ["@unhead/schema@1.11.14", "", { "dependencies": { "hookable": "^5.5.3", "zhead": "^2.2.4" } }, "sha512-V9W9u5tF1/+TiLqxu+Qvh1ShoMDkPEwHoEo4DKdDG6ko7YlbzFfDxV6el9JwCren45U/4Vy/4Xi7j8OH02wsiA=="],
|
"@unhead/schema": ["@unhead/schema@1.11.14", "", { "dependencies": { "hookable": "^5.5.3", "zhead": "^2.2.4" } }, "sha512-V9W9u5tF1/+TiLqxu+Qvh1ShoMDkPEwHoEo4DKdDG6ko7YlbzFfDxV6el9JwCren45U/4Vy/4Xi7j8OH02wsiA=="],
|
||||||
|
|
||||||
"@upstash/redis": ["@upstash/redis@1.34.3", "", { "dependencies": { "crypto-js": "^4.2.0" } }, "sha512-VT25TyODGy/8ljl7GADnJoMmtmJ1F8d84UXfGonRRF8fWYJz7+2J6GzW+a6ETGtk4OyuRTt7FRSvFG5GvrfSdQ=="],
|
|
||||||
|
|
||||||
"@vercel/build-utils": ["@vercel/build-utils@9.0.1", "", {}, "sha512-pG/izEqA0AGyqQj6QBfGoTOKU9FPG18sYw9qpncEq00uA+J4Ly4e8ssNbENsXtnXqkMjeoS3c5ncR3jT0bOyiA=="],
|
"@vercel/build-utils": ["@vercel/build-utils@9.0.1", "", {}, "sha512-pG/izEqA0AGyqQj6QBfGoTOKU9FPG18sYw9qpncEq00uA+J4Ly4e8ssNbENsXtnXqkMjeoS3c5ncR3jT0bOyiA=="],
|
||||||
|
|
||||||
"@vercel/error-utils": ["@vercel/error-utils@2.0.3", "", {}, "sha512-CqC01WZxbLUxoiVdh9B/poPbNpY9U+tO1N9oWHwTl5YAZxcqXmmWJ8KNMFItJCUUWdY3J3xv8LvAuQv2KZ5YdQ=="],
|
"@vercel/error-utils": ["@vercel/error-utils@2.0.3", "", {}, "sha512-CqC01WZxbLUxoiVdh9B/poPbNpY9U+tO1N9oWHwTl5YAZxcqXmmWJ8KNMFItJCUUWdY3J3xv8LvAuQv2KZ5YdQ=="],
|
||||||
@@ -1392,7 +1389,7 @@
|
|||||||
|
|
||||||
"agent-base": ["agent-base@7.1.3", "", {}, "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw=="],
|
"agent-base": ["agent-base@7.1.3", "", {}, "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw=="],
|
||||||
|
|
||||||
"ai": ["ai@4.1.47", "", { "dependencies": { "@ai-sdk/provider": "1.0.9", "@ai-sdk/provider-utils": "2.1.10", "@ai-sdk/react": "1.1.19", "@ai-sdk/ui-utils": "1.1.16", "@opentelemetry/api": "1.9.0", "jsondiffpatch": "0.6.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "zod": "^3.0.0" }, "optionalPeers": ["react", "zod"] }, "sha512-9UZ8Mkv1HlprCJfQ0Kq+rgKbfkrkDtJjslr1WOHBRzvC70jDJJYp8r0Qq4vlF7zs9VBkGyy8Rhm5zQJJIUjvgw=="],
|
"ai": ["ai@4.3.0", "", { "dependencies": { "@ai-sdk/provider": "1.1.0", "@ai-sdk/provider-utils": "2.2.4", "@ai-sdk/react": "1.2.6", "@ai-sdk/ui-utils": "1.2.5", "@opentelemetry/api": "1.9.0", "jsondiffpatch": "0.6.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "zod": "^3.23.8" }, "optionalPeers": ["react"] }, "sha512-PxyQYKhWaU3LiZEpeKRaekVonZIbWdKAwgnqm0CSAxy1MFufmYEC5SM5Mc9uiK2DoHcbAL3d1jyaQ2fSDAJL8w=="],
|
||||||
|
|
||||||
"ajv": ["ajv@8.17.1", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g=="],
|
"ajv": ["ajv@8.17.1", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g=="],
|
||||||
|
|
||||||
@@ -1584,8 +1581,6 @@
|
|||||||
|
|
||||||
"cross-spawn": ["cross-spawn@7.0.3", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w=="],
|
"cross-spawn": ["cross-spawn@7.0.3", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w=="],
|
||||||
|
|
||||||
"crypto-js": ["crypto-js@4.2.0", "", {}, "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="],
|
|
||||||
|
|
||||||
"crypto-random-string": ["crypto-random-string@2.0.0", "", {}, "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA=="],
|
"crypto-random-string": ["crypto-random-string@2.0.0", "", {}, "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA=="],
|
||||||
|
|
||||||
"css-functions-list": ["css-functions-list@3.2.3", "", {}, "sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA=="],
|
"css-functions-list": ["css-functions-list@3.2.3", "", {}, "sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA=="],
|
||||||
@@ -2318,7 +2313,7 @@
|
|||||||
|
|
||||||
"negotiator": ["negotiator@1.0.0", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="],
|
"negotiator": ["negotiator@1.0.0", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="],
|
||||||
|
|
||||||
"next": ["next@14.2.25", "", { "dependencies": { "@next/env": "14.2.25", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "graceful-fs": "^4.2.11", "postcss": "8.4.31", "styled-jsx": "5.1.1" }, "optionalDependencies": { "@next/swc-darwin-arm64": "14.2.25", "@next/swc-darwin-x64": "14.2.25", "@next/swc-linux-arm64-gnu": "14.2.25", "@next/swc-linux-arm64-musl": "14.2.25", "@next/swc-linux-x64-gnu": "14.2.25", "@next/swc-linux-x64-musl": "14.2.25", "@next/swc-win32-arm64-msvc": "14.2.25", "@next/swc-win32-ia32-msvc": "14.2.25", "@next/swc-win32-x64-msvc": "14.2.25" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "react": "^18.2.0", "react-dom": "^18.2.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-N5M7xMc4wSb4IkPvEV5X2BRRXUmhVHNyaXwEM86+voXthSZz8ZiRyQW4p9mwAoAPIm6OzuVZtn7idgEJeAJN3Q=="],
|
"next": ["next@14.2.26", "", { "dependencies": { "@next/env": "14.2.26", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "graceful-fs": "^4.2.11", "postcss": "8.4.31", "styled-jsx": "5.1.1" }, "optionalDependencies": { "@next/swc-darwin-arm64": "14.2.26", "@next/swc-darwin-x64": "14.2.26", "@next/swc-linux-arm64-gnu": "14.2.26", "@next/swc-linux-arm64-musl": "14.2.26", "@next/swc-linux-x64-gnu": "14.2.26", "@next/swc-linux-x64-musl": "14.2.26", "@next/swc-win32-arm64-msvc": "14.2.26", "@next/swc-win32-ia32-msvc": "14.2.26", "@next/swc-win32-x64-msvc": "14.2.26" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "react": "^18.2.0", "react-dom": "^18.2.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-b81XSLihMwCfwiUVRRja3LphLo4uBBMZEzBBWMaISbKTwOmq3wPknIETy/8000tr7Gq4WmbuFYPS7jOYIf+ZJw=="],
|
||||||
|
|
||||||
"next-themes": ["next-themes@0.2.1", "", { "peerDependencies": { "next": "*", "react": "*", "react-dom": "*" } }, "sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A=="],
|
"next-themes": ["next-themes@0.2.1", "", { "peerDependencies": { "next": "*", "react": "*", "react-dom": "*" } }, "sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A=="],
|
||||||
|
|
||||||
@@ -2414,6 +2409,8 @@
|
|||||||
|
|
||||||
"parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="],
|
"parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="],
|
||||||
|
|
||||||
|
"partial-json": ["partial-json@0.1.7", "", {}, "sha512-Njv/59hHaokb/hRUjce3Hdv12wd60MtM9Z5Olmn+nehe0QDAsRtRbJPvJ0Z91TusF0SuZRIvnM+S4l6EIP8leA=="],
|
||||||
|
|
||||||
"path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="],
|
"path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="],
|
||||||
|
|
||||||
"path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="],
|
"path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="],
|
||||||
@@ -2784,21 +2781,23 @@
|
|||||||
|
|
||||||
"ts-toolbelt": ["ts-toolbelt@6.15.5", "", {}, "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A=="],
|
"ts-toolbelt": ["ts-toolbelt@6.15.5", "", {}, "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A=="],
|
||||||
|
|
||||||
|
"ts-tqdm": ["ts-tqdm@0.8.6", "", {}, "sha512-3X3M1PZcHtgQbnwizL+xU8CAgbYbeLHrrDwL9xxcZZrV5J+e7loJm1XrXozHjSkl44J0Zg0SgA8rXbh83kCkcQ=="],
|
||||||
|
|
||||||
"tslib": ["tslib@2.7.0", "", {}, "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA=="],
|
"tslib": ["tslib@2.7.0", "", {}, "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA=="],
|
||||||
|
|
||||||
"turbo": ["turbo@2.4.4", "", { "optionalDependencies": { "turbo-darwin-64": "2.4.4", "turbo-darwin-arm64": "2.4.4", "turbo-linux-64": "2.4.4", "turbo-linux-arm64": "2.4.4", "turbo-windows-64": "2.4.4", "turbo-windows-arm64": "2.4.4" }, "bin": { "turbo": "bin/turbo" } }, "sha512-N9FDOVaY3yz0YCOhYIgOGYad7+m2ptvinXygw27WPLQvcZDl3+0Sa77KGVlLSiuPDChOUEnTKE9VJwLSi9BPGQ=="],
|
"turbo": ["turbo@2.5.0", "", { "optionalDependencies": { "turbo-darwin-64": "2.5.0", "turbo-darwin-arm64": "2.5.0", "turbo-linux-64": "2.5.0", "turbo-linux-arm64": "2.5.0", "turbo-windows-64": "2.5.0", "turbo-windows-arm64": "2.5.0" }, "bin": { "turbo": "bin/turbo" } }, "sha512-PvSRruOsitjy6qdqwIIyolv99+fEn57gP6gn4zhsHTEcCYgXPhv6BAxzAjleS8XKpo+Y582vTTA9nuqYDmbRuA=="],
|
||||||
|
|
||||||
"turbo-darwin-64": ["turbo-darwin-64@2.4.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-5kPvRkLAfmWI0MH96D+/THnDMGXlFNmjeqNRj5grLKiry+M9pKj3pRuScddAXPdlxjO5Ptz06UNaOQrrYGTx1g=="],
|
"turbo-darwin-64": ["turbo-darwin-64@2.5.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-fP1hhI9zY8hv0idym3hAaXdPi80TLovmGmgZFocVAykFtOxF+GlfIgM/l4iLAV9ObIO4SUXPVWHeBZQQ+Hpjag=="],
|
||||||
|
|
||||||
"turbo-darwin-arm64": ["turbo-darwin-arm64@2.4.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-/gtHPqbGQXDFhrmy+Q/MFW2HUTUlThJ97WLLSe4bxkDrKHecDYhAjbZ4rN3MM93RV9STQb3Tqy4pZBtsd4DfCw=="],
|
"turbo-darwin-arm64": ["turbo-darwin-arm64@2.5.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-p9sYq7kXH7qeJwIQE86cOWv/xNqvow846l6c/qWc26Ib1ci5W7V0sI5thsrP3eH+VA0d+SHalTKg5SQXgNQBWA=="],
|
||||||
|
|
||||||
"turbo-linux-64": ["turbo-linux-64@2.4.4", "", { "os": "linux", "cpu": "x64" }, "sha512-SR0gri4k0bda56hw5u9VgDXLKb1Q+jrw4lM7WAhnNdXvVoep4d6LmnzgMHQQR12Wxl3KyWPbkz9d1whL6NTm2Q=="],
|
"turbo-linux-64": ["turbo-linux-64@2.5.0", "", { "os": "linux", "cpu": "x64" }, "sha512-1iEln2GWiF3iPPPS1HQJT6ZCFXynJPd89gs9SkggH2EJsj3eRUSVMmMC8y6d7bBbhBFsiGGazwFIYrI12zs6uQ=="],
|
||||||
|
|
||||||
"turbo-linux-arm64": ["turbo-linux-arm64@2.4.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-COXXwzRd3vslQIfJhXUklgEqlwq35uFUZ7hnN+AUyXx7hUOLIiD5NblL+ETrHnhY4TzWszrbwUMfe2BYWtaPQg=="],
|
"turbo-linux-arm64": ["turbo-linux-arm64@2.5.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-bKBcbvuQHmsX116KcxHJuAcppiiBOfivOObh2O5aXNER6mce7YDDQJy00xQQNp1DhEfcSV2uOsvb3O3nN2cbcA=="],
|
||||||
|
|
||||||
"turbo-windows-64": ["turbo-windows-64@2.4.4", "", { "os": "win32", "cpu": "x64" }, "sha512-PV9rYNouGz4Ff3fd6sIfQy5L7HT9a4fcZoEv8PKRavU9O75G7PoDtm8scpHU10QnK0QQNLbE9qNxOAeRvF0fJg=="],
|
"turbo-windows-64": ["turbo-windows-64@2.5.0", "", { "os": "win32", "cpu": "x64" }, "sha512-9BCo8oQ7BO7J0K913Czbc3tw8QwLqn2nTe4E47k6aVYkM12ASTScweXPTuaPFP5iYXAT6z5Dsniw704Ixa5eGg=="],
|
||||||
|
|
||||||
"turbo-windows-arm64": ["turbo-windows-arm64@2.4.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-403sqp9t5sx6YGEC32IfZTVWkRAixOQomGYB8kEc6ZD+//LirSxzeCHCnM8EmSXw7l57U1G+Fb0kxgTcKPU/Lg=="],
|
"turbo-windows-arm64": ["turbo-windows-arm64@2.5.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-OUHCV+ueXa3UzfZ4co/ueIHgeq9B2K48pZwIxKSm5VaLVuv8M13MhM7unukW09g++dpdrrE1w4IOVgxKZ0/exg=="],
|
||||||
|
|
||||||
"type": ["type@2.7.3", "", {}, "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ=="],
|
"type": ["type@2.7.3", "", {}, "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ=="],
|
||||||
|
|
||||||
@@ -2946,9 +2945,9 @@
|
|||||||
|
|
||||||
"zhead": ["zhead@2.2.4", "", {}, "sha512-8F0OI5dpWIA5IGG5NHUg9staDwz/ZPxZtvGVf01j7vHqSyZ0raHY+78atOVxRqb73AotX22uV1pXt3gYSstGag=="],
|
"zhead": ["zhead@2.2.4", "", {}, "sha512-8F0OI5dpWIA5IGG5NHUg9staDwz/ZPxZtvGVf01j7vHqSyZ0raHY+78atOVxRqb73AotX22uV1pXt3gYSstGag=="],
|
||||||
|
|
||||||
"zod": ["zod@3.23.8", "", {}, "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g=="],
|
"zod": ["zod@3.24.2", "", {}, "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ=="],
|
||||||
|
|
||||||
"zod-to-json-schema": ["zod-to-json-schema@3.24.3", "", { "peerDependencies": { "zod": "^3.24.1" } }, "sha512-HIAfWdYIt1sssHfYZFCXp4rU1w2r8hVVXYIlmoa0r0gABLs5di3RCqPU5DDROogVz1pAdYBaz7HK5n9pSUNs3A=="],
|
"zod-to-json-schema": ["zod-to-json-schema@3.24.5", "", { "peerDependencies": { "zod": "^3.24.1" } }, "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g=="],
|
||||||
|
|
||||||
"zustand": ["zustand@5.0.3", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg=="],
|
"zustand": ["zustand@5.0.3", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg=="],
|
||||||
|
|
||||||
@@ -3676,6 +3675,24 @@
|
|||||||
|
|
||||||
"@radix-ui/react-popper/@radix-ui/react-context": ["@radix-ui/react-context@1.1.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A=="],
|
"@radix-ui/react-popper/@radix-ui/react-context": ["@radix-ui/react-context@1.1.0", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip/@radix-ui/primitive": ["@radix-ui/primitive@1.1.1", "", {}, "sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip/@radix-ui/react-compose-refs": ["@radix-ui/react-compose-refs@1.1.1", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip/@radix-ui/react-dismissable-layer": ["@radix-ui/react-dismissable-layer@1.1.5", "", { "dependencies": { "@radix-ui/primitive": "1.1.1", "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-callback-ref": "1.1.0", "@radix-ui/react-use-escape-keydown": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-E4TywXY6UsXNRhFrECa5HAvE5/4BFcGyfTyK36gP+pAW1ed7UTK4vKwdr53gAJYwqbfCWC6ATvJa3J3R/9+Qrg=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip/@radix-ui/react-popper": ["@radix-ui/react-popper@1.2.2", "", { "dependencies": { "@floating-ui/react-dom": "^2.0.0", "@radix-ui/react-arrow": "1.1.2", "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-context": "1.1.1", "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-callback-ref": "1.1.0", "@radix-ui/react-use-layout-effect": "1.1.0", "@radix-ui/react-use-rect": "1.1.0", "@radix-ui/react-use-size": "1.1.0", "@radix-ui/rect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Rvqc3nOpwseCyj/rgjlJDYAgyfw7OC1tTkKn2ivhaMGcYt8FSBlahHOZak2i3QwkRXUXgGgzeEe2RuqeEHuHgA=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip/@radix-ui/react-portal": ["@radix-ui/react-portal@1.1.4", "", { "dependencies": { "@radix-ui/react-primitive": "2.0.2", "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-sn2O9k1rPFYVyKd5LAJfo96JlSGVFpa1fS6UuBJfrZadudiw5tAmru+n1x7aMRQ84qDM71Zh1+SzK5QwU0tJfA=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip/@radix-ui/react-presence": ["@radix-ui/react-presence@1.1.2", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.1", "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-18TFr80t5EVgL9x1SwF/YGtfG+l0BS0PRAlCWBDoBEiDQjeKgnNZRVJp/oVBl24sr3Gbfwc/Qpj4OcWTQMsAEg=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.0.2", "", { "dependencies": { "@radix-ui/react-slot": "1.1.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip/@radix-ui/react-slot": ["@radix-ui/react-slot@1.1.2", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip/@radix-ui/react-visually-hidden": ["@radix-ui/react-visually-hidden@1.1.2", "", { "dependencies": { "@radix-ui/react-primitive": "2.0.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-1SzA4ns2M1aRlvxErqhLHsBHoS5eI5UUcI2awAMgGUp4LoaoWOKYmvqDY2s/tltuPkh3Yk77YF/r3IRj+Amx4Q=="],
|
||||||
|
|
||||||
"@radix-ui/react-visually-hidden/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.0.1", "", { "dependencies": { "@radix-ui/react-slot": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-sHCWTtxwNn3L3fH8qAfnF3WbUZycW93SM1j3NFDzXBiz8D6F5UTTy8G1+WFEaiCdvCVRJWj6N2R4Xq6HdiHmDg=="],
|
"@radix-ui/react-visually-hidden/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.0.1", "", { "dependencies": { "@radix-ui/react-slot": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-sHCWTtxwNn3L3fH8qAfnF3WbUZycW93SM1j3NFDzXBiz8D6F5UTTy8G1+WFEaiCdvCVRJWj6N2R4Xq6HdiHmDg=="],
|
||||||
|
|
||||||
"@react-aria/focus/clsx": ["clsx@2.0.0", "", {}, "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q=="],
|
"@react-aria/focus/clsx": ["clsx@2.0.0", "", {}, "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q=="],
|
||||||
@@ -3686,12 +3703,20 @@
|
|||||||
|
|
||||||
"@scalar/api-client/pretty-ms": ["pretty-ms@8.0.0", "", { "dependencies": { "parse-ms": "^3.0.0" } }, "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q=="],
|
"@scalar/api-client/pretty-ms": ["pretty-ms@8.0.0", "", { "dependencies": { "parse-ms": "^3.0.0" } }, "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q=="],
|
||||||
|
|
||||||
|
"@scalar/api-client/zod": ["zod@3.23.8", "", {}, "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g=="],
|
||||||
|
|
||||||
"@scalar/code-highlight/remark-gfm": ["remark-gfm@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-gfm": "^3.0.0", "micromark-extension-gfm": "^3.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "unified": "^11.0.0" } }, "sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA=="],
|
"@scalar/code-highlight/remark-gfm": ["remark-gfm@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-gfm": "^3.0.0", "micromark-extension-gfm": "^3.0.0", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "unified": "^11.0.0" } }, "sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA=="],
|
||||||
|
|
||||||
"@scalar/oas-utils/flatted": ["flatted@3.3.1", "", {}, "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw=="],
|
"@scalar/oas-utils/flatted": ["flatted@3.3.1", "", {}, "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw=="],
|
||||||
|
|
||||||
|
"@scalar/oas-utils/zod": ["zod@3.23.8", "", {}, "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g=="],
|
||||||
|
|
||||||
"@scalar/object-utils/flatted": ["flatted@3.3.1", "", {}, "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw=="],
|
"@scalar/object-utils/flatted": ["flatted@3.3.1", "", {}, "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw=="],
|
||||||
|
|
||||||
|
"@scalar/types/zod": ["zod@3.23.8", "", {}, "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g=="],
|
||||||
|
|
||||||
|
"@scalar/use-hooks/zod": ["zod@3.23.8", "", {}, "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g=="],
|
||||||
|
|
||||||
"@shikijs/core/hast-util-to-html": ["hast-util-to-html@9.0.5", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw=="],
|
"@shikijs/core/hast-util-to-html": ["hast-util-to-html@9.0.5", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw=="],
|
||||||
|
|
||||||
"@smithy/abort-controller/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
"@smithy/abort-controller/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
@@ -3992,7 +4017,7 @@
|
|||||||
|
|
||||||
"gaxios/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
|
"gaxios/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
|
||||||
|
|
||||||
"gitbook-v2/next": ["next@15.2.3", "", { "dependencies": { "@next/env": "15.2.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.2.3", "@next/swc-darwin-x64": "15.2.3", "@next/swc-linux-arm64-gnu": "15.2.3", "@next/swc-linux-arm64-musl": "15.2.3", "@next/swc-linux-x64-gnu": "15.2.3", "@next/swc-linux-x64-musl": "15.2.3", "@next/swc-win32-arm64-msvc": "15.2.3", "@next/swc-win32-x64-msvc": "15.2.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w=="],
|
"gitbook-v2/next": ["next@15.3.0-canary.43", "", { "dependencies": { "@next/env": "15.3.0-canary.43", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.3.0-canary.43", "@next/swc-darwin-x64": "15.3.0-canary.43", "@next/swc-linux-arm64-gnu": "15.3.0-canary.43", "@next/swc-linux-arm64-musl": "15.3.0-canary.43", "@next/swc-linux-x64-gnu": "15.3.0-canary.43", "@next/swc-linux-x64-musl": "15.3.0-canary.43", "@next/swc-win32-arm64-msvc": "15.3.0-canary.43", "@next/swc-win32-x64-msvc": "15.3.0-canary.43", "sharp": "^0.34.1" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-am6xpZIx2P0VJ26N7K2CImmznYUP65XS0e0nkYtypWf/RiMsScwmCqrA4qrEK9u/tiPlA+583IcQPos9yKLg1Q=="],
|
||||||
|
|
||||||
"global-dirs/ini": ["ini@1.3.7", "", {}, "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ=="],
|
"global-dirs/ini": ["ini@1.3.7", "", {}, "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ=="],
|
||||||
|
|
||||||
@@ -4616,6 +4641,8 @@
|
|||||||
|
|
||||||
"@cloudflare/next-on-pages/miniflare/youch": ["youch@3.3.4", "", { "dependencies": { "cookie": "^0.7.1", "mustache": "^4.2.0", "stacktracey": "^2.1.8" } }, "sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg=="],
|
"@cloudflare/next-on-pages/miniflare/youch": ["youch@3.3.4", "", { "dependencies": { "cookie": "^0.7.1", "mustache": "^4.2.0", "stacktracey": "^2.1.8" } }, "sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg=="],
|
||||||
|
|
||||||
|
"@cloudflare/next-on-pages/miniflare/zod": ["zod@3.23.8", "", {}, "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g=="],
|
||||||
|
|
||||||
"@codemirror/lang-json/@codemirror/language/@codemirror/view": ["@codemirror/view@6.34.1", "", { "dependencies": { "@codemirror/state": "^6.4.0", "style-mod": "^4.1.0", "w3c-keyname": "^2.2.4" } }, "sha512-t1zK/l9UiRqwUNPm+pdIT0qzJlzuVckbTEMVNFhfWkGiBQClstzg+78vedCvLSX0xJEZ6lwZbPpnljL7L6iwMQ=="],
|
"@codemirror/lang-json/@codemirror/language/@codemirror/view": ["@codemirror/view@6.34.1", "", { "dependencies": { "@codemirror/state": "^6.4.0", "style-mod": "^4.1.0", "w3c-keyname": "^2.2.4" } }, "sha512-t1zK/l9UiRqwUNPm+pdIT0qzJlzuVckbTEMVNFhfWkGiBQClstzg+78vedCvLSX0xJEZ6lwZbPpnljL7L6iwMQ=="],
|
||||||
|
|
||||||
"@codemirror/lang-json/@codemirror/language/@lezer/common": ["@lezer/common@1.2.2", "", {}, "sha512-Z+R3hN6kXbgBWAuejUNPihylAL1Z5CaFqnIe0nTX8Ej+XlIy3EGtXxn6WtLMO+os2hRkQvm2yvaGMYliUzlJaw=="],
|
"@codemirror/lang-json/@codemirror/language/@lezer/common": ["@lezer/common@1.2.2", "", {}, "sha512-Z+R3hN6kXbgBWAuejUNPihylAL1Z5CaFqnIe0nTX8Ej+XlIy3EGtXxn6WtLMO+os2hRkQvm2yvaGMYliUzlJaw=="],
|
||||||
@@ -4694,6 +4721,8 @@
|
|||||||
|
|
||||||
"@radix-ui/react-navigation-menu/@radix-ui/react-primitive/@radix-ui/react-slot": ["@radix-ui/react-slot@1.1.1", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g=="],
|
"@radix-ui/react-navigation-menu/@radix-ui/react-primitive/@radix-ui/react-slot": ["@radix-ui/react-slot@1.1.1", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g=="],
|
||||||
|
|
||||||
|
"@radix-ui/react-tooltip/@radix-ui/react-popper/@radix-ui/react-arrow": ["@radix-ui/react-arrow@1.1.2", "", { "dependencies": { "@radix-ui/react-primitive": "2.0.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-G+KcpzXHq24iH0uGG/pF8LyzpFJYGD4RfLjCIBfGdSLXvjLHST31RUiRVrupIBMvIppMgSzQ6l66iAxl03tdlg=="],
|
||||||
|
|
||||||
"@radix-ui/react-visually-hidden/@radix-ui/react-primitive/@radix-ui/react-slot": ["@radix-ui/react-slot@1.1.1", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g=="],
|
"@radix-ui/react-visually-hidden/@radix-ui/react-primitive/@radix-ui/react-slot": ["@radix-ui/react-slot@1.1.1", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g=="],
|
||||||
|
|
||||||
"@scalar/api-client/pretty-ms/parse-ms": ["parse-ms@3.0.0", "", {}, "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw=="],
|
"@scalar/api-client/pretty-ms/parse-ms": ["parse-ms@3.0.0", "", {}, "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw=="],
|
||||||
@@ -4856,26 +4885,28 @@
|
|||||||
|
|
||||||
"gaxios/https-proxy-agent/debug": ["debug@4.3.7", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ=="],
|
"gaxios/https-proxy-agent/debug": ["debug@4.3.7", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ=="],
|
||||||
|
|
||||||
"gitbook-v2/next/@next/env": ["@next/env@15.2.3", "", {}, "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw=="],
|
"gitbook-v2/next/@next/env": ["@next/env@15.3.0-canary.43", "", {}, "sha512-ogryUGufxhtidxr/42NY6+ADlvxt9Hq6Q/DOMS/20vGuePZ70wO6Z5m1RP3Q397RGgpe1gSWyYdlg+Mt7H4KeQ=="],
|
||||||
|
|
||||||
"gitbook-v2/next/@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.2.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw=="],
|
"gitbook-v2/next/@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.3.0-canary.43", "", { "os": "darwin", "cpu": "arm64" }, "sha512-eXrs8CyIBgdnMTNjku+h/xm61gmRCcKAT+tM2CjpEXbEqXBux5hRIakOk5kJJDu2fA2P3pzQGt5PRD1hg4srXA=="],
|
||||||
|
|
||||||
"gitbook-v2/next/@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.2.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw=="],
|
"gitbook-v2/next/@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.3.0-canary.43", "", { "os": "darwin", "cpu": "x64" }, "sha512-iRGvblEh/b2grxkkp9pT+yea9EzGNM4tLyUZoCzkejkU2jMLsn2DH6h3bQwCfEYZL3YFGsYmVISrVCOVi8LeMw=="],
|
||||||
|
|
||||||
"gitbook-v2/next/@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ=="],
|
"gitbook-v2/next/@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.3.0-canary.43", "", { "os": "linux", "cpu": "arm64" }, "sha512-IqknHGNxpL03uIutIuv7FPjGHuD/AnJVC5exi5g+C7P3f6JVvOjFLS264eqi91tVCXhN2LpcKNGwTlK81bJVVg=="],
|
||||||
|
|
||||||
"gitbook-v2/next/@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q=="],
|
"gitbook-v2/next/@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.3.0-canary.43", "", { "os": "linux", "cpu": "arm64" }, "sha512-FbO0dnFsNe3f1LWTn4vyXTWTSrZdwNRnURYExSQ+0AINHphNfwKQNrPqVLrapQ9CAOCOz8R5p9Kf1++IsH3JJQ=="],
|
||||||
|
|
||||||
"gitbook-v2/next/@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w=="],
|
"gitbook-v2/next/@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.3.0-canary.43", "", { "os": "linux", "cpu": "x64" }, "sha512-MAaLEm8eO6Xir3YC3xLYDHDjLGogAAGRrxhuflvaqAtGQZ6NIMG4YjvAyramYTq/SwrUIDobggKxdQLtu8/pPQ=="],
|
||||||
|
|
||||||
"gitbook-v2/next/@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg=="],
|
"gitbook-v2/next/@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.3.0-canary.43", "", { "os": "linux", "cpu": "x64" }, "sha512-gdwF79/EQjY3zgcolO0jlDe0yfII9tXyXQeqL+uvzA8gZT5FpH0KkwSWzxj8EUswWzZcprbDa87sq8H0Eo+whw=="],
|
||||||
|
|
||||||
"gitbook-v2/next/@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.2.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q=="],
|
"gitbook-v2/next/@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.3.0-canary.43", "", { "os": "win32", "cpu": "arm64" }, "sha512-5WYne3jvo1478kUfe901wFxvPMdC8tRKundKIgU5Upe1HafMMS7ymm1hQ7CUpp3/1vY/R1TV1oKHHJfqDubiNg=="],
|
||||||
|
|
||||||
"gitbook-v2/next/@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.2.3", "", { "os": "win32", "cpu": "x64" }, "sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w=="],
|
"gitbook-v2/next/@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.3.0-canary.43", "", { "os": "win32", "cpu": "x64" }, "sha512-xE3WZhwjb91eezecVsmXn/OtdISfMsIfS3t0ZXsS/+bMvO/LZLdcVBtl0Zy5yR+XJyKfXXmwpdYbL6WH4dGuQg=="],
|
||||||
|
|
||||||
"gitbook-v2/next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="],
|
"gitbook-v2/next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp": ["sharp@0.34.1", "", { "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.3", "semver": "^7.7.1" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.34.1", "@img/sharp-darwin-x64": "0.34.1", "@img/sharp-libvips-darwin-arm64": "1.1.0", "@img/sharp-libvips-darwin-x64": "1.1.0", "@img/sharp-libvips-linux-arm": "1.1.0", "@img/sharp-libvips-linux-arm64": "1.1.0", "@img/sharp-libvips-linux-ppc64": "1.1.0", "@img/sharp-libvips-linux-s390x": "1.1.0", "@img/sharp-libvips-linux-x64": "1.1.0", "@img/sharp-libvips-linuxmusl-arm64": "1.1.0", "@img/sharp-libvips-linuxmusl-x64": "1.1.0", "@img/sharp-linux-arm": "0.34.1", "@img/sharp-linux-arm64": "0.34.1", "@img/sharp-linux-s390x": "0.34.1", "@img/sharp-linux-x64": "0.34.1", "@img/sharp-linuxmusl-arm64": "0.34.1", "@img/sharp-linuxmusl-x64": "0.34.1", "@img/sharp-wasm32": "0.34.1", "@img/sharp-win32-ia32": "0.34.1", "@img/sharp-win32-x64": "0.34.1" } }, "sha512-1j0w61+eVxu7DawFJtnfYcvSv6qPFvfTaqzTQ2BLknVhHTwGS8sc63ZBF4rzkWMBVKybo4S5OBtDdZahh2A1xg=="],
|
||||||
|
|
||||||
"gitbook-v2/next/styled-jsx": ["styled-jsx@5.1.6", "", { "dependencies": { "client-only": "0.0.1" }, "peerDependencies": { "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" } }, "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA=="],
|
"gitbook-v2/next/styled-jsx": ["styled-jsx@5.1.6", "", { "dependencies": { "client-only": "0.0.1" }, "peerDependencies": { "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" } }, "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA=="],
|
||||||
|
|
||||||
"globby/fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
|
"globby/fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
|
||||||
@@ -5092,6 +5123,46 @@
|
|||||||
|
|
||||||
"gitbook-v2/next/postcss/nanoid": ["nanoid@3.3.7", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g=="],
|
"gitbook-v2/next/postcss/nanoid": ["nanoid@3.3.7", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.34.1", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.1.0" }, "os": "darwin", "cpu": "arm64" }, "sha512-pn44xgBtgpEbZsu+lWf2KNb6OAf70X68k+yk69Ic2Xz11zHR/w24/U49XT7AeRwJ0Px+mhALhU5LPci1Aymk7A=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.34.1", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.1.0" }, "os": "darwin", "cpu": "x64" }, "sha512-VfuYgG2r8BpYiOUN+BfYeFo69nP/MIwAtSJ7/Zpxc5QF3KS22z8Pvg3FkrSFJBPNQ7mmcUcYQFBmEQp7eu1F8Q=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.1.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-HZ/JUmPwrJSoM4DIQPv/BfNh9yrOA8tlBbqbLz4JZ5uew2+o22Ik+tHQJcih7QJuSa0zo5coHTfD5J8inqj9DA=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.1.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-Xzc2ToEmHN+hfvsl9wja0RlnXEgpKNmftriQp6XzY/RaSfwD9th+MSh0WQKzUreLKKINb3afirxW7A0fz2YWuQ=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.1.0", "", { "os": "linux", "cpu": "arm" }, "sha512-s8BAd0lwUIvYCJyRdFqvsj+BJIpDBSxs6ivrOPm/R7piTs5UIwY5OjXrP2bqXC9/moGsyRa37eYWYCOGVXxVrA=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.1.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-IVfGJa7gjChDET1dK9SekxFFdflarnUB8PwW8aGwEoF3oAsSDuNUTYS+SKDOyOJxQyDC1aPFMuRYLoDInyV9Ew=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.1.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-xukSwvhguw7COyzvmjydRb3x/09+21HykyapcZchiCUkTThEQEOMtBj9UhkaBRLuBrgLFzQ2wbxdeCCJW/jgJA=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.1.0", "", { "os": "linux", "cpu": "x64" }, "sha512-yRj2+reB8iMg9W5sULM3S74jVS7zqSzHG3Ol/twnAAkAhnGQnpjj6e4ayUz7V+FpKypwgs82xbRdYtchTTUB+Q=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.1.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-jYZdG+whg0MDK+q2COKbYidaqW/WTz0cc1E+tMAusiDygrM4ypmSCjOJPmFTvHHJ8j/6cAGyeDWZOsK06tP33w=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.1.0", "", { "os": "linux", "cpu": "x64" }, "sha512-wK7SBdwrAiycjXdkPnGCPLjYb9lD4l6Ze2gSdAGVZrEL05AOUJESWU2lhlC+Ffn5/G+VKuSm6zzbQSzFX/P65A=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.34.1", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.1.0" }, "os": "linux", "cpu": "arm" }, "sha512-anKiszvACti2sGy9CirTlNyk7BjjZPiML1jt2ZkTdcvpLU1YH6CXwRAZCA2UmRXnhiIftXQ7+Oh62Ji25W72jA=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.34.1", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.1.0" }, "os": "linux", "cpu": "arm64" }, "sha512-kX2c+vbvaXC6vly1RDf/IWNXxrlxLNpBVWkdpRq5Ka7OOKj6nr66etKy2IENf6FtOgklkg9ZdGpEu9kwdlcwOQ=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.34.1", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.1.0" }, "os": "linux", "cpu": "s390x" }, "sha512-7s0KX2tI9mZI2buRipKIw2X1ufdTeaRgwmRabt5bi9chYfhur+/C1OXg3TKg/eag1W+6CCWLVmSauV1owmRPxA=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.34.1", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.1.0" }, "os": "linux", "cpu": "x64" }, "sha512-wExv7SH9nmoBW3Wr2gvQopX1k8q2g5V5Iag8Zk6AVENsjwd+3adjwxtp3Dcu2QhOXr8W9NusBU6XcQUohBZ5MA=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.34.1", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.1.0" }, "os": "linux", "cpu": "arm64" }, "sha512-DfvyxzHxw4WGdPiTF0SOHnm11Xv4aQexvqhRDAoD00MzHekAj9a/jADXeXYCDFH/DzYruwHbXU7uz+H+nWmSOQ=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.34.1", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.1.0" }, "os": "linux", "cpu": "x64" }, "sha512-pax/kTR407vNb9qaSIiWVnQplPcGU8LRIJpDT5o8PdAx5aAA7AS3X9PS8Isw1/WfqgQorPotjrZL3Pqh6C5EBg=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-wasm32": ["@img/sharp-wasm32@0.34.1", "", { "dependencies": { "@emnapi/runtime": "^1.4.0" }, "cpu": "none" }, "sha512-YDybQnYrLQfEpzGOQe7OKcyLUCML4YOXl428gOOzBgN6Gw0rv8dpsJ7PqTHxBnXnwXr8S1mYFSLSa727tpz0xg=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.34.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-WKf/NAZITnonBf3U1LfdjoMgNO5JYRSlhovhRhMxXVdvWYveM4kM3L8m35onYIdh75cOMCo1BexgVQcCDzyoWw=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.34.1", "", { "os": "win32", "cpu": "x64" }, "sha512-hw1iIAHpNE8q3uMIRCgGOeDoz9KtFNarFLQclLxr/LK1VBkj8nby18RjFvr6aP7USRYAjTZW6yisnBWMX571Tw=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="],
|
||||||
|
|
||||||
"rimraf/glob/path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
|
"rimraf/glob/path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
|
||||||
|
|
||||||
"sucrase/glob/path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
|
"sucrase/glob/path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
|
||||||
@@ -5134,6 +5205,8 @@
|
|||||||
|
|
||||||
"@vercel/nft/glob/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
|
"@vercel/nft/glob/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/runtime@1.4.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-64WYIf4UYcdLnbKn/umDlNjQDSS8AgZrI/R9+x5ilkUVFxXcA1Ebl+gQLc/6mERA4407Xof0R7wEyEuj091CVw=="],
|
||||||
|
|
||||||
"@aws-sdk/core/@smithy/smithy-client/@smithy/util-stream/@smithy/fetch-http-handler/@smithy/querystring-builder/@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.0.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg=="],
|
"@aws-sdk/core/@smithy/smithy-client/@smithy/util-stream/@smithy/fetch-http-handler/@smithy/querystring-builder/@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.0.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg=="],
|
||||||
|
|
||||||
"@aws-sdk/core/@smithy/smithy-client/@smithy/util-stream/@smithy/node-http-handler/@smithy/querystring-builder/@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.0.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg=="],
|
"@aws-sdk/core/@smithy/smithy-client/@smithy/util-stream/@smithy/node-http-handler/@smithy/querystring-builder/@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.0.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg=="],
|
||||||
@@ -5141,5 +5214,7 @@
|
|||||||
"@aws-sdk/middleware-sdk-sqs/@smithy/smithy-client/@smithy/util-stream/@smithy/fetch-http-handler/@smithy/querystring-builder/@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.0.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg=="],
|
"@aws-sdk/middleware-sdk-sqs/@smithy/smithy-client/@smithy/util-stream/@smithy/fetch-http-handler/@smithy/querystring-builder/@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.0.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg=="],
|
||||||
|
|
||||||
"@aws-sdk/middleware-sdk-sqs/@smithy/smithy-client/@smithy/util-stream/@smithy/node-http-handler/@smithy/querystring-builder/@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.0.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg=="],
|
"@aws-sdk/middleware-sdk-sqs/@smithy/smithy-client/@smithy/util-stream/@smithy/node-http-handler/@smithy/querystring-builder/@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.0.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg=="],
|
||||||
|
|
||||||
|
"gitbook-v2/next/sharp/@img/sharp-wasm32/@emnapi/runtime/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -4,15 +4,15 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^1.9.4",
|
"@biomejs/biome": "^1.9.4",
|
||||||
"@changesets/cli": "^2.27.12",
|
"@changesets/cli": "^2.27.12",
|
||||||
"turbo": "^2.4.4",
|
"turbo": "^2.5.0",
|
||||||
"vercel": "^39.3.0"
|
"vercel": "^39.3.0"
|
||||||
},
|
},
|
||||||
"packageManager": "bun@1.2.5",
|
"packageManager": "bun@1.2.8",
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@codemirror/state": "6.4.1",
|
"@codemirror/state": "6.4.1",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-dom": "18.3.1",
|
"react-dom": "18.3.1",
|
||||||
"@gitbook/api": "0.102.0"
|
"@gitbook/api": "0.109.0"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": ["//"],
|
||||||
|
"tasks": {
|
||||||
|
"generate": {
|
||||||
|
"outputs": ["worker-configuration.d.ts"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
# @gitbook/cache-tags
|
# @gitbook/cache-tags
|
||||||
|
|
||||||
|
## 0.3.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 116575c: Improve typing of getComputedContentSourceCacheTags to match latest API specification
|
||||||
|
|
||||||
## 0.2.0
|
## 0.2.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"default": "./dist/index.js"
|
"default": "./dist/index.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "0.2.0",
|
"version": "0.3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gitbook/api": "*",
|
"@gitbook/api": "*",
|
||||||
"assert-never": "^1.2.1"
|
"assert-never": "^1.2.1"
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export function getCacheTag(
|
|||||||
| {
|
| {
|
||||||
tag: 'computed-document';
|
tag: 'computed-document';
|
||||||
space: string;
|
space: string;
|
||||||
integration: string;
|
sourceType: string;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* All data related to the URL of a content
|
* All data related to the URL of a content
|
||||||
@@ -84,6 +84,14 @@ export function getCacheTag(
|
|||||||
organization: string;
|
organization: string;
|
||||||
openAPISpec: string;
|
openAPISpec: string;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* All data related to a translation
|
||||||
|
*/
|
||||||
|
| {
|
||||||
|
tag: 'translation';
|
||||||
|
organization: string;
|
||||||
|
translationSettings: string;
|
||||||
|
}
|
||||||
): string {
|
): string {
|
||||||
switch (spec.tag) {
|
switch (spec.tag) {
|
||||||
case 'user':
|
case 'user':
|
||||||
@@ -99,13 +107,15 @@ export function getCacheTag(
|
|||||||
case 'document':
|
case 'document':
|
||||||
return `space:${spec.space}:document:${spec.document}`;
|
return `space:${spec.space}:document:${spec.document}`;
|
||||||
case 'computed-document':
|
case 'computed-document':
|
||||||
return `space:${spec.space}:computed-document:${spec.integration}`;
|
return `space:${spec.space}:computed-document:${spec.sourceType}`;
|
||||||
case 'site':
|
case 'site':
|
||||||
return `site:${spec.site}`;
|
return `site:${spec.site}`;
|
||||||
case 'integration':
|
case 'integration':
|
||||||
return `integration:${spec.integration}`;
|
return `integration:${spec.integration}`;
|
||||||
case 'openapi':
|
case 'openapi':
|
||||||
return `organization:${spec.organization}:openapi:${spec.openAPISpec}`;
|
return `organization:${spec.organization}:openapi:${spec.openAPISpec}`;
|
||||||
|
case 'translation':
|
||||||
|
return `organization:${spec.organization}:translation:${spec.translationSettings}`;
|
||||||
default:
|
default:
|
||||||
assertNever(spec);
|
assertNever(spec);
|
||||||
}
|
}
|
||||||
@@ -157,6 +167,15 @@ export function getComputedContentSourceCacheTags(
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
case 'translation-language':
|
||||||
|
tags.push(
|
||||||
|
getCacheTag({
|
||||||
|
tag: 'translation',
|
||||||
|
organization: inContext.organizationId,
|
||||||
|
translationSettings: dependency.ref.translationSettings,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// Do not throw for unknown dependency types
|
// Do not throw for unknown dependency types
|
||||||
// as it might mean we are lacking behind the API version
|
// as it might mean we are lacking behind the API version
|
||||||
@@ -169,18 +188,22 @@ export function getComputedContentSourceCacheTags(
|
|||||||
getCacheTag({
|
getCacheTag({
|
||||||
tag: 'computed-document',
|
tag: 'computed-document',
|
||||||
space: inContext.spaceId,
|
space: inContext.spaceId,
|
||||||
integration: source.integration,
|
sourceType: source.type,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We invalidate the computed content when a new version of the integration is deployed.
|
// We invalidate the computed content when a new version of the integration is deployed.
|
||||||
tags.push(
|
|
||||||
getCacheTag({
|
if (source.type.startsWith('integration:')) {
|
||||||
tag: 'integration',
|
const integration = source.type.split(':')[1];
|
||||||
integration: source.integration,
|
tags.push(
|
||||||
})
|
getCacheTag({
|
||||||
);
|
tag: 'integration',
|
||||||
|
integration,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,17 @@
|
|||||||
# @gitbook/colors
|
# @gitbook/colors
|
||||||
|
|
||||||
|
## 0.3.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- cdffd7c: Desaturate text colors by decreasing chroma for the last steps of the color scale
|
||||||
|
|
||||||
|
## 0.3.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- fb90eb0: Reduce chroma of first color scale step
|
||||||
|
|
||||||
## 0.3.0
|
## 0.3.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"default": "./dist/index.js"
|
"default": "./dist/index.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "0.3.0",
|
"version": "0.3.2",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5.5.3"
|
"typescript": "^5.5.3"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ export function colorScale(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const chromaRatio = index < 8 ? (index + 1) * 0.05 : 1;
|
const chromaRatio = index === 8 || index === 9 ? 1 : index * 0.05;
|
||||||
|
|
||||||
const shade = {
|
const shade = {
|
||||||
L: targetL, // Blend lightness
|
L: targetL, // Blend lightness
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# gitbook-v2
|
# gitbook-v2
|
||||||
|
|
||||||
|
## 0.2.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 4234289: Fix incoming URL for requests that were proxied
|
||||||
|
- Updated dependencies [116575c]
|
||||||
|
- @gitbook/cache-tags@0.3.0
|
||||||
|
|
||||||
|
## 0.2.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 5b2bf82: Use stable site URL data for route rewrite in the middleware
|
||||||
|
|
||||||
## 0.2.2
|
## 0.2.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ const nextConfig = {
|
|||||||
// This is needed to throw "forbidden" when the api token expired during revalidation
|
// This is needed to throw "forbidden" when the api token expired during revalidation
|
||||||
authInterrupts: true,
|
authInterrupts: true,
|
||||||
|
|
||||||
// This is needed to use 'use cache'
|
// We don't use 'use cache' as it's not supported in OpenNext yet
|
||||||
useCache: true,
|
// and instead we scope `unstable_cache` to the parameters of the function
|
||||||
|
useCache: false,
|
||||||
|
|
||||||
// Content is fully static, we can cache it in the session memory cache for a long time
|
// Content is fully static, we can cache it in the session memory cache for a long time
|
||||||
staleTimes: {
|
staleTimes: {
|
||||||
@@ -34,6 +35,7 @@ const nextConfig = {
|
|||||||
GITBOOK_SECRET: process.env.GITBOOK_SECRET,
|
GITBOOK_SECRET: process.env.GITBOOK_SECRET,
|
||||||
GITBOOK_IMAGE_RESIZE_SIGNING_KEY: process.env.GITBOOK_IMAGE_RESIZE_SIGNING_KEY,
|
GITBOOK_IMAGE_RESIZE_SIGNING_KEY: process.env.GITBOOK_IMAGE_RESIZE_SIGNING_KEY,
|
||||||
GITBOOK_FONTS_URL: process.env.GITBOOK_FONTS_URL,
|
GITBOOK_FONTS_URL: process.env.GITBOOK_FONTS_URL,
|
||||||
|
GITBOOK_RUNTIME: process.env.GITBOOK_RUNTIME,
|
||||||
|
|
||||||
// Next.js envs
|
// Next.js envs
|
||||||
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY,
|
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY,
|
||||||
|
|||||||
@@ -1,10 +1,18 @@
|
|||||||
import { defineCloudflareConfig } from '@opennextjs/cloudflare';
|
import { defineCloudflareConfig } from '@opennextjs/cloudflare';
|
||||||
import d1TagCache from '@opennextjs/cloudflare/d1-tag-cache';
|
import r2IncrementalCache from '@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache';
|
||||||
import kvIncrementalCache from '@opennextjs/cloudflare/kv-cache';
|
import { withRegionalCache } from '@opennextjs/cloudflare/overrides/incremental-cache/regional-cache';
|
||||||
import memoryQueue from '@opennextjs/cloudflare/memory-queue';
|
import doQueue from '@opennextjs/cloudflare/overrides/queue/do-queue';
|
||||||
|
import doShardedTagCache from '@opennextjs/cloudflare/overrides/tag-cache/do-sharded-tag-cache';
|
||||||
|
|
||||||
export default defineCloudflareConfig({
|
export default defineCloudflareConfig({
|
||||||
incrementalCache: kvIncrementalCache,
|
incrementalCache: withRegionalCache(r2IncrementalCache, { mode: 'long-lived' }),
|
||||||
queue: memoryQueue,
|
tagCache: doShardedTagCache({
|
||||||
tagCache: d1TagCache,
|
baseShardSize: 12,
|
||||||
|
regionalCache: true,
|
||||||
|
shardReplication: {
|
||||||
|
numberOfSoftReplicas: 2,
|
||||||
|
numberOfHardReplicas: 1,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
queue: doQueue,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "gitbook-v2",
|
"name": "gitbook-v2",
|
||||||
"version": "0.2.2",
|
"version": "0.2.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"next": "^15.2.3",
|
"next": "canary",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "^19.0.0",
|
||||||
"@gitbook/api": "*",
|
"@gitbook/api": "*",
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gitbook": "*",
|
"gitbook": "*",
|
||||||
"@opennextjs/cloudflare": "^0.5.10",
|
"@opennextjs/cloudflare": "https://pkg.pr.new/opennextjs/opennextjs-cloudflare/@opennextjs/cloudflare@7b3b305",
|
||||||
"@types/rison": "^0.0.9",
|
"@types/rison": "^0.0.9",
|
||||||
"tailwindcss": "^3.4.0",
|
"tailwindcss": "^3.4.0",
|
||||||
"postcss": "^8"
|
"postcss": "^8"
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"build": "next build",
|
"build": "next build",
|
||||||
"build:v2": "next build",
|
"build:v2": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"build:v2:cloudflare": "opennextjs-cloudflare",
|
"build:v2:cloudflare": "opennextjs-cloudflare build",
|
||||||
"dev:v2:cloudflare": "wrangler dev --port 8771",
|
"dev:v2:cloudflare": "wrangler dev --port 8771",
|
||||||
"unit": "bun test",
|
"unit": "bun test",
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ export default async function SiteDynamicLayout({
|
|||||||
const forcedTheme = await getThemeFromMiddleware();
|
const forcedTheme = await getThemeFromMiddleware();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomizationRootLayout customization={context.customization}>
|
<CustomizationRootLayout forcedTheme={forcedTheme} customization={context.customization}>
|
||||||
<SiteLayout
|
<SiteLayout
|
||||||
context={context}
|
context={context}
|
||||||
forcedTheme={forcedTheme}
|
forcedTheme={forcedTheme}
|
||||||
|
|||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
import type { NextRequest } from 'next/server';
|
|
||||||
|
|
||||||
import { serveLLMsTxt } from '@/routes/llms';
|
|
||||||
import { type RouteLayoutParams, getDynamicSiteContext } from '@v2/app/utils';
|
|
||||||
|
|
||||||
export async function GET(
|
|
||||||
_request: NextRequest,
|
|
||||||
{ params }: { params: Promise<RouteLayoutParams> }
|
|
||||||
) {
|
|
||||||
const { context } = await getDynamicSiteContext(await params);
|
|
||||||
return serveLLMsTxt(context);
|
|
||||||
}
|
|
||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
import type { NextRequest } from 'next/server';
|
|
||||||
|
|
||||||
import { serveRobotsTxt } from '@/routes/robots';
|
|
||||||
import { type RouteLayoutParams, getDynamicSiteContext } from '@v2/app/utils';
|
|
||||||
|
|
||||||
export async function GET(
|
|
||||||
_request: NextRequest,
|
|
||||||
{ params }: { params: Promise<RouteLayoutParams> }
|
|
||||||
) {
|
|
||||||
const { context } = await getDynamicSiteContext(await params);
|
|
||||||
return serveRobotsTxt(context);
|
|
||||||
}
|
|
||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
import type { NextRequest } from 'next/server';
|
|
||||||
|
|
||||||
import { servePagesSitemap } from '@/routes/sitemap';
|
|
||||||
import { type RouteLayoutParams, getDynamicSiteContext } from '@v2/app/utils';
|
|
||||||
|
|
||||||
export async function GET(
|
|
||||||
_request: NextRequest,
|
|
||||||
{ params }: { params: Promise<RouteLayoutParams> }
|
|
||||||
) {
|
|
||||||
const { context } = await getDynamicSiteContext(await params);
|
|
||||||
return servePagesSitemap(context);
|
|
||||||
}
|
|
||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
import type { NextRequest } from 'next/server';
|
|
||||||
|
|
||||||
import { serveRootSitemap } from '@/routes/sitemap';
|
|
||||||
import { type RouteLayoutParams, getDynamicSiteContext } from '@v2/app/utils';
|
|
||||||
|
|
||||||
export async function GET(
|
|
||||||
_request: NextRequest,
|
|
||||||
{ params }: { params: Promise<RouteLayoutParams> }
|
|
||||||
) {
|
|
||||||
const { context } = await getDynamicSiteContext(await params);
|
|
||||||
return serveRootSitemap(context);
|
|
||||||
}
|
|
||||||
+1
-11
@@ -3,10 +3,9 @@ import {
|
|||||||
generateSitePageMetadata,
|
generateSitePageMetadata,
|
||||||
generateSitePageViewport,
|
generateSitePageViewport,
|
||||||
} from '@/components/SitePage';
|
} from '@/components/SitePage';
|
||||||
import { getCacheTag } from '@gitbook/cache-tags';
|
|
||||||
import { type RouteParams, getPagePathFromParams, getStaticSiteContext } from '@v2/app/utils';
|
import { type RouteParams, getPagePathFromParams, getStaticSiteContext } from '@v2/app/utils';
|
||||||
|
|
||||||
import type { Metadata, Viewport } from 'next';
|
import type { Metadata, Viewport } from 'next';
|
||||||
import { unstable_cacheTag as cacheTag } from 'next/cache';
|
|
||||||
|
|
||||||
export const dynamic = 'force-static';
|
export const dynamic = 'force-static';
|
||||||
|
|
||||||
@@ -15,19 +14,10 @@ type PageProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default async function Page(props: PageProps) {
|
export default async function Page(props: PageProps) {
|
||||||
'use cache';
|
|
||||||
|
|
||||||
const params = await props.params;
|
const params = await props.params;
|
||||||
const { context } = await getStaticSiteContext(params);
|
const { context } = await getStaticSiteContext(params);
|
||||||
const pathname = getPagePathFromParams(params);
|
const pathname = getPagePathFromParams(params);
|
||||||
|
|
||||||
cacheTag(
|
|
||||||
getCacheTag({
|
|
||||||
tag: 'site',
|
|
||||||
site: context.site.id,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
return <SitePage context={context} pageParams={{ pathname }} />;
|
return <SitePage context={context} pageParams={{ pathname }} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,8 @@ import {
|
|||||||
generateSiteLayoutMetadata,
|
generateSiteLayoutMetadata,
|
||||||
generateSiteLayoutViewport,
|
generateSiteLayoutViewport,
|
||||||
} from '@/components/SiteLayout';
|
} from '@/components/SiteLayout';
|
||||||
import { getCacheTag } from '@gitbook/cache-tags';
|
|
||||||
import { type RouteLayoutParams, getStaticSiteContext } from '@v2/app/utils';
|
import { type RouteLayoutParams, getStaticSiteContext } from '@v2/app/utils';
|
||||||
import { GITBOOK_DISABLE_TRACKING } from '@v2/lib/env';
|
import { GITBOOK_DISABLE_TRACKING } from '@v2/lib/env';
|
||||||
import { unstable_cacheTag as cacheTag } from 'next/cache';
|
|
||||||
|
|
||||||
interface SiteStaticLayoutProps {
|
interface SiteStaticLayoutProps {
|
||||||
params: Promise<RouteLayoutParams>;
|
params: Promise<RouteLayoutParams>;
|
||||||
@@ -17,17 +15,8 @@ export default async function SiteStaticLayout({
|
|||||||
params,
|
params,
|
||||||
children,
|
children,
|
||||||
}: React.PropsWithChildren<SiteStaticLayoutProps>) {
|
}: React.PropsWithChildren<SiteStaticLayoutProps>) {
|
||||||
'use cache';
|
|
||||||
|
|
||||||
const { context, visitorAuthClaims } = await getStaticSiteContext(await params);
|
const { context, visitorAuthClaims } = await getStaticSiteContext(await params);
|
||||||
|
|
||||||
cacheTag(
|
|
||||||
getCacheTag({
|
|
||||||
tag: 'site',
|
|
||||||
site: context.site.id,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomizationRootLayout customization={context.customization}>
|
<CustomizationRootLayout customization={context.customization}>
|
||||||
<SiteLayout
|
<SiteLayout
|
||||||
|
|||||||
+1
-1
@@ -10,5 +10,5 @@ export async function GET(
|
|||||||
{ params }: { params: Promise<RouteLayoutParams> }
|
{ params }: { params: Promise<RouteLayoutParams> }
|
||||||
) {
|
) {
|
||||||
const { context } = await getStaticSiteContext(await params);
|
const { context } = await getStaticSiteContext(await params);
|
||||||
return serveLLMsTxt(context);
|
return serveLLMsTxt(context, { withMarkdownPages: true });
|
||||||
}
|
}
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
import { servePageMarkdown } from '@/routes/markdownPage';
|
||||||
|
import { type RouteParams, getPagePathFromParams, getStaticSiteContext } from '@v2/app/utils';
|
||||||
|
import type { NextRequest } from 'next/server';
|
||||||
|
|
||||||
|
export const dynamic = 'force-static';
|
||||||
|
|
||||||
|
export async function GET(_request: NextRequest, { params }: { params: Promise<RouteParams> }) {
|
||||||
|
const { context } = await getStaticSiteContext(await params);
|
||||||
|
const pathname = getPagePathFromParams(await params);
|
||||||
|
return servePageMarkdown(context, pathname);
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { getVisitorAuthClaims, getVisitorAuthClaimsFromToken } from '@/lib/adaptive';
|
import { getVisitorAuthClaims, getVisitorAuthClaimsFromToken } from '@/lib/adaptive';
|
||||||
import type { PublishedSiteContent, SiteAPIToken } from '@gitbook/api';
|
import type { SiteAPIToken } from '@gitbook/api';
|
||||||
import { fetchSiteContextByURLLookup, getBaseContext } from '@v2/lib/context';
|
import { type SiteURLData, fetchSiteContextByURLLookup, getBaseContext } from '@v2/lib/context';
|
||||||
import { jwtDecode } from 'jwt-decode';
|
import { jwtDecode } from 'jwt-decode';
|
||||||
import { forbidden } from 'next/navigation';
|
import { forbidden } from 'next/navigation';
|
||||||
import rison from 'rison';
|
import rison from 'rison';
|
||||||
@@ -98,7 +98,7 @@ function getModeFromParams(mode: string): RouteParamMode {
|
|||||||
/**
|
/**
|
||||||
* Get the decoded site data from the params.
|
* Get the decoded site data from the params.
|
||||||
*/
|
*/
|
||||||
function getSiteURLDataFromParams(params: RouteLayoutParams): PublishedSiteContent {
|
function getSiteURLDataFromParams(params: RouteLayoutParams): SiteURLData {
|
||||||
const decoded = decodeURIComponent(params.siteData);
|
const decoded = decodeURIComponent(params.siteData);
|
||||||
return rison.decode(decoded);
|
return rison.decode(decoded);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,12 +13,42 @@ import type {
|
|||||||
SiteStructure,
|
SiteStructure,
|
||||||
Space,
|
Space,
|
||||||
} from '@gitbook/api';
|
} from '@gitbook/api';
|
||||||
import { type GitBookDataFetcher, createDataFetcher, throwIfDataError } from '@v2/lib/data';
|
import {
|
||||||
|
type GitBookDataFetcher,
|
||||||
|
createDataFetcher,
|
||||||
|
getDataOrNull,
|
||||||
|
throwIfDataError,
|
||||||
|
} from '@v2/lib/data';
|
||||||
|
import { notFound } from 'next/navigation';
|
||||||
import { assert } from 'ts-essentials';
|
import { assert } from 'ts-essentials';
|
||||||
import { GITBOOK_URL } from './env';
|
import { GITBOOK_URL } from './env';
|
||||||
import { type ImageResizer, createImageResizer } from './images';
|
import { type ImageResizer, createImageResizer } from './images';
|
||||||
import { type GitBookLinker, createLinker } from './links';
|
import { type GitBookLinker, createLinker } from './links';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data about the site URL. Provided by the middleware.
|
||||||
|
* These data are stable between pages in the same site space.
|
||||||
|
*/
|
||||||
|
export type SiteURLData = Pick<
|
||||||
|
PublishedSiteContent,
|
||||||
|
| 'organization'
|
||||||
|
| 'apiToken'
|
||||||
|
| 'site'
|
||||||
|
| 'siteSpace'
|
||||||
|
| 'space'
|
||||||
|
| 'revision'
|
||||||
|
| 'changeRequest'
|
||||||
|
| 'shareKey'
|
||||||
|
| 'siteSection'
|
||||||
|
| 'siteBasePath'
|
||||||
|
| 'basePath'
|
||||||
|
> & {
|
||||||
|
/**
|
||||||
|
* Identifier used for image resizing.
|
||||||
|
*/
|
||||||
|
imagesContextId: string;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic context when rendering content.
|
* Generic context when rendering content.
|
||||||
*/
|
*/
|
||||||
@@ -105,7 +135,7 @@ export type GitBookPageContext = (GitBookSpaceContext | GitBookSiteContext) & {
|
|||||||
*/
|
*/
|
||||||
export function getBaseContext(input: {
|
export function getBaseContext(input: {
|
||||||
siteURL: URL | string;
|
siteURL: URL | string;
|
||||||
siteURLData: PublishedSiteContent;
|
siteURLData: SiteURLData;
|
||||||
urlMode: 'url' | 'url-host';
|
urlMode: 'url' | 'url-host';
|
||||||
}) {
|
}) {
|
||||||
const { urlMode, siteURLData } = input;
|
const { urlMode, siteURLData } = input;
|
||||||
@@ -139,7 +169,7 @@ export function getBaseContext(input: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const imageResizer = createImageResizer({
|
const imageResizer = createImageResizer({
|
||||||
host: siteURL.host,
|
imagesContextId: siteURLData.imagesContextId,
|
||||||
// To ensure image resizing work for proxied sites,
|
// To ensure image resizing work for proxied sites,
|
||||||
// we serve images from the root of the site.
|
// we serve images from the root of the site.
|
||||||
linker: linker,
|
linker: linker,
|
||||||
@@ -157,7 +187,7 @@ export function getBaseContext(input: {
|
|||||||
*/
|
*/
|
||||||
export async function fetchSiteContextByURLLookup(
|
export async function fetchSiteContextByURLLookup(
|
||||||
baseContext: GitBookBaseContext,
|
baseContext: GitBookBaseContext,
|
||||||
data: PublishedSiteContent
|
data: SiteURLData
|
||||||
): Promise<GitBookSiteContext> {
|
): Promise<GitBookSiteContext> {
|
||||||
return await fetchSiteContextByIds(baseContext, {
|
return await fetchSiteContextByIds(baseContext, {
|
||||||
organization: data.organization,
|
organization: data.organization,
|
||||||
@@ -277,7 +307,7 @@ export async function fetchSpaceContextByIds(
|
|||||||
})
|
})
|
||||||
),
|
),
|
||||||
ids.changeRequest
|
ids.changeRequest
|
||||||
? throwIfDataError(
|
? getDataOrNull(
|
||||||
dataFetcher.getChangeRequest({
|
dataFetcher.getChangeRequest({
|
||||||
spaceId: ids.space,
|
spaceId: ids.space,
|
||||||
changeRequestId: ids.changeRequest,
|
changeRequestId: ids.changeRequest,
|
||||||
@@ -286,17 +316,30 @@ export async function fetchSpaceContextByIds(
|
|||||||
: null,
|
: null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const revisionId = changeRequest?.revision ?? ids.revision ?? space.revision;
|
if (ids.changeRequest && !changeRequest) {
|
||||||
|
// When trying to render a change request with an invalid / non-existing ID,
|
||||||
|
// we should return a 404.
|
||||||
|
notFound();
|
||||||
|
}
|
||||||
|
|
||||||
const pages = await throwIfDataError(
|
const revisionId = ids.revision ?? changeRequest?.revision ?? space.revision;
|
||||||
|
|
||||||
|
const pages = await getDataOrNull(
|
||||||
dataFetcher.getRevisionPages({
|
dataFetcher.getRevisionPages({
|
||||||
spaceId: ids.space,
|
spaceId: ids.space,
|
||||||
revisionId,
|
revisionId,
|
||||||
// We only care about the Git metadata when the Git sync is enabled,
|
// We only care about the Git metadata when the Git sync is enabled,
|
||||||
// otherwise we can optimize performance by not fetching it
|
// otherwise we can optimize performance by not fetching it
|
||||||
metadata: !!space.gitSync,
|
metadata: !!space.gitSync,
|
||||||
})
|
}),
|
||||||
|
|
||||||
|
// When trying to render a revision with an invalid / non-existing ID,
|
||||||
|
// we should handle gracefully the 404 and throw notFound.
|
||||||
|
ids.revision ? [404] : undefined
|
||||||
);
|
);
|
||||||
|
if (!pages) {
|
||||||
|
notFound();
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...baseContext,
|
...baseContext,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
|||||||
|
import { getCloudflareContext as getCloudflareContextOpenNext } from '@opennextjs/cloudflare';
|
||||||
|
import { GITBOOK_RUNTIME } from '../env';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the Cloudflare context or null when not running in Cloudflare.
|
||||||
|
*/
|
||||||
|
export function getCloudflareContext() {
|
||||||
|
if (GITBOOK_RUNTIME !== 'cloudflare') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return getCloudflareContextOpenNext();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return an object representing the current request.
|
||||||
|
*/
|
||||||
|
export function getCloudflareRequestGlobal() {
|
||||||
|
const context = getCloudflareContext();
|
||||||
|
if (!context) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return context.cf;
|
||||||
|
}
|
||||||
@@ -4,3 +4,5 @@ export * from './pages';
|
|||||||
export * from './urls';
|
export * from './urls';
|
||||||
export * from './errors';
|
export * from './errors';
|
||||||
export * from './lookup';
|
export * from './lookup';
|
||||||
|
export * from './proxy';
|
||||||
|
export * from './visitor';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { race, tryCatch } from '@/lib/async';
|
import { race, tryCatch } from '@/lib/async';
|
||||||
import { joinPath } from '@/lib/paths';
|
import { joinPath, joinPathWithBaseURL } from '@/lib/paths';
|
||||||
import { trace } from '@/lib/tracing';
|
import { trace } from '@/lib/tracing';
|
||||||
import type { PublishedSiteContentLookup } from '@gitbook/api';
|
import type { PublishedSiteContentLookup } from '@gitbook/api';
|
||||||
import { apiClient } from './api';
|
import { apiClient } from './api';
|
||||||
@@ -36,6 +36,13 @@ export async function getPublishedContentByURL(input: {
|
|||||||
url: alternative.url,
|
url: alternative.url,
|
||||||
visitorAuthToken: input.visitorAuthToken ?? undefined,
|
visitorAuthToken: input.visitorAuthToken ?? undefined,
|
||||||
redirectOnError: input.redirectOnError,
|
redirectOnError: input.redirectOnError,
|
||||||
|
|
||||||
|
// As this endpoint is cached by our API, we version the request
|
||||||
|
// to void getting stale data with missing properties.
|
||||||
|
// this could be improved by ensuring our API cache layer is versioned
|
||||||
|
// or invalidated when needed
|
||||||
|
// @ts-expect-error - cacheVersion is not a real query param
|
||||||
|
cacheVersion: 'v2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
signal,
|
signal,
|
||||||
@@ -100,6 +107,7 @@ export async function getPublishedContentByURL(input: {
|
|||||||
|
|
||||||
const siteResult: PublishedSiteContentLookup = {
|
const siteResult: PublishedSiteContentLookup = {
|
||||||
...data,
|
...data,
|
||||||
|
canonicalUrl: joinPathWithBaseURL(data.canonicalUrl, alternative.extraPath),
|
||||||
basePath: joinPath(data.basePath, lookup.basePath ?? ''),
|
basePath: joinPath(data.basePath, lookup.basePath ?? ''),
|
||||||
pathname: joinPath(data.pathname, alternative.extraPath),
|
pathname: joinPath(data.pathname, alternative.extraPath),
|
||||||
...(changeRequest ? { changeRequest } : {}),
|
...(changeRequest ? { changeRequest } : {}),
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import { describe, expect, it, mock } from 'bun:test';
|
||||||
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
||||||
|
import { withCacheKey, withoutConcurrentExecution } from './memoize';
|
||||||
|
|
||||||
|
describe('withoutConcurrentExecution', () => {
|
||||||
|
it('should memoize the function based on the cache key', async () => {
|
||||||
|
const fn = mock(async (a: number, b: number) => a + b);
|
||||||
|
const memoized = withoutConcurrentExecution(() => null, fn);
|
||||||
|
|
||||||
|
const p1 = memoized('c1', 1, 2);
|
||||||
|
const p2 = memoized('c1', 1, 2);
|
||||||
|
const p3 = memoized('c3', 2, 3);
|
||||||
|
|
||||||
|
expect(await p1).toBe(await p2);
|
||||||
|
expect(await p1).not.toBe(await p3);
|
||||||
|
expect(fn.mock.calls.length).toBe(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should support caching per request', async () => {
|
||||||
|
const fn = mock(async () => Math.random());
|
||||||
|
|
||||||
|
const request1 = { id: 'request1' };
|
||||||
|
const request2 = { id: 'request2' };
|
||||||
|
|
||||||
|
const requestContext = new AsyncLocalStorage<{ id: string }>();
|
||||||
|
|
||||||
|
const memoized = withoutConcurrentExecution(() => requestContext.getStore(), fn);
|
||||||
|
|
||||||
|
// Both in the same request
|
||||||
|
const promise1 = requestContext.run(request1, () => memoized('c1'));
|
||||||
|
const promise2 = requestContext.run(request1, () => memoized('c1'));
|
||||||
|
|
||||||
|
// In a different request
|
||||||
|
const promise3 = requestContext.run(request2, () => memoized('c1'));
|
||||||
|
|
||||||
|
expect(await promise1).toBe(await promise2);
|
||||||
|
expect(await promise1).not.toBe(await promise3);
|
||||||
|
expect(fn.mock.calls.length).toBe(2);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('withCacheKey', () => {
|
||||||
|
it('should wrap the function by passing the cache key', async () => {
|
||||||
|
const fn = mock(
|
||||||
|
async (cacheKey: string, arg: { a: number; b: number }, c: number) =>
|
||||||
|
`${cacheKey}, result=${arg.a + arg.b + c}`
|
||||||
|
);
|
||||||
|
const memoized = withCacheKey(fn);
|
||||||
|
expect(await memoized({ a: 1, b: 2 }, 4)).toBe('[[["a",1],["b",2]],4], result=7');
|
||||||
|
expect(fn.mock.calls.length).toBe(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
/**
|
||||||
|
* Wrap a function by preventing concurrent executions of the same function.
|
||||||
|
* With a logic to work per-request in Cloudflare Workers.
|
||||||
|
*/
|
||||||
|
export function withoutConcurrentExecution<ArgsType extends any[], ReturnType>(
|
||||||
|
getGlobalContext: () => object | null | undefined,
|
||||||
|
wrapped: (...args: ArgsType) => Promise<ReturnType>
|
||||||
|
): (cacheKey: string, ...args: ArgsType) => Promise<ReturnType> {
|
||||||
|
const globalPromiseCache = new WeakMap<object, Map<string, Promise<ReturnType>>>();
|
||||||
|
|
||||||
|
return (key: string, ...args: ArgsType) => {
|
||||||
|
const globalContext = getGlobalContext() ?? globalThis;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cache storage that is scoped to the current request when executed in Cloudflare Workers,
|
||||||
|
* to avoid "Cannot perform I/O on behalf of a different request" errors.
|
||||||
|
*/
|
||||||
|
const promiseCache =
|
||||||
|
globalPromiseCache.get(globalContext) ?? new Map<string, Promise<ReturnType>>();
|
||||||
|
globalPromiseCache.set(globalContext, promiseCache);
|
||||||
|
|
||||||
|
const concurrent = promiseCache.get(key);
|
||||||
|
if (concurrent) {
|
||||||
|
return concurrent;
|
||||||
|
}
|
||||||
|
|
||||||
|
const promise = (async () => {
|
||||||
|
try {
|
||||||
|
const result = await wrapped(...args);
|
||||||
|
return result;
|
||||||
|
} finally {
|
||||||
|
promiseCache.delete(key);
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
|
promiseCache.set(key, promise);
|
||||||
|
|
||||||
|
return promise;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrap a function by passing it a cache key that is computed from the function arguments.
|
||||||
|
*/
|
||||||
|
export function withCacheKey<ArgsType extends any[], ReturnType>(
|
||||||
|
wrapped: (cacheKey: string, ...args: ArgsType) => Promise<ReturnType>
|
||||||
|
): (...args: ArgsType) => Promise<ReturnType> {
|
||||||
|
return (...args: ArgsType) => {
|
||||||
|
const cacheKey = getCacheKey(args);
|
||||||
|
return wrapped(cacheKey, ...args);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute a cache key from the function arguments.
|
||||||
|
*/
|
||||||
|
function getCacheKey(args: any[]) {
|
||||||
|
return JSON.stringify(deepSortValue(args));
|
||||||
|
}
|
||||||
|
|
||||||
|
function deepSortValue(value: unknown): unknown {
|
||||||
|
if (
|
||||||
|
typeof value === 'string' ||
|
||||||
|
typeof value === 'number' ||
|
||||||
|
typeof value === 'boolean' ||
|
||||||
|
value === null ||
|
||||||
|
value === undefined
|
||||||
|
) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
return value.map(deepSortValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value && typeof value === 'object') {
|
||||||
|
return Object.entries(value)
|
||||||
|
.map(([key, subValue]) => {
|
||||||
|
return [key, deepSortValue(subValue)] as const;
|
||||||
|
})
|
||||||
|
.sort((a, b) => {
|
||||||
|
return a[0].localeCompare(b[0]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import { describe, expect, it } from 'bun:test';
|
||||||
|
import { getProxyRequestIdentifier, isProxyRequest } from './proxy';
|
||||||
|
|
||||||
|
describe('isProxyRequest', () => {
|
||||||
|
it('should return true for proxy requests', () => {
|
||||||
|
const proxyRequestURL = new URL('https://proxy.gitbook.site/sites/site_foo/hello/world');
|
||||||
|
expect(isProxyRequest(proxyRequestURL)).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return false for non-proxy requests', () => {
|
||||||
|
const nonProxyRequestURL = new URL('https://example.com/docs/foo/hello/world');
|
||||||
|
expect(isProxyRequest(nonProxyRequestURL)).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getProxyRequestIdentifier', () => {
|
||||||
|
it('should return the correct identifier for proxy requests', () => {
|
||||||
|
const proxyRequestURL = new URL('https://proxy.gitbook.site/sites/site_foo/hello/world');
|
||||||
|
expect(getProxyRequestIdentifier(proxyRequestURL)).toBe('sites/site_foo');
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* Check if the request to the site was through a proxy.
|
||||||
|
*/
|
||||||
|
export function isProxyRequest(requestURL: URL): boolean {
|
||||||
|
return (
|
||||||
|
requestURL.host === 'proxy.gitbook.site' || requestURL.host === 'proxy.gitbook-staging.site'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getProxyRequestIdentifier(requestURL: URL): string {
|
||||||
|
// For proxy requests, we extract the site ID from the pathname
|
||||||
|
// e.g. https://proxy.gitbook.site/site/siteId/...
|
||||||
|
const pathname = requestURL.pathname.slice(1).split('/');
|
||||||
|
return pathname.slice(0, 2).join('/');
|
||||||
|
}
|
||||||
@@ -97,6 +97,15 @@ export interface GitBookDataFetcher {
|
|||||||
path: string;
|
path: string;
|
||||||
}): Promise<DataFetcherResponse<api.RevisionPageDocument | api.RevisionPageGroup>>;
|
}): Promise<DataFetcherResponse<api.RevisionPageDocument | api.RevisionPageGroup>>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the markdown content of a page by its path.
|
||||||
|
*/
|
||||||
|
getRevisionPageMarkdown(params: {
|
||||||
|
spaceId: string;
|
||||||
|
revisionId: string;
|
||||||
|
pageId: string;
|
||||||
|
}): Promise<DataFetcherResponse<string>>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a document by its space ID and document ID.
|
* Get a document by its space ID and document ID.
|
||||||
*/
|
*/
|
||||||
@@ -170,4 +179,15 @@ export interface GitBookDataFetcher {
|
|||||||
integrationName: string;
|
integrationName: string;
|
||||||
request: api.RenderIntegrationUI;
|
request: api.RenderIntegrationUI;
|
||||||
}): Promise<DataFetcherResponse<api.ContentKitRenderOutput>>;
|
}): Promise<DataFetcherResponse<api.ContentKitRenderOutput>>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stream an AI response.
|
||||||
|
*/
|
||||||
|
streamAIResponse(params: {
|
||||||
|
organizationId: string;
|
||||||
|
siteId: string;
|
||||||
|
input: api.AIMessageInput[];
|
||||||
|
output: api.AIOutputFormat;
|
||||||
|
model: api.AIModel;
|
||||||
|
}): AsyncGenerator<api.AIStreamResponse, void, unknown>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import { describe, expect, it } from 'bun:test';
|
||||||
|
import { getVisitorAuthBasePath } from './visitor';
|
||||||
|
|
||||||
|
describe('getVisitorAuthBasePath', () => {
|
||||||
|
it('should return the correct base path for proxy requests', () => {
|
||||||
|
expect(
|
||||||
|
getVisitorAuthBasePath(
|
||||||
|
new URL('https://proxy.gitbook.site/sites/site_foo/hello/world'),
|
||||||
|
{
|
||||||
|
site: 'site_foo',
|
||||||
|
siteSpace: 'sitesp_foo',
|
||||||
|
basePath: '/foo',
|
||||||
|
siteBasePath: '/foo',
|
||||||
|
organization: 'org_foo',
|
||||||
|
space: 'space_foo',
|
||||||
|
pathname: '/hello/world',
|
||||||
|
complete: false,
|
||||||
|
apiToken: 'api_token_foo',
|
||||||
|
canonicalUrl: 'https://example.com/docs/foo/hello/world',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
).toBe('/sites/site_foo/');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return the correct base path for non-proxy requests', () => {
|
||||||
|
expect(
|
||||||
|
getVisitorAuthBasePath(new URL('https://example.com/docs/foo/hello/world'), {
|
||||||
|
site: 'site_foo',
|
||||||
|
siteSpace: 'sitesp_foo',
|
||||||
|
basePath: '/foo/',
|
||||||
|
siteBasePath: '/foo/',
|
||||||
|
organization: 'org_foo',
|
||||||
|
space: 'space_foo',
|
||||||
|
pathname: '/hello/world',
|
||||||
|
complete: false,
|
||||||
|
apiToken: 'api_token_foo',
|
||||||
|
canonicalUrl: 'https://example.com/docs/foo/hello/world',
|
||||||
|
})
|
||||||
|
).toBe('/foo/');
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import { withLeadingSlash, withTrailingSlash } from '@/lib/paths';
|
||||||
|
import type { PublishedSiteContent } from '@gitbook/api';
|
||||||
|
import { getProxyRequestIdentifier, isProxyRequest } from './proxy';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the appropriate base path for the visitor authentication cookie.
|
||||||
|
*/
|
||||||
|
export function getVisitorAuthBasePath(
|
||||||
|
siteRequestURL: URL,
|
||||||
|
siteURLData: PublishedSiteContent
|
||||||
|
): string {
|
||||||
|
// The siteRequestURL for proxy requests is of the form `https://proxy.gitbook.com/site/siteId/...`
|
||||||
|
// In such cases, we should not use the resolved siteBasePath for the cookie because for subsequent requests
|
||||||
|
// we will not have the siteBasePath in the request URL in order to retrieve the cookie. So we use the
|
||||||
|
// proxy identifier instead.
|
||||||
|
return isProxyRequest(siteRequestURL)
|
||||||
|
? withLeadingSlash(withTrailingSlash(getProxyRequestIdentifier(siteRequestURL)))
|
||||||
|
: siteURLData.siteBasePath;
|
||||||
|
}
|
||||||
+8
@@ -6,6 +6,14 @@ import 'server-only';
|
|||||||
* and not from the `process.env` object.
|
* and not from the `process.env` object.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runtime environment.
|
||||||
|
*/
|
||||||
|
export const GITBOOK_RUNTIME = (process.env.GITBOOK_RUNTIME ?? 'unknown') as
|
||||||
|
| 'vercel'
|
||||||
|
| 'cloudflare'
|
||||||
|
| 'unknown';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main host on which GitBook is running.
|
* Main host on which GitBook is running.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ export interface CloudflareImageOptions {
|
|||||||
* Create an image resizer for a rendering context.
|
* Create an image resizer for a rendering context.
|
||||||
*/
|
*/
|
||||||
export function createImageResizer({
|
export function createImageResizer({
|
||||||
host,
|
imagesContextId,
|
||||||
linker,
|
linker,
|
||||||
}: {
|
}: {
|
||||||
/** The linker to use to create URLs. */
|
/** The linker to use to create URLs. */
|
||||||
linker: GitBookLinker;
|
linker: GitBookLinker;
|
||||||
/** The host name of the current site. */
|
/** The site identifier to use for verifying the image signature. */
|
||||||
host: string;
|
imagesContextId: string;
|
||||||
}): ImageResizer {
|
}): ImageResizer {
|
||||||
if (!GITBOOK_IMAGE_RESIZE_URL || !GITBOOK_IMAGE_RESIZE_SIGNING_KEY) {
|
if (!GITBOOK_IMAGE_RESIZE_URL || !GITBOOK_IMAGE_RESIZE_SIGNING_KEY) {
|
||||||
return createNoopImageResizer();
|
return createNoopImageResizer();
|
||||||
@@ -58,7 +58,7 @@ export function createImageResizer({
|
|||||||
|
|
||||||
return async (options) => {
|
return async (options) => {
|
||||||
cachedSignature ??= await generateImageSignature({
|
cachedSignature ??= await generateImageSignature({
|
||||||
host,
|
imagesContextId,
|
||||||
url: urlInput,
|
url: urlInput,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { getProxyRequestIdentifier, isProxyRequest } from '../data';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the site identifier to use for image resizing for an incoming request.
|
||||||
|
* This identifier can be obtained before resolving the request URL.
|
||||||
|
*/
|
||||||
|
export function getImageResizingContextId(url: URL): string {
|
||||||
|
if (isProxyRequest(url)) {
|
||||||
|
return getProxyRequestIdentifier(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
return url.host;
|
||||||
|
}
|
||||||
@@ -2,3 +2,4 @@ export * from './types';
|
|||||||
export * from './createImageResizer';
|
export * from './createImageResizer';
|
||||||
export * from './signatures';
|
export * from './signatures';
|
||||||
export * from './utils';
|
export * from './utils';
|
||||||
|
export * from './getImageResizingContextId';
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export const CURRENT_SIGNATURE_VERSION: SignatureVersion = '2';
|
|||||||
|
|
||||||
type SignFnInput = {
|
type SignFnInput = {
|
||||||
url: string;
|
url: string;
|
||||||
host: string;
|
imagesContextId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type SignFn = (input: SignFnInput) => MaybePromise<string>;
|
type SignFn = (input: SignFnInput) => MaybePromise<string>;
|
||||||
@@ -32,6 +32,11 @@ export async function verifyImageSignature(
|
|||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const generator = IMAGE_SIGNATURE_FUNCTIONS[version];
|
const generator = IMAGE_SIGNATURE_FUNCTIONS[version];
|
||||||
const generated = await generator(input);
|
const generated = await generator(input);
|
||||||
|
|
||||||
|
// biome-ignore lint/suspicious/noConsole: we want to log the signature comparison
|
||||||
|
console.log(
|
||||||
|
`comparing image signature for "${input.url}" on identifier "${input.imagesContextId}": "${generated}" (expected) === "${signature}" (actual)`
|
||||||
|
);
|
||||||
return generated === signature;
|
return generated === signature;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,12 +65,14 @@ const generateSignatureV2: SignFn = async (input) => {
|
|||||||
assert(GITBOOK_IMAGE_RESIZE_SIGNING_KEY, 'GITBOOK_IMAGE_RESIZE_SIGNING_KEY is not set');
|
assert(GITBOOK_IMAGE_RESIZE_SIGNING_KEY, 'GITBOOK_IMAGE_RESIZE_SIGNING_KEY is not set');
|
||||||
const all = [
|
const all = [
|
||||||
input.url,
|
input.url,
|
||||||
input.host, // The hostname is used to avoid serving images from other sites on the same domain
|
input.imagesContextId, // The hostname is used to avoid serving images from other sites on the same domain
|
||||||
GITBOOK_IMAGE_RESIZE_SIGNING_KEY,
|
GITBOOK_IMAGE_RESIZE_SIGNING_KEY,
|
||||||
]
|
]
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.join(':');
|
.join(':');
|
||||||
return fnv1a(all, { utf8Buffer: fnv1aUtf8Buffer }).toString(16);
|
|
||||||
|
const signature = fnv1a(all, { utf8Buffer: fnv1aUtf8Buffer }).toString(16);
|
||||||
|
return signature;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reused buffer for FNV-1a hashing in the v1 algorithm
|
// Reused buffer for FNV-1a hashing in the v1 algorithm
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { CustomizationThemeMode, type PublishedSiteContent } from '@gitbook/api';
|
import { CustomizationThemeMode } from '@gitbook/api';
|
||||||
import { headers } from 'next/headers';
|
import { headers } from 'next/headers';
|
||||||
|
import type { SiteURLData } from './context';
|
||||||
|
|
||||||
export enum MiddlewareHeaders {
|
export enum MiddlewareHeaders {
|
||||||
/**
|
/**
|
||||||
@@ -57,7 +58,7 @@ export async function getURLModeFromMiddleware(): Promise<'url' | 'url-host'> {
|
|||||||
* Get the site URL data from the middleware headers.
|
* Get the site URL data from the middleware headers.
|
||||||
* This function should only be called in a server action or a dynamic route.
|
* This function should only be called in a server action or a dynamic route.
|
||||||
*/
|
*/
|
||||||
export async function getSiteURLDataFromMiddleware(): Promise<PublishedSiteContent> {
|
export async function getSiteURLDataFromMiddleware(): Promise<SiteURLData> {
|
||||||
const headersList = await headers();
|
const headersList = await headers();
|
||||||
const siteURLData = headersList.get(MiddlewareHeaders.SiteURLData);
|
const siteURLData = headersList.get(MiddlewareHeaders.SiteURLData);
|
||||||
|
|
||||||
|
|||||||
@@ -17,12 +17,14 @@ import { serveResizedImage } from '@/routes/image';
|
|||||||
import {
|
import {
|
||||||
DataFetcherError,
|
DataFetcherError,
|
||||||
getPublishedContentByURL,
|
getPublishedContentByURL,
|
||||||
|
getVisitorAuthBasePath,
|
||||||
normalizeURL,
|
normalizeURL,
|
||||||
throwIfDataError,
|
throwIfDataError,
|
||||||
} from '@v2/lib/data';
|
} from '@v2/lib/data';
|
||||||
import { isGitBookAssetsHostURL, isGitBookHostURL } from '@v2/lib/env';
|
import { isGitBookAssetsHostURL, isGitBookHostURL } from '@v2/lib/env';
|
||||||
|
import { getImageResizingContextId } from '@v2/lib/images';
|
||||||
import { MiddlewareHeaders } from '@v2/lib/middleware';
|
import { MiddlewareHeaders } from '@v2/lib/middleware';
|
||||||
|
import type { SiteURLData } from './lib/context';
|
||||||
export const config = {
|
export const config = {
|
||||||
matcher: [
|
matcher: [
|
||||||
'/((?!_next/static|_next/image|~gitbook/static|~gitbook/revalidate|~gitbook/monitoring|~scalar/proxy).*)',
|
'/((?!_next/static|_next/image|~gitbook/static|~gitbook/revalidate|~gitbook/monitoring|~scalar/proxy).*)',
|
||||||
@@ -63,7 +65,8 @@ async function serveSiteRoutes(requestURL: URL, request: NextRequest) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { url: siteURL, mode } = match;
|
const { url: siteRequestURL, mode } = match;
|
||||||
|
const imagesContextId = getImageResizingContextId(siteRequestURL);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serve image resizing requests (all requests containing `/~gitbook/image`).
|
* Serve image resizing requests (all requests containing `/~gitbook/image`).
|
||||||
@@ -73,9 +76,9 @@ async function serveSiteRoutes(requestURL: URL, request: NextRequest) {
|
|||||||
* In GitBook v1: image resizing was done at the root of the hostname (docs.company.com/~gitbook/image)
|
* In GitBook v1: image resizing was done at the root of the hostname (docs.company.com/~gitbook/image)
|
||||||
* In GitBook v2: image resizing is done at the content level (docs.company.com/section/variant/~gitbook/image)
|
* In GitBook v2: image resizing is done at the content level (docs.company.com/section/variant/~gitbook/image)
|
||||||
*/
|
*/
|
||||||
if (siteURL.pathname.endsWith('/~gitbook/image')) {
|
if (siteRequestURL.pathname.endsWith('/~gitbook/image')) {
|
||||||
return await serveResizedImage(request, {
|
return await serveResizedImage(request, {
|
||||||
host: siteURL.host,
|
imagesContextId: imagesContextId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,13 +88,13 @@ async function serveSiteRoutes(requestURL: URL, request: NextRequest) {
|
|||||||
// @ts-ignore - request typing
|
// @ts-ignore - request typing
|
||||||
const visitorToken = getVisitorToken({
|
const visitorToken = getVisitorToken({
|
||||||
cookies: request.cookies.getAll(),
|
cookies: request.cookies.getAll(),
|
||||||
url: siteURL,
|
url: siteRequestURL,
|
||||||
});
|
});
|
||||||
|
|
||||||
const withAPIToken = async (apiToken: string | null) => {
|
const withAPIToken = async (apiToken: string | null) => {
|
||||||
const siteURLData = await throwIfDataError(
|
const siteURLData = await throwIfDataError(
|
||||||
getPublishedContentByURL({
|
getPublishedContentByURL({
|
||||||
url: siteURL.toString(),
|
url: siteRequestURL.toString(),
|
||||||
visitorAuthToken: visitorToken?.token ?? null,
|
visitorAuthToken: visitorToken?.token ?? null,
|
||||||
// When the visitor auth token is pulled from the cookie, set redirectOnError when calling getPublishedContentByUrl to allow
|
// When the visitor auth token is pulled from the cookie, set redirectOnError when calling getPublishedContentByUrl to allow
|
||||||
// redirecting when the token is invalid as we could be dealing with stale token stored in the cookie.
|
// redirecting when the token is invalid as we could be dealing with stale token stored in the cookie.
|
||||||
@@ -134,20 +137,32 @@ async function serveSiteRoutes(requestURL: URL, request: NextRequest) {
|
|||||||
return NextResponse.redirect(siteURLData.redirect);
|
return NextResponse.redirect(siteURLData.redirect);
|
||||||
}
|
}
|
||||||
|
|
||||||
cookies.push(...getResponseCookiesForVisitorAuth(siteURLData.siteBasePath, visitorToken));
|
cookies.push(
|
||||||
|
...getResponseCookiesForVisitorAuth(
|
||||||
|
getVisitorAuthBasePath(siteRequestURL, siteURLData),
|
||||||
|
visitorToken
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// We use the host/origin from the canonical URL to ensure the links are
|
||||||
|
// correctly generated when the site is proxied. e.g. https://proxy.gitbook.com/site/siteId/...
|
||||||
|
const siteCanonicalURL = new URL(siteURLData.canonicalUrl);
|
||||||
|
|
||||||
|
let incomingURL = requestURL;
|
||||||
|
// For cases where the site is proxied, we use the canonical URL
|
||||||
|
// as the incoming URL along with all the search params from the request.
|
||||||
|
if (mode !== 'url') {
|
||||||
|
incomingURL = siteCanonicalURL;
|
||||||
|
incomingURL.search = requestURL.search;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// Make sure the URL is clean of any va token after a successful lookup
|
// Make sure the URL is clean of any va token after a successful lookup
|
||||||
// The token is stored in a cookie that is set on the redirect response
|
// The token is stored in a cookie that is set on the redirect response
|
||||||
//
|
//
|
||||||
const incomingURL = mode === 'url' ? requestURL : siteURL;
|
const incomingURLWithoutToken = normalizeVisitorAuthURL(incomingURL);
|
||||||
const requestURLWithoutToken = normalizeVisitorAuthURL(incomingURL);
|
if (incomingURLWithoutToken.toString() !== incomingURL.toString()) {
|
||||||
if (
|
|
||||||
requestURLWithoutToken !== incomingURL &&
|
|
||||||
requestURLWithoutToken.toString() !== incomingURL.toString()
|
|
||||||
) {
|
|
||||||
return writeResponseCookies(
|
return writeResponseCookies(
|
||||||
NextResponse.redirect(requestURLWithoutToken.toString()),
|
NextResponse.redirect(incomingURLWithoutToken.toString()),
|
||||||
cookies
|
cookies
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -160,19 +175,39 @@ async function serveSiteRoutes(requestURL: URL, request: NextRequest) {
|
|||||||
// (customization override, theme, etc)
|
// (customization override, theme, etc)
|
||||||
let routeType: 'dynamic' | 'static' = 'static';
|
let routeType: 'dynamic' | 'static' = 'static';
|
||||||
|
|
||||||
|
// We pick only stable data from the siteURL data to prevent re-rendering of
|
||||||
|
// the root layout when changing pages..
|
||||||
|
const stableSiteURLData: SiteURLData = {
|
||||||
|
site: siteURLData.site,
|
||||||
|
siteSection: siteURLData.siteSection,
|
||||||
|
siteSpace: siteURLData.siteSpace,
|
||||||
|
siteBasePath: siteURLData.siteBasePath,
|
||||||
|
basePath: siteURLData.basePath,
|
||||||
|
space: siteURLData.space,
|
||||||
|
organization: siteURLData.organization,
|
||||||
|
changeRequest: siteURLData.changeRequest,
|
||||||
|
revision: siteURLData.revision,
|
||||||
|
shareKey: siteURLData.shareKey,
|
||||||
|
apiToken: siteURLData.apiToken,
|
||||||
|
imagesContextId: imagesContextId,
|
||||||
|
};
|
||||||
|
|
||||||
const requestHeaders = new Headers(request.headers);
|
const requestHeaders = new Headers(request.headers);
|
||||||
requestHeaders.set(MiddlewareHeaders.RouteType, routeType);
|
requestHeaders.set(MiddlewareHeaders.RouteType, routeType);
|
||||||
requestHeaders.set(MiddlewareHeaders.URLMode, mode);
|
requestHeaders.set(MiddlewareHeaders.URLMode, mode);
|
||||||
requestHeaders.set(MiddlewareHeaders.SiteURL, `${siteURL.origin}${siteURLData.basePath}`);
|
requestHeaders.set(
|
||||||
requestHeaders.set(MiddlewareHeaders.SiteURLData, JSON.stringify(siteURLData));
|
MiddlewareHeaders.SiteURL,
|
||||||
|
`${siteCanonicalURL.origin}${siteURLData.basePath}`
|
||||||
|
);
|
||||||
|
requestHeaders.set(MiddlewareHeaders.SiteURLData, JSON.stringify(stableSiteURLData));
|
||||||
|
|
||||||
// Preview of customization/theme
|
// Preview of customization/theme
|
||||||
const customization = siteURL.searchParams.get('customization');
|
const customization = siteRequestURL.searchParams.get('customization');
|
||||||
if (customization && validateSerializedCustomization(customization)) {
|
if (customization && validateSerializedCustomization(customization)) {
|
||||||
routeType = 'dynamic';
|
routeType = 'dynamic';
|
||||||
requestHeaders.set(MiddlewareHeaders.Customization, customization);
|
requestHeaders.set(MiddlewareHeaders.Customization, customization);
|
||||||
}
|
}
|
||||||
const theme = siteURL.searchParams.get('theme');
|
const theme = siteRequestURL.searchParams.get('theme');
|
||||||
if (theme === CustomizationThemeMode.Dark || theme === CustomizationThemeMode.Light) {
|
if (theme === CustomizationThemeMode.Dark || theme === CustomizationThemeMode.Light) {
|
||||||
routeType = 'dynamic';
|
routeType = 'dynamic';
|
||||||
requestHeaders.set(MiddlewareHeaders.Theme, theme);
|
requestHeaders.set(MiddlewareHeaders.Theme, theme);
|
||||||
@@ -188,7 +223,7 @@ async function serveSiteRoutes(requestURL: URL, request: NextRequest) {
|
|||||||
requestHeaders.set('x-forwarded-host', request.nextUrl.host);
|
requestHeaders.set('x-forwarded-host', request.nextUrl.host);
|
||||||
requestHeaders.set('origin', request.nextUrl.origin);
|
requestHeaders.set('origin', request.nextUrl.origin);
|
||||||
|
|
||||||
const siteURLWithoutProtocol = `${siteURL.host}${siteURLData.basePath}`;
|
const siteURLWithoutProtocol = `${siteCanonicalURL.host}${siteURLData.basePath}`;
|
||||||
const { pathname, routeType: routeTypeFromPathname } = encodePathInSiteContent(
|
const { pathname, routeType: routeTypeFromPathname } = encodePathInSiteContent(
|
||||||
siteURLData.pathname
|
siteURLData.pathname
|
||||||
);
|
);
|
||||||
@@ -199,7 +234,16 @@ async function serveSiteRoutes(requestURL: URL, request: NextRequest) {
|
|||||||
routeType,
|
routeType,
|
||||||
mode,
|
mode,
|
||||||
encodeURIComponent(siteURLWithoutProtocol),
|
encodeURIComponent(siteURLWithoutProtocol),
|
||||||
encodeURIComponent(rison.encode(siteURLData)),
|
encodeURIComponent(
|
||||||
|
rison.encode(
|
||||||
|
// rison can't encode undefined values
|
||||||
|
Object.fromEntries(
|
||||||
|
Object.entries(stableSiteURLData).filter(
|
||||||
|
([_, v]) => typeof v !== 'undefined'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
pathname,
|
pathname,
|
||||||
].join('/');
|
].join('/');
|
||||||
|
|
||||||
@@ -226,10 +270,10 @@ async function serveSiteRoutes(requestURL: URL, request: NextRequest) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// For https://preview/<siteURL> requests,
|
// For https://preview/<siteURL> requests,
|
||||||
if (siteURL.hostname === 'preview') {
|
if (siteRequestURL.hostname === 'preview') {
|
||||||
return serveWithQueryAPIToken(
|
return serveWithQueryAPIToken(
|
||||||
// We scope the API token to the site ID.
|
// We scope the API token to the site ID.
|
||||||
`${siteURL.hostname}/${requestURL.pathname.slice(1).split('/')[0]}`,
|
`${siteRequestURL.hostname}/${requestURL.pathname.slice(1).split('/')[0]}`,
|
||||||
request,
|
request,
|
||||||
withAPIToken
|
withAPIToken
|
||||||
);
|
);
|
||||||
@@ -382,13 +426,26 @@ function encodePathInSiteContent(rawPathname: string): {
|
|||||||
return { pathname };
|
return { pathname };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the pathname is a markdown file, we rewrite it to ~gitbook/markdown/:pathname
|
||||||
|
if (pathname.match(/\.md$/)) {
|
||||||
|
const pagePathWithoutMD = pathname.slice(0, -3);
|
||||||
|
return {
|
||||||
|
pathname: `~gitbook/markdown/${encodeURIComponent(pagePathWithoutMD)}`,
|
||||||
|
// The markdown content is always static and doesn't depend on the dynamic parameter (customization, theme, etc)
|
||||||
|
routeType: 'static',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
switch (pathname) {
|
switch (pathname) {
|
||||||
case '~gitbook/icon':
|
case '~gitbook/icon':
|
||||||
|
return { pathname };
|
||||||
case 'llms.txt':
|
case 'llms.txt':
|
||||||
case 'sitemap.xml':
|
case 'sitemap.xml':
|
||||||
case 'sitemap-pages.xml':
|
case 'sitemap-pages.xml':
|
||||||
case 'robots.txt':
|
case 'robots.txt':
|
||||||
return { pathname };
|
// LLMs.txt, sitemap, sitemap-pages and robots.txt are always static
|
||||||
|
// as they only depend on the site structure / pages.
|
||||||
|
return { pathname, routeType: 'static' };
|
||||||
case '~gitbook/pdf':
|
case '~gitbook/pdf':
|
||||||
// PDF routes are always dynamic as they depend on the search params.
|
// PDF routes are always dynamic as they depend on the search params.
|
||||||
return { pathname, routeType: 'dynamic' };
|
return { pathname, routeType: 'dynamic' };
|
||||||
|
|||||||
@@ -0,0 +1,158 @@
|
|||||||
|
{
|
||||||
|
"main": ".open-next/worker.js",
|
||||||
|
"name": "gitbook-open-v2",
|
||||||
|
"compatibility_date": "2025-03-11",
|
||||||
|
"compatibility_flags": ["nodejs_compat", "allow_importable_env"],
|
||||||
|
"assets": {
|
||||||
|
"directory": ".open-next/assets",
|
||||||
|
"binding": "ASSETS"
|
||||||
|
},
|
||||||
|
"observability": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"preview": {
|
||||||
|
"d1_databases": [
|
||||||
|
{
|
||||||
|
"binding": "NEXT_CACHE_D1",
|
||||||
|
"database_id": "f59ddb40-ad72-4312-9395-0ac6a129af8e",
|
||||||
|
"database_name": "gitbook-open-v2-tags-preview"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"r2_buckets": [
|
||||||
|
{
|
||||||
|
"binding": "NEXT_INC_CACHE_R2_BUCKET",
|
||||||
|
"bucket_name": "gitbook-open-v2-cache-preview"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"binding": "WORKER_SELF_REFERENCE",
|
||||||
|
"service": "gitbook-open-v2-preview"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binding": "GITBOOK_API",
|
||||||
|
"service": "gitbook-x-prod-api-cache"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
// No durable objects on preview, as they block the generation of preview URLs
|
||||||
|
// and we don't need tags invalidation on preview
|
||||||
|
},
|
||||||
|
"staging": {
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"pattern": "open-2c.gitbook-staging.com/*",
|
||||||
|
"zone_name": "gitbook-staging.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "static-2c.gitbook-staging.com/*",
|
||||||
|
"zone_name": "gitbook-staging.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"r2_buckets": [
|
||||||
|
{
|
||||||
|
"binding": "NEXT_INC_CACHE_R2_BUCKET",
|
||||||
|
"bucket_name": "gitbook-open-v2-cache-staging"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"d1_databases": [
|
||||||
|
{
|
||||||
|
"binding": "NEXT_CACHE_D1",
|
||||||
|
"database_id": "9df62e39-1f35-4066-83aa-e9b8ed3ac8d5",
|
||||||
|
"database_name": "gitbook-open-v2-tags-staging"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"binding": "WORKER_SELF_REFERENCE",
|
||||||
|
"service": "gitbook-open-v2-staging"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binding": "GITBOOK_API",
|
||||||
|
"service": "gitbook-x-staging-api-cache"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tail_consumers": [
|
||||||
|
{
|
||||||
|
"service": "gitbook-x-staging-tail"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"durable_objects": {
|
||||||
|
"bindings": [
|
||||||
|
{
|
||||||
|
"name": "NEXT_CACHE_DO_QUEUE",
|
||||||
|
"class_name": "DOQueueHandler"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NEXT_TAG_CACHE_DO_SHARDED",
|
||||||
|
"class_name": "DOShardedTagCache"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"migrations": [
|
||||||
|
{
|
||||||
|
"tag": "v1",
|
||||||
|
"new_sqlite_classes": ["DOQueueHandler", "DOShardedTagCache"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"production": {
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"pattern": "open-2c.gitbook.com/*",
|
||||||
|
"zone_name": "gitbook.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "static-2c.gitbook.com/*",
|
||||||
|
"zone_name": "gitbook.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"r2_buckets": [
|
||||||
|
{
|
||||||
|
"binding": "NEXT_INC_CACHE_R2_BUCKET",
|
||||||
|
"bucket_name": "gitbook-open-v2-cache-production"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"d1_databases": [
|
||||||
|
{
|
||||||
|
"binding": "NEXT_CACHE_D1",
|
||||||
|
"database_id": "a6f16fce-5f45-43a9-89a4-7b83ddf25b77",
|
||||||
|
"database_name": "gitbook-open-v2-tags-production"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"binding": "WORKER_SELF_REFERENCE",
|
||||||
|
"service": "gitbook-open-v2-production"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binding": "GITBOOK_API",
|
||||||
|
"service": "gitbook-x-prod-api-cache"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tail_consumers": [
|
||||||
|
{
|
||||||
|
"service": "gitbook-x-prod-tail"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"durable_objects": {
|
||||||
|
"bindings": [
|
||||||
|
{
|
||||||
|
"name": "NEXT_CACHE_DO_QUEUE",
|
||||||
|
"class_name": "DOQueueHandler"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NEXT_TAG_CACHE_DO_SHARDED",
|
||||||
|
"class_name": "DOShardedTagCache"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"migrations": [
|
||||||
|
{
|
||||||
|
"tag": "v1",
|
||||||
|
"new_sqlite_classes": ["DOQueueHandler", "DOShardedTagCache"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
main = ".open-next/worker.js"
|
|
||||||
name = "gitbook-open-v2"
|
|
||||||
compatibility_date = "2025-03-11"
|
|
||||||
compatibility_flags = ["nodejs_compat", "allow_importable_env"]
|
|
||||||
assets = { directory = ".open-next/assets", binding = "ASSETS" }
|
|
||||||
observability = { enabled = true }
|
|
||||||
|
|
||||||
[env.preview]
|
|
||||||
kv_namespaces = [
|
|
||||||
{ binding = "NEXT_CACHE_WORKERS_KV", id = "b7dd9cf58bf2458f84812a2d83b3760c" } # gitbook-open-v2-cache-preview
|
|
||||||
]
|
|
||||||
d1_databases = [
|
|
||||||
{ binding = "NEXT_CACHE_D1", database_id = "f59ddb40-ad72-4312-9395-0ac6a129af8e", database_name = "gitbook-open-v2-tags-preview" }
|
|
||||||
]
|
|
||||||
services = [
|
|
||||||
{ binding = "NEXT_CACHE_REVALIDATION_WORKER", service = "gitbook-open-v2-preview" },
|
|
||||||
{ binding = "GITBOOK_API", service = "gitbook-x-prod-api-cache" }
|
|
||||||
]
|
|
||||||
|
|
||||||
[env.staging]
|
|
||||||
routes = [
|
|
||||||
{ pattern = "open-2c.gitbook-staging.com/*", zone_name = "gitbook-staging.com" },
|
|
||||||
{ pattern = "static-2c.gitbook-staging.com/*", zone_name = "gitbook-staging.com" }
|
|
||||||
]
|
|
||||||
kv_namespaces = [
|
|
||||||
{ binding = "NEXT_CACHE_WORKERS_KV", id = "a446e25f12b741afb185f1e5b4474f0a" } # gitbook-open-v2-cache-staging
|
|
||||||
]
|
|
||||||
d1_databases = [
|
|
||||||
{ binding = "NEXT_CACHE_D1", database_id = "9df62e39-1f35-4066-83aa-e9b8ed3ac8d5", database_name = "gitbook-open-v2-tags-staging" }
|
|
||||||
]
|
|
||||||
services = [
|
|
||||||
{ binding = "NEXT_CACHE_REVALIDATION_WORKER", service = "gitbook-open-v2-staging" },
|
|
||||||
{ binding = "GITBOOK_API", service = "gitbook-x-staging-api-cache" }
|
|
||||||
]
|
|
||||||
|
|
||||||
[env.production]
|
|
||||||
routes = [
|
|
||||||
{ pattern = "open-2c.gitbook.com/*", zone_name = "gitbook.com" },
|
|
||||||
{ pattern = "static-2c.gitbook.com/*", zone_name = "gitbook.com" }
|
|
||||||
]
|
|
||||||
kv_namespaces = [
|
|
||||||
{ binding = "NEXT_CACHE_WORKERS_KV", id = "72379746280d4e79acf24440eea950dc" } # gitbook-open-v2-cache-production
|
|
||||||
]
|
|
||||||
d1_databases = [
|
|
||||||
{ binding = "NEXT_CACHE_D1", database_id = "a6f16fce-5f45-43a9-89a4-7b83ddf25b77", database_name = "gitbook-open-v2-tags-production" }
|
|
||||||
]
|
|
||||||
services = [
|
|
||||||
{ binding = "NEXT_CACHE_REVALIDATION_WORKER", service = "gitbook-open-v2-production" },
|
|
||||||
{ binding = "GITBOOK_API", service = "gitbook-x-prod-api-cache" }
|
|
||||||
]
|
|
||||||
@@ -1,5 +1,102 @@
|
|||||||
# gitbook
|
# gitbook
|
||||||
|
|
||||||
|
## 0.10.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- b62b101: Do not set cookie to identify visitor for insights when disabled.
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 95ea22d: Cache AI Page Link summary
|
||||||
|
- daf41fc: Tweak footer design (and refactor)
|
||||||
|
- de53946: Fix security issue with injection of "javacript:` url in the back button of PDFs
|
||||||
|
- b92ecfa: Implement retry logic for the DO cache to prevent when revalidating content.
|
||||||
|
- 528eee3: Add superscript and subscript text rendering
|
||||||
|
- aa3357a: Fix OpenAPISchemas description padding
|
||||||
|
- 168a4fa: Add support for buttons to GitBook.
|
||||||
|
- 70c4182: Improve OpenAPI schema style
|
||||||
|
- 2b6c593: Remove stable from x-stability
|
||||||
|
- 580f7ad: Improve the error message returned by the revalidate endpoint.
|
||||||
|
- cbd768a: Improve OpenAPI codesample (add OpenAPISelect component)
|
||||||
|
- c765463: Fix ogimage generation crashing when site is using a custom WOFF2 font
|
||||||
|
- e59076a: Improve OpenAPI schemas block ungrouped style. Classnames have changed, please refer to this PR to update GBX.
|
||||||
|
- 29aaba5: Override Scalar's overscroll-behavior
|
||||||
|
- 90ead98: Better error handling in cache revalidation.
|
||||||
|
- Updated dependencies [116575c]
|
||||||
|
- Updated dependencies [cdffd7c]
|
||||||
|
- Updated dependencies [70c4182]
|
||||||
|
- Updated dependencies [2b6c593]
|
||||||
|
- Updated dependencies [cbd768a]
|
||||||
|
- Updated dependencies [e59076a]
|
||||||
|
- Updated dependencies [eedefdd]
|
||||||
|
- Updated dependencies [23cedd2]
|
||||||
|
- @gitbook/cache-tags@0.3.0
|
||||||
|
- @gitbook/colors@0.3.2
|
||||||
|
- @gitbook/react-openapi@1.1.10
|
||||||
|
- @gitbook/openapi-parser@2.1.3
|
||||||
|
|
||||||
|
## 0.9.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- da7b369: Fix missing headers in OpenAPIResponses
|
||||||
|
- 139a805: Fix OpenAPI enum display
|
||||||
|
- Updated dependencies [da7b369]
|
||||||
|
- Updated dependencies [da485f5]
|
||||||
|
- Updated dependencies [139a805]
|
||||||
|
- @gitbook/react-openapi@1.1.9
|
||||||
|
|
||||||
|
## 0.9.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- fb90eb0: Limit tinted background on bold theme to sites with filled sidebar
|
||||||
|
- 7d0b422: Handle grouped OpenAPISchemas
|
||||||
|
- Updated dependencies [7d0b422]
|
||||||
|
- Updated dependencies [fb90eb0]
|
||||||
|
- @gitbook/react-openapi@1.1.8
|
||||||
|
- @gitbook/colors@0.3.1
|
||||||
|
|
||||||
|
## 0.9.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 77fd393: Track event when visitor is opening a search result.
|
||||||
|
- d70d566: Support site announcement banner
|
||||||
|
- 77fd393: Track event when clicking announcement banner link.
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- e84a46a: Fix OpenAPI tabs indicator overflow
|
||||||
|
- bc90adb: Fix favicon not being displayed in Google because `robots.txt` was preventing the indexation of the image route
|
||||||
|
- 434af90: Fix image resizing when using the proxy feature in a site.
|
||||||
|
- c756761: Add breadcrumbs to search results
|
||||||
|
- 40e8e69: Disallow crawling by web-robots of search/ask URLs
|
||||||
|
- 77fd393: Fix clicking search results when the site is embedded in an iframe.
|
||||||
|
- 1505ddb: Fix multiple request examples selector not showing
|
||||||
|
- 61db166: Add OpenAPI write-only indicator
|
||||||
|
- 6f71da8: Fix padding in schemas
|
||||||
|
- fa91eb7: Fix PDF generation when user has dark mode configured.
|
||||||
|
- 5b1e01c: Support for x-stability property
|
||||||
|
- 57ca4e0: Fix a crash when a page contains a block of an integration that is no longer installed
|
||||||
|
- d236bf0: Fix flash when loading sites with dark mode as default theme
|
||||||
|
- cd99ed5: Fix spec properties rendering and missing keys
|
||||||
|
- 813b2af: Support for x-enumDescriptions and x-gitbook-enum
|
||||||
|
- e9fa50d: Trim the search query to avoid showing a loading state when typing
|
||||||
|
- Updated dependencies [bd35348]
|
||||||
|
- Updated dependencies [ae78fc5]
|
||||||
|
- Updated dependencies [7bb37c7]
|
||||||
|
- Updated dependencies [373183a]
|
||||||
|
- Updated dependencies [1505ddb]
|
||||||
|
- Updated dependencies [61db166]
|
||||||
|
- Updated dependencies [5b1e01c]
|
||||||
|
- Updated dependencies [cd99ed5]
|
||||||
|
- Updated dependencies [813b2af]
|
||||||
|
- Updated dependencies [a25fded]
|
||||||
|
- @gitbook/react-openapi@1.1.7
|
||||||
|
- @gitbook/openapi-parser@2.1.2
|
||||||
|
|
||||||
## 0.8.2
|
## 0.8.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -92,11 +92,6 @@ const testCases: TestsCase[] = [
|
|||||||
contentBaseURL: 'https://book.character.ai',
|
contentBaseURL: 'https://book.character.ai',
|
||||||
tests: [{ name: 'Home', url: '/', run: waitForCookiesDialog }],
|
tests: [{ name: 'Home', url: '/', run: waitForCookiesDialog }],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'docs.tradeonnova.io',
|
|
||||||
contentBaseURL: 'https://docs.tradeonnova.io',
|
|
||||||
tests: [{ name: 'Home', url: '/' }],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'azcoiner.gitbook.io',
|
name: 'azcoiner.gitbook.io',
|
||||||
contentBaseURL: 'https://azcoiner.gitbook.io',
|
contentBaseURL: 'https://azcoiner.gitbook.io',
|
||||||
@@ -244,6 +239,15 @@ const testCases: TestsCase[] = [
|
|||||||
contentBaseURL: 'https://docs.fluentbit.io',
|
contentBaseURL: 'https://docs.fluentbit.io',
|
||||||
tests: [{ name: 'Home', url: '/', run: waitForCookiesDialog }],
|
tests: [{ name: 'Home', url: '/', run: waitForCookiesDialog }],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'run-ai-docs.nvidia.com',
|
||||||
|
contentBaseURL: 'https://run-ai-docs.nvidia.com',
|
||||||
|
skip: process.env.ARGOS_BUILD_NAME !== 'customers-v2',
|
||||||
|
tests: [
|
||||||
|
{ name: 'Home', url: '/' },
|
||||||
|
{ name: 'OG Image', url: '/~gitbook/ogimage/h17zQIFwy3MaafVNmItO', mode: 'image' },
|
||||||
|
],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
runTestCases(testCases);
|
runTestCases(testCases);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import {
|
|||||||
headerLinks,
|
headerLinks,
|
||||||
runTestCases,
|
runTestCases,
|
||||||
waitForCookiesDialog,
|
waitForCookiesDialog,
|
||||||
|
waitForNotFound,
|
||||||
} from './util';
|
} from './util';
|
||||||
|
|
||||||
const testCases: TestsCase[] = [
|
const testCases: TestsCase[] = [
|
||||||
@@ -308,6 +309,18 @@ const testCases: TestsCase[] = [
|
|||||||
url: '~/revisions/S55pwsEr5UVoroaOiWnP/blocks/headings',
|
url: '~/revisions/S55pwsEr5UVoroaOiWnP/blocks/headings',
|
||||||
run: waitForCookiesDialog,
|
run: waitForCookiesDialog,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Invalid revision',
|
||||||
|
url: '~/revisions/idnotfound/blocks/headings',
|
||||||
|
run: waitForNotFound,
|
||||||
|
screenshot: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Invalid change request',
|
||||||
|
url: '~/changes/idnotfound/blocks/headings',
|
||||||
|
run: waitForNotFound,
|
||||||
|
screenshot: false,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -390,6 +403,59 @@ const testCases: TestsCase[] = [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Markdown page',
|
||||||
|
skip: process.env.ARGOS_BUILD_NAME !== 'v2-vercel',
|
||||||
|
contentBaseURL: 'https://gitbook.gitbook.io/test-gitbook-open/',
|
||||||
|
tests: [
|
||||||
|
{
|
||||||
|
name: 'Text page',
|
||||||
|
url: 'text-page.md',
|
||||||
|
screenshot: false,
|
||||||
|
run: async (_page, response) => {
|
||||||
|
expect(response?.status()).toBe(200);
|
||||||
|
expect(response?.headers()['content-type']).toContain('text/markdown');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Site subdirectory (proxy)',
|
||||||
|
skip: process.env.ARGOS_BUILD_NAME !== 'v2-vercel',
|
||||||
|
contentBaseURL: 'https://nextjs-gbo-proxy.vercel.app/documentation/',
|
||||||
|
tests: [
|
||||||
|
{
|
||||||
|
name: 'Main',
|
||||||
|
url: '',
|
||||||
|
fullPage: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Site subdirectory (proxy) with VA',
|
||||||
|
skip: process.env.ARGOS_BUILD_NAME !== 'v2-vercel',
|
||||||
|
contentBaseURL: 'https://nextjs-gbo-proxy-va.vercel.app/va/docs/',
|
||||||
|
tests: [
|
||||||
|
{
|
||||||
|
name: 'Main',
|
||||||
|
url: () => {
|
||||||
|
const privateKey =
|
||||||
|
'rqSfA6x7eAKx1qDRCDq9aCXwivpUvQ8YkXeDdFvCCUa9QchIcM7pF1iJ4o7AGOU49spmOWjKoIPtX0pVUVQ81w==';
|
||||||
|
const token = jwt.sign(
|
||||||
|
{
|
||||||
|
name: 'gitbook-open-tests',
|
||||||
|
},
|
||||||
|
privateKey,
|
||||||
|
{
|
||||||
|
expiresIn: '24h',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return `?jwt_token=${token}`;
|
||||||
|
},
|
||||||
|
fullPage: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Content tests',
|
name: 'Content tests',
|
||||||
contentBaseURL: 'https://gitbook.gitbook.io/test-gitbook-open/',
|
contentBaseURL: 'https://gitbook.gitbook.io/test-gitbook-open/',
|
||||||
@@ -808,6 +874,20 @@ const testCases: TestsCase[] = [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Content Redirects',
|
||||||
|
contentBaseURL: 'https://gitbook-open-e2e-sites.gitbook.io/gitbook-doc/',
|
||||||
|
tests: [
|
||||||
|
{
|
||||||
|
name: 'Redirect to new location',
|
||||||
|
url: '/content-editor/editing-content/inline/redirect-test',
|
||||||
|
run: async (page) => {
|
||||||
|
await expect(page.locator('h1')).toHaveText('Redirect test');
|
||||||
|
},
|
||||||
|
screenshot: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Site Redirects with sections',
|
name: 'Site Redirects with sections',
|
||||||
contentBaseURL: 'https://gitbook-open-e2e-sites.gitbook.io/sections/',
|
contentBaseURL: 'https://gitbook-open-e2e-sites.gitbook.io/sections/',
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
type CustomizationThemedColor,
|
type CustomizationThemedColor,
|
||||||
type SiteCustomizationSettings,
|
type SiteCustomizationSettings,
|
||||||
} from '@gitbook/api';
|
} from '@gitbook/api';
|
||||||
import { type BrowserContext, type Page, expect, test } from '@playwright/test';
|
import { type BrowserContext, type Page, type Response, expect, test } from '@playwright/test';
|
||||||
import deepMerge from 'deepmerge';
|
import deepMerge from 'deepmerge';
|
||||||
import rison from 'rison';
|
import rison from 'rison';
|
||||||
import type { DeepPartial } from 'ts-essentials';
|
import type { DeepPartial } from 'ts-essentials';
|
||||||
@@ -33,7 +33,11 @@ export interface Test {
|
|||||||
/**
|
/**
|
||||||
* Test to run
|
* Test to run
|
||||||
*/
|
*/
|
||||||
run?: (page: Page) => Promise<unknown>;
|
run?: (page: Page, response: Response | null) => Promise<unknown>;
|
||||||
|
/**
|
||||||
|
* Mode for the test.
|
||||||
|
*/
|
||||||
|
mode?: 'page' | 'image';
|
||||||
/**
|
/**
|
||||||
* Whether the test should be fullscreened during testing.
|
* Whether the test should be fullscreened during testing.
|
||||||
*/
|
*/
|
||||||
@@ -138,6 +142,11 @@ export async function waitForCookiesDialog(page: Page) {
|
|||||||
await expect(dialog).toBeVisible();
|
await expect(dialog).toBeVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function waitForNotFound(_page: Page, response: Response | null) {
|
||||||
|
expect(response).not.toBeNull();
|
||||||
|
expect(response?.status()).toBe(404);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform test cases into Playwright tests and run it.
|
* Transform test cases into Playwright tests and run it.
|
||||||
*/
|
*/
|
||||||
@@ -149,6 +158,7 @@ export function runTestCases(testCases: TestsCase[]) {
|
|||||||
|
|
||||||
test.describe(testCase.name, () => {
|
test.describe(testCase.name, () => {
|
||||||
for (const testEntry of testCase.tests) {
|
for (const testEntry of testCase.tests) {
|
||||||
|
const { mode = 'page' } = testEntry;
|
||||||
const testFn = testEntry.only ? test.only : test;
|
const testFn = testEntry.only ? test.only : test;
|
||||||
testFn(testEntry.name, async ({ page, context }) => {
|
testFn(testEntry.name, async ({ page, context }) => {
|
||||||
const testEntryPathname =
|
const testEntryPathname =
|
||||||
@@ -183,30 +193,39 @@ export function runTestCases(testCases: TestsCase[]) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await page.goto(url);
|
const response = await page.goto(url);
|
||||||
if (testEntry.run) {
|
if (testEntry.run) {
|
||||||
await testEntry.run(page);
|
await testEntry.run(page, response);
|
||||||
}
|
}
|
||||||
const screenshotOptions = testEntry.screenshot;
|
const screenshotOptions = testEntry.screenshot;
|
||||||
if (screenshotOptions !== false) {
|
if (screenshotOptions !== false) {
|
||||||
await argosScreenshot(page, `${testCase.name} - ${testEntry.name}`, {
|
const screenshotName = `${testCase.name} - ${testEntry.name}`;
|
||||||
viewports: ['macbook-16', 'macbook-13', 'ipad-2', 'iphone-x'],
|
if (mode === 'image') {
|
||||||
argosCSS: `
|
await argosScreenshot(page, screenshotName, {
|
||||||
|
viewports: ['macbook-13'],
|
||||||
|
threshold: screenshotOptions?.threshold ?? undefined,
|
||||||
|
fullPage: true,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
await argosScreenshot(page, screenshotName, {
|
||||||
|
viewports: ['macbook-16', 'macbook-13', 'ipad-2', 'iphone-x'],
|
||||||
|
argosCSS: `
|
||||||
/* Hide Intercom */
|
/* Hide Intercom */
|
||||||
.intercom-lightweight-app {
|
.intercom-lightweight-app {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
threshold: screenshotOptions?.threshold ?? undefined,
|
threshold: screenshotOptions?.threshold ?? undefined,
|
||||||
fullPage: testEntry.fullPage ?? false,
|
fullPage: testEntry.fullPage ?? false,
|
||||||
beforeScreenshot: async ({ runStabilization }) => {
|
beforeScreenshot: async ({ runStabilization }) => {
|
||||||
await runStabilization();
|
await runStabilization();
|
||||||
await waitForIcons(page);
|
await waitForIcons(page);
|
||||||
if (screenshotOptions?.waitForTOCScrolling !== false) {
|
if (screenshotOptions?.waitForTOCScrolling !== false) {
|
||||||
await waitForTOCScrolling(page);
|
await waitForTOCScrolling(page);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -271,6 +290,9 @@ export function getCustomizationURL(partial: DeepPartial<SiteCustomizationSettin
|
|||||||
internationalization: {
|
internationalization: {
|
||||||
locale: CustomizationLocale.En,
|
locale: CustomizationLocale.En,
|
||||||
},
|
},
|
||||||
|
insights: {
|
||||||
|
trackingCookie: true,
|
||||||
|
},
|
||||||
favicon: {},
|
favicon: {},
|
||||||
header: {
|
header: {
|
||||||
preset: CustomizationHeaderPreset.Default,
|
preset: CustomizationHeaderPreset.Default,
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ module.exports = {
|
|||||||
GITBOOK_ICONS_URL: process.env.GITBOOK_ICONS_URL,
|
GITBOOK_ICONS_URL: process.env.GITBOOK_ICONS_URL,
|
||||||
GITBOOK_ICONS_TOKEN: process.env.GITBOOK_ICONS_TOKEN,
|
GITBOOK_ICONS_TOKEN: process.env.GITBOOK_ICONS_TOKEN,
|
||||||
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY,
|
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY,
|
||||||
|
GITBOOK_RUNTIME: process.env.GITBOOK_RUNTIME,
|
||||||
},
|
},
|
||||||
|
|
||||||
webpack(config) {
|
webpack(config) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gitbook",
|
"name": "gitbook",
|
||||||
"version": "0.8.2",
|
"version": "0.10.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",
|
||||||
@@ -29,12 +29,11 @@
|
|||||||
"@radix-ui/react-checkbox": "^1.0.4",
|
"@radix-ui/react-checkbox": "^1.0.4",
|
||||||
"@radix-ui/react-navigation-menu": "^1.2.3",
|
"@radix-ui/react-navigation-menu": "^1.2.3",
|
||||||
"@radix-ui/react-popover": "^1.0.7",
|
"@radix-ui/react-popover": "^1.0.7",
|
||||||
|
"@radix-ui/react-tooltip": "^1.1.8",
|
||||||
"@sindresorhus/fnv1a": "^3.1.0",
|
"@sindresorhus/fnv1a": "^3.1.0",
|
||||||
"@tailwindcss/container-queries": "^0.1.1",
|
"@tailwindcss/container-queries": "^0.1.1",
|
||||||
"@tailwindcss/typography": "^0.5.16",
|
"@tailwindcss/typography": "^0.5.16",
|
||||||
"@upstash/redis": "^1.27.1",
|
"ai": "^4.2.2",
|
||||||
"ai": "^4.1.46",
|
|
||||||
"ajv": "^8.12.0",
|
|
||||||
"assert-never": "^1.2.1",
|
"assert-never": "^1.2.1",
|
||||||
"bun-types": "^1.1.20",
|
"bun-types": "^1.1.20",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
@@ -45,8 +44,8 @@
|
|||||||
"katex": "^0.16.9",
|
"katex": "^0.16.9",
|
||||||
"mathjax": "^3.2.2",
|
"mathjax": "^3.2.2",
|
||||||
"mdast-util-to-markdown": "^2.1.2",
|
"mdast-util-to-markdown": "^2.1.2",
|
||||||
"memoizee": "^0.4.15",
|
"memoizee": "^0.4.17",
|
||||||
"next": "14.2.25",
|
"next": "14.2.26",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"nuqs": "^2.2.3",
|
"nuqs": "^2.2.3",
|
||||||
"object-hash": "^3.0.0",
|
"object-hash": "^3.0.0",
|
||||||
@@ -68,7 +67,12 @@
|
|||||||
"tailwind-shades": "^1.1.2",
|
"tailwind-shades": "^1.1.2",
|
||||||
"unified": "^11.0.5",
|
"unified": "^11.0.5",
|
||||||
"url-join": "^5.0.0",
|
"url-join": "^5.0.0",
|
||||||
"usehooks-ts": "^3.1.0"
|
"usehooks-ts": "^3.1.0",
|
||||||
|
"zod": "^3.24.2",
|
||||||
|
"zod-to-json-schema": "^3.24.5",
|
||||||
|
"event-iterator": "^2.0.0",
|
||||||
|
"partial-json": "^0.1.7",
|
||||||
|
"zustand": "^5.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@argos-ci/playwright": "^4.3.0",
|
"@argos-ci/playwright": "^4.3.0",
|
||||||
|
|||||||
@@ -14,7 +14,15 @@ interface JsonBody {
|
|||||||
* The body should be a JSON with { tags: string[] }
|
* The body should be a JSON with { tags: string[] }
|
||||||
*/
|
*/
|
||||||
export async function POST(req: NextRequest) {
|
export async function POST(req: NextRequest) {
|
||||||
const json = (await req.json()) as JsonBody;
|
let json: JsonBody;
|
||||||
|
|
||||||
|
try {
|
||||||
|
json = await req.json();
|
||||||
|
} catch (err) {
|
||||||
|
return NextResponse.json({
|
||||||
|
error: `invalid json body: ${err}`,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!json.tags || !Array.isArray(json.tags)) {
|
if (!json.tags || !Array.isArray(json.tags)) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
@@ -25,10 +33,18 @@ export async function POST(req: NextRequest) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await revalidateTags(json.tags);
|
try {
|
||||||
|
const result = await revalidateTags(json.tags);
|
||||||
return NextResponse.json({
|
return NextResponse.json({
|
||||||
success: true,
|
success: true,
|
||||||
stats: result.stats,
|
stats: result.stats,
|
||||||
});
|
});
|
||||||
|
} catch (err: unknown) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{
|
||||||
|
error: `${err}`,
|
||||||
|
},
|
||||||
|
{ status: 500 }
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ import { useScrollPage } from '@/components/hooks';
|
|||||||
export function PageClientLayout(props: { withSections?: boolean }) {
|
export function PageClientLayout(props: { withSections?: boolean }) {
|
||||||
// We use this hook in the page layout to ensure the elements for the blocks
|
// We use this hook in the page layout to ensure the elements for the blocks
|
||||||
// are rendered before we scroll to a hash or to the top of the page
|
// are rendered before we scroll to a hash or to the top of the page
|
||||||
useScrollPage({ scrollMarginTop: props.withSections ? 50 : undefined });
|
useScrollPage({ scrollMarginTop: props.withSections ? 48 : undefined });
|
||||||
|
|
||||||
useStripFallbackQueryParam();
|
useStripFallbackQueryParam();
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { Button } from '@/components/primitives/Button';
|
import { Button } from '@/components/primitives/Button';
|
||||||
import { t, useLanguage } from '@/intl/client';
|
import { t, tString, useLanguage } from '@/intl/client';
|
||||||
import { tcls } from '@/lib/tailwind';
|
import { tcls } from '@/lib/tailwind';
|
||||||
|
|
||||||
export default function ErrorPage(props: {
|
export default function ErrorPage(props: {
|
||||||
@@ -35,9 +35,8 @@ export default function ErrorPage(props: {
|
|||||||
}}
|
}}
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
label={tString(language, 'unexpected_error_retry')}
|
||||||
{t(language, 'unexpected_error_retry')}
|
/>
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,190 @@
|
|||||||
|
'use client';
|
||||||
|
import { useLanguage } from '@/intl/client';
|
||||||
|
import { t } from '@/intl/translate';
|
||||||
|
import { Icon } from '@gitbook/icons';
|
||||||
|
import { useEffect } from 'react';
|
||||||
|
import { create } from 'zustand';
|
||||||
|
import { useShallow } from 'zustand/react/shallow';
|
||||||
|
import { useVisitedPages } from '../Insights';
|
||||||
|
import { usePageContext } from '../PageContext';
|
||||||
|
import { Loading } from '../primitives';
|
||||||
|
import { streamLinkPageSummary } from './server-actions/streamLinkPageSummary';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a unique cache key for a page summary
|
||||||
|
*/
|
||||||
|
function getCacheKey(targetSpaceId: string, targetPageId: string): string {
|
||||||
|
return `${targetSpaceId}:${targetPageId}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global state for the summaries.
|
||||||
|
*/
|
||||||
|
const useSummaries = create<{
|
||||||
|
/**
|
||||||
|
* Cache of all summaries generated so far.
|
||||||
|
*/
|
||||||
|
cache: Map<string, string>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a summary for a page.
|
||||||
|
*/
|
||||||
|
getSummary: (params: { targetSpaceId: string; targetPageId: string }) => string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stream the generation of a summary for a page.
|
||||||
|
*/
|
||||||
|
streamSummary: (params: {
|
||||||
|
currentSpaceId: string;
|
||||||
|
currentPageId: string;
|
||||||
|
currentPageTitle: string;
|
||||||
|
targetSpaceId: string;
|
||||||
|
targetPageId: string;
|
||||||
|
linkPreview?: string;
|
||||||
|
linkTitle?: string;
|
||||||
|
visitedPages: { spaceId: string; pageId: string }[];
|
||||||
|
}) => Promise<void>;
|
||||||
|
}>((set, get) => ({
|
||||||
|
cache: new Map(),
|
||||||
|
|
||||||
|
getSummary: ({
|
||||||
|
targetSpaceId,
|
||||||
|
targetPageId,
|
||||||
|
}: {
|
||||||
|
targetSpaceId: string;
|
||||||
|
targetPageId: string;
|
||||||
|
}) => {
|
||||||
|
return get().cache.get(getCacheKey(targetSpaceId, targetPageId)) ?? '';
|
||||||
|
},
|
||||||
|
|
||||||
|
streamSummary: async ({
|
||||||
|
currentSpaceId,
|
||||||
|
currentPageId,
|
||||||
|
currentPageTitle,
|
||||||
|
targetSpaceId,
|
||||||
|
targetPageId,
|
||||||
|
linkPreview,
|
||||||
|
linkTitle,
|
||||||
|
visitedPages,
|
||||||
|
}) => {
|
||||||
|
const cacheKey = getCacheKey(targetSpaceId, targetPageId);
|
||||||
|
|
||||||
|
if (get().cache.has(cacheKey)) {
|
||||||
|
// Already generated or generating
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const update = (summary: string) => {
|
||||||
|
set((prev) => {
|
||||||
|
const newCache = new Map(prev.cache);
|
||||||
|
newCache.set(cacheKey, summary);
|
||||||
|
return { cache: newCache };
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
update('');
|
||||||
|
const stream = await streamLinkPageSummary({
|
||||||
|
currentSpaceId,
|
||||||
|
currentPageId,
|
||||||
|
currentPageTitle,
|
||||||
|
targetSpaceId,
|
||||||
|
targetPageId,
|
||||||
|
linkPreview,
|
||||||
|
linkTitle,
|
||||||
|
visitedPages,
|
||||||
|
});
|
||||||
|
|
||||||
|
let generatedSummary = '';
|
||||||
|
for await (const highlight of stream) {
|
||||||
|
generatedSummary = highlight ?? '';
|
||||||
|
update(generatedSummary);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Summarise a page's content for use in a link preview
|
||||||
|
*/
|
||||||
|
export function AIPageLinkSummary(props: {
|
||||||
|
targetSpaceId: string;
|
||||||
|
targetPageId: string;
|
||||||
|
linkPreview?: string;
|
||||||
|
linkTitle?: string;
|
||||||
|
showTrademark: boolean;
|
||||||
|
}) {
|
||||||
|
const { targetSpaceId, targetPageId, linkPreview, linkTitle, showTrademark = true } = props;
|
||||||
|
|
||||||
|
const currentPage = usePageContext();
|
||||||
|
const language = useLanguage();
|
||||||
|
const visitedPages = useVisitedPages((state) => state.pages);
|
||||||
|
const { summary, streamSummary } = useSummaries(
|
||||||
|
useShallow((state) => {
|
||||||
|
return {
|
||||||
|
summary: state.getSummary({ targetSpaceId, targetPageId }),
|
||||||
|
streamSummary: state.streamSummary,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
streamSummary({
|
||||||
|
currentSpaceId: currentPage.spaceId,
|
||||||
|
currentPageId: currentPage.pageId,
|
||||||
|
currentPageTitle: currentPage.title,
|
||||||
|
targetSpaceId,
|
||||||
|
targetPageId,
|
||||||
|
linkPreview,
|
||||||
|
linkTitle,
|
||||||
|
visitedPages,
|
||||||
|
});
|
||||||
|
}, [
|
||||||
|
currentPage.pageId,
|
||||||
|
currentPage.spaceId,
|
||||||
|
currentPage.title,
|
||||||
|
targetSpaceId,
|
||||||
|
targetPageId,
|
||||||
|
linkPreview,
|
||||||
|
linkTitle,
|
||||||
|
visitedPages,
|
||||||
|
streamSummary,
|
||||||
|
]);
|
||||||
|
|
||||||
|
const shimmerBlocks = [
|
||||||
|
'w-[20%] [animation-delay:-1s]',
|
||||||
|
'w-[35%] [animation-delay:-0.8s]',
|
||||||
|
'w-[25%] [animation-delay:-0.6s]',
|
||||||
|
'w-[10%] [animation-delay:-0.4s]',
|
||||||
|
'w-[40%] [animation-delay:-0.2s]',
|
||||||
|
'w-[30%] [animation-delay:0s]',
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="flex flex-col gap-1">
|
||||||
|
<div className="flex w-screen items-center gap-1 font-semibold text-tint text-xs uppercase leading-tight tracking-wide">
|
||||||
|
{showTrademark ? (
|
||||||
|
<Loading className="size-4" busy={!summary || summary.length === 0} />
|
||||||
|
) : (
|
||||||
|
<Icon icon="sparkle" className="size-3" />
|
||||||
|
)}
|
||||||
|
<h6 className="text-tint">{t(language, 'link_tooltip_ai_summary')}</h6>
|
||||||
|
</div>
|
||||||
|
{summary.length > 0 ? (
|
||||||
|
<p className="animate-fadeIn">{summary}</p>
|
||||||
|
) : (
|
||||||
|
<div className="mt-2 flex flex-wrap gap-2">
|
||||||
|
{shimmerBlocks.map((block, index) => (
|
||||||
|
<div
|
||||||
|
key={`${index}-${block}`}
|
||||||
|
className={`${block} h-4 animate-pulse rounded straight-corners:rounded-none bg-tint-active`}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{summary.length > 0 ? (
|
||||||
|
<div className="animate-fadeIn text-tint-subtle text-xs">
|
||||||
|
{t(language, 'link_tooltip_ai_summary_description')}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from './AIPageLinkSummary';
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
'use server';
|
||||||
|
import { type AIMessageInput, AIModel, type AIStreamResponse } from '@gitbook/api';
|
||||||
|
import type { GitBookBaseContext } from '@v2/lib/context';
|
||||||
|
import { EventIterator } from 'event-iterator';
|
||||||
|
import type { MaybePromise } from 'p-map';
|
||||||
|
import * as partialJson from 'partial-json';
|
||||||
|
import type { DeepPartial } from 'ts-essentials';
|
||||||
|
import type { z } from 'zod';
|
||||||
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the latest value from a stream and the response id.
|
||||||
|
*/
|
||||||
|
export async function generate<T>(
|
||||||
|
promise: MaybePromise<{
|
||||||
|
stream: EventIterator<T>;
|
||||||
|
response: Promise<{ responseId: string }>;
|
||||||
|
}>
|
||||||
|
) {
|
||||||
|
const input = await promise;
|
||||||
|
let value: T | undefined;
|
||||||
|
|
||||||
|
for await (const event of input.stream) {
|
||||||
|
value = event;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { responseId } = await input.response;
|
||||||
|
return {
|
||||||
|
responseId,
|
||||||
|
value,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stream the generation of an object using the AI.
|
||||||
|
*/
|
||||||
|
export async function streamGenerateObject<T>(
|
||||||
|
context: GitBookBaseContext,
|
||||||
|
{
|
||||||
|
organizationId,
|
||||||
|
siteId,
|
||||||
|
}: {
|
||||||
|
organizationId: string;
|
||||||
|
siteId: string;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
schema,
|
||||||
|
messages,
|
||||||
|
model = AIModel.Fast,
|
||||||
|
}: {
|
||||||
|
schema: z.ZodSchema<T>;
|
||||||
|
messages: AIMessageInput[];
|
||||||
|
model?: AIModel;
|
||||||
|
previousResponseId?: string;
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
const rawStream = context.dataFetcher.streamAIResponse({
|
||||||
|
organizationId,
|
||||||
|
siteId,
|
||||||
|
input: messages,
|
||||||
|
output: {
|
||||||
|
type: 'object',
|
||||||
|
schema: zodToJsonSchema(schema),
|
||||||
|
},
|
||||||
|
model,
|
||||||
|
});
|
||||||
|
|
||||||
|
let json = '';
|
||||||
|
return parseResponse<DeepPartial<T>>(rawStream, (event) => {
|
||||||
|
if (event.type === 'response_object') {
|
||||||
|
json += event.jsonChunk;
|
||||||
|
|
||||||
|
const parsed = partialJson.parse(json, partialJson.ALL);
|
||||||
|
return parsed;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse a stream from the API to extract the responseId.
|
||||||
|
*/
|
||||||
|
function parseResponse<T>(
|
||||||
|
responseStream: EventIterator<AIStreamResponse>,
|
||||||
|
parse: (response: AIStreamResponse) => T | undefined
|
||||||
|
): {
|
||||||
|
stream: EventIterator<T>;
|
||||||
|
response: Promise<{ responseId: string }>;
|
||||||
|
} {
|
||||||
|
let resolveResponse: (value: { responseId: string }) => void;
|
||||||
|
const response = new Promise<{ responseId: string }>((resolve) => {
|
||||||
|
resolveResponse = resolve;
|
||||||
|
});
|
||||||
|
|
||||||
|
const stream = new EventIterator<T>((queue) => {
|
||||||
|
(async () => {
|
||||||
|
let foundResponse = false;
|
||||||
|
|
||||||
|
for await (const event of responseStream) {
|
||||||
|
if (event.type === 'response_finish') {
|
||||||
|
foundResponse = true;
|
||||||
|
resolveResponse({ responseId: event.responseId });
|
||||||
|
} else {
|
||||||
|
const parsed = parse(event);
|
||||||
|
if (parsed !== undefined) {
|
||||||
|
queue.push(parsed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!foundResponse) {
|
||||||
|
throw new Error('No response found');
|
||||||
|
}
|
||||||
|
})().then(
|
||||||
|
() => {
|
||||||
|
queue.stop();
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
queue.fail(error);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
return { stream, response };
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from './streamLinkPageSummary';
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
'use server';
|
||||||
|
import { filterOutNullable } from '@/lib/typescript';
|
||||||
|
import { getV1BaseContext } from '@/lib/v1';
|
||||||
|
import { isV2 } from '@/lib/v2';
|
||||||
|
import { AIMessageRole } from '@gitbook/api';
|
||||||
|
import { getSiteURLDataFromMiddleware } from '@v2/lib/middleware';
|
||||||
|
import { getServerActionBaseContext } from '@v2/lib/server-actions';
|
||||||
|
import { z } from 'zod';
|
||||||
|
import { streamGenerateObject } from './api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a summary of a page, in the context of another page
|
||||||
|
*/
|
||||||
|
export async function* streamLinkPageSummary({
|
||||||
|
currentSpaceId,
|
||||||
|
currentPageId,
|
||||||
|
targetSpaceId,
|
||||||
|
targetPageId,
|
||||||
|
linkPreview,
|
||||||
|
linkTitle,
|
||||||
|
visitedPages,
|
||||||
|
}: {
|
||||||
|
currentSpaceId: string;
|
||||||
|
currentPageId: string;
|
||||||
|
currentPageTitle: string;
|
||||||
|
targetSpaceId: string;
|
||||||
|
targetPageId: string;
|
||||||
|
linkPreview?: string;
|
||||||
|
linkTitle?: string;
|
||||||
|
visitedPages?: Array<{ spaceId: string; pageId: string }>;
|
||||||
|
}) {
|
||||||
|
const baseContext = isV2() ? await getServerActionBaseContext() : await getV1BaseContext();
|
||||||
|
const siteURLData = await getSiteURLDataFromMiddleware();
|
||||||
|
|
||||||
|
const { stream } = await streamGenerateObject(
|
||||||
|
baseContext,
|
||||||
|
{
|
||||||
|
organizationId: siteURLData.organization,
|
||||||
|
siteId: siteURLData.site,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
schema: z.object({
|
||||||
|
highlight: z
|
||||||
|
.string()
|
||||||
|
.describe('The reason why the user should read the target page.'),
|
||||||
|
// questions: z.array(z.string().describe('The questions to sea')).max(3),
|
||||||
|
}),
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
role: AIMessageRole.Developer,
|
||||||
|
content: `# 1. Role
|
||||||
|
You are a contextual fact extractor. Your job is to find the exact fact from the linked page that directly answers the implied question in the current paragraph.
|
||||||
|
|
||||||
|
# 2. Task
|
||||||
|
Extract a contextually-relevant fact that:
|
||||||
|
- Directly answers the specific need or question implied by the link's placement
|
||||||
|
- States a capability, limitation, or specification from the target page
|
||||||
|
- Connects precisely to the user's current paragraph or sentence
|
||||||
|
- Completes the user's understanding based on what they're currently reading
|
||||||
|
|
||||||
|
# 3. Instructions
|
||||||
|
1. First, identify the exact need, question, or gap in the current paragraph where the link appears
|
||||||
|
2. Find the specific fact in the target page that addresses this exact contextual need
|
||||||
|
3. Ensure the fact relates directly to the context of the paragraph containing the link
|
||||||
|
4. Avoid ALL instructional language including words like "use", "click", "select", "create"
|
||||||
|
5. Keep it under 30 words, factual and declarative about what EXISTS or IS TRUE`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: AIMessageRole.Developer,
|
||||||
|
content: `# 4. Current page
|
||||||
|
The content of the current page is:`,
|
||||||
|
attachments: [
|
||||||
|
{
|
||||||
|
type: 'page' as const,
|
||||||
|
spaceId: currentSpaceId,
|
||||||
|
pageId: currentPageId,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
...(visitedPages
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
role: AIMessageRole.Developer,
|
||||||
|
content: '# 5. Previous pages',
|
||||||
|
},
|
||||||
|
...visitedPages.map(({ spaceId, pageId }) => ({
|
||||||
|
role: AIMessageRole.Developer,
|
||||||
|
content: `## Page ${pageId}`,
|
||||||
|
attachments: [
|
||||||
|
{
|
||||||
|
type: 'page' as const,
|
||||||
|
spaceId,
|
||||||
|
pageId,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})),
|
||||||
|
]
|
||||||
|
: []),
|
||||||
|
{
|
||||||
|
role: AIMessageRole.Developer,
|
||||||
|
content: `# 6. Target page
|
||||||
|
The content of the target page is:`,
|
||||||
|
attachments: [
|
||||||
|
{
|
||||||
|
type: 'page' as const,
|
||||||
|
spaceId: targetSpaceId,
|
||||||
|
pageId: targetPageId,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: AIMessageRole.Developer,
|
||||||
|
content: `# 7. Link preview
|
||||||
|
The content of the link preview is:
|
||||||
|
> ${linkPreview}
|
||||||
|
> Page ID: ${targetPageId}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: AIMessageRole.Developer,
|
||||||
|
content: `# 8. Guidelines & Examples
|
||||||
|
ALWAYS:
|
||||||
|
- ALWAYS choose facts that directly fulfill the contextual need where the link appears
|
||||||
|
- ALWAYS connect target page information specifically to the current paragraph context
|
||||||
|
- ALWAYS focus on the gap in knowledge that the link is meant to fill
|
||||||
|
- ALWAYS consider user's navigation history to ensure contextual continuity
|
||||||
|
- ALWAYS use action verbs like "click", "select", "use", "create", "enable"
|
||||||
|
|
||||||
|
NEVER:
|
||||||
|
- NEVER include ANY unspecifc language like "learn", "how to", "discover", etc. State the fact directly.
|
||||||
|
- NEVER select general facts unrelated to the specific link context
|
||||||
|
- NEVER ignore the specific context where the link appears
|
||||||
|
- NEVER repeat the same fact in different words
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
Current paragraph: "When organizing content, headings are limited to 3 levels. For more advanced editing, you can use (multiple select)[/multiple-select] to move multiple blocks at once."
|
||||||
|
Preview: "Multiple Select: Select multiple content blocks at once."
|
||||||
|
✓ "Shift selects content between two points, useful for reorganizing your current heading structure."
|
||||||
|
✗ "Shift and Ctrl/Cmd keys are the modifiers for selecting multiple blocks."
|
||||||
|
|
||||||
|
Current paragraph: "Most changes can be published directly, but for major revisions, if you want others to review changes before publishing, create a (change request)[/change-requests]."
|
||||||
|
Preview: "Change Requests: Collaborative content editing workflow."
|
||||||
|
✓ "Each reviewer's approval is tracked separately, with specific change highlighting for your major revisions."
|
||||||
|
✗ "Each reviewer receives an email notification and can approve or request changes."
|
||||||
|
|
||||||
|
Current paragraph: "Your team mentioned issues with conflicting edits. Need to collaborate in real-time? You can use (live edit mode)[/live-edit]."
|
||||||
|
Preview: "Live Edit: Real-time collaborative editing."
|
||||||
|
✓ "Teams with GitHub repositories (like yours) cannot use this feature due to sync limitations."
|
||||||
|
✗ "Incompatible with GitHub/GitLab sync and requires specific visibility settings."`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: AIMessageRole.User,
|
||||||
|
content: `I'm considering reading the link titled "${linkTitle}" pointing to page ${targetPageId}. Why should I read it? Relate it to the paragraph I'm currently reading.`,
|
||||||
|
},
|
||||||
|
].filter(filterOutNullable),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
for await (const value of stream) {
|
||||||
|
const highlight = value.highlight;
|
||||||
|
if (!highlight) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
yield highlight;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
import { resolveContentRef } from '@/lib/references';
|
||||||
|
import type { GitBookSiteContext } from '@v2/lib/context';
|
||||||
|
import { AnnouncementBanner } from './AnnouncementBanner';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Server-side component to resolve content refs and pass down to client-side component
|
||||||
|
*/
|
||||||
|
export async function Announcement(props: {
|
||||||
|
context: GitBookSiteContext;
|
||||||
|
}) {
|
||||||
|
const { context } = props;
|
||||||
|
const { customization } = context;
|
||||||
|
|
||||||
|
if (
|
||||||
|
!customization.announcement ||
|
||||||
|
!customization.announcement.enabled ||
|
||||||
|
!customization.announcement.message
|
||||||
|
) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const resolvedContentRef = customization.announcement?.link
|
||||||
|
? await resolveContentRef(customization.announcement?.link?.to, context)
|
||||||
|
: null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<AnnouncementBanner
|
||||||
|
announcement={customization.announcement}
|
||||||
|
contentRef={resolvedContentRef}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import * as storage from '@/lib/local-storage';
|
||||||
|
import type { ResolvedContentRef } from '@/lib/references';
|
||||||
|
import { tcls } from '@/lib/tailwind';
|
||||||
|
import { type CustomizationAnnouncement, SiteInsightsLinkPosition } from '@gitbook/api';
|
||||||
|
import { Icon, type IconName } from '@gitbook/icons';
|
||||||
|
import { CONTAINER_STYLE } from '../layout';
|
||||||
|
import { Link, linkStyles } from '../primitives';
|
||||||
|
import { ANNOUNCEMENT_CSS_CLASS, ANNOUNCEMENT_STORAGE_KEY } from './constants';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Client-side component to enable closing the banner
|
||||||
|
*/
|
||||||
|
export function AnnouncementBanner(props: {
|
||||||
|
announcement: CustomizationAnnouncement;
|
||||||
|
contentRef: ResolvedContentRef | null;
|
||||||
|
}) {
|
||||||
|
const { announcement, contentRef } = props;
|
||||||
|
|
||||||
|
const hasLink = announcement.link && contentRef?.href;
|
||||||
|
const closeable = announcement.style !== 'danger';
|
||||||
|
|
||||||
|
const Tag = hasLink ? Link : 'div';
|
||||||
|
const style = BANNER_STYLES[announcement.style];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="announcement-banner theme-bold:bg-header-background pt-4 pb-2">
|
||||||
|
<div className="scroll-nojump">
|
||||||
|
<div className={tcls('relative', CONTAINER_STYLE)}>
|
||||||
|
<Tag
|
||||||
|
href={contentRef?.href ?? ''}
|
||||||
|
className={tcls(
|
||||||
|
'flex w-full items-start justify-center overflow-hidden rounded-md straight-corners:rounded-none px-4 py-3 text-neutral-strong text-sm theme-bold:ring-1 theme-gradient:ring-1 ring-inset transition-colors',
|
||||||
|
style.container,
|
||||||
|
closeable && 'pr-12',
|
||||||
|
hasLink && style.hover
|
||||||
|
)}
|
||||||
|
insights={
|
||||||
|
announcement.link
|
||||||
|
? {
|
||||||
|
type: 'link_click',
|
||||||
|
link: {
|
||||||
|
target: announcement.link.to,
|
||||||
|
position: SiteInsightsLinkPosition.Announcement,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Icon
|
||||||
|
icon={style.icon as IconName}
|
||||||
|
className={`mt-0.5 mr-3 size-4 shrink-0 ${style.iconColor}`}
|
||||||
|
/>
|
||||||
|
<div>
|
||||||
|
{announcement.message}
|
||||||
|
{hasLink ? (
|
||||||
|
<div className={tcls(linkStyles, style.link, 'ml-1 inline')}>
|
||||||
|
{contentRef?.icon ? (
|
||||||
|
<span className="mr-1 ml-2 *:inline">
|
||||||
|
{contentRef?.icon}
|
||||||
|
</span>
|
||||||
|
) : null}
|
||||||
|
{announcement.link?.title && (
|
||||||
|
<span className="mr-1">{announcement.link?.title}</span>
|
||||||
|
)}
|
||||||
|
<Icon
|
||||||
|
icon={
|
||||||
|
announcement.link?.to.kind === 'url'
|
||||||
|
? 'arrow-up-right'
|
||||||
|
: 'chevron-right'
|
||||||
|
}
|
||||||
|
className={tcls('mb-0.5 inline size-3')}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
</Tag>
|
||||||
|
{closeable ? (
|
||||||
|
<button
|
||||||
|
className={`absolute top-0 right-4 mt-2 mr-2 rounded straight-corners:rounded-none p-1.5 transition-all hover:ring-1 sm:right-6 md:right-8 ${style.close}`}
|
||||||
|
type="button"
|
||||||
|
onClick={dismissAnnouncement}
|
||||||
|
>
|
||||||
|
<Icon icon="close" className="size-4" />
|
||||||
|
</button>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dismiss the announcement banner and store the dismissal state in local storage.
|
||||||
|
* @see AnnouncementScript
|
||||||
|
*/
|
||||||
|
function dismissAnnouncement() {
|
||||||
|
storage.setItem(ANNOUNCEMENT_STORAGE_KEY, {
|
||||||
|
visible: false,
|
||||||
|
at: Date.now(),
|
||||||
|
});
|
||||||
|
|
||||||
|
document.documentElement.classList.add(ANNOUNCEMENT_CSS_CLASS);
|
||||||
|
}
|
||||||
|
|
||||||
|
const BANNER_STYLES = {
|
||||||
|
info: {
|
||||||
|
container: 'bg-info ring-info-subtle',
|
||||||
|
hover: 'hover:bg-info-hover active:bg-info-active',
|
||||||
|
icon: 'circle-info',
|
||||||
|
iconColor: 'text-info-subtle',
|
||||||
|
close: 'hover:bg-tint-base hover:ring-info-subtle',
|
||||||
|
link: '',
|
||||||
|
},
|
||||||
|
warning: {
|
||||||
|
container: 'bg-warning decoration-warning/6 ring-warning-subtle',
|
||||||
|
hover: 'hover:bg-warning-hover',
|
||||||
|
icon: 'circle-exclamation',
|
||||||
|
iconColor: 'text-warning-subtle',
|
||||||
|
close: 'hover:bg-tint-base hover:ring-warning-subtle',
|
||||||
|
link: 'links-default:text-warning links-default:hover:text-warning-strong links-default:decoration-warning/6 links-accent:decoration-warning',
|
||||||
|
},
|
||||||
|
danger: {
|
||||||
|
container: 'bg-danger decoration-danger/6 ring-danger-subtle',
|
||||||
|
hover: 'hover:bg-danger-hover',
|
||||||
|
icon: 'triangle-exclamation',
|
||||||
|
iconColor: 'text-danger-subtle',
|
||||||
|
close: 'hover:bg-tint-base hover:ring-danger-subtle',
|
||||||
|
link: 'links-default:text-danger links-default:hover:text-danger-strong links-default:decoration-danger/6 links-accent:decoration-danger',
|
||||||
|
},
|
||||||
|
success: {
|
||||||
|
container: 'bg-success decoration-success/6 ring-success-subtle',
|
||||||
|
hover: 'hover:bg-success-hover',
|
||||||
|
icon: 'circle-check',
|
||||||
|
iconColor: 'text-success-subtle',
|
||||||
|
close: 'hover:bg-tint-base hover:ring-success-subtle',
|
||||||
|
link: 'links-default:text-success links-default:hover:text-success-strong links-default:decoration-success/6 links-accent:decoration-success',
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
|
import {
|
||||||
|
ANNOUNCEMENT_CSS_CLASS,
|
||||||
|
ANNOUNCEMENT_DAYS_TILL_RESET,
|
||||||
|
ANNOUNCEMENT_STORAGE_KEY,
|
||||||
|
} from './constants';
|
||||||
|
import { checkStorageForDismissedScript } from './script';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inject a script to read the local storage state for the announcement banner and apply the appropriate CSS class to the <html> element as early as possible.
|
||||||
|
* Bypasses react state to prevent flickering.
|
||||||
|
*/
|
||||||
|
export function AnnouncementDismissedScript() {
|
||||||
|
const scriptArgs = JSON.stringify([
|
||||||
|
ANNOUNCEMENT_STORAGE_KEY,
|
||||||
|
ANNOUNCEMENT_DAYS_TILL_RESET,
|
||||||
|
ANNOUNCEMENT_CSS_CLASS,
|
||||||
|
]).slice(1, -1);
|
||||||
|
|
||||||
|
// makes sure the banner dismissed state is kept when navigating between sites
|
||||||
|
React.useEffect(() => {
|
||||||
|
checkStorageForDismissedScript(
|
||||||
|
ANNOUNCEMENT_STORAGE_KEY,
|
||||||
|
ANNOUNCEMENT_DAYS_TILL_RESET,
|
||||||
|
ANNOUNCEMENT_CSS_CLASS
|
||||||
|
);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<script
|
||||||
|
suppressHydrationWarning
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: `(${checkStorageForDismissedScript.toString()})(${scriptArgs})`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* The local storage key for the announcement banner.
|
||||||
|
*/
|
||||||
|
export const ANNOUNCEMENT_STORAGE_KEY = '@gitbook/announcement';
|
||||||
|
/**
|
||||||
|
* The CSS class to hide the announcement banner. Applies to the <html> element.
|
||||||
|
*/
|
||||||
|
export const ANNOUNCEMENT_CSS_CLASS = 'announcement-hidden';
|
||||||
|
/**
|
||||||
|
* The number of days until the announcement banner resets.
|
||||||
|
*/
|
||||||
|
export const ANNOUNCEMENT_DAYS_TILL_RESET = 7;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export * from './Announcement';
|
||||||
|
export * from './AnnouncementDismissedScript';
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* Read the local storage state for the announcement banner and apply the appropriate CSS class to the <html> element.
|
||||||
|
*
|
||||||
|
* NOTE: this script is stringified and run in the browser, so it must be self-contained and have syntax supported in all browsers.
|
||||||
|
*/
|
||||||
|
export function checkStorageForDismissedScript(
|
||||||
|
storageKey: string,
|
||||||
|
daysTillReset: number,
|
||||||
|
cssClass: string
|
||||||
|
) {
|
||||||
|
let showBanner = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const announcementStateStr = window.localStorage.getItem(storageKey);
|
||||||
|
const announcementState = announcementStateStr
|
||||||
|
? JSON.parse(announcementStateStr)
|
||||||
|
: undefined;
|
||||||
|
|
||||||
|
if (announcementState && !announcementState.visible) {
|
||||||
|
const dismissedAt = announcementState.at;
|
||||||
|
const nowTime = new Date().getTime();
|
||||||
|
|
||||||
|
// Check if enough days have passed since dismissal
|
||||||
|
const daysSinceDismissal = Math.floor((nowTime - dismissedAt) / (1000 * 60 * 60 * 24));
|
||||||
|
if (daysSinceDismissal < daysTillReset) {
|
||||||
|
showBanner = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch {}
|
||||||
|
|
||||||
|
if (!showBanner) {
|
||||||
|
document.documentElement.classList.add(cssClass);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -97,9 +97,8 @@ export function CookiesToast(props: { privacyPolicy?: string }) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
onUpdateState(true);
|
onUpdateState(true);
|
||||||
}}
|
}}
|
||||||
>
|
label={tString(language, 'cookies_accept')}
|
||||||
{t(language, 'cookies_accept')}
|
/>
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -107,9 +106,8 @@ export function CookiesToast(props: { privacyPolicy?: string }) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
onUpdateState(false);
|
onUpdateState(false);
|
||||||
}}
|
}}
|
||||||
>
|
label={tString(language, 'cookies_reject')}
|
||||||
{t(language, 'cookies_reject')}
|
/>
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export function UnwrappedBlocks<TBlock extends DocumentBlock>(props: UnwrappedBl
|
|||||||
const { nodes, blockStyle, isOffscreen: defaultIsOffscreen = false, ...contextProps } = props;
|
const { nodes, blockStyle, isOffscreen: defaultIsOffscreen = false, ...contextProps } = props;
|
||||||
|
|
||||||
let isOffscreen = defaultIsOffscreen;
|
let isOffscreen = defaultIsOffscreen;
|
||||||
return nodes.map((node) => {
|
return nodes.map((node, index) => {
|
||||||
isOffscreen =
|
isOffscreen =
|
||||||
isOffscreen ||
|
isOffscreen ||
|
||||||
isBlockOffscreen({
|
isBlockOffscreen({
|
||||||
@@ -65,7 +65,7 @@ export function UnwrappedBlocks<TBlock extends DocumentBlock>(props: UnwrappedBl
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Block
|
<Block
|
||||||
key={node.key}
|
key={node.key || `${node.type}-${index}`}
|
||||||
block={node}
|
block={node}
|
||||||
style={[
|
style={[
|
||||||
'mx-auto w-full decoration-primary/6',
|
'mx-auto w-full decoration-primary/6',
|
||||||
|
|||||||
@@ -20,7 +20,15 @@ export function Heading(props: BlockProps<DocumentBlockHeading>) {
|
|||||||
return (
|
return (
|
||||||
<Tag
|
<Tag
|
||||||
id={id}
|
id={id}
|
||||||
className={tcls(textStyle.textSize, 'heading', 'group', 'relative', 'grid', style)}
|
className={tcls(
|
||||||
|
textStyle.textSize,
|
||||||
|
'heading',
|
||||||
|
'group',
|
||||||
|
'relative',
|
||||||
|
'grid',
|
||||||
|
'scroll-m-12',
|
||||||
|
style
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className={tcls(
|
className={tcls(
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ const HINT_STYLES: {
|
|||||||
'[&_.can-override-text]:text-neutral-strong',
|
'[&_.can-override-text]:text-neutral-strong',
|
||||||
],
|
],
|
||||||
container:
|
container:
|
||||||
'bg-info border-info theme-muted-tint:bg-info-solid/2 theme-bold-tint:bg-info-solid/2',
|
'bg-info border-info theme-muted-tint:bg-info-solid/2 [html.sidebar-filled.theme-bold.tint_&]:bg-info-solid/2',
|
||||||
containerWithHeader: 'border-info-solid bg-info-subtle',
|
containerWithHeader: 'border-info-solid bg-info-subtle',
|
||||||
},
|
},
|
||||||
warning: {
|
warning: {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type {
|
import type {
|
||||||
DocumentInline,
|
DocumentInline,
|
||||||
DocumentInlineAnnotation,
|
DocumentInlineAnnotation,
|
||||||
|
DocumentInlineButton,
|
||||||
DocumentInlineEmoji,
|
DocumentInlineEmoji,
|
||||||
DocumentInlineImage,
|
DocumentInlineImage,
|
||||||
DocumentInlineLink,
|
DocumentInlineLink,
|
||||||
@@ -13,6 +14,7 @@ import assertNever from 'assert-never';
|
|||||||
import { Annotation } from './Annotation/Annotation';
|
import { Annotation } from './Annotation/Annotation';
|
||||||
import type { DocumentContextProps } from './DocumentView';
|
import type { DocumentContextProps } from './DocumentView';
|
||||||
import { Emoji } from './Emoji';
|
import { Emoji } from './Emoji';
|
||||||
|
import { InlineButton } from './InlineButton';
|
||||||
import { InlineImage } from './InlineImage';
|
import { InlineImage } from './InlineImage';
|
||||||
import { InlineLink } from './InlineLink';
|
import { InlineLink } from './InlineLink';
|
||||||
import { InlineMath } from './Math';
|
import { InlineMath } from './Math';
|
||||||
@@ -44,7 +46,8 @@ export function Inline<
|
|||||||
| DocumentInlineEmoji
|
| DocumentInlineEmoji
|
||||||
| DocumentInlineLink
|
| DocumentInlineLink
|
||||||
| DocumentInlineMath
|
| DocumentInlineMath
|
||||||
| DocumentInlineMention,
|
| DocumentInlineMention
|
||||||
|
| DocumentInlineButton,
|
||||||
>(props: InlineProps<T>) {
|
>(props: InlineProps<T>) {
|
||||||
const { inline, ...contextProps } = props;
|
const { inline, ...contextProps } = props;
|
||||||
|
|
||||||
@@ -61,6 +64,8 @@ export function Inline<
|
|||||||
return <Mention {...contextProps} inline={inline} />;
|
return <Mention {...contextProps} inline={inline} />;
|
||||||
case 'inline-image':
|
case 'inline-image':
|
||||||
return <InlineImage {...contextProps} inline={inline} />;
|
return <InlineImage {...contextProps} inline={inline} />;
|
||||||
|
case 'button':
|
||||||
|
return <InlineButton {...contextProps} inline={inline} />;
|
||||||
default:
|
default:
|
||||||
assertNever(inline);
|
assertNever(inline);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import { resolveContentRef } from '@/lib/references';
|
||||||
|
import * as api from '@gitbook/api';
|
||||||
|
import { Button } from '../primitives';
|
||||||
|
import type { InlineProps } from './Inline';
|
||||||
|
|
||||||
|
export async function InlineButton(props: InlineProps<api.DocumentInlineButton>) {
|
||||||
|
const { inline, context } = props;
|
||||||
|
|
||||||
|
if (!context.contentContext) {
|
||||||
|
throw new Error('InlineButton requires a contentContext');
|
||||||
|
}
|
||||||
|
|
||||||
|
const resolved = await resolveContentRef(inline.data.ref, context.contentContext);
|
||||||
|
|
||||||
|
if (!resolved) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
href={resolved.href}
|
||||||
|
label={inline.data.label}
|
||||||
|
// TODO: use a variant specifically for user-defined buttons.
|
||||||
|
variant={inline.data.kind}
|
||||||
|
insights={{
|
||||||
|
type: 'link_click',
|
||||||
|
link: {
|
||||||
|
target: inline.data.ref,
|
||||||
|
position: api.SiteInsightsLinkPosition.Content,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,19 +1,22 @@
|
|||||||
import { type DocumentInlineLink, SiteInsightsLinkPosition } from '@gitbook/api';
|
import { type DocumentInlineLink, SiteInsightsLinkPosition } from '@gitbook/api';
|
||||||
|
|
||||||
import { resolveContentRef } from '@/lib/references';
|
import { resolveContentRef } from '@/lib/references';
|
||||||
|
import { Icon } from '@gitbook/icons';
|
||||||
import { StyledLink } from '../primitives';
|
import { StyledLink } from '../primitives';
|
||||||
import type { InlineProps } from './Inline';
|
import type { InlineProps } from './Inline';
|
||||||
|
import { InlineLinkTooltip } from './InlineLinkTooltip';
|
||||||
import { Inlines } from './Inlines';
|
import { Inlines } from './Inlines';
|
||||||
|
|
||||||
export async function InlineLink(props: InlineProps<DocumentInlineLink>) {
|
export async function InlineLink(props: InlineProps<DocumentInlineLink>) {
|
||||||
const { inline, document, context, ancestorInlines } = props;
|
const { inline, document, context, ancestorInlines } = props;
|
||||||
|
|
||||||
const resolved = context.contentContext
|
const resolved = context.contentContext
|
||||||
? await resolveContentRef(inline.data.ref, context.contentContext)
|
? await resolveContentRef(inline.data.ref, context.contentContext, {
|
||||||
|
resolveAnchorText: true,
|
||||||
|
})
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
if (!resolved) {
|
if (!context.contentContext || !resolved) {
|
||||||
return (
|
return (
|
||||||
<span title="Broken link" className="underline">
|
<span title="Broken link" className="underline">
|
||||||
<Inlines
|
<Inlines
|
||||||
@@ -25,24 +28,33 @@ export async function InlineLink(props: InlineProps<DocumentInlineLink>) {
|
|||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
const isExternal = inline.data.ref.kind === 'url';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledLink
|
<InlineLinkTooltip inline={inline} context={context.contentContext} resolved={resolved}>
|
||||||
href={resolved.href}
|
<StyledLink
|
||||||
insights={{
|
href={resolved.href}
|
||||||
type: 'link_click',
|
insights={{
|
||||||
link: {
|
type: 'link_click',
|
||||||
target: inline.data.ref,
|
link: {
|
||||||
position: SiteInsightsLinkPosition.Content,
|
target: inline.data.ref,
|
||||||
},
|
position: SiteInsightsLinkPosition.Content,
|
||||||
}}
|
},
|
||||||
>
|
}}
|
||||||
<Inlines
|
>
|
||||||
context={context}
|
<Inlines
|
||||||
document={document}
|
context={context}
|
||||||
nodes={inline.nodes}
|
document={document}
|
||||||
ancestorInlines={[...ancestorInlines, inline]}
|
nodes={inline.nodes}
|
||||||
/>
|
ancestorInlines={[...ancestorInlines, inline]}
|
||||||
</StyledLink>
|
/>
|
||||||
|
{isExternal ? (
|
||||||
|
<Icon
|
||||||
|
icon="arrow-up-right"
|
||||||
|
className="ml-0.5 inline size-3 links-accent:text-tint-subtle"
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
</StyledLink>
|
||||||
|
</InlineLinkTooltip>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,159 @@
|
|||||||
|
import type { DocumentInlineLink } from '@gitbook/api';
|
||||||
|
|
||||||
|
import type { ResolvedContentRef } from '@/lib/references';
|
||||||
|
|
||||||
|
import { getSpaceLanguage } from '@/intl/server';
|
||||||
|
import { tString } from '@/intl/translate';
|
||||||
|
import { languages } from '@/intl/translations';
|
||||||
|
import { getNodeText } from '@/lib/document';
|
||||||
|
import { tcls } from '@/lib/tailwind';
|
||||||
|
import { Icon } from '@gitbook/icons';
|
||||||
|
import * as Tooltip from '@radix-ui/react-tooltip';
|
||||||
|
import type { GitBookAnyContext } from '@v2/lib/context';
|
||||||
|
import { Fragment } from 'react';
|
||||||
|
import { AIPageLinkSummary } from '../Adaptive/AIPageLinkSummary';
|
||||||
|
import { Button, StyledLink } from '../primitives';
|
||||||
|
|
||||||
|
export async function InlineLinkTooltip(props: {
|
||||||
|
inline: DocumentInlineLink;
|
||||||
|
context: GitBookAnyContext;
|
||||||
|
children: React.ReactNode;
|
||||||
|
resolved: ResolvedContentRef;
|
||||||
|
}) {
|
||||||
|
const { inline, context, resolved, children } = props;
|
||||||
|
|
||||||
|
let breadcrumbs = resolved.ancestors;
|
||||||
|
const language =
|
||||||
|
'customization' in context ? getSpaceLanguage(context.customization) : languages.en;
|
||||||
|
const isExternal = inline.data.ref.kind === 'url';
|
||||||
|
const isSamePage = inline.data.ref.kind === 'anchor' && inline.data.ref.page === undefined;
|
||||||
|
if (isExternal) {
|
||||||
|
breadcrumbs = [
|
||||||
|
{
|
||||||
|
label: tString(language, 'link_tooltip_external_link'),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
if (isSamePage) {
|
||||||
|
breadcrumbs = [
|
||||||
|
{
|
||||||
|
label: tString(language, 'link_tooltip_page_anchor'),
|
||||||
|
icon: <Icon icon="arrow-down-short-wide" className="size-3" />,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
resolved.subText = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
const hasAISummary =
|
||||||
|
!isExternal &&
|
||||||
|
!isSamePage &&
|
||||||
|
'customization' in context &&
|
||||||
|
context.customization.ai?.pageLinkSummaries.enabled &&
|
||||||
|
(inline.data.ref.kind === 'page' || inline.data.ref.kind === 'anchor');
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Tooltip.Provider delayDuration={200}>
|
||||||
|
<Tooltip.Root>
|
||||||
|
<Tooltip.Trigger asChild>{children}</Tooltip.Trigger>
|
||||||
|
<Tooltip.Portal>
|
||||||
|
<Tooltip.Content className="z-40 w-screen max-w-md animate-present px-4 sm:w-auto">
|
||||||
|
<div className="overflow-hidden rounded-md straight-corners:rounded-none shadow-lg shadow-tint-12/4 ring-1 ring-tint-subtle dark:shadow-tint-1 ">
|
||||||
|
<div className="bg-tint-base p-4">
|
||||||
|
<div className="flex items-start gap-4">
|
||||||
|
<div className="flex flex-col">
|
||||||
|
{breadcrumbs && breadcrumbs.length > 0 ? (
|
||||||
|
<div className="mb-1 flex grow flex-wrap items-center gap-x-2 gap-y-0.5 font-semibold text-tint text-xs uppercase leading-tight tracking-wide">
|
||||||
|
{breadcrumbs.map((crumb, index) => {
|
||||||
|
const Tag = crumb.href ? StyledLink : 'div';
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Fragment key={crumb.label}>
|
||||||
|
{index !== 0 ? (
|
||||||
|
<Icon
|
||||||
|
icon="chevron-right"
|
||||||
|
className="size-3 text-tint-subtle"
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
<Tag
|
||||||
|
className={tcls(
|
||||||
|
'flex gap-1',
|
||||||
|
crumb.href &&
|
||||||
|
'links-default:text-tint no-underline hover:underline contrast-more:underline contrast-more:decoration-current'
|
||||||
|
)}
|
||||||
|
href={crumb.href ?? '#'}
|
||||||
|
>
|
||||||
|
{crumb.icon ? (
|
||||||
|
<span className="mt-0.5 text-tint-subtle empty:hidden">
|
||||||
|
{crumb.icon}
|
||||||
|
</span>
|
||||||
|
) : null}
|
||||||
|
{crumb.label}
|
||||||
|
</Tag>
|
||||||
|
</Fragment>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
<div
|
||||||
|
className={tcls(
|
||||||
|
'flex gap-2 leading-snug',
|
||||||
|
isExternal && 'text-sm [overflow-wrap:anywhere]'
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{resolved.icon ? (
|
||||||
|
<div className="mt-1 text-tint-subtle empty:hidden">
|
||||||
|
{resolved.icon}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
<h5 className="font-semibold">{resolved.text}</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{!isSamePage && resolved.href ? (
|
||||||
|
<Button
|
||||||
|
className={tcls(
|
||||||
|
'-mx-2 -my-2 ml-auto',
|
||||||
|
breadcrumbs?.length === 0
|
||||||
|
? 'place-self-center'
|
||||||
|
: null
|
||||||
|
)}
|
||||||
|
variant="blank"
|
||||||
|
href={resolved.href}
|
||||||
|
target="_blank"
|
||||||
|
label={tString(language, 'open_in_new_tab')}
|
||||||
|
size="small"
|
||||||
|
icon="arrow-up-right-from-square"
|
||||||
|
iconOnly={true}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
{resolved.subText ? (
|
||||||
|
<p className="mt-1 text-sm text-tint">{resolved.subText}</p>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{hasAISummary && 'page' in context && 'page' in inline.data.ref ? (
|
||||||
|
<div className="border-tint-subtle border-t bg-tint p-4">
|
||||||
|
<AIPageLinkSummary
|
||||||
|
targetPageId={
|
||||||
|
resolved.page?.id ??
|
||||||
|
inline.data.ref.page ??
|
||||||
|
context.page.id
|
||||||
|
}
|
||||||
|
targetSpaceId={inline.data.ref.space ?? context.space.id}
|
||||||
|
linkTitle={getNodeText(inline)}
|
||||||
|
linkPreview={`**${resolved.text}**: ${resolved.subText}`}
|
||||||
|
showTrademark={
|
||||||
|
'customization' in context &&
|
||||||
|
context.customization.trademark.enabled
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
<Tooltip.Arrow className={hasAISummary ? 'fill-tint-3' : 'fill-tint-1'} />
|
||||||
|
</Tooltip.Content>
|
||||||
|
</Tooltip.Portal>
|
||||||
|
</Tooltip.Root>
|
||||||
|
</Tooltip.Provider>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -24,14 +24,16 @@ export function Inlines<T extends DocumentInline | DocumentText>(
|
|||||||
) {
|
) {
|
||||||
const { nodes, document, ancestorInlines, ...contextProps } = props;
|
const { nodes, document, ancestorInlines, ...contextProps } = props;
|
||||||
|
|
||||||
return nodes.map((node) => {
|
return nodes.map((node, index) => {
|
||||||
|
const key = node.key || `key-${index}`;
|
||||||
|
|
||||||
if (node.object === 'text') {
|
if (node.object === 'text') {
|
||||||
return <Text key={node.key} text={node} />;
|
return <Text key={key} text={node} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Inline
|
<Inline
|
||||||
key={node.key}
|
key={key}
|
||||||
inline={node}
|
inline={node}
|
||||||
document={document}
|
document={document}
|
||||||
ancestorInlines={ancestorInlines}
|
ancestorInlines={ancestorInlines}
|
||||||
|
|||||||
@@ -34,7 +34,11 @@ export async function IntegrationBlock(props: BlockProps<DocumentBlockIntegratio
|
|||||||
dataFetcher.renderIntegrationUi({
|
dataFetcher.renderIntegrationUi({
|
||||||
integrationName: block.data.integration,
|
integrationName: block.data.integration,
|
||||||
request: initialInput,
|
request: initialInput,
|
||||||
})
|
}),
|
||||||
|
|
||||||
|
// The API can respond with a 400 error if the integration is not installed
|
||||||
|
// and 404 if the integration is not found.
|
||||||
|
[404, 400]
|
||||||
);
|
);
|
||||||
if (!initialOutput || initialOutput.type === 'complete') {
|
if (!initialOutput || initialOutput.type === 'complete') {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
import type { JSONDocument } from '@gitbook/api';
|
|
||||||
import { Icon } from '@gitbook/icons';
|
|
||||||
import { OpenAPIOperation as BaseOpenAPIOperation } from '@gitbook/react-openapi';
|
import { OpenAPIOperation as BaseOpenAPIOperation } from '@gitbook/react-openapi';
|
||||||
|
|
||||||
import { resolveOpenAPIOperationBlock } from '@/lib/openapi/resolveOpenAPIOperationBlock';
|
import { resolveOpenAPIOperationBlock } from '@/lib/openapi/resolveOpenAPIOperationBlock';
|
||||||
import { tcls } from '@/lib/tailwind';
|
import { tcls } from '@/lib/tailwind';
|
||||||
|
|
||||||
import type { BlockProps } from '../Block';
|
import type { BlockProps } from '../Block';
|
||||||
import { PlainCodeBlock } from '../CodeBlock';
|
|
||||||
import { DocumentView } from '../DocumentView';
|
|
||||||
import { Heading } from '../Heading';
|
|
||||||
|
|
||||||
import './scalar.css';
|
import './scalar.css';
|
||||||
import './style.css';
|
import './style.css';
|
||||||
import type { AnyOpenAPIOperationsBlock } from '@/lib/openapi/types';
|
import type { AnyOpenAPIOperationsBlock } from '@/lib/openapi/types';
|
||||||
|
import { getOpenAPIContext } from './context';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render an openapi block or an openapi-operation block.
|
* Render an openapi block or an openapi-operation block.
|
||||||
@@ -55,51 +51,7 @@ async function OpenAPIOperationBody(props: BlockProps<AnyOpenAPIOperationsBlock>
|
|||||||
return (
|
return (
|
||||||
<BaseOpenAPIOperation
|
<BaseOpenAPIOperation
|
||||||
data={data}
|
data={data}
|
||||||
context={{
|
context={getOpenAPIContext({ props, specUrl })}
|
||||||
specUrl,
|
|
||||||
icons: {
|
|
||||||
chevronDown: <Icon icon="chevron-down" />,
|
|
||||||
chevronRight: <Icon icon="chevron-right" />,
|
|
||||||
plus: <Icon icon="plus" />,
|
|
||||||
},
|
|
||||||
renderCodeBlock: (codeProps) => <PlainCodeBlock {...codeProps} />,
|
|
||||||
renderDocument: (documentProps) => (
|
|
||||||
<DocumentView
|
|
||||||
document={documentProps.document as JSONDocument}
|
|
||||||
context={props.context}
|
|
||||||
style="space-y-6"
|
|
||||||
blockStyle="max-w-full"
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
renderHeading: (headingProps) => (
|
|
||||||
<Heading
|
|
||||||
document={props.document}
|
|
||||||
ancestorBlocks={props.ancestorBlocks}
|
|
||||||
isEstimatedOffscreen={props.isEstimatedOffscreen}
|
|
||||||
context={props.context}
|
|
||||||
style={headingProps.deprecated ? 'line-through' : undefined}
|
|
||||||
block={{
|
|
||||||
object: 'block',
|
|
||||||
key: `${block.key}-heading`,
|
|
||||||
meta: block.meta,
|
|
||||||
data: {},
|
|
||||||
type: 'heading-2',
|
|
||||||
nodes: [
|
|
||||||
{
|
|
||||||
key: `${block.key}-heading-text`,
|
|
||||||
object: 'text',
|
|
||||||
leaves: [
|
|
||||||
{ text: headingProps.title, object: 'leaf', marks: [] },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
defaultInteractiveOpened: context.mode === 'print',
|
|
||||||
id: block.meta?.id,
|
|
||||||
blockKey: block.key,
|
|
||||||
}}
|
|
||||||
className="openapi-block"
|
className="openapi-block"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { resolveOpenAPISchemasBlock } from '@/lib/openapi/resolveOpenAPISchemasBlock';
|
import { resolveOpenAPISchemasBlock } from '@/lib/openapi/resolveOpenAPISchemasBlock';
|
||||||
import { tcls } from '@/lib/tailwind';
|
import { tcls } from '@/lib/tailwind';
|
||||||
import { Icon } from '@gitbook/icons';
|
|
||||||
import { OpenAPISchemas as BaseOpenAPISchemas } from '@gitbook/react-openapi';
|
import { OpenAPISchemas as BaseOpenAPISchemas } from '@gitbook/react-openapi';
|
||||||
|
|
||||||
import type { BlockProps } from '../Block';
|
import type { BlockProps } from '../Block';
|
||||||
@@ -8,6 +7,7 @@ import type { BlockProps } from '../Block';
|
|||||||
import './scalar.css';
|
import './scalar.css';
|
||||||
import './style.css';
|
import './style.css';
|
||||||
import type { OpenAPISchemasBlock } from '@/lib/openapi/types';
|
import type { OpenAPISchemasBlock } from '@/lib/openapi/types';
|
||||||
|
import { getOpenAPIContext } from './context';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render an openapi-schemas block.
|
* Render an openapi-schemas block.
|
||||||
@@ -49,18 +49,9 @@ async function OpenAPISchemasBody(props: BlockProps<OpenAPISchemasBlock>) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseOpenAPISchemas
|
<BaseOpenAPISchemas
|
||||||
data={data}
|
schemas={data.schemas}
|
||||||
context={{
|
grouped={block.data.grouped}
|
||||||
specUrl,
|
context={getOpenAPIContext({ props, specUrl })}
|
||||||
icons: {
|
|
||||||
chevronDown: <Icon icon="chevron-down" />,
|
|
||||||
chevronRight: <Icon icon="chevron-right" />,
|
|
||||||
plus: <Icon icon="plus" />,
|
|
||||||
},
|
|
||||||
defaultInteractiveOpened: context.mode === 'print',
|
|
||||||
id: block.meta?.id,
|
|
||||||
blockKey: block.key,
|
|
||||||
}}
|
|
||||||
className="openapi-block"
|
className="openapi-block"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
import type { JSONDocument } from '@gitbook/api';
|
||||||
|
import { Icon } from '@gitbook/icons';
|
||||||
|
import type { OpenAPIContext } from '@gitbook/react-openapi';
|
||||||
|
|
||||||
|
import { tcls } from '@/lib/tailwind';
|
||||||
|
|
||||||
|
import type { BlockProps } from '../Block';
|
||||||
|
import { PlainCodeBlock } from '../CodeBlock';
|
||||||
|
import { DocumentView } from '../DocumentView';
|
||||||
|
import { Heading } from '../Heading';
|
||||||
|
|
||||||
|
import './scalar.css';
|
||||||
|
import './style.css';
|
||||||
|
import type { AnyOpenAPIOperationsBlock, OpenAPISchemasBlock } from '@/lib/openapi/types';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the OpenAPI context to render a block.
|
||||||
|
*/
|
||||||
|
export function getOpenAPIContext(args: {
|
||||||
|
props: BlockProps<AnyOpenAPIOperationsBlock | OpenAPISchemasBlock>;
|
||||||
|
specUrl: string;
|
||||||
|
}): OpenAPIContext {
|
||||||
|
const { props, specUrl } = args;
|
||||||
|
const { block } = props;
|
||||||
|
return {
|
||||||
|
specUrl,
|
||||||
|
icons: {
|
||||||
|
chevronDown: <Icon icon="chevron-down" />,
|
||||||
|
chevronRight: <Icon icon="chevron-right" />,
|
||||||
|
plus: <Icon icon="plus" />,
|
||||||
|
},
|
||||||
|
renderCodeBlock: (codeProps) => <PlainCodeBlock {...codeProps} />,
|
||||||
|
renderDocument: (documentProps) => (
|
||||||
|
<DocumentView
|
||||||
|
document={documentProps.document as JSONDocument}
|
||||||
|
context={props.context}
|
||||||
|
style="space-y-6"
|
||||||
|
blockStyle="max-w-full"
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
renderHeading: (headingProps) => (
|
||||||
|
<Heading
|
||||||
|
document={props.document}
|
||||||
|
ancestorBlocks={props.ancestorBlocks}
|
||||||
|
isEstimatedOffscreen={props.isEstimatedOffscreen}
|
||||||
|
context={props.context}
|
||||||
|
style={tcls([
|
||||||
|
headingProps.deprecated ? 'line-through' : undefined,
|
||||||
|
headingProps.deprecated || !!headingProps.stability
|
||||||
|
? '[&>div]:mt-0'
|
||||||
|
: undefined,
|
||||||
|
])}
|
||||||
|
block={{
|
||||||
|
object: 'block',
|
||||||
|
key: `${block.key}-heading`,
|
||||||
|
meta: block.meta,
|
||||||
|
data: {},
|
||||||
|
type: 'heading-2',
|
||||||
|
nodes: [
|
||||||
|
{
|
||||||
|
key: `${block.key}-heading-text`,
|
||||||
|
object: 'text',
|
||||||
|
leaves: [{ text: headingProps.title, object: 'leaf', marks: [] }],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
defaultInteractiveOpened: props.context.mode === 'print',
|
||||||
|
id: block.meta?.id,
|
||||||
|
blockKey: block.key,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
@import "@scalar/api-client-react/style.css";
|
@import "@scalar/api-client-react/style.css";
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
/** Override Scalar's overscroll-behavior */
|
||||||
|
@apply !overscroll-auto;
|
||||||
|
}
|
||||||
|
|
||||||
.light .scalar-modal-layout,
|
.light .scalar-modal-layout,
|
||||||
.light .scalar-app,
|
.light .scalar-app,
|
||||||
.light .scalar {
|
.light .scalar {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* Layout Components */
|
/* Layout Components */
|
||||||
.openapi-operation {
|
.openapi-operation,
|
||||||
|
.openapi-schemas {
|
||||||
@apply flex-1 flex flex-col gap-8 mb-14 min-w-0;
|
@apply flex-1 flex flex-col gap-8 mb-14 min-w-0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,13 +18,30 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.openapi-summary {
|
.openapi-summary {
|
||||||
@apply flex flex-col items-start justify-start gap-3;
|
@apply flex flex-col items-start justify-start gap-3 scroll-m-12;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-deprecated {
|
.openapi-summary-tags {
|
||||||
|
@apply flex flex-row gap-2 mt-[0.75em];
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-deprecated,
|
||||||
|
.openapi-stability {
|
||||||
@apply py-0.5 px-1.5 min-w-[1.625rem] font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint bg-tint rounded text-sm leading-[calc(max(1.20em,1.25rem))] before:!content-none after:!content-none;
|
@apply py-0.5 px-1.5 min-w-[1.625rem] font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint bg-tint rounded text-sm leading-[calc(max(1.20em,1.25rem))] before:!content-none after:!content-none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.openapi-stability-alpha {
|
||||||
|
@apply text-amber-700 dark:text-amber-300 bg-amber-50 dark:bg-amber-900/6 ring-amber-500/5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-stability-beta {
|
||||||
|
@apply text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/6 ring-blue-500/5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-stability-experimental {
|
||||||
|
@apply text-violet-700 dark:text-violet-300 bg-violet-50 dark:bg-violet-900/6 ring-violet-500/5;
|
||||||
|
}
|
||||||
|
|
||||||
.openapi-deprecated-sunset-date {
|
.openapi-deprecated-sunset-date {
|
||||||
@apply font-semibold font-mono truncate;
|
@apply font-semibold font-mono truncate;
|
||||||
}
|
}
|
||||||
@@ -72,7 +90,7 @@
|
|||||||
|
|
||||||
/* Method Tags */
|
/* Method Tags */
|
||||||
.openapi-method {
|
.openapi-method {
|
||||||
@apply rounded uppercase font-mono font-bold text-xs px-1 py-0.5 mr-2 text-tint-12/8 leading-tight align-middle inline-flex ring-1 ring-inset ring-tint-12/1 dark:ring-tint-1/1 whitespace-nowrap;
|
@apply rounded uppercase font-mono shrink-0 font-bold text-xs px-1 py-0.5 mr-2 text-tint-12/8 leading-tight align-middle inline-flex ring-1 ring-inset ring-tint-12/1 dark:ring-tint-1/1 whitespace-nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-method-get {
|
.openapi-method-get {
|
||||||
@@ -131,7 +149,15 @@
|
|||||||
|
|
||||||
/* Schema Structure */
|
/* Schema Structure */
|
||||||
.openapi-schema-root {
|
.openapi-schema-root {
|
||||||
@apply mt-2;
|
/* unstyled */
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-schema-root-description.openapi-markdown {
|
||||||
|
@apply prose-sm text-balance mt-1.5 !text-[0.813rem] text-tint overflow-hidden !font-normal select-text prose-strong:font-semibold prose-strong:text-inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-section-schemas > .openapi-section-body > .openapi-schema-root-description {
|
||||||
|
@apply px-2.5 pt-1 !text-sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-schema-properties {
|
.openapi-schema-properties {
|
||||||
@@ -182,7 +208,7 @@
|
|||||||
.openapi-schema-name {
|
.openapi-schema-name {
|
||||||
/* To make double click on the property name select only the name,
|
/* To make double click on the property name select only the name,
|
||||||
we disable selection on the parent and re-enable it on the children. */
|
we disable selection on the parent and re-enable it on the children. */
|
||||||
@apply select-none flex gap-x-2.5 items-baseline text-sm flex-wrap;
|
@apply select-none text-sm text-balance *:whitespace-nowrap flex flex-wrap gap-y-1.5 gap-x-2.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-schema-name .openapi-deprecated {
|
.openapi-schema-name .openapi-deprecated {
|
||||||
@@ -209,6 +235,10 @@
|
|||||||
@apply text-primary-subtle/9 text-[0.813rem];
|
@apply text-primary-subtle/9 text-[0.813rem];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.openapi-schema-writeonly {
|
||||||
|
@apply text-success dark:text-success-subtle/9 text-[0.813rem];
|
||||||
|
}
|
||||||
|
|
||||||
.openapi-schema-type {
|
.openapi-schema-type {
|
||||||
@apply text-tint select-text text-[0.813rem] font-mono [word-spacing:-0.25rem];
|
@apply text-tint select-text text-[0.813rem] font-mono [word-spacing:-0.25rem];
|
||||||
}
|
}
|
||||||
@@ -240,11 +270,11 @@
|
|||||||
|
|
||||||
/* Schema Enum */
|
/* Schema Enum */
|
||||||
.openapi-schema-enum {
|
.openapi-schema-enum {
|
||||||
@apply flex flex-row text-sm leading-relaxed flex-wrap text-tint;
|
@apply text-sm leading-relaxed max-w-full text-tint;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-schema-enum-value {
|
.openapi-schema-enum-value {
|
||||||
@apply text-sm;
|
@apply text-sm mr-1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-schema-enum-value:first-child {
|
.openapi-schema-enum-value:first-child {
|
||||||
@@ -257,7 +287,7 @@
|
|||||||
|
|
||||||
/* Schema Description */
|
/* Schema Description */
|
||||||
.openapi-schema-description.openapi-markdown {
|
.openapi-schema-description.openapi-markdown {
|
||||||
@apply prose-sm text-tint overflow-hidden !font-normal select-text prose-strong:font-semibold prose-strong:text-inherit;
|
@apply prose-sm text-tint overflow-hidden text-pretty !font-normal select-text prose-strong:font-semibold prose-strong:text-inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-schema-description.openapi-markdown pre:has(code) {
|
.openapi-schema-description.openapi-markdown pre:has(code) {
|
||||||
@@ -277,13 +307,15 @@
|
|||||||
|
|
||||||
/* Schema Examples */
|
/* Schema Examples */
|
||||||
.openapi-schema-example,
|
.openapi-schema-example,
|
||||||
.openapi-schema-pattern {
|
.openapi-schema-pattern,
|
||||||
|
.openapi-schema-default {
|
||||||
@apply prose-sm text-tint;
|
@apply prose-sm text-tint;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-schema-example code,
|
.openapi-schema-example code,
|
||||||
.openapi-schema-pattern code,
|
.openapi-schema-pattern code,
|
||||||
.openapi-schema-enum-value code {
|
.openapi-schema-enum-value code,
|
||||||
|
.openapi-schema-default code {
|
||||||
@apply py-px px-1 min-w-[1.625rem] text-tint-strong font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint bg-tint rounded text-xs leading-[calc(max(1.20em,1.25rem))] before:!content-none after:!content-none;
|
@apply py-px px-1 min-w-[1.625rem] text-tint-strong font-normal w-fit justify-center items-center ring-1 ring-inset ring-tint bg-tint rounded text-xs leading-[calc(max(1.20em,1.25rem))] before:!content-none after:!content-none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,7 +329,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.openapi-securities-description.openapi-markdown {
|
.openapi-securities-description.openapi-markdown {
|
||||||
@apply prose-sm text-tint !font-normal select-text prose-strong:font-semibold prose-strong:text-inherit;
|
@apply prose-sm text-tint !font-normal select-text text-pretty prose-strong:font-semibold prose-strong:text-inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-securities-label {
|
.openapi-securities-label {
|
||||||
@@ -323,7 +355,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.openapi-requestbody-description.openapi-markdown {
|
.openapi-requestbody-description.openapi-markdown {
|
||||||
@apply prose-sm text-tint !font-normal select-text prose-strong:font-semibold prose-strong:text-inherit;
|
@apply prose-sm text-tint !font-normal text-pretty select-text prose-strong:font-semibold prose-strong:text-inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responses */
|
/* Responses */
|
||||||
@@ -340,7 +372,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.openapi-response-description.openapi-markdown {
|
.openapi-response-description.openapi-markdown {
|
||||||
@apply text-left prose-sm text-[0.813rem] h-auto relative leading-[1.125rem] text-tint !font-normal truncate select-text prose-strong:font-semibold prose-strong:text-inherit;
|
@apply text-left prose-sm text-[0.813rem] text-pretty h-auto relative leading-[1.125rem] text-tint !font-normal truncate select-text prose-strong:font-semibold prose-strong:text-inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-response-description.openapi-markdown::-webkit-scrollbar {
|
.openapi-response-description.openapi-markdown::-webkit-scrollbar {
|
||||||
@@ -391,8 +423,20 @@
|
|||||||
@apply flex flex-row items-center;
|
@apply flex flex-row items-center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.openapi-codesample-header .openapi-select > button {
|
||||||
|
@apply border-none;
|
||||||
|
}
|
||||||
|
|
||||||
.openapi-codesample-header-content {
|
.openapi-codesample-header-content {
|
||||||
@apply flex flex-row items-center h-fit;
|
@apply flex flex-row items-center justify-between h-fit p-2.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-codesample-header-content .openapi-path {
|
||||||
|
@apply flex items-center font-mono *:text-[0.813rem] gap-2 h-fit *:truncate overflow-x-auto min-w-0 max-w-full font-normal text-tint-strong;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-codesample-header-content .openapi-path .openapi-path-variable {
|
||||||
|
@apply text-[0.813rem];
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-codesample-footer {
|
.openapi-codesample-footer {
|
||||||
@@ -405,7 +449,7 @@
|
|||||||
|
|
||||||
/* Path */
|
/* Path */
|
||||||
.openapi-path {
|
.openapi-path {
|
||||||
@apply flex items-start text-sm gap-2 h-fit overflow-x-auto min-w-0 max-w-full;
|
@apply flex items-center text-sm gap-2 h-fit overflow-x-auto min-w-0 max-w-full;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
-ms-overflow-style: none;
|
-ms-overflow-style: none;
|
||||||
}
|
}
|
||||||
@@ -419,12 +463,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.openapi-path .openapi-method {
|
.openapi-path .openapi-method {
|
||||||
@apply text-[0.813rem] m-0 mt-0.5 items-center flex px-2;
|
@apply text-[0.813rem] m-0 mt-0.5 items-center flex px-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-path-title {
|
.openapi-path-title {
|
||||||
@apply flex-1 relative font-normal text-left font-mono text-tint-strong/10;
|
@apply flex-1 relative font-normal text-left font-mono text-tint-strong/10;
|
||||||
@apply py-0.5 px-1 rounded hover:bg-tint cursor-pointer transition-colors;
|
@apply py-0.5 px-1 rounded hover:bg-tint transition-colors;
|
||||||
@apply whitespace-nowrap md:whitespace-normal;
|
@apply whitespace-nowrap md:whitespace-normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -436,14 +480,6 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .openapi-path-copy {
|
|
||||||
@apply absolute opacity-0 h-fit right-0 top-1/2 -translate-y-1/2 bg-light dark:bg-dark border rounded-md border-tint-subtle px-1.5 py-0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openapi-path-title:hover .openapi-path-copy {
|
|
||||||
@apply opacity-11;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.openapi-path-title em {
|
.openapi-path-title em {
|
||||||
@apply not-italic text-primary font-medium;
|
@apply not-italic text-primary font-medium;
|
||||||
}
|
}
|
||||||
@@ -456,24 +492,89 @@
|
|||||||
@apply flex flex-row items-center py-2 px-3 justify-end border-t border-tint-subtle;
|
@apply flex flex-row items-center py-2 px-3 justify-end border-t border-tint-subtle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Response Example */
|
/* Panel */
|
||||||
.openapi-response-example {
|
.openapi-panel {
|
||||||
@apply border rounded bg-tint border-tint-subtle;
|
@apply border rounded bg-tint border-tint-subtle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-response-example-empty {
|
.openapi-panel-heading {
|
||||||
|
@apply font-medium px-4 py-2 text-xs uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-panel-body {
|
||||||
|
@apply relative;
|
||||||
|
@apply before:w-full before:h-px before:absolute before:bg-tint-6 before:-top-px before:z-10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-panel-footer,
|
||||||
|
.openapi-codesample-footer {
|
||||||
|
@apply px-3 py-2 pt-2.5 border-t border-tint-subtle text-[0.813rem] text-tint;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-panel-footer .openapi-markdown {
|
||||||
|
@apply text-[0.813rem] text-tint;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Example */
|
||||||
|
.openapi-example-empty {
|
||||||
@apply relative text-tint bg-tint min-h-20 flex flex-col justify-center items-center;
|
@apply relative text-tint bg-tint min-h-20 flex flex-col justify-center items-center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Common Elements */
|
/* Common Elements */
|
||||||
.openapi-select {
|
.openapi-select {
|
||||||
@apply max-w-60 rounded font-mono text-xs leading-6 px-1 py-0.5 border border-tint-subtle bg-tint;
|
/* unstyled */
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-select {
|
/* Prevent react-aria popover from setting overflow:auto on body */
|
||||||
min-width: fit-content;
|
body:has(.openapi-select-popover) {
|
||||||
max-width: fit-content;
|
overflow: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.openapi-select > button {
|
||||||
|
@apply flex items-center cursor-pointer gap-1.5 text-tint-strong max-w-60 rounded text-xs leading-6 px-1.5 truncate border border-tint-subtle bg-tint;
|
||||||
|
@apply hover:bg-tint-hover transition-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-select > button > span.react-aria-SelectValue {
|
||||||
|
@apply shrink truncate;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-select > button > .gb-icon {
|
||||||
|
@apply shrink-0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-select > button svg {
|
||||||
|
@apply size-2.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-select-popover {
|
||||||
|
@apply min-w-32 max-w-fit w-auto max-h-52 overflow-y-auto p-1.5 border border-tint-subtle bg-tint-base backdrop-blur-xl rounded-md;
|
||||||
|
@apply shadow-md shadow-tint-12/1 dark:shadow-tint-1/1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-select-popover[data-entering] {
|
||||||
|
animation: popover-enter 0.2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-select-popover[data-exiting] {
|
||||||
|
animation: popover-leave 0.2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-select-item {
|
||||||
|
@apply text-sm cursor-pointer px-1.5 py-0.5 truncate text-tint ring-0 border-none rounded !outline-none;
|
||||||
|
@apply hover:bg-tint-hover theme-gradient:hover:bg-tint-12/1 hover:text-tint-strong contrast-more:hover:ring-1 contrast-more:hover:ring-inset contrast-more:hover:ring-current;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-select-item-selected {
|
||||||
|
@apply text-primary-subtle hover:text-primary hover:bg-primary-hover;
|
||||||
|
@apply theme-muted:hover:bg-primary-active theme-gradient:hover:bg-primary-active tint:font-semibold;
|
||||||
|
@apply contrast-more:text-primary contrast-more:hover:text-primary-strong contrast-more:font-semibold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-select-listbox {
|
||||||
|
@apply flex flex-col gap-1 focus:ring-0 focus:outline-none;
|
||||||
|
}
|
||||||
|
|
||||||
.openapi-select:focus {
|
.openapi-select:focus {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
@@ -521,7 +622,7 @@
|
|||||||
|
|
||||||
/* Tabs */
|
/* Tabs */
|
||||||
.openapi-tabs-list {
|
.openapi-tabs-list {
|
||||||
@apply flex flex-row gap-1.5 py-1.5 px-2.5 border-b border-tint-subtle w-full overflow-x-scroll;
|
@apply flex flex-row gap-1.5 py-1.5 px-2.5 w-full overflow-x-scroll;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
-ms-overflow-style: none;
|
-ms-overflow-style: none;
|
||||||
}
|
}
|
||||||
@@ -531,19 +632,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.openapi-tabs-tab[aria-selected="true"] {
|
.openapi-tabs-tab[aria-selected="true"] {
|
||||||
@apply text-primary after:absolute after:-bottom-2 after:left-0 after:w-full after:h-px after:bg-primary-solid after:transition-all;
|
@apply text-primary after:absolute after:-bottom-[calc(0.375rem_+_1px)] after:z-20 after:left-0 after:w-full after:h-px after:bg-primary-solid after:transition-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-tabs-panel {
|
.openapi-tabs-panel,
|
||||||
@apply flex-1 text-sm focus-visible:outline-none;
|
.openapi-codesample-panel {
|
||||||
}
|
@apply flex-1 text-sm relative focus-visible:outline-none;
|
||||||
|
@apply before:w-full before:h-px before:absolute before:bg-tint-6 before:-top-px before:z-10;
|
||||||
.openapi-tabs-footer {
|
|
||||||
@apply px-3 py-2 pt-2.5 border-t border-tint-subtle text-[0.813rem] text-tint;
|
|
||||||
}
|
|
||||||
|
|
||||||
.openapi-tabs-footer .openapi-markdown {
|
|
||||||
@apply text-[0.813rem] text-tint;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disclosure group */
|
/* Disclosure group */
|
||||||
@@ -654,7 +749,8 @@
|
|||||||
@apply border border-tint-subtle rounded-lg;
|
@apply border border-tint-subtle rounded-lg;
|
||||||
}
|
}
|
||||||
|
|
||||||
.openapi-section-schemas > .openapi-section-body > .openapi-schema-properties > .openapi-schema {
|
.openapi-section-schemas > .openapi-section-body > .openapi-schema-properties > .openapi-schema,
|
||||||
|
.openapi-section-schemas > .openapi-section-body > .openapi-schema-root {
|
||||||
@apply p-2.5;
|
@apply p-2.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -691,3 +787,33 @@
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes popover-enter {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(4px) scale(0.95);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0) scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes popover-leave {
|
||||||
|
0% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0) scale(1);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(4px) scale(0.95);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-copy-button {
|
||||||
|
@apply hover:brightness-95 cursor-pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openapi-copy-button[data-disabled="true"] {
|
||||||
|
@apply cursor-default;
|
||||||
|
}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export async function RecordColumnValue<Tag extends React.ElementType = 'div'>(
|
|||||||
key={index}
|
key={index}
|
||||||
href={ref.href}
|
href={ref.href}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
style={['flex', 'flex-row', 'items-center', 'gap-2']}
|
className="flex flex-row items-center gap-2"
|
||||||
insights={
|
insights={
|
||||||
ref.file
|
ref.file
|
||||||
? {
|
? {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export function Tabs(props: BlockProps<DocumentBlockTabs>) {
|
|||||||
const tabs: TabsItem[] = [];
|
const tabs: TabsItem[] = [];
|
||||||
const tabsBody: React.ReactNode[] = [];
|
const tabsBody: React.ReactNode[] = [];
|
||||||
|
|
||||||
block.nodes.forEach((tab) => {
|
block.nodes.forEach((tab, index) => {
|
||||||
tabs.push({
|
tabs.push({
|
||||||
id: tab.meta?.id ?? tab.key!,
|
id: tab.meta?.id ?? tab.key!,
|
||||||
title: tab.data.title ?? '',
|
title: tab.data.title ?? '',
|
||||||
@@ -20,6 +20,7 @@ export function Tabs(props: BlockProps<DocumentBlockTabs>) {
|
|||||||
|
|
||||||
tabsBody.push(
|
tabsBody.push(
|
||||||
<Blocks
|
<Blocks
|
||||||
|
key={tab.key ?? index}
|
||||||
nodes={tab.nodes}
|
nodes={tab.nodes}
|
||||||
document={document}
|
document={document}
|
||||||
ancestorBlocks={[...ancestorBlocks, block, tab]}
|
ancestorBlocks={[...ancestorBlocks, block, tab]}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import type {
|
|||||||
DocumentMarkItalic,
|
DocumentMarkItalic,
|
||||||
DocumentMarkKeyboard,
|
DocumentMarkKeyboard,
|
||||||
DocumentMarkStrikethrough,
|
DocumentMarkStrikethrough,
|
||||||
|
DocumentMarkSubscript,
|
||||||
|
DocumentMarkSuperscript,
|
||||||
DocumentText,
|
DocumentText,
|
||||||
DocumentTextMark,
|
DocumentTextMark,
|
||||||
} from '@gitbook/api';
|
} from '@gitbook/api';
|
||||||
@@ -47,6 +49,8 @@ const MARK_STYLES = {
|
|||||||
strikethrough: Strikethrough,
|
strikethrough: Strikethrough,
|
||||||
color: Color,
|
color: Color,
|
||||||
keyboard: Keyboard,
|
keyboard: Keyboard,
|
||||||
|
superscript: Superscript,
|
||||||
|
subscript: Subscript,
|
||||||
};
|
};
|
||||||
|
|
||||||
interface MarkedLeafProps<Mark extends DocumentTextMark> {
|
interface MarkedLeafProps<Mark extends DocumentTextMark> {
|
||||||
@@ -74,6 +78,14 @@ function Keyboard(props: MarkedLeafProps<DocumentMarkKeyboard>) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Superscript(props: MarkedLeafProps<DocumentMarkSuperscript>) {
|
||||||
|
return <sup>{props.children}</sup>;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Subscript(props: MarkedLeafProps<DocumentMarkSubscript>) {
|
||||||
|
return <sub>{props.children}</sub>;
|
||||||
|
}
|
||||||
|
|
||||||
function Code(props: MarkedLeafProps<DocumentMarkCode>) {
|
function Code(props: MarkedLeafProps<DocumentMarkCode>) {
|
||||||
return (
|
return (
|
||||||
<code
|
<code
|
||||||
|
|||||||
@@ -15,123 +15,123 @@ export function Footer(props: { context: GitBookSiteContext }) {
|
|||||||
const { context } = props;
|
const { context } = props;
|
||||||
const { customization } = context;
|
const { customization } = context;
|
||||||
|
|
||||||
|
const hasLogo = customization.footer.logo;
|
||||||
|
const groupCount = customization.footer.groups?.length ?? 0;
|
||||||
|
const hasGroups = groupCount > 0;
|
||||||
|
const hasCopyright = customization.footer.copyright;
|
||||||
|
const hasThemeToggle = customization.themes.toggeable;
|
||||||
|
|
||||||
|
const mobileOnly = !hasLogo && !hasGroups && !hasCopyright && hasThemeToggle;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer
|
<footer
|
||||||
className={tcls(
|
className={tcls(
|
||||||
'border-tint-subtle border-t',
|
'border-tint-subtle border-t',
|
||||||
// If the footer only contains a mode toggle, we only show it on smaller screens
|
// If the footer only contains a mode toggle, we only show it on smaller screens
|
||||||
customization.themes.toggeable &&
|
mobileOnly ? 'xl:hidden' : null
|
||||||
!customization.footer.copyright &&
|
|
||||||
!customization.footer.logo &&
|
|
||||||
customization.footer.groups?.length === 0
|
|
||||||
? 'xl:hidden'
|
|
||||||
: null
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="scroll-nojump">
|
<div className="scroll-nojump">
|
||||||
<div className={tcls(CONTAINER_STYLE, 'px-4', 'mx-auto', 'flex', 'gap-12')}>
|
<div className={tcls(CONTAINER_STYLE, 'px-4', 'py-8', 'lg:py-12', 'mx-auto')}>
|
||||||
<div className="hidden page-no-toc:hidden basis-72 lg:block" />
|
|
||||||
<div
|
<div
|
||||||
className={tcls(
|
className={tcls(
|
||||||
'py-8',
|
'mx-auto grid max-w-3xl justify-between gap-12 lg:max-w-none',
|
||||||
'gap-12',
|
'grid-cols-[auto_auto]',
|
||||||
'flex',
|
'lg:grid-cols-[18rem_minmax(auto,_48rem)_auto]',
|
||||||
'flex-wrap',
|
'xl:grid-cols-[18rem_minmax(auto,_48rem)_14rem]',
|
||||||
'items-start',
|
'page-no-toc:lg:grid-cols-[minmax(auto,_48rem)_auto]',
|
||||||
'w-full',
|
'page-no-toc:xl:grid-cols-[14rem_minmax(auto,_48rem)_14rem]'
|
||||||
'flex-1',
|
|
||||||
'max-w-3xl',
|
|
||||||
'page-full-width:max-w-none',
|
|
||||||
'mx-auto'
|
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{/* Footer Logo */}
|
{
|
||||||
{customization.footer.logo ? (
|
// Footer Logo
|
||||||
<Image
|
customization.footer.logo ? (
|
||||||
alt="Logo"
|
<div className="col-start-1 row-start-1">
|
||||||
resize={context.imageResizer}
|
<Image
|
||||||
sources={{
|
alt="Logo"
|
||||||
light: {
|
resize={context.imageResizer}
|
||||||
src: customization.footer.logo.light,
|
sources={{
|
||||||
},
|
light: {
|
||||||
dark: customization.footer.logo.dark
|
src: customization.footer.logo.light,
|
||||||
? {
|
},
|
||||||
src: customization.footer.logo.dark,
|
dark: customization.footer.logo.dark
|
||||||
}
|
? {
|
||||||
: null,
|
src: customization.footer.logo.dark,
|
||||||
}}
|
}
|
||||||
priority="lazy"
|
: null,
|
||||||
style={[
|
}}
|
||||||
'w-auto',
|
priority="lazy"
|
||||||
'max-w-40',
|
style={[
|
||||||
'lg:max-w-64',
|
'w-auto',
|
||||||
'max-h-12',
|
'max-w-40',
|
||||||
'object-contain',
|
'lg:max-w-64',
|
||||||
'object-left',
|
'max-h-10',
|
||||||
'rounded',
|
'lg:max-h-12',
|
||||||
'straight-corners:rounded-sm',
|
'object-contain',
|
||||||
'order-1',
|
'object-left',
|
||||||
]}
|
'rounded',
|
||||||
sizes={[
|
'straight-corners:rounded-sm',
|
||||||
{
|
]}
|
||||||
width: 320,
|
sizes={[
|
||||||
},
|
{
|
||||||
]}
|
width: 320,
|
||||||
/>
|
},
|
||||||
) : null}
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
|
|
||||||
{/* Mode Switcher */}
|
{
|
||||||
{customization.themes.toggeable ? (
|
// Theme Toggle
|
||||||
<div className="order-2 ml-auto flex items-center justify-end xl:hidden">
|
customization.themes.toggeable ? (
|
||||||
<React.Suspense fallback={null}>
|
<div className="-col-start-2 row-start-1 flex items-start justify-end xl:hidden">
|
||||||
<ThemeToggler />
|
<React.Suspense fallback={null}>
|
||||||
</React.Suspense>
|
<ThemeToggler />
|
||||||
</div>
|
</React.Suspense>
|
||||||
) : null}
|
</div>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
|
|
||||||
{/* Navigation Groups (split into equal columns) */}
|
{
|
||||||
{customization.footer.groups?.length > 0 ? (
|
// Navigation groups (split into equal columns)
|
||||||
<div
|
customization.footer.groups?.length > 0 ? (
|
||||||
className={tcls(
|
<div
|
||||||
'order-3 mx-auto flex w-full grow flex-col gap-10 sm:flex-row sm:gap-6',
|
className={tcls(
|
||||||
!customization.footer.logo &&
|
'col-span-2 page-has-toc:lg:col-span-1 page-has-toc:lg:col-start-2 page-no-toc:xl:col-span-1 page-no-toc:xl:col-start-2'
|
||||||
customization.footer.groups.length < 2 &&
|
)}
|
||||||
'self-center sm:order-1 sm:w-auto sm:max-w-3xl sm:flex-1 sm:items-start sm:text-start'
|
>
|
||||||
)}
|
<div className="mx-auto flex max-w-3xl flex-col gap-10 sm:flex-row sm:gap-6">
|
||||||
>
|
{partition(customization.footer.groups, FOOTER_COLUMNS).map(
|
||||||
{partition(customization.footer.groups, FOOTER_COLUMNS).map(
|
(column, columnIndex) => (
|
||||||
(column, columnIndex) => (
|
<div
|
||||||
<div
|
key={columnIndex}
|
||||||
key={columnIndex}
|
className="flex flex-1 grow flex-col gap-10"
|
||||||
className="flex w-full flex-col gap-10"
|
>
|
||||||
>
|
{column.map((group, groupIndex) => (
|
||||||
{column.map((group, groupIndex) => (
|
<FooterLinksGroup
|
||||||
<FooterLinksGroup
|
key={groupIndex}
|
||||||
key={groupIndex}
|
group={group}
|
||||||
group={group}
|
context={context}
|
||||||
context={context}
|
/>
|
||||||
/>
|
))}
|
||||||
))}
|
</div>
|
||||||
</div>
|
)
|
||||||
)
|
)}
|
||||||
)}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null
|
||||||
|
}
|
||||||
|
|
||||||
{/* Legal */}
|
{
|
||||||
<div
|
// Legal
|
||||||
className={tcls(
|
customization.footer.copyright ? (
|
||||||
'order-4 mx-auto flex w-full grow flex-col items-center gap-2 text-center text-tint text-xs empty:hidden',
|
<div className="order-last col-span-full flex w-full grow flex-col items-center gap-2 text-center text-tint text-xs">
|
||||||
customization.footer.groups.length === 0 &&
|
<p>{customization.footer.copyright}</p>
|
||||||
'self-center sm:order-1 sm:w-auto sm:max-w-3xl sm:flex-1 sm:items-start sm:text-start'
|
</div>
|
||||||
)}
|
) : null
|
||||||
>
|
}
|
||||||
{customization.footer.copyright ? (
|
|
||||||
<p>{customization.footer.copyright}</p>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="hidden page-no-toc:hidden lg:block xl:basis-56" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ export function Dropdown<E extends HTMLElement>(props: {
|
|||||||
className={tcls(
|
className={tcls(
|
||||||
'mt-2',
|
'mt-2',
|
||||||
'w-full',
|
'w-full',
|
||||||
|
'max-h-80',
|
||||||
'bg-tint-base',
|
'bg-tint-base',
|
||||||
'rounded-lg',
|
'rounded-lg',
|
||||||
'straight-corners:rounded-sm',
|
'straight-corners:rounded-sm',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export function Header(props: { context: GitBookSiteContext; withTopHeader?: boo
|
|||||||
|
|
||||||
'bg-tint-base/9',
|
'bg-tint-base/9',
|
||||||
'theme-muted:bg-tint-subtle/9',
|
'theme-muted:bg-tint-subtle/9',
|
||||||
'theme-bold-tint:bg-tint-subtle/9',
|
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-subtle/9',
|
||||||
'theme-gradient:bg-gradient-primary',
|
'theme-gradient:bg-gradient-primary',
|
||||||
'theme-gradient-tint:bg-gradient-tint',
|
'theme-gradient-tint:bg-gradient-tint',
|
||||||
'contrast-more:bg-tint-base',
|
'contrast-more:bg-tint-base',
|
||||||
|
|||||||
@@ -142,10 +142,9 @@ function HeaderItemButton(
|
|||||||
position: SiteInsightsLinkPosition.Header,
|
position: SiteInsightsLinkPosition.Header,
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
label={title}
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
/>
|
||||||
{title}
|
|
||||||
</Button>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export function SpacesDropdown(props: {
|
|||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<span className={tcls('truncate', 'grow')}>{siteSpace.title}</span>
|
<span className={tcls('line-clamp-1', 'grow')}>{siteSpace.title}</span>
|
||||||
<DropdownChevron />
|
<DropdownChevron />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { useDebounceCallback, useEventCallback } from 'usehooks-ts';
|
|||||||
import type { VisitorAuthClaims } from '@/lib/adaptive';
|
import type { VisitorAuthClaims } from '@/lib/adaptive';
|
||||||
import { getAllBrowserCookiesMap } from '@/lib/browser-cookies';
|
import { getAllBrowserCookiesMap } from '@/lib/browser-cookies';
|
||||||
import { getSession } from './sessions';
|
import { getSession } from './sessions';
|
||||||
|
import { useVisitedPages } from './useVisitedPages';
|
||||||
import { getVisitorId } from './visitorId';
|
import { getVisitorId } from './visitorId';
|
||||||
|
|
||||||
export type InsightsEventName = api.SiteInsightsEvent['type'];
|
export type InsightsEventName = api.SiteInsightsEvent['type'];
|
||||||
@@ -63,9 +64,19 @@ type TrackEventCallback = <EventName extends InsightsEventName>(
|
|||||||
const InsightsContext = React.createContext<TrackEventCallback>(() => {});
|
const InsightsContext = React.createContext<TrackEventCallback>(() => {});
|
||||||
|
|
||||||
interface InsightsProviderProps extends InsightsEventContext {
|
interface InsightsProviderProps extends InsightsEventContext {
|
||||||
|
/** If true, the events will be sent to the server. */
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
|
||||||
|
/** If true, the visitor cookie tracking will be used */
|
||||||
|
visitorCookieTrackingEnabled: boolean;
|
||||||
|
|
||||||
|
/** The URL of the app. */
|
||||||
appURL: string;
|
appURL: string;
|
||||||
|
|
||||||
|
/** The host of the API. */
|
||||||
apiHost: string;
|
apiHost: string;
|
||||||
|
|
||||||
|
/** The children of the provider. */
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,8 +84,9 @@ interface InsightsProviderProps extends InsightsEventContext {
|
|||||||
* Wrap the content of the app with the InsightsProvider to track events.
|
* Wrap the content of the app with the InsightsProvider to track events.
|
||||||
*/
|
*/
|
||||||
export function InsightsProvider(props: InsightsProviderProps) {
|
export function InsightsProvider(props: InsightsProviderProps) {
|
||||||
const { enabled, appURL, apiHost, children, ...context } = props;
|
const { enabled, appURL, apiHost, children, visitorCookieTrackingEnabled, ...context } = props;
|
||||||
|
|
||||||
|
const addVisitedPage = useVisitedPages((state) => state.addPage);
|
||||||
const visitorIdRef = React.useRef<string | null>(null);
|
const visitorIdRef = React.useRef<string | null>(null);
|
||||||
const eventsRef = React.useRef<{
|
const eventsRef = React.useRef<{
|
||||||
[pathname: string]:
|
[pathname: string]:
|
||||||
@@ -124,6 +136,14 @@ export function InsightsProvider(props: InsightsProviderProps) {
|
|||||||
...eventsForPathname,
|
...eventsForPathname,
|
||||||
events: [],
|
events: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Mark the page as visited in our local state
|
||||||
|
if (eventsForPathname.pageContext.pageId) {
|
||||||
|
addVisitedPage({
|
||||||
|
spaceId: context.spaceId,
|
||||||
|
pageId: eventsForPathname.pageContext.pageId,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allEvents.length > 0) {
|
if (allEvents.length > 0) {
|
||||||
@@ -140,7 +160,8 @@ export function InsightsProvider(props: InsightsProviderProps) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const flushBatchedEvents = useDebounceCallback(async () => {
|
const flushBatchedEvents = useDebounceCallback(async () => {
|
||||||
const visitorId = visitorIdRef.current ?? (await getVisitorId(appURL));
|
const visitorId =
|
||||||
|
visitorIdRef.current ?? (await getVisitorId(appURL, visitorCookieTrackingEnabled));
|
||||||
visitorIdRef.current = visitorId;
|
visitorIdRef.current = visitorId;
|
||||||
|
|
||||||
flushEventsSync();
|
flushEventsSync();
|
||||||
@@ -184,7 +205,7 @@ export function InsightsProvider(props: InsightsProviderProps) {
|
|||||||
* Get the visitor ID and store it in a ref.
|
* Get the visitor ID and store it in a ref.
|
||||||
*/
|
*/
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
getVisitorId(appURL).then((visitorId) => {
|
getVisitorId(appURL, visitorCookieTrackingEnabled).then((visitorId) => {
|
||||||
visitorIdRef.current = visitorId;
|
visitorIdRef.current = visitorId;
|
||||||
// When the page is unloaded, flush all events, but only if the visitor ID is set
|
// When the page is unloaded, flush all events, but only if the visitor ID is set
|
||||||
window.addEventListener('beforeunload', flushEventsSync);
|
window.addEventListener('beforeunload', flushEventsSync);
|
||||||
@@ -192,7 +213,7 @@ export function InsightsProvider(props: InsightsProviderProps) {
|
|||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('beforeunload', flushEventsSync);
|
window.removeEventListener('beforeunload', flushEventsSync);
|
||||||
};
|
};
|
||||||
}, [flushEventsSync, appURL]);
|
}, [flushEventsSync, appURL, visitorCookieTrackingEnabled]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InsightsContext.Provider value={trackEvent}>
|
<InsightsContext.Provider value={trackEvent}>
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ export * from './InsightsProvider';
|
|||||||
export * from './visitorId';
|
export * from './visitorId';
|
||||||
export * from './cookies';
|
export * from './cookies';
|
||||||
export * from './TrackPageViewEvent';
|
export * from './TrackPageViewEvent';
|
||||||
|
export * from './useVisitedPages';
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import { create } from 'zustand';
|
||||||
|
|
||||||
|
type VisitedPage = {
|
||||||
|
spaceId: string;
|
||||||
|
pageId: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A store for the pages that have been visited in the current session.
|
||||||
|
*/
|
||||||
|
export const useVisitedPages = create<{
|
||||||
|
pages: VisitedPage[];
|
||||||
|
addPage: (page: VisitedPage) => void;
|
||||||
|
}>((set) => ({
|
||||||
|
pages: [],
|
||||||
|
addPage: (page) =>
|
||||||
|
set((state) => {
|
||||||
|
const lastPage = state.pages[state.pages.length - 1];
|
||||||
|
if (lastPage && lastPage.spaceId === page.spaceId && lastPage.pageId === page.pageId) {
|
||||||
|
return { pages: state.pages };
|
||||||
|
}
|
||||||
|
|
||||||
|
return { pages: [...state.pages, page] };
|
||||||
|
}),
|
||||||
|
}));
|
||||||
@@ -13,10 +13,13 @@ let pendingVisitorId: Promise<string> | null = null;
|
|||||||
/**
|
/**
|
||||||
* Return the current visitor identifier.
|
* Return the current visitor identifier.
|
||||||
*/
|
*/
|
||||||
export async function getVisitorId(appURL: string): Promise<string> {
|
export async function getVisitorId(
|
||||||
|
appURL: string,
|
||||||
|
visitorCookieTrackingEnabled: boolean
|
||||||
|
): Promise<string> {
|
||||||
if (!visitorId) {
|
if (!visitorId) {
|
||||||
if (!pendingVisitorId) {
|
if (!pendingVisitorId) {
|
||||||
pendingVisitorId = fetchVisitorID(appURL).finally(() => {
|
pendingVisitorId = fetchVisitorID(appURL, visitorCookieTrackingEnabled).finally(() => {
|
||||||
pendingVisitorId = null;
|
pendingVisitorId = null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -30,10 +33,13 @@ export async function getVisitorId(appURL: string): Promise<string> {
|
|||||||
/**
|
/**
|
||||||
* Propose a visitor identifier to the GitBook.com server and get the devideId back.
|
* Propose a visitor identifier to the GitBook.com server and get the devideId back.
|
||||||
*/
|
*/
|
||||||
async function fetchVisitorID(appURL: string): Promise<string> {
|
async function fetchVisitorID(
|
||||||
|
appURL: string,
|
||||||
|
visitorCookieTrackingEnabled: boolean
|
||||||
|
): Promise<string> {
|
||||||
const withoutCookies = isCookiesTrackingDisabled();
|
const withoutCookies = isCookiesTrackingDisabled();
|
||||||
|
|
||||||
if (withoutCookies) {
|
if (withoutCookies || !visitorCookieTrackingEnabled) {
|
||||||
return generateRandomId();
|
return generateRandomId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {
|
import {
|
||||||
type CustomizationSettings,
|
|
||||||
type Revision,
|
type Revision,
|
||||||
type RevisionPageDocument,
|
type RevisionPageDocument,
|
||||||
type RevisionPageGroup,
|
type RevisionPageGroup,
|
||||||
@@ -21,15 +20,15 @@ import { TrademarkLink } from '@/components/TableOfContents/Trademark';
|
|||||||
import type { PolymorphicComponentProp } from '@/components/utils/types';
|
import type { PolymorphicComponentProp } from '@/components/utils/types';
|
||||||
import { getSpaceLanguage } from '@/intl/server';
|
import { getSpaceLanguage } from '@/intl/server';
|
||||||
import { tString } from '@/intl/translate';
|
import { tString } from '@/intl/translate';
|
||||||
import { getPagePDFContainerId } from '@/lib/links';
|
|
||||||
import { resolvePageId } from '@/lib/pages';
|
import { resolvePageId } from '@/lib/pages';
|
||||||
import { tcls } from '@/lib/tailwind';
|
import { tcls } from '@/lib/tailwind';
|
||||||
import { defaultCustomizationForSpace } from '@/lib/utils';
|
import { defaultCustomization } from '@/lib/utils';
|
||||||
import { type PDFSearchParams, getPDFSearchParams } from './urls';
|
import { type PDFSearchParams, getPDFSearchParams } from './urls';
|
||||||
|
|
||||||
import { PageControlButtons } from './PageControlButtons';
|
import { PageControlButtons } from './PageControlButtons';
|
||||||
import { PrintButton } from './PrintButton';
|
import { PrintButton } from './PrintButton';
|
||||||
import './pdf.css';
|
import './pdf.css';
|
||||||
|
import { sanitizeGitBookAppURL } from '@/lib/app';
|
||||||
|
|
||||||
const DEFAULT_LIMIT = 100;
|
const DEFAULT_LIMIT = 100;
|
||||||
|
|
||||||
@@ -57,7 +56,7 @@ export async function PDFPage(props: {
|
|||||||
const pdfParams = getPDFSearchParams(new URLSearchParams(searchParams));
|
const pdfParams = getPDFSearchParams(new URLSearchParams(searchParams));
|
||||||
|
|
||||||
const customization =
|
const customization =
|
||||||
'customization' in baseContext ? baseContext.customization : defaultCustomizationForSpace();
|
'customization' in baseContext ? baseContext.customization : defaultCustomization();
|
||||||
const language = getSpaceLanguage(customization);
|
const language = getSpaceLanguage(customization);
|
||||||
|
|
||||||
// Compute the pages to render
|
// Compute the pages to render
|
||||||
@@ -93,7 +92,10 @@ export async function PDFPage(props: {
|
|||||||
<div className={tcls('fixed', 'left-12', 'top-12', 'print:hidden', 'z-50')}>
|
<div className={tcls('fixed', 'left-12', 'top-12', 'print:hidden', 'z-50')}>
|
||||||
<a
|
<a
|
||||||
title={tString(language, 'pdf_goback')}
|
title={tString(language, 'pdf_goback')}
|
||||||
href={pdfParams.back ?? linker.toAbsoluteURL(linker.toPathInSpace(''))}
|
href={
|
||||||
|
(pdfParams.back ? sanitizeGitBookAppURL(pdfParams.back) : null) ??
|
||||||
|
linker.toAbsoluteURL(linker.toPathInSpace(''))
|
||||||
|
}
|
||||||
className={tcls(
|
className={tcls(
|
||||||
'flex',
|
'flex',
|
||||||
'flex-row',
|
'flex-row',
|
||||||
@@ -180,7 +182,7 @@ export async function PDFPage(props: {
|
|||||||
|
|
||||||
async function PDFSpaceIntro(props: {
|
async function PDFSpaceIntro(props: {
|
||||||
space: Space;
|
space: Space;
|
||||||
customization: CustomizationSettings | SiteCustomizationSettings;
|
customization: SiteCustomizationSettings;
|
||||||
}) {
|
}) {
|
||||||
const { space, customization } = props;
|
const { space, customization } = props;
|
||||||
|
|
||||||
@@ -354,3 +356,13 @@ function selectPages(
|
|||||||
});
|
});
|
||||||
return limitTo(allPages);
|
return limitTo(allPages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the HTML ID for the container of a page or a given anchor in it.
|
||||||
|
*/
|
||||||
|
function getPagePDFContainerId(
|
||||||
|
page: RevisionPageDocument | RevisionPageGroup,
|
||||||
|
anchor?: string
|
||||||
|
): string {
|
||||||
|
return `pdf-page-${page.id}${anchor ? `-${anchor}` : ''}`;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { CustomizationRootLayout } from '@/components/RootLayout';
|
import { CustomizationRootLayout } from '@/components/RootLayout';
|
||||||
import { defaultCustomizationForSpace } from '@/lib/utils';
|
import { defaultCustomization } from '@/lib/utils';
|
||||||
|
import { CustomizationThemeMode } from '@gitbook/api';
|
||||||
import type { GitBookSiteContext, GitBookSpaceContext } from '@v2/lib/context';
|
import type { GitBookSiteContext, GitBookSpaceContext } from '@v2/lib/context';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,8 +15,9 @@ export async function PDFRootLayout(props: {
|
|||||||
return (
|
return (
|
||||||
<CustomizationRootLayout
|
<CustomizationRootLayout
|
||||||
customization={
|
customization={
|
||||||
'customization' in context ? context.customization : defaultCustomizationForSpace()
|
'customization' in context ? context.customization : defaultCustomization()
|
||||||
}
|
}
|
||||||
|
forcedTheme={CustomizationThemeMode.Light}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</CustomizationRootLayout>
|
</CustomizationRootLayout>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import React from 'react';
|
|||||||
|
|
||||||
import { useScrollActiveId } from '@/components/hooks';
|
import { useScrollActiveId } from '@/components/hooks';
|
||||||
import { Button } from '@/components/primitives';
|
import { Button } from '@/components/primitives';
|
||||||
import { t, useLanguage } from '@/intl/client';
|
import { t, tString, useLanguage } from '@/intl/client';
|
||||||
import { tcls } from '@/lib/tailwind';
|
import { tcls } from '@/lib/tailwind';
|
||||||
import { type PDFSearchParams, getPDFURLSearchParams } from './urls';
|
import { type PDFSearchParams, getPDFURLSearchParams } from './urls';
|
||||||
|
|
||||||
@@ -58,9 +58,8 @@ export function PageControlButtons(props: {
|
|||||||
only: true,
|
only: true,
|
||||||
}).toString()}`}
|
}).toString()}`}
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
>
|
label={tString(language, 'pdf_mode_only_page')}
|
||||||
{t(language, 'pdf_mode_only_page')}
|
/>
|
||||||
</Button>
|
|
||||||
)}
|
)}
|
||||||
<Button
|
<Button
|
||||||
href={`?${getPDFURLSearchParams({
|
href={`?${getPDFURLSearchParams({
|
||||||
@@ -69,9 +68,8 @@ export function PageControlButtons(props: {
|
|||||||
only: false,
|
only: false,
|
||||||
}).toString()}`}
|
}).toString()}`}
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
>
|
label={tString(language, 'pdf_mode_all')}
|
||||||
{t(language, 'pdf_mode_all')}
|
/>
|
||||||
</Button>
|
|
||||||
|
|
||||||
{trademark ? <div className={tcls('mt-5')}>{trademark}</div> : null}
|
{trademark ? <div className={tcls('mt-5')}>{trademark}</div> : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export function PageAside(props: {
|
|||||||
) : null}
|
) : null}
|
||||||
<div
|
<div
|
||||||
className={tcls(
|
className={tcls(
|
||||||
'sticky bottom-0 z-10 mt-auto flex flex-col bg-tint-base theme-bold-tint:bg-tint-subtle theme-gradient-tint:bg-gradient-tint theme-gradient:bg-gradient-primary theme-muted:bg-tint-subtle pb-4 page-api-block:xl:max-2xl:hidden page-api-block:xl:max-2xl:pb-0 page-api-block:xl:max-2xl:group-hover/aside:flex',
|
'sticky bottom-0 z-10 mt-auto flex flex-col bg-tint-base theme-gradient-tint:bg-gradient-tint theme-gradient:bg-gradient-primary theme-muted:bg-tint-subtle pb-4 page-api-block:xl:max-2xl:hidden page-api-block:xl:max-2xl:pb-0 page-api-block:xl:max-2xl:group-hover/aside:flex [html.sidebar-filled.theme-bold.tint_&]:bg-tint-subtle',
|
||||||
'page-api-block:xl:max-2xl:bg-transparent'
|
'page-api-block:xl:max-2xl:bg-transparent'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user