Skip to content

Commit

Permalink
refactor: use libro-common instead of mana-react
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinesmilelk committed Feb 7, 2025
1 parent de97b44 commit ce1dce3
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 15 deletions.
4 changes: 4 additions & 0 deletions apps/docs/.dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ export default defineConfig({
getPackagesDir(),
'libro-common/es/mana-common/index.js',
),
'@difizen/libro-common/mana-react': path.resolve(
getPackagesDir(),
'libro-common/es/mana-react/index.js',
),
},
analytics: {
baidu: process.env.BAIDU_ANALYTICS,
Expand Down
11 changes: 10 additions & 1 deletion packages/libro-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,19 @@
"@difizen/mana-app": "latest",
"path-browserify": "^1.0.0",
"sanitize-html": "^2.7.2",
"url-parse": "^1.5.10"
"url-parse": "^1.5.10",
"@ant-design/icons": "^5.1.0",
"classnames": "^2.3.2",
"rc-dropdown": "^3.2.0",
"rc-motion": "^2.9.2",
"rc-notification": "^5.6.0",
"rc-tabs": "^11.10.1",
"rc-util": "^4.21.1"
},
"devDependencies": {
"@types/react": "^18.2.25",
"@types/react-dom": "^18.2.4",
"rimraf": "latest",
"@types/path-browserify": "^1.0.0",
"@types/sanitize-html": "^2.6.2",
"@types/url-parse": "^1.4.8"
Expand Down
1 change: 0 additions & 1 deletion packages/libro-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@difizen/libro-virtualized": "^0.3.4",
"@difizen/mana-app": "latest",
"@difizen/mana-l10n": "latest",
"@difizen/mana-react": "latest",
"classnames": "^2.3.2",
"dayjs": "^1.11.10",
"dnd-core": "^16.0.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Menu, MenuContext } from '@difizen/libro-common/mana-react';
import type { Toolbar } from '@difizen/mana-app';
import {
CommandRegistry,
getOrigin,
ToolbarInstance,
useInject,
} from '@difizen/mana-app';
import { Menu, MenuContext } from '@difizen/mana-react';
import type { ReactNode } from 'react';

import type { LibroToolbarArags } from '../toolbar/index.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SplitPanel } from '@difizen/libro-common/mana-react';
import {
BaseView,
view,
Expand All @@ -11,7 +12,6 @@ import {
URI,
ConfigurationRegistry,
} from '@difizen/mana-app';
import { SplitPanel } from '@difizen/mana-react';
import { useEffect, useState } from 'react';

import { ConfigurationPanelView } from './configuration-panel-view.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Menu, MenuContext } from '@difizen/libro-common/mana-react';
import type { Toolbar } from '@difizen/mana-app';
import { isMacintosh } from '@difizen/mana-app';
import {
Expand All @@ -8,7 +9,6 @@ import {
useObserve,
} from '@difizen/mana-app';
import { l10n } from '@difizen/mana-l10n';
import { Menu, MenuContext } from '@difizen/mana-react';
import { Popover } from 'antd';

import { ExecutableCellModel, ExecutableCellView } from '../cell/index.js';
Expand Down
2 changes: 0 additions & 2 deletions packages/libro-lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
"@difizen/libro-common": "^0.3.4",
"@difizen/mana-app": "latest",
"@difizen/mana-l10n": "latest",
"@difizen/mana-common": "latest",
"@difizen/mana-react": "latest",
"classnames": "^2.3.2",
"uuid": "^9.0.0",
"viewerjs": "^1.11.6"
Expand Down
2 changes: 1 addition & 1 deletion packages/libro-lab/src/layout/container.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BoxPanel } from '@difizen/libro-common/mana-react';
import { singleton, Slot, view } from '@difizen/mana-app';
import { BaseView } from '@difizen/mana-app';
import { BoxPanel } from '@difizen/mana-react';
import { forwardRef } from 'react';

import './index.less';
Expand Down
2 changes: 1 addition & 1 deletion packages/libro-lab/src/layout/footer/footer-view.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BoxPanel } from '@difizen/libro-common/mana-react';
import { DefaultSlotView, singleton, Slot, view } from '@difizen/mana-app';
import { BoxPanel } from '@difizen/mana-react';
import * as React from 'react';
import './index.less';

Expand Down
2 changes: 1 addition & 1 deletion packages/libro-lab/src/layout/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BoxPanel } from '@difizen/libro-common/mana-react';
import { inject, singleton, Slot, useInject, view } from '@difizen/mana-app';
import { BaseView } from '@difizen/mana-app';
import { l10n } from '@difizen/mana-l10n';
import { BoxPanel } from '@difizen/mana-react';
import { Alert } from 'antd';
import { forwardRef } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/libro-lab/src/layout/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SplitPanel } from '@difizen/libro-common/mana-react';
import { singleton, Slot, useInject, view } from '@difizen/mana-app';
import { BaseView } from '@difizen/mana-app';
import { SplitPanel } from '@difizen/mana-react';
import { forwardRef } from 'react';

import './index.less';
Expand Down
2 changes: 1 addition & 1 deletion packages/libro-lab/src/layout/saveable-tab-view.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { CloseOutlined } from '@ant-design/icons';
import { Dropdown } from '@difizen/libro-common/mana-react';
import { JupyterFileService } from '@difizen/libro-jupyter';
import type { CardTabOption, View } from '@difizen/mana-app';
import { ViewManager, ViewOption } from '@difizen/mana-app';
Expand All @@ -12,7 +13,6 @@ import {
ViewContext,
Saveable,
} from '@difizen/mana-app';
import { Dropdown } from '@difizen/mana-react';
import { Badge } from 'antd';
import classnames from 'classnames';

Expand Down
1 change: 0 additions & 1 deletion packages/libro-language-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@difizen/libro-common": "^0.3.4",
"@difizen/libro-lsp": "^0.3.4",
"@difizen/mana-app": "latest",
"@difizen/mana-common": "latest",
"uuid": "^9.0.0",
"@difizen/vscode-languageserver-protocol": "^3.17.6-next.2",
"vscode-ws-jsonrpc": "^3.1.0",
Expand Down
2 changes: 0 additions & 2 deletions packages/libro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@
"@difizen/libro-search-code-cell": "^0.3.4",
"@difizen/mana-app": "latest",
"@difizen/mana-l10n": "latest",
"@difizen/mana-common": "latest",
"@difizen/mana-react": "latest",
"classnames": "^2.3.2",
"uuid": "^9.0.0",
"viewerjs": "^1.11.6"
Expand Down

0 comments on commit ce1dce3

Please sign in to comment.