diff --git a/dist/layouter.es.js b/dist/layouter.es.js index 114636b..c14b3df 100644 --- a/dist/layouter.es.js +++ b/dist/layouter.es.js @@ -85,7 +85,7 @@ const breakpointsOrdered = (bps, sizes) => { Object.keys(sizes).forEach((bpName) => bpsOrdered[bpName] = bps[bpName]); return bpsOrdered; }; -const version = "1.9.0"; +const version = "1.9.1"; const breakpointsInit = { xs: { width: 360, @@ -1377,7 +1377,7 @@ const setPadY = (Node, vals) => { const setMarX = (Node, vals) => { return setterXY({ Node, - directives: ["marx", "px", "margin-x"], + directives: ["marx", "mx", "margin-x"], builder: buildMarX, vals }); @@ -1385,7 +1385,7 @@ const setMarX = (Node, vals) => { const setMarY = (Node, vals) => { return setterXY({ Node, - directives: ["mary", "py", "margin-y"], + directives: ["mary", "my", "margin-y"], builder: buildMarY, vals }); diff --git a/dist/layouter.es.js.map b/dist/layouter.es.js.map index 19265ac..35f54b8 100644 --- a/dist/layouter.es.js.map +++ b/dist/layouter.es.js.map @@ -1 +1 @@ -{"version":3,"file":"layouter.es.js","sources":["../src/helpers/breakpointsNums.ts","../src/helpers/createScopeStyles.ts","../src/helpers/scopesStylesBuilder.ts","../src/helpers/breakpointsOrdered.ts","../src/config/main.ts","../src/helpers/prepareParam.ts","../src/helpers/regError.ts","../src/helpers/calPercentage.ts","../src/helpers/getScopeByclassName.ts","../src/methods/insertRules.ts","../src/config/flex.ts","../src/helpers/percentageConverter.ts","../src/helpers/createStyles.ts","../src/helpers/nameCleaner.ts","../src/helpers/buildCss.ts","../src/methods/buildCols.ts","../src/methods/buildFlex.ts","../src/helpers/processedNumber.ts","../src/helpers/buildAttr.ts","../src/methods/buildPad.ts","../src/methods/buildPadTop.ts","../src/methods/buildPadRight.ts","../src/methods/buildPadBottom.ts","../src/methods/buildPadLeft.ts","../src/methods/buildMar.ts","../src/methods/buildMarTop.ts","../src/methods/buildMarRight.ts","../src/methods/buildMarBottom.ts","../src/methods/buildMarLeft.ts","../src/methods/buildMaxWidth.ts","../src/methods/buildMaxHeight.ts","../src/methods/buildMinWidth.ts","../src/methods/buildMinHeight.ts","../src/methods/buildHeight.ts","../src/methods/buildWidth.ts","../src/config/position.ts","../src/methods/buildPosition.ts","../src/methods/buildTop.ts","../src/methods/buildRight.ts","../src/methods/buildBottom.ts","../src/methods/buildLeft.ts","../src/config/display.ts","../src/methods/buildDisplay.ts","../src/helpers/buildXY.ts","../src/methods/buildPadX.ts","../src/methods/buildPadY.ts","../src/methods/buildMarX.ts","../src/methods/buildMarY.ts","../src/config/processors.ts","../src/methods/getParameters.ts","../src/methods/build.ts","../src/utils/addClasses.ts","../src/utils/removeAttr.ts","../src/helpers/eventReady.ts","../src/methods/set.ts","../src/helpers/directiveValues.ts","../src/methods/setFlex.ts","../src/methods/SetCols.ts","../src/helpers/setAttr.ts","../src/methods/setHeight.ts","../src/methods/setMarBottom.ts","../src/methods/setMarLeft.ts","../src/methods/setMarRight.ts","../src/methods/setMar.ts","../src/methods/setMarTop.ts","../src/methods/setMaxWidth.ts","../src/methods/setMinHeight.ts","../src/methods/setMinWidth.ts","../src/methods/setPadBottom.ts","../src/methods/setPadLeft.ts","../src/methods/setPadRight.ts","../src/methods/setPad.ts","../src/methods/setPadTop.ts","../src/methods/setWidth.ts","../src/methods/setMaxHeight.ts","../src/methods/setPosition.ts","../src/methods/setTop.ts","../src/methods/setRight.ts","../src/methods/setBottom.ts","../src/methods/setLeft.ts","../src/helpers/setterXY.ts","../src/methods/setPadX.ts","../src/methods/setPadY.ts","../src/methods/setMarX.ts","../src/methods/setMarY.ts","../src/methods/reset.ts","../src/helpers/searchAndProcess.ts","../src/helpers/mainObserver.ts","../src/layouter.ts"],"sourcesContent":["export type TNumProp = 'width' | 'cols';\r\n\r\nexport interface IBreakpoint {\r\n alias: string;\r\n width: number;\r\n}\r\n\r\nexport interface IBreakpoints {\r\n [alias: string]: {\r\n width: number;\r\n cols: number;\r\n };\r\n}\r\n\r\nexport interface IBreakpointObj {\r\n [alias: string]: number;\r\n}\r\n\r\nconst breakpointsNums = (\r\n objBps: IBreakpoints,\r\n propName: TNumProp\r\n): IBreakpointObj => {\r\n const sizes: IBreakpointObj = {};\r\n\r\n if (propName === 'width') {\r\n Object.keys(objBps)\r\n .map((bp: string) => {\r\n return {\r\n alias: bp,\r\n width: objBps[bp].width,\r\n };\r\n })\r\n .sort((a: IBreakpoint, b: IBreakpoint) =>\r\n a.width > b.width ? 1 : b.width > a.width ? -1 : 0\r\n )\r\n .forEach((bp: IBreakpoint, index: number) => {\r\n sizes[bp.alias] = !index ? 0 : objBps[bp.alias][propName];\r\n });\r\n } else {\r\n Object.keys(objBps).forEach((bp) => {\r\n sizes[bp] = objBps[bp][propName];\r\n });\r\n }\r\n\r\n return sizes;\r\n};\r\n\r\nexport default breakpointsNums;\r\n","export type TInsertion = 'before' | 'after' | 'append';\n\nexport interface ICreateScopeStyles {\n bridge?: boolean;\n bp: string;\n insertionType: TInsertion;\n node: HTMLElement;\n context: Window & typeof globalThis;\n}\n\nexport interface IRCreateScopeStyles {\n method:\n | CSSStyleSheet\n | {\n insertRule: (ruleCss: string) => void;\n rules: string[];\n };\n node: HTMLElement;\n}\n\nconst createScopeStyles = ({\n bridge: withBridge,\n bp,\n insertionType,\n node,\n context,\n}: ICreateScopeStyles): IRCreateScopeStyles => {\n let stylesScope = context.document.getElementById('layouter-' + bp);\n if (!stylesScope) {\n stylesScope = context.document.createElement('style');\n stylesScope.appendChild(context.document.createTextNode('')); // WebKit hack :(\n const nodeParent = node.parentNode as HTMLDivElement;\n switch (insertionType) {\n case 'before':\n nodeParent.insertBefore(stylesScope, node);\n break;\n case 'after':\n node.nextSibling\n ? nodeParent.insertBefore(stylesScope, node.nextSibling)\n : nodeParent.appendChild(stylesScope);\n break;\n case 'append':\n node.appendChild(stylesScope);\n break;\n }\n stylesScope.id = 'layouter-' + bp;\n }\n\n let bridge: IRCreateScopeStyles;\n if (withBridge) {\n bridge = {\n method: (stylesScope as HTMLStyleElement).sheet as CSSStyleSheet,\n node: stylesScope,\n };\n } else {\n bridge = {\n method: {\n insertRule: (ruleCss: string) => {\n (stylesScope as HTMLDivElement).appendChild(\n context.document.createTextNode(ruleCss)\n );\n },\n rules: [],\n },\n node: stylesScope,\n };\n }\n return bridge;\n};\n\nexport default createScopeStyles;\n","import { IBreakpoints } from './breakpointsNums';\nimport createScopeStyles, { IRCreateScopeStyles } from './createScopeStyles';\n\nexport interface IScopes {\n [name: string]: IRCreateScopeStyles;\n}\n\nexport interface IScopesStylesBuilder {\n breakpoints: IBreakpoints;\n bridge: boolean;\n scope?: IScopes;\n context: Window & typeof globalThis;\n}\n\nexport const scopesStylesBuilder = ({\n breakpoints,\n bridge,\n scope,\n context,\n}: IScopesStylesBuilder): IScopes => {\n const scopes: IScopes = scope || {};\n Object.keys(breakpoints).forEach((bp: string) => {\n if (!scopes[bp]) {\n scopes[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'append',\n node: context.document.body,\n context,\n });\n }\n });\n return scopes;\n};\n","import { ICols } from '../config/main';\r\nimport { IBreakpoints } from './breakpointsNums';\r\n\r\nconst breakpointsOrdered = (bps: IBreakpoints, sizes: ICols) => {\r\n const bpsOrdered: IBreakpoints = {};\r\n Object.keys(sizes).forEach((bpName) => (bpsOrdered[bpName] = bps[bpName]));\r\n return bpsOrdered;\r\n};\r\n\r\nexport default breakpointsOrdered;\r\n","import { ILayouter } from './../layouter';\nimport breakpointsNums, { IBreakpoints } from '../helpers/breakpointsNums';\nimport { IScopes, scopesStylesBuilder } from '../helpers/scopesStylesBuilder';\nimport breakpointsOrdered from '../helpers/breakpointsOrdered';\nimport { version } from '../../package.json';\n\nexport interface ICols {\n [colAlias: string]: number;\n}\n\nexport interface IConfigUser {\n prefix: string;\n breakpoints: IBreakpoints;\n bridge: boolean;\n debug?: boolean;\n ready?: (instance: ILayouter) => void;\n searchOnInit: boolean;\n observer: boolean;\n}\n\ninterface IConfigNumsIn {\n bps: IBreakpoints;\n bridge: boolean;\n scope?: IScopes;\n context: Window & typeof globalThis;\n}\n\ninterface IConfigNumsOut {\n scope: IScopes;\n cols: ICols;\n sizes: ICols;\n breakpoints: IBreakpoints;\n}\n\nexport interface IConfig\n extends Omit,\n IConfigNumsOut {\n context: Window & typeof globalThis;\n styles: {\n [className: string]: string;\n };\n version: string;\n}\n\ndeclare global {\n interface Window {\n layouterConfig: Partial;\n }\n}\n\nconst breakpointsInit: IBreakpoints = {\n xs: {\n width: 360,\n cols: 15,\n },\n sm: {\n width: 600,\n cols: 25,\n },\n md: {\n width: 900,\n cols: 31,\n },\n lg: {\n width: 1200,\n cols: 41,\n },\n xlg: {\n width: 1536,\n cols: 51,\n },\n};\n\nexport let baseConfig: IConfigUser = {\n prefix: '',\n breakpoints: breakpointsInit,\n bridge: true,\n debug: true,\n searchOnInit: true,\n observer: true,\n};\n\nlet config: IConfig;\n\nconst configNums = ({\n bps,\n bridge,\n scope,\n context,\n}: IConfigNumsIn): IConfigNumsOut => {\n const sizes = breakpointsNums(bps, 'width');\n const finalBps = breakpointsOrdered(bps, sizes);\n return {\n sizes,\n cols: breakpointsNums(bps, 'cols'),\n scope: scopesStylesBuilder({\n breakpoints: finalBps,\n bridge,\n scope: scope,\n context,\n }),\n breakpoints: finalBps,\n };\n};\n\nexport const setConfig = (\n context: Window & typeof globalThis,\n customCfg: Partial = {}\n): IConfig => {\n const contextConfig = context.layouterConfig || {};\n\n baseConfig = {\n ...baseConfig,\n ...customCfg,\n ...contextConfig,\n };\n\n config = {\n context,\n ...baseConfig,\n ...configNums({\n bps: baseConfig.breakpoints,\n bridge: baseConfig.bridge,\n context,\n }),\n styles: {},\n version,\n };\n\n return config;\n};\n\nconst getConfig = (): IConfig => {\n return config;\n};\n\nexport const setStyles = (className: string, value: string) => {\n config.styles[className] = value;\n};\n\nexport const updateConfig = (userConfig: Partial): IConfig => {\n config = {\n ...config,\n ...userConfig,\n };\n\n if (userConfig.breakpoints) {\n config = {\n ...config,\n ...configNums({\n bps: config.breakpoints,\n bridge: config.bridge,\n scope: config.scope,\n context: config.context,\n }),\n };\n }\n\n return config;\n};\n\nexport default getConfig;\n","import getConfig from '../config/main';\n\nexport interface IPrepareParamObj {\n widthBp: boolean;\n numbers: string;\n breakPoints: string;\n important: boolean;\n}\n\nconst prepareParam = (param: string): IPrepareParamObj => {\n let bp: string;\n let argParam = param;\n let important = false;\n const haveBp = argParam.includes('@');\n if (haveBp) {\n const bpSplited = argParam.split('@');\n argParam = bpSplited[0];\n bp = bpSplited[1];\n } else {\n const config = getConfig();\n bp = Object.keys(config.breakpoints)[0];\n }\n\n if (param.includes('!')) {\n important = true;\n bp = bp.replace(/!/g, '');\n argParam = argParam.replace(/!/g, '');\n }\n\n return {\n widthBp: haveBp,\n numbers: argParam,\n breakPoints: bp,\n important,\n };\n};\n\nexport default prepareParam;\n","import config from '../config/main';\r\n\r\nconst regError = (\r\n name: string,\r\n message: string,\r\n Node?: Element | HTMLElement\r\n): Error => {\r\n const err = new Error();\r\n err.name = name;\r\n err.message = message;\r\n const intConfig = config();\r\n if (intConfig.debug) {\r\n console.error(err);\r\n if (Node) console.log(Node);\r\n }\r\n return err;\r\n};\r\n\r\nexport default regError;\r\n","const calPercentage = (n1: number, n2: number): string => {\r\n const cal = (n1 * 100) / n2;\r\n const haveDecimal = cal - Math.floor(cal) !== 0;\r\n const result = haveDecimal ? cal.toFixed(3) : cal;\r\n return result + '%';\r\n};\r\n\r\nexport default calPercentage;\r\n","import config from '../config/main';\nimport createScopeStyles, { IRCreateScopeStyles } from './createScopeStyles';\n\nconst getScopeByclassName = (className: string): IRCreateScopeStyles => {\n const nameClass = className.replace(/!/g, '');\n const atIndex = nameClass.indexOf('@');\n const intConfig = config();\n const scope = intConfig.scope;\n const bridge = intConfig.bridge;\n const context = intConfig.context;\n\n // Haven´t a BP designed\n if (atIndex === -1) {\n const firstBp = Object.keys(intConfig.breakpoints)[0];\n return scope[firstBp as string];\n }\n\n // Have a BP designed, a normal BP.\n const bp = nameClass.substring(atIndex + 1);\n if (!bp.includes('-')) return scope[bp]; // A simple BP (13/15@lg), not compound (like this: 13/15@sm-md).\n\n // A BP until. Example 13/15@-md\n if (bp.substring(0, 1) === '-') {\n if (scope[bp]) return scope[bp]; // exists the Scope.\n const bpUntil = bp.substring(1);\n scope[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'before',\n node: scope[bpUntil].node,\n context,\n });\n return scope[bp]; // returning a new scope created\n }\n\n // A BP from and until (a BP compound). Example: Example 13/15@sm-md\n if (scope[bp]) {\n return scope[bp]; // exists the Scope.\n }\n\n const fromBp = bp.split('-')[0];\n scope[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'after',\n node: scope[fromBp].node,\n context,\n });\n\n return scope[bp]; // returning a new scope compounded created\n};\n\nexport default getScopeByclassName;\n","import config, { setStyles } from '../config/main';\nimport { IStyles } from '../helpers/createStyles';\nimport getScopeByclassName from '../helpers/getScopeByclassName';\n\nconst insertRules = (objStyles: IStyles) => {\n const intConfig = config();\n\n for (const className in objStyles) {\n if (!intConfig.styles[className]) {\n const nodeScope = getScopeByclassName(className);\n const valClass = objStyles[className];\n const rules = nodeScope.method.rules;\n nodeScope.method.insertRule(valClass, rules ? rules.length : 0);\n setStyles(className, valClass); // saving in styles vault\n }\n }\n};\n\nexport default insertRules;\n","const flexProsAndValsBase = {\r\n jc: {\r\n ruleCss: 'justify-content',\r\n classPrefix: 'jc',\r\n },\r\n ai: {\r\n ruleCss: 'align-items',\r\n classPrefix: 'ai',\r\n },\r\n ce: {\r\n ruleCss: 'center',\r\n classPrefix: 'ce',\r\n },\r\n fs: {\r\n ruleCss: 'flex-start',\r\n classPrefix: 'fs',\r\n },\r\n fe: {\r\n ruleCss: 'flex-end',\r\n classPrefix: 'fe',\r\n },\r\n sb: {\r\n ruleCss: 'space-between',\r\n classPrefix: 'sb',\r\n },\r\n sa: {\r\n ruleCss: 'space-around',\r\n classPrefix: 'sa',\r\n },\r\n fw: {\r\n ruleCss: 'flex-wrap',\r\n classPrefix: 'fw',\r\n },\r\n nw: {\r\n ruleCss: 'nowrap',\r\n classPrefix: 'nw',\r\n },\r\n w: {\r\n ruleCss: 'wrap',\r\n classPrefix: 'w',\r\n },\r\n wr: {\r\n ruleCss: 'wrap-reverse',\r\n classPrefix: 'wr',\r\n },\r\n fd: {\r\n ruleCss: 'flex-direction',\r\n classPrefix: 'fd',\r\n },\r\n r: {\r\n ruleCss: 'row',\r\n classPrefix: 'r',\r\n },\r\n rr: {\r\n ruleCss: 'row-reverse',\r\n classPrefix: 'rr',\r\n },\r\n co: {\r\n ruleCss: 'column',\r\n classPrefix: 'co',\r\n },\r\n cor: {\r\n ruleCss: 'column-reverse',\r\n classPrefix: 'co',\r\n },\r\n au: {\r\n ruleCss: 'auto',\r\n classPrefix: 'au',\r\n },\r\n st: {\r\n ruleCss: 'stretch',\r\n classPrefix: 'st',\r\n },\r\n bl: {\r\n ruleCss: 'baseline',\r\n classPrefix: 'bl',\r\n },\r\n in: {\r\n ruleCss: 'initial',\r\n classPrefix: 'in',\r\n },\r\n ih: {\r\n ruleCss: 'inherit',\r\n classPrefix: 'ih',\r\n },\r\n};\r\n\r\nconst flexPropsAndValsSelfBase = {\r\n fg: {\r\n ruleCss: 'flex-grow',\r\n classPrefix: 'fg',\r\n },\r\n fh: {\r\n ruleCss: 'flex-shrink',\r\n classPrefix: 'fh',\r\n },\r\n as: {\r\n ruleCss: 'align-self',\r\n classPrefix: 'as',\r\n },\r\n or: {\r\n ruleCss: 'order',\r\n classPrefix: 'or',\r\n },\r\n};\r\n\r\nconst flexPropsAndValsSelf = {\r\n ...flexPropsAndValsSelfBase,\r\n 'flex-grow': flexPropsAndValsSelfBase.fg,\r\n 'flex-shrink': flexPropsAndValsSelfBase.fh,\r\n 'align-self': flexPropsAndValsSelfBase.as,\r\n order: flexPropsAndValsSelfBase.or,\r\n};\r\n\r\nexport const flexProsAndVals = {\r\n ...flexProsAndValsBase,\r\n ...flexPropsAndValsSelf,\r\n 'justify-content': flexProsAndValsBase.jc,\r\n 'align-items': flexProsAndValsBase.ai,\r\n center: flexProsAndValsBase.ce,\r\n 'flex-start': flexProsAndValsBase.fs,\r\n 'flex-end': flexProsAndValsBase.fe,\r\n 'space-between': flexProsAndValsBase.sb,\r\n 'space-around': flexProsAndValsBase.fs,\r\n 'flex-wrap': flexProsAndValsBase.fw,\r\n nowrap: flexProsAndValsBase.nw,\r\n w: flexProsAndValsBase.w,\r\n 'wrap-reverse': flexProsAndValsBase.wr,\r\n 'flex-direction': flexProsAndValsBase.fd,\r\n row: flexProsAndValsBase.r,\r\n 'row-reverse': flexProsAndValsBase.rr,\r\n column: flexProsAndValsBase.co,\r\n 'column-reverse': flexProsAndValsBase.cor,\r\n auto: flexProsAndValsBase.au,\r\n stretch: flexProsAndValsBase.st,\r\n baseline: flexProsAndValsBase.bl,\r\n initial: flexProsAndValsBase.in,\r\n inherit: flexProsAndValsBase.ih,\r\n};\r\n\r\nexport const flexAttrsSelf = Object.keys(flexPropsAndValsSelf);\r\n","const percentageConverter = (percentage: string) => {\r\n return '0¯' + percentage.replace('%', '');\r\n};\r\n\r\nexport default percentageConverter;\r\n","import { flexAttrsSelf } from '../config/flex';\r\nimport config from '../config/main';\r\nimport { processors, TDirectiveName } from '../config/processors';\r\nimport { IBpCals } from './buildCss';\r\nimport percentageConverter from './percentageConverter';\r\n\r\nexport interface IStyles {\r\n [name: string]: string;\r\n}\r\n\r\nconst createStyles = (directive: TDirectiveName, bps: IBpCals): IStyles => {\r\n const intConfig = config();\r\n const sizes = intConfig.sizes;\r\n const prefix = intConfig.prefix;\r\n const prop = processors[directive].ruleCss;\r\n const styles: IStyles = {};\r\n\r\n Object.keys(bps).forEach((bp) => {\r\n // preparing the className\r\n const shortNameClass = bps[bp].name;\r\n\r\n // just if have a percentage\r\n let nameClass = shortNameClass;\r\n if (shortNameClass.includes('%')) {\r\n nameClass = shortNameClass.replace(\r\n shortNameClass,\r\n percentageConverter(shortNameClass)\r\n );\r\n }\r\n\r\n const finalPrefix = prefix ? prefix + '-' : '';\r\n nameClass =\r\n finalPrefix +\r\n processors[directive].classPrefix +\r\n '-' +\r\n nameClass\r\n .replace(/\\//g, '\\\\/')\r\n .replace(/:/g, '\\\\:')\r\n .replace('@', '\\\\@')\r\n .split('.')\r\n .join('_');\r\n\r\n if (!intConfig.styles[nameClass]) {\r\n // Property and value\r\n let propAndVal;\r\n if (directive === 'flex') {\r\n propAndVal = bps[bp].value;\r\n const flexImportant = shortNameClass.includes('!')\r\n ? ';display:flex !important;'\r\n : ';display:flex;';\r\n\r\n // Searching a flex self inside. ['as' for 'align-self']\r\n const attrsFlexSelfs = flexAttrsSelf.filter((nameAttrFlex) =>\r\n shortNameClass.includes(nameAttrFlex + ':')\r\n );\r\n if (attrsFlexSelfs.length) {\r\n // if the items number of flex selft (+1) is diferrent so exists other flex attribute. Example: as:ce jc:ce\r\n if (attrsFlexSelfs.length + 1 !== shortNameClass.split(':').length) {\r\n propAndVal += flexImportant;\r\n }\r\n } else {\r\n propAndVal += flexImportant;\r\n }\r\n } else {\r\n propAndVal = prop + ':' + bps[bp].value;\r\n }\r\n\r\n let rule = '@media screen and ';\r\n let direct = false;\r\n if (!bp.includes('-')) {\r\n // no tiene until\r\n if (sizes[bp]) {\r\n rule += '(min-width: ' + sizes[bp] + 'px)';\r\n } else {\r\n rule = '.' + nameClass.replace(/!/g, '\\\\!') + '{' + propAndVal + '}';\r\n direct = true;\r\n }\r\n } else {\r\n const bpSplited = bp.split('-');\r\n const bp1 = bpSplited[0];\r\n if (bp1) rule += '(min-width: ' + sizes[bp1] + 'px) and ';\r\n const bp2 = bpSplited[1];\r\n rule += '(max-width: ' + (sizes[bp2] - 1) + 'px)';\r\n }\r\n\r\n if (!direct) {\r\n rule += '{.' + nameClass.replace(/!/g, '\\\\!') + '{' + propAndVal + '}}';\r\n }\r\n\r\n styles[nameClass] = rule;\r\n } else {\r\n styles[nameClass] = intConfig.styles[nameClass];\r\n }\r\n });\r\n return styles;\r\n};\r\n\r\nexport default createStyles;\r\n","import { IStyles } from './createStyles';\n\nconst replaceList = [\n ['/', ''],\n ['\\\\', '/'],\n ['/:', ':'],\n ['\\\\:', ':'],\n ['\\\\@', '@'],\n ['/@', '@'],\n];\n\nconst nameCleaner = (objStyles: IStyles): IStyles => {\n const obj: IStyles = {};\n for (const name in objStyles) {\n let newName = name;\n replaceList.forEach((reItem) => {\n newName = newName.split(reItem[0]).join(reItem[1]);\n });\n obj[newName] = objStyles[name];\n }\n return obj;\n};\n\nexport default nameCleaner;\n","import { TDirectiveName } from '../config/processors';\nimport insertRules from '../methods/insertRules';\nimport createStyles, { IStyles } from './createStyles';\nimport nameCleaner from './nameCleaner';\n\nexport interface IRBuildStyles {\n name: string;\n value: string;\n}\n\nexport interface IBpCals {\n [bpName: string]: IRBuildStyles;\n}\n\nexport interface IBuildCss {\n type: TDirectiveName;\n bps: IBpCals;\n deep: boolean;\n}\n\nconst buildCss = (data: IBuildCss): IStyles => {\n // creating the styles\n const objStyles = createStyles(data.type, data.bps);\n\n // Inserting CSS rules\n if (data.deep) {\n insertRules(objStyles);\n }\n\n // name classes cleaner\n return nameCleaner(objStyles);\n};\n\nexport default buildCss;\n","import prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\nimport calPercentage from '../helpers/calPercentage';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport getConfig from '../config/main';\r\nimport { IStyles } from '../helpers/createStyles';\r\n\r\nconst buildCols = (values: string, insertStyles = false): IStyles | Error => {\r\n let cols: number[];\r\n let bp;\r\n const bpCals: IBpCals = {};\r\n const config = getConfig();\r\n\r\n // Getting numbers\r\n let selectorName, propValue, paramPrepared;\r\n const directBp = Object.keys(config.breakpoints)[0];\r\n\r\n let err: boolean | Error = false;\r\n\r\n for (const item of values.split(' ')) {\r\n let param = item;\r\n selectorName = param;\r\n paramPrepared = prepareParam(param);\r\n bp = paramPrepared.breakPoints;\r\n param = paramPrepared.numbers;\r\n\r\n if (param.includes('/')) {\r\n const paramSplited = param.split('/');\r\n cols = [Number(paramSplited[0]), Number(paramSplited[1])];\r\n } else {\r\n if (paramPrepared.widthBp) {\r\n if (bp.includes('-')) {\r\n err = regError(\r\n 'SyntaxError',\r\n \"You can't determine a 'until breakpoint' when use the explicit columns max: \" +\r\n values\r\n );\r\n break;\r\n } else {\r\n cols = [Number(param), config.cols[bp] as number];\r\n }\r\n } else {\r\n cols = [Number(param), config.cols[directBp] as number];\r\n }\r\n }\r\n\r\n propValue = calPercentage(cols[0], cols[1]);\r\n if (paramPrepared.important) propValue += ' !important';\r\n\r\n bpCals[bp] = {\r\n name: selectorName,\r\n value: propValue,\r\n };\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'cols',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildCols;\r\n","import { flexAttrsSelf, flexProsAndVals } from '../config/flex';\r\nimport getConfig from '../config/main';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport { IStyles } from '../helpers/createStyles';\r\nimport prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\n\r\nconst buildFlex = (valFlex: string, insertStyles = false): IStyles | Error => {\r\n const bpCals: IBpCals = {};\r\n\r\n // Getting numbers\r\n let err: boolean | Error = false;\r\n const config = getConfig();\r\n const firstBp = Object.keys(config.breakpoints)[0];\r\n\r\n for (const param of valFlex.split(' ')) {\r\n let propVal;\r\n const paramPrepared = prepareParam(param);\r\n const bpNames = paramPrepared.breakPoints;\r\n const flexSplited = paramPrepared.numbers.split(':');\r\n const nameProp = flexSplited[0] as keyof typeof flexProsAndVals; // 'fc' o 'or'\r\n const valProp = flexSplited[1] as keyof typeof flexProsAndVals; // 'ce' o '1'\r\n let valAlias: string;\r\n\r\n if (!flexAttrsSelf.includes(nameProp)) {\r\n if (!flexProsAndVals[nameProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + nameProp + \"' in Flex vault.\"\r\n );\r\n break;\r\n }\r\n if (!flexProsAndVals[valProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + valProp + \"' in Flex vault.\"\r\n );\r\n break;\r\n }\r\n propVal =\r\n flexProsAndVals[nameProp].ruleCss +\r\n ':' +\r\n flexProsAndVals[valProp].ruleCss;\r\n valAlias = flexProsAndVals[valProp].classPrefix;\r\n } else {\r\n propVal = flexProsAndVals[nameProp].ruleCss + ':' + valProp;\r\n valAlias = valProp;\r\n }\r\n\r\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\r\n if (paramPrepared.important) {\r\n propVal += ' !important';\r\n sufixBp += '!';\r\n }\r\n\r\n let selectorName =\r\n flexProsAndVals[nameProp].classPrefix + ':' + valAlias + sufixBp;\r\n\r\n if (!bpCals[bpNames]) {\r\n bpCals[bpNames] = {\r\n name: selectorName,\r\n value: propVal,\r\n };\r\n } else {\r\n if (selectorName.includes('@')) selectorName = selectorName.split('@')[0]; // just here because will be contact with the other className\r\n let prevName = bpCals[bpNames].name.split('@')[0];\r\n if (bpCals[bpNames].name.includes('!') && !prevName.includes('!'))\r\n prevName += '!';\r\n\r\n bpCals[bpNames].name = prevName + '-' + selectorName + sufixBp;\r\n bpCals[bpNames].value += ';' + propVal;\r\n }\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'flex',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildFlex;\r\n","import calPercentage from './calPercentage';\n\nconst relativeMeasures = ['%', 'rem', 'em', 'ex', 'vw', 'vh', 'pt', 'cm', 'pc'];\n\nconst processedNumber = (n: string) => {\n let nProcessed;\n if (n.includes('/')) {\n nProcessed = n.split('/');\n nProcessed = calPercentage(\n parseFloat(nProcessed[0]),\n parseFloat(nProcessed[1])\n );\n } else if (n === 'auto') {\n nProcessed = 'auto';\n } else {\n const relativeUnits = relativeMeasures.filter((unit) => {\n return n.includes(unit);\n });\n if (relativeUnits.length) {\n nProcessed = n;\n } else {\n nProcessed = n === '0' ? n : n + 'px';\n }\n }\n return nProcessed;\n};\n\nexport default processedNumber;\n","import { TDirectiveName } from '../config/processors';\nimport buildCss, { IBpCals } from './buildCss';\nimport { IStyles } from './createStyles';\nimport prepareParam from './prepareParam';\nimport processedNumber from './processedNumber';\n\nconst buildAttr = (\n values: string,\n directive: TDirectiveName,\n insertStyles = false\n): IStyles => {\n const bpCals: IBpCals = {};\n\n values.split(' ').forEach((param) => {\n const paramProcessed = prepareParam(param);\n const bpNames = paramProcessed.breakPoints;\n\n // processing number values\n let propValue = paramProcessed.numbers\n .split('-')\n .map((n) => processedNumber(n))\n .join(' ');\n if (paramProcessed.important) propValue += ' !important';\n bpCals[bpNames] = {\n name: param,\n value: propValue,\n };\n });\n\n // Building the classNames and the styles to use.\n return buildCss({\n type: directive,\n bps: bpCals,\n deep: insertStyles,\n });\n};\n\nexport default buildAttr;\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPad = (valPads: string, insertStyles = false) => {\r\n return buildAttr(valPads, 'pad', insertStyles);\r\n};\r\n\r\nexport default buildPad;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadTop = (valPadTop: string, insertStyles = false) => {\r\n return buildAttr(valPadTop, 'padt', insertStyles);\r\n};\r\n\r\nexport default buildPadTop;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadRight = (valPadRight: string, insertStyles = false) => {\r\n return buildAttr(valPadRight, 'padr', insertStyles);\r\n};\r\n\r\nexport default buildPadRight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadBottom = (valPadBottom: string, insertStyles = false) => {\r\n return buildAttr(valPadBottom, 'padb', insertStyles);\r\n};\r\n\r\nexport default buildPadBottom;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadLeft = (valPadLeft: string, insertStyles = false) => {\r\n return buildAttr(valPadLeft, 'padl', insertStyles);\r\n};\r\n\r\nexport default buildPadLeft;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMar = (valMars: string, insertStyles = false) => {\r\n return buildAttr(valMars, 'mar', insertStyles);\r\n};\r\n\r\nexport default buildMar;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarTop = (valMarTop: string, insertStyles = false) => {\r\n return buildAttr(valMarTop, 'mart', insertStyles);\r\n};\r\n\r\nexport default buildMarTop;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarRight = (valMarRight: string, insertStyles = false) => {\r\n return buildAttr(valMarRight, 'marr', insertStyles);\r\n};\r\n\r\nexport default buildMarRight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarBottom = (valMarBottom: string, insertStyles = false) => {\r\n return buildAttr(valMarBottom, 'marb', insertStyles);\r\n};\r\n\r\nexport default buildMarBottom;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarLeft = (valMarLeft: string, insertStyles = false) => {\r\n return buildAttr(valMarLeft, 'marl', insertStyles);\r\n};\r\n\r\nexport default buildMarLeft;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMaxWidth = (valMaxWidth: string, insertStyles = false) => {\r\n return buildAttr(valMaxWidth, 'mxw', insertStyles);\r\n};\r\n\r\nexport default buildMaxWidth;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMaxHeight = (valMaxHeight: string, insertStyles = false) => {\r\n return buildAttr(valMaxHeight, 'mxh', insertStyles);\r\n};\r\n\r\nexport default buildMaxHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMinWidth = (valMinWidth: string, insertStyles = false) => {\r\n return buildAttr(valMinWidth, 'miw', insertStyles);\r\n};\r\n\r\nexport default buildMinWidth;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMinHeight = (valMinHeight: string, insertStyles = false) => {\r\n return buildAttr(valMinHeight, 'mih', insertStyles);\r\n};\r\n\r\nexport default buildMinHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildHeight = (valHeight: string, insertStyles = false) => {\r\n return buildAttr(valHeight, 'hgt', insertStyles);\r\n};\r\n\r\nexport default buildHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildWidth = (valWidth: string, insertStyles = false) => {\r\n return buildAttr(valWidth, 'wdh', insertStyles);\r\n};\r\n\r\nexport default buildWidth;\r\n","const positionProsAndValsBase = {\r\n st: {\r\n ruleCss: 'static',\r\n classPrefix: 'st',\r\n },\r\n ab: {\r\n ruleCss: 'absolute',\r\n classPrefix: 'ab',\r\n },\r\n fi: {\r\n ruleCss: 'fixed',\r\n classPrefix: 'fi',\r\n },\r\n re: {\r\n ruleCss: 'relative',\r\n classPrefix: 're',\r\n },\r\n si: {\r\n ruleCss: 'sticky',\r\n classPrefix: 'si',\r\n },\r\n in: {\r\n ruleCss: 'initial',\r\n classPrefix: 'in',\r\n },\r\n ih: {\r\n ruleCss: 'inherit',\r\n classPrefix: 'ih',\r\n },\r\n};\r\n\r\nexport const positionProsAndVals = {\r\n ...positionProsAndValsBase,\r\n static: positionProsAndValsBase.st,\r\n absolute: positionProsAndValsBase.ab,\r\n fixed: positionProsAndValsBase.fi,\r\n relative: positionProsAndValsBase.re,\r\n sticky: positionProsAndValsBase.si,\r\n initial: positionProsAndValsBase.in,\r\n inherit: positionProsAndValsBase.ih,\r\n};\r\n","import getConfig from '../config/main';\r\nimport { positionProsAndVals } from '../config/position';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport { IStyles } from '../helpers/createStyles';\r\nimport prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\n\r\nconst buildPosition = (\r\n valPos: string,\r\n insertStyles = false\r\n): IStyles | Error => {\r\n const bpCals: IBpCals = {};\r\n\r\n // Getting numbers\r\n let err: boolean | Error = false;\r\n const config = getConfig();\r\n const firstBp = Object.keys(config.breakpoints)[0];\r\n\r\n for (const param of valPos.split(' ')) {\r\n let propVal;\r\n const paramPrepared = prepareParam(param);\r\n const bpNames = paramPrepared.breakPoints;\r\n const nameProp = paramPrepared.numbers as keyof typeof positionProsAndVals;\r\n\r\n if (!positionProsAndVals[nameProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + nameProp + \"' in Position vault.\"\r\n );\r\n break;\r\n }\r\n\r\n propVal = positionProsAndVals[nameProp].ruleCss;\r\n const className = positionProsAndVals[nameProp].classPrefix;\r\n\r\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\r\n\r\n if (paramPrepared.important) {\r\n propVal += ' !important';\r\n sufixBp += '!';\r\n }\r\n\r\n bpCals[bpNames] = {\r\n name: className + sufixBp,\r\n value: propVal,\r\n };\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'pos',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildPosition;\r\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildTop = (val: string, insertStyles = false) => {\n return buildAttr(val, 't', insertStyles);\n};\n\nexport default buildTop;\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildRight = (val: string, insertStyles = false) => {\n return buildAttr(val, 'r', insertStyles);\n};\n\nexport default buildRight;\n","import buildAttr from '../helpers/buildAttr';\r\nimport { IStyles } from '../helpers/createStyles';\r\n\r\nconst buildBottom = (val: string, insertStyles = false): IStyles => {\r\n return buildAttr(val, 'b', insertStyles);\r\n};\r\n\r\nexport default buildBottom;\r\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildLeft = (val: string, insertStyles = false) => {\n return buildAttr(val, 'l', insertStyles);\n};\n\nexport default buildLeft;\n","const displayProsAndValsBase = {\n bl: {\n ruleCss: 'block',\n classPrefix: 'bl',\n },\n il: {\n ruleCss: 'inline',\n classPrefix: 'il',\n },\n ib: {\n ruleCss: 'inline-block',\n classPrefix: 'ib',\n },\n fx: {\n ruleCss: 'flex',\n classPrefix: 'fx',\n },\n if: {\n ruleCss: 'inline-flex',\n classPrefix: 'if',\n },\n no: {\n ruleCss: 'none',\n classPrefix: 'no',\n },\n in: {\n ruleCss: 'initial',\n classPrefix: 'in',\n },\n ih: {\n ruleCss: 'inherit',\n classPrefix: 'ih',\n },\n};\n\nexport const displayProsAndVals = {\n ...displayProsAndValsBase,\n block: displayProsAndValsBase.bl,\n inline: displayProsAndValsBase.il,\n 'inline-block': displayProsAndValsBase.ib,\n flex: displayProsAndValsBase.fx,\n 'inline-flex': displayProsAndValsBase.if,\n none: displayProsAndValsBase.no,\n initial: displayProsAndValsBase.in,\n inherit: displayProsAndValsBase.ih,\n};\n","import getConfig from '../config/main';\nimport { displayProsAndVals } from '../config/display';\n\nimport buildCss, { IBpCals } from '../helpers/buildCss';\nimport { IStyles } from '../helpers/createStyles';\nimport prepareParam from '../helpers/prepareParam';\nimport regError from '../helpers/regError';\n\nconst buildDisplay = (\n valDisplay: string,\n insertStyles = false\n): IStyles | Error => {\n const bpCals: IBpCals = {};\n\n // Getting numbers\n let err: boolean | Error = false;\n const config = getConfig();\n const firstBp = Object.keys(config.breakpoints)[0];\n\n for (const param of valDisplay.split(' ')) {\n let propVal;\n const paramPrepared = prepareParam(param);\n const bpNames = paramPrepared.breakPoints;\n const nameProp = paramPrepared.numbers as keyof typeof displayProsAndVals;\n\n if (!displayProsAndVals[nameProp]) {\n err = regError(\n 'Non-existent Alias',\n \"Don't exists the alias '\" + nameProp + \"' in display vault.\"\n );\n break;\n }\n\n propVal = displayProsAndVals[nameProp].ruleCss;\n const className = displayProsAndVals[nameProp].classPrefix;\n\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\n\n if (paramPrepared.important) {\n propVal += ' !important';\n sufixBp += '!';\n }\n\n bpCals[bpNames] = {\n name: className + sufixBp,\n value: propVal,\n };\n }\n\n if (err) return err;\n\n // Building the classNames and the styles to use.\n return buildCss({\n type: 'd',\n bps: bpCals,\n deep: insertStyles,\n });\n};\n\nexport default buildDisplay;\n","import { IStyles } from './createStyles';\n\nexport interface IBuildXY {\n values: string;\n builderA: (valPadA: string, insertStyles: boolean) => IStyles;\n builderB: (valPadB: string, insertStyles: boolean) => IStyles;\n insertStyles: boolean;\n}\n\nconst buildXY = (data: IBuildXY): IStyles => {\n const stylesA = data.builderA(data.values, data.insertStyles);\n const stylesB = data.builderB(data.values, data.insertStyles);\n const allStyles: IStyles = {};\n for (const style in stylesA) {\n allStyles[style] = stylesA[style];\n }\n for (const style in stylesB) {\n allStyles[style] = stylesB[style];\n }\n return allStyles;\n};\n\nexport default buildXY;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildPadLeft from './buildPadLeft';\nimport buildPadRight from './buildPadRight';\n\nconst buildPadX = (valPadX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valPadX,\n builderA: buildPadRight,\n builderB: buildPadLeft,\n insertStyles,\n });\n};\n\nexport default buildPadX;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildPadBottom from './buildPadBottom';\nimport buildPadTop from './buildPadTop';\n\nconst buildPadY = (valPadX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valPadX,\n builderA: buildPadTop,\n builderB: buildPadBottom,\n insertStyles,\n });\n};\n\nexport default buildPadY;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildMarLeft from './buildMarLeft';\nimport buildMarRight from './buildMarRight';\n\nconst buildMarX = (valMarX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valMarX,\n builderA: buildMarRight,\n builderB: buildMarLeft,\n insertStyles,\n });\n};\n\nexport default buildMarX;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildMarBottom from './buildMarBottom';\nimport buildMarTop from './buildMarTop';\n\nconst buildMarY = (valMarY: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valMarY,\n builderA: buildMarTop,\n builderB: buildMarBottom,\n insertStyles,\n });\n};\n\nexport default buildMarY;\n","import buildCols from '../methods/buildCols';\nimport buildFlex from '../methods/buildFlex';\nimport buildPad from '../methods/buildPad';\nimport buildPadTop from '../methods/buildPadTop';\nimport buildPadRight from '../methods/buildPadRight';\nimport buildPadBottom from '../methods/buildPadBottom';\nimport buildPadLeft from '../methods/buildPadLeft';\nimport buildMar from '../methods/buildMar';\nimport buildMarTop from '../methods/buildMarTop';\nimport buildMarRight from '../methods/buildMarRight';\nimport buildMarBottom from '../methods/buildMarBottom';\nimport buildMarLeft from '../methods/buildMarLeft';\nimport buildMaxWidth from '../methods/buildMaxWidth';\nimport buildMaxHeight from '../methods/buildMaxHeight';\nimport buildMinWidth from '../methods/buildMinWidth';\nimport buildMinHeight from '../methods/buildMinHeight';\nimport buildHeight from '../methods/buildHeight';\nimport buildWidth from '../methods/buildWidth';\nimport buildPosition from '../methods/buildPosition';\nimport buildTop from '../methods/buildTop';\nimport buildRight from '../methods/buildRight';\nimport buildBottom from '../methods/buildBottom';\nimport buildLeft from '../methods/buildLeft';\nimport buildDisplay from '../methods/buildDisplay';\nimport buildPadX from '../methods/buildPadX';\nimport buildPadY from '../methods/buildPadY';\nimport buildMarX from '../methods/buildMarX';\nimport buildMarY from '../methods/buildMarY';\n\nimport { IStyles } from '../helpers/createStyles';\n\ntype TDirectiveNameBase =\n | 'cols'\n | 'pad'\n | 'padt'\n | 'padr'\n | 'padb'\n | 'padl'\n | 'padx'\n | 'pady'\n | 'mar'\n | 'mart'\n | 'marr'\n | 'marb'\n | 'marl'\n | 'marx'\n | 'mary'\n | 'flex'\n | 'mxw'\n | 'mxh'\n | 'miw'\n | 'mih'\n | 'wdh'\n | 'hgt'\n | 'pos'\n | 't'\n | 'r'\n | 'b'\n | 'l'\n | 'd';\n\ntype TDirectiveNameExtended =\n | 'c'\n | 'fx'\n | 'p'\n | 'padding'\n | 'pt'\n | 'padding-top'\n | 'pr'\n | 'padding-right'\n | 'pb'\n | 'padding-bottom'\n | 'pl'\n | 'padding-left'\n | 'py'\n | 'padding-y'\n | 'px'\n | 'padding-x'\n | 'my'\n | 'margin-y'\n | 'mx'\n | 'margin-x'\n | 'm'\n | 'margin'\n | 'mt'\n | 'margin-top'\n | 'mr'\n | 'margin-right'\n | 'mb'\n | 'margin-bottom'\n | 'ml'\n | 'margin-left'\n | 'w'\n | 'width'\n | 'h'\n | 'height'\n | 'max-width'\n | 'max-height'\n | 'min-width'\n | 'min-height'\n | 'position'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'display';\n\nexport type TDirectiveName = TDirectiveNameBase | TDirectiveNameExtended;\n\nexport interface IProcessor {\n build: (values: string, insertStyles: boolean) => IStyles | Error;\n ruleCss: string | string[];\n classPrefix: string;\n}\n\nconst processorsBase: Record = {\n cols: {\n build: buildCols,\n ruleCss: 'width',\n classPrefix: 'c',\n },\n\n // Paddings\n pad: {\n build: buildPad,\n ruleCss: 'padding',\n classPrefix: 'p',\n },\n padt: {\n build: buildPadTop,\n ruleCss: 'padding-top',\n classPrefix: 'pt',\n },\n padr: {\n build: buildPadRight,\n ruleCss: 'padding-right',\n classPrefix: 'pr',\n },\n padb: {\n build: buildPadBottom,\n ruleCss: 'padding-bottom',\n classPrefix: 'pb',\n },\n padl: {\n build: buildPadLeft,\n ruleCss: 'padding-left',\n classPrefix: 'pl',\n },\n padx: {\n build: buildPadX,\n ruleCss: ['padding-left', 'padding-right'],\n classPrefix: 'px',\n },\n pady: {\n build: buildPadY,\n ruleCss: ['padding-top', 'padding-bottom'],\n classPrefix: 'py',\n },\n\n // Margin\n mar: {\n build: buildMar,\n ruleCss: 'margin',\n classPrefix: 'm',\n },\n mart: {\n build: buildMarTop,\n ruleCss: 'margin-top',\n classPrefix: 'mt',\n },\n marr: {\n build: buildMarRight,\n ruleCss: 'margin-right',\n classPrefix: 'mr',\n },\n marb: {\n build: buildMarBottom,\n ruleCss: 'margin-bottom',\n classPrefix: 'mb',\n },\n marl: {\n build: buildMarLeft,\n ruleCss: 'margin-left',\n classPrefix: 'ml',\n },\n marx: {\n build: buildMarX,\n ruleCss: ['margin-left', 'margin-right'],\n classPrefix: 'px',\n },\n mary: {\n build: buildMarY,\n ruleCss: ['margin-top', 'margin-bottom'],\n classPrefix: 'py',\n },\n\n // Flex Box\n flex: {\n build: buildFlex,\n ruleCss: 'display: flex',\n classPrefix: 'fx',\n },\n\n // Max & Min Width & Height\n mxw: {\n build: buildMaxWidth,\n ruleCss: 'max-width',\n classPrefix: 'mxw',\n },\n\n mxh: {\n build: buildMaxHeight,\n ruleCss: 'max-height',\n classPrefix: 'mxh',\n },\n\n miw: {\n build: buildMinWidth,\n ruleCss: 'min-width',\n classPrefix: 'miw',\n },\n\n mih: {\n build: buildMinHeight,\n ruleCss: 'min-height',\n classPrefix: 'mih',\n },\n\n // Width & Height\n wdh: {\n build: buildWidth,\n ruleCss: 'width',\n classPrefix: 'w',\n },\n\n hgt: {\n build: buildHeight,\n ruleCss: 'height',\n classPrefix: 'h',\n },\n\n // Position\n pos: {\n build: buildPosition,\n ruleCss: 'position',\n classPrefix: 'pos',\n },\n t: {\n build: buildTop,\n ruleCss: 'top',\n classPrefix: 't',\n },\n r: {\n build: buildRight,\n ruleCss: 'right',\n classPrefix: 'r',\n },\n b: {\n build: buildBottom,\n ruleCss: 'bottom',\n classPrefix: 'b',\n },\n l: {\n build: buildLeft,\n ruleCss: 'left',\n classPrefix: 'l',\n },\n d: {\n build: buildDisplay,\n ruleCss: 'display',\n classPrefix: 'd',\n },\n};\n\nexport const processors: Record = {\n ...processorsBase,\n c: processorsBase.cols,\n fx: processorsBase.flex,\n p: processorsBase.pad,\n padding: processorsBase.pad,\n pt: processorsBase.padt,\n 'padding-top': processorsBase.padt,\n pr: processorsBase.padr,\n 'padding-right': processorsBase.padr,\n pb: processorsBase.padb,\n 'padding-bottom': processorsBase.padb,\n pl: processorsBase.padl,\n 'padding-left': processorsBase.padl,\n py: processorsBase.pady,\n 'padding-y': processorsBase.pady,\n px: processorsBase.padx,\n 'padding-x': processorsBase.padx,\n m: processorsBase.mar,\n margin: processorsBase.mar,\n mt: processorsBase.mart,\n 'margin-top': processorsBase.mart,\n mr: processorsBase.marr,\n 'margin-right': processorsBase.marr,\n mb: processorsBase.marb,\n 'margin-bottom': processorsBase.marb,\n ml: processorsBase.marl,\n 'margin-left': processorsBase.marl,\n my: processorsBase.mary,\n 'margin-y': processorsBase.mary,\n mx: processorsBase.marx,\n 'margin-x': processorsBase.marx,\n w: processorsBase.wdh,\n width: processorsBase.wdh,\n h: processorsBase.hgt,\n height: processorsBase.hgt,\n 'max-width': processorsBase.mxw,\n 'max-height': processorsBase.mxh,\n 'min-width': processorsBase.miw,\n 'min-height': processorsBase.mih,\n position: processorsBase.pos,\n top: processorsBase.t,\n right: processorsBase.r,\n bottom: processorsBase.b,\n left: processorsBase.l,\n display: processorsBase.d,\n};\n","import { processors, TDirectiveName } from '../config/processors';\r\n\r\nconst getParameters = (\r\n Node: HTMLElement | Element\r\n): Partial> => {\r\n const params: Partial> = {};\r\n const attrs = Node.attributes;\r\n const paramNames = Object.keys(processors);\r\n Array.prototype.forEach.call(attrs, (attr) => {\r\n if (paramNames.includes(attr.name)) {\r\n if (attr.value !== '')\r\n params[attr.name as TDirectiveName] = attr.value\r\n .trim()\r\n .split(' ')\r\n .filter((item: string) => item)\r\n .join(' ');\r\n }\r\n });\r\n return params;\r\n};\r\n\r\nexport default getParameters;\r\n","import { processors, TDirectiveName } from '../config/processors';\nimport { IStyles } from '../helpers/createStyles';\n\nexport interface IBuildResult {\n [prop: string]: IStyles | boolean;\n}\n\nconst build = (\n obj: Partial>,\n insertStyles = false\n): Partial | Error => {\n const rObj: Partial = {};\n let err: Error | boolean = false;\n for (const prop in obj) {\n const propData = processors[prop as TDirectiveName];\n const objStyles: IStyles | Error = propData.build(\n obj[prop as TDirectiveName] as string,\n insertStyles\n );\n if (objStyles instanceof Error) {\n err = objStyles;\n break;\n } else {\n rObj[prop] = objStyles;\n }\n }\n\n if (err) return err;\n return rObj;\n};\n\nexport default build;\n","import getConfig from '../config/main';\n\nconst addClasses = (\n Node: HTMLElement | Element,\n classesNames: string,\n overwrite?: boolean\n): Promise => {\n return new Promise((resolve) => {\n const config = getConfig();\n const names = classesNames.split(' ');\n let classesToAdd: string[] = names;\n if (!overwrite) {\n classesToAdd = names.filter((name) => !Node.classList.contains(name));\n if (!classesToAdd.length) {\n resolve();\n return;\n }\n }\n\n const obsNode = new config.context.MutationObserver((mutations) => {\n const target = mutations[0].target;\n const currentClasses = (target as Element).className.split(' ');\n const containsAll = names.every((element) =>\n currentClasses.includes(element)\n );\n if (containsAll) {\n obsNode.disconnect();\n resolve();\n }\n });\n obsNode.observe(Node, {\n childList: false,\n subtree: false,\n attributes: true,\n attributeFilter: ['class'],\n characterData: false,\n });\n\n if (overwrite) {\n Node.className = classesNames;\n } else {\n const space = Node.hasAttribute('class') ? ' ' : '';\n Node.className += space + classesToAdd.join(' ');\n }\n });\n};\n\nexport default addClasses;\n","import getConfig from '../config/main';\n\nexport const removeProp = (\n Node: HTMLElement | Element,\n propName: string,\n context: Window & typeof globalThis\n): Promise => {\n return new Promise((resolve) => {\n if (!Node.hasAttribute(propName)) {\n resolve();\n return;\n }\n const obsNode = new context.MutationObserver(() => {\n obsNode.disconnect();\n resolve();\n });\n obsNode.observe(Node, {\n childList: false,\n subtree: false,\n attributes: true,\n attributeFilter: [propName],\n characterData: false,\n });\n Node.removeAttribute(propName);\n });\n};\n\nexport const removeProps = (\n Node: HTMLElement | Element,\n propNames: string[],\n context: Window & typeof globalThis\n): Promise => {\n return new Promise((resolve) => {\n const promises = propNames.map((name) => removeProp(Node, name, context));\n Promise.all(promises).then(() => resolve());\n });\n};\n\nconst removeAttr = (\n Node: HTMLElement | Element,\n propNames: string | string[]\n): Promise => {\n return new Promise((resolve) => {\n const config = getConfig();\n if (Array.isArray(propNames)) {\n removeProps(Node, propNames, config.context).then(resolve);\n } else {\n removeProp(Node, propNames, config.context).then(resolve);\n }\n });\n};\n\nexport default removeAttr;\n","import getConfig from '../config/main';\nimport addClasses from '../utils/addClasses';\nimport removeAttr from '../utils/removeAttr';\n\nexport interface IEventReady {\n node: HTMLElement | Element;\n directive: string | string[];\n classes: string;\n resolve: (value: void | Error | PromiseLike) => void;\n}\n\nconst eventReady = ({ node, directive, classes, resolve }: IEventReady) => {\n const config = getConfig();\n removeAttr(node, directive)\n .then(() => addClasses(node, classes))\n .then(() => {\n resolve();\n const event = new config.context.CustomEvent('layout:ready');\n node.dispatchEvent(event);\n });\n};\n\nexport default eventReady;\n","import { IStyles } from '../helpers/createStyles';\nimport regError from '../helpers/regError';\nimport build, { IBuildResult } from './build';\nimport getParameters from './getParameters';\nimport { TDirectiveName } from '../config/processors';\nimport eventReady from '../helpers/eventReady';\n\nconst set = (\n Node: HTMLElement | Element,\n parameters?: Partial>\n): Promise => {\n return new Promise((resolve, reject) => {\n const params = parameters || getParameters(Node);\n const arrParams = Object.keys(params);\n if (!arrParams.length) {\n const err = regError(\n 'Parameter Missing',\n \"don't exists any parameter to process\",\n Node\n );\n reject(err);\n return;\n }\n\n const toBuild: Partial> = {};\n for (const prop in params) {\n toBuild[prop as TDirectiveName] = params[prop as TDirectiveName];\n }\n\n // creating classes names and inserting that classes to the core\n const classesObj = build(toBuild as Record, true);\n if (classesObj instanceof Error) {\n reject(classesObj);\n return;\n }\n\n // adding classes\n const classes = classesObj as Partial;\n const classesNames = Object.keys(classes)\n .map((name: string) => Object.keys(classes[name] as IStyles))\n .flat()\n .join(' ');\n\n // removing unnecessary props\n eventReady({\n node: Node,\n directive: arrParams,\n classes: classesNames,\n resolve,\n });\n });\n};\n\nexport default set;\n","import regError from './regError';\n\nconst directiveValues = (\n Node: HTMLElement | Element,\n directives: string[]\n): string | Error => {\n const directiveValues = directives\n .map((item) => Node.getAttribute(item))\n .filter((item) => item)\n .join(' ');\n return !directiveValues\n ? regError(\n 'Empty',\n 'The value of the directives \"' + directives.join(', ') + '\" are empty',\n Node\n )\n : directiveValues;\n};\n\nexport default directiveValues;\n","import buildFlex from './buildFlex';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from '../helpers/directiveValues';\n\nconst setFlex = (\n Node: HTMLElement | Element,\n flexValues?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = flexValues || directiveValues(Node, ['flex', 'fx']);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = buildFlex(values as string, true);\n if (objStyles instanceof Error) {\n reject(objStyles);\n return;\n }\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive: 'flex',\n classes: Object.keys(objStyles).join(' '),\n resolve,\n });\n });\n};\n\nexport default setFlex;\n","import buildCols from './buildCols';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from '../helpers/directiveValues';\n\nconst setCols = (\n Node: HTMLElement | Element,\n columns?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = columns || directiveValues(Node, ['c', 'cols']);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = buildCols(values as string, true);\n if (objStyles instanceof Error) {\n reject(objStyles);\n return;\n }\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive: 'cols',\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setCols;\n","import buildAttr from '../helpers/buildAttr';\nimport { TDirectiveName } from '../config/processors';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from './directiveValues';\n\nconst setAttr = (\n Node: HTMLElement | Element,\n directives: TDirectiveName[],\n vals?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = vals || directiveValues(Node, directives);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const directive = directives[0];\n const objStyles = buildAttr(values as string, directive, true);\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive,\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setAttr;\n","import setAttr from '../helpers/setAttr';\n\nconst setHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['hgt', 'h'], values);\n};\n\nexport default setHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marb', 'mb', 'margin-bottom'], values);\n};\n\nexport default setMarBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marl', 'ml', 'margin-left'], values);\n};\n\nexport default setMarLeft;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marr', 'mr', 'margin-right'], values);\n};\n\nexport default setMarRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMar = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mar', 'm', 'margin'], values);\n};\n\nexport default setMar;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mart', 'mt', 'margin-top'], values);\n};\n\nexport default setMarTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setMaxWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mxw', 'max-width'], values);\n};\n\nexport default setMaxWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setMinHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mih', 'min-height'], values);\n};\n\nexport default setMinHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMinWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['miw', 'min-width'], values);\n};\n\nexport default setMinWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padb', 'pb', 'padding-bottom'], values);\n};\n\nexport default setPadBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padl', 'pl', 'padding-left'], values);\n};\n\nexport default setPadLeft;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padr', 'pr', 'padding-right'], values);\n};\n\nexport default setPadRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setPad = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['pad', 'p', 'padding'], values);\n};\n\nexport default setPad;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padt', 'pt', 'padding-top'], values);\n};\n\nexport default setPadTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['wdh', 'width'], values);\n};\n\nexport default setWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setMaxHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mxh', 'max-height'], values);\n};\n\nexport default setMaxHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setPosition = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['pos', 'position'], values);\n};\n\nexport default setPosition;\n","import setAttr from '../helpers/setAttr';\n\nconst setTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['t', 'top'], values);\n};\n\nexport default setTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['r', 'right'], values);\n};\n\nexport default setRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['b', 'bottom'], values);\n};\n\nexport default setBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['l', 'left'], values);\n};\n\nexport default setLeft;\n","import { IStyles } from './createStyles';\nimport directiveValues from './directiveValues';\nimport eventReady from './eventReady';\n\nexport interface ISetterXY {\n Node: HTMLElement | Element;\n directives: string[];\n builder: (valPadX: string, insertStyles: boolean) => IStyles;\n vals?: string;\n}\n\nconst setterXY = (data: ISetterXY): Promise => {\n return new Promise((resolve, reject) => {\n const values = data.vals || directiveValues(data.Node, data.directives);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = data.builder(values as string, true);\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: data.Node,\n directive: data.directives,\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setterXY;\n","import buildPadX from './buildPadX';\nimport setterXY from '../helpers/setterXY';\n\nconst setPadX = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['padx', 'px', 'padding-x'],\n builder: buildPadX,\n vals,\n });\n};\n\nexport default setPadX;\n","import buildPadY from './buildPadY';\nimport setterXY from '../helpers/setterXY';\n\nconst setPadY = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['pady', 'py', 'padding-y'],\n builder: buildPadY,\n vals,\n });\n};\n\nexport default setPadY;\n","import buildMarX from './buildMarX';\nimport setterXY from '../helpers/setterXY';\n\nconst setMarX = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['marx', 'px', 'margin-x'],\n builder: buildMarX,\n vals,\n });\n};\n\nexport default setMarX;\n","import buildMarY from './buildMarY';\nimport setterXY from '../helpers/setterXY';\n\nconst setMarY = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['mary', 'py', 'margin-y'],\n builder: buildMarY,\n vals,\n });\n};\n\nexport default setMarY;\n","import { TDirectiveName } from './../config/processors';\r\nimport { processors } from '../config/processors';\r\nimport addClasses from '../utils/addClasses';\r\nimport removeAttr from '../utils/removeAttr';\r\n\r\nconst reset = (Node: HTMLElement | Element): Promise => {\r\n return new Promise((resolve) => {\r\n const classPrefixes = new Set(\r\n Object.keys(processors).map(\r\n (item) => processors[item as TDirectiveName].classPrefix\r\n )\r\n );\r\n const layouterClasses = [...classPrefixes];\r\n const restClass = Node.className.split(' ').filter((name) => {\r\n if (!name.includes('-')) {\r\n return true;\r\n } else {\r\n const findClass = layouterClasses.find((item) => {\r\n const nLength = item.length;\r\n const namePrefix = name.substring(0, nLength + 1);\r\n return namePrefix === item + '-';\r\n });\r\n return !findClass;\r\n }\r\n });\r\n\r\n if (restClass.length) {\r\n const classesName = restClass.join(' ');\r\n addClasses(Node, classesName, true).then(() => {\r\n resolve();\r\n });\r\n } else {\r\n removeAttr(Node, 'class').then(() => {\r\n resolve();\r\n });\r\n }\r\n });\r\n};\r\n\r\nexport default reset;\r\n","import { ILayouter } from './../layouter';\nimport { processors } from '../config/processors';\n\nconst nodesNotAccepted = [\n 'animate',\n 'animateMotion',\n 'animateTransform',\n 'circle',\n 'clipPath',\n 'defs',\n 'desc',\n 'discard',\n 'ellipse',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'filter',\n 'foreignObject',\n 'g',\n 'hatch',\n 'hatchpath',\n 'image',\n 'line',\n 'linearGradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialGradient',\n 'rect',\n 'set',\n 'stop',\n 'style',\n 'svg',\n 'switch',\n 'symbol',\n 'text',\n 'textPath',\n 'title',\n 'tspan',\n 'use',\n 'view',\n];\n\nconst searchAndProcess = (\n layouter: ILayouter,\n context: Document | HTMLElement | Element\n) => {\n return new Promise((resolve) => {\n const props = Object.keys(processors);\n const attrs = props.map((prop) => `[${prop}]`).join(', ');\n const nodes = context.querySelectorAll(attrs);\n if (!nodes.length) {\n resolve(layouter);\n return;\n }\n\n const setNodes = new Set();\n Array.prototype.filter\n .call(\n nodes,\n (itemNode) =>\n !nodesNotAccepted.includes(itemNode.nodeName.toLowerCase())\n )\n .forEach((item) => setNodes.add(item));\n const promises: Promise[] = [];\n setNodes.forEach((node) => {\n promises.push(layouter.set(node as Element | HTMLElement));\n });\n Promise.all(promises).then(resolve);\n });\n};\n\nexport default searchAndProcess;\n","import { ILayouter } from './../layouter';\nimport { processors } from '../config/processors';\nimport getConfig from '../config/main';\nimport searchAndProcess from './searchAndProcess';\n\nconst mainObserver = (layouter: ILayouter) => {\n const config = getConfig();\n const props = Object.keys(processors);\n const obsBody = new layouter.context.MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type === 'childList') {\n if (!mutation.addedNodes.length) {\n continue;\n }\n mutation.addedNodes.forEach((node) => {\n if (node instanceof HTMLElement) {\n const props = layouter.getParameters(node);\n if (Object.keys(props).length) {\n layouter.set(node, props);\n }\n searchAndProcess(layouter, node);\n }\n });\n } else if (mutation.type === 'attributes') {\n const node = mutation.target;\n if (node instanceof HTMLElement) {\n const props = layouter.getParameters(node);\n if (Object.keys(props).length) {\n layouter.set(node, props);\n }\n }\n }\n }\n });\n const observerOptions = {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: props,\n characterData: false,\n };\n obsBody.observe(config.context.document.body, observerOptions);\n};\n\nexport default mainObserver;\n","import { IConfig, IConfigUser, setConfig, updateConfig } from './config/main';\nimport getParameters from './methods/getParameters';\n\nimport build from './methods/build';\nimport buildCols from './methods/buildCols';\nimport buildFlex from './methods/buildFlex';\nimport buildPad from './methods/buildPad';\nimport buildPadTop from './methods/buildPadTop';\nimport buildPadRight from './methods/buildPadRight';\nimport buildPadBottom from './methods/buildPadBottom';\nimport buildPadLeft from './methods/buildPadLeft';\nimport buildMar from './methods/buildMar';\nimport buildMarTop from './methods/buildMarTop';\nimport buildMarRight from './methods/buildMarRight';\nimport buildMarBottom from './methods/buildMarBottom';\nimport buildMarLeft from './methods/buildMarLeft';\nimport buildMaxWidth from './methods/buildMaxWidth';\nimport buildMaxHeight from './methods/buildMaxHeight';\nimport buildMinWidth from './methods/buildMinWidth';\nimport buildMinHeight from './methods/buildMinHeight';\nimport buildHeight from './methods/buildHeight';\nimport buildWidth from './methods/buildWidth';\nimport buildPosition from './methods/buildPosition';\nimport buildTop from './methods/buildTop';\nimport buildRight from './methods/buildRight';\nimport buildBottom from './methods/buildBottom';\nimport buildLeft from './methods/buildLeft';\nimport buildPadX from './methods/buildPadX';\nimport buildPadY from './methods/buildPadY';\nimport buildMarX from './methods/buildMarX';\nimport buildMarY from './methods/buildMarY';\n\nimport set from './methods/set';\nimport setFlex from './methods/setFlex';\nimport setCols from './methods/SetCols';\nimport setHeight from './methods/setHeight';\nimport setMarBottom from './methods/setMarBottom';\nimport setMarLeft from './methods/setMarLeft';\nimport setMarRight from './methods/setMarRight';\nimport setMar from './methods/setMar';\nimport setMarTop from './methods/setMarTop';\nimport setMaxWidth from './methods/setMaxWidth';\nimport setMinHeight from './methods/setMinHeight';\nimport setMinWidth from './methods/setMinWidth';\nimport setPadBottom from './methods/setPadBottom';\nimport setPadLeft from './methods/setPadLeft';\nimport setPadRight from './methods/setPadRight';\nimport setPad from './methods/setPad';\nimport setPadTop from './methods/setPadTop';\nimport setWidth from './methods/setWidth';\nimport setMaxHeight from './methods/setMaxHeight';\nimport setPosition from './methods/setPosition';\nimport setTop from './methods/setTop';\nimport setRight from './methods/setRight';\nimport setBottom from './methods/setBottom';\nimport setLeft from './methods/setLeft';\nimport setPadX from './methods/setPadX';\nimport setPadY from './methods/setPadY';\nimport setMarX from './methods/setMarX';\nimport setMarY from './methods/setMarY';\n\nimport insertRules from './methods/insertRules';\nimport reset from './methods/reset';\n\nimport { IStyles } from './helpers/createStyles';\nimport { IBuildResult } from './methods/build';\nimport searchAndProcess from './helpers/searchAndProcess';\nimport mainObserver from './helpers/mainObserver';\nimport { TDirectiveName, processors, IProcessor } from './config/processors';\n\nexport interface ILayouter extends IConfig {\n getParameters: (\n Node: HTMLElement | Element\n ) => Partial>;\n updateConfig: (userConfig: Partial>) => IConfig;\n build: (\n obj: Partial>,\n insertStyles?: boolean\n ) => Partial | Error;\n buildCols: (valCols: string, insertStyles?: boolean) => IStyles | Error;\n buildFlex: (valFlex: string, insertStyles?: boolean) => IStyles | Error;\n buildPad: (valPads: string, insertStyles?: boolean) => IStyles;\n buildPadTop: (valPadTop: string, insertStyles?: boolean) => IStyles;\n buildPadRight: (valPadRight: string, insertStyles?: boolean) => IStyles;\n buildPadBottom: (valPadBottom: string, insertStyles?: boolean) => IStyles;\n buildPadLeft: (valPadLeft: string, insertStyles?: boolean) => IStyles;\n buildPadX: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildPadY: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMar: (valMars: string, insertStyles?: boolean) => IStyles;\n buildMarTop: (valMarTop: string, insertStyles?: boolean) => IStyles;\n buildMarRight: (valMarRight: string, insertStyles?: boolean) => IStyles;\n buildMarBottom: (valMarBottom: string, insertStyles?: boolean) => IStyles;\n buildMarLeft: (valMarLeft: string, insertStyles?: boolean) => IStyles;\n buildMarX: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMarY: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMaxWidth: (valMaxWidth: string, insertStyles?: boolean) => IStyles;\n buildMaxHeight: (valMaxHeight: string, insertStyles?: boolean) => IStyles;\n buildMinWidth: (valMinWidth: string, insertStyles?: boolean) => IStyles;\n buildMinHeight: (valMinHeight: string, insertStyles?: boolean) => IStyles;\n buildHeight: (valHeight: string, insertStyles?: boolean) => IStyles;\n buildWidth: (valWidth: string, insertStyles?: boolean) => IStyles;\n buildPosition: (\n valPosition: string,\n insertStyles?: boolean\n ) => IStyles | Error;\n buildTop: (valTop: string, insertStyles?: boolean) => IStyles | Error;\n buildRight: (valRight: string, insertStyles?: boolean) => IStyles | Error;\n buildBottom: (valBottom: string, insertStyles?: boolean) => IStyles | Error;\n buildLeft: (valLeft: string, insertStyles?: boolean) => IStyles | Error;\n\n set: (\n Node: HTMLElement | Element,\n parameters?: Partial>\n ) => Promise;\n setCols: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setFlex: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMar: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarX: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarY: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPad: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadX: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadY: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n setWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMinWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMaxWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMinHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMaxHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPosition: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n setTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n processors: Record;\n\n insertRules: (objStyles: IStyles) => void;\n reset: (Node: HTMLElement | Element) => Promise;\n version: string;\n}\n\ndeclare global {\n interface Window {\n layouter: ILayouter;\n }\n}\n\nconst layouter = (\n context: Window & typeof globalThis,\n userConfig: Partial = {}\n): ILayouter => {\n const config = setConfig(context, userConfig);\n\n const instance = {\n ...config,\n getParameters,\n updateConfig,\n insertRules,\n build,\n buildCols,\n buildFlex,\n buildPad,\n buildPadTop,\n buildPadRight,\n buildPadBottom,\n buildPadLeft,\n buildPadX,\n buildPadY,\n buildMar,\n buildMarTop,\n buildMarRight,\n buildMarBottom,\n buildMarLeft,\n buildMarX,\n buildMarY,\n buildMaxWidth,\n buildMaxHeight,\n buildMinWidth,\n buildMinHeight,\n buildHeight,\n buildWidth,\n set,\n setCols,\n setFlex,\n setMar,\n setMarTop,\n setMarRight,\n setMarBottom,\n setMarLeft,\n setMarX,\n setMarY,\n setPad,\n setPadTop,\n setPadRight,\n setPadBottom,\n setPadLeft,\n setPadX,\n setPadY,\n setWidth,\n setMinWidth,\n setMaxWidth,\n setHeight,\n setMinHeight,\n setMaxHeight,\n buildPosition,\n buildTop,\n buildRight,\n buildBottom,\n buildLeft,\n setPosition,\n setTop,\n setRight,\n setBottom,\n setLeft,\n reset,\n processors,\n };\n\n // Auto init process\n if (config.searchOnInit) {\n searchAndProcess(instance, context.document).then(() => {\n if (instance.ready) instance.ready(instance);\n if (config.observer) mainObserver(instance);\n });\n } else {\n if (config.observer) mainObserver(instance);\n if (instance.ready) instance.ready(instance);\n }\n\n return instance;\n};\n\nif (typeof window !== 'undefined' && typeof exports === 'undefined') {\n window.layouter = layouter(window);\n}\n\nexport type { TDirectiveName, IProcessor } from './config/processors';\nexport type { IConfigUser } from './config/main';\nexport default layouter;\n"],"names":["config"],"mappings":"AAkBA,MAAM,kBAAkB,CACtB,QACA,aACmB;AACnB,QAAM,QAAwB,CAAA;AAE9B,MAAI,aAAa,SAAS;AACxB,WAAO,KAAK,MAAM,EACf,IAAI,CAAC,OAAe;AACZ,aAAA;AAAA,QACL,OAAO;AAAA,QACP,OAAO,OAAO,IAAI;AAAA,MAAA;AAAA,IACpB,CACD,EACA,KAAK,CAAC,GAAgB,MACrB,EAAE,QAAQ,EAAE,QAAQ,IAAI,EAAE,QAAQ,EAAE,QAAQ,KAAK,CACnD,EACC,QAAQ,CAAC,IAAiB,UAAkB;AAC3C,YAAM,GAAG,SAAS,CAAC,QAAQ,IAAI,OAAO,GAAG,OAAO;AAAA,IAAA,CACjD;AAAA,EAAA,OACE;AACL,WAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,OAAO;AAC5B,YAAA,MAAM,OAAO,IAAI;AAAA,IAAA,CACxB;AAAA,EACH;AAEO,SAAA;AACT;ACzBA,MAAM,oBAAoB,CAAC;AAAA,EACzB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAC6C;AAC7C,MAAI,cAAc,QAAQ,SAAS,eA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,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAIF,MAAI,QAAO,cAAc;AACvB,qBAAiB,UAAU,QAAQ,QAAQ,EAAE,KAAK,MAAM;AACtD,UAAI,SAAS;AAAO,iBAAS,MAAM,QAAQ;AAC3C,UAAI,QAAO;AAAU,qBAAa,QAAQ;AAAA,IAAA,CAC3C;AAAA,EAAA,OACI;AACL,QAAI,QAAO;AAAU,mBAAa,QAAQ;AAC1C,QAAI,SAAS;AAAO,eAAS,MAAM,QAAQ;AAAA,EAC7C;AAEO,SAAA;AACT;AAEA,IAAI,OAAO,WAAW,eAAe,OAAO,YAAY,aAAa;AAC5D,SAAA,WAAW,SAAS,MAAM;AACnC;;"} \ No newline at end of file +{"version":3,"file":"layouter.es.js","sources":["../src/helpers/breakpointsNums.ts","../src/helpers/createScopeStyles.ts","../src/helpers/scopesStylesBuilder.ts","../src/helpers/breakpointsOrdered.ts","../src/config/main.ts","../src/helpers/prepareParam.ts","../src/helpers/regError.ts","../src/helpers/calPercentage.ts","../src/helpers/getScopeByclassName.ts","../src/methods/insertRules.ts","../src/config/flex.ts","../src/helpers/percentageConverter.ts","../src/helpers/createStyles.ts","../src/helpers/nameCleaner.ts","../src/helpers/buildCss.ts","../src/methods/buildCols.ts","../src/methods/buildFlex.ts","../src/helpers/processedNumber.ts","../src/helpers/buildAttr.ts","../src/methods/buildPad.ts","../src/methods/buildPadTop.ts","../src/methods/buildPadRight.ts","../src/methods/buildPadBottom.ts","../src/methods/buildPadLeft.ts","../src/methods/buildMar.ts","../src/methods/buildMarTop.ts","../src/methods/buildMarRight.ts","../src/methods/buildMarBottom.ts","../src/methods/buildMarLeft.ts","../src/methods/buildMaxWidth.ts","../src/methods/buildMaxHeight.ts","../src/methods/buildMinWidth.ts","../src/methods/buildMinHeight.ts","../src/methods/buildHeight.ts","../src/methods/buildWidth.ts","../src/config/position.ts","../src/methods/buildPosition.ts","../src/methods/buildTop.ts","../src/methods/buildRight.ts","../src/methods/buildBottom.ts","../src/methods/buildLeft.ts","../src/config/display.ts","../src/methods/buildDisplay.ts","../src/helpers/buildXY.ts","../src/methods/buildPadX.ts","../src/methods/buildPadY.ts","../src/methods/buildMarX.ts","../src/methods/buildMarY.ts","../src/config/processors.ts","../src/methods/getParameters.ts","../src/methods/build.ts","../src/utils/addClasses.ts","../src/utils/removeAttr.ts","../src/helpers/eventReady.ts","../src/methods/set.ts","../src/helpers/directiveValues.ts","../src/methods/setFlex.ts","../src/methods/SetCols.ts","../src/helpers/setAttr.ts","../src/methods/setHeight.ts","../src/methods/setMarBottom.ts","../src/methods/setMarLeft.ts","../src/methods/setMarRight.ts","../src/methods/setMar.ts","../src/methods/setMarTop.ts","../src/methods/setMaxWidth.ts","../src/methods/setMinHeight.ts","../src/methods/setMinWidth.ts","../src/methods/setPadBottom.ts","../src/methods/setPadLeft.ts","../src/methods/setPadRight.ts","../src/methods/setPad.ts","../src/methods/setPadTop.ts","../src/methods/setWidth.ts","../src/methods/setMaxHeight.ts","../src/methods/setPosition.ts","../src/methods/setTop.ts","../src/methods/setRight.ts","../src/methods/setBottom.ts","../src/methods/setLeft.ts","../src/helpers/setterXY.ts","../src/methods/setPadX.ts","../src/methods/setPadY.ts","../src/methods/setMarX.ts","../src/methods/setMarY.ts","../src/methods/reset.ts","../src/helpers/searchAndProcess.ts","../src/helpers/mainObserver.ts","../src/layouter.ts"],"sourcesContent":["export type TNumProp = 'width' | 'cols';\r\n\r\nexport interface IBreakpoint {\r\n alias: string;\r\n width: number;\r\n}\r\n\r\nexport interface IBreakpoints {\r\n [alias: string]: {\r\n width: number;\r\n cols: number;\r\n };\r\n}\r\n\r\nexport interface IBreakpointObj {\r\n [alias: string]: number;\r\n}\r\n\r\nconst breakpointsNums = (\r\n objBps: IBreakpoints,\r\n propName: TNumProp\r\n): IBreakpointObj => {\r\n const sizes: IBreakpointObj = {};\r\n\r\n if (propName === 'width') {\r\n Object.keys(objBps)\r\n .map((bp: string) => {\r\n return {\r\n alias: bp,\r\n width: objBps[bp].width,\r\n };\r\n })\r\n .sort((a: IBreakpoint, b: IBreakpoint) =>\r\n a.width > b.width ? 1 : b.width > a.width ? -1 : 0\r\n )\r\n .forEach((bp: IBreakpoint, index: number) => {\r\n sizes[bp.alias] = !index ? 0 : objBps[bp.alias][propName];\r\n });\r\n } else {\r\n Object.keys(objBps).forEach((bp) => {\r\n sizes[bp] = objBps[bp][propName];\r\n });\r\n }\r\n\r\n return sizes;\r\n};\r\n\r\nexport default breakpointsNums;\r\n","export type TInsertion = 'before' | 'after' | 'append';\n\nexport interface ICreateScopeStyles {\n bridge?: boolean;\n bp: string;\n insertionType: TInsertion;\n node: HTMLElement;\n context: Window & typeof globalThis;\n}\n\nexport interface IRCreateScopeStyles {\n method:\n | CSSStyleSheet\n | {\n insertRule: (ruleCss: string) => void;\n rules: string[];\n };\n node: HTMLElement;\n}\n\nconst createScopeStyles = ({\n bridge: withBridge,\n bp,\n insertionType,\n node,\n context,\n}: ICreateScopeStyles): IRCreateScopeStyles => {\n let stylesScope = context.document.getElementById('layouter-' + bp);\n if (!stylesScope) {\n stylesScope = context.document.createElement('style');\n stylesScope.appendChild(context.document.createTextNode('')); // WebKit hack :(\n const nodeParent = node.parentNode as HTMLDivElement;\n switch (insertionType) {\n case 'before':\n nodeParent.insertBefore(stylesScope, node);\n break;\n case 'after':\n node.nextSibling\n ? nodeParent.insertBefore(stylesScope, node.nextSibling)\n : nodeParent.appendChild(stylesScope);\n break;\n case 'append':\n node.appendChild(stylesScope);\n break;\n }\n stylesScope.id = 'layouter-' + bp;\n }\n\n let bridge: IRCreateScopeStyles;\n if (withBridge) {\n bridge = {\n method: (stylesScope as HTMLStyleElement).sheet as CSSStyleSheet,\n node: stylesScope,\n };\n } else {\n bridge = {\n method: {\n insertRule: (ruleCss: string) => {\n (stylesScope as HTMLDivElement).appendChild(\n context.document.createTextNode(ruleCss)\n );\n },\n rules: [],\n },\n node: stylesScope,\n };\n }\n return bridge;\n};\n\nexport default createScopeStyles;\n","import { IBreakpoints } from './breakpointsNums';\nimport createScopeStyles, { IRCreateScopeStyles } from './createScopeStyles';\n\nexport interface IScopes {\n [name: string]: IRCreateScopeStyles;\n}\n\nexport interface IScopesStylesBuilder {\n breakpoints: IBreakpoints;\n bridge: boolean;\n scope?: IScopes;\n context: Window & typeof globalThis;\n}\n\nexport const scopesStylesBuilder = ({\n breakpoints,\n bridge,\n scope,\n context,\n}: IScopesStylesBuilder): IScopes => {\n const scopes: IScopes = scope || {};\n Object.keys(breakpoints).forEach((bp: string) => {\n if (!scopes[bp]) {\n scopes[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'append',\n node: context.document.body,\n context,\n });\n }\n });\n return scopes;\n};\n","import { ICols } from '../config/main';\r\nimport { IBreakpoints } from './breakpointsNums';\r\n\r\nconst breakpointsOrdered = (bps: IBreakpoints, sizes: ICols) => {\r\n const bpsOrdered: IBreakpoints = {};\r\n Object.keys(sizes).forEach((bpName) => (bpsOrdered[bpName] = bps[bpName]));\r\n return bpsOrdered;\r\n};\r\n\r\nexport default breakpointsOrdered;\r\n","import { ILayouter } from './../layouter';\nimport breakpointsNums, { IBreakpoints } from '../helpers/breakpointsNums';\nimport { IScopes, scopesStylesBuilder } from '../helpers/scopesStylesBuilder';\nimport breakpointsOrdered from '../helpers/breakpointsOrdered';\nimport { version } from '../../package.json';\n\nexport interface ICols {\n [colAlias: string]: number;\n}\n\nexport interface IConfigUser {\n prefix: string;\n breakpoints: IBreakpoints;\n bridge: boolean;\n debug?: boolean;\n ready?: (instance: ILayouter) => void;\n searchOnInit: boolean;\n observer: boolean;\n}\n\ninterface IConfigNumsIn {\n bps: IBreakpoints;\n bridge: boolean;\n scope?: IScopes;\n context: Window & typeof globalThis;\n}\n\ninterface IConfigNumsOut {\n scope: IScopes;\n cols: ICols;\n sizes: ICols;\n breakpoints: IBreakpoints;\n}\n\nexport interface IConfig\n extends Omit,\n IConfigNumsOut {\n context: Window & typeof globalThis;\n styles: {\n [className: string]: string;\n };\n version: string;\n}\n\ndeclare global {\n interface Window {\n layouterConfig: Partial;\n }\n}\n\nconst breakpointsInit: IBreakpoints = {\n xs: {\n width: 360,\n cols: 15,\n },\n sm: {\n width: 600,\n cols: 25,\n },\n md: {\n width: 900,\n cols: 31,\n },\n lg: {\n width: 1200,\n cols: 41,\n },\n xlg: {\n width: 1536,\n cols: 51,\n },\n};\n\nexport let baseConfig: IConfigUser = {\n prefix: '',\n breakpoints: breakpointsInit,\n bridge: true,\n debug: true,\n searchOnInit: true,\n observer: true,\n};\n\nlet config: IConfig;\n\nconst configNums = ({\n bps,\n bridge,\n scope,\n context,\n}: IConfigNumsIn): IConfigNumsOut => {\n const sizes = breakpointsNums(bps, 'width');\n const finalBps = breakpointsOrdered(bps, sizes);\n return {\n sizes,\n cols: breakpointsNums(bps, 'cols'),\n scope: scopesStylesBuilder({\n breakpoints: finalBps,\n bridge,\n scope: scope,\n context,\n }),\n breakpoints: finalBps,\n };\n};\n\nexport const setConfig = (\n context: Window & typeof globalThis,\n customCfg: Partial = {}\n): IConfig => {\n const contextConfig = context.layouterConfig || {};\n\n baseConfig = {\n ...baseConfig,\n ...customCfg,\n ...contextConfig,\n };\n\n config = {\n context,\n ...baseConfig,\n ...configNums({\n bps: baseConfig.breakpoints,\n bridge: baseConfig.bridge,\n context,\n }),\n styles: {},\n version,\n };\n\n return config;\n};\n\nconst getConfig = (): IConfig => {\n return config;\n};\n\nexport const setStyles = (className: string, value: string) => {\n config.styles[className] = value;\n};\n\nexport const updateConfig = (userConfig: Partial): IConfig => {\n config = {\n ...config,\n ...userConfig,\n };\n\n if (userConfig.breakpoints) {\n config = {\n ...config,\n ...configNums({\n bps: config.breakpoints,\n bridge: config.bridge,\n scope: config.scope,\n context: config.context,\n }),\n };\n }\n\n return config;\n};\n\nexport default getConfig;\n","import getConfig from '../config/main';\n\nexport interface IPrepareParamObj {\n widthBp: boolean;\n numbers: string;\n breakPoints: string;\n important: boolean;\n}\n\nconst prepareParam = (param: string): IPrepareParamObj => {\n let bp: string;\n let argParam = param;\n let important = false;\n const haveBp = argParam.includes('@');\n if (haveBp) {\n const bpSplited = argParam.split('@');\n argParam = bpSplited[0];\n bp = bpSplited[1];\n } else {\n const config = getConfig();\n bp = Object.keys(config.breakpoints)[0];\n }\n\n if (param.includes('!')) {\n important = true;\n bp = bp.replace(/!/g, '');\n argParam = argParam.replace(/!/g, '');\n }\n\n return {\n widthBp: haveBp,\n numbers: argParam,\n breakPoints: bp,\n important,\n };\n};\n\nexport default prepareParam;\n","import config from '../config/main';\r\n\r\nconst regError = (\r\n name: string,\r\n message: string,\r\n Node?: Element | HTMLElement\r\n): Error => {\r\n const err = new Error();\r\n err.name = name;\r\n err.message = message;\r\n const intConfig = config();\r\n if (intConfig.debug) {\r\n console.error(err);\r\n if (Node) console.log(Node);\r\n }\r\n return err;\r\n};\r\n\r\nexport default regError;\r\n","const calPercentage = (n1: number, n2: number): string => {\r\n const cal = (n1 * 100) / n2;\r\n const haveDecimal = cal - Math.floor(cal) !== 0;\r\n const result = haveDecimal ? cal.toFixed(3) : cal;\r\n return result + '%';\r\n};\r\n\r\nexport default calPercentage;\r\n","import config from '../config/main';\nimport createScopeStyles, { IRCreateScopeStyles } from './createScopeStyles';\n\nconst getScopeByclassName = (className: string): IRCreateScopeStyles => {\n const nameClass = className.replace(/!/g, '');\n const atIndex = nameClass.indexOf('@');\n const intConfig = config();\n const scope = intConfig.scope;\n const bridge = intConfig.bridge;\n const context = intConfig.context;\n\n // Haven´t a BP designed\n if (atIndex === -1) {\n const firstBp = Object.keys(intConfig.breakpoints)[0];\n return scope[firstBp as string];\n }\n\n // Have a BP designed, a normal BP.\n const bp = nameClass.substring(atIndex + 1);\n if (!bp.includes('-')) return scope[bp]; // A simple BP (13/15@lg), not compound (like this: 13/15@sm-md).\n\n // A BP until. Example 13/15@-md\n if (bp.substring(0, 1) === '-') {\n if (scope[bp]) return scope[bp]; // exists the Scope.\n const bpUntil = bp.substring(1);\n scope[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'before',\n node: scope[bpUntil].node,\n context,\n });\n return scope[bp]; // returning a new scope created\n }\n\n // A BP from and until (a BP compound). Example: Example 13/15@sm-md\n if (scope[bp]) {\n return scope[bp]; // exists the Scope.\n }\n\n const fromBp = bp.split('-')[0];\n scope[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'after',\n node: scope[fromBp].node,\n context,\n });\n\n return scope[bp]; // returning a new scope compounded created\n};\n\nexport default getScopeByclassName;\n","import config, { setStyles } from '../config/main';\nimport { IStyles } from '../helpers/createStyles';\nimport getScopeByclassName from '../helpers/getScopeByclassName';\n\nconst insertRules = (objStyles: IStyles) => {\n const intConfig = config();\n\n for (const className in objStyles) {\n if (!intConfig.styles[className]) {\n const nodeScope = getScopeByclassName(className);\n const valClass = objStyles[className];\n const rules = nodeScope.method.rules;\n nodeScope.method.insertRule(valClass, rules ? rules.length : 0);\n setStyles(className, valClass); // saving in styles vault\n }\n }\n};\n\nexport default insertRules;\n","const flexProsAndValsBase = {\r\n jc: {\r\n ruleCss: 'justify-content',\r\n classPrefix: 'jc',\r\n },\r\n ai: {\r\n ruleCss: 'align-items',\r\n classPrefix: 'ai',\r\n },\r\n ce: {\r\n ruleCss: 'center',\r\n classPrefix: 'ce',\r\n },\r\n fs: {\r\n ruleCss: 'flex-start',\r\n classPrefix: 'fs',\r\n },\r\n fe: {\r\n ruleCss: 'flex-end',\r\n classPrefix: 'fe',\r\n },\r\n sb: {\r\n ruleCss: 'space-between',\r\n classPrefix: 'sb',\r\n },\r\n sa: {\r\n ruleCss: 'space-around',\r\n classPrefix: 'sa',\r\n },\r\n fw: {\r\n ruleCss: 'flex-wrap',\r\n classPrefix: 'fw',\r\n },\r\n nw: {\r\n ruleCss: 'nowrap',\r\n classPrefix: 'nw',\r\n },\r\n w: {\r\n ruleCss: 'wrap',\r\n classPrefix: 'w',\r\n },\r\n wr: {\r\n ruleCss: 'wrap-reverse',\r\n classPrefix: 'wr',\r\n },\r\n fd: {\r\n ruleCss: 'flex-direction',\r\n classPrefix: 'fd',\r\n },\r\n r: {\r\n ruleCss: 'row',\r\n classPrefix: 'r',\r\n },\r\n rr: {\r\n ruleCss: 'row-reverse',\r\n classPrefix: 'rr',\r\n },\r\n co: {\r\n ruleCss: 'column',\r\n classPrefix: 'co',\r\n },\r\n cor: {\r\n ruleCss: 'column-reverse',\r\n classPrefix: 'co',\r\n },\r\n au: {\r\n ruleCss: 'auto',\r\n classPrefix: 'au',\r\n },\r\n st: {\r\n ruleCss: 'stretch',\r\n classPrefix: 'st',\r\n },\r\n bl: {\r\n ruleCss: 'baseline',\r\n classPrefix: 'bl',\r\n },\r\n in: {\r\n ruleCss: 'initial',\r\n classPrefix: 'in',\r\n },\r\n ih: {\r\n ruleCss: 'inherit',\r\n classPrefix: 'ih',\r\n },\r\n};\r\n\r\nconst flexPropsAndValsSelfBase = {\r\n fg: {\r\n ruleCss: 'flex-grow',\r\n classPrefix: 'fg',\r\n },\r\n fh: {\r\n ruleCss: 'flex-shrink',\r\n classPrefix: 'fh',\r\n },\r\n as: {\r\n ruleCss: 'align-self',\r\n classPrefix: 'as',\r\n },\r\n or: {\r\n ruleCss: 'order',\r\n classPrefix: 'or',\r\n },\r\n};\r\n\r\nconst flexPropsAndValsSelf = {\r\n ...flexPropsAndValsSelfBase,\r\n 'flex-grow': flexPropsAndValsSelfBase.fg,\r\n 'flex-shrink': flexPropsAndValsSelfBase.fh,\r\n 'align-self': flexPropsAndValsSelfBase.as,\r\n order: flexPropsAndValsSelfBase.or,\r\n};\r\n\r\nexport const flexProsAndVals = {\r\n ...flexProsAndValsBase,\r\n ...flexPropsAndValsSelf,\r\n 'justify-content': flexProsAndValsBase.jc,\r\n 'align-items': flexProsAndValsBase.ai,\r\n center: flexProsAndValsBase.ce,\r\n 'flex-start': flexProsAndValsBase.fs,\r\n 'flex-end': flexProsAndValsBase.fe,\r\n 'space-between': flexProsAndValsBase.sb,\r\n 'space-around': flexProsAndValsBase.fs,\r\n 'flex-wrap': flexProsAndValsBase.fw,\r\n nowrap: flexProsAndValsBase.nw,\r\n w: flexProsAndValsBase.w,\r\n 'wrap-reverse': flexProsAndValsBase.wr,\r\n 'flex-direction': flexProsAndValsBase.fd,\r\n row: flexProsAndValsBase.r,\r\n 'row-reverse': flexProsAndValsBase.rr,\r\n column: flexProsAndValsBase.co,\r\n 'column-reverse': flexProsAndValsBase.cor,\r\n auto: flexProsAndValsBase.au,\r\n stretch: flexProsAndValsBase.st,\r\n baseline: flexProsAndValsBase.bl,\r\n initial: flexProsAndValsBase.in,\r\n inherit: flexProsAndValsBase.ih,\r\n};\r\n\r\nexport const flexAttrsSelf = Object.keys(flexPropsAndValsSelf);\r\n","const percentageConverter = (percentage: string) => {\r\n return '0¯' + percentage.replace('%', '');\r\n};\r\n\r\nexport default percentageConverter;\r\n","import { flexAttrsSelf } from '../config/flex';\r\nimport config from '../config/main';\r\nimport { processors, TDirectiveName } from '../config/processors';\r\nimport { IBpCals } from './buildCss';\r\nimport percentageConverter from './percentageConverter';\r\n\r\nexport interface IStyles {\r\n [name: string]: string;\r\n}\r\n\r\nconst createStyles = (directive: TDirectiveName, bps: IBpCals): IStyles => {\r\n const intConfig = config();\r\n const sizes = intConfig.sizes;\r\n const prefix = intConfig.prefix;\r\n const prop = processors[directive].ruleCss;\r\n const styles: IStyles = {};\r\n\r\n Object.keys(bps).forEach((bp) => {\r\n // preparing the className\r\n const shortNameClass = bps[bp].name;\r\n\r\n // just if have a percentage\r\n let nameClass = shortNameClass;\r\n if (shortNameClass.includes('%')) {\r\n nameClass = shortNameClass.replace(\r\n shortNameClass,\r\n percentageConverter(shortNameClass)\r\n );\r\n }\r\n\r\n const finalPrefix = prefix ? prefix + '-' : '';\r\n nameClass =\r\n finalPrefix +\r\n processors[directive].classPrefix +\r\n '-' +\r\n nameClass\r\n .replace(/\\//g, '\\\\/')\r\n .replace(/:/g, '\\\\:')\r\n .replace('@', '\\\\@')\r\n .split('.')\r\n .join('_');\r\n\r\n if (!intConfig.styles[nameClass]) {\r\n // Property and value\r\n let propAndVal;\r\n if (directive === 'flex') {\r\n propAndVal = bps[bp].value;\r\n const flexImportant = shortNameClass.includes('!')\r\n ? ';display:flex !important;'\r\n : ';display:flex;';\r\n\r\n // Searching a flex self inside. ['as' for 'align-self']\r\n const attrsFlexSelfs = flexAttrsSelf.filter((nameAttrFlex) =>\r\n shortNameClass.includes(nameAttrFlex + ':')\r\n );\r\n if (attrsFlexSelfs.length) {\r\n // if the items number of flex selft (+1) is diferrent so exists other flex attribute. Example: as:ce jc:ce\r\n if (attrsFlexSelfs.length + 1 !== shortNameClass.split(':').length) {\r\n propAndVal += flexImportant;\r\n }\r\n } else {\r\n propAndVal += flexImportant;\r\n }\r\n } else {\r\n propAndVal = prop + ':' + bps[bp].value;\r\n }\r\n\r\n let rule = '@media screen and ';\r\n let direct = false;\r\n if (!bp.includes('-')) {\r\n // no tiene until\r\n if (sizes[bp]) {\r\n rule += '(min-width: ' + sizes[bp] + 'px)';\r\n } else {\r\n rule = '.' + nameClass.replace(/!/g, '\\\\!') + '{' + propAndVal + '}';\r\n direct = true;\r\n }\r\n } else {\r\n const bpSplited = bp.split('-');\r\n const bp1 = bpSplited[0];\r\n if (bp1) rule += '(min-width: ' + sizes[bp1] + 'px) and ';\r\n const bp2 = bpSplited[1];\r\n rule += '(max-width: ' + (sizes[bp2] - 1) + 'px)';\r\n }\r\n\r\n if (!direct) {\r\n rule += '{.' + nameClass.replace(/!/g, '\\\\!') + '{' + propAndVal + '}}';\r\n }\r\n\r\n styles[nameClass] = rule;\r\n } else {\r\n styles[nameClass] = intConfig.styles[nameClass];\r\n }\r\n });\r\n return styles;\r\n};\r\n\r\nexport default createStyles;\r\n","import { IStyles } from './createStyles';\n\nconst replaceList = [\n ['/', ''],\n ['\\\\', '/'],\n ['/:', ':'],\n ['\\\\:', ':'],\n ['\\\\@', '@'],\n ['/@', '@'],\n];\n\nconst nameCleaner = (objStyles: IStyles): IStyles => {\n const obj: IStyles = {};\n for (const name in objStyles) {\n let newName = name;\n replaceList.forEach((reItem) => {\n newName = newName.split(reItem[0]).join(reItem[1]);\n });\n obj[newName] = objStyles[name];\n }\n return obj;\n};\n\nexport default nameCleaner;\n","import { TDirectiveName } from '../config/processors';\nimport insertRules from '../methods/insertRules';\nimport createStyles, { IStyles } from './createStyles';\nimport nameCleaner from './nameCleaner';\n\nexport interface IRBuildStyles {\n name: string;\n value: string;\n}\n\nexport interface IBpCals {\n [bpName: string]: IRBuildStyles;\n}\n\nexport interface IBuildCss {\n type: TDirectiveName;\n bps: IBpCals;\n deep: boolean;\n}\n\nconst buildCss = (data: IBuildCss): IStyles => {\n // creating the styles\n const objStyles = createStyles(data.type, data.bps);\n\n // Inserting CSS rules\n if (data.deep) {\n insertRules(objStyles);\n }\n\n // name classes cleaner\n return nameCleaner(objStyles);\n};\n\nexport default buildCss;\n","import prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\nimport calPercentage from '../helpers/calPercentage';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport getConfig from '../config/main';\r\nimport { IStyles } from '../helpers/createStyles';\r\n\r\nconst buildCols = (values: string, insertStyles = false): IStyles | Error => {\r\n let cols: number[];\r\n let bp;\r\n const bpCals: IBpCals = {};\r\n const config = getConfig();\r\n\r\n // Getting numbers\r\n let selectorName, propValue, paramPrepared;\r\n const directBp = Object.keys(config.breakpoints)[0];\r\n\r\n let err: boolean | Error = false;\r\n\r\n for (const item of values.split(' ')) {\r\n let param = item;\r\n selectorName = param;\r\n paramPrepared = prepareParam(param);\r\n bp = paramPrepared.breakPoints;\r\n param = paramPrepared.numbers;\r\n\r\n if (param.includes('/')) {\r\n const paramSplited = param.split('/');\r\n cols = [Number(paramSplited[0]), Number(paramSplited[1])];\r\n } else {\r\n if (paramPrepared.widthBp) {\r\n if (bp.includes('-')) {\r\n err = regError(\r\n 'SyntaxError',\r\n \"You can't determine a 'until breakpoint' when use the explicit columns max: \" +\r\n values\r\n );\r\n break;\r\n } else {\r\n cols = [Number(param), config.cols[bp] as number];\r\n }\r\n } else {\r\n cols = [Number(param), config.cols[directBp] as number];\r\n }\r\n }\r\n\r\n propValue = calPercentage(cols[0], cols[1]);\r\n if (paramPrepared.important) propValue += ' !important';\r\n\r\n bpCals[bp] = {\r\n name: selectorName,\r\n value: propValue,\r\n };\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'cols',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildCols;\r\n","import { flexAttrsSelf, flexProsAndVals } from '../config/flex';\r\nimport getConfig from '../config/main';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport { IStyles } from '../helpers/createStyles';\r\nimport prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\n\r\nconst buildFlex = (valFlex: string, insertStyles = false): IStyles | Error => {\r\n const bpCals: IBpCals = {};\r\n\r\n // Getting numbers\r\n let err: boolean | Error = false;\r\n const config = getConfig();\r\n const firstBp = Object.keys(config.breakpoints)[0];\r\n\r\n for (const param of valFlex.split(' ')) {\r\n let propVal;\r\n const paramPrepared = prepareParam(param);\r\n const bpNames = paramPrepared.breakPoints;\r\n const flexSplited = paramPrepared.numbers.split(':');\r\n const nameProp = flexSplited[0] as keyof typeof flexProsAndVals; // 'fc' o 'or'\r\n const valProp = flexSplited[1] as keyof typeof flexProsAndVals; // 'ce' o '1'\r\n let valAlias: string;\r\n\r\n if (!flexAttrsSelf.includes(nameProp)) {\r\n if (!flexProsAndVals[nameProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + nameProp + \"' in Flex vault.\"\r\n );\r\n break;\r\n }\r\n if (!flexProsAndVals[valProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + valProp + \"' in Flex vault.\"\r\n );\r\n break;\r\n }\r\n propVal =\r\n flexProsAndVals[nameProp].ruleCss +\r\n ':' +\r\n flexProsAndVals[valProp].ruleCss;\r\n valAlias = flexProsAndVals[valProp].classPrefix;\r\n } else {\r\n propVal = flexProsAndVals[nameProp].ruleCss + ':' + valProp;\r\n valAlias = valProp;\r\n }\r\n\r\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\r\n if (paramPrepared.important) {\r\n propVal += ' !important';\r\n sufixBp += '!';\r\n }\r\n\r\n let selectorName =\r\n flexProsAndVals[nameProp].classPrefix + ':' + valAlias + sufixBp;\r\n\r\n if (!bpCals[bpNames]) {\r\n bpCals[bpNames] = {\r\n name: selectorName,\r\n value: propVal,\r\n };\r\n } else {\r\n if (selectorName.includes('@')) selectorName = selectorName.split('@')[0]; // just here because will be contact with the other className\r\n let prevName = bpCals[bpNames].name.split('@')[0];\r\n if (bpCals[bpNames].name.includes('!') && !prevName.includes('!'))\r\n prevName += '!';\r\n\r\n bpCals[bpNames].name = prevName + '-' + selectorName + sufixBp;\r\n bpCals[bpNames].value += ';' + propVal;\r\n }\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'flex',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildFlex;\r\n","import calPercentage from './calPercentage';\n\nconst relativeMeasures = ['%', 'rem', 'em', 'ex', 'vw', 'vh', 'pt', 'cm', 'pc'];\n\nconst processedNumber = (n: string) => {\n let nProcessed;\n if (n.includes('/')) {\n nProcessed = n.split('/');\n nProcessed = calPercentage(\n parseFloat(nProcessed[0]),\n parseFloat(nProcessed[1])\n );\n } else if (n === 'auto') {\n nProcessed = 'auto';\n } else {\n const relativeUnits = relativeMeasures.filter((unit) => {\n return n.includes(unit);\n });\n if (relativeUnits.length) {\n nProcessed = n;\n } else {\n nProcessed = n === '0' ? n : n + 'px';\n }\n }\n return nProcessed;\n};\n\nexport default processedNumber;\n","import { TDirectiveName } from '../config/processors';\nimport buildCss, { IBpCals } from './buildCss';\nimport { IStyles } from './createStyles';\nimport prepareParam from './prepareParam';\nimport processedNumber from './processedNumber';\n\nconst buildAttr = (\n values: string,\n directive: TDirectiveName,\n insertStyles = false\n): IStyles => {\n const bpCals: IBpCals = {};\n\n values.split(' ').forEach((param) => {\n const paramProcessed = prepareParam(param);\n const bpNames = paramProcessed.breakPoints;\n\n // processing number values\n let propValue = paramProcessed.numbers\n .split('-')\n .map((n) => processedNumber(n))\n .join(' ');\n if (paramProcessed.important) propValue += ' !important';\n bpCals[bpNames] = {\n name: param,\n value: propValue,\n };\n });\n\n // Building the classNames and the styles to use.\n return buildCss({\n type: directive,\n bps: bpCals,\n deep: insertStyles,\n });\n};\n\nexport default buildAttr;\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPad = (valPads: string, insertStyles = false) => {\r\n return buildAttr(valPads, 'pad', insertStyles);\r\n};\r\n\r\nexport default buildPad;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadTop = (valPadTop: string, insertStyles = false) => {\r\n return buildAttr(valPadTop, 'padt', insertStyles);\r\n};\r\n\r\nexport default buildPadTop;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadRight = (valPadRight: string, insertStyles = false) => {\r\n return buildAttr(valPadRight, 'padr', insertStyles);\r\n};\r\n\r\nexport default buildPadRight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadBottom = (valPadBottom: string, insertStyles = false) => {\r\n return buildAttr(valPadBottom, 'padb', insertStyles);\r\n};\r\n\r\nexport default buildPadBottom;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadLeft = (valPadLeft: string, insertStyles = false) => {\r\n return buildAttr(valPadLeft, 'padl', insertStyles);\r\n};\r\n\r\nexport default buildPadLeft;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMar = (valMars: string, insertStyles = false) => {\r\n return buildAttr(valMars, 'mar', insertStyles);\r\n};\r\n\r\nexport default buildMar;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarTop = (valMarTop: string, insertStyles = false) => {\r\n return buildAttr(valMarTop, 'mart', insertStyles);\r\n};\r\n\r\nexport default buildMarTop;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarRight = (valMarRight: string, insertStyles = false) => {\r\n return buildAttr(valMarRight, 'marr', insertStyles);\r\n};\r\n\r\nexport default buildMarRight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarBottom = (valMarBottom: string, insertStyles = false) => {\r\n return buildAttr(valMarBottom, 'marb', insertStyles);\r\n};\r\n\r\nexport default buildMarBottom;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarLeft = (valMarLeft: string, insertStyles = false) => {\r\n return buildAttr(valMarLeft, 'marl', insertStyles);\r\n};\r\n\r\nexport default buildMarLeft;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMaxWidth = (valMaxWidth: string, insertStyles = false) => {\r\n return buildAttr(valMaxWidth, 'mxw', insertStyles);\r\n};\r\n\r\nexport default buildMaxWidth;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMaxHeight = (valMaxHeight: string, insertStyles = false) => {\r\n return buildAttr(valMaxHeight, 'mxh', insertStyles);\r\n};\r\n\r\nexport default buildMaxHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMinWidth = (valMinWidth: string, insertStyles = false) => {\r\n return buildAttr(valMinWidth, 'miw', insertStyles);\r\n};\r\n\r\nexport default buildMinWidth;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMinHeight = (valMinHeight: string, insertStyles = false) => {\r\n return buildAttr(valMinHeight, 'mih', insertStyles);\r\n};\r\n\r\nexport default buildMinHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildHeight = (valHeight: string, insertStyles = false) => {\r\n return buildAttr(valHeight, 'hgt', insertStyles);\r\n};\r\n\r\nexport default buildHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildWidth = (valWidth: string, insertStyles = false) => {\r\n return buildAttr(valWidth, 'wdh', insertStyles);\r\n};\r\n\r\nexport default buildWidth;\r\n","const positionProsAndValsBase = {\r\n st: {\r\n ruleCss: 'static',\r\n classPrefix: 'st',\r\n },\r\n ab: {\r\n ruleCss: 'absolute',\r\n classPrefix: 'ab',\r\n },\r\n fi: {\r\n ruleCss: 'fixed',\r\n classPrefix: 'fi',\r\n },\r\n re: {\r\n ruleCss: 'relative',\r\n classPrefix: 're',\r\n },\r\n si: {\r\n ruleCss: 'sticky',\r\n classPrefix: 'si',\r\n },\r\n in: {\r\n ruleCss: 'initial',\r\n classPrefix: 'in',\r\n },\r\n ih: {\r\n ruleCss: 'inherit',\r\n classPrefix: 'ih',\r\n },\r\n};\r\n\r\nexport const positionProsAndVals = {\r\n ...positionProsAndValsBase,\r\n static: positionProsAndValsBase.st,\r\n absolute: positionProsAndValsBase.ab,\r\n fixed: positionProsAndValsBase.fi,\r\n relative: positionProsAndValsBase.re,\r\n sticky: positionProsAndValsBase.si,\r\n initial: positionProsAndValsBase.in,\r\n inherit: positionProsAndValsBase.ih,\r\n};\r\n","import getConfig from '../config/main';\r\nimport { positionProsAndVals } from '../config/position';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport { IStyles } from '../helpers/createStyles';\r\nimport prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\n\r\nconst buildPosition = (\r\n valPos: string,\r\n insertStyles = false\r\n): IStyles | Error => {\r\n const bpCals: IBpCals = {};\r\n\r\n // Getting numbers\r\n let err: boolean | Error = false;\r\n const config = getConfig();\r\n const firstBp = Object.keys(config.breakpoints)[0];\r\n\r\n for (const param of valPos.split(' ')) {\r\n let propVal;\r\n const paramPrepared = prepareParam(param);\r\n const bpNames = paramPrepared.breakPoints;\r\n const nameProp = paramPrepared.numbers as keyof typeof positionProsAndVals;\r\n\r\n if (!positionProsAndVals[nameProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + nameProp + \"' in Position vault.\"\r\n );\r\n break;\r\n }\r\n\r\n propVal = positionProsAndVals[nameProp].ruleCss;\r\n const className = positionProsAndVals[nameProp].classPrefix;\r\n\r\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\r\n\r\n if (paramPrepared.important) {\r\n propVal += ' !important';\r\n sufixBp += '!';\r\n }\r\n\r\n bpCals[bpNames] = {\r\n name: className + sufixBp,\r\n value: propVal,\r\n };\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'pos',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildPosition;\r\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildTop = (val: string, insertStyles = false) => {\n return buildAttr(val, 't', insertStyles);\n};\n\nexport default buildTop;\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildRight = (val: string, insertStyles = false) => {\n return buildAttr(val, 'r', insertStyles);\n};\n\nexport default buildRight;\n","import buildAttr from '../helpers/buildAttr';\r\nimport { IStyles } from '../helpers/createStyles';\r\n\r\nconst buildBottom = (val: string, insertStyles = false): IStyles => {\r\n return buildAttr(val, 'b', insertStyles);\r\n};\r\n\r\nexport default buildBottom;\r\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildLeft = (val: string, insertStyles = false) => {\n return buildAttr(val, 'l', insertStyles);\n};\n\nexport default buildLeft;\n","const displayProsAndValsBase = {\n bl: {\n ruleCss: 'block',\n classPrefix: 'bl',\n },\n il: {\n ruleCss: 'inline',\n classPrefix: 'il',\n },\n ib: {\n ruleCss: 'inline-block',\n classPrefix: 'ib',\n },\n fx: {\n ruleCss: 'flex',\n classPrefix: 'fx',\n },\n if: {\n ruleCss: 'inline-flex',\n classPrefix: 'if',\n },\n no: {\n ruleCss: 'none',\n classPrefix: 'no',\n },\n in: {\n ruleCss: 'initial',\n classPrefix: 'in',\n },\n ih: {\n ruleCss: 'inherit',\n classPrefix: 'ih',\n },\n};\n\nexport const displayProsAndVals = {\n ...displayProsAndValsBase,\n block: displayProsAndValsBase.bl,\n inline: displayProsAndValsBase.il,\n 'inline-block': displayProsAndValsBase.ib,\n flex: displayProsAndValsBase.fx,\n 'inline-flex': displayProsAndValsBase.if,\n none: displayProsAndValsBase.no,\n initial: displayProsAndValsBase.in,\n inherit: displayProsAndValsBase.ih,\n};\n","import getConfig from '../config/main';\nimport { displayProsAndVals } from '../config/display';\n\nimport buildCss, { IBpCals } from '../helpers/buildCss';\nimport { IStyles } from '../helpers/createStyles';\nimport prepareParam from '../helpers/prepareParam';\nimport regError from '../helpers/regError';\n\nconst buildDisplay = (\n valDisplay: string,\n insertStyles = false\n): IStyles | Error => {\n const bpCals: IBpCals = {};\n\n // Getting numbers\n let err: boolean | Error = false;\n const config = getConfig();\n const firstBp = Object.keys(config.breakpoints)[0];\n\n for (const param of valDisplay.split(' ')) {\n let propVal;\n const paramPrepared = prepareParam(param);\n const bpNames = paramPrepared.breakPoints;\n const nameProp = paramPrepared.numbers as keyof typeof displayProsAndVals;\n\n if (!displayProsAndVals[nameProp]) {\n err = regError(\n 'Non-existent Alias',\n \"Don't exists the alias '\" + nameProp + \"' in display vault.\"\n );\n break;\n }\n\n propVal = displayProsAndVals[nameProp].ruleCss;\n const className = displayProsAndVals[nameProp].classPrefix;\n\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\n\n if (paramPrepared.important) {\n propVal += ' !important';\n sufixBp += '!';\n }\n\n bpCals[bpNames] = {\n name: className + sufixBp,\n value: propVal,\n };\n }\n\n if (err) return err;\n\n // Building the classNames and the styles to use.\n return buildCss({\n type: 'd',\n bps: bpCals,\n deep: insertStyles,\n });\n};\n\nexport default buildDisplay;\n","import { IStyles } from './createStyles';\n\nexport interface IBuildXY {\n values: string;\n builderA: (valPadA: string, insertStyles: boolean) => IStyles;\n builderB: (valPadB: string, insertStyles: boolean) => IStyles;\n insertStyles: boolean;\n}\n\nconst buildXY = (data: IBuildXY): IStyles => {\n const stylesA = data.builderA(data.values, data.insertStyles);\n const stylesB = data.builderB(data.values, data.insertStyles);\n const allStyles: IStyles = {};\n for (const style in stylesA) {\n allStyles[style] = stylesA[style];\n }\n for (const style in stylesB) {\n allStyles[style] = stylesB[style];\n }\n return allStyles;\n};\n\nexport default buildXY;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildPadLeft from './buildPadLeft';\nimport buildPadRight from './buildPadRight';\n\nconst buildPadX = (valPadX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valPadX,\n builderA: buildPadRight,\n builderB: buildPadLeft,\n insertStyles,\n });\n};\n\nexport default buildPadX;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildPadBottom from './buildPadBottom';\nimport buildPadTop from './buildPadTop';\n\nconst buildPadY = (valPadX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valPadX,\n builderA: buildPadTop,\n builderB: buildPadBottom,\n insertStyles,\n });\n};\n\nexport default buildPadY;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildMarLeft from './buildMarLeft';\nimport buildMarRight from './buildMarRight';\n\nconst buildMarX = (valMarX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valMarX,\n builderA: buildMarRight,\n builderB: buildMarLeft,\n insertStyles,\n });\n};\n\nexport default buildMarX;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildMarBottom from './buildMarBottom';\nimport buildMarTop from './buildMarTop';\n\nconst buildMarY = (valMarY: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valMarY,\n builderA: buildMarTop,\n builderB: buildMarBottom,\n insertStyles,\n });\n};\n\nexport default buildMarY;\n","import buildCols from '../methods/buildCols';\nimport buildFlex from '../methods/buildFlex';\nimport buildPad from '../methods/buildPad';\nimport buildPadTop from '../methods/buildPadTop';\nimport buildPadRight from '../methods/buildPadRight';\nimport buildPadBottom from '../methods/buildPadBottom';\nimport buildPadLeft from '../methods/buildPadLeft';\nimport buildMar from '../methods/buildMar';\nimport buildMarTop from '../methods/buildMarTop';\nimport buildMarRight from '../methods/buildMarRight';\nimport buildMarBottom from '../methods/buildMarBottom';\nimport buildMarLeft from '../methods/buildMarLeft';\nimport buildMaxWidth from '../methods/buildMaxWidth';\nimport buildMaxHeight from '../methods/buildMaxHeight';\nimport buildMinWidth from '../methods/buildMinWidth';\nimport buildMinHeight from '../methods/buildMinHeight';\nimport buildHeight from '../methods/buildHeight';\nimport buildWidth from '../methods/buildWidth';\nimport buildPosition from '../methods/buildPosition';\nimport buildTop from '../methods/buildTop';\nimport buildRight from '../methods/buildRight';\nimport buildBottom from '../methods/buildBottom';\nimport buildLeft from '../methods/buildLeft';\nimport buildDisplay from '../methods/buildDisplay';\nimport buildPadX from '../methods/buildPadX';\nimport buildPadY from '../methods/buildPadY';\nimport buildMarX from '../methods/buildMarX';\nimport buildMarY from '../methods/buildMarY';\n\nimport { IStyles } from '../helpers/createStyles';\n\ntype TDirectiveNameBase =\n | 'cols'\n | 'pad'\n | 'padt'\n | 'padr'\n | 'padb'\n | 'padl'\n | 'padx'\n | 'pady'\n | 'mar'\n | 'mart'\n | 'marr'\n | 'marb'\n | 'marl'\n | 'marx'\n | 'mary'\n | 'flex'\n | 'mxw'\n | 'mxh'\n | 'miw'\n | 'mih'\n | 'wdh'\n | 'hgt'\n | 'pos'\n | 't'\n | 'r'\n | 'b'\n | 'l'\n | 'd';\n\ntype TDirectiveNameExtended =\n | 'c'\n | 'fx'\n | 'p'\n | 'padding'\n | 'pt'\n | 'padding-top'\n | 'pr'\n | 'padding-right'\n | 'pb'\n | 'padding-bottom'\n | 'pl'\n | 'padding-left'\n | 'py'\n | 'padding-y'\n | 'px'\n | 'padding-x'\n | 'my'\n | 'margin-y'\n | 'mx'\n | 'margin-x'\n | 'm'\n | 'margin'\n | 'mt'\n | 'margin-top'\n | 'mr'\n | 'margin-right'\n | 'mb'\n | 'margin-bottom'\n | 'ml'\n | 'margin-left'\n | 'w'\n | 'width'\n | 'h'\n | 'height'\n | 'max-width'\n | 'max-height'\n | 'min-width'\n | 'min-height'\n | 'position'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'display';\n\nexport type TDirectiveName = TDirectiveNameBase | TDirectiveNameExtended;\n\nexport interface IProcessor {\n build: (values: string, insertStyles: boolean) => IStyles | Error;\n ruleCss: string | string[];\n classPrefix: string;\n}\n\nconst processorsBase: Record = {\n cols: {\n build: buildCols,\n ruleCss: 'width',\n classPrefix: 'c',\n },\n\n // Paddings\n pad: {\n build: buildPad,\n ruleCss: 'padding',\n classPrefix: 'p',\n },\n padt: {\n build: buildPadTop,\n ruleCss: 'padding-top',\n classPrefix: 'pt',\n },\n padr: {\n build: buildPadRight,\n ruleCss: 'padding-right',\n classPrefix: 'pr',\n },\n padb: {\n build: buildPadBottom,\n ruleCss: 'padding-bottom',\n classPrefix: 'pb',\n },\n padl: {\n build: buildPadLeft,\n ruleCss: 'padding-left',\n classPrefix: 'pl',\n },\n padx: {\n build: buildPadX,\n ruleCss: ['padding-left', 'padding-right'],\n classPrefix: 'px',\n },\n pady: {\n build: buildPadY,\n ruleCss: ['padding-top', 'padding-bottom'],\n classPrefix: 'py',\n },\n\n // Margin\n mar: {\n build: buildMar,\n ruleCss: 'margin',\n classPrefix: 'm',\n },\n mart: {\n build: buildMarTop,\n ruleCss: 'margin-top',\n classPrefix: 'mt',\n },\n marr: {\n build: buildMarRight,\n ruleCss: 'margin-right',\n classPrefix: 'mr',\n },\n marb: {\n build: buildMarBottom,\n ruleCss: 'margin-bottom',\n classPrefix: 'mb',\n },\n marl: {\n build: buildMarLeft,\n ruleCss: 'margin-left',\n classPrefix: 'ml',\n },\n marx: {\n build: buildMarX,\n ruleCss: ['margin-left', 'margin-right'],\n classPrefix: 'px',\n },\n mary: {\n build: buildMarY,\n ruleCss: ['margin-top', 'margin-bottom'],\n classPrefix: 'py',\n },\n\n // Flex Box\n flex: {\n build: buildFlex,\n ruleCss: 'display: flex',\n classPrefix: 'fx',\n },\n\n // Max & Min Width & Height\n mxw: {\n build: buildMaxWidth,\n ruleCss: 'max-width',\n classPrefix: 'mxw',\n },\n\n mxh: {\n build: buildMaxHeight,\n ruleCss: 'max-height',\n classPrefix: 'mxh',\n },\n\n miw: {\n build: buildMinWidth,\n ruleCss: 'min-width',\n classPrefix: 'miw',\n },\n\n mih: {\n build: buildMinHeight,\n ruleCss: 'min-height',\n classPrefix: 'mih',\n },\n\n // Width & Height\n wdh: {\n build: buildWidth,\n ruleCss: 'width',\n classPrefix: 'w',\n },\n\n hgt: {\n build: buildHeight,\n ruleCss: 'height',\n classPrefix: 'h',\n },\n\n // Position\n pos: {\n build: buildPosition,\n ruleCss: 'position',\n classPrefix: 'pos',\n },\n t: {\n build: buildTop,\n ruleCss: 'top',\n classPrefix: 't',\n },\n r: {\n build: buildRight,\n ruleCss: 'right',\n classPrefix: 'r',\n },\n b: {\n build: buildBottom,\n ruleCss: 'bottom',\n classPrefix: 'b',\n },\n l: {\n build: buildLeft,\n ruleCss: 'left',\n classPrefix: 'l',\n },\n d: {\n build: buildDisplay,\n ruleCss: 'display',\n classPrefix: 'd',\n },\n};\n\nexport const processors: Record = {\n ...processorsBase,\n c: processorsBase.cols,\n fx: processorsBase.flex,\n p: processorsBase.pad,\n padding: processorsBase.pad,\n pt: processorsBase.padt,\n 'padding-top': processorsBase.padt,\n pr: processorsBase.padr,\n 'padding-right': processorsBase.padr,\n pb: processorsBase.padb,\n 'padding-bottom': processorsBase.padb,\n pl: processorsBase.padl,\n 'padding-left': processorsBase.padl,\n py: processorsBase.pady,\n 'padding-y': processorsBase.pady,\n px: processorsBase.padx,\n 'padding-x': processorsBase.padx,\n m: processorsBase.mar,\n margin: processorsBase.mar,\n mt: processorsBase.mart,\n 'margin-top': processorsBase.mart,\n mr: processorsBase.marr,\n 'margin-right': processorsBase.marr,\n mb: processorsBase.marb,\n 'margin-bottom': processorsBase.marb,\n ml: processorsBase.marl,\n 'margin-left': processorsBase.marl,\n my: processorsBase.mary,\n 'margin-y': processorsBase.mary,\n mx: processorsBase.marx,\n 'margin-x': processorsBase.marx,\n w: processorsBase.wdh,\n width: processorsBase.wdh,\n h: processorsBase.hgt,\n height: processorsBase.hgt,\n 'max-width': processorsBase.mxw,\n 'max-height': processorsBase.mxh,\n 'min-width': processorsBase.miw,\n 'min-height': processorsBase.mih,\n position: processorsBase.pos,\n top: processorsBase.t,\n right: processorsBase.r,\n bottom: processorsBase.b,\n left: processorsBase.l,\n display: processorsBase.d,\n};\n","import { processors, TDirectiveName } from '../config/processors';\r\n\r\nconst getParameters = (\r\n Node: HTMLElement | Element\r\n): Partial> => {\r\n const params: Partial> = {};\r\n const attrs = Node.attributes;\r\n const paramNames = Object.keys(processors);\r\n Array.prototype.forEach.call(attrs, (attr) => {\r\n if (paramNames.includes(attr.name)) {\r\n if (attr.value !== '')\r\n params[attr.name as TDirectiveName] = attr.value\r\n .trim()\r\n .split(' ')\r\n .filter((item: string) => item)\r\n .join(' ');\r\n }\r\n });\r\n return params;\r\n};\r\n\r\nexport default getParameters;\r\n","import { processors, TDirectiveName } from '../config/processors';\nimport { IStyles } from '../helpers/createStyles';\n\nexport interface IBuildResult {\n [prop: string]: IStyles | boolean;\n}\n\nconst build = (\n obj: Partial>,\n insertStyles = false\n): Partial | Error => {\n const rObj: Partial = {};\n let err: Error | boolean = false;\n for (const prop in obj) {\n const propData = processors[prop as TDirectiveName];\n const objStyles: IStyles | Error = propData.build(\n obj[prop as TDirectiveName] as string,\n insertStyles\n );\n if (objStyles instanceof Error) {\n err = objStyles;\n break;\n } else {\n rObj[prop] = objStyles;\n }\n }\n\n if (err) return err;\n return rObj;\n};\n\nexport default build;\n","import getConfig from '../config/main';\n\nconst addClasses = (\n Node: HTMLElement | Element,\n classesNames: string,\n overwrite?: boolean\n): Promise => {\n return new Promise((resolve) => {\n const config = getConfig();\n const names = classesNames.split(' ');\n let classesToAdd: string[] = names;\n if (!overwrite) {\n classesToAdd = names.filter((name) => !Node.classList.contains(name));\n if (!classesToAdd.length) {\n resolve();\n return;\n }\n }\n\n const obsNode = new config.context.MutationObserver((mutations) => {\n const target = mutations[0].target;\n const currentClasses = (target as Element).className.split(' ');\n const containsAll = names.every((element) =>\n currentClasses.includes(element)\n );\n if (containsAll) {\n obsNode.disconnect();\n resolve();\n }\n });\n obsNode.observe(Node, {\n childList: false,\n subtree: false,\n attributes: true,\n attributeFilter: ['class'],\n characterData: false,\n });\n\n if (overwrite) {\n Node.className = classesNames;\n } else {\n const space = Node.hasAttribute('class') ? ' ' : '';\n Node.className += space + classesToAdd.join(' ');\n }\n });\n};\n\nexport default addClasses;\n","import getConfig from '../config/main';\n\nexport const removeProp = (\n Node: HTMLElement | Element,\n propName: string,\n context: Window & typeof globalThis\n): Promise => {\n return new Promise((resolve) => {\n if (!Node.hasAttribute(propName)) {\n resolve();\n return;\n }\n const obsNode = new context.MutationObserver(() => {\n obsNode.disconnect();\n resolve();\n });\n obsNode.observe(Node, {\n childList: false,\n subtree: false,\n attributes: true,\n attributeFilter: [propName],\n characterData: false,\n });\n Node.removeAttribute(propName);\n });\n};\n\nexport const removeProps = (\n Node: HTMLElement | Element,\n propNames: string[],\n context: Window & typeof globalThis\n): Promise => {\n return new Promise((resolve) => {\n const promises = propNames.map((name) => removeProp(Node, name, context));\n Promise.all(promises).then(() => resolve());\n });\n};\n\nconst removeAttr = (\n Node: HTMLElement | Element,\n propNames: string | string[]\n): Promise => {\n return new Promise((resolve) => {\n const config = getConfig();\n if (Array.isArray(propNames)) {\n removeProps(Node, propNames, config.context).then(resolve);\n } else {\n removeProp(Node, propNames, config.context).then(resolve);\n }\n });\n};\n\nexport default removeAttr;\n","import getConfig from '../config/main';\nimport addClasses from '../utils/addClasses';\nimport removeAttr from '../utils/removeAttr';\n\nexport interface IEventReady {\n node: HTMLElement | Element;\n directive: string | string[];\n classes: string;\n resolve: (value: void | Error | PromiseLike) => void;\n}\n\nconst eventReady = ({ node, directive, classes, resolve }: IEventReady) => {\n const config = getConfig();\n removeAttr(node, directive)\n .then(() => addClasses(node, classes))\n .then(() => {\n resolve();\n const event = new config.context.CustomEvent('layout:ready');\n node.dispatchEvent(event);\n });\n};\n\nexport default eventReady;\n","import { IStyles } from '../helpers/createStyles';\nimport regError from '../helpers/regError';\nimport build, { IBuildResult } from './build';\nimport getParameters from './getParameters';\nimport { TDirectiveName } from '../config/processors';\nimport eventReady from '../helpers/eventReady';\n\nconst set = (\n Node: HTMLElement | Element,\n parameters?: Partial>\n): Promise => {\n return new Promise((resolve, reject) => {\n const params = parameters || getParameters(Node);\n const arrParams = Object.keys(params);\n if (!arrParams.length) {\n const err = regError(\n 'Parameter Missing',\n \"don't exists any parameter to process\",\n Node\n );\n reject(err);\n return;\n }\n\n const toBuild: Partial> = {};\n for (const prop in params) {\n toBuild[prop as TDirectiveName] = params[prop as TDirectiveName];\n }\n\n // creating classes names and inserting that classes to the core\n const classesObj = build(toBuild as Record, true);\n if (classesObj instanceof Error) {\n reject(classesObj);\n return;\n }\n\n // adding classes\n const classes = classesObj as Partial;\n const classesNames = Object.keys(classes)\n .map((name: string) => Object.keys(classes[name] as IStyles))\n .flat()\n .join(' ');\n\n // removing unnecessary props\n eventReady({\n node: Node,\n directive: arrParams,\n classes: classesNames,\n resolve,\n });\n });\n};\n\nexport default set;\n","import regError from './regError';\n\nconst directiveValues = (\n Node: HTMLElement | Element,\n directives: string[]\n): string | Error => {\n const directiveValues = directives\n .map((item) => Node.getAttribute(item))\n .filter((item) => item)\n .join(' ');\n return !directiveValues\n ? regError(\n 'Empty',\n 'The value of the directives \"' + directives.join(', ') + '\" are empty',\n Node\n )\n : directiveValues;\n};\n\nexport default directiveValues;\n","import buildFlex from './buildFlex';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from '../helpers/directiveValues';\n\nconst setFlex = (\n Node: HTMLElement | Element,\n flexValues?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = flexValues || directiveValues(Node, ['flex', 'fx']);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = buildFlex(values as string, true);\n if (objStyles instanceof Error) {\n reject(objStyles);\n return;\n }\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive: 'flex',\n classes: Object.keys(objStyles).join(' '),\n resolve,\n });\n });\n};\n\nexport default setFlex;\n","import buildCols from './buildCols';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from '../helpers/directiveValues';\n\nconst setCols = (\n Node: HTMLElement | Element,\n columns?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = columns || directiveValues(Node, ['c', 'cols']);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = buildCols(values as string, true);\n if (objStyles instanceof Error) {\n reject(objStyles);\n return;\n }\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive: 'cols',\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setCols;\n","import buildAttr from '../helpers/buildAttr';\nimport { TDirectiveName } from '../config/processors';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from './directiveValues';\n\nconst setAttr = (\n Node: HTMLElement | Element,\n directives: TDirectiveName[],\n vals?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = vals || directiveValues(Node, directives);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const directive = directives[0];\n const objStyles = buildAttr(values as string, directive, true);\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive,\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setAttr;\n","import setAttr from '../helpers/setAttr';\n\nconst setHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['hgt', 'h'], values);\n};\n\nexport default setHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marb', 'mb', 'margin-bottom'], values);\n};\n\nexport default setMarBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marl', 'ml', 'margin-left'], values);\n};\n\nexport default setMarLeft;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marr', 'mr', 'margin-right'], values);\n};\n\nexport default setMarRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMar = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mar', 'm', 'margin'], values);\n};\n\nexport default setMar;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mart', 'mt', 'margin-top'], values);\n};\n\nexport default setMarTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setMaxWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mxw', 'max-width'], values);\n};\n\nexport default setMaxWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setMinHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mih', 'min-height'], values);\n};\n\nexport default setMinHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMinWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['miw', 'min-width'], values);\n};\n\nexport default setMinWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padb', 'pb', 'padding-bottom'], values);\n};\n\nexport default setPadBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padl', 'pl', 'padding-left'], values);\n};\n\nexport default setPadLeft;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padr', 'pr', 'padding-right'], values);\n};\n\nexport default setPadRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setPad = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['pad', 'p', 'padding'], values);\n};\n\nexport default setPad;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padt', 'pt', 'padding-top'], values);\n};\n\nexport default setPadTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['wdh', 'width'], values);\n};\n\nexport default setWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setMaxHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mxh', 'max-height'], values);\n};\n\nexport default setMaxHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setPosition = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['pos', 'position'], values);\n};\n\nexport default setPosition;\n","import setAttr from '../helpers/setAttr';\n\nconst setTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['t', 'top'], values);\n};\n\nexport default setTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['r', 'right'], values);\n};\n\nexport default setRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['b', 'bottom'], values);\n};\n\nexport default setBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['l', 'left'], values);\n};\n\nexport default setLeft;\n","import { IStyles } from './createStyles';\nimport directiveValues from './directiveValues';\nimport eventReady from './eventReady';\n\nexport interface ISetterXY {\n Node: HTMLElement | Element;\n directives: string[];\n builder: (valPadX: string, insertStyles: boolean) => IStyles;\n vals?: string;\n}\n\nconst setterXY = (data: ISetterXY): Promise => {\n return new Promise((resolve, reject) => {\n const values = data.vals || directiveValues(data.Node, data.directives);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = data.builder(values as string, true);\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: data.Node,\n directive: data.directives,\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setterXY;\n","import buildPadX from './buildPadX';\nimport setterXY from '../helpers/setterXY';\n\nconst setPadX = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['padx', 'px', 'padding-x'],\n builder: buildPadX,\n vals,\n });\n};\n\nexport default setPadX;\n","import buildPadY from './buildPadY';\nimport setterXY from '../helpers/setterXY';\n\nconst setPadY = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['pady', 'py', 'padding-y'],\n builder: buildPadY,\n vals,\n });\n};\n\nexport default setPadY;\n","import buildMarX from './buildMarX';\nimport setterXY from '../helpers/setterXY';\n\nconst setMarX = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['marx', 'mx', 'margin-x'],\n builder: buildMarX,\n vals,\n });\n};\n\nexport default setMarX;\n","import buildMarY from './buildMarY';\nimport setterXY from '../helpers/setterXY';\n\nconst setMarY = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['mary', 'my', 'margin-y'],\n builder: buildMarY,\n vals,\n });\n};\n\nexport default setMarY;\n","import { TDirectiveName } from './../config/processors';\r\nimport { processors } from '../config/processors';\r\nimport addClasses from '../utils/addClasses';\r\nimport removeAttr from '../utils/removeAttr';\r\n\r\nconst reset = (Node: HTMLElement | Element): Promise => {\r\n return new Promise((resolve) => {\r\n const classPrefixes = new Set(\r\n Object.keys(processors).map(\r\n (item) => processors[item as TDirectiveName].classPrefix\r\n )\r\n );\r\n const layouterClasses = [...classPrefixes];\r\n const restClass = Node.className.split(' ').filter((name) => {\r\n if (!name.includes('-')) {\r\n return true;\r\n } else {\r\n const findClass = layouterClasses.find((item) => {\r\n const nLength = item.length;\r\n const namePrefix = name.substring(0, nLength + 1);\r\n return namePrefix === item + '-';\r\n });\r\n return !findClass;\r\n }\r\n });\r\n\r\n if (restClass.length) {\r\n const classesName = restClass.join(' ');\r\n addClasses(Node, classesName, true).then(() => {\r\n resolve();\r\n });\r\n } else {\r\n removeAttr(Node, 'class').then(() => {\r\n resolve();\r\n });\r\n }\r\n });\r\n};\r\n\r\nexport default reset;\r\n","import { ILayouter } from './../layouter';\nimport { processors } from '../config/processors';\n\nconst nodesNotAccepted = [\n 'animate',\n 'animateMotion',\n 'animateTransform',\n 'circle',\n 'clipPath',\n 'defs',\n 'desc',\n 'discard',\n 'ellipse',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'filter',\n 'foreignObject',\n 'g',\n 'hatch',\n 'hatchpath',\n 'image',\n 'line',\n 'linearGradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialGradient',\n 'rect',\n 'set',\n 'stop',\n 'style',\n 'svg',\n 'switch',\n 'symbol',\n 'text',\n 'textPath',\n 'title',\n 'tspan',\n 'use',\n 'view',\n];\n\nconst searchAndProcess = (\n layouter: ILayouter,\n context: Document | HTMLElement | Element\n) => {\n return new Promise((resolve) => {\n const props = Object.keys(processors);\n const attrs = props.map((prop) => `[${prop}]`).join(', ');\n const nodes = context.querySelectorAll(attrs);\n if (!nodes.length) {\n resolve(layouter);\n return;\n }\n\n const setNodes = new Set();\n Array.prototype.filter\n .call(\n nodes,\n (itemNode) =>\n !nodesNotAccepted.includes(itemNode.nodeName.toLowerCase())\n )\n .forEach((item) => setNodes.add(item));\n const promises: Promise[] = [];\n setNodes.forEach((node) => {\n promises.push(layouter.set(node as Element | HTMLElement));\n });\n Promise.all(promises).then(resolve);\n });\n};\n\nexport default searchAndProcess;\n","import { ILayouter } from './../layouter';\nimport { processors } from '../config/processors';\nimport getConfig from '../config/main';\nimport searchAndProcess from './searchAndProcess';\n\nconst mainObserver = (layouter: ILayouter) => {\n const config = getConfig();\n const props = Object.keys(processors);\n const obsBody = new layouter.context.MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type === 'childList') {\n if (!mutation.addedNodes.length) {\n continue;\n }\n mutation.addedNodes.forEach((node) => {\n if (node instanceof HTMLElement) {\n const props = layouter.getParameters(node);\n if (Object.keys(props).length) {\n layouter.set(node, props);\n }\n searchAndProcess(layouter, node);\n }\n });\n } else if (mutation.type === 'attributes') {\n const node = mutation.target;\n if (node instanceof HTMLElement) {\n const props = layouter.getParameters(node);\n if (Object.keys(props).length) {\n layouter.set(node, props);\n }\n }\n }\n }\n });\n const observerOptions = {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: props,\n characterData: false,\n };\n obsBody.observe(config.context.document.body, observerOptions);\n};\n\nexport default mainObserver;\n","import { IConfig, IConfigUser, setConfig, updateConfig } from './config/main';\nimport getParameters from './methods/getParameters';\n\nimport build from './methods/build';\nimport buildCols from './methods/buildCols';\nimport buildFlex from './methods/buildFlex';\nimport buildPad from './methods/buildPad';\nimport buildPadTop from './methods/buildPadTop';\nimport buildPadRight from './methods/buildPadRight';\nimport buildPadBottom from './methods/buildPadBottom';\nimport buildPadLeft from './methods/buildPadLeft';\nimport buildMar from './methods/buildMar';\nimport buildMarTop from './methods/buildMarTop';\nimport buildMarRight from './methods/buildMarRight';\nimport buildMarBottom from './methods/buildMarBottom';\nimport buildMarLeft from './methods/buildMarLeft';\nimport buildMaxWidth from './methods/buildMaxWidth';\nimport buildMaxHeight from './methods/buildMaxHeight';\nimport buildMinWidth from './methods/buildMinWidth';\nimport buildMinHeight from './methods/buildMinHeight';\nimport buildHeight from './methods/buildHeight';\nimport buildWidth from './methods/buildWidth';\nimport buildPosition from './methods/buildPosition';\nimport buildTop from './methods/buildTop';\nimport buildRight from './methods/buildRight';\nimport buildBottom from './methods/buildBottom';\nimport buildLeft from './methods/buildLeft';\nimport buildPadX from './methods/buildPadX';\nimport buildPadY from './methods/buildPadY';\nimport buildMarX from './methods/buildMarX';\nimport buildMarY from './methods/buildMarY';\n\nimport set from './methods/set';\nimport setFlex from './methods/setFlex';\nimport setCols from './methods/SetCols';\nimport setHeight from './methods/setHeight';\nimport setMarBottom from './methods/setMarBottom';\nimport setMarLeft from './methods/setMarLeft';\nimport setMarRight from './methods/setMarRight';\nimport setMar from './methods/setMar';\nimport setMarTop from './methods/setMarTop';\nimport setMaxWidth from './methods/setMaxWidth';\nimport setMinHeight from './methods/setMinHeight';\nimport setMinWidth from './methods/setMinWidth';\nimport setPadBottom from './methods/setPadBottom';\nimport setPadLeft from './methods/setPadLeft';\nimport setPadRight from './methods/setPadRight';\nimport setPad from './methods/setPad';\nimport setPadTop from './methods/setPadTop';\nimport setWidth from './methods/setWidth';\nimport setMaxHeight from './methods/setMaxHeight';\nimport setPosition from './methods/setPosition';\nimport setTop from './methods/setTop';\nimport setRight from './methods/setRight';\nimport setBottom from './methods/setBottom';\nimport setLeft from './methods/setLeft';\nimport setPadX from './methods/setPadX';\nimport setPadY from './methods/setPadY';\nimport setMarX from './methods/setMarX';\nimport setMarY from './methods/setMarY';\n\nimport insertRules from './methods/insertRules';\nimport reset from './methods/reset';\n\nimport { IStyles } from './helpers/createStyles';\nimport { IBuildResult } from './methods/build';\nimport searchAndProcess from './helpers/searchAndProcess';\nimport mainObserver from './helpers/mainObserver';\nimport { TDirectiveName, processors, IProcessor } from './config/processors';\n\nexport interface ILayouter extends IConfig {\n getParameters: (\n Node: HTMLElement | Element\n ) => Partial>;\n updateConfig: (userConfig: Partial>) => IConfig;\n build: (\n obj: Partial>,\n insertStyles?: boolean\n ) => Partial | Error;\n buildCols: (valCols: string, insertStyles?: boolean) => IStyles | Error;\n buildFlex: (valFlex: string, insertStyles?: boolean) => IStyles | Error;\n buildPad: (valPads: string, insertStyles?: boolean) => IStyles;\n buildPadTop: (valPadTop: string, insertStyles?: boolean) => IStyles;\n buildPadRight: (valPadRight: string, insertStyles?: boolean) => IStyles;\n buildPadBottom: (valPadBottom: string, insertStyles?: boolean) => IStyles;\n buildPadLeft: (valPadLeft: string, insertStyles?: boolean) => IStyles;\n buildPadX: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildPadY: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMar: (valMars: string, insertStyles?: boolean) => IStyles;\n buildMarTop: (valMarTop: string, insertStyles?: boolean) => IStyles;\n buildMarRight: (valMarRight: string, insertStyles?: boolean) => IStyles;\n buildMarBottom: (valMarBottom: string, insertStyles?: boolean) => IStyles;\n buildMarLeft: (valMarLeft: string, insertStyles?: boolean) => IStyles;\n buildMarX: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMarY: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMaxWidth: (valMaxWidth: string, insertStyles?: boolean) => IStyles;\n buildMaxHeight: (valMaxHeight: string, insertStyles?: boolean) => IStyles;\n buildMinWidth: (valMinWidth: string, insertStyles?: boolean) => IStyles;\n buildMinHeight: (valMinHeight: string, insertStyles?: boolean) => IStyles;\n buildHeight: (valHeight: string, insertStyles?: boolean) => IStyles;\n buildWidth: (valWidth: string, insertStyles?: boolean) => IStyles;\n buildPosition: (\n valPosition: string,\n insertStyles?: boolean\n ) => IStyles | Error;\n buildTop: (valTop: string, insertStyles?: boolean) => IStyles | Error;\n buildRight: (valRight: string, insertStyles?: boolean) => IStyles | Error;\n buildBottom: (valBottom: string, insertStyles?: boolean) => IStyles | Error;\n buildLeft: (valLeft: string, insertStyles?: boolean) => IStyles | Error;\n\n set: (\n Node: HTMLElement | Element,\n parameters?: Partial>\n ) => Promise;\n setCols: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setFlex: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMar: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarX: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarY: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPad: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadX: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadY: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n setWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMinWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMaxWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMinHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMaxHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPosition: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n setTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n processors: Record;\n\n insertRules: (objStyles: IStyles) => void;\n reset: (Node: HTMLElement | Element) => Promise;\n version: string;\n}\n\ndeclare global {\n interface Window {\n layouter: ILayouter;\n }\n}\n\nconst layouter = (\n context: Window & typeof globalThis,\n userConfig: Partial = {}\n): ILayouter => {\n const config = setConfig(context, userConfig);\n\n const instance = {\n ...config,\n getParameters,\n updateConfig,\n insertRules,\n build,\n buildCols,\n buildFlex,\n buildPad,\n buildPadTop,\n buildPadRight,\n buildPadBottom,\n buildPadLeft,\n buildPadX,\n buildPadY,\n buildMar,\n buildMarTop,\n buildMarRight,\n buildMarBottom,\n buildMarLeft,\n buildMarX,\n buildMarY,\n buildMaxWidth,\n buildMaxHeight,\n buildMinWidth,\n buildMinHeight,\n buildHeight,\n buildWidth,\n set,\n setCols,\n setFlex,\n setMar,\n setMarTop,\n setMarRight,\n setMarBottom,\n setMarLeft,\n setMarX,\n setMarY,\n setPad,\n setPadTop,\n setPadRight,\n setPadBottom,\n setPadLeft,\n setPadX,\n setPadY,\n setWidth,\n setMinWidth,\n setMaxWidth,\n setHeight,\n setMinHeight,\n setMaxHeight,\n buildPosition,\n buildTop,\n buildRight,\n buildBottom,\n buildLeft,\n setPosition,\n setTop,\n setRight,\n setBottom,\n setLeft,\n reset,\n processors,\n };\n\n // Auto init process\n if (config.searchOnInit) {\n searchAndProcess(instance, context.document).then(() => {\n if (instance.ready) instance.ready(instance);\n if (config.observer) mainObserver(instance);\n });\n } else {\n if (config.observer) mainObserver(instance);\n if (instance.ready) instance.ready(instance);\n }\n\n return instance;\n};\n\nif (typeof window !== 'undefined' && typeof exports === 'undefined') {\n window.layouter = layouter(window);\n}\n\nexport type { TDirectiveName, IProcessor } from './config/processors';\nexport type { IConfigUser } from './config/main';\nexport default layouter;\n"],"names":["config"],"mappings":"AAkBA,MAAM,kBAAkB,CACtB,QACA,aACmB;AACnB,QAAM,QAAwB,CAAA;AAE9B,MAAI,aAAa,SAAS;AACxB,WAAO,KAAK,MAAM,EACf,IAAI,CAAC,OAAe;AACZ,aAAA;AAAA,QACL,OAAO;AAAA,QACP,OAAO,OAAO,IAAI;AAAA,MAAA;AAAA,IACpB,CACD,EACA,KAAK,CAAC,GAAgB,MACrB,EAAE,QAAQ,EAAE,QAAQ,IAAI,EAAE,QAAQ,EAAE,QAAQ,KAAK,CACnD,EACC,QAAQ,CAAC,IAAiB,UAAkB;AAC3C,YAAM,GAAG,SAAS,CAAC,QAAQ,IAAI,OAAO,GAAG,OAAO;AAAA,IAAA,CACjD;AAAA,EAAA,OACE;AACL,WAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,OAAO;AAC5B,YAAA,MAAM,OAAO,IAAI;AAAA,IAAA,CACxB;AAAA,EACH;AAEO,SAAA;AACT;ACzBA,MAAM,oBAAoB,CAAC;AAAA,EACzB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAC6C;AAC7C,MAAI,cAAc,QAAQ,SAAS,eAAe,cAAc,EAAE;AAClE,MAAI,CAAC,aAAa;AACF,kBAAA,QAAQ,SAAS,cAAc,OAAO;AACpD,gBAAY,YAAY,QAAQ,SAAS,eAAe,EAAE,CAAC;AAC3D,UA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KAAK,MAAM;AACtD,UAAI,SAAS;AAAO,iBAAS,MAAM,QAAQ;AAC3C,UAAI,QAAO;AAAU,qBAAa,QAAQ;AAAA,IAAA,CAC3C;AAAA,EAAA,OACI;AACL,QAAI,QAAO;AAAU,mBAAa,QAAQ;AAC1C,QAAI,SAAS;AAAO,eAAS,MAAM,QAAQ;AAAA,EAC7C;AAEO,SAAA;AACT;AAEA,IAAI,OAAO,WAAW,eAAe,OAAO,YAAY,aAAa;AAC5D,SAAA,WAAW,SAAS,MAAM;AACnC;;"} \ No newline at end of file diff --git a/dist/layouter.umd.js b/dist/layouter.umd.js index 7c16780..4504eed 100644 --- a/dist/layouter.umd.js +++ b/dist/layouter.umd.js @@ -1,2 +1,2 @@ -(function(B,j){typeof exports=="object"&&typeof module!="undefined"?module.exports=j():typeof define=="function"&&define.amd?define(j):(B=typeof globalThis!="undefined"?globalThis:B||self,B.Layouter=j())})(this,function(){"use strict";const B=(e,s)=>{const r={};return s==="width"?Object.keys(e).map(t=>({alias:t,width:e[t].width})).sort((t,i)=>t.width>i.width?1:i.width>t.width?-1:0).forEach((t,i)=>{r[t.alias]=i?e[t.alias][s]:0}):Object.keys(e).forEach(t=>{r[t]=e[t][s]}),r},j=({bridge:e,bp:s,insertionType:r,node:t,context:i})=>{let n=i.document.getElementById("layouter-"+s);if(!n){n=i.document.createElement("style"),n.appendChild(i.document.createTextNode(""));const l=t.parentNode;switch(r){case"before":l.insertBefore(n,t);break;case"after":t.nextSibling?l.insertBefore(n,t.nextSibling):l.appendChild(n);break;case"append":t.appendChild(n);break}n.id="layouter-"+s}let o;return e?o={method:n.sheet,node:n}:o={method:{insertRule:l=>{n.appendChild(i.document.createTextNode(l))},rules:[]},node:n},o},Ae=({breakpoints:e,bridge:s,scope:r,context:t})=>{const i=r||{};return Object.keys(e).forEach(n=>{i[n]||(i[n]=j({bridge:s,bp:n,insertionType:"append",node:t.document.body,context:t}))}),i},Oe=(e,s)=>{const r={};return Object.keys(s).forEach(t=>r[t]=e[t]),r},Me="1.9.0";let S={prefix:"",breakpoints:{xs:{width:360,cols:15},sm:{width:600,cols:25},md:{width:900,cols:31},lg:{width:1200,cols:41},xlg:{width:1536,cols:51}},bridge:!0,debug:!0,searchOnInit:!0,observer:!0},x;const ee=({bps:e,bridge:s,scope:r,context:t})=>{const i=B(e,"width"),n=Oe(e,i);return{sizes:i,cols:B(e,"cols"),scope:Ae({breakpoints:n,bridge:s,scope:r,context:t}),breakpoints:n}},Be=(e,s={})=>{const r=e.layouterConfig||{};return S={...S,...s,...r},x={context:e,...S,...ee({bps:S.breakpoints,bridge:S.bridge,context:e}),styles:{},version:Me},x},g=()=>x,Se=(e,s)=>{x.styles[e]=s},Ee=e=>(x={...x,...e},e.breakpoints&&(x={...x,...ee({bps:x.breakpoints,bridge:x.bridge,scope:x.scope,context:x.context})}),x),E=e=>{let s,r=e,t=!1;const i=r.includes("@");if(i){const n=r.split("@");r=n[0],s=n[1]}else{const n=g();s=Object.keys(n.breakpoints)[0]}return e.includes("!")&&(t=!0,s=s.replace(/!/g,""),r=r.replace(/!/g,"")),{widthBp:i,numbers:r,breakPoints:s,important:t}},A=(e,s,r)=>{const t=new Error;return t.name=e,t.message=s,g().debug&&(console.error(t),r&&console.log(r)),t},se=(e,s)=>{const r=e*100/s;return(r-Math.floor(r)!==0?r.toFixed(3):r)+"%"},Te=e=>{const s=e.replace(/!/g,""),r=s.indexOf("@"),t=g(),i=t.scope,n=t.bridge,o=t.context;if(r===-1){const u=Object.keys(t.breakpoints)[0];return i[u]}const l=s.substring(r+1);if(!l.includes("-"))return i[l];if(l.substring(0,1)==="-"){if(i[l])return i[l];const u=l.substring(1);return i[l]=j({bridge:n,bp:l,insertionType:"before",node:i[u].node,context:o}),i[l]}if(i[l])return i[l];const a=l.split("-")[0];return i[l]=j({bridge:n,bp:l,insertionType:"after",node:i[a].node,context:o}),i[l]},te=e=>{const s=g();for(const r in e)if(!s.styles[r]){const t=Te(r),i=e[r],n=t.method.rules;t.method.insertRule(i,n?n.length:0),Se(r,i)}},p={jc:{ruleCss:"justify-content",classPrefix:"jc"},ai:{ruleCss:"align-items",classPrefix:"ai"},ce:{ruleCss:"center",classPrefix:"ce"},fs:{ruleCss:"flex-start",classPrefix:"fs"},fe:{ruleCss:"flex-end",classPrefix:"fe"},sb:{ruleCss:"space-between",classPrefix:"sb"},sa:{ruleCss:"space-around",classPrefix:"sa"},fw:{ruleCss:"flex-wrap",classPrefix:"fw"},nw:{ruleCss:"nowrap",classPrefix:"nw"},w:{ruleCss:"wrap",classPrefix:"w"},wr:{ruleCss:"wrap-reverse",classPrefix:"wr"},fd:{ruleCss:"flex-direction",classPrefix:"fd"},r:{ruleCss:"row",classPrefix:"r"},rr:{ruleCss:"row-reverse",classPrefix:"rr"},co:{ruleCss:"column",classPrefix:"co"},cor:{ruleCss:"column-reverse",classPrefix:"co"},au:{ruleCss:"auto",classPrefix:"au"},st:{ruleCss:"stretch",classPrefix:"st"},bl:{ruleCss:"baseline",classPrefix:"bl"},in:{ruleCss:"initial",classPrefix:"in"},ih:{ruleCss:"inherit",classPrefix:"ih"}},T={fg:{ruleCss:"flex-grow",classPrefix:"fg"},fh:{ruleCss:"flex-shrink",classPrefix:"fh"},as:{ruleCss:"align-self",classPrefix:"as"},or:{ruleCss:"order",classPrefix:"or"}},re={...T,"flex-grow":T.fg,"flex-shrink":T.fh,"align-self":T.as,order:T.or},O={...p,...re,"justify-content":p.jc,"align-items":p.ai,center:p.ce,"flex-start":p.fs,"flex-end":p.fe,"space-between":p.sb,"space-around":p.fs,"flex-wrap":p.fw,nowrap:p.nw,w:p.w,"wrap-reverse":p.wr,"flex-direction":p.fd,row:p.r,"row-reverse":p.rr,column:p.co,"column-reverse":p.cor,auto:p.au,stretch:p.st,baseline:p.bl,initial:p.in,inherit:p.ih},ie=Object.keys(re),Le=e=>"0\xAF"+e.replace("%",""),Ne=(e,s)=>{const r=g(),t=r.sizes,i=r.prefix,n=C[e].ruleCss,o={};return Object.keys(s).forEach(l=>{const a=s[l].name;let u=a;if(a.includes("%")&&(u=a.replace(a,Le(a))),u=(i?i+"-":"")+C[e].classPrefix+"-"+u.replace(/\//g,"\\/").replace(/:/g,"\\:").replace("@","\\@").split(".").join("_"),r.styles[u])o[u]=r.styles[u];else{let h;if(e==="flex"){h=s[l].value;const v=a.includes("!")?";display:flex !important;":";display:flex;",P=ie.filter(M=>a.includes(M+":"));P.length?P.length+1!==a.split(":").length&&(h+=v):h+=v}else h=n+":"+s[l].value;let f="@media screen and ",w=!1;if(!l.includes("-"))t[l]?f+="(min-width: "+t[l]+"px)":(f="."+u.replace(/!/g,"\\!")+"{"+h+"}",w=!0);else{const v=l.split("-"),P=v[0];P&&(f+="(min-width: "+t[P]+"px) and ");const M=v[1];f+="(max-width: "+(t[M]-1)+"px)"}w||(f+="{."+u.replace(/!/g,"\\!")+"{"+h+"}}"),o[u]=f}}),o},Fe=[["/",""],["\\","/"],["/:",":"],["\\:",":"],["\\@","@"],["/@","@"]],De=e=>{const s={};for(const r in e){let t=r;Fe.forEach(i=>{t=t.split(i[0]).join(i[1])}),s[t]=e[r]}return s},L=e=>{const s=Ne(e.type,e.bps);return e.deep&&te(s),De(s)},R=(e,s=!1)=>{let r,t;const i={},n=g();let o,l,a;const u=Object.keys(n.breakpoints)[0];let d=!1;for(const h of e.split(" ")){let f=h;if(o=f,a=E(f),t=a.breakPoints,f=a.numbers,f.includes("/")){const w=f.split("/");r=[Number(w[0]),Number(w[1])]}else if(a.widthBp)if(t.includes("-")){d=A("SyntaxError","You can't determine a 'until breakpoint' when use the explicit columns max: "+e);break}else r=[Number(f),n.cols[t]];else r=[Number(f),n.cols[u]];l=se(r[0],r[1]),a.important&&(l+=" !important"),i[t]={name:o,value:l}}return d||L({type:"cols",bps:i,deep:s})},H=(e,s=!1)=>{const r={};let t=!1;const i=g(),n=Object.keys(i.breakpoints)[0];for(const o of e.split(" ")){let l;const a=E(o),u=a.breakPoints,d=a.numbers.split(":"),h=d[0],f=d[1];let w;if(ie.includes(h))l=O[h].ruleCss+":"+f,w=f;else{if(!O[h]){t=A("Non-existent Alias","Don't exists the alias '"+h+"' in Flex vault.");break}if(!O[f]){t=A("Non-existent Alias","Don't exists the alias '"+f+"' in Flex vault.");break}l=O[h].ruleCss+":"+O[f].ruleCss,w=O[f].classPrefix}let v=u===n?"":"@"+u;a.important&&(l+=" !important",v+="!");let P=O[h].classPrefix+":"+w+v;if(!r[u])r[u]={name:P,value:l};else{P.includes("@")&&(P=P.split("@")[0]);let M=r[u].name.split("@")[0];r[u].name.includes("!")&&!M.includes("!")&&(M+="!"),r[u].name=M+"-"+P+v,r[u].value+=";"+l}}return t||L({type:"flex",bps:r,deep:s})},Ve=["%","rem","em","ex","vw","vh","pt","cm","pc"],Re=e=>{let s;return e.includes("/")?(s=e.split("/"),s=se(parseFloat(s[0]),parseFloat(s[1]))):e==="auto"?s="auto":Ve.filter(t=>e.includes(t)).length?s=e:s=e==="0"?e:e+"px",s},m=(e,s,r=!1)=>{const t={};return e.split(" ").forEach(i=>{const n=E(i),o=n.breakPoints;let l=n.numbers.split("-").map(a=>Re(a)).join(" ");n.important&&(l+=" !important"),t[o]={name:i,value:l}}),L({type:s,bps:t,deep:r})},ne=(e,s=!1)=>m(e,"pad",s),I=(e,s=!1)=>m(e,"padt",s),Y=(e,s=!1)=>m(e,"padr",s),W=(e,s=!1)=>m(e,"padb",s),X=(e,s=!1)=>m(e,"padl",s),le=(e,s=!1)=>m(e,"mar",s),z=(e,s=!1)=>m(e,"mart",s),G=(e,s=!1)=>m(e,"marr",s),U=(e,s=!1)=>m(e,"marb",s),q=(e,s=!1)=>m(e,"marl",s),ae=(e,s=!1)=>m(e,"mxw",s),oe=(e,s=!1)=>m(e,"mxh",s),ce=(e,s=!1)=>m(e,"miw",s),ue=(e,s=!1)=>m(e,"mih",s),fe=(e,s=!1)=>m(e,"hgt",s),de=(e,s=!1)=>m(e,"wdh",s),k={st:{ruleCss:"static",classPrefix:"st"},ab:{ruleCss:"absolute",classPrefix:"ab"},fi:{ruleCss:"fixed",classPrefix:"fi"},re:{ruleCss:"relative",classPrefix:"re"},si:{ruleCss:"sticky",classPrefix:"si"},in:{ruleCss:"initial",classPrefix:"in"},ih:{ruleCss:"inherit",classPrefix:"ih"}},_={...k,static:k.st,absolute:k.ab,fixed:k.fi,relative:k.re,sticky:k.si,initial:k.in,inherit:k.ih},pe=(e,s=!1)=>{const r={};let t=!1;const i=g(),n=Object.keys(i.breakpoints)[0];for(const o of e.split(" ")){let l;const a=E(o),u=a.breakPoints,d=a.numbers;if(!_[d]){t=A("Non-existent Alias","Don't exists the alias '"+d+"' in Position vault.");break}l=_[d].ruleCss;const h=_[d].classPrefix;let f=u===n?"":"@"+u;a.important&&(l+=" !important",f+="!"),r[u]={name:h+f,value:l}}return t||L({type:"pos",bps:r,deep:s})},me=(e,s=!1)=>m(e,"t",s),be=(e,s=!1)=>m(e,"r",s),he=(e,s=!1)=>m(e,"b",s),xe=(e,s=!1)=>m(e,"l",s),y={bl:{ruleCss:"block",classPrefix:"bl"},il:{ruleCss:"inline",classPrefix:"il"},ib:{ruleCss:"inline-block",classPrefix:"ib"},fx:{ruleCss:"flex",classPrefix:"fx"},if:{ruleCss:"inline-flex",classPrefix:"if"},no:{ruleCss:"none",classPrefix:"no"},in:{ruleCss:"initial",classPrefix:"in"},ih:{ruleCss:"inherit",classPrefix:"ih"}},$={...y,block:y.bl,inline:y.il,"inline-block":y.ib,flex:y.fx,"inline-flex":y.if,none:y.no,initial:y.in,inherit:y.ih},He=(e,s=!1)=>{const r={};let t=!1;const i=g(),n=Object.keys(i.breakpoints)[0];for(const o of e.split(" ")){let l;const a=E(o),u=a.breakPoints,d=a.numbers;if(!$[d]){t=A("Non-existent Alias","Don't exists the alias '"+d+"' in display vault.");break}l=$[d].ruleCss;const h=$[d].classPrefix;let f=u===n?"":"@"+u;a.important&&(l+=" !important",f+="!"),r[u]={name:h+f,value:l}}return t||L({type:"d",bps:r,deep:s})},F=e=>{const s=e.builderA(e.values,e.insertStyles),r=e.builderB(e.values,e.insertStyles),t={};for(const i in s)t[i]=s[i];for(const i in r)t[i]=r[i];return t},J=(e,s=!1)=>F({values:e,builderA:Y,builderB:X,insertStyles:s}),K=(e,s=!1)=>F({values:e,builderA:I,builderB:W,insertStyles:s}),Q=(e,s=!1)=>F({values:e,builderA:G,builderB:q,insertStyles:s}),Z=(e,s=!1)=>F({values:e,builderA:z,builderB:U,insertStyles:s}),c={cols:{build:R,ruleCss:"width",classPrefix:"c"},pad:{build:ne,ruleCss:"padding",classPrefix:"p"},padt:{build:I,ruleCss:"padding-top",classPrefix:"pt"},padr:{build:Y,ruleCss:"padding-right",classPrefix:"pr"},padb:{build:W,ruleCss:"padding-bottom",classPrefix:"pb"},padl:{build:X,ruleCss:"padding-left",classPrefix:"pl"},padx:{build:J,ruleCss:["padding-left","padding-right"],classPrefix:"px"},pady:{build:K,ruleCss:["padding-top","padding-bottom"],classPrefix:"py"},mar:{build:le,ruleCss:"margin",classPrefix:"m"},mart:{build:z,ruleCss:"margin-top",classPrefix:"mt"},marr:{build:G,ruleCss:"margin-right",classPrefix:"mr"},marb:{build:U,ruleCss:"margin-bottom",classPrefix:"mb"},marl:{build:q,ruleCss:"margin-left",classPrefix:"ml"},marx:{build:Q,ruleCss:["margin-left","margin-right"],classPrefix:"px"},mary:{build:Z,ruleCss:["margin-top","margin-bottom"],classPrefix:"py"},flex:{build:H,ruleCss:"display: flex",classPrefix:"fx"},mxw:{build:ae,ruleCss:"max-width",classPrefix:"mxw"},mxh:{build:oe,ruleCss:"max-height",classPrefix:"mxh"},miw:{build:ce,ruleCss:"min-width",classPrefix:"miw"},mih:{build:ue,ruleCss:"min-height",classPrefix:"mih"},wdh:{build:de,ruleCss:"width",classPrefix:"w"},hgt:{build:fe,ruleCss:"height",classPrefix:"h"},pos:{build:pe,ruleCss:"position",classPrefix:"pos"},t:{build:me,ruleCss:"top",classPrefix:"t"},r:{build:be,ruleCss:"right",classPrefix:"r"},b:{build:he,ruleCss:"bottom",classPrefix:"b"},l:{build:xe,ruleCss:"left",classPrefix:"l"},d:{build:He,ruleCss:"display",classPrefix:"d"}},C={...c,c:c.cols,fx:c.flex,p:c.pad,padding:c.pad,pt:c.padt,"padding-top":c.padt,pr:c.padr,"padding-right":c.padr,pb:c.padb,"padding-bottom":c.padb,pl:c.padl,"padding-left":c.padl,py:c.pady,"padding-y":c.pady,px:c.padx,"padding-x":c.padx,m:c.mar,margin:c.mar,mt:c.mart,"margin-top":c.mart,mr:c.marr,"margin-right":c.marr,mb:c.marb,"margin-bottom":c.marb,ml:c.marl,"margin-left":c.marl,my:c.mary,"margin-y":c.mary,mx:c.marx,"margin-x":c.marx,w:c.wdh,width:c.wdh,h:c.hgt,height:c.hgt,"max-width":c.mxw,"max-height":c.mxh,"min-width":c.miw,"min-height":c.mih,position:c.pos,top:c.t,right:c.r,bottom:c.b,left:c.l,display:c.d},ge=e=>{const s={},r=e.attributes,t=Object.keys(C);return Array.prototype.forEach.call(r,i=>{t.includes(i.name)&&i.value!==""&&(s[i.name]=i.value.trim().split(" ").filter(n=>n).join(" "))}),s},Pe=(e,s=!1)=>{const r={};let t=!1;for(const i in e){const o=C[i].build(e[i],s);if(o instanceof Error){t=o;break}else r[i]=o}return t||r},ye=(e,s,r)=>new Promise(t=>{const i=g(),n=s.split(" ");let o=n;if(!r&&(o=n.filter(a=>!e.classList.contains(a)),!o.length)){t();return}const l=new i.context.MutationObserver(a=>{const d=a[0].target.className.split(" ");n.every(f=>d.includes(f))&&(l.disconnect(),t())});if(l.observe(e,{childList:!1,subtree:!1,attributes:!0,attributeFilter:["class"],characterData:!1}),r)e.className=s;else{const a=e.hasAttribute("class")?" ":"";e.className+=a+o.join(" ")}}),Ce=(e,s,r)=>new Promise(t=>{if(!e.hasAttribute(s)){t();return}const i=new r.MutationObserver(()=>{i.disconnect(),t()});i.observe(e,{childList:!1,subtree:!1,attributes:!0,attributeFilter:[s],characterData:!1}),e.removeAttribute(s)}),Ie=(e,s,r)=>new Promise(t=>{const i=s.map(n=>Ce(e,n,r));Promise.all(i).then(()=>t())}),we=(e,s)=>new Promise(r=>{const t=g();Array.isArray(s)?Ie(e,s,t.context).then(r):Ce(e,s,t.context).then(r)}),N=({node:e,directive:s,classes:r,resolve:t})=>{const i=g();we(e,s).then(()=>ye(e,r)).then(()=>{t();const n=new i.context.CustomEvent("layout:ready");e.dispatchEvent(n)})},Ye=(e,s)=>new Promise((r,t)=>{const i=s||ge(e),n=Object.keys(i);if(!n.length){const d=A("Parameter Missing","don't exists any parameter to process",e);t(d);return}const o={};for(const d in i)o[d]=i[d];const l=Pe(o,!0);if(l instanceof Error){t(l);return}const a=l,u=Object.keys(a).map(d=>Object.keys(a[d])).flat().join(" ");N({node:e,directive:n,classes:u,resolve:r})}),D=(e,s)=>{const r=s.map(t=>e.getAttribute(t)).filter(t=>t).join(" ");return r||A("Empty",'The value of the directives "'+s.join(", ")+'" are empty',e)},We=(e,s)=>new Promise((r,t)=>{const i=s||D(e,["flex","fx"]);if(!i)return t(i);const n=H(i,!0);if(n instanceof Error){t(n);return}N({node:e,directive:"flex",classes:Object.keys(n).join(" "),resolve:r})}),Xe=(e,s)=>new Promise((r,t)=>{const i=s||D(e,["c","cols"]);if(!i)return t(i);const n=R(i,!0);if(n instanceof Error){t(n);return}const o=Object.keys(n).join(" ");N({node:e,directive:"cols",classes:o,resolve:r})}),b=(e,s,r)=>new Promise((t,i)=>{const n=r||D(e,s);if(!n)return i(n);const o=s[0],l=m(n,o,!0),a=Object.keys(l).join(" ");N({node:e,directive:o,classes:a,resolve:t})}),ze=(e,s)=>b(e,["hgt","h"],s),Ge=(e,s)=>b(e,["marb","mb","margin-bottom"],s),Ue=(e,s)=>b(e,["marl","ml","margin-left"],s),qe=(e,s)=>b(e,["marr","mr","margin-right"],s),_e=(e,s)=>b(e,["mar","m","margin"],s),$e=(e,s)=>b(e,["mart","mt","margin-top"],s),Je=(e,s)=>b(e,["mxw","max-width"],s),Ke=(e,s)=>b(e,["mih","min-height"],s),Qe=(e,s)=>b(e,["miw","min-width"],s),Ze=(e,s)=>b(e,["padb","pb","padding-bottom"],s),es=(e,s)=>b(e,["padl","pl","padding-left"],s),ss=(e,s)=>b(e,["padr","pr","padding-right"],s),ts=(e,s)=>b(e,["pad","p","padding"],s),rs=(e,s)=>b(e,["padt","pt","padding-top"],s),is=(e,s)=>b(e,["wdh","width"],s),ns=(e,s)=>b(e,["mxh","max-height"],s),ls=(e,s)=>b(e,["pos","position"],s),as=(e,s)=>b(e,["t","top"],s),os=(e,s)=>b(e,["r","right"],s),cs=(e,s)=>b(e,["b","bottom"],s),us=(e,s)=>b(e,["l","left"],s),V=e=>new Promise((s,r)=>{const t=e.vals||D(e.Node,e.directives);if(!t)return r(t);const i=e.builder(t,!0),n=Object.keys(i).join(" ");N({node:e.Node,directive:e.directives,classes:n,resolve:s})}),fs=(e,s)=>V({Node:e,directives:["padx","px","padding-x"],builder:J,vals:s}),ds=(e,s)=>V({Node:e,directives:["pady","py","padding-y"],builder:K,vals:s}),ps=(e,s)=>V({Node:e,directives:["marx","px","margin-x"],builder:Q,vals:s}),ms=(e,s)=>V({Node:e,directives:["mary","py","margin-y"],builder:Z,vals:s}),bs=e=>new Promise(s=>{const t=[...new Set(Object.keys(C).map(n=>C[n].classPrefix))],i=e.className.split(" ").filter(n=>n.includes("-")?!t.find(l=>{const a=l.length;return n.substring(0,a+1)===l+"-"}):!0);if(i.length){const n=i.join(" ");ye(e,n,!0).then(()=>{s()})}else we(e,"class").then(()=>{s()})}),hs=["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","style","svg","switch","symbol","text","textPath","title","tspan","use","view"],ve=(e,s)=>new Promise(r=>{const i=Object.keys(C).map(a=>`[${a}]`).join(", "),n=s.querySelectorAll(i);if(!n.length){r(e);return}const o=new Set;Array.prototype.filter.call(n,a=>!hs.includes(a.nodeName.toLowerCase())).forEach(a=>o.add(a));const l=[];o.forEach(a=>{l.push(e.set(a))}),Promise.all(l).then(r)}),ke=e=>{const s=g(),r=Object.keys(C),t=new e.context.MutationObserver(n=>{for(const o of n)if(o.type==="childList"){if(!o.addedNodes.length)continue;o.addedNodes.forEach(l=>{if(l instanceof HTMLElement){const a=e.getParameters(l);Object.keys(a).length&&e.set(l,a),ve(e,l)}})}else if(o.type==="attributes"){const l=o.target;if(l instanceof HTMLElement){const a=e.getParameters(l);Object.keys(a).length&&e.set(l,a)}}}),i={childList:!0,subtree:!0,attributes:!0,attributeFilter:r,characterData:!1};t.observe(s.context.document.body,i)},je=(e,s={})=>{const r=Be(e,s),t={...r,getParameters:ge,updateConfig:Ee,insertRules:te,build:Pe,buildCols:R,buildFlex:H,buildPad:ne,buildPadTop:I,buildPadRight:Y,buildPadBottom:W,buildPadLeft:X,buildPadX:J,buildPadY:K,buildMar:le,buildMarTop:z,buildMarRight:G,buildMarBottom:U,buildMarLeft:q,buildMarX:Q,buildMarY:Z,buildMaxWidth:ae,buildMaxHeight:oe,buildMinWidth:ce,buildMinHeight:ue,buildHeight:fe,buildWidth:de,set:Ye,setCols:Xe,setFlex:We,setMar:_e,setMarTop:$e,setMarRight:qe,setMarBottom:Ge,setMarLeft:Ue,setMarX:ps,setMarY:ms,setPad:ts,setPadTop:rs,setPadRight:ss,setPadBottom:Ze,setPadLeft:es,setPadX:fs,setPadY:ds,setWidth:is,setMinWidth:Qe,setMaxWidth:Je,setHeight:ze,setMinHeight:Ke,setMaxHeight:ns,buildPosition:pe,buildTop:me,buildRight:be,buildBottom:he,buildLeft:xe,setPosition:ls,setTop:as,setRight:os,setBottom:cs,setLeft:us,reset:bs,processors:C};return r.searchOnInit?ve(t,e.document).then(()=>{t.ready&&t.ready(t),r.observer&&ke(t)}):(r.observer&&ke(t),t.ready&&t.ready(t)),t};return typeof window!="undefined"&&typeof exports=="undefined"&&(window.layouter=je(window)),je}); +(function(B,j){typeof exports=="object"&&typeof module!="undefined"?module.exports=j():typeof define=="function"&&define.amd?define(j):(B=typeof globalThis!="undefined"?globalThis:B||self,B.Layouter=j())})(this,function(){"use strict";const B=(e,s)=>{const r={};return s==="width"?Object.keys(e).map(t=>({alias:t,width:e[t].width})).sort((t,i)=>t.width>i.width?1:i.width>t.width?-1:0).forEach((t,i)=>{r[t.alias]=i?e[t.alias][s]:0}):Object.keys(e).forEach(t=>{r[t]=e[t][s]}),r},j=({bridge:e,bp:s,insertionType:r,node:t,context:i})=>{let n=i.document.getElementById("layouter-"+s);if(!n){n=i.document.createElement("style"),n.appendChild(i.document.createTextNode(""));const l=t.parentNode;switch(r){case"before":l.insertBefore(n,t);break;case"after":t.nextSibling?l.insertBefore(n,t.nextSibling):l.appendChild(n);break;case"append":t.appendChild(n);break}n.id="layouter-"+s}let o;return e?o={method:n.sheet,node:n}:o={method:{insertRule:l=>{n.appendChild(i.document.createTextNode(l))},rules:[]},node:n},o},Ae=({breakpoints:e,bridge:s,scope:r,context:t})=>{const i=r||{};return Object.keys(e).forEach(n=>{i[n]||(i[n]=j({bridge:s,bp:n,insertionType:"append",node:t.document.body,context:t}))}),i},Oe=(e,s)=>{const r={};return Object.keys(s).forEach(t=>r[t]=e[t]),r},Me="1.9.1";let S={prefix:"",breakpoints:{xs:{width:360,cols:15},sm:{width:600,cols:25},md:{width:900,cols:31},lg:{width:1200,cols:41},xlg:{width:1536,cols:51}},bridge:!0,debug:!0,searchOnInit:!0,observer:!0},x;const ee=({bps:e,bridge:s,scope:r,context:t})=>{const i=B(e,"width"),n=Oe(e,i);return{sizes:i,cols:B(e,"cols"),scope:Ae({breakpoints:n,bridge:s,scope:r,context:t}),breakpoints:n}},Be=(e,s={})=>{const r=e.layouterConfig||{};return S={...S,...s,...r},x={context:e,...S,...ee({bps:S.breakpoints,bridge:S.bridge,context:e}),styles:{},version:Me},x},g=()=>x,Se=(e,s)=>{x.styles[e]=s},Ee=e=>(x={...x,...e},e.breakpoints&&(x={...x,...ee({bps:x.breakpoints,bridge:x.bridge,scope:x.scope,context:x.context})}),x),E=e=>{let s,r=e,t=!1;const i=r.includes("@");if(i){const n=r.split("@");r=n[0],s=n[1]}else{const n=g();s=Object.keys(n.breakpoints)[0]}return e.includes("!")&&(t=!0,s=s.replace(/!/g,""),r=r.replace(/!/g,"")),{widthBp:i,numbers:r,breakPoints:s,important:t}},A=(e,s,r)=>{const t=new Error;return t.name=e,t.message=s,g().debug&&(console.error(t),r&&console.log(r)),t},se=(e,s)=>{const r=e*100/s;return(r-Math.floor(r)!==0?r.toFixed(3):r)+"%"},Te=e=>{const s=e.replace(/!/g,""),r=s.indexOf("@"),t=g(),i=t.scope,n=t.bridge,o=t.context;if(r===-1){const u=Object.keys(t.breakpoints)[0];return i[u]}const l=s.substring(r+1);if(!l.includes("-"))return i[l];if(l.substring(0,1)==="-"){if(i[l])return i[l];const u=l.substring(1);return i[l]=j({bridge:n,bp:l,insertionType:"before",node:i[u].node,context:o}),i[l]}if(i[l])return i[l];const a=l.split("-")[0];return i[l]=j({bridge:n,bp:l,insertionType:"after",node:i[a].node,context:o}),i[l]},te=e=>{const s=g();for(const r in e)if(!s.styles[r]){const t=Te(r),i=e[r],n=t.method.rules;t.method.insertRule(i,n?n.length:0),Se(r,i)}},p={jc:{ruleCss:"justify-content",classPrefix:"jc"},ai:{ruleCss:"align-items",classPrefix:"ai"},ce:{ruleCss:"center",classPrefix:"ce"},fs:{ruleCss:"flex-start",classPrefix:"fs"},fe:{ruleCss:"flex-end",classPrefix:"fe"},sb:{ruleCss:"space-between",classPrefix:"sb"},sa:{ruleCss:"space-around",classPrefix:"sa"},fw:{ruleCss:"flex-wrap",classPrefix:"fw"},nw:{ruleCss:"nowrap",classPrefix:"nw"},w:{ruleCss:"wrap",classPrefix:"w"},wr:{ruleCss:"wrap-reverse",classPrefix:"wr"},fd:{ruleCss:"flex-direction",classPrefix:"fd"},r:{ruleCss:"row",classPrefix:"r"},rr:{ruleCss:"row-reverse",classPrefix:"rr"},co:{ruleCss:"column",classPrefix:"co"},cor:{ruleCss:"column-reverse",classPrefix:"co"},au:{ruleCss:"auto",classPrefix:"au"},st:{ruleCss:"stretch",classPrefix:"st"},bl:{ruleCss:"baseline",classPrefix:"bl"},in:{ruleCss:"initial",classPrefix:"in"},ih:{ruleCss:"inherit",classPrefix:"ih"}},T={fg:{ruleCss:"flex-grow",classPrefix:"fg"},fh:{ruleCss:"flex-shrink",classPrefix:"fh"},as:{ruleCss:"align-self",classPrefix:"as"},or:{ruleCss:"order",classPrefix:"or"}},re={...T,"flex-grow":T.fg,"flex-shrink":T.fh,"align-self":T.as,order:T.or},O={...p,...re,"justify-content":p.jc,"align-items":p.ai,center:p.ce,"flex-start":p.fs,"flex-end":p.fe,"space-between":p.sb,"space-around":p.fs,"flex-wrap":p.fw,nowrap:p.nw,w:p.w,"wrap-reverse":p.wr,"flex-direction":p.fd,row:p.r,"row-reverse":p.rr,column:p.co,"column-reverse":p.cor,auto:p.au,stretch:p.st,baseline:p.bl,initial:p.in,inherit:p.ih},ie=Object.keys(re),Le=e=>"0\xAF"+e.replace("%",""),Ne=(e,s)=>{const r=g(),t=r.sizes,i=r.prefix,n=C[e].ruleCss,o={};return Object.keys(s).forEach(l=>{const a=s[l].name;let u=a;if(a.includes("%")&&(u=a.replace(a,Le(a))),u=(i?i+"-":"")+C[e].classPrefix+"-"+u.replace(/\//g,"\\/").replace(/:/g,"\\:").replace("@","\\@").split(".").join("_"),r.styles[u])o[u]=r.styles[u];else{let h;if(e==="flex"){h=s[l].value;const v=a.includes("!")?";display:flex !important;":";display:flex;",P=ie.filter(M=>a.includes(M+":"));P.length?P.length+1!==a.split(":").length&&(h+=v):h+=v}else h=n+":"+s[l].value;let f="@media screen and ",w=!1;if(!l.includes("-"))t[l]?f+="(min-width: "+t[l]+"px)":(f="."+u.replace(/!/g,"\\!")+"{"+h+"}",w=!0);else{const v=l.split("-"),P=v[0];P&&(f+="(min-width: "+t[P]+"px) and ");const M=v[1];f+="(max-width: "+(t[M]-1)+"px)"}w||(f+="{."+u.replace(/!/g,"\\!")+"{"+h+"}}"),o[u]=f}}),o},Fe=[["/",""],["\\","/"],["/:",":"],["\\:",":"],["\\@","@"],["/@","@"]],De=e=>{const s={};for(const r in e){let t=r;Fe.forEach(i=>{t=t.split(i[0]).join(i[1])}),s[t]=e[r]}return s},L=e=>{const s=Ne(e.type,e.bps);return e.deep&&te(s),De(s)},R=(e,s=!1)=>{let r,t;const i={},n=g();let o,l,a;const u=Object.keys(n.breakpoints)[0];let d=!1;for(const h of e.split(" ")){let f=h;if(o=f,a=E(f),t=a.breakPoints,f=a.numbers,f.includes("/")){const w=f.split("/");r=[Number(w[0]),Number(w[1])]}else if(a.widthBp)if(t.includes("-")){d=A("SyntaxError","You can't determine a 'until breakpoint' when use the explicit columns max: "+e);break}else r=[Number(f),n.cols[t]];else r=[Number(f),n.cols[u]];l=se(r[0],r[1]),a.important&&(l+=" !important"),i[t]={name:o,value:l}}return d||L({type:"cols",bps:i,deep:s})},H=(e,s=!1)=>{const r={};let t=!1;const i=g(),n=Object.keys(i.breakpoints)[0];for(const o of e.split(" ")){let l;const a=E(o),u=a.breakPoints,d=a.numbers.split(":"),h=d[0],f=d[1];let w;if(ie.includes(h))l=O[h].ruleCss+":"+f,w=f;else{if(!O[h]){t=A("Non-existent Alias","Don't exists the alias '"+h+"' in Flex vault.");break}if(!O[f]){t=A("Non-existent Alias","Don't exists the alias '"+f+"' in Flex vault.");break}l=O[h].ruleCss+":"+O[f].ruleCss,w=O[f].classPrefix}let v=u===n?"":"@"+u;a.important&&(l+=" !important",v+="!");let P=O[h].classPrefix+":"+w+v;if(!r[u])r[u]={name:P,value:l};else{P.includes("@")&&(P=P.split("@")[0]);let M=r[u].name.split("@")[0];r[u].name.includes("!")&&!M.includes("!")&&(M+="!"),r[u].name=M+"-"+P+v,r[u].value+=";"+l}}return t||L({type:"flex",bps:r,deep:s})},Ve=["%","rem","em","ex","vw","vh","pt","cm","pc"],Re=e=>{let s;return e.includes("/")?(s=e.split("/"),s=se(parseFloat(s[0]),parseFloat(s[1]))):e==="auto"?s="auto":Ve.filter(t=>e.includes(t)).length?s=e:s=e==="0"?e:e+"px",s},m=(e,s,r=!1)=>{const t={};return e.split(" ").forEach(i=>{const n=E(i),o=n.breakPoints;let l=n.numbers.split("-").map(a=>Re(a)).join(" ");n.important&&(l+=" !important"),t[o]={name:i,value:l}}),L({type:s,bps:t,deep:r})},ne=(e,s=!1)=>m(e,"pad",s),I=(e,s=!1)=>m(e,"padt",s),Y=(e,s=!1)=>m(e,"padr",s),W=(e,s=!1)=>m(e,"padb",s),X=(e,s=!1)=>m(e,"padl",s),le=(e,s=!1)=>m(e,"mar",s),z=(e,s=!1)=>m(e,"mart",s),G=(e,s=!1)=>m(e,"marr",s),U=(e,s=!1)=>m(e,"marb",s),q=(e,s=!1)=>m(e,"marl",s),ae=(e,s=!1)=>m(e,"mxw",s),oe=(e,s=!1)=>m(e,"mxh",s),ce=(e,s=!1)=>m(e,"miw",s),ue=(e,s=!1)=>m(e,"mih",s),fe=(e,s=!1)=>m(e,"hgt",s),de=(e,s=!1)=>m(e,"wdh",s),k={st:{ruleCss:"static",classPrefix:"st"},ab:{ruleCss:"absolute",classPrefix:"ab"},fi:{ruleCss:"fixed",classPrefix:"fi"},re:{ruleCss:"relative",classPrefix:"re"},si:{ruleCss:"sticky",classPrefix:"si"},in:{ruleCss:"initial",classPrefix:"in"},ih:{ruleCss:"inherit",classPrefix:"ih"}},_={...k,static:k.st,absolute:k.ab,fixed:k.fi,relative:k.re,sticky:k.si,initial:k.in,inherit:k.ih},pe=(e,s=!1)=>{const r={};let t=!1;const i=g(),n=Object.keys(i.breakpoints)[0];for(const o of e.split(" ")){let l;const a=E(o),u=a.breakPoints,d=a.numbers;if(!_[d]){t=A("Non-existent Alias","Don't exists the alias '"+d+"' in Position vault.");break}l=_[d].ruleCss;const h=_[d].classPrefix;let f=u===n?"":"@"+u;a.important&&(l+=" !important",f+="!"),r[u]={name:h+f,value:l}}return t||L({type:"pos",bps:r,deep:s})},me=(e,s=!1)=>m(e,"t",s),be=(e,s=!1)=>m(e,"r",s),he=(e,s=!1)=>m(e,"b",s),xe=(e,s=!1)=>m(e,"l",s),y={bl:{ruleCss:"block",classPrefix:"bl"},il:{ruleCss:"inline",classPrefix:"il"},ib:{ruleCss:"inline-block",classPrefix:"ib"},fx:{ruleCss:"flex",classPrefix:"fx"},if:{ruleCss:"inline-flex",classPrefix:"if"},no:{ruleCss:"none",classPrefix:"no"},in:{ruleCss:"initial",classPrefix:"in"},ih:{ruleCss:"inherit",classPrefix:"ih"}},$={...y,block:y.bl,inline:y.il,"inline-block":y.ib,flex:y.fx,"inline-flex":y.if,none:y.no,initial:y.in,inherit:y.ih},He=(e,s=!1)=>{const r={};let t=!1;const i=g(),n=Object.keys(i.breakpoints)[0];for(const o of e.split(" ")){let l;const a=E(o),u=a.breakPoints,d=a.numbers;if(!$[d]){t=A("Non-existent Alias","Don't exists the alias '"+d+"' in display vault.");break}l=$[d].ruleCss;const h=$[d].classPrefix;let f=u===n?"":"@"+u;a.important&&(l+=" !important",f+="!"),r[u]={name:h+f,value:l}}return t||L({type:"d",bps:r,deep:s})},F=e=>{const s=e.builderA(e.values,e.insertStyles),r=e.builderB(e.values,e.insertStyles),t={};for(const i in s)t[i]=s[i];for(const i in r)t[i]=r[i];return t},J=(e,s=!1)=>F({values:e,builderA:Y,builderB:X,insertStyles:s}),K=(e,s=!1)=>F({values:e,builderA:I,builderB:W,insertStyles:s}),Q=(e,s=!1)=>F({values:e,builderA:G,builderB:q,insertStyles:s}),Z=(e,s=!1)=>F({values:e,builderA:z,builderB:U,insertStyles:s}),c={cols:{build:R,ruleCss:"width",classPrefix:"c"},pad:{build:ne,ruleCss:"padding",classPrefix:"p"},padt:{build:I,ruleCss:"padding-top",classPrefix:"pt"},padr:{build:Y,ruleCss:"padding-right",classPrefix:"pr"},padb:{build:W,ruleCss:"padding-bottom",classPrefix:"pb"},padl:{build:X,ruleCss:"padding-left",classPrefix:"pl"},padx:{build:J,ruleCss:["padding-left","padding-right"],classPrefix:"px"},pady:{build:K,ruleCss:["padding-top","padding-bottom"],classPrefix:"py"},mar:{build:le,ruleCss:"margin",classPrefix:"m"},mart:{build:z,ruleCss:"margin-top",classPrefix:"mt"},marr:{build:G,ruleCss:"margin-right",classPrefix:"mr"},marb:{build:U,ruleCss:"margin-bottom",classPrefix:"mb"},marl:{build:q,ruleCss:"margin-left",classPrefix:"ml"},marx:{build:Q,ruleCss:["margin-left","margin-right"],classPrefix:"px"},mary:{build:Z,ruleCss:["margin-top","margin-bottom"],classPrefix:"py"},flex:{build:H,ruleCss:"display: flex",classPrefix:"fx"},mxw:{build:ae,ruleCss:"max-width",classPrefix:"mxw"},mxh:{build:oe,ruleCss:"max-height",classPrefix:"mxh"},miw:{build:ce,ruleCss:"min-width",classPrefix:"miw"},mih:{build:ue,ruleCss:"min-height",classPrefix:"mih"},wdh:{build:de,ruleCss:"width",classPrefix:"w"},hgt:{build:fe,ruleCss:"height",classPrefix:"h"},pos:{build:pe,ruleCss:"position",classPrefix:"pos"},t:{build:me,ruleCss:"top",classPrefix:"t"},r:{build:be,ruleCss:"right",classPrefix:"r"},b:{build:he,ruleCss:"bottom",classPrefix:"b"},l:{build:xe,ruleCss:"left",classPrefix:"l"},d:{build:He,ruleCss:"display",classPrefix:"d"}},C={...c,c:c.cols,fx:c.flex,p:c.pad,padding:c.pad,pt:c.padt,"padding-top":c.padt,pr:c.padr,"padding-right":c.padr,pb:c.padb,"padding-bottom":c.padb,pl:c.padl,"padding-left":c.padl,py:c.pady,"padding-y":c.pady,px:c.padx,"padding-x":c.padx,m:c.mar,margin:c.mar,mt:c.mart,"margin-top":c.mart,mr:c.marr,"margin-right":c.marr,mb:c.marb,"margin-bottom":c.marb,ml:c.marl,"margin-left":c.marl,my:c.mary,"margin-y":c.mary,mx:c.marx,"margin-x":c.marx,w:c.wdh,width:c.wdh,h:c.hgt,height:c.hgt,"max-width":c.mxw,"max-height":c.mxh,"min-width":c.miw,"min-height":c.mih,position:c.pos,top:c.t,right:c.r,bottom:c.b,left:c.l,display:c.d},ge=e=>{const s={},r=e.attributes,t=Object.keys(C);return Array.prototype.forEach.call(r,i=>{t.includes(i.name)&&i.value!==""&&(s[i.name]=i.value.trim().split(" ").filter(n=>n).join(" "))}),s},Pe=(e,s=!1)=>{const r={};let t=!1;for(const i in e){const o=C[i].build(e[i],s);if(o instanceof Error){t=o;break}else r[i]=o}return t||r},ye=(e,s,r)=>new Promise(t=>{const i=g(),n=s.split(" ");let o=n;if(!r&&(o=n.filter(a=>!e.classList.contains(a)),!o.length)){t();return}const l=new i.context.MutationObserver(a=>{const d=a[0].target.className.split(" ");n.every(f=>d.includes(f))&&(l.disconnect(),t())});if(l.observe(e,{childList:!1,subtree:!1,attributes:!0,attributeFilter:["class"],characterData:!1}),r)e.className=s;else{const a=e.hasAttribute("class")?" ":"";e.className+=a+o.join(" ")}}),Ce=(e,s,r)=>new Promise(t=>{if(!e.hasAttribute(s)){t();return}const i=new r.MutationObserver(()=>{i.disconnect(),t()});i.observe(e,{childList:!1,subtree:!1,attributes:!0,attributeFilter:[s],characterData:!1}),e.removeAttribute(s)}),Ie=(e,s,r)=>new Promise(t=>{const i=s.map(n=>Ce(e,n,r));Promise.all(i).then(()=>t())}),we=(e,s)=>new Promise(r=>{const t=g();Array.isArray(s)?Ie(e,s,t.context).then(r):Ce(e,s,t.context).then(r)}),N=({node:e,directive:s,classes:r,resolve:t})=>{const i=g();we(e,s).then(()=>ye(e,r)).then(()=>{t();const n=new i.context.CustomEvent("layout:ready");e.dispatchEvent(n)})},Ye=(e,s)=>new Promise((r,t)=>{const i=s||ge(e),n=Object.keys(i);if(!n.length){const d=A("Parameter Missing","don't exists any parameter to process",e);t(d);return}const o={};for(const d in i)o[d]=i[d];const l=Pe(o,!0);if(l instanceof Error){t(l);return}const a=l,u=Object.keys(a).map(d=>Object.keys(a[d])).flat().join(" ");N({node:e,directive:n,classes:u,resolve:r})}),D=(e,s)=>{const r=s.map(t=>e.getAttribute(t)).filter(t=>t).join(" ");return r||A("Empty",'The value of the directives "'+s.join(", ")+'" are empty',e)},We=(e,s)=>new Promise((r,t)=>{const i=s||D(e,["flex","fx"]);if(!i)return t(i);const n=H(i,!0);if(n instanceof Error){t(n);return}N({node:e,directive:"flex",classes:Object.keys(n).join(" "),resolve:r})}),Xe=(e,s)=>new Promise((r,t)=>{const i=s||D(e,["c","cols"]);if(!i)return t(i);const n=R(i,!0);if(n instanceof Error){t(n);return}const o=Object.keys(n).join(" ");N({node:e,directive:"cols",classes:o,resolve:r})}),b=(e,s,r)=>new Promise((t,i)=>{const n=r||D(e,s);if(!n)return i(n);const o=s[0],l=m(n,o,!0),a=Object.keys(l).join(" ");N({node:e,directive:o,classes:a,resolve:t})}),ze=(e,s)=>b(e,["hgt","h"],s),Ge=(e,s)=>b(e,["marb","mb","margin-bottom"],s),Ue=(e,s)=>b(e,["marl","ml","margin-left"],s),qe=(e,s)=>b(e,["marr","mr","margin-right"],s),_e=(e,s)=>b(e,["mar","m","margin"],s),$e=(e,s)=>b(e,["mart","mt","margin-top"],s),Je=(e,s)=>b(e,["mxw","max-width"],s),Ke=(e,s)=>b(e,["mih","min-height"],s),Qe=(e,s)=>b(e,["miw","min-width"],s),Ze=(e,s)=>b(e,["padb","pb","padding-bottom"],s),es=(e,s)=>b(e,["padl","pl","padding-left"],s),ss=(e,s)=>b(e,["padr","pr","padding-right"],s),ts=(e,s)=>b(e,["pad","p","padding"],s),rs=(e,s)=>b(e,["padt","pt","padding-top"],s),is=(e,s)=>b(e,["wdh","width"],s),ns=(e,s)=>b(e,["mxh","max-height"],s),ls=(e,s)=>b(e,["pos","position"],s),as=(e,s)=>b(e,["t","top"],s),os=(e,s)=>b(e,["r","right"],s),cs=(e,s)=>b(e,["b","bottom"],s),us=(e,s)=>b(e,["l","left"],s),V=e=>new Promise((s,r)=>{const t=e.vals||D(e.Node,e.directives);if(!t)return r(t);const i=e.builder(t,!0),n=Object.keys(i).join(" ");N({node:e.Node,directive:e.directives,classes:n,resolve:s})}),fs=(e,s)=>V({Node:e,directives:["padx","px","padding-x"],builder:J,vals:s}),ds=(e,s)=>V({Node:e,directives:["pady","py","padding-y"],builder:K,vals:s}),ps=(e,s)=>V({Node:e,directives:["marx","mx","margin-x"],builder:Q,vals:s}),ms=(e,s)=>V({Node:e,directives:["mary","my","margin-y"],builder:Z,vals:s}),bs=e=>new Promise(s=>{const t=[...new Set(Object.keys(C).map(n=>C[n].classPrefix))],i=e.className.split(" ").filter(n=>n.includes("-")?!t.find(l=>{const a=l.length;return n.substring(0,a+1)===l+"-"}):!0);if(i.length){const n=i.join(" ");ye(e,n,!0).then(()=>{s()})}else we(e,"class").then(()=>{s()})}),hs=["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","style","svg","switch","symbol","text","textPath","title","tspan","use","view"],ve=(e,s)=>new Promise(r=>{const i=Object.keys(C).map(a=>`[${a}]`).join(", "),n=s.querySelectorAll(i);if(!n.length){r(e);return}const o=new Set;Array.prototype.filter.call(n,a=>!hs.includes(a.nodeName.toLowerCase())).forEach(a=>o.add(a));const l=[];o.forEach(a=>{l.push(e.set(a))}),Promise.all(l).then(r)}),ke=e=>{const s=g(),r=Object.keys(C),t=new e.context.MutationObserver(n=>{for(const o of n)if(o.type==="childList"){if(!o.addedNodes.length)continue;o.addedNodes.forEach(l=>{if(l instanceof HTMLElement){const a=e.getParameters(l);Object.keys(a).length&&e.set(l,a),ve(e,l)}})}else if(o.type==="attributes"){const l=o.target;if(l instanceof HTMLElement){const a=e.getParameters(l);Object.keys(a).length&&e.set(l,a)}}}),i={childList:!0,subtree:!0,attributes:!0,attributeFilter:r,characterData:!1};t.observe(s.context.document.body,i)},je=(e,s={})=>{const r=Be(e,s),t={...r,getParameters:ge,updateConfig:Ee,insertRules:te,build:Pe,buildCols:R,buildFlex:H,buildPad:ne,buildPadTop:I,buildPadRight:Y,buildPadBottom:W,buildPadLeft:X,buildPadX:J,buildPadY:K,buildMar:le,buildMarTop:z,buildMarRight:G,buildMarBottom:U,buildMarLeft:q,buildMarX:Q,buildMarY:Z,buildMaxWidth:ae,buildMaxHeight:oe,buildMinWidth:ce,buildMinHeight:ue,buildHeight:fe,buildWidth:de,set:Ye,setCols:Xe,setFlex:We,setMar:_e,setMarTop:$e,setMarRight:qe,setMarBottom:Ge,setMarLeft:Ue,setMarX:ps,setMarY:ms,setPad:ts,setPadTop:rs,setPadRight:ss,setPadBottom:Ze,setPadLeft:es,setPadX:fs,setPadY:ds,setWidth:is,setMinWidth:Qe,setMaxWidth:Je,setHeight:ze,setMinHeight:Ke,setMaxHeight:ns,buildPosition:pe,buildTop:me,buildRight:be,buildBottom:he,buildLeft:xe,setPosition:ls,setTop:as,setRight:os,setBottom:cs,setLeft:us,reset:bs,processors:C};return r.searchOnInit?ve(t,e.document).then(()=>{t.ready&&t.ready(t),r.observer&&ke(t)}):(r.observer&&ke(t),t.ready&&t.ready(t)),t};return typeof window!="undefined"&&typeof exports=="undefined"&&(window.layouter=je(window)),je}); //# sourceMappingURL=layouter.umd.js.map diff --git a/dist/layouter.umd.js.map b/dist/layouter.umd.js.map index b75e517..8ce5fad 100644 --- a/dist/layouter.umd.js.map +++ b/dist/layouter.umd.js.map @@ -1 +1 @@ -{"version":3,"file":"layouter.umd.js","sources":["../src/helpers/breakpointsNums.ts","../src/helpers/createScopeStyles.ts","../src/helpers/scopesStylesBuilder.ts","../src/helpers/breakpointsOrdered.ts","../src/config/main.ts","../src/helpers/prepareParam.ts","../src/helpers/regError.ts","../src/helpers/calPercentage.ts","../src/helpers/getScopeByclassName.ts","../src/methods/insertRules.ts","../src/config/flex.ts","../src/helpers/percentageConverter.ts","../src/helpers/createStyles.ts","../src/helpers/nameCleaner.ts","../src/helpers/buildCss.ts","../src/methods/buildCols.ts","../src/methods/buildFlex.ts","../src/helpers/processedNumber.ts","../src/helpers/buildAttr.ts","../src/methods/buildPad.ts","../src/methods/buildPadTop.ts","../src/methods/buildPadRight.ts","../src/methods/buildPadBottom.ts","../src/methods/buildPadLeft.ts","../src/methods/buildMar.ts","../src/methods/buildMarTop.ts","../src/methods/buildMarRight.ts","../src/methods/buildMarBottom.ts","../src/methods/buildMarLeft.ts","../src/methods/buildMaxWidth.ts","../src/methods/buildMaxHeight.ts","../src/methods/buildMinWidth.ts","../src/methods/buildMinHeight.ts","../src/methods/buildHeight.ts","../src/methods/buildWidth.ts","../src/config/position.ts","../src/methods/buildPosition.ts","../src/methods/buildTop.ts","../src/methods/buildRight.ts","../src/methods/buildBottom.ts","../src/methods/buildLeft.ts","../src/config/display.ts","../src/methods/buildDisplay.ts","../src/helpers/buildXY.ts","../src/methods/buildPadX.ts","../src/methods/buildPadY.ts","../src/methods/buildMarX.ts","../src/methods/buildMarY.ts","../src/config/processors.ts","../src/methods/getParameters.ts","../src/methods/build.ts","../src/utils/addClasses.ts","../src/utils/removeAttr.ts","../src/helpers/eventReady.ts","../src/methods/set.ts","../src/helpers/directiveValues.ts","../src/methods/setFlex.ts","../src/methods/SetCols.ts","../src/helpers/setAttr.ts","../src/methods/setHeight.ts","../src/methods/setMarBottom.ts","../src/methods/setMarLeft.ts","../src/methods/setMarRight.ts","../src/methods/setMar.ts","../src/methods/setMarTop.ts","../src/methods/setMaxWidth.ts","../src/methods/setMinHeight.ts","../src/methods/setMinWidth.ts","../src/methods/setPadBottom.ts","../src/methods/setPadLeft.ts","../src/methods/setPadRight.ts","../src/methods/setPad.ts","../src/methods/setPadTop.ts","../src/methods/setWidth.ts","../src/methods/setMaxHeight.ts","../src/methods/setPosition.ts","../src/methods/setTop.ts","../src/methods/setRight.ts","../src/methods/setBottom.ts","../src/methods/setLeft.ts","../src/helpers/setterXY.ts","../src/methods/setPadX.ts","../src/methods/setPadY.ts","../src/methods/setMarX.ts","../src/methods/setMarY.ts","../src/methods/reset.ts","../src/helpers/searchAndProcess.ts","../src/helpers/mainObserver.ts","../src/layouter.ts"],"sourcesContent":["export type TNumProp = 'width' | 'cols';\r\n\r\nexport interface IBreakpoint {\r\n alias: string;\r\n width: number;\r\n}\r\n\r\nexport interface IBreakpoints {\r\n [alias: string]: {\r\n width: number;\r\n cols: number;\r\n };\r\n}\r\n\r\nexport interface IBreakpointObj {\r\n [alias: string]: number;\r\n}\r\n\r\nconst breakpointsNums = (\r\n objBps: IBreakpoints,\r\n propName: TNumProp\r\n): IBreakpointObj => {\r\n const sizes: IBreakpointObj = {};\r\n\r\n if (propName === 'width') {\r\n Object.keys(objBps)\r\n .map((bp: string) => {\r\n return {\r\n alias: bp,\r\n width: objBps[bp].width,\r\n };\r\n })\r\n .sort((a: IBreakpoint, b: IBreakpoint) =>\r\n a.width > b.width ? 1 : b.width > a.width ? -1 : 0\r\n )\r\n .forEach((bp: IBreakpoint, index: number) => {\r\n sizes[bp.alias] = !index ? 0 : objBps[bp.alias][propName];\r\n });\r\n } else {\r\n Object.keys(objBps).forEach((bp) => {\r\n sizes[bp] = objBps[bp][propName];\r\n });\r\n }\r\n\r\n return sizes;\r\n};\r\n\r\nexport default breakpointsNums;\r\n","export type TInsertion = 'before' | 'after' | 'append';\n\nexport interface ICreateScopeStyles {\n bridge?: boolean;\n bp: string;\n insertionType: TInsertion;\n node: HTMLElement;\n context: Window & typeof globalThis;\n}\n\nexport interface IRCreateScopeStyles {\n method:\n | CSSStyleSheet\n | {\n insertRule: (ruleCss: string) => void;\n rules: string[];\n };\n node: HTMLElement;\n}\n\nconst createScopeStyles = ({\n bridge: withBridge,\n bp,\n insertionType,\n node,\n context,\n}: ICreateScopeStyles): IRCreateScopeStyles => {\n let stylesScope = context.document.getElementById('layouter-' + bp);\n if (!stylesScope) {\n stylesScope = context.document.createElement('style');\n stylesScope.appendChild(context.document.createTextNode('')); // WebKit hack :(\n const nodeParent = node.parentNode as HTMLDivElement;\n switch (insertionType) {\n case 'before':\n nodeParent.insertBefore(stylesScope, node);\n break;\n case 'after':\n node.nextSibling\n ? nodeParent.insertBefore(stylesScope, node.nextSibling)\n : nodeParent.appendChild(stylesScope);\n break;\n case 'append':\n node.appendChild(stylesScope);\n break;\n }\n stylesScope.id = 'layouter-' + bp;\n }\n\n let bridge: IRCreateScopeStyles;\n if (withBridge) {\n bridge = {\n method: (stylesScope as HTMLStyleElement).sheet as CSSStyleSheet,\n node: stylesScope,\n };\n } else {\n bridge = {\n method: {\n insertRule: (ruleCss: string) => {\n (stylesScope as HTMLDivElement).appendChild(\n context.document.createTextNode(ruleCss)\n );\n },\n rules: [],\n },\n node: stylesScope,\n };\n }\n return bridge;\n};\n\nexport default createScopeStyles;\n","import { IBreakpoints } from './breakpointsNums';\nimport createScopeStyles, { IRCreateScopeStyles } from './createScopeStyles';\n\nexport interface IScopes {\n [name: string]: IRCreateScopeStyles;\n}\n\nexport interface IScopesStylesBuilder {\n breakpoints: IBreakpoints;\n bridge: boolean;\n scope?: IScopes;\n context: Window & typeof globalThis;\n}\n\nexport const scopesStylesBuilder = ({\n breakpoints,\n bridge,\n scope,\n context,\n}: IScopesStylesBuilder): IScopes => {\n const scopes: IScopes = scope || {};\n Object.keys(breakpoints).forEach((bp: string) => {\n if (!scopes[bp]) {\n scopes[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'append',\n node: context.document.body,\n context,\n });\n }\n });\n return scopes;\n};\n","import { ICols } from '../config/main';\r\nimport { IBreakpoints } from './breakpointsNums';\r\n\r\nconst breakpointsOrdered = (bps: IBreakpoints, sizes: ICols) => {\r\n const bpsOrdered: IBreakpoints = {};\r\n Object.keys(sizes).forEach((bpName) => (bpsOrdered[bpName] = bps[bpName]));\r\n return bpsOrdered;\r\n};\r\n\r\nexport default breakpointsOrdered;\r\n","import { ILayouter } from './../layouter';\nimport breakpointsNums, { IBreakpoints } from '../helpers/breakpointsNums';\nimport { IScopes, scopesStylesBuilder } from '../helpers/scopesStylesBuilder';\nimport breakpointsOrdered from '../helpers/breakpointsOrdered';\nimport { version } from '../../package.json';\n\nexport interface ICols {\n [colAlias: string]: number;\n}\n\nexport interface IConfigUser {\n prefix: string;\n breakpoints: IBreakpoints;\n bridge: boolean;\n debug?: boolean;\n ready?: (instance: ILayouter) => void;\n searchOnInit: boolean;\n observer: boolean;\n}\n\ninterface IConfigNumsIn {\n bps: IBreakpoints;\n bridge: boolean;\n scope?: IScopes;\n context: Window & typeof globalThis;\n}\n\ninterface IConfigNumsOut {\n scope: IScopes;\n cols: ICols;\n sizes: ICols;\n breakpoints: IBreakpoints;\n}\n\nexport interface IConfig\n extends Omit,\n IConfigNumsOut {\n context: Window & typeof globalThis;\n styles: {\n [className: string]: string;\n };\n version: string;\n}\n\ndeclare global {\n interface Window {\n layouterConfig: Partial;\n }\n}\n\nconst breakpointsInit: IBreakpoints = {\n xs: {\n width: 360,\n cols: 15,\n },\n sm: {\n width: 600,\n cols: 25,\n },\n md: {\n width: 900,\n cols: 31,\n },\n lg: {\n width: 1200,\n cols: 41,\n },\n xlg: {\n width: 1536,\n cols: 51,\n },\n};\n\nexport let baseConfig: IConfigUser = {\n prefix: '',\n breakpoints: breakpointsInit,\n bridge: true,\n debug: true,\n searchOnInit: true,\n observer: true,\n};\n\nlet config: IConfig;\n\nconst configNums = ({\n bps,\n bridge,\n scope,\n context,\n}: IConfigNumsIn): IConfigNumsOut => {\n const sizes = breakpointsNums(bps, 'width');\n const finalBps = breakpointsOrdered(bps, sizes);\n return {\n sizes,\n cols: breakpointsNums(bps, 'cols'),\n scope: scopesStylesBuilder({\n breakpoints: finalBps,\n bridge,\n scope: scope,\n context,\n }),\n breakpoints: finalBps,\n };\n};\n\nexport const setConfig = (\n context: Window & typeof globalThis,\n customCfg: Partial = {}\n): IConfig => {\n const contextConfig = context.layouterConfig || {};\n\n baseConfig = {\n ...baseConfig,\n ...customCfg,\n ...contextConfig,\n };\n\n config = {\n context,\n ...baseConfig,\n ...configNums({\n bps: baseConfig.breakpoints,\n bridge: baseConfig.bridge,\n context,\n }),\n styles: {},\n version,\n };\n\n return config;\n};\n\nconst getConfig = (): IConfig => {\n return config;\n};\n\nexport const setStyles = (className: string, value: string) => {\n config.styles[className] = value;\n};\n\nexport const updateConfig = (userConfig: Partial): IConfig => {\n config = {\n ...config,\n ...userConfig,\n };\n\n if (userConfig.breakpoints) {\n config = {\n ...config,\n ...configNums({\n bps: config.breakpoints,\n bridge: config.bridge,\n scope: config.scope,\n context: config.context,\n }),\n };\n }\n\n return config;\n};\n\nexport default getConfig;\n","import getConfig from '../config/main';\n\nexport interface IPrepareParamObj {\n widthBp: boolean;\n numbers: string;\n breakPoints: string;\n important: boolean;\n}\n\nconst prepareParam = (param: string): IPrepareParamObj => {\n let bp: string;\n let argParam = param;\n let important = false;\n const haveBp = argParam.includes('@');\n if (haveBp) {\n const bpSplited = argParam.split('@');\n argParam = bpSplited[0];\n bp = bpSplited[1];\n } else {\n const config = getConfig();\n bp = Object.keys(config.breakpoints)[0];\n }\n\n if (param.includes('!')) {\n important = true;\n bp = bp.replace(/!/g, '');\n argParam = argParam.replace(/!/g, '');\n }\n\n return {\n widthBp: haveBp,\n numbers: argParam,\n breakPoints: bp,\n important,\n };\n};\n\nexport default prepareParam;\n","import config from '../config/main';\r\n\r\nconst regError = (\r\n name: string,\r\n message: string,\r\n Node?: Element | HTMLElement\r\n): Error => {\r\n const err = new Error();\r\n err.name = name;\r\n err.message = message;\r\n const intConfig = config();\r\n if (intConfig.debug) {\r\n console.error(err);\r\n if (Node) console.log(Node);\r\n }\r\n return err;\r\n};\r\n\r\nexport default regError;\r\n","const calPercentage = (n1: number, n2: number): string => {\r\n const cal = (n1 * 100) / n2;\r\n const haveDecimal = cal - Math.floor(cal) !== 0;\r\n const result = haveDecimal ? cal.toFixed(3) : cal;\r\n return result + '%';\r\n};\r\n\r\nexport default calPercentage;\r\n","import config from '../config/main';\nimport createScopeStyles, { IRCreateScopeStyles } from './createScopeStyles';\n\nconst getScopeByclassName = (className: string): IRCreateScopeStyles => {\n const nameClass = className.replace(/!/g, '');\n const atIndex = nameClass.indexOf('@');\n const intConfig = config();\n const scope = intConfig.scope;\n const bridge = intConfig.bridge;\n const context = intConfig.context;\n\n // Haven´t a BP designed\n if (atIndex === -1) {\n const firstBp = Object.keys(intConfig.breakpoints)[0];\n return scope[firstBp as string];\n }\n\n // Have a BP designed, a normal BP.\n const bp = nameClass.substring(atIndex + 1);\n if (!bp.includes('-')) return scope[bp]; // A simple BP (13/15@lg), not compound (like this: 13/15@sm-md).\n\n // A BP until. Example 13/15@-md\n if (bp.substring(0, 1) === '-') {\n if (scope[bp]) return scope[bp]; // exists the Scope.\n const bpUntil = bp.substring(1);\n scope[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'before',\n node: scope[bpUntil].node,\n context,\n });\n return scope[bp]; // returning a new scope created\n }\n\n // A BP from and until (a BP compound). Example: Example 13/15@sm-md\n if (scope[bp]) {\n return scope[bp]; // exists the Scope.\n }\n\n const fromBp = bp.split('-')[0];\n scope[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'after',\n node: scope[fromBp].node,\n context,\n });\n\n return scope[bp]; // returning a new scope compounded created\n};\n\nexport default getScopeByclassName;\n","import config, { setStyles } from '../config/main';\nimport { IStyles } from '../helpers/createStyles';\nimport getScopeByclassName from '../helpers/getScopeByclassName';\n\nconst insertRules = (objStyles: IStyles) => {\n const intConfig = config();\n\n for (const className in objStyles) {\n if (!intConfig.styles[className]) {\n const nodeScope = getScopeByclassName(className);\n const valClass = objStyles[className];\n const rules = nodeScope.method.rules;\n nodeScope.method.insertRule(valClass, rules ? rules.length : 0);\n setStyles(className, valClass); // saving in styles vault\n }\n }\n};\n\nexport default insertRules;\n","const flexProsAndValsBase = {\r\n jc: {\r\n ruleCss: 'justify-content',\r\n classPrefix: 'jc',\r\n },\r\n ai: {\r\n ruleCss: 'align-items',\r\n classPrefix: 'ai',\r\n },\r\n ce: {\r\n ruleCss: 'center',\r\n classPrefix: 'ce',\r\n },\r\n fs: {\r\n ruleCss: 'flex-start',\r\n classPrefix: 'fs',\r\n },\r\n fe: {\r\n ruleCss: 'flex-end',\r\n classPrefix: 'fe',\r\n },\r\n sb: {\r\n ruleCss: 'space-between',\r\n classPrefix: 'sb',\r\n },\r\n sa: {\r\n ruleCss: 'space-around',\r\n classPrefix: 'sa',\r\n },\r\n fw: {\r\n ruleCss: 'flex-wrap',\r\n classPrefix: 'fw',\r\n },\r\n nw: {\r\n ruleCss: 'nowrap',\r\n classPrefix: 'nw',\r\n },\r\n w: {\r\n ruleCss: 'wrap',\r\n classPrefix: 'w',\r\n },\r\n wr: {\r\n ruleCss: 'wrap-reverse',\r\n classPrefix: 'wr',\r\n },\r\n fd: {\r\n ruleCss: 'flex-direction',\r\n classPrefix: 'fd',\r\n },\r\n r: {\r\n ruleCss: 'row',\r\n classPrefix: 'r',\r\n },\r\n rr: {\r\n ruleCss: 'row-reverse',\r\n classPrefix: 'rr',\r\n },\r\n co: {\r\n ruleCss: 'column',\r\n classPrefix: 'co',\r\n },\r\n cor: {\r\n ruleCss: 'column-reverse',\r\n classPrefix: 'co',\r\n },\r\n au: {\r\n ruleCss: 'auto',\r\n classPrefix: 'au',\r\n },\r\n st: {\r\n ruleCss: 'stretch',\r\n classPrefix: 'st',\r\n },\r\n bl: {\r\n ruleCss: 'baseline',\r\n classPrefix: 'bl',\r\n },\r\n in: {\r\n ruleCss: 'initial',\r\n classPrefix: 'in',\r\n },\r\n ih: {\r\n ruleCss: 'inherit',\r\n classPrefix: 'ih',\r\n },\r\n};\r\n\r\nconst flexPropsAndValsSelfBase = {\r\n fg: {\r\n ruleCss: 'flex-grow',\r\n classPrefix: 'fg',\r\n },\r\n fh: {\r\n ruleCss: 'flex-shrink',\r\n classPrefix: 'fh',\r\n },\r\n as: {\r\n ruleCss: 'align-self',\r\n classPrefix: 'as',\r\n },\r\n or: {\r\n ruleCss: 'order',\r\n classPrefix: 'or',\r\n },\r\n};\r\n\r\nconst flexPropsAndValsSelf = {\r\n ...flexPropsAndValsSelfBase,\r\n 'flex-grow': flexPropsAndValsSelfBase.fg,\r\n 'flex-shrink': flexPropsAndValsSelfBase.fh,\r\n 'align-self': flexPropsAndValsSelfBase.as,\r\n order: flexPropsAndValsSelfBase.or,\r\n};\r\n\r\nexport const flexProsAndVals = {\r\n ...flexProsAndValsBase,\r\n ...flexPropsAndValsSelf,\r\n 'justify-content': flexProsAndValsBase.jc,\r\n 'align-items': flexProsAndValsBase.ai,\r\n center: flexProsAndValsBase.ce,\r\n 'flex-start': flexProsAndValsBase.fs,\r\n 'flex-end': flexProsAndValsBase.fe,\r\n 'space-between': flexProsAndValsBase.sb,\r\n 'space-around': flexProsAndValsBase.fs,\r\n 'flex-wrap': flexProsAndValsBase.fw,\r\n nowrap: flexProsAndValsBase.nw,\r\n w: flexProsAndValsBase.w,\r\n 'wrap-reverse': flexProsAndValsBase.wr,\r\n 'flex-direction': flexProsAndValsBase.fd,\r\n row: flexProsAndValsBase.r,\r\n 'row-reverse': flexProsAndValsBase.rr,\r\n column: flexProsAndValsBase.co,\r\n 'column-reverse': flexProsAndValsBase.cor,\r\n auto: flexProsAndValsBase.au,\r\n stretch: flexProsAndValsBase.st,\r\n baseline: flexProsAndValsBase.bl,\r\n initial: flexProsAndValsBase.in,\r\n inherit: flexProsAndValsBase.ih,\r\n};\r\n\r\nexport const flexAttrsSelf = Object.keys(flexPropsAndValsSelf);\r\n","const percentageConverter = (percentage: string) => {\r\n return '0¯' + percentage.replace('%', '');\r\n};\r\n\r\nexport default percentageConverter;\r\n","import { flexAttrsSelf } from '../config/flex';\r\nimport config from '../config/main';\r\nimport { processors, TDirectiveName } from '../config/processors';\r\nimport { IBpCals } from './buildCss';\r\nimport percentageConverter from './percentageConverter';\r\n\r\nexport interface IStyles {\r\n [name: string]: string;\r\n}\r\n\r\nconst createStyles = (directive: TDirectiveName, bps: IBpCals): IStyles => {\r\n const intConfig = config();\r\n const sizes = intConfig.sizes;\r\n const prefix = intConfig.prefix;\r\n const prop = processors[directive].ruleCss;\r\n const styles: IStyles = {};\r\n\r\n Object.keys(bps).forEach((bp) => {\r\n // preparing the className\r\n const shortNameClass = bps[bp].name;\r\n\r\n // just if have a percentage\r\n let nameClass = shortNameClass;\r\n if (shortNameClass.includes('%')) {\r\n nameClass = shortNameClass.replace(\r\n shortNameClass,\r\n percentageConverter(shortNameClass)\r\n );\r\n }\r\n\r\n const finalPrefix = prefix ? prefix + '-' : '';\r\n nameClass =\r\n finalPrefix +\r\n processors[directive].classPrefix +\r\n '-' +\r\n nameClass\r\n .replace(/\\//g, '\\\\/')\r\n .replace(/:/g, '\\\\:')\r\n .replace('@', '\\\\@')\r\n .split('.')\r\n .join('_');\r\n\r\n if (!intConfig.styles[nameClass]) {\r\n // Property and value\r\n let propAndVal;\r\n if (directive === 'flex') {\r\n propAndVal = bps[bp].value;\r\n const flexImportant = shortNameClass.includes('!')\r\n ? ';display:flex !important;'\r\n : ';display:flex;';\r\n\r\n // Searching a flex self inside. ['as' for 'align-self']\r\n const attrsFlexSelfs = flexAttrsSelf.filter((nameAttrFlex) =>\r\n shortNameClass.includes(nameAttrFlex + ':')\r\n );\r\n if (attrsFlexSelfs.length) {\r\n // if the items number of flex selft (+1) is diferrent so exists other flex attribute. Example: as:ce jc:ce\r\n if (attrsFlexSelfs.length + 1 !== shortNameClass.split(':').length) {\r\n propAndVal += flexImportant;\r\n }\r\n } else {\r\n propAndVal += flexImportant;\r\n }\r\n } else {\r\n propAndVal = prop + ':' + bps[bp].value;\r\n }\r\n\r\n let rule = '@media screen and ';\r\n let direct = false;\r\n if (!bp.includes('-')) {\r\n // no tiene until\r\n if (sizes[bp]) {\r\n rule += '(min-width: ' + sizes[bp] + 'px)';\r\n } else {\r\n rule = '.' + nameClass.replace(/!/g, '\\\\!') + '{' + propAndVal + '}';\r\n direct = true;\r\n }\r\n } else {\r\n const bpSplited = bp.split('-');\r\n const bp1 = bpSplited[0];\r\n if (bp1) rule += '(min-width: ' + sizes[bp1] + 'px) and ';\r\n const bp2 = bpSplited[1];\r\n rule += '(max-width: ' + (sizes[bp2] - 1) + 'px)';\r\n }\r\n\r\n if (!direct) {\r\n rule += '{.' + nameClass.replace(/!/g, '\\\\!') + '{' + propAndVal + '}}';\r\n }\r\n\r\n styles[nameClass] = rule;\r\n } else {\r\n styles[nameClass] = intConfig.styles[nameClass];\r\n }\r\n });\r\n return styles;\r\n};\r\n\r\nexport default createStyles;\r\n","import { IStyles } from './createStyles';\n\nconst replaceList = [\n ['/', ''],\n ['\\\\', '/'],\n ['/:', ':'],\n ['\\\\:', ':'],\n ['\\\\@', '@'],\n ['/@', '@'],\n];\n\nconst nameCleaner = (objStyles: IStyles): IStyles => {\n const obj: IStyles = {};\n for (const name in objStyles) {\n let newName = name;\n replaceList.forEach((reItem) => {\n newName = newName.split(reItem[0]).join(reItem[1]);\n });\n obj[newName] = objStyles[name];\n }\n return obj;\n};\n\nexport default nameCleaner;\n","import { TDirectiveName } from '../config/processors';\nimport insertRules from '../methods/insertRules';\nimport createStyles, { IStyles } from './createStyles';\nimport nameCleaner from './nameCleaner';\n\nexport interface IRBuildStyles {\n name: string;\n value: string;\n}\n\nexport interface IBpCals {\n [bpName: string]: IRBuildStyles;\n}\n\nexport interface IBuildCss {\n type: TDirectiveName;\n bps: IBpCals;\n deep: boolean;\n}\n\nconst buildCss = (data: IBuildCss): IStyles => {\n // creating the styles\n const objStyles = createStyles(data.type, data.bps);\n\n // Inserting CSS rules\n if (data.deep) {\n insertRules(objStyles);\n }\n\n // name classes cleaner\n return nameCleaner(objStyles);\n};\n\nexport default buildCss;\n","import prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\nimport calPercentage from '../helpers/calPercentage';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport getConfig from '../config/main';\r\nimport { IStyles } from '../helpers/createStyles';\r\n\r\nconst buildCols = (values: string, insertStyles = false): IStyles | Error => {\r\n let cols: number[];\r\n let bp;\r\n const bpCals: IBpCals = {};\r\n const config = getConfig();\r\n\r\n // Getting numbers\r\n let selectorName, propValue, paramPrepared;\r\n const directBp = Object.keys(config.breakpoints)[0];\r\n\r\n let err: boolean | Error = false;\r\n\r\n for (const item of values.split(' ')) {\r\n let param = item;\r\n selectorName = param;\r\n paramPrepared = prepareParam(param);\r\n bp = paramPrepared.breakPoints;\r\n param = paramPrepared.numbers;\r\n\r\n if (param.includes('/')) {\r\n const paramSplited = param.split('/');\r\n cols = [Number(paramSplited[0]), Number(paramSplited[1])];\r\n } else {\r\n if (paramPrepared.widthBp) {\r\n if (bp.includes('-')) {\r\n err = regError(\r\n 'SyntaxError',\r\n \"You can't determine a 'until breakpoint' when use the explicit columns max: \" +\r\n values\r\n );\r\n break;\r\n } else {\r\n cols = [Number(param), config.cols[bp] as number];\r\n }\r\n } else {\r\n cols = [Number(param), config.cols[directBp] as number];\r\n }\r\n }\r\n\r\n propValue = calPercentage(cols[0], cols[1]);\r\n if (paramPrepared.important) propValue += ' !important';\r\n\r\n bpCals[bp] = {\r\n name: selectorName,\r\n value: propValue,\r\n };\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'cols',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildCols;\r\n","import { flexAttrsSelf, flexProsAndVals } from '../config/flex';\r\nimport getConfig from '../config/main';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport { IStyles } from '../helpers/createStyles';\r\nimport prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\n\r\nconst buildFlex = (valFlex: string, insertStyles = false): IStyles | Error => {\r\n const bpCals: IBpCals = {};\r\n\r\n // Getting numbers\r\n let err: boolean | Error = false;\r\n const config = getConfig();\r\n const firstBp = Object.keys(config.breakpoints)[0];\r\n\r\n for (const param of valFlex.split(' ')) {\r\n let propVal;\r\n const paramPrepared = prepareParam(param);\r\n const bpNames = paramPrepared.breakPoints;\r\n const flexSplited = paramPrepared.numbers.split(':');\r\n const nameProp = flexSplited[0] as keyof typeof flexProsAndVals; // 'fc' o 'or'\r\n const valProp = flexSplited[1] as keyof typeof flexProsAndVals; // 'ce' o '1'\r\n let valAlias: string;\r\n\r\n if (!flexAttrsSelf.includes(nameProp)) {\r\n if (!flexProsAndVals[nameProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + nameProp + \"' in Flex vault.\"\r\n );\r\n break;\r\n }\r\n if (!flexProsAndVals[valProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + valProp + \"' in Flex vault.\"\r\n );\r\n break;\r\n }\r\n propVal =\r\n flexProsAndVals[nameProp].ruleCss +\r\n ':' +\r\n flexProsAndVals[valProp].ruleCss;\r\n valAlias = flexProsAndVals[valProp].classPrefix;\r\n } else {\r\n propVal = flexProsAndVals[nameProp].ruleCss + ':' + valProp;\r\n valAlias = valProp;\r\n }\r\n\r\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\r\n if (paramPrepared.important) {\r\n propVal += ' !important';\r\n sufixBp += '!';\r\n }\r\n\r\n let selectorName =\r\n flexProsAndVals[nameProp].classPrefix + ':' + valAlias + sufixBp;\r\n\r\n if (!bpCals[bpNames]) {\r\n bpCals[bpNames] = {\r\n name: selectorName,\r\n value: propVal,\r\n };\r\n } else {\r\n if (selectorName.includes('@')) selectorName = selectorName.split('@')[0]; // just here because will be contact with the other className\r\n let prevName = bpCals[bpNames].name.split('@')[0];\r\n if (bpCals[bpNames].name.includes('!') && !prevName.includes('!'))\r\n prevName += '!';\r\n\r\n bpCals[bpNames].name = prevName + '-' + selectorName + sufixBp;\r\n bpCals[bpNames].value += ';' + propVal;\r\n }\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'flex',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildFlex;\r\n","import calPercentage from './calPercentage';\n\nconst relativeMeasures = ['%', 'rem', 'em', 'ex', 'vw', 'vh', 'pt', 'cm', 'pc'];\n\nconst processedNumber = (n: string) => {\n let nProcessed;\n if (n.includes('/')) {\n nProcessed = n.split('/');\n nProcessed = calPercentage(\n parseFloat(nProcessed[0]),\n parseFloat(nProcessed[1])\n );\n } else if (n === 'auto') {\n nProcessed = 'auto';\n } else {\n const relativeUnits = relativeMeasures.filter((unit) => {\n return n.includes(unit);\n });\n if (relativeUnits.length) {\n nProcessed = n;\n } else {\n nProcessed = n === '0' ? n : n + 'px';\n }\n }\n return nProcessed;\n};\n\nexport default processedNumber;\n","import { TDirectiveName } from '../config/processors';\nimport buildCss, { IBpCals } from './buildCss';\nimport { IStyles } from './createStyles';\nimport prepareParam from './prepareParam';\nimport processedNumber from './processedNumber';\n\nconst buildAttr = (\n values: string,\n directive: TDirectiveName,\n insertStyles = false\n): IStyles => {\n const bpCals: IBpCals = {};\n\n values.split(' ').forEach((param) => {\n const paramProcessed = prepareParam(param);\n const bpNames = paramProcessed.breakPoints;\n\n // processing number values\n let propValue = paramProcessed.numbers\n .split('-')\n .map((n) => processedNumber(n))\n .join(' ');\n if (paramProcessed.important) propValue += ' !important';\n bpCals[bpNames] = {\n name: param,\n value: propValue,\n };\n });\n\n // Building the classNames and the styles to use.\n return buildCss({\n type: directive,\n bps: bpCals,\n deep: insertStyles,\n });\n};\n\nexport default buildAttr;\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPad = (valPads: string, insertStyles = false) => {\r\n return buildAttr(valPads, 'pad', insertStyles);\r\n};\r\n\r\nexport default buildPad;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadTop = (valPadTop: string, insertStyles = false) => {\r\n return buildAttr(valPadTop, 'padt', insertStyles);\r\n};\r\n\r\nexport default buildPadTop;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadRight = (valPadRight: string, insertStyles = false) => {\r\n return buildAttr(valPadRight, 'padr', insertStyles);\r\n};\r\n\r\nexport default buildPadRight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadBottom = (valPadBottom: string, insertStyles = false) => {\r\n return buildAttr(valPadBottom, 'padb', insertStyles);\r\n};\r\n\r\nexport default buildPadBottom;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadLeft = (valPadLeft: string, insertStyles = false) => {\r\n return buildAttr(valPadLeft, 'padl', insertStyles);\r\n};\r\n\r\nexport default buildPadLeft;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMar = (valMars: string, insertStyles = false) => {\r\n return buildAttr(valMars, 'mar', insertStyles);\r\n};\r\n\r\nexport default buildMar;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarTop = (valMarTop: string, insertStyles = false) => {\r\n return buildAttr(valMarTop, 'mart', insertStyles);\r\n};\r\n\r\nexport default buildMarTop;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarRight = (valMarRight: string, insertStyles = false) => {\r\n return buildAttr(valMarRight, 'marr', insertStyles);\r\n};\r\n\r\nexport default buildMarRight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarBottom = (valMarBottom: string, insertStyles = false) => {\r\n return buildAttr(valMarBottom, 'marb', insertStyles);\r\n};\r\n\r\nexport default buildMarBottom;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarLeft = (valMarLeft: string, insertStyles = false) => {\r\n return buildAttr(valMarLeft, 'marl', insertStyles);\r\n};\r\n\r\nexport default buildMarLeft;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMaxWidth = (valMaxWidth: string, insertStyles = false) => {\r\n return buildAttr(valMaxWidth, 'mxw', insertStyles);\r\n};\r\n\r\nexport default buildMaxWidth;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMaxHeight = (valMaxHeight: string, insertStyles = false) => {\r\n return buildAttr(valMaxHeight, 'mxh', insertStyles);\r\n};\r\n\r\nexport default buildMaxHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMinWidth = (valMinWidth: string, insertStyles = false) => {\r\n return buildAttr(valMinWidth, 'miw', insertStyles);\r\n};\r\n\r\nexport default buildMinWidth;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMinHeight = (valMinHeight: string, insertStyles = false) => {\r\n return buildAttr(valMinHeight, 'mih', insertStyles);\r\n};\r\n\r\nexport default buildMinHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildHeight = (valHeight: string, insertStyles = false) => {\r\n return buildAttr(valHeight, 'hgt', insertStyles);\r\n};\r\n\r\nexport default buildHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildWidth = (valWidth: string, insertStyles = false) => {\r\n return buildAttr(valWidth, 'wdh', insertStyles);\r\n};\r\n\r\nexport default buildWidth;\r\n","const positionProsAndValsBase = {\r\n st: {\r\n ruleCss: 'static',\r\n classPrefix: 'st',\r\n },\r\n ab: {\r\n ruleCss: 'absolute',\r\n classPrefix: 'ab',\r\n },\r\n fi: {\r\n ruleCss: 'fixed',\r\n classPrefix: 'fi',\r\n },\r\n re: {\r\n ruleCss: 'relative',\r\n classPrefix: 're',\r\n },\r\n si: {\r\n ruleCss: 'sticky',\r\n classPrefix: 'si',\r\n },\r\n in: {\r\n ruleCss: 'initial',\r\n classPrefix: 'in',\r\n },\r\n ih: {\r\n ruleCss: 'inherit',\r\n classPrefix: 'ih',\r\n },\r\n};\r\n\r\nexport const positionProsAndVals = {\r\n ...positionProsAndValsBase,\r\n static: positionProsAndValsBase.st,\r\n absolute: positionProsAndValsBase.ab,\r\n fixed: positionProsAndValsBase.fi,\r\n relative: positionProsAndValsBase.re,\r\n sticky: positionProsAndValsBase.si,\r\n initial: positionProsAndValsBase.in,\r\n inherit: positionProsAndValsBase.ih,\r\n};\r\n","import getConfig from '../config/main';\r\nimport { positionProsAndVals } from '../config/position';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport { IStyles } from '../helpers/createStyles';\r\nimport prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\n\r\nconst buildPosition = (\r\n valPos: string,\r\n insertStyles = false\r\n): IStyles | Error => {\r\n const bpCals: IBpCals = {};\r\n\r\n // Getting numbers\r\n let err: boolean | Error = false;\r\n const config = getConfig();\r\n const firstBp = Object.keys(config.breakpoints)[0];\r\n\r\n for (const param of valPos.split(' ')) {\r\n let propVal;\r\n const paramPrepared = prepareParam(param);\r\n const bpNames = paramPrepared.breakPoints;\r\n const nameProp = paramPrepared.numbers as keyof typeof positionProsAndVals;\r\n\r\n if (!positionProsAndVals[nameProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + nameProp + \"' in Position vault.\"\r\n );\r\n break;\r\n }\r\n\r\n propVal = positionProsAndVals[nameProp].ruleCss;\r\n const className = positionProsAndVals[nameProp].classPrefix;\r\n\r\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\r\n\r\n if (paramPrepared.important) {\r\n propVal += ' !important';\r\n sufixBp += '!';\r\n }\r\n\r\n bpCals[bpNames] = {\r\n name: className + sufixBp,\r\n value: propVal,\r\n };\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'pos',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildPosition;\r\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildTop = (val: string, insertStyles = false) => {\n return buildAttr(val, 't', insertStyles);\n};\n\nexport default buildTop;\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildRight = (val: string, insertStyles = false) => {\n return buildAttr(val, 'r', insertStyles);\n};\n\nexport default buildRight;\n","import buildAttr from '../helpers/buildAttr';\r\nimport { IStyles } from '../helpers/createStyles';\r\n\r\nconst buildBottom = (val: string, insertStyles = false): IStyles => {\r\n return buildAttr(val, 'b', insertStyles);\r\n};\r\n\r\nexport default buildBottom;\r\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildLeft = (val: string, insertStyles = false) => {\n return buildAttr(val, 'l', insertStyles);\n};\n\nexport default buildLeft;\n","const displayProsAndValsBase = {\n bl: {\n ruleCss: 'block',\n classPrefix: 'bl',\n },\n il: {\n ruleCss: 'inline',\n classPrefix: 'il',\n },\n ib: {\n ruleCss: 'inline-block',\n classPrefix: 'ib',\n },\n fx: {\n ruleCss: 'flex',\n classPrefix: 'fx',\n },\n if: {\n ruleCss: 'inline-flex',\n classPrefix: 'if',\n },\n no: {\n ruleCss: 'none',\n classPrefix: 'no',\n },\n in: {\n ruleCss: 'initial',\n classPrefix: 'in',\n },\n ih: {\n ruleCss: 'inherit',\n classPrefix: 'ih',\n },\n};\n\nexport const displayProsAndVals = {\n ...displayProsAndValsBase,\n block: displayProsAndValsBase.bl,\n inline: displayProsAndValsBase.il,\n 'inline-block': displayProsAndValsBase.ib,\n flex: displayProsAndValsBase.fx,\n 'inline-flex': displayProsAndValsBase.if,\n none: displayProsAndValsBase.no,\n initial: displayProsAndValsBase.in,\n inherit: displayProsAndValsBase.ih,\n};\n","import getConfig from '../config/main';\nimport { displayProsAndVals } from '../config/display';\n\nimport buildCss, { IBpCals } from '../helpers/buildCss';\nimport { IStyles } from '../helpers/createStyles';\nimport prepareParam from '../helpers/prepareParam';\nimport regError from '../helpers/regError';\n\nconst buildDisplay = (\n valDisplay: string,\n insertStyles = false\n): IStyles | Error => {\n const bpCals: IBpCals = {};\n\n // Getting numbers\n let err: boolean | Error = false;\n const config = getConfig();\n const firstBp = Object.keys(config.breakpoints)[0];\n\n for (const param of valDisplay.split(' ')) {\n let propVal;\n const paramPrepared = prepareParam(param);\n const bpNames = paramPrepared.breakPoints;\n const nameProp = paramPrepared.numbers as keyof typeof displayProsAndVals;\n\n if (!displayProsAndVals[nameProp]) {\n err = regError(\n 'Non-existent Alias',\n \"Don't exists the alias '\" + nameProp + \"' in display vault.\"\n );\n break;\n }\n\n propVal = displayProsAndVals[nameProp].ruleCss;\n const className = displayProsAndVals[nameProp].classPrefix;\n\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\n\n if (paramPrepared.important) {\n propVal += ' !important';\n sufixBp += '!';\n }\n\n bpCals[bpNames] = {\n name: className + sufixBp,\n value: propVal,\n };\n }\n\n if (err) return err;\n\n // Building the classNames and the styles to use.\n return buildCss({\n type: 'd',\n bps: bpCals,\n deep: insertStyles,\n });\n};\n\nexport default buildDisplay;\n","import { IStyles } from './createStyles';\n\nexport interface IBuildXY {\n values: string;\n builderA: (valPadA: string, insertStyles: boolean) => IStyles;\n builderB: (valPadB: string, insertStyles: boolean) => IStyles;\n insertStyles: boolean;\n}\n\nconst buildXY = (data: IBuildXY): IStyles => {\n const stylesA = data.builderA(data.values, data.insertStyles);\n const stylesB = data.builderB(data.values, data.insertStyles);\n const allStyles: IStyles = {};\n for (const style in stylesA) {\n allStyles[style] = stylesA[style];\n }\n for (const style in stylesB) {\n allStyles[style] = stylesB[style];\n }\n return allStyles;\n};\n\nexport default buildXY;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildPadLeft from './buildPadLeft';\nimport buildPadRight from './buildPadRight';\n\nconst buildPadX = (valPadX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valPadX,\n builderA: buildPadRight,\n builderB: buildPadLeft,\n insertStyles,\n });\n};\n\nexport default buildPadX;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildPadBottom from './buildPadBottom';\nimport buildPadTop from './buildPadTop';\n\nconst buildPadY = (valPadX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valPadX,\n builderA: buildPadTop,\n builderB: buildPadBottom,\n insertStyles,\n });\n};\n\nexport default buildPadY;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildMarLeft from './buildMarLeft';\nimport buildMarRight from './buildMarRight';\n\nconst buildMarX = (valMarX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valMarX,\n builderA: buildMarRight,\n builderB: buildMarLeft,\n insertStyles,\n });\n};\n\nexport default buildMarX;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildMarBottom from './buildMarBottom';\nimport buildMarTop from './buildMarTop';\n\nconst buildMarY = (valMarY: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valMarY,\n builderA: buildMarTop,\n builderB: buildMarBottom,\n insertStyles,\n });\n};\n\nexport default buildMarY;\n","import buildCols from '../methods/buildCols';\nimport buildFlex from '../methods/buildFlex';\nimport buildPad from '../methods/buildPad';\nimport buildPadTop from '../methods/buildPadTop';\nimport buildPadRight from '../methods/buildPadRight';\nimport buildPadBottom from '../methods/buildPadBottom';\nimport buildPadLeft from '../methods/buildPadLeft';\nimport buildMar from '../methods/buildMar';\nimport buildMarTop from '../methods/buildMarTop';\nimport buildMarRight from '../methods/buildMarRight';\nimport buildMarBottom from '../methods/buildMarBottom';\nimport buildMarLeft from '../methods/buildMarLeft';\nimport buildMaxWidth from '../methods/buildMaxWidth';\nimport buildMaxHeight from '../methods/buildMaxHeight';\nimport buildMinWidth from '../methods/buildMinWidth';\nimport buildMinHeight from '../methods/buildMinHeight';\nimport buildHeight from '../methods/buildHeight';\nimport buildWidth from '../methods/buildWidth';\nimport buildPosition from '../methods/buildPosition';\nimport buildTop from '../methods/buildTop';\nimport buildRight from '../methods/buildRight';\nimport buildBottom from '../methods/buildBottom';\nimport buildLeft from '../methods/buildLeft';\nimport buildDisplay from '../methods/buildDisplay';\nimport buildPadX from '../methods/buildPadX';\nimport buildPadY from '../methods/buildPadY';\nimport buildMarX from '../methods/buildMarX';\nimport buildMarY from '../methods/buildMarY';\n\nimport { IStyles } from '../helpers/createStyles';\n\ntype TDirectiveNameBase =\n | 'cols'\n | 'pad'\n | 'padt'\n | 'padr'\n | 'padb'\n | 'padl'\n | 'padx'\n | 'pady'\n | 'mar'\n | 'mart'\n | 'marr'\n | 'marb'\n | 'marl'\n | 'marx'\n | 'mary'\n | 'flex'\n | 'mxw'\n | 'mxh'\n | 'miw'\n | 'mih'\n | 'wdh'\n | 'hgt'\n | 'pos'\n | 't'\n | 'r'\n | 'b'\n | 'l'\n | 'd';\n\ntype TDirectiveNameExtended =\n | 'c'\n | 'fx'\n | 'p'\n | 'padding'\n | 'pt'\n | 'padding-top'\n | 'pr'\n | 'padding-right'\n | 'pb'\n | 'padding-bottom'\n | 'pl'\n | 'padding-left'\n | 'py'\n | 'padding-y'\n | 'px'\n | 'padding-x'\n | 'my'\n | 'margin-y'\n | 'mx'\n | 'margin-x'\n | 'm'\n | 'margin'\n | 'mt'\n | 'margin-top'\n | 'mr'\n | 'margin-right'\n | 'mb'\n | 'margin-bottom'\n | 'ml'\n | 'margin-left'\n | 'w'\n | 'width'\n | 'h'\n | 'height'\n | 'max-width'\n | 'max-height'\n | 'min-width'\n | 'min-height'\n | 'position'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'display';\n\nexport type TDirectiveName = TDirectiveNameBase | TDirectiveNameExtended;\n\nexport interface IProcessor {\n build: (values: string, insertStyles: boolean) => IStyles | Error;\n ruleCss: string | string[];\n classPrefix: string;\n}\n\nconst processorsBase: Record = {\n cols: {\n build: buildCols,\n ruleCss: 'width',\n classPrefix: 'c',\n },\n\n // Paddings\n pad: {\n build: buildPad,\n ruleCss: 'padding',\n classPrefix: 'p',\n },\n padt: {\n build: buildPadTop,\n ruleCss: 'padding-top',\n classPrefix: 'pt',\n },\n padr: {\n build: buildPadRight,\n ruleCss: 'padding-right',\n classPrefix: 'pr',\n },\n padb: {\n build: buildPadBottom,\n ruleCss: 'padding-bottom',\n classPrefix: 'pb',\n },\n padl: {\n build: buildPadLeft,\n ruleCss: 'padding-left',\n classPrefix: 'pl',\n },\n padx: {\n build: buildPadX,\n ruleCss: ['padding-left', 'padding-right'],\n classPrefix: 'px',\n },\n pady: {\n build: buildPadY,\n ruleCss: ['padding-top', 'padding-bottom'],\n classPrefix: 'py',\n },\n\n // Margin\n mar: {\n build: buildMar,\n ruleCss: 'margin',\n classPrefix: 'm',\n },\n mart: {\n build: buildMarTop,\n ruleCss: 'margin-top',\n classPrefix: 'mt',\n },\n marr: {\n build: buildMarRight,\n ruleCss: 'margin-right',\n classPrefix: 'mr',\n },\n marb: {\n build: buildMarBottom,\n ruleCss: 'margin-bottom',\n classPrefix: 'mb',\n },\n marl: {\n build: buildMarLeft,\n ruleCss: 'margin-left',\n classPrefix: 'ml',\n },\n marx: {\n build: buildMarX,\n ruleCss: ['margin-left', 'margin-right'],\n classPrefix: 'px',\n },\n mary: {\n build: buildMarY,\n ruleCss: ['margin-top', 'margin-bottom'],\n classPrefix: 'py',\n },\n\n // Flex Box\n flex: {\n build: buildFlex,\n ruleCss: 'display: flex',\n classPrefix: 'fx',\n },\n\n // Max & Min Width & Height\n mxw: {\n build: buildMaxWidth,\n ruleCss: 'max-width',\n classPrefix: 'mxw',\n },\n\n mxh: {\n build: buildMaxHeight,\n ruleCss: 'max-height',\n classPrefix: 'mxh',\n },\n\n miw: {\n build: buildMinWidth,\n ruleCss: 'min-width',\n classPrefix: 'miw',\n },\n\n mih: {\n build: buildMinHeight,\n ruleCss: 'min-height',\n classPrefix: 'mih',\n },\n\n // Width & Height\n wdh: {\n build: buildWidth,\n ruleCss: 'width',\n classPrefix: 'w',\n },\n\n hgt: {\n build: buildHeight,\n ruleCss: 'height',\n classPrefix: 'h',\n },\n\n // Position\n pos: {\n build: buildPosition,\n ruleCss: 'position',\n classPrefix: 'pos',\n },\n t: {\n build: buildTop,\n ruleCss: 'top',\n classPrefix: 't',\n },\n r: {\n build: buildRight,\n ruleCss: 'right',\n classPrefix: 'r',\n },\n b: {\n build: buildBottom,\n ruleCss: 'bottom',\n classPrefix: 'b',\n },\n l: {\n build: buildLeft,\n ruleCss: 'left',\n classPrefix: 'l',\n },\n d: {\n build: buildDisplay,\n ruleCss: 'display',\n classPrefix: 'd',\n },\n};\n\nexport const processors: Record = {\n ...processorsBase,\n c: processorsBase.cols,\n fx: processorsBase.flex,\n p: processorsBase.pad,\n padding: processorsBase.pad,\n pt: processorsBase.padt,\n 'padding-top': processorsBase.padt,\n pr: processorsBase.padr,\n 'padding-right': processorsBase.padr,\n pb: processorsBase.padb,\n 'padding-bottom': processorsBase.padb,\n pl: processorsBase.padl,\n 'padding-left': processorsBase.padl,\n py: processorsBase.pady,\n 'padding-y': processorsBase.pady,\n px: processorsBase.padx,\n 'padding-x': processorsBase.padx,\n m: processorsBase.mar,\n margin: processorsBase.mar,\n mt: processorsBase.mart,\n 'margin-top': processorsBase.mart,\n mr: processorsBase.marr,\n 'margin-right': processorsBase.marr,\n mb: processorsBase.marb,\n 'margin-bottom': processorsBase.marb,\n ml: processorsBase.marl,\n 'margin-left': processorsBase.marl,\n my: processorsBase.mary,\n 'margin-y': processorsBase.mary,\n mx: processorsBase.marx,\n 'margin-x': processorsBase.marx,\n w: processorsBase.wdh,\n width: processorsBase.wdh,\n h: processorsBase.hgt,\n height: processorsBase.hgt,\n 'max-width': processorsBase.mxw,\n 'max-height': processorsBase.mxh,\n 'min-width': processorsBase.miw,\n 'min-height': processorsBase.mih,\n position: processorsBase.pos,\n top: processorsBase.t,\n right: processorsBase.r,\n bottom: processorsBase.b,\n left: processorsBase.l,\n display: processorsBase.d,\n};\n","import { processors, TDirectiveName } from '../config/processors';\r\n\r\nconst getParameters = (\r\n Node: HTMLElement | Element\r\n): Partial> => {\r\n const params: Partial> = {};\r\n const attrs = Node.attributes;\r\n const paramNames = Object.keys(processors);\r\n Array.prototype.forEach.call(attrs, (attr) => {\r\n if (paramNames.includes(attr.name)) {\r\n if (attr.value !== '')\r\n params[attr.name as TDirectiveName] = attr.value\r\n .trim()\r\n .split(' ')\r\n .filter((item: string) => item)\r\n .join(' ');\r\n }\r\n });\r\n return params;\r\n};\r\n\r\nexport default getParameters;\r\n","import { processors, TDirectiveName } from '../config/processors';\nimport { IStyles } from '../helpers/createStyles';\n\nexport interface IBuildResult {\n [prop: string]: IStyles | boolean;\n}\n\nconst build = (\n obj: Partial>,\n insertStyles = false\n): Partial | Error => {\n const rObj: Partial = {};\n let err: Error | boolean = false;\n for (const prop in obj) {\n const propData = processors[prop as TDirectiveName];\n const objStyles: IStyles | Error = propData.build(\n obj[prop as TDirectiveName] as string,\n insertStyles\n );\n if (objStyles instanceof Error) {\n err = objStyles;\n break;\n } else {\n rObj[prop] = objStyles;\n }\n }\n\n if (err) return err;\n return rObj;\n};\n\nexport default build;\n","import getConfig from '../config/main';\n\nconst addClasses = (\n Node: HTMLElement | Element,\n classesNames: string,\n overwrite?: boolean\n): Promise => {\n return new Promise((resolve) => {\n const config = getConfig();\n const names = classesNames.split(' ');\n let classesToAdd: string[] = names;\n if (!overwrite) {\n classesToAdd = names.filter((name) => !Node.classList.contains(name));\n if (!classesToAdd.length) {\n resolve();\n return;\n }\n }\n\n const obsNode = new config.context.MutationObserver((mutations) => {\n const target = mutations[0].target;\n const currentClasses = (target as Element).className.split(' ');\n const containsAll = names.every((element) =>\n currentClasses.includes(element)\n );\n if (containsAll) {\n obsNode.disconnect();\n resolve();\n }\n });\n obsNode.observe(Node, {\n childList: false,\n subtree: false,\n attributes: true,\n attributeFilter: ['class'],\n characterData: false,\n });\n\n if (overwrite) {\n Node.className = classesNames;\n } else {\n const space = Node.hasAttribute('class') ? ' ' : '';\n Node.className += space + classesToAdd.join(' ');\n }\n });\n};\n\nexport default addClasses;\n","import getConfig from '../config/main';\n\nexport const removeProp = (\n Node: HTMLElement | Element,\n propName: string,\n context: Window & typeof globalThis\n): Promise => {\n return new Promise((resolve) => {\n if (!Node.hasAttribute(propName)) {\n resolve();\n return;\n }\n const obsNode = new context.MutationObserver(() => {\n obsNode.disconnect();\n resolve();\n });\n obsNode.observe(Node, {\n childList: false,\n subtree: false,\n attributes: true,\n attributeFilter: [propName],\n characterData: false,\n });\n Node.removeAttribute(propName);\n });\n};\n\nexport const removeProps = (\n Node: HTMLElement | Element,\n propNames: string[],\n context: Window & typeof globalThis\n): Promise => {\n return new Promise((resolve) => {\n const promises = propNames.map((name) => removeProp(Node, name, context));\n Promise.all(promises).then(() => resolve());\n });\n};\n\nconst removeAttr = (\n Node: HTMLElement | Element,\n propNames: string | string[]\n): Promise => {\n return new Promise((resolve) => {\n const config = getConfig();\n if (Array.isArray(propNames)) {\n removeProps(Node, propNames, config.context).then(resolve);\n } else {\n removeProp(Node, propNames, config.context).then(resolve);\n }\n });\n};\n\nexport default removeAttr;\n","import getConfig from '../config/main';\nimport addClasses from '../utils/addClasses';\nimport removeAttr from '../utils/removeAttr';\n\nexport interface IEventReady {\n node: HTMLElement | Element;\n directive: string | string[];\n classes: string;\n resolve: (value: void | Error | PromiseLike) => void;\n}\n\nconst eventReady = ({ node, directive, classes, resolve }: IEventReady) => {\n const config = getConfig();\n removeAttr(node, directive)\n .then(() => addClasses(node, classes))\n .then(() => {\n resolve();\n const event = new config.context.CustomEvent('layout:ready');\n node.dispatchEvent(event);\n });\n};\n\nexport default eventReady;\n","import { IStyles } from '../helpers/createStyles';\nimport regError from '../helpers/regError';\nimport build, { IBuildResult } from './build';\nimport getParameters from './getParameters';\nimport { TDirectiveName } from '../config/processors';\nimport eventReady from '../helpers/eventReady';\n\nconst set = (\n Node: HTMLElement | Element,\n parameters?: Partial>\n): Promise => {\n return new Promise((resolve, reject) => {\n const params = parameters || getParameters(Node);\n const arrParams = Object.keys(params);\n if (!arrParams.length) {\n const err = regError(\n 'Parameter Missing',\n \"don't exists any parameter to process\",\n Node\n );\n reject(err);\n return;\n }\n\n const toBuild: Partial> = {};\n for (const prop in params) {\n toBuild[prop as TDirectiveName] = params[prop as TDirectiveName];\n }\n\n // creating classes names and inserting that classes to the core\n const classesObj = build(toBuild as Record, true);\n if (classesObj instanceof Error) {\n reject(classesObj);\n return;\n }\n\n // adding classes\n const classes = classesObj as Partial;\n const classesNames = Object.keys(classes)\n .map((name: string) => Object.keys(classes[name] as IStyles))\n .flat()\n .join(' ');\n\n // removing unnecessary props\n eventReady({\n node: Node,\n directive: arrParams,\n classes: classesNames,\n resolve,\n });\n });\n};\n\nexport default set;\n","import regError from './regError';\n\nconst directiveValues = (\n Node: HTMLElement | Element,\n directives: string[]\n): string | Error => {\n const directiveValues = directives\n .map((item) => Node.getAttribute(item))\n .filter((item) => item)\n .join(' ');\n return !directiveValues\n ? regError(\n 'Empty',\n 'The value of the directives \"' + directives.join(', ') + '\" are empty',\n Node\n )\n : directiveValues;\n};\n\nexport default directiveValues;\n","import buildFlex from './buildFlex';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from '../helpers/directiveValues';\n\nconst setFlex = (\n Node: HTMLElement | Element,\n flexValues?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = flexValues || directiveValues(Node, ['flex', 'fx']);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = buildFlex(values as string, true);\n if (objStyles instanceof Error) {\n reject(objStyles);\n return;\n }\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive: 'flex',\n classes: Object.keys(objStyles).join(' '),\n resolve,\n });\n });\n};\n\nexport default setFlex;\n","import buildCols from './buildCols';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from '../helpers/directiveValues';\n\nconst setCols = (\n Node: HTMLElement | Element,\n columns?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = columns || directiveValues(Node, ['c', 'cols']);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = buildCols(values as string, true);\n if (objStyles instanceof Error) {\n reject(objStyles);\n return;\n }\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive: 'cols',\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setCols;\n","import buildAttr from '../helpers/buildAttr';\nimport { TDirectiveName } from '../config/processors';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from './directiveValues';\n\nconst setAttr = (\n Node: HTMLElement | Element,\n directives: TDirectiveName[],\n vals?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = vals || directiveValues(Node, directives);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const directive = directives[0];\n const objStyles = buildAttr(values as string, directive, true);\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive,\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setAttr;\n","import setAttr from '../helpers/setAttr';\n\nconst setHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['hgt', 'h'], values);\n};\n\nexport default setHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marb', 'mb', 'margin-bottom'], values);\n};\n\nexport default setMarBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marl', 'ml', 'margin-left'], values);\n};\n\nexport default setMarLeft;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marr', 'mr', 'margin-right'], values);\n};\n\nexport default setMarRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMar = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mar', 'm', 'margin'], values);\n};\n\nexport default setMar;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mart', 'mt', 'margin-top'], values);\n};\n\nexport default setMarTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setMaxWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mxw', 'max-width'], values);\n};\n\nexport default setMaxWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setMinHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mih', 'min-height'], values);\n};\n\nexport default setMinHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMinWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['miw', 'min-width'], values);\n};\n\nexport default setMinWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padb', 'pb', 'padding-bottom'], values);\n};\n\nexport default setPadBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padl', 'pl', 'padding-left'], values);\n};\n\nexport default setPadLeft;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padr', 'pr', 'padding-right'], values);\n};\n\nexport default setPadRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setPad = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['pad', 'p', 'padding'], values);\n};\n\nexport default setPad;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padt', 'pt', 'padding-top'], values);\n};\n\nexport default setPadTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['wdh', 'width'], values);\n};\n\nexport default setWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setMaxHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mxh', 'max-height'], values);\n};\n\nexport default setMaxHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setPosition = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['pos', 'position'], values);\n};\n\nexport default setPosition;\n","import setAttr from '../helpers/setAttr';\n\nconst setTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['t', 'top'], values);\n};\n\nexport default setTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['r', 'right'], values);\n};\n\nexport default setRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['b', 'bottom'], values);\n};\n\nexport default setBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['l', 'left'], values);\n};\n\nexport default setLeft;\n","import { IStyles } from './createStyles';\nimport directiveValues from './directiveValues';\nimport eventReady from './eventReady';\n\nexport interface ISetterXY {\n Node: HTMLElement | Element;\n directives: string[];\n builder: (valPadX: string, insertStyles: boolean) => IStyles;\n vals?: string;\n}\n\nconst setterXY = (data: ISetterXY): Promise => {\n return new Promise((resolve, reject) => {\n const values = data.vals || directiveValues(data.Node, data.directives);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = data.builder(values as string, true);\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: data.Node,\n directive: data.directives,\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setterXY;\n","import buildPadX from './buildPadX';\nimport setterXY from '../helpers/setterXY';\n\nconst setPadX = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['padx', 'px', 'padding-x'],\n builder: buildPadX,\n vals,\n });\n};\n\nexport default setPadX;\n","import buildPadY from './buildPadY';\nimport setterXY from '../helpers/setterXY';\n\nconst setPadY = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['pady', 'py', 'padding-y'],\n builder: buildPadY,\n vals,\n });\n};\n\nexport default setPadY;\n","import buildMarX from './buildMarX';\nimport setterXY from '../helpers/setterXY';\n\nconst setMarX = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['marx', 'px', 'margin-x'],\n builder: buildMarX,\n vals,\n });\n};\n\nexport default setMarX;\n","import buildMarY from './buildMarY';\nimport setterXY from '../helpers/setterXY';\n\nconst setMarY = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['mary', 'py', 'margin-y'],\n builder: buildMarY,\n vals,\n });\n};\n\nexport default setMarY;\n","import { TDirectiveName } from './../config/processors';\r\nimport { processors } from '../config/processors';\r\nimport addClasses from '../utils/addClasses';\r\nimport removeAttr from '../utils/removeAttr';\r\n\r\nconst reset = (Node: HTMLElement | Element): Promise => {\r\n return new Promise((resolve) => {\r\n const classPrefixes = new Set(\r\n Object.keys(processors).map(\r\n (item) => processors[item as TDirectiveName].classPrefix\r\n )\r\n );\r\n const layouterClasses = [...classPrefixes];\r\n const restClass = Node.className.split(' ').filter((name) => {\r\n if (!name.includes('-')) {\r\n return true;\r\n } else {\r\n const findClass = layouterClasses.find((item) => {\r\n const nLength = item.length;\r\n const namePrefix = name.substring(0, nLength + 1);\r\n return namePrefix === item + '-';\r\n });\r\n return !findClass;\r\n }\r\n });\r\n\r\n if (restClass.length) {\r\n const classesName = restClass.join(' ');\r\n addClasses(Node, classesName, true).then(() => {\r\n resolve();\r\n });\r\n } else {\r\n removeAttr(Node, 'class').then(() => {\r\n resolve();\r\n });\r\n }\r\n });\r\n};\r\n\r\nexport default reset;\r\n","import { ILayouter } from './../layouter';\nimport { processors } from '../config/processors';\n\nconst nodesNotAccepted = [\n 'animate',\n 'animateMotion',\n 'animateTransform',\n 'circle',\n 'clipPath',\n 'defs',\n 'desc',\n 'discard',\n 'ellipse',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'filter',\n 'foreignObject',\n 'g',\n 'hatch',\n 'hatchpath',\n 'image',\n 'line',\n 'linearGradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialGradient',\n 'rect',\n 'set',\n 'stop',\n 'style',\n 'svg',\n 'switch',\n 'symbol',\n 'text',\n 'textPath',\n 'title',\n 'tspan',\n 'use',\n 'view',\n];\n\nconst searchAndProcess = (\n layouter: ILayouter,\n context: Document | HTMLElement | Element\n) => {\n return new Promise((resolve) => {\n const props = Object.keys(processors);\n const attrs = props.map((prop) => `[${prop}]`).join(', ');\n const nodes = context.querySelectorAll(attrs);\n if (!nodes.length) {\n resolve(layouter);\n return;\n }\n\n const setNodes = new Set();\n Array.prototype.filter\n .call(\n nodes,\n (itemNode) =>\n !nodesNotAccepted.includes(itemNode.nodeName.toLowerCase())\n )\n .forEach((item) => setNodes.add(item));\n const promises: Promise[] = [];\n setNodes.forEach((node) => {\n promises.push(layouter.set(node as Element | HTMLElement));\n });\n Promise.all(promises).then(resolve);\n });\n};\n\nexport default searchAndProcess;\n","import { ILayouter } from './../layouter';\nimport { processors } from '../config/processors';\nimport getConfig from '../config/main';\nimport searchAndProcess from './searchAndProcess';\n\nconst mainObserver = (layouter: ILayouter) => {\n const config = getConfig();\n const props = Object.keys(processors);\n const obsBody = new layouter.context.MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type === 'childList') {\n if (!mutation.addedNodes.length) {\n continue;\n }\n mutation.addedNodes.forEach((node) => {\n if (node instanceof HTMLElement) {\n const props = layouter.getParameters(node);\n if (Object.keys(props).length) {\n layouter.set(node, props);\n }\n searchAndProcess(layouter, node);\n }\n });\n } else if (mutation.type === 'attributes') {\n const node = mutation.target;\n if (node instanceof HTMLElement) {\n const props = layouter.getParameters(node);\n if (Object.keys(props).length) {\n layouter.set(node, props);\n }\n }\n }\n }\n });\n const observerOptions = {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: props,\n characterData: false,\n };\n obsBody.observe(config.context.document.body, observerOptions);\n};\n\nexport default mainObserver;\n","import { IConfig, IConfigUser, setConfig, updateConfig } from './config/main';\nimport getParameters from './methods/getParameters';\n\nimport build from './methods/build';\nimport buildCols from './methods/buildCols';\nimport buildFlex from './methods/buildFlex';\nimport buildPad from './methods/buildPad';\nimport buildPadTop from './methods/buildPadTop';\nimport buildPadRight from './methods/buildPadRight';\nimport buildPadBottom from './methods/buildPadBottom';\nimport buildPadLeft from './methods/buildPadLeft';\nimport buildMar from './methods/buildMar';\nimport buildMarTop from './methods/buildMarTop';\nimport buildMarRight from './methods/buildMarRight';\nimport buildMarBottom from './methods/buildMarBottom';\nimport buildMarLeft from './methods/buildMarLeft';\nimport buildMaxWidth from './methods/buildMaxWidth';\nimport buildMaxHeight from './methods/buildMaxHeight';\nimport buildMinWidth from './methods/buildMinWidth';\nimport buildMinHeight from './methods/buildMinHeight';\nimport buildHeight from './methods/buildHeight';\nimport buildWidth from './methods/buildWidth';\nimport buildPosition from './methods/buildPosition';\nimport buildTop from './methods/buildTop';\nimport buildRight from './methods/buildRight';\nimport buildBottom from './methods/buildBottom';\nimport buildLeft from './methods/buildLeft';\nimport buildPadX from './methods/buildPadX';\nimport buildPadY from './methods/buildPadY';\nimport buildMarX from './methods/buildMarX';\nimport buildMarY from './methods/buildMarY';\n\nimport set from './methods/set';\nimport setFlex from './methods/setFlex';\nimport setCols from './methods/SetCols';\nimport setHeight from './methods/setHeight';\nimport setMarBottom from './methods/setMarBottom';\nimport setMarLeft from './methods/setMarLeft';\nimport setMarRight from './methods/setMarRight';\nimport setMar from './methods/setMar';\nimport setMarTop from './methods/setMarTop';\nimport setMaxWidth from './methods/setMaxWidth';\nimport setMinHeight from './methods/setMinHeight';\nimport setMinWidth from './methods/setMinWidth';\nimport setPadBottom from './methods/setPadBottom';\nimport setPadLeft from './methods/setPadLeft';\nimport setPadRight from './methods/setPadRight';\nimport setPad from './methods/setPad';\nimport setPadTop from './methods/setPadTop';\nimport setWidth from './methods/setWidth';\nimport setMaxHeight from './methods/setMaxHeight';\nimport setPosition from './methods/setPosition';\nimport setTop from './methods/setTop';\nimport setRight from './methods/setRight';\nimport setBottom from './methods/setBottom';\nimport setLeft from './methods/setLeft';\nimport setPadX from './methods/setPadX';\nimport setPadY from './methods/setPadY';\nimport setMarX from './methods/setMarX';\nimport setMarY from './methods/setMarY';\n\nimport insertRules from './methods/insertRules';\nimport reset from './methods/reset';\n\nimport { IStyles } from './helpers/createStyles';\nimport { IBuildResult } from './methods/build';\nimport searchAndProcess from './helpers/searchAndProcess';\nimport mainObserver from './helpers/mainObserver';\nimport { TDirectiveName, processors, IProcessor } from './config/processors';\n\nexport interface ILayouter extends IConfig {\n getParameters: (\n Node: HTMLElement | Element\n ) => Partial>;\n updateConfig: (userConfig: Partial>) => IConfig;\n build: (\n obj: Partial>,\n insertStyles?: boolean\n ) => Partial | Error;\n buildCols: (valCols: string, insertStyles?: boolean) => IStyles | Error;\n buildFlex: (valFlex: string, insertStyles?: boolean) => IStyles | Error;\n buildPad: (valPads: string, insertStyles?: boolean) => IStyles;\n buildPadTop: (valPadTop: string, insertStyles?: boolean) => IStyles;\n buildPadRight: (valPadRight: string, insertStyles?: boolean) => IStyles;\n buildPadBottom: (valPadBottom: string, insertStyles?: boolean) => IStyles;\n buildPadLeft: (valPadLeft: string, insertStyles?: boolean) => IStyles;\n buildPadX: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildPadY: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMar: (valMars: string, insertStyles?: boolean) => IStyles;\n buildMarTop: (valMarTop: string, insertStyles?: boolean) => IStyles;\n buildMarRight: (valMarRight: string, insertStyles?: boolean) => IStyles;\n buildMarBottom: (valMarBottom: string, insertStyles?: boolean) => IStyles;\n buildMarLeft: (valMarLeft: string, insertStyles?: boolean) => IStyles;\n buildMarX: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMarY: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMaxWidth: (valMaxWidth: string, insertStyles?: boolean) => IStyles;\n buildMaxHeight: (valMaxHeight: string, insertStyles?: boolean) => IStyles;\n buildMinWidth: (valMinWidth: string, insertStyles?: boolean) => IStyles;\n buildMinHeight: (valMinHeight: string, insertStyles?: boolean) => IStyles;\n buildHeight: (valHeight: string, insertStyles?: boolean) => IStyles;\n buildWidth: (valWidth: string, insertStyles?: boolean) => IStyles;\n buildPosition: (\n valPosition: string,\n insertStyles?: boolean\n ) => IStyles | Error;\n buildTop: (valTop: string, insertStyles?: boolean) => IStyles | Error;\n buildRight: (valRight: string, insertStyles?: boolean) => IStyles | Error;\n buildBottom: (valBottom: string, insertStyles?: boolean) => IStyles | Error;\n buildLeft: (valLeft: string, insertStyles?: boolean) => IStyles | Error;\n\n set: (\n Node: HTMLElement | Element,\n parameters?: Partial>\n ) => Promise;\n setCols: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setFlex: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMar: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarX: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarY: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPad: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadX: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadY: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n setWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMinWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMaxWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMinHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMaxHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPosition: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n setTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n processors: Record;\n\n insertRules: (objStyles: IStyles) => void;\n reset: (Node: HTMLElement | Element) => Promise;\n version: string;\n}\n\ndeclare global {\n interface Window {\n layouter: ILayouter;\n }\n}\n\nconst layouter = (\n context: Window & typeof globalThis,\n userConfig: Partial = {}\n): ILayouter => {\n const config = setConfig(context, userConfig);\n\n const instance = {\n ...config,\n getParameters,\n updateConfig,\n insertRules,\n build,\n buildCols,\n buildFlex,\n buildPad,\n buildPadTop,\n buildPadRight,\n buildPadBottom,\n buildPadLeft,\n buildPadX,\n buildPadY,\n buildMar,\n buildMarTop,\n buildMarRight,\n buildMarBottom,\n buildMarLeft,\n buildMarX,\n buildMarY,\n buildMaxWidth,\n buildMaxHeight,\n buildMinWidth,\n buildMinHeight,\n buildHeight,\n buildWidth,\n set,\n setCols,\n setFlex,\n setMar,\n setMarTop,\n setMarRight,\n setMarBottom,\n setMarLeft,\n setMarX,\n setMarY,\n setPad,\n setPadTop,\n setPadRight,\n setPadBottom,\n setPadLeft,\n setPadX,\n setPadY,\n setWidth,\n setMinWidth,\n setMaxWidth,\n setHeight,\n setMinHeight,\n setMaxHeight,\n buildPosition,\n buildTop,\n buildRight,\n buildBottom,\n buildLeft,\n setPosition,\n setTop,\n setRight,\n setBottom,\n setLeft,\n reset,\n processors,\n };\n\n // Auto init process\n if (config.searchOnInit) {\n searchAndProcess(instance, context.document).then(() => {\n if (instance.ready) instance.ready(instance);\n if (config.observer) mainObserver(instance);\n });\n } else {\n if (config.observer) mainObserver(instance);\n if (instance.ready) instance.ready(instance);\n }\n\n return instance;\n};\n\nif (typeof window !== 'undefined' && typeof exports === 'undefined') {\n window.layouter = layouter(window);\n}\n\nexport type { TDirectiveName, IProcessor } from './config/processors';\nexport type { IConfigUser } from './config/main';\nexport default layouter;\n"],"names":["config"],"mappings":"2OAkBA,KAAM,GAAkB,CACtB,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AE1B,GAAiB,EAAU,CAAI,CACjC,CAAA,CACD,CAAA,SACQ,EAAS,OAAS,aAAc,CACzC,KAAM,GAAO,EAAS,OACtB,GAAI,YAAgB,aAAa,CACzB,KAAA,GAAQ,EAAS,cAAc,CAAI,EACzC,AAAI,OAAO,KAAK,CAAK,EAAE,QACZ,EAAA,IAAI,EAAM,CAAK,CAE5B,CACF,CACF,CACD,EACK,EAAkB,CACtB,UAAW,GACX,QAAS,GACT,WAAY,GACZ,gBAAiB,EACjB,cAAe,EAAA,EAEjB,EAAQ,QAAQ,EAAO,QAAQ,SAAS,KAAM,CAAe,CAC/D,ECoMM,GAAW,CACf,EACA,EAAmC,KACrB,CACR,KAAA,GAAS,GAAU,EAAS,CAAU,EAEtC,EAAW,CACf,GAAG,EACH,iBACA,gBACA,eACA,SACA,YACA,YACA,YACA,cACA,gBACA,iBACA,eACA,YACA,YACA,YACA,cACA,gBACA,iBACA,eACA,YACA,YACA,iBACA,kBACA,iBACA,kBACA,eACA,cACA,OACA,WACA,WACA,UACA,aACA,eACA,gBACA,cACA,WACA,WACA,UACA,aACA,eACA,gBACA,cACA,WACA,WACA,YACA,eACA,eACA,aACA,gBACA,gBACA,iBACA,YACA,cACA,eACA,aACA,eACA,UACA,YACA,aACA,WACA,SACA,YAAA,EAIF,MAAI,GAAO,aACT,GAAiB,EAAU,EAAQ,QAAQ,EAAE,KAAK,IAAM,CACtD,AAAI,EAAS,OAAO,EAAS,MAAM,CAAQ,EACvC,EAAO,UAAU,GAAa,CAAQ,CAAA,CAC3C,EAEG,GAAO,UAAU,GAAa,CAAQ,EACtC,EAAS,OAAO,EAAS,MAAM,CAAQ,GAGtC,CACT,EAEA,MAAI,OAAO,SAAW,aAAe,MAAO,UAAY,aAC/C,QAAA,SAAW,GAAS,MAAM"} \ No newline at end of file +{"version":3,"file":"layouter.umd.js","sources":["../src/helpers/breakpointsNums.ts","../src/helpers/createScopeStyles.ts","../src/helpers/scopesStylesBuilder.ts","../src/helpers/breakpointsOrdered.ts","../src/config/main.ts","../src/helpers/prepareParam.ts","../src/helpers/regError.ts","../src/helpers/calPercentage.ts","../src/helpers/getScopeByclassName.ts","../src/methods/insertRules.ts","../src/config/flex.ts","../src/helpers/percentageConverter.ts","../src/helpers/createStyles.ts","../src/helpers/nameCleaner.ts","../src/helpers/buildCss.ts","../src/methods/buildCols.ts","../src/methods/buildFlex.ts","../src/helpers/processedNumber.ts","../src/helpers/buildAttr.ts","../src/methods/buildPad.ts","../src/methods/buildPadTop.ts","../src/methods/buildPadRight.ts","../src/methods/buildPadBottom.ts","../src/methods/buildPadLeft.ts","../src/methods/buildMar.ts","../src/methods/buildMarTop.ts","../src/methods/buildMarRight.ts","../src/methods/buildMarBottom.ts","../src/methods/buildMarLeft.ts","../src/methods/buildMaxWidth.ts","../src/methods/buildMaxHeight.ts","../src/methods/buildMinWidth.ts","../src/methods/buildMinHeight.ts","../src/methods/buildHeight.ts","../src/methods/buildWidth.ts","../src/config/position.ts","../src/methods/buildPosition.ts","../src/methods/buildTop.ts","../src/methods/buildRight.ts","../src/methods/buildBottom.ts","../src/methods/buildLeft.ts","../src/config/display.ts","../src/methods/buildDisplay.ts","../src/helpers/buildXY.ts","../src/methods/buildPadX.ts","../src/methods/buildPadY.ts","../src/methods/buildMarX.ts","../src/methods/buildMarY.ts","../src/config/processors.ts","../src/methods/getParameters.ts","../src/methods/build.ts","../src/utils/addClasses.ts","../src/utils/removeAttr.ts","../src/helpers/eventReady.ts","../src/methods/set.ts","../src/helpers/directiveValues.ts","../src/methods/setFlex.ts","../src/methods/SetCols.ts","../src/helpers/setAttr.ts","../src/methods/setHeight.ts","../src/methods/setMarBottom.ts","../src/methods/setMarLeft.ts","../src/methods/setMarRight.ts","../src/methods/setMar.ts","../src/methods/setMarTop.ts","../src/methods/setMaxWidth.ts","../src/methods/setMinHeight.ts","../src/methods/setMinWidth.ts","../src/methods/setPadBottom.ts","../src/methods/setPadLeft.ts","../src/methods/setPadRight.ts","../src/methods/setPad.ts","../src/methods/setPadTop.ts","../src/methods/setWidth.ts","../src/methods/setMaxHeight.ts","../src/methods/setPosition.ts","../src/methods/setTop.ts","../src/methods/setRight.ts","../src/methods/setBottom.ts","../src/methods/setLeft.ts","../src/helpers/setterXY.ts","../src/methods/setPadX.ts","../src/methods/setPadY.ts","../src/methods/setMarX.ts","../src/methods/setMarY.ts","../src/methods/reset.ts","../src/helpers/searchAndProcess.ts","../src/helpers/mainObserver.ts","../src/layouter.ts"],"sourcesContent":["export type TNumProp = 'width' | 'cols';\r\n\r\nexport interface IBreakpoint {\r\n alias: string;\r\n width: number;\r\n}\r\n\r\nexport interface IBreakpoints {\r\n [alias: string]: {\r\n width: number;\r\n cols: number;\r\n };\r\n}\r\n\r\nexport interface IBreakpointObj {\r\n [alias: string]: number;\r\n}\r\n\r\nconst breakpointsNums = (\r\n objBps: IBreakpoints,\r\n propName: TNumProp\r\n): IBreakpointObj => {\r\n const sizes: IBreakpointObj = {};\r\n\r\n if (propName === 'width') {\r\n Object.keys(objBps)\r\n .map((bp: string) => {\r\n return {\r\n alias: bp,\r\n width: objBps[bp].width,\r\n };\r\n })\r\n .sort((a: IBreakpoint, b: IBreakpoint) =>\r\n a.width > b.width ? 1 : b.width > a.width ? -1 : 0\r\n )\r\n .forEach((bp: IBreakpoint, index: number) => {\r\n sizes[bp.alias] = !index ? 0 : objBps[bp.alias][propName];\r\n });\r\n } else {\r\n Object.keys(objBps).forEach((bp) => {\r\n sizes[bp] = objBps[bp][propName];\r\n });\r\n }\r\n\r\n return sizes;\r\n};\r\n\r\nexport default breakpointsNums;\r\n","export type TInsertion = 'before' | 'after' | 'append';\n\nexport interface ICreateScopeStyles {\n bridge?: boolean;\n bp: string;\n insertionType: TInsertion;\n node: HTMLElement;\n context: Window & typeof globalThis;\n}\n\nexport interface IRCreateScopeStyles {\n method:\n | CSSStyleSheet\n | {\n insertRule: (ruleCss: string) => void;\n rules: string[];\n };\n node: HTMLElement;\n}\n\nconst createScopeStyles = ({\n bridge: withBridge,\n bp,\n insertionType,\n node,\n context,\n}: ICreateScopeStyles): IRCreateScopeStyles => {\n let stylesScope = context.document.getElementById('layouter-' + bp);\n if (!stylesScope) {\n stylesScope = context.document.createElement('style');\n stylesScope.appendChild(context.document.createTextNode('')); // WebKit hack :(\n const nodeParent = node.parentNode as HTMLDivElement;\n switch (insertionType) {\n case 'before':\n nodeParent.insertBefore(stylesScope, node);\n break;\n case 'after':\n node.nextSibling\n ? nodeParent.insertBefore(stylesScope, node.nextSibling)\n : nodeParent.appendChild(stylesScope);\n break;\n case 'append':\n node.appendChild(stylesScope);\n break;\n }\n stylesScope.id = 'layouter-' + bp;\n }\n\n let bridge: IRCreateScopeStyles;\n if (withBridge) {\n bridge = {\n method: (stylesScope as HTMLStyleElement).sheet as CSSStyleSheet,\n node: stylesScope,\n };\n } else {\n bridge = {\n method: {\n insertRule: (ruleCss: string) => {\n (stylesScope as HTMLDivElement).appendChild(\n context.document.createTextNode(ruleCss)\n );\n },\n rules: [],\n },\n node: stylesScope,\n };\n }\n return bridge;\n};\n\nexport default createScopeStyles;\n","import { IBreakpoints } from './breakpointsNums';\nimport createScopeStyles, { IRCreateScopeStyles } from './createScopeStyles';\n\nexport interface IScopes {\n [name: string]: IRCreateScopeStyles;\n}\n\nexport interface IScopesStylesBuilder {\n breakpoints: IBreakpoints;\n bridge: boolean;\n scope?: IScopes;\n context: Window & typeof globalThis;\n}\n\nexport const scopesStylesBuilder = ({\n breakpoints,\n bridge,\n scope,\n context,\n}: IScopesStylesBuilder): IScopes => {\n const scopes: IScopes = scope || {};\n Object.keys(breakpoints).forEach((bp: string) => {\n if (!scopes[bp]) {\n scopes[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'append',\n node: context.document.body,\n context,\n });\n }\n });\n return scopes;\n};\n","import { ICols } from '../config/main';\r\nimport { IBreakpoints } from './breakpointsNums';\r\n\r\nconst breakpointsOrdered = (bps: IBreakpoints, sizes: ICols) => {\r\n const bpsOrdered: IBreakpoints = {};\r\n Object.keys(sizes).forEach((bpName) => (bpsOrdered[bpName] = bps[bpName]));\r\n return bpsOrdered;\r\n};\r\n\r\nexport default breakpointsOrdered;\r\n","import { ILayouter } from './../layouter';\nimport breakpointsNums, { IBreakpoints } from '../helpers/breakpointsNums';\nimport { IScopes, scopesStylesBuilder } from '../helpers/scopesStylesBuilder';\nimport breakpointsOrdered from '../helpers/breakpointsOrdered';\nimport { version } from '../../package.json';\n\nexport interface ICols {\n [colAlias: string]: number;\n}\n\nexport interface IConfigUser {\n prefix: string;\n breakpoints: IBreakpoints;\n bridge: boolean;\n debug?: boolean;\n ready?: (instance: ILayouter) => void;\n searchOnInit: boolean;\n observer: boolean;\n}\n\ninterface IConfigNumsIn {\n bps: IBreakpoints;\n bridge: boolean;\n scope?: IScopes;\n context: Window & typeof globalThis;\n}\n\ninterface IConfigNumsOut {\n scope: IScopes;\n cols: ICols;\n sizes: ICols;\n breakpoints: IBreakpoints;\n}\n\nexport interface IConfig\n extends Omit,\n IConfigNumsOut {\n context: Window & typeof globalThis;\n styles: {\n [className: string]: string;\n };\n version: string;\n}\n\ndeclare global {\n interface Window {\n layouterConfig: Partial;\n }\n}\n\nconst breakpointsInit: IBreakpoints = {\n xs: {\n width: 360,\n cols: 15,\n },\n sm: {\n width: 600,\n cols: 25,\n },\n md: {\n width: 900,\n cols: 31,\n },\n lg: {\n width: 1200,\n cols: 41,\n },\n xlg: {\n width: 1536,\n cols: 51,\n },\n};\n\nexport let baseConfig: IConfigUser = {\n prefix: '',\n breakpoints: breakpointsInit,\n bridge: true,\n debug: true,\n searchOnInit: true,\n observer: true,\n};\n\nlet config: IConfig;\n\nconst configNums = ({\n bps,\n bridge,\n scope,\n context,\n}: IConfigNumsIn): IConfigNumsOut => {\n const sizes = breakpointsNums(bps, 'width');\n const finalBps = breakpointsOrdered(bps, sizes);\n return {\n sizes,\n cols: breakpointsNums(bps, 'cols'),\n scope: scopesStylesBuilder({\n breakpoints: finalBps,\n bridge,\n scope: scope,\n context,\n }),\n breakpoints: finalBps,\n };\n};\n\nexport const setConfig = (\n context: Window & typeof globalThis,\n customCfg: Partial = {}\n): IConfig => {\n const contextConfig = context.layouterConfig || {};\n\n baseConfig = {\n ...baseConfig,\n ...customCfg,\n ...contextConfig,\n };\n\n config = {\n context,\n ...baseConfig,\n ...configNums({\n bps: baseConfig.breakpoints,\n bridge: baseConfig.bridge,\n context,\n }),\n styles: {},\n version,\n };\n\n return config;\n};\n\nconst getConfig = (): IConfig => {\n return config;\n};\n\nexport const setStyles = (className: string, value: string) => {\n config.styles[className] = value;\n};\n\nexport const updateConfig = (userConfig: Partial): IConfig => {\n config = {\n ...config,\n ...userConfig,\n };\n\n if (userConfig.breakpoints) {\n config = {\n ...config,\n ...configNums({\n bps: config.breakpoints,\n bridge: config.bridge,\n scope: config.scope,\n context: config.context,\n }),\n };\n }\n\n return config;\n};\n\nexport default getConfig;\n","import getConfig from '../config/main';\n\nexport interface IPrepareParamObj {\n widthBp: boolean;\n numbers: string;\n breakPoints: string;\n important: boolean;\n}\n\nconst prepareParam = (param: string): IPrepareParamObj => {\n let bp: string;\n let argParam = param;\n let important = false;\n const haveBp = argParam.includes('@');\n if (haveBp) {\n const bpSplited = argParam.split('@');\n argParam = bpSplited[0];\n bp = bpSplited[1];\n } else {\n const config = getConfig();\n bp = Object.keys(config.breakpoints)[0];\n }\n\n if (param.includes('!')) {\n important = true;\n bp = bp.replace(/!/g, '');\n argParam = argParam.replace(/!/g, '');\n }\n\n return {\n widthBp: haveBp,\n numbers: argParam,\n breakPoints: bp,\n important,\n };\n};\n\nexport default prepareParam;\n","import config from '../config/main';\r\n\r\nconst regError = (\r\n name: string,\r\n message: string,\r\n Node?: Element | HTMLElement\r\n): Error => {\r\n const err = new Error();\r\n err.name = name;\r\n err.message = message;\r\n const intConfig = config();\r\n if (intConfig.debug) {\r\n console.error(err);\r\n if (Node) console.log(Node);\r\n }\r\n return err;\r\n};\r\n\r\nexport default regError;\r\n","const calPercentage = (n1: number, n2: number): string => {\r\n const cal = (n1 * 100) / n2;\r\n const haveDecimal = cal - Math.floor(cal) !== 0;\r\n const result = haveDecimal ? cal.toFixed(3) : cal;\r\n return result + '%';\r\n};\r\n\r\nexport default calPercentage;\r\n","import config from '../config/main';\nimport createScopeStyles, { IRCreateScopeStyles } from './createScopeStyles';\n\nconst getScopeByclassName = (className: string): IRCreateScopeStyles => {\n const nameClass = className.replace(/!/g, '');\n const atIndex = nameClass.indexOf('@');\n const intConfig = config();\n const scope = intConfig.scope;\n const bridge = intConfig.bridge;\n const context = intConfig.context;\n\n // Haven´t a BP designed\n if (atIndex === -1) {\n const firstBp = Object.keys(intConfig.breakpoints)[0];\n return scope[firstBp as string];\n }\n\n // Have a BP designed, a normal BP.\n const bp = nameClass.substring(atIndex + 1);\n if (!bp.includes('-')) return scope[bp]; // A simple BP (13/15@lg), not compound (like this: 13/15@sm-md).\n\n // A BP until. Example 13/15@-md\n if (bp.substring(0, 1) === '-') {\n if (scope[bp]) return scope[bp]; // exists the Scope.\n const bpUntil = bp.substring(1);\n scope[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'before',\n node: scope[bpUntil].node,\n context,\n });\n return scope[bp]; // returning a new scope created\n }\n\n // A BP from and until (a BP compound). Example: Example 13/15@sm-md\n if (scope[bp]) {\n return scope[bp]; // exists the Scope.\n }\n\n const fromBp = bp.split('-')[0];\n scope[bp] = createScopeStyles({\n bridge: bridge,\n bp,\n insertionType: 'after',\n node: scope[fromBp].node,\n context,\n });\n\n return scope[bp]; // returning a new scope compounded created\n};\n\nexport default getScopeByclassName;\n","import config, { setStyles } from '../config/main';\nimport { IStyles } from '../helpers/createStyles';\nimport getScopeByclassName from '../helpers/getScopeByclassName';\n\nconst insertRules = (objStyles: IStyles) => {\n const intConfig = config();\n\n for (const className in objStyles) {\n if (!intConfig.styles[className]) {\n const nodeScope = getScopeByclassName(className);\n const valClass = objStyles[className];\n const rules = nodeScope.method.rules;\n nodeScope.method.insertRule(valClass, rules ? rules.length : 0);\n setStyles(className, valClass); // saving in styles vault\n }\n }\n};\n\nexport default insertRules;\n","const flexProsAndValsBase = {\r\n jc: {\r\n ruleCss: 'justify-content',\r\n classPrefix: 'jc',\r\n },\r\n ai: {\r\n ruleCss: 'align-items',\r\n classPrefix: 'ai',\r\n },\r\n ce: {\r\n ruleCss: 'center',\r\n classPrefix: 'ce',\r\n },\r\n fs: {\r\n ruleCss: 'flex-start',\r\n classPrefix: 'fs',\r\n },\r\n fe: {\r\n ruleCss: 'flex-end',\r\n classPrefix: 'fe',\r\n },\r\n sb: {\r\n ruleCss: 'space-between',\r\n classPrefix: 'sb',\r\n },\r\n sa: {\r\n ruleCss: 'space-around',\r\n classPrefix: 'sa',\r\n },\r\n fw: {\r\n ruleCss: 'flex-wrap',\r\n classPrefix: 'fw',\r\n },\r\n nw: {\r\n ruleCss: 'nowrap',\r\n classPrefix: 'nw',\r\n },\r\n w: {\r\n ruleCss: 'wrap',\r\n classPrefix: 'w',\r\n },\r\n wr: {\r\n ruleCss: 'wrap-reverse',\r\n classPrefix: 'wr',\r\n },\r\n fd: {\r\n ruleCss: 'flex-direction',\r\n classPrefix: 'fd',\r\n },\r\n r: {\r\n ruleCss: 'row',\r\n classPrefix: 'r',\r\n },\r\n rr: {\r\n ruleCss: 'row-reverse',\r\n classPrefix: 'rr',\r\n },\r\n co: {\r\n ruleCss: 'column',\r\n classPrefix: 'co',\r\n },\r\n cor: {\r\n ruleCss: 'column-reverse',\r\n classPrefix: 'co',\r\n },\r\n au: {\r\n ruleCss: 'auto',\r\n classPrefix: 'au',\r\n },\r\n st: {\r\n ruleCss: 'stretch',\r\n classPrefix: 'st',\r\n },\r\n bl: {\r\n ruleCss: 'baseline',\r\n classPrefix: 'bl',\r\n },\r\n in: {\r\n ruleCss: 'initial',\r\n classPrefix: 'in',\r\n },\r\n ih: {\r\n ruleCss: 'inherit',\r\n classPrefix: 'ih',\r\n },\r\n};\r\n\r\nconst flexPropsAndValsSelfBase = {\r\n fg: {\r\n ruleCss: 'flex-grow',\r\n classPrefix: 'fg',\r\n },\r\n fh: {\r\n ruleCss: 'flex-shrink',\r\n classPrefix: 'fh',\r\n },\r\n as: {\r\n ruleCss: 'align-self',\r\n classPrefix: 'as',\r\n },\r\n or: {\r\n ruleCss: 'order',\r\n classPrefix: 'or',\r\n },\r\n};\r\n\r\nconst flexPropsAndValsSelf = {\r\n ...flexPropsAndValsSelfBase,\r\n 'flex-grow': flexPropsAndValsSelfBase.fg,\r\n 'flex-shrink': flexPropsAndValsSelfBase.fh,\r\n 'align-self': flexPropsAndValsSelfBase.as,\r\n order: flexPropsAndValsSelfBase.or,\r\n};\r\n\r\nexport const flexProsAndVals = {\r\n ...flexProsAndValsBase,\r\n ...flexPropsAndValsSelf,\r\n 'justify-content': flexProsAndValsBase.jc,\r\n 'align-items': flexProsAndValsBase.ai,\r\n center: flexProsAndValsBase.ce,\r\n 'flex-start': flexProsAndValsBase.fs,\r\n 'flex-end': flexProsAndValsBase.fe,\r\n 'space-between': flexProsAndValsBase.sb,\r\n 'space-around': flexProsAndValsBase.fs,\r\n 'flex-wrap': flexProsAndValsBase.fw,\r\n nowrap: flexProsAndValsBase.nw,\r\n w: flexProsAndValsBase.w,\r\n 'wrap-reverse': flexProsAndValsBase.wr,\r\n 'flex-direction': flexProsAndValsBase.fd,\r\n row: flexProsAndValsBase.r,\r\n 'row-reverse': flexProsAndValsBase.rr,\r\n column: flexProsAndValsBase.co,\r\n 'column-reverse': flexProsAndValsBase.cor,\r\n auto: flexProsAndValsBase.au,\r\n stretch: flexProsAndValsBase.st,\r\n baseline: flexProsAndValsBase.bl,\r\n initial: flexProsAndValsBase.in,\r\n inherit: flexProsAndValsBase.ih,\r\n};\r\n\r\nexport const flexAttrsSelf = Object.keys(flexPropsAndValsSelf);\r\n","const percentageConverter = (percentage: string) => {\r\n return '0¯' + percentage.replace('%', '');\r\n};\r\n\r\nexport default percentageConverter;\r\n","import { flexAttrsSelf } from '../config/flex';\r\nimport config from '../config/main';\r\nimport { processors, TDirectiveName } from '../config/processors';\r\nimport { IBpCals } from './buildCss';\r\nimport percentageConverter from './percentageConverter';\r\n\r\nexport interface IStyles {\r\n [name: string]: string;\r\n}\r\n\r\nconst createStyles = (directive: TDirectiveName, bps: IBpCals): IStyles => {\r\n const intConfig = config();\r\n const sizes = intConfig.sizes;\r\n const prefix = intConfig.prefix;\r\n const prop = processors[directive].ruleCss;\r\n const styles: IStyles = {};\r\n\r\n Object.keys(bps).forEach((bp) => {\r\n // preparing the className\r\n const shortNameClass = bps[bp].name;\r\n\r\n // just if have a percentage\r\n let nameClass = shortNameClass;\r\n if (shortNameClass.includes('%')) {\r\n nameClass = shortNameClass.replace(\r\n shortNameClass,\r\n percentageConverter(shortNameClass)\r\n );\r\n }\r\n\r\n const finalPrefix = prefix ? prefix + '-' : '';\r\n nameClass =\r\n finalPrefix +\r\n processors[directive].classPrefix +\r\n '-' +\r\n nameClass\r\n .replace(/\\//g, '\\\\/')\r\n .replace(/:/g, '\\\\:')\r\n .replace('@', '\\\\@')\r\n .split('.')\r\n .join('_');\r\n\r\n if (!intConfig.styles[nameClass]) {\r\n // Property and value\r\n let propAndVal;\r\n if (directive === 'flex') {\r\n propAndVal = bps[bp].value;\r\n const flexImportant = shortNameClass.includes('!')\r\n ? ';display:flex !important;'\r\n : ';display:flex;';\r\n\r\n // Searching a flex self inside. ['as' for 'align-self']\r\n const attrsFlexSelfs = flexAttrsSelf.filter((nameAttrFlex) =>\r\n shortNameClass.includes(nameAttrFlex + ':')\r\n );\r\n if (attrsFlexSelfs.length) {\r\n // if the items number of flex selft (+1) is diferrent so exists other flex attribute. Example: as:ce jc:ce\r\n if (attrsFlexSelfs.length + 1 !== shortNameClass.split(':').length) {\r\n propAndVal += flexImportant;\r\n }\r\n } else {\r\n propAndVal += flexImportant;\r\n }\r\n } else {\r\n propAndVal = prop + ':' + bps[bp].value;\r\n }\r\n\r\n let rule = '@media screen and ';\r\n let direct = false;\r\n if (!bp.includes('-')) {\r\n // no tiene until\r\n if (sizes[bp]) {\r\n rule += '(min-width: ' + sizes[bp] + 'px)';\r\n } else {\r\n rule = '.' + nameClass.replace(/!/g, '\\\\!') + '{' + propAndVal + '}';\r\n direct = true;\r\n }\r\n } else {\r\n const bpSplited = bp.split('-');\r\n const bp1 = bpSplited[0];\r\n if (bp1) rule += '(min-width: ' + sizes[bp1] + 'px) and ';\r\n const bp2 = bpSplited[1];\r\n rule += '(max-width: ' + (sizes[bp2] - 1) + 'px)';\r\n }\r\n\r\n if (!direct) {\r\n rule += '{.' + nameClass.replace(/!/g, '\\\\!') + '{' + propAndVal + '}}';\r\n }\r\n\r\n styles[nameClass] = rule;\r\n } else {\r\n styles[nameClass] = intConfig.styles[nameClass];\r\n }\r\n });\r\n return styles;\r\n};\r\n\r\nexport default createStyles;\r\n","import { IStyles } from './createStyles';\n\nconst replaceList = [\n ['/', ''],\n ['\\\\', '/'],\n ['/:', ':'],\n ['\\\\:', ':'],\n ['\\\\@', '@'],\n ['/@', '@'],\n];\n\nconst nameCleaner = (objStyles: IStyles): IStyles => {\n const obj: IStyles = {};\n for (const name in objStyles) {\n let newName = name;\n replaceList.forEach((reItem) => {\n newName = newName.split(reItem[0]).join(reItem[1]);\n });\n obj[newName] = objStyles[name];\n }\n return obj;\n};\n\nexport default nameCleaner;\n","import { TDirectiveName } from '../config/processors';\nimport insertRules from '../methods/insertRules';\nimport createStyles, { IStyles } from './createStyles';\nimport nameCleaner from './nameCleaner';\n\nexport interface IRBuildStyles {\n name: string;\n value: string;\n}\n\nexport interface IBpCals {\n [bpName: string]: IRBuildStyles;\n}\n\nexport interface IBuildCss {\n type: TDirectiveName;\n bps: IBpCals;\n deep: boolean;\n}\n\nconst buildCss = (data: IBuildCss): IStyles => {\n // creating the styles\n const objStyles = createStyles(data.type, data.bps);\n\n // Inserting CSS rules\n if (data.deep) {\n insertRules(objStyles);\n }\n\n // name classes cleaner\n return nameCleaner(objStyles);\n};\n\nexport default buildCss;\n","import prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\nimport calPercentage from '../helpers/calPercentage';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport getConfig from '../config/main';\r\nimport { IStyles } from '../helpers/createStyles';\r\n\r\nconst buildCols = (values: string, insertStyles = false): IStyles | Error => {\r\n let cols: number[];\r\n let bp;\r\n const bpCals: IBpCals = {};\r\n const config = getConfig();\r\n\r\n // Getting numbers\r\n let selectorName, propValue, paramPrepared;\r\n const directBp = Object.keys(config.breakpoints)[0];\r\n\r\n let err: boolean | Error = false;\r\n\r\n for (const item of values.split(' ')) {\r\n let param = item;\r\n selectorName = param;\r\n paramPrepared = prepareParam(param);\r\n bp = paramPrepared.breakPoints;\r\n param = paramPrepared.numbers;\r\n\r\n if (param.includes('/')) {\r\n const paramSplited = param.split('/');\r\n cols = [Number(paramSplited[0]), Number(paramSplited[1])];\r\n } else {\r\n if (paramPrepared.widthBp) {\r\n if (bp.includes('-')) {\r\n err = regError(\r\n 'SyntaxError',\r\n \"You can't determine a 'until breakpoint' when use the explicit columns max: \" +\r\n values\r\n );\r\n break;\r\n } else {\r\n cols = [Number(param), config.cols[bp] as number];\r\n }\r\n } else {\r\n cols = [Number(param), config.cols[directBp] as number];\r\n }\r\n }\r\n\r\n propValue = calPercentage(cols[0], cols[1]);\r\n if (paramPrepared.important) propValue += ' !important';\r\n\r\n bpCals[bp] = {\r\n name: selectorName,\r\n value: propValue,\r\n };\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'cols',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildCols;\r\n","import { flexAttrsSelf, flexProsAndVals } from '../config/flex';\r\nimport getConfig from '../config/main';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport { IStyles } from '../helpers/createStyles';\r\nimport prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\n\r\nconst buildFlex = (valFlex: string, insertStyles = false): IStyles | Error => {\r\n const bpCals: IBpCals = {};\r\n\r\n // Getting numbers\r\n let err: boolean | Error = false;\r\n const config = getConfig();\r\n const firstBp = Object.keys(config.breakpoints)[0];\r\n\r\n for (const param of valFlex.split(' ')) {\r\n let propVal;\r\n const paramPrepared = prepareParam(param);\r\n const bpNames = paramPrepared.breakPoints;\r\n const flexSplited = paramPrepared.numbers.split(':');\r\n const nameProp = flexSplited[0] as keyof typeof flexProsAndVals; // 'fc' o 'or'\r\n const valProp = flexSplited[1] as keyof typeof flexProsAndVals; // 'ce' o '1'\r\n let valAlias: string;\r\n\r\n if (!flexAttrsSelf.includes(nameProp)) {\r\n if (!flexProsAndVals[nameProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + nameProp + \"' in Flex vault.\"\r\n );\r\n break;\r\n }\r\n if (!flexProsAndVals[valProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + valProp + \"' in Flex vault.\"\r\n );\r\n break;\r\n }\r\n propVal =\r\n flexProsAndVals[nameProp].ruleCss +\r\n ':' +\r\n flexProsAndVals[valProp].ruleCss;\r\n valAlias = flexProsAndVals[valProp].classPrefix;\r\n } else {\r\n propVal = flexProsAndVals[nameProp].ruleCss + ':' + valProp;\r\n valAlias = valProp;\r\n }\r\n\r\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\r\n if (paramPrepared.important) {\r\n propVal += ' !important';\r\n sufixBp += '!';\r\n }\r\n\r\n let selectorName =\r\n flexProsAndVals[nameProp].classPrefix + ':' + valAlias + sufixBp;\r\n\r\n if (!bpCals[bpNames]) {\r\n bpCals[bpNames] = {\r\n name: selectorName,\r\n value: propVal,\r\n };\r\n } else {\r\n if (selectorName.includes('@')) selectorName = selectorName.split('@')[0]; // just here because will be contact with the other className\r\n let prevName = bpCals[bpNames].name.split('@')[0];\r\n if (bpCals[bpNames].name.includes('!') && !prevName.includes('!'))\r\n prevName += '!';\r\n\r\n bpCals[bpNames].name = prevName + '-' + selectorName + sufixBp;\r\n bpCals[bpNames].value += ';' + propVal;\r\n }\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'flex',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildFlex;\r\n","import calPercentage from './calPercentage';\n\nconst relativeMeasures = ['%', 'rem', 'em', 'ex', 'vw', 'vh', 'pt', 'cm', 'pc'];\n\nconst processedNumber = (n: string) => {\n let nProcessed;\n if (n.includes('/')) {\n nProcessed = n.split('/');\n nProcessed = calPercentage(\n parseFloat(nProcessed[0]),\n parseFloat(nProcessed[1])\n );\n } else if (n === 'auto') {\n nProcessed = 'auto';\n } else {\n const relativeUnits = relativeMeasures.filter((unit) => {\n return n.includes(unit);\n });\n if (relativeUnits.length) {\n nProcessed = n;\n } else {\n nProcessed = n === '0' ? n : n + 'px';\n }\n }\n return nProcessed;\n};\n\nexport default processedNumber;\n","import { TDirectiveName } from '../config/processors';\nimport buildCss, { IBpCals } from './buildCss';\nimport { IStyles } from './createStyles';\nimport prepareParam from './prepareParam';\nimport processedNumber from './processedNumber';\n\nconst buildAttr = (\n values: string,\n directive: TDirectiveName,\n insertStyles = false\n): IStyles => {\n const bpCals: IBpCals = {};\n\n values.split(' ').forEach((param) => {\n const paramProcessed = prepareParam(param);\n const bpNames = paramProcessed.breakPoints;\n\n // processing number values\n let propValue = paramProcessed.numbers\n .split('-')\n .map((n) => processedNumber(n))\n .join(' ');\n if (paramProcessed.important) propValue += ' !important';\n bpCals[bpNames] = {\n name: param,\n value: propValue,\n };\n });\n\n // Building the classNames and the styles to use.\n return buildCss({\n type: directive,\n bps: bpCals,\n deep: insertStyles,\n });\n};\n\nexport default buildAttr;\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPad = (valPads: string, insertStyles = false) => {\r\n return buildAttr(valPads, 'pad', insertStyles);\r\n};\r\n\r\nexport default buildPad;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadTop = (valPadTop: string, insertStyles = false) => {\r\n return buildAttr(valPadTop, 'padt', insertStyles);\r\n};\r\n\r\nexport default buildPadTop;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadRight = (valPadRight: string, insertStyles = false) => {\r\n return buildAttr(valPadRight, 'padr', insertStyles);\r\n};\r\n\r\nexport default buildPadRight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadBottom = (valPadBottom: string, insertStyles = false) => {\r\n return buildAttr(valPadBottom, 'padb', insertStyles);\r\n};\r\n\r\nexport default buildPadBottom;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildPadLeft = (valPadLeft: string, insertStyles = false) => {\r\n return buildAttr(valPadLeft, 'padl', insertStyles);\r\n};\r\n\r\nexport default buildPadLeft;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMar = (valMars: string, insertStyles = false) => {\r\n return buildAttr(valMars, 'mar', insertStyles);\r\n};\r\n\r\nexport default buildMar;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarTop = (valMarTop: string, insertStyles = false) => {\r\n return buildAttr(valMarTop, 'mart', insertStyles);\r\n};\r\n\r\nexport default buildMarTop;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarRight = (valMarRight: string, insertStyles = false) => {\r\n return buildAttr(valMarRight, 'marr', insertStyles);\r\n};\r\n\r\nexport default buildMarRight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarBottom = (valMarBottom: string, insertStyles = false) => {\r\n return buildAttr(valMarBottom, 'marb', insertStyles);\r\n};\r\n\r\nexport default buildMarBottom;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMarLeft = (valMarLeft: string, insertStyles = false) => {\r\n return buildAttr(valMarLeft, 'marl', insertStyles);\r\n};\r\n\r\nexport default buildMarLeft;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMaxWidth = (valMaxWidth: string, insertStyles = false) => {\r\n return buildAttr(valMaxWidth, 'mxw', insertStyles);\r\n};\r\n\r\nexport default buildMaxWidth;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMaxHeight = (valMaxHeight: string, insertStyles = false) => {\r\n return buildAttr(valMaxHeight, 'mxh', insertStyles);\r\n};\r\n\r\nexport default buildMaxHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMinWidth = (valMinWidth: string, insertStyles = false) => {\r\n return buildAttr(valMinWidth, 'miw', insertStyles);\r\n};\r\n\r\nexport default buildMinWidth;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildMinHeight = (valMinHeight: string, insertStyles = false) => {\r\n return buildAttr(valMinHeight, 'mih', insertStyles);\r\n};\r\n\r\nexport default buildMinHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildHeight = (valHeight: string, insertStyles = false) => {\r\n return buildAttr(valHeight, 'hgt', insertStyles);\r\n};\r\n\r\nexport default buildHeight;\r\n","import buildAttr from '../helpers/buildAttr';\r\n\r\nconst buildWidth = (valWidth: string, insertStyles = false) => {\r\n return buildAttr(valWidth, 'wdh', insertStyles);\r\n};\r\n\r\nexport default buildWidth;\r\n","const positionProsAndValsBase = {\r\n st: {\r\n ruleCss: 'static',\r\n classPrefix: 'st',\r\n },\r\n ab: {\r\n ruleCss: 'absolute',\r\n classPrefix: 'ab',\r\n },\r\n fi: {\r\n ruleCss: 'fixed',\r\n classPrefix: 'fi',\r\n },\r\n re: {\r\n ruleCss: 'relative',\r\n classPrefix: 're',\r\n },\r\n si: {\r\n ruleCss: 'sticky',\r\n classPrefix: 'si',\r\n },\r\n in: {\r\n ruleCss: 'initial',\r\n classPrefix: 'in',\r\n },\r\n ih: {\r\n ruleCss: 'inherit',\r\n classPrefix: 'ih',\r\n },\r\n};\r\n\r\nexport const positionProsAndVals = {\r\n ...positionProsAndValsBase,\r\n static: positionProsAndValsBase.st,\r\n absolute: positionProsAndValsBase.ab,\r\n fixed: positionProsAndValsBase.fi,\r\n relative: positionProsAndValsBase.re,\r\n sticky: positionProsAndValsBase.si,\r\n initial: positionProsAndValsBase.in,\r\n inherit: positionProsAndValsBase.ih,\r\n};\r\n","import getConfig from '../config/main';\r\nimport { positionProsAndVals } from '../config/position';\r\n\r\nimport buildCss, { IBpCals } from '../helpers/buildCss';\r\nimport { IStyles } from '../helpers/createStyles';\r\nimport prepareParam from '../helpers/prepareParam';\r\nimport regError from '../helpers/regError';\r\n\r\nconst buildPosition = (\r\n valPos: string,\r\n insertStyles = false\r\n): IStyles | Error => {\r\n const bpCals: IBpCals = {};\r\n\r\n // Getting numbers\r\n let err: boolean | Error = false;\r\n const config = getConfig();\r\n const firstBp = Object.keys(config.breakpoints)[0];\r\n\r\n for (const param of valPos.split(' ')) {\r\n let propVal;\r\n const paramPrepared = prepareParam(param);\r\n const bpNames = paramPrepared.breakPoints;\r\n const nameProp = paramPrepared.numbers as keyof typeof positionProsAndVals;\r\n\r\n if (!positionProsAndVals[nameProp]) {\r\n err = regError(\r\n 'Non-existent Alias',\r\n \"Don't exists the alias '\" + nameProp + \"' in Position vault.\"\r\n );\r\n break;\r\n }\r\n\r\n propVal = positionProsAndVals[nameProp].ruleCss;\r\n const className = positionProsAndVals[nameProp].classPrefix;\r\n\r\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\r\n\r\n if (paramPrepared.important) {\r\n propVal += ' !important';\r\n sufixBp += '!';\r\n }\r\n\r\n bpCals[bpNames] = {\r\n name: className + sufixBp,\r\n value: propVal,\r\n };\r\n }\r\n\r\n if (err) return err;\r\n\r\n // Building the classNames and the styles to use.\r\n return buildCss({\r\n type: 'pos',\r\n bps: bpCals,\r\n deep: insertStyles,\r\n });\r\n};\r\n\r\nexport default buildPosition;\r\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildTop = (val: string, insertStyles = false) => {\n return buildAttr(val, 't', insertStyles);\n};\n\nexport default buildTop;\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildRight = (val: string, insertStyles = false) => {\n return buildAttr(val, 'r', insertStyles);\n};\n\nexport default buildRight;\n","import buildAttr from '../helpers/buildAttr';\r\nimport { IStyles } from '../helpers/createStyles';\r\n\r\nconst buildBottom = (val: string, insertStyles = false): IStyles => {\r\n return buildAttr(val, 'b', insertStyles);\r\n};\r\n\r\nexport default buildBottom;\r\n","import buildAttr from '../helpers/buildAttr';\n\nconst buildLeft = (val: string, insertStyles = false) => {\n return buildAttr(val, 'l', insertStyles);\n};\n\nexport default buildLeft;\n","const displayProsAndValsBase = {\n bl: {\n ruleCss: 'block',\n classPrefix: 'bl',\n },\n il: {\n ruleCss: 'inline',\n classPrefix: 'il',\n },\n ib: {\n ruleCss: 'inline-block',\n classPrefix: 'ib',\n },\n fx: {\n ruleCss: 'flex',\n classPrefix: 'fx',\n },\n if: {\n ruleCss: 'inline-flex',\n classPrefix: 'if',\n },\n no: {\n ruleCss: 'none',\n classPrefix: 'no',\n },\n in: {\n ruleCss: 'initial',\n classPrefix: 'in',\n },\n ih: {\n ruleCss: 'inherit',\n classPrefix: 'ih',\n },\n};\n\nexport const displayProsAndVals = {\n ...displayProsAndValsBase,\n block: displayProsAndValsBase.bl,\n inline: displayProsAndValsBase.il,\n 'inline-block': displayProsAndValsBase.ib,\n flex: displayProsAndValsBase.fx,\n 'inline-flex': displayProsAndValsBase.if,\n none: displayProsAndValsBase.no,\n initial: displayProsAndValsBase.in,\n inherit: displayProsAndValsBase.ih,\n};\n","import getConfig from '../config/main';\nimport { displayProsAndVals } from '../config/display';\n\nimport buildCss, { IBpCals } from '../helpers/buildCss';\nimport { IStyles } from '../helpers/createStyles';\nimport prepareParam from '../helpers/prepareParam';\nimport regError from '../helpers/regError';\n\nconst buildDisplay = (\n valDisplay: string,\n insertStyles = false\n): IStyles | Error => {\n const bpCals: IBpCals = {};\n\n // Getting numbers\n let err: boolean | Error = false;\n const config = getConfig();\n const firstBp = Object.keys(config.breakpoints)[0];\n\n for (const param of valDisplay.split(' ')) {\n let propVal;\n const paramPrepared = prepareParam(param);\n const bpNames = paramPrepared.breakPoints;\n const nameProp = paramPrepared.numbers as keyof typeof displayProsAndVals;\n\n if (!displayProsAndVals[nameProp]) {\n err = regError(\n 'Non-existent Alias',\n \"Don't exists the alias '\" + nameProp + \"' in display vault.\"\n );\n break;\n }\n\n propVal = displayProsAndVals[nameProp].ruleCss;\n const className = displayProsAndVals[nameProp].classPrefix;\n\n let sufixBp = bpNames === firstBp ? '' : '@' + bpNames;\n\n if (paramPrepared.important) {\n propVal += ' !important';\n sufixBp += '!';\n }\n\n bpCals[bpNames] = {\n name: className + sufixBp,\n value: propVal,\n };\n }\n\n if (err) return err;\n\n // Building the classNames and the styles to use.\n return buildCss({\n type: 'd',\n bps: bpCals,\n deep: insertStyles,\n });\n};\n\nexport default buildDisplay;\n","import { IStyles } from './createStyles';\n\nexport interface IBuildXY {\n values: string;\n builderA: (valPadA: string, insertStyles: boolean) => IStyles;\n builderB: (valPadB: string, insertStyles: boolean) => IStyles;\n insertStyles: boolean;\n}\n\nconst buildXY = (data: IBuildXY): IStyles => {\n const stylesA = data.builderA(data.values, data.insertStyles);\n const stylesB = data.builderB(data.values, data.insertStyles);\n const allStyles: IStyles = {};\n for (const style in stylesA) {\n allStyles[style] = stylesA[style];\n }\n for (const style in stylesB) {\n allStyles[style] = stylesB[style];\n }\n return allStyles;\n};\n\nexport default buildXY;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildPadLeft from './buildPadLeft';\nimport buildPadRight from './buildPadRight';\n\nconst buildPadX = (valPadX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valPadX,\n builderA: buildPadRight,\n builderB: buildPadLeft,\n insertStyles,\n });\n};\n\nexport default buildPadX;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildPadBottom from './buildPadBottom';\nimport buildPadTop from './buildPadTop';\n\nconst buildPadY = (valPadX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valPadX,\n builderA: buildPadTop,\n builderB: buildPadBottom,\n insertStyles,\n });\n};\n\nexport default buildPadY;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildMarLeft from './buildMarLeft';\nimport buildMarRight from './buildMarRight';\n\nconst buildMarX = (valMarX: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valMarX,\n builderA: buildMarRight,\n builderB: buildMarLeft,\n insertStyles,\n });\n};\n\nexport default buildMarX;\n","import buildXY from '../helpers/buildXY';\nimport { IStyles } from '../helpers/createStyles';\nimport buildMarBottom from './buildMarBottom';\nimport buildMarTop from './buildMarTop';\n\nconst buildMarY = (valMarY: string, insertStyles = false): IStyles => {\n return buildXY({\n values: valMarY,\n builderA: buildMarTop,\n builderB: buildMarBottom,\n insertStyles,\n });\n};\n\nexport default buildMarY;\n","import buildCols from '../methods/buildCols';\nimport buildFlex from '../methods/buildFlex';\nimport buildPad from '../methods/buildPad';\nimport buildPadTop from '../methods/buildPadTop';\nimport buildPadRight from '../methods/buildPadRight';\nimport buildPadBottom from '../methods/buildPadBottom';\nimport buildPadLeft from '../methods/buildPadLeft';\nimport buildMar from '../methods/buildMar';\nimport buildMarTop from '../methods/buildMarTop';\nimport buildMarRight from '../methods/buildMarRight';\nimport buildMarBottom from '../methods/buildMarBottom';\nimport buildMarLeft from '../methods/buildMarLeft';\nimport buildMaxWidth from '../methods/buildMaxWidth';\nimport buildMaxHeight from '../methods/buildMaxHeight';\nimport buildMinWidth from '../methods/buildMinWidth';\nimport buildMinHeight from '../methods/buildMinHeight';\nimport buildHeight from '../methods/buildHeight';\nimport buildWidth from '../methods/buildWidth';\nimport buildPosition from '../methods/buildPosition';\nimport buildTop from '../methods/buildTop';\nimport buildRight from '../methods/buildRight';\nimport buildBottom from '../methods/buildBottom';\nimport buildLeft from '../methods/buildLeft';\nimport buildDisplay from '../methods/buildDisplay';\nimport buildPadX from '../methods/buildPadX';\nimport buildPadY from '../methods/buildPadY';\nimport buildMarX from '../methods/buildMarX';\nimport buildMarY from '../methods/buildMarY';\n\nimport { IStyles } from '../helpers/createStyles';\n\ntype TDirectiveNameBase =\n | 'cols'\n | 'pad'\n | 'padt'\n | 'padr'\n | 'padb'\n | 'padl'\n | 'padx'\n | 'pady'\n | 'mar'\n | 'mart'\n | 'marr'\n | 'marb'\n | 'marl'\n | 'marx'\n | 'mary'\n | 'flex'\n | 'mxw'\n | 'mxh'\n | 'miw'\n | 'mih'\n | 'wdh'\n | 'hgt'\n | 'pos'\n | 't'\n | 'r'\n | 'b'\n | 'l'\n | 'd';\n\ntype TDirectiveNameExtended =\n | 'c'\n | 'fx'\n | 'p'\n | 'padding'\n | 'pt'\n | 'padding-top'\n | 'pr'\n | 'padding-right'\n | 'pb'\n | 'padding-bottom'\n | 'pl'\n | 'padding-left'\n | 'py'\n | 'padding-y'\n | 'px'\n | 'padding-x'\n | 'my'\n | 'margin-y'\n | 'mx'\n | 'margin-x'\n | 'm'\n | 'margin'\n | 'mt'\n | 'margin-top'\n | 'mr'\n | 'margin-right'\n | 'mb'\n | 'margin-bottom'\n | 'ml'\n | 'margin-left'\n | 'w'\n | 'width'\n | 'h'\n | 'height'\n | 'max-width'\n | 'max-height'\n | 'min-width'\n | 'min-height'\n | 'position'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'display';\n\nexport type TDirectiveName = TDirectiveNameBase | TDirectiveNameExtended;\n\nexport interface IProcessor {\n build: (values: string, insertStyles: boolean) => IStyles | Error;\n ruleCss: string | string[];\n classPrefix: string;\n}\n\nconst processorsBase: Record = {\n cols: {\n build: buildCols,\n ruleCss: 'width',\n classPrefix: 'c',\n },\n\n // Paddings\n pad: {\n build: buildPad,\n ruleCss: 'padding',\n classPrefix: 'p',\n },\n padt: {\n build: buildPadTop,\n ruleCss: 'padding-top',\n classPrefix: 'pt',\n },\n padr: {\n build: buildPadRight,\n ruleCss: 'padding-right',\n classPrefix: 'pr',\n },\n padb: {\n build: buildPadBottom,\n ruleCss: 'padding-bottom',\n classPrefix: 'pb',\n },\n padl: {\n build: buildPadLeft,\n ruleCss: 'padding-left',\n classPrefix: 'pl',\n },\n padx: {\n build: buildPadX,\n ruleCss: ['padding-left', 'padding-right'],\n classPrefix: 'px',\n },\n pady: {\n build: buildPadY,\n ruleCss: ['padding-top', 'padding-bottom'],\n classPrefix: 'py',\n },\n\n // Margin\n mar: {\n build: buildMar,\n ruleCss: 'margin',\n classPrefix: 'm',\n },\n mart: {\n build: buildMarTop,\n ruleCss: 'margin-top',\n classPrefix: 'mt',\n },\n marr: {\n build: buildMarRight,\n ruleCss: 'margin-right',\n classPrefix: 'mr',\n },\n marb: {\n build: buildMarBottom,\n ruleCss: 'margin-bottom',\n classPrefix: 'mb',\n },\n marl: {\n build: buildMarLeft,\n ruleCss: 'margin-left',\n classPrefix: 'ml',\n },\n marx: {\n build: buildMarX,\n ruleCss: ['margin-left', 'margin-right'],\n classPrefix: 'px',\n },\n mary: {\n build: buildMarY,\n ruleCss: ['margin-top', 'margin-bottom'],\n classPrefix: 'py',\n },\n\n // Flex Box\n flex: {\n build: buildFlex,\n ruleCss: 'display: flex',\n classPrefix: 'fx',\n },\n\n // Max & Min Width & Height\n mxw: {\n build: buildMaxWidth,\n ruleCss: 'max-width',\n classPrefix: 'mxw',\n },\n\n mxh: {\n build: buildMaxHeight,\n ruleCss: 'max-height',\n classPrefix: 'mxh',\n },\n\n miw: {\n build: buildMinWidth,\n ruleCss: 'min-width',\n classPrefix: 'miw',\n },\n\n mih: {\n build: buildMinHeight,\n ruleCss: 'min-height',\n classPrefix: 'mih',\n },\n\n // Width & Height\n wdh: {\n build: buildWidth,\n ruleCss: 'width',\n classPrefix: 'w',\n },\n\n hgt: {\n build: buildHeight,\n ruleCss: 'height',\n classPrefix: 'h',\n },\n\n // Position\n pos: {\n build: buildPosition,\n ruleCss: 'position',\n classPrefix: 'pos',\n },\n t: {\n build: buildTop,\n ruleCss: 'top',\n classPrefix: 't',\n },\n r: {\n build: buildRight,\n ruleCss: 'right',\n classPrefix: 'r',\n },\n b: {\n build: buildBottom,\n ruleCss: 'bottom',\n classPrefix: 'b',\n },\n l: {\n build: buildLeft,\n ruleCss: 'left',\n classPrefix: 'l',\n },\n d: {\n build: buildDisplay,\n ruleCss: 'display',\n classPrefix: 'd',\n },\n};\n\nexport const processors: Record = {\n ...processorsBase,\n c: processorsBase.cols,\n fx: processorsBase.flex,\n p: processorsBase.pad,\n padding: processorsBase.pad,\n pt: processorsBase.padt,\n 'padding-top': processorsBase.padt,\n pr: processorsBase.padr,\n 'padding-right': processorsBase.padr,\n pb: processorsBase.padb,\n 'padding-bottom': processorsBase.padb,\n pl: processorsBase.padl,\n 'padding-left': processorsBase.padl,\n py: processorsBase.pady,\n 'padding-y': processorsBase.pady,\n px: processorsBase.padx,\n 'padding-x': processorsBase.padx,\n m: processorsBase.mar,\n margin: processorsBase.mar,\n mt: processorsBase.mart,\n 'margin-top': processorsBase.mart,\n mr: processorsBase.marr,\n 'margin-right': processorsBase.marr,\n mb: processorsBase.marb,\n 'margin-bottom': processorsBase.marb,\n ml: processorsBase.marl,\n 'margin-left': processorsBase.marl,\n my: processorsBase.mary,\n 'margin-y': processorsBase.mary,\n mx: processorsBase.marx,\n 'margin-x': processorsBase.marx,\n w: processorsBase.wdh,\n width: processorsBase.wdh,\n h: processorsBase.hgt,\n height: processorsBase.hgt,\n 'max-width': processorsBase.mxw,\n 'max-height': processorsBase.mxh,\n 'min-width': processorsBase.miw,\n 'min-height': processorsBase.mih,\n position: processorsBase.pos,\n top: processorsBase.t,\n right: processorsBase.r,\n bottom: processorsBase.b,\n left: processorsBase.l,\n display: processorsBase.d,\n};\n","import { processors, TDirectiveName } from '../config/processors';\r\n\r\nconst getParameters = (\r\n Node: HTMLElement | Element\r\n): Partial> => {\r\n const params: Partial> = {};\r\n const attrs = Node.attributes;\r\n const paramNames = Object.keys(processors);\r\n Array.prototype.forEach.call(attrs, (attr) => {\r\n if (paramNames.includes(attr.name)) {\r\n if (attr.value !== '')\r\n params[attr.name as TDirectiveName] = attr.value\r\n .trim()\r\n .split(' ')\r\n .filter((item: string) => item)\r\n .join(' ');\r\n }\r\n });\r\n return params;\r\n};\r\n\r\nexport default getParameters;\r\n","import { processors, TDirectiveName } from '../config/processors';\nimport { IStyles } from '../helpers/createStyles';\n\nexport interface IBuildResult {\n [prop: string]: IStyles | boolean;\n}\n\nconst build = (\n obj: Partial>,\n insertStyles = false\n): Partial | Error => {\n const rObj: Partial = {};\n let err: Error | boolean = false;\n for (const prop in obj) {\n const propData = processors[prop as TDirectiveName];\n const objStyles: IStyles | Error = propData.build(\n obj[prop as TDirectiveName] as string,\n insertStyles\n );\n if (objStyles instanceof Error) {\n err = objStyles;\n break;\n } else {\n rObj[prop] = objStyles;\n }\n }\n\n if (err) return err;\n return rObj;\n};\n\nexport default build;\n","import getConfig from '../config/main';\n\nconst addClasses = (\n Node: HTMLElement | Element,\n classesNames: string,\n overwrite?: boolean\n): Promise => {\n return new Promise((resolve) => {\n const config = getConfig();\n const names = classesNames.split(' ');\n let classesToAdd: string[] = names;\n if (!overwrite) {\n classesToAdd = names.filter((name) => !Node.classList.contains(name));\n if (!classesToAdd.length) {\n resolve();\n return;\n }\n }\n\n const obsNode = new config.context.MutationObserver((mutations) => {\n const target = mutations[0].target;\n const currentClasses = (target as Element).className.split(' ');\n const containsAll = names.every((element) =>\n currentClasses.includes(element)\n );\n if (containsAll) {\n obsNode.disconnect();\n resolve();\n }\n });\n obsNode.observe(Node, {\n childList: false,\n subtree: false,\n attributes: true,\n attributeFilter: ['class'],\n characterData: false,\n });\n\n if (overwrite) {\n Node.className = classesNames;\n } else {\n const space = Node.hasAttribute('class') ? ' ' : '';\n Node.className += space + classesToAdd.join(' ');\n }\n });\n};\n\nexport default addClasses;\n","import getConfig from '../config/main';\n\nexport const removeProp = (\n Node: HTMLElement | Element,\n propName: string,\n context: Window & typeof globalThis\n): Promise => {\n return new Promise((resolve) => {\n if (!Node.hasAttribute(propName)) {\n resolve();\n return;\n }\n const obsNode = new context.MutationObserver(() => {\n obsNode.disconnect();\n resolve();\n });\n obsNode.observe(Node, {\n childList: false,\n subtree: false,\n attributes: true,\n attributeFilter: [propName],\n characterData: false,\n });\n Node.removeAttribute(propName);\n });\n};\n\nexport const removeProps = (\n Node: HTMLElement | Element,\n propNames: string[],\n context: Window & typeof globalThis\n): Promise => {\n return new Promise((resolve) => {\n const promises = propNames.map((name) => removeProp(Node, name, context));\n Promise.all(promises).then(() => resolve());\n });\n};\n\nconst removeAttr = (\n Node: HTMLElement | Element,\n propNames: string | string[]\n): Promise => {\n return new Promise((resolve) => {\n const config = getConfig();\n if (Array.isArray(propNames)) {\n removeProps(Node, propNames, config.context).then(resolve);\n } else {\n removeProp(Node, propNames, config.context).then(resolve);\n }\n });\n};\n\nexport default removeAttr;\n","import getConfig from '../config/main';\nimport addClasses from '../utils/addClasses';\nimport removeAttr from '../utils/removeAttr';\n\nexport interface IEventReady {\n node: HTMLElement | Element;\n directive: string | string[];\n classes: string;\n resolve: (value: void | Error | PromiseLike) => void;\n}\n\nconst eventReady = ({ node, directive, classes, resolve }: IEventReady) => {\n const config = getConfig();\n removeAttr(node, directive)\n .then(() => addClasses(node, classes))\n .then(() => {\n resolve();\n const event = new config.context.CustomEvent('layout:ready');\n node.dispatchEvent(event);\n });\n};\n\nexport default eventReady;\n","import { IStyles } from '../helpers/createStyles';\nimport regError from '../helpers/regError';\nimport build, { IBuildResult } from './build';\nimport getParameters from './getParameters';\nimport { TDirectiveName } from '../config/processors';\nimport eventReady from '../helpers/eventReady';\n\nconst set = (\n Node: HTMLElement | Element,\n parameters?: Partial>\n): Promise => {\n return new Promise((resolve, reject) => {\n const params = parameters || getParameters(Node);\n const arrParams = Object.keys(params);\n if (!arrParams.length) {\n const err = regError(\n 'Parameter Missing',\n \"don't exists any parameter to process\",\n Node\n );\n reject(err);\n return;\n }\n\n const toBuild: Partial> = {};\n for (const prop in params) {\n toBuild[prop as TDirectiveName] = params[prop as TDirectiveName];\n }\n\n // creating classes names and inserting that classes to the core\n const classesObj = build(toBuild as Record, true);\n if (classesObj instanceof Error) {\n reject(classesObj);\n return;\n }\n\n // adding classes\n const classes = classesObj as Partial;\n const classesNames = Object.keys(classes)\n .map((name: string) => Object.keys(classes[name] as IStyles))\n .flat()\n .join(' ');\n\n // removing unnecessary props\n eventReady({\n node: Node,\n directive: arrParams,\n classes: classesNames,\n resolve,\n });\n });\n};\n\nexport default set;\n","import regError from './regError';\n\nconst directiveValues = (\n Node: HTMLElement | Element,\n directives: string[]\n): string | Error => {\n const directiveValues = directives\n .map((item) => Node.getAttribute(item))\n .filter((item) => item)\n .join(' ');\n return !directiveValues\n ? regError(\n 'Empty',\n 'The value of the directives \"' + directives.join(', ') + '\" are empty',\n Node\n )\n : directiveValues;\n};\n\nexport default directiveValues;\n","import buildFlex from './buildFlex';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from '../helpers/directiveValues';\n\nconst setFlex = (\n Node: HTMLElement | Element,\n flexValues?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = flexValues || directiveValues(Node, ['flex', 'fx']);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = buildFlex(values as string, true);\n if (objStyles instanceof Error) {\n reject(objStyles);\n return;\n }\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive: 'flex',\n classes: Object.keys(objStyles).join(' '),\n resolve,\n });\n });\n};\n\nexport default setFlex;\n","import buildCols from './buildCols';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from '../helpers/directiveValues';\n\nconst setCols = (\n Node: HTMLElement | Element,\n columns?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = columns || directiveValues(Node, ['c', 'cols']);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = buildCols(values as string, true);\n if (objStyles instanceof Error) {\n reject(objStyles);\n return;\n }\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive: 'cols',\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setCols;\n","import buildAttr from '../helpers/buildAttr';\nimport { TDirectiveName } from '../config/processors';\nimport eventReady from '../helpers/eventReady';\nimport directiveValues from './directiveValues';\n\nconst setAttr = (\n Node: HTMLElement | Element,\n directives: TDirectiveName[],\n vals?: string\n): Promise => {\n return new Promise((resolve, reject) => {\n const values = vals || directiveValues(Node, directives);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const directive = directives[0];\n const objStyles = buildAttr(values as string, directive, true);\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: Node,\n directive,\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setAttr;\n","import setAttr from '../helpers/setAttr';\n\nconst setHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['hgt', 'h'], values);\n};\n\nexport default setHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marb', 'mb', 'margin-bottom'], values);\n};\n\nexport default setMarBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marl', 'ml', 'margin-left'], values);\n};\n\nexport default setMarLeft;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['marr', 'mr', 'margin-right'], values);\n};\n\nexport default setMarRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMar = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mar', 'm', 'margin'], values);\n};\n\nexport default setMar;\n","import setAttr from '../helpers/setAttr';\n\nconst setMarTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mart', 'mt', 'margin-top'], values);\n};\n\nexport default setMarTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setMaxWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mxw', 'max-width'], values);\n};\n\nexport default setMaxWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setMinHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mih', 'min-height'], values);\n};\n\nexport default setMinHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setMinWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['miw', 'min-width'], values);\n};\n\nexport default setMinWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padb', 'pb', 'padding-bottom'], values);\n};\n\nexport default setPadBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padl', 'pl', 'padding-left'], values);\n};\n\nexport default setPadLeft;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padr', 'pr', 'padding-right'], values);\n};\n\nexport default setPadRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setPad = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['pad', 'p', 'padding'], values);\n};\n\nexport default setPad;\n","import setAttr from '../helpers/setAttr';\n\nconst setPadTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['padt', 'pt', 'padding-top'], values);\n};\n\nexport default setPadTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setWidth = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['wdh', 'width'], values);\n};\n\nexport default setWidth;\n","import setAttr from '../helpers/setAttr';\n\nconst setMaxHeight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['mxh', 'max-height'], values);\n};\n\nexport default setMaxHeight;\n","import setAttr from '../helpers/setAttr';\n\nconst setPosition = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['pos', 'position'], values);\n};\n\nexport default setPosition;\n","import setAttr from '../helpers/setAttr';\n\nconst setTop = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['t', 'top'], values);\n};\n\nexport default setTop;\n","import setAttr from '../helpers/setAttr';\n\nconst setRight = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['r', 'right'], values);\n};\n\nexport default setRight;\n","import setAttr from '../helpers/setAttr';\n\nconst setBottom = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['b', 'bottom'], values);\n};\n\nexport default setBottom;\n","import setAttr from '../helpers/setAttr';\n\nconst setLeft = (\n Node: HTMLElement | Element,\n values?: string\n): Promise => {\n return setAttr(Node, ['l', 'left'], values);\n};\n\nexport default setLeft;\n","import { IStyles } from './createStyles';\nimport directiveValues from './directiveValues';\nimport eventReady from './eventReady';\n\nexport interface ISetterXY {\n Node: HTMLElement | Element;\n directives: string[];\n builder: (valPadX: string, insertStyles: boolean) => IStyles;\n vals?: string;\n}\n\nconst setterXY = (data: ISetterXY): Promise => {\n return new Promise((resolve, reject) => {\n const values = data.vals || directiveValues(data.Node, data.directives);\n if (!values) return reject(values);\n\n // Creating, inserting, and adding classNames of rules in Node.\n const objStyles = data.builder(values as string, true);\n const classesToAdd = Object.keys(objStyles).join(' ');\n\n // removing prop of Node and adding the corresponding classes\n eventReady({\n node: data.Node,\n directive: data.directives,\n classes: classesToAdd,\n resolve,\n });\n });\n};\n\nexport default setterXY;\n","import buildPadX from './buildPadX';\nimport setterXY from '../helpers/setterXY';\n\nconst setPadX = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['padx', 'px', 'padding-x'],\n builder: buildPadX,\n vals,\n });\n};\n\nexport default setPadX;\n","import buildPadY from './buildPadY';\nimport setterXY from '../helpers/setterXY';\n\nconst setPadY = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['pady', 'py', 'padding-y'],\n builder: buildPadY,\n vals,\n });\n};\n\nexport default setPadY;\n","import buildMarX from './buildMarX';\nimport setterXY from '../helpers/setterXY';\n\nconst setMarX = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['marx', 'mx', 'margin-x'],\n builder: buildMarX,\n vals,\n });\n};\n\nexport default setMarX;\n","import buildMarY from './buildMarY';\nimport setterXY from '../helpers/setterXY';\n\nconst setMarY = (\n Node: HTMLElement | Element,\n vals?: string\n): Promise => {\n return setterXY({\n Node,\n directives: ['mary', 'my', 'margin-y'],\n builder: buildMarY,\n vals,\n });\n};\n\nexport default setMarY;\n","import { TDirectiveName } from './../config/processors';\r\nimport { processors } from '../config/processors';\r\nimport addClasses from '../utils/addClasses';\r\nimport removeAttr from '../utils/removeAttr';\r\n\r\nconst reset = (Node: HTMLElement | Element): Promise => {\r\n return new Promise((resolve) => {\r\n const classPrefixes = new Set(\r\n Object.keys(processors).map(\r\n (item) => processors[item as TDirectiveName].classPrefix\r\n )\r\n );\r\n const layouterClasses = [...classPrefixes];\r\n const restClass = Node.className.split(' ').filter((name) => {\r\n if (!name.includes('-')) {\r\n return true;\r\n } else {\r\n const findClass = layouterClasses.find((item) => {\r\n const nLength = item.length;\r\n const namePrefix = name.substring(0, nLength + 1);\r\n return namePrefix === item + '-';\r\n });\r\n return !findClass;\r\n }\r\n });\r\n\r\n if (restClass.length) {\r\n const classesName = restClass.join(' ');\r\n addClasses(Node, classesName, true).then(() => {\r\n resolve();\r\n });\r\n } else {\r\n removeAttr(Node, 'class').then(() => {\r\n resolve();\r\n });\r\n }\r\n });\r\n};\r\n\r\nexport default reset;\r\n","import { ILayouter } from './../layouter';\nimport { processors } from '../config/processors';\n\nconst nodesNotAccepted = [\n 'animate',\n 'animateMotion',\n 'animateTransform',\n 'circle',\n 'clipPath',\n 'defs',\n 'desc',\n 'discard',\n 'ellipse',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'filter',\n 'foreignObject',\n 'g',\n 'hatch',\n 'hatchpath',\n 'image',\n 'line',\n 'linearGradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialGradient',\n 'rect',\n 'set',\n 'stop',\n 'style',\n 'svg',\n 'switch',\n 'symbol',\n 'text',\n 'textPath',\n 'title',\n 'tspan',\n 'use',\n 'view',\n];\n\nconst searchAndProcess = (\n layouter: ILayouter,\n context: Document | HTMLElement | Element\n) => {\n return new Promise((resolve) => {\n const props = Object.keys(processors);\n const attrs = props.map((prop) => `[${prop}]`).join(', ');\n const nodes = context.querySelectorAll(attrs);\n if (!nodes.length) {\n resolve(layouter);\n return;\n }\n\n const setNodes = new Set();\n Array.prototype.filter\n .call(\n nodes,\n (itemNode) =>\n !nodesNotAccepted.includes(itemNode.nodeName.toLowerCase())\n )\n .forEach((item) => setNodes.add(item));\n const promises: Promise[] = [];\n setNodes.forEach((node) => {\n promises.push(layouter.set(node as Element | HTMLElement));\n });\n Promise.all(promises).then(resolve);\n });\n};\n\nexport default searchAndProcess;\n","import { ILayouter } from './../layouter';\nimport { processors } from '../config/processors';\nimport getConfig from '../config/main';\nimport searchAndProcess from './searchAndProcess';\n\nconst mainObserver = (layouter: ILayouter) => {\n const config = getConfig();\n const props = Object.keys(processors);\n const obsBody = new layouter.context.MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type === 'childList') {\n if (!mutation.addedNodes.length) {\n continue;\n }\n mutation.addedNodes.forEach((node) => {\n if (node instanceof HTMLElement) {\n const props = layouter.getParameters(node);\n if (Object.keys(props).length) {\n layouter.set(node, props);\n }\n searchAndProcess(layouter, node);\n }\n });\n } else if (mutation.type === 'attributes') {\n const node = mutation.target;\n if (node instanceof HTMLElement) {\n const props = layouter.getParameters(node);\n if (Object.keys(props).length) {\n layouter.set(node, props);\n }\n }\n }\n }\n });\n const observerOptions = {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: props,\n characterData: false,\n };\n obsBody.observe(config.context.document.body, observerOptions);\n};\n\nexport default mainObserver;\n","import { IConfig, IConfigUser, setConfig, updateConfig } from './config/main';\nimport getParameters from './methods/getParameters';\n\nimport build from './methods/build';\nimport buildCols from './methods/buildCols';\nimport buildFlex from './methods/buildFlex';\nimport buildPad from './methods/buildPad';\nimport buildPadTop from './methods/buildPadTop';\nimport buildPadRight from './methods/buildPadRight';\nimport buildPadBottom from './methods/buildPadBottom';\nimport buildPadLeft from './methods/buildPadLeft';\nimport buildMar from './methods/buildMar';\nimport buildMarTop from './methods/buildMarTop';\nimport buildMarRight from './methods/buildMarRight';\nimport buildMarBottom from './methods/buildMarBottom';\nimport buildMarLeft from './methods/buildMarLeft';\nimport buildMaxWidth from './methods/buildMaxWidth';\nimport buildMaxHeight from './methods/buildMaxHeight';\nimport buildMinWidth from './methods/buildMinWidth';\nimport buildMinHeight from './methods/buildMinHeight';\nimport buildHeight from './methods/buildHeight';\nimport buildWidth from './methods/buildWidth';\nimport buildPosition from './methods/buildPosition';\nimport buildTop from './methods/buildTop';\nimport buildRight from './methods/buildRight';\nimport buildBottom from './methods/buildBottom';\nimport buildLeft from './methods/buildLeft';\nimport buildPadX from './methods/buildPadX';\nimport buildPadY from './methods/buildPadY';\nimport buildMarX from './methods/buildMarX';\nimport buildMarY from './methods/buildMarY';\n\nimport set from './methods/set';\nimport setFlex from './methods/setFlex';\nimport setCols from './methods/SetCols';\nimport setHeight from './methods/setHeight';\nimport setMarBottom from './methods/setMarBottom';\nimport setMarLeft from './methods/setMarLeft';\nimport setMarRight from './methods/setMarRight';\nimport setMar from './methods/setMar';\nimport setMarTop from './methods/setMarTop';\nimport setMaxWidth from './methods/setMaxWidth';\nimport setMinHeight from './methods/setMinHeight';\nimport setMinWidth from './methods/setMinWidth';\nimport setPadBottom from './methods/setPadBottom';\nimport setPadLeft from './methods/setPadLeft';\nimport setPadRight from './methods/setPadRight';\nimport setPad from './methods/setPad';\nimport setPadTop from './methods/setPadTop';\nimport setWidth from './methods/setWidth';\nimport setMaxHeight from './methods/setMaxHeight';\nimport setPosition from './methods/setPosition';\nimport setTop from './methods/setTop';\nimport setRight from './methods/setRight';\nimport setBottom from './methods/setBottom';\nimport setLeft from './methods/setLeft';\nimport setPadX from './methods/setPadX';\nimport setPadY from './methods/setPadY';\nimport setMarX from './methods/setMarX';\nimport setMarY from './methods/setMarY';\n\nimport insertRules from './methods/insertRules';\nimport reset from './methods/reset';\n\nimport { IStyles } from './helpers/createStyles';\nimport { IBuildResult } from './methods/build';\nimport searchAndProcess from './helpers/searchAndProcess';\nimport mainObserver from './helpers/mainObserver';\nimport { TDirectiveName, processors, IProcessor } from './config/processors';\n\nexport interface ILayouter extends IConfig {\n getParameters: (\n Node: HTMLElement | Element\n ) => Partial>;\n updateConfig: (userConfig: Partial>) => IConfig;\n build: (\n obj: Partial>,\n insertStyles?: boolean\n ) => Partial | Error;\n buildCols: (valCols: string, insertStyles?: boolean) => IStyles | Error;\n buildFlex: (valFlex: string, insertStyles?: boolean) => IStyles | Error;\n buildPad: (valPads: string, insertStyles?: boolean) => IStyles;\n buildPadTop: (valPadTop: string, insertStyles?: boolean) => IStyles;\n buildPadRight: (valPadRight: string, insertStyles?: boolean) => IStyles;\n buildPadBottom: (valPadBottom: string, insertStyles?: boolean) => IStyles;\n buildPadLeft: (valPadLeft: string, insertStyles?: boolean) => IStyles;\n buildPadX: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildPadY: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMar: (valMars: string, insertStyles?: boolean) => IStyles;\n buildMarTop: (valMarTop: string, insertStyles?: boolean) => IStyles;\n buildMarRight: (valMarRight: string, insertStyles?: boolean) => IStyles;\n buildMarBottom: (valMarBottom: string, insertStyles?: boolean) => IStyles;\n buildMarLeft: (valMarLeft: string, insertStyles?: boolean) => IStyles;\n buildMarX: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMarY: (valPadX: string, insertStyles?: boolean) => IStyles;\n buildMaxWidth: (valMaxWidth: string, insertStyles?: boolean) => IStyles;\n buildMaxHeight: (valMaxHeight: string, insertStyles?: boolean) => IStyles;\n buildMinWidth: (valMinWidth: string, insertStyles?: boolean) => IStyles;\n buildMinHeight: (valMinHeight: string, insertStyles?: boolean) => IStyles;\n buildHeight: (valHeight: string, insertStyles?: boolean) => IStyles;\n buildWidth: (valWidth: string, insertStyles?: boolean) => IStyles;\n buildPosition: (\n valPosition: string,\n insertStyles?: boolean\n ) => IStyles | Error;\n buildTop: (valTop: string, insertStyles?: boolean) => IStyles | Error;\n buildRight: (valRight: string, insertStyles?: boolean) => IStyles | Error;\n buildBottom: (valBottom: string, insertStyles?: boolean) => IStyles | Error;\n buildLeft: (valLeft: string, insertStyles?: boolean) => IStyles | Error;\n\n set: (\n Node: HTMLElement | Element,\n parameters?: Partial>\n ) => Promise;\n setCols: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setFlex: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMar: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarX: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMarY: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPad: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadX: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPadY: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n setWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMinWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMaxWidth: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMinHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setMaxHeight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setPosition: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n setTop: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setRight: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setBottom: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n setLeft: (\n Node: HTMLElement | Element,\n values?: string\n ) => Promise;\n\n processors: Record;\n\n insertRules: (objStyles: IStyles) => void;\n reset: (Node: HTMLElement | Element) => Promise;\n version: string;\n}\n\ndeclare global {\n interface Window {\n layouter: ILayouter;\n }\n}\n\nconst layouter = (\n context: Window & typeof globalThis,\n userConfig: Partial = {}\n): ILayouter => {\n const config = setConfig(context, userConfig);\n\n const instance = {\n ...config,\n getParameters,\n updateConfig,\n insertRules,\n build,\n buildCols,\n buildFlex,\n buildPad,\n buildPadTop,\n buildPadRight,\n buildPadBottom,\n buildPadLeft,\n buildPadX,\n buildPadY,\n buildMar,\n buildMarTop,\n buildMarRight,\n buildMarBottom,\n buildMarLeft,\n buildMarX,\n buildMarY,\n buildMaxWidth,\n buildMaxHeight,\n buildMinWidth,\n buildMinHeight,\n buildHeight,\n buildWidth,\n set,\n setCols,\n setFlex,\n setMar,\n setMarTop,\n setMarRight,\n setMarBottom,\n setMarLeft,\n setMarX,\n setMarY,\n setPad,\n setPadTop,\n setPadRight,\n setPadBottom,\n setPadLeft,\n setPadX,\n setPadY,\n setWidth,\n setMinWidth,\n setMaxWidth,\n setHeight,\n setMinHeight,\n setMaxHeight,\n buildPosition,\n buildTop,\n buildRight,\n buildBottom,\n buildLeft,\n setPosition,\n setTop,\n setRight,\n setBottom,\n setLeft,\n reset,\n processors,\n };\n\n // Auto init process\n if (config.searchOnInit) {\n searchAndProcess(instance, context.document).then(() => {\n if (instance.ready) instance.ready(instance);\n if (config.observer) mainObserver(instance);\n });\n } else {\n if (config.observer) mainObserver(instance);\n if (instance.ready) instance.ready(instance);\n }\n\n return instance;\n};\n\nif (typeof window !== 'undefined' && typeof exports === 'undefined') {\n window.layouter = layouter(window);\n}\n\nexport type { TDirectiveName, IProcessor } from './config/processors';\nexport type { IConfigUser } from './config/main';\nexport default layouter;\n"],"names":["config"],"mappings":"2OAkBA,KAAM,GAAkB,CACtB,EACA,IACmB,CACnB,KAAM,GAAwB,CAAA,EAE9B,MAAI,KAAa,QACf,OAAO,KAAK,CAAM,EACf,IAAI,AAAC,GACG,EACL,MAAO,EACP,MAAO,EAAO,GAAI,KAAA,EAErB,EACA,KAAK,CAAC,EAAgB,IACrB,EAAE,MAAQ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K,EAAE,QACZ,EAAA,IAAI,EAAM,CAAK,CAE5B,CACF,CACF,CACD,EACK,EAAkB,CACtB,UAAW,GACX,QAAS,GACT,WAAY,GACZ,gBAAiB,EACjB,cAAe,EAAA,EAEjB,EAAQ,QAAQ,EAAO,QAAQ,SAAS,KAAM,CAAe,CAC/D,ECoMM,GAAW,CACf,EACA,EAAmC,KACrB,CACR,KAAA,GAAS,GAAU,EAAS,CAAU,EAEtC,EAAW,CACf,GAAG,EACH,iBACA,gBACA,eACA,SACA,YACA,YACA,YACA,cACA,gBACA,iBACA,eACA,YACA,YACA,YACA,cACA,gBACA,iBACA,eACA,YACA,YACA,iBACA,kBACA,iBACA,kBACA,eACA,cACA,OACA,WACA,WACA,UACA,aACA,eACA,gBACA,cACA,WACA,WACA,UACA,aACA,eACA,gBACA,cACA,WACA,WACA,YACA,eACA,eACA,aACA,gBACA,gBACA,iBACA,YACA,cACA,eACA,aACA,eACA,UACA,YACA,aACA,WACA,SACA,YAAA,EAIF,MAAI,GAAO,aACT,GAAiB,EAAU,EAAQ,QAAQ,EAAE,KAAK,IAAM,CACtD,AAAI,EAAS,OAAO,EAAS,MAAM,CAAQ,EACvC,EAAO,UAAU,GAAa,CAAQ,CAAA,CAC3C,EAEG,GAAO,UAAU,GAAa,CAAQ,EACtC,EAAS,OAAO,EAAS,MAAM,CAAQ,GAGtC,CACT,EAEA,MAAI,OAAO,SAAW,aAAe,MAAO,UAAY,aAC/C,QAAA,SAAW,GAAS,MAAM"} \ No newline at end of file diff --git a/package.json b/package.json index a243afe..d6b7420 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "layouter.js", - "version": "1.9.0", + "version": "1.9.1", "description": "Layout builder without CSS, What???!!!", "homepage": "https://layouter.io", "main": "dist/layouter.umd.js", diff --git a/src/methods/setMarX.ts b/src/methods/setMarX.ts index efea8b0..7093bc2 100644 --- a/src/methods/setMarX.ts +++ b/src/methods/setMarX.ts @@ -7,7 +7,7 @@ const setMarX = ( ): Promise => { return setterXY({ Node, - directives: ['marx', 'px', 'margin-x'], + directives: ['marx', 'mx', 'margin-x'], builder: buildMarX, vals, }); diff --git a/src/methods/setMarY.ts b/src/methods/setMarY.ts index 80277e5..68f952d 100644 --- a/src/methods/setMarY.ts +++ b/src/methods/setMarY.ts @@ -7,7 +7,7 @@ const setMarY = ( ): Promise => { return setterXY({ Node, - directives: ['mary', 'py', 'margin-y'], + directives: ['mary', 'my', 'margin-y'], builder: buildMarY, vals, });