mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat: add scroll wheel zoom setting (#9476)
### Changed Add `scroll wheel to zoom` setting option, when the option enables, user can zoom in and out with scroll wheel without pressing the cmd/ctrl key.
This commit is contained in:
@@ -2,13 +2,17 @@ import type { ExtensionType } from '@blocksuite/block-std';
|
||||
import { createIdentifier } from '@blocksuite/global/di';
|
||||
import type { DeepPartial } from '@blocksuite/global/utils';
|
||||
import type { Signal } from '@preact/signals-core';
|
||||
import type { z } from 'zod';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { NodePropsSchema } from '../utils/index.js';
|
||||
|
||||
export const EditorSettingSchema = NodePropsSchema;
|
||||
export const GeneralSettingSchema = z
|
||||
.object({
|
||||
edgelessScrollZoom: z.boolean().default(false),
|
||||
})
|
||||
.merge(NodePropsSchema);
|
||||
|
||||
export type EditorSetting = z.infer<typeof EditorSettingSchema>;
|
||||
export type EditorSetting = z.infer<typeof GeneralSettingSchema>;
|
||||
|
||||
export const EditorSettingProvider = createIdentifier<
|
||||
Signal<DeepPartial<EditorSetting>>
|
||||
|
||||
Reference in New Issue
Block a user