@designliquido/foles 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/fontes/lexador/palavras-reservadas/foles.d.ts +12 -0
  2. package/fontes/lexador/palavras-reservadas/foles.js +15 -2
  3. package/fontes/lexador/palavras-reservadas/foles.js.map +1 -1
  4. package/fontes/modificadores/animacao.d.ts +5 -2
  5. package/fontes/modificadores/animacao.js +21 -5
  6. package/fontes/modificadores/animacao.js.map +1 -1
  7. package/fontes/modificadores/borda-mascara.js +5 -4
  8. package/fontes/modificadores/borda-mascara.js.map +1 -1
  9. package/fontes/modificadores/configuracoes-variacao-fonte.d.ts +5 -2
  10. package/fontes/modificadores/configuracoes-variacao-fonte.js +12 -2
  11. package/fontes/modificadores/configuracoes-variacao-fonte.js.map +1 -1
  12. package/fontes/modificadores/conteudo.d.ts +5 -2
  13. package/fontes/modificadores/conteudo.js +20 -2
  14. package/fontes/modificadores/conteudo.js.map +1 -1
  15. package/fontes/modificadores/cor-barra-rolagem.d.ts +5 -2
  16. package/fontes/modificadores/cor-barra-rolagem.js +8 -2
  17. package/fontes/modificadores/cor-barra-rolagem.js.map +1 -1
  18. package/fontes/modificadores/deslocamento.d.ts +5 -2
  19. package/fontes/modificadores/deslocamento.js +13 -1
  20. package/fontes/modificadores/deslocamento.js.map +1 -1
  21. package/fontes/modificadores/estilo-lista-imagem.d.ts +3 -0
  22. package/fontes/modificadores/estilo-lista-imagem.js +8 -1
  23. package/fontes/modificadores/estilo-lista-imagem.js.map +1 -1
  24. package/fontes/modificadores/estilo-lista-tipo.js +1 -1
  25. package/fontes/modificadores/estilo-lista-tipo.js.map +1 -1
  26. package/fontes/modificadores/estilo-lista.js +2 -1
  27. package/fontes/modificadores/estilo-lista.js.map +1 -1
  28. package/fontes/modificadores/fatiar-imagem-borda.js +2 -1
  29. package/fontes/modificadores/fatiar-imagem-borda.js.map +1 -1
  30. package/fontes/modificadores/filtro-fundo.d.ts +5 -2
  31. package/fontes/modificadores/filtro-fundo.js +11 -2
  32. package/fontes/modificadores/filtro-fundo.js.map +1 -1
  33. package/fontes/modificadores/filtro.d.ts +3 -0
  34. package/fontes/modificadores/filtro.js +14 -1
  35. package/fontes/modificadores/filtro.js.map +1 -1
  36. package/fontes/modificadores/forma-externa.js +2 -1
  37. package/fontes/modificadores/forma-externa.js.map +1 -1
  38. package/fontes/modificadores/imagem-mascara.d.ts +3 -0
  39. package/fontes/modificadores/imagem-mascara.js +13 -1
  40. package/fontes/modificadores/imagem-mascara.js.map +1 -1
  41. package/fontes/modificadores/modelo-colunas-em-grade.d.ts +5 -2
  42. package/fontes/modificadores/modelo-colunas-em-grade.js +22 -2
  43. package/fontes/modificadores/modelo-colunas-em-grade.js.map +1 -1
  44. package/fontes/modificadores/modelo-em-grade.d.ts +5 -2
  45. package/fontes/modificadores/modelo-em-grade.js +26 -2
  46. package/fontes/modificadores/modelo-em-grade.js.map +1 -1
  47. package/fontes/modificadores/modelo-geral-em-grade.d.ts +5 -2
  48. package/fontes/modificadores/modelo-geral-em-grade.js +13 -2
  49. package/fontes/modificadores/modelo-geral-em-grade.js.map +1 -1
  50. package/fontes/modificadores/modelo-linhas-em-grade.d.ts +5 -2
  51. package/fontes/modificadores/modelo-linhas-em-grade.js +22 -2
  52. package/fontes/modificadores/modelo-linhas-em-grade.js.map +1 -1
  53. package/fontes/modificadores/origem-borda-mascara.js +2 -1
  54. package/fontes/modificadores/origem-borda-mascara.js.map +1 -1
  55. package/fontes/modificadores/recursos-fonte.d.ts +5 -2
  56. package/fontes/modificadores/recursos-fonte.js +10 -2
  57. package/fontes/modificadores/recursos-fonte.js.map +1 -1
  58. package/fontes/modificadores/sombra-texto.d.ts +2 -2
  59. package/fontes/modificadores/sombra-texto.js +11 -2
  60. package/fontes/modificadores/sombra-texto.js.map +1 -1
  61. package/fontes/modificadores/substituir-idioma-fonte.d.ts +5 -2
  62. package/fontes/modificadores/substituir-idioma-fonte.js +11 -2
  63. package/fontes/modificadores/substituir-idioma-fonte.js.map +1 -1
  64. package/fontes/modificadores/trajeto-deslocamento.d.ts +5 -2
  65. package/fontes/modificadores/trajeto-deslocamento.js +16 -2
  66. package/fontes/modificadores/trajeto-deslocamento.js.map +1 -1
  67. package/fontes/modificadores/transformar.d.ts +5 -2
  68. package/fontes/modificadores/transformar.js +11 -2
  69. package/fontes/modificadores/transformar.js.map +1 -1
  70. package/fontes/modificadores/validacoes/comum.js +1 -2
  71. package/fontes/modificadores/validacoes/comum.js.map +1 -1
  72. package/fontes/modificadores/validacoes/cor.js +36 -39
  73. package/fontes/modificadores/validacoes/cor.js.map +1 -1
  74. package/fontes/modificadores/validacoes/numerica.js +1 -2
  75. package/fontes/modificadores/validacoes/numerica.js.map +1 -1
  76. package/fontes/valores/metodos/encaixar-conteudo.d.ts +1 -0
  77. package/fontes/valores/metodos/encaixar-conteudo.js +1 -0
  78. package/fontes/valores/metodos/encaixar-conteudo.js.map +1 -1
  79. package/fontes/valores/metodos/limitar.d.ts +1 -0
  80. package/fontes/valores/metodos/limitar.js +1 -0
  81. package/fontes/valores/metodos/limitar.js.map +1 -1
  82. package/fontes/valores/metodos/linear.d.ts +1 -0
  83. package/fontes/valores/metodos/linear.js +1 -0
  84. package/fontes/valores/metodos/linear.js.map +1 -1
  85. package/fontes/valores/metodos/minmax.d.ts +2 -1
  86. package/fontes/valores/metodos/minmax.js +4 -3
  87. package/fontes/valores/metodos/minmax.js.map +1 -1
  88. package/fontes/valores/metodos/passos.d.ts +1 -0
  89. package/fontes/valores/metodos/passos.js +1 -0
  90. package/fontes/valores/metodos/passos.js.map +1 -1
  91. package/fontes/valores/metodos/url.d.ts +1 -0
  92. package/fontes/valores/metodos/url.js +1 -0
  93. package/fontes/valores/metodos/url.js.map +1 -1
  94. package/package.json +1 -1
  95. package/testes/listas/cores.d.ts +1 -0
  96. package/testes/listas/cores.js +28 -2
  97. package/testes/listas/cores.js.map +1 -1
  98. package/testes/listas/metodos.d.ts +1 -0
  99. package/testes/listas/metodos.js +38 -2
  100. package/testes/listas/metodos.js.map +1 -1
  101. package/testes/listas/palavras-reservadas.js +0 -1
  102. package/testes/listas/palavras-reservadas.js.map +1 -1
  103. package/testes/listas/status.js +7 -0
  104. package/testes/listas/status.js.map +1 -1
  105. package/testes/listas/url.d.ts +1 -0
  106. package/testes/listas/url.js +23 -1
  107. package/testes/listas/url.js.map +1 -1
  108. package/testes/listas/valor-global.js +0 -2
  109. package/testes/listas/valor-global.js.map +1 -1
  110. package/testes/listas/valor-quantificador.js +2 -0
  111. package/testes/listas/valor-quantificador.js.map +1 -1
  112. package/testes/modificadores/cores.test.js +20 -30
  113. package/testes/modificadores/cores.test.js.map +1 -1
  114. package/testes/modificadores/metodos.test.js +21 -35
  115. package/testes/modificadores/metodos.test.js.map +1 -1
  116. package/testes/modificadores/url.test.js +15 -17
  117. package/testes/modificadores/url.test.js.map +1 -1
@@ -1,4 +1,7 @@
1
1
  import { Modificador } from "./superclasse";
2
2
  export declare class ImagemMascara extends Modificador {
3
+ valoresAceitos: {
4
+ [valorFoles: string]: string;
5
+ };
3
6
  constructor(valor: string, quantificador: string);
4
7
  }
@@ -2,11 +2,23 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ImagemMascara = void 0;
4
4
  const superclasse_1 = require("./superclasse");
5
+ const comum_1 = require("./validacoes/comum");
5
6
  class ImagemMascara extends superclasse_1.Modificador {
6
7
  constructor(valor, quantificador) {
7
8
  super(["imagem-mascara", "imagem-máscara"], "mask-image");
9
+ this.valoresAceitos = {
10
+ "nenhuma": "none",
11
+ };
12
+ // OBS.: Também pode receber funções específicas do grupo <image>
13
+ // Ex.: mask-image: linear-gradient(rgba(0, 0, 0, 1), transparent);
14
+ // Ex.: mask-image: image(url(mask.png), skyblue);
15
+ // A validação abaixo cobre os valores aceitos e extras
16
+ // TODO: Implementar modificador para também aceitar as funções específicas
17
+ const valoresExtra = ['url'];
18
+ (0, comum_1.validarValores)('imagem-máscara', valor, this.valoresAceitos, valoresExtra);
8
19
  this.valor = valor;
9
- this.quantificador = quantificador;
20
+ // Não recebe quantificador
21
+ // this.quantificador = quantificador;
10
22
  }
11
23
  }
12
24
  exports.ImagemMascara = ImagemMascara;
@@ -1 +1 @@
1
- {"version":3,"file":"imagem-mascara.js","sourceRoot":"","sources":["../../../fontes/modificadores/imagem-mascara.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAEhE,MAAa,aAAc,SAAQ,yBAAW;IAC1C,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,YAAY,CAAC,CAAC;QAC1D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;CACJ;AAND,sCAMC"}
1
+ {"version":3,"file":"imagem-mascara.js","sourceRoot":"","sources":["../../../fontes/modificadores/imagem-mascara.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAChE,8CAAoD;AAEpD,MAAa,aAAc,SAAQ,yBAAW;IAK1C,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,YAAY,CAAC,CAAC;QAL9D,mBAAc,GAAqC;YAC/C,SAAS,EAAE,MAAM;SACpB,CAAA;QAKG,iEAAiE;QACjE,mEAAmE;QACnE,kDAAkD;QAElD,uDAAuD;QACvD,2EAA2E;QAE3E,MAAM,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC;QAC7B,IAAA,sBAAc,EAAC,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QAE3E,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,2BAA2B;QAC3B,sCAAsC;IAC1C,CAAC;CACJ;AAvBD,sCAuBC"}
@@ -1,4 +1,7 @@
1
- import { Modificador } from "./superclasse";
1
+ import { Modificador, PragmasModificador } from "./superclasse";
2
2
  export declare class ModeloColunasEmGrade extends Modificador {
3
- constructor(valor: string, quantificador: string);
3
+ valoresAceitos: {
4
+ [valorFoles: string]: string;
5
+ };
6
+ constructor(valor: string, quantificador?: string, pragmas?: PragmasModificador);
4
7
  }
@@ -1,12 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModeloColunasEmGrade = void 0;
4
+ const quantificadores_1 = require("./atributos/quantificadores");
4
5
  const superclasse_1 = require("./superclasse");
6
+ const numerica_1 = require("./validacoes/numerica");
7
+ const quantificador_1 = require("./validacoes/quantificador");
5
8
  class ModeloColunasEmGrade extends superclasse_1.Modificador {
6
- constructor(valor, quantificador) {
9
+ constructor(valor, quantificador, pragmas) {
7
10
  super("modelo-colunas-em-grade", "grid-template-columns");
11
+ this.valoresAceitos = {
12
+ "nenhum": "none",
13
+ "auto": "auto",
14
+ "conteudo-maximo": "max-content",
15
+ "conteudo-máximo": "max-content",
16
+ "conteudo-minimo": "min-content",
17
+ "conteudo-mínimo": "min-content",
18
+ "sub-grade": "subgrid",
19
+ "alvenaria": "masonry",
20
+ };
21
+ // OBS.: Também aceita receber o valor do tipo [linename]
22
+ // TODO: Adaptar lógica para cobrir todos os casos de valores
23
+ const valoresExtra = ['minmax', 'fit-content'];
24
+ (0, numerica_1.validarValorNumerico)('modelo-colunas-em-grade', valor, this.valoresAceitos, valoresExtra);
8
25
  this.valor = valor;
9
- this.quantificador = quantificador;
26
+ if (quantificador !== undefined) {
27
+ (0, quantificador_1.validarQuantificador)('modelo-colunas-em-grade', quantificador, quantificadores_1.unidadesMedida, quantificadores_1.valoresFlex);
28
+ this.quantificador = quantificador;
29
+ }
10
30
  }
11
31
  }
12
32
  exports.ModeloColunasEmGrade = ModeloColunasEmGrade;
@@ -1 +1 @@
1
- {"version":3,"file":"modelo-colunas-em-grade.js","sourceRoot":"","sources":["../../../fontes/modificadores/modelo-colunas-em-grade.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAEhE,MAAa,oBAAqB,SAAQ,yBAAW;IACjD,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,yBAAyB,EAAE,uBAAuB,CAAC,CAAC;QAC1D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;CACJ;AAND,oDAMC"}
1
+ {"version":3,"file":"modelo-colunas-em-grade.js","sourceRoot":"","sources":["../../../fontes/modificadores/modelo-colunas-em-grade.ts"],"names":[],"mappings":";;;AAAA,iEAA0E;AAC1E,+CAAgE;AAChE,oDAA6D;AAC7D,8DAAkE;AAElE,MAAa,oBAAqB,SAAQ,yBAAW;IAYjD,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CAAC,yBAAyB,EAAE,uBAAuB,CAAC,CAAC;QAZ9D,mBAAc,GAAqC;YAC/C,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,MAAM;YACd,iBAAiB,EAAE,aAAa;YAChC,iBAAiB,EAAE,aAAa;YAChC,iBAAiB,EAAE,aAAa;YAChC,iBAAiB,EAAE,aAAa;YAChC,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,SAAS;SACzB,CAAA;QAKG,yDAAyD;QACzD,6DAA6D;QAC7D,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QAC/C,IAAA,+BAAoB,EAAC,yBAAyB,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QAC1F,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,aAAa,KAAK,SAAS,EAAE;YAC7B,IAAA,oCAAoB,EAAC,yBAAyB,EAAE,aAAa,EAAE,gCAAc,EAAE,6BAAW,CAAC,CAAC;YAC5F,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;SACtC;IACL,CAAC;CACJ;AA1BD,oDA0BC"}
@@ -1,4 +1,7 @@
1
- import { Modificador } from "./superclasse";
1
+ import { Modificador, PragmasModificador } from "./superclasse";
2
2
  export declare class ModeloEmGrade extends Modificador {
3
- constructor(valor: string, quantificador: string);
3
+ valoresAceitos: {
4
+ [valorFoles: string]: string;
5
+ };
6
+ constructor(valor: string, quantificador?: string, pragmas?: PragmasModificador);
4
7
  }
@@ -1,12 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModeloEmGrade = void 0;
4
+ const quantificadores_1 = require("./atributos/quantificadores");
4
5
  const superclasse_1 = require("./superclasse");
6
+ const numerica_1 = require("./validacoes/numerica");
7
+ const quantificador_1 = require("./validacoes/quantificador");
5
8
  class ModeloEmGrade extends superclasse_1.Modificador {
6
- constructor(valor, quantificador) {
9
+ constructor(valor, quantificador, pragmas) {
7
10
  super("modelo-em-grade", "grid-template");
11
+ // Seletor de atribuição abreviada, pode receber de 1 a 3 valores
12
+ this.valoresAceitos = {
13
+ "nenhum": "none",
14
+ "auto": "auto",
15
+ "conteudo-maximo": "max-content",
16
+ "conteudo-máximo": "max-content",
17
+ "conteudo-minimo": "min-content",
18
+ "conteudo-mínimo": "min-content",
19
+ "sub-grade": "subgrid",
20
+ "alvenaria": "masonry",
21
+ };
22
+ // OBS.: Também aceita receber o valor do tipo matriz
23
+ // Ex.: grid-template:
24
+ // "a a a" 20%
25
+ // "b b b" auto;
26
+ // TODO: Adaptar lógica para cobrir todos os casos de valores
27
+ const valoresExtra = ['fit-content'];
28
+ (0, numerica_1.validarValorNumerico)('modelo-em-grade', valor, this.valoresAceitos, valoresExtra);
8
29
  this.valor = valor;
9
- this.quantificador = quantificador;
30
+ if (quantificador !== undefined) {
31
+ (0, quantificador_1.validarQuantificador)('modelo-em-grade', quantificador, quantificadores_1.unidadesMedida, quantificadores_1.valoresFlex);
32
+ this.quantificador = quantificador;
33
+ }
10
34
  }
11
35
  }
12
36
  exports.ModeloEmGrade = ModeloEmGrade;
@@ -1 +1 @@
1
- {"version":3,"file":"modelo-em-grade.js","sourceRoot":"","sources":["../../../fontes/modificadores/modelo-em-grade.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAEhE,MAAa,aAAc,SAAQ,yBAAW;IAC1C,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;CACJ;AAND,sCAMC"}
1
+ {"version":3,"file":"modelo-em-grade.js","sourceRoot":"","sources":["../../../fontes/modificadores/modelo-em-grade.ts"],"names":[],"mappings":";;;AAAA,iEAA0E;AAC1E,+CAAgE;AAChE,oDAA6D;AAC7D,8DAAkE;AAElE,MAAa,aAAc,SAAQ,yBAAW;IAa1C,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;QAb9C,iEAAiE;QACjE,mBAAc,GAAqC;YAC/C,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,MAAM;YACd,iBAAiB,EAAE,aAAa;YAChC,iBAAiB,EAAE,aAAa;YAChC,iBAAiB,EAAE,aAAa;YAChC,iBAAiB,EAAE,aAAa;YAChC,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,SAAS;SACzB,CAAA;QAKG,qDAAqD;QACrD,sBAAsB;QACtB,mBAAmB;QACnB,qBAAqB;QAErB,6DAA6D;QAC7D,MAAM,YAAY,GAAG,CAAC,aAAa,CAAC,CAAC;QACrC,IAAA,+BAAoB,EAAC,iBAAiB,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QAClF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,aAAa,KAAK,SAAS,EAAE;YAC7B,IAAA,oCAAoB,EAAC,iBAAiB,EAAE,aAAa,EAAE,gCAAc,EAAE,6BAAW,CAAC,CAAC;YACpF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;SACtC;IACL,CAAC;CACJ;AA/BD,sCA+BC"}
@@ -1,4 +1,7 @@
1
- import { Modificador } from "./superclasse";
1
+ import { Modificador, PragmasModificador } from "./superclasse";
2
2
  export declare class ModeloGeralEmGrade extends Modificador {
3
- constructor(valor: string, quantificador: string);
3
+ valoresAceitos: {
4
+ [valorFoles: string]: string;
5
+ };
6
+ constructor(valor: string, quantificador?: string, pragmas?: PragmasModificador);
4
7
  }
@@ -2,11 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModeloGeralEmGrade = void 0;
4
4
  const superclasse_1 = require("./superclasse");
5
+ const comum_1 = require("./validacoes/comum");
5
6
  class ModeloGeralEmGrade extends superclasse_1.Modificador {
6
- constructor(valor, quantificador) {
7
+ constructor(valor, quantificador, pragmas) {
7
8
  super("modelo-geral-em-grade", "grid-template-areas");
9
+ this.valoresAceitos = {
10
+ "nenhum": "none",
11
+ };
12
+ // OBS.: Também aceita receber valores do tipo string e matriz
13
+ // Ex.: grid-template-areas:
14
+ // "a b b"
15
+ // "a c d";
16
+ // TODO: Adaptar lógica para cobrir todos os casos
17
+ (0, comum_1.validarValores)('modelo-geral-em-grade', valor, this.valoresAceitos);
8
18
  this.valor = valor;
9
- this.quantificador = quantificador;
19
+ // Não recebe quantificador
20
+ // this.quantificador = quantificador;
10
21
  }
11
22
  }
12
23
  exports.ModeloGeralEmGrade = ModeloGeralEmGrade;
@@ -1 +1 @@
1
- {"version":3,"file":"modelo-geral-em-grade.js","sourceRoot":"","sources":["../../../fontes/modificadores/modelo-geral-em-grade.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAEhE,MAAa,kBAAmB,SAAQ,yBAAW;IAC/C,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,uBAAuB,EAAE,qBAAqB,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;CACJ;AAND,gDAMC"}
1
+ {"version":3,"file":"modelo-geral-em-grade.js","sourceRoot":"","sources":["../../../fontes/modificadores/modelo-geral-em-grade.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAChE,8CAAoD;AAEpD,MAAa,kBAAmB,SAAQ,yBAAW;IAK/C,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CAAC,uBAAuB,EAAE,qBAAqB,CAAC,CAAC;QAL1D,mBAAc,GAAqC;YAC/C,QAAQ,EAAE,MAAM;SACnB,CAAA;QAKG,8DAA8D;QAC9D,4BAA4B;QAC5B,eAAe;QACf,gBAAgB;QAEhB,kDAAkD;QAClD,IAAA,sBAAc,EAAC,uBAAuB,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACpE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,2BAA2B;QAC3B,sCAAsC;IAC1C,CAAC;CACJ;AApBD,gDAoBC"}
@@ -1,4 +1,7 @@
1
- import { Modificador } from "./superclasse";
1
+ import { Modificador, PragmasModificador } from "./superclasse";
2
2
  export declare class ModeloLinhasEmGrade extends Modificador {
3
- constructor(valor: string, quantificador: string);
3
+ valoresAceitos: {
4
+ [valorFoles: string]: string;
5
+ };
6
+ constructor(valor: string, quantificador?: string, pragmas?: PragmasModificador);
4
7
  }
@@ -1,12 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ModeloLinhasEmGrade = void 0;
4
+ const quantificadores_1 = require("./atributos/quantificadores");
4
5
  const superclasse_1 = require("./superclasse");
6
+ const numerica_1 = require("./validacoes/numerica");
7
+ const quantificador_1 = require("./validacoes/quantificador");
5
8
  class ModeloLinhasEmGrade extends superclasse_1.Modificador {
6
- constructor(valor, quantificador) {
9
+ constructor(valor, quantificador, pragmas) {
7
10
  super("modelo-linhas-em-grade", "grid-template-rows");
11
+ this.valoresAceitos = {
12
+ "nenhum": "none",
13
+ "auto": "auto",
14
+ "conteudo-maximo": "max-content",
15
+ "conteudo-máximo": "max-content",
16
+ "conteudo-minimo": "min-content",
17
+ "conteudo-mínimo": "min-content",
18
+ "sub-grade": "subgrid",
19
+ "alvenaria": "masonry",
20
+ };
21
+ // OBS.: Também aceita receber o valor do tipo [linename]
22
+ // TODO: Adaptar lógica para cobrir todos os casos de valores
23
+ const valoresExtra = ['minmax', 'fit-content'];
24
+ (0, numerica_1.validarValorNumerico)('modelo-linhas-em-grade', valor, this.valoresAceitos, valoresExtra);
8
25
  this.valor = valor;
9
- this.quantificador = quantificador;
26
+ if (quantificador !== undefined) {
27
+ (0, quantificador_1.validarQuantificador)('modelo-linhas-em-grade', quantificador, quantificadores_1.unidadesMedida, quantificadores_1.valoresFlex);
28
+ this.quantificador = quantificador;
29
+ }
10
30
  }
11
31
  }
12
32
  exports.ModeloLinhasEmGrade = ModeloLinhasEmGrade;
@@ -1 +1 @@
1
- {"version":3,"file":"modelo-linhas-em-grade.js","sourceRoot":"","sources":["../../../fontes/modificadores/modelo-linhas-em-grade.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAEhE,MAAa,mBAAoB,SAAQ,yBAAW;IAChD,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;CACJ;AAND,kDAMC"}
1
+ {"version":3,"file":"modelo-linhas-em-grade.js","sourceRoot":"","sources":["../../../fontes/modificadores/modelo-linhas-em-grade.ts"],"names":[],"mappings":";;;AAAA,iEAA0E;AAC1E,+CAAgE;AAChE,oDAA6D;AAC7D,8DAAkE;AAElE,MAAa,mBAAoB,SAAQ,yBAAW;IAYhD,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC;QAZ1D,mBAAc,GAAqC;YAC/C,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,MAAM;YACd,iBAAiB,EAAE,aAAa;YAChC,iBAAiB,EAAE,aAAa;YAChC,iBAAiB,EAAE,aAAa;YAChC,iBAAiB,EAAE,aAAa;YAChC,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,SAAS;SACzB,CAAA;QAKG,yDAAyD;QACzD,6DAA6D;QAC7D,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QAC/C,IAAA,+BAAoB,EAAC,wBAAwB,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QACzF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,aAAa,KAAK,SAAS,EAAE;YAC7B,IAAA,oCAAoB,EAAC,wBAAwB,EAAE,aAAa,EAAE,gCAAc,EAAE,6BAAW,CAAC,CAAC;YAC3F,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;SACtC;IACL,CAAC;CACJ;AA1BD,kDA0BC"}
@@ -12,7 +12,8 @@ class OrigemBordaMascara extends superclasse_1.Modificador {
12
12
  // OBS.: Também aceita receber valores do tipo URL (link externo da imagem).
13
13
  // A lógica abaixo cobre somente o recebimento dos valores aceitos listados.
14
14
  // TODO: Adaptar lógica para cobrir os demais casos.
15
- (0, comum_1.validarValores)('origem-borda-máscara', valor, this.valoresAceitos);
15
+ const valoresExtra = ['url'];
16
+ (0, comum_1.validarValores)('origem-borda-máscara', valor, this.valoresAceitos, valoresExtra);
16
17
  this.valor = valor;
17
18
  // Não recebe quantificador
18
19
  // this.quantificador = quantificador;
@@ -1 +1 @@
1
- {"version":3,"file":"origem-borda-mascara.js","sourceRoot":"","sources":["../../../fontes/modificadores/origem-borda-mascara.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAChE,8CAAoD;AAEpD,MAAa,kBAAmB,SAAQ,yBAAW;IAK/C,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CACD,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,EAChD,oBAAoB,CACvB,CAAC;QARN,mBAAc,GAAqC;YAC/C,SAAS,EAAE,MAAM;SACpB,CAAA;QAQG,6EAA6E;QAC7E,6EAA6E;QAC7E,oDAAoD;QAEpD,IAAA,sBAAc,EAAC,sBAAsB,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAEnE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,2BAA2B;QAC3B,sCAAsC;IAC1C,CAAC;CACJ;AAtBD,gDAsBC"}
1
+ {"version":3,"file":"origem-borda-mascara.js","sourceRoot":"","sources":["../../../fontes/modificadores/origem-borda-mascara.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAChE,8CAAoD;AAEpD,MAAa,kBAAmB,SAAQ,yBAAW;IAK/C,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CACD,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,EAChD,oBAAoB,CACvB,CAAC;QARN,mBAAc,GAAqC;YAC/C,SAAS,EAAE,MAAM;SACpB,CAAA;QAQG,6EAA6E;QAC7E,6EAA6E;QAC7E,oDAAoD;QACpD,MAAM,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC;QAC7B,IAAA,sBAAc,EAAC,sBAAsB,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QAEjF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,2BAA2B;QAC3B,sCAAsC;IAC1C,CAAC;CACJ;AAtBD,gDAsBC"}
@@ -1,4 +1,7 @@
1
- import { Modificador } from "./superclasse";
1
+ import { Modificador, PragmasModificador } from "./superclasse";
2
2
  export declare class RecursosFonte extends Modificador {
3
- constructor(valor: string, quantificador: string);
3
+ valoresAceitos: {
4
+ [valorFoles: string]: string;
5
+ };
6
+ constructor(valor: string, quantificador?: string, pragmas?: PragmasModificador);
4
7
  }
@@ -2,11 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RecursosFonte = void 0;
4
4
  const superclasse_1 = require("./superclasse");
5
+ const comum_1 = require("./validacoes/comum");
5
6
  class RecursosFonte extends superclasse_1.Modificador {
6
- constructor(valor, quantificador) {
7
+ constructor(valor, quantificador, pragmas) {
7
8
  super("recursos-fonte", "font-feature-settings");
9
+ this.valoresAceitos = {
10
+ "normal": "normal",
11
+ };
12
+ // OBS.: Também aceita receber o valor do tipo <feature-tag-value>
13
+ // TODO: Adaptar lógica para cobrir todos os casos de valores
14
+ (0, comum_1.validarValores)('recursos-fonte', valor, this.valoresAceitos);
8
15
  this.valor = valor;
9
- this.quantificador = quantificador;
16
+ // Não recebe quantificador
17
+ // this.quantificador = quantificador;
10
18
  }
11
19
  }
12
20
  exports.RecursosFonte = RecursosFonte;
@@ -1 +1 @@
1
- {"version":3,"file":"recursos-fonte.js","sourceRoot":"","sources":["../../../fontes/modificadores/recursos-fonte.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAEhE,MAAa,aAAc,SAAQ,yBAAW;IAC1C,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,gBAAgB,EAAE,uBAAuB,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;CACJ;AAND,sCAMC"}
1
+ {"version":3,"file":"recursos-fonte.js","sourceRoot":"","sources":["../../../fontes/modificadores/recursos-fonte.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAChE,8CAAoD;AAEpD,MAAa,aAAc,SAAQ,yBAAW;IAK1C,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CAAC,gBAAgB,EAAE,uBAAuB,CAAC,CAAC;QALrD,mBAAc,GAAqC;YAC/C,QAAQ,EAAE,QAAQ;SACrB,CAAA;QAKG,kEAAkE;QAClE,6DAA6D;QAC7D,IAAA,sBAAc,EAAC,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,2BAA2B;QAC3B,sCAAsC;IAC1C,CAAC;CACJ;AAhBD,sCAgBC"}
@@ -1,4 +1,4 @@
1
- import { Modificador } from "./superclasse";
1
+ import { Modificador, PragmasModificador } from "./superclasse";
2
2
  export declare class SombraTexto extends Modificador {
3
- constructor(valor: string, quantificador: string);
3
+ constructor(valor: string, quantificador?: string, pragmas?: PragmasModificador);
4
4
  }
@@ -1,12 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SombraTexto = void 0;
4
+ const quantificadores_1 = require("./atributos/quantificadores");
4
5
  const superclasse_1 = require("./superclasse");
6
+ const numerica_1 = require("./validacoes/numerica");
7
+ const quantificador_1 = require("./validacoes/quantificador");
5
8
  class SombraTexto extends superclasse_1.Modificador {
6
- constructor(valor, quantificador) {
9
+ constructor(valor, quantificador, pragmas) {
7
10
  super("sombra-texto", "text-shadow");
11
+ // OBS.: Também aceita receber múltiplos valores, sendo um dos parâmetros do tipo COR
12
+ // Ex.: text-shadow: 1px 1px 2px black;
13
+ (0, numerica_1.validarValorNumerico)('sombra-texto', valor);
8
14
  this.valor = valor;
9
- this.quantificador = quantificador;
15
+ if (quantificador !== undefined) {
16
+ (0, quantificador_1.validarQuantificador)('sombra-texto', quantificador, quantificadores_1.unidadesMedida);
17
+ this.quantificador = quantificador;
18
+ }
10
19
  }
11
20
  }
12
21
  exports.SombraTexto = SombraTexto;
@@ -1 +1 @@
1
- {"version":3,"file":"sombra-texto.js","sourceRoot":"","sources":["../../../fontes/modificadores/sombra-texto.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAEhE,MAAa,WAAY,SAAQ,yBAAW;IACxC,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;CACJ;AAND,kCAMC"}
1
+ {"version":3,"file":"sombra-texto.js","sourceRoot":"","sources":["../../../fontes/modificadores/sombra-texto.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAC7D,+CAAgE;AAChE,oDAA6D;AAC7D,8DAAkE;AAElE,MAAa,WAAY,SAAQ,yBAAW;IACxC,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;QAErC,qFAAqF;QACrF,uCAAuC;QACvC,IAAA,+BAAoB,EAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAG,aAAa,KAAK,SAAS,EAAE;YAC5B,IAAA,oCAAoB,EAAC,cAAc,EAAE,aAAa,EAAE,gCAAc,CAAC,CAAC;YACpE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;SACtC;IACL,CAAC;CACJ;AAdD,kCAcC"}
@@ -1,4 +1,7 @@
1
- import { Modificador } from "./superclasse";
1
+ import { Modificador, PragmasModificador } from "./superclasse";
2
2
  export declare class SubstituirIdiomaFonte extends Modificador {
3
- constructor(valor: string, quantificador: string);
3
+ valoresAceitos: {
4
+ [valorFoles: string]: string;
5
+ };
6
+ constructor(valor: string, quantificador?: string, pragmas?: PragmasModificador);
4
7
  }
@@ -2,11 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SubstituirIdiomaFonte = void 0;
4
4
  const superclasse_1 = require("./superclasse");
5
+ const comum_1 = require("./validacoes/comum");
5
6
  class SubstituirIdiomaFonte extends superclasse_1.Modificador {
6
- constructor(valor, quantificador) {
7
+ constructor(valor, quantificador, pragmas) {
7
8
  super("substituir-idioma-fonte", "font-language-override");
9
+ this.valoresAceitos = {
10
+ "normal": "normal",
11
+ };
12
+ // OBS.: Também aceita receber valores do tipo <string> que representem o idioma
13
+ // Ex.: substituir-idioma-fonte: "ENG";
14
+ // TODO: Adaptar lógica para cobrir todos os casos
15
+ (0, comum_1.validarValores)('substituir-idioma-fonte', valor, this.valoresAceitos);
8
16
  this.valor = valor;
9
- this.quantificador = quantificador;
17
+ // Não recebe quantificador
18
+ // this.quantificador = quantificador;
10
19
  }
11
20
  }
12
21
  exports.SubstituirIdiomaFonte = SubstituirIdiomaFonte;
@@ -1 +1 @@
1
- {"version":3,"file":"substituir-idioma-fonte.js","sourceRoot":"","sources":["../../../fontes/modificadores/substituir-idioma-fonte.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAEhE,MAAa,qBAAsB,SAAQ,yBAAW;IAClD,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,yBAAyB,EAAE,wBAAwB,CAAC,CAAC;QAC3D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;CACJ;AAND,sDAMC"}
1
+ {"version":3,"file":"substituir-idioma-fonte.js","sourceRoot":"","sources":["../../../fontes/modificadores/substituir-idioma-fonte.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAChE,8CAAoD;AAEpD,MAAa,qBAAsB,SAAQ,yBAAW;IAKlD,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CAAC,yBAAyB,EAAE,wBAAwB,CAAC,CAAC;QAL/D,mBAAc,GAAqC;YAC/C,QAAQ,EAAE,QAAQ;SACrB,CAAA;QAKG,gFAAgF;QAChF,uCAAuC;QAEvC,kDAAkD;QAElD,IAAA,sBAAc,EAAC,yBAAyB,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACtE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,2BAA2B;QAC3B,sCAAsC;IAC1C,CAAC;CACJ;AAnBD,sDAmBC"}
@@ -1,4 +1,7 @@
1
- import { Modificador } from "./superclasse";
1
+ import { Modificador, PragmasModificador } from "./superclasse";
2
2
  export declare class TrajetoDeslocamento extends Modificador {
3
- constructor(valor: string, quantificador: string);
3
+ valoresAceitos: {
4
+ [valorFoles: string]: string;
5
+ };
6
+ constructor(valor: string, quantificador?: string, pragmas?: PragmasModificador);
4
7
  }
@@ -2,11 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TrajetoDeslocamento = void 0;
4
4
  const superclasse_1 = require("./superclasse");
5
+ const comum_1 = require("./validacoes/comum");
5
6
  class TrajetoDeslocamento extends superclasse_1.Modificador {
6
- constructor(valor, quantificador) {
7
+ constructor(valor, quantificador, pragmas) {
7
8
  super("trajeto-deslocamento", "offset-path");
9
+ this.valoresAceitos = {
10
+ "nenhum": "none",
11
+ "margem-caixa": "margin-box",
12
+ "caixa-batida": "stroke-box",
13
+ };
14
+ // OBS.: Também pode receber a função ray()
15
+ // Ex.: offset-path: ray(45deg);
16
+ // E funções do tipo <basic-shape>
17
+ // Ex.: offset-path: circle(50% at 25% 25%);
18
+ // TODO: Adaptar lógica
19
+ const valoresExtra = ['url'];
20
+ (0, comum_1.validarValores)('trajeto-deslocamento', valor, this.valoresAceitos, valoresExtra);
8
21
  this.valor = valor;
9
- this.quantificador = quantificador;
22
+ // Não recebe quantificador - mas as funções <basic-shape> recebem. Descomentar ao resolver TODO acima.
23
+ // this.quantificador = quantificador;
10
24
  }
11
25
  }
12
26
  exports.TrajetoDeslocamento = TrajetoDeslocamento;
@@ -1 +1 @@
1
- {"version":3,"file":"trajeto-deslocamento.js","sourceRoot":"","sources":["../../../fontes/modificadores/trajeto-deslocamento.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAEhE,MAAa,mBAAoB,SAAQ,yBAAW;IAChD,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;QAC7C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;CACJ;AAND,kDAMC"}
1
+ {"version":3,"file":"trajeto-deslocamento.js","sourceRoot":"","sources":["../../../fontes/modificadores/trajeto-deslocamento.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAChE,8CAAoD;AAEpD,MAAa,mBAAoB,SAAQ,yBAAW;IAOhD,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;QAPjD,mBAAc,GAAqC;YAC/C,QAAQ,EAAE,MAAM;YAChB,cAAc,EAAE,YAAY;YAC5B,cAAc,EAAE,YAAY;SAC/B,CAAA;QAKG,2CAA2C;QAC3C,gCAAgC;QAEhC,kCAAkC;QAClC,4CAA4C;QAE5C,uBAAuB;QAEvB,MAAM,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC;QAC7B,IAAA,sBAAc,EAAC,sBAAsB,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QACjF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,uGAAuG;QACvG,sCAAsC;IAC1C,CAAC;CACJ;AAzBD,kDAyBC"}
@@ -1,4 +1,7 @@
1
- import { Modificador } from "./superclasse";
1
+ import { Modificador, PragmasModificador } from "./superclasse";
2
2
  export declare class Transformar extends Modificador {
3
- constructor(valor: string, quantificador: string);
3
+ valoresAceitos: {
4
+ [valorFoles: string]: string;
5
+ };
6
+ constructor(valor: string, quantificador?: string, pragmas?: PragmasModificador);
4
7
  }
@@ -2,11 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Transformar = void 0;
4
4
  const superclasse_1 = require("./superclasse");
5
+ const comum_1 = require("./validacoes/comum");
5
6
  class Transformar extends superclasse_1.Modificador {
6
- constructor(valor, quantificador) {
7
+ constructor(valor, quantificador, pragmas) {
7
8
  super("transformar", "transform");
9
+ this.valoresAceitos = {
10
+ "nenhum": "none",
11
+ };
12
+ // OBS.: Também aceita receber as funções do tipo <transform-function>
13
+ // Checar documentação: https://developer.mozilla.org/en-US/docs/Web/CSS/transform
14
+ // TODO: Adaptar lógica
15
+ (0, comum_1.validarValores)('transformar', valor, this.valoresAceitos);
8
16
  this.valor = valor;
9
- this.quantificador = quantificador;
17
+ // Não recebe quantificador
18
+ // this.quantificador = quantificador;
10
19
  }
11
20
  }
12
21
  exports.Transformar = Transformar;
@@ -1 +1 @@
1
- {"version":3,"file":"transformar.js","sourceRoot":"","sources":["../../../fontes/modificadores/transformar.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAEhE,MAAa,WAAY,SAAQ,yBAAW;IACxC,YAAY,KAAa,EAAE,aAAqB;QAC5C,KAAK,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;CACJ;AAND,kCAMC"}
1
+ {"version":3,"file":"transformar.js","sourceRoot":"","sources":["../../../fontes/modificadores/transformar.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAChE,8CAAoD;AAEpD,MAAa,WAAY,SAAQ,yBAAW;IAKxC,YAAY,KAAa,EAAE,aAAsB,EAAE,OAA4B;QAC3E,KAAK,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QALtC,mBAAc,GAAqC;YAC/C,QAAQ,EAAE,MAAM;SACnB,CAAA;QAKG,sEAAsE;QACtE,mFAAmF;QACnF,uBAAuB;QAEvB,IAAA,sBAAc,EAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAC1D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,2BAA2B;QAC3B,sCAAsC;IAC1C,CAAC;CACJ;AAlBD,kCAkBC"}
@@ -12,11 +12,10 @@ function validarValores(nomePropriedade, valor, valoresAceitos, valoresExtra) {
12
12
  }
13
13
  }
14
14
  else {
15
- const valorString = valor.toString();
16
15
  let metodoValido = false;
17
16
  for (let index = 0; index < valoresExtra.length; index++) {
18
17
  if (metodoValido === false) {
19
- metodoValido = valorString.includes(valoresExtra[index]);
18
+ metodoValido = valor['traducao'] === valoresExtra[index];
20
19
  }
21
20
  }
22
21
  if (!(valor in valoresAceitos) &&
@@ -1 +1 @@
1
- {"version":3,"file":"comum.js","sourceRoot":"","sources":["../../../../fontes/modificadores/validacoes/comum.ts"],"names":[],"mappings":";;;AAAA,kDAAsD;AAEtD,SAAgB,cAAc,CAC1B,eAAuB,EACvB,KAAU,EACV,cAAgD,EAChD,YAAkB;IAGlB,IAAI,YAAY,KAAK,SAAS,EAAE;QAC5B,IAAI,CAAC,CAAC,KAAK,IAAI,cAAc,CAAC;YAC9B,CAAC,CAAC,KAAK,IAAI,wBAAc,CAAC,EAC5B;YACE,MAAM,IAAI,KAAK,CAAC,gBAAgB,eAAe,eAAe,KAAK;cAC7D,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC;cAC3E,MAAM,CAAC,IAAI,CAAC,wBAAc,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;SACxF;KACA;SAAM;QACH,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrC,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACtD,IAAG,YAAY,KAAK,KAAK,EAAE;gBACvB,YAAY,GAAG,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;aAC5D;SACJ;QAED,IACA,CAAC,CAAC,KAAK,IAAI,cAAc,CAAC;YAC1B,CAAC,YAAY;YACb,CAAC,CAAC,KAAK,IAAI,wBAAc,CAAC,EAC5B;YACE,MAAM,IAAI,KAAK,CAAC,gBAAgB,eAAe,eAAe,KAAK;cAC7D,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC;cAC3E,YAAY,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC;cAC5D,MAAM,CAAC,IAAI,CAAC,wBAAc,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;SACxF;KACA;AAEL,CAAC;AApCD,wCAoCC"}
1
+ {"version":3,"file":"comum.js","sourceRoot":"","sources":["../../../../fontes/modificadores/validacoes/comum.ts"],"names":[],"mappings":";;;AAAA,kDAAsD;AAEtD,SAAgB,cAAc,CAC1B,eAAuB,EACvB,KAAU,EACV,cAAgD,EAChD,YAAkB;IAGlB,IAAI,YAAY,KAAK,SAAS,EAAE;QAC5B,IAAI,CAAC,CAAC,KAAK,IAAI,cAAc,CAAC;YAC9B,CAAC,CAAC,KAAK,IAAI,wBAAc,CAAC,EAC5B;YACE,MAAM,IAAI,KAAK,CAAC,gBAAgB,eAAe,eAAe,KAAK;cAC7D,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC;cAC3E,MAAM,CAAC,IAAI,CAAC,wBAAc,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;SACxF;KACA;SAAM;QACH,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACtD,IAAG,YAAY,KAAK,KAAK,EAAE;gBACvB,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,YAAY,CAAC,KAAK,CAAC,CAAC;aAC5D;SACJ;QAED,IACA,CAAC,CAAC,KAAK,IAAI,cAAc,CAAC;YAC1B,CAAC,YAAY;YACb,CAAC,CAAC,KAAK,IAAI,wBAAc,CAAC,EAC5B;YACE,MAAM,IAAI,KAAK,CAAC,gBAAgB,eAAe,eAAe,KAAK;cAC7D,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC;cAC3E,YAAY,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC;cAC5D,MAAM,CAAC,IAAI,CAAC,wBAAc,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;SACxF;KACA;AAEL,CAAC;AAnCD,wCAmCC"}
@@ -1,61 +1,58 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validarValorCor = void 0;
4
+ const hex_1 = require("../../valores/metodos/hex");
4
5
  const metodo_1 = require("../../valores/metodos/metodo");
5
6
  const cores_1 = require("../atributos/cores");
6
7
  const globais_1 = require("../atributos/globais");
7
8
  function validarValorCor(nomePropriedade, valor, valoresAceitos, valoresExtra) {
8
9
  if (valor instanceof metodo_1.Metodo) {
9
- if (!['rgb', 'rgba', 'hsl', 'hsla'].includes(valor.constructor.name.toLowerCase())) {
10
+ if (valor instanceof hex_1.Hex) {
11
+ if (valor['codigo'].length !== 3 && valor['codigo'].length !== 6) {
12
+ throw new Error(`Propriedade '${nomePropriedade}' com hexadecimal inválido: '${valor['codigo']}'. Hexadecimais
13
+ devem ter 3 ou 6 caracteres após a cerquilha, sendo cada caracter de 0 até 9 ou de A até F.`);
14
+ }
15
+ }
16
+ else if (!['rgb', 'rgba', 'hsl', 'hsla'].includes(valor.constructor.name.toLowerCase())) {
10
17
  throw new Error(`Propriedade '${nomePropriedade}' com método '${valor.constructor.name}' inválido. Valores aceitos:
11
18
  rgb(), rgba(), hsl(), hsla().`);
12
19
  }
13
20
  }
14
21
  else {
15
- const valorString = String(valor);
16
- if (valorString.startsWith('#')) {
17
- if (valorString.length !== 4 && valorString.length !== 7) {
18
- throw new Error(`Propriedade '${nomePropriedade}' com hexadecimal inválido: '${valorString}'. Hexadecimais
19
- devem ter 3 ou 6 caracteres após a cerquilha, sendo cada caracter de 0 até 9 ou de A até F.`);
22
+ // Cores pelo nome.
23
+ if (valoresAceitos === undefined) {
24
+ if (valoresExtra === undefined) {
25
+ if (!(valor in cores_1.cores) && !(valor in globais_1.valoresGlobais)) {
26
+ throw new Error(`Propriedade '${nomePropriedade}' com valor ${valor} inválido. Valores aceitos:
27
+ ${Object.keys(cores_1.cores).reduce((final, atual) => final += `, ${atual}`)},
28
+ ${Object.keys(globais_1.valoresGlobais).reduce((final, atual) => final += `, ${atual}`)}.`);
29
+ }
30
+ }
31
+ else {
32
+ if (!(valor in cores_1.cores) && !(valor in valoresExtra) && !(valor in globais_1.valoresGlobais)) {
33
+ throw new Error(`Propriedade '${nomePropriedade}' com valor ${valor} inválido. Valores aceitos:
34
+ ${Object.keys(cores_1.cores).reduce((final, atual) => final += `, ${atual}`)},
35
+ ${Object.keys(valoresExtra).reduce((final, atual) => final += `, ${atual}`)},
36
+ ${Object.keys(globais_1.valoresGlobais).reduce((final, atual) => final += `, ${atual}`)}.`);
37
+ }
20
38
  }
21
- // TODO(Vitor): validação Hex aqui para 3 ou 6 caracteres hex.
22
39
  }
23
40
  else {
24
- // Cores pelo nome.
25
- if (valoresAceitos === undefined) {
26
- if (valoresExtra === undefined) {
27
- if (!(valor in cores_1.cores) && !(valor in globais_1.valoresGlobais)) {
28
- throw new Error(`Propriedade '${nomePropriedade}' com valor ${valor} inválido. Valores aceitos:
29
- ${Object.keys(cores_1.cores).reduce((final, atual) => final += `, ${atual}`)},
30
- ${Object.keys(globais_1.valoresGlobais).reduce((final, atual) => final += `, ${atual}`)}.`);
31
- }
32
- }
33
- else {
34
- if (!(valor in cores_1.cores) && !(valor in valoresExtra) && !(valor in globais_1.valoresGlobais)) {
35
- throw new Error(`Propriedade '${nomePropriedade}' com valor ${valor} inválido. Valores aceitos:
36
- ${Object.keys(cores_1.cores).reduce((final, atual) => final += `, ${atual}`)},
37
- ${Object.keys(valoresExtra).reduce((final, atual) => final += `, ${atual}`)},
38
- ${Object.keys(globais_1.valoresGlobais).reduce((final, atual) => final += `, ${atual}`)}.`);
39
- }
41
+ if (valoresExtra === undefined) {
42
+ if (!(valor in cores_1.cores) && !(valor in valoresAceitos) && !(valor in globais_1.valoresGlobais)) {
43
+ throw new Error(`Propriedade '${nomePropriedade}' com valor ${valor} inválido. Valores aceitos:
44
+ ${Object.keys(cores_1.cores).reduce((final, atual) => final += `, ${atual}`)},
45
+ ${Object.keys(valoresAceitos).reduce((final, atual) => final += `, ${atual}`)},
46
+ ${Object.keys(globais_1.valoresGlobais).reduce((final, atual) => final += `, ${atual}`)}.`);
40
47
  }
41
48
  }
42
49
  else {
43
- if (valoresExtra === undefined) {
44
- if (!(valor in cores_1.cores) && !(valor in valoresAceitos) && !(valor in globais_1.valoresGlobais)) {
45
- throw new Error(`Propriedade '${nomePropriedade}' com valor ${valor} inválido. Valores aceitos:
46
- ${Object.keys(cores_1.cores).reduce((final, atual) => final += `, ${atual}`)},
47
- ${Object.keys(valoresAceitos).reduce((final, atual) => final += `, ${atual}`)},
48
- ${Object.keys(globais_1.valoresGlobais).reduce((final, atual) => final += `, ${atual}`)}.`);
49
- }
50
- }
51
- else {
52
- if (!(valor in cores_1.cores) && !(valor in valoresAceitos) && !(valor in valoresExtra) && !(valor in globais_1.valoresGlobais)) {
53
- throw new Error(`Propriedade '${nomePropriedade}' com valor ${valor} inválido. Valores aceitos:
54
- ${Object.keys(cores_1.cores).reduce((final, atual) => final += `, ${atual}`)},
55
- ${Object.keys(valoresAceitos).reduce((final, atual) => final += `, ${atual}`)},
56
- ${Object.keys(valoresExtra).reduce((final, atual) => final += `, ${atual}`)},
57
- ${Object.keys(globais_1.valoresGlobais).reduce((final, atual) => final += `, ${atual}`)}.`);
58
- }
50
+ if (!(valor in cores_1.cores) && !(valor in valoresAceitos) && !(valor in valoresExtra) && !(valor in globais_1.valoresGlobais)) {
51
+ throw new Error(`Propriedade '${nomePropriedade}' com valor ${valor} inválido. Valores aceitos:
52
+ ${Object.keys(cores_1.cores).reduce((final, atual) => final += `, ${atual}`)},
53
+ ${Object.keys(valoresAceitos).reduce((final, atual) => final += `, ${atual}`)},
54
+ ${Object.keys(valoresExtra).reduce((final, atual) => final += `, ${atual}`)},
55
+ ${Object.keys(globais_1.valoresGlobais).reduce((final, atual) => final += `, ${atual}`)}.`);
59
56
  }
60
57
  }
61
58
  }