Compare commits

..

1 Commits

Author SHA1 Message Date
Peng Xiao
adaee0ef5f feat(component): sortable 2025-03-31 17:21:52 +08:00
1819 changed files with 18800 additions and 26112 deletions

View File

@@ -6,7 +6,7 @@
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "22"
"version": "18"
},
"ghcr.io/devcontainers/features/rust:1": {}
},

View File

@@ -1,6 +0,0 @@
{
"$schema": "https://github.com/toeverything/affine/releases/latest/download/config.schema.json",
"server": {
"name": "AFFiNE Self Hosted Server"
}
}

View File

@@ -3,6 +3,42 @@
"title": "AFFiNE Application Configuration",
"type": "object",
"properties": {
"redis": {
"type": "object",
"description": "Configuration for redis module",
"properties": {
"db": {
"type": "number",
"description": "The database index of redis server to be used(Must be less than 10).\n@default 0\n@environment `REDIS_DATABASE`",
"default": 0
},
"host": {
"type": "string",
"description": "The host of the redis server.\n@default \"localhost\"\n@environment `REDIS_HOST`",
"default": "localhost"
},
"port": {
"type": "number",
"description": "The port of the redis server.\n@default 6379\n@environment `REDIS_PORT`",
"default": 6379
},
"username": {
"type": "string",
"description": "The username of the redis server.\n@default \"\"\n@environment `REDIS_USERNAME`",
"default": ""
},
"password": {
"type": "string",
"description": "The password of the redis server.\n@default \"\"\n@environment `REDIS_PASSWORD`",
"default": ""
},
"ioredis": {
"type": "object",
"description": "The config for the ioredis client.\n@default {}\n@link https://github.com/luin/ioredis",
"default": {}
}
}
},
"metrics": {
"type": "object",
"description": "Configuration for metrics module",
@@ -14,6 +50,25 @@
}
}
},
"graphql": {
"type": "object",
"description": "Configuration for graphql module",
"properties": {
"apolloDriverConfig": {
"type": "object",
"description": "The config for underlying nestjs GraphQL and apollo driver engine.\n@default {\"buildSchemaOptions\":{\"numberScalarMode\":\"integer\"},\"useGlobalPrefix\":true,\"playground\":true,\"introspection\":true,\"sortSchema\":true}\n@link https://docs.nestjs.com/graphql/quick-start",
"default": {
"buildSchemaOptions": {
"numberScalarMode": "integer"
},
"useGlobalPrefix": true,
"playground": true,
"introspection": true,
"sortSchema": true
}
}
}
},
"crypto": {
"type": "object",
"description": "Configuration for crypto module",
@@ -31,20 +86,25 @@
"properties": {
"queue": {
"type": "object",
"description": "The config for job queues\n@default {\"attempts\":5,\"removeOnComplete\":true,\"removeOnFail\":{\"age\":86400,\"count\":500}}\n@link https://api.docs.bullmq.io/interfaces/v5.QueueOptions.html",
"description": "The config for job queues\n@default {\"prefix\":\"affine_job\",\"defaultJobOptions\":{\"attempts\":5,\"removeOnComplete\":true,\"removeOnFail\":{\"age\":86400,\"count\":500}}}\n@link https://api.docs.bullmq.io/interfaces/v5.QueueOptions.html",
"default": {
"attempts": 5,
"removeOnComplete": true,
"removeOnFail": {
"age": 86400,
"count": 500
"prefix": "affine_job",
"defaultJobOptions": {
"attempts": 5,
"removeOnComplete": true,
"removeOnFail": {
"age": 86400,
"count": 500
}
}
}
},
"worker": {
"type": "object",
"description": "The config for job workers\n@default {}\n@link https://api.docs.bullmq.io/interfaces/v5.WorkerOptions.html",
"default": {}
"description": "The config for job workers\n@default {\"defaultWorkerOptions\":{}}\n@link https://api.docs.bullmq.io/interfaces/v5.WorkerOptions.html",
"default": {
"defaultWorkerOptions": {}
}
},
"queues.copilot": {
"type": "object",
@@ -149,6 +209,22 @@
}
}
},
"db": {
"type": "object",
"description": "Configuration for db module",
"properties": {
"datasourceUrl": {
"type": "string",
"description": "The datasource url for the prisma client.\n@default \"postgresql://localhost:5432/affine\"\n@environment `DATABASE_URL`",
"default": "postgresql://localhost:5432/affine"
},
"prisma": {
"type": "object",
"description": "The config for the prisma client.\n@default {}\n@link https://www.prisma.io/docs/reference/api-reference/prisma-client-reference",
"default": {}
}
}
},
"auth": {
"type": "object",
"description": "Configuration for auth module",
@@ -351,24 +427,6 @@
"accountId": {
"type": "string",
"description": "The account id for the cloudflare r2 storage provider."
},
"usePresignedURL": {
"type": "object",
"description": "The presigned url config for the cloudflare r2 storage provider.",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether to use presigned url for the cloudflare r2 storage provider."
},
"urlPrefix": {
"type": "string",
"description": "The presigned url prefix for the cloudflare r2 storage provider.\nsee https://developers.cloudflare.com/waf/custom-rules/use-cases/configure-token-authentication/ to configure it.\nExample value: \"https://storage.example.com\"\nExample rule: is_timed_hmac_valid_v0(\"your_secret\", http.request.uri, 10800, http.request.timestamp.sec, 6)"
},
"signKey": {
"type": "string",
"description": "The presigned key for the cloudflare r2 storage provider."
}
}
}
}
}
@@ -472,24 +530,6 @@
"accountId": {
"type": "string",
"description": "The account id for the cloudflare r2 storage provider."
},
"usePresignedURL": {
"type": "object",
"description": "The presigned url config for the cloudflare r2 storage provider.",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether to use presigned url for the cloudflare r2 storage provider."
},
"urlPrefix": {
"type": "string",
"description": "The presigned url prefix for the cloudflare r2 storage provider.\nsee https://developers.cloudflare.com/waf/custom-rules/use-cases/configure-token-authentication/ to configure it.\nExample value: \"https://storage.example.com\"\nExample rule: is_timed_hmac_valid_v0(\"your_secret\", http.request.uri, 10800, http.request.timestamp.sec, 6)"
},
"signKey": {
"type": "string",
"description": "The presigned key for the cloudflare r2 storage provider."
}
}
}
}
}
@@ -517,8 +557,8 @@
},
"externalUrl": {
"type": "string",
"description": "Base url of AFFiNE server, used for generating external urls.\nDefault to be `[server.protocol]://[server.host][:server.port]` if not specified.\n \n@default \"\"\n@environment `AFFINE_SERVER_EXTERNAL_URL`",
"default": ""
"description": "Base url of AFFiNE server, used for generating external urls.\nDefault to be `[server.protocol]://[server.host][:server.port]` if not specified.\n \n@default \"http://localhost:3010\"\n@environment `AFFINE_SERVER_EXTERNAL_URL`",
"default": "http://localhost:3010"
},
"https": {
"type": "boolean",
@@ -553,17 +593,6 @@
}
}
},
"docService": {
"type": "object",
"description": "Configuration for docService module",
"properties": {
"endpoint": {
"type": "string",
"description": "The endpoint of the doc service.\n@default \"\"\n@environment `DOC_SERVICE_ENDPOINT`",
"default": ""
}
}
},
"client": {
"type": "object",
"description": "Configuration for client module",
@@ -736,24 +765,6 @@
"accountId": {
"type": "string",
"description": "The account id for the cloudflare r2 storage provider."
},
"usePresignedURL": {
"type": "object",
"description": "The presigned url config for the cloudflare r2 storage provider.",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether to use presigned url for the cloudflare r2 storage provider."
},
"urlPrefix": {
"type": "string",
"description": "The presigned url prefix for the cloudflare r2 storage provider.\nsee https://developers.cloudflare.com/waf/custom-rules/use-cases/configure-token-authentication/ to configure it.\nExample value: \"https://storage.example.com\"\nExample rule: is_timed_hmac_valid_v0(\"your_secret\", http.request.uri, 10800, http.request.timestamp.sec, 6)"
},
"signKey": {
"type": "string",
"description": "The presigned key for the cloudflare r2 storage provider."
}
}
}
}
}
@@ -866,7 +877,7 @@
},
"stripe": {
"type": "object",
"description": "Stripe sdk options\n@default {}\n@link https://docs.stripe.com/api",
"description": "Stripe API keys\n@default {}\n@link https://docs.stripe.com/api",
"default": {}
}
}

View File

@@ -10,7 +10,6 @@ const {
DATABASE_USERNAME,
DATABASE_PASSWORD,
DATABASE_NAME,
GCLOUD_CONNECTION_NAME,
CLOUD_SQL_IAM_ACCOUNT,
APP_IAM_ACCOUNT,
REDIS_SERVER_HOST,
@@ -72,7 +71,6 @@ const createHelmCommand = ({ isDryRun }) => {
isProduction || isBeta || isInternal
? [
`--set cloud-sql-proxy.enabled=true`,
`--set-string cloud-sql-proxy.database.connectionName="${GCLOUD_CONNECTION_NAME}"`,
`--set-string global.database.host=${DATABASE_URL}`,
`--set-string global.database.user=${DATABASE_USERNAME}`,
`--set-string global.database.password=${DATABASE_PASSWORD}`,

View File

@@ -3,4 +3,4 @@ name: affine
description: AFFiNE cloud chart
type: application
version: 0.0.0
appVersion: "0.21.0"
appVersion: "0.20.0"

View File

@@ -1,7 +1,5 @@
replicaCount: 3
enabled: false
database:
connectionName: ""
image:
# the tag is defined as chart appVersion.

View File

@@ -3,7 +3,7 @@ name: graphql
description: AFFiNE GraphQL server
type: application
version: 0.0.0
appVersion: "0.21.0"
appVersion: "0.20.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0

View File

@@ -3,7 +3,7 @@ name: sync
description: AFFiNE Sync Server
type: application
version: 0.0.0
appVersion: "0.21.0"
appVersion: "0.20.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0

View File

@@ -92,16 +92,34 @@ jobs:
APP_VERSION: ${{ steps.version.outputs.APP_VERSION }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
CANARY_DEPLOY_HOST: ${{ secrets.CANARY_DEPLOY_HOST }}
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
CAPTCHA_TURNSTILE_SECRET: ${{ secrets.CAPTCHA_TURNSTILE_SECRET }}
COPILOT_OPENAI_API_KEY: ${{ secrets.COPILOT_OPENAI_API_KEY }}
COPILOT_FAL_API_KEY: ${{ secrets.COPILOT_FAL_API_KEY }}
COPILOT_GOOGLE_API_KEY: ${{ secrets.COPILOT_GOOGLE_API_KEY }}
COPILOT_PERPLEXITY_API_KEY: ${{ secrets.COPILOT_PERPLEXITY_API_KEY }}
COPILOT_UNSPLASH_API_KEY: ${{ secrets.COPILOT_UNSPLASH_API_KEY }}
METRICS_CUSTOMER_IO_TOKEN: ${{ secrets.METRICS_CUSTOMER_IO_TOKEN }}
MAILER_SENDER: ${{ secrets.OAUTH_EMAIL_SENDER }}
MAILER_USER: ${{ secrets.OAUTH_EMAIL_LOGIN }}
MAILER_PASSWORD: ${{ secrets.OAUTH_EMAIL_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AFFINE_GOOGLE_CLIENT_ID: ${{ secrets.AFFINE_GOOGLE_CLIENT_ID }}
AFFINE_GOOGLE_CLIENT_SECRET: ${{ secrets.AFFINE_GOOGLE_CLIENT_SECRET }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
DATABASE_NAME: ${{ secrets.DATABASE_NAME }}
GCLOUD_CONNECTION_NAME: ${{ secrets.GCLOUD_CONNECTION_NAME }}
GCLOUD_CLOUD_SQL_INTERNAL_ENDPOINT: ${{ secrets.GCLOUD_CLOUD_SQL_INTERNAL_ENDPOINT }}
REDIS_SERVER_HOST: ${{ secrets.REDIS_SERVER_HOST }}
REDIS_SERVER_PASSWORD: ${{ secrets.REDIS_SERVER_PASSWORD }}
CLOUD_SQL_IAM_ACCOUNT: ${{ secrets.CLOUD_SQL_IAM_ACCOUNT }}
APP_IAM_ACCOUNT: ${{ secrets.APP_IAM_ACCOUNT }}
STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }}
STRIPE_WEBHOOK_KEY: ${{ secrets.STRIPE_WEBHOOK_KEY }}
STATIC_IP_NAME: ${{ secrets.STATIC_IP_NAME }}
deploy-done:

View File

@@ -142,19 +142,11 @@ jobs:
# some flatpak deps need git protocol.file.allow
git config --global protocol.file.allow always
- name: Remove nbstore node_modules
shell: bash
# node_modules of nbstore is not needed for building, and it will make the build process out of memory
run: |
rm -rf packages/frontend/apps/electron/node_modules/@affine/nbstore/node_modules/@blocksuite
rm -rf packages/frontend/apps/electron/node_modules/@affine/native/node_modules
- name: make
run: yarn affine @affine/electron make --platform=${{ matrix.spec.platform }} --arch=${{ matrix.spec.arch }}
env:
SKIP_WEB_BUILD: 1
HOIST_NODE_MODULES: 1
NODE_OPTIONS: --max-old-space-size=14384
- name: signing DMG
if: ${{ matrix.spec.platform == 'darwin' }}
@@ -248,20 +240,11 @@ jobs:
- name: Build Desktop Layers
run: yarn affine @affine/electron build
- name: Remove nbstore node_modules
shell: bash
# node_modules of nbstore is not needed for building, and it will make the build process out of memory
run: |
rm -rf packages/frontend/apps/electron/node_modules/@affine/nbstore/node_modules/@blocksuite
rm -rf packages/frontend/apps/electron/node_modules/@affine/native/node_modules
- name: package
run: |
yarn affine @affine/electron package --platform=${{ matrix.spec.platform }} --arch=${{ matrix.spec.arch }}
run: yarn affine @affine/electron package --platform=${{ matrix.spec.platform }} --arch=${{ matrix.spec.arch }}
env:
SKIP_WEB_BUILD: 1
HOIST_NODE_MODULES: 1
NODE_OPTIONS: --max-old-space-size=14384
- name: get all files to be signed
id: get_files_to_be_signed
@@ -460,7 +443,6 @@ jobs:
run: |
cp ./.docker/selfhost/compose.yml ./release/docker-compose.yml
cp ./.docker/selfhost/.env.example ./release/.env.example
cp ./.docker/selfhost/schema.json ./release/config.schema.json
- name: Generate Release yml
run: |
node ./scripts/generate-release-yml.mjs

View File

@@ -117,31 +117,10 @@ jobs:
name: android
path: packages/frontend/apps/android/dist
determine-ios-runner:
runs-on: ubuntu-latest
ios:
runs-on: namespace-profile-macos
needs:
- build-ios-web
outputs:
RUNNER: ${{ steps.runner.outputs.RUNNER }}
steps:
- name: Determine Runner
id: runner
# Randomly pick runner with 80% chance for blaze/macos-14 and 20% chance for namespace-profile-macos
# blaze/macos-14 is free but has limited concurrency
run: |
RANDOM_NUMBER=$(( $RANDOM % 100 + 1 ))
if [ $RANDOM_NUMBER -le 20 ]; then
echo "Selected namespace-profile-macos (20% probability)"
echo "RUNNER=namespace-profile-macos" >> $GITHUB_OUTPUT
else
echo "Selected blaze/macos-14 (80% probability)"
echo "RUNNER=blaze/macos-14" >> $GITHUB_OUTPUT
fi
ios:
runs-on: ${{ github.ref_name == 'canary' && 'macos-latest' || needs.determine-ios-runner.outputs.RUNNER }}
needs:
- determine-ios-runner
steps:
- uses: actions/checkout@v4
- name: Download mobile artifact

File diff suppressed because one or more lines are too long

View File

@@ -12,4 +12,4 @@ npmPublishAccess: public
npmPublishRegistry: "https://registry.npmjs.org"
yarnPath: .yarn/releases/yarn-4.8.1.cjs
yarnPath: .yarn/releases/yarn-4.8.0.cjs

374
Cargo.lock generated
View File

@@ -81,6 +81,7 @@ dependencies = [
"coreaudio-rs",
"dispatch2",
"libc",
"mp3lame-encoder",
"napi",
"napi-build",
"napi-derive",
@@ -348,7 +349,7 @@ dependencies = [
"derive_utils",
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -357,6 +358,15 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "autotools"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef941527c41b0fc0dd48511a8154cd5fc7e29200a0ff8b7203c5d777dbc795cf"
dependencies = [
"cc",
]
[[package]]
name = "backtrace"
version = "0.3.74"
@@ -396,9 +406,9 @@ dependencies = [
[[package]]
name = "base64ct"
version = "1.7.3"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3"
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
[[package]]
name = "basic-toml"
@@ -424,7 +434,7 @@ dependencies = [
"regex",
"rustc-hash 1.1.0",
"shlex",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -498,18 +508,18 @@ dependencies = [
[[package]]
name = "borsh"
version = "1.5.7"
version = "1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce"
checksum = "5430e3be710b68d984d1391c854eb431a9d548640711faa54eecb1df93db91cc"
dependencies = [
"cfg_aliases",
]
[[package]]
name = "bpaf"
version = "0.9.19"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4848ed5727d39a7573551c205bcb1ccd88c8cad4ed2c80f62e2316f208196b8d"
checksum = "4de4d74c5891642753c67ab88f58d971a68dd98673b69689a8c24ce3ec78a412"
[[package]]
name = "bstr"
@@ -719,9 +729,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.35"
version = "4.5.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944"
checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767"
dependencies = [
"clap_builder",
"clap_derive",
@@ -729,9 +739,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.35"
version = "4.5.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9"
checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863"
dependencies = [
"anstream",
"anstyle",
@@ -741,14 +751,14 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "4.5.32"
version = "4.5.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7"
checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -1058,7 +1068,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -1071,7 +1081,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustc_version",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -1082,7 +1092,7 @@ checksum = "ccfae181bab5ab6c5478b2ccb69e4c68a02f8c3ec72f6616bfec9dbc599d2ee0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -1123,7 +1133,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -1249,9 +1259,9 @@ dependencies = [
[[package]]
name = "event-listener-strategy"
version = "0.5.4"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"
checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2"
dependencies = [
"event-listener",
"pin-project-lite",
@@ -1288,9 +1298,9 @@ checksum = "e7ef3d5e8ae27277c8285ac43ed153158178ef0f79567f32024ca8140a0c7cd8"
[[package]]
name = "flate2"
version = "1.1.1"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece"
checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc"
dependencies = [
"crc32fast",
"miniz_oxide",
@@ -1315,9 +1325,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "foldhash"
version = "0.1.5"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f"
[[package]]
name = "foreign-types"
@@ -1337,7 +1347,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -1494,14 +1504,14 @@ dependencies = [
[[package]]
name = "getrandom"
version = "0.3.2"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0"
checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
dependencies = [
"cfg-if",
"libc",
"r-efi",
"wasi 0.14.2+wasi-0.2.4",
"wasi 0.13.3+wasi-0.2.2",
"windows-targets 0.52.6",
]
[[package]]
@@ -1529,9 +1539,9 @@ dependencies = [
[[package]]
name = "half"
version = "2.5.0"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1"
checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
dependencies = [
"cfg-if",
"crunchy",
@@ -1659,17 +1669,16 @@ dependencies = [
[[package]]
name = "iana-time-zone"
version = "0.1.63"
version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8"
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"log",
"wasm-bindgen",
"windows-core 0.61.0",
"windows-core 0.52.0",
]
[[package]]
@@ -1722,9 +1731,9 @@ dependencies = [
[[package]]
name = "icu_locid_transform_data"
version = "1.5.1"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d"
checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
[[package]]
name = "icu_normalizer"
@@ -1746,9 +1755,9 @@ dependencies = [
[[package]]
name = "icu_normalizer_data"
version = "1.5.1"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7"
checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
[[package]]
name = "icu_properties"
@@ -1767,9 +1776,9 @@ dependencies = [
[[package]]
name = "icu_properties_data"
version = "1.5.1"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2"
checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
[[package]]
name = "icu_provider"
@@ -1796,7 +1805,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -1817,9 +1826,9 @@ dependencies = [
[[package]]
name = "icu_segmenter_data"
version = "1.5.1"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1e52775179941363cc594e49ce99284d13d6948928d8e72c755f55e98caa1eb"
checksum = "f739ee737260d955e330bc83fdeaaf1631f7fb7ed218761d3c04bb13bb7d79df"
[[package]]
name = "idna"
@@ -1844,9 +1853,9 @@ dependencies = [
[[package]]
name = "indexmap"
version = "2.8.0"
version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058"
checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
dependencies = [
"equivalent",
"hashbrown 0.15.2",
@@ -1997,9 +2006,9 @@ checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa"
[[package]]
name = "libmimalloc-sys"
version = "0.1.41"
version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b20daca3a4ac14dbdc753c5e90fc7b490a48a9131daed3c9a9ced7b2defd37b"
checksum = "07d0e07885d6a754b9c7993f2625187ad694ee985d60f23355ff0e7077261502"
dependencies = [
"cc",
"libc",
@@ -2018,9 +2027,9 @@ dependencies = [
[[package]]
name = "linux-raw-sys"
version = "0.9.3"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413"
checksum = "6db9c683daf087dc577b7506e9695b3d556a9f3849903fa28186283afd6809e9"
[[package]]
name = "litemap"
@@ -2040,9 +2049,9 @@ dependencies = [
[[package]]
name = "log"
version = "0.4.27"
version = "0.4.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
[[package]]
name = "loom"
@@ -2153,9 +2162,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "mimalloc"
version = "0.1.45"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03cb1f88093fe50061ca1195d336ffec131347c7b833db31f9ab62a2d1b7925f"
checksum = "99585191385958383e13f6b822e6b6d8d9cf928e7d286ceb092da92b43c87bc1"
dependencies = [
"libmimalloc-sys",
]
@@ -2184,9 +2193,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
version = "0.8.7"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff70ce3e48ae43fa075863cef62e8b43b71a4f2382229920e0df362592919430"
checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
dependencies = [
"adler2",
]
@@ -2202,6 +2211,27 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "mp3lame-encoder"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc8c8b5cdbe788ccd1098c3d3635298a011cffdebdd3460c9ca5060a7551557b"
dependencies = [
"libc",
"mp3lame-sys",
]
[[package]]
name = "mp3lame-sys"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acaec8842b2ebd61692a6c8c2b9f3edbf5c36e5e5c4677b5911430eaf859377c"
dependencies = [
"autotools",
"cc",
"libc",
]
[[package]]
name = "nanoid"
version = "0.4.0"
@@ -2243,7 +2273,7 @@ dependencies = [
"napi-derive-backend",
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -2256,7 +2286,7 @@ dependencies = [
"proc-macro2",
"quote",
"semver",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -2400,7 +2430,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -2471,9 +2501,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.21.3"
version = "1.21.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
checksum = "c2806eaa3524762875e21c3dcd057bc4b7bfa01ce4da8d46be1cd43649e1cc6b"
[[package]]
name = "oorandom"
@@ -2704,11 +2734,11 @@ checksum = "78451badbdaebaf17f053fd9152b3ffb33b516104eacb45e7864aaa9c712f306"
[[package]]
name = "ppv-lite86"
version = "0.2.21"
version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
dependencies = [
"zerocopy 0.8.24",
"zerocopy 0.7.35",
]
[[package]]
@@ -2757,19 +2787,13 @@ dependencies = [
[[package]]
name = "quote"
version = "1.0.40"
version = "1.0.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801"
dependencies = [
"proc-macro2",
]
[[package]]
name = "r-efi"
version = "5.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
[[package]]
name = "radium"
version = "0.7.0"
@@ -2795,7 +2819,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
dependencies = [
"rand_chacha 0.9.0",
"rand_core 0.9.3",
"zerocopy 0.8.24",
"zerocopy 0.8.23",
]
[[package]]
@@ -2833,7 +2857,7 @@ version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
dependencies = [
"getrandom 0.3.2",
"getrandom 0.3.1",
]
[[package]]
@@ -2949,9 +2973,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "ring"
version = "0.17.14"
version = "0.17.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee"
dependencies = [
"cc",
"cfg-if",
@@ -2986,7 +3010,7 @@ dependencies = [
"rinja_parser",
"rustc-hash 2.1.1",
"serde",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -3002,9 +3026,9 @@ dependencies = [
[[package]]
name = "rsa"
version = "0.9.8"
version = "0.9.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b"
checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519"
dependencies = [
"const-oid",
"digest",
@@ -3022,9 +3046,9 @@ dependencies = [
[[package]]
name = "rubato"
version = "0.16.2"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5258099699851cfd0082aeb645feb9c084d9a5e1f1b8d5372086b989fc5e56a1"
checksum = "cdd96992d7e24b3d7f35fdfe02af037a356ac90d41b466945cf3333525a86eea"
dependencies = [
"num-complex",
"num-integer",
@@ -3076,9 +3100,9 @@ dependencies = [
[[package]]
name = "rustix"
version = "1.0.5"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf"
checksum = "dade4812df5c384711475be5fcd8c162555352945401aed22a35bffeab61f657"
dependencies = [
"bitflags 2.9.0",
"errno",
@@ -3089,9 +3113,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.25"
version = "0.23.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c"
checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395"
dependencies = [
"once_cell",
"ring",
@@ -3118,9 +3142,9 @@ checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
[[package]]
name = "rustls-webpki"
version = "0.103.1"
version = "0.102.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fef8b8769aaccf73098557a87cd1816b4f9c7c16811c9c77142aa695c16f2c03"
checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
dependencies = [
"ring",
"rustls-pki-types",
@@ -3193,7 +3217,7 @@ checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -3222,7 +3246,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -3364,9 +3388,9 @@ dependencies = [
[[package]]
name = "socket2"
version = "0.5.9"
version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef"
checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
dependencies = [
"libc",
"windows-sys 0.52.0",
@@ -3451,7 +3475,7 @@ dependencies = [
"quote",
"sqlx-core",
"sqlx-macros-core",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -3474,7 +3498,7 @@ dependencies = [
"sqlx-mysql",
"sqlx-postgres",
"sqlx-sqlite",
"syn 2.0.100",
"syn 2.0.99",
"tempfile",
"tokio",
"url",
@@ -3611,9 +3635,9 @@ checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82"
[[package]]
name = "string_cache"
version = "0.8.9"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f"
checksum = "938d512196766101d333398efde81bc1f37b00cb42c2f8350e5df639f040bbbe"
dependencies = [
"new_debug_unreachable",
"parking_lot",
@@ -3670,7 +3694,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -3888,9 +3912,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.100"
version = "2.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2"
dependencies = [
"proc-macro2",
"quote",
@@ -3905,7 +3929,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -3916,12 +3940,13 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "tempfile"
version = "3.19.1"
version = "3.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf"
checksum = "2c317e0a526ee6120d8dabad239c8dadca62b24b6f168914bbbc8e2fb1f0e567"
dependencies = [
"cfg-if",
"fastrand",
"getrandom 0.3.2",
"getrandom 0.3.1",
"once_cell",
"rustix",
"windows-sys 0.59.0",
@@ -3992,7 +4017,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -4003,7 +4028,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -4059,9 +4084,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.44.2"
version = "1.44.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48"
checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a"
dependencies = [
"backtrace",
"bytes",
@@ -4083,7 +4108,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -4143,7 +4168,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -4297,9 +4322,9 @@ dependencies = [
[[package]]
name = "tree-sitter-rust"
version = "0.24.0"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b9b18034c684a2420722be8b2a91c9c44f2546b631c039edf575ccba8c61be1"
checksum = "a4d64d449ca63e683c562c7743946a646671ca23947b9c925c0cfbe65051a4af"
dependencies = [
"cc",
"tree-sitter-language",
@@ -4449,7 +4474,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9902d4ed16c65e6c0222241024dd0bfeed07ea3deb7c470eb175e5f5ef406cd"
dependencies = [
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -4464,7 +4489,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 2.0.100",
"syn 2.0.99",
"toml",
"uniffi_meta",
]
@@ -4539,7 +4564,7 @@ version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9"
dependencies = [
"getrandom 0.3.2",
"getrandom 0.3.1",
]
[[package]]
@@ -4590,9 +4615,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasi"
version = "0.14.2+wasi-0.2.4"
version = "0.13.3+wasi-0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
dependencies = [
"wit-bindgen-rt",
]
@@ -4625,7 +4650,7 @@ dependencies = [
"log",
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
"wasm-bindgen-shared",
]
@@ -4647,7 +4672,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -4687,9 +4712,9 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
[[package]]
name = "whoami"
version = "1.6.0"
version = "1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7"
checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d"
dependencies = [
"redox_syscall",
"wasite",
@@ -4697,9 +4722,9 @@ dependencies = [
[[package]]
name = "widestring"
version = "1.2.0"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d"
checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
[[package]]
name = "winapi"
@@ -4752,6 +4777,15 @@ dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.57.0"
@@ -4773,23 +4807,10 @@ dependencies = [
"windows-implement 0.58.0",
"windows-interface 0.58.0",
"windows-result 0.2.0",
"windows-strings 0.1.0",
"windows-strings",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
dependencies = [
"windows-implement 0.60.0",
"windows-interface 0.59.1",
"windows-link",
"windows-result 0.3.2",
"windows-strings 0.4.0",
]
[[package]]
name = "windows-implement"
version = "0.57.0"
@@ -4798,7 +4819,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -4809,18 +4830,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
]
[[package]]
name = "windows-implement"
version = "0.60.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -4831,7 +4841,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -4842,25 +4852,14 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
]
[[package]]
name = "windows-interface"
version = "0.59.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
name = "windows-link"
version = "0.1.1"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3"
[[package]]
name = "windows-result"
@@ -4880,15 +4879,6 @@ dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-result"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252"
dependencies = [
"windows-link",
]
[[package]]
name = "windows-strings"
version = "0.1.0"
@@ -4899,15 +4889,6 @@ dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-strings"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97"
dependencies = [
"windows-link",
]
[[package]]
name = "windows-sys"
version = "0.48.0"
@@ -5058,18 +5039,18 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winnow"
version = "0.7.4"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36"
checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1"
dependencies = [
"memchr",
]
[[package]]
name = "wit-bindgen-rt"
version = "0.39.0"
version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
dependencies = [
"bitflags 2.9.0",
]
@@ -5157,7 +5138,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
"synstructure",
]
@@ -5167,16 +5148,17 @@ version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
"byteorder",
"zerocopy-derive 0.7.35",
]
[[package]]
name = "zerocopy"
version = "0.8.24"
version = "0.8.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879"
checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6"
dependencies = [
"zerocopy-derive 0.8.24",
"zerocopy-derive 0.8.23",
]
[[package]]
@@ -5187,18 +5169,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
name = "zerocopy-derive"
version = "0.8.24"
version = "0.8.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be"
checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]
@@ -5218,7 +5200,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
"synstructure",
]
@@ -5247,7 +5229,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.100",
"syn 2.0.99",
]
[[package]]

View File

@@ -31,6 +31,7 @@ homedir = "0.3"
infer = { version = "0.19.0" }
libc = "0.2"
mimalloc = "0.1"
mp3lame-encoder = "0.2"
napi = { version = "3.0.0-alpha.31", features = ["async", "chrono_date", "error_anyhow", "napi9", "serde"] }
napi-build = { version = "2" }
napi-derive = { version = "3.0.0-alpha.28" }
@@ -65,7 +66,7 @@ tree-sitter-java = { version = "0.23" }
tree-sitter-javascript = { version = "0.23" }
tree-sitter-kotlin-ng = { version = "1.1" }
tree-sitter-python = { version = "0.23" }
tree-sitter-rust = { version = "0.24" }
tree-sitter-rust = { version = "0.23" }
tree-sitter-scala = { version = "0.23" }
tree-sitter-typescript = { version = "0.23" }
uniffi = "0.29"
@@ -82,7 +83,3 @@ codegen-units = 1
lto = true
opt-level = 3
strip = "symbols"
# android uniffi bindgen requires symbols
[profile.release.package.affine_mobile_native]
strip = "none"

View File

@@ -21,23 +21,6 @@
<br/>
<br/>
<div align="left" valign="middle">
<a href="https://runblaze.dev">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://www.runblaze.dev/logo_dark.png">
<img align="right" src="https://www.runblaze.dev/logo_light.png" height="102px"/>
</picture>
</a>
<br style="display: none;"/>
_Special thanks to [Blaze](https://runblaze.dev) for their support of this project. They provide high-performance Apple Silicon macOS and Linux (AMD64 & ARM64) runners for GitHub Actions, greatly reducing our automated build times._
</div>
<br/>
<br/>
<div align="center">
<a href="https://affine.pro">Home Page</a> |
<a href="https://affine.pro/redirect/discord">Discord</a> |
@@ -177,6 +160,7 @@ We would also like to give thanks to open-source projects that make AFFiNE possi
- [Jotai](https://github.com/pmndrs/jotai) - Primitive and flexible state management for React.
- [async-call-rpc](https://github.com/Jack-Works/async-call-rpc) - A lightweight JSON RPC client & server.
- [Vite](https://github.com/vitejs/vite) - Next generation frontend tooling.
- [lame](https://lame.sourceforge.io/) - High quality MPEG Audio Layer III (MP3) encoder.
- Other upstream [dependencies](https://github.com/toeverything/AFFiNE/network/dependencies).
Thanks a lot to the community for providing such powerful and simple libraries, so that we can focus more on the implementation of the product logic, and we hope that in the future our projects will also provide a more easy-to-use knowledge base for everyone.

View File

@@ -39,7 +39,6 @@
"@blocksuite/affine-gfx-mindmap": "workspace:*",
"@blocksuite/affine-gfx-note": "workspace:*",
"@blocksuite/affine-gfx-shape": "workspace:*",
"@blocksuite/affine-gfx-template": "workspace:*",
"@blocksuite/affine-gfx-text": "workspace:*",
"@blocksuite/affine-gfx-turbo-renderer": "workspace:*",
"@blocksuite/affine-inline-footnote": "workspace:*",
@@ -129,7 +128,6 @@
"./gfx/mindmap": "./src/gfx/mindmap.ts",
"./gfx/connector": "./src/gfx/connector.ts",
"./gfx/group": "./src/gfx/group.ts",
"./gfx/template": "./src/gfx/template.ts",
"./gfx/turbo-renderer": "./src/gfx/turbo-renderer.ts",
"./components/block-selection": "./src/components/block-selection.ts",
"./components/block-zero-width": "./src/components/block-zero-width.ts",
@@ -180,9 +178,9 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.21.0",
"version": "0.20.0",
"devDependencies": {
"@vanilla-extract/vite-plugin": "^5.0.0",
"vitest": "3.1.1"
"vitest": "3.0.9"
}
}

View File

@@ -3680,95 +3680,88 @@ bbb
expect(nanoidReplacement(rawBlockSnapshot)).toEqual(blockSnapshot);
});
describe('inline latex', () => {
test.each([
['dollar sign syntax', 'inline $E=mc^2$ latex\n'],
['backslash syntax', 'inline \\(E=mc^2\\) latex\n'],
])('should convert %s correctly', async (_, markdown) => {
const blockSnapshot: BlockSnapshot = {
type: 'block',
id: 'matchesReplaceMap[0]',
flavour: 'affine:note',
props: {
xywh: '[0,0,800,95]',
background: DefaultTheme.noteBackgrounColor,
index: 'a0',
hidden: false,
displayMode: NoteDisplayMode.DocAndEdgeless,
},
children: [
{
type: 'block',
id: 'matchesReplaceMap[1]',
flavour: 'affine:paragraph',
props: {
type: 'text',
text: {
'$blocksuite:internal:text$': true,
delta: [
{
insert: 'inline ',
test('inline latex', async () => {
const markdown = 'inline $E=mc^2$ latex\n';
const blockSnapshot: BlockSnapshot = {
type: 'block',
id: 'matchesReplaceMap[0]',
flavour: 'affine:note',
props: {
xywh: '[0,0,800,95]',
background: DefaultTheme.noteBackgrounColor,
index: 'a0',
hidden: false,
displayMode: NoteDisplayMode.DocAndEdgeless,
},
children: [
{
type: 'block',
id: 'matchesReplaceMap[1]',
flavour: 'affine:paragraph',
props: {
type: 'text',
text: {
'$blocksuite:internal:text$': true,
delta: [
{
insert: 'inline ',
},
{
insert: ' ',
attributes: {
latex: 'E=mc^2',
},
{
insert: ' ',
attributes: {
latex: 'E=mc^2',
},
},
{
insert: ' latex',
},
],
},
},
{
insert: ' latex',
},
],
},
children: [],
},
],
};
children: [],
},
],
};
const mdAdapter = new MarkdownAdapter(createJob(), provider);
const rawBlockSnapshot = await mdAdapter.toBlockSnapshot({
file: markdown,
});
expect(nanoidReplacement(rawBlockSnapshot)).toEqual(blockSnapshot);
const mdAdapter = new MarkdownAdapter(createJob(), provider);
const rawBlockSnapshot = await mdAdapter.toBlockSnapshot({
file: markdown,
});
expect(nanoidReplacement(rawBlockSnapshot)).toEqual(blockSnapshot);
});
describe('latex block', () => {
test.each([
['dollar sign syntax', '$$\nE=mc^2\n$$\n'],
['backslash syntax', '\\[\nE=mc^2\n\\]\n'],
])('should convert %s correctly', async (_, markdown) => {
const blockSnapshot: BlockSnapshot = {
type: 'block',
id: 'matchesReplaceMap[0]',
flavour: 'affine:note',
props: {
xywh: '[0,0,800,95]',
background: DefaultTheme.noteBackgrounColor,
index: 'a0',
hidden: false,
displayMode: NoteDisplayMode.DocAndEdgeless,
},
children: [
{
type: 'block',
id: 'matchesReplaceMap[1]',
flavour: 'affine:latex',
props: {
latex: 'E=mc^2',
},
children: [],
},
],
};
test('latex block', async () => {
const markdown = '$$\nE=mc^2\n$$\n';
const mdAdapter = new MarkdownAdapter(createJob(), provider);
const rawBlockSnapshot = await mdAdapter.toBlockSnapshot({
file: markdown,
});
expect(nanoidReplacement(rawBlockSnapshot)).toEqual(blockSnapshot);
const blockSnapshot: BlockSnapshot = {
type: 'block',
id: 'matchesReplaceMap[0]',
flavour: 'affine:note',
props: {
xywh: '[0,0,800,95]',
background: DefaultTheme.noteBackgrounColor,
index: 'a0',
hidden: false,
displayMode: NoteDisplayMode.DocAndEdgeless,
},
children: [
{
type: 'block',
id: 'matchesReplaceMap[1]',
flavour: 'affine:latex',
props: {
latex: 'E=mc^2',
},
children: [],
},
],
};
const mdAdapter = new MarkdownAdapter(createJob(), provider);
const rawBlockSnapshot = await mdAdapter.toBlockSnapshot({
file: markdown,
});
expect(nanoidReplacement(rawBlockSnapshot)).toEqual(blockSnapshot);
});
test('reference', async () => {

View File

@@ -1,13 +1,9 @@
import { SpecProvider } from '@blocksuite/affine-shared/utils';
import { Container } from '@blocksuite/global/di';
import {
registerBlockSpecs,
registerStoreSpecs,
} from '../../extensions/register';
import { registerSpecs } from '../../extensions/register';
registerStoreSpecs();
registerBlockSpecs();
registerSpecs();
export function getProvider() {
const container = new Container();

View File

@@ -20,7 +20,6 @@ import type { ExtensionType } from '@blocksuite/store';
import { defaultBlockHtmlAdapterMatchers } from './html/block-matcher';
import { defaultBlockMarkdownAdapterMatchers } from './markdown/block-matcher';
import { defaultMarkdownPreprocessors } from './markdown/preprocessor';
import { defaultBlockNotionHtmlAdapterMatchers } from './notion-html/block-matcher';
import { defaultBlockPlainTextAdapterMatchers } from './plain-text/block-matcher';
@@ -45,7 +44,6 @@ export const MarkdownAdapterExtension: ExtensionType[] = [
...MarkdownInlineToDeltaAdapterExtensions,
...defaultBlockMarkdownAdapterMatchers,
...InlineDeltaToMarkdownAdapterExtensions,
...defaultMarkdownPreprocessors,
];
export const NotionHtmlAdapterExtension: ExtensionType[] = [

View File

@@ -1,6 +1,5 @@
export * from './extension.js';
export * from './html/block-matcher.js';
export * from './markdown/block-matcher.js';
export * from './markdown/preprocessor.js';
export * from './notion-html/block-matcher.js';
export * from './plain-text/block-matcher.js';

View File

@@ -1,7 +0,0 @@
import { CodeMarkdownPreprocessorExtension } from '@blocksuite/affine-block-code';
import { LatexMarkdownPreprocessorExtension } from '@blocksuite/affine-block-latex';
export const defaultMarkdownPreprocessors = [
LatexMarkdownPreprocessorExtension,
CodeMarkdownPreprocessorExtension,
];

View File

@@ -1 +0,0 @@
export * from '@blocksuite/affine-components/open-doc-dropdown-menu';

View File

@@ -34,7 +34,6 @@ import { effects as componentHighlightDropdownMenuEffects } from '@blocksuite/af
import { IconButton } from '@blocksuite/affine-components/icon-button';
import { effects as componentLinkPreviewEffects } from '@blocksuite/affine-components/link-preview';
import { effects as componentLinkedDocTitleEffects } from '@blocksuite/affine-components/linked-doc-title';
import { effects as componentOpenDocDropdownMenuEffects } from '@blocksuite/affine-components/open-doc-dropdown-menu';
import { effects as componentPortalEffects } from '@blocksuite/affine-components/portal';
import { effects as componentSizeDropdownMenuEffects } from '@blocksuite/affine-components/size-dropdown-menu';
import { SmoothCorner } from '@blocksuite/affine-components/smooth-corner';
@@ -63,7 +62,7 @@ import { effects as widgetToolbarEffects } from '@blocksuite/affine-widget-toolb
import { effects as dataViewEffects } from '@blocksuite/data-view/effects';
import { effects as stdEffects } from '@blocksuite/std/effects';
import { registerBlockSpecs } from './extensions';
import { registerSpecs } from './extensions/register.js';
export declare const _GLOBAL_:
| typeof stdEffects
@@ -113,7 +112,8 @@ export declare const _GLOBAL_:
| typeof fragmentOutlineEffects;
export function effects() {
registerBlockSpecs();
registerSpecs();
stdEffects();
dataViewEffects();
@@ -165,7 +165,6 @@ export function effects() {
componentEdgelessLineWidthEffects();
componentEdgelessLineStylesEffects();
componentEdgelessShapeColorPickerEffects();
componentOpenDocDropdownMenuEffects();
widgetScrollAnchoringEffects();
widgetFrameTitleEffects();

View File

@@ -17,40 +17,14 @@ import {
} from '@blocksuite/affine-block-note';
import { ParagraphBlockSpec } from '@blocksuite/affine-block-paragraph';
import {
EdgelessSurfaceBlockAdapterExtensions,
EdgelessSurfaceBlockSpec,
PageSurfaceBlockSpec,
SurfaceBlockAdapterExtensions,
} from '@blocksuite/affine-block-surface';
import {
EdgelessSurfaceRefBlockSpec,
PageSurfaceRefBlockSpec,
} from '@blocksuite/affine-block-surface-ref';
import { TableBlockSpec } from '@blocksuite/affine-block-table';
import {
brushToMarkdownAdapterMatcher,
brushToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-brush';
import {
connectorToMarkdownAdapterMatcher,
connectorToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-connector';
import {
groupToMarkdownAdapterMatcher,
groupToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-group';
import {
mindmapToMarkdownAdapterMatcher,
mindmapToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-mindmap';
import {
shapeToMarkdownAdapterMatcher,
shapeToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-shape';
import {
textToMarkdownAdapterMatcher,
textToPlainTextAdapterMatcher,
} from '@blocksuite/affine-gfx-text';
import { inlinePresetExtensions } from '@blocksuite/affine-inline-preset';
import {
DefaultOpenDocExtension,
@@ -60,24 +34,6 @@ import {
} from '@blocksuite/affine-shared/services';
import type { ExtensionType } from '@blocksuite/store';
const elementToPlainTextAdapterMatchers = [
groupToPlainTextAdapterMatcher,
shapeToPlainTextAdapterMatcher,
connectorToPlainTextAdapterMatcher,
brushToPlainTextAdapterMatcher,
textToPlainTextAdapterMatcher,
mindmapToPlainTextAdapterMatcher,
];
const elementToMarkdownAdapterMatchers = [
groupToMarkdownAdapterMatcher,
shapeToMarkdownAdapterMatcher,
connectorToMarkdownAdapterMatcher,
brushToMarkdownAdapterMatcher,
textToMarkdownAdapterMatcher,
mindmapToMarkdownAdapterMatcher,
];
export const CommonBlockSpecs: ExtensionType[] = [
inlinePresetExtensions,
DocDisplayMetaService,
@@ -98,9 +54,6 @@ export const CommonBlockSpecs: ExtensionType[] = [
FontLoaderService,
CalloutBlockSpec,
FrameBlockSpec,
elementToPlainTextAdapterMatchers,
elementToMarkdownAdapterMatchers,
].flat();
export const PageFirstPartyBlockSpecs: ExtensionType[] = [
@@ -108,8 +61,6 @@ export const PageFirstPartyBlockSpecs: ExtensionType[] = [
NoteBlockSpec,
PageSurfaceBlockSpec,
PageSurfaceRefBlockSpec,
...SurfaceBlockAdapterExtensions,
].flat();
export const EdgelessFirstPartyBlockSpecs: ExtensionType[] = [
@@ -119,6 +70,4 @@ export const EdgelessFirstPartyBlockSpecs: ExtensionType[] = [
EdgelessSurfaceBlockSpec,
EdgelessSurfaceRefBlockSpec,
EdgelessTextBlockSpec,
...EdgelessSurfaceBlockAdapterExtensions,
].flat();

View File

@@ -1,5 +1,4 @@
export * from './common';
export * from './editor-specs';
export * from './preview-specs';
export * from './register';
export * from './store';
export * from './common.js';
export * from './editor-specs.js';
export * from './preview-specs.js';
export * from './store.js';

View File

@@ -10,11 +10,8 @@ import {
} from './preview-specs.js';
import { StoreExtensions } from './store.js';
export function registerStoreSpecs() {
export function registerSpecs() {
SpecProvider._.addSpec('store', StoreExtensions);
}
export function registerBlockSpecs() {
SpecProvider._.addSpec('page', PageEditorBlockSpecs);
SpecProvider._.addSpec('edgeless', EdgelessEditorBlockSpecs);
SpecProvider._.addSpec('preview:page', PreviewPageEditorBlockSpecs);

View File

@@ -1 +0,0 @@
export * from '@blocksuite/affine-gfx-template';

View File

@@ -7,36 +7,35 @@
},
"include": ["./src"],
"references": [
{ "path": "../blocks/attachment" },
{ "path": "../blocks/bookmark" },
{ "path": "../blocks/callout" },
{ "path": "../blocks/code" },
{ "path": "../blocks/data-view" },
{ "path": "../blocks/database" },
{ "path": "../blocks/divider" },
{ "path": "../blocks/edgeless-text" },
{ "path": "../blocks/embed" },
{ "path": "../blocks/frame" },
{ "path": "../blocks/image" },
{ "path": "../blocks/latex" },
{ "path": "../blocks/list" },
{ "path": "../blocks/note" },
{ "path": "../blocks/paragraph" },
{ "path": "../blocks/root" },
{ "path": "../blocks/surface" },
{ "path": "../blocks/surface-ref" },
{ "path": "../blocks/table" },
{ "path": "../blocks/block-attachment" },
{ "path": "../blocks/block-bookmark" },
{ "path": "../blocks/block-callout" },
{ "path": "../blocks/block-code" },
{ "path": "../blocks/block-data-view" },
{ "path": "../blocks/block-database" },
{ "path": "../blocks/block-divider" },
{ "path": "../blocks/block-edgeless-text" },
{ "path": "../blocks/block-embed" },
{ "path": "../blocks/block-frame" },
{ "path": "../blocks/block-image" },
{ "path": "../blocks/block-latex" },
{ "path": "../blocks/block-list" },
{ "path": "../blocks/block-note" },
{ "path": "../blocks/block-paragraph" },
{ "path": "../blocks/block-root" },
{ "path": "../blocks/block-surface" },
{ "path": "../blocks/block-surface-ref" },
{ "path": "../blocks/block-table" },
{ "path": "../components" },
{ "path": "../fragments/doc-title" },
{ "path": "../fragments/frame-panel" },
{ "path": "../fragments/outline" },
{ "path": "../fragments/fragment-doc-title" },
{ "path": "../fragments/fragment-frame-panel" },
{ "path": "../fragments/fragment-outline" },
{ "path": "../gfx/brush" },
{ "path": "../gfx/connector" },
{ "path": "../gfx/group" },
{ "path": "../gfx/mindmap" },
{ "path": "../gfx/note" },
{ "path": "../gfx/shape" },
{ "path": "../gfx/template" },
{ "path": "../gfx/text" },
{ "path": "../gfx/turbo-renderer" },
{ "path": "../inlines/footnote" },
@@ -48,14 +47,14 @@
{ "path": "../model" },
{ "path": "../rich-text" },
{ "path": "../shared" },
{ "path": "../widgets/drag-handle" },
{ "path": "../widgets/edgeless-auto-connect" },
{ "path": "../widgets/edgeless-toolbar" },
{ "path": "../widgets/frame-title" },
{ "path": "../widgets/remote-selection" },
{ "path": "../widgets/scroll-anchoring" },
{ "path": "../widgets/slash-menu" },
{ "path": "../widgets/toolbar" },
{ "path": "../widgets/widget-drag-handle" },
{ "path": "../widgets/widget-edgeless-auto-connect" },
{ "path": "../widgets/widget-edgeless-toolbar" },
{ "path": "../widgets/widget-frame-title" },
{ "path": "../widgets/widget-remote-selection" },
{ "path": "../widgets/widget-scroll-anchoring" },
{ "path": "../widgets/widget-slash-menu" },
{ "path": "../widgets/widget-toolbar" },
{ "path": "../data-view" },
{ "path": "../../framework/global" },
{ "path": "../../framework/std" },

View File

@@ -1,34 +0,0 @@
import { EdgelessClipboardConfig } from '@blocksuite/affine-block-surface';
import { type BlockSnapshot } from '@blocksuite/store';
export class EdgelessClipboardAttachmentConfig extends EdgelessClipboardConfig {
static override readonly key = 'affine:attachment';
override async createBlock(
attachment: BlockSnapshot
): Promise<string | null> {
if (!this.surface) return null;
const { xywh, rotate, sourceId, name, size, type, embed, style } =
attachment.props;
if (!(await this.std.workspace.blobSync.get(sourceId as string))) {
return null;
}
const attachmentId = this.crud.addBlock(
'affine:attachment',
{
xywh,
rotate,
sourceId,
name,
size,
type,
embed,
style,
},
this.surface.model.id
);
return attachmentId;
}
}

View File

@@ -17,7 +17,7 @@
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-slash-menu": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.10",
"@blocksuite/icons": "^2.2.8",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
@@ -40,5 +40,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.21.0"
"version": "0.20.0"
}

View File

@@ -1,9 +1,9 @@
import { fontXSStyle, panelBaseStyle } from '@blocksuite/affine-shared/styles';
import { FONT_XS, PANEL_BASE } from '@blocksuite/affine-shared/styles';
import { css } from 'lit';
export const renameStyles = css`
${panelBaseStyle('.affine-attachment-rename-container')}
.affine-attachment-rename-container {
${PANEL_BASE};
position: relative;
display: flex;
align-items: center;
@@ -35,8 +35,8 @@ export const renameStyles = css`
outline: none;
background: transparent;
color: var(--affine-text-primary-color);
${FONT_XS};
}
${fontXSStyle('.affine-attachment-rename-input-wrapper input')}
.affine-attachment-rename-input-wrapper input::placeholder {
color: var(--affine-placeholder-color);

View File

@@ -3,7 +3,6 @@ export * from './attachment-block';
export * from './attachment-service';
export * from './attachment-spec';
export { attachmentViewDropdownMenu } from './configs/toolbar';
export * from './edgeless-clipboard-config';
export {
type AttachmentEmbedConfig,
AttachmentEmbedConfigIdentifier,

View File

@@ -7,12 +7,12 @@
},
"include": ["./src"],
"references": [
{ "path": "../embed" },
{ "path": "../surface" },
{ "path": "../block-embed" },
{ "path": "../block-surface" },
{ "path": "../../components" },
{ "path": "../../model" },
{ "path": "../../shared" },
{ "path": "../../widgets/slash-menu" },
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/std" },
{ "path": "../../../framework/store" }

View File

@@ -17,7 +17,7 @@
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-slash-menu": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.10",
"@blocksuite/icons": "^2.2.8",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@lit/context": "^1.1.2",
@@ -39,5 +39,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.21.0"
"version": "0.20.0"
}

View File

@@ -0,0 +1,79 @@
import {
type InsertedLinkType,
insertEmbedIframeWithUrlCommand,
insertEmbedLinkedDocCommand,
type LinkableFlavour,
} from '@blocksuite/affine-block-embed';
import {
FeatureFlagService,
QuickSearchProvider,
} from '@blocksuite/affine-shared/services';
import type { Command } from '@blocksuite/std';
import { insertBookmarkCommand } from './insert-bookmark';
export const insertLinkByQuickSearchCommand: Command<
{},
{ insertedLinkType: Promise<InsertedLinkType> }
> = (ctx, next) => {
const { std } = ctx;
const quickSearchService = std.getOptional(QuickSearchProvider);
if (!quickSearchService) {
next();
return;
}
const insertedLinkType: Promise<InsertedLinkType> = quickSearchService
.openQuickSearch()
.then(result => {
if (!result) return null;
// add linked doc
if ('docId' in result) {
std.command.exec(insertEmbedLinkedDocCommand, {
docId: result.docId,
params: result.params,
});
return {
flavour: 'affine:embed-linked-doc',
};
}
// add normal link;
if ('externalUrl' in result) {
const featureFlagService = std.get(FeatureFlagService);
const enableEmbedIframeBlock = featureFlagService.getFlag(
'enable_embed_iframe_block'
);
if (enableEmbedIframeBlock) {
// try to insert embed iframe block first
const [success, { flavour }] = std.command
.chain()
.try(chain => [
chain.pipe(insertEmbedIframeWithUrlCommand, {
url: result.externalUrl,
}),
chain.pipe(insertBookmarkCommand, { url: result.externalUrl }),
])
.run();
if (!success || !flavour) return null;
return {
flavour: flavour as LinkableFlavour,
};
} else {
const [success, { flavour }] = std.command.exec(
insertBookmarkCommand,
{ url: result.externalUrl }
);
if (!success || !flavour) return null;
return {
flavour: flavour as LinkableFlavour,
};
}
}
return null;
});
next({ insertedLinkType });
};

View File

@@ -2,7 +2,7 @@ import { getEmbedCardIcons } from '@blocksuite/affine-block-embed';
import { WebIcon16 } from '@blocksuite/affine-components/icons';
import { ThemeProvider } from '@blocksuite/affine-shared/services';
import { getHostName } from '@blocksuite/affine-shared/utils';
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
import { WithDisposable } from '@blocksuite/global/lit';
import { OpenInNewIcon } from '@blocksuite/icons/lit';
import { BlockSelection, ShadowlessElement } from '@blocksuite/std';
import { html } from 'lit';
@@ -12,9 +12,7 @@ import { classMap } from 'lit/directives/class-map.js';
import type { BookmarkBlockComponent } from '../bookmark-block.js';
import { styles } from '../styles.js';
export class BookmarkCard extends SignalWatcher(
WithDisposable(ShadowlessElement)
) {
export class BookmarkCard extends WithDisposable(ShadowlessElement) {
static override styles = styles;
private _handleClick(event: MouseEvent) {
@@ -127,11 +125,11 @@ export class BookmarkCard extends SignalWatcher(
<div class="affine-bookmark-content-description">
${descriptionText}
</div>
<div class="affine-bookmark-content-url-wrapper">
<div
class="affine-bookmark-content-url"
@click=${this.bookmark.open}
>
<div
class="affine-bookmark-content-url-wrapper"
@click=${this.bookmark.open}
>
<div class="affine-bookmark-content-url">
<span>${getHostName(url)}</span>
<div class="affine-bookmark-content-url-icon">
${OpenInNewIcon({ width: '12', height: '12' })}

View File

@@ -4,4 +4,3 @@ export * from './bookmark-spec';
export * from './commands';
export * from './components';
export { BookmarkSlashMenuConfigIdentifier } from './configs/slash-menu';
export * from './edgeless-clipboard-config';

View File

@@ -26,6 +26,7 @@ export const styles = css`
.affine-bookmark-content {
width: calc(100% - 204px);
height: 100%;
display: flex;
flex-direction: column;
align-self: stretch;

View File

@@ -0,0 +1,20 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
},
"include": ["./src"],
"references": [
{ "path": "../block-embed" },
{ "path": "../block-surface" },
{ "path": "../../components" },
{ "path": "../../model" },
{ "path": "../../shared" },
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/std" },
{ "path": "../../../framework/store" }
]
}

View File

@@ -17,7 +17,7 @@
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-slash-menu": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.10",
"@blocksuite/icons": "^2.2.8",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@emoji-mart/data": "^1.2.1",
@@ -42,5 +42,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.21.0"
"version": "0.20.0"
}

View File

@@ -2,7 +2,7 @@ import { CaptionedBlockComponent } from '@blocksuite/affine-components/caption';
import { createLitPortal } from '@blocksuite/affine-components/portal';
import { DefaultInlineManagerExtension } from '@blocksuite/affine-inline-preset';
import { type CalloutBlockModel } from '@blocksuite/affine-model';
import { EDGELESS_TOP_CONTENTEDITABLE_SELECTOR } from '@blocksuite/affine-shared/consts';
import { NOTE_SELECTOR } from '@blocksuite/affine-shared/consts';
import {
DocModeProvider,
ThemeProvider,
@@ -95,9 +95,7 @@ export class CalloutBlockComponent extends CaptionedBlockComponent<CalloutBlockM
override get topContenteditableElement() {
if (this.std.get(DocModeProvider).getEditorMode() === 'edgeless') {
return this.closest<BlockComponent>(
EDGELESS_TOP_CONTENTEDITABLE_SELECTOR
);
return this.closest<BlockComponent>(NOTE_SELECTOR);
}
return this.rootComponent;
}

View File

@@ -12,7 +12,7 @@
{ "path": "../../model" },
{ "path": "../../rich-text" },
{ "path": "../../shared" },
{ "path": "../../widgets/slash-menu" },
{ "path": "../../widgets/widget-slash-menu" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/std" },
{ "path": "../../../framework/store" }

View File

@@ -19,7 +19,7 @@
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-slash-menu": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.10",
"@blocksuite/icons": "^2.2.8",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
@@ -43,5 +43,5 @@
"!src/__tests__",
"!dist/__tests__"
],
"version": "0.21.0"
"version": "0.20.0"
}

View File

@@ -1,13 +1,13 @@
import type { ExtensionType } from '@blocksuite/store';
import { CodeBlockHtmlAdapterExtension } from './html.js';
import { CodeBlockMarkdownAdapterExtensions } from './markdown/index.js';
import { CodeBlockMarkdownAdapterExtension } from './markdown.js';
import { CodeBlockNotionHtmlAdapterExtension } from './notion-html.js';
import { CodeBlockPlainTextAdapterExtension } from './plain-text.js';
export const CodeBlockAdapterExtensions: ExtensionType[] = [
CodeBlockHtmlAdapterExtension,
CodeBlockMarkdownAdapterExtensions,
CodeBlockMarkdownAdapterExtension,
CodeBlockPlainTextAdapterExtension,
CodeBlockNotionHtmlAdapterExtension,
].flat();
];

View File

@@ -1,10 +1,7 @@
import { CaptionedBlockComponent } from '@blocksuite/affine-components/caption';
import type { CodeBlockModel } from '@blocksuite/affine-model';
import { focusTextModel, type RichText } from '@blocksuite/affine-rich-text';
import {
BRACKET_PAIRS,
EDGELESS_TOP_CONTENTEDITABLE_SELECTOR,
} from '@blocksuite/affine-shared/consts';
import { BRACKET_PAIRS, NOTE_SELECTOR } from '@blocksuite/affine-shared/consts';
import {
DocModeProvider,
NotificationProvider,
@@ -82,9 +79,7 @@ export class CodeBlockComponent extends CaptionedBlockComponent<CodeBlockModel>
override get topContenteditableElement() {
if (this.std.get(DocModeProvider).getEditorMode() === 'edgeless') {
return this.closest<BlockComponent>(
EDGELESS_TOP_CONTENTEDITABLE_SELECTOR
);
return this.closest<BlockComponent>(NOTE_SELECTOR);
}
return this.rootComponent;
}

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