import { EditorProperties, Infer } from "@iplusplus/y-model"; import createjs from "createjs-module"; import { PageDesigner } from "./page-designer/PageDesigner"; import { PageLoader } from "./page-loader/PageLoader"; export type Size = { width: number; height: number; }; export declare const metaPropDefine: readonly [import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["originName", "原始属性名", "string", { defaultValue: string; dataTypeName: "string"; validater?: (v: string) => boolean; validate(value: string): boolean; setValidater: (validater: (v: string) => boolean) => void; getDefaultValue(): string; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["propertyType", "属性类型", "string", { defaultValue: string; dataTypeName: "string"; validater?: (v: string) => boolean; validate(value: string): boolean; setValidater: (validater: (v: string) => boolean) => void; getDefaultValue(): string; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["originTitle", "原始名称", "string", { defaultValue: string; dataTypeName: "string"; validater?: (v: string) => boolean; validate(value: string): boolean; setValidater: (validater: (v: string) => boolean) => void; getDefaultValue(): string; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["customTitle", "自定义名称", "string", { defaultValue: string; dataTypeName: "string"; validater?: (v: string) => boolean; validate(value: string): boolean; setValidater: (validater: (v: string) => boolean) => void; getDefaultValue(): string; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["isExport", "是否导出", "enable", { defaultValue: number; dataTypeName: "number"; validate(value: number): boolean; getDefaultValue(): number; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["customName", "自定义属性名", "string", { defaultValue: string; dataTypeName: "string"; validater?: (v: string) => boolean; validate(value: string): boolean; setValidater: (validater: (v: string) => boolean) => void; getDefaultValue(): string; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["sortIndex", "显示顺序", "number", { defaultValue: number; dataTypeName: "number"; validate(value: number): boolean; getDefaultValue(): number; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>]; export type MetaProperty = Infer; export type ControlMeta = { originTitle: string; controlType: string; properties: MetaProperty[]; }; export declare const positionAndSizePropDefine: readonly [import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["customName", "自定义名称", "string", { defaultValue: string; dataTypeName: "string"; validater?: (v: string) => boolean; validate(value: string): boolean; setValidater: (validater: (v: string) => boolean) => void; getDefaultValue(): string; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["x", "横坐标", "string", { defaultValue: number; dataTypeName: "number"; validate(value: number): boolean; getDefaultValue(): number; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["y", "纵坐标", "string", { defaultValue: number; dataTypeName: "number"; validate(value: number): boolean; getDefaultValue(): number; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["width", "宽度", "string", { defaultValue: number; dataTypeName: "number"; validate(value: number): boolean; getDefaultValue(): number; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["height", "高度", "string", { defaultValue: number; dataTypeName: "number"; validate(value: number): boolean; getDefaultValue(): number; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>]; export type PositionAndSizeProperty = Infer; export declare const anchorPropDefine: readonly [import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["left", "左侧锚定", "enable", { defaultValue: number; dataTypeName: "number"; validate(value: number): boolean; getDefaultValue(): number; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["right", "右侧锚定", "enable", { defaultValue: number; dataTypeName: "number"; validate(value: number): boolean; getDefaultValue(): number; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["top", "上侧锚定", "enable", { defaultValue: number; dataTypeName: "number"; validate(value: number): boolean; getDefaultValue(): number; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>, import("@iplusplus/y-model/dist/BuildType").BuildType string], readonly ["title", () => string], readonly ["editorType", () => string], readonly ["valueType", () => import("@iplusplus/y-model/dist/EditorPropertyValueType").EditorPropertyValueType]], readonly ["bottom", "下侧锚定", "enable", { defaultValue: number; dataTypeName: "number"; validate(value: number): boolean; getDefaultValue(): number; _descr: string | undefined; _attach: Record; description: (d: string | undefined) => /*elided*/ any; getDescription: () => string | undefined; attach: (key: string, payload: any) => /*elided*/ any; getAttach: (key: string) => any; }]>]; export type AnchorProp = Infer; export declare const defaultAnchor: AnchorProp; export type ControlData = { x?: number; y?: number; controlType: string; width: number; height: number; customProperties: Record; metaInfo?: ControlMeta; anchored?: AnchorProp; isLocked?: boolean; customName?: string; }; export interface CommApi { getImg(imageId: string): Promise; createControl(args: string | ControlData): Control; } export interface PageApi extends CommApi { apiName: "PageApi"; getHomeDiv(): HTMLDivElement; getDomDiv(): HTMLDivElement; } export interface DesignerApi extends CommApi { apiName: "DesignerApi"; } export interface Control { size: Size; getControlData(): ControlData; reDraw(): void; controlTypeInfo: ControlTypeInfo; setProperty(newProperties: { [index: string]: unknown; }): void; getProperty(propertyName: string): unknown; initControl(api: DesignerApi | PageApi): void; startRun(): void; getDisplayObject(): createjs.DisplayObject; getProperties(): EditorProperties; destroy(): void; groupControlAttchInfo?: GroupControlAttchInfo; setMeta(metaInfo: ControlMeta): void; getMeta(): ControlMeta; anchored: AnchorProp; isLocked: boolean; customName?: string; } export type ControlFactory = { create(data?: ControlData): Control; typeName: string; title: string; }; export type DesignerContextProps = { getCommApi: () => CommApi; }; export type PageData = { width: number; height: number; backgroundImgId: string | null; controls: ControlData[]; }; export type EventArgs = { source: object; }; export type SelectedChangeEventArgs = EventArgs & { selectedIds: number[]; selectedId?: number; }; export type DesignerEventDefine = { selectedChanged: (args: SelectedChangeEventArgs) => void; }; export type DesignerEventType = keyof DesignerEventDefine; export type DesignerEventHandler = { eventType: E; handler: DesignerEventDefine[E]; }; export type DesignerEventHandlers = DesignerEventHandler[]; export type PageDesignerContainerProps = { designer?: PageDesigner; clear: () => void; createDigner: (div: HTMLDivElement) => void; }; export declare const CreateJsDesignerContext: import("react").Context; export declare const PageDesignerContainerContext: import("react").Context; export type PageLoaderContainerProps = { loader?: PageLoader; clear: () => void; createLoader: (div: HTMLDivElement) => void; }; export type GroupControlAttchInfo = { originX: number; originY: number; originWidth: number; originHeight: number; }; export interface ControlTypeInfo { typeName: string; title: string; } export interface CommApi { getImg(imageId: string): Promise; createControl(data: ControlData): Control; } export interface DesignerApi extends CommApi { apiName: "DesignerApi"; } export interface PageApi extends CommApi { apiName: "PageApi"; getHomeDiv(): HTMLDivElement; } export interface Control { size: Size; getControlData(): ControlData; reDraw(): void; controlTypeInfo: ControlTypeInfo; setProperty(newProperties: { [index: string]: any; }): void; getProperty(propertyName: string): any; initControl(api: DesignerApi | PageApi): void; startRun(): void; getDisplayObject(): createjs.DisplayObject; getProperties(): EditorProperties; destroy(): void; groupControlAttchInfo?: GroupControlAttchInfo; setMeta(metaInfo: ControlMeta): void; getMeta(): ControlMeta; anchored: AnchorProp; } export declare const PageLoaderContainerContext: import("react").Context;