chore: bump oxlint & enable more supported rules (#14769)

This commit is contained in:
DarkSky authored and GitHub committed 2026-04-03 03:36:52 +08:00
1 parent cdadf8588a
commit 233004f867
285 files changed
+937 -1983

No files matched your search

@@ -21,13 +21,10 @@
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"file-type": "^21.0.0",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
"rxjs": "^7.8.2"
},
"exports": {
".": "./src/index.ts",
@@ -144,7 +144,7 @@ export const attachmentViewDropdownMenu = {
@toggle=${onToggle}
.actions=${actions.value}
.context=${ctx}
.viewType$=${viewType$}
.viewTypeSignal=${viewType$}
></affine-view-dropdown-menu>`;
},
} as const satisfies ToolbarActionGroup<ToolbarAction>;
@@ -366,7 +366,7 @@ const builtinSurfaceToolbarConfig = {
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.style$=${style$}
.styleSignal=${style$}
></affine-card-style-dropdown-menu>`
)}`;
},
@@ -22,13 +22,11 @@
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"yjs": "^13.6.27",
"zod": "^3.25.76"
"yjs": "^13.6.27"
},
"devDependencies": {
"@vitest/browser-playwright": "^4.0.18",
@@ -237,7 +237,7 @@ const builtinToolbarConfig = {
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.viewType$=${viewType$}
.viewTypeSignal=${viewType$}
></affine-view-dropdown-menu>`
)}`;
},
@@ -282,7 +282,7 @@ const builtinToolbarConfig = {
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.style$=${model.props.style$}
.styleSignal=${model.props.style$}
></affine-card-style-dropdown-menu>`
)}`;
},
@@ -472,7 +472,7 @@ const builtinSurfaceToolbarConfig = {
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.viewType$=${viewType$}
.viewTypeSignal=${viewType$}
></affine-view-dropdown-menu>`
)}`;
},
@@ -534,7 +534,7 @@ const builtinSurfaceToolbarConfig = {
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.style$=${style$}
.styleSignal=${style$}
></affine-card-style-dropdown-menu>`
)}`;
},
@@ -591,7 +591,7 @@ const builtinSurfaceToolbarConfig = {
@select=${onSelect}
@toggle=${onToggle}
.format=${format}
.size$=${scale$}
.sizeSignal=${scale$}
></affine-size-dropdown-menu>`
)}`;
},
@@ -17,21 +17,13 @@
"@blocksuite/affine-rich-text": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-slash-menu": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@emoji-mart/data": "^1.2.1",
"@emotion/css": "^11.13.5",
"@floating-ui/dom": "^1.6.10",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/mdast": "^4.0.4",
"emoji-mart": "^5.6.0",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
"lit": "^3.2.0"
},
"exports": {
".": "./src/index.ts",
@@ -25,4 +25,4 @@ export const calloutTooltip = html`<svg width="170" height="106" viewBox="0 0 17
</clipPath>
</defs>
</svg>
`
`;
@@ -14,7 +14,6 @@
{ "path": "../../rich-text" },
{ "path": "../../shared" },
{ "path": "../../widgets/slash-menu" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/std" },
{ "path": "../../../framework/store" }
]
@@ -26,12 +26,9 @@
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/mdast": "^4.0.4",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"shiki": "^3.19.0",
"zod": "^3.25.76"
},
@@ -21,14 +21,9 @@
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/mdast": "^4.0.4",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
"rxjs": "^7.8.2"
},
"exports": {
".": "./src/index.ts",
@@ -26,13 +26,11 @@
"@blocksuite/store": "workspace:*",
"@emotion/css": "^11.13.5",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/mdast": "^4.0.4",
"date-fns": "^4.0.0",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"yjs": "^13.6.27",
"zod": "^3.25.76"
},
@@ -47,7 +47,7 @@ export const databasePropertyConverts = [
propertyModelPresets.multiSelectPropertyModelConfig,
(_property, cells) => {
const options: Record<string, SelectTag> = {};
// eslint-disable-next-line sonarjs/no-identical-functions
// oxlint-disable-next-line sonarjs/no-identical-functions
const getTag = (name: string) => {
if (options[name]) return options[name];
const tag: SelectTag = {
@@ -15,17 +15,10 @@
"@blocksuite/affine-model": "workspace:*",
"@blocksuite/affine-rich-text": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/mdast": "^4.0.4",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
"lit": "^3.2.0"
},
"exports": {
".": "./src/index.ts",
@@ -12,7 +12,6 @@
{ "path": "../../model" },
{ "path": "../../rich-text" },
{ "path": "../../shared" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/std" },
{ "path": "../../../framework/store" }
]
@@ -11,25 +11,17 @@
"license": "MIT",
"dependencies": {
"@blocksuite/affine-block-surface": "workspace:*",
"@blocksuite/affine-components": "workspace:*",
"@blocksuite/affine-ext-loader": "workspace:*",
"@blocksuite/affine-gfx-text": "workspace:*",
"@blocksuite/affine-inline-preset": "workspace:*",
"@blocksuite/affine-model": "workspace:*",
"@blocksuite/affine-rich-text": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-edgeless-toolbar": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
"lit": "^3.2.0"
},
"exports": {
".": "./src/index.ts",
@@ -8,14 +8,12 @@
"include": ["./src"],
"references": [
{ "path": "../surface" },
{ "path": "../../components" },
{ "path": "../../ext-loader" },
{ "path": "../../gfx/text" },
{ "path": "../../inlines/preset" },
{ "path": "../../model" },
{ "path": "../../rich-text" },
{ "path": "../../shared" },
{ "path": "../../widgets/edgeless-toolbar" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/std" },
{ "path": "../../../framework/store" }
@@ -23,19 +23,12 @@
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/lodash-es": "^4.17.12",
"lit": "^3.2.0",
"lodash-es": "^4.17.23",
"rxjs": "^7.8.2",
"yjs": "^13.6.27",
"zod": "^3.25.76"
},
"devDependencies": {
"vitest": "^4.0.18"
"yjs": "^13.6.27"
},
"exports": {
".": "./src/index.ts",
@@ -25,7 +25,7 @@ export function renderLinkedDocInCard(
return;
}
// eslint-disable-next-line sonarjs/no-collapsible-if
// oxlint-disable-next-line sonarjs/no-collapsible-if
if ('bannerContainer' in card) {
if (card.editorMode === 'page') {
renderPageAsBanner(card).catch(e => {
@@ -247,7 +247,7 @@ const conversionsActionGroup = {
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.viewType$=${viewType$}
.viewTypeSignal=${viewType$}
></affine-view-dropdown-menu>`
)}`;
},
@@ -299,7 +299,7 @@ const builtinToolbarConfig = {
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.style$=${model.props.style$}
.styleSignal=${model.props.style$}
></affine-card-style-dropdown-menu>`
)}`;
},
@@ -423,7 +423,7 @@ const builtinSurfaceToolbarConfig = {
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.style$=${style$}
.styleSignal=${style$}
></affine-card-style-dropdown-menu>`
)}`;
},
@@ -479,7 +479,7 @@ const builtinSurfaceToolbarConfig = {
@select=${onSelect}
@toggle=${onToggle}
.format=${format}
.size$=${scale$}
.sizeSignal=${scale$}
></affine-size-dropdown-menu>`
)}`;
},
@@ -199,7 +199,7 @@ const conversionsActionGroup = {
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.viewType$=${viewType$}
.viewTypeSignal=${viewType$}
></affine-view-dropdown-menu>`
)}`;
},
@@ -466,7 +466,7 @@ const builtinSurfaceToolbarConfig = {
@select=${onSelect}
@toggle=${onToggle}
.format=${format}
.size$=${scale$}
.sizeSignal=${scale$}
></affine-size-dropdown-menu>`
)}`;
},
+1 -12
View File
@@ -13,10 +13,7 @@
"@blocksuite/affine-block-surface": "workspace:*",
"@blocksuite/affine-components": "workspace:*",
"@blocksuite/affine-ext-loader": "workspace:*",
"@blocksuite/affine-gfx-pointer": "workspace:*",
"@blocksuite/affine-inline-reference": "workspace:*",
"@blocksuite/affine-model": "workspace:*",
"@blocksuite/affine-rich-text": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-slash-menu": "workspace:*",
"@blocksuite/global": "workspace:*",
@@ -24,18 +21,10 @@
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/lodash-es": "^4.17.12",
"lit": "^3.2.0",
"lodash-es": "^4.17.23",
"rxjs": "^7.8.2",
"yjs": "^13.6.27",
"zod": "^3.25.76"
},
"devDependencies": {
"vitest": "^4.0.18"
"yjs": "^13.6.27"
},
"exports": {
".": "./src/index.ts",
@@ -281,7 +281,7 @@ function createBuiltinToolbarConfigForExternal(
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.viewType$=${viewType$}
.viewTypeSignal=${viewType$}
></affine-view-dropdown-menu>`
)}`;
},
@@ -329,7 +329,7 @@ function createBuiltinToolbarConfigForExternal(
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.style$=${model.props.style$}
.styleSignal=${model.props.style$}
></affine-card-style-dropdown-menu>`
)}`;
},
@@ -514,7 +514,7 @@ const createBuiltinSurfaceToolbarConfigForExternal = (
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.viewType$=${viewType$}
.viewTypeSignal=${viewType$}
></affine-view-dropdown-menu>`
)}`;
},
@@ -579,7 +579,7 @@ const createBuiltinSurfaceToolbarConfigForExternal = (
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.style$=${style$}
.styleSignal=${style$}
></affine-card-style-dropdown-menu>`
)}`;
},
@@ -646,7 +646,7 @@ const createBuiltinSurfaceToolbarConfigForExternal = (
@select=${onSelect}
@toggle=${onToggle}
.format=${format}
.size$=${scale$}
.sizeSignal=${scale$}
></affine-size-dropdown-menu>`
)}`;
},
@@ -202,7 +202,7 @@ export const builtinToolbarConfig = {
.actions=${actions}
.context=${ctx}
.toggle=${toggle}
.viewType$=${signal(actions[2].label)}
.viewTypeSignal=${signal(actions[2].label)}
></affine-view-dropdown-menu>`
)}`;
},
@@ -408,7 +408,7 @@ export const builtinSurfaceToolbarConfig = {
@toggle=${onToggle}
.actions=${actions}
.context=${ctx}
.viewType$=${signal(actions[1].label)}
.viewTypeSignal=${signal(actions[1].label)}
></affine-view-dropdown-menu>`
)}`;
},
@@ -465,7 +465,7 @@ export const builtinSurfaceToolbarConfig = {
@select=${onSelect}
@toggle=${onToggle}
.format=${format}
.size$=${scale$}
.sizeSignal=${scale$}
></affine-size-dropdown-menu>`
)}`;
},
@@ -27,4 +27,4 @@ export const LoomTooltip = html`<svg width="170" height="106" viewBox="0 0 170 1
<image id="image0_5797_116775" width="118" height="80" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAABQCAYAAADMUoE6AAACKGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIKICAgdGlmZjpYUmVzb2x1dGlvbj0iMTQ0LzEiCiAgIHRpZmY6WVJlc29sdXRpb249IjE0NC8xIgogICB0aWZmOlJlc29sdXRpb25Vbml0PSIyIgogICBleGlmOlBpeGVsWURpbWVuc2lvbj0iODA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": "../surface" },
{ "path": "../../components" },
{ "path": "../../ext-loader" },
{ "path": "../../gfx/pointer" },
{ "path": "../../inlines/reference" },
{ "path": "../../model" },
{ "path": "../../rich-text" },
{ "path": "../../shared" },
{ "path": "../../widgets/slash-menu" },
{ "path": "../../../framework/global" },
+1 -6
View File
@@ -22,15 +22,10 @@
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/mdast": "^4.0.4",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"yjs": "^13.6.27",
"zod": "^3.25.76"
"yjs": "^13.6.27"
},
"exports": {
".": "./src/index.ts",
+1 -5
View File
@@ -22,14 +22,10 @@
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"file-type": "^21.0.0",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
"lit": "^3.2.0"
},
"exports": {
".": "./src/index.ts",
+1 -9
View File
@@ -15,24 +15,16 @@
"@blocksuite/affine-ext-loader": "workspace:*",
"@blocksuite/affine-inline-latex": "workspace:*",
"@blocksuite/affine-model": "workspace:*",
"@blocksuite/affine-rich-text": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-slash-menu": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/katex": "^0.16.7",
"@types/mdast": "^4.0.4",
"katex": "^0.16.27",
"lit": "^3.2.0",
"remark-math": "^6.0.0",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
"remark-math": "^6.0.0"
},
"exports": {
".": "./src/index.ts",
@@ -1,7 +1,7 @@
import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
import { unsafeHTML } from '@blocksuite/affine-shared/utils';
import katex from 'katex';
import { html } from 'lit';
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
export const LatexTooltip = (
str: string,
@@ -35,7 +35,8 @@ export const LatexTooltip = (
katex.renderToString(latex, {
displayMode,
output: 'mathml',
})
}),
{ USE_PROFILES: { html: true, mathMl: true } }
)}
</div>
</div>`;
@@ -12,10 +12,8 @@
{ "path": "../../ext-loader" },
{ "path": "../../inlines/latex" },
{ "path": "../../model" },
{ "path": "../../rich-text" },
{ "path": "../../shared" },
{ "path": "../../widgets/slash-menu" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/std" },
{ "path": "../../../framework/store" }
]
+1 -9
View File
@@ -21,17 +21,9 @@
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/mdast": "^4.0.4",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
},
"devDependencies": {
"vitest": "^4.0.18"
"lit": "^3.2.0"
},
"exports": {
".": "./src/index.ts",
@@ -33,7 +33,6 @@
"@vanilla-extract/css": "^1.17.0",
"lit": "^3.2.0",
"lodash-es": "^4.17.23",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
},
"exports": {
@@ -273,7 +273,7 @@ const builtinSurfaceToolbarConfig = {
@select=${onSelect}
@toggle=${onToggle}
.format=${format}
.size$=${scale$}
.sizeSignal=${scale$}
></affine-size-dropdown-menu>`;
},
},
@@ -240,7 +240,7 @@ export const TodoTooltip = html`<svg width="170" height="68" viewBox="0 0 170 68
<text fill="#8E8D91" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="10" letter-spacing="0px"><tspan x="28" y="47.6364">Make a list for building preview.</tspan></text>
</g>
</svg>
`
`;
export const tooltips: Record<string, SlashMenuTooltip> = {
Text: {
@@ -20,13 +20,10 @@
"@blocksuite/global": "workspace:*",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/mdast": "^4.0.4",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
},
"exports": {
@@ -283,7 +283,7 @@ export const paragraphBlockHtmlAdapterMatcher: BlockHtmlAdapterMatcher = {
const { walkerContext } = context;
switch (o.node.tagName) {
case 'div': {
// eslint-disable-next-line sonarjs/no-collapsible-if
// oxlint-disable-next-line sonarjs/no-collapsible-if
if (
o.parent?.node.type === 'element' &&
o.parent.node.tagName !== 'li' &&
@@ -193,7 +193,7 @@ export const paragraphBlockNotionHtmlAdapterMatcher: BlockNotionHtmlAdapterMatch
const { walkerContext } = context;
switch (o.node.tagName) {
case 'div': {
// eslint-disable-next-line sonarjs/no-collapsible-if
// oxlint-disable-next-line sonarjs/no-collapsible-if
if (
o.parent?.node.type === 'element' &&
!(
@@ -29,7 +29,6 @@ import { query, state } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { repeat } from 'lit/directives/repeat.js';
import { styleMap } from 'lit/directives/style-map.js';
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
import { ParagraphBlockConfigExtension } from './paragraph-block-config.js';
import { paragraphBlockStyles } from './styles.js';
@@ -251,15 +250,18 @@ export class ParagraphBlockComponent extends CaptionedBlockComponent<ParagraphBl
let style = html``;
if (this.model.props.type$.value.startsWith('h') && collapsed) {
const collapsedSiblingStyles = collapsedSiblings
.map(
sibling => `
[data-block-id="${sibling.id}"] {
display: none !important;
}
`
)
.join('\n');
style = html`
<style>
${collapsedSiblings.map(sibling =>
unsafeHTML(`
[data-block-id="${sibling.id}"] {
display: none !important;
}
`)
)}
${collapsedSiblingStyles}
</style>
`;
}
+1 -7
View File
@@ -34,25 +34,19 @@
"@blocksuite/affine-model": "workspace:*",
"@blocksuite/affine-rich-text": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-edgeless-selected-rect": "workspace:*",
"@blocksuite/affine-widget-edgeless-toolbar": "workspace:*",
"@blocksuite/data-view": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/lodash-es": "^4.17.12",
"dompurify": "^3.3.0",
"html2canvas": "^1.4.1",
"lit": "^3.2.0",
"lodash-es": "^4.17.23",
"rxjs": "^7.8.2",
"yjs": "^13.6.27",
"zod": "^3.25.76"
"yjs": "^13.6.27"
},
"exports": {
".": "./src/index.ts",
@@ -544,7 +544,7 @@ export class EdgelessClipboardController extends PageClipboard {
}
});
// eslint-disable-next-line @typescript-eslint/prefer-for-of
// oxlint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < blocksInsideFrame.length; i++) {
const element = blocksInsideFrame[i];
await _drawTopLevelBlock(element, true);
@@ -645,7 +645,7 @@ export class EdgelessClipboardController extends PageClipboard {
);
});
} else {
// eslint-disable-next-line @typescript-eslint/prefer-for-of
// oxlint-disable-next-line @typescript-eslint/prefer-for-of
for (let index = 0; index < content.length; index++) {
const blockSnapshot = content[index];
if (blockSnapshot.flavour === 'affine:note') {
@@ -31,7 +31,6 @@
{ "path": "../../model" },
{ "path": "../../rich-text" },
{ "path": "../../shared" },
{ "path": "../../widgets/edgeless-selected-rect" },
{ "path": "../../widgets/edgeless-toolbar" },
{ "path": "../../data-view" },
{ "path": "../../../framework/global" },
@@ -22,17 +22,8 @@
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@floating-ui/dom": "^1.6.13",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/lodash-es": "^4.17.12",
"fractional-indexing": "^3.2.0",
"lit": "^3.2.0",
"lodash-es": "^4.17.23",
"nanoid": "^5.1.6",
"rxjs": "^7.8.2",
"zod": "^3.25.76"
"lit": "^3.2.0"
},
"exports": {
".": "./src/index.ts",
@@ -42,7 +42,7 @@ export const FrameTooltip = html`<svg width="170" height="89" viewBox="0 0 170 8
</clipPath>
</defs>
</svg>
`
`;
// prettier-ignore
export const MindMapTooltip = html`<svg width="170" height="106" viewBox="0 0 170 106" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -108,4 +108,4 @@ export const MindMapTooltip = html`<svg width="170" height="106" viewBox="0 0 17
</clipPath>
</defs>
</svg>
`
`;
@@ -10,17 +10,13 @@
"author": "toeverything",
"license": "MIT",
"dependencies": {
"@blocksuite/affine-components": "workspace:*",
"@blocksuite/affine-ext-loader": "workspace:*",
"@blocksuite/affine-model": "workspace:*",
"@blocksuite/affine-rich-text": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",
"@toeverything/theme": "^1.1.23",
"@types/lodash-es": "^4.17.12",
"fractional-indexing": "^3.2.0",
"html2canvas": "^1.4.1",
@@ -29,8 +25,7 @@
"nanoid": "^5.1.6",
"pdf-lib": "^1.17.1",
"rxjs": "^7.8.2",
"yjs": "^13.6.27",
"zod": "^3.25.76"
"yjs": "^13.6.27"
},
"devDependencies": {
"vitest": "^4.0.18"
@@ -281,7 +281,7 @@ export class DefaultTool extends BaseTool {
}
}
// eslint-disable-next-line @typescript-eslint/no-misused-promises
// oxlint-disable-next-line @typescript-eslint/no-misused-promises
override async dragStart(e: PointerEventState) {
const { preventDefaultState, handledByView } =
this.interactivity?.dispatchEvent('dragstart', e) ?? {};
@@ -153,7 +153,7 @@ export class AStarRunner {
}
const neighbors = this._neighbors(current);
// eslint-disable-next-line @typescript-eslint/prefer-for-of
// oxlint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < neighbors.length; i++) {
const next = neighbors[i];
const curCosts = this._costSoFar.get(current);
@@ -7,10 +7,8 @@
},
"include": ["./src"],
"references": [
{ "path": "../../components" },
{ "path": "../../ext-loader" },
{ "path": "../../model" },
{ "path": "../../rich-text" },
{ "path": "../../shared" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/std" },
@@ -10,7 +10,6 @@
"author": "toeverything",
"license": "MIT",
"dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.7.7",
"@blocksuite/affine-components": "workspace:*",
"@blocksuite/affine-ext-loader": "workspace:*",
"@blocksuite/affine-inline-preset": "workspace:*",
@@ -18,7 +17,6 @@
"@blocksuite/affine-rich-text": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-slash-menu": "workspace:*",
"@blocksuite/data-view": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.17",
"@blocksuite/std": "workspace:*",
@@ -27,8 +25,6 @@
"@floating-ui/dom": "^1.6.13",
"@preact/signals-core": "^1.8.0",
"lit": "^3.2.0",
"rxjs": "^7.8.2",
"yjs": "^13.6.27",
"zod": "^3.25.76"
},
"exports": {
@@ -273,7 +273,7 @@ export class SelectionController implements ReactiveController {
}
drag?.onMove(event.clientY);
};
// eslint-disable-next-line sonarjs/no-identical-functions
// oxlint-disable-next-line sonarjs/no-identical-functions
const onUp = () => {
drag?.onEnd();
window.removeEventListener('mousemove', onMove);
@@ -418,7 +418,7 @@ export class TableCell extends SignalWatcher(
name: 'Paste',
prefix: PasteIcon(),
select: () => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
navigator.clipboard.readText().then(text => {
this.selectionController.doPaste(text, selected);
});
@@ -15,7 +15,6 @@
{ "path": "../../rich-text" },
{ "path": "../../shared" },
{ "path": "../../widgets/slash-menu" },
{ "path": "../../data-view" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/std" },
{ "path": "../../../framework/store" }