The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
import { readComputedStyleProperties } from '@/host/geometry/utils/readComputedStyleProperties';
const COMPUTED_LAYOUT_PROPERTIES = [
'display',
'visibility',
'direction',
'position',
'transform',
'translate',
'scale',
'rotate',
'perspective',
'filter',
'backdrop-filter',
'contain',
'container-type',
'will-change',
'content-visibility',
'overflow',
'overflow-x',
'overflow-y',
'width',
'height',
'min-width',
'min-height',
'max-width',
'max-height',
'box-sizing',
'column-gap',
'row-gap',
'writing-mode',
'padding-top',
'padding-right',
'padding-bottom',
'padding-left',
'padding-inline-start',
'padding-inline-end',
'padding-block-start',
'padding-block-end',
'border-top-width',
'border-right-width',
'border-bottom-width',
'border-left-width',
'border-inline-start-width',
'border-inline-end-width',
'border-block-start-width',
'border-block-end-width',
'margin-inline-start',
'margin-inline-end',
'margin-block-start',
'margin-block-end',
'scroll-padding-top',
'scroll-padding-right',
'scroll-padding-bottom',
'scroll-padding-left',
'scroll-margin-top',
'scroll-margin-right',
'scroll-margin-bottom',
'scroll-margin-left',
] as const;
export const measureComputedLayoutStyle = (
node: Element,
): Record<string, string> =>
readComputedStyleProperties({
node,
propertyNames: COMPUTED_LAYOUT_PROPERTIES,
});