typings.ts 952 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. alignSelf?: string;
  9. transform?: {
  10. r?: number; // rotate
  11. x?: number; // translateX
  12. y?: number; // marginTop
  13. s?: number; // scale
  14. };
  15. zIndex?: number;
  16. margin?: string;
  17. padding?: string;
  18. };
  19. export type Background = {
  20. color?: string;
  21. image?: string;
  22. imageStyle?: string;
  23. position?:
  24. | "bottom"
  25. | "center"
  26. | "left"
  27. | "left-bottom"
  28. | "left-top"
  29. | "right"
  30. | "right-bottom"
  31. | "right-top"
  32. | "top";
  33. repeat?:
  34. | "repeat"
  35. | "no-repeat"
  36. | "repeat-x"
  37. | "repeat-y"
  38. | "repeat-round"
  39. | "repeat-space";
  40. size?: "auto" | "cover" | "contain";
  41. clipPath?: string;
  42. // origin?: "border" | "padding" | "content";
  43. };