diff --git a/examples/components/App.tsx b/examples/components/App.tsx index 263d94252..718cd767d 100644 --- a/examples/components/App.tsx +++ b/examples/components/App.tsx @@ -11,8 +11,8 @@ import { Select, InputBox } from 'amis'; -import {eachTree, mapTree} from 'amis/lib/utils/helper'; -import 'amis/lib/locale/en-US'; +import {eachTree, mapTree} from 'amis-core'; +import 'amis-ui/lib/locale/en-US'; import {withRouter} from 'react-router'; import DocSearch from './DocSearch'; import Doc from './Doc'; diff --git a/examples/components/Doc.tsx b/examples/components/Doc.tsx index 102d9ac69..53fd66a10 100644 --- a/examples/components/Doc.tsx +++ b/examples/components/Doc.tsx @@ -1,7 +1,7 @@ import React from 'react'; import {Switch} from 'react-router-dom'; -import {flattenTree, filterTree, mapTree} from 'amis/lib/utils/helper'; +import {flattenTree, filterTree, mapTree} from 'amis-core'; import {navigations2route} from './App'; import DocNavCN from './DocNavCN'; diff --git a/examples/components/ECharts.tsx b/examples/components/ECharts.tsx index 22ddd1db1..7b2a51c40 100644 --- a/examples/components/ECharts.tsx +++ b/examples/components/ECharts.tsx @@ -7,7 +7,7 @@ import example from './EChartsEditor/Example'; import {lazyData} from './LazyData'; import React from 'react'; -import Spinner from 'amis/lib/components/Spinner'; +import {Spinner} from 'amis-ui'; const LazyComponent = lazyData( async () => diff --git a/examples/components/Editor.jsx b/examples/components/Editor.jsx index 820c1c472..24c4de86d 100644 --- a/examples/components/Editor.jsx +++ b/examples/components/Editor.jsx @@ -1,7 +1,7 @@ import React from 'react'; -import Editor from 'amis/editor/Editor'; -import Switch from 'amis/components/Switch'; -import Button from 'amis/components/Button'; +import {Editor} from 'amis-ui'; +import {Switch} from 'amis-ui'; +import {Button} from 'amis-ui'; import schema from './Form/Test'; import Portal from 'react-overlays/Portal'; diff --git a/examples/components/Example.jsx b/examples/components/Example.jsx index e3f8c699d..44f03389c 100644 --- a/examples/components/Example.jsx +++ b/examples/components/Example.jsx @@ -117,9 +117,6 @@ import Tab1Schema from './Tabs/Tab1'; import Tab2Schema from './Tabs/Tab2'; import Tab3Schema from './Tabs/Tab3'; -import TestComponent from './Test'; - -import {normalizeLink} from 'amis/utils/normalizeLink'; import {Switch} from 'react-router-dom'; import {navigations2route} from './App'; diff --git a/examples/components/Form/Custom.jsx b/examples/components/Form/Custom.jsx index e7f540ca7..9b0be6cf0 100644 --- a/examples/components/Form/Custom.jsx +++ b/examples/components/Form/Custom.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import {FormItem, Renderer} from 'amis'; +import {FormItem, Renderer} from 'amis-core'; @FormItem({ type: 'my-custom' diff --git a/examples/components/Form/Schem.jsx b/examples/components/Form/Schem.jsx index 498442ef9..0e5a4235e 100644 --- a/examples/components/Form/Schem.jsx +++ b/examples/components/Form/Schem.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import TitleBar from 'amis/components/TitleBar'; +import {TitleBar} from 'amis-ui'; import {render} from 'amis'; const Schema = { diff --git a/examples/components/MdRenderer.jsx b/examples/components/MdRenderer.jsx index 7cf4837cf..76f71dee2 100644 --- a/examples/components/MdRenderer.jsx +++ b/examples/components/MdRenderer.jsx @@ -3,12 +3,9 @@ import React from 'react'; import {findDOMNode} from 'react-dom'; import {createRoot} from 'react-dom/client'; import {getTheme, render} from 'amis'; -import axios from 'axios'; -import TitleBar from 'amis/lib/components/TitleBar'; -import LazyComponent from 'amis/lib/components/LazyComponent'; -import Overlay from 'amis/lib/components/Overlay'; -import PopOver from 'amis/lib/components/PopOver'; -import NestedLinks from 'amis/lib/components/AsideNav'; +import {LazyComponent} from 'amis-core'; +import {Overlay} from 'amis-ui'; +import {PopOver} from 'amis-ui'; import classnames from 'classnames'; import {Link} from 'react-router-dom'; import Play from './Play'; diff --git a/examples/components/Play.jsx b/examples/components/Play.jsx index be344ee75..a58584e29 100644 --- a/examples/components/Play.jsx +++ b/examples/components/Play.jsx @@ -1,15 +1,15 @@ import React from 'react'; import {toast, render, makeTranslator} from 'amis'; -import {normalizeLink} from 'amis/lib/utils/normalizeLink'; -import {isMobile} from 'amis/lib/utils/helper'; -import attachmentAdpator from 'amis/lib/utils/attachmentAdpator'; -import {alert, confirm} from 'amis/lib/components/Alert'; +import {normalizeLink} from 'amis-core'; +import {isMobile} from 'amis-core'; +import {attachmentAdpator} from 'amis-core'; +import {alert, confirm} from 'amis-ui'; import axios from 'axios'; import JSON5 from 'json5'; -import CodeEditor from 'amis/lib/components/Editor'; +import {Editor as CodeEditor} from 'amis-ui'; import copy from 'copy-to-clipboard'; import {matchPath} from 'react-router-dom'; -import Drawer from 'amis/lib/components/Drawer'; +import {Drawer} from 'amis-ui'; const DEFAULT_CONTENT = `{ "$schema": "/schemas/page.json#", diff --git a/examples/components/SchemaRender.jsx b/examples/components/SchemaRender.jsx index a649b0562..65f58fe13 100644 --- a/examples/components/SchemaRender.jsx +++ b/examples/components/SchemaRender.jsx @@ -3,16 +3,14 @@ import {render, toast, Button, LazyComponent, Drawer} from 'amis'; import axios from 'axios'; import Portal from 'react-overlays/Portal'; import {toast} from 'amis'; -import {normalizeLink} from 'amis/lib/utils/normalizeLink'; +import {normalizeLink} from 'amis-core'; import {withRouter} from 'react-router'; -import {matchPath} from 'react-router-dom'; import copy from 'copy-to-clipboard'; -import {qsparse} from 'amis/lib/utils/helper'; +import {qsparse} from 'amis-core'; function loadEditor() { return new Promise(resolve => - require(['amis/lib/components/Editor'], component => - resolve(component.default)) + require(['amis-ui'], component => resolve(component.Editor)) ); } diff --git a/examples/embed.tsx b/examples/embed.tsx index 433419144..6b3607fc5 100644 --- a/examples/embed.tsx +++ b/examples/embed.tsx @@ -4,7 +4,7 @@ import {createRoot} from 'react-dom/client'; import axios from 'axios'; import {match} from 'path-to-regexp'; import copy from 'copy-to-clipboard'; -import {normalizeLink} from 'amis/lib/utils/normalizeLink'; +import {normalizeLink} from 'amis-core'; import qs from 'qs'; import { @@ -17,11 +17,11 @@ import { makeTranslator } from 'amis'; -import 'amis/lib/locale/en-US'; +import 'amis-ui/lib/locale/en-US'; import 'history'; -import attachmentAdpator from 'amis/lib/utils/attachmentAdpator'; +import {attachmentAdpator} from 'amis-core'; -import type {ToastLevel, ToastConf} from 'amis/lib/components/Toast'; +import type {ToastLevel, ToastConf} from 'amis-ui/lib/components/Toast'; export function embed( container: string | HTMLElement, diff --git a/examples/index.html b/examples/index.html index 77123d0f9..491551bf6 100644 --- a/examples/index.html +++ b/examples/index.html @@ -1,36 +1,31 @@ -
- -