diff --git a/README.md b/README.md index 6465dcfc1..85a137add 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Please see the website: https://dockview.dev | Package | Description | Version | | --- | --- | --- | -| [`dockview`](https://www.npmjs.com/package/dockview) | JavaScript — zero dependencies, full feature set out of the box | [![npm version](https://badge.fury.io/js/dockview.svg)](https://www.npmjs.com/package/dockview) | +| [`dockview`](https://www.npmjs.com/package/dockview) | JavaScript, zero dependencies, full feature set out of the box | [![npm version](https://badge.fury.io/js/dockview.svg)](https://www.npmjs.com/package/dockview) | | [`dockview-react`](https://www.npmjs.com/package/dockview-react) | React bindings (peer: `react` ≥16.8) | [![npm version](https://badge.fury.io/js/dockview-react.svg)](https://www.npmjs.com/package/dockview-react) | | [`dockview-vue`](https://www.npmjs.com/package/dockview-vue) | Vue 3 bindings (peer: `vue` ≥3.4) | [![npm version](https://badge.fury.io/js/dockview-vue.svg)](https://www.npmjs.com/package/dockview-vue) | | [`dockview-angular`](https://www.npmjs.com/package/dockview-angular) | Angular bindings (peer: `@angular/core` ≥21) | [![npm version](https://badge.fury.io/js/dockview-angular.svg)](https://www.npmjs.com/package/dockview-angular) | @@ -111,7 +111,7 @@ Contributions are welcome! Please open an [issue](https://github.com/mathuo/dock ## License -MIT — see [LICENSE](./LICENSE) for details. +MIT. See [LICENSE](./LICENSE) for details. --- diff --git a/packages/README.md b/packages/README.md index 259ce2ae3..c551fcab5 100644 --- a/packages/README.md +++ b/packages/README.md @@ -9,16 +9,16 @@ This mono-repository has a number of packages containing the code for the dockvi ## dockview -- The batteries-included JavaScript package — re-exports the core API and registers the separable feature modules so consumers get the full feature set out of the box. +- The batteries-included JavaScript package. It re-exports the core API and registers the separable feature modules so consumers get the full feature set out of the box. - The package framework-agnostic consumers should install (`npm install dockview`). - Has no `react` peer dependency; framework bindings live in the `dockview-` packages. - Published as [dockview](https://www.npmjs.com/package/dockview) on npm. ## dockview-react -- The React bindings package — holds the actual React source (`DockviewReact`, hooks, portal bridge). +- The React bindings package. Holds the actual React source (`DockviewReact`, hooks, portal bridge). - Depends on `dockview`; peer dependency on `react`. -- Published as [dockview-react](https://www.npmjs.com/package/dockview-react) on npm — the canonical install name for React. +- Published as [dockview-react](https://www.npmjs.com/package/dockview-react) on npm, the canonical install name for React. ## docs diff --git a/packages/dockview-angular/README.md b/packages/dockview-angular/README.md index 2df416270..3b468efef 100644 --- a/packages/dockview-angular/README.md +++ b/packages/dockview-angular/README.md @@ -1,7 +1,7 @@

dockview-angular

-

Angular bindings for dockview — zero dependency layout manager supporting tabs, groups, grids and splitviews

+

Angular bindings for dockview, a zero dependency layout manager supporting tabs, groups, grids and splitviews

diff --git a/packages/dockview-angular/src/__tests__/angular-header-actions-renderer.spec.ts b/packages/dockview-angular/src/__tests__/angular-header-actions-renderer.spec.ts index 793144456..ca239b258 100644 --- a/packages/dockview-angular/src/__tests__/angular-header-actions-renderer.spec.ts +++ b/packages/dockview-angular/src/__tests__/angular-header-actions-renderer.spec.ts @@ -227,7 +227,7 @@ describe('AngularHeaderActionsRenderer', () => { renderer.dispose(); - // After dispose, firing further events must not throw — disposal + // After dispose, firing further events must not throw; disposal // should have unsubscribed every handler. expect(() => { group.model.panels.push({ id: 'late' }); diff --git a/packages/dockview-angular/src/__tests__/angular-renderer.spec.ts b/packages/dockview-angular/src/__tests__/angular-renderer.spec.ts index 50610cd21..402fcecb1 100644 --- a/packages/dockview-angular/src/__tests__/angular-renderer.spec.ts +++ b/packages/dockview-angular/src/__tests__/angular-renderer.spec.ts @@ -151,7 +151,7 @@ describe('AngularRenderer', () => { it('should still expose its element after dispose (regression #1220)', () => { // Reproduces the disposal-order bug from issue #1220: dockview-core's // OverlayRenderContainer reads `panel.view.content.element` while - // tearing down its own disposables — by which point the renderer has + // tearing down its own disposables, by which point the renderer has // already been disposed. Previously the getter threw "Angular // renderer not initialized" here. const renderer = new AngularRenderer({ diff --git a/packages/dockview-angular/src/lib/utils/angular-renderer.ts b/packages/dockview-angular/src/lib/utils/angular-renderer.ts index f1f847143..692860226 100644 --- a/packages/dockview-angular/src/lib/utils/angular-renderer.ts +++ b/packages/dockview-angular/src/lib/utils/angular-renderer.ts @@ -154,7 +154,7 @@ export class AngularRenderer } // Intentionally retain `_element` after dispose. Dockview's overlay // teardown reads `panel.view.content.element` while removing the node - // from its overlay parent — nulling here would make the getter throw + // from its overlay parent, so nulling here would make the getter throw // mid-cascade. The HTMLElement reference is cheap and will be GC'd // when the renderer itself is collected. } diff --git a/packages/dockview-angular/src/lib/utils/component-factory.ts b/packages/dockview-angular/src/lib/utils/component-factory.ts index 1d10937ee..f4527b3c8 100644 --- a/packages/dockview-angular/src/lib/utils/component-factory.ts +++ b/packages/dockview-angular/src/lib/utils/component-factory.ts @@ -39,7 +39,7 @@ export class AngularFrameworkComponentFactory { * Refresh the component maps in place so that rebinding an `@Input()` * component map (e.g. `[components]`) after init is honoured. The core * calls the factory live on each panel creation, so updating these - * references is enough — no re-init required. + * references is enough. No re-init required. */ updateComponents(maps: { components: Record | TemplateRef>; diff --git a/packages/dockview-core/README.md b/packages/dockview-core/README.md index 5cee1610f..879b66c53 100644 --- a/packages/dockview-core/README.md +++ b/packages/dockview-core/README.md @@ -1,7 +1,7 @@

dockview-core

-

Framework-agnostic core layout engine — zero dependencies, JavaScript. Supports tabs, groups, grids and splitviews

+

Framework-agnostic core layout engine, zero dependencies, JavaScript. Supports tabs, groups, grids and splitviews

@@ -21,7 +21,7 @@ Please see the website: https://dockview.dev > **`dockview-core` is an internal package.** Install -> **[`dockview`](https://www.npmjs.com/package/dockview)** instead — the JavaScript +> **[`dockview`](https://www.npmjs.com/package/dockview)** instead, the > JavaScript / TypeScript package that ships the full feature set out of the box. Using a > framework? Install the bindings: [`dockview-react`](https://www.npmjs.com/package/dockview-react), > [`dockview-vue`](https://www.npmjs.com/package/dockview-vue) or diff --git a/packages/dockview-core/src/__tests__/api/dockviewGroupPanelApi.spec.ts b/packages/dockview-core/src/__tests__/api/dockviewGroupPanelApi.spec.ts index d2f7aece8..3c000f041 100644 --- a/packages/dockview-core/src/__tests__/api/dockviewGroupPanelApi.spec.ts +++ b/packages/dockview-core/src/__tests__/api/dockviewGroupPanelApi.spec.ts @@ -81,7 +81,7 @@ describe('DockviewGroupPanelApiImpl', () => { 'test-id', accessor as unknown as DockviewComponent ); - // _group is undefined — no initialize() call + // _group is undefined, no initialize() call expect(() => cut.collapse()).not.toThrow(); expect(accessor.setEdgeGroupCollapsed).not.toHaveBeenCalled(); @@ -106,7 +106,7 @@ describe('DockviewGroupPanelApiImpl', () => { ); expect(cut.isCollapsed()).toBe(false); - // accessor should NOT have been called since there is no group + // accessor should not have been called since there is no group expect(accessor.isEdgeGroupCollapsed).not.toHaveBeenCalled(); }); }); diff --git a/packages/dockview-core/src/__tests__/dnd/droptarget.spec.ts b/packages/dockview-core/src/__tests__/dnd/droptarget.spec.ts index a9a4e9850..ac9b9edc7 100644 --- a/packages/dockview-core/src/__tests__/dnd/droptarget.spec.ts +++ b/packages/dockview-core/src/__tests__/dnd/droptarget.spec.ts @@ -86,7 +86,7 @@ describe('droptarget', () => { createOffsetDragOverEvent({ clientX: 100, clientY: 50 }) ); - // 100,50 within 200x100 is the centre by default — the resolver wins. + // 100,50 within 200x100 is the centre by default, but the resolver wins. expect(droptarget.state).toBe('right'); expect(calls[0]).toMatchObject({ x: 100, diff --git a/packages/dockview-core/src/__tests__/dnd/pointer/longPress.spec.ts b/packages/dockview-core/src/__tests__/dnd/pointer/longPress.spec.ts index c4ca5a2eb..71908296a 100644 --- a/packages/dockview-core/src/__tests__/dnd/pointer/longPress.spec.ts +++ b/packages/dockview-core/src/__tests__/dnd/pointer/longPress.spec.ts @@ -54,10 +54,10 @@ describe('LongPressDetector', () => { }); fireEvent.pointerDown(element, pointerInit()); - // Within tolerance — must not cancel. + // Within tolerance, so it must not cancel. fireEvent.pointerMove(window, pointerInit({ clientX: 5 })); jest.advanceTimersByTime(250); - // Beyond tolerance — must cancel. + // Beyond tolerance, so it must cancel. fireEvent.pointerMove(window, pointerInit({ clientX: 20 })); jest.advanceTimersByTime(500); diff --git a/packages/dockview-core/src/__tests__/dnd/pointer/pointerDragController.spec.ts b/packages/dockview-core/src/__tests__/dnd/pointer/pointerDragController.spec.ts index 8992ce5b3..20b8db3df 100644 --- a/packages/dockview-core/src/__tests__/dnd/pointer/pointerDragController.spec.ts +++ b/packages/dockview-core/src/__tests__/dnd/pointer/pointerDragController.spec.ts @@ -124,13 +124,13 @@ describe('PointerDragController', () => { getData: () => ({ dispose: jest.fn() }), }); - // First move — pointer is over the target. + // First move: pointer is over the target. spy.mockReturnValue([targetEl]); window.dispatchEvent( makePointerEvent('pointermove', { clientX: 10, clientY: 10 }) ); - // Second move — pointer is off-target. + // Second move: pointer is off-target. spy.mockReturnValue([]); window.dispatchEvent( makePointerEvent('pointermove', { clientX: 500, clientY: 500 }) @@ -267,7 +267,7 @@ describe('PointerDragController', () => { getData: () => ({ dispose: jest.fn() }), }); - // Different pointerId — must NOT route through the target. + // Different pointerId, so this must not route through the target. window.dispatchEvent( makePointerEvent('pointermove', { pointerId: 2, @@ -285,9 +285,9 @@ describe('PointerDragController', () => { }); test('hit-testing prefers the inner / more-specific target when nested targets overlap', () => { - // Regression: previously `_findTargetUnder` accepted ANY registered + // Regression: previously `_findTargetUnder` accepted any registered // target whose element contains the cursor element. Because the - // layout-root drop target is registered first AND contains every + // layout-root drop target is registered first and contains every // tab, it always won the race and per-tab targets were unreachable. const controller = PointerDragController.getInstance(); @@ -316,7 +316,7 @@ describe('PointerDragController', () => { makePointerEvent('pointermove', { clientX: 10, clientY: 10 }) ); - // Inner target should have received the drag-over; root must NOT + // Inner target should have received the drag-over; root must not // have received it (it'd have eclipsed inner under the old logic). expect(innerHandle.handleDragOver).toHaveBeenCalled(); expect(rootHandle.handleDragOver).not.toHaveBeenCalled(); @@ -332,7 +332,7 @@ describe('PointerDragController', () => { test("beginDrag shields iframes in the source's owning document; teardown releases", () => { const controller = PointerDragController.getInstance(); - // Build iframes in the main document — these would otherwise + // Build iframes in the main document. They would otherwise // capture pointermove events once the cursor crosses into them // and freeze the drag. const iframe = document.createElement('iframe'); @@ -396,7 +396,7 @@ describe('PointerDragController', () => { describe("listener attachment honours the source's owning window", () => { test("pointermove from source's owning window is routed to the controller", () => { - // Build an iframe — stand-in for a popout window — so we get a + // Build an iframe (stand-in for a popout window) so we get a // real `contentWindow` distinct from the main `window`. Verifies // that the controller listens on the source's owning window, not // on the main `window`. @@ -428,7 +428,7 @@ describe('PointerDragController', () => { getData: () => ({ dispose: jest.fn() }), }); - // Fire the move on the popout window (NOT the main `window`). + // Fire the move on the popout window (not the main `window`). // If listeners attached to main `window`, this would be a no-op. otherWin.dispatchEvent( makePointerEvent('pointermove', { clientX: 10, clientY: 10 }) diff --git a/packages/dockview-core/src/__tests__/dnd/pointer/pointerDragSource.spec.ts b/packages/dockview-core/src/__tests__/dnd/pointer/pointerDragSource.spec.ts index 16778ed2f..8382e835b 100644 --- a/packages/dockview-core/src/__tests__/dnd/pointer/pointerDragSource.spec.ts +++ b/packages/dockview-core/src/__tests__/dnd/pointer/pointerDragSource.spec.ts @@ -5,7 +5,7 @@ import { IDisposable } from '../../../lifecycle'; describe('PointerDragSource', () => { afterEach(() => { - // Defensive: ensure no drag leaks across tests via the singleton. + // Make sure no drag leaks across tests via the singleton. PointerDragController.getInstance().cancel(); jest.useRealTimers(); }); @@ -63,7 +63,7 @@ describe('PointerDragSource', () => { fireEvent.pointerDown(element, pointerEventInit()); // Flick past pressTolerance (default 8px) within the initiation - // delay — drag intent in any direction arms the drag now. + // delay: drag intent in any direction arms the drag now. fireEvent.pointerMove(window, pointerEventInit({ clientX: 20 })); expect(onDragStart).toHaveBeenCalledTimes(1); @@ -100,7 +100,7 @@ describe('PointerDragSource', () => { }); fireEvent.pointerDown(element, pointerEventInit()); - // 4px finger jitter — under pressTolerance, drag does not arm yet. + // 4px finger jitter is under pressTolerance, so the drag does not arm yet. fireEvent.pointerMove(window, pointerEventInit({ clientX: 4 })); expect(onDragStart).not.toHaveBeenCalled(); // After the initiation delay fires, subsequent motion past @@ -182,7 +182,7 @@ describe('PointerDragSource', () => { element, pointerEventInit({ pointerType: 'mouse' }) ); - // Mouse arms immediately — no need to advance timers. + // Mouse arms immediately, so there's no need to advance timers. fireEvent.pointerMove( window, pointerEventInit({ pointerType: 'mouse', clientX: 10 }) diff --git a/packages/dockview-core/src/__tests__/dnd/pointer/pointerDropTarget.spec.ts b/packages/dockview-core/src/__tests__/dnd/pointer/pointerDropTarget.spec.ts index a9fa85cd8..27fc21582 100644 --- a/packages/dockview-core/src/__tests__/dnd/pointer/pointerDropTarget.spec.ts +++ b/packages/dockview-core/src/__tests__/dnd/pointer/pointerDropTarget.spec.ts @@ -236,7 +236,7 @@ describe('PointerDropTarget', () => { const target = new PointerDropTarget(element, { acceptedTargetZones: ['left', 'right', 'center'], canDisplayOverlay: () => true, - // 10,20 would be 'left' by default — the resolver forces 'right'. + // 10,20 would be 'left' by default, but the resolver forces 'right'. getPositionResolver: () => ({ resolve: () => ({ position: 'right' }), }), diff --git a/packages/dockview-core/src/__tests__/dnd/pointer/pointerDropTargetAnchor.spec.ts b/packages/dockview-core/src/__tests__/dnd/pointer/pointerDropTargetAnchor.spec.ts index de6e4bd6b..32766f8b0 100644 --- a/packages/dockview-core/src/__tests__/dnd/pointer/pointerDropTargetAnchor.spec.ts +++ b/packages/dockview-core/src/__tests__/dnd/pointer/pointerDropTargetAnchor.spec.ts @@ -5,10 +5,10 @@ import { DropTargetTargetModel } from '../../../dnd/droptarget'; /** * Verifies the anchor-container ("override target") rendering path that * floating groups, popout groups, and the layout root rely on. The path - * doesn't append a dropzone to the drop element — instead it renders into + * doesn't append a dropzone to the drop element. Instead it renders into * an external anchor container's overlay. */ -describe('PointerDropTarget — anchor / override target path', () => { +describe('PointerDropTarget: anchor / override target path', () => { afterEach(() => { PointerDragController.getInstance().cancel(); }); @@ -88,7 +88,7 @@ describe('PointerDropTarget — anchor / override target path', () => { dropEl.getElementsByClassName('dv-drop-target-dropzone') ).toHaveLength(0); // The anchor overlay should have been positioned (any non-empty - // dimensions are fine — we just want to confirm the anchor path ran). + // dimensions are fine; this confirms the anchor path ran). expect(overlay.style.width).not.toBe(''); expect(overlay.style.height).not.toBe(''); expect(target.state).toBe('right'); diff --git a/packages/dockview-core/src/__tests__/dockview/advancedDnDPreview.spec.ts b/packages/dockview-core/src/__tests__/dockview/advancedDnDPreview.spec.ts index 7ce790e9a..0d06c9330 100644 --- a/packages/dockview-core/src/__tests__/dockview/advancedDnDPreview.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/advancedDnDPreview.spec.ts @@ -16,7 +16,7 @@ class TestPanel implements IContentRenderer { } /** - * AdvancedDnD Phase 4 — the keyboard-docking seam. `showPreviewOverlay` + * AdvancedDnD Phase 4: the keyboard-docking seam. `showPreviewOverlay` * renders the same drop overlay a mouse drag shows, without a live drag, and * the returned disposable clears it. */ @@ -35,7 +35,7 @@ describe('AdvancedDnD showPreviewOverlay', () => { afterEach(() => dockview.dispose()); const service = (): IAdvancedDnDService => - // internal seam — consumed by the (future) KeyboardNavigationModule + // internal seam, consumed by the (future) KeyboardNavigationModule ( dockview as unknown as { _moduleRegistry: { diff --git a/packages/dockview-core/src/__tests__/dockview/components/popupService.spec.ts b/packages/dockview-core/src/__tests__/dockview/components/popupService.spec.ts index 978a489e0..9fe76607d 100644 --- a/packages/dockview-core/src/__tests__/dockview/components/popupService.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/components/popupService.spec.ts @@ -128,7 +128,7 @@ describe('PopupService', () => { test('closes the popover (after the open grace window)', () => { // Touch long-press callers fire pointerdown events tied to the // gesture that opened the popover. PopupService suppresses - // outside-dismissal for a short grace window — advance past it. + // outside-dismissal for a short grace window, so advance past it. const nowSpy = jest.spyOn(Date, 'now'); nowSpy.mockReturnValue(0); @@ -159,7 +159,7 @@ describe('PopupService', () => { el.className = 'my-popup'; service.openPopover(el, { x: 0, y: 0 }); - // Within grace window — must not dismiss. + // Within the grace window, so it must not dismiss. nowSpy.mockReturnValue(50); const outside = document.createElement('div'); diff --git a/packages/dockview-core/src/__tests__/dockview/components/tab.spec.ts b/packages/dockview-core/src/__tests__/dockview/components/tab.spec.ts index 54c323a81..b9976d613 100644 --- a/packages/dockview-core/src/__tests__/dockview/components/tab.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/components/tab.spec.ts @@ -443,7 +443,7 @@ describe('tab', () => { clientY: 0, }); // A downward flick past pressTolerance, before the initiation - // delay fires — drag intent in any direction begins the drag + // delay fires. Drag intent in any direction begins the drag // (strip-scrolling lives on the empty container space, not on // tabs themselves). fireEvent.pointerMove(window, { diff --git a/packages/dockview-core/src/__tests__/dockview/components/titlebar/advancedOverflowSeam.spec.ts b/packages/dockview-core/src/__tests__/dockview/components/titlebar/advancedOverflowSeam.spec.ts index 5c1b545fa..8ff962e38 100644 --- a/packages/dockview-core/src/__tests__/dockview/components/titlebar/advancedOverflowSeam.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/components/titlebar/advancedOverflowSeam.spec.ts @@ -29,10 +29,10 @@ beforeAll(() => { * body through `createOverflowRenderContext` and, when * `accessor.advancedOverflowService` is present, hands it to the module; * otherwise it renders the free flat list. No module is registered in core, so - * this proves the `?.`-guard falls through to the free helper — the byte-for-byte - * behaviour dockview shipped before the seam existed. + * this proves the `?.`-guard falls through to the free helper, giving the + * byte-for-byte behaviour dockview shipped before the seam existed. */ -describe('advanced overflow seam — free fallback (no module)', () => { +describe('advanced overflow seam: free fallback (no module)', () => { let container: HTMLElement; const make = (): DockviewComponent => { @@ -97,7 +97,7 @@ describe('advanced overflow seam — free fallback (no module)', () => { dockview.addPanel({ id, component: 'default', title: id }) ); - // Drive the render seam directly with a pinned bucket — jsdom has no + // Drive the render seam directly with a pinned bucket. jsdom has no // geometry, so the clip detection can't be triggered through layout. const header = panels[0].group.model.header as any; header.toggleDropdown({ diff --git a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabGroupIndicator.spec.ts b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabGroupIndicator.spec.ts index 9e7314e9c..09518b294 100644 --- a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabGroupIndicator.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabGroupIndicator.spec.ts @@ -590,9 +590,9 @@ describe('WrapTabGroupIndicator vertical columns (DV-14)', () => { }); test('the continuation marker skips the column holding the first tab (vertical-rl safe)', () => { - // First panel 'a' is in the RIGHT-most column (left 40); the left column - // (left 0) is the continuation one. Bucketing by reference — not by - // min-left — must mark the left column, not the first. + // First panel 'a' is in the right-most column (left 40); the left column + // (left 0) is the continuation one. Bucketing by reference, not by + // min-left, must mark the left column, not the first. const tabMap = new Map([ ['a', makeTab(40, 0)], ['b', makeTab(40, 30)], diff --git a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsAnimation.spec.ts b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsAnimation.spec.ts index 511339dd1..58842a25e 100644 --- a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsAnimation.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsAnimation.spec.ts @@ -369,7 +369,7 @@ describe('tabs - animation', () => { // runFlipAnimation (which queues a rAF that triggers the // transition). The browser then fires `dragend` synchronously // on the source element, which bubbles to _tabsList where the - // resetDragAnimation listener runs *before* the rAF — if that + // resetDragAnimation listener runs *before* the rAF. If that // listener clears the transforms, FLIP never animates. const { tabs } = createTabs({ tabAnimation: 'smooth' }); tabs.openPanel(createMockPanel('panel-a'), 0); @@ -391,7 +391,7 @@ describe('tabs - animation', () => { elements[1].classList.contains('dv-tab--shifting') ).toBeTruthy(); - // Fire the post-drop dragend — must NOT clobber the FLIP. + // Fire the post-drop dragend. It must not clobber the FLIP. const tabsList = (tabs as any)._tabsList as HTMLElement; fireEvent.dragEnd(tabsList); @@ -706,9 +706,9 @@ describe('tabs - animation', () => { }); test('dragging a group chip just before another group keeps insertion index outside the group (issue #1264)', () => { - // Regression: dragging a chip onto the LEFT of a standalone tab + // Regression: dragging a chip onto the left of a standalone tab // T, when a chip group sits immediately to T's right, must drop - // *before* T — not between T and the adjacent chip. + // *before* T, not between T and the adjacent chip. // // Layout: [T][A1][A2] with chip "groupA" covering A1+A2. // Drag external chip B; cursor on T's far left → insertionIndex @@ -772,7 +772,7 @@ describe('tabs - animation', () => { test('dragging a group chip never targets another group', () => { // Regression: dragging a group chip between two tabs of another - // group should NOT set targetTabGroupId — groups cannot be + // group must not set targetTabGroupId, because groups cannot be // dropped inside other groups. // // Layout: [Feature chip][A][B][Monitoring chip][C] @@ -1214,7 +1214,7 @@ describe('tabs - animation', () => { // _animState set with sourceIndex === -1 (external drag) expect(getAnimState(tabs)?.sourceIndex).toBe(-1); - // Must NOT clear — cross-group animation depends on the overlay persisting + // Must not clear, because cross-group animation depends on the overlay persisting expect(clearMock).not.toHaveBeenCalled(); }); @@ -1235,7 +1235,7 @@ describe('tabs - animation', () => { const tabsList = (tabs as any)._tabsList as HTMLElement; fireEvent.dragOver(tabsList); - // Should NOT initialize _animState (same group) + // Should not initialize _animState (same group) expect(getAnimState(tabs)).toBeNull(); }); @@ -1255,7 +1255,7 @@ describe('tabs - animation', () => { const firstPositions = new Map(); firstPositions.set('panel-a', makeDOMRect(0, 0, 80, 30)); firstPositions.set('panel-b', makeDOMRect(80, 0, 80, 30)); - // panel-c is the newly inserted tab — NOT in firstPositions + // panel-c is the newly inserted tab, so it's not in firstPositions // "Last" positions (after new tab inserted at index 2) mockTabRect(elements[0], { left: 0, width: 80 }); @@ -1365,7 +1365,7 @@ describe('tabs - animation', () => { }); tabsList.dispatchEvent(dragLeaveEvent); - // State should NOT be reset since relatedTarget is a child + // State should not be reset since relatedTarget is a child expect(elements[1].style.marginLeft).toBe('80px'); expect(getAnimState(tabs).currentInsertionIndex).toBe(1); @@ -1534,7 +1534,7 @@ describe('tabs - animation', () => { triggerChipDragStart(tabs, tabGroup, chip); - // Drag over — cursor past panel-b midpoint + // Drag over with the cursor past panel-b midpoint // dragLeftEdge = 200 - cursorOffset, should place insertion after panel-b (tabs as any).handleDragOver({ clientX: 200 } as DragEvent); @@ -1612,7 +1612,7 @@ describe('tabs - animation', () => { const moveGroupOrPanelMock = jest.fn(); (accessor as any).moveGroupOrPanel = moveGroupOrPanelMock; - // The tab group does NOT exist in this group (simulate cross-group) + // The tab group does not exist in this group (simulate cross-group) (group.model as any).getTabGroups = () => []; // Set up PanelTransfer so _commitGroupMove reads it @@ -1658,7 +1658,7 @@ describe('tabs - animation', () => { const moveGroupOrPanelMock = jest.fn(); (accessor as any).moveGroupOrPanel = moveGroupOrPanelMock; - // The tab group does NOT exist in this group + // The tab group does not exist in this group (group.model as any).getTabGroups = () => []; const transfer = dataTransfer.LocalSelectionTransfer.getInstance(); @@ -1722,8 +1722,8 @@ describe('tabs - animation', () => { const { tabs, accessor, group, tabGroup, chip, elements } = setupChipDrag('smooth', ['panel-x', 'panel-y', 'panel-z']); - // The drop target (this tabs instance) has its own tabs but NOT - // the dragged tab group — the group lives in another dockview + // The drop target (this tabs instance) has its own tabs but not + // the dragged tab group; that group lives in another dockview // group. Simulate the cross-group condition. (group.model as any).getTabGroups = () => []; (accessor as any).moveGroupOrPanel = jest.fn(); @@ -1763,7 +1763,7 @@ describe('tabs - animation', () => { ); expect(gappedTab).toBeDefined(); - // Drop on the destination — cross-group path runs here. + // Drop on the destination, where the cross-group path runs. fireEvent.drop(tabsList); // After the drop, no destination tab should retain a non-zero @@ -1834,7 +1834,7 @@ describe('tabs - animation', () => { ); panelOrder.splice(insertAt, 0, ...groupPanels); - // Rebuild tabs container in the new order — same dance the + // Rebuild tabs container in the new order, the same dance the // real model performs. for (const id of [...panelOrder]) { tabs.delete(id); @@ -1848,7 +1848,7 @@ describe('tabs - animation', () => { mockTabRect(newEls[i], { left: i * 80, width: 80 }); } // Skip the actual updateTabGroups DOM dance (chip - // repositioning) — not needed for the residual-margin + // repositioning); it's not needed for the residual-margin // assertion. }; @@ -1876,7 +1876,7 @@ describe('tabs - animation', () => { tabsList.dispatchEvent(evt); // After the drop completes, no tab should carry inline margin - // left/right or a dv-tab--shifting class — anything else would + // left/right or a dv-tab--shifting class; anything else would // be visible as residual spacing. const afterEls = getTabElements(tabs); for (const el of afterEls) { @@ -1917,7 +1917,7 @@ describe('tabs - animation', () => { sourceGroupPanelIds: new Set(), }; - // Mock getPanelData to return a DIFFERENT tab group from another group + // Mock getPanelData to return a different tab group from another group (dataTransfer.getPanelData as jest.Mock).mockReturnValue( new dataTransfer.PanelTransfer( 'test-accessor', @@ -1958,7 +1958,7 @@ describe('tabs - animation', () => { }; (tabs as any)._animState = originalState; - // Same tab group id — not stale + // Same tab group id, so not stale (dataTransfer.getPanelData as jest.Mock).mockReturnValue( new dataTransfer.PanelTransfer( 'test-accessor', @@ -1971,7 +1971,7 @@ describe('tabs - animation', () => { const tabsList = (tabs as any)._tabsList as HTMLElement; fireEvent.dragOver(tabsList); - // _animState should NOT have been cleared (same tab group) + // _animState should not have been cleared (same tab group) const state = getAnimState(tabs); expect(state).not.toBeNull(); // currentInsertionIndex might be updated by handleDragOver but @@ -1990,7 +1990,7 @@ describe('tabs - animation', () => { // Provide getPanel so the external drag path doesn't throw (accessor as any).getPanel = jest.fn().mockReturnValue(undefined); - // Chip drag (has tabGroupId) should NOT be skipped in default mode + // Chip drag (has tabGroupId) should not be skipped in default mode (dataTransfer.getPanelData as jest.Mock).mockReturnValue( new dataTransfer.PanelTransfer( 'test-accessor', @@ -2012,7 +2012,7 @@ describe('tabs - animation', () => { const panelA = createMockPanel('panel-a'); tabs.openPanel(panelA, 0); - // Regular tab drag (no tabGroupId) — should be skipped in default mode + // Regular tab drag (no tabGroupId): should be skipped in default mode (dataTransfer.getPanelData as jest.Mock).mockReturnValue( new dataTransfer.PanelTransfer( 'test-accessor', @@ -2024,7 +2024,7 @@ describe('tabs - animation', () => { const tabsList = (tabs as any)._tabsList as HTMLElement; fireEvent.dragOver(tabsList); - // Should NOT initialize _animState (default mode, non-chip drag) + // Should not initialize _animState (default mode, non-chip drag) expect(getAnimState(tabs)).toBeNull(); }); }); @@ -2090,7 +2090,7 @@ describe('tabs - animation', () => { test('HTML5 tab drag in smooth mode DOES initialise _animState (sanity)', () => { // Counter-test: ensures the gate doesn't accidentally suppress - // the HTML5 path that the cleanup listeners DO support. + // the HTML5 path that the cleanup listeners do support. const { tabs } = createTabs({ tabAnimation: 'smooth' }); tabs.openPanel(createMockPanel('a'), 0); tabs.openPanel(createMockPanel('b'), 1); @@ -2105,7 +2105,7 @@ describe('tabs - animation', () => { // Pointer chip drag cleanup used to live in a Tabs-level // `_chipDragCleanup` field disposed from this controller - // subscription. That state is gone — the manager's pointer drag + // subscription. That state is gone; the manager's pointer drag // source now owns the iframe shield + panelTransfer cleanup via // its internal MutableDisposables, fired by the controller's own // teardown when the drag ends. diff --git a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsForcedOverflow.spec.ts b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsForcedOverflow.spec.ts index 5dfa234b3..a69a3d618 100644 --- a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsForcedOverflow.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsForcedOverflow.spec.ts @@ -41,10 +41,10 @@ function createTabs(): Tabs { * The forced-overflow seam the `MultiRowTabsModule` consumes: it pushes the * surplus rows (beyond `overflow.maxRows`) into the dropdown even though nothing * clips horizontally in wrap mode. jsdom has zero geometry, so - * `isChildEntirelyVisibleWithinParent` reports every tab as fully visible — the - * default overflow set is empty here, isolating the forcing predicate. + * `isChildEntirelyVisibleWithinParent` reports every tab as fully visible, so + * the default overflow set is empty here, isolating the forcing predicate. */ -describe('tabs — forced overflow seam', () => { +describe('tabs: forced overflow seam', () => { const fire = ( tabs: Tabs, reset: boolean @@ -100,7 +100,7 @@ describe('tabs — forced overflow seam', () => { tabs.setForcedOverflow((id) => id === 'b'); // The `OverflowObserver` reports no overflow in wrap mode and asks for a - // reset — the forced set must still be surfaced (as a non-reset fire). + // reset, but the forced set must still be surfaced (as a non-reset fire). const event = fire(tabs, true); expect(event.tabs).toEqual(['b']); expect(event.reset).toBe(false); diff --git a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsOverflowExclude.spec.ts b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsOverflowExclude.spec.ts index 322ecaa00..055861211 100644 --- a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsOverflowExclude.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsOverflowExclude.spec.ts @@ -1,5 +1,5 @@ // Force every tab to be reported as clipped so `toggleDropdown` would, by -// default, push them all into the overflow set — isolating the effect of the +// default, push them all into the overflow set, isolating the effect of the // overflow-exclusion predicate from jsdom's zero-geometry. jest.mock('../../../../dom', () => { const actual = jest.requireActual('../../../../dom'); @@ -48,7 +48,7 @@ function createTabs(): Tabs { return new Tabs(group, accessor, { showTabsOverflowControl: true }); } -describe('tabs — overflow exclusion seam', () => { +describe('tabs: overflow exclusion seam', () => { const overflowIds = (tabs: Tabs): string[] => { const events: { tabs: string[] }[] = []; const sub = tabs.onOverflowTabsChange((e) => events.push(e)); diff --git a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsPinnedOverflow.spec.ts b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsPinnedOverflow.spec.ts index 419375275..48325922d 100644 --- a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsPinnedOverflow.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsPinnedOverflow.spec.ts @@ -1,5 +1,5 @@ // Force every tab to be reported as clipped so `toggleDropdown` treats them as -// overflowing — isolating the pinned-overflow bucket from jsdom's zero-geometry. +// overflowing, isolating the pinned-overflow bucket from jsdom's zero-geometry. jest.mock('../../../../dom', () => { const actual = jest.requireActual('../../../../dom'); return { @@ -65,7 +65,7 @@ function giveWidth(tabs: Tabs, id: string, width: number): void { }) as DOMRect; } -describe('tabs — pinned-among-themselves overflow', () => { +describe('tabs: pinned-among-themselves overflow', () => { const lastEvent = ( tabs: Tabs ): { tabs: string[]; pinnedTabs: string[] } => { diff --git a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsPinnedSticky.spec.ts b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsPinnedSticky.spec.ts index 2b095f77a..e2ac9cd84 100644 --- a/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsPinnedSticky.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/components/titlebar/tabsPinnedSticky.spec.ts @@ -37,7 +37,7 @@ function createTabs(): Tabs { return new Tabs(group, accessor, { showTabsOverflowControl: true }); } -/** jsdom has no layout — stub a tab's `offsetLeft` (its natural in-flow x, the +/** jsdom has no layout, so stub a tab's `offsetLeft` (its natural in-flow x, the * value the sticky offset is derived from). */ function giveOffset(tabs: Tabs, id: string, offsetLeft: number): void { const el = tabs.tabs.find((t) => t.panel.id === id)!.element; @@ -55,7 +55,7 @@ function stickyOffset(tabs: Tabs, id: string): string | undefined { return el.style.getPropertyValue('--dv-pinned-sticky-left'); } -describe('tabs — sticky pinned tabs', () => { +describe('tabs: sticky pinned tabs', () => { test('setPinnedSticky freezes pinned tabs at their natural offsets', () => { const tabs = createTabs(); tabs.openPanel(createMockPanel('a')); @@ -132,7 +132,7 @@ describe('tabs — sticky pinned tabs', () => { expect(stickyOffset(tabs, 'a')).toBe('0px'); // A second recompute (resize / scroll self-heal / pinned-set refresh) - // must still resolve to the natural 0 — reading the stuck 324 would + // must still resolve to the natural 0; reading the stuck 324 would // compound the offset and push the pinned tab off to the right edge. tabs.setOverflowExclude((id) => id === 'a'); expect(stickyOffset(tabs, 'a')).toBe('0px'); @@ -146,7 +146,7 @@ describe('tabs — sticky pinned tabs', () => { tabs.setOverflowExclude((id) => id === 'a'); giveOffset(tabs, 'a', 0); - // Never enabled — no sticky styling appears. + // Never enabled, so no sticky styling appears. expect(stickyOffset(tabs, 'a')).toBeUndefined(); tabs.element.remove(); }); diff --git a/packages/dockview-core/src/__tests__/dockview/components/titlebar/voidContainer.spec.ts b/packages/dockview-core/src/__tests__/dockview/components/titlebar/voidContainer.spec.ts index 5e86620d8..0f3c21d04 100644 --- a/packages/dockview-core/src/__tests__/dockview/components/titlebar/voidContainer.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/components/titlebar/voidContainer.spec.ts @@ -439,8 +439,8 @@ describe('voidContainer', () => { clientX: 0, clientY: 0, }); - // Move within the pre-arm window — for a floating group this - // must NOT promote to a redock (the overlay's move-the-float + // Move within the pre-arm window. For a floating group this + // must not promote to a redock (the overlay's move-the-float // drag owns this gesture). jest.advanceTimersByTime(100); fireEvent.pointerMove(window, { @@ -616,8 +616,8 @@ describe('voidContainer', () => { doSetGroupActive: jest.fn(), // The custom-ghost resolution lives in the AdvancedDnD module // (covered by its own tests). Here we stub the host's ghost - // builder — exactly what DockviewComponent provides to - // VoidContainer — to verify VoidContainer drives the lifecycle. + // builder (exactly what DockviewComponent provides to + // VoidContainer) to verify VoidContainer drives the lifecycle. buildGroupDragGhost: (g: any) => { const r = factory(g); r.init({ group: g, api: fakeApi }); diff --git a/packages/dockview-core/src/__tests__/dockview/dockviewComponent.spec.ts b/packages/dockview-core/src/__tests__/dockview/dockviewComponent.spec.ts index 5b7569ae5..687f775e4 100644 --- a/packages/dockview-core/src/__tests__/dockview/dockviewComponent.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/dockviewComponent.spec.ts @@ -1153,7 +1153,7 @@ describe('dockviewComponent', () => { sourceGroup.model.addPanelToTabGroup(tabGroup.id, 'panel2'); // Create a second group to be the destination by moving panel1 out - // and then moving it back — use moveGroupOrPanel to ensure a + // and then moving it back, using moveGroupOrPanel to ensure a // separate group exists dockview.moveGroupOrPanel({ from: { groupId: sourceGroup.id, panelId: 'panel3' }, @@ -1672,7 +1672,7 @@ describe('dockviewComponent', () => { fireEvent.dragStart(chip); expect(getPanelData()?.tabGroupId).toBe(monitoring.id); - // The drop resolves via moveGroupOrPanel — the same path the + // The drop resolves via moveGroupOrPanel, the same path the // real drag flow ends up calling. This detaches the chip from // the DOM (source tab group becomes empty). dockview.moveGroupOrPanel({ @@ -1687,7 +1687,7 @@ describe('dockviewComponent', () => { // Without the fix, panelTransfer keeps the chip-drag payload // (with tabGroupId) and any subsequent dragover/canDisplayOverlay // call that reads it before the next dragstart's setData runs - // would see stale data — including a stale tabGroupId pointing + // would see stale data, including a stale tabGroupId pointing // at a tab group that has just been recreated under a new id. expect(getPanelData()).toBeUndefined(); @@ -5258,8 +5258,8 @@ describe('dockviewComponent', () => { dockview.overlayRenderContainer.element ); - // Host must NOT live inside `.dv-dockview` — that element has - // `contain: layout` which forms a stacking context that would trap + // Host must not live inside `.dv-dockview`, which has + // `contain: layout` and forms a stacking context that would trap // floating z-indexes below shell-level render overlays. expect(dockview.element.contains(overlay)).toBe(false); }); @@ -6329,12 +6329,12 @@ describe('dockviewComponent', () => { expect(panel1.api.location.type).toBe('grid'); expect(panel2.api.location.type).toBe('popout'); - // the departed group no longer resolves to the popout service — - // it uses the main window again + // the departed group no longer resolves to the popout + // service; it uses the main window again expect(dockview.getPopupServiceForGroup(panel1.group)).toBe( mainPopupService ); - // the promoted anchor still resolves to the SAME popout service + // the promoted anchor still resolves to the same popout service expect(dockview.getPopupServiceForGroup(panel2.group)).toBe( popoutService ); @@ -6364,7 +6364,7 @@ describe('dockviewComponent', () => { component: 'default', floating: true, }); - // panel3 must be placed explicitly in the grid — a position-less + // panel3 must be placed explicitly in the grid; a position-less // add would land in the active (floating) group. const panel3 = dockview.addPanel({ id: 'panel_3', @@ -6445,7 +6445,7 @@ describe('dockviewComponent', () => { const dockview = make(); dockview.layout(1000, 500); - // A frozen layout in the shape dockview emitted BEFORE nested + // A frozen layout in the shape dockview emitted before nested // multi-group windows existed: floating/popout groups use the // legacy `data` field and no `grid`. Hand-authored (not produced // by the current serializer) so it guards old -> new read @@ -7829,7 +7829,7 @@ describe('dockviewComponent', () => { }, }); - // Dispose BEFORE the popout-restoration timer has had a chance + // Dispose before the popout-restoration timer has had a chance // to fire. This simulates the React StrictMode mount -> dispose // -> remount sequence that triggers issue #851. expect(openSpy).not.toHaveBeenCalled(); @@ -7838,7 +7838,7 @@ describe('dockviewComponent', () => { // Advance any timers and microtasks. With the fix in place the // queued popout restoration is cancelled in dispose() and the // guard inside the timeout body short-circuits any survivors, - // so window.open MUST NOT be called. + // so window.open must not be called. jest.runAllTimers(); await Promise.resolve(); jest.runAllTimers(); @@ -8172,7 +8172,7 @@ describe('dockviewComponent', () => { await dockview.addPopoutGroup(panel2); expect(panel2.api.location.type).toBe('popout'); - // Drop the panel back onto the right edge of panel_3's group — + // Drop the panel back onto the right edge of panel_3's group, // a neighbor following the original slot. Pre-fix this placed the // new group after panel_4 instead of between panel_3 and panel_4. panel2.api.moveTo({ @@ -8240,7 +8240,7 @@ describe('dockviewComponent', () => { await dockview.addPopoutGroup(panel2); expect(panel2.api.location.type).toBe('popout'); - // Drop on the far right edge — pre-fix this threw "Invalid index" + // Drop on the far right edge. Pre-fix this threw "Invalid index" // because the stale target index pointed past the end of the grid // after the empty reference group was cascade-removed. expect(() => @@ -8599,12 +8599,12 @@ describe('dockviewComponent', () => { expect(await dockview.addPopoutGroup(panel1)).toBeTruthy(); - // addPopoutGroup creates a new group for the popout window — + // addPopoutGroup creates a new group for the popout window, so // panel1's group reference now points at it const popoutGroup = panel1.api.group; expect(popoutGroup).not.toBe(dockedGroup); - // The popout group has a dedicated popupService — required so + // The popout group has a dedicated popupService, required so // its context menus render in the popout window, not the main one const popoutService = dockview.getPopupServiceForGroup(popoutGroup); expect(popoutService).not.toBe(dockview.popupService); @@ -8912,7 +8912,7 @@ describe('dockviewComponent', () => { jest.advanceTimersByTime(500); await dockview.popoutRestorationPromise; - // blocked popout content is not lost — it falls back into the grid + // blocked popout content is not lost; it falls back into the grid expect(dockview.panels.map((p) => p.id).sort()).toEqual([ 'p1', 'p2', @@ -9062,7 +9062,7 @@ describe('dockviewComponent', () => { dockview.fromJSON(emptyLayout as any); }).not.toThrow(); - // Drain any timers — none should still be in flight, but if + // Drain any timers. None should still be in flight, but if // any survive they must not call window.open or throw. jest.runAllTimers(); await dockview.popoutRestorationPromise; @@ -9072,7 +9072,7 @@ describe('dockviewComponent', () => { expect(dockview.groups).toHaveLength(0); expect(dockview.panels).toHaveLength(0); - // The component should still be usable — loading a fresh + // The component should still be usable: loading a fresh // layout after the sequence must succeed. expect(() => { dockview.fromJSON(popoutLayout as any); @@ -9324,7 +9324,7 @@ describe('dockviewComponent', () => { jest.runAllTimers(); expect(didLayoutChangeHandler).toHaveBeenCalledTimes(1); - // remove an empty edge group — fires only _onDidRemoveGroup (no + // remove an empty edge group: fires only _onDidRemoveGroup (no // panel events). Without _onDidRemoveGroup in the composition // this would not fire. dockview.removeEdgeGroup('left'); @@ -10803,7 +10803,7 @@ describe('dockviewComponent', () => { // The fix schedules updateAllPositions on the next animation // frame via debouncedUpdateAllPositions(). Without the - // _onDidMovePanel listener this assertion fails — the overlay + // _onDidMovePanel listener this assertion fails; the overlay // would only reposition on the next external resize. await new Promise((resolve) => requestAnimationFrame(resolve)); expect(updateSpy).toHaveBeenCalled(); @@ -11181,7 +11181,7 @@ describe('dockviewComponent', () => { const state = dockview.toJSON(); dockview.fromJSON(state); - // After restore, the active panel should NOT be in the collapsed group + // After restore, the active panel should not be in the collapsed group const restoredGroup = dockview.api.panels[0].group; const activeId = restoredGroup.activePanel?.id; @@ -11232,7 +11232,7 @@ describe('dockviewComponent', () => { const state = dockview.toJSON(); dockview.fromJSON(state); - // All panels are in collapsed groups — no active panel, + // All panels are in collapsed groups, so no active panel and the // watermark should be shown const restoredGroup = dockview.api.panels[0].group; const restored = dockview.api.getTabGroups({ @@ -11516,7 +11516,7 @@ describe('dockviewComponent', () => { const state = dv.toJSON(); dv.dispose(); - // a fresh component that has NOT called addEdgeGroup — fromJSON must + // a fresh component that has not called addEdgeGroup; fromJSON must // auto-create the edge group with the serialized constraints const c2 = document.createElement('div'); const fresh = new DockviewComponent(c2, { @@ -11571,7 +11571,7 @@ describe('dockviewComponent', () => { }); dv.getEdgeGroup('right')!.expand(); - // hide the expanded edge group — getViewSize now reports 0 + // hide the expanded edge group; getViewSize now reports 0 dv.setEdgeGroupVisible('right', false); const json = dv.toJSON(); @@ -11905,7 +11905,7 @@ describe('dockviewComponent', () => { expect(edgeGroupApi.location.type).toBe('edge'); - // attempt to float the edge group — should be a no-op + // attempt to float the edge group; should be a no-op dv.addFloatingGroup(edgeGroup); // group should still be an edge group, not floating @@ -11924,7 +11924,7 @@ describe('dockviewComponent', () => { expect(edgeGroupApi.location.type).toBe('edge'); - // attempt to popout the edge group — should return false + // attempt to popout the edge group; should return false const result = await dv.addPopoutGroup(edgeGroup); expect(result).toBe(false); @@ -12345,8 +12345,8 @@ describe('dockviewComponent', () => { groupId: panel.group.id, panelId: 'p1', }); - // empty it, then serialize SYNCHRONOUSLY (before the deferred - // teardown runs) — the transient empty auto-reveal edge must not + // empty it, then serialize synchronously (before the deferred + // teardown runs). The transient empty auto-reveal edge must not // be persisted, or it would restore as an edge that never tears // itself down. dv.getEdgeGroupPanel('left')!.panels[0].api.close(); @@ -12364,7 +12364,7 @@ describe('dockviewComponent', () => { options.name ); }, - // internal seam — register a subset (see moduleRemovability.spec) + // internal seam: register a subset (see moduleRemovability.spec) modules: AllModules.filter((m) => m !== EdgeGroupModule), } as never); dv.layout(1000, 1000); @@ -12458,7 +12458,7 @@ describe('dockviewComponent', () => { }); test('issue #914: api.setTitle reflected by createTabRenderer output', () => { - // Regression test for #914 — the header overflow dropdown lazily + // Regression test for #914: the header overflow dropdown lazily // builds a fresh tab renderer via panel.view.createTabRenderer(...) // each time it opens. Prior to the fix that renderer was initialised // with a snapshot of the panel's init params, so a title updated via diff --git a/packages/dockview-core/src/__tests__/dockview/dockviewGroupPanelModel.spec.ts b/packages/dockview-core/src/__tests__/dockview/dockviewGroupPanelModel.spec.ts index 1ccd55345..d6189da6d 100644 --- a/packages/dockview-core/src/__tests__/dockview/dockviewGroupPanelModel.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/dockviewGroupPanelModel.spec.ts @@ -852,7 +852,7 @@ describe('dockviewGroupPanelModel', () => { // Regression: swapping the render container on an already-populated // group (e.g. restoring a popout group from JSON, where the popout // window gets its own OverlayRenderContainer) used to leave the active - // onlyWhenVisible panel's content detached — so nothing rendered. + // onlyWhenVisible panel's content detached, so nothing rendered. const dockviewComponent = new DockviewComponent( document.createElement('div'), { @@ -1608,7 +1608,7 @@ describe('dockviewGroupPanelModel', () => { }); expect(tabGroup.collapsed).toBe(true); - // No transition occurred — chip / tabs render collapsed from the start. + // No transition occurred; chip / tabs render collapsed from the start. expect(collapseEvents).toHaveLength(0); }); @@ -2098,10 +2098,10 @@ describe('dockviewGroupPanelModel', () => { describe('content drop-target zones (mouse + touch parity)', () => { // Regression: when a group's location changes (grid → floating / // popout / edge), the content drop target's accepted zones must be - // updated on BOTH the HTML5 dropTarget (mouse path) and the + // updated on both the HTML5 dropTarget (mouse path) and the // pointerDropTarget (touch path). Without the parallel call, touch // drops on a non-grid group's content area would land in zones the - // HTML5 path forbids — different layout outcomes between input + // HTML5 path forbids, giving different layout outcomes between input // methods. function getContentTargets(group: DockviewGroupPanel): { dropTarget: { setTargetZones: jest.Mock }; diff --git a/packages/dockview-core/src/__tests__/dockview/dockviewShell.spec.ts b/packages/dockview-core/src/__tests__/dockview/dockviewShell.spec.ts index b2978048c..e367073c8 100644 --- a/packages/dockview-core/src/__tests__/dockview/dockviewShell.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/dockviewShell.spec.ts @@ -781,7 +781,7 @@ describe('ShellManager', () => { shell.dispose(); }); - test('updateTheme is idempotent — calling twice with same args gives same result', () => { + test('updateTheme is idempotent: calling twice with same args gives same result', () => { const shell = makeShell({ left: { id: 'left' } }, 0, 35); shell.updateTheme(10, 44); diff --git a/packages/dockview-core/src/__tests__/dockview/dockviewTabGroupAccent.spec.ts b/packages/dockview-core/src/__tests__/dockview/dockviewTabGroupAccent.spec.ts index 1ed10e8b2..752a0278c 100644 --- a/packages/dockview-core/src/__tests__/dockview/dockviewTabGroupAccent.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/dockviewTabGroupAccent.spec.ts @@ -56,7 +56,7 @@ function flushChips(dockview: DockviewComponent): void { } } -describe('DockviewComponent — tab group accent', () => { +describe('DockviewComponent: tab group accent', () => { test('default palette is the built-in 9 colors', () => { const { dockview } = setup(); expect(dockview.api.tabGroupColors).toEqual(DEFAULT_TAB_GROUP_COLORS); diff --git a/packages/dockview-core/src/__tests__/dockview/groupContentSizing.spec.ts b/packages/dockview-core/src/__tests__/dockview/groupContentSizing.spec.ts index 5e86fac7f..ab4fb19a7 100644 --- a/packages/dockview-core/src/__tests__/dockview/groupContentSizing.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/groupContentSizing.spec.ts @@ -28,8 +28,8 @@ class TestContentPart implements IContentRenderer { } /** - * The group lays panels out with the *content-area* dimensions — the group box - * minus the header along its axis — so panels (and `onDidDimensionsChange`) + * The group lays panels out with the *content-area* dimensions: the group box + * minus the header along its axis. That way panels (and `onDidDimensionsChange`) * receive the real space they occupy, not the header-inclusive group box. * * jsdom performs no layout, so `offset*` is 0 by default and nothing is diff --git a/packages/dockview-core/src/__tests__/dockview/layoutMutation.spec.ts b/packages/dockview-core/src/__tests__/dockview/layoutMutation.spec.ts index 0a10c2993..1ca7c138d 100644 --- a/packages/dockview-core/src/__tests__/dockview/layoutMutation.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/layoutMutation.spec.ts @@ -58,7 +58,7 @@ describe('layout mutation events', () => { expect(did).toEqual(['remove']); }); - test('a compound move fires once — nested removePanel does not double-fire', () => { + test('a compound move fires once: nested removePanel does not double-fire', () => { const p1 = dockview.addPanel({ id: 'p1', component: 'default' }); const p2 = dockview.addPanel({ id: 'p2', @@ -73,7 +73,7 @@ describe('layout mutation events', () => { to: { group: p1.group, position: 'center' }, }); - // Exactly one 'move' — the source-group teardown inside the move must + // Exactly one 'move': the source-group teardown inside the move must // not leak its own transaction (depth counter). expect(will).toEqual(['move']); expect(did).toEqual(['move']); @@ -217,7 +217,7 @@ describe('layout mutation events', () => { const json = dockview.toJSON(); dockview.fromJSON(json); - // Confirms the seam fires on a restorable state — undo/redo via + // Confirms the seam fires on a restorable state; undo/redo via // fromJSON can put the maximize back. expect(dockview.hasMaximizedGroup()).toBe(true); }); @@ -343,7 +343,7 @@ describe('layout mutation events', () => { // Floating p1 brackets one 'float' transaction whose body removes // the source group (a nested mutation). The outer api origin must - // survive — a nested call must not reset it to 'user'. + // survive; a nested call must not reset it to 'user'. dockview.api.addFloatingGroup(p1); expect(origins).toEqual(['api']); }); diff --git a/packages/dockview-core/src/__tests__/dockview/liveRegion.spec.ts b/packages/dockview-core/src/__tests__/dockview/liveRegion.spec.ts index b4d14db22..ca912b30d 100644 --- a/packages/dockview-core/src/__tests__/dockview/liveRegion.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/liveRegion.spec.ts @@ -18,7 +18,7 @@ class TestPanel implements IContentRenderer { } /** - * LiveRegion (free) — screen-reader announcements of layout changes. Phase 1: + * LiveRegion (free): screen-reader announcements of layout changes. Phase 1: * a visually-hidden polite status region, open/close announcements, the * `announce()` sink, and suppression of the bulk load/clear burst. */ @@ -53,7 +53,7 @@ describe('LiveRegion announcer', () => { expect(r).toBeTruthy(); expect(r.getAttribute('role')).toBe('status'); expect(r.getAttribute('aria-live')).toBe('polite'); - // hidden but in the a11y tree — never display:none / visibility:hidden + // hidden but in the a11y tree, never display:none / visibility:hidden expect(r.style.display).not.toBe('none'); expect(r.style.visibility).not.toBe('hidden'); }); @@ -174,7 +174,7 @@ describe('LiveRegion announcer', () => { expect(r.getAttribute('aria-live')).toBe('assertive'); }); - test('routes by politeness — assertive vs polite region', () => { + test('routes by politeness: assertive vs polite region', () => { service().announce('routine'); expect(region().textContent).toBe('routine'); expect(assertiveRegion().textContent).toBe(''); @@ -238,7 +238,7 @@ describe('LiveRegion announcer', () => { title: 'P2', position: { direction: 'right' }, }); - // the only announcement is the open — group creation's initial + // the only announcement is the open; group creation's initial // `-> grid` transition must not read as a dock expect(region().textContent).toBe('P2 opened'); }); @@ -265,7 +265,7 @@ describe('LiveRegion announcer', () => { }); await dockview.addPopoutGroup(p2); // The mock popout reuses the main document, so per-window mounting is - // skipped — there is still exactly one polite region and announcements + // skipped; there is still exactly one polite region and announcements // stay on it. (Real cross-document behaviour is covered by the e2e.) expect(container.querySelectorAll('.dv-live-region')).toHaveLength(1); expect(region().textContent).toBe('P2 opened in a new window'); diff --git a/packages/dockview-core/src/__tests__/dockview/moduleRemovability.spec.ts b/packages/dockview-core/src/__tests__/dockview/moduleRemovability.spec.ts index d4fbfb13e..f5da86e17 100644 --- a/packages/dockview-core/src/__tests__/dockview/moduleRemovability.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/moduleRemovability.spec.ts @@ -19,7 +19,7 @@ class TestPanel implements IContentRenderer { * Every module must be independently removable: with any single module filtered * out, the core component must still construct, run the base layout operations * (add / split / maximize / serialize / remove), and dispose without throwing. - * This is the contract that makes the eventual package split a lift-and-move — + * This is the contract that makes the eventual package split a lift-and-move: * if removing a module breaks core, the boundary is leaking and needs fixing. */ describe('module removability', () => { @@ -31,7 +31,7 @@ describe('module removability', () => { : AllModules; const dockview = new DockviewComponent(container, { createComponent: () => new TestPanel(), - // internal seam — register a subset + // internal seam: register a subset modules, } as never); dockview.layout(800, 600); @@ -53,7 +53,7 @@ describe('module removability', () => { container.remove(); }; - test('baseline — all modules present', () => { + test('baseline: all modules present', () => { expect(() => exercise(null)).not.toThrow(); }); diff --git a/packages/dockview-core/src/__tests__/dockview/multiRowTabsSeam.spec.ts b/packages/dockview-core/src/__tests__/dockview/multiRowTabsSeam.spec.ts index d5d90bfd1..c0a4b655b 100644 --- a/packages/dockview-core/src/__tests__/dockview/multiRowTabsSeam.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/multiRowTabsSeam.spec.ts @@ -123,7 +123,7 @@ describe('multi-row tabs seam', () => { // jsdom has no layout, so nothing clips → no dropdown by default. expect(dropdown()).toBeNull(); - // Force 'b' into overflow (the wrap surplus set) — the dropdown appears + // Force 'b' into overflow (the wrap surplus set); the dropdown appears // although 'b' is not horizontally clipped. cut.setForcedOverflow(a.group, (id) => id === 'b'); expect(dropdown()).not.toBeNull(); diff --git a/packages/dockview-core/src/__tests__/dockview/ownsElement.spec.ts b/packages/dockview-core/src/__tests__/dockview/ownsElement.spec.ts index cab876e2b..80bf94d16 100644 --- a/packages/dockview-core/src/__tests__/dockview/ownsElement.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/ownsElement.spec.ts @@ -16,8 +16,8 @@ class TestPanel implements IContentRenderer { /** * `ownsElement` is the cross-document containment primitive the keyboard - * accessibility services use instead of a single-document `rootElement.contains` - * — so a keydown / focus inside a popped-out window (a separate `document`) is + * accessibility services use instead of a single-document `rootElement.contains`, + * so a keydown / focus inside a popped-out window (a separate `document`) is * still recognised as belonging to this dock. jsdom can't open a real second * window, so the popout document is simulated by stubbing `getPopoutWindows`. */ diff --git a/packages/dockview-core/src/__tests__/dockview/popoutLifecycle.spec.ts b/packages/dockview-core/src/__tests__/dockview/popoutLifecycle.spec.ts index 53bce6c47..296ed9ae0 100644 --- a/packages/dockview-core/src/__tests__/dockview/popoutLifecycle.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/popoutLifecycle.spec.ts @@ -240,7 +240,7 @@ describe('popout screen positioning', () => { test('a serialized popout round-trips and restores at its saved screen position (no double-offset)', async () => { // 1. Serialize a popout whose window reports an absolute screen - // position — as a window dragged onto a secondary monitor would. + // position, as a window dragged onto a secondary monitor would. const POPOUT_SCREEN_X = 2200; const POPOUT_SCREEN_Y = 300; window.open = (() => { @@ -268,10 +268,10 @@ describe('popout screen positioning', () => { // 2. Restore into a fresh component whose opener sits on a secondary // monitor. The saved position is already absolute, so restoration - // must NOT add the opener screen offset again (the DV-39 defect: + // must not add the opener screen offset again (the DV-39 defect: // left would become 1600 + 2200 = 3800). This exercises the real // fromJSON -> deserializePopoutWindows -> addPopoutGroup path, not - // just the supplied-position branch. + // only the supplied-position branch. setOpenerScreenPosition(1600, 200); const features = captureOpenFeatures(); diff --git a/packages/dockview-core/src/__tests__/dockview/popupService.spec.ts b/packages/dockview-core/src/__tests__/dockview/popupService.spec.ts index 244b3c272..c5f82f07c 100644 --- a/packages/dockview-core/src/__tests__/dockview/popupService.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/popupService.spec.ts @@ -86,7 +86,7 @@ describe('PopupService', () => { document.body.appendChild(outside); // PopupService swallows outside-pointerdown for a brief grace window - // after opening (touch long-press protection) — advance past it. + // after opening (touch long-press protection), so advance past it. nowSpy.mockReturnValue(300); fireEvent.pointerDown(outside); @@ -119,7 +119,7 @@ describe('PopupService', () => { openMenu(service); service.close(); - // Open a second menu and close via Escape — only one close should fire + // Open a second menu and close via Escape; only one close should fire const el2 = openMenu(service); fireEvent.keyDown(window, { key: 'Escape' }); diff --git a/packages/dockview-core/src/__tests__/dockview/spatialNavigation.spec.ts b/packages/dockview-core/src/__tests__/dockview/spatialNavigation.spec.ts index 99e7a8e4d..3bade6886 100644 --- a/packages/dockview-core/src/__tests__/dockview/spatialNavigation.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/spatialNavigation.spec.ts @@ -17,7 +17,7 @@ class TestPanel implements IContentRenderer { } /** - * Spatial group navigation — `adjacentGroupInDirection` and the + * Spatial group navigation: `adjacentGroupInDirection` and the * `group.api.boundingBox` geometry accessor. DOM rects are zero in jsdom, so * each group's rect is mocked to lay out a deterministic grid. */ diff --git a/packages/dockview-core/src/__tests__/dockview/tabGroupChips.spec.ts b/packages/dockview-core/src/__tests__/dockview/tabGroupChips.spec.ts index e4553c946..1c9fef42e 100644 --- a/packages/dockview-core/src/__tests__/dockview/tabGroupChips.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/tabGroupChips.spec.ts @@ -20,7 +20,7 @@ class TestPanel implements IContentRenderer { * onDidAddPanelToTabGroup / onDidRemovePanelFromTabGroup / onDidTabGroupChange) * are fired by TabGroupChipsModule's per-group forwarding. The underlying * createTabGroup/addPanelToTabGroup operations live in core, but the events - * only propagate when the module is registered — hence these tests live here. + * only propagate when the module is registered, hence these tests live here. */ describe('tab group events (TabGroupChipsModule)', () => { let container: HTMLElement; @@ -127,7 +127,7 @@ describe('tab group events (TabGroupChipsModule)', () => { panelId: 'panel1', }); - // Change the group label — should fire change event + // Change the group label; should fire change event newTg.setLabel('Updated'); expect(changes).toContain(newTg.id); @@ -242,7 +242,7 @@ describe('tab group events (TabGroupChipsModule)', () => { }); expect(panelsRemoved).toEqual([{ tgId: tg.id, panelId: 'panel2' }]); - // 6. Dissolve — should remove remaining panels and destroy + // 6. Dissolve; should remove remaining panels and destroy panelsRemoved.length = 0; dockview.api.dissolveTabGroup({ groupId, @@ -262,7 +262,7 @@ describe('tab group events (TabGroupChipsModule)', () => { test('regression: tab-group events fire on a source group born during moveGroup-from-edge', () => { // moveGroup from an edge group to the grid creates a fresh `source` - // group via this.createGroup() and adds it via gridview.addView(...) — + // group via this.createGroup() and adds it via gridview.addView(...), // bypassing doAddGroup, so BaseGrid._onDidAdd never fires for source. // TabGroupChipsModule attaches per-group event forwarding via // host.onDidAddGroup (driven by BaseGrid._onDidAdd through the @@ -287,7 +287,7 @@ describe('tab group events (TabGroupChipsModule)', () => { position: { referenceGroup: edgeGroup.id }, }); - // Move the edge group to the grid — internally creates a fresh + // Move the edge group to the grid; internally creates a fresh // `source` group via createGroup + gridview.addView (the path that // bypasses doAddGroup / _onDidAddGroup). dv.moveGroup({ @@ -298,7 +298,7 @@ describe('tab group events (TabGroupChipsModule)', () => { const movedPanel = dv.getGroupPanel('edge-p1')!; const movedGroup = movedPanel.group; - // Subscribe AFTER the move so we can prove the event propagates. + // Subscribe after the move so we can prove the event propagates. const events: string[] = []; dv.api.onDidCreateTabGroup((e) => events.push(e.tabGroup.id)); @@ -308,7 +308,7 @@ describe('tab group events (TabGroupChipsModule)', () => { label: 'test', }); - // Should fire — but doesn't if attachToGroup never ran. + // Should fire, but doesn't if attachToGroup never ran. expect(events).toEqual([tg.id]); dv.dispose(); diff --git a/packages/dockview-core/src/__tests__/dockview/tabGroupIndicator.spec.ts b/packages/dockview-core/src/__tests__/dockview/tabGroupIndicator.spec.ts index d010f9af6..d6ac2932f 100644 --- a/packages/dockview-core/src/__tests__/dockview/tabGroupIndicator.spec.ts +++ b/packages/dockview-core/src/__tests__/dockview/tabGroupIndicator.spec.ts @@ -3,7 +3,7 @@ import { mockGetBoundingClientRect } from '../__test_utils__/utils'; /** * The Chrome-style wrap indicator must sit on the edge of the tab strip that is - * adjacent to the content — i.e. it flips with the header position: bottom edge + * adjacent to the content, so it flips with the header position: bottom edge * for a top header, top edge for a bottom header, left edge for a left header, * right edge for a right header. These tests assert the generated SVG path's * anchored edge flips with `headerPosition`. diff --git a/packages/dockview-core/src/__tests__/dom.spec.ts b/packages/dockview-core/src/__tests__/dom.spec.ts index 3150c9bc2..24de8f7c3 100644 --- a/packages/dockview-core/src/__tests__/dom.spec.ts +++ b/packages/dockview-core/src/__tests__/dom.spec.ts @@ -85,7 +85,7 @@ describe('dom', () => { test('disableIframePointEvents respects the rootNode parameter', () => { // Iframes in a popout document must be shieldable independently // of the main document. The rootNode parameter previously was - // ignored — the function always walked the main document. + // ignored, so the function always walked the main document. const main = document.createElement('iframe'); document.body.appendChild(main); @@ -97,7 +97,7 @@ describe('dom', () => { const f = disableIframePointEvents(popoutDoc); expect(popoutIframe.style.pointerEvents).toBe('none'); - // Main document's iframe must NOT have been shielded — the caller + // Main document's iframe must not have been shielded; the caller // asked to shield only the popout. expect(main.style.pointerEvents).toBe(''); diff --git a/packages/dockview-core/src/__tests__/overlay/overlay.spec.ts b/packages/dockview-core/src/__tests__/overlay/overlay.spec.ts index 5b2d6c105..1466b6ec7 100644 --- a/packages/dockview-core/src/__tests__/overlay/overlay.spec.ts +++ b/packages/dockview-core/src/__tests__/overlay/overlay.spec.ts @@ -983,7 +983,7 @@ describe('overlay', () => { drag(200, 200); - // The raw 100000 must never reach setBounds — it's clamped to the + // The raw 100000 must never reach setBounds; it's clamped to the // container range first (every applied offset stays near the // 400x400 container, nowhere near the requested 100000). const bounds = spy.mock.calls.at(-1)![0] as Record; diff --git a/packages/dockview-core/src/__tests__/overlay/overlayRenderContainer.spec.ts b/packages/dockview-core/src/__tests__/overlay/overlayRenderContainer.spec.ts index 6d8c1976f..44ee5659b 100644 --- a/packages/dockview-core/src/__tests__/overlay/overlayRenderContainer.spec.ts +++ b/packages/dockview-core/src/__tests__/overlay/overlayRenderContainer.spec.ts @@ -464,7 +464,7 @@ describe('overlayRenderContainer', () => { cut.detatch(panel); const container2 = cut.attach({ panel, referenceContainer }); - // A fresh overlay element is created — must be hidden until positioned + // A fresh overlay element is created, so it must be hidden until positioned expect(container2.style.visibility).toBe('hidden'); await exhaustMicrotaskQueue(); @@ -482,7 +482,7 @@ describe('overlayRenderContainer', () => { // 3. the rAF then ran `if (style.visibility === 'hidden') style.visibility = ''`, // leaving the overlay computed-visible with pointer-events:none at a stale // position. onDidDimensionsChange skips non-visible panels, so subsequent - // sash drags never repositioned the overlay — its stale content leaked into + // sash drags never repositioned the overlay, and its stale content leaked into // neighbouring panel areas. const cut = new OverlayRenderContainer( parentContainer, @@ -537,8 +537,8 @@ describe('overlayRenderContainer', () => { expect(container.style.visibility).toBe('hidden'); expect(container.style.pointerEvents).toBe('none'); - // Now simulate an in-flight resize completing AFTER the visibility flip. - // The rAF runs and must NOT clobber `visibility:hidden`. + // Now simulate an in-flight resize completing after the visibility flip. + // The rAF runs and must not clobber `visibility:hidden`. (panel as Writable).api.isVisible = true; onDidVisibilityChange.fire({}); // schedules a resize rAF (panel as Writable).api.isVisible = false; @@ -718,7 +718,7 @@ describe('overlayRenderContainer', () => { test('disposing the container while a renderer throws does not propagate (#1220)', () => { // Same root cause as the test above, but exercised through the - // container's own dispose() — the failure path in the original bug + // container's own dispose(), the failure path in the original bug // report's stack trace. const cut = new OverlayRenderContainer( parentContainer, diff --git a/packages/dockview-core/src/__tests__/paneview/paneviewComponent.spec.ts b/packages/dockview-core/src/__tests__/paneview/paneviewComponent.spec.ts index e12120759..b3294653b 100644 --- a/packages/dockview-core/src/__tests__/paneview/paneviewComponent.spec.ts +++ b/packages/dockview-core/src/__tests__/paneview/paneviewComponent.spec.ts @@ -265,7 +265,7 @@ describe('paneviewComponent', () => { isExpanded: true, }); - // hide panel2 — getViewSize now reports 0, but its real size is cached + // hide panel2: getViewSize now reports 0, but its real size is cached paneview.setVisible(panel2, false); const json = paneview.toJSON(); diff --git a/packages/dockview-core/src/__tests__/popoutWindow.spec.ts b/packages/dockview-core/src/__tests__/popoutWindow.spec.ts index af42a57f6..3dc73856b 100644 --- a/packages/dockview-core/src/__tests__/popoutWindow.spec.ts +++ b/packages/dockview-core/src/__tests__/popoutWindow.spec.ts @@ -174,7 +174,7 @@ describe('assertSameOriginPopoutUrl', () => { describe('rejects unsafe URLs', () => { test.each([ - // The headline class — javascript: would execute in a context the + // The main case: a javascript: URL would execute in a context the // browser still associates with the opener. ['javascript:alert(1)'], ["javascript:fetch('https://evil/?c='+document.cookie)"], diff --git a/packages/dockview-core/src/api/component.api.ts b/packages/dockview-core/src/api/component.api.ts index 301fc0abf..a314405fc 100644 --- a/packages/dockview-core/src/api/component.api.ts +++ b/packages/dockview-core/src/api/component.api.ts @@ -763,7 +763,7 @@ export class DockviewApi implements CommonApi { * Fires before each top-level structural layout mutation (add / remove / * move / float / popout / maximize / load / clear). Compound operations * (e.g. a drag) fire once. Pair with `onDidMutateLayout` to bracket a - * change — useful for undo/redo, autosave and dirty-tracking. + * change, which is useful for undo/redo, autosave and dirty-tracking. */ get onWillMutateLayout(): Event { return this.component.onWillMutateLayout; @@ -825,7 +825,7 @@ export class DockviewApi implements CommonApi { } /** - * Fires when a popout group is removed — whether the user closed its window + * Fires when a popout group is removed, whether the user closed its window * or it was docked back programmatically. Symmetric with * {@link onDidAddPopoutGroup}; not fired during component disposal. */ @@ -900,7 +900,7 @@ export class DockviewApi implements CommonApi { /** * The nearest grid group in a spatial direction from `group`, comparing - * group centre points — e.g. the group visually to the left. Floating and + * group centre points, e.g. the group visually to the left. Floating and * popout groups are ignored. Returns `undefined` when there is no group in * that direction. Pair with `group.api.boundingBox` to build your own * spatial navigation. diff --git a/packages/dockview-core/src/api/dockviewGroupPanelApi.ts b/packages/dockview-core/src/api/dockviewGroupPanelApi.ts index a4ec57632..398590919 100644 --- a/packages/dockview-core/src/api/dockviewGroupPanelApi.ts +++ b/packages/dockview-core/src/api/dockviewGroupPanelApi.ts @@ -69,7 +69,7 @@ export interface DockviewGroupPanelApi extends GridviewPanelApi { readonly onDidPeekChange: Event; /** * Fires when this group's header flips orientation between horizontal - * (top/bottom) and vertical (left/right) — e.g. when `headerPosition` + * (top/bottom) and vertical (left/right), e.g. when `headerPosition` * moves from `top` to `left`. Does not fire for position changes that * keep the same axis (top↔bottom, left↔right) or for the initial set. */ diff --git a/packages/dockview-core/src/dismissableLayer.ts b/packages/dockview-core/src/dismissableLayer.ts index 9faaa2823..e8d808141 100644 --- a/packages/dockview-core/src/dismissableLayer.ts +++ b/packages/dockview-core/src/dismissableLayer.ts @@ -3,7 +3,7 @@ import { CompositeDisposable, IDisposable } from './lifecycle'; /** Touch-primary input (coarse pointer, no fine pointer). On these devices a * window resize is usually an on-screen-keyboard pop / orientation change / - * address-bar collapse — none of which mean "dismiss". */ + * address-bar collapse, none of which mean "dismiss". */ function isCoarsePrimaryInput(win: Window): boolean { if (!win.matchMedia) { return false; @@ -14,7 +14,7 @@ function isCoarsePrimaryInput(win: Window): boolean { } export interface DismissableLayerOptions { - /** Window to listen on — pass the popout window for popout-hosted layers. + /** Window to listen on. Pass the popout window for popout-hosted layers. * Defaults to the global `window`. */ readonly window?: Window; /** Invoked when any enabled dismiss signal fires. */ @@ -23,8 +23,8 @@ export interface DismissableLayerOptions { * mark interaction (e.g. make a transient layer sticky). */ readonly onInsidePointerDown?: (event: PointerEvent) => void; /** Whether a pointer event is inside the layer. Defaults to a DOM - * `contains` check against {@link DismissableLayerOptions.elements} — - * provide this for geometry-based hit testing (e.g. when the visible + * `contains` check against {@link DismissableLayerOptions.elements}. + * Provide this for geometry-based hit testing (e.g. when the visible * content is a sibling overlay stacked on top of the layer). */ readonly isInside?: (event: PointerEvent) => boolean; /** Elements treated as "inside" by the default contains check. */ @@ -35,7 +35,7 @@ export interface DismissableLayerOptions { readonly keys?: readonly string[]; /** Dismiss on a pointerdown outside the layer (default `true`). */ readonly outsidePointerDown?: boolean; - /** Ignore outside-pointerdowns for this many ms after opening — covers the + /** Ignore outside-pointerdowns for this many ms after opening. Covers the * gesture that opened the layer (e.g. a touch long-press) dispatching a * follow-up pointerdown just outside it. */ readonly pointerDownGraceMs?: number; @@ -43,17 +43,17 @@ export interface DismissableLayerOptions { * `false`). */ readonly resize?: boolean; /** Dismiss when focus moves to an element *outside* the layer (default - * `false`) — the "slide back on focus loss" behaviour. */ + * `false`): the "slide back on focus loss" behaviour. */ readonly focusOut?: boolean; /** Whether a newly-focused element is inside the layer (for * {@link focusOut}). Defaults to a `contains` check against - * {@link elements} — provide this for geometry-based testing when the + * {@link elements}. Provide this for geometry-based testing when the * content is a sibling overlay stacked on top of the layer. */ readonly isFocusInside?: (focused: Element) => boolean; /** Listen in the capture phase (default `false`). Use capture when the * layer must see the event before content handlers stop its propagation. */ readonly capture?: boolean; - /** Clock source for the grace window — defaults to `Date.now`. */ + /** Clock source for the grace window. Defaults to `Date.now`. */ readonly now?: () => number; } @@ -65,8 +65,8 @@ export interface DismissableLayerOptions { * decided by an `isInside` predicate (geometry) or a `contains` check against * `elements`. Dispose to detach every listener. * - * It owns only the *signals* — not the surface element, its position, or any - * hover/keep-open policy — so callers keep their own element lifecycle and + * It owns only the *signals*, not the surface element, its position, or any + * hover/keep-open policy, so callers keep their own element lifecycle and * layer this underneath. */ export function createDismissableLayer( diff --git a/packages/dockview-core/src/dnd/backend.ts b/packages/dockview-core/src/dnd/backend.ts index ea3014051..7dcb91de3 100644 --- a/packages/dockview-core/src/dnd/backend.ts +++ b/packages/dockview-core/src/dnd/backend.ts @@ -16,8 +16,8 @@ import { disableIframePointEvents } from '../dom'; * mechanism (HTML5 native events, pointer events) behind a uniform set of * `createX` methods. * - * The backends are stateless — `html5Backend` and `pointerBackend` below - * are exported as module-level singletons so they need no construction + * The backends are stateless. `html5Backend` and `pointerBackend` below + * are exported as module-level singletons, so they need no construction * or wiring through the component tree. */ export interface IDragBackend { @@ -177,10 +177,10 @@ class Html5DragSource extends CompositeDisposable implements IDragSource { this._disabled = value; } setTouchOnly(_: boolean): void { - // No-op — HTML5 path can't filter by pointer type. + // No-op: the HTML5 path can't filter by pointer type. } cancelPending(): void { - // No-op — HTML5 has no pre-arm phase to cancel. + // No-op: HTML5 has no pre-arm phase to cancel. } } diff --git a/packages/dockview-core/src/dnd/droptarget.scss b/packages/dockview-core/src/dnd/droptarget.scss index de0e9e3c6..f8fd4e223 100644 --- a/packages/dockview-core/src/dnd/droptarget.scss +++ b/packages/dockview-core/src/dnd/droptarget.scss @@ -55,7 +55,7 @@ } } -// Drop Guide ("compass") — the aim-at-a-cell cross painted over a group's +// Drop Guide ("compass"): the aim-at-a-cell cross painted over a group's // content while dragging. The module positions + sizes the cells inline; only // the theming lives here (override the CSS vars to restyle). .dv-drop-guide { @@ -79,7 +79,7 @@ } .dv-drop-guide-cell-active { - // The cell the cursor is aiming at — the hover feedback, especially for the + // The cell the cursor is aiming at; the hover feedback, especially for the // outer cells (the drop target draws no overlay for them). background-color: var( --dv-drop-guide-active-cell-color, diff --git a/packages/dockview-core/src/dnd/droptarget.ts b/packages/dockview-core/src/dnd/droptarget.ts index 979f35be9..2dcce0a06 100644 --- a/packages/dockview-core/src/dnd/droptarget.ts +++ b/packages/dockview-core/src/dnd/droptarget.ts @@ -13,7 +13,7 @@ export interface DroptargetEvent { /** Narrow with `instanceof DragEvent` before reading `dataTransfer`. */ readonly nativeEvent: DragEvent | PointerEvent; /** - * The resolved cell was marked `edge` by a {@link PositionResolver} — an + * The resolved cell was marked `edge` by a {@link PositionResolver}: an * "outer" cell that should dock against the whole layout, not this target. * The target renders no overlay for it; the consumer routes the commit. */ @@ -37,7 +37,7 @@ export class WillShowOverlayEvent return !!this.options.edge; } - /** See {@link PositionResolverResult.edgeGroup}. A display hint — a consumer + /** See {@link PositionResolverResult.edgeGroup}. A display hint; a consumer * (e.g. the drop-guide compass) can bow out of this cell. */ get edgeGroup(): boolean { return !!this.options.edgeGroup; @@ -114,7 +114,7 @@ export interface PositionResolverResult { readonly edge?: boolean; /** * Display hint: this cell docks as a dedicated edge group (not a grid-edge - * split). Purely advisory — a co-installed resolver's UI (e.g. the drop-guide + * split). Purely advisory. A co-installed resolver's UI (e.g. the drop-guide * compass) can suppress its own overlay for these cells so they don't * double-render with the edge-group affordance. */ @@ -124,9 +124,9 @@ export interface PositionResolverResult { /** * Pluggable replacement for the built-in cursor-quadrant drop resolution. * Supplied via {@link DroptargetOptions.positionResolver}, it maps a pointer - * location within a target to a drop {@link Position} — or `null` for no drop — + * location within a target to a drop {@link Position} (or `null` for no drop) * instead of the default threshold-band quadrant. Both DnD backends consult the - * same resolver. Unset ⇒ the default quadrant behaviour, byte-for-byte unchanged. + * same resolver. When unset, the default quadrant behaviour applies unchanged. */ export interface PositionResolver { resolve(args: PositionResolverArgs): PositionResolverResult | null; @@ -185,7 +185,7 @@ export interface DroptargetOptions { * Supply a {@link PositionResolver} that overrides how a pointer location * resolves to a drop {@link Position}. A lazy getter (like * {@link getOverrideTarget}) so the source can change at runtime; returning - * `undefined` — the default — uses the built-in cursor-quadrant logic. + * `undefined` (the default) uses the built-in cursor-quadrant logic. */ getPositionResolver?: () => PositionResolver | undefined; } @@ -328,7 +328,7 @@ export class Droptarget extends CompositeDisposable implements IDropTarget { this.markAsUsed(e); - // An `edge` cell reports its position but renders nothing — the + // An `edge` cell reports its position but renders nothing. The // consumer (e.g. the layout-edge dock) owns the preview + commit. if (resolved.edge) { this.removeDropTarget(); @@ -547,7 +547,7 @@ export class Droptarget extends CompositeDisposable implements IDropTarget { } private removeDropTarget(): void { - // Always clear state — an `edge` cell sets state with no overlay element. + // Always clear state, since an `edge` cell sets state with no overlay element. this._state = undefined; this._edge = false; if (this.targetElement) { diff --git a/packages/dockview-core/src/dnd/pointer/longPress.ts b/packages/dockview-core/src/dnd/pointer/longPress.ts index 85ae0eeec..64394a721 100644 --- a/packages/dockview-core/src/dnd/pointer/longPress.ts +++ b/packages/dockview-core/src/dnd/pointer/longPress.ts @@ -16,8 +16,8 @@ const DEFAULT_DELAY = 500; const DEFAULT_TOLERANCE = 8; /** - * Passive — does not consume the pointer; movement past `tolerance` - * cancels silently so a sibling `PointerDragSource` can take over. + * Doesn't consume the pointer; movement past `tolerance` cancels + * silently so a sibling `PointerDragSource` can take over. */ export class LongPressDetector extends CompositeDisposable { private _pointerId: number | undefined; @@ -50,7 +50,7 @@ export class LongPressDetector extends CompositeDisposable { return; } - // Defensive — supersede any in-flight press. + // Cancel any in-flight press first. this._cancelPending(); this._pointerId = event.pointerId; @@ -60,7 +60,7 @@ export class LongPressDetector extends CompositeDisposable { const delay = this.options.delay ?? DEFAULT_DELAY; const tolerance = this.options.tolerance ?? DEFAULT_TOLERANCE; - // Source's owning window — popout drags fire on their own window. + // Source's owning window; popout drags fire on their own window. const targetWindow: Window = this.element.ownerDocument?.defaultView ?? globalThis.window; @@ -80,8 +80,8 @@ export class LongPressDetector extends CompositeDisposable { // the element the touch ended on (the source). Consumers // typically wire click to a primary action (e.g. tab activate, // tab-group chip collapse-toggle). Without this guard, the - // long-press immediately fires both the context menu AND the - // primary action — and the action's side effects (e.g. a chip + // long-press immediately fires both the context menu and the + // primary action, and the action's side effects (e.g. a chip // collapse animation) read as a screen wobble while the menu // is supposed to be open. Scoped to the source element so // clicks on menu items elsewhere remain effective. diff --git a/packages/dockview-core/src/dnd/pointer/pointerDragController.ts b/packages/dockview-core/src/dnd/pointer/pointerDragController.ts index ba608edfa..eeae5c3e9 100644 --- a/packages/dockview-core/src/dnd/pointer/pointerDragController.ts +++ b/packages/dockview-core/src/dnd/pointer/pointerDragController.ts @@ -12,13 +12,13 @@ export interface ActiveDrag { } /** - * Singleton — only one pointer-driven drag active at a time. + * Only one pointer-driven drag can be active at a time. * * State is shared across every Dockview instance on the page. Targets * from instance B receive hit-tests from drags originating in instance A; * that's intentional for cross-instance drops since `LocalSelectionTransfer` * is also process-wide. The corollary is that every Tabs subscriber to - * `onDragMove` fires for every pointer drag globally — each subscriber + * `onDragMove` fires for every pointer drag globally; each subscriber * hit-tests against its own DOM, so this is O(N) per pointermove where N * is the number of registered listeners across all instances. */ @@ -105,7 +105,7 @@ export class PointerDragController extends CompositeDisposable { const { pointerEvent, source } = args; - // Call `getData()` before mutating controller state — a throw + // Call `getData()` before mutating controller state. A throw // here would otherwise leave `_active` populated with no window // listeners installed, blocking every subsequent drag. const dataDisposable = args.getData(); @@ -135,7 +135,7 @@ export class PointerDragController extends CompositeDisposable { }; this._onDragStart.fire(startEvent); - // Source's owning window — popout drags fire on their own window, + // Source's owning window; popout drags fire on their own window, // not the main one. const targetWindow: Window = source.ownerDocument?.defaultView ?? globalThis.window; diff --git a/packages/dockview-core/src/dnd/pointer/pointerDragSource.ts b/packages/dockview-core/src/dnd/pointer/pointerDragSource.ts index 532bc2ef0..f74532819 100644 --- a/packages/dockview-core/src/dnd/pointer/pointerDragSource.ts +++ b/packages/dockview-core/src/dnd/pointer/pointerDragSource.ts @@ -21,7 +21,7 @@ export interface PointerDragSourceOptions { * hold for floating-group redock vs docked-group rearrange). */ touchInitiationDelay?: number | (() => number); - /** Default 8px. May be a function — see `touchInitiationDelay`. */ + /** Default 8px. May be a function; see `touchInitiationDelay`. */ pressTolerance?: number | (() => number); /** Default true: mouse defers to HTML5; pointer path handles touch / pen only. */ touchOnly?: boolean; @@ -93,8 +93,8 @@ export class PointerDragSource extends CompositeDisposable { if (this._disabled) { return false; } - // Pointer-type filter runs before isCancelled — consumer state read - // by isCancelled may not be populated for events we'll never handle. + // Pointer-type filter runs before isCancelled, because consumer state + // read by isCancelled may not be populated for events we'll never handle. if ( this._touchOnly && event.pointerType !== 'touch' && @@ -113,7 +113,7 @@ export class PointerDragSource extends CompositeDisposable { return; } - // Defensive: a fresh pointerdown supersedes any in-flight tracking. + // A fresh pointerdown supersedes any in-flight tracking. this._cancelPending(); this._pendingPointerId = event.pointerId; @@ -151,7 +151,7 @@ export class PointerDragSource extends CompositeDisposable { ? pressToleranceOpt() : pressToleranceOpt) ?? DEFAULT_PRESS_TOLERANCE; - // Source's owning window — popout drags fire on their own window. + // Source's owning window; popout drags fire on their own window. const targetWindow: Window = this.element.ownerDocument?.defaultView ?? globalThis.window; diff --git a/packages/dockview-core/src/dnd/pointer/pointerDropTarget.ts b/packages/dockview-core/src/dnd/pointer/pointerDropTarget.ts index 01c006690..13ff015c5 100644 --- a/packages/dockview-core/src/dnd/pointer/pointerDropTarget.ts +++ b/packages/dockview-core/src/dnd/pointer/pointerDropTarget.ts @@ -175,7 +175,7 @@ export class PointerDropTarget return; } - // An `edge` cell reports its position but renders nothing — the consumer + // An `edge` cell reports its position but renders nothing. The consumer // (e.g. the layout-edge dock) owns the preview + commit. if (resolved.edge) { this._removeOverlay(); diff --git a/packages/dockview-core/src/dnd/pointer/pointerGhost.ts b/packages/dockview-core/src/dnd/pointer/pointerGhost.ts index a91d70800..a7ae9d28b 100644 --- a/packages/dockview-core/src/dnd/pointer/pointerGhost.ts +++ b/packages/dockview-core/src/dnd/pointer/pointerGhost.ts @@ -10,7 +10,7 @@ export interface PointerGhostOptions { /** Default 0.8. */ opacity?: number; /** - * Source element whose `ownerDocument.body` hosts the ghost — pass for + * Source element whose `ownerDocument.body` hosts the ghost. Pass it for * popout-window drags so the ghost renders in the popout's document. */ owner?: Element; @@ -52,7 +52,7 @@ export class PointerGhost implements IDisposable { if (this._disposed) { return; } - // translate3d composites on the GPU — no layout per pointermove. + // translate3d composites on the GPU, so there's no layout on each pointermove. this.element.style.transform = `translate3d(${ clientX - this.offsetX }px, ${clientY - this.offsetY}px, 0)`; diff --git a/packages/dockview-core/src/dockview/advancedDnDService.ts b/packages/dockview-core/src/dockview/advancedDnDService.ts index ac5d848fa..1073ed0b0 100644 --- a/packages/dockview-core/src/dockview/advancedDnDService.ts +++ b/packages/dockview-core/src/dockview/advancedDnDService.ts @@ -23,12 +23,12 @@ const GROUP_DRAG_GHOST_OFFSET_Y = -10; * (the `DockviewComponent`). * * The `onWill*` emitters stay on the component so the public event shape is - * unchanged whether or not this module is registered — the service is only the + * unchanged whether or not this module is registered; the service is only the * dispatch point those fires are routed through. Engine policy (e.g. the * `disableDnd` guard) stays on the component, ahead of the dispatch. */ /** - * Owns the dispatch of the advanced drag-and-drop hooks — `onWillDragPanel`, + * Owns the dispatch of the advanced drag-and-drop hooks: `onWillDragPanel`, * `onWillDragGroup`, `onWillDrop` and `onWillShowOverlay`. * * At this stage the service is a thin dispatcher that forwards to the host's @@ -39,7 +39,7 @@ const GROUP_DRAG_GHOST_OFFSET_Y = -10; * into a separately-distributed package in a future major version without * changing the public event surface. * - * The service holds no drag state of its own — the gesture is driven by the + * The service holds no drag state of its own. The gesture is driven by the * DnD backends, and the per-group subscriptions live on the component's group * lifecycle (so groups created mid-move are not missed). */ @@ -94,7 +94,7 @@ export class AdvancedDnDService implements IAdvancedDnDService { } dispose(): void { - // no-op — see class doc: the service holds no state to tear down. + // Nothing to tear down; see the class doc (the service holds no state). } } diff --git a/packages/dockview-core/src/dockview/components/panel/content.ts b/packages/dockview-core/src/dockview/components/panel/content.ts index 810c45cfa..67a285443 100644 --- a/packages/dockview-core/src/dockview/components/panel/content.ts +++ b/packages/dockview-core/src/dockview/components/panel/content.ts @@ -75,7 +75,7 @@ export class ContentContainer // Resolve the override anchor dynamically: a group can be relocated // between roots (grid / floating / popout) after construction, and the - // popout anchor in particular lives in another window — a value + // popout anchor in particular lives in another window, so a value // captured here would mount overlays in the wrong window. const getOverrideTarget = () => group.dropTargetContainer?.model; @@ -86,7 +86,7 @@ export class ContentContainer // `dropTarget` stays the concrete `Droptarget` (not via the backend // factory) because overlayRenderContainer forwards HTML5 drag events - // through `dropTarget.dnd` — that field is not part of `IDropTarget`. + // through `dropTarget.dnd`, and that field is not part of `IDropTarget`. this.dropTarget = new Droptarget(this.element, { getOverlayOutline: () => { return accessor.options.theme?.dndPanelOverlay === 'group' diff --git a/packages/dockview-core/src/dockview/components/popupService.ts b/packages/dockview-core/src/dockview/components/popupService.ts index 0793b55a5..1881cd4f6 100644 --- a/packages/dockview-core/src/dockview/components/popupService.ts +++ b/packages/dockview-core/src/dockview/components/popupService.ts @@ -70,7 +70,7 @@ export class PopupService extends CompositeDisposable { // Outside-pointerdown dismissal is suppressed for a short grace window: // touch long-press callers (chip / tab context menus) open the popover - // while the user's finger is still pressing the source — Android Chrome + // while the user's finger is still pressing the source. Android Chrome // can dispatch a follow-up pointerdown tied to the gesture that lands // just outside the wrapper and would dismiss it before it's seen. Enter // dismisses as well (commit-and-close); resize dismisses except on diff --git a/packages/dockview-core/src/dockview/components/tab/defaultTab.scss b/packages/dockview-core/src/dockview/components/tab/defaultTab.scss index 8941c4f27..3363ab324 100644 --- a/packages/dockview-core/src/dockview/components/tab/defaultTab.scss +++ b/packages/dockview-core/src/dockview/components/tab/defaultTab.scss @@ -29,7 +29,7 @@ // Keyboard-only focus ring: :focus-visible suppresses it on mouse click, // :has(:focus-visible) keeps it when a child (e.g. the close button) is - // keyboard-focused — the descendant case the old :focus-within covered. + // keyboard-focused, the descendant case the old :focus-within covered. &:focus-visible, &:has(:focus-visible) { position: relative; diff --git a/packages/dockview-core/src/dockview/components/tab/tab.ts b/packages/dockview-core/src/dockview/components/tab/tab.ts index d4b733ee0..dc3146b8b 100644 --- a/packages/dockview-core/src/dockview/components/tab/tab.ts +++ b/packages/dockview-core/src/dockview/components/tab/tab.ts @@ -87,7 +87,7 @@ export class Tab extends CompositeDisposable { this._element.setAttribute('role', 'tab'); this._element.setAttribute('aria-selected', 'false'); // Give the tab an explicit accessible name (the panel title) so its - // WAI-ARIA name isn't computed from its subtree — otherwise it would + // WAI-ARIA name isn't computed from its subtree. Otherwise it would // swallow the close button's "Close {title}" label, and the tabpanel // (which is `aria-labelledby` this tab) would inherit that clutter. // Kept in sync with `onDidTitleChange` below. @@ -110,9 +110,9 @@ export class Tab extends CompositeDisposable { toggleClass(this.element, 'dv-inactive-tab', true); // Pinned tabs get a marker class (and, unless disabled, a compact - // icon-only class). Driven off the panel's pinned state — inert when - // nothing is pinned (i.e. when the PinnedTabs module is absent) — and - // re-applied here because a reorder recreates the Tab. + // icon-only class). Driven off the panel's pinned state, and inert when + // nothing is pinned (i.e. when the PinnedTabs module is absent). + // Re-applied here because a reorder recreates the Tab. this._updatePinnedClasses(); const canDisplayOverlay = ( @@ -295,7 +295,7 @@ export class Tab extends CompositeDisposable { toggleClass(this.element, 'dv-tab--pinned', pinned); toggleClass(this.element, 'dv-tab--pinned-compact', compact); - // A real inline pin glyph (inherits `currentColor` via `.dv-svg`) — + // A real inline pin glyph (inherits `currentColor` via `.dv-svg`), // more robust and themeable than a CSS mask, and the only visual // identity a compact pinned tab has. Only injected for the default tab // renderer: a custom `tabComponent` owns its own markup, so we don't diff --git a/packages/dockview-core/src/dockview/components/titlebar/floatingTitleBar.ts b/packages/dockview-core/src/dockview/components/titlebar/floatingTitleBar.ts index 70f220780..b0915a327 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/floatingTitleBar.ts +++ b/packages/dockview-core/src/dockview/components/titlebar/floatingTitleBar.ts @@ -14,7 +14,7 @@ import { GroupDragSource } from './groupDragSource'; * group to redock it into the grid. The redock half is provided by the shared * {@link GroupDragSource}; the move half is owned by the overlay. * - * The bar is intentionally contentless — styling is driven entirely through + * The bar is intentionally contentless; styling is driven entirely through * the `--dv-floating-titlebar-*` theme variables. */ export class FloatingTitleBar extends CompositeDisposable { @@ -29,7 +29,7 @@ export class FloatingTitleBar extends CompositeDisposable { return this._element; } - /** The window's current anchor group — the one this bar drags/activates. */ + /** The window's current anchor group, the one this bar drags/activates. */ get group(): DockviewGroupPanel { return this._group; } diff --git a/packages/dockview-core/src/dockview/components/titlebar/groupDragSource.ts b/packages/dockview-core/src/dockview/components/titlebar/groupDragSource.ts index b21e24166..9c4b79055 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/groupDragSource.ts +++ b/packages/dockview-core/src/dockview/components/titlebar/groupDragSource.ts @@ -31,7 +31,7 @@ export interface GroupDragSourceOptions { readonly accessor: DockviewComponent; /** * The group this handle drags. Pass a function when the handle outlives the - * group it represents and can be retargeted — e.g. a floating window's + * group it represents and can be retargeted, e.g. a floating window's * dedicated title bar, whose anchor group is reassigned when the original * anchor leaves a multi-group window. A fixed reference (the tab-bar void * container, which lives inside its own group's DOM) is also accepted. @@ -217,7 +217,7 @@ export class GroupDragSource extends CompositeDisposable { return false; }, onDragStart: (event) => { - // Redock just committed — abort any in-flight overlay + // Redock just committed, so abort any in-flight overlay // move so the float stops following the finger while // the ghost takes over. this.getFloatingOverlay()?.cancelPendingDrag(); diff --git a/packages/dockview-core/src/dockview/components/titlebar/tabGroupChip.ts b/packages/dockview-core/src/dockview/components/titlebar/tabGroupChip.ts index 0915d3da0..17fff13ff 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/tabGroupChip.ts +++ b/packages/dockview-core/src/dockview/components/titlebar/tabGroupChip.ts @@ -14,7 +14,7 @@ import { LongPressDetector } from '../../../dnd/pointer/longPress'; * Visual chip for a tab group. Owns the DOM element, label, click / * context-menu interactions, and exposes a long-press gesture as a * second `onContextMenu` source. Drag-and-drop wiring lives in - * `TabGroupManager` — the manager constructs the drag sources on this + * `TabGroupManager`, which constructs the drag sources on this * chip's element so it can include tabs-list context (custom group * drag image, tab-group transfer payload). */ diff --git a/packages/dockview-core/src/dockview/components/titlebar/tabGroupIndicator.ts b/packages/dockview-core/src/dockview/components/titlebar/tabGroupIndicator.ts index c8364b9f9..f23ea7c91 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/tabGroupIndicator.ts +++ b/packages/dockview-core/src/dockview/components/titlebar/tabGroupIndicator.ts @@ -23,8 +23,8 @@ export const TAB_GROUP_CHIP_CONTINUATION_CLASS = const CONTINUATION_PIP_SIZE = 8; /** - * A maximal run of a group's tabs on one wrapped line — a row (horizontal - * header) or a column (vertical header) — in container-relative coordinates. + * A maximal run of a group's tabs on one wrapped line (a row for a horizontal + * header, a column for a vertical header), in container-relative coordinates. */ interface WrappedRun { top: number; @@ -213,7 +213,7 @@ abstract class BaseTabGroupIndicator implements ITabGroupIndicator { // Multi-line wrap (`MultiRowTabsModule`): a group's tabs can span // multiple rows (horizontal header) or columns (vertical header), which // the single-bar model below can't represent. Draw a per-line segment - // instead — rows bucketed by top, columns bucketed by left. + // instead: rows bucketed by top, columns bucketed by left. const wrapped = this._ctx.tabsList.classList.contains( OVERFLOW_WRAP_TABS_CLASS ); @@ -384,10 +384,10 @@ abstract class BaseTabGroupIndicator implements ITabGroupIndicator { * Position a group's underline across a multi-line (wrapped) tab strip. The * single-bar model can't span lines, so the element is sized to cover the * group's line span and an SVG draws one straight segment per line-run of - * the group's tabs — a horizontal segment per row (horizontal header) or a + * the group's tabs: a horizontal segment per row (horizontal header) or a * vertical segment per column (vertical header). Tabs are bucketed into * runs by their cross-axis offset: `top` for rows, `left` for columns. - * (The active-tab wrap-around bump is omitted in wrap — the per-line lines + * (The active-tab wrap-around bump is omitted in wrap; the per-line lines * still convey membership.) */ private _positionWrappedUnderline( @@ -483,7 +483,7 @@ abstract class BaseTabGroupIndicator implements ITabGroupIndicator { /** * Bucket a group's visible tabs into line-runs by their cross-axis offset * (rows by `top`, columns by `left`), with a 2px sub-pixel tolerance. - * `firstRun` is the run holding the group's first tab (the chip's line) — + * `firstRun` is the run holding the group's first tab (the chip's line), * tracked by reference so it is correct regardless of axis or header side (a * `vertical-rl` first column is right-most, not left-most). */ @@ -817,8 +817,8 @@ export class WrapTabGroupIndicator extends BaseTabGroupIndicator { } /** - * Flat continuous bar indicator — no wrap-around, just a colored line - * spanning the full tab group width. + * Flat continuous bar indicator: a plain colored line spanning the full tab + * group width, with no wrap-around. */ export class NoneTabGroupIndicator extends BaseTabGroupIndicator { protected applyShape( diff --git a/packages/dockview-core/src/dockview/components/titlebar/tabGroups.ts b/packages/dockview-core/src/dockview/components/titlebar/tabGroups.ts index 2015d798e..1f662af7c 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/tabGroups.ts +++ b/packages/dockview-core/src/dockview/components/titlebar/tabGroups.ts @@ -287,11 +287,11 @@ export class TabGroupManager { /** * Synchronously dispose the chip drag sources for an in-flight chip * drag. Called from `_commitGroupMove` so the transfer payload + - * iframe shield are released BEFORE the cross-group move detaches + * iframe shield are released before the cross-group move detaches * the chip (chip dispose is scheduled on a microtask via * `_scheduleTabGroupUpdate`, which is too late for callers that read - * `getPanelData()` synchronously after the move). Idempotent — the - * subsequent `update()` will also dispose the sources. + * `getPanelData()` synchronously after the move). This is idempotent; + * the subsequent `update()` will also dispose the sources. */ disposeChipDrag(tabGroupId: string): void { const entry = this._chipRenderers.get(tabGroupId); @@ -414,8 +414,8 @@ export class TabGroupManager { isCancelled: () => !resolveDndCapabilities(this._ctx.accessor.options).html5, onDragStart: (event) => { - // Type guard via `dataTransfer` — `instanceof DragEvent` - // would throw in jsdom which doesn't ship a DragEvent + // Type guard via `dataTransfer`; `instanceof DragEvent` + // would throw in jsdom, which doesn't ship a DragEvent // constructor. if ('dataTransfer' in event && event.dataTransfer) { this.setGroupDragImage( @@ -433,7 +433,7 @@ export class TabGroupManager { // Synchronous panelTransfer cleanup directly on the chip element. // `Html5DragSource`'s dragend defers data disposal via `setTimeout(0)` - // so drop handlers can read the payload — but a chip drag that + // so drop handlers can read the payload, but a chip drag that // ends via `moveGroupOrPanel` (no actual drop event) needs the // singleton cleared immediately, otherwise a synchronous // `getPanelData()` after the move still sees the stale chip @@ -511,7 +511,7 @@ export class TabGroupManager { // The chip sits before its group's first tab in the DOM, so it // covers the "drop before the group" position. Without a drop - // target here, dropping a tab over the chip is a dead zone — + // target here, dropping a tab over the chip is a dead zone, // particularly visible when the group is first in the tabs list // and there's no preceding tab whose right zone covers position 0. // The smooth animation path already shifts the chip's margin to diff --git a/packages/dockview-core/src/dockview/components/titlebar/tabReorderController.ts b/packages/dockview-core/src/dockview/components/titlebar/tabReorderController.ts index b4c14ec4a..d29e425f1 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/tabReorderController.ts +++ b/packages/dockview-core/src/dockview/components/titlebar/tabReorderController.ts @@ -245,7 +245,7 @@ export class TabReorderController extends CompositeDisposable { clientY: number; pointerEvent: PointerEvent; }): void { - // Smooth-mode intra-group reorder — the pointer-backend analog of the + // Smooth-mode intra-group reorder: the pointer-backend analog of the // HTML5 tabs-list `drop` commit. In smooth mode the per-tab pointer // drop target doesn't latch a drop state for the intra-group drag, so // its `onDrop` never fires; commit the reorder from the computed @@ -263,7 +263,7 @@ export class TabReorderController extends CompositeDisposable { // intra-group single-tab reorder only: `sourceIndex === -1` is a // cross-group drag (handled by the cross-group machinery), and // `sourceTabGroupId` is a group-chip drag (handled by the chip drop - // target — which does NOT null `_animState`, so committing here too + // target, which does not null `_animState`, so committing here too // would double-commit). this._animState.sourceIndex !== -1 && !this._animState.sourceTabGroupId && @@ -315,7 +315,7 @@ export class TabReorderController extends CompositeDisposable { * for a changed drag identity, initializes anim state for incoming * cross-group drags, and dispatches to the gap-following math in * `handleDragOver`. Returns true when this tabs list has taken - * ownership of the drag — HTML5 callers use this to gate + * ownership of the drag; HTML5 callers use this to gate * `event.preventDefault()`. */ processDragOver(clientX: number, clientY?: number): boolean { @@ -355,7 +355,7 @@ export class TabReorderController extends CompositeDisposable { ) { const avgWidth = this.getAverageTabWidth(); if (data.tabGroupId) { - // External group drag — look up the source group to + // External group drag: look up the source group to // size the gap. const sourceGroup = this.accessor.getPanel(data.groupId); const sourceTg = sourceGroup?.model @@ -405,7 +405,7 @@ export class TabReorderController extends CompositeDisposable { } // For intra-group drag (sourceIndex >= 0) the gap animation is the - // sole visual indicator — clear any stale anchor overlay that may + // sole visual indicator, so clear any stale anchor overlay that may // have been set while the cursor was over the panel content area or // another zone. External drags (sourceIndex === -1) leave the // overlay to the individual tab Droptargets so cross-group @@ -431,7 +431,7 @@ export class TabReorderController extends CompositeDisposable { return; } // Moving into the broader drop zone (e.g. void container, left - // actions) — keep anim state alive so external listeners can + // actions): keep anim state alive so external listeners can // continue the gap animation. if (related && this._extendedDropZone?.contains(related)) { this.resetTabTransforms(); @@ -465,8 +465,8 @@ export class TabReorderController extends CompositeDisposable { // Multi-row wrap: the 1-D x-accumulation below assumes a single row. // In wrap use a 2-D hit-test (row by y, slot by x within the row) and // a discrete drop indicator instead of the gap animation. Group-chip - // drags are excluded — they carry group-move semantics ("can't drop - // inside another group") the single-tab hit-test doesn't model, and + // drags are excluded because they carry group-move semantics ("can't + // drop inside another group") the single-tab hit-test doesn't model, and // chips don't wrap in v1, so they keep the 1-D path (whose gap animation // no-ops in wrap anyway). if (this._wrapMode && !this._animState.sourceTabGroupId) { @@ -520,7 +520,7 @@ export class TabReorderController extends CompositeDisposable { const chipWidth = this._animState.chipPositions.get(groupId) ?? 0; if (accWidth + chipWidth > availableSpace) { - // Chip alone overflows — gap goes before this group + // Chip alone overflows, so the gap goes before this group insertionIndex ??= i; break; } @@ -621,7 +621,7 @@ export class TabReorderController extends CompositeDisposable { // Snap the insertion index to just before or just // after this group based on cursor position relative // to the group's midpoint. Only applies when the - // insertion would land *inside* the group — for + // insertion would land *inside* the group. For // `isJustBeforeGroup`, the index is already outside // (immediately left of the group) and is a valid // drop position, so leave it untouched (issue #1264). @@ -636,7 +636,7 @@ export class TabReorderController extends CompositeDisposable { } if (isGroupDrag && isJustBeforeGroup) { - // Cursor is just before the group — accept this + // Cursor is just before the group, so accept this // index as-is. Groups can be dropped at the slot // immediately left of another group's first tab. break; @@ -646,7 +646,7 @@ export class TabReorderController extends CompositeDisposable { // Check whether only the source tab (or source group // tabs) sits between insertionIndex and firstIdx. // If so, the source is being dragged away from that - // slot, so we ARE effectively "just before" the group + // slot, so we are effectively "just before" the group // and should still allow dropping into position 0. let allInBetweenAreSource = true; for (let j = insertionIndex; j < firstIdx; j++) { @@ -712,14 +712,14 @@ export class TabReorderController extends CompositeDisposable { /** * Multi-row wrap drag-over: resolve the 2-D insertion slot and show a * discrete drop indicator. No gap/FLIP animation (that's 1-D and fights the - * flow layout — `applyDragOverTransforms`/`runFlipAnimation` no-op in wrap). + * flow layout, so `applyDragOverTransforms`/`runFlipAnimation` no-op in wrap). */ private handleWrappedDragOver(clientX: number, clientY: number): void { if (!this._animState) { return; } const index = this.computeWrappedInsertionIndex(clientX, clientY); - // targetTabGroupId stays null — wrap reorder is single-tab within the + // targetTabGroupId stays null: wrap reorder is single-tab within the // group; group-chip drops keep the 1-D path (chips don't wrap in v1). if ( index === this._animState.currentInsertionIndex && @@ -772,7 +772,7 @@ export class TabReorderController extends CompositeDisposable { // Pick the line whose cross span contains the pointer; if the pointer is // in an inter-line gap (or before/after all lines), pick the nearest - // line — NOT a blanket clamp to the last line. + // line, not a blanket clamp to the last line. const line = lines.find( (l) => crossPointer >= l.start && crossPointer <= l.end @@ -931,7 +931,7 @@ export class TabReorderController extends CompositeDisposable { applyDragOverTransforms(skipTransition = false): void { // The gap animation is 1-D (single-row margin shifting) and fights the - // wrap flow layout — wrap uses a discrete drop indicator instead. + // wrap flow layout, so wrap uses a discrete drop indicator instead. if (this._wrapMode) { return; } @@ -944,7 +944,8 @@ export class TabReorderController extends CompositeDisposable { } // Don't apply transforms until the source tab has been collapsed - // in the rAF callback — otherwise the gap + visible source = jump. + // in the rAF callback; otherwise the gap and the still-visible source + // produce a jump. if (this._pendingCollapse) { return; } @@ -969,8 +970,8 @@ export class TabReorderController extends CompositeDisposable { // the chip so the gap appears before the entire group. // // Two cases: - // 1. targetTabGroupId is null (standalone drop) — always shift chip. - // 2. targetTabGroupId is set AND the group is collapsed — shift chip + // 1. targetTabGroupId is null (standalone drop): always shift the chip. + // 2. targetTabGroupId is set and the group is collapsed: shift the chip // because the collapsed tabs are invisible, so putting the gap on // them has no visual effect. let chipToShift: HTMLElement | null = null; @@ -978,7 +979,7 @@ export class TabReorderController extends CompositeDisposable { const tabGroups = this.group.model.getTabGroups(); for (const tg of tabGroups) { if (tg.id === this._animState.sourceTabGroupId) continue; - // Skip the group that the dragged tab belongs to — the + // Skip the group that the dragged tab belongs to: the // gap should appear after the chip (where the tab was), // not before it. if (tg.panelIds.includes(this._animState.sourceTabId)) continue; @@ -1178,7 +1179,7 @@ export class TabReorderController extends CompositeDisposable { // Clear any inline gap margin / shifting class applied to // destination tabs during dragover. Cross-group moves don't // run the FLIP path, and `moveGroupOrPanel` only inserts new - // panels — it doesn't recreate existing destination tabs, so + // panels; it doesn't recreate existing destination tabs, so // their inline `margin-left` would otherwise persist as a // visible gap (issue #1243). this.resetTabTransforms(); @@ -1228,7 +1229,7 @@ export class TabReorderController extends CompositeDisposable { // After a drop, `tab.onDrop` consumes _animState (sets it to null) // and immediately calls `runFlipAnimation`, which sets transforms // and queues an rAF to trigger the CSS transition. dragend fires - // synchronously on the source element BEFORE that rAF runs — if + // synchronously on the source element before that rAF runs; if // we cleared transforms here we'd clobber the in-flight FLIP, so // gate the cleanup on _animState still being set (i.e. drag was // cancelled rather than dropped). diff --git a/packages/dockview-core/src/dockview/components/titlebar/tabs.scss b/packages/dockview-core/src/dockview/components/titlebar/tabs.scss index f22430bd1..95fef9337 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/tabs.scss +++ b/packages/dockview-core/src/dockview/components/titlebar/tabs.scss @@ -67,13 +67,13 @@ } /** - * Multi-column (wrapping) tabs for a VERTICAL (edge-group) header — the + * Multi-column (wrapping) tabs for a vertical (edge-group) header: the * mirror of the horizontal rule above with the axes swapped. The main axis * is vertical (bounded by the header height, so overflowing tabs wrap) and * the cross axis is horizontal (grows into additional columns). The header * grows in width via the `:has()` rule in tabsContainer.scss. * - * NOTE: column flow direction under `writing-mode: vertical-rl` differs + * Column flow direction under `writing-mode: vertical-rl` differs * between left and right header positions; this needs visual verification * in a real browser (jsdom lays out neither writing-mode nor flex-wrap). */ @@ -97,8 +97,8 @@ // (rotated) title length, so a column fits only a few tabs and a tiny // per-tab height difference flips how many fit, ragged-ing the grid into // a staircase (see the variable's doc in options.ts). One shared height - // makes every column hold the same count, so the columns line up — the - // mirror of the horizontal rule pinning tabs to the fixed row height. + // makes every column hold the same count, so the columns line up, + // mirroring the horizontal rule that pins tabs to the fixed row height. // Falls back to auto (natural per-tab height) when the module hasn't set // the variable, so core-only wrap is unchanged. .dv-tab { @@ -292,7 +292,7 @@ } } -// Pinned tabs (PinnedTabs module). Presentation only — the classes are inert +// Pinned tabs (PinnedTabs module). Presentation only: the classes are inert // unless a panel is pinned (nothing pins panels without the module), so this is // a no-op for the default free layout. `--pinned` marks a pinned tab and shows // a leading pin glyph (a real inline SVG injected by the tab, `.dv-tab-pin`); @@ -313,7 +313,7 @@ flex-shrink: 0; margin-right: 4px; opacity: 0.7; - // Decorative indicator — clicks/drags belong to the tab beneath it. + // Decorative indicator; clicks/drags belong to the tab beneath it. pointer-events: none; .dv-svg { @@ -327,7 +327,7 @@ min-width: 0; } - // Pinned tabs have no close button (Chrome / VS-Code style) — pinning + // Pinned tabs have no close button (Chrome / VS-Code style); pinning // protects the tab from an accidental close. Close via the context menu or // the keyboard, or unpin first. .dv-default-tab-action { @@ -355,7 +355,7 @@ // slide underneath. Inert unless the class is present (nothing sets it without // the module), so the default layout is unchanged. Tabs already carry an opaque // active/inactive background, so scrolling tabs don't show through. Scoped to -// the horizontal, non-wrapping strip — sticky-left has no meaning in a vertical +// the horizontal, non-wrapping strip; sticky-left has no meaning in a vertical // header or a wrapped (no horizontal scroll) layout. .dv-tabs-container:not(.dv-tabs-container--wrap):not( .dv-tabs-container-vertical diff --git a/packages/dockview-core/src/dockview/components/titlebar/tabs.ts b/packages/dockview-core/src/dockview/components/titlebar/tabs.ts index 60a9d6665..07a884693 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/tabs.ts +++ b/packages/dockview-core/src/dockview/components/titlebar/tabs.ts @@ -48,32 +48,32 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { private _showTabsOverflowControl = false; /** * Predicate that keeps a panel's tab out of the overflow dropdown - * regardless of visibility — wired by the PinnedTabs module so pinned tabs + * regardless of visibility. Wired by the PinnedTabs module so pinned tabs * never overflow. Defaults to a no-op so behaviour is unchanged when the - * module is absent. Must stay a pure lookup (no DOM reads) — it runs inside - * the overflow filter, which the `OverflowObserver` re-fires on every + * module is absent. Must stay a pure lookup (no DOM reads) because it runs + * inside the overflow filter, which the `OverflowObserver` re-fires on every * resize. */ private _overflowExclude: (panelId: string) => boolean = () => false; /** - * Predicate that forces a panel's tab INTO the overflow dropdown regardless - * of horizontal fit — the complement of {@link _overflowExclude}. Wired by + * Predicate that forces a panel's tab into the overflow dropdown regardless + * of horizontal fit, the complement of {@link _overflowExclude}. Wired by * the MultiRowTabs module: in wrap mode tabs never clip horizontally (they * wrap), so the `OverflowObserver` detects nothing; this routes the surplus * rows beyond `overflow.maxRows` into the dropdown. Defaults to a no-op so * behaviour is unchanged when the module is absent. Must stay a pure lookup - * (no DOM reads) — it runs inside the overflow filter. + * (no DOM reads) because it runs inside the overflow filter. */ private _forcedOverflow: (panelId: string) => boolean = () => false; /** * When true, pinned (overflow-excluded) tabs stick to the left edge as the - * strip scrolls horizontally (Chrome-style frozen columns) — wired by the + * strip scrolls horizontally (Chrome-style frozen columns), wired by the * PinnedTabs module in inline mode. Each pinned tab is given a cumulative * `--dv-pinned-sticky-left` offset. Defaults to off so behaviour is * unchanged when the module is absent. */ private _pinnedSticky = false; - /** Whether any tab currently carries the sticky styling — lets + /** Whether any tab currently carries the sticky styling; lets * {@link _applyPinnedSticky} bail early when there is nothing to do (the * common case for components that never enable the feature). */ private _hasPinnedStickyStyling = false; @@ -84,8 +84,8 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { private readonly _reorder: TabReorderController; // The reorder/animation state lives in the controller; these accessors - // bridge the (many) `Tabs` call sites — and the test suite, which reads - // `(tabs as any)._animState` / `_pendingCollapse` — onto it. + // bridge the (many) `Tabs` call sites (and the test suite, which reads + // `(tabs as any)._animState` / `_pendingCollapse`) onto it. private get _animState(): TabAnimationState | null { return this._reorder.animState; } @@ -159,7 +159,7 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { /** * Register a predicate that forces matching panels into the overflow - * dropdown regardless of horizontal fit (the MultiRowTabs surplus set — + * dropdown regardless of horizontal fit (the MultiRowTabs surplus set, the * rows beyond `overflow.maxRows`). Re-evaluates the dropdown immediately. * Passing `() => false` restores default behaviour. */ @@ -180,13 +180,13 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { } /** - * Enable/disable sticky-on-scroll for pinned tabs (inline mode) — wired by + * Enable/disable sticky-on-scroll for pinned tabs (inline mode), wired by * the PinnedTabs module. When on, pinned (overflow-excluded) tabs are frozen * to the left edge as the strip scrolls, each at the cumulative width of the * pinned tabs before it; when off, the sticky styling is cleared. The * offsets are scroll-invariant, so they are recomputed only on resize, * horizontal scroll (a cheap self-heal after a reorder), and pinned-set - * changes — not continuously. + * changes, not continuously. */ setPinnedSticky(enabled: boolean): void { if (this._pinnedSticky === enabled) { @@ -210,15 +210,15 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { ) : []; - // Nothing pinned and nothing was ever styled — bail before touching the - // DOM. Keeps the common (feature-off) refreshOverflow path free. + // Nothing pinned and nothing was ever styled, so bail before touching + // the DOM. Keeps the common (feature-off) refreshOverflow path free. if (pinned.length === 0 && !this._hasPinnedStickyStyling) { return; } - // Strip every existing sticky styling BEFORE measuring. `offsetLeft` on + // Strip every existing sticky styling before measuring. `offsetLeft` on // a tab that still carries `position: sticky` reports its *stuck* - // (frozen/scrolled) position, not its natural in-flow left — so reading + // (frozen/scrolled) position, not its natural in-flow left, so reading // it here and feeding it back into `--dv-pinned-sticky-left` makes the // offset compound on each recompute and the pinned block drifts to the // right edge (it ends up rendering last instead of first). Removing the @@ -241,7 +241,7 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { // read flushes the class removals above, so all reads are unstuck. // `offsetLeft` (relative to the positioned `.dv-tabs-container`) is each // tab's in-flow left *including* the preceding tabs' margins, so the - // frozen block keeps the theme's tab spacing — a bare width sum would + // frozen block keeps the theme's tab spacing; a bare width sum would // collapse the gaps in spaced themes. const lefts = pinned.map((tab) => tab.value.element.offsetLeft); pinned.forEach((tab, index) => { @@ -303,7 +303,7 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { } /** - * The scrollable tab list (`.dv-tabs-container`) holding the tab elements — + * The scrollable tab list (`.dv-tabs-container`) holding the tab elements, * exposed (read-only) so the multi-row wrap controller can measure the * wrapped row count and toggle the wrap class. Not the outer header element. */ @@ -453,7 +453,7 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { onChipDragEnd: () => { // HTML5 chip dragend (incl. cancels). The Html5DragSource // owns the listener on the chip element, so this fires - // even if the chip was detached cross-group — the + // even if the chip was detached cross-group; the // element keeps its listeners until the source is // disposed. resetDragAnimation is a no-op after a // successful drop (anim state already null) thanks to @@ -501,8 +501,8 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { }), // Trackpad / wheel forwarding. The strip scrolls along its own // axis (x for horizontal headers, y for vertical), so deltaY - // from a plain mouse wheel maps onto the strip's axis too — - // this gives the VS Code-style "scroll over tab bar to page + // from a plain mouse wheel maps onto the strip's axis too, + // giving the VS Code-style "scroll over tab bar to page // through tabs" feel. We only consume the event when the strip // is actually overflowing in the direction the user wheeled in, // so a wheel at the edge of a non-overflowing strip still @@ -697,7 +697,7 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { return this._tabs.findIndex((tab) => tab.value.panel.id === id); } - /** DOM id of the tab element for a panel — for the tabpanel's `aria-labelledby`. */ + /** DOM id of the tab element for a panel, used for the tabpanel's `aria-labelledby`. */ getTabId(panelId: string): string | undefined { return this._tabMap.get(panelId)?.value.element.id; } @@ -721,7 +721,7 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { } private _onKeyDown(event: KeyboardEvent): void { - // Only handle when a tab element itself is focused — never hijack keys + // Only handle when a tab element itself is focused; never hijack keys // typed inside a custom tab renderer's own controls (inputs etc.). const index = this._tabs.findIndex( (tab) => tab.value.element === event.target @@ -805,7 +805,7 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { this._tabs[index].value.element.focus(); } - /** Move DOM focus to the active tab — the entry point into the tablist. */ + /** Move DOM focus to the active tab, the entry point into the tablist. */ focusActiveTab(): void { if (this._tabs.length === 0) { return; @@ -910,11 +910,11 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { // Collapse the source tab after the browser captures the // drag image, then open the gap at the source position in - // the same paint frame — no visual jump. + // the same paint frame, so there's no visual jump. // Both collapse and gap must be instant (no transition). // In wrap mode there is no gap (the 1-D transforms no-op), // and collapsing the source would reflow the wrapped rows - // mid-drag under the 2-D hit-test — so skip the collapse and + // mid-drag under the 2-D hit-test, so skip the collapse and // leave the source in place. this._pendingCollapse = true; requestAnimationFrame(() => { @@ -1109,7 +1109,7 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { this.addTab(value, index); // A new tab may have been inserted between a chip and its - // group's first tab — reposition all chips to stay correct. + // group's first tab, so reposition all chips to stay correct. this._tabGroupManager.positionAllChips(); // If a tab was added during active drag, refresh positions @@ -1215,7 +1215,7 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { // entirely. The exception is when the pinned block *itself* overflows: // a pinned tab that is laid out (has width) yet clipped is unreachable // in the strip, so it is surfaced in a "Pinned" section at the top of - // the dropdown. A zero-width tab is not clipped-but-hidden — it is a + // the dropdown. A zero-width tab is not clipped-but-hidden; it is a // pinned tab whose main-strip copy is display:none (separate-row mode, // where the row already provides access), so it is skipped. const pinnedTabs = options.reset @@ -1257,10 +1257,10 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { // For collapsed groups whose chip is clipped, ensure all // member tabs are included in the overflow list so they appear - // in the dropdown. Pinned members are NOT excluded here: a + // in the dropdown. Pinned members are not excluded here: a // collapsed group's members aren't rendered as visible tabs, so - // the dropdown is their only reachable path — excluding a pinned - // one would make it unreachable. + // the dropdown is their only reachable path, and excluding a + // pinned one would make it unreachable. if (tg.collapsed) { for (const pid of tg.panelIds) { if (!overflowTabSet.has(pid)) { @@ -1347,7 +1347,7 @@ export class Tabs extends CompositeDisposable implements ITabReorderHost { } // Collapse group tabs + chip after the browser captures the drag - // image, then open the gap at the source position — all instant + // image, then open the gap at the source position, all instant // (no transitions). const groupPanelIds = new Set(tabGroup.panelIds); this._pendingCollapse = true; diff --git a/packages/dockview-core/src/dockview/components/titlebar/tabsContainer.scss b/packages/dockview-core/src/dockview/components/titlebar/tabsContainer.scss index a8cdbd20b..55cb34d97 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/tabsContainer.scss +++ b/packages/dockview-core/src/dockview/components/titlebar/tabsContainer.scss @@ -9,15 +9,15 @@ /** * Multi-row (wrapping) tabs: when the tab list wraps onto multiple rows * (`.dv-tabs-container--wrap`, toggled by the `MultiRowTabsModule`), the - * header grows to fit instead of clipping. Inert otherwise — the single-row + * header grows to fit instead of clipping. Inert otherwise: the single-row * fixed height above is unchanged. */ &:has(.dv-tabs-container--wrap) { height: auto; min-height: var(--dv-tabs-and-actions-container-height); // Keep the header chrome (prefix / left / right actions, drag void) on - // the first row instead of stretching + centering across the full - // multi-row height — only the tab list grows downward. + // the first row instead of stretching and centering across the full + // multi-row height; only the tab list grows downward. align-items: flex-start; > .dv-pre-actions-container, diff --git a/packages/dockview-core/src/dockview/components/titlebar/tabsContainer.ts b/packages/dockview-core/src/dockview/components/titlebar/tabsContainer.ts index b4ced69cd..adbcdcc96 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/tabsContainer.ts +++ b/packages/dockview-core/src/dockview/components/titlebar/tabsContainer.ts @@ -104,7 +104,7 @@ export class TabsContainer private _hidden = false; private _direction: DockviewHeaderDirection = 'horizontal'; /** - * Clamps/redirects a header drop index — wired by the PinnedTabs module to + * Clamps/redirects a header drop index, wired by the PinnedTabs module to * keep drops on the correct side of the pin boundary. Identity by default * so behaviour is unchanged when the module is absent. */ @@ -119,7 +119,7 @@ export class TabsContainer private dropdownPart: DropdownElement | null = null; private _overflowTabs: string[] = []; private _overflowTabGroups: string[] = []; - /** Pinned tabs that have clipped out of the strip — rendered in a "Pinned" + /** Pinned tabs that have clipped out of the strip, rendered in a "Pinned" * section at the top of the dropdown. Empty unless the PinnedTabs module is * active and the pinned block itself overflows. */ private _overflowPinnedTabs: string[] = []; @@ -291,7 +291,7 @@ export class TabsContainer const related = event.relatedTarget as HTMLElement | null; if (!this.voidContainer.element.contains(related)) { if (this._element.contains(related)) { - // Moved to another part of the header — keep state + // Moved to another part of the header, so keep state this.tabs.setExternalInsertionIndex(null); } else { // Left the header entirely @@ -542,9 +542,9 @@ export class TabsContainer const context = this.createOverflowRenderContext(root, anchor); // When the AdvancedOverflowModule is registered it upgrades the - // dropdown in place (search + MRU + keyboard), building AND + // dropdown in place (search + MRU + keyboard), building and // opening the popover itself. Absent (the free path), core - // renders the flat list and opens it — byte-identical to before. + // renders the flat list and opens it, byte-identical to before. const advancedOverflow = this.accessor.advancedOverflowService; if (advancedOverflow) { advancedOverflow.renderOverflow({ @@ -566,7 +566,7 @@ export class TabsContainer * overflow list and the advanced overflow module. Everything the module * needs to rebuild the dropdown body in a custom order lives here, so the * row DOM, group-header DOM, click-to-activate, and (critically) the - * window-bound popover open/close stay in core — the module never captures + * window-bound popover open/close stay in core, so the module never captures * the wrong `window` for a popped-out group. */ private createOverflowRenderContext( @@ -686,7 +686,7 @@ export class TabsContainer tg.expand(); } // `block: 'nearest'` keeps this from scrolling ancestor - // scroll containers (incl. the page) vertically — a bare + // scroll containers (incl. the page) vertically; a bare // scrollIntoView() defaults to `block: 'start'`, which // yanks the whole dockview up when it sits low in a // scrollable page. We only want to reveal the tab @@ -748,7 +748,7 @@ export class TabsContainer // dedicated "Pinned" header, so an overflowing pinned block stays // reachable ahead of the regular overflow rows. Build the rows first and // only add the header if at least one survived (a panel can close - // between the overflow event and this click) — no orphan header. + // between the overflow event and this click), avoiding an orphan header. const pinnedRows = this._overflowPinnedTabs .map((panelId) => context.buildRow(panelId)) .filter((row): row is NonNullable => row != null); diff --git a/packages/dockview-core/src/dockview/components/titlebar/voidContainer.ts b/packages/dockview-core/src/dockview/components/titlebar/voidContainer.ts index dcc1d83d8..1890367b7 100644 --- a/packages/dockview-core/src/dockview/components/titlebar/voidContainer.ts +++ b/packages/dockview-core/src/dockview/components/titlebar/voidContainer.ts @@ -49,8 +49,8 @@ export class VoidContainer extends CompositeDisposable { // Shift+pointerdown marks the event so the group's overlay // drag (move-by-floating) sees it was consumed and doesn't // fire alongside the HTML5 drag. quasiPreventDefault sets the - // marker without calling preventDefault — that would also - // block dragstart, which we need to fire. + // marker without calling preventDefault; preventDefault would + // also block dragstart, which we need to fire. addDisposableListener( this._element, 'pointerdown', diff --git a/packages/dockview-core/src/dockview/deserializer.ts b/packages/dockview-core/src/dockview/deserializer.ts index b6cf6cda5..6e86f4b9a 100644 --- a/packages/dockview-core/src/dockview/deserializer.ts +++ b/packages/dockview-core/src/dockview/deserializer.ts @@ -69,10 +69,10 @@ export class DefaultDockviewDeserialzier implements IPanelDeserializer { params: params ?? {}, }); - // Only honour the serialized pinned flag when pinning is enabled — - // otherwise a layout saved with pinning would restore a pinned tab + // Only honour the serialized pinned flag when pinning is enabled. + // Otherwise a layout saved with pinning would restore a pinned tab // (glyph, hidden close, no unpin path) into a component that can't - // interact with it. Disabled → the `pinned` key is ignored (unpinned). + // interact with it. When disabled the `pinned` key is ignored (unpinned). if (panelData.pinned && this.accessor.options.pinnedTabs?.enabled) { panel.setPinned(true); } diff --git a/packages/dockview-core/src/dockview/dndCapabilities.ts b/packages/dockview-core/src/dockview/dndCapabilities.ts index 06bc17e62..1224a17a3 100644 --- a/packages/dockview-core/src/dockview/dndCapabilities.ts +++ b/packages/dockview-core/src/dockview/dndCapabilities.ts @@ -3,7 +3,7 @@ import { DockviewOptions } from './options'; /** * Internal mapping of the user-facing `dndStrategy` option into the * per-backend capability flags consumed by drag-source / drop-target - * construction sites. Not part of the public API — consumers only see + * construction sites. Not part of the public API; consumers only see * the `dndStrategy` option itself. */ export interface DndCapabilities { @@ -34,11 +34,11 @@ export function resolveDndCapabilities( default: // On touch-primary devices (phones / basic tablets) HTML5 DnD's // native long-press intercepts the gesture before our pointer - // backend can react — Android Chrome launches a system drag with + // backend can react. Android Chrome launches a system drag with // its half-transparent thumbnail, and the long-press context menu // never opens. Disable HTML5 there so the pointer backend owns // every gesture. Hybrid devices (touchscreen laptops, Surface, - // iPad with mouse) keep both backends — mouse uses HTML5, touch + // iPad with mouse) keep both backends: mouse uses HTML5, touch // falls back to whichever backend the underlying element wired. return isCoarsePrimaryInput() ? { html5: false, pointer: true, pointerHandlesMouse: true } diff --git a/packages/dockview-core/src/dockview/dockviewComponent.scss b/packages/dockview-core/src/dockview/dockviewComponent.scss index 9d7c0998b..dd3194ef2 100644 --- a/packages/dockview-core/src/dockview/dockviewComponent.scss +++ b/packages/dockview-core/src/dockview/dockviewComponent.scss @@ -71,8 +71,8 @@ } } -// Visible on-screen hint shown while a keyboard-docking move (Ctrl+M) is armed -// — mirrors the screen-reader narration so sighted keyboard users get the same +// Visible on-screen hint shown while a keyboard-docking move (Ctrl+M) is armed. +// Mirrors the screen-reader narration so sighted keyboard users get the same // "arrows / Enter / Escape" guidance. Purely visual (the element is // aria-hidden; the LiveRegion speaks the same text). Restyle or hide via this // class. diff --git a/packages/dockview-core/src/dockview/dockviewComponent.ts b/packages/dockview-core/src/dockview/dockviewComponent.ts index 1dc569723..03c0c5868 100644 --- a/packages/dockview-core/src/dockview/dockviewComponent.ts +++ b/packages/dockview-core/src/dockview/dockviewComponent.ts @@ -283,7 +283,7 @@ export interface FloatingGroupOptions { */ dragHandle?: 'titlebar' | 'tabbar'; /** - * Exclude this floating group from Smart Guides — it never snaps and shows + * Exclude this floating group from Smart Guides so it never snaps and shows * no guides when dragged (e.g. a pinned HUD). See * {@link DockviewOptions.smartGuides}. */ @@ -493,20 +493,20 @@ export interface IDockviewComponent extends IBaseGrid { readonly onDidSnapTogether: Event; } -/** A never-firing history-change event — the fallback `onDidChangeHistory` +/** A never-firing history-change event, the fallback `onDidChangeHistory` * returns when the LayoutHistory module is absent, so the api event is always * valid and subscribable. */ const NO_LAYOUT_HISTORY_CHANGES: Event = () => ({ dispose: () => { - // noop — nothing ever fires + // noop, nothing ever fires }, }); -/** A never-firing event — the fallback the Smart Guides snap events return when +/** A never-firing event, the fallback the Smart Guides snap events return when * the module is absent, so the api events are always subscribable. */ const NO_EVENT: Event = () => ({ dispose: () => { - // noop — nothing ever fires + // noop, nothing ever fires }, }); @@ -612,7 +612,7 @@ export class DockviewComponent this._onDidRemovePopoutGroup.event; private readonly _onDidChangePopouts = new Emitter(); - /** Fires whenever a popout window opens or closes — i.e. the set of popout + /** Fires whenever a popout window opens or closes, i.e. the set of popout * documents changed. Used by accessibility services that mirror per-window * state (e.g. a live region in each popout). */ readonly onDidChangePopouts: Event = this._onDidChangePopouts.event; @@ -623,8 +623,8 @@ export class DockviewComponent private readonly _onDidStartFloatingGroupDrag = new Emitter(); - /** Fires with the dragged group when a floating group move-drag first moves - * — consumed by the Smart Guides service (`ISmartGuidesHost`) to start each + /** Fires with the dragged group when a floating group move-drag first moves. + * Consumed by the Smart Guides service (`ISmartGuidesHost`) to start each * drag from a clean slate (a redock long-press aborts with no end event). */ readonly onDidStartFloatingGroupDrag: Event = this._onDidStartFloatingGroupDrag.event; @@ -632,7 +632,7 @@ export class DockviewComponent private readonly _onDidEndFloatingGroupDrag = new Emitter(); /** Fires with the dragged group when a floating group's move/resize drag - * ends — consumed by the Smart Guides service (`ISmartGuidesHost`) to tear + * ends. Consumed by the Smart Guides service (`ISmartGuidesHost`) to tear * down its per-drag guides. */ readonly onDidEndFloatingGroupDrag: Event = this._onDidEndFloatingGroupDrag.event; @@ -804,14 +804,14 @@ export class DockviewComponent } /** - * ISmartGuidesHost — the positioning parent floats are placed in, also the + * ISmartGuidesHost: the positioning parent floats are placed in, also the * coordinate space the Smart Guides overlay draws its alignment lines in. */ getFloatingContainer(): HTMLElement { return this._floatingOverlayHost ?? this.gridview.element; } - /** ISmartGuidesHost — the other floats' group identity + container-relative + /** ISmartGuidesHost: the other floats' group identity + container-relative * box, for the snap-together detector. */ getFloatingGroupSnapshots( exclude: DockviewGroupPanel @@ -834,7 +834,7 @@ export class DockviewComponent }); } - /** ISmartGuidesHost — dock/merge a dragged float into a target group via the + /** ISmartGuidesHost: dock/merge a dragged float into a target group via the * existing move primitive (so events + undo cover it). */ mergeFloatInto( dragged: DockviewGroupPanel, @@ -853,7 +853,7 @@ export class DockviewComponent }); } - /** ISmartGuidesHost — the main grid's splitter (sash) rectangles, in the + /** ISmartGuidesHost: the main grid's splitter (sash) rectangles, in the * floating container's coordinate space, for the optional splitter target. */ getGridSplitterRects(): Box[] { const origin = this.getFloatingContainer().getBoundingClientRect(); @@ -871,7 +871,7 @@ export class DockviewComponent } private get _smartGuidesService() { - // Optional like every module service — `?.`-guarded everywhere so the + // Optional like every module service; `?.`-guarded everywhere so the // module can be removed without crashing the float drag loop. return this._moduleRegistry.services.smartGuidesService; } @@ -906,7 +906,7 @@ export class DockviewComponent * `transformFloatingGroupDrag` option and the optional Smart Guides module, * so an app and the module can both nudge a single drag rather than one * clobbering the other. Returns `undefined` only when the app option is - * unset AND the module is absent (the removability case) — then no transform + * unset and the module is absent (the removability case); then no transform * is installed and the sibling-box snapshot is skipped, so the drag loop is * truly byte-for-byte unchanged. When the module is present but `smartGuides` * is unset it installs a cheap pass-through (the service snaps nothing and @@ -962,7 +962,7 @@ export class DockviewComponent } private get _watermarkService() { - // Tier 1 module — optional. Callers must `?.`-guard so the module + // Tier 1 module, optional. Callers must `?.`-guard so the module // can be removed from AllModules without crashing the component. return this._moduleRegistry.services.watermarkService; } @@ -972,14 +972,14 @@ export class DockviewComponent } private get _rootDropTargetService() { - // Optional like every other module service — RootDropTargetModule can be + // Optional like every other module service; RootDropTargetModule can be // removed from the registered set without crashing the component. return this._moduleRegistry.services.rootDropTargetService; } private get _advancedDnDService() { - // Optional — callers `?.`-guard so the module can be removed from - // AllModules. Absent ⇒ the onWill* hooks simply don't fire (≡ no + // Optional; callers `?.`-guard so the module can be removed from + // AllModules. When absent the onWill* hooks don't fire (≡ no // subscriber), which is invisible to apps not customising DnD. return this._moduleRegistry.services.advancedDnDService; } @@ -988,7 +988,7 @@ export class DockviewComponent return this._moduleRegistry.services.dropGuideService; } - /** IDropGuideHost — whether a content drop at `position` on `group` is + /** IDropGuideHost: whether a content drop at `position` on `group` is * allowed, for compass cell gating (only legal cells are shown). The same * predicate the content drop target uses, so the compass and the real drop * agree. */ @@ -1000,7 +1000,7 @@ export class DockviewComponent return group.model.canDisplayContentOverlay(event, position); } - /** IDropGuideHost — the frame the content drop target measures (mirrors the + /** IDropGuideHost: the frame the content drop target measures (mirrors the * `getOverlayOutline` rule in `content.ts`): the whole group when * `dndPanelOverlay === 'group'`, else just the content. The compass paints * in this frame so its cells align with where a drop resolves. */ @@ -1016,7 +1016,7 @@ export class DockviewComponent : content; } - /** IMultiRowTabsHost — the group's scrollable tab list (`.dv-tabs-container`), + /** IMultiRowTabsHost: the group's scrollable tab list (`.dv-tabs-container`), * the element the wrap controller toggles + measures. */ getTabsListElement(group: DockviewGroupPanel): HTMLElement | undefined { return group.model.header.hidden @@ -1024,13 +1024,13 @@ export class DockviewComponent : group.model.tabsListElement; } - /** IMultiRowTabsHost — re-run a group's layout so a wrapped-header height + /** IMultiRowTabsHost: re-run a group's layout so a wrapped-header height * change propagates to the content + active panel. */ relayoutGroup(group: DockviewGroupPanel): void { group.relayout(); } - /** IMultiRowTabsHost — force the wrap controller's surplus set (rows beyond + /** IMultiRowTabsHost: force the wrap controller's surplus set (rows beyond * `overflow.maxRows`) into the group's overflow dropdown. */ setForcedOverflow( group: DockviewGroupPanel, @@ -1039,14 +1039,14 @@ export class DockviewComponent group.model.header.setForcedOverflow(fn); } - /** IDropGuideHost — the layout root (`.dv-dockview`, a positioned element), + /** IDropGuideHost: the layout root (`.dv-dockview`, a positioned element), * the surface the outer-cell landing preview is drawn over. */ getLayoutElement(): HTMLElement { return this.gridview.element; } /** - * The drop-position resolver installed on the group content drop targets — + * The drop-position resolver installed on the group content drop targets: * the app's `dropPositionResolver` option if set, else the Drop Guide * module's compass resolver (undefined when the compass is disabled). Read * live by the content drop targets; undefined ⇒ default cursor-quadrant. @@ -1057,9 +1057,9 @@ export class DockviewComponent } const compass = this._dropGuideService?.resolver; const autoEdge = this._moduleRegistry.services.autoEdgeGroupService; - // With both the compass and auto edge groups on, COMPOSE them: the true + // With both the compass and auto edge groups on, compose them: the true // outer edge reveals an edge group, everything else (inner split cells, - // the compass's grid-edge outer ring) falls through to the compass — so + // the compass's grid-edge outer ring) falls through to the compass, so // a drop can target either the layout edge or an edge group. if (compass && autoEdge) { return { @@ -1111,9 +1111,9 @@ export class DockviewComponent ) { // `dockToEdgeGroups` baseline (single band): a root-edge drop reveals // an edge group instead of splitting the grid. When the two-band - // drag-reveal affordance is registered it owns edge-drop routing — + // drag-reveal affordance is registered it owns edge-drop routing: // it preempts the outer band via `onWillDrop.preventDefault` and lets - // the inner band fall through here to the default grid split — so + // the inner band fall through here to the default grid split, so // this single-band fallback is disabled. this.revealEdgeGroupWithData(position, data); return; @@ -1207,7 +1207,7 @@ export class DockviewComponent return event.isAccepted; } - // IAdvancedDnDHost — the emitters stay here so the public onWill* event + // IAdvancedDnDHost: the emitters stay here so the public onWill* event // shape is unchanged; AdvancedDnDService routes the per-group fires // through these. Engine guards (e.g. disableDnd) run on the component // ahead of the dispatch. @@ -1230,7 +1230,7 @@ export class DockviewComponent /** * Resolve the custom group drag ghost (via the AdvancedDnD module), or * `undefined` to fall back to the default chip. Returns `undefined` when - * the module is absent — the default ghost then renders. + * the module is absent, and the default ghost then renders. */ buildGroupDragGhost(group: DockviewGroupPanel): IDragGhostSpec | undefined { return this._advancedDnDService?.buildGroupDragGhost(group); @@ -1247,9 +1247,9 @@ export class DockviewComponent return this._advancedDnDService?.resolveOverlayModel(location, group); } - // IKeyboardNavigationHost — keyboard docking reaches the AdvancedDnD preview + + // IKeyboardNavigationHost: keyboard docking reaches the AdvancedDnD preview + // LiveRegion announcer through these so the service stays decoupled. - /** Outermost element — the shell (incl. edge groups) once built, else the gridview. */ + /** Outermost element: the shell (incl. edge groups) once built, else the gridview. */ get rootElement(): HTMLElement { return this._shellManager?.element ?? this.element; } @@ -1277,7 +1277,7 @@ export class DockviewComponent /** * The next / previous group in gridview (spatial) order, wrapping round. * The keyboard accessibility module's focus navigation is built on this - * primitive — the only piece that needs the grid internals; the rest of + * primitive, the only piece that needs the grid internals; the rest of * the navigation logic lives in the KeyboardNavigationService. */ adjacentGroup( @@ -1379,19 +1379,19 @@ export class DockviewComponent } get contextMenuService(): IContextMenuService | undefined { - // Owned by ContextMenuModule — undefined when the module is not + // Owned by ContextMenuModule; undefined when the module is not // registered, so callers must `?.`-guard. return this._moduleRegistry.services.contextMenuService; } get pinnedTabsService(): IPinnedTabsService | undefined { - // Owned by PinnedTabsModule — undefined when the module is not + // Owned by PinnedTabsModule; undefined when the module is not // registered, so callers must `?.`-guard. return this._moduleRegistry.services.pinnedTabsService; } get advancedOverflowService(): IAdvancedOverflowService | undefined { - // Owned by AdvancedOverflowModule — undefined when the module is not + // Owned by AdvancedOverflowModule; undefined when the module is not // registered, so callers must `?.`-guard (the free flat overflow list // renders in that case). return this._moduleRegistry.services.advancedOverflowService; @@ -1412,7 +1412,7 @@ export class DockviewComponent } if (!this.options.pinnedTabs?.enabled) { - // Feature dormant — pinning is opt-in via `pinnedTabs.enabled`. + // Feature dormant; pinning is opt-in via `pinnedTabs.enabled`. return; } @@ -1485,8 +1485,8 @@ export class DockviewComponent this._moduleRegistry.initialize(this); // Surface popout removal symmetrically with `onDidAddPopoutGroup`. The - // service is the single point every removal path funnels through — a - // genuine window close and an explicit removal alike — and it suppresses + // service is the single point every removal path funnels through, both + // a genuine window close and an explicit removal, and it suppresses // the event during component teardown. const popoutWindowService = this._popoutWindowService; if (popoutWindowService) { @@ -1659,7 +1659,7 @@ export class DockviewComponent }) ); - // Root edge-drop wiring lives with its (optional) module — guard it so + // Root edge-drop wiring lives with its (optional) module; guard it so // the module is independently removable. const rootDropTarget = this._rootDropTargetService; if (rootDropTarget) { @@ -1732,8 +1732,8 @@ export class DockviewComponent */ getPopupServiceForGroup(group: DockviewGroupPanel): PopupService { // Resolve by window membership (DOM containment), not the anchor id, so - // every group in a multi-group popout — anchor or not, original or - // promoted after the anchor left — uses that window's popup service + // every group in a multi-group popout (anchor or not, original or + // promoted after the anchor left) uses that window's popup service // rather than falling back to the main window. return ( this._popoutWindowService?.findByGroup(group)?.popupService ?? @@ -1763,7 +1763,7 @@ export class DockviewComponent ); } - /** The live popout `Window` handles — one per open popout group. The + /** The live popout `Window` handles, one per open popout group. The * narrow surface accessibility services need to mirror per-window state. */ getPopoutWindows(): Window[] { return this.getPopouts().map((popout) => popout.window); @@ -1801,7 +1801,7 @@ export class DockviewComponent const element = this.element; // Always returns absolute *screen* coordinates. A caller-supplied / - // restored `position` is already in screen space — it originates from + // restored `position` is already in screen space; it originates from // PopoutWindow.dimensions() (screenX/screenY). A fresh popout is // positioned from the source element's viewport-relative rect, so it // is offset here by the opener window's own screen position. Doing the @@ -2032,8 +2032,8 @@ export class DockviewComponent if (options?.overridePopoutGridview) { // Restored multi-group window. Wire every member (including // the anchor) to this window's containers and popout - // location now that the gridview is attached and laid out — - // re-setting renderContainer forces a re-render at the right + // location now that the gridview is attached and laid out. + // Re-setting renderContainer forces a re-render at the right // time so 'always'-rendered content positions in this // window rather than where it was first created. const members = this.groups.filter((candidate) => @@ -2185,7 +2185,7 @@ export class DockviewComponent } /** - * The popout window was blocked (e.g. by the browser's popup blocker — + * The popout window was blocked (e.g. by the browser's popup blocker, * common when restoring popouts on load). Fall back gracefully so the * group(s) end up valid and visible in the main grid rather than as * orphans that later crash clear()/remove(). @@ -2232,13 +2232,13 @@ export class DockviewComponent if (group === referenceGroup) { // No separate grid group to return to (e.g. restoring a popout - // straight from JSON) — dock this group into the main grid. + // straight from JSON), so dock this group into the main grid. if (!this.gridview.element.contains(group.element)) { this.movingLock(() => this.doAddGroup(group, [0])); group.model.location = { type: 'grid' }; } } else { - // A fresh group was created for the popout — return its panels to + // A fresh group was created for the popout, so return its panels to // the reference group and discard the now-empty popout group so it // doesn't linger as an orphan. this.movingLock(() => @@ -2264,7 +2264,7 @@ export class DockviewComponent * Wire a group that has been displaced from a floating / popout window back * to the main grid's render & drop-target containers and dock it at the * root. The caller is responsible for first detaching it from its old - * gridview — the detach strategy differs between the window-teardown path + * gridview; the detach strategy differs between the window-teardown path * (`doRemoveGroup`) and the blocked-window path (`gridview.remove`). */ private redockGroupToMainGrid(group: DockviewGroupPanel): void { @@ -2408,7 +2408,7 @@ export class DockviewComponent } // All members have been relocated out; tear down the window's nested - // gridview (does not dispose the leaf views — their lifecycle stays + // gridview (does not dispose the leaf views, whose lifecycle stays // with `_groups`). disposePopoutGridview(); } @@ -2890,7 +2890,7 @@ export class DockviewComponent return; } if (service.isAutoReveal(group)) { - // Defer the teardown — disposing the group (and its + // Defer the teardown: disposing the group (and its // onDidRemovePanel emitter) from inside that emitter's own // dispatch corrupts the emitter / mutation depth. The // re-check no-ops if a concurrent move re-filled the edge. @@ -2930,7 +2930,7 @@ export class DockviewComponent * Reveal (create-or-fill) the edge group at `position` and move the dragged * item described by `data` into it. A newly created edge group is created * collapsed and flagged `autoReveal` so it tears down to zero footprint when - * later emptied. If an edge group already exists there it is reused — the + * later emptied. If an edge group already exists there it is reused: the * panel is added to its tabs and its collapsed/toggled state is left as-is * (never re-created; `addEdgeGroup` throws on a duplicate position). No-op if * the EdgeGroup module is absent. @@ -2950,7 +2950,7 @@ export class DockviewComponent this.mutation('add', () => { let group = service.get(position); if (!group) { - // A newly revealed edge group is created collapsed — the drop + // A newly revealed edge group is created collapsed, so the drop // adds a tab to its strip rather than popping the group open. this.addEdgeGroup(position, { id: this.getNextGroupId(), @@ -2996,7 +2996,7 @@ export class DockviewComponent return this._edgeGroupService?.get(position); } - /** Pin (expand) the edge group at a position — auto-hide module feature. */ + /** Pin (expand) the edge group at a position; auto-hide module feature. */ pinEdgeGroup(position: EdgeGroupPosition): void { this._moduleRegistry.services.autoHideEdgeGroupService?.pin(position); } @@ -3016,15 +3016,15 @@ export class DockviewComponent ); } - /** The auto-hide peek mounts on the shell — the same element the - * `OverlayRenderContainer` roots on — so `always` content re-anchors in the + /** The auto-hide peek mounts on the shell, the same element the + * `OverlayRenderContainer` roots on, so `always` content re-anchors in the * peek's coordinate space. */ get overlayRoot(): HTMLElement { return this.rootElement; } /** Viewport rect of the docked content area (the element the root/group drop - * targets hit-test against) — used by the two-band drag-reveal affordance to + * targets hit-test against), used by the two-band drag-reveal affordance to * classify a pointer's distance from each edge. This is the gridview/center * container, which is inset when edge groups are present, so the outer band * sits at the boundary of the content area (adjacent to any existing edge @@ -3033,7 +3033,7 @@ export class DockviewComponent return this.element.getBoundingClientRect(); } - /** The size an edge group expands to (pre-collapse) — sizes the peek. */ + /** The size an edge group expands to (pre-collapse); sizes the peek. */ getEdgeGroupExpandedSize(position: EdgeGroupPosition): number { return this._shellManager?.getEdgeGroupExpandedSize(position) ?? 0; } @@ -3078,7 +3078,7 @@ export class DockviewComponent ); } - // One transaction — the per-panel removals below nest via the depth + // One transaction; the per-panel removals below nest via the depth // counter, so consumers see a single edge-group removal. this.mutation('remove', () => { // Remove panels inside the group first @@ -3293,7 +3293,7 @@ export class DockviewComponent continue; } // Don't persist a transient empty auto-reveal edge (it's - // mid-teardown to zero footprint — the deferred removeEdgeGroup + // mid-teardown to zero footprint, and the deferred removeEdgeGroup // microtask hasn't run yet). Restoring it would recreate an edge // that can never tear itself down, since nothing is ever removed // from it to fire onDidRemovePanel. @@ -3324,7 +3324,7 @@ export class DockviewComponent data: SerializedDockview, options?: { reuseExistingPanels: boolean } ): void { - // One 'load' transaction for the whole deserialization — the many + // One 'load' transaction for the whole deserialization; the many // nested add/remove mutations join it via the depth counter. this.mutation('load', () => this._doFromJSON(data, options)); } @@ -3336,7 +3336,7 @@ export class DockviewComponent // Cancel any popout-restoration timers queued by a previous fromJSON // that haven't fired yet. The cancel path also disposes orphan groups // registered in _groups synchronously but never parented into a popout - // window — otherwise the upcoming clear() would call gridview.remove() + // window; otherwise the upcoming clear() would call gridview.remove() // on an unparented element and throw "Invalid grid element". See // issue #1304. this._popoutWindowService?.cancelPendingRestorations(); @@ -3651,7 +3651,7 @@ export class DockviewComponent const id = groupState?.id ?? `${_position}-group`; // Trust the serialized per-group flags. Absent → unset (a // static edge collapses to a strip; auto-hide inherits the - // per-edge option). We deliberately do NOT fall back to the + // per-edge option). We deliberately don't fall back to the // `dockToEdgeGroups` option here, so a static edge group in a // saved layout is never silently turned into a self-tearing- // down one just because the option is on this session. @@ -3870,7 +3870,7 @@ export class DockviewComponent } closeAllGroups(): void { - // One transaction — the per-panel removals inside nest via the depth + // One transaction; the per-panel removals inside nest via the depth // counter, so consumers (undo, announcements) see a single mutation. this.mutation('remove', () => { for (const entry of this._groups.entries()) { @@ -4266,7 +4266,7 @@ export class DockviewComponent * * @returns `true` if the group was detached from a multi-member window; * `false` if `group` is not in a nested window, or is the window's only - * member — in which case the caller is responsible for disposing the whole + * member, in which case the caller is responsible for disposing the whole * window. */ private detachFromNestedWindow(group: DockviewGroupPanel): boolean { @@ -4367,7 +4367,7 @@ export class DockviewComponent } if (this.detachFromNestedWindow(group)) { - // The floating window hosts other groups and stays alive — + // The floating window hosts other groups and stays alive, so // finalize just this group. if (options?.skipDispose) { // Relocation: reset location so the destination root can @@ -4381,7 +4381,7 @@ export class DockviewComponent return group; } - // Last group leaving — dispose the whole floating window. + // Last group leaving, so dispose the whole floating window. if (!options?.skipDispose) { this.disposeGroupRecord(group); } @@ -4401,7 +4401,7 @@ export class DockviewComponent } if (this.detachFromNestedWindow(group)) { - // The popout window hosts other groups and stays alive — + // The popout window hosts other groups and stays alive, so // finalize just this group. if (options?.skipDispose) { // Relocation: reset location so the destination root can @@ -4415,7 +4415,7 @@ export class DockviewComponent return group; } - // Last group leaving — tear the whole popout window down. + // Last group leaving, so tear the whole popout window down. if (!options?.skipDispose) { if (!options?.skipPopoutAssociated) { const refGroup = selectedGroup.referenceGroup @@ -4446,7 +4446,7 @@ export class DockviewComponent } // A `grid`-location group whose element isn't actually in the gridview - // is an orphan — e.g. a popout-destined group created during fromJSON + // is an orphan, e.g. a popout-destined group created during fromJSON // whose window hasn't opened yet, swept up by clear()/a re-entrant // fromJSON. `gridview.remove()` would throw "Invalid grid element", so // dispose it directly. @@ -4543,7 +4543,7 @@ export class DockviewComponent * Run `func` with the operation origin set to `origin`, restoring the * previous value afterwards. Used by the DockviewApi boundary to tag * programmatic operations as `'api'`, and by user-gesture handlers to tag - * `'user'`. Only the outermost caller sets the origin — a nested call (or a + * `'user'`. Only the outermost caller sets the origin; a nested call (or a * call made while a mutation is already in flight) keeps whatever the * enclosing operation established, so the trigger always wins. */ @@ -4670,7 +4670,7 @@ export class DockviewComponent */ // The destination group may live in the main grid or in a floating - // window's nested gridview — resolve which root we are dropping + // window's nested gridview, so resolve which root we are dropping // into so locations/orientation are computed against it. const destinationGridview = this.getGridviewForGroup(destinationGroup); @@ -4726,7 +4726,7 @@ export class DockviewComponent * has a single panel * * 1. remove the panel from the group without triggering any events - * 2. remove the popout group — this may cascade-remove the empty + * 2. remove the popout group; this may cascade-remove the empty * reference group it left behind in the main grid (see * doRemoveGroup for popout groups), which can shift grid indices * 3. recompute the target location now that the grid is stable @@ -4783,7 +4783,7 @@ export class DockviewComponent if (sourceGroup.api.location.type === 'edge') { /** - * Edge groups are permanent structural elements — never move the + * Edge groups are permanent structural elements; never move the * group itself. Instead extract the panel and create a new grid group, * leaving the edge slot intact (same behaviour as the size >= 2 path). */ @@ -5139,7 +5139,7 @@ export class DockviewComponent // below, which bypasses doAddGroup and so doesn't fire // BaseGrid._onDidAdd. Modules (TabGroupChips, etc.) drive // per-group attachment off _onDidAddGroup, so we fire it - // explicitly here — matches the pattern in addFloatingGroup + // explicitly here, matching the pattern in addFloatingGroup // and addEdgeGroup. this._onDidAddGroup.fire(source); this.movingLock(() => { @@ -5205,7 +5205,7 @@ export class DockviewComponent break; } - // Last group leaving — tear the window down. Remove from + // Last group leaving, so tear the window down. Remove from // the service first to prevent automatic restoration. this._popoutWindowService?.remove(selectedPopoutGroup); @@ -5388,7 +5388,7 @@ export class DockviewComponent }), view.model.onWillShowOverlay((event) => { if (this.options.disableDnd) { - // Engine policy — stays in core, ahead of any + // Engine policy; stays in core, ahead of any // customisation dispatch. event.preventDefault(); return; @@ -5543,8 +5543,8 @@ export class DockviewComponent if (floating) { return floating.gridview; } - // Use findByGroup (anchor-identity OR containment) for symmetry with - // the floating branch — it also resolves an anchor whose element is + // Use findByGroup (anchor-identity or containment) for symmetry with + // the floating branch; it also resolves an anchor whose element is // briefly detached from the gridview during a move/restore. const popout = this._popoutWindowService?.findByGroup(group); if (popout) { diff --git a/packages/dockview-core/src/dockview/dockviewFloatingGroupPanel.ts b/packages/dockview-core/src/dockview/dockviewFloatingGroupPanel.ts index ebb949219..4d3bb3106 100644 --- a/packages/dockview-core/src/dockview/dockviewFloatingGroupPanel.ts +++ b/packages/dockview-core/src/dockview/dockviewFloatingGroupPanel.ts @@ -60,7 +60,7 @@ export class DockviewFloatingGroupPanel this.addDisposables(overlay, { // The gridview owns the floating window's DOM subtree (mounted as // the overlay's content). Disposing it tears down the splitview; - // it does NOT dispose the leaf views (groups) — their lifecycle is + // it doesn't dispose the leaf views (groups), whose lifecycle is // owned by the component's `_groups` map. dispose: () => this.gridview.dispose(), }); diff --git a/packages/dockview-core/src/dockview/dockviewGroupPanelModel.ts b/packages/dockview-core/src/dockview/dockviewGroupPanelModel.ts index 283dbace1..6480cef55 100644 --- a/packages/dockview-core/src/dockview/dockviewGroupPanelModel.ts +++ b/packages/dockview-core/src/dockview/dockviewGroupPanelModel.ts @@ -90,7 +90,7 @@ export interface DockviewGroupChangeEvent { /** * Payload for the group-level `onDidActivePanelChange`. Extends * {@link DockviewGroupChangeEvent} with the {@link DockviewOrigin} so it mirrors - * the component-level `DockviewActivePanelChangeEvent` — both report whether the + * the component-level `DockviewActivePanelChangeEvent`. Both report whether the * change came from a user gesture or an API call. */ export interface DockviewGroupActivePanelChangeEvent @@ -393,7 +393,7 @@ export class DockviewGroupPanelModel return this.contentContainer.element.id; } - /** The group's content drop target — lets keyboard docking preview a drop here. */ + /** The group's content drop target; lets keyboard docking preview a drop here. */ get contentDropTarget(): Droptarget { return this.contentContainer.dropTarget; } @@ -438,7 +438,7 @@ export class DockviewGroupPanelModel return this.tabsContainer; } - /** The scrollable tab list element (`.dv-tabs-container`) — exposed for the + /** The scrollable tab list element (`.dv-tabs-container`), exposed for the * multi-row wrap controller to measure rows / toggle the wrap class. */ get tabsListElement(): HTMLElement { return this.tabsContainer.tabsListElement; @@ -446,7 +446,7 @@ export class DockviewGroupPanelModel /** The panel whose tab owns `element` (the tab itself or a descendant of * it), or `undefined` when the target isn't a tab. The robust inverse of a - * tab→panel lookup — no positional/DOM-order assumptions. */ + * tab→panel lookup, with no positional/DOM-order assumptions. */ getPanelForTab(element: Element): IDockviewPanel | undefined { return this.tabsContainer.getPanelForTab(element); } @@ -494,7 +494,7 @@ export class DockviewGroupPanelModel // Signal a genuine horizontal↔vertical flip so features that lay out // per-axis (e.g. multi-row tab wrapping) can react. Fired after the - // side effects above, and only on a real axis change — not on the + // side effects above, and only on a real axis change, not on the // initial set, nor on a same-axis move (top↔bottom, left↔right). if ( previousDirection !== undefined && @@ -608,7 +608,7 @@ export class DockviewGroupPanelModel const draggedPanelId = dragData?.panelId ?? null; // Let an injected resolver (PinnedTabs) clamp/redirect the drop - // index — e.g. so an unpinned tab cannot land left of a pinned + // index, e.g. so an unpinned tab cannot land left of a pinned // one. Identity by default; only same-panel header drops carry // a panel id to resolve against. const resolvedIndex = draggedPanelId @@ -658,7 +658,7 @@ export class DockviewGroupPanelModel localIndex ); } else if (draggedPanelId && event.targetTabGroupId === null) { - // Dropped outside any group — remove from current group + // Dropped outside any group, so remove it from the current group this.removePanelFromTabGroup(draggedPanelId); } }), @@ -857,7 +857,7 @@ export class DockviewGroupPanelModel // Remove from any existing group first const existingGroup = this.getTabGroupForPanel(panelId); if (existingGroup?.id === tabGroupId) { - return; // already in this group — no mutation + return; // already in this group, nothing to mutate } this._bracketTabGroupMutation(() => { @@ -1123,7 +1123,7 @@ export class DockviewGroupPanelModel // Dispose the external listeners (onDidChange, onDidCollapseChange) // we registered on this group. We cannot dispose synchronously // here because this method runs inside the onDidDestroy fire - // loop — disposing the CompositeDisposable that holds the + // loop, and disposing the CompositeDisposable that holds the // onDidDestroy subscription would splice listeners mid-iteration. // Schedule cleanup on the next microtask instead. const tabGroupDisposable = this._tabGroupDisposables.get( @@ -1175,7 +1175,7 @@ export class DockviewGroupPanelModel } } - // All tabs are in collapsed groups — show watermark + // All tabs are in collapsed groups, so show the watermark this.contentContainer.closePanel(); this.doSetActivePanel(undefined); this.updateContainer(); diff --git a/packages/dockview-core/src/dockview/dockviewShell.ts b/packages/dockview-core/src/dockview/dockviewShell.ts index f4a95fdde..5ba9d63a4 100644 --- a/packages/dockview-core/src/dockview/dockviewShell.ts +++ b/packages/dockview-core/src/dockview/dockviewShell.ts @@ -32,8 +32,8 @@ export interface AddEdgeGroupOptions extends EdgeGroupOptions { autoHide?: boolean; /** * When true, this edge group tears itself down to zero footprint once - * emptied (instead of collapsing to a strip) — the behaviour used by - * drag-revealed edges. + * emptied (instead of collapsing to a strip). This is the behaviour used + * by drag-revealed edges. */ autoReveal?: boolean; } @@ -150,7 +150,7 @@ export class EdgeGroupView implements IView { } /** The user-configured (pre-gap) geometry constraints, for serialization. - * These are the raw values passed to `addEdgeGroup` — unlike the effective + * These are the raw values passed to `addEdgeGroup`, unlike the effective * `minimumSize`/`maximumSize`/`collapsedSize` getters, which fold in the * theme gap and collapse-locking. */ get configuredMinimumSize(): number | undefined { @@ -384,7 +384,7 @@ class MiddleColumnView implements IView, IDisposable { } addBottomView(view: EdgeGroupView, initialSize: number): void { - // Append after center (and any existing bottom — shouldn't happen but safe) + // Append after center (and any existing bottom; shouldn't happen but safe) const newIndex = this._splitview.length; this._splitview.addView(view, initialSize, newIndex); this._bottomIndex = newIndex; @@ -863,7 +863,7 @@ export class ShellManager implements IDisposable { return this._getView(position)?.isCollapsed ?? false; } - /** The size an edge group expands to (its pre-collapse size) — used to size + /** The size an edge group expands to (its pre-collapse size), used to size * the auto-hide peek overlay. */ getEdgeGroupExpandedSize(position: EdgeGroupPosition): number { return this._getView(position)?.lastExpandedSize ?? 0; @@ -903,7 +903,7 @@ export class ShellManager implements IDisposable { // Record the size to restore the group to. An expanded-but-hidden // group reports getViewSize 0, so fall back to its cached visible size - // (then lastExpandedSize) — otherwise re-showing snaps to minimumSize. + // (then lastExpandedSize); otherwise re-showing snaps to minimumSize. const expandedSize = ( view: EdgeGroupView, isVisible: boolean, diff --git a/packages/dockview-core/src/dockview/edgeGroupService.ts b/packages/dockview-core/src/dockview/edgeGroupService.ts index b13dda4fb..e65aab32b 100644 --- a/packages/dockview-core/src/dockview/edgeGroupService.ts +++ b/packages/dockview-core/src/dockview/edgeGroupService.ts @@ -11,7 +11,7 @@ import { defineModule } from './modules'; * orchestration remain on DockviewComponent. */ export interface IEdgeGroupServiceHost { - // Intentionally empty — the service has no callbacks into the host. + // Intentionally empty: the service has no callbacks into the host. } export interface IEdgeGroupService extends IDisposable { @@ -30,7 +30,7 @@ export interface IEdgeGroupService extends IDisposable { findPositionOf(group: DockviewGroupPanel): EdgeGroupPosition | undefined; /** - * Per-group auto-hide opt-in. `undefined` means "unset" — callers should + * Per-group auto-hide opt-in. `undefined` means "unset", so callers should * fall back to the global `autoHideEdgeGroups` option. This lets a static * edge group and an auto-hiding one co-exist in the same layout. */ @@ -39,8 +39,8 @@ export interface IEdgeGroupService extends IDisposable { /** * Per-group "auto-reveal" flag. When set, an edge group tears itself down - * to zero footprint when emptied (instead of collapsing to a strip) — the - * state used by drag-revealed edges. + * to zero footprint when emptied (instead of collapsing to a strip). This + * is the state used by drag-revealed edges. */ setAutoReveal(group: DockviewGroupPanel, value: boolean): void; isAutoReveal(group: DockviewGroupPanel): boolean; @@ -62,7 +62,7 @@ export class EdgeGroupService implements IEdgeGroupService { private readonly _autoHide = new WeakMap(); private readonly _autoReveal = new WeakMap(); - // No constructor needed — the host is currently unused. The + // No constructor needed; the host is currently unused. The // IEdgeGroupServiceHost slot stays for symmetry with the other modules // and to leave room for future host callbacks. diff --git a/packages/dockview-core/src/dockview/headerActionsService.ts b/packages/dockview-core/src/dockview/headerActionsService.ts index 0e785c9b2..6bfda3c5e 100644 --- a/packages/dockview-core/src/dockview/headerActionsService.ts +++ b/packages/dockview-core/src/dockview/headerActionsService.ts @@ -58,7 +58,7 @@ export class HeaderActionsService implements IHeaderActionsService { refresh(group: DockviewGroupPanel): void { // The headerPosition setter on DockviewGroupPanelModel fires inside - // the model's constructor — before the parent DockviewGroupPanel has + // the model's constructor, before the parent DockviewGroupPanel has // assigned its `_model` field, and in tests where the parent panel // may be null. Skip; DockviewGroupPanel.initialize() will refresh // once construction completes for real groups. diff --git a/packages/dockview-core/src/dockview/liveRegionService.ts b/packages/dockview-core/src/dockview/liveRegionService.ts index 0653f5b69..e6bbd221e 100644 --- a/packages/dockview-core/src/dockview/liveRegionService.ts +++ b/packages/dockview-core/src/dockview/liveRegionService.ts @@ -13,7 +13,7 @@ import { defineModule } from './modules'; /** * The narrow surface the {@link LiveRegionService} needs from the host - * (the `DockviewComponent`) — somewhere to mount the region and the layout + * (the `DockviewComponent`): somewhere to mount the region and the layout * events to narrate. `onWill/onDidMutateLayout` are used to suppress the * bulk-load / clear burst (one transaction, not N panel announcements). */ @@ -35,8 +35,8 @@ export interface ILiveRegionHost { export interface ILiveRegionService extends IDisposable { /** - * Announce a message to assistive technology via the live region. The - * shared sink — the accessibility module writes keyboard-docking + * Announce a message to assistive technology via the live region. This + * is the shared sink: the accessibility module writes keyboard-docking * narration here too, so all announcements use one region. */ announce(message: string, politeness?: 'polite' | 'assertive'): void; @@ -206,7 +206,7 @@ export class LiveRegionService } /** Route announcements to the live region of the window that currently has - * focus, so a screen-reader user in a popout hears them — falling back to + * focus, so a screen-reader user in a popout hears them, falling back to * the main window. */ private _focusedRegions(): RegionPair { for (const [win, pair] of this._regions) { @@ -218,7 +218,7 @@ export class LiveRegionService return pair; } } catch { - // A closing / cross-origin window can throw on access — ignore. + // A closing / cross-origin window can throw on access, so ignore. } } return this._regions.get(this._mainWindow)!; diff --git a/packages/dockview-core/src/dockview/moduleContracts.ts b/packages/dockview-core/src/dockview/moduleContracts.ts index 8d25f2950..cf78bd3a0 100644 --- a/packages/dockview-core/src/dockview/moduleContracts.ts +++ b/packages/dockview-core/src/dockview/moduleContracts.ts @@ -1,6 +1,6 @@ /** * Service + host interfaces for the pluggable feature modules. Core references - * only these interfaces — never a module's implementation — so each module is + * only these interfaces, never a module's implementation, so each module is * decoupled from core and independently testable / removable. Keep this file * implementation-free. */ @@ -58,8 +58,8 @@ export interface IContextMenuHost { /** * The PinnedTabs module service, or `undefined` when that module is not * registered. The tab context menu auto-injects a Pin/Unpin item only when - * this is present (and pinning is enabled) — an optional enhancement, never - * a hard dependency. + * this is present (and pinning is enabled); it's an optional enhancement, + * never a hard dependency. */ readonly pinnedTabsService: IPinnedTabsService | undefined; getPopupServiceForGroup(group: DockviewGroupPanel): PopupService; @@ -112,7 +112,7 @@ export interface ITabGroupChipsService extends IDisposable { export interface IKeyboardNavigationHost { /** * The outermost dockview element (the shell, which also contains edge - * groups). A getter — it must resolve to the shell once that exists, not + * groups). A getter: it must resolve to the shell once that exists, not * the inner gridview, or keydowns from edge groups are missed. */ readonly rootElement: HTMLElement; @@ -135,20 +135,20 @@ export interface IKeyboardNavigationHost { */ ownsElement(node: Node): boolean; /** - * The next / previous group in gridview (spatial) order, wrapping round — - * the one piece of navigation that needs the grid internals. All other - * focus logic lives in the service, using the public group API. + * The next / previous group in gridview (spatial) order, wrapping round. + * This is the one piece of navigation that needs the grid internals. All + * other focus logic lives in the service, using the public group API. */ adjacentGroup( group: DockviewGroupPanel, reverse: boolean ): DockviewGroupPanel | undefined; - /** The nearest grid group in a spatial direction — drives Alt+Arrow nav. */ + /** The nearest grid group in a spatial direction; drives Alt+Arrow nav. */ adjacentGroupInDirection( group: DockviewGroupPanel, direction: GroupNavigationDirection ): DockviewGroupPanel | undefined; - /** Fires before / after a structural layout change — used to restore focus on close. */ + /** Fires before / after a structural layout change; used to restore focus on close. */ readonly onWillMutateLayout: Event; readonly onDidMutateLayout: Event; showDropPreview(group: DockviewGroupPanel, position: Position): IDisposable; @@ -158,7 +158,7 @@ export interface IKeyboardNavigationHost { group: DockviewGroupPanel, position: Position ): void; - /** Float the panel into a new floating group — the keyboard-move "float" terminal action. */ + /** Float the panel into a new floating group: the keyboard-move "float" terminal action. */ floatPanel(panel: IDockviewPanel): void; } @@ -202,8 +202,8 @@ export interface IAdvancedDnDService extends IDisposable { group?: DockviewGroupPanel ): DroptargetOverlayModel | undefined; /** - * Render the drop-preview overlay on a group at `position` — the same - * overlay a mouse drag shows — without a live drag. Returns a disposable + * Render the drop-preview overlay on a group at `position` (the same + * overlay a mouse drag shows) without a live drag. Returns a disposable * that clears it. Used by keyboard docking so keyboard and mouse previews * are identical (single source of truth). Commit the move via the public * `api.moveGroupOrPanel({ to: { group, position } })`. @@ -219,7 +219,7 @@ export interface IAdvancedDnDService extends IDisposable { /** * The narrow surface the layout-history service needs from the host * (`DockviewComponent`). It reads/writes whole-layout snapshots and listens to - * the mutation-transaction boundary — the only place a *pre-image* can be taken + * the mutation-transaction boundary, the only place a *pre-image* can be taken * before a mutation runs. */ export interface ILayoutHistoryHost { @@ -229,11 +229,11 @@ export interface ILayoutHistoryHost { data: SerializedDockview, options?: { reuseExistingPanels: boolean } ): void; - /** Fires before a structural mutation — used to capture the pre-image. */ + /** Fires before a structural mutation; used to capture the pre-image. */ readonly onWillMutateLayout: Event; - /** Fires after a structural mutation — used to capture the post-image. */ + /** Fires after a structural mutation; used to capture the post-image. */ readonly onDidMutateLayout: Event; - /** Coalesced (microtask-buffered) ping after any layout change — the only + /** Coalesced (microtask-buffered) ping after any layout change; the only * signal for sash resize, which does not go through the mutation boundary. */ readonly onDidLayoutChange: Event; /** Settles once any in-flight popout-window restoration (from `fromJSON`) @@ -242,7 +242,7 @@ export interface ILayoutHistoryHost { readonly popoutRestorationPromise: Promise; } -/** Entry labels — the mutation kinds plus the synthetic `'resize'` (sash drag, +/** Entry labels: the mutation kinds plus the synthetic `'resize'` (sash drag, * which has no mutation-boundary kind of its own). */ export type LayoutHistoryKind = DockviewLayoutMutationKind | 'resize'; @@ -279,14 +279,14 @@ export interface ILayoutHistoryService extends IDisposable { export interface IDropGuideHost { readonly options: DockviewComponentOptions; /** - * Fires on each drag-over with the hovered group + native event — the + * Fires on each drag-over with the hovered group + native event; the * signal the compass widget mounts/follows. The service filters for * `kind === 'content'`. */ readonly onWillShowOverlay: Event; /** * Whether a drop at `position` on `group`'s content is actually allowed - * (the per-position `canDisplayOverlay` veto) — used to gate which compass + * (the per-position `canDisplayOverlay` veto), used to gate which compass * cells are shown, so only legal drops appear. */ canDropOnGroup( @@ -296,12 +296,12 @@ export interface IDropGuideHost { ): boolean; /** * The element the content drop target measures its quadrants against (the - * `dndPanelOverlay` outline — the whole group, or just its content). The + * `dndPanelOverlay` outline: the whole group, or just its content). The * compass paints its cells in this frame so they line up with where a drop * actually resolves, not a different box. */ getDropOverlayElement(group: DockviewGroupPanel): HTMLElement | undefined; - /** The layout root element — the (positioned) surface the outer-cell + /** The layout root element: the (positioned) surface the outer-cell * landing preview is drawn over (where a whole-layout-edge dock lands). */ getLayoutElement(): HTMLElement; } @@ -309,7 +309,7 @@ export interface IDropGuideHost { export interface IDropGuideService extends IDisposable { /** * The cell hit-test resolver, installed by the host at the drop-target seam - * in place of the default cursor-quadrant logic — or `undefined` when the + * in place of the default cursor-quadrant logic, or `undefined` when the * compass is disabled (`dndGuide` unset), so the default behaviour runs. */ readonly resolver: PositionResolver | undefined; @@ -337,21 +337,21 @@ export interface ISmartGuidesHost { getFloatingContainer(): HTMLElement; /** * Fires with the dragged group the first time a floating group move-drag - * actually moves — the signal to (re)build per-drag state from a clean slate. + * actually moves; the signal to (re)build per-drag state from a clean slate. * Tears down any session left over from a drag that ended without a normal * pointerup (e.g. a redock long-press, which aborts without an end event). */ readonly onDidStartFloatingGroupDrag: Event; /** * Fires with the dragged group when a floating group's move-drag ends - * (pointerup / cancel) — the signal to tear down the guides and per-drag + * (pointerup / cancel); the signal to tear down the guides and per-drag * state. A resize-end fires it too; with no active drag session that is a * harmless no-op. */ readonly onDidEndFloatingGroupDrag: Event; /** * The live floating windows other than `exclude`, each with its group - * identity and container-relative box — the snap-together detector needs + * identity and container-relative box; the snap-together detector needs * identity (which neighbour to dock into), not just geometry. */ getFloatingGroupSnapshots( @@ -401,7 +401,7 @@ export interface ISmartGuidesService extends IDisposable { /** * Snap the proposed drag position against the other floating groups, * drawing an alignment guide on the snapped edge. Returns an adjusted - * top-left, or nothing to leave the proposed position unchanged — which is + * top-left, or nothing to leave the proposed position unchanged, which is * also the pass-through when `smartGuides` is unset / disabled. */ transformFloatingGroupDrag( @@ -422,34 +422,34 @@ export interface ISmartGuidesService extends IDisposable { /** * The narrow surface the auto-hide service needs from the host * (`DockviewComponent`). Collapse/expand is delegated to the existing free - * edge-group machinery (`setEdgeGroupCollapsed` → shell) — the module owns + * edge-group machinery (`setEdgeGroupCollapsed` → shell); the module owns * interaction + presentation, never layout/sizing. */ export interface IAutoHideEdgeGroupHost { readonly options: DockviewComponentOptions; - /** Fires when any group is added — the service filters for `location.type === 'edge'`. */ + /** Fires when any group is added; the service filters for `location.type === 'edge'`. */ readonly onDidAddGroup: Event; readonly onDidRemoveGroup: Event; /** The edge group at a position, or undefined. */ getEdgeGroupPanel( position: EdgeGroupPosition ): DockviewGroupPanel | undefined; - /** Collapse/expand an edge group — the single mutate path (fires + /** Collapse/expand an edge group: the single mutate path (fires * `onDidCollapsedChange`, no-op guarded). */ setEdgeGroupCollapsed(group: DockviewGroupPanel, collapsed: boolean): void; /** Whether this edge group should behave as an auto-hide (pinnable) tool - * window — the per-group flag resolved against the global + * window: the per-group flag resolved against the global * `autoHideEdgeGroups` option. Lets static and auto-hiding edge groups * co-exist. */ isEdgeGroupAutoHide(group: DockviewGroupPanel): boolean; /** Fires when a group's resolved auto-hide state changes at runtime * (per-group `setAutoHide`), so a controller can dock/undock retroactively. */ readonly onDidEdgeGroupAutoHideChange: Event; - /** The element the slide-out peek mounts on — the shell, which is also the + /** The element the slide-out peek mounts on: the shell, which is also the * `OverlayRenderContainer` root, so `always`-rendered content anchors in * the same coordinate space as the peek. */ readonly overlayRoot: HTMLElement; - /** The size an edge group expands to — sizes the peek overlay. */ + /** The size an edge group expands to; sizes the peek overlay. */ getEdgeGroupExpandedSize(position: EdgeGroupPosition): number; /** Record the peek state so `group.api.isPeeking()` / `onDidPeekChange` * reflect it (the module owns the actual overlay). */ @@ -457,7 +457,7 @@ export interface IAutoHideEdgeGroupHost { /** Reposition a single `renderer:'always'` panel's overlay over its * reference container, optionally forcing it visible. The peek reparents a * group's content container into the slide-out overlay; the always-rendered - * content is NOT reparented (its parent stays constant) — it's re-anchored + * content is not reparented (its parent stays constant); it's re-anchored * over the moving container and force-shown for the duration of the peek. * `clip` (viewport rect) clips the overlay to the peek's reveal window so an * `always` panel emerges from the strip's inner edge instead of sliding in @@ -495,10 +495,10 @@ export interface IAutoHideEdgeGroupService extends IDisposable { */ export interface IAutoEdgeGroupHost { readonly options: DockviewComponentOptions; - /** Fires before an edge drop overlay is shown — the affordance draws its + /** Fires before an edge drop overlay is shown; the affordance draws its * outer-band highlight (or lets the inner band render the core overlay). */ readonly onWillShowOverlay: Event; - /** Fires before a layout-edge drop commits — the affordance preempts the + /** Fires before a layout-edge drop commits; the affordance preempts the * outer band and reveals an edge group. */ readonly onWillDrop: Event; /** The element the outer-band highlight mounts on (the shell / overlay root). */ @@ -522,8 +522,8 @@ export interface IAutoEdgeGroupService extends IDisposable { * the normal cursor quadrant. `undefined` when disabled. */ readonly resolver: PositionResolver | undefined; /** Edge-band detection only: an `edge` cell when the pointer is in the outer - * band, else `null`. Used to COMPOSE with another resolver (e.g. the - * drop-guide compass) — the outer edge reveals an edge group and everything + * band, else `null`. Used to compose with another resolver (e.g. the + * drop-guide compass): the outer edge reveals an edge group and everything * else falls through to the other resolver. */ resolveEdge(args: PositionResolverArgs): PositionResolverResult | null; } @@ -540,14 +540,14 @@ export interface IAutoEdgeGroupService extends IDisposable { */ export interface IMultiRowTabsHost { readonly options: DockviewComponentOptions; - /** Fires when any group is added — the service attaches a wrap controller. */ + /** Fires when any group is added; the service attaches a wrap controller. */ readonly onDidAddGroup: Event; readonly onDidRemoveGroup: Event; - /** Fires after `updateOptions` — the service re-applies wrap to every group + /** Fires after `updateOptions`; the service re-applies wrap to every group * so a runtime `overflow.mode` change takes effect. */ readonly onDidOptionsChange: Event; /** - * The scrollable tab list element (`.dv-tabs-container`) for a group — the + * The scrollable tab list element (`.dv-tabs-container`) for a group: the * element the wrap class is toggled on and whose child tab geometry the * row-count measurement reads. Undefined if the group has no tab header. */ @@ -560,7 +560,7 @@ export interface IMultiRowTabsHost { relayoutGroup(group: DockviewGroupPanel): void; /** * Force a set of the group's panels into the overflow dropdown regardless of - * horizontal fit — the wrap controller's surplus set (the tabs on rows + * horizontal fit: the wrap controller's surplus set (the tabs on rows * beyond `overflow.maxRows`). In wrap mode nothing clips horizontally, so the * free `OverflowObserver` never surfaces these; this seam routes them to the * dropdown and re-evaluates it immediately. Passing `() => false` clears the @@ -588,7 +588,7 @@ export interface IMultiRowTabsService extends IDisposable { * layout or sizing is touched. */ export interface IPinnedTabsHost { - /** The owning component's id — the `viewId` a within-component drag payload + /** The owning component's id: the `viewId` a within-component drag payload * (`PanelTransfer`) carries, so the pinned second row can originate a drag * the main strip's drop targets accept. */ readonly id: string; @@ -596,13 +596,13 @@ export interface IPinnedTabsHost { readonly onDidAddGroup: Event; readonly onDidRemoveGroup: Event; /** Fires after a panel's pinned flag is mutated via the gated - * `setPanelPinned` — the service's sole trigger to re-order the strip. */ + * `setPanelPinned`; the service's sole trigger to re-order the strip. */ readonly onDidPanelPinnedChange: Event; - /** Fires after a `fromJSON` restore completes — the service seeds its + /** Fires after a `fromJSON` restore completes; the service seeds its * pinned store from the restored panels' `isPinned` flags and re-asserts * the invariant. */ readonly onDidLayoutFromJSON: Event; - /** Fires when a panel is removed — the service prunes it from its pinned + /** Fires when a panel is removed; the service prunes it from its pinned * bookkeeping so a closed pinned panel's id can't leak. */ readonly onDidRemovePanel: Event; } @@ -616,7 +616,7 @@ export interface IPinnedTabsHost { export interface IPinnedTabsService extends IDisposable { /** Re-assert the pinned-first invariant on a single group's tab strip. */ enforceOrder(group: DockviewGroupPanel): void; - /** Pure predicate (handed to each group's `Tabs`) — true keeps the panel + /** Pure predicate (handed to each group's `Tabs`); true keeps the panel * out of the overflow dropdown. */ isExcludedFromOverflow(panelId: string): boolean; /** Clamp/redirect a proposed header drop `index` against the group's pin @@ -643,7 +643,7 @@ export interface IOverflowRow { readonly panel: IDockviewPanel; /** * Expand the panel's tab group if collapsed, activate the panel (origin - * `'user'`) and close the popover — identical to clicking the row. Used by + * `'user'`) and close the popover, identical to clicking the row. Used by * the keyboard controller (Enter). */ activate(): void; @@ -652,7 +652,7 @@ export interface IOverflowRow { /** * Core-provided builders handed to {@link IAdvancedOverflowService.renderOverflow} * so the module can rebuild the free dropdown body (rows + group headers) in a - * custom order — search-filtered, MRU-ordered — without re-implementing the row + * custom order (search-filtered, MRU-ordered) without re-implementing the row * DOM, the group-header DOM, or the window-bound popover open/close. The popover * control stays in core so it renders in the correct document for popped-out * groups (a `getPopupServiceForGroup(group)`-bound `PopupService`). @@ -685,7 +685,7 @@ export interface AdvancedOverflowRenderParams { readonly overflowTabs: string[]; /** Overflow tab-group ids. */ readonly overflowTabGroups: string[]; - /** Pinned panel ids whose tabs have clipped out of the strip — rendered in + /** Pinned panel ids whose tabs have clipped out of the strip, rendered in * a dedicated "Pinned" section at the top of the dropdown, above the search * box and MRU list. Empty unless the PinnedTabs module is active and the * pinned block itself overflows. */ diff --git a/packages/dockview-core/src/dockview/modules.ts b/packages/dockview-core/src/dockview/modules.ts index 8def55b91..177f02f06 100644 --- a/packages/dockview-core/src/dockview/modules.ts +++ b/packages/dockview-core/src/dockview/modules.ts @@ -2,7 +2,7 @@ * Internal module system for dockview. * * Modules are feature bundles that register services into the dockview - * component. `registerModules(...)` is the one public entry point — it lets a + * component. `registerModules(...)` is the one public entry point: it lets a * sibling package contribute modules that `DockviewComponent` picks up at * construction. The richer opt-in surface (a per-component `modules` option, * framework wrappers) is still reserved for a future version; the module @@ -62,7 +62,7 @@ export interface DockviewModule { /** * Optional post-construct hook called once after the host is fully * constructed and all module services are instantiated. Use this to - * subscribe to host events — the returned disposable runs at host + * subscribe to host events; the returned disposable runs at host * teardown. Components don't need to call into the service from event * handlers; the module owns its own reactivity. */ @@ -106,7 +106,7 @@ export function defineModule(config: { const _warnedMissingModule = new Set(); /** - * For tests — clears the once-per-key dedup cache used by `assertModule`. + * For tests: clears the once-per-key dedup cache used by `assertModule`. */ export function _resetMissingModuleWarnings(): void { _warnedMissingModule.clear(); @@ -115,12 +115,12 @@ export function _resetMissingModuleWarnings(): void { /** * Returns the service if its module is registered, otherwise logs a * deduplicated console error and returns `undefined`. Missing modules never - * throw — they degrade the affected feature to a no-op so consuming + * throw; they degrade the affected feature to a no-op so consuming * applications don't crash in production. * * Use at public-API entry points where the caller wants to surface which * module is missing. For internal/lifecycle paths, plain `?.` chaining on - * the service slot is preferred — no log, just a silent no-op. + * the service slot is preferred: no log, a silent no-op. */ export function assertModule( service: T | undefined, @@ -223,7 +223,7 @@ export class ModuleRegistry implements IDisposable { const _globalModules: DockviewModule[] = []; /** - * Register modules globally. Idempotent per `moduleName` — registering the + * Register modules globally. Idempotent per `moduleName`: registering the * same module twice is a no-op. Intended to be called once at import time by * the package that bundles a given set of modules. */ @@ -245,7 +245,7 @@ export function getRegisteredModules(): DockviewModule[] { } /** - * For tests — clears the global module registry. + * For tests: clears the global module registry. */ export function clearRegisteredModules(): void { _globalModules.length = 0; diff --git a/packages/dockview-core/src/dockview/options.ts b/packages/dockview-core/src/dockview/options.ts index 89156d1fc..4d4333955 100644 --- a/packages/dockview-core/src/dockview/options.ts +++ b/packages/dockview-core/src/dockview/options.ts @@ -85,13 +85,13 @@ export interface DropOverlayModelParams { group?: DockviewGroupPanel; } -/** A layout change to be announced — see the `getAnnouncement` option. */ +/** A layout change to be announced; see the `getAnnouncement` option. */ export interface LiveRegionEvent { /** * What changed: a panel was added (`'open'`) or removed (`'close'`); a * group was maximized (`'maximize'`) / restored (`'restore'`); or a group * moved to a floating window (`'float'`), back into the grid (`'dock'`), or - * out to a popout window (`'popout'`). `panel` is the affected panel — for + * out to a popout window (`'popout'`). `panel` is the affected panel; for * group events, the group's active panel. */ kind: @@ -224,7 +224,7 @@ export interface SmartGuidesSnapTargets { } /** - * Options for the Smart Guides module — Figma-style alignment guides + magnetic + * Options for the Smart Guides module: Figma-style alignment guides + magnetic * snapping while dragging a floating group. Omit `smartGuides` entirely to leave * float dragging unchanged: the module is then inert and the drag loop is a * byte-for-byte pass-through. @@ -236,7 +236,7 @@ export interface SmartGuidesOptions { * Default `8`. */ snapDistance?: number; /** Extra px beyond `snapDistance` the pointer must travel before an engaged - * snap releases — asymmetric hysteresis that stops boundary oscillation. + * snap releases; asymmetric hysteresis that stops boundary oscillation. * Default `4`. */ releaseDistance?: number; /** Render the alignment guide lines while snapping. Default `true`. */ @@ -273,7 +273,7 @@ export type OverflowThumbnailRenderer = ( * The CSS class the `MultiRowTabsModule` toggles on a group's tab list * (`.dv-tabs-container`) to switch it into wrap layout. Shared here so core * (the reorder controller's wrap detection + the SCSS rules) and the module - * agree on the one string — renaming it in one place would otherwise silently + * agree on the one string; renaming it in one place would otherwise silently * break the seam across the package boundary. */ export const OVERFLOW_WRAP_TABS_CLASS = 'dv-tabs-container--wrap'; @@ -295,8 +295,8 @@ export const OVERFLOW_WRAP_TABS_CAPPED_CLASS = 'dv-tabs-container--wrap-capped'; export const OVERFLOW_MAX_TAB_ROWS_VARIABLE = '--dv-max-tab-rows'; /** - * The custom property the `MultiRowTabsModule` sets on a WRAPPED VERTICAL - * (edge-group) tab list to pin every wrapped tab to a single, uniform height — + * The custom property the `MultiRowTabsModule` sets on a wrapped vertical + * (edge-group) tab list to pin every wrapped tab to a single, uniform height: * the tallest tab's natural height, measured live by the controller. A vertical * tab's natural height tracks its (rotated) title length, so a column only fits * a handful of tabs and tiny per-tab height differences flip how many fit, @@ -312,7 +312,7 @@ export const OVERFLOW_WRAP_TABS_VERTICAL_TAB_HEIGHT_VARIABLE = /** * Tab-header overflow behaviour. One shared block across the overflow axis: * `mode` chooses dropdown vs wrap; the remaining fields enrich the dropdown. - * Each capability names the module it needs — without that module the field is + * Each capability names the module it needs; without that module the field is * ignored and the free single-row strip + dropdown is used. */ export interface DockviewOverflowOptions { @@ -364,7 +364,7 @@ export interface DockviewOptions { * Adjust a floating group's position while it is being dragged. Runs on * each pointer-move frame with the proposed top-left (before the container * clamp) and returns an adjusted top-left, or nothing to leave it - * unchanged. Use it for snapping, alignment, or custom bounds. Move only — + * unchanged. Use it for snapping, alignment, or custom bounds. Move only: * resizing a floating group is unaffected. * * `context.others` holds the bounds of the other floating groups (relative @@ -375,7 +375,7 @@ export interface DockviewOptions { context: FloatingGroupDragContext ) => { top: number; left: number } | void; /** - * Enable Smart Guides — alignment guides + magnetic snapping while a + * Enable Smart Guides: alignment guides + magnetic snapping while a * floating group is being dragged. Omit to disable entirely (float dragging * is then unchanged). Provided by the Smart Guides module. */ @@ -387,7 +387,7 @@ export interface DockviewOptions { * above the group's tab bar. Dragging it moves the floating window; * shift+drag (mouse) / long-press (touch) redocks into the grid. Style * it with the `--dv-floating-titlebar-*` theme variables. - * - `'tabbar'`: the legacy behaviour — the empty space in the tab bar + * - `'tabbar'`: the legacy behaviour, where the empty space in the tab bar * (the "void container") doubles as the move handle. No dedicated bar * is rendered. */ @@ -410,13 +410,13 @@ export interface DockviewOptions { * browsers, certain Safari versions, embedded webviews). Cross-window * HTML5 drag and the HTML5 native drag image are not available in this * mode. - * - `'html5'`: HTML5 drag-and-drop only — disables touch / pen drag. + * - `'html5'`: HTML5 drag-and-drop only; disables touch / pen drag. */ dndStrategy?: DockviewDndStrategy; /** * Override how a pointer location maps to a drop {@link Position} (or `null` - * for no drop) on the 5-way group/layout drop targets — the group content - * and the whole-layout edges — replacing the built-in cursor-quadrant logic. + * for no drop) on the 5-way group/layout drop targets (the group content + * and the whole-layout edges), replacing the built-in cursor-quadrant logic. * Tab/header reorder targets are unaffected. Unset ⇒ the default quadrant * behaviour, unchanged. Read live, so it can be swapped via * {@link DockviewApi.updateOptions}. @@ -465,19 +465,19 @@ export interface DockviewOptions { * * Use built-in string shortcuts or provide a `ContextMenuItemConfig` * object for custom items. The available shortcuts are: - * - `'close'` — close this panel - * - `'closeOthers'` — close every other panel in the group - * - `'closeAll'` — close every panel in the group - * - `'closeLeft'` / `'closeRight'` — close the panels before / after this + * - `'close'`: close this panel + * - `'closeOthers'`: close every other panel in the group + * - `'closeAll'`: close every panel in the group + * - `'closeLeft'` / `'closeRight'`: close the panels before / after this * one in the tab strip - * - `'maximize'` — maximize the group (renders as *Restore* and disables + * - `'maximize'`: maximize the group (renders as *Restore* and disables * for non-grid panels, tracking the group's live maximized state) - * - `'float'` — move the panel into a floating window (disabled when + * - `'float'`: move the panel into a floating window (disabled when * already floating) - * - `'popout'` — move the panel into a new browser window (disabled when + * - `'popout'`: move the panel into a new browser window (disabled when * already popped out) - * - `'pin'` — toggle the panel's pinned state (PinnedTabs module) - * - `'separator'` — a divider line + * - `'pin'`: toggle the panel's pinned state (PinnedTabs module) + * - `'separator'`: a divider line * * If omitted, no context menu is shown. * Return an empty array to suppress the menu for specific cases. @@ -490,12 +490,12 @@ export interface DockviewOptions { * * Use built-in string shortcuts or provide a `ContextMenuItemConfig` * object for custom items. The available shortcuts are: - * - `'rename'` — renders an inline text input to rename the tab group - * - `'colorPicker'` — renders a grid of color swatches for the tab group - * - `'collapse'` — collapse the tab group (renders as *Expand* when the + * - `'rename'`: renders an inline text input to rename the tab group + * - `'colorPicker'`: renders a grid of color swatches for the tab group + * - `'collapse'`: collapse the tab group (renders as *Expand* when the * group is already collapsed) - * - `'close'` — close every panel belonging to the tab group - * - `'separator'` — a divider line + * - `'close'`: close every panel belonging to the tab group + * - `'separator'`: a divider line * * If omitted, no context menu is shown on chip right-click. * Return an empty array to suppress the menu for specific cases. @@ -522,7 +522,7 @@ export interface DockviewOptions { group: DockviewGroupPanel ) => IGroupDragGhostRenderer; /** - * Shape the drop overlay shown over a group's drop targets — the tab + * Shape the drop overlay shown over a group's drop targets: the tab * strip (`'tab'`), the header void space (`'header_space'`) and the * panel content area (`'content'`). Return a {@link DroptargetOverlayModel} * to override that target's default overlay (size, activation threshold, @@ -537,7 +537,7 @@ export interface DockviewOptions { ) => DroptargetOverlayModel | undefined; /** * Built-in screen-reader announcements of layout changes (a visually-hidden - * `aria-live` region narrating panel open/close etc.). On by default — + * `aria-live` region narrating panel open/close etc.). On by default; * set to `false` to disable, e.g. when the host app provides its own * announcement system. Honoured live via `updateOptions`. */ @@ -546,7 +546,7 @@ export interface DockviewOptions { * Localise or override the built-in announcement strings (the default * messages are English). Return a string to use it, `null` / `''` to * suppress that announcement, or `undefined` to keep the default. This is - * how non-English apps translate announcements — core ships no message + * how non-English apps translate announcements; core ships no message * catalog, only the default strings + this hook. */ getAnnouncement?: (event: LiveRegionEvent) => string | null | undefined; @@ -558,11 +558,11 @@ export interface DockviewOptions { */ announcer?: (event: AnnouncementEvent) => void; /** - * Translate / override the strings dockview speaks to assistive technology - * — both the LiveRegion announcements and the keyboard-docking narration. - * Provide any subset of {@link DockviewMessages}; unset entries keep the - * English defaults. (`getAnnouncement` still applies first, per-event, for - * announcements.) + * Translate / override the strings dockview speaks to assistive technology, + * covering both the LiveRegion announcements and the keyboard-docking + * narration. Provide any subset of {@link DockviewMessages}; unset entries + * keep the English defaults. (`getAnnouncement` still applies first, + * per-event, for announcements.) */ messages?: Partial; /** @@ -570,10 +570,10 @@ export interface DockviewOptions { * pass an object to override individual ones via `keymap`. Off by default * (opt-in while the feature matures). Enables: * - * - **Switch tab** within the focused group — `Ctrl`+`]` / `Ctrl`+`[`. - * - **Move focus between groups** — `F6` / `Shift`+`F6` (sequential) or + * - **Switch tab** within the focused group: `Ctrl`+`]` / `Ctrl`+`[`. + * - **Move focus between groups**: `F6` / `Shift`+`F6` (sequential) or * `Ctrl`+`Shift`+arrow keys (spatial: focus the group in that direction). - * - **Dock the active panel** without a mouse — `Ctrl`+`M` arms a two-phase + * - **Dock the active panel** without a mouse: `Ctrl`+`M` arms a two-phase * move (arrows cycle the target group with a live drop preview + * screen-reader narration, `Enter` docks, `Escape` cancels). * @@ -584,7 +584,7 @@ export interface DockviewOptions { keyboardNavigation?: boolean | KeyboardNavigationOptions; /** * Undo / redo for layout mutations (close / move / float / popout / add / - * maximize / tab-group changes). Off by default — set `{ enabled: true }` + * maximize / tab-group changes). Off by default; set `{ enabled: true }` * to record. Drive it via `api.undo()` / `api.redo()`; dockview binds no * keys itself (that's the host app's call, and collides with the keyboard * navigation keymap). Honoured live via `updateOptions`. @@ -623,11 +623,11 @@ export interface DockviewOptions { * Replace the built-in tab group color palette with a user-defined list. * * Each entry has an `id` (stored on `tabGroup.color` and serialized), - * a `value` (any CSS color expression — hex, rgb(), `var(...)`, etc.), + * a `value` (any CSS color expression: hex, rgb(), `var(...)`, etc.), * and an optional `label` shown in the context menu picker. * * If omitted, the default 9-color palette is used. The list fully - * replaces the defaults — there is no merge. + * replaces the defaults; there is no merge. */ tabGroupColors?: DockviewTabGroupColorEntry[]; /** @@ -651,7 +651,7 @@ export interface DockviewOptions { } export interface PinnedTabsOptions { - /** Master switch. Default: undefined (dormant — pinning is a no-op). */ + /** Master switch. Default: undefined (dormant; pinning is a no-op). */ enabled?: boolean; /** * `'inline'` (default) keeps pinned tabs first within the existing strip; @@ -661,14 +661,14 @@ export interface PinnedTabsOptions { mode?: 'inline' | 'separate-row'; /** * Render pinned tabs icon-only (title + close button hidden), VS-Code / - * Chrome style. Default false — dockview's default tab has no favicon, so + * Chrome style. Default false; dockview's default tab has no favicon, so * pinned tabs stay labelled (with a pin glyph) unless you opt in. Best * enabled alongside a custom tab renderer that shows an icon. */ compact?: boolean; /** * Drag a tab across the pin boundary to toggle its pinned state - * (VS-Code-style). Default false — dragging across the boundary is clamped + * (VS-Code-style). Default false; dragging across the boundary is clamped * back, matching Chrome, where pinning is an explicit action only. */ togglePinOnCrossBoundaryDrag?: boolean; @@ -690,7 +690,7 @@ export interface LayoutHistoryOptions { /** Max undo depth (bounded ring). Default `25`. */ depth?: number; /** Also record mutations originating from `DockviewApi` calls (the app's - * own programmatic changes). Default `false` — only user gestures. */ + * own programmatic changes). Default `false`; only user gestures. */ undoableProgrammaticMutations?: boolean; /** Clear the stacks when the whole layout is replaced via `fromJSON` / * `clear`. Default `true`. */ diff --git a/packages/dockview-core/src/dockview/popoutWindowService.ts b/packages/dockview-core/src/dockview/popoutWindowService.ts index 79fe60014..2320a3845 100644 --- a/packages/dockview-core/src/dockview/popoutWindowService.ts +++ b/packages/dockview-core/src/dockview/popoutWindowService.ts @@ -133,9 +133,9 @@ export class PopoutWindowService implements IPopoutWindowService { * The popout window's innerWidth/innerHeight are often 0/stale until it has * painted, and the nested gridview lays its children out to the size passed * to layout() (a plain group fills via CSS instead). To stop content - * rendering into a zero box until a manual resize — and to avoid the race a - * fixed number of animation frames had — observe the gridview element with - * a ResizeObserver created in the POPOUT window's OWN realm. A parent-realm + * rendering into a zero box until a manual resize, and to avoid the race a + * fixed number of animation frames had, observe the gridview element with + * a ResizeObserver created in the popout window's own realm. A parent-realm * observer fires unreliably across the window boundary; a same-realm one * fires reliably, including the initial observation once the window is * sized. diff --git a/packages/dockview-core/src/dockview/tabGroupAccent.ts b/packages/dockview-core/src/dockview/tabGroupAccent.ts index 5fb5ad9e8..77fc3c508 100644 --- a/packages/dockview-core/src/dockview/tabGroupAccent.ts +++ b/packages/dockview-core/src/dockview/tabGroupAccent.ts @@ -2,7 +2,7 @@ * A single entry in the tab-group color palette. * * `id` is the value stored on `ITabGroup.color` and serialized in - * `SerializedTabGroup.color`. `value` is any CSS color expression — a hex + * `SerializedTabGroup.color`. `value` is any CSS color expression: a hex * literal, an rgb()/hsl()/oklch() function, or a `var(...)` reference. * * The default palette ships with `var(--dv-tab-group-color-${id})` values so diff --git a/packages/dockview-core/src/dockview/tabGroupChipsService.ts b/packages/dockview-core/src/dockview/tabGroupChipsService.ts index 52b055d2a..80ab4de52 100644 --- a/packages/dockview-core/src/dockview/tabGroupChipsService.ts +++ b/packages/dockview-core/src/dockview/tabGroupChipsService.ts @@ -34,7 +34,7 @@ export class TabGroupChipsService implements ITabGroupChipsService { } dispose(): void { - // No internal state to tear down — emitters live on the host. + // No internal state to tear down; emitters live on the host. } } diff --git a/packages/dockview-core/src/dockview/theme.ts b/packages/dockview-core/src/dockview/theme.ts index 864f4a72d..f26b024aa 100644 --- a/packages/dockview-core/src/dockview/theme.ts +++ b/packages/dockview-core/src/dockview/theme.ts @@ -59,8 +59,8 @@ export interface DockviewTheme { /** * Controls tab drag-and-drop reorder animation style. * - * - `"smooth"`: tabs animate smoothly during drag-and-drop reorder — - * tabs slide apart to reveal the insertion gap, then animate to their + * - `"smooth"`: tabs animate smoothly during drag-and-drop reorder. They + * slide apart to reveal the insertion gap, then animate to their * final positions on drop (Chrome-like behavior). * - `"default"`: standard tab reorder behavior without animation. * diff --git a/packages/dockview-core/src/dockview/watermarkService.ts b/packages/dockview-core/src/dockview/watermarkService.ts index c7249265c..dc9d2cbf5 100644 --- a/packages/dockview-core/src/dockview/watermarkService.ts +++ b/packages/dockview-core/src/dockview/watermarkService.ts @@ -15,7 +15,7 @@ export interface IWatermarkHost { // Subscribe to BaseGrid-level add/remove (not the dockview-level // onDidAddGroup/onDidRemoveGroup) because BaseGrid fires even when // doRemoveGroup is called with skipDispose=true during floating/popout - // conversions — that's when a grid group disappears and the watermark + // conversions, which is when a grid group disappears and the watermark // needs to re-evaluate. The dockview-level events skip these. readonly onDidAdd: Event; readonly onDidRemove: Event; diff --git a/packages/dockview-core/src/dom.ts b/packages/dockview-core/src/dom.ts index a9c4b5662..1f67081cd 100644 --- a/packages/dockview-core/src/dom.ts +++ b/packages/dockview-core/src/dom.ts @@ -548,7 +548,7 @@ export function findRelativeZIndexParent(el: HTMLElement): HTMLElement | null { return tmp; } -/** Whether the user has requested reduced motion — the JS counterpart to the +/** Whether the user has requested reduced motion: the JS counterpart to the * `prefers-reduced-motion` media query, for animations driven in script. */ export function prefersReducedMotion(doc: Document = document): boolean { const mq = doc.defaultView?.matchMedia?.( @@ -569,7 +569,7 @@ export function resolveOpaqueBackground(element: HTMLElement): string { let el: HTMLElement | null = element; while (el) { const bg = win.getComputedStyle(el).backgroundColor; - // Skip `transparent` and any fully-transparent colour — a computed + // Skip `transparent` and any fully-transparent colour. A computed // `rgba(…, 0)` (e.g. `rgba(255,255,255,0)`) is see-through regardless of // its RGB, so it isn't an opaque backdrop. if (bg && bg !== 'transparent' && !/,\s*0\)\s*$/.test(bg)) { diff --git a/packages/dockview-core/src/events.ts b/packages/dockview-core/src/events.ts index eff80ad8c..fdbe44cb4 100644 --- a/packages/dockview-core/src/events.ts +++ b/packages/dockview-core/src/events.ts @@ -163,7 +163,7 @@ export class Emitter implements IDisposable { public fire(e: T): void { if (this._pauseTokens.size > 0) { - // while paused, the event is dropped entirely — `_last` is not + // while paused, the event is dropped entirely: `_last` is not // updated, so replay subscribers won't see values fired during a pause return; } diff --git a/packages/dockview-core/src/overlay/overlay.scss b/packages/dockview-core/src/overlay/overlay.scss index ed73c46b9..67ad90970 100644 --- a/packages/dockview-core/src/overlay/overlay.scss +++ b/packages/dockview-core/src/overlay/overlay.scss @@ -50,7 +50,7 @@ } } -// Drag-reveal edge indicator: a thin accent LINE hugging the content-area edge +// Drag-reveal edge indicator: a thin accent line hugging the content-area edge // in the direction a new edge group would dock. A line (not a fill) so it reads // differently from the split overlay; the colour is the theme's drag-over accent // so it matches the rest of the drop styling. Geometry (edge + extent) is set @@ -170,7 +170,7 @@ // The container is the backdrop behind its content. A single floating group // hides it entirely, but a nested floating layout exposes the gaps/sashes - // between groups — without a fill those gaps would be transparent. Mirror + // between groups, and without a fill those gaps would be transparent. Mirror // the docked backdrop (the dockview root uses --dv-group-view-background-color). background-color: var(--dv-group-view-background-color); @@ -351,7 +351,7 @@ } } -// Smart Guides — alignment lines + dock/merge drop-preview painted in the +// Smart Guides: alignment lines + dock/merge drop-preview painted in the // floating container while a float is dragged. The module positions + sizes // these inline; only the theming lives here (override the CSS vars to restyle). .dv-smart-guides { diff --git a/packages/dockview-core/src/overlay/overlay.ts b/packages/dockview-core/src/overlay/overlay.ts index 9a5ee1710..98a3c9cf0 100644 --- a/packages/dockview-core/src/overlay/overlay.ts +++ b/packages/dockview-core/src/overlay/overlay.ts @@ -333,7 +333,7 @@ export class Overlay extends CompositeDisposable { let hasMoved = false; this._dragCancelled = false; - // Snapshot once per drag — siblings don't move while this one drags. + // Snapshot once per drag; siblings don't move while this one drags. const siblingBoxes = this.options.transformDragPosition ? (this.options.getSiblingBoxes?.() ?? []) : []; @@ -348,7 +348,7 @@ export class Overlay extends CompositeDisposable { try { captureTarget.setPointerCapture(pointerId); } catch { - // ignore – non-fatal if the browser refuses capture + // ignore: non-fatal if the browser refuses capture } } @@ -376,7 +376,7 @@ export class Overlay extends CompositeDisposable { try { captureTarget.releasePointerCapture(pointerId); } catch { - // ignore – pointer may already be released + // ignore: pointer may already be released } } }, @@ -581,7 +581,7 @@ export class Overlay extends CompositeDisposable { try { resizeHandleElement.setPointerCapture(pointerId); } catch { - // ignore – non-fatal if the browser refuses capture + // ignore: non-fatal if the browser refuses capture } } @@ -782,7 +782,7 @@ export class Overlay extends CompositeDisposable { pointerId ); } catch { - // ignore – pointer may already be released + // ignore: pointer may already be released } } }, diff --git a/packages/dockview-core/src/overlay/overlayRenderContainer.ts b/packages/dockview-core/src/overlay/overlayRenderContainer.ts index cb5d5e6b8..63032461c 100644 --- a/packages/dockview-core/src/overlay/overlayRenderContainer.ts +++ b/packages/dockview-core/src/overlay/overlayRenderContainer.ts @@ -214,7 +214,7 @@ export class OverlayRenderContainer extends CompositeDisposable { // `forceVisible` / `clip` are sticky per-panel state owned by // the peek (set via `repositionPanelOverlay`). Read them at paint // time so an unrelated `resize()` (visibility / layout) can't - // clobber a force-shown, clipped peek panel back to hidden — a + // clobber a force-shown, clipped peek panel back to hidden. A // peeked panel's `isVisible` is false (its group is collapsed), // so without the sticky force it would render nothing. const forceVisible = entry.forceVisible ?? false; diff --git a/packages/dockview-core/src/theme.scss b/packages/dockview-core/src/theme.scss index 73a07f91d..d0ecd494c 100644 --- a/packages/dockview-core/src/theme.scss +++ b/packages/dockview-core/src/theme.scss @@ -1139,7 +1139,7 @@ } // When the header is at the bottom, the active-tab marker sits on the tab's -// top edge — the side nearest the content. (For a top header it sits on the +// top edge, the side nearest the content. (For a top header it sits on the // bottom edge; this overrides that.) The selector matches the full per-theme // active-marker chain so it still applies inside a theme. .dv-groupview.dv-groupview-header-bottom { diff --git a/packages/dockview-core/src/theme/_space-mixin.scss b/packages/dockview-core/src/theme/_space-mixin.scss index 1883aa2b2..52caaddcc 100644 --- a/packages/dockview-core/src/theme/_space-mixin.scss +++ b/packages/dockview-core/src/theme/_space-mixin.scss @@ -15,7 +15,7 @@ --dv-floating-titlebar-background-color: var( --dv-group-view-background-color ); - // Keep the handle seamless with the gap — no divider line below it. + // Keep the handle seamless with the gap: no divider line below it. --dv-floating-titlebar-border-bottom: none; box-sizing: border-box; @@ -69,7 +69,7 @@ // With a dedicated title bar the bar already frames the top of the card and // shares the inset/gap color, so the grid's top inset would double up into a - // tall empty band above the panels — drop it (keep left/right/bottom). + // tall empty band above the panels. Drop it (keep left/right/bottom). .dv-resize-container-with-titlebar > .dv-grid-view { padding-top: 0; } @@ -77,7 +77,7 @@ // The drag-handle bar is the top strip of the floating window's frame (same // color as the inset gap). Round its top corners so it follows the // container's rounded top. The nested groups below are complete, - // independently-rounded cards — do NOT flatten their tops (an unscoped + // independently-rounded cards, so don't flatten their tops (an unscoped // descendant rule here previously stripped the top border/rounding from // every nested group, not just a single merged one). .dv-resize-container-with-titlebar > .dv-floating-titlebar { diff --git a/packages/dockview-enterprise/README.md b/packages/dockview-enterprise/README.md index efb2c2c82..70cd964d4 100644 --- a/packages/dockview-enterprise/README.md +++ b/packages/dockview-enterprise/README.md @@ -14,8 +14,8 @@ gate. Importing the package self-registers all of them. npm install dockview-enterprise ``` -It depends on `dockview`; use it **instead of** `dockview` (not alongside) — -everything `dockview` exports is re-exported here. +It depends on `dockview`; use it **instead of** `dockview` (not alongside). Everything +`dockview` exports is re-exported here. ## Usage @@ -29,7 +29,7 @@ LicenseManager.setLicenseKey('your-license-key'); Merely importing `dockview-enterprise` registers the enterprise modules and the license check, so the feature options (`pinnedTabs`, `smartGuides`, …) become -available on every `DockviewComponent` — no explicit `registerModules` call is +available on every `DockviewComponent`. No explicit `registerModules` call is needed. Using a framework binding (`dockview-react` / `dockview-vue` / diff --git a/packages/dockview-enterprise/src/__tests__/advancedOverflow.spec.ts b/packages/dockview-enterprise/src/__tests__/advancedOverflow.spec.ts index 81dd66863..f8aa36f5a 100644 --- a/packages/dockview-enterprise/src/__tests__/advancedOverflow.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/advancedOverflow.spec.ts @@ -110,7 +110,7 @@ describe('matchesQuery', () => { }); }); -describe('OverflowListView — search scope', () => { +describe('OverflowListView: search scope', () => { afterEach(() => { document.body .querySelectorAll('.dv-tabs-overflow-container') @@ -182,7 +182,7 @@ describe('OverflowListView — search scope', () => { }); }); -describe('OverflowListView — pinned overflow section', () => { +describe('OverflowListView: pinned overflow section', () => { afterEach(() => { document.body .querySelectorAll('.dv-tabs-overflow-container') @@ -295,7 +295,7 @@ describe('OverflowListView — pinned overflow section', () => { }); }); -describe('OverflowListView — MRU ordering', () => { +describe('OverflowListView: MRU ordering', () => { afterEach(() => { document.body .querySelectorAll('.dv-tabs-overflow-container') @@ -326,7 +326,7 @@ describe('OverflowListView — MRU ordering', () => { }); }); -describe('OverflowListView — search filtering + keyboard', () => { +describe('OverflowListView: search filtering + keyboard', () => { beforeEach(() => jest.useFakeTimers()); afterEach(() => { jest.useRealTimers(); @@ -408,7 +408,7 @@ describe('OverflowListView — search filtering + keyboard', () => { // --- Full-component integration ----------------------------------------------- -describe('advanced overflow — full component integration', () => { +describe('advanced overflow: full component integration', () => { let container: HTMLElement; const make = (overflow: any): DockviewComponent => { @@ -470,7 +470,7 @@ describe('advanced overflow — full component integration', () => { dockview.addPanel({ id, component: 'default', title: id }) ); - // User activations — the UI wraps tab activation in `withOrigin('user')` + // User activations. The UI wraps tab activation in `withOrigin('user')` // (a bare `setActive()` is origin 'api' and must not reorder recency). dockview.withOrigin('user', () => panels[2].api.setActive()); // c dockview.withOrigin('user', () => panels[1].api.setActive()); // b (most recent) diff --git a/packages/dockview-enterprise/src/__tests__/autoEdgeGroups.spec.ts b/packages/dockview-enterprise/src/__tests__/autoEdgeGroups.spec.ts index 5dcea4b8f..cf4abad35 100644 --- a/packages/dockview-enterprise/src/__tests__/autoEdgeGroups.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/autoEdgeGroups.spec.ts @@ -18,7 +18,7 @@ class TestPanel implements IContentRenderer { const flush = (): Promise => new Promise((r) => setTimeout(r)); /** - * Drag-revealed, zero-footprint edges — the two-band drag-reveal affordance. A drag + * Drag-revealed, zero-footprint edges via a two-band drag-reveal affordance. A drag * toward a layout edge splits the widened root band into an outer "dock as edge * group" band (reveals a self-hiding edge group) and an inner "split the grid" * band (falls through to core's grid split). diff --git a/packages/dockview-enterprise/src/__tests__/autoHideEdgeGroups.spec.ts b/packages/dockview-enterprise/src/__tests__/autoHideEdgeGroups.spec.ts index d48df9b9d..0426cd672 100644 --- a/packages/dockview-enterprise/src/__tests__/autoHideEdgeGroups.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/autoHideEdgeGroups.spec.ts @@ -19,8 +19,8 @@ class TestPanel implements IContentRenderer { } /** - * Auto-hide ("pinnable") edge groups — VS tool-window model. A collapsed edge - * group's native tabs are CLICK triggers (no hover): click a tab → peek it as a + * Auto-hide ("pinnable") edge groups follow the VS tool-window model. A collapsed + * edge group's native tabs are click triggers (no hover): click a tab → peek it as a * non-reflowing overlay with a title bar (title + pin + close); click it again / * outside / Esc → hide; pin → dock; close → close the panel. */ diff --git a/packages/dockview-enterprise/src/__tests__/dropGuide.spec.ts b/packages/dockview-enterprise/src/__tests__/dropGuide.spec.ts index b28d83554..2403deaf0 100644 --- a/packages/dockview-enterprise/src/__tests__/dropGuide.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/dropGuide.spec.ts @@ -118,7 +118,7 @@ describe('drop guide', () => { test('fills the gaps between cells so the overlay does not blink out mid-traverse', () => { make(true); const r = service.resolver!; - // 200x100: the top cell ends at y=27 and the centre starts at y=31 — a + // 200x100: the top cell ends at y=27 and the centre starts at y=31, a // 4px gap that used to resolve to null (the overlay would disappear). A // pointer in the gap now snaps to whichever cell is nearer, so the // overlay stays on as the cursor crosses between cells. @@ -259,7 +259,7 @@ describe('drop guide', () => { content.querySelectorAll('.dv-drop-guide-cell-active') ).toHaveLength(1); - over(false, 'center'); // moves to the inner centre — only it is active + over(false, 'center'); // moves to the inner centre; only it is active const active = content.querySelectorAll('.dv-drop-guide-cell-active'); expect(active).toHaveLength(1); expect(active[0].classList).toContain('dv-drop-guide-cell-center'); @@ -320,7 +320,7 @@ describe('drop guide', () => { group, } as DockviewWillShowOverlayLocationEvent); - // 9 cells but inner+outer of a direction share a position — the veto + // 9 cells but inner+outer of a direction share a position, so the veto // (which can fire onUnhandledDragOver) must run at most once per position. expect(gateCalls.length).toBe(new Set(gateCalls).size); expect(gateCalls.length).toBeLessThanOrEqual(5); diff --git a/packages/dockview-enterprise/src/__tests__/keyboardDocking.spec.ts b/packages/dockview-enterprise/src/__tests__/keyboardDocking.spec.ts index a73b14900..594c16870 100644 --- a/packages/dockview-enterprise/src/__tests__/keyboardDocking.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/keyboardDocking.spec.ts @@ -6,7 +6,7 @@ import { KeyboardDockingModule } from '../keyboardDockingService'; // Keyboard docking (spatial focus + Ctrl+M move mode) ships in the default // `Modules` bundle, but register it explicitly here so this spec is -// self-contained regardless of the jest setup — `registerModules` dedups by +// self-contained regardless of the jest setup. `registerModules` dedups by // name, so this is a no-op when the bundle is already registered. registerModules([KeyboardDockingModule]); @@ -24,7 +24,7 @@ class TestPanel implements IContentRenderer { } /** - * KeyboardNavigationModule — keyboard docking thin vertical. Ctrl+M enters move + * KeyboardNavigationModule: keyboard docking thin vertical. Ctrl+M enters move * mode, arrows cycle the target, Enter docks (tab-into), Escape cancels. */ describe('accessibility: keyboard docking', () => { @@ -222,7 +222,7 @@ describe('accessibility: keyboard docking', () => { fireEvent.keyDown(dockview.element, { key: 'm', ctrlKey: true }); expect(region().textContent).toContain('Moving P2'); - // float as a terminal action — no edge phase + // float as a terminal action, no edge phase fireEvent.keyDown(dockview.element, { key: 'f', ctrlKey: true, @@ -263,7 +263,7 @@ describe('accessibility: keyboard docking', () => { }); /** - * Switch tabs within the focused group by keyboard — Ctrl+] / Ctrl+[ cycle + * Switch tabs within the focused group by keyboard. Ctrl+] / Ctrl+[ cycle * the active group's panels (wrapping round), driven by the rebindable keymap. */ describe('accessibility: tab switching', () => { @@ -353,7 +353,7 @@ describe('accessibility: tab switching', () => { }); /** - * Pin / unpin the active panel by keyboard — Ctrl+Shift+Enter by default, + * Pin / unpin the active panel by keyboard, Ctrl+Shift+Enter by default, * rebindable via `keymap.togglePin`. Inert unless `pinnedTabs.enabled`. */ describe('accessibility: toggle pin', () => { @@ -416,7 +416,7 @@ describe('accessibility: toggle pin', () => { make({ keymap: { togglePin: 'alt+p' } }, { enabled: true }); twoTabs(); - // default binding overridden — Ctrl+Shift+Enter does nothing now + // default binding overridden, so Ctrl+Shift+Enter does nothing now pressTogglePin(); expect(dockview.activePanel?.api.isPinned).toBe(false); @@ -520,7 +520,7 @@ describe('accessibility: focus the tab strip', () => { }); /** - * Move focus between groups by keyboard — F6 / Shift+F6 step to the next / + * Move focus between groups by keyboard. F6 / Shift+F6 step to the next / * previous group in gridview order (wrapping round). */ describe('accessibility: group focus navigation', () => { @@ -593,7 +593,7 @@ describe('accessibility: group focus navigation', () => { }); /** - * Spatial group focus — Ctrl+Shift+Arrow focuses the group geometrically in + * Spatial group focus. Ctrl+Shift+Arrow focuses the group geometrically in * that direction. jsdom has no layout, so a clean 2x2 grid is mocked via * getBoundingClientRect. */ @@ -703,7 +703,7 @@ describe('accessibility: spatial group focus', () => { }); /** - * L4 focus management — closing a panel/group that holds focus must hand it to + * L4 focus management: closing a panel/group that holds focus must hand it to * a deterministic neighbour, never drop it on . The service snapshots * focus before the remove and restores after if it was pulled out of the dock. */ @@ -721,7 +721,7 @@ describe('accessibility: focus restore on close', () => { dockview.layout(1000, 1000); }; - // one group, two tabs — only the active tab carries aria-selected="true" + // one group, two tabs; only the active tab carries aria-selected="true" const twoTabs = (): void => { dockview.addPanel({ id: 'p1', component: 'default', title: 'P1' }); dockview.addPanel({ id: 'p2', component: 'default', title: 'P2' }); @@ -741,7 +741,7 @@ describe('accessibility: focus restore on close', () => { test('returns focus to a neighbour when the close pulls it out of the dock', () => { make(true); twoTabs(); // p2 active - activeTab().focus(); // focus p2's tab — a real in-dock focusable element + activeTab().focus(); // focus p2's tab, a real in-dock focusable element expect(container.contains(document.activeElement)).toBe(true); const group = dockview.activeGroup!; @@ -781,7 +781,7 @@ describe('accessibility: focus restore on close', () => { }); /** - * L4 — focus across maximize/restore. Maximizing hides sibling groups via + * L4 focus across maximize/restore. Maximizing hides sibling groups via * visibility toggling and leaves the maximized group's DOM in place, so the * active panel keeps focus across the transition. This guards against a future * change that re-renders on maximize (which would silently drop focus). @@ -845,7 +845,7 @@ describe('accessibility: focus across maximize', () => { // jsdom doesn't blur a hidden element (the whole reason this case slips // through in unit-land), so emulate the real browser dropping focus to - // when g1 is hidden — during the will phase, after the service + // when g1 is hidden, during the will phase, after the service // has already snapshotted that focus was inside the dock. const sub = dockview.onWillMutateLayout((e) => { if (e.kind === 'maximize') { @@ -865,7 +865,7 @@ describe('accessibility: focus across maximize', () => { }); /** - * L4 — Esc inside a floating group returns focus to the invoking control (the + * L4: Esc inside a floating group returns focus to the invoking control (the * last thing focused in the main dock). Runs in the bubble phase and respects * defaultPrevented so panel content that uses Esc keeps priority. */ @@ -963,7 +963,7 @@ class ButtonPanel implements IContentRenderer { } /** - * L4 — Tab is trapped within a floating group: at the last tabbable Tab wraps + * L4: Tab is trapped within a floating group. At the last tabbable Tab wraps * to the first, at the first Shift+Tab wraps to the last, so focus doesn't leak * to the grid behind the (non-modal) float. */ @@ -1053,7 +1053,7 @@ describe('accessibility: floating group Tab containment', () => { }); /** - * L5 i18n — the keyboard-docking narration flows through the same `messages` + * L5 i18n: the keyboard-docking narration flows through the same `messages` * catalog as the announcements, so a translator owns every string. */ describe('accessibility: docking narration i18n', () => { diff --git a/packages/dockview-enterprise/src/__tests__/keyboardNavigation.spec.ts b/packages/dockview-enterprise/src/__tests__/keyboardNavigation.spec.ts index ef33a955e..af716cbb3 100644 --- a/packages/dockview-enterprise/src/__tests__/keyboardNavigation.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/keyboardNavigation.spec.ts @@ -35,7 +35,7 @@ class PanelContentPartTest implements IContentRenderer { } /** - * Layer 1 of the accessibility pack — the free WAI-ARIA Tabs baseline that + * Layer 1 of the accessibility pack: the free WAI-ARIA Tabs baseline that * ships in core. Asserts roles, states and the tab <-> tabpanel relationships. */ describe('accessibility: WAI-ARIA tabs baseline', () => { @@ -118,7 +118,7 @@ describe('accessibility: WAI-ARIA tabs baseline', () => { const activeTabId2 = selectedBefore[0].id; expect(tabpanel.getAttribute('aria-labelledby')).toBe(activeTabId2); - // activate panel1 — selection + labelling must move with it. + // activate panel1; selection + labelling must move with it. panel1.api.setActive(); const selectedAfter = realTabs().filter( @@ -204,7 +204,7 @@ describe('accessibility: WAI-ARIA tabs baseline', () => { const region = container.querySelector('.dv-groupview')!; expect(region.getAttribute('aria-label')).toBe('First'); - // An untitled active panel must not leave a stale name behind — the + // An untitled active panel must not leave a stale name behind: the // attribute is removed rather than set to an empty string. panel1.api.setTitle(''); expect(region.getAttribute('aria-label')).toBeNull(); @@ -238,7 +238,7 @@ describe('accessibility: WAI-ARIA tabs baseline', () => { }); /** - * Layer 2 — the free WAI-ARIA Tabs keyboard pattern within a strip + * Layer 2: the free WAI-ARIA Tabs keyboard pattern within a strip * (roving tabindex + arrow / Home / End navigation + manual activation). */ describe('accessibility: tab keyboard navigation', () => { @@ -266,7 +266,7 @@ describe('accessibility: tab keyboard navigation', () => { const realTabs = (): HTMLElement[] => Array.from(container.querySelectorAll('.dv-tab')) as HTMLElement[]; - test('roving tabindex — only the active tab is in the tab order', () => { + test('roving tabindex: only the active tab is in the tab order', () => { dockview.addPanel({ id: 'p1', component: 'default' }); dockview.addPanel({ id: 'p2', component: 'default' }); // p2 active diff --git a/packages/dockview-enterprise/src/__tests__/layoutHistory.spec.ts b/packages/dockview-enterprise/src/__tests__/layoutHistory.spec.ts index d4997f0e4..fba38c0fb 100644 --- a/packages/dockview-enterprise/src/__tests__/layoutHistory.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/layoutHistory.spec.ts @@ -24,7 +24,7 @@ class TestPanel implements IContentRenderer { } /** - * LayoutHistory (Phase B) — snapshot-based undo/redo of discrete layout + * LayoutHistory (Phase B): snapshot-based undo/redo of discrete layout * mutations. Opt-in via `layoutHistory.enabled`. Only user-originated mutations * are recorded by default; `undoableProgrammaticMutations` opts api calls in. */ @@ -142,13 +142,13 @@ describe('LayoutHistory undo/redo', () => { test('programmatic (api-origin) mutations are excluded by default', () => { const d = make({ enabled: true }); - // api-origin mutation — should not enter the user undo stack + // api-origin mutation; should not enter the user undo stack d.withOrigin('api', () => d.addPanel({ id: 'p1', component: 'default' }) ); expect(d.canUndo).toBe(false); - // user-origin mutation — recorded + // user-origin mutation, recorded d.addPanel({ id: 'p2', component: 'default' }); expect(d.canUndo).toBe(true); @@ -281,7 +281,7 @@ describe('LayoutHistory resize coalescing', () => { const svc = new LayoutHistoryService(h); seed(h); - // a "drag" — several pings, each a slightly different layout + // a "drag": several pings, each a slightly different layout h.snapshot = 1; h.layout.fire(); h.snapshot = 2; @@ -309,7 +309,7 @@ describe('LayoutHistory resize coalescing', () => { h.snapshot = 1; h.layout.fire(); // open a resize run (before=0) - // a discrete close arrives mid-window — must close the resize run first + // a discrete close arrives mid-window, so it must close the resize run first h.will.fire({ kind: 'remove', origin: 'user' }); h.snapshot = 2; h.did.fire({ kind: 'remove', origin: 'user' }); @@ -349,7 +349,7 @@ describe('LayoutHistory resize coalescing', () => { h.will.fire({ kind: 'add', origin: 'user' }); h.snapshot = 1; h.did.fire({ kind: 'add', origin: 'user' }); - h.layout.fire(); // settle — must NOT open a resize run + h.layout.fire(); // settle, must not open a resize run jest.advanceTimersByTime(1000); // only the discrete add is recorded diff --git a/packages/dockview-enterprise/src/__tests__/moduleRemovability.spec.ts b/packages/dockview-enterprise/src/__tests__/moduleRemovability.spec.ts index 155d09e1c..0956d9604 100644 --- a/packages/dockview-enterprise/src/__tests__/moduleRemovability.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/moduleRemovability.spec.ts @@ -27,7 +27,7 @@ class TestPanel implements IContentRenderer { * absent, the core component must still construct, run the base layout * operations (add / split / maximize / serialize / remove) and dispose without * throwing. That is the contract that keeps the package boundary a - * lift-and-move — if removing a module breaks core, the boundary is leaking. + * lift-and-move: if removing a module breaks core, the boundary is leaking. * * Modules are wired through the process-global registry exactly how `dockview` * ships them (`registerModules(Modules)`); the component is then constructed @@ -105,7 +105,7 @@ describe('extracted module removability', () => { dockview.dispose(); }; - test('baseline — all extracted modules present', () => { + test('baseline: all extracted modules present', () => { expect(() => exercise(null)).not.toThrow(); }); diff --git a/packages/dockview-enterprise/src/__tests__/mruTracker.spec.ts b/packages/dockview-enterprise/src/__tests__/mruTracker.spec.ts index c4734e8b3..de9f2b656 100644 --- a/packages/dockview-enterprise/src/__tests__/mruTracker.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/mruTracker.spec.ts @@ -83,7 +83,7 @@ describe('MruTracker', () => { * The `origin` filter lives in the service (it reads the event payload), so it * is exercised through `AdvancedOverflowService.handleActivePanelChange`. */ -describe('AdvancedOverflowService — MRU origin filter', () => { +describe('AdvancedOverflowService: MRU origin filter', () => { const makeGroup = (id: string, panelIds: string[]): any => ({ id, panels: panelIds.map((pid) => ({ id: pid })), @@ -101,11 +101,11 @@ describe('AdvancedOverflowService — MRU origin filter', () => { const service = new AdvancedOverflowService({} as any); service.attachToGroup(makeGroup('g', ['a', 'b', 'c'])); - // Programmatic (origin 'api') — must NOT reorder. + // Programmatic (origin 'api'); must not reorder. service.handleActivePanelChange(activation('c', 'g', 'api') as any); expect(service.mru.order('g')).toEqual(['a', 'b', 'c']); - // User gesture — reorders. + // User gesture, reorders. service.handleActivePanelChange(activation('c', 'g', 'user') as any); expect(service.mru.order('g')).toEqual(['c', 'a', 'b']); diff --git a/packages/dockview-enterprise/src/__tests__/multiRowTabs.spec.ts b/packages/dockview-enterprise/src/__tests__/multiRowTabs.spec.ts index 9b81a974a..c0a38c8bb 100644 --- a/packages/dockview-enterprise/src/__tests__/multiRowTabs.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/multiRowTabs.spec.ts @@ -55,7 +55,7 @@ function stampCols(list: HTMLElement, lefts: number[]): void { /** * Stamp synthetic per-tab `offsetHeight`s (in DOM order) so the controller's * uniform-vertical-tab-height measurement (max natural tab height) can be - * exercised without real layout — jsdom reports 0 for every offset. + * exercised without real layout, since jsdom reports 0 for every offset. */ function stampHeights(list: HTMLElement, heights: number[]): void { list.querySelectorAll('.dv-tab').forEach((el, i) => { @@ -69,10 +69,10 @@ function stampHeights(list: HTMLElement, heights: number[]): void { const VERTICAL_TAB_HEIGHT_VAR = '--dv-wrap-vertical-tab-height'; /** - * Multi-row (wrapping) tabs — Phase 2 (wrap render mode). The module toggles the + * Multi-row (wrapping) tabs, Phase 2 (wrap render mode). The module toggles the * `.dv-tabs-container--wrap` class on a group's tab list and relayouts on * row-count change. The actual wrapping geometry (rows, header growth, content - * shrink) is e2e-only — jsdom has no layout — so these tests cover the + * shrink) is e2e-only (jsdom has no layout), so these tests cover the * deterministic wiring: class application, gating, and cleanup. */ describe('multi-row tabs (wrap mode)', () => { @@ -106,7 +106,7 @@ describe('multi-row tabs (wrap mode)', () => { dockview.dispose(); }); - test('default (no overflow) leaves the strip single-row — no wrap class', () => { + test('default (no overflow) leaves the strip single-row: no wrap class', () => { const dockview = make(); const panel = dockview.addPanel({ id: 'a', component: 'default' }); @@ -117,7 +117,7 @@ describe('multi-row tabs (wrap mode)', () => { dockview.dispose(); }); - test("mode: 'dropdown' leaves the strip single-row — no wrap class", () => { + test("mode: 'dropdown' leaves the strip single-row: no wrap class", () => { const dockview = make({ mode: 'dropdown' }); const panel = dockview.addPanel({ id: 'a', component: 'default' }); @@ -293,14 +293,14 @@ describe('multi-row tabs (wrap mode)', () => { } const list = first.group.model.tabsListElement; - // Two rows only — within the 3-row cap, so no surplus. + // Two rows only, within the 3-row cap, so no surplus. stampRows(list, [0, 0, 44, 44]); const spy = jest.spyOn(dockview, 'setForcedOverflow'); dockview.updateOptions({ overflow: { mode: 'wrap', maxRows: 3 } }); // Either not called (set unchanged from empty) or called with an - // all-false predicate — never forcing a real panel out. + // all-false predicate, never forcing a real panel out. for (const call of spy.mock.calls) { const forced = call[1]; expect(['p0', 'p1', 'p2', 'p3'].some((id) => forced(id))).toBe( @@ -375,7 +375,7 @@ describe('multi-row tabs (wrap mode)', () => { }); /** - * Vertical (edge-group) wrap headers can't size their width from CSS alone — + * Vertical (edge-group) wrap headers can't size their width from CSS alone: * the strip wraps on its indefinite percentage height, so flex intrinsic * sizing resolves the header `auto` width for a single column and the surplus * columns overflow. The controller compensates by pinning the header width to @@ -467,7 +467,7 @@ describe('multi-row tabs (wrap mode)', () => { dockview.updateOptions({ overflow: { mode: 'wrap' } }); expect(header.style.width).toBe('70px'); - // Flip to a horizontal header — its height stays CSS-driven, so the + // Flip to a horizontal header; its height stays CSS-driven, so the // explicit width must be released. first.group.api.setHeaderPosition('top'); expect(header.style.width).toBe(''); @@ -491,7 +491,7 @@ describe('multi-row tabs (wrap mode)', () => { dockview.updateOptions({ overflow: { mode: 'wrap' } }); expect(header.style.width).toBe('70px'); - // Tear wrap down — the pinned width must be removed with the wrap classes. + // Tear wrap down; the pinned width must be removed with the wrap classes. dockview.updateOptions({ overflow: { mode: 'dropdown' } }); expect(header.style.width).toBe(''); @@ -529,7 +529,7 @@ describe('multi-row tabs (wrap mode)', () => { dockview.updateOptions({ overflow: { mode: 'wrap' } }); - // Horizontal rows already share the fixed row height — no pin. + // Horizontal rows already share the fixed row height, so no pin. expect(list.style.getPropertyValue(VERTICAL_TAB_HEIGHT_VAR)).toBe(''); dockview.dispose(); @@ -589,7 +589,7 @@ describe('multi-row tabs (wrap mode)', () => { }); }); -/** Mock a tab's layout geometry — jsdom reports 0 for every offset. */ +/** Mock a tab's layout geometry; jsdom reports 0 for every offset. */ function setGeometry( el: HTMLElement, top: number, @@ -669,7 +669,7 @@ describe('findVerticalNeighbour', () => { }); /** - * Cross-row keyboard navigation — Arrow Up/Down move the roving focus between + * Cross-row keyboard navigation: Arrow Up/Down move the roving focus between * wrapped rows. Only active while the strip is wrapping a horizontal header; * jsdom has no layout, so tab geometry is mocked (real wrapping is e2e). */ @@ -750,7 +750,7 @@ describe('multi-row tabs: cross-row keyboard navigation', () => { }); test('is inert when the strip is not wrapping (no cross-row jump)', () => { - const dockview = make(); // dropdown overflow — no wrap class, no listener + const dockview = make(); // dropdown overflow, no wrap class, no listener const tabs = sixTabsTwoRows(dockview); expect( dockview.activeGroup!.model.tabsListElement.classList.contains( @@ -762,7 +762,7 @@ describe('multi-row tabs: cross-row keyboard navigation', () => { fireEvent.keyDown(tabs[1], { key: 'ArrowDown' }); // core owns Left/Right for a horizontal strip and ignores Up/Down, so - // focus stays put — our cross-row handler never ran. + // focus stays put; our cross-row handler never ran. expect(document.activeElement).toBe(tabs[1]); dockview.dispose(); @@ -778,9 +778,9 @@ describe('multi-row tabs: cross-row keyboard navigation', () => { expect(list.classList.contains('dv-tabs-container-vertical')).toBe( true ); - // DV-14: wrap IS active on a vertical header now (columns). The cross-row - // Arrow Up/Down handler is horizontal-only, though — it re-checks the - // vertical guard and no-ops — so roving focus does not jump between + // DV-14: wrap is active on a vertical header now (columns). The cross-row + // Arrow Up/Down handler is horizontal-only, though: it re-checks the + // vertical guard and no-ops, so roving focus does not jump between // columns via Up/Down here. expect(list.classList.contains(WRAP_CLASS)).toBe(true); @@ -809,7 +809,7 @@ describe('multi-row tabs: cross-row keyboard navigation', () => { const dockview = make({ mode: 'wrap' }); const tabs = sixTabsTwoRows(dockview); - // turn wrap off — the capture listener must be removed + // turn wrap off; the capture listener must be removed dockview.updateOptions({ overflow: { mode: 'dropdown' } }); tabs[1].focus(); diff --git a/packages/dockview-enterprise/src/__tests__/pinnedTabs.spec.ts b/packages/dockview-enterprise/src/__tests__/pinnedTabs.spec.ts index f488b478d..ee62eddc9 100644 --- a/packages/dockview-enterprise/src/__tests__/pinnedTabs.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/pinnedTabs.spec.ts @@ -27,12 +27,12 @@ class TestPanel implements IContentRenderer { } /** - * Pinned tabs (Phase 1 — model + ordering). Pinned tabs render before all + * Pinned tabs (Phase 1: model + ordering). Pinned tabs render before all * unpinned tabs in their group; pin order is stable (pin appends to the pinned * block, unpin returns to the start of the unpinned block). Owned by the * PinnedTabs module and dormant unless `pinnedTabs.enabled` is set. */ -describe('pinned tabs — ordering math', () => { +describe('pinned tabs: ordering math', () => { const isPinnedIn = (pinned: string[]) => (id: string): boolean => @@ -78,7 +78,7 @@ describe('pinned tabs — ordering math', () => { }); }); -describe('pinned tabs — row reorder index math', () => { +describe('pinned tabs: row reorder index math', () => { // Three tabs, 20px wide, laid out at x = [0, 20, 40] → midpoints [10, 30, 50]. const midpoints = [10, 30, 50]; @@ -113,7 +113,7 @@ describe('pinned tabs — row reorder index math', () => { }); }); -describe('pinned tabs — integration', () => { +describe('pinned tabs: integration', () => { let container: HTMLElement; const make = ( @@ -156,7 +156,7 @@ describe('pinned tabs — integration', () => { c.api.setPinned(true); expect(tabEl(c).classList.contains('dv-tab--pinned')).toBe(true); - // Default is labelled — not compact. + // Default is labelled, not compact. expect(tabEl(c).classList.contains('dv-tab--pinned-compact')).toBe( false ); @@ -358,7 +358,7 @@ describe('pinned tabs — integration', () => { c.api.setPinned(true); expect(predicate('c')).toBe(true); - // A close is not an unpin — the id must still be pruned so it can't + // A close is not an unpin; the id must still be pruned so it can't // linger in the exclusion set and mis-exclude a future reused id. c.api.close(); expect(predicate('c')).toBe(false); @@ -436,7 +436,7 @@ describe('pinned tabs — integration', () => { }); }); -describe('pinned tabs — reorder guard', () => { +describe('pinned tabs: reorder guard', () => { const makeService = (pinnedTabs: unknown): PinnedTabsService => { const stub: any = () => ({ dispose() {} }); return new PinnedTabsService({ @@ -567,7 +567,7 @@ describe('pinned tabs — reorder guard', () => { }); // A drag that originated in the pinned second row always flips (unpins) a - // drop past the boundary — the row is the only handle on the tab, so a + // drop past the boundary: the row is the only handle on the tab, so a // drag-out is a deliberate unpin regardless of the clamp/flip option. describe('row-originated drag (unpin-by-drag-out)', () => { test('a drag out of the row unpins even in clamp mode', async () => { @@ -582,7 +582,7 @@ describe('pinned tabs — reorder guard', () => { ]); svc.beginRowDrag('p'); - // Not clamped back to the boundary — the drop index is honoured… + // Not clamped back to the boundary: the drop index is honoured… expect(svc.resolveDropIndex(g, 'p', 1)).toBe(1); await Promise.resolve(); // …and the panel unpins. @@ -602,7 +602,7 @@ describe('pinned tabs — reorder guard', () => { svc.beginRowDrag('p'); svc.endRowDrag(); - // Back to clamp — a pinned tab is pinned-clamped to the boundary. + // Back to clamp: a pinned tab is pinned-clamped to the boundary. expect(svc.resolveDropIndex(g, 'p', 1)).toBe(0); expect(setPinned).not.toHaveBeenCalled(); }); @@ -625,7 +625,7 @@ describe('pinned tabs — reorder guard', () => { }); }); -describe('pinned tabs — serialization', () => { +describe('pinned tabs: serialization', () => { const containers: HTMLElement[] = []; const make = ( @@ -713,7 +713,7 @@ describe('pinned tabs — serialization', () => { }); }); -describe('pinned tabs — separate-row mode', () => { +describe('pinned tabs: separate-row mode', () => { let container: HTMLElement; const make = ( @@ -972,7 +972,7 @@ describe('pinned tabs — separate-row mode', () => { b.api.setPinned(true); // both pinned const order = () => a.api.group.model.panels.map((p) => p.id); - // 'b' is already pinned — dropping its (hidden) main tab is a no-op. + // 'b' is already pinned, so dropping its (hidden) main tab is a no-op. const moveTo = jest.spyOn(b.api, 'moveTo'); dragMainTabIntoRow(b, 999); @@ -1007,7 +1007,7 @@ describe('pinned tabs — separate-row mode', () => { a.api.setPinned(true); expect(rowTabs().map((el) => el.textContent)).toEqual(['a']); - // A second group, then move the pinned panel into it — no pin-change + // A second group, then move the pinned panel into it. No pin-change // event fires, only onDidAddPanel on the destination group. const z = dockview.addPanel({ id: 'z', diff --git a/packages/dockview-enterprise/src/__tests__/smartGuides.spec.ts b/packages/dockview-enterprise/src/__tests__/smartGuides.spec.ts index c3555097d..2656da095 100644 --- a/packages/dockview-enterprise/src/__tests__/smartGuides.spec.ts +++ b/packages/dockview-enterprise/src/__tests__/smartGuides.spec.ts @@ -19,7 +19,7 @@ const NO_MODIFIERS: DragModifiers = { }; /** - * Smart Guides — independent X/Y edge + center snapping against other floats and + * Smart Guides: independent X/Y edge + center snapping against other floats and * the container, with engage/release hysteresis. * * Driven at the service boundary with a mock host + synthetic drag contexts: @@ -41,7 +41,7 @@ describe('smart guides', () => { target: DockviewGroupPanel; position: SmartGuidesSnapPosition; }[]; - // Distinct identity per drag — the service keys per-drag state by group. + // Distinct identity per drag; the service keys per-drag state by group. const group = {} as DockviewGroupPanel; const make = ( @@ -88,7 +88,7 @@ describe('smart guides', () => { container.querySelectorAll('.dv-smart-guide') ).filter((l) => l.style.display === 'block'); - // Float-only options — isolate from the container edges that are on by default. + // Float-only options: isolate from the container edges that are on by default. const floatsOnly = ( extra: SmartGuidesOptions = {} ): SmartGuidesOptions => ({ @@ -104,7 +104,7 @@ describe('smart guides', () => { test('snaps a float left edge to another float left edge within snapDistance', () => { make({}); const other: Box = { left: 100, top: 50, width: 200, height: 150 }; - // dragged left edge at 106 — 6px from the other float's left edge (100). + // dragged left edge at 106, 6px from the other float's left edge (100). const result = service.transformFloatingGroupDrag( ctx({ left: 106, top: 400, width: 50, height: 50 }, [other]) ); @@ -119,7 +119,7 @@ describe('smart guides', () => { test('snaps the top edge (Y axis) and draws a horizontal guide', () => { make(floatsOnly()); const other: Box = { left: 100, top: 200, width: 200, height: 150 }; - // top edge at 195 — 5px from the other float's top (200); far on X. + // top edge at 195, 5px from the other float's top (200); far on X. const result = service.transformFloatingGroupDrag( ctx({ left: 600, top: 195, width: 50, height: 50 }, [other]) ); @@ -131,7 +131,7 @@ describe('smart guides', () => { expect(lines[0].style.height).toBe('1px'); }); - test('resolves X and Y independently — two simultaneous guides', () => { + test('resolves X and Y independently: two simultaneous guides', () => { make(floatsOnly()); // One neighbour: align the dragged float's left edge AND top edge to it. const other: Box = { left: 100, top: 100, width: 200, height: 150 }; @@ -171,7 +171,7 @@ describe('smart guides', () => { test('snaps centers together', () => { make(floatsOnly()); const other: Box = { left: 100, top: 50, width: 200, height: 150 }; - // dragged center 202 vs the other float centre 200 — only the centres + // dragged center 202 vs the other float centre 200; only the centres // line up (no edge is in range). const result = service.transformFloatingGroupDrag( ctx({ left: 172, top: 400, width: 60, height: 50 }, [other]) @@ -190,7 +190,7 @@ describe('smart guides', () => { expect(visibleLines()[0].style.left).toBe('20px'); }); - test('hysteresis — stays engaged within release, frees past it (no oscillation)', () => { + test('hysteresis: stays engaged within release, frees past it (no oscillation)', () => { make(floatsOnly()); const other: Box = { left: 100, top: 50, width: 200, height: 150 }; const at = (left: number) => @@ -202,7 +202,7 @@ describe('smart guides', () => { expect(at(100)).toEqual({ top: 400, left: 100 }); // 10px away (> snapDistance 8, < snapDistance+release 12): stays snapped expect(at(110)).toEqual({ top: 400, left: 100 }); - // 13px away (> 12): releases — and is now out of the 8px engage range + // 13px away (> 12): releases, and is now out of the 8px engage range expect(at(113)).toBeUndefined(); }); @@ -225,7 +225,7 @@ describe('smart guides', () => { ).toBeUndefined(); }); - test('no snap outside snapDistance — pass-through, no guides', () => { + test('no snap outside snapDistance: pass-through, no guides', () => { make({}); const other: Box = { left: 100, top: 50, width: 200, height: 150 }; const result = service.transformFloatingGroupDrag( @@ -254,7 +254,7 @@ describe('smart guides', () => { expect(visibleLines()[0].style.left).toBe('100px'); }); - test('inert when `smartGuides` is unset — no overlay, no adjustment', () => { + test('inert when `smartGuides` is unset: no overlay, no adjustment', () => { make(undefined); const result = service.transformFloatingGroupDrag( ctx({ left: 106, top: 400, width: 50, height: 50 }, [ @@ -307,8 +307,8 @@ describe('smart guides', () => { ctx({ left: 106, top: 400, width: 50, height: 50 }, others) ); - // A later frame whose `others` snapshot has drifted must NOT rebuild the - // candidate set — the float at x=100 is still the snap target. + // A later frame whose `others` snapshot has drifted must not rebuild the + // candidate set; the float at x=100 is still the snap target. const result = service.transformFloatingGroupDrag( ctx({ left: 104, top: 400, width: 50, height: 50 }, [ { left: 500, top: 50, width: 200, height: 150 }, @@ -323,7 +323,7 @@ describe('smart guides', () => { const preview = (): HTMLElement | null => container.querySelector('.dv-smart-guide-preview'); // Disable alignment (no float/container candidates) so the snapped box is - // the raw proposed box — the snap-together geometry is then exact. + // the raw proposed box, so the snap-together geometry is then exact. const noAlign = (extra: SmartGuidesOptions = {}): SmartGuidesOptions => ({ snapTargets: { floats: false, container: false }, ...extra, @@ -496,7 +496,7 @@ describe('smart guides', () => { make({ snapTargets: { floats: false, container: false, splitters: true }, }); - // a collapsed sash measures 0×0 — must not become a phantom line at x=0 + // a collapsed sash measures 0×0, so it must not become a phantom line at x=0 splitterRects = [{ left: 0, top: 0, width: 0, height: 0 }]; expect( service.transformFloatingGroupDrag( @@ -540,7 +540,7 @@ describe('smart guides', () => { test('updateOptions merges an override at runtime', () => { make(floatsOnly()); const other: Box = { left: 100, top: 50, width: 200, height: 150 }; - // 25px away — outside the default 8px, inside an overridden 30px. + // 25px away: outside the default 8px, inside an overridden 30px. service.updateOptions({ snapDistance: 30 }); expect( service.transformFloatingGroupDrag( @@ -614,9 +614,9 @@ describe('smart guides', () => { }); test('top-aligning a float off to the side of a target is not a merge', () => { - // Wide float, tops flush, ≥50% horizontal overlap of the narrow target — - // but its CENTRE is past the target's edge, so it is an alignment, not a - // tabset stack. Must NOT suggest or commit a merge. + // Wide float, tops flush, ≥50% horizontal overlap of the narrow target, + // but its centre is past the target's edge, so it is an alignment, not a + // tabset stack. Must not suggest or commit a merge. const t: Box = { left: 100, top: 100, width: 100, height: 200 }; make(noAlign(), [{ group: targetGroup, box: t }]); @@ -630,7 +630,7 @@ describe('smart guides', () => { }); test('`showGuides: false` still previews + commits a pending merge', () => { - // showGuides hides alignment LINES only — a merge that will commit on + // showGuides hides alignment lines only. A merge that will commit on // drop must never be silent. const t: Box = { left: 300, top: 100, width: 200, height: 200 }; make(noAlign({ showGuides: false }), [{ group: targetGroup, box: t }]); @@ -649,7 +649,7 @@ describe('smart guides', () => { test('an engaged edge stays glued on a small float (no probe switch)', () => { // A 20px-wide float: as it moves, its centre probe can get nearer to the - // engaged line than the latched edge. It must keep gluing the EDGE, not + // engaged line than the latched edge. It must keep gluing the edge, not // silently re-snap its centre (which would jump the box). make(floatsOnly()); const other: Box = { left: 100, top: 50, width: 200, height: 150 }; diff --git a/packages/dockview-enterprise/src/advancedOverflowService.ts b/packages/dockview-enterprise/src/advancedOverflowService.ts index 389932b1e..be8dcdf5f 100644 --- a/packages/dockview-enterprise/src/advancedOverflowService.ts +++ b/packages/dockview-enterprise/src/advancedOverflowService.ts @@ -69,9 +69,9 @@ export class OverflowListView extends CompositeDisposable { private readonly _focusTarget: HTMLElement; private readonly _search: ResolvedSearch; - /** Candidate panel ids (pre-filter, pre-order) — the search scope's set. */ + /** Candidate panel ids (pre-filter, pre-order): the search scope's set. */ private readonly _baseIds: string[]; - /** Pinned tabs that clipped out of the strip — rendered in a "Pinned" + /** Pinned tabs that clipped out of the strip. Rendered in a "Pinned" * section above the main list, and excluded from it to avoid a duplicate * row when the search scope is the whole group. */ private readonly _pinnedIds: string[]; @@ -146,7 +146,7 @@ export class OverflowListView extends CompositeDisposable { this._focusTarget.setAttribute('aria-controls', this._list.id); // Keydown on the body (bubble phase) so it fires before PopupService's - // window-level Enter/Escape dismissal — letting us intercept Enter to + // window-level Enter/Escape dismissal, so we can intercept Enter to // activate the highlighted row before the popover closes. const onKeyDown = (event: KeyboardEvent): void => this._onKeyDown(event); @@ -255,8 +255,8 @@ export class OverflowListView extends CompositeDisposable { // dedicated "Pinned" header, filtered by the same query. They keep // their pinned (strip) order rather than joining the MRU sort. Append // the rows first, then add the header only if at least one survived - // (a panel can close between the overflow event and this render) — no - // orphan header. + // (a panel can close between the overflow event and this render), so + // there's no orphan header. const pinnedMatches = this._pinnedIds.filter((id) => matchesQuery(this._titleOf.get(id) ?? id, query) ); @@ -360,7 +360,7 @@ export class OverflowListView extends CompositeDisposable { context.focusTrigger(); break; case 'Tab': - // Trap focus within the popover — there is a single focus + // Trap focus within the popover. There's a single focus // target (the search input or the listbox), so keep it there. event.preventDefault(); break; @@ -371,7 +371,7 @@ export class OverflowListView extends CompositeDisposable { } /** - * Advanced overflow module service — one per component. Owns the MRU model + * Advanced overflow module service, one per component. Owns the MRU model * (component-scoped, so recency survives a group closing) and constructs an * {@link OverflowListView} per popover-open. Self-wires MRU tracking off the * host's group / active-panel events via {@link init}. @@ -393,7 +393,7 @@ export class AdvancedOverflowService }); } - /** The MRU model — exposed for the module's `init` wiring and unit tests. */ + /** The MRU model, exposed for the module's `init` wiring and unit tests. */ get mru(): MruTracker { return this._mru; } diff --git a/packages/dockview-enterprise/src/autoEdgeGroupService.ts b/packages/dockview-enterprise/src/autoEdgeGroupService.ts index 10db65ac8..824a18b60 100644 --- a/packages/dockview-enterprise/src/autoEdgeGroupService.ts +++ b/packages/dockview-enterprise/src/autoEdgeGroupService.ts @@ -19,7 +19,7 @@ import { IAutoEdgeGroupHost, IAutoEdgeGroupService } from 'dockview'; */ const OUTER_BAND = 16; -/** Threshold (%) for the inner "split this group" quadrants — matches the core +/** Threshold (%) for the inner "split this group" quadrants. Matches the core * default activation size, so non-edge drops behave as usual. */ const QUADRANT_THRESHOLD = 20; @@ -78,17 +78,17 @@ function defaultQuadrant( } /** - * Drag-revealed, zero-footprint edges — the two-band drag-reveal affordance. A + * Drag-revealed, zero-footprint edges: the two-band drag-reveal affordance. A * drag toward the layout edge splits into: * * - an **outer band** (within {@link OUTER_BAND} of the content-area edge) that - * docks the panel as a self-hiding, pinnable **edge group** — highlighted - * with its own overlay strip, committed via `host.revealEdgeGroupWithData`; + * docks the panel as a self-hiding, pinnable **edge group**, highlighted + * with its own overlay strip and committed via `host.revealEdgeGroupWithData`; * - an **inner band** that splits the group under the cursor as usual. * * Over a **populated** layout the outer band is reached via a * {@link PositionResolver} installed on the group content drop targets (the - * same mechanism the drop-guide compass uses) — so it works without the + * same mechanism the drop-guide compass uses), so it works without the * compass. Over an empty grid it also handles the root edge target's * `kind: 'edge'` overlays directly. It never `preventDefault`s the overlay * (that would clear the drop state), only draws its highlight on top and @@ -140,7 +140,7 @@ export class AutoEdgeGroupService return isAnyEdgeGroupEnabled(this.host.options.dockToEdgeGroups); } - /** Edge-band detection only — an `edge` cell in the outer band, else null. + /** Edge-band detection only: an `edge` cell in the outer band, else null. * Composed with another resolver (the compass) by the host. */ resolveEdge(args: PositionResolverArgs): PositionResolverResult | null { if (!this._enabled) { @@ -183,7 +183,7 @@ export class AutoEdgeGroupService private _onWillShowOverlay(e: DockviewWillShowOverlayLocationEvent): void { // Show the edge-group indicator line iff the pointer is in the true - // outer band — purely by depth, so it never lights up for a compass + // outer band, purely by depth, so it never lights up for a compass // outer-ring cell (grid-edge dock, further in) or a normal group split. if (!this._enabled || !isEdge(e.position)) { this._hide(); @@ -226,8 +226,8 @@ export class AutoEdgeGroupService let el = this._highlight; if (!el) { el = doc.createElement('div'); - // A thin accent LINE hugging the content-area edge in the direction - // the new edge group would appear — styled by `.dv-auto-edge-band` + // A thin accent line hugging the content-area edge in the direction + // the new edge group would appear. Styled by `.dv-auto-edge-band` // in core (theme drag-over colour); the module only sets geometry. el.className = 'dv-auto-edge-band'; this._highlight = el; diff --git a/packages/dockview-enterprise/src/autoHideEdgeGroupService.ts b/packages/dockview-enterprise/src/autoHideEdgeGroupService.ts index 48a5916d2..4ccb47df0 100644 --- a/packages/dockview-enterprise/src/autoHideEdgeGroupService.ts +++ b/packages/dockview-enterprise/src/autoHideEdgeGroupService.ts @@ -29,18 +29,18 @@ function resolveOptions(o: EdgeGroupPeekOptions | undefined): { /** * Click-driven auto-hide ("pinnable") peek for a single edge group, modelled on * Visual Studio tool windows. The collapsed edge group's native tabs are the - * triggers — **no hover**: + * triggers, with **no hover**: * * - **Click a tab** → that tab's panel slides out as a non-reflowing overlay * with a **title bar** (active title left; pin + close right). The content - * container is reparented out (state preserved) and the grid is NOT reflowed. + * container is reparented out (state preserved) and the grid is not reflowed. * - **Click the same tab again**, or **click outside** the strip+peek, or * **Esc** → hide. Clicking empty space inside the tab strip does nothing. * - **Pin** → re-dock (expand) the group. **Close** → close the panel. * - * Both render modes slide out: it reparents the content CONTAINER (not the + * Both render modes slide out: it reparents the content container (not the * panel content). For `onlyWhenVisible` the content rides inside it; for - * `always` the container is just the position reference the shared render + * `always` the container is only the position reference the shared render * overlay re-anchors to (`repositionPanelOverlay`, force-visible + clipped to * the reveal window). A fixed clip frame makes the panel emerge from the * strip's inner edge rather than from the screen edge. @@ -71,7 +71,7 @@ class EdgeGroupController extends CompositeDisposable { const strip = this.group.element; // Click a collapsed tab → toggle the peek for that tab's panel (open it, - // switch to it, or — if it's already the peeked tab — hide it). Natively + // switch to it, or hide it if it's already the peeked tab). Natively // a collapsed-tab click expands the group; suppress that (the edge-expand // handler bails on a default-prevented click) so click peeks instead. // Capture phase so it runs before the tab's own bubble-phase handler. @@ -102,7 +102,7 @@ class EdgeGroupController extends CompositeDisposable { this.addDisposables( // Collapse change: tear the peek down, then reconcile the docked // tool-window chrome (expanded ⇒ title bar + tabs-bottom; collapsed - // ⇒ just the strip). + // ⇒ only the strip). this.group.api.onDidCollapsedChange(() => { this._closePeek(); this._updateDocked(); @@ -161,14 +161,14 @@ class EdgeGroupController extends CompositeDisposable { return resolveOptions(this.host.options.edgeGroupPeek); } - /** Whether this specific edge group is opted into auto-hide — the per-group - * flag resolved against the global option by the host, so a static and an - * auto-hiding edge group can co-exist. */ + /** Whether this specific edge group is opted into auto-hide. The per-group + * flag is resolved against the global option by the host, so a static and + * an auto-hiding edge group can co-exist. */ private _enabled(): boolean { return this.host.isEdgeGroupAutoHide(this.group); } - /** Enabled + collapsed — the precondition for peeking. */ + /** Enabled and collapsed, the precondition for peeking. */ private _gate(): boolean { return this._enabled() && this.group.api.isCollapsed(); } @@ -205,7 +205,7 @@ class EdgeGroupController extends CompositeDisposable { // --- shared title bar (peek overlay + docked tool window) --- /** Build the tool-window title bar: panel title (left), pin + close (right). - * Used by both the peek overlay and the docked group chrome — only the + * Used by both the peek overlay and the docked group chrome; only the * mounting/positioning and the pin action differ. */ private _buildTitleBar(opts: { title: string; @@ -220,7 +220,7 @@ class EdgeGroupController extends CompositeDisposable { bar.className = 'dv-edge-peek-header'; // Layout/cosmetics are owned by `.dv-edge-peek-header` / -title in the // stylesheet (overlay.scss). Only the resolved opaque background is - // dynamic — the floating peek must never be see-through. + // dynamic, because the floating peek must never be see-through. if (opts.background) { bar.style.backgroundColor = opts.background; } @@ -243,7 +243,7 @@ class EdgeGroupController extends CompositeDisposable { btn.setAttribute('aria-label', label); // Monotone SVG (inherits `currentColor` via `.dv-svg`), matching the // tab close button. Cosmetics (incl. the hover background) are owned - // by the stylesheet — inline styles here would beat its `:hover`. + // by the stylesheet; inline styles here would beat its `:hover`. icon.setAttribute('aria-hidden', 'true'); btn.appendChild(icon); btn.addEventListener('click', onClick); @@ -263,7 +263,7 @@ class EdgeGroupController extends CompositeDisposable { /** Reconcile the docked chrome with the collapse state: an expanded * (pinned) edge group renders as a tool window (title bar top + tabs - * bottom); a collapsed one is just the strip. */ + * bottom); a collapsed one is only the strip. */ private _updateDocked(): void { const shouldDock = this._enabled() && !this.group.api.isCollapsed(); if (shouldDock && !this._docked) { @@ -281,7 +281,7 @@ class EdgeGroupController extends CompositeDisposable { const title = this.group.activePanel?.title ?? ''; const { element, title: titleEl } = this._buildTitleBar({ title, - // The pushpin here UN-pins (auto-hides), the inverse of the peek's. + // The pushpin here un-pins (auto-hides), the inverse of the peek's. // Generic labels: the title element carries the panel name and // updates on switch, so the button names never go stale. pinLabel: 'Auto-hide', @@ -293,7 +293,7 @@ class EdgeGroupController extends CompositeDisposable { element.style.flexShrink = '0'; element.style.height = `${TITLEBAR_HEIGHT}px`; // Appended last → under the group's `column-reverse` (header-bottom) - // flow it lands at the visual TOP, above the content, with the tab + // flow it lands at the visual top, above the content, with the tab // strip at the bottom. this.group.element.appendChild(element); this._docked = { bar: element, title: titleEl }; @@ -334,7 +334,7 @@ class EdgeGroupController extends CompositeDisposable { if (this.group.activePanel !== panel) { panel.api.setActive(); } - // Reparent the whole content CONTAINER so BOTH renderers work (see class + // Reparent the whole content container so both renderers work (see class // doc). It un-hides automatically once out of the collapsed subtree. const content = this.group.element.querySelector( '.dv-content-container' @@ -364,7 +364,7 @@ class EdgeGroupController extends CompositeDisposable { } // --- title bar (separate sibling so it layers above an `always` render - // overlay; it sits in the top band ABOVE the content) --- + // overlay; it sits in the top band above the content) --- const { element: header, title: titleEl } = this._buildTitleBar({ title, pinLabel: 'Pin', @@ -375,8 +375,8 @@ class EdgeGroupController extends CompositeDisposable { }); header.style.position = 'absolute'; header.style.zIndex = '1001'; - // The overlay root is pointer-events:none — opt the title bar back in so - // its buttons are clickable. It's in the top band, above the content. + // The overlay root is pointer-events:none, so opt the title bar back in + // so its buttons are clickable. It's in the top band, above the content. header.style.pointerEvents = 'auto'; // --- fixed clip frame (content emerges from the strip's inner edge) --- @@ -428,7 +428,7 @@ class EdgeGroupController extends CompositeDisposable { /** * Slide the content overlay in from the strip edge via a manual rAF loop, so * that each frame re-anchors any `always` content over the moving box. The - * title bar is fixed (it doesn't slide) — the content slides in beneath it. + * title bar is fixed (it doesn't slide); the content slides in beneath it. */ private _animateIn(overlay: HTMLElement): void { const position = this._position; @@ -468,7 +468,7 @@ class EdgeGroupController extends CompositeDisposable { /** Anchor the title bar (top band) and the clip frame (content, inset below * the title bar) to the strip's inner edge, sized to the group's expanded - * size — relative to the overlay root. No grid reflow. */ + * size, relative to the overlay root. No grid reflow. */ private _positionOverlay(): void { const position = this._position; if (!position || !this._peek) { @@ -537,16 +537,16 @@ class EdgeGroupController extends CompositeDisposable { } /** Is the point within the peek (overlay or title bar) or the strip - * container? In the click model, clicking anywhere in the strip — tab or - * empty space — must NOT dismiss; only an outside click does. */ + * container? In the click model, clicking anywhere in the strip (tab or + * empty space) must not dismiss; only an outside click does. */ private _pointWithinPeek(x: number, y: number): boolean { if (!this._peek) { return false; } const within = (r: DOMRect): boolean => x >= r.left && x <= r.right && y >= r.top && y <= r.bottom; - // Use the FIXED clip frame (the reveal window), not the sliding overlay - // — during the slide-in the overlay doesn't yet cover the whole reveal, + // Use the fixed clip frame (the reveal window), not the sliding overlay: + // during the slide-in the overlay doesn't yet cover the whole reveal, // so a click on the revealed content would otherwise read as "outside". return ( within(this.group.element.getBoundingClientRect()) || @@ -559,7 +559,7 @@ class EdgeGroupController extends CompositeDisposable { const doc = this.group.element.ownerDocument; // The whole dismissal lifecycle (Esc + outside-pointerdown + resize + // focus-out) is the shared layer's job. Inside/outside is geometry-based - // — for a pointer event and for a focused element's centre — because an + // (for a pointer event and for a focused element's centre) because an // `always` panel's content is a sibling overlay on top, not inside the // peek's DOM subtree. Capture so it's seen before content handlers. const withinCentre = (el: Element): boolean => { @@ -593,7 +593,7 @@ class EdgeGroupController extends CompositeDisposable { if (!peek) { return; } - // If focus is inside the peek (a keyboard close — Esc / pin / close), + // If focus is inside the peek (a keyboard close: Esc / pin / close), // return it to the strip tab so it isn't dropped onto . const doc = this.group.element.ownerDocument; const restoreFocus = diff --git a/packages/dockview-enterprise/src/contextMenu.ts b/packages/dockview-enterprise/src/contextMenu.ts index d9e93a09f..4731ce9b6 100644 --- a/packages/dockview-enterprise/src/contextMenu.ts +++ b/packages/dockview-enterprise/src/contextMenu.ts @@ -98,7 +98,7 @@ function buildRenameInput(tabGroup: ITabGroup): HTMLElement { // Skip auto-focus on touch-primary devices: focusing the input pops the // on-screen keyboard, which fires `window resize`, which `PopupService` - // listens to and uses to dismiss the popover — so the menu opens, the + // listens to and uses to dismiss the popover, so the menu opens, the // keyboard appears, and the menu immediately closes before the user can // type. The user can still tap the input to focus it intentionally. if (!isCoarsePrimaryInput()) { @@ -202,7 +202,7 @@ export class ContextMenuController implements IContextMenuService { /** * The tab menu items: the app's own items (if any) with the built-in - * `'pin'` item prepended when {@link _shouldInjectPin} applies — so the app + * `'pin'` item prepended when {@link _shouldInjectPin} applies, so the app * keeps full control of its list, and pinning is added without disturbing * it. Reuses the existing `'pin'` token rendering below. */ diff --git a/packages/dockview-enterprise/src/dropGuideService.ts b/packages/dockview-enterprise/src/dropGuideService.ts index da97bee3b..49ff21c06 100644 --- a/packages/dockview-enterprise/src/dropGuideService.ts +++ b/packages/dockview-enterprise/src/dropGuideService.ts @@ -58,8 +58,8 @@ const UNIT: Record = { * The cross of cells centred in a `width`×`height` target: the inner ring * (split/merge this group, restricted to `zones`) plus, when `includeEdges`, an * outer ring of directional cells that dock against the whole layout. The - * resolver hit-tests these rects and the widget paints them — one geometry, so - * you aim at exactly the cell you see. + * resolver hit-tests these rects and the widget paints them from one geometry, + * so you aim at exactly the cell you see. */ function compassCells( width: number, @@ -138,7 +138,7 @@ class CompassResolver implements PositionResolver { this.edgesEnabled() ); - // Exact hit — the fast path. + // Exact hit, the fast path. for (const cell of cells) { if ( args.x >= cell.left && @@ -150,8 +150,8 @@ class CompassResolver implements PositionResolver { } } - // Gap-fill. The cells form a plus/cross — a vertical column (all share - // the central cell's x) and a horizontal row (all share its y) — + // Gap-fill. The cells form a plus/cross: a vertical column (all share + // the central cell's x) and a horizontal row (all share its y), // separated by a GAP-wide space. Exact hit-testing returns null in those // gaps, so the drop overlay blinks out as the cursor crosses from one // cell to its neighbour. Snap a pointer sitting in an on-axis gap to its @@ -168,14 +168,14 @@ class CompassResolver implements PositionResolver { for (const cell of cells) { let dist: number; if (inColumn && cell.left === cx) { - // a vertical neighbour — gap distance along y + // a vertical neighbour: gap distance along y dist = Math.max( cell.top - args.y, args.y - (cell.top + cell.size), 0 ); } else if (inRow && cell.top === cy) { - // a horizontal neighbour — gap distance along x + // a horizontal neighbour: gap distance along x dist = Math.max( cell.left - args.x, args.x - (cell.left + cell.size), @@ -205,7 +205,7 @@ class CompassWidget { this._container = container; // Pin a stable containing block. The drop target sets `position: // relative` on this element only while an inner-cell overlay shows (the - // `.dv-drop-target` class), and removes it for edge cells — without this + // `.dv-drop-target` class), and removes it for edge cells. Without this, // the absolutely-positioned compass re-anchors to a higher ancestor on // an outer cell and visibly jumps. Restored on dispose. this._priorPosition = container.style.position; @@ -227,7 +227,7 @@ class CompassWidget { /** * Paint the cells `gate` accepts (so only legal drops show), centred on - * `outline` — the frame the drop target measures — and translated into this + * `outline` (the frame the drop target measures) and translated into this * widget's own box so the cells line up with where a drop resolves even when * the two boxes differ (e.g. `dndPanelOverlay: 'group'` measures the whole * group, but the widget is mounted in the content container). @@ -267,9 +267,9 @@ class CompassWidget { } /** - * Highlight the cell the cursor is aiming at — the only hover feedback an - * outer (edge) cell gets, since the drop target draws no overlay for it. - * `edge` disambiguates the inner vs outer cell that share a direction. + * Highlight the cell the cursor is aiming at. This is the only hover + * feedback an outer (edge) cell gets, since the drop target draws no overlay + * for it. `edge` disambiguates the inner vs outer cell that share a direction. */ setActive(position: Position, edge: boolean): void { for (const c of this._cells) { @@ -294,7 +294,7 @@ class CompassWidget { } /** - * Drop Guide ("compass") — a VS Code-style aim-at-a-cell drop overlay for group + * Drop Guide ("compass"): a VS Code-style aim-at-a-cell drop overlay for group * docking. While a panel/group is dragged over a group, a cross of cells is * painted over it and the dragged item snaps to whichever cell the cursor is * over (instead of the cursor-quadrant of the target). Drop resolution + commit @@ -367,7 +367,7 @@ export class DropGuideService return; } // An edge-group cell (the true outer edge, when auto edge groups compose - // with the compass) is owned by the edge-group affordance — bow out so + // with the compass) is owned by the edge-group affordance; bow out so // the two don't double-render. if (e.edgeGroup) { this._unmount(); @@ -375,7 +375,7 @@ export class DropGuideService } this._mount(e.group, e.nativeEvent); if (!this._mounted) { - return; // no compass mounted (e.g. no content container) — nothing to drive + return; // no compass mounted (e.g. no content container), nothing to drive } // Fires per drag-over frame while over a cell: light up the cell being // aimed at, and for an outer cell preview the layout-edge region. A move @@ -392,8 +392,8 @@ export class DropGuideService /** * Clear the feedback when the cursor is over no cell (a dead zone between * cells, or off the group). `onWillShowOverlay` only fires on a cell, so - * without this the highlight + edge preview would linger. Only ever clears — - * setting stays with `onWillShowOverlay` — so the two never conflict. + * without this the highlight + edge preview would linger. It only ever + * clears (setting stays with `onWillShowOverlay`), so the two never conflict. */ private _clearFeedbackIfOffCells(event: DragEvent | PointerEvent): void { if (!this._mounted) { @@ -415,8 +415,8 @@ export class DropGuideService } /** - * Preview the whole-layout-edge region an outer cell docks into — the half - * the panel will occupy — styled with the same theme variables as a real + * Preview the whole-layout-edge region an outer cell docks into (the half + * the panel will occupy), styled with the same theme variables as a real * drop overlay so it reads identically. Drawn over the layout root (a * positioned element), beneath the compass. */ @@ -457,12 +457,12 @@ export class DropGuideService const widget = new CompassWidget(content); const all = new Set(INNER_CELLS); const configured = this._configuredZones(); - // The frame the drop target measures (the whole group or just the + // The frame the drop target measures (the whole group or only the // content, per `dndPanelOverlay`); fall back to the content container. const outline = this.host.getDropOverlayElement(group) ?? content; // Cache the veto per direction: the inner and outer cell of a direction // share a position, and `canDropOnGroup` can fire `onUnhandledDragOver` - // for a cross-component drag — so resolve each position at most once. + // for a cross-component drag, so resolve each position at most once. const allowed = new Map(); widget.render( outline, diff --git a/packages/dockview-enterprise/src/index.ts b/packages/dockview-enterprise/src/index.ts index 51fb1fb71..3927b9abb 100644 --- a/packages/dockview-enterprise/src/index.ts +++ b/packages/dockview-enterprise/src/index.ts @@ -16,7 +16,7 @@ import { LicenseModule } from './licenseService'; // superset of `dockview`. export * from 'dockview'; -// TabGroupChipsModule / TabGroupChipsService are now FREE and live in +// TabGroupChipsModule / TabGroupChipsService are now free and live in // dockview-core; they remain re-exported here via `export * from 'dockview'` // above so `dockview-enterprise` stays a drop-in superset. export { ContextMenuController, ContextMenuModule } from './contextMenu'; @@ -66,8 +66,8 @@ export type { LicenseState } from './licenseValidator'; /** * The enterprise feature modules, including the license gate. Registered - * automatically on import (below), so merely importing `dockview-enterprise` - * activates these modules — and the license watermark-unless-licensed check — + * automatically on import (below), so importing `dockview-enterprise` + * activates these modules (and the license watermark-unless-licensed check) * for every component in the process. */ export const Modules: DockviewModule[] = [ @@ -85,7 +85,7 @@ export const Modules: DockviewModule[] = [ LicenseModule, ]; -// Self-register on import (a side effect — hence `sideEffects: true` in +// Self-register on import (a side effect, hence `sideEffects: true` in // package.json). This makes the package batteries-included: no explicit // registerModules() call is required of the consumer. registerModules(Modules); diff --git a/packages/dockview-enterprise/src/keyboardDockingService.ts b/packages/dockview-enterprise/src/keyboardDockingService.ts index d8b8604f1..f9ab6bc36 100644 --- a/packages/dockview-enterprise/src/keyboardDockingService.ts +++ b/packages/dockview-enterprise/src/keyboardDockingService.ts @@ -63,16 +63,16 @@ const DEFAULT_KEYMAP: DockingKeybindings = { }; /** - * Advanced keyboard control — drive the layout itself without a mouse. Opt-in + * Advanced keyboard control: drive the layout itself without a mouse. Opt-in * via `keyboardNavigation` (shared with the default navigation module). * - * - **Spatial group focus** (`Ctrl+Shift+Arrows`) — move focus to the visually + * - **Spatial group focus** (`Ctrl+Shift+Arrows`): move focus to the visually * adjacent group via the `adjacentGroupInDirection` geometry primitive. - * - **Keyboard docking** (`Ctrl+M`) — arms a two-phase move of the active panel + * - **Keyboard docking** (`Ctrl+M`): arms a two-phase move of the active panel * with a live drop preview + screen-reader narration: - * 1. PICK TARGET — arrows cycle the groups (incl. the panel's own, so a tab + * 1. Pick target: arrows cycle the groups (incl. the panel's own, so a tab * can be split out); `Enter` selects one. - * 2. PICK EDGE — arrows choose a split edge (left/right/top/bottom) or the + * 2. Pick edge: arrows choose a split edge (left/right/top/bottom) or the * centre (tab-into); `Enter` commits, `Escape` steps back. * From the target phase, `Ctrl+Shift+F` floats the panel as a terminal * action; `Escape` cancels. @@ -93,7 +93,7 @@ export class KeyboardDockingService constructor(private readonly host: IKeyboardNavigationHost) { super(); - // Capture phase, on the document — matches the navigation listener so + // Capture phase, on the document, matching the navigation listener so // edge groups (outside the gridview) are covered. Mirrored onto each // popout document so docking can be driven from inside a popped-out // window (a separate `document`). @@ -312,7 +312,7 @@ export class KeyboardDockingService const move = this._move!; const group = this._resolveTargetGroup(); if (!group) { - // every candidate group was removed mid-move — bail out cleanly + // every candidate group was removed mid-move, so bail out cleanly this._abortMove(); return; } diff --git a/packages/dockview-enterprise/src/keyboardNavigationService.ts b/packages/dockview-enterprise/src/keyboardNavigationService.ts index c0ee50823..6d3e32646 100644 --- a/packages/dockview-enterprise/src/keyboardNavigationService.ts +++ b/packages/dockview-enterprise/src/keyboardNavigationService.ts @@ -24,24 +24,24 @@ const DEFAULT_KEYMAP: DockviewKeybindings = { }; /** - * Keyboard navigation & focus management — operate the dock without a mouse. + * Keyboard navigation & focus management: operate the dock without a mouse. * Opt-in via `keyboardNavigation`, with a rebindable {@link DockviewKeybindings} * keymap. * - * - **Switch tab** (`Ctrl+]` / `Ctrl+[`) — cycle the focused group's tabs. - * - **Focus group** (`F6` / `Shift+F6`) — move focus to the next / previous + * - **Switch tab** (`Ctrl+]` / `Ctrl+[`): cycle the focused group's tabs. + * - **Focus group** (`F6` / `Shift+F6`): move focus to the next / previous * group in sequence. - * - **Focus the tab strip** (`Ctrl+Shift+\`) — jump focus from panel content to + * - **Focus the tab strip** (`Ctrl+Shift+\`): jump focus from panel content to * the active group's tab strip (the strip's roving-tabindex takes over). - * - **Toggle pin** (`Ctrl+Shift+Enter`) — pin / unpin the active panel's tab. + * - **Toggle pin** (`Ctrl+Shift+Enter`): pin / unpin the active panel's tab. * Inert unless the pinned-tabs feature is enabled. - * - **Focus restore on close** — when removing a panel/group pulls focus out of + * - **Focus restore on close**: when removing a panel/group pulls focus out of * the dock, focus returns to the neighbour the layout just activated instead * of being stranded on ``. - * - **Floating `Esc`** — `Esc` inside a floating group returns focus to the + * - **Floating `Esc`**: `Esc` inside a floating group returns focus to the * control that had it before entering the float (polite: bubble phase, * respects `defaultPrevented`, so panel content keeps `Esc`). - * - **Floating Tab-containment** — Tab wraps within the floating group so focus + * - **Floating Tab-containment**: Tab wraps within the floating group so focus * doesn't leak to the grid behind it. * * Stands down while an advanced keyboard move is in progress (see @@ -67,7 +67,7 @@ export class KeyboardNavigationService // Remember the last control focused anywhere in this dock (outside any // float) so Esc inside a floating group can return focus to its - // invoking control. Observe-only — never consumes. + // invoking control. Observe-only; it never consumes. const onFocusIn = (e: Event): void => { const t = (e as FocusEvent).target; if ( @@ -79,7 +79,7 @@ export class KeyboardNavigationService } }; - // Esc-from-float restore runs in the BUBBLE phase and respects + // Esc-from-float restore runs in the bubble phase and respects // defaultPrevented, so panel content that uses Esc keeps priority. const onEscape = (e: Event): void => this._onFloatingEscape(e as KeyboardEvent); @@ -98,7 +98,7 @@ export class KeyboardNavigationService // - `remove`: closing the focused panel/group. // - `maximize`: maximizing a *different* group hides the focused // one, blurring it to . (Maximizing the focused group keeps - // its DOM in place, so focus stays inside and we no-op — which is + // its DOM in place, so focus stays inside and we no-op, which is // exactly what the was-inside / not-inside guard checks, so we // never steal focus from a mouse user who maximized in place.) host.onWillMutateLayout((e) => { @@ -129,7 +129,7 @@ export class KeyboardNavigationService } /** - * The element that actually has focus, across windows — the `activeElement` + * The element that actually has focus, across windows: the `activeElement` * of whichever document currently holds focus (a popout, else the main * document). Each document tracks its own `activeElement` even when blurred, * so we must pick the focused one rather than trust the main document. @@ -142,7 +142,7 @@ export class KeyboardNavigationService return win.document.activeElement; } } catch { - // A closing / cross-origin window can throw on access — ignore. + // A closing / cross-origin window can throw on access, so ignore it. } } return mainDoc.activeElement; @@ -191,7 +191,7 @@ export class KeyboardNavigationService if (!float || !this.host.ownsElement(float)) { return false; } - // Always manage Tab inside a float, never just at the boundary: focus + // Always manage Tab inside a float, never only at the boundary: focus // often sits on non-tabbable plumbing (the content container, which is // tabindex="-1"), and the browser's default Tab from there escapes to // the grid behind. Drive the cursor through the float's tabbables @@ -237,7 +237,7 @@ export class KeyboardNavigationService prev.focus(); return; } - // Invoking control is gone — fall back to a grid group's content. + // Invoking control is gone, so fall back to a grid group's content. this.host.groups .find((g) => g.api.location.type === 'grid') ?.model.focusContent(); @@ -299,7 +299,7 @@ export class KeyboardNavigationService } private _togglePin(): void { - // Inert unless the pinned-tabs feature is enabled — the binding is dead + // Inert unless the pinned-tabs feature is enabled; the binding is dead // weight without it. (`setPinned` is itself gated in core, but guarding // here also skips the needless refocus below when nothing can change.) if (!this.host.options.pinnedTabs?.enabled) { diff --git a/packages/dockview-enterprise/src/keyboardShared.ts b/packages/dockview-enterprise/src/keyboardShared.ts index 14ed50336..e2867edc8 100644 --- a/packages/dockview-enterprise/src/keyboardShared.ts +++ b/packages/dockview-enterprise/src/keyboardShared.ts @@ -63,7 +63,7 @@ interface MultiWindowHost { * Attach `specs` to the main document **and to every popout document**, keeping * the set in sync as popouts open and close. A popout window is a separate * `document`, so a capture-phase listener on the main document alone never sees - * keystrokes made inside a popout — each document needs its own listener. + * keystrokes made inside a popout, so each document needs its own listener. * * A popout that shares the main document (the jsdom mock) is skipped, since the * main document's listener already covers it and a second would double-fire. diff --git a/packages/dockview-enterprise/src/layoutHistoryService.ts b/packages/dockview-enterprise/src/layoutHistoryService.ts index 12d4ce035..0df49aa5e 100644 --- a/packages/dockview-enterprise/src/layoutHistoryService.ts +++ b/packages/dockview-enterprise/src/layoutHistoryService.ts @@ -20,9 +20,9 @@ import { interface HistoryEntry { readonly kind: LayoutHistoryKind; readonly origin: DockviewLayoutMutationEvent['origin']; - /** Pre-image — what undo restores. */ + /** Pre-image: what undo restores. */ readonly before: SerializedDockview; - /** Post-image — what redo restores. */ + /** Post-image: what redo restores. */ readonly after: SerializedDockview; readonly timestamp: number; } @@ -41,8 +41,8 @@ const DISCRETE: ReadonlySet = new Set([ 'tab-group', ]); -/** Bulk transactions that replace the whole layout — they clear history rather - * than recording (undoing *across* a full restore resurrects a foreign layout). */ +/** Bulk transactions that replace the whole layout. They clear history rather + * than recording, since undoing across a full restore resurrects a foreign layout. */ const BULK: ReadonlySet = new Set([ 'load', 'clear', @@ -75,11 +75,11 @@ function resolveOptions(options: DockviewComponentOptions): { * restores `after`. Opt-in via `layoutHistory.enabled`. * * Discrete mutations (close/move/float/popout/add/maximize/tab-group) record one - * step each off the will/did boundary. **Resize** (sash drag) has no boundary — + * step each off the will/did boundary. Resize (sash drag) has no boundary, so * it's caught off the coalesced `onDidLayoutChange` ping, using the last settled * snapshot as the pre-image (the "lazy pre-image"), and a continuous drag is * debounced into a single entry. A bulk `load`/`clear` clears the stacks. Undo / - * redo restore popout windows, which re-open asynchronously — the guard is held + * redo restore popout windows, which re-open asynchronously, so the guard is held * across that re-open via `popoutRestorationPromise`. */ export class LayoutHistoryService @@ -101,7 +101,7 @@ export class LayoutHistoryService } // --- resize coalescing (off the post-only onDidLayoutChange ping) --- - /** The last settled snapshot — the pre-image for the next resize run. */ + /** The last settled snapshot, used as the pre-image for the next resize run. */ private _baseline: SerializedDockview | undefined; /** The resize entry currently being coalesced (open during a drag). */ private _pendingResize: @@ -163,7 +163,7 @@ export class LayoutHistoryService // A discrete mutation closes any open resize run first, so a resize and // an unrelated close never fold into one undo step. this._finalizeResize(); - // Fully inert when off — never touch toJSON() (zero overhead, and no + // Fully inert when off: never touch toJSON() (zero overhead, and no // side effects on hosts whose serialization reads live geometry). if (!this._opts.enabled) { this._pendingBefore = undefined; @@ -175,7 +175,7 @@ export class LayoutHistoryService return; } // Capture the pre-image only when this mutation will actually be - // recorded — avoids a wasted toJSON() on ignored mutations. + // recorded, which avoids a wasted toJSON() on ignored mutations. this._pendingBefore = this._records(e) ? this._host.toJSON() : undefined; @@ -202,7 +202,7 @@ export class LayoutHistoryService const before = this._pendingBefore; this._pendingBefore = undefined; if (!before || !this._records(e)) { - // Not recorded, but the layout still changed — keep the baseline + // Not recorded, but the layout still changed. Keep the baseline // current so the next resize's pre-image is right (only when resize // recording is on, else don't bother calling toJSON()). if (this._opts.recordResize) { @@ -226,7 +226,7 @@ export class LayoutHistoryService this._undo.push(entry); // A fresh mutation invalidates the redo future. this._redo.length = 0; - // Bounded ring — drop the oldest beyond the depth limit. + // Bounded ring: drop the oldest beyond the depth limit. const depth = Math.max(1, this._opts.depth); while (this._undo.length > depth) { this._undo.shift(); @@ -242,7 +242,7 @@ export class LayoutHistoryService } const opts = this._opts; if (!opts.enabled || !opts.recordResize) { - // Feature off — don't hold a stale baseline / pending run. + // Feature off: don't hold a stale baseline or pending run. this._baseline = undefined; this._clearResizeTimer(); this._pendingResize = undefined; @@ -255,7 +255,7 @@ export class LayoutHistoryService this._baseline = this._host.toJSON(); return; } - // A genuine resize ping — open or extend the coalesced run. + // A genuine resize ping: open or extend the coalesced run. const after = this._host.toJSON(); if (!this._pendingResize) { this._pendingResize = { before: this._baseline, after }; @@ -299,7 +299,7 @@ export class LayoutHistoryService } undo(): void { - // A pending resize drag is a real step — commit it before undoing it. + // A pending resize drag is a real step, so commit it before undoing it. this._finalizeResize(); const entry = this._undo.pop(); if (!entry) { @@ -322,7 +322,7 @@ export class LayoutHistoryService } /** - * Restore a snapshot. `reuseExistingPanels` is mandatory — without it every + * Restore a snapshot. `reuseExistingPanels` is mandatory; without it every * undo disposes and recreates every renderer (content flash, lost focus). * The re-entrancy guard stops the mutations this fires from re-recording. */ @@ -344,9 +344,9 @@ export class LayoutHistoryService throw e; } if (restoresPopout) { - // Floating groups restore synchronously, but popout WINDOWS re-open + // Floating groups restore synchronously, but popout windows re-open // asynchronously and re-fire the mutation boundary on the root once - // their window loads — hold the guard until that settles, or the + // their window loads. Hold the guard until that settles, or the // re-open records a spurious entry. this._host.popoutRestorationPromise.then(release, release); } else { diff --git a/packages/dockview-enterprise/src/licenseRegistry.ts b/packages/dockview-enterprise/src/licenseRegistry.ts index 9ec292da7..6280da271 100644 --- a/packages/dockview-enterprise/src/licenseRegistry.ts +++ b/packages/dockview-enterprise/src/licenseRegistry.ts @@ -1,13 +1,13 @@ /** * Module-level license registry + the static `LicenseManager`. * - * `LicenseRegistry` is a single per-bundle instance — call + * `LicenseRegistry` is a single per-bundle instance. Call * `LicenseManager.setLicenseKey()` once at app boot and every dock sees it. It * holds the statically-set key, notifies on change, and owns the once-per- * process console de-dup (modelled on core's `_warnedMissingModule`). * - * Static-only by design — there is no per-instance key. Effective key - * resolution is simply: registry key → missing. See `enterprise-modules/ + * Static-only by design: there is no per-instance key. The effective key is + * the registry key, or missing when none is set. See `enterprise-modules/ * license.md` §5. */ @@ -38,7 +38,7 @@ class LicenseRegistryImpl { /** * Log `message` at most once per process for a given `dedupeKey`. N docks on - * a page therefore produce ONE warning, not N — the flag lives here (module + * a page therefore produce one warning, not N. The flag lives here (module * scope), never on the per-component service. */ warnOnce( @@ -53,7 +53,7 @@ class LicenseRegistryImpl { console[severity](message); } - /** Tests only — reset key + de-dup state. */ + /** Tests only: reset key and de-dup state. */ _reset(): void { this._key = undefined; this._warned.clear(); @@ -64,7 +64,7 @@ class LicenseRegistryImpl { export const LicenseRegistry = new LicenseRegistryImpl(); /** - * Static entry point — the ONLY way to set a key (static-only, no per-instance + * Static entry point: the only way to set a key (static-only, no per-instance * option). Set once at app boot; every `DockviewComponent` created afterwards * sees it. */ diff --git a/packages/dockview-enterprise/src/licenseService.ts b/packages/dockview-enterprise/src/licenseService.ts index b534ed384..e75057b6a 100644 --- a/packages/dockview-enterprise/src/licenseService.ts +++ b/packages/dockview-enterprise/src/licenseService.ts @@ -1,14 +1,14 @@ /** - * `LicenseService` — per-`DockviewComponent` license gate (the enterprise module). + * `LicenseService`: per-`DockviewComponent` license gate (the enterprise module). * * The whole package is enterprise, so its mere presence means enterprise is in - * use: this service validates the key on construction and — unless a valid key - * is set — renders a small inline-styled corner watermark and logs one console - * warning. Features are NEVER disabled; the watermark is the enforcement. + * use: this service validates the key on construction and, unless a valid key + * is set, renders a small inline-styled corner watermark and logs one console + * warning. Features are never disabled; the watermark is the enforcement. * - * ZERO core footprint: the `ServiceCollection` slot is declaration-merged onto + * Zero core footprint: the `ServiceCollection` slot is declaration-merged onto * `dockview` (never declared in `dockview-core`), the watermark anchors to the - * existing generic `rootElement`, the watermark is styled INLINE (no core SCSS), + * existing generic `rootElement`, the watermark is styled inline (no core SCSS), * and all contracts live in this package. */ @@ -21,7 +21,7 @@ import { import { LicenseRegistry } from './licenseRegistry'; import { DOCKVIEW_RELEASE_DATE } from './releaseDate'; -// The `ServiceCollection` slot is added HERE, not in core — so core never names +// The `ServiceCollection` slot is added here, not in core, so core never names // `licenseService`. Augmenting `dockview` (which re-exports core's // `ServiceCollection`) keeps the package free of any `dockview-core` reference. // Compile-time only; the module system stores/reads services by string key at @@ -32,7 +32,7 @@ declare module 'dockview' { } } -/** Narrow host surface — satisfied structurally by `DockviewComponent`. */ +/** Narrow host surface, satisfied structurally by `DockviewComponent`. */ export interface ILicenseHost { /** Generic shell-element anchor (DockviewComponent's existing `rootElement`). */ readonly rootElement: HTMLElement; @@ -49,7 +49,7 @@ export interface LicenseServiceOptions { /** * Injectable dockview release date for deterministic tests. Defaults to the * baked-in `DOCKVIEW_RELEASE_DATE`. Enforcement is version-based, so this is - * the build's publish date, NOT the current wall-clock time. + * the build's publish date, not the current wall-clock time. */ releaseDate?: () => Date; } @@ -59,7 +59,7 @@ const INFO_URL = 'https://dockview.dev/enterprise'; // The dockview brand lockup (mark + "dockview" wordmark), monotone. Every shape // inherits `fill:currentColor` from the , so the container's `color` alone -// drives the grey tint. No — the whole watermark is decorative +// drives the grey tint. No , since the whole watermark is decorative // (aria-hidden). Vectors lifted from the brand kit's `dockview-lockup-mono.svg`. const LOCKUP_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 730.3 174" width="100%" height="100%" fill="currentColor" aria-hidden="true">' + @@ -155,7 +155,7 @@ export class LicenseService implements ILicenseService { const el = document.createElement('div'); el.className = 'dv-license-watermark'; el.setAttribute('aria-hidden', 'true'); - // Styled INLINE (never core SCSS). pointer-events:none is mandatory — + // Styled inline (never core SCSS). pointer-events:none is mandatory: // it must never intercept clicks on the user's panels. A discreet, // monotone-grey brand lockup at moderate opacity: professional, not loud. el.style.cssText = [ @@ -203,7 +203,7 @@ export class LicenseService implements ILicenseService { export const LicenseModule = defineModule<'licenseService', ILicenseHost>({ name: 'License', serviceKey: 'licenseService', - // No dependsOn — license must not require any feature module. + // No dependsOn: license must not require any feature module. create: (host) => new LicenseService(host), init: (_host, service): IDisposable => { service.refresh(); // re-evaluate once fully constructed diff --git a/packages/dockview-enterprise/src/licenseValidator.ts b/packages/dockview-enterprise/src/licenseValidator.ts index 12167e936..1764ee914 100644 --- a/packages/dockview-enterprise/src/licenseValidator.ts +++ b/packages/dockview-enterprise/src/licenseValidator.ts @@ -1,20 +1,20 @@ /** - * License key validation — pure, dependency-free, synchronous. + * License key validation: pure, dependency-free, synchronous. * * This is a re-implementation of the issuer's scheme * (`dockview-licencing/src/lib/{checksum,licence}.ts`) so `dockview-enterprise` - * can verify a key entirely offline. It MUST stay byte-compatible with the - * issuer — the cross-repo golden fixture in the spec (a real minted key) is + * can verify a key entirely offline. It must stay byte-compatible with the + * issuer; the cross-repo golden fixture in the spec (a real minted key) is * the guard against drift. * - * The checksum is an FNV-1a integrity guard, NOT a signature: the whole scheme + * The checksum is an FNV-1a integrity guard, not a signature: the whole scheme * is public and forgeable by design. The watermark is the enforcement, not the * key. See `enterprise-modules/license.md`. */ export type LicenseState = | 'valid' // within [ValidFrom, ValidUntil] - | 'expired' // past ValidUntil — no longer licensed, watermarked + | 'expired' // past ValidUntil: no longer licensed, watermarked | 'invalid' // checksum mismatch / malformed / corrupt | 'missing'; // no key supplied @@ -46,7 +46,7 @@ const MONTHS = [ ]; /** - * UTF-8 encode a string to bytes without `TextEncoder` — so the checksum is + * UTF-8 encode a string to bytes without `TextEncoder`, so the checksum is * identical in every environment (browser, Node, and jsdom, which lacks * `TextEncoder`). Produces the same bytes the issuer's `TextEncoder` does. */ @@ -59,7 +59,7 @@ function* utf8Bytes(str: string): Generator<number> { yield 0xc0 | (code >> 6); yield 0x80 | (code & 0x3f); } else if (code >= 0xd800 && code <= 0xdbff) { - // High surrogate — combine with the following low surrogate. + // High surrogate: combine with the following low surrogate. const lo = str.charCodeAt(++i); code = 0x10000 + ((code - 0xd800) << 10) + (lo - 0xdc00); yield 0xf0 | (code >> 18); @@ -76,7 +76,7 @@ function* utf8Bytes(str: string): Generator<number> { /** * FNV-1a 64-bit, 16 lowercase hex chars. Byte-identical to the issuer's - * `licenceChecksum` (which uses BigInt) — but computed here with two 32-bit + * `licenceChecksum` (which uses BigInt), but computed here with two 32-bit * halves because this package targets < ES2020, where BigInt literals are * unavailable. Empty input returns the offset basis ("cbf29ce484222325"). * @@ -103,7 +103,7 @@ export function fnv1a(input: string): string { /** * Strip characters that get accidentally pasted with a key (zero-width marks, - * BOM, CR/LF) and trim — the noise that sneaks in when a key is copied from a + * BOM, CR/LF) and trim off the noise that sneaks in when a key is copied from a * PDF or email. */ function cleanKey(key: string): string { @@ -141,7 +141,7 @@ function parseLicenseDate(value: string): Date | null { */ export function parseLicenseKey(key: string): ParsedLicense | null { const cleaned = cleanKey(key); - // Body and checksum are separated by the `__` delimiter; split on the LAST + // Body and checksum are separated by the `__` delimiter; split on the last // one so a `_`-containing body can't be confused with the delimiter. const idx = cleaned.lastIndexOf('__'); if (idx === -1) { @@ -179,10 +179,10 @@ export function parseLicenseKey(key: string): ParsedLicense | null { * so the result is deterministic and testable; the service passes the baked-in * `DOCKVIEW_RELEASE_DATE`). * - * Enforcement is VERSION-based, not wall-clock: a key covers every dockview + * Enforcement is version-based, not wall-clock: a key covers every dockview * version released on or before its `ValidUntil` date. If this build was * released after `ValidUntil` the key is `expired` (watermarked); otherwise it - * is `valid` — so a deployed app on a covered version keeps working forever, + * is `valid`, so a deployed app on a covered version keeps working forever, * and only upgrading to a build past the license window trips the watermark. A * build released before `ValidFrom` is treated leniently as `valid`. */ diff --git a/packages/dockview-enterprise/src/mruTracker.ts b/packages/dockview-enterprise/src/mruTracker.ts index e69681a91..e64960309 100644 --- a/packages/dockview-enterprise/src/mruTracker.ts +++ b/packages/dockview-enterprise/src/mruTracker.ts @@ -2,8 +2,8 @@ * Most-recently-used ordering for overflow tab-switching, private to the * advanced overflow module. * - * Keeps, per group, the group's panel ids ordered by last activation — front is - * most recently activated. Component-scoped (one tracker per component) so + * Keeps, per group, the group's panel ids ordered by last activation; the front + * is the most recently activated. Component-scoped (one tracker per component) so * recency survives a group closing and a panel moving between groups. There is * no second consumer, so this deliberately stays a module-local model rather * than a shared core primitive. @@ -13,7 +13,7 @@ export class MruTracker { /** * Seed a group's recency list from its current tab order (front = first - * tab). Called on group attach. Idempotent — re-seeding replaces the list, + * tab). Called on group attach. Idempotent: re-seeding replaces the list, * but existing recency is preserved for ids already tracked so a re-attach * doesn't reset ordering. */ @@ -32,7 +32,7 @@ export class MruTracker { } } - /** Drop a group's recency list — called when the group is removed. */ + /** Drop a group's recency list, called when the group is removed. */ detach(groupId: string): void { this._byGroup.delete(groupId); } @@ -65,7 +65,7 @@ export class MruTracker { ids.unshift(panelId); } - /** Remove a panel from every group's list — called when a panel is closed. */ + /** Remove a panel from every group's list, called when a panel is closed. */ remove(panelId: string): void { for (const ids of this._byGroup.values()) { const index = ids.indexOf(panelId); diff --git a/packages/dockview-enterprise/src/multiRowTabsService.ts b/packages/dockview-enterprise/src/multiRowTabsService.ts index 2206629a4..2c0ecf7fa 100644 --- a/packages/dockview-enterprise/src/multiRowTabsService.ts +++ b/packages/dockview-enterprise/src/multiRowTabsService.ts @@ -24,7 +24,7 @@ const LINE_SIZE_VARIABLE = '--dv-tabs-and-actions-container-height'; * The wrapped-row neighbour of `current` one row up or down, or `undefined` when * there is no row in that direction. Tabs are bucketed into rows by `offsetTop` * (the same signal `countRows` uses); within the target row the tab whose - * horizontal centre is nearest `current`'s is chosen — so Up/Down lands on the + * horizontal centre is nearest `current`'s is chosen, so Up/Down lands on the * geometrically-aligned tab rather than a fixed index. Pure geometry (reads * layout only) so it is unit-testable with mocked offsets. */ @@ -40,7 +40,7 @@ export function findVerticalNeighbour( const targetTop = rowTops[direction === 'up' ? currentRow - 1 : currentRow + 1]; if (targetTop === undefined) { - // Already on the top / bottom row — no wrap-around. + // Already on the top or bottom row: no wrap-around. return undefined; } @@ -85,30 +85,30 @@ function resolveMaxRows( interface RowMeasurement { /** * The number of wrapped lines the tabs occupy in their natural (uncapped) - * layout — the count of distinct tab cross-axis offsets (`offsetTop` for a + * layout: the count of distinct tab cross-axis offsets (`offsetTop` for a * horizontal header's rows, `offsetLeft` for a vertical header's columns). * Zero for an empty strip. Capped tabs stay in flow (clipped, not removed), * so this is always the natural count. (jsdom reports offset 0 for every - * tab, so this is 1 there regardless of size — real wrapping is e2e.) + * tab, so this is 1 there regardless of size; real wrapping is e2e.) */ rows: number; /** - * Panel ids of the tabs that wrapped onto a line at/after the `maxRows` cap - * — the surplus set routed to the overflow dropdown. Empty when uncapped or + * Panel ids of the tabs that wrapped onto a line at/after the `maxRows` cap: + * the surplus set routed to the overflow dropdown. Empty when uncapped or * when the natural layout already fits within the cap. */ surplus: string[]; } /** - * Bucket a tab list's tabs by their cross-axis offset — `offsetTop` for a - * horizontal header (rows), `offsetLeft` for a vertical header (columns) — to + * Bucket a tab list's tabs by their cross-axis offset (`offsetTop` for a + * horizontal header's rows, `offsetLeft` for a vertical header's columns) to * derive the natural line count and, given a cap, the surplus set of panel ids * on lines beyond it. * * Lines are ordered by DOM (flex-fill) order rather than by raw offset value: * flex-wrap fills line 0 fully, then line 1, and so on, so the first DOM tab - * carrying a new offset opens the next line. This is direction-agnostic — it is + * carrying a new offset opens the next line. This is direction-agnostic: it is * correct for a `vertical-rl` strip whose columns grow right-to-left (first * column is the right-most, i.e. the largest `offsetLeft`), where sorting by * offset would mis-order the columns. @@ -178,14 +178,14 @@ function sameSet(a: ReadonlySet<string>, b: ReadonlySet<string>): boolean { * natural row count from per-tab `offsetTop` buckets, and hands the surplus set * (tabs on rows beyond the cap) to the free forced-overflow seam so those tabs * spill into the dropdown. Detection is a row-count test, not the free path's - * horizontal-clip test — nothing clips horizontally when tabs wrap. + * horizontal-clip test, since nothing clips horizontally when tabs wrap. * * Wraps both horizontal headers (into rows) and vertical/edge-group headers * (into columns); a hidden header is a no-op. * * Wrap is (re)evaluated on construction, on `overflow` option changes, and on a * runtime header-direction flip (`setHeaderPosition` horizontal↔vertical) via - * the group API's `onDidHeaderDirectionChange` signal — so a group that flips + * the group API's `onDidHeaderDirectionChange` signal, so a group that flips * orientation re-measures on the correct axis (rows vs columns). */ class WrapController extends CompositeDisposable { @@ -214,7 +214,7 @@ class WrapController extends CompositeDisposable { this.group.model.onDidAddPanel(() => this.remeasure()), this.group.model.onDidRemovePanel(() => this.remeasure()), // A title edit changes a vertical tab's natural (rotated) length, so - // the tallest-tab height may move — re-measure so the uniform height + // the tallest-tab height may move; re-measure so the uniform height // still contains every tab. A no-op for horizontal wrap. this.group.model.onDidPanelTitleChange(() => this.remeasure()), // A header-direction flip swaps the wrap axis (rows↔columns): the @@ -264,7 +264,7 @@ class WrapController extends CompositeDisposable { /** Refresh the vertical uniform-tab-height, then re-count columns. Used for * panel churn / title edits (a resize keeps titles, so its RO path skips the - * height refresh and just re-counts). */ + * height refresh and re-counts). */ private remeasure(): void { const list = this.host.getTabsListElement(this.group); if (list) { @@ -338,7 +338,7 @@ class WrapController extends CompositeDisposable { if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') { return; } - // Inert unless the strip is currently wrapping a horizontal header — + // Inert unless the strip is currently wrapping a horizontal header; // mirror the wrap gate (`apply`) and core's `:not(...-vertical)` guard. if ( !list.classList.contains(WRAP_CLASS) || @@ -434,11 +434,11 @@ class WrapController extends CompositeDisposable { } /** - * Pin a vertical (edge-group) header's WIDTH to the wrapped column count. + * Pin a vertical (edge-group) header's width to the wrapped column count. * * A horizontal header grows its height to fit wrapped rows purely in CSS: * the strip's width is definite, so flex-wrap intrinsic sizing accounts for - * the rows. A vertical header can't — the strip wraps on its (percentage) + * the rows. A vertical header can't: the strip wraps on its (percentage) * height, which is indefinite during intrinsic-width resolution, so the * header's `auto` width is computed for a single column and stays clamped * when a resize reflows the tabs into more columns. The surplus columns then @@ -501,7 +501,7 @@ class WrapController extends CompositeDisposable { } /** - * Multi-row (wrapping) tabs. Adds `overflow.mode: 'wrap'` — tabs wrap onto + * Multi-row (wrapping) tabs. Adds `overflow.mode: 'wrap'`: tabs wrap onto * multiple rows and the header grows, instead of clipping into the chevron * dropdown. Consumes the free tab-list seam + header-aware content sizing; owns * no tab model, overflow detection, or sizing math. diff --git a/packages/dockview-enterprise/src/pinnedTabsService.ts b/packages/dockview-enterprise/src/pinnedTabsService.ts index 00a94b770..b691aadff 100644 Binary files a/packages/dockview-enterprise/src/pinnedTabsService.ts and b/packages/dockview-enterprise/src/pinnedTabsService.ts differ diff --git a/packages/dockview-enterprise/src/releaseDate.ts b/packages/dockview-enterprise/src/releaseDate.ts index b3e76dfaf..d1f87cb98 100644 --- a/packages/dockview-enterprise/src/releaseDate.ts +++ b/packages/dockview-enterprise/src/releaseDate.ts @@ -1,17 +1,17 @@ /** - * The UTC publish date of this dockview build — the single value that dates the + * The UTC publish date of this dockview build: the single value that dates the * build for license validation. * * License enforcement is version-based: a key covers every dockview version * released on or before its `ValidUntil` date, so a deployed app on a covered - * version never watermarks over time; only running a build published AFTER the + * version never watermarks over time; only running a build published after the * license window does. `validateLicense` compares this against the key's * `ValidUntil`. * - * Stamped at BUILD time: the placeholder in `RAW` below is replaced with the + * Stamped at build time: the placeholder in `RAW` below is replaced with the * build date by the rollup bundle step (which produces the published * `main`/`module` entry). In dev, tests, or a raw non-bundle consumer it is left - * untouched and we fall back to the current date — those paths never validate a + * untouched and we fall back to the current date; those paths never validate a * production license (tests inject their own date). */ const RAW = '__DOCKVIEW_RELEASE_DATE__'; diff --git a/packages/dockview-enterprise/src/smartGuidesService.ts b/packages/dockview-enterprise/src/smartGuidesService.ts index ee3c4de97..0fa4ac9c7 100644 --- a/packages/dockview-enterprise/src/smartGuidesService.ts +++ b/packages/dockview-enterprise/src/smartGuidesService.ts @@ -56,7 +56,7 @@ function resolveOptions(o: SmartGuidesOptions | undefined): ResolvedOptions { }; } -/** Local alias for the core geometry type — keeps these container-relative +/** Local alias for the core geometry type. Keeps these container-relative * boxes named `Rect` at the call sites while reusing one structural source. */ type Rect = Box; @@ -88,8 +88,8 @@ interface AxisResult { readonly coord: number; readonly delta: number; /** Index into the 3 probes (leading edge / centre / trailing edge) that - * latched onto the candidate — tracked so the sticky branch keeps gluing - * the SAME part of the box rather than silently switching probes. */ + * latched onto the candidate, tracked so the sticky branch keeps gluing + * the same part of the box rather than silently switching probes. */ readonly probe: number; } @@ -107,7 +107,7 @@ class GuideLayer { private readonly _element: HTMLElement; private readonly _lines: HTMLElement[] = []; private _preview: HTMLElement | undefined; - // Last-applied state — a frame whose guides are unchanged skips the DOM + // Last-applied state: a frame whose guides are unchanged skips the DOM // write entirely (no interleaved reads, so the browser coalesces what does // change into a single reflow at paint). private _lastLines = ''; @@ -253,7 +253,7 @@ const SOURCE_RANK: Record<CandidateSource, number> = { }; /** - * Smart Guides — Figma-style alignment guides + magnetic snapping for floating + * Smart Guides: Figma-style alignment guides + magnetic snapping for floating * groups. * * The float drag loop stays fully owned by `Overlay`; this service is a pure @@ -341,14 +341,14 @@ export class SmartGuidesService private get _opts(): ResolvedOptions { // Read each pointer-move frame, but the inputs (the host option + // runtime override) change only a handful of times per session. Cache by - // reference identity — `updateOptions` replaces `_override` with a fresh + // reference identity: `updateOptions` replaces `_override` with a fresh // object and a host option change swaps `smartGuides`, so either edit // invalidates this without per-frame re-resolution/allocation. const base = this.host.options.smartGuides; const cache = this._optsCache; // An explicit app-level option update swaps the `smartGuides` reference // (component `updateOptions` rebuilds the options object). That wins over - // earlier runtime overrides — drop them so the two don't fight (#10). + // earlier runtime overrides; drop them so the two don't fight (#10). if ( cache && cache.base !== base && @@ -452,8 +452,8 @@ export class SmartGuidesService session.pendingMerge = merge; // `showGuides` governs the alignment lines only. The dock/merge preview - // always shows when a merge is pending — it's the warning for an action - // that WILL commit on drop, so it must never be silent. + // always shows when a merge is pending: it's the warning for an action + // that will commit on drop, so it must never be silent. session.layer.render( opts.showGuides ? this._guideLines(session, snappedBox) : [], context.container @@ -529,7 +529,7 @@ export class SmartGuidesService // a horizontal sash → a y line). if (opts.snapSplitters) { for (const r of this.host.getGridSplitterRects()) { - // Skip hidden / collapsed sashes (zero-area rects) — a real sash + // Skip hidden / collapsed sashes (zero-area rects): a real sash // has a positive extent on both axes; a 0×0 rect would otherwise // become a phantom candidate at coord 0 (the container edge). if (r.width <= 0 || r.height <= 0) { @@ -592,8 +592,8 @@ export class SmartGuidesService engaged: AxisEngagement | undefined, opts: ResolvedOptions ): AxisResult | undefined { - // Sticky: stay glued via the SAME probe that engaged (not the nearest of - // all three) until that probe moves past snapDistance + release — so a + // Sticky: stay glued via the same probe that engaged (not the nearest of + // all three) until that probe moves past snapDistance + release, so a // small float can't silently re-latch its centre onto an edge line. if (engaged !== undefined) { const delta = engaged.coord - probes[engaged.probe].coord; @@ -647,7 +647,7 @@ export class SmartGuidesService } /** Every candidate line the (already snapped) box's probes land on, so two - * simultaneous alignments (e.g. left edges AND tops) draw two guides. */ + * simultaneous alignments (e.g. left edges and tops) draw two guides. */ private _guideLines( session: DragSession, snapped: { left: number; top: number; width: number; height: number } @@ -676,7 +676,7 @@ export class SmartGuidesService * choosing the **best** target rather than the first in iteration order: a * tab-strip overlap (the dragged centre over a target) suggests a **center** * merge into a shared tabset; an edge flush against a target's opposite edge - * — with ≥ 50% perpendicular overlap — suggests docking **beside** it. Among + * (with ≥ 50% perpendicular overlap) suggests docking **beside** it. Among * matches, a centre stack beats an adjacency, and within a kind the nearest * target wins. */ @@ -711,9 +711,9 @@ export class SmartGuidesService const hOverlap = overlapRatio(d.left, d.right, e.left, e.right); const vOverlap = overlapRatio(d.top, d.bottom, e.top, e.bottom); - // Tabset merge: the dragged float's CENTRE sits over the target (it is + // Tabset merge: the dragged float's centre sits over the target (it is // genuinely stacked on top), with the tab strips flush. Requiring the - // centre inside — not just top-alignment + edge overlap — stops a plain + // centre inside, not merely top-alignment + edge overlap, stops a plain // alignment of two overlapping floats reading as a merge (§11). const cx = (d.left + d.right) / 2; const cy = (d.top + d.bottom) / 2; diff --git a/packages/dockview-react/README.md b/packages/dockview-react/README.md index 31001350e..24d7089eb 100644 --- a/packages/dockview-react/README.md +++ b/packages/dockview-react/README.md @@ -1,7 +1,7 @@ <div align="center"> <h1>dockview-react</h1> -<p>React bindings for dockview — zero dependency layout manager supporting tabs, groups, grids and splitviews</p> +<p>React bindings for dockview, a zero dependency layout manager supporting tabs, groups, grids and splitviews</p> </div> diff --git a/packages/dockview-vue/README.md b/packages/dockview-vue/README.md index b0ef3eb96..6ed968504 100644 --- a/packages/dockview-vue/README.md +++ b/packages/dockview-vue/README.md @@ -1,7 +1,7 @@ <div align="center"> <h1>dockview-vue</h1> -<p>Vue 3 bindings for dockview — zero dependency layout manager supporting tabs, groups, grids and splitviews</p> +<p>Vue 3 bindings for dockview, a zero dependency layout manager supporting tabs, groups, grids and splitviews</p> </div> diff --git a/packages/dockview-vue/src/__tests__/dockview.spec.ts b/packages/dockview-vue/src/__tests__/dockview.spec.ts index ea327cea2..3257d9e3b 100644 --- a/packages/dockview-vue/src/__tests__/dockview.spec.ts +++ b/packages/dockview-vue/src/__tests__/dockview.spec.ts @@ -309,7 +309,7 @@ describe('DockviewVue components prop (issue #1301)', () => { }); function mountBare(props: Record<string, any> = {}) { - // NOTE: no `global.components` here — this is the scenario that used + // No `global.components` here; this is the scenario that used // to require `app.component(...)` in main.ts. return mount(DockviewVue, { props, attachTo: document.body }); } @@ -399,7 +399,7 @@ describe('DockviewVue components prop (issue #1301)', () => { }, attachTo: document.body, // String form must continue to work with the legacy global - // registration path too — that's the contract we promised. + // registration path too. That's the contract we promised. global: { components: { MockTab } }, }); await flushPromises(); @@ -449,7 +449,7 @@ describe('DockviewVue components prop (issue #1301)', () => { const api = (wrapper.emitted('ready')![0][0] as any).api as DockviewApi; - // Should not throw on createWatermarkComponent invocation — we proxy + // Should not throw on createWatermarkComponent invocation; we proxy // any call to verify resolveComponent doesn't reject the object. expect(() => (api as any).component.options.createWatermarkComponent?.() @@ -550,7 +550,7 @@ describe('DockviewVue components prop (issue #1301)', () => { await wrapper.setProps({ components: { Panel: NewPanel } }); await nextTick(); - // The next addPanel should resolve against the updated map — no + // The next addPanel should resolve against the updated map, with no // rerender of existing panels (we explicitly chose read-at-create). expect(() => api.addPanel({ id: 'panel-2', component: 'Panel', title: 'P2' }) diff --git a/packages/dockview-vue/src/__tests__/keepalive.spec.ts b/packages/dockview-vue/src/__tests__/keepalive.spec.ts index 3b0c8fde3..cb098e4fb 100644 --- a/packages/dockview-vue/src/__tests__/keepalive.spec.ts +++ b/packages/dockview-vue/src/__tests__/keepalive.spec.ts @@ -190,7 +190,7 @@ describe('provide/inject reaches teleported panels', () => { }, }); - // The host provides a value; the panel — a teleported descendant — + // The host provides a value; the panel (a teleported descendant) // must resolve it through the component tree. const Host = defineComponent({ name: 'ProvideHost', diff --git a/packages/dockview-vue/src/__tests__/paneview.spec.ts b/packages/dockview-vue/src/__tests__/paneview.spec.ts index df2f0a438..9041a3a4e 100644 --- a/packages/dockview-vue/src/__tests__/paneview.spec.ts +++ b/packages/dockview-vue/src/__tests__/paneview.spec.ts @@ -191,7 +191,7 @@ describe('PaneviewVue components prop resolves without registration', () => { }); test('addPanel resolves component from props.components alone', async () => { - // No `global.components` and no `app.component()` — the user's + // No `global.components` and no `app.component()`: the user's // `<script setup>` scenario. wrapper = mount(PaneviewVue, { props: { components: { MyPane: MockPaneComponent } }, diff --git a/packages/dockview-vue/src/utils.ts b/packages/dockview-vue/src/utils.ts index 53c23edf6..7f352db03 100644 --- a/packages/dockview-vue/src/utils.ts +++ b/packages/dockview-vue/src/utils.ts @@ -137,8 +137,8 @@ export interface VueMountDisposable { * A single component to be teleported by the host's `<DockviewPortals>`. * * `props` is a {@link ShallowRef} so reassigning it triggers a re-render - * without Vue deeply proxying the value — the params object carries raw - * dockview API instances that must NOT be made reactive. + * without Vue deeply proxying the value. The params object carries raw + * dockview API instances that must not be made reactive. */ export interface VueMountEntry { readonly id: number; diff --git a/packages/dockview/src/index.ts b/packages/dockview/src/index.ts index 262d02969..f5fbcd410 100644 --- a/packages/dockview/src/index.ts +++ b/packages/dockview/src/index.ts @@ -6,6 +6,6 @@ export * from 'dockview-core'; * separately-published `dockview-enterprise` package (which depends on and * re-exports `dockview`); install that to opt into them. * - * This module has no side effects — it is a pure re-export — so bundlers can + * This module has no side effects (it's a pure re-export), so bundlers can * fully tree-shake unused exports out of consumer builds. */ diff --git a/packages/docs/docs/overview/introduction.mdx b/packages/docs/docs/overview/introduction.mdx index 032f7b427..061dc37ea 100644 --- a/packages/docs/docs/overview/introduction.mdx +++ b/packages/docs/docs/overview/introduction.mdx @@ -14,7 +14,7 @@ Dockview is a zero-dependency layout manager for building IDE-like interfaces in - **Popout Windows**: groups can be moved to a separate browser window - **Serialization**: save and restore layouts with `api.toJSON()` / `api.fromJSON()` - **Zero Dependencies**: the core library has no runtime dependencies -- **Multi-Framework**: first-class support for React, Vue, Angular, and JavaScript +- **Multi-Framework**: support for React, Vue, Angular, and JavaScript ## Component types diff --git a/packages/docs/docusaurus.config.js b/packages/docs/docusaurus.config.js index 219090fbb..680ebebc4 100644 --- a/packages/docs/docusaurus.config.js +++ b/packages/docs/docusaurus.config.js @@ -398,9 +398,9 @@ const config = { }, { // /enterprise is the separate worker deployment, - // not a Docusaurus route — use pathname:// so the - // broken-link checker doesn't validate it (same as - // the sitemap link above). + // not a Docusaurus route, so use pathname:// to + // keep the broken-link checker from validating it + // (same as the sitemap link above). label: 'Privacy policy', href: 'pathname:///enterprise/privacy', target: '_self', diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview-mobile/src/app.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview-mobile/src/app.tsx index 096e47020..0817bc9c0 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview-mobile/src/app.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview-mobile/src/app.tsx @@ -467,7 +467,7 @@ const App: React.FC<AppProps> = (props) => { const api = event.api; setApi(api); - // Create the left edge group empty here — panels added later, AFTER + // Create the left edge group empty here; panels are added later, after // the main area is populated. Adding panels with // `position: { referenceGroup }` marks the target as the active // group, so populating the edge first causes subsequent @@ -480,7 +480,7 @@ const App: React.FC<AppProps> = (props) => { collapsed: true, }); - // Primary dockview — top group is a 4-tab tab group with the + // Primary dockview: the top group is a 4-tab tab group with the // trading panels, bottom group is a standalone News panel. The mix // demonstrates both a tab group and a single-panel group in the // primary area. Portrait phones have far more height than width, so @@ -522,7 +522,7 @@ const App: React.FC<AppProps> = (props) => { }); // Sub-group Orders + Positions into a "Trades" coloured tab group - // inside the primary top group — demonstrates the tab-group feature + // inside the primary top group, demonstrating the tab-group feature // alongside the standalone Watchlist / Chart tabs. const tradingGroupId = api.getPanel('watchlist')!.api.group.id; const tradesTabGroup = api.createTabGroup({ @@ -541,7 +541,7 @@ const App: React.FC<AppProps> = (props) => { panelId: 'positions', }); - // Populate the edge group LAST (mirrors the desktop demo's order) + // Populate the edge group last (mirrors the desktop demo's order) // so the active-group side-effect of `addPanel({referenceGroup})` // doesn't pull the main panels into the edge. api.addPanel({ diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview-mobile/src/index.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview-mobile/src/index.tsx index 6b10241a5..c2c3ee2fa 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview-mobile/src/index.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview-mobile/src/index.tsx @@ -7,7 +7,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx index a6608ab63..8e569f2ea 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/app.tsx @@ -57,9 +57,9 @@ import { } from './themeBuilder'; import { Sidebar } from './themeBuilderModal'; -// Set the docs license key HERE (not only in index.tsx): the docs /demo page +// Set the docs license key here (not only in index.tsx): the docs /demo page // loads this module (app.tsx) directly via ExampleFrame, never index.tsx, so -// otherwise every dockview instance — including the nested FX Rates dockview — +// otherwise every dockview instance, including the nested FX Rates dockview, // renders the "Unlicensed" watermark. Runs at module load, before any dockview // is created; harmless if index.tsx also sets it (standalone/CodeSandbox). LicenseManager.setLicenseKey( @@ -837,7 +837,7 @@ const DockviewDemo = (props: { if (api) { // Float / popout operate on the whole containing group, so they - // stay custom items — the built-in chip shortcuts are scoped to + // stay custom items. The built-in chip shortcuts are scoped to // the tab group (`'collapse'` / `'close'`, used above). items.push( 'separator', diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/fxTilesPanel.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/fxTilesPanel.tsx index 4661d7feb..e41f54d14 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/fxTilesPanel.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/fxTilesPanel.tsx @@ -228,7 +228,7 @@ const FxTile: React.FC<{ pair: Pair; quote: Quote }> = ({ pair, quote }) => { ); }; -// A category tab in the nested dockview — a grid of tiles for its pairs. +// A category tab in the nested dockview, showing a grid of tiles for its pairs. const FxCategoryPanel: React.FC<IDockviewPanelProps<{ categoryId: string }>> = ( props ) => { @@ -249,7 +249,7 @@ const FxCategoryPanel: React.FC<IDockviewPanelProps<{ categoryId: string }>> = ( // Only a top border: the outer FX card (fxTilesPanel wrapper) // already frames the other three sides, so a full border here // would double up against it. This top edge is the header - // divider under the G10/EM/Crosses tabs — matching a normal + // divider under the G10/EM/Crosses tabs, matching a normal // panel's `PanelHeader` divider inside its card. borderTop: `1px solid ${c.border}`, background: c.bg, @@ -272,7 +272,7 @@ const nestedComponents = { fxcat: FxCategoryPanel }; export const FxTilesPanel: React.FC = () => { const c = usePanelColors(); // Use the parent demo's live theme so the nested dockview follows the theme - // picker / builder exactly (not just a light/dark approximation). + // picker / builder exactly (not only a light/dark approximation). const parentTheme = React.useContext(ThemeContext); const theme = parentTheme ?? (c.isDark ? themeAbyss : themeLight); @@ -346,7 +346,7 @@ export const FxTilesPanel: React.FC = () => { background: c.bg, // Match every other panel's `PanelShell`: a full hairline // card border (+ the same subtle top highlight) around the - // panel content — here the nested dockview — so the FX panel + // panel content (here the nested dockview), so the FX panel // reads as a card like the rest. border: `1px solid ${c.border}`, boxShadow: `inset 0 1px 0 ${ diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/index.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/index.tsx index 79135558c..bded23eaa 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/index.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/index.tsx @@ -6,7 +6,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/newsPanel.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/newsPanel.tsx index c7b8d1e16..71c4e6fbe 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/newsPanel.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/newsPanel.tsx @@ -11,7 +11,7 @@ type Headline = { source: string; }; -// Illustrative feed — static headlines, styled to read like a live tape. +// Illustrative feed: static headlines, styled to read like a live tape. const HEADLINES: Headline[] = [ { ago: '00:12', ticker: 'BTC/USD', tone: 'green', text: 'Bitcoin breaks above $67K as spot ETF inflows accelerate for a fourth session', source: 'Reuters' }, { ago: '01:48', ticker: 'NVDA', tone: 'green', text: 'NVIDIA lifts data-centre guidance; analysts raise targets on AI demand', source: 'Bloomberg' }, diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/orderBookPanel.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/orderBookPanel.tsx index 4949e2447..90dd65365 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/orderBookPanel.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/orderBookPanel.tsx @@ -63,7 +63,7 @@ const BookRow: React.FC<{ ...tnum, }} > - {/* cumulative depth wall — animated via transform:scaleX so it + {/* cumulative depth wall, animated via transform:scaleX so it composites on the GPU (no per-frame layout/paint). */} <div style={{ diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/panelKit.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/panelKit.tsx index b4ac8fee3..7e4132591 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/panelKit.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/panelKit.tsx @@ -54,7 +54,7 @@ export function heatColor(t: number): string { return `hsl(${(220 - tt * 220).toFixed(0)}, 72%, 48%)`; } -// Theme-aware tint of a base colour at a given strength (0..1) — used for the +// Theme-aware tint of a base colour at a given strength (0..1), used for the // signal / correlation heat cells so they track light/dark. export function tint(color: string, strength: number): string { const pct = Math.round(Math.max(0, Math.min(1, strength)) * 100); @@ -122,7 +122,7 @@ export const VisibilityGate: React.FC<{ return <div style={{ height: '100%' }}>{visible ? children : null}</div>; }; -// Brief up/down flag after a numeric value changes — drives tick flashes. +// Brief up/down flag after a numeric value changes. Drives tick flashes. export function useFlash(value: number): 'up' | 'down' | null { const prev = React.useRef(value); const [dir, setDir] = React.useState<'up' | 'down' | null>(null); @@ -229,7 +229,7 @@ export const SectionLabel: React.FC<{ ); }; -// A row of compact label/value tiles — the stat strips that fill terminal +// A row of compact label/value tiles: the stat strips that fill terminal // headers (24h H/L, volume, VWAP, spread…). export const StatStrip: React.FC<{ children: React.ReactNode; cols?: number }> = ({ children, @@ -315,7 +315,7 @@ export const Chip: React.FC<{ } as const; const [fg, bg] = map[tone]; // On a solid bright fill, dark text reads better on green/yellow, white on - // red/blue/neutral — keeps chips legible instead of low-contrast white. + // red/blue/neutral, which keeps chips legible instead of low-contrast white. const solidText = tone === 'green' || tone === 'yellow' ? '#04060c' : '#ffffff'; return ( diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/panelTheme.ts b/packages/docs/sandboxes/react/dockview/demo-dockview/src/panelTheme.ts index 61c02fabd..ffcfe83e0 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/panelTheme.ts +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/panelTheme.ts @@ -32,7 +32,7 @@ export type PanelColors = { scrollThumb: string; }; -// Near-black background with vivid, saturated accents — a bank-terminal look +// Near-black background with vivid, saturated accents, a bank-terminal look // (Citi Velocity / Bloomberg) where the strong green/red pops hard off black. export const DARK_COLORS: PanelColors = { isDark: true, diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/positionSummaryPanel.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/positionSummaryPanel.tsx index d5a7bf868..93edb4e95 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/positionSummaryPanel.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/positionSummaryPanel.tsx @@ -16,7 +16,7 @@ import { } from './panelKit'; // Deterministic per-ticker drift so marks (for symbols without a live feed) are -// stable across renders — the data is illustrative, not real. +// stable across renders. The data is illustrative, not real. function hashDrift(s: string): number { let h = 0; for (let i = 0; i < s.length; i++) { diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/settingsModal.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/settingsModal.tsx index d658b3ce1..3a9a86d35 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/settingsModal.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/settingsModal.tsx @@ -26,7 +26,7 @@ const Kbd = (props: { children: React.ReactNode }) => ( </kbd> ); -// Read-only reference. Mirrors the enabled `keyboardNavigation` bindings — +// Read-only reference. Mirrors the enabled `keyboardNavigation` bindings: // KeyboardNavigation (nav) + KeyboardDocking (move). Keep in sync with // DEFAULT_KEYMAP in dockview-enterprise if the defaults change. const SHORTCUTS: { label: string; keys: string[] }[] = [ @@ -34,7 +34,7 @@ const SHORTCUTS: { label: string; keys: string[] }[] = [ { label: 'Focus group by direction', keys: ['Ctrl ⇧ ←↑↓→'] }, { label: 'Next / previous tab in group', keys: ['Ctrl ]', 'Ctrl ['] }, { label: 'Focus the tab strip', keys: ['Ctrl ⇧ \\'] }, - { label: 'Move panel — arm', keys: ['Ctrl M'] }, + { label: 'Move panel: arm', keys: ['Ctrl M'] }, { label: '…then pick target / edge', keys: ['←↑↓→'] }, { label: '…tab into group (centre)', keys: ['Space', 'C'] }, { label: '…commit / cancel', keys: ['Enter', 'Esc'] }, diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/sidebarTheme.ts b/packages/docs/sandboxes/react/dockview/demo-dockview/src/sidebarTheme.ts index 52df58e3c..432e3a3c4 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/sidebarTheme.ts +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/sidebarTheme.ts @@ -47,7 +47,7 @@ export const SB = { mono: 'ui-monospace, SFMono-Regular, Menlo, Consolas, monospace', }; -// Shared button styles (grid/panel/group action rows) — the site's secondary / +// Shared button styles (grid/panel/group action rows): the site's secondary / // primary button recipe, so every button reads clearly in light and dark. export const sbBtn: CSSProperties = { padding: '5px 11px', diff --git a/packages/docs/sandboxes/react/dockview/demo-dockview/src/themeBuilderModal.tsx b/packages/docs/sandboxes/react/dockview/demo-dockview/src/themeBuilderModal.tsx index 4c0bb2012..ad206f1d9 100644 --- a/packages/docs/sandboxes/react/dockview/demo-dockview/src/themeBuilderModal.tsx +++ b/packages/docs/sandboxes/react/dockview/demo-dockview/src/themeBuilderModal.tsx @@ -35,7 +35,7 @@ const Section = (props: { </Card> ); -// Numeric slider — the kit `Slider` already matches this call signature. +// Numeric slider. The kit `Slider` already matches this call signature. const SliderRow = Slider; const TextRow = (props: { diff --git a/packages/docs/src/components/NewsletterWidget.tsx b/packages/docs/src/components/NewsletterWidget.tsx index 8a2be3007..4f128a473 100644 --- a/packages/docs/src/components/NewsletterWidget.tsx +++ b/packages/docs/src/components/NewsletterWidget.tsx @@ -54,7 +54,7 @@ export default function NewsletterWidget() { try { localStorage.setItem(DISMISS_KEY, 'true'); } catch { - /* storage unavailable — dismissal just won't persist */ + /* storage unavailable, so the dismissal won't persist */ } }; diff --git a/packages/docs/src/components/ui/codeRunner.tsx b/packages/docs/src/components/ui/codeRunner.tsx index 999ca34d4..ce0f21edf 100644 --- a/packages/docs/src/components/ui/codeRunner.tsx +++ b/packages/docs/src/components/ui/codeRunner.tsx @@ -40,7 +40,7 @@ export const _CodeRunner = (props: { id: string; height?: number }) => { export const CodeRunner = (props: { id: string; height?: number }) => { // Reserve the height on this server-rendered container so the page doesn't - // reflow when the client-only iframe mounts — `BrowserOnly` renders nothing + // reflow when the client-only iframe mounts. `BrowserOnly` renders nothing // until hydration, so without a fixed-height box the content below jumps // down once the example appears. The iframe fills this box. return ( diff --git a/packages/docs/src/components/ui/enterprise/enterpriseBadge.tsx b/packages/docs/src/components/ui/enterprise/enterpriseBadge.tsx index 6b5647b6f..4435ce90f 100644 --- a/packages/docs/src/components/ui/enterprise/enterpriseBadge.tsx +++ b/packages/docs/src/components/ui/enterprise/enterpriseBadge.tsx @@ -17,7 +17,7 @@ export function EnterpriseBadge({ return ( <span className={className} - title="Enterprise feature — part of the dockview-enterprise package" + title="Enterprise feature, part of the dockview-enterprise package" aria-label="Enterprise feature" role="img" > diff --git a/packages/docs/src/components/ui/reference/docRef.tsx b/packages/docs/src/components/ui/reference/docRef.tsx index 81c30e304..eb205c5c2 100644 --- a/packages/docs/src/components/ui/reference/docRef.tsx +++ b/packages/docs/src/components/ui/reference/docRef.tsx @@ -206,7 +206,7 @@ export const Text = (props: { content: DocsContent[] }) => { </code> ); case 'inline-tag': - // e.g. `{@link SomeType}` — render the referenced symbol + // e.g. `{@link SomeType}`: render the referenced symbol // name as inline code. return <code key={i}>{piece.text}</code>; default: diff --git a/packages/docs/src/css/custom.scss b/packages/docs/src/css/custom.scss index c2f59eb92..4fb353b17 100644 --- a/packages/docs/src/css/custom.scss +++ b/packages/docs/src/css/custom.scss @@ -93,7 +93,7 @@ --ifm-navbar-link-hover-color: var(--ifm-color-primary); --ifm-navbar-height: 4rem; - // Coloured header (ink) tokens — brand navy (#0A1440) + // Coloured header (ink) tokens: brand navy (#0A1440) --dv-header-bg: #0a1440; --dv-header-border: #1c2a5e; --dv-header-fg: #c8cbe4; @@ -177,7 +177,7 @@ } } -// Coloured "ink" header — light theme only, so dark mode keeps its own dark +// Coloured "ink" header, light theme only, so dark mode keeps its own dark // navbar. Scoped to the desktop bar (.navbar__inner) so the mobile slide-out // menu, which shares --ifm-navbar-background-color, stays light and readable. :root:not([data-theme='dark']) { @@ -739,7 +739,7 @@ html.dv-demo-route .main-wrapper { top: -0.15em; } -/* on a sidebar item — push to the right edge of the link */ +/* on a sidebar item: push to the right edge of the link */ .menu__link .enterprise-badge--sidebar { margin-left: auto; font-size: 0.58rem; @@ -758,7 +758,7 @@ html.dv-demo-route .main-wrapper { } /* Pricing page: the two editions presented side by side above the feature - comparison. No cards or fills, just two plain columns. */ + comparison. No cards or fills, two plain columns. */ .pricing-editions { display: grid; grid-template-columns: 1fr 1fr; diff --git a/packages/docs/src/pages/contact.tsx b/packages/docs/src/pages/contact.tsx index 5a2fb4865..248c5db52 100644 --- a/packages/docs/src/pages/contact.tsx +++ b/packages/docs/src/pages/contact.tsx @@ -1,13 +1,13 @@ import React from 'react'; import Layout from '@theme/Layout'; -// Public Turnstile site key (safe to expose — it's rendered into the page). The +// Public Turnstile site key (safe to expose, it's rendered into the page). The // matching secret lives only in the licensing worker (TURNSTILE_SECRET_KEY). const TURNSTILE_SITE_KEY = '0x4AAAAAADx1eYe1Ro1u3YUq'; -// Cloudflare's visible "always passes" TEST site key. Used on localhost so -// local dev doesn't depend on the real widget's domain allowlist or network — -// pair it with the matching TEST secret in the worker's .dev.vars. +// Cloudflare's visible "always passes" test site key. Used on localhost so +// local dev doesn't depend on the real widget's domain allowlist or network. +// Pair it with the matching test secret in the worker's .dev.vars. const TURNSTILE_TEST_SITE_KEY = '1x00000000000000000000AA'; function turnstileSiteKey(): string { diff --git a/packages/docs/src/pages/examples.tsx b/packages/docs/src/pages/examples.tsx index 06004eb06..70b1a1be2 100644 --- a/packages/docs/src/pages/examples.tsx +++ b/packages/docs/src/pages/examples.tsx @@ -9,7 +9,7 @@ type Framework = 'react' | 'vue' | 'angular' | 'typescript'; interface Example { name: string; frameworks: Framework[]; - /** Requires a `dockview-enterprise` feature — marked with the Enterprise pill. */ + /** Requires a `dockview-enterprise` feature, marked with the Enterprise pill. */ enterprise?: boolean; } diff --git a/packages/docs/src/pages/newsletter.tsx b/packages/docs/src/pages/newsletter.tsx index 670de9596..9a609ec55 100644 --- a/packages/docs/src/pages/newsletter.tsx +++ b/packages/docs/src/pages/newsletter.tsx @@ -1,11 +1,11 @@ import React from 'react'; import Layout from '@theme/Layout'; -// Public Turnstile site key (safe to expose — it's rendered into the page). The +// Public Turnstile site key (safe to expose, it's rendered into the page). The // matching secret lives only in the licensing worker (TURNSTILE_SECRET_KEY). const TURNSTILE_SITE_KEY = '0x4AAAAAADx1eYe1Ro1u3YUq'; -// Cloudflare's visible "always passes" TEST site key. Used on localhost so +// Cloudflare's visible "always passes" test site key. Used on localhost so // local dev doesn't depend on the real widget's domain allowlist or network. const TURNSTILE_TEST_SITE_KEY = '1x00000000000000000000AA'; diff --git a/packages/docs/src/pages/trial.tsx b/packages/docs/src/pages/trial.tsx index 907f2d8b5..31e5af32c 100644 --- a/packages/docs/src/pages/trial.tsx +++ b/packages/docs/src/pages/trial.tsx @@ -1,13 +1,13 @@ import React from 'react'; import Layout from '@theme/Layout'; -// Public Turnstile site key (safe to expose — it's rendered into the page). The +// Public Turnstile site key (safe to expose, it's rendered into the page). The // matching secret lives only in the licensing worker (TURNSTILE_SECRET_KEY). const TURNSTILE_SITE_KEY = '0x4AAAAAADx1eYe1Ro1u3YUq'; -// Cloudflare's visible "always passes" TEST site key. Used on localhost so -// local dev doesn't depend on the real widget's domain allowlist or network — -// pair it with the matching TEST secret in the worker's .dev.vars. +// Cloudflare's visible "always passes" test site key. Used on localhost so +// local dev doesn't depend on the real widget's domain allowlist or network. +// Pair it with the matching test secret in the worker's .dev.vars. const TURNSTILE_TEST_SITE_KEY = '1x00000000000000000000AA'; function turnstileSiteKey(): string { diff --git a/packages/docs/src/pages/whats-new.tsx b/packages/docs/src/pages/whats-new.tsx index 760b65c96..d2929577c 100644 --- a/packages/docs/src/pages/whats-new.tsx +++ b/packages/docs/src/pages/whats-new.tsx @@ -19,7 +19,7 @@ const RELEASES: Release[] = [ tag: 'v8', badge: 'Latest', summary: - 'An additive release focused on the tab header and drag and drop — pinned and wrapping tabs, an aim-at-a-cell drop compass, floating-group snapping, layout history, auto-hide edge groups, and keyboard docking. Every capability is opt-in, so upgrading is safe by default.', + 'An additive release focused on the tab header and drag and drop: pinned and wrapping tabs, an aim-at-a-cell drop compass, floating-group snapping, layout history, auto-hide edge groups, and keyboard docking. Every capability is opt-in, so upgrading is safe by default.', notes: '/docs/releases/whats-new/whats-new-v8', migration: '/docs/releases/migrating/migrating-to-v8', }, @@ -35,7 +35,7 @@ const RELEASES: Release[] = [ version: 'Dockview 6.0', tag: 'v6', summary: - 'The largest release since 4.0 — tab groups, edge groups, an overhauled theme system with an interactive theme builder, and a richer event surface on DockviewApi.', + 'The largest release since 4.0: tab groups, edge groups, an overhauled theme system with an interactive theme builder, and a richer event surface on DockviewApi.', notes: '/docs/releases/whats-new/whats-new-v6', }, ]; @@ -73,7 +73,7 @@ export default function WhatsNew(): JSX.Element { return ( <Layout title="What's new" - description="Release highlights for Dockview — the newest version first, with links to the full release notes and migration guides." + description="Release highlights for Dockview, newest version first, with links to the full release notes and migration guides." > <main className="whats-new-page"> <div className="container"> diff --git a/packages/docs/static/example-runner/dockview-angular-boilerplate/systemjs.config.js b/packages/docs/static/example-runner/dockview-angular-boilerplate/systemjs.config.js index db646fcba..c81c90470 100644 --- a/packages/docs/static/example-runner/dockview-angular-boilerplate/systemjs.config.js +++ b/packages/docs/static/example-runner/dockview-angular-boilerplate/systemjs.config.js @@ -78,7 +78,7 @@ defaultExtension: 'js', }, // Point `dockview` at its rollup bundle via an explicit `main`, so - // SystemJS doesn't request the bare package directory — a 404 + // SystemJS doesn't request the bare package directory, which 404s // (previously a fatal EISDIR) in the dev server. The bundle requires // only `dockview-core`, mapped above. dockview: { diff --git a/packages/docs/static/example-runner/dockview-typescript-boilerplate/systemjs.config.js b/packages/docs/static/example-runner/dockview-typescript-boilerplate/systemjs.config.js index 658a2f70d..8875e76d9 100644 --- a/packages/docs/static/example-runner/dockview-typescript-boilerplate/systemjs.config.js +++ b/packages/docs/static/example-runner/dockview-typescript-boilerplate/systemjs.config.js @@ -57,8 +57,8 @@ }, // Examples import from `dockview` directly. Give it an explicit // `main` (its rollup bundle) so SystemJS doesn't request the bare - // package directory — a 404 (previously a fatal EISDIR) in the dev - // server. The bundle requires only `dockview-core`, mapped above. + // package directory, which 404s (previously a fatal EISDIR) in the + // dev server. The bundle requires only `dockview-core`, mapped above. dockview: { main: './dist/package/main.cjs.js', format: 'cjs', diff --git a/packages/docs/static/example-runner/dockview-vue-boilerplate/systemjs.config.js b/packages/docs/static/example-runner/dockview-vue-boilerplate/systemjs.config.js index c4114dd5b..6c723bda2 100644 --- a/packages/docs/static/example-runner/dockview-vue-boilerplate/systemjs.config.js +++ b/packages/docs/static/example-runner/dockview-vue-boilerplate/systemjs.config.js @@ -60,7 +60,7 @@ defaultExtension: 'js', }, // Point `dockview` at its rollup bundle via an explicit `main`, so - // SystemJS doesn't request the bare package directory — a 404 + // SystemJS doesn't request the bare package directory, which 404s // (previously a fatal EISDIR) in the dev server. The bundle requires // only `dockview-core`, mapped above. dockview: { diff --git a/packages/docs/templates/dockview/advanced-overflow/angular/src/index.ts b/packages/docs/templates/dockview/advanced-overflow/angular/src/index.ts index 621b766cb..3181a3f90 100644 --- a/packages/docs/templates/dockview/advanced-overflow/angular/src/index.ts +++ b/packages/docs/templates/dockview/advanced-overflow/angular/src/index.ts @@ -12,7 +12,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/advanced-overflow/react/src/index.tsx b/packages/docs/templates/dockview/advanced-overflow/react/src/index.tsx index f0f29362b..3681b0d6c 100644 --- a/packages/docs/templates/dockview/advanced-overflow/react/src/index.tsx +++ b/packages/docs/templates/dockview/advanced-overflow/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/advanced-overflow/typescript/src/index.ts b/packages/docs/templates/dockview/advanced-overflow/typescript/src/index.ts index 971f99ba4..04340ec62 100644 --- a/packages/docs/templates/dockview/advanced-overflow/typescript/src/index.ts +++ b/packages/docs/templates/dockview/advanced-overflow/typescript/src/index.ts @@ -9,7 +9,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/advanced-overflow/vue/src/index.ts b/packages/docs/templates/dockview/advanced-overflow/vue/src/index.ts index 47b3a1e09..21e59b0f7 100644 --- a/packages/docs/templates/dockview/advanced-overflow/vue/src/index.ts +++ b/packages/docs/templates/dockview/advanced-overflow/vue/src/index.ts @@ -9,7 +9,7 @@ import { IDockviewPanelProps, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/auto-edge-groups/angular/src/index.ts b/packages/docs/templates/dockview/auto-edge-groups/angular/src/index.ts index 247cba542..c7292d641 100644 --- a/packages/docs/templates/dockview/auto-edge-groups/angular/src/index.ts +++ b/packages/docs/templates/dockview/auto-edge-groups/angular/src/index.ts @@ -12,7 +12,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/auto-edge-groups/react/src/index.tsx b/packages/docs/templates/dockview/auto-edge-groups/react/src/index.tsx index f0f29362b..3681b0d6c 100644 --- a/packages/docs/templates/dockview/auto-edge-groups/react/src/index.tsx +++ b/packages/docs/templates/dockview/auto-edge-groups/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/auto-edge-groups/typescript/src/index.ts b/packages/docs/templates/dockview/auto-edge-groups/typescript/src/index.ts index 9308f4a54..da9981ff1 100644 --- a/packages/docs/templates/dockview/auto-edge-groups/typescript/src/index.ts +++ b/packages/docs/templates/dockview/auto-edge-groups/typescript/src/index.ts @@ -8,7 +8,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/auto-edge-groups/vue/src/index.ts b/packages/docs/templates/dockview/auto-edge-groups/vue/src/index.ts index 500846446..c56c4a7a8 100644 --- a/packages/docs/templates/dockview/auto-edge-groups/vue/src/index.ts +++ b/packages/docs/templates/dockview/auto-edge-groups/vue/src/index.ts @@ -8,7 +8,7 @@ import { IDockviewPanelProps, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/auto-hide-edge-groups/angular/src/index.ts b/packages/docs/templates/dockview/auto-hide-edge-groups/angular/src/index.ts index 7df711a24..f341cdb10 100644 --- a/packages/docs/templates/dockview/auto-hide-edge-groups/angular/src/index.ts +++ b/packages/docs/templates/dockview/auto-hide-edge-groups/angular/src/index.ts @@ -12,7 +12,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); @@ -109,7 +109,7 @@ export class AppComponent { position: { referenceGroup: 'bottom-edge' }, }); - // auto-hide both edge groups to their strips — click a tab to peek + // auto-hide both edge groups to their strips; click a tab to peek api.autoHideEdgeGroup('left'); api.autoHideEdgeGroup('bottom'); } diff --git a/packages/docs/templates/dockview/auto-hide-edge-groups/react/src/app.tsx b/packages/docs/templates/dockview/auto-hide-edge-groups/react/src/app.tsx index 8535ef9bd..92728204d 100644 --- a/packages/docs/templates/dockview/auto-hide-edge-groups/react/src/app.tsx +++ b/packages/docs/templates/dockview/auto-hide-edge-groups/react/src/app.tsx @@ -64,7 +64,7 @@ const App = (props: { theme?: string }) => { addEdgePanel(api, bottom.id, 'output', 'Output'); addEdgePanel(api, bottom.id, 'problems', 'Problems'); - // auto-hide both edge groups to their strips — click a tab to peek + // auto-hide both edge groups to their strips; click a tab to peek api.autoHideEdgeGroup('left'); api.autoHideEdgeGroup('bottom'); }; diff --git a/packages/docs/templates/dockview/auto-hide-edge-groups/react/src/index.tsx b/packages/docs/templates/dockview/auto-hide-edge-groups/react/src/index.tsx index f0f29362b..3681b0d6c 100644 --- a/packages/docs/templates/dockview/auto-hide-edge-groups/react/src/index.tsx +++ b/packages/docs/templates/dockview/auto-hide-edge-groups/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/auto-hide-edge-groups/typescript/src/index.ts b/packages/docs/templates/dockview/auto-hide-edge-groups/typescript/src/index.ts index d4438e548..9839cd10d 100644 --- a/packages/docs/templates/dockview/auto-hide-edge-groups/typescript/src/index.ts +++ b/packages/docs/templates/dockview/auto-hide-edge-groups/typescript/src/index.ts @@ -8,7 +8,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); @@ -89,6 +89,6 @@ api.addPanel({ position: { referenceGroup: 'bottom-edge' }, }); -// auto-hide both edge groups to their strips — click a tab to peek +// auto-hide both edge groups to their strips; click a tab to peek api.autoHideEdgeGroup('left'); api.autoHideEdgeGroup('bottom'); diff --git a/packages/docs/templates/dockview/auto-hide-edge-groups/vue/src/index.ts b/packages/docs/templates/dockview/auto-hide-edge-groups/vue/src/index.ts index 25007b68f..913e79655 100644 --- a/packages/docs/templates/dockview/auto-hide-edge-groups/vue/src/index.ts +++ b/packages/docs/templates/dockview/auto-hide-edge-groups/vue/src/index.ts @@ -8,7 +8,7 @@ import { IDockviewPanelProps, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); @@ -94,7 +94,7 @@ const App = defineComponent({ position: { referenceGroup: 'bottom-edge' }, }); - // auto-hide both edge groups to their strips — click a tab to peek + // auto-hide both edge groups to their strips; click a tab to peek api.autoHideEdgeGroup('left'); api.autoHideEdgeGroup('bottom'); }, diff --git a/packages/docs/templates/dockview/context-menu/angular/src/index.ts b/packages/docs/templates/dockview/context-menu/angular/src/index.ts index 599d286c9..928239ac1 100644 --- a/packages/docs/templates/dockview/context-menu/angular/src/index.ts +++ b/packages/docs/templates/dockview/context-menu/angular/src/index.ts @@ -12,7 +12,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/context-menu/react/src/index.tsx b/packages/docs/templates/dockview/context-menu/react/src/index.tsx index 7425ede76..0b7d8f1d9 100644 --- a/packages/docs/templates/dockview/context-menu/react/src/index.tsx +++ b/packages/docs/templates/dockview/context-menu/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/context-menu/typescript/src/index.ts b/packages/docs/templates/dockview/context-menu/typescript/src/index.ts index d656ecafe..e07ace313 100644 --- a/packages/docs/templates/dockview/context-menu/typescript/src/index.ts +++ b/packages/docs/templates/dockview/context-menu/typescript/src/index.ts @@ -8,7 +8,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/context-menu/vue/src/index.ts b/packages/docs/templates/dockview/context-menu/vue/src/index.ts index 2c8a9e457..aa60263a7 100644 --- a/packages/docs/templates/dockview/context-menu/vue/src/index.ts +++ b/packages/docs/templates/dockview/context-menu/vue/src/index.ts @@ -8,7 +8,7 @@ import { IDockviewPanelProps, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/demo-dockview/angular/src/index.ts b/packages/docs/templates/dockview/demo-dockview/angular/src/index.ts index bb231cbf3..568752724 100644 --- a/packages/docs/templates/dockview/demo-dockview/angular/src/index.ts +++ b/packages/docs/templates/dockview/demo-dockview/angular/src/index.ts @@ -23,7 +23,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/demo-dockview/react/src/index.tsx b/packages/docs/templates/dockview/demo-dockview/react/src/index.tsx index f0f29362b..3681b0d6c 100644 --- a/packages/docs/templates/dockview/demo-dockview/react/src/index.tsx +++ b/packages/docs/templates/dockview/demo-dockview/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/dnd-external/angular/src/index.ts b/packages/docs/templates/dockview/dnd-external/angular/src/index.ts index a4f8caf10..711103625 100644 --- a/packages/docs/templates/dockview/dnd-external/angular/src/index.ts +++ b/packages/docs/templates/dockview/dnd-external/angular/src/index.ts @@ -108,8 +108,8 @@ export class AppComponent implements OnDestroy { }); this.disposables.push( - // Attach custom metadata when an internal panel/group drag starts — - // an external drop zone can then read it via dataTransfer. + // Attach custom metadata when an internal panel/group drag starts, + // so an external drop zone can read it via dataTransfer. api.onWillDragPanel((event) => { if (!(event.nativeEvent instanceof DragEvent)) { return; diff --git a/packages/docs/templates/dockview/drop-guide/angular/src/index.ts b/packages/docs/templates/dockview/drop-guide/angular/src/index.ts index 0e9cf9eed..94daa4610 100644 --- a/packages/docs/templates/dockview/drop-guide/angular/src/index.ts +++ b/packages/docs/templates/dockview/drop-guide/angular/src/index.ts @@ -12,7 +12,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/drop-guide/react/src/index.tsx b/packages/docs/templates/dockview/drop-guide/react/src/index.tsx index f0f29362b..3681b0d6c 100644 --- a/packages/docs/templates/dockview/drop-guide/react/src/index.tsx +++ b/packages/docs/templates/dockview/drop-guide/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/drop-guide/typescript/src/index.ts b/packages/docs/templates/dockview/drop-guide/typescript/src/index.ts index 6dc7129fc..013f45094 100644 --- a/packages/docs/templates/dockview/drop-guide/typescript/src/index.ts +++ b/packages/docs/templates/dockview/drop-guide/typescript/src/index.ts @@ -8,7 +8,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/drop-guide/vue/src/index.ts b/packages/docs/templates/dockview/drop-guide/vue/src/index.ts index 58f7c10ff..aabec1be7 100644 --- a/packages/docs/templates/dockview/drop-guide/vue/src/index.ts +++ b/packages/docs/templates/dockview/drop-guide/vue/src/index.ts @@ -8,7 +8,7 @@ import { IDockviewPanelProps, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/keyboard/angular/src/index.ts b/packages/docs/templates/dockview/keyboard/angular/src/index.ts index aa6c5bbc7..5492e87de 100644 --- a/packages/docs/templates/dockview/keyboard/angular/src/index.ts +++ b/packages/docs/templates/dockview/keyboard/angular/src/index.ts @@ -12,7 +12,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/keyboard/react/src/index.tsx b/packages/docs/templates/dockview/keyboard/react/src/index.tsx index f0f29362b..3681b0d6c 100644 --- a/packages/docs/templates/dockview/keyboard/react/src/index.tsx +++ b/packages/docs/templates/dockview/keyboard/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/keyboard/typescript/src/index.ts b/packages/docs/templates/dockview/keyboard/typescript/src/index.ts index 6606b3c83..9b031158b 100644 --- a/packages/docs/templates/dockview/keyboard/typescript/src/index.ts +++ b/packages/docs/templates/dockview/keyboard/typescript/src/index.ts @@ -9,7 +9,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/keyboard/vue/src/index.ts b/packages/docs/templates/dockview/keyboard/vue/src/index.ts index 2d3567fc9..84746246c 100644 --- a/packages/docs/templates/dockview/keyboard/vue/src/index.ts +++ b/packages/docs/templates/dockview/keyboard/vue/src/index.ts @@ -8,7 +8,7 @@ import { IDockviewPanelProps, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/layout-history/angular/src/index.ts b/packages/docs/templates/dockview/layout-history/angular/src/index.ts index 338309f0a..2a439e0fc 100644 --- a/packages/docs/templates/dockview/layout-history/angular/src/index.ts +++ b/packages/docs/templates/dockview/layout-history/angular/src/index.ts @@ -20,7 +20,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); @@ -110,7 +110,7 @@ export class AppComponent implements OnInit, OnDestroy { title: 'Panel 5', }); - // The seed layout shouldn't be undoable — start with a clean history. + // The seed layout shouldn't be undoable, so start with a clean history. event.api.clearHistory(); this.canUndo = event.api.canUndo; diff --git a/packages/docs/templates/dockview/layout-history/react/src/app.tsx b/packages/docs/templates/dockview/layout-history/react/src/app.tsx index f3e87c701..4ada408f6 100644 --- a/packages/docs/templates/dockview/layout-history/react/src/app.tsx +++ b/packages/docs/templates/dockview/layout-history/react/src/app.tsx @@ -34,7 +34,7 @@ const App = (props: { theme?: string }) => { const onReady = (event: DockviewReadyEvent) => { loadDefaultLayout(event.api); - // The seed layout shouldn't be undoable — start with a clean history. + // The seed layout shouldn't be undoable, so start with a clean history. event.api.clearHistory(); setApi(event.api); }; diff --git a/packages/docs/templates/dockview/layout-history/react/src/index.tsx b/packages/docs/templates/dockview/layout-history/react/src/index.tsx index f0f29362b..3681b0d6c 100644 --- a/packages/docs/templates/dockview/layout-history/react/src/index.tsx +++ b/packages/docs/templates/dockview/layout-history/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/layout-history/typescript/src/index.ts b/packages/docs/templates/dockview/layout-history/typescript/src/index.ts index b2300086c..bcd4ee825 100644 --- a/packages/docs/templates/dockview/layout-history/typescript/src/index.ts +++ b/packages/docs/templates/dockview/layout-history/typescript/src/index.ts @@ -9,7 +9,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); @@ -74,7 +74,7 @@ api.addPanel({ }); api.addPanel({ id: 'panel_5', component: 'default', title: 'Panel 5' }); -// The seed layout shouldn't be undoable — start with a clean history. +// The seed layout shouldn't be undoable, so start with a clean history. api.clearHistory(); // Drive the toolbar's disabled state from the history stack. diff --git a/packages/docs/templates/dockview/layout-history/vue/src/index.ts b/packages/docs/templates/dockview/layout-history/vue/src/index.ts index cb90ecd52..a21a91ace 100644 --- a/packages/docs/templates/dockview/layout-history/vue/src/index.ts +++ b/packages/docs/templates/dockview/layout-history/vue/src/index.ts @@ -9,7 +9,7 @@ import { IDockviewPanelProps, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); @@ -87,7 +87,7 @@ const App = defineComponent({ title: 'Panel 5', }); - // The seed layout shouldn't be undoable — start with a clean history. + // The seed layout shouldn't be undoable, so start with a clean history. event.api.clearHistory(); this.canUndo = event.api.canUndo; diff --git a/packages/docs/templates/dockview/pinned-tabs/angular/src/index.ts b/packages/docs/templates/dockview/pinned-tabs/angular/src/index.ts index 2be789672..4d2cba1c7 100644 --- a/packages/docs/templates/dockview/pinned-tabs/angular/src/index.ts +++ b/packages/docs/templates/dockview/pinned-tabs/angular/src/index.ts @@ -20,7 +20,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/pinned-tabs/react/src/index.tsx b/packages/docs/templates/dockview/pinned-tabs/react/src/index.tsx index f0f29362b..3681b0d6c 100644 --- a/packages/docs/templates/dockview/pinned-tabs/react/src/index.tsx +++ b/packages/docs/templates/dockview/pinned-tabs/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/pinned-tabs/typescript/src/index.ts b/packages/docs/templates/dockview/pinned-tabs/typescript/src/index.ts index 6627a38bb..c2cb39f4e 100644 --- a/packages/docs/templates/dockview/pinned-tabs/typescript/src/index.ts +++ b/packages/docs/templates/dockview/pinned-tabs/typescript/src/index.ts @@ -10,7 +10,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/pinned-tabs/vue/src/index.ts b/packages/docs/templates/dockview/pinned-tabs/vue/src/index.ts index b3a7598aa..cf3d8d09e 100644 --- a/packages/docs/templates/dockview/pinned-tabs/vue/src/index.ts +++ b/packages/docs/templates/dockview/pinned-tabs/vue/src/index.ts @@ -8,7 +8,7 @@ import { IDockviewPanelProps, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/render-mode/typescript/src/index.ts b/packages/docs/templates/dockview/render-mode/typescript/src/index.ts index 299470ebd..90196a96a 100644 --- a/packages/docs/templates/dockview/render-mode/typescript/src/index.ts +++ b/packages/docs/templates/dockview/render-mode/typescript/src/index.ts @@ -23,7 +23,7 @@ class Panel implements IContentRenderer { } init(parameters: GroupPanelPartInitParameters): void { - // A tall inner element so each panel can be scrolled — this is what + // A tall inner element so each panel can be scrolled, which is what // makes the 'onlyWhenVisible' vs 'always' render modes observable. const inner = document.createElement('div'); inner.style.height = '1000px'; diff --git a/packages/docs/templates/dockview/smart-guides/angular/src/index.ts b/packages/docs/templates/dockview/smart-guides/angular/src/index.ts index 6868d118f..5b92a2fa8 100644 --- a/packages/docs/templates/dockview/smart-guides/angular/src/index.ts +++ b/packages/docs/templates/dockview/smart-guides/angular/src/index.ts @@ -12,7 +12,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/smart-guides/react/src/index.tsx b/packages/docs/templates/dockview/smart-guides/react/src/index.tsx index f0f29362b..3681b0d6c 100644 --- a/packages/docs/templates/dockview/smart-guides/react/src/index.tsx +++ b/packages/docs/templates/dockview/smart-guides/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/smart-guides/typescript/src/index.ts b/packages/docs/templates/dockview/smart-guides/typescript/src/index.ts index 6835947d7..1d4dd7aeb 100644 --- a/packages/docs/templates/dockview/smart-guides/typescript/src/index.ts +++ b/packages/docs/templates/dockview/smart-guides/typescript/src/index.ts @@ -8,7 +8,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/smart-guides/vue/src/index.ts b/packages/docs/templates/dockview/smart-guides/vue/src/index.ts index 00d6a506b..203a37807 100644 --- a/packages/docs/templates/dockview/smart-guides/vue/src/index.ts +++ b/packages/docs/templates/dockview/smart-guides/vue/src/index.ts @@ -8,7 +8,7 @@ import { IDockviewPanelProps, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/tab-groups/angular/src/index.ts b/packages/docs/templates/dockview/tab-groups/angular/src/index.ts index 33dcd3d33..9a585d9f4 100644 --- a/packages/docs/templates/dockview/tab-groups/angular/src/index.ts +++ b/packages/docs/templates/dockview/tab-groups/angular/src/index.ts @@ -25,7 +25,7 @@ interface MenuItem { onClick: () => void; } -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/tab-groups/react/src/index.tsx b/packages/docs/templates/dockview/tab-groups/react/src/index.tsx index 85f2babaf..6f7750c0b 100644 --- a/packages/docs/templates/dockview/tab-groups/react/src/index.tsx +++ b/packages/docs/templates/dockview/tab-groups/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/tab-groups/typescript/src/index.ts b/packages/docs/templates/dockview/tab-groups/typescript/src/index.ts index 8eee04c61..8f905ead5 100644 --- a/packages/docs/templates/dockview/tab-groups/typescript/src/index.ts +++ b/packages/docs/templates/dockview/tab-groups/typescript/src/index.ts @@ -9,7 +9,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/tab-groups/vue/src/index.ts b/packages/docs/templates/dockview/tab-groups/vue/src/index.ts index 4a422c440..e22f7f81b 100644 --- a/packages/docs/templates/dockview/tab-groups/vue/src/index.ts +++ b/packages/docs/templates/dockview/tab-groups/vue/src/index.ts @@ -9,7 +9,7 @@ import { themeLight, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/tab-overflow/angular/src/index.ts b/packages/docs/templates/dockview/tab-overflow/angular/src/index.ts index 9fa431a30..46dc5e817 100644 --- a/packages/docs/templates/dockview/tab-overflow/angular/src/index.ts +++ b/packages/docs/templates/dockview/tab-overflow/angular/src/index.ts @@ -12,7 +12,7 @@ import { } from 'dockview-angular'; import 'dockview-angular/dist/styles/dockview.css'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/tab-overflow/react/src/index.tsx b/packages/docs/templates/dockview/tab-overflow/react/src/index.tsx index f0f29362b..3681b0d6c 100644 --- a/packages/docs/templates/dockview/tab-overflow/react/src/index.tsx +++ b/packages/docs/templates/dockview/tab-overflow/react/src/index.tsx @@ -5,7 +5,7 @@ import 'dockview/dist/styles/dockview.css'; import App from './app.tsx'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/tab-overflow/typescript/src/index.ts b/packages/docs/templates/dockview/tab-overflow/typescript/src/index.ts index 26984bb93..b41dee0b1 100644 --- a/packages/docs/templates/dockview/tab-overflow/typescript/src/index.ts +++ b/packages/docs/templates/dockview/tab-overflow/typescript/src/index.ts @@ -9,7 +9,7 @@ import { themeLight, } from 'dockview'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); diff --git a/packages/docs/templates/dockview/tab-overflow/vue/src/index.ts b/packages/docs/templates/dockview/tab-overflow/vue/src/index.ts index b18bd602d..6eb20c153 100644 --- a/packages/docs/templates/dockview/tab-overflow/vue/src/index.ts +++ b/packages/docs/templates/dockview/tab-overflow/vue/src/index.ts @@ -9,7 +9,7 @@ import { IDockviewPanelProps, } from 'dockview-vue'; -// dockview.dev docs license key — replace with your own key in production. +// dockview.dev docs license key. Replace with your own key in production. LicenseManager.setLicenseKey( '[KeyId:DOCKVIEW-DOCS]_[Company:Dockview]_[Plan:team]_[AppName:Dockview_Docs]_[Email:enterprise@dockview.dev]_[ValidFrom:01_Jan_2025]_[ValidUntil:01_Jan_2099]__aaa294ecec1eed47' ); @@ -46,7 +46,7 @@ const App = defineComponent({ return { api: undefined as DockviewApi | undefined, // Bound to `:overflow` below, so flipping it re-applies the option - // through the Vue wrapper — no manual `updateOptions` call needed. + // through the Vue wrapper without a manual `updateOptions` call. mode: 'wrap' as 'wrap' | 'dropdown', // A vertical header plus wrap mode makes the tabs wrap into columns. vertical: false,