@brushes/component-core 0.0.31 → 0.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const Inner: ({ children, enabled, root, text }: {
3
+ text?: string;
4
+ root?: boolean;
5
+ enabled: boolean;
6
+ children: ReactNode;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const IsShowContainer: ({ moduleShowValue, rootKey, isRevert, children, routerIsShowValue, routerIsShow, moduleIsShow, padding, storeKey, margin }: {
9
+ isRevert?: boolean;
10
+ routerIsShowValue?: string;
11
+ rootKey?: string;
12
+ moduleShowValue?: string;
13
+ moduleIsShow?: string;
14
+ routerIsShow?: string;
15
+ storeKey: string;
16
+ padding: object;
17
+ margin: object;
18
+ children?: ReactNode;
19
+ }) => import("react/jsx-runtime").JSX.Element | undefined;
20
+ export declare const Container: ({ width, text, children, background, margin, positionValue, padding, backgroundImage, position, $$_actions, $_actions, borderColor, ...props }: any) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const OutContainerComponent: ({ width, api, params, children, background, padding, backgroundImage, ...props }: any) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const OutContainer: (props: any) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const ContainerWrap: ({ width, background, children, backgroundImage, height, $$_style, $_style, ...props }: any) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export declare const DefaultJsx: ({ text, root }: {
2
+ text?: string;
3
+ root?: boolean;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const DefaultEditorBg: ({ content, color }: {
6
+ content?: string;
7
+ color?: string;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const SlotEmpty: React.FC<{
2
+ children?: React.ReactNode;
3
+ borderColor?: string;
4
+ }>;
@@ -0,0 +1,3 @@
1
+ export * from './container';
2
+ export * from './default';
3
+ export * from './empty';
File without changes
@@ -0,0 +1,7 @@
1
+ export declare const isPercentage: (val: string) => boolean;
2
+ export declare const percentToPx: (value: any, comparativeValue: number) => any;
3
+ export declare const pxToPercent: (value: any, comparativeValue: number) => number;
4
+ export declare const getElementDimensions: (element: HTMLElement) => {
5
+ width: number;
6
+ height: number;
7
+ };
@@ -0,0 +1,5 @@
1
+ export declare const CodeComponent: ({ api, codeKey, height }: {
2
+ codeKey?: string;
3
+ api?: string;
4
+ height?: number;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const ImageCodeComponent: ({ api, codeKey, height }: {
2
+ api?: string;
3
+ codeKey?: string;
4
+ height?: number;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './code';
2
+ export * from './image';
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function ApplicationContext({ value, children }: {
3
+ value?: Object;
4
+ children: ReactNode;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export declare function useApplicationContext(): {};
@@ -0,0 +1,7 @@
1
+ export * from './tool';
2
+ export * from './components';
3
+ export * from './basic-component';
4
+ export * from './context';
5
+ export * from './store';
6
+ export * from '@craftjs/core';
7
+ export * from 'antd-style';
@@ -0,0 +1,7 @@
1
+ import type { FieldType } from '@brushes/form';
2
+ export type formConfigType = {
3
+ title?: string;
4
+ formFields: FieldType[];
5
+ };
6
+ export type LayoutType = 'horizontal' | 'vertical' | 'inline';
7
+ export declare const basicSettings: (formFields: formConfigType[], layout?: LayoutType) => () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './basic';
@@ -0,0 +1,4 @@
1
+ declare const Title: ({ title }: {
2
+ title: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default Title;
@@ -0,0 +1,5 @@
1
+ import { ModuleState, moduleStore } from './commonStore';
2
+ type ModuleProviderProps = React.PropsWithChildren<Partial<moduleStore>>;
3
+ export { initialValueOrder } from './commonStore';
4
+ export declare function ModuleProvider({ children, ...props }: ModuleProviderProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function useModuleContext<T>(selector: (state: ModuleState) => T): T;
@@ -0,0 +1,56 @@
1
+ export declare const goodListIntialValue: {
2
+ dataPic: string;
3
+ goodsName: string;
4
+ goodsCamount: number;
5
+ skuName: string;
6
+ pricesetNprice: number;
7
+ };
8
+ export declare const initialValueOrder: {
9
+ contractSettlOpno: number;
10
+ upmMap: {};
11
+ rebMoney: number;
12
+ goodsCamount: number;
13
+ shoppingCountPrice: number;
14
+ totalDiscountPrice: number;
15
+ accountsSumPrice: number;
16
+ discount: number;
17
+ freight: number;
18
+ comDisMoney: number;
19
+ copyComDisMoney: number;
20
+ shoppingType: string;
21
+ promotionCode: string;
22
+ promotionCodes: string;
23
+ };
24
+ export type addressInfo = {
25
+ freight: number;
26
+ goodsReceiptMem: string;
27
+ goodsReceiptPhone: string;
28
+ goodsReceiptArrdess: string;
29
+ areaCode: string;
30
+ };
31
+ export type moduleType = {
32
+ [v: string]: any;
33
+ _ocPoints: Array<any>;
34
+ _ocDiscount: Array<any>;
35
+ _orderAddressInfo: addressInfo;
36
+ _couponList: [];
37
+ _selectCoupon: [];
38
+ _shoppingList: Array<any>;
39
+ _contractGoodsList: Array<typeof goodListIntialValue>;
40
+ _orderDomainStr: Array<typeof initialValueOrder>;
41
+ _ocContractSettlList: Array<any>;
42
+ open?: boolean;
43
+ defaultValue?: object;
44
+ goodNum?: number;
45
+ _skuInfo?: object;
46
+ params?: object;
47
+ breadList?: [];
48
+ };
49
+ export interface moduleStore {
50
+ moduleStore: moduleType;
51
+ }
52
+ export interface ModuleState extends moduleStore {
53
+ setModuleStore: (e: Partial<moduleType>) => void;
54
+ }
55
+ export type ModuleStore = ReturnType<typeof createModuleStore>;
56
+ export declare const createModuleStore: (initProps?: Partial<moduleStore>) => import("zustand").StoreApi<ModuleState>;
@@ -0,0 +1,2 @@
1
+ export * from './commonModule';
2
+ export * from './rootModule';
@@ -0,0 +1,5 @@
1
+ import { ModuleRootState, moduleRootStore } from './rootStore';
2
+ type ModuleProviderProps = React.PropsWithChildren<Partial<moduleRootStore>>;
3
+ export declare function ModuleRootProvider({ children, ...props }: ModuleProviderProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function useModuleRootContext<T>(selector: (state: ModuleRootState) => T): T;
5
+ export {};
@@ -0,0 +1,35 @@
1
+ export type moduleType = {
2
+ [v: string]: any;
3
+ _historyList: Array<any>;
4
+ _themeColor: {
5
+ colorPrimary: string;
6
+ colorBgTextHover: string;
7
+ };
8
+ _orderCount: {
9
+ [v: string]: string | number;
10
+ };
11
+ _userInfo: {
12
+ [v: string]: any;
13
+ };
14
+ _cart: number;
15
+ };
16
+ export interface moduleRootStore {
17
+ rootStore: moduleType;
18
+ }
19
+ export interface ModuleRootState extends moduleRootStore {
20
+ setModuleRootStore: (e: Partial<moduleType>) => void;
21
+ }
22
+ export type ModuleRootStore = ReturnType<typeof createRootModuleStore>;
23
+ export declare const createRootModuleStore: (initProps?: Partial<moduleRootStore>) => Omit<import("zustand").StoreApi<ModuleRootState>, "setState" | "persist"> & {
24
+ setState(partial: ModuleRootState | Partial<ModuleRootState> | ((state: ModuleRootState) => ModuleRootState | Partial<ModuleRootState>), replace?: false | undefined): unknown;
25
+ setState(state: ModuleRootState | ((state: ModuleRootState) => ModuleRootState), replace: true): unknown;
26
+ persist: {
27
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<ModuleRootState, unknown, unknown>>) => void;
28
+ clearStorage: () => void;
29
+ rehydrate: () => Promise<void> | void;
30
+ hasHydrated: () => boolean;
31
+ onHydrate: (fn: (state: ModuleRootState) => void) => () => void;
32
+ onFinishHydration: (fn: (state: ModuleRootState) => void) => () => void;
33
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<ModuleRootState, unknown, unknown>>;
34
+ };
35
+ };
File without changes
@@ -0,0 +1 @@
1
+ export declare function combine(array: Array<any>): void;
@@ -0,0 +1 @@
1
+ export declare const fullpath: (str?: string) => string;
@@ -0,0 +1,2 @@
1
+ export * from './combine';
2
+ export * from './fullpath';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brushes/component-core",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {