diff --git a/src/ui/lib/types/bool/boolAttributes.d.ts b/src/ui/lib/types/bool/boolAttributes.d.ts new file mode 100644 index 0000000..99a8cd1 --- /dev/null +++ b/src/ui/lib/types/bool/boolAttributes.d.ts @@ -0,0 +1,10 @@ +import { Uuid } from '../utils/uuid'; +import { BoolContent } from './boolContent'; + +export type BoolAttributes = { + id?: Uuid; + type: symbol; // bool + shapes?: Uuid[]; + boolType: string; // @TODO: in Penpot this is of type :keyword. check if it makes sense + boolContent: BoolContent[]; +}; diff --git a/src/ui/lib/types/bool/boolContent.d.ts b/src/ui/lib/types/bool/boolContent.d.ts new file mode 100644 index 0000000..c30e180 --- /dev/null +++ b/src/ui/lib/types/bool/boolContent.d.ts @@ -0,0 +1,8 @@ +import { Point } from '../utils/point'; + +export type BoolContent = { + command: string; // @TODO: in Penpot this is of type :keyword. check if it makes sense + relative?: boolean; + prevPos?: Point; + params?: { [keyword: string]: number }; // @TODO: in Penpot this is of type :keyword. check if it makes sense +}; diff --git a/src/ui/lib/types/bool/boolShape.d.ts b/src/ui/lib/types/bool/boolShape.d.ts new file mode 100644 index 0000000..cad53b7 --- /dev/null +++ b/src/ui/lib/types/bool/boolShape.d.ts @@ -0,0 +1,4 @@ +import { Shape } from '../shape'; +import { BoolAttributes } from './boolAttributes'; + +export type BoolShape = Shape & BoolAttributes;