wiki/apps/client/vitest.config.ts
Salihu c08d1d3539
feat: multi tab node (#2381)
* init multi-tab-node

* dragging logic

* tabs menu

* tabs menu

* markdown import

* markdown export

* improve markdown import and export

* fix exponential backtracking in regex

* fix exponential backtracking in regex

* WIP

* fix: add docx schema

* feat(editor): rework tabs block state, controls and editing

- Keep the active tab in per-viewer plugin state, not in the document
- Update hidden-tab decorations incrementally; diff whole-doc remote updates
- Replace the tabs bubble menu with an in-block toolbar and per-tab actions menu
- Add rename, duplicate, move left/right and delete tab actions
- Rename a tab by double-clicking it; add tabs from a strip button
- Hide inactive tabs with hidden="until-found" and open them on beforematch
- Open the containing tab for search, TOCs, comment links and hash scrolls
- Disallow tabs inside tabs: hide slash item, flatten pastes, refuse drops
- Stop content copied or dragged out of a tab from creating a new tabs block
- Keep the selection anchor and land at the panel end when arrowing into tabs
- Let Enter add a line at the end of a tab instead of leaving the block
- Fix drag handle moves of custom nodes inside tab panels
- Keep editor focus on toolbar clicks so copy and delete work
- Export tabs to Markdown as level 4 headings; drop the tabs Markdown syntax
- Share node copy-to-clipboard between the columns and tabs toolbars
- Raise inactive tab label contrast

* fix(editor): show a compact drag preview for the tabs block

- Add a hidden data-drag-preview chip with the tab labels to the tabs view
- The global drag handle uses it instead of snapshotting the block and its neighbours
- Style the chip outside the editor scope since the handle clones it into the body

* fix(editor): hide the drop cursor while reordering tabs in the tab strip

* fix: better tabs selection, rendering and ids
- Keep selections out of hidden tabs and map chained tab updates
- Drive the tab strip from decorations instead of per-keystroke lookups
- Repair empty and repeated tab ids

---------

Co-authored-by: Philipinho <16838612+Philipinho@users.noreply.github.com>
2026-10-10 23:50:44 +01:00

21 lines
459 B
TypeScript

import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import * as path from 'path';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@docmost/editor-ext': path.resolve(
__dirname,
'../../packages/editor-ext/src/index.ts',
),
'@': path.resolve(__dirname, './src'),
},
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: [],
},
});