refactor: move the type definitions to the suitable packages

This commit is contained in:
MrWindlike 2022-06-28 10:16:28 +08:00
parent 172474042d
commit cd3f10c35e
11 changed files with 13 additions and 10 deletions

View File

@ -1,5 +1,9 @@
import React from 'react';
import { RuntimeApplication, RuntimeComponentSchema } from '@sunmao-ui/core';
import {
RuntimeApplication,
RuntimeComponentSchema,
PropsBeforeEvaled,
} from '@sunmao-ui/core';
import { Static } from '@sinclair/typebox';
import { ColumnSpec, ColumnsPropertySpec } from './TableTypes';
import { Button, Link, Td, Text } from '@chakra-ui/react';
@ -11,7 +15,6 @@ import {
ExpressionError,
ImplWrapper,
} from '@sunmao-ui/runtime';
import { PropsBeforeEvaled } from '@sunmao-ui/shared';
export const TableTd: React.FC<{
index: number;

View File

@ -35,7 +35,6 @@
"lodash": "^4.17.21"
},
"devDependencies": {
"@sunmao-ui/shared": "^0.2.0",
"@swc/core": "^1.2.121",
"@types/jest": "^26.0.23",
"@types/json-schema": "^7.0.7",

View File

@ -1,6 +1,6 @@
import { Metadata } from './metadata';
import { parseVersion, Version } from './version';
import { type PropsBeforeEvaled } from '@sunmao-ui/shared';
import { type PropsBeforeEvaled } from './schema';
// spec
export type Application = {

View File

@ -7,3 +7,4 @@ export * from './module';
export * from './version';
export * from './slot';
export * from './utilMethod';
export * from './schema';

View File

@ -7,11 +7,12 @@ import {
parseType,
RuntimeApplication,
RuntimeComponentSchema,
PropsAfterEvaled,
} from '@sunmao-ui/core';
import { ImplWrapper } from './ImplWrapper';
import { watch } from '../../utils/watchReactivity';
import { ImplementedRuntimeModule, UIServices } from '../../types';
import { EventHandlerSpec, ModuleRenderSpec, PropsAfterEvaled } from '@sunmao-ui/shared';
import { EventHandlerSpec, ModuleRenderSpec } from '@sunmao-ui/shared';
import { resolveChildrenMap } from '../../utils/resolveChildrenMap';
import { initStateAndMethod } from '../../utils/initStateAndMethod';
import { ExpressionError } from '../../services/StateManager';

View File

@ -13,8 +13,8 @@ import {
consoleError,
ConsoleType,
ExpChunk,
PropsAfterEvaled,
} from '@sunmao-ui/shared';
import { type PropsAfterEvaled } from '@sunmao-ui/core';
dayjs.extend(relativeTime);
dayjs.extend(isLeapYear);

View File

@ -7,8 +7,8 @@ import {
EventCallBackHandlerSpec,
CORE_VERSION,
CoreTraitName,
PropsBeforeEvaled,
} from '@sunmao-ui/shared';
import { type PropsBeforeEvaled } from '@sunmao-ui/core';
const HandlersSpec = Type.Array(EventHandlerSpec);
const CallbackSpec = Type.Array(EventCallBackHandlerSpec);

View File

@ -3,3 +3,4 @@ export * from './component';
export * from './trait';
export * from './module';
export * from './utilMethod';
export * from './spec';

View File

@ -1,4 +1,4 @@
import { Condition } from './condition';
import { Condition } from '@sunmao-ui/shared';
declare module '@sinclair/typebox' {
export interface CustomOptions {

View File

@ -1,3 +1 @@
export * from './spec';
export * from './condition';
export * from './schema';