typings.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { CompUI } from "./components/CompUI";
  2. export type ICompKeys = keyof typeof CompUI;
  3. export type EditorMode = "editPage" | "editComp" | "preview";
  4. export type Layout = {
  5. position?: "absolute";
  6. visible?: boolean;
  7. size: number[]; // width height
  8. mask?: string;
  9. alignSelf?: string;
  10. transform?: {
  11. r?: number; // rotate
  12. x?: number; // translateX
  13. y?: number; // marginTop
  14. s?: number; // scale
  15. };
  16. zIndex?: number;
  17. margin?: string;
  18. padding?: string;
  19. transformMatrix?: string;
  20. background?: Background;
  21. };
  22. export type Background = {
  23. color?: string;
  24. image?: string;
  25. imageStyle?: string;
  26. position?:
  27. | "bottom"
  28. | "center"
  29. | "left"
  30. | "left-bottom"
  31. | "left-top"
  32. | "right"
  33. | "right-bottom"
  34. | "right-top"
  35. | "top";
  36. repeat?:
  37. | "repeat"
  38. | "no-repeat"
  39. | "repeat-x"
  40. | "repeat-y"
  41. | "repeat-round"
  42. | "repeat-space";
  43. size?: "auto" | "cover" | "contain";
  44. clipPath?: string;
  45. // origin?: "border" | "padding" | "content";
  46. };