Skip to main content
Version: Next

Primitives

Point

Implementation.

import type { Point } from '@picsart/web-replay-sdk';
PropertyTypeRequiredDescription
xnumberyesThe distance from the coordinate system 0 by x axis.
ynumberyesThe distance from the coordinate system 0 by y axis.

Both values are decimals(see precision for details); Point (x,y) is written in relative form when 0 is equal to 0, 1 is equal to parent width

Rect

Implementation.

import type { Rect } from '@picsart/web-replay-sdk';
PropertyTypeRequiredDescription
xnumberyesThe distance from the coordinate system 0 by x axis.
ynumberyesThe distance from the coordinate system 0 by y axis.
widthnumberyesThe relative width compared to it's parent.
heightnumberyesThe relative height compared to it's parent.

All values are decimals(see precision for details); Rect's (x, y) are written in relative form when 0 is equal to 0, 1 is equal to parent width

SemVer

Implementation.

import type { SemVer } from '@picsart/web-replay-sdk';

SemVer is a string for version identification. Stands for Semantic Versioning. For more details please refer to the semantic versioning

HEXString

Implementation.

import type { HEXString } from '@picsart/web-replay-sdk';

HEXString is a 8 digit hex representation of the color(starting with # sign). Note the color also represents the alpha channel(opacity). For details see css implementation

JsonObject

Implementation.

import type { JsonObject } from '@picsart/web-replay-sdk';

JsonObject is JSON object for web and JSON string for IOS and Android. This value is mostly used in cases when the tool is assigning some values which are not declared in the Replay Format, in a way so the tool can deserialize it to required object

UUIDString

Implementation.

import type { UUIDString } from '@picsart/web-replay-sdk';

UUIDString is a string representing the id of some entity. The format specifies those ids as UUIDs. More info on UUID.

DeepPartial

Implementation.

import type { DeepPartial } from '@picsart/web-replay-sdk';

DeepPartial is and interface allowing any object structure to make it's properties nullable at any level of nesting. E.g. you have an object like const a = { b: { c: 1, d: 2 } }. You want to patch this object, and change only the inner c property. The patch object will look like this const patch = { b: { c: 3 } }. The patch object here is compliant to interface DeepPartial<A> where A is the interface describing the object a.

IReplayLayerProperty

Implementation.

import type { IReplayLayerProperty } from '@picsart/web-replay-sdk';
PropertyTypeRequiredDescription
valueTyesWill represent the value type of the actual property
metaJsonObjectyesThe meta field can be used by tools, to store some property associated information. Defaults to empty object {}
lockedbooleanyesLocked boolean will make the property none editable. To make the property editable again, one needs to turn off the lock(setting to false)