Commit Graph

494 Commits

Author SHA1 Message Date
L-Sun
4e80ecd591 refactor(editor): image slash menu config extension (#10674) 2025-03-07 05:48:40 +00:00
L-Sun
66ad87c84a refactor(editor): table slash menu config extension (#10673) 2025-03-07 05:48:39 +00:00
doouding
460e088873 fix: block should not be selectable when dragged into note (#10664)
### Changed
- Fixed the issue that block can still be selected when dragged into note
- Rewrite grid and layer with extension infra
2025-03-07 04:40:05 +00:00
L-Sun
0a234fa263 refactor(editor): callout slash menu config extension (#10672) 2025-03-07 04:24:09 +00:00
Saul-Mirone
fe5f0f62ec feat(editor): rich text package (#10689)
This PR performs a significant architectural refactoring by extracting rich text functionality into a dedicated package. Here are the key changes:

1. **New Package Creation**
- Created a new package `@blocksuite/affine-rich-text` to house rich text related functionality
- Moved rich text components, utilities, and types from `@blocksuite/affine-components` to this new package

2. **Dependency Updates**
- Updated multiple block packages to include the new `@blocksuite/affine-rich-text` as a direct dependency:
  - block-callout
  - block-code
  - block-database
  - block-edgeless-text
  - block-embed
  - block-list
  - block-note
  - block-paragraph

3. **Import Path Updates**
- Refactored all imports that previously referenced rich text functionality from `@blocksuite/affine-components/rich-text` to now use `@blocksuite/affine-rich-text`
- Updated imports for components like:
  - DefaultInlineManagerExtension
  - RichText types and interfaces
  - Text manipulation utilities (focusTextModel, textKeymap, etc.)
  - Reference node components and providers

4. **Build Configuration Updates**
- Added references to the new rich text package in the `tsconfig.json` files of all affected packages
- Maintained workspace dependencies using the `workspace:*` version specifier

The primary motivation appears to be:
1. Better separation of concerns by isolating rich text functionality
2. Improved maintainability through more modular package structure
3. Clearer dependencies between packages
4. Potential for better tree-shaking and bundle optimization

This is primarily an architectural improvement that should make the codebase more maintainable and better organized.
2025-03-07 04:08:47 +00:00
fundon
916134b1da fix(editor): should update icon status when formatting the entire block text (#10508)
Closes: [BS-2718](https://linear.app/affine-design/issue/BS-2718/当处于-block-selection-状态且对整段进行-formatting-时,应该更新对应图标状态)
2025-03-07 03:22:01 +00:00
L-Sun
98d44d5be5 refactor(editor): move focus block commands to blocksuite/shared (#10671) 2025-03-07 03:07:49 +00:00
L-Sun
43ce609cba refactor(editor): database slash menu config extension (#10670) 2025-03-07 02:50:27 +00:00
L-Sun
490a191a11 refactor(editor): replace icons with blocksuite/icons (#10655) 2025-03-07 02:50:26 +00:00
L-Sun
750c8a44dc refactor(editor): add slash menu config extension entry (#10641)
Close [BS-2744](https://linear.app/affine-design/issue/BS-2744/slash-menu%E6%8F%92%E4%BB%B6%E5%8C%96%EF%BC%9Aaction%E6%B3%A8%E5%86%8C%E5%85%A5%E5%8F%A3)

This PR mainly focus  on providing an entry point for configuring the SlashMenu feature. Therefore, it strives to retain the original code to ensure that the modifications are simple and easy to review. Subsequent PRs will focus on moving different configurations into separate blocks.

### How to use?
Here is the type definition for the slash menu configuration.  An important change is the new field `group`, which indicates the sorting and grouping of the menu item. See the comments for details.

```ts
// types.ts
export type SlashMenuContext = {
  std: BlockStdScope;
  model: BlockModel;
};

export type SlashMenuItemBase = {
  name: string;
  description?: string;
  icon?: TemplateResult;
  /**
   * This field defines sorting and grouping of menu items like VSCode.
   * The first number indicates the group index, the second number indicates the item index in the group.
   * The group name is the string between `_` and `@`.
   * You can find an example figure in https://code.visualstudio.com/api/references/contribution-points#menu-example
   */
  group?: `${number}_${string}@${number}`;

  /**
   * The condition to show the menu item.
   */
  when?: (ctx: SlashMenuContext) => boolean;
};

export type SlashMenuActionItem = SlashMenuItemBase & {
  action: (ctx: SlashMenuContext) => void;
  tooltip?: SlashMenuTooltip;

  /**
   * The alias of the menu item for search.
   */
  searchAlias?: string[];
};

export type SlashMenuSubMenu = SlashMenuItemBase & {
  subMenu: SlashMenuItem[];
};

export type SlashMenuItem = SlashMenuActionItem | SlashMenuSubMenu;

export type SlashMenuConfig = {
  /**
   * The items in the slash menu. It can be generated dynamically with the context.
   */
  items: SlashMenuItem[] | ((ctx: SlashMenuContext) => SlashMenuItem[]);

  /**
   * Slash menu will not be triggered when the condition is true.
   */
  disableWhen?: (ctx: SlashMenuContext) => boolean;
};

// extensions.ts

/**
 * The extension to add a slash menu items or configure.
 */
export function SlashMenuConfigExtension(ext: {
  id: string;
  config: SlashMenuConfig;
}): ExtensionType {
  return {
    setup: di => {
      di.addImpl(SlashMenuConfigIdentifier(ext.id), ext.config);
    },
  };
}
```

Here is an example, `XXXSlashMenuConfig` adds a `Delete` action to the slash menu, which is assigned to the 8th group named `Actions` at position 0.
```ts
import { SlashMenuConfigExtension, type SlashMenuConfig } from '@blocksuite/affine-widget-slash-menu';

const XXXSlashMenuConfig = SlashMenuConfigExtension({
  id: 'XXX',
  config: {
    items: [
      {
        name: 'Delete',
        description: 'Remove a block.',
        searchAlias: ['remove'],
        icon: DeleteIcon,
        group: '8_Actions@0',
        action: ({ std, model }) => {
          std.host.doc.deleteBlock(model);
        },
      },
    ],
  },
});
```
2025-03-06 16:12:06 +00:00
L-Sun
62d8c0c7cb refactor(editor): adjust folder structure for slash menu extension (#10588)
Close [BS-2743](https://linear.app/affine-design/issue/BS-2743/slash-menu插件化:调整文件夹结构)

This PR move slash menu from `affine-root-block` to `widget-affine-slash-menu`, and make it as a `WidgetViewExtension`
2025-03-06 16:12:06 +00:00
Saul-Mirone
8d10b40b72 feat(editor): add loaded and disposed hook for store extension (#10669) 2025-03-06 13:31:09 +00:00
Saul-Mirone
2e86bfffae feat(editor): life cycle ext (#10668) 2025-03-06 12:28:55 +00:00
Flrande
b85812d8dd fix(editor): disable slash menu in callout (#10656) 2025-03-06 11:07:10 +00:00
Saul-Mirone
84e2dda3f8 refactor(editor): separate lit and slot in global (#10666) 2025-03-06 10:24:59 +00:00
fundon
93920f9895 fix(editor): circular dependencies (#10661)
Closes: [BS-2766](https://linear.app/affine-design/issue/BS-2766/把-converttodatabase-移到-root-block-中,避免循环依赖)
2025-03-06 09:41:01 +00:00
L-Sun
797e63f86f chore(editor): remove unexpected bottom padding of code block (#10660)
Close [BS-2765](https://linear.app/affine-design/issue/BS-2765/代码块在字数超出宽度时,下巴变大)

https://github.com/user-attachments/assets/1dc53528-6d36-4b2a-861c-9ca06381c681
2025-03-06 09:26:00 +00:00
Saul-Mirone
7ae9daa6f6 refactor(editor): use lodash (#10657) 2025-03-06 17:11:12 +08:00
fundon
8bfaa2502e fix(editor): should shift toolbar to keep in view when selected area exceeds view (#10642)
Closes: [BS-2757](https://linear.app/affine-design/issue/BS-2757/体验优化:pageedgeless-下,有超长选区时,toolbar-flip-后浮动在下方)

![Screenshot 2025-03-06 at 10.50.39.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/8ypiIKZXudF5a0tIgIzf/e92c586c-4bf0-4196-b2f5-ffaa09adcf14.png)

![Screenshot 2025-03-06 at 10.52.22.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/8ypiIKZXudF5a0tIgIzf/c24204df-5249-4a22-bde8-90cb8fa368c9.png)

![Screenshot 2025-03-06 at 10.50.58.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/8ypiIKZXudF5a0tIgIzf/22746460-5bb4-4f65-b96c-cbac7f189bdb.png)
2025-03-06 07:48:04 +00:00
fundon
ec9bd1f383 feat(editor): add toolbar registry extension (#9572)
### What's Changed!

#### Added
Manage various types of toolbars uniformly in one place.

* `affine-toolbar-widget`
* `ToolbarRegistryExtension`

The toolbar currently supports and handles several scenarios:

1.  Select blocks: `BlockSelection`
2. Select text: `TextSelection` or `NativeSelection`
3. Hover a link: `affine-link` and `affine-reference`

#### Removed
Remove redundant toolbar implementations.

* `attachment` toolbar
* `bookmark` toolbar
* `embed` toolbar
* `formatting` toolbar
* `affine-link` toolbar
* `affine-reference` toolbar

### How to migrate?

Here is an example that can help us migrate some unrefactored toolbars:

Check out the more detailed types of [`ToolbarModuleConfig`](c178debf2d/blocksuite/affine/shared/src/services/toolbar-service/config.ts).

1.  Add toolbar configuration file to a block type, such as bookmark block: [`config.ts`](c178debf2d/blocksuite/affine/block-bookmark/src/configs/toolbar.ts)

```ts
export const builtinToolbarConfig = {
  actions: [
    {
      id: 'a.preview',
      content(ctx) {
        const model = ctx.getCurrentModelBy(BlockSelection, BookmarkBlockModel);
        if (!model) return null;

        const { url } = model;

        return html`<affine-link-preview .url=${url}></affine-link-preview>`;
      },
    },
    {
      id: 'b.conversions',
      actions: [
        {
          id: 'inline',
          label: 'Inline view',
          run(ctx) {
          },
        },
        {
          id: 'card',
          label: 'Card view',
          disabled: true,
        },
        {
          id: 'embed',
          label: 'Embed view',
          disabled(ctx) {
          },
          run(ctx) {
          },
        },
      ],
      content(ctx) {
      },
    } satisfies ToolbarActionGroup<ToolbarAction>,
    {
      id: 'c.style',
      actions: [
        {
          id: 'horizontal',
          label: 'Large horizontal style',
        },
        {
          id: 'list',
          label: 'Small horizontal style',
        },
      ],
      content(ctx) {
      },
    } satisfies ToolbarActionGroup<ToolbarAction>,
    {
      id: 'd.caption',
      tooltip: 'Caption',
      icon: CaptionIcon(),
      run(ctx) {
      },
    },
    {
      placement: ActionPlacement.More,
      id: 'a.clipboard',
      actions: [
        {
          id: 'copy',
          label: 'Copy',
          icon: CopyIcon(),
          run(ctx) {
          },
        },
        {
          id: 'duplicate',
          label: 'Duplicate',
          icon: DuplicateIcon(),
          run(ctx) {
          },
        },
      ],
    },
    {
      placement: ActionPlacement.More,
      id: 'b.refresh',
      label: 'Reload',
      icon: ResetIcon(),
      run(ctx) {
      },
    },
    {
      placement: ActionPlacement.More,
      id: 'c.delete',
      label: 'Delete',
      icon: DeleteIcon(),
      variant: 'destructive',
      run(ctx) {
      },
    },
  ],
} as const satisfies ToolbarModuleConfig;
```

2. Add configuration extension to a block spec: [bookmark's spec](c178debf2d/blocksuite/affine/block-bookmark/src/bookmark-spec.ts)

```ts
const flavour = BookmarkBlockSchema.model.flavour;

export const BookmarkBlockSpec: ExtensionType[] = [
  ...,
  ToolbarModuleExtension({
    id: BlockFlavourIdentifier(flavour),
    config: builtinToolbarConfig,
  }),
].flat();
```

3. If the bock type already has a toolbar configuration built in, we can customize it in the following ways:

Check out the [editor's config](c178debf2d/packages/frontend/core/src/blocksuite/extensions/editor-config/index.ts (L51C4-L54C8)) file.

```ts
// Defines a toolbar configuration for the bookmark block type
const customBookmarkToolbarConfig = {
  actions: [
    ...
  ]
} as const satisfies ToolbarModuleConfig;

// Adds it into the editor's config
 ToolbarModuleExtension({
    id: BlockFlavourIdentifier('custom:affine:bookmark'),
    config: customBookmarkToolbarConfig,
 }),
```

4. If we want to extend the global:

```ts
// Defines a toolbar configuration
const customWildcardToolbarConfig = {
  actions: [
    ...
  ]
} as const satisfies ToolbarModuleConfig;

// Adds it into the editor's config
 ToolbarModuleExtension({
    id: BlockFlavourIdentifier('custom:affine:*'),
    config: customWildcardToolbarConfig,
 }),
```

Currently, only most toolbars in page mode have been refactored. Next is edgeless mode.
2025-03-06 06:46:03 +00:00
Flrande
06e4bd9aed chore(editor): remove log (#10650) 2025-03-06 06:31:15 +00:00
EYHN
5c8b81581c feat(core): doc level awareness (#10646) 2025-03-06 06:05:45 +00:00
Saul-Mirone
2b30d756e2 refactor(editor): replace debounce and throttle with lodash (#10639) 2025-03-06 04:46:52 +00:00
Saul-Mirone
7e39893aac refactor(editor): remove assert functions (#10629) 2025-03-05 10:20:02 +00:00
EYHN
201c3438ba feat(core): add user list service for blocksuite (#10627) 2025-03-05 10:06:14 +00:00
Flrande
bd62634a76 feat(editor): add callout block (#10563)
- Add `CalloutBlockModel `
- Implement `CalloutBlockComponent `
- Integrate with slash menu (/)
2025-03-05 09:28:51 +00:00
doouding
30f97892b1 fix: snap line offset & check alignment candidates in real time (#10605) 2025-03-05 07:05:21 +00:00
Saul-Mirone
b8ecfbdae6 refactor(editor): remove assertExists (#10615) 2025-03-05 00:13:08 +00:00
Saul-Mirone
66d9d576e0 refactor(editor): add gfx entry in bs global package (#10612) 2025-03-04 12:46:50 +00:00
Saul-Mirone
5ad3d3c94a refactor(editor): move figma squircle to shared (#10610) 2025-03-04 10:26:58 +00:00
Saul-Mirone
fa5674166e refactor(editor): cleanup list icons (#10608) 2025-03-04 10:13:01 +00:00
donteatfriedrice
40351295c9 fix(editor): should not select or open latex editor when readonly (#10601) 2025-03-04 07:27:58 +00:00
Saul-Mirone
22924c767c fix(editor): onChange notification for flat model (#10589)
The primary purpose of this PR appears to be:
1. Simplifying the change notification API by removing the redundant value parameter from callbacks
2. Improving the reactive system's handling of specialized types (Text and Boxed) in flat data
3. Adding better test coverage for text handling in the flat data model
2025-03-04 05:57:06 +00:00
doodlewind
c418e89fb9 chore(editor): add feature flag entry for testing turbo renderer (#10581)
The debug pane will be displayed once the `enable_turbo_renderer` feature flag is enabled.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/lEGcysB4lFTEbCwZ8jMv/c1ba558a-2d84-403c-aa81-864b0338c861.png)
2025-03-04 05:38:44 +00:00
doouding
1c29d0e269 feat: optimize edgeless alignment (#10435)
### Changed
- alignment line style
- threshold of snapping
- optimize alignment checking performance
2025-03-04 03:03:31 +00:00
pengx17
8e5d7858c4 fix(core): only enable attachment preview for pdf (#10584) 2025-03-03 11:07:13 +00:00
L-Sun
37fbfbcf3e fix(editor): zindex of frame child not updated (#10580)
Close [BS-2689](https://linear.app/affine-design/issue/BS-2689/[bug]-%E5%BD%93%E5%B1%82%E7%BA%A7%E4%BD%8E%E4%BA%8E-frame-%E7%9A%84yuan%E7%B4%A0%E8%A2%AB%E6%8B%96%E5%85%A5-frame-%E6%97%B6%E5%B1%82%E7%BA%A7%E5%BA%94%E8%AF%A5%E8%A2%AB%E8%87%AA%E5%8A%A8%E6%8B%89%E9%AB%98%E5%B5%8C%E5%85%A5-frame)
2025-03-03 10:51:27 +00:00
Saul-Mirone
4c3c953a36 chore(editor): merge clamp functions (#10577)
Closes: [BS-2625](https://linear.app/affine-design/issue/BS-2625/合并clamp函数)
2025-03-03 10:33:38 +00:00
L-Sun
2cd83be621 fix(editor): code block toolbar float offset (#10579)
Close [BS-2736](https://linear.app/affine-design/issue/BS-2736/代码块工具栏偏移太大), [BS-1974](https://linear.app/affine-design/issue/BS-1974/code-block-浮标歪)

## Before

https://github.com/user-attachments/assets/f4ec4d7d-8c18-43ea-9464-c18e8b8dce60

https://github.com/user-attachments/assets/76f89ce6-bd89-49d6-a987-e9e5d5f9842a

### After

https://github.com/user-attachments/assets/dac919b9-d19c-4fb3-99bf-be02a460ad8c

https://github.com/user-attachments/assets/e5329f84-f1cf-4776-a789-8d12bea17ece
2025-03-03 09:56:13 +00:00
Flrande
5d3c365d97 fix(editor): format text in code block (#10575)
Closes: [BS-2724](https://linear.app/affine-design/issue/BS-2724/code-block%E9%87%8C%E4%B8%8D%E5%BA%94%E8%AF%A5%E6%98%BE%E7%A4%BAtoolbar)
2025-03-03 08:52:38 +00:00
doodlewind
86c449319b chore(editor): remove redundant fields in viewport (#10569) 2025-03-03 07:49:08 +00:00
Saul-Mirone
a587abca85 feat(editor): add block meta service (#10561) 2025-03-03 06:13:06 +00:00
zzj3720
3711e13e0e fix(editor): database block create new row when group by rich-text (#10564) 2025-03-03 05:58:07 +00:00
Saul-Mirone
4eae3cc66a feat(editor): add user list services (#10555) 2025-03-03 03:15:00 +00:00
doodlewind
bd1b26a230 feat(editor): support zooming placeholder in turbo renderer (#10504)
[Screen Recording 2025-02-28 at 4.32.20 PM.mov <span class="graphite__hidden">(uploaded via Graphite)</span> <img class="graphite__hidden" src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/lEGcysB4lFTEbCwZ8jMv/6c08b827-8428-42f3-aa7a-a2366756bd16.mov" />](https://app.graphite.dev/media/video/lEGcysB4lFTEbCwZ8jMv/6c08b827-8428-42f3-aa7a-a2366756bd16.mov)

This prevents painting task backlog during zooming by adding a fast placeholder painter, with a `zooming` state in renderer state machine.
2025-03-03 02:07:46 +00:00
Saul-Mirone
fdde818ddd feat(editor): add block meta feature flag (#10548) 2025-03-03 01:45:33 +00:00
Saul-Mirone
f23f29610c refactor(editor): remove stable feature flags (#10547) 2025-03-02 08:41:12 +00:00
Saul-Mirone
6353e72078 feat(editor): add embed option config extension (#10540)
This PR implements a significant refactoring of the embed block services across multiple components (Figma, GitHub, Loom, and YouTube) in the BlockSuite codebase. Here are the key changes:

1. **Architecture Change**:
   - Moves from a dynamic registration pattern to a more declarative configuration approach
   - Replaces `EmbedOptionProvider.registerEmbedBlockOptions()` calls with a new `EmbedOptionConfig` factory function

2. **Service Refactoring**:
   - For each embed block type (Figma, GitHub, Loom, YouTube):
     - Separates configuration from service logic
     - Creates new `EmbedBlockOptionConfig` constants using the new `EmbedOptionConfig` factory
     - Removes the `mounted()` lifecycle hook from services where it was only used for registration

3. **Core Changes**:
   - In `embed-option-service.ts`:
     - Introduces new `EmbedOptionConfigIdentifier` for dependency injection
     - Adds `EmbedOptionConfig` factory function for creating embed configurations
     - Updates `EmbedOptionService` constructor to automatically register configurations
     - Modifies DI setup to include `StdIdentifier` dependency

4. **Spec Updates**:
   - Updates all block specs to include the new configuration objects
   - Maintains existing functionality while using the new pattern

The main benefit of this refactoring is:
- More declarative configuration approach
- Better separation of concerns
- Reduced runtime registration code
- More predictable initialization of embed options
2025-03-01 16:40:18 +00:00
Saul-Mirone
7527d36547 feat: prevent cycle emit in slot (#10539) 2025-03-01 08:10:41 +00:00
renovate
b05315c6fa chore: bump up shiki version to v3 (#10534)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [shiki](https://redirect.github.com/shikijs/shiki) ([source](https://redirect.github.com/shikijs/shiki/tree/HEAD/packages/shiki)) | [`^2.0.0` -> `^3.0.0`](https://renovatebot.com/diffs/npm/shiki/2.5.0/3.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/shiki/3.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/shiki/3.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/shiki/2.5.0/3.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/shiki/2.5.0/3.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>shikijs/shiki (shiki)</summary>

### [`v3.1.0`](https://redirect.github.com/shikijs/shiki/releases/tag/v3.1.0)

[Compare Source](https://redirect.github.com/shikijs/shiki/compare/v3.0.0...v3.1.0)

#####    🚀 Features

-   **engine-js**: Bump deps to work around Safari bug with some grammars  -  by [@&#8203;slevithan](https://redirect.github.com/slevithan) in [https://github.com/shikijs/shiki/issues/941](https://redirect.github.com/shikijs/shiki/issues/941) [<samp>(47205)</samp>](https://redirect.github.com/shikijs/shiki/commit/4720501b)
-   **twoslash**: Upgrade twoslash v0.3, require typescript v5.5+, close [#&#8203;950](https://redirect.github.com/shikijs/shiki/issues/950), close [#&#8203;951](https://redirect.github.com/shikijs/shiki/issues/951)  -  by [@&#8203;antfu](https://redirect.github.com/antfu) in [https://github.com/shikijs/shiki/issues/950](https://redirect.github.com/shikijs/shiki/issues/950) and [https://github.com/shikijs/shiki/issues/951](https://redirect.github.com/shikijs/shiki/issues/951) [<samp>(5c6f9)</samp>](https://redirect.github.com/shikijs/shiki/commit/5c6f9e92)

#####    🐞 Bug Fixes

-   **monaco**: Handle missing settings in textmate theme func  -  by [@&#8203;felipetodev](https://redirect.github.com/felipetodev) in [https://github.com/shikijs/shiki/issues/939](https://redirect.github.com/shikijs/shiki/issues/939) [<samp>(19f75)</samp>](https://redirect.github.com/shikijs/shiki/commit/19f75f66)

#####     [View changes on GitHub](https://redirect.github.com/shikijs/shiki/compare/v3.0.0...v3.1.0)

### [`v3.0.0`](https://redirect.github.com/shikijs/shiki/releases/tag/v3.0.0)

[Compare Source](https://redirect.github.com/shikijs/shiki/compare/v2.5.0...v3.0.0)

#####    🚨 Breaking Changes

-   Remove deprecated apis for v3.0  -  by [@&#8203;antfu](https://redirect.github.com/antfu) in [https://github.com/shikijs/shiki/issues/900](https://redirect.github.com/shikijs/shiki/issues/900) [<samp>(55c15)</samp>](https://redirect.github.com/shikijs/shiki/commit/55c1554b)
-   Remove `node10` typescript resolution support  -  by [@&#8203;userquin](https://redirect.github.com/userquin) in [https://github.com/shikijs/shiki/issues/923](https://redirect.github.com/shikijs/shiki/issues/923) [<samp>(ccb58)</samp>](https://redirect.github.com/shikijs/shiki/commit/ccb5856b)
-   **twoslash**: Make default `moduleResolution` to `bundler`  -  by [@&#8203;antfu](https://redirect.github.com/antfu) in [https://github.com/shikijs/shiki/issues/936](https://redirect.github.com/shikijs/shiki/issues/936) [<samp>(e924d)</samp>](https://redirect.github.com/shikijs/shiki/commit/e924d4b1)

#####    🐞 Bug Fixes

-   **transformers**:
    -   Also remove extra newline token, fix [#&#8203;915](https://redirect.github.com/shikijs/shiki/issues/915)  -  by [@&#8203;antfu](https://redirect.github.com/antfu) in [https://github.com/shikijs/shiki/issues/915](https://redirect.github.com/shikijs/shiki/issues/915) [<samp>(cc591)</samp>](https://redirect.github.com/shikijs/shiki/commit/cc5913eb)
    -   Support matching comments in comments, fix [#&#8203;934](https://redirect.github.com/shikijs/shiki/issues/934)  -  by [@&#8203;antfu](https://redirect.github.com/antfu) in [https://github.com/shikijs/shiki/issues/934](https://redirect.github.com/shikijs/shiki/issues/934) [<samp>(6efc8)</samp>](https://redirect.github.com/shikijs/shiki/commit/6efc8979)
    -   Fix matching indices for word-highlight  -  by [@&#8203;artt](https://redirect.github.com/artt) in [https://github.com/shikijs/shiki/issues/909](https://redirect.github.com/shikijs/shiki/issues/909) [<samp>(57a09)</samp>](https://redirect.github.com/shikijs/shiki/commit/57a09ade)

#####     [View changes on GitHub](https://redirect.github.com/shikijs/shiki/compare/v2.5.0...v3.0.0)

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-03-01 02:33:49 +00:00