Merge branch 'master' of https://github.com/mathuo/dockview into 538-interested-in-porting-dockview-to-vuejs

This commit is contained in:
mathuo 2024-03-17 14:25:19 +00:00
commit f79b7296e6
No known key found for this signature in database
GPG Key ID: C6EEDEFD6CA07281
23 changed files with 58 additions and 31 deletions

View File

@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "1.10.2",
"version": "1.11.0",
"npmClient": "yarn",
"command": {
"publish": {

View File

@ -1,6 +1,6 @@
{
"name": "dockview-core",
"version": "1.10.2",
"version": "1.11.0",
"description": "Zero dependency layout manager supporting tabs, grids and splitviews",
"keywords": [
"splitview",

View File

@ -1,6 +1,6 @@
{
"name": "dockview",
"version": "1.10.2",
"version": "1.11.0",
"description": "Zero dependency layout manager supporting tabs, grids and splitviews",
"keywords": [
"splitview",
@ -54,6 +54,6 @@
"test:cov": "cross-env ../../node_modules/.bin/jest --selectProjects dockview --coverage"
},
"dependencies": {
"dockview-core": "^1.10.2"
"dockview-core": "^1.11.0"
}
}
}

View File

@ -1,6 +1,6 @@
import { fireEvent, render, screen } from '@testing-library/react';
import { DockviewDefaultTab } from '../../dockview/defaultTab';
import * as React from 'react';
import React from 'react';
import { fromPartial } from '@total-typescript/shoehorn';
import { DockviewApi, DockviewPanelApi } from 'dockview-core';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { act, render, waitFor } from '@testing-library/react';
import {
DockviewApi,

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { act, render, waitFor } from '@testing-library/react';
import { GridviewApi, IGridviewPanel, Orientation } from 'dockview-core';
import {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { act, render, waitFor } from '@testing-library/react';
import { IPaneviewPanel, PaneviewApi } from 'dockview-core';
import {

View File

@ -1,5 +1,5 @@
import { ReactPart, isReactComponent } from '../react';
import * as React from 'react';
import React from 'react';
import { render, screen, act } from '@testing-library/react';
interface TestInterface {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { act, render, waitFor } from '@testing-library/react';
import { SplitviewApi, Orientation, ISplitviewPanel } from 'dockview-core';
import {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { CloseButton } from '../svg';
import { IDockviewPanelHeaderProps } from 'dockview-core';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import {
DockviewComponent,
DockviewWillDropEvent,

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { ReactPart, ReactPortalStore } from '../react';
import {
DockviewCompositeDisposable,

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { ReactPart, ReactPortalStore } from '../react';
import {
DockviewEmitter,

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { ReactPart, ReactPortalStore } from '../react';
import {
PanelUpdateEvent,

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { ReactPart, ReactPortalStore } from '../react';
import {
PanelUpdateEvent,

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import {
GridviewComponent,
IGridviewComponent,

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import {
PaneviewPanelApi,
PaneviewComponent,

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import {
PanelUpdateEvent,
IPaneBodyPart,

View File

@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { IFrameworkPart, IDockviewDisposable, Parameters } from 'dockview-core';
export interface ReactPortalStore {
@ -192,12 +192,11 @@ export const usePortalsLifecycle: PortalLifecycleHook = () => {
return [portals, addPortal];
};
export function isReactComponent(component: any): boolean {
/**
* Yes, we could use "react-is" but that would introduce an unwanted peer dependency
* so for now we will check in a rather crude fashion...
*/
/**
* Yes, we could use "react-is" but that would introduce an unwanted peer dependency
* so for now we will check in a rather crude fashion...
*/
return (
typeof component === 'function' /** Functional Componnts */ ||
!!(component as React.ExoticComponent)

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import {
SplitviewApi,
SplitviewPanelApi,

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
export const CloseButton = () => (
<svg

View File

@ -0,0 +1,28 @@
---
slug: dockview-1.11.0-release
title: Dockview 1.11.0
tags: [release]
---
# Release Notes
Please reference docs @ [dockview.dev](https://dockview.dev).
## 🛠 Miscs
- Adjust `React` imports [#556](https://github.com/mathuo/dockview/pull/556)
- Rename `import * as React from 'react'` to `import React from 'react'`
- Rename `import * as ReactDOM from 'react-dom'` to `import ReactDOM from 'react-dom'`
- This is preperation work for supporting multiple framworks (Vue, Angular etc...)
- Only export CSS from `dockview-core` [#553](https://github.com/mathuo/dockview/pull/553)
- All required CSS is now found in `dockview-core` only. `dockview` (React) specific CSS has been removed and made compatible with CSS in `dockview-core`. This is preperation work for supporting multiple framworks (Vue, Angular etc...)
- For compatibility reasons `dockview-core` CSS continues to be re-exported through `dockview`.
- Class name changes as follows:
- `tab-action` to `dv-default-tab-action`
- `default-tab` to `dv-default-tab`
- `tab-content` to `dv-default-tab-content`
- `dockview-react-tab` to `dv-default-tab`
- `dockview-react-tab-title` to `dv-default-tab-content`
- `dv-react-tab-close-btn` to `dv-default-tab-action`

View File

@ -1,6 +1,6 @@
{
"name": "dockview-docs",
"version": "1.10.2",
"version": "1.11.0",
"private": true,
"scripts": {
"build": "docusaurus build",
@ -34,7 +34,7 @@
"ag-grid-react": "^31.0.2",
"axios": "^1.6.3",
"clsx": "^2.1.0",
"dockview": "^1.10.2",
"dockview": "^1.11.0",
"prism-react-renderer": "^2.3.1",
"react-dnd": "^16.0.1",
"react-laag": "^2.0.5",