@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.
- package/fontes/lexador/palavras-reservadas/foles.d.ts +12 -0
- package/fontes/lexador/palavras-reservadas/foles.js +15 -2
- package/fontes/lexador/palavras-reservadas/foles.js.map +1 -1
- package/fontes/modificadores/animacao.d.ts +5 -2
- package/fontes/modificadores/animacao.js +21 -5
- package/fontes/modificadores/animacao.js.map +1 -1
- package/fontes/modificadores/borda-mascara.js +5 -4
- package/fontes/modificadores/borda-mascara.js.map +1 -1
- package/fontes/modificadores/configuracoes-variacao-fonte.d.ts +5 -2
- package/fontes/modificadores/configuracoes-variacao-fonte.js +12 -2
- package/fontes/modificadores/configuracoes-variacao-fonte.js.map +1 -1
- package/fontes/modificadores/conteudo.d.ts +5 -2
- package/fontes/modificadores/conteudo.js +20 -2
- package/fontes/modificadores/conteudo.js.map +1 -1
- package/fontes/modificadores/cor-barra-rolagem.d.ts +5 -2
- package/fontes/modificadores/cor-barra-rolagem.js +8 -2
- package/fontes/modificadores/cor-barra-rolagem.js.map +1 -1
- package/fontes/modificadores/deslocamento.d.ts +5 -2
- package/fontes/modificadores/deslocamento.js +13 -1
- package/fontes/modificadores/deslocamento.js.map +1 -1
- package/fontes/modificadores/estilo-lista-imagem.d.ts +3 -0
- package/fontes/modificadores/estilo-lista-imagem.js +8 -1
- package/fontes/modificadores/estilo-lista-imagem.js.map +1 -1
- package/fontes/modificadores/estilo-lista-tipo.js +1 -1
- package/fontes/modificadores/estilo-lista-tipo.js.map +1 -1
- package/fontes/modificadores/estilo-lista.js +2 -1
- package/fontes/modificadores/estilo-lista.js.map +1 -1
- package/fontes/modificadores/fatiar-imagem-borda.js +2 -1
- package/fontes/modificadores/fatiar-imagem-borda.js.map +1 -1
- package/fontes/modificadores/filtro-fundo.d.ts +5 -2
- package/fontes/modificadores/filtro-fundo.js +11 -2
- package/fontes/modificadores/filtro-fundo.js.map +1 -1
- package/fontes/modificadores/filtro.d.ts +3 -0
- package/fontes/modificadores/filtro.js +14 -1
- package/fontes/modificadores/filtro.js.map +1 -1
- package/fontes/modificadores/forma-externa.js +2 -1
- package/fontes/modificadores/forma-externa.js.map +1 -1
- package/fontes/modificadores/imagem-mascara.d.ts +3 -0
- package/fontes/modificadores/imagem-mascara.js +13 -1
- package/fontes/modificadores/imagem-mascara.js.map +1 -1
- package/fontes/modificadores/modelo-colunas-em-grade.d.ts +5 -2
- package/fontes/modificadores/modelo-colunas-em-grade.js +22 -2
- package/fontes/modificadores/modelo-colunas-em-grade.js.map +1 -1
- package/fontes/modificadores/modelo-em-grade.d.ts +5 -2
- package/fontes/modificadores/modelo-em-grade.js +26 -2
- package/fontes/modificadores/modelo-em-grade.js.map +1 -1
- package/fontes/modificadores/modelo-geral-em-grade.d.ts +5 -2
- package/fontes/modificadores/modelo-geral-em-grade.js +13 -2
- package/fontes/modificadores/modelo-geral-em-grade.js.map +1 -1
- package/fontes/modificadores/modelo-linhas-em-grade.d.ts +5 -2
- package/fontes/modificadores/modelo-linhas-em-grade.js +22 -2
- package/fontes/modificadores/modelo-linhas-em-grade.js.map +1 -1
- package/fontes/modificadores/origem-borda-mascara.js +2 -1
- package/fontes/modificadores/origem-borda-mascara.js.map +1 -1
- package/fontes/modificadores/recursos-fonte.d.ts +5 -2
- package/fontes/modificadores/recursos-fonte.js +10 -2
- package/fontes/modificadores/recursos-fonte.js.map +1 -1
- package/fontes/modificadores/sombra-texto.d.ts +2 -2
- package/fontes/modificadores/sombra-texto.js +11 -2
- package/fontes/modificadores/sombra-texto.js.map +1 -1
- package/fontes/modificadores/substituir-idioma-fonte.d.ts +5 -2
- package/fontes/modificadores/substituir-idioma-fonte.js +11 -2
- package/fontes/modificadores/substituir-idioma-fonte.js.map +1 -1
- package/fontes/modificadores/trajeto-deslocamento.d.ts +5 -2
- package/fontes/modificadores/trajeto-deslocamento.js +16 -2
- package/fontes/modificadores/trajeto-deslocamento.js.map +1 -1
- package/fontes/modificadores/transformar.d.ts +5 -2
- package/fontes/modificadores/transformar.js +11 -2
- package/fontes/modificadores/transformar.js.map +1 -1
- package/fontes/modificadores/validacoes/comum.js +1 -2
- package/fontes/modificadores/validacoes/comum.js.map +1 -1
- package/fontes/modificadores/validacoes/cor.js +36 -39
- package/fontes/modificadores/validacoes/cor.js.map +1 -1
- package/fontes/modificadores/validacoes/numerica.js +1 -2
- package/fontes/modificadores/validacoes/numerica.js.map +1 -1
- package/fontes/valores/metodos/encaixar-conteudo.d.ts +1 -0
- package/fontes/valores/metodos/encaixar-conteudo.js +1 -0
- package/fontes/valores/metodos/encaixar-conteudo.js.map +1 -1
- package/fontes/valores/metodos/limitar.d.ts +1 -0
- package/fontes/valores/metodos/limitar.js +1 -0
- package/fontes/valores/metodos/limitar.js.map +1 -1
- package/fontes/valores/metodos/linear.d.ts +1 -0
- package/fontes/valores/metodos/linear.js +1 -0
- package/fontes/valores/metodos/linear.js.map +1 -1
- package/fontes/valores/metodos/minmax.d.ts +2 -1
- package/fontes/valores/metodos/minmax.js +4 -3
- package/fontes/valores/metodos/minmax.js.map +1 -1
- package/fontes/valores/metodos/passos.d.ts +1 -0
- package/fontes/valores/metodos/passos.js +1 -0
- package/fontes/valores/metodos/passos.js.map +1 -1
- package/fontes/valores/metodos/url.d.ts +1 -0
- package/fontes/valores/metodos/url.js +1 -0
- package/fontes/valores/metodos/url.js.map +1 -1
- package/package.json +1 -1
- package/testes/listas/cores.d.ts +1 -0
- package/testes/listas/cores.js +28 -2
- package/testes/listas/cores.js.map +1 -1
- package/testes/listas/metodos.d.ts +1 -0
- package/testes/listas/metodos.js +38 -2
- package/testes/listas/metodos.js.map +1 -1
- package/testes/listas/palavras-reservadas.js +0 -1
- package/testes/listas/palavras-reservadas.js.map +1 -1
- package/testes/listas/status.js +7 -0
- package/testes/listas/status.js.map +1 -1
- package/testes/listas/url.d.ts +1 -0
- package/testes/listas/url.js +23 -1
- package/testes/listas/url.js.map +1 -1
- package/testes/listas/valor-global.js +0 -2
- package/testes/listas/valor-global.js.map +1 -1
- package/testes/listas/valor-quantificador.js +2 -0
- package/testes/listas/valor-quantificador.js.map +1 -1
- package/testes/modificadores/cores.test.js +20 -30
- package/testes/modificadores/cores.test.js.map +1 -1
- package/testes/modificadores/metodos.test.js +21 -35
- package/testes/modificadores/metodos.test.js.map +1 -1
- package/testes/modificadores/url.test.js +15 -17
- package/testes/modificadores/url.test.js.map +1 -1
|
@@ -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
|
-
|
|
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;
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
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
|
-
|
|
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;
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
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
|
|
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
|
-
|
|
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;
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
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 =
|
|
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,
|
|
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 (
|
|
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
|
-
|
|
16
|
-
if (
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
}
|