Commit Graph

145 Commits

Author SHA1 Message Date
renovate
1fc51bf95e chore: bump up animejs version to v4 (#11466)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [animejs](https://animejs.com) ([source](https://redirect.github.com/juliangarnier/anime)) | [`^3.2.2` -> `^4.0.0`](https://renovatebot.com/diffs/npm/animejs/3.2.2/4.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/animejs/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/animejs/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/animejs/3.2.2/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/animejs/3.2.2/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>juliangarnier/anime (animejs)</summary>

### [`v4.0.0`](https://redirect.github.com/juliangarnier/anime/releases/tag/4.0.0)

[Compare Source](https://redirect.github.com/juliangarnier/anime/compare/v3.2.2...4.0.0)

> **I'm still finalizing the release notes as there are MANY changes, but in the meantime, you can check out the brand new documentation [here](https://animejs.com/documentation).**

The brand new Anime.js.

### API Breaking changes

Every Anime.js feature is now exported as an ES Module.
This is great for tree shaking, you don't have to ship the entire library anymore, only what you need.

#### Animation

The `anime(parameters)` function has been replaced with the `animate(targets, parameters)` module.
The `targets` parameter has been replaced with a dedicated function parameter: `animate(targets, parameters)`.

V3:

```javascript
import anime from 'animejs';

const animation = anime({
  targets: 'div',
  translateX: 100,
});
```

V4:

```javascript
import { animate } from 'animejs';

const animation = animate('div', {
  translateX: 100,
});
```

#### Easings names

The `ease` prefix has been removed: 'easeInOutQuad' -> 'inOutQuad'.

#### Callbacks

Callbacks have have been renamed like this:

-   `begin()` -> `onBegin()`
-   `update()` -> `onUpdate()`

Here's all the change to the API

```diff
- import anime from 'animejs';
+ import { animate, createSpring, utils } from 'animejs';

- anime({
-   targets: 'div',
+ animate('div', {
    translateX: 100,
      rotate: {
-     value: 360,
+     to: 360,
-     easing: 'spring(.7, 80, 10, .5)',
+     ease: createSpring({ mass: .7, damping: 80, stiffness: 10, velocity: .5}),
    },
-   easing: 'easeinOutExpo',
+   ease: 'inOutExpo',
-   easing: () => t => Math.cos(t),
+   ease: t => Math.cos(t),
-   direction: 'reverse',
+   reversed: true,
-   direction: 'alternate',
+   alternate: true,
-   loop: 1,
+   loop: 0,
-   round: 100,
+   modifier: utils.round(2),
-   begin: () => {},
+   onBegin: () => {},
-   update: () => {},
+   onUpdate: () => {},
-   change: () => {},
+   onRender: () => {},
-   changeBegin: () => {},
-   changeComplete: () => {},
-   loopBegin: () => {},
-   loopComplete: () => {},
+   onLoop: () => {},
-   complete: () => {},
+   onComplete: () => {},
  });
```

#### Promises

No more `.finished` property, promises are now handled directly with `animation.then()`:

```diff
- import anime from 'animejs';
+ import { animate, utils } from 'animejs';

- anime({ targets: target, prop: x }).finished.then(() => {});
+ animate(target, { prop: x }).then(() => {});
```

#### Values

##### To

The object syntax `value` property has been renamed `to`:

```diff
- translateX: { value: 100 }
+ translateX: { to: 100 }
```

#### Animation parameters

##### Default `easing`

The new default easing is `'outQuad'` instead of `'easeOutElastic(1, .5)'`.

##### `composition`

In V3 all animations coexist and overlaps with each other. This can cause animations with the same targets and animated properties to create weird results.
V4 cancels a running tween if a new one is created on the same target with the same property. This behaviour can be confifugred using the new `composition` parameter.

`composition: 'none'` // The old V3 behaviour, animations can overlaps
`composition: 'replace'` // The new V4 default
`composition: 'add'` // Creates additive animations by adding the values of the currently running animations with the new ones

##### `round` -> `modifier`

The `round` parameter has been replaced with a more flexible parameters that allows you to define custom functions to transform the numerical value of an animation just before the rendering.

```diff
- round: 100
+ modifier: utils.round(2)
```

You can of course defines your own modifier functions like this:

```javascript
const animation = animate('div', {
  translateX: '100rem',
  modifier: v => v % 10 // Note that the unit 'rem' will automatically be passed to the rendered value
});
```

#### Playback parameters

##### `direction`

The `direction` parameter has been replaced with an `alternate` and `reversed` parameters

V3:

```javascript
const animation = anime({
  targets: 'div',
  direction: 'reverse',
  // direction: 'alternate' It wasn't possible to combined reverse and alternate direction before
});
```

V4:

```javascript
import { animate } from 'animejs';

const animation = animate('div', {
  translateX: 100,
  reversed: true,
  alternate: true,
});
```

#### Timelines:

```diff
- import anime from 'animejs';
+ import { createTimeline, stagger } from 'animejs';

- anime.timeline({
+ createTimeline({
-   duration: 500,
-   easing: 'easeInOutQuad',
+   defaults: {
+     duration: 500,
+     ease: 'inOutQuad',
+   }
-   loop: 2,
+   loop: 1,
- }).add({
-   targets: 'div',
+ }).add('div', {
    rotate: 90,
  })
- .add('.target:nth-child(1)', { opacity: 0, onComplete }, 0)
- .add('.target:nth-child(2)', { opacity: 0, onComplete }, 100)
- .add('.target:nth-child(3)', { opacity: 0, onComplete }, 200)
- .add('.target:nth-child(4)', { opacity: 0, onComplete }, 300)
+ .add('.target', { opacity: 0, onComplete }, stagger(100))
```

##### Stagger

```diff
- import anime from 'animejs';
+ import { animate, stagger } from 'animejs';

- anime({
-   targets: 'div',
+ animate('div', {
-   translateX: anime.stagger(100),
+   translateX: stagger(100),
-   delay: anime.stagger(100, { direction: 'reversed' }),
+   translateX: stagger(100, { reversed: true }),
  });
```

#### SVG

```diff
- import anime from 'animejs';
+ import { animate, svg } from 'animejs';

- const path = anime.path('path');
+ const { x, y, angle } = svg.createMotionPath('path');

- anime({
-   targets: '#shape1',
+ animate('#shape1', {
-   points: '70 41 118.574 59.369 111.145 132.631 60.855 84.631 20.426 60.369',
+   points: svg.morphTo('#shape2'),
-   strokeDashoffset: [anime.setDashoffset, 0],
+   strokeDashoffset: svg.drawLine(),
-   translateX: path('x'),
-   translateY: path('y'),
-   rotate: path('angle'),
+   translateX: x,
+   translateY: y,
+   rotate: angle,
  });
```

#### Utils

```diff
- import anime from 'animejs';
+ import { utils } from 'animejs';

- const value = anime.get('#target1', 'translateX');
+ const value = utils.get('#target1', 'translateX');

- anime.set('#target1', { translateX: 100 });
+ utils.set('#target1', { translateX: 100 });

- anime.remove('#target1');
+ utils.remove('#target1');

- const rounded = anime.round(value);
+ const rounded = utils.round(value, 0);
```

#### Engine

```diff
- import anime from 'animejs';
+ import { engine } from 'animejs';

- anime.suspendWhenDocumentHidden = false;
+ engine.pauseWhenHidden = false;

- anime.speed = .5;
+ engine.playbackRate = .5;
```

### Improvements

#### Performances

Major performance boost and lower memory footprint.
V4 has bee re-written from scratch by keeping performance in mind at every steps.

#### Better tween composition

The tween system has been refactored to improve animations behaviours when they overlaps.
This fix lots of issues, especially when creating multiple animations with the same property on the same target.

#### Additive animations

You can also blend animations together with the new `composition: 'add'` parameter.

#### Improved Timelines

-   Child animations can new be looped and reversed
-   Add supports for labels
-   Add supports for `.set()` in timeline
-   New position operators for more flexibility
-   Multi-target child animation can be positioned using the `stagger` function
-   Easier children defaults configuration
-   Greatly improved support for CSS transforms composition from one child animation to another

```javascript

const tl = createTimeline({
  playbackRate: .2,
  defaults: {
    duration: 500,
    easing: 'outQuad',
  }
});

tl.add('START', 100) // Add a label a 100ms
  .set('.target', { opacity: 0 })
  .add('.target', {
    translateY: 100,
    opacity: 1,
    onComplete: () => {},
  }, stagger(100))
  .add('.target', {
    scale: .75,
  }, 'START')
  .add('.target', {
    rotate: '1turn',
  }, '<<+=200')

```

#### Properties

##### CSS Variables

You can now use CSS variables directly like any other property:

```javascript
// Animate the values of the CSS variables '--radius'
animate('#target', { '--radius': '20px' });
```

##### Animating *from*

Animate *from* a value

```diff
+ translateX: { from: 50 }
```

##### From -> To

Even if the `[from, to]` shortcut is still valid in V4, you can now also write it like this:

```diff
+ translateX: { from: 50, to: 100 }
```

##### Colors

You can now animate hex colors with an alpha channel like '#F443' or '#FF444433'.

#### Timers

You can now create timers with the `createTimer` module.

Timers can be use as replacement for `setTimeout`or `setInterval` but with all the playbacks parameters, callbacks and the `Promise` system provided by anime.js.

```
const interval = createTimer({
  onLoop: () => { // do something every 500ms },
  duration: 500,
});

const timeout = createTimer({
  onComplete: () => { // do something in 500ms },
  duration: 500,
});

const gameLogicLoop = createTimer({
  frameRate: 30,
  onUpdate: gameSystems,
});

const gameRenderLoop = createTimer({
  frameRate: 60,
  onUpdate: gameRender,
});

```

#### Variable frame rate

You can now change the frame rate to all animations or to a specific Timeline / Animation / Timer

</details>

---

### Configuration

📅 **Schedule**: 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-04-14 01:29:09 +00:00
CatsJuice
d6b4ee8172 feat(mobile): ios selfhost server support (#11563) 2025-04-14 01:13:23 +00:00
L-Sun
cb7f15296a chore(ios): rename keyboard css var (#11595) 2025-04-11 02:47:29 +00:00
L-Sun
b53b2acfe3 fix(ios): mobile modal occlusion issues (#11427)
Close [BS-2925](https://linear.app/affine-design/issue/BS-2925/移动端-dialog-遮挡相关)
2025-04-03 01:51:57 +00:00
L-Sun
80a663efe7 fix(ios): adjust bootom padding of body when keyboard toolbar existed (#11410)
Close [BS-2919](https://linear.app/affine-design/issue/BS-2919/【移动端】ios-页面底部点几,页面定位有问题,光标和浮层重叠,并且看不到新添加的-block)
Close [BS-2918](https://linear.app/affine-design/issue/BS-2918/【移动端】ios-添加标题无法展示对应-block,滑动页面也无效,光标位置也不对)

## Changes
- Fixed body padding calculation when keyboard toolbar is present
- Removed redundant position controller logic and simplified the implementation
2025-04-03 01:51:57 +00:00
EYHN
8957d0645f feat(nbstore): add indexer storage (#10953) 2025-03-31 12:59:51 +00:00
Saul-Mirone
205cd7a86d refactor(editor): rename block-std to std (#11250)
Closes: BS-2946
2025-03-28 07:20:34 +00:00
EYHN
3df51a217d feat(core): add use guard hook (#11180)
Previously, we used `useLiveData(guardService.can$())` to get the guard result, but `guardService.can$()` will request the server to revalidate the permission when calling it, will cause additional network requests when re-render.

This pr make a new hook `useGuard` to fix this problem.

And the side effect in `can$` is moved to `revalidateCan()` to make that the subscribe method is pure
2025-03-25 14:15:29 +00:00
EYHN
d7567edcb8 feat(infra): remove obsolete pattern (#11177)
React suspense is a deprecated mode, remove the useEnsureLiveData method
2025-03-25 13:20:17 +00:00
Saul-Mirone
e5e429e7b2 feat(editor): add inline packages (#11048) 2025-03-20 13:47:35 +00:00
zzj3720
c355644d47 fix(editor): some bugs of attachment column (#11031)
fix: BS-2838, BS-2837, BS-2836
2025-03-20 07:48:26 +00:00
JimmFly
d47bb64597 feat(core): add no access to share menu (#10927) 2025-03-20 07:31:11 +00:00
Mirone
cd63e0ed8b feat(editor): replace slot with rxjs subject (#10768) 2025-03-12 11:29:24 +09:00
EYHN
ea07aa8607 feat(core): add notification list (#10480) 2025-03-11 06:23:33 +00:00
Saul-Mirone
ec709925ee refactor(editor): orgnize exports (#10709) 2025-03-10 02:04:01 +00:00
Saul-Mirone
12bc142809 refactor(editor): remove blocks package (#10708) 2025-03-09 05:44:26 +00:00
Saul-Mirone
84e2dda3f8 refactor(editor): separate lit and slot in global (#10666) 2025-03-06 10:24:59 +00:00
Saul-Mirone
5ad3d3c94a refactor(editor): move figma squircle to shared (#10610) 2025-03-04 10:26:58 +00:00
renovate
5c16b803b7 chore: bump up @sentry/react version to v9 (#10064)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@sentry/react](https://redirect.github.com/getsentry/sentry-javascript/tree/master/packages/react) ([source](https://redirect.github.com/getsentry/sentry-javascript)) | [`^8.44.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@sentry%2freact/8.54.0/9.0.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@sentry%2freact/9.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@sentry%2freact/9.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@sentry%2freact/8.54.0/9.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@sentry%2freact/8.54.0/9.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>getsentry/sentry-javascript (@&#8203;sentry/react)</summary>

### [`v9.0.1`](https://redirect.github.com/getsentry/sentry-javascript/releases/tag/9.0.1)

[Compare Source](https://redirect.github.com/getsentry/sentry-javascript/compare/9.0.0...9.0.1)

-   ref(flags): rename unleash integration param ([#&#8203;15343](https://redirect.github.com/getsentry/sentry-javascript/pull/15343))

##### Bundle size 📦

| Path                                                             | Size              |
| ---------------------------------------------------------------- | ----------------- |
| [@&#8203;sentry/browser](https://redirect.github.com/sentry/browser)                                                  | 22.9 KB   |
| [@&#8203;sentry/browser](https://redirect.github.com/sentry/browser) - with treeshaking flags                         | 22.69 KB  |
| [@&#8203;sentry/browser](https://redirect.github.com/sentry/browser) (incl. Tracing)                                  | 35.77 KB  |
| [@&#8203;sentry/browser](https://redirect.github.com/sentry/browser) (incl. Tracing, Replay)                          | 72.65 KB  |
| [@&#8203;sentry/browser](https://redirect.github.com/sentry/browser) (incl. Tracing, Replay) - with treeshaking flags | 66.13 KB  |
| [@&#8203;sentry/browser](https://redirect.github.com/sentry/browser) (incl. Tracing, Replay with Canvas)              | 76.9 KB   |
| [@&#8203;sentry/browser](https://redirect.github.com/sentry/browser) (incl. Tracing, Replay, Feedback)                | 89.64 KB  |
| [@&#8203;sentry/browser](https://redirect.github.com/sentry/browser) (incl. Feedback)                                 | 39.86 KB  |
| [@&#8203;sentry/browser](https://redirect.github.com/sentry/browser) (incl. sendFeedback)                             | 27.53 KB  |
| [@&#8203;sentry/browser](https://redirect.github.com/sentry/browser) (incl. FeedbackAsync)                            | 32.31 KB  |
| [@&#8203;sentry/react](https://redirect.github.com/sentry/react)                                                    | 24.74 KB  |
| [@&#8203;sentry/react](https://redirect.github.com/sentry/react) (incl. Tracing)                                    | 37.67 KB  |
| [@&#8203;sentry/vue](https://redirect.github.com/sentry/vue)                                                      | 27.09 KB  |
| [@&#8203;sentry/vue](https://redirect.github.com/sentry/vue) (incl. Tracing)                                      | 37.47 KB  |
| [@&#8203;sentry/svelte](https://redirect.github.com/sentry/svelte)                                                   | 22.94 KB  |
| CDN Bundle                                                       | 24.13 KB  |
| CDN Bundle (incl. Tracing)                                       | 35.84 KB  |
| CDN Bundle (incl. Tracing, Replay)                               | 70.55 KB  |
| CDN Bundle (incl. Tracing, Replay, Feedback)                     | 75.69 KB  |
| CDN Bundle - uncompressed                                        | 70.59 KB  |
| CDN Bundle (incl. Tracing) - uncompressed                        | 106.46 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed                | 217.52 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed      | 230.09 KB |
| [@&#8203;sentry/nextjs](https://redirect.github.com/sentry/nextjs) (client)                                          | 38.63 KB  |
| [@&#8203;sentry/sveltekit](https://redirect.github.com/sentry/sveltekit) (client)                                       | 36.2 KB   |
| [@&#8203;sentry/node](https://redirect.github.com/sentry/node)                                                     | 156.33 KB |
| [@&#8203;sentry/node](https://redirect.github.com/sentry/node) - without tracing                                   | 97.31 KB  |
| [@&#8203;sentry/aws-serverless](https://redirect.github.com/sentry/aws-serverless)                                           | 106.82 KB |

### [`v9.0.0`](https://redirect.github.com/getsentry/sentry-javascript/blob/HEAD/CHANGELOG.md#900)

[Compare Source](https://redirect.github.com/getsentry/sentry-javascript/compare/8.54.0...9.0.0)

Version `9.0.0` marks a release of the Sentry JavaScript SDKs that contains breaking changes.
The goal of this release is to trim down on unused and potentially confusing APIs, prepare the SDKs for future framework versions to build deeper instrumentation, and remove old polyfills to reduce the packages' size.

##### How To Upgrade

Please carefully read through the migration guide in the Sentry docs on how to upgrade from version 8 to version 9.
Make sure to select your specific platform/framework in the top left corner: https://docs.sentry.io/platforms/javascript/migration/v8-to-v9/

A comprehensive migration guide outlining all changes for all the frameworks can be found within the Sentry JavaScript SDK Repository: https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md

##### Breaking Changes

-   doc(deno)!: Make Deno v2 the minimum supported version ([#&#8203;15085](https://redirect.github.com/getsentry/sentry-javascript/issues/15085))
-   feat!: Bump typescript to `~5.0.0` ([#&#8203;14758](https://redirect.github.com/getsentry/sentry-javascript/issues/14758))
-   feat!: Drop `nitro-utils` package ([#&#8203;14998](https://redirect.github.com/getsentry/sentry-javascript/issues/14998))
-   feat!: Only collect ip addresses with `sendDefaultPii: true` ([#&#8203;15084](https://redirect.github.com/getsentry/sentry-javascript/issues/15084))
-   feat!: Remove `autoSessionTracking` option ([#&#8203;14802](https://redirect.github.com/getsentry/sentry-javascript/issues/14802))
-   feat!: Remove `enableTracing` ([#&#8203;15078](https://redirect.github.com/getsentry/sentry-javascript/issues/15078))
-   feat!: Remove `getCurrentHub()`, `Hub`, and `getCurrentHubShim()` ([#&#8203;15122](https://redirect.github.com/getsentry/sentry-javascript/issues/15122))
-   feat!: Remove `spanId` from propagation context ([#&#8203;14733](https://redirect.github.com/getsentry/sentry-javascript/issues/14733))
-   feat!: Remove deprecated and unused code ([#&#8203;15077](https://redirect.github.com/getsentry/sentry-javascript/issues/15077))
-   feat!: Remove metrics API from the JS SDK ([#&#8203;14745](https://redirect.github.com/getsentry/sentry-javascript/issues/14745))
-   feat!: Require Node `>=18` as minimum supported version ([#&#8203;14749](https://redirect.github.com/getsentry/sentry-javascript/issues/14749))
-   feat(astro)!: Respect user-specified source map setting ([#&#8203;14941](https://redirect.github.com/getsentry/sentry-javascript/issues/14941))
-   feat(browser)!: Remove `captureUserFeedback` method ([#&#8203;14820](https://redirect.github.com/getsentry/sentry-javascript/issues/14820))
-   feat(build)!: Drop pre-ES2020 polyfills ([#&#8203;14882](https://redirect.github.com/getsentry/sentry-javascript/issues/14882))
-   feat(core)!: Add `normalizedRequest` to `samplingContext` ([#&#8203;14902](https://redirect.github.com/getsentry/sentry-javascript/issues/14902))
-   feat(core)!: Always use session from isolation scope ([#&#8203;14860](https://redirect.github.com/getsentry/sentry-javascript/issues/14860))
-   feat(core)!: Pass root spans to `beforeSendSpan` and disallow returning `null` ([#&#8203;14831](https://redirect.github.com/getsentry/sentry-javascript/issues/14831))
-   feat(core)!: Remove `BAGGAGE_HEADER_NAME` export ([#&#8203;14785](https://redirect.github.com/getsentry/sentry-javascript/issues/14785))
-   feat(core)!: Remove `TransactionNamingScheme` type ([#&#8203;14865](https://redirect.github.com/getsentry/sentry-javascript/issues/14865))
-   feat(core)!: Remove `addOpenTelemetryInstrumentation` method ([#&#8203;14792](https://redirect.github.com/getsentry/sentry-javascript/issues/14792))
-   feat(core)!: Remove `arrayify` method ([#&#8203;14782](https://redirect.github.com/getsentry/sentry-javascript/issues/14782))
-   feat(core)!: Remove `debugIntegration` and `sessionTimingIntegration` ([#&#8203;14747](https://redirect.github.com/getsentry/sentry-javascript/issues/14747))
-   feat(core)!: Remove `flatten` method ([#&#8203;14784](https://redirect.github.com/getsentry/sentry-javascript/issues/14784))
-   feat(core)!: Remove `getDomElement` method ([#&#8203;14797](https://redirect.github.com/getsentry/sentry-javascript/issues/14797))
-   feat(core)!: Remove `makeFifoCache` method ([#&#8203;14786](https://redirect.github.com/getsentry/sentry-javascript/issues/14786))
-   feat(core)!: Remove `memoBuilder` export & `WeakSet` fallback ([#&#8203;14859](https://redirect.github.com/getsentry/sentry-javascript/issues/14859))
-   feat(core)!: Remove `transactionContext` from `samplingContext` ([#&#8203;14904](https://redirect.github.com/getsentry/sentry-javascript/issues/14904))
-   feat(core)!: Remove `urlEncode` method ([#&#8203;14783](https://redirect.github.com/getsentry/sentry-javascript/issues/14783))
-   feat(core)!: Remove deprecated `Request` type ([#&#8203;14858](https://redirect.github.com/getsentry/sentry-javascript/issues/14858))
-   feat(core)!: Remove deprecated request data methods ([#&#8203;14896](https://redirect.github.com/getsentry/sentry-javascript/issues/14896))
-   feat(core)!: Remove standalone `Client` interface & deprecate `BaseClient` ([#&#8203;14800](https://redirect.github.com/getsentry/sentry-javascript/issues/14800))
-   feat(core)!: Remove validSeverityLevels export ([#&#8203;14765](https://redirect.github.com/getsentry/sentry-javascript/issues/14765))
-   feat(core)!: Stop accepting `event` as argument for `recordDroppedEvent` ([#&#8203;14999](https://redirect.github.com/getsentry/sentry-javascript/issues/14999))
-   feat(core)!: Stop setting user in `requestDataIntegration` ([#&#8203;14898](https://redirect.github.com/getsentry/sentry-javascript/issues/14898))
-   feat(core)!: Type sdkProcessingMetadata more strictly ([#&#8203;14855](https://redirect.github.com/getsentry/sentry-javascript/issues/14855))
-   feat(core)!: Update `hasTracingEnabled` to consider empty trace config ([#&#8203;14857](https://redirect.github.com/getsentry/sentry-javascript/issues/14857))
-   feat(core)!: Update `requestDataIntegration` handling ([#&#8203;14806](https://redirect.github.com/getsentry/sentry-javascript/issues/14806))
-   feat(deno)!: Remove deno prepack ([#&#8203;14829](https://redirect.github.com/getsentry/sentry-javascript/issues/14829))
-   feat(ember)!: Officially drop support for ember `<=3.x` ([#&#8203;15032](https://redirect.github.com/getsentry/sentry-javascript/issues/15032))
-   feat(nestjs)!: Move `nestIntegration` into nest sdk and remove `setupNestErrorHandler` ([#&#8203;14751](https://redirect.github.com/getsentry/sentry-javascript/issues/14751))
-   feat(nestjs)!: Remove `@WithSentry` decorator ([#&#8203;14762](https://redirect.github.com/getsentry/sentry-javascript/issues/14762))
-   feat(nestjs)!: Remove `SentryService` ([#&#8203;14759](https://redirect.github.com/getsentry/sentry-javascript/issues/14759))
-   feat(nextjs)!: Don't rely on Next.js Build ID for release names ([#&#8203;14939](https://redirect.github.com/getsentry/sentry-javascript/issues/14939))
-   feat(nextjs)!: Remove `experimental_captureRequestError` ([#&#8203;14607](https://redirect.github.com/getsentry/sentry-javascript/issues/14607))
-   feat(nextjs)!: Respect user-provided source map generation settings ([#&#8203;14956](https://redirect.github.com/getsentry/sentry-javascript/issues/14956))
-   feat(node)!: Add support for Prisma v6 and drop v5 support ([#&#8203;15120](https://redirect.github.com/getsentry/sentry-javascript/issues/15120))
-   feat(node)!: Avoid http spans by default for custom OTEL setups ([#&#8203;14678](https://redirect.github.com/getsentry/sentry-javascript/issues/14678))
-   feat(node)!: Collect request sessions via HTTP instrumentation ([#&#8203;14658](https://redirect.github.com/getsentry/sentry-javascript/issues/14658))
-   feat(node)!: Remove `processThreadBreadcrumbIntegration` ([#&#8203;14666](https://redirect.github.com/getsentry/sentry-javascript/issues/14666))
-   feat(node)!: Remove fine grained `registerEsmLoaderHooks` ([#&#8203;15002](https://redirect.github.com/getsentry/sentry-javascript/issues/15002))
-   feat(opentelemetry)!: Exclusively pass root spans through sampling pipeline ([#&#8203;14951](https://redirect.github.com/getsentry/sentry-javascript/issues/14951))
-   feat(pinia)!: Include state of all stores in breadcrumb ([#&#8203;15312](https://redirect.github.com/getsentry/sentry-javascript/issues/15312))
-   feat(react)!: Raise minimum supported TanStack Router version to `1.63.0` ([#&#8203;15030](https://redirect.github.com/getsentry/sentry-javascript/issues/15030))
-   feat(react)!: Remove deprecated `getNumberOfUrlSegments` method ([#&#8203;14744](https://redirect.github.com/getsentry/sentry-javascript/issues/14744))
-   feat(react)!: Remove deprecated react router methods ([#&#8203;14743](https://redirect.github.com/getsentry/sentry-javascript/issues/14743))
-   feat(react)!: Update `ErrorBoundary` `componentStack` type ([#&#8203;14742](https://redirect.github.com/getsentry/sentry-javascript/issues/14742))
-   feat(remix)!: Drop support for Remix v1 ([#&#8203;14988](https://redirect.github.com/getsentry/sentry-javascript/issues/14988))
-   feat(remix)!: Remove `autoInstrumentRemix` option ([#&#8203;15074](https://redirect.github.com/getsentry/sentry-javascript/issues/15074))
-   feat(solidstart)!: Default to `--import` setup and add `autoInjectServerSentry` ([#&#8203;14862](https://redirect.github.com/getsentry/sentry-javascript/issues/14862))
-   feat(solidstart)!: No longer export `sentrySolidStartVite` ([#&#8203;15143](https://redirect.github.com/getsentry/sentry-javascript/issues/15143))
-   feat(solidstart)!: Respect user-provided source map setting ([#&#8203;14979](https://redirect.github.com/getsentry/sentry-javascript/issues/14979))
-   feat(svelte)!: Disable component update tracking by default ([#&#8203;15265](https://redirect.github.com/getsentry/sentry-javascript/issues/15265))
-   feat(sveltekit)!: Drop support for SvelteKit [@&#8203;1](https://redirect.github.com/1).x ([#&#8203;15037](https://redirect.github.com/getsentry/sentry-javascript/issues/15037))
-   feat(sveltekit)!: Remove `fetchProxyScriptNonce` option ([#&#8203;15123](https://redirect.github.com/getsentry/sentry-javascript/issues/15123))
-   feat(sveltekit)!: Respect user-provided source map generation settings ([#&#8203;14886](https://redirect.github.com/getsentry/sentry-javascript/issues/14886))
-   feat(utils)!: Remove `@sentry/utils` package ([#&#8203;14830](https://redirect.github.com/getsentry/sentry-javascript/issues/14830))
-   feat(vue)!: Remove configuring Vue tracing options anywhere else other than through the `vueIntegration`'s `tracingOptions` option ([#&#8203;14856](https://redirect.github.com/getsentry/sentry-javascript/issues/14856))
-   feat(vue/nuxt)!: No longer create `"update"` spans for component tracking by default ([#&#8203;14602](https://redirect.github.com/getsentry/sentry-javascript/issues/14602))
-   fix(node)!: Fix name of `vercelAIIntegration` to `VercelAI` ([#&#8203;15298](https://redirect.github.com/getsentry/sentry-javascript/issues/15298))
-   fix(vue)!: Remove `logError` from `vueIntegration` ([#&#8203;14958](https://redirect.github.com/getsentry/sentry-javascript/issues/14958))
-   ref!: Don't polyfill optional chaining and nullish coalescing ([#&#8203;14603](https://redirect.github.com/getsentry/sentry-javascript/issues/14603))
-   ref(core)!: Cleanup internal types, including `ReportDialogOptions` ([#&#8203;14861](https://redirect.github.com/getsentry/sentry-javascript/issues/14861))
-   ref(core)!: Mark exceptions from `captureConsoleIntegration` as `handled: true` by default ([#&#8203;14734](https://redirect.github.com/getsentry/sentry-javascript/issues/14734))
-   ref(core)!: Move `shutdownTimeout` option type from core to node ([#&#8203;15217](https://redirect.github.com/getsentry/sentry-javascript/issues/15217))
-   ref(core)!: Remove `Scope` type interface in favor of using `Scope` class ([#&#8203;14721](https://redirect.github.com/getsentry/sentry-javascript/issues/14721))
-   ref(core)!: Remove backwards compatible SentryCarrier type ([#&#8203;14697](https://redirect.github.com/getsentry/sentry-javascript/issues/14697))

##### Other Changes

-   chore(browser): Export ipAddress helpers for use in other SDKs ([#&#8203;15079](https://redirect.github.com/getsentry/sentry-javascript/issues/15079))
-   deps(node): Bump `import-in-the-middle` to `1.12.0` ([#&#8203;14796](https://redirect.github.com/getsentry/sentry-javascript/issues/14796))
-   feat(aws): Rename AWS lambda layer name to `SentryNodeServerlessSDKv9` ([#&#8203;14927](https://redirect.github.com/getsentry/sentry-javascript/issues/14927))
-   feat(aws-serverless): Upgrade OTEL deps ([#&#8203;15091](https://redirect.github.com/getsentry/sentry-javascript/issues/15091))
-   feat(browser): Set `user.ip_address` explicitly to `{{auto}}` ([#&#8203;15008](https://redirect.github.com/getsentry/sentry-javascript/issues/15008))
-   feat(core): Add `inheritOrSampleWith` helper to `traceSampler` ([#&#8203;15277](https://redirect.github.com/getsentry/sentry-javascript/issues/15277))
-   feat(core): Emit client reports for unsampled root spans on span start ([#&#8203;14936](https://redirect.github.com/getsentry/sentry-javascript/issues/14936))
-   feat(core): Rename `hasTracingEnabled` to `hasSpansEnabled` ([#&#8203;15309](https://redirect.github.com/getsentry/sentry-javascript/issues/15309))
-   feat(core): Streamline `SpanJSON` type ([#&#8203;14693](https://redirect.github.com/getsentry/sentry-javascript/issues/14693))
-   feat(deno): Don't bundle `@sentry/deno` ([#&#8203;15014](https://redirect.github.com/getsentry/sentry-javascript/issues/15014))
-   feat(deno): Don't publish to `deno.land` ([#&#8203;15016](https://redirect.github.com/getsentry/sentry-javascript/issues/15016))
-   feat(deno): Stop inlining types from core ([#&#8203;14729](https://redirect.github.com/getsentry/sentry-javascript/issues/14729))
-   feat(deps): Bump [@&#8203;opentelemetry/instrumentation-amqplib](https://redirect.github.com/opentelemetry/instrumentation-amqplib) from 0.45.0 to 0.46.0 ([#&#8203;14835](https://redirect.github.com/getsentry/sentry-javascript/issues/14835))
-   feat(deps): Bump [@&#8203;opentelemetry/instrumentation-aws-lambda](https://redirect.github.com/opentelemetry/instrumentation-aws-lambda) from 0.49.0 to 0.50.0 ([#&#8203;14833](https://redirect.github.com/getsentry/sentry-javascript/issues/14833))
-   feat(deps): Bump [@&#8203;opentelemetry/instrumentation-express](https://redirect.github.com/opentelemetry/instrumentation-express) from 0.46.0 to 0.47.0 ([#&#8203;14834](https://redirect.github.com/getsentry/sentry-javascript/issues/14834))
-   feat(deps): Bump [@&#8203;opentelemetry/instrumentation-mysql2](https://redirect.github.com/opentelemetry/instrumentation-mysql2) from 0.44.0 to 0.45.0 ([#&#8203;14836](https://redirect.github.com/getsentry/sentry-javascript/issues/14836))
-   feat(deps): Bump [@&#8203;opentelemetry/propagation-utils](https://redirect.github.com/opentelemetry/propagation-utils) from 0.30.14 to 0.30.15 ([#&#8203;14832](https://redirect.github.com/getsentry/sentry-javascript/issues/14832))
-   feat(deps): bump [@&#8203;opentelemetry/context-async-hooks](https://redirect.github.com/opentelemetry/context-async-hooks) from 1.29.0 to 1.30.0 ([#&#8203;14869](https://redirect.github.com/getsentry/sentry-javascript/issues/14869))
-   feat(deps): bump [@&#8203;opentelemetry/instrumentation-generic-pool](https://redirect.github.com/opentelemetry/instrumentation-generic-pool) from 0.42.0 to 0.43.0 ([#&#8203;14870](https://redirect.github.com/getsentry/sentry-javascript/issues/14870))
-   feat(deps): bump [@&#8203;opentelemetry/instrumentation-knex](https://redirect.github.com/opentelemetry/instrumentation-knex) from 0.43.0 to 0.44.0 ([#&#8203;14872](https://redirect.github.com/getsentry/sentry-javascript/issues/14872))
-   feat(deps): bump [@&#8203;opentelemetry/instrumentation-mongodb](https://redirect.github.com/opentelemetry/instrumentation-mongodb) from 0.50.0 to 0.51.0 ([#&#8203;14871](https://redirect.github.com/getsentry/sentry-javascript/issues/14871))
-   feat(deps): bump [@&#8203;opentelemetry/instrumentation-tedious](https://redirect.github.com/opentelemetry/instrumentation-tedious) from 0.17.0 to 0.18.0 ([#&#8203;14868](https://redirect.github.com/getsentry/sentry-javascript/issues/14868))
-   feat(deps): bump [@&#8203;sentry/cli](https://redirect.github.com/sentry/cli) from 2.39.1 to 2.41.1 ([#&#8203;15173](https://redirect.github.com/getsentry/sentry-javascript/issues/15173))
-   feat(flags): Add Statsig browser integration ([#&#8203;15319](https://redirect.github.com/getsentry/sentry-javascript/issues/15319))
-   feat(gatsby): Preserve user-provided source map settings ([#&#8203;15006](https://redirect.github.com/getsentry/sentry-javascript/issues/15006))
-   feat(nestjs): Remove `SentryTracingInterceptor`, `SentryGlobalGraphQLFilter`, `SentryGlobalGenericFilter` ([#&#8203;14761](https://redirect.github.com/getsentry/sentry-javascript/issues/14761))
-   feat(nextjs): Directly forward `sourcemaps.disable` to webpack plugin ([#&#8203;15109](https://redirect.github.com/getsentry/sentry-javascript/issues/15109))
-   feat(node): Add `processSessionIntegration` ([#&#8203;15081](https://redirect.github.com/getsentry/sentry-javascript/issues/15081))
-   feat(node): Add missing `vercelAIIntegration` export ([#&#8203;15318](https://redirect.github.com/getsentry/sentry-javascript/issues/15318))
-   feat(node): Capture exceptions from `worker_threads` ([#&#8203;15105](https://redirect.github.com/getsentry/sentry-javascript/issues/15105))
-   feat(nuxt): Add enabled to disable Sentry module ([#&#8203;15337](https://redirect.github.com/getsentry/sentry-javascript/issues/15337))
-   feat(nuxt): add `silent`, `errorHandler`, `release` to `SourceMapsOptions` ([#&#8203;15246](https://redirect.github.com/getsentry/sentry-javascript/issues/15246))
-   feat(profiling-node): Use `@sentry-internal/node-cpu-profiler` ([#&#8203;15208](https://redirect.github.com/getsentry/sentry-javascript/issues/15208))
-   feat(replay): Update fflate to 0.8.2 ([#&#8203;14867](https://redirect.github.com/getsentry/sentry-javascript/issues/14867))
-   feat(solidstart): Add `autoInjectServerSentry: 'experimental_dynamic-import` ([#&#8203;14863](https://redirect.github.com/getsentry/sentry-javascript/issues/14863))
-   feat(sveltekit): Only inject fetch proxy script for SvelteKit < 2.16.0 ([#&#8203;15126](https://redirect.github.com/getsentry/sentry-javascript/issues/15126))
-   feat(user feedback): Adds draw tool for UF screenshot annotations ([#&#8203;15062](https://redirect.github.com/getsentry/sentry-javascript/issues/15062))
-   feat(user feedback): Adds toolbar for cropping and annotating ([#&#8203;15282](https://redirect.github.com/getsentry/sentry-javascript/issues/15282))
-   feat: Avoid class fields all-together ([#&#8203;14887](https://redirect.github.com/getsentry/sentry-javascript/issues/14887))
-   feat: Only emit `__esModule` properties in CJS modules when there is a default export ([#&#8203;15018](https://redirect.github.com/getsentry/sentry-javascript/issues/15018))
-   feat: Pass `parentSampleRate` to `tracesSampler` ([#&#8203;15024](https://redirect.github.com/getsentry/sentry-javascript/issues/15024))
-   feat: Propagate and use a sampling random ([#&#8203;14989](https://redirect.github.com/getsentry/sentry-javascript/issues/14989))
-   fix(browser): Remove `browserPerformanceTimeOrigin` side-effects ([#&#8203;14025](https://redirect.github.com/getsentry/sentry-javascript/issues/14025))
-   fix(core): Ensure debugIds are applied to all exceptions in an event ([#&#8203;14881](https://redirect.github.com/getsentry/sentry-javascript/issues/14881))
-   fix(core): Fork scope if custom scope is passed to `startSpanManual` ([#&#8203;14901](https://redirect.github.com/getsentry/sentry-javascript/issues/14901))
-   fix(core): Fork scope if custom scope is passed to `startSpan` ([#&#8203;14900](https://redirect.github.com/getsentry/sentry-javascript/issues/14900))
-   fix(core): Only fall back to `sendDefaultPii` for IP collection in `requestDataIntegration` ([#&#8203;15125](https://redirect.github.com/getsentry/sentry-javascript/issues/15125))
-   fix(nextjs): Flush with `waitUntil` in `captureRequestError` ([#&#8203;15146](https://redirect.github.com/getsentry/sentry-javascript/issues/15146))
-   fix(nextjs): Use batched devserver symbolication endpoint ([#&#8203;15335](https://redirect.github.com/getsentry/sentry-javascript/issues/15335))
-   fix(node): Don't leak `__span` property into breadcrumbs ([#&#8203;14798](https://redirect.github.com/getsentry/sentry-javascript/issues/14798))
-   fix(node): Ensure `httpIntegration` propagates traces ([#&#8203;15233](https://redirect.github.com/getsentry/sentry-javascript/issues/15233))
-   fix(node): Fix sample rand propagation for negative sampling decisions ([#&#8203;15045](https://redirect.github.com/getsentry/sentry-javascript/issues/15045))
-   fix(node): Missing `release` from ANR sessions ([#&#8203;15138](https://redirect.github.com/getsentry/sentry-javascript/issues/15138))
-   fix(node): Set the correct fallback URL fields for outgoing https requests if they are not defined ([#&#8203;15316](https://redirect.github.com/getsentry/sentry-javascript/issues/15316))
-   fix(nuxt): Detect Azure Function runtime for flushing with timeout ([#&#8203;15288](https://redirect.github.com/getsentry/sentry-javascript/issues/15288))
-   fix(react): From location can be undefined in Tanstack Router Instrumentation ([#&#8203;15235](https://redirect.github.com/getsentry/sentry-javascript/issues/15235))
-   fix(react): Import default for hoistNonReactStatics ([#&#8203;15238](https://redirect.github.com/getsentry/sentry-javascript/issues/15238))
-   fix(react): Support lazy-loaded routes and components. ([#&#8203;15039](https://redirect.github.com/getsentry/sentry-javascript/issues/15039))
-   fix(solidstart): Do not copy release-injection map file ([#&#8203;15302](https://redirect.github.com/getsentry/sentry-javascript/issues/15302))
-   ref(browser): Improve active span handling for `browserTracingIntegration` ([#&#8203;14959](https://redirect.github.com/getsentry/sentry-javascript/issues/14959))
-   ref(browser): Improve setting of propagation scope for navigation spans ([#&#8203;15108](https://redirect.github.com/getsentry/sentry-javascript/issues/15108))
-   ref(browser): Skip browser extension warning in non-debug builds ([#&#8203;15310](https://redirect.github.com/getsentry/sentry-javascript/issues/15310))
-   ref(browser): Update `supportsHistory` check & history usage ([#&#8203;14696](https://redirect.github.com/getsentry/sentry-javascript/issues/14696))
-   ref(core): Ensure non-recording root spans have frozen DSC ([#&#8203;14964](https://redirect.github.com/getsentry/sentry-javascript/issues/14964))
-   ref(core): Log debug message when capturing error events ([#&#8203;14701](https://redirect.github.com/getsentry/sentry-javascript/issues/14701))
-   ref(core): Move log message about invalid sample rate ([#&#8203;15215](https://redirect.github.com/getsentry/sentry-javascript/issues/15215))
-   ref(node): Streamline check for adding performance integrations ([#&#8203;15021](https://redirect.github.com/getsentry/sentry-javascript/issues/15021))
-   ref(react): Adapt tanstack router type ([#&#8203;15241](https://redirect.github.com/getsentry/sentry-javascript/issues/15241))
-   ref(svelte): Remove SvelteKit detection ([#&#8203;15313](https://redirect.github.com/getsentry/sentry-javascript/issues/15313))
-   ref(sveltekit): Clean up sub-request check ([#&#8203;15251](https://redirect.github.com/getsentry/sentry-javascript/issues/15251))

Work in this release was contributed by [@&#8203;aloisklink](https://redirect.github.com/aloisklink), [@&#8203;arturovt](https://redirect.github.com/arturovt), [@&#8203;aryanvdesh](https://redirect.github.com/aryanvdesh), [@&#8203;benjick](https://redirect.github.com/benjick), [@&#8203;chris-basebone](https://redirect.github.com/chris-basebone), [@&#8203;davidturissini](https://redirect.github.com/davidturissini), [@&#8203;GrizliK1988](https://redirect.github.com/GrizliK1988), [@&#8203;jahands](https://redirect.github.com/jahands), [@&#8203;jrandolf](https://redirect.github.com/jrandolf), [@&#8203;kunal-511](https://redirect.github.com/kunal-511), [@&#8203;maximepvrt](https://redirect.github.com/maximepvrt), [@&#8203;maxmaxme](https://redirect.github.com/maxmaxme), [@&#8203;mstrokin](https://redirect.github.com/mstrokin), [@&#8203;nathankleyn](https://redirect.github.com/nathankleyn), [@&#8203;nwalters512](https://redirect.github.com/nwalters512), [@&#8203;tannerlinsley](https://redirect.github.com/tannerlinsley), [@&#8203;tjhiggins](https://redirect.github.com/tjhiggins), and [@&#8203;Zen-cronic](https://redirect.github.com/Zen-cronic). Thank you for your contributions!

</details>

---

### Configuration

📅 **Schedule**: 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjQuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2NC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-02-28 14:09:36 +00:00
L-Sun
d476d3b1df fix(editor): android keyboard can not be opened (#10502)
Close [BS-2674](https://linear.app/affine-design/issue/BS-2674/[android]-%E6%96%87%E6%9C%AC%E7%BC%96%E8%BE%91%E5%8C%BA%E5%9F%9F%E7%82%B9%E5%87%BB%E5%90%8E%E6%97%A0%E6%B3%95%E6%BF%80%E6%B4%BB%E9%94%AE%E7%9B%98) [BS-2609](https://linear.app/affine-design/issue/BS-2609/[android]-%E8%BE%93%E5%85%A5%E7%9A%84-toolbar-%E6%B2%A1%E6%9C%89%E4%BA%86)
2025-02-28 08:23:26 +00:00
Saul-Mirone
eef2f004b8 refactor(editor): reorg blocksuite ai code (#10372)
### TL;DR

Relocated AI-related code from `presets` directory to a dedicated `ai` directory for better organization and maintainability.

### What changed?

- Moved AI-related code from `blocksuite/presets/ai` to `blocksuite/ai`
- Relocated AI chat block code from `blocksuite/blocks` to `blocksuite/ai/blocks`
- Updated imports across files to reflect new directory structure
- Renamed `registerBlocksuitePresetsCustomComponents` to `registerAIEffects`
- Fixed path references in GitHub workflow file

### How to test?

1. Build and run the application
2. Verify AI functionality works as expected:
   - Test AI chat blocks
   - Check AI panel functionality
   - Verify AI copilot features
   - Ensure AI-related UI components render correctly

### Why make this change?

This restructuring improves code organization by:
- Giving AI features a dedicated directory that better reflects their importance
- Making the codebase more maintainable by grouping related AI functionality
- Reducing confusion by removing AI code from the more general `presets` directory
- Creating clearer boundaries between AI and non-AI related code
2025-02-23 09:26:00 +00:00
Peng Xiao
dff68b9aae fix(core): blocksuite editor runtime configs in correct timing (#10344) 2025-02-21 17:16:53 +08:00
Saul-Mirone
adcc6b578c refactor(editor): move editor components to frontend core (#10335)
### TL;DR
Moved editor components from BlockSuite presets to AFFiNE core and updated imports accordingly.

### What changed?
- Relocated `EdgelessEditor` and `PageEditor` components from BlockSuite presets to AFFiNE core
- Removed basic editor examples from playground
- Updated import paths across the codebase to reference new component locations
- Added editor effects registration in AFFiNE core
- Removed editor exports from BlockSuite presets

### How to test?
1. Launch the application
2. Verify both page and edgeless editors load correctly
3. Confirm editor functionality remains intact including:
   - Document editing
   - Mode switching
   - Editor toolbars and controls
   - Multiple editor instances

### Why make this change?
This change better aligns with AFFiNE's architecture by moving editor components closer to where they are used. It reduces coupling with BlockSuite presets and gives AFFiNE more direct control over editor customization and implementation.
2025-02-21 04:28:54 +00:00
Saul-Mirone
b8dcb85007 refactor: move outline fragment to separate package (#10331)
### TL;DR

Moved outline functionality into a dedicated fragment package and updated vanilla-extract CSS dependency.

### What changed?

- Created new `@blocksuite/affine-fragment-outline` package
- Relocated outline-related code from presets to the new fragment package
- Updated imports across affected files to reference the new package location
- Upgraded `@vanilla-extract/css` dependency from 1.14.0/1.16.1 to 1.17.0
- Added necessary package configuration and TypeScript setup for the new fragment

### How to test?

1. Verify outline functionality works as expected in both desktop and mobile views
2. Check that outline panel, viewer, and mobile menu components render correctly
3. Ensure outline navigation and interactions continue to work
4. Confirm no regressions in outline-related features

### Why make this change?

This change improves code organization by isolating outline functionality into a dedicated package, following the modular architecture pattern. This makes the codebase more maintainable and allows for better separation of concerns. The vanilla-extract CSS upgrade ensures consistency across packages and provides access to the latest features and fixes.
2025-02-20 15:59:13 +00:00
Saul-Mirone
5ac15f12e6 refactor: replace editor container with editor host (#10328)
### TL;DR
Refactored editor access to use `EditorHost` instead of `AffineEditorContainer` and updated mode access through `DocModeProvider`.

### What changed?
- Changed editor property types from `AffineEditorContainer` to `EditorHost` across multiple components
- Updated mode access to use `DocModeProvider` service instead of direct editor mode access
- Modified editor references to use `editor.host` where appropriate
- Updated scroll and highlight utilities to work with `EditorHost`

### How to test?
1. Open a document in both page and edgeless modes
2. Verify outline panel functionality works as expected
3. Test outline viewer navigation and highlighting
4. Confirm mobile outline menu operates correctly
5. Check that frame panel and TOC features work in all modes

### Why make this change?
This change improves architectural consistency by using `EditorHost` directly and accessing mode through the proper service provider. This makes the code more maintainable and follows better dependency practices by using the correct abstraction levels.
2025-02-20 14:20:32 +00:00
CatsJuice
35f7f5a01b chore(mobile): adjust setting dialog swipe gesture trigger size (#10236) 2025-02-19 02:41:41 +00:00
L-Sun
4e546c78ef chore(core): remove template doc feature flag (#10252) 2025-02-18 09:25:06 +00:00
Aki Chang
3f4b7ec51e feat(android): integrate web api & native AI chat button (#10239) 2025-02-18 16:23:25 +08:00
CatsJuice
887bbcf641 chore(core): add feature flag for ios AI button (#10150)
close AF-2209, AF-2104
2025-02-13 09:10:14 +00:00
L-Sun
401ce70153 refactor(core): remove the unused compareDate field from DocDisplayIconOptions (#10095) 2025-02-11 13:26:43 +00:00
EYHN
92f4f0c2d9 feat(core): guard service (#9816) 2025-02-09 23:26:38 +00:00
JimmFly
5ae5fd88f1 feat(core): add doc grant feature to share menu (#9672) 2025-02-07 13:05:58 +00:00
forehalo
0b9d30b55a refactor: rename all page query to doc (#10019) 2025-02-07 11:40:59 +00:00
CatsJuice
85d916f1eb feat(mobile): create from template on mobile (#9968) 2025-02-07 09:52:59 +00:00
Saul-Mirone
f3f6e8c6ac refactor(editor): remove attachment and image block service (#9909) 2025-01-28 20:53:23 +00:00
pengx17
08f6a22d44 fix(core): linkpreview and imageproxy url should be prefixed with server url (#9838)
fix AF-2150
2025-01-22 09:31:05 +00:00
pengx17
4c665594d6 fix(editor): ref on click slots should not be global (#9830)
fix AF-2129
2025-01-22 05:20:55 +00:00
donteatfriedrice
4bd43a698c refactor(editor): refactor linkPreviewer as an extension and remove bookmark service (#9754)
[BS-2427](https://linear.app/affine-design/issue/BS-2427/移除-bookmark-block-service) [BS-2418](https://linear.app/affine-design/issue/BS-2418/linkpreviewer-重构成插件)
2025-01-20 04:18:00 +00:00
fundon
7436c139ab fix(core): improve doc title and icon display (#9755)
Closes: [AF-2132](https://linear.app/affine-design/issue/AF-2132/优化-emoji-title-和-icon-显示)
2025-01-18 17:29:15 +08:00
EYHN
a2ffdb4047 feat(core): new worker workspace engine (#9257) 2025-01-16 16:22:18 +00:00
pengx17
7dc470e7ea feat(core): add new bs dnd adapter (#9717) 2025-01-16 13:54:50 +00:00
pengx17
b1896746f9 refactor(core): move setting dialog to workspace scope (#9706) 2025-01-15 13:00:06 +00:00
pengx17
f78857bb11 feat(editor): add more open doc options to editor toolbar (#9588)
fix AF-2036, AF-2092
2025-01-09 08:04:21 +00:00
akumatus
58ce86533e feat(core): support ai network search (#9357)
### What Changed?
- Add `PerplexityProvider` in backend.
- Update session prompt name if user toggle network search mode in chat panel.
- Add experimental flag for AI network search feature.
- Add unit tests and e2e tests.

Search results are streamed and appear word for word:

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov">录屏2024-12-27 18.58.40.mov</video>

Click the little globe icon to manually turn on/off Internet search:
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov">录屏2024-12-27 19.01.16.mov</video>

When there is an image, it will automatically switch to the openai model:

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov">录屏2024-12-27 19.02.13.mov</video>
2025-01-09 04:00:59 +00:00
L-Sun
a0cba55a5b feat(mobile): mobile toc menu (#9582)
Close [BS-1787](https://linear.app/affine-design/issue/BS-1787/toc-移动端适配)
2025-01-08 08:03:11 +00:00
pengx17
a4841bbfa3 feat(core): drop doc onto split view (#9487)
fix AF-2068, AF-2069, AF-1175, AF-2061, AF-2079, AF-2034, AF-2080, AF-1960, AF-2081

1. replace `dnd-kit` with `@atlaskit/pragmatic-drag-and-drop`
2. allow creating split views by drag & drop the following
   a. WorkbenchLinks (route links), like journals, trash, all docs
   b. doc refs
   c. tags/collection
3. style adjustments to split view
4. remove split view's feature flag and make it GA for electron

https://github.com/user-attachments/assets/6a3e4a25-faa2-4215-8eb0-983f44db6e8c
2025-01-08 05:05:33 +00:00
CatsJuice
09937a8e4d chore: bump icons with new design source (#9529) 2025-01-06 03:10:03 +00:00
doodlewind
8227d68953 refactor(core): remove abort event error on init (#9465)
Following error always throw on Affine init, which is actually an `Event` from abort controller that can be handled in upstream.

![image](https://github.com/user-attachments/assets/50c25e5e-4a9c-45e0-b756-6b0f47390733)
2025-01-01 01:22:29 +00:00
pengx17
70e4c8feab feat(core): info modal should render backlinks with preview (#9387)
fix AF-2033
2024-12-27 13:47:06 +00:00
CatsJuice
0acdf62043 refactor(ios): disable navigation gesture with js (#9287)
Do not toggle navigation gesture native to avoid unexpected behavior. close AF-1958, AF-1797
2024-12-25 04:27:51 +00:00