ether-code 0.5.4 → 0.5.6
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/cli/ether.js +1 -2
- package/generators/css-generator.js +586 -64
- package/package.json +3 -3
package/cli/ether.js
CHANGED
|
@@ -6,7 +6,7 @@ const http = require('http')
|
|
|
6
6
|
const { EtherCompiler } = require('./compiler')
|
|
7
7
|
const { Watcher } = require('./watcher')
|
|
8
8
|
|
|
9
|
-
const VERSION = '0.5.
|
|
9
|
+
const VERSION = '0.5.6'
|
|
10
10
|
|
|
11
11
|
const COLORS = {
|
|
12
12
|
reset: '\x1b[0m',
|
|
@@ -101,7 +101,6 @@ corps
|
|
|
101
101
|
min-hauteur: 100vh
|
|
102
102
|
|
|
103
103
|
.hero
|
|
104
|
-
min-hauteur: 100vh
|
|
105
104
|
position: relative
|
|
106
105
|
debordement: hidden
|
|
107
106
|
|
|
@@ -108,6 +108,500 @@ class CSSGenerator {
|
|
|
108
108
|
|
|
109
109
|
translateProperty(prop) {
|
|
110
110
|
const lower = prop.toLowerCase()
|
|
111
|
+
|
|
112
|
+
const priorityMap = {
|
|
113
|
+
'contenu': 'content',
|
|
114
|
+
'contenus': 'content',
|
|
115
|
+
'famille-police': 'font-family',
|
|
116
|
+
'famille police': 'font-family',
|
|
117
|
+
'police-famille': 'font-family',
|
|
118
|
+
'taille-police': 'font-size',
|
|
119
|
+
'taille police': 'font-size',
|
|
120
|
+
'police-taille': 'font-size',
|
|
121
|
+
'poids-police': 'font-weight',
|
|
122
|
+
'poids police': 'font-weight',
|
|
123
|
+
'police-poids': 'font-weight',
|
|
124
|
+
'style-police': 'font-style',
|
|
125
|
+
'style police': 'font-style',
|
|
126
|
+
'police-style': 'font-style',
|
|
127
|
+
'hauteur-ligne': 'line-height',
|
|
128
|
+
'hauteur ligne': 'line-height',
|
|
129
|
+
'ligne-hauteur': 'line-height',
|
|
130
|
+
'espacement-lettres': 'letter-spacing',
|
|
131
|
+
'espacement lettres': 'letter-spacing',
|
|
132
|
+
'espacement-mots': 'word-spacing',
|
|
133
|
+
'espacement mots': 'word-spacing',
|
|
134
|
+
'rayon-bordure': 'border-radius',
|
|
135
|
+
'rayon bordure': 'border-radius',
|
|
136
|
+
'bordure-rayon': 'border-radius',
|
|
137
|
+
'arrondi-bordure': 'border-radius',
|
|
138
|
+
'coins-arrondis': 'border-radius',
|
|
139
|
+
'flou-fond': 'backdrop-filter',
|
|
140
|
+
'flou fond': 'backdrop-filter',
|
|
141
|
+
'fond-flou': 'backdrop-filter',
|
|
142
|
+
'filtre-fond': 'backdrop-filter',
|
|
143
|
+
'filtre fond': 'backdrop-filter',
|
|
144
|
+
'fond-filtre': 'backdrop-filter',
|
|
145
|
+
'arriere-plan-flou': 'backdrop-filter',
|
|
146
|
+
'max-largeur': 'max-width',
|
|
147
|
+
'largeur-max': 'max-width',
|
|
148
|
+
'largeur-maximum': 'max-width',
|
|
149
|
+
'largeur maximum': 'max-width',
|
|
150
|
+
'min-largeur': 'min-width',
|
|
151
|
+
'largeur-min': 'min-width',
|
|
152
|
+
'largeur-minimum': 'min-width',
|
|
153
|
+
'largeur minimum': 'min-width',
|
|
154
|
+
'max-hauteur': 'max-height',
|
|
155
|
+
'hauteur-max': 'max-height',
|
|
156
|
+
'hauteur-maximum': 'max-height',
|
|
157
|
+
'hauteur maximum': 'max-height',
|
|
158
|
+
'min-hauteur': 'min-height',
|
|
159
|
+
'hauteur-min': 'min-height',
|
|
160
|
+
'hauteur-minimum': 'min-height',
|
|
161
|
+
'hauteur minimum': 'min-height',
|
|
162
|
+
'couleur-fond': 'background-color',
|
|
163
|
+
'couleur fond': 'background-color',
|
|
164
|
+
'fond-couleur': 'background-color',
|
|
165
|
+
'image-fond': 'background-image',
|
|
166
|
+
'image fond': 'background-image',
|
|
167
|
+
'fond-image': 'background-image',
|
|
168
|
+
'position-fond': 'background-position',
|
|
169
|
+
'position fond': 'background-position',
|
|
170
|
+
'fond-position': 'background-position',
|
|
171
|
+
'taille-fond': 'background-size',
|
|
172
|
+
'taille fond': 'background-size',
|
|
173
|
+
'fond-taille': 'background-size',
|
|
174
|
+
'repetition-fond': 'background-repeat',
|
|
175
|
+
'repetition fond': 'background-repeat',
|
|
176
|
+
'fond-repetition': 'background-repeat',
|
|
177
|
+
'répétition-fond': 'background-repeat',
|
|
178
|
+
'répétition fond': 'background-repeat',
|
|
179
|
+
'fond-répétition': 'background-repeat',
|
|
180
|
+
'attachement-fond': 'background-attachment',
|
|
181
|
+
'attachement fond': 'background-attachment',
|
|
182
|
+
'fond-attachement': 'background-attachment',
|
|
183
|
+
'origine-fond': 'background-origin',
|
|
184
|
+
'origine fond': 'background-origin',
|
|
185
|
+
'decoupe-fond': 'background-clip',
|
|
186
|
+
'decoupe fond': 'background-clip',
|
|
187
|
+
'fond-decoupe': 'background-clip',
|
|
188
|
+
'découpe-fond': 'background-clip',
|
|
189
|
+
'découpe fond': 'background-clip',
|
|
190
|
+
'fond-découpe': 'background-clip',
|
|
191
|
+
'mode-melange': 'mix-blend-mode',
|
|
192
|
+
'mode melange': 'mix-blend-mode',
|
|
193
|
+
'melange-mode': 'mix-blend-mode',
|
|
194
|
+
'mode-mélange': 'mix-blend-mode',
|
|
195
|
+
'mode mélange': 'mix-blend-mode',
|
|
196
|
+
'mélange-mode': 'mix-blend-mode',
|
|
197
|
+
'mode-fusion': 'mix-blend-mode',
|
|
198
|
+
'mode fusion': 'mix-blend-mode',
|
|
199
|
+
'couleur-bordure': 'border-color',
|
|
200
|
+
'couleur bordure': 'border-color',
|
|
201
|
+
'bordure-couleur': 'border-color',
|
|
202
|
+
'style-bordure': 'border-style',
|
|
203
|
+
'style bordure': 'border-style',
|
|
204
|
+
'bordure-style': 'border-style',
|
|
205
|
+
'largeur-bordure': 'border-width',
|
|
206
|
+
'largeur bordure': 'border-width',
|
|
207
|
+
'bordure-largeur': 'border-width',
|
|
208
|
+
'bordure-haut': 'border-top',
|
|
209
|
+
'bordure haut': 'border-top',
|
|
210
|
+
'bordure-bas': 'border-bottom',
|
|
211
|
+
'bordure bas': 'border-bottom',
|
|
212
|
+
'bordure-gauche': 'border-left',
|
|
213
|
+
'bordure gauche': 'border-left',
|
|
214
|
+
'bordure-droite': 'border-right',
|
|
215
|
+
'bordure droite': 'border-right',
|
|
216
|
+
'ombre-boite': 'box-shadow',
|
|
217
|
+
'ombre boite': 'box-shadow',
|
|
218
|
+
'boite-ombre': 'box-shadow',
|
|
219
|
+
'ombre-texte': 'text-shadow',
|
|
220
|
+
'ombre texte': 'text-shadow',
|
|
221
|
+
'texte-ombre': 'text-shadow',
|
|
222
|
+
'alignement-texte': 'text-align',
|
|
223
|
+
'alignement texte': 'text-align',
|
|
224
|
+
'texte-alignement': 'text-align',
|
|
225
|
+
'decoration-texte': 'text-decoration',
|
|
226
|
+
'decoration texte': 'text-decoration',
|
|
227
|
+
'texte-decoration': 'text-decoration',
|
|
228
|
+
'décoration-texte': 'text-decoration',
|
|
229
|
+
'décoration texte': 'text-decoration',
|
|
230
|
+
'texte-décoration': 'text-decoration',
|
|
231
|
+
'transformation-texte': 'text-transform',
|
|
232
|
+
'transformation texte': 'text-transform',
|
|
233
|
+
'texte-transformation': 'text-transform',
|
|
234
|
+
'retrait-texte': 'text-indent',
|
|
235
|
+
'retrait texte': 'text-indent',
|
|
236
|
+
'texte-retrait': 'text-indent',
|
|
237
|
+
'debordement-texte': 'text-overflow',
|
|
238
|
+
'debordement texte': 'text-overflow',
|
|
239
|
+
'texte-debordement': 'text-overflow',
|
|
240
|
+
'débordement-texte': 'text-overflow',
|
|
241
|
+
'débordement texte': 'text-overflow',
|
|
242
|
+
'texte-débordement': 'text-overflow',
|
|
243
|
+
'renvoi-mots': 'word-wrap',
|
|
244
|
+
'renvoi mots': 'word-wrap',
|
|
245
|
+
'cesure-mots': 'word-break',
|
|
246
|
+
'cesure mots': 'word-break',
|
|
247
|
+
'espace-blanc': 'white-space',
|
|
248
|
+
'espace blanc': 'white-space',
|
|
249
|
+
'blanc-espace': 'white-space',
|
|
250
|
+
'direction-flex': 'flex-direction',
|
|
251
|
+
'direction flex': 'flex-direction',
|
|
252
|
+
'flex-direction': 'flex-direction',
|
|
253
|
+
'enveloppe-flex': 'flex-wrap',
|
|
254
|
+
'enveloppe flex': 'flex-wrap',
|
|
255
|
+
'flex-enveloppe': 'flex-wrap',
|
|
256
|
+
'flux-flex': 'flex-flow',
|
|
257
|
+
'flux flex': 'flex-flow',
|
|
258
|
+
'flex-flux': 'flex-flow',
|
|
259
|
+
'croissance-flex': 'flex-grow',
|
|
260
|
+
'croissance flex': 'flex-grow',
|
|
261
|
+
'flex-croissance': 'flex-grow',
|
|
262
|
+
'retrecissement-flex': 'flex-shrink',
|
|
263
|
+
'retrecissement flex': 'flex-shrink',
|
|
264
|
+
'flex-retrecissement': 'flex-shrink',
|
|
265
|
+
'rétrécissement-flex': 'flex-shrink',
|
|
266
|
+
'rétrécissement flex': 'flex-shrink',
|
|
267
|
+
'flex-rétrécissement': 'flex-shrink',
|
|
268
|
+
'base-flex': 'flex-basis',
|
|
269
|
+
'base flex': 'flex-basis',
|
|
270
|
+
'flex-base': 'flex-basis',
|
|
271
|
+
'justifier-contenu': 'justify-content',
|
|
272
|
+
'justifier contenu': 'justify-content',
|
|
273
|
+
'contenu-justifier': 'justify-content',
|
|
274
|
+
'aligner-elements': 'align-items',
|
|
275
|
+
'aligner elements': 'align-items',
|
|
276
|
+
'elements-aligner': 'align-items',
|
|
277
|
+
'aligner-éléments': 'align-items',
|
|
278
|
+
'aligner éléments': 'align-items',
|
|
279
|
+
'éléments-aligner': 'align-items',
|
|
280
|
+
'aligner-soi': 'align-self',
|
|
281
|
+
'aligner soi': 'align-self',
|
|
282
|
+
'soi-aligner': 'align-self',
|
|
283
|
+
'aligner-contenu': 'align-content',
|
|
284
|
+
'aligner contenu': 'align-content',
|
|
285
|
+
'contenu-aligner': 'align-content',
|
|
286
|
+
'colonnes-grille': 'grid-template-columns',
|
|
287
|
+
'colonnes grille': 'grid-template-columns',
|
|
288
|
+
'grille-colonnes': 'grid-template-columns',
|
|
289
|
+
'lignes-grille': 'grid-template-rows',
|
|
290
|
+
'lignes grille': 'grid-template-rows',
|
|
291
|
+
'grille-lignes': 'grid-template-rows',
|
|
292
|
+
'zones-grille': 'grid-template-areas',
|
|
293
|
+
'zones grille': 'grid-template-areas',
|
|
294
|
+
'grille-zones': 'grid-template-areas',
|
|
295
|
+
'colonne-grille': 'grid-column',
|
|
296
|
+
'colonne grille': 'grid-column',
|
|
297
|
+
'grille-colonne': 'grid-column',
|
|
298
|
+
'ligne-grille': 'grid-row',
|
|
299
|
+
'ligne grille': 'grid-row',
|
|
300
|
+
'grille-ligne': 'grid-row',
|
|
301
|
+
'zone-grille': 'grid-area',
|
|
302
|
+
'zone grille': 'grid-area',
|
|
303
|
+
'grille-zone': 'grid-area',
|
|
304
|
+
'ecart-grille': 'grid-gap',
|
|
305
|
+
'ecart grille': 'grid-gap',
|
|
306
|
+
'grille-ecart': 'grid-gap',
|
|
307
|
+
'écart-grille': 'grid-gap',
|
|
308
|
+
'écart grille': 'grid-gap',
|
|
309
|
+
'grille-écart': 'grid-gap',
|
|
310
|
+
'flux-automatique-grille': 'grid-auto-flow',
|
|
311
|
+
'flux automatique grille': 'grid-auto-flow',
|
|
312
|
+
'colonnes-automatiques-grille': 'grid-auto-columns',
|
|
313
|
+
'colonnes automatiques grille': 'grid-auto-columns',
|
|
314
|
+
'lignes-automatiques-grille': 'grid-auto-rows',
|
|
315
|
+
'lignes automatiques grille': 'grid-auto-rows',
|
|
316
|
+
'style-liste': 'list-style',
|
|
317
|
+
'style liste': 'list-style',
|
|
318
|
+
'liste-style': 'list-style',
|
|
319
|
+
'liste style': 'list-style',
|
|
320
|
+
'type-liste': 'list-style-type',
|
|
321
|
+
'type liste': 'list-style-type',
|
|
322
|
+
'liste-type': 'list-style-type',
|
|
323
|
+
'position-liste': 'list-style-position',
|
|
324
|
+
'position liste': 'list-style-position',
|
|
325
|
+
'liste-position': 'list-style-position',
|
|
326
|
+
'image-liste': 'list-style-image',
|
|
327
|
+
'image liste': 'list-style-image',
|
|
328
|
+
'liste-image': 'list-style-image',
|
|
329
|
+
'disposition-tableau': 'table-layout',
|
|
330
|
+
'disposition tableau': 'table-layout',
|
|
331
|
+
'tableau-disposition': 'table-layout',
|
|
332
|
+
'effondrement-bordure': 'border-collapse',
|
|
333
|
+
'effondrement bordure': 'border-collapse',
|
|
334
|
+
'bordure-effondrement': 'border-collapse',
|
|
335
|
+
'espacement-bordure': 'border-spacing',
|
|
336
|
+
'espacement bordure': 'border-spacing',
|
|
337
|
+
'bordure-espacement': 'border-spacing',
|
|
338
|
+
'cote-legendes': 'caption-side',
|
|
339
|
+
'cote legendes': 'caption-side',
|
|
340
|
+
'legendes-cote': 'caption-side',
|
|
341
|
+
'côté-légendes': 'caption-side',
|
|
342
|
+
'côté légendes': 'caption-side',
|
|
343
|
+
'légendes-côté': 'caption-side',
|
|
344
|
+
'cellules-vides': 'empty-cells',
|
|
345
|
+
'cellules vides': 'empty-cells',
|
|
346
|
+
'vides-cellules': 'empty-cells',
|
|
347
|
+
'index-z': 'z-index',
|
|
348
|
+
'z-index': 'z-index',
|
|
349
|
+
'indice-z': 'z-index',
|
|
350
|
+
'debordement': 'overflow',
|
|
351
|
+
'debordement-x': 'overflow-x',
|
|
352
|
+
'debordement x': 'overflow-x',
|
|
353
|
+
'debordement-y': 'overflow-y',
|
|
354
|
+
'debordement y': 'overflow-y',
|
|
355
|
+
'defilement-x': 'overflow-x',
|
|
356
|
+
'defilement x': 'overflow-x',
|
|
357
|
+
'defilement-y': 'overflow-y',
|
|
358
|
+
'defilement y': 'overflow-y',
|
|
359
|
+
'débordement': 'overflow',
|
|
360
|
+
'débordement-x': 'overflow-x',
|
|
361
|
+
'débordement x': 'overflow-x',
|
|
362
|
+
'débordement-y': 'overflow-y',
|
|
363
|
+
'débordement y': 'overflow-y',
|
|
364
|
+
'défilement-x': 'overflow-x',
|
|
365
|
+
'défilement x': 'overflow-x',
|
|
366
|
+
'défilement-y': 'overflow-y',
|
|
367
|
+
'défilement y': 'overflow-y',
|
|
368
|
+
'comportement-defilement': 'scroll-behavior',
|
|
369
|
+
'comportement defilement': 'scroll-behavior',
|
|
370
|
+
'defilement-comportement': 'scroll-behavior',
|
|
371
|
+
'accrochage-defilement': 'scroll-snap-type',
|
|
372
|
+
'accrochage defilement': 'scroll-snap-type',
|
|
373
|
+
'defilement-accrochage': 'scroll-snap-type',
|
|
374
|
+
'accrochage-défilement': 'scroll-snap-type',
|
|
375
|
+
'accrochage défilement': 'scroll-snap-type',
|
|
376
|
+
'défilement-accrochage': 'scroll-snap-type',
|
|
377
|
+
'origine-transformation': 'transform-origin',
|
|
378
|
+
'origine transformation': 'transform-origin',
|
|
379
|
+
'transformation-origine': 'transform-origin',
|
|
380
|
+
'style-transformation': 'transform-style',
|
|
381
|
+
'style transformation': 'transform-style',
|
|
382
|
+
'transformation-style': 'transform-style',
|
|
383
|
+
'face-arriere-visible': 'backface-visibility',
|
|
384
|
+
'face arriere visible': 'backface-visibility',
|
|
385
|
+
'visibilite-face-arriere': 'backface-visibility',
|
|
386
|
+
'visibilité-face-arrière': 'backface-visibility',
|
|
387
|
+
'origine-perspective': 'perspective-origin',
|
|
388
|
+
'origine perspective': 'perspective-origin',
|
|
389
|
+
'perspective-origine': 'perspective-origin',
|
|
390
|
+
'delai-transition': 'transition-delay',
|
|
391
|
+
'delai transition': 'transition-delay',
|
|
392
|
+
'transition-delai': 'transition-delay',
|
|
393
|
+
'délai-transition': 'transition-delay',
|
|
394
|
+
'délai transition': 'transition-delay',
|
|
395
|
+
'transition-délai': 'transition-delay',
|
|
396
|
+
'duree-transition': 'transition-duration',
|
|
397
|
+
'duree transition': 'transition-duration',
|
|
398
|
+
'transition-duree': 'transition-duration',
|
|
399
|
+
'durée-transition': 'transition-duration',
|
|
400
|
+
'durée transition': 'transition-duration',
|
|
401
|
+
'transition-durée': 'transition-duration',
|
|
402
|
+
'propriete-transition': 'transition-property',
|
|
403
|
+
'propriete transition': 'transition-property',
|
|
404
|
+
'transition-propriete': 'transition-property',
|
|
405
|
+
'propriété-transition': 'transition-property',
|
|
406
|
+
'propriété transition': 'transition-property',
|
|
407
|
+
'transition-propriété': 'transition-property',
|
|
408
|
+
'fonction-transition': 'transition-timing-function',
|
|
409
|
+
'fonction transition': 'transition-timing-function',
|
|
410
|
+
'transition-fonction': 'transition-timing-function',
|
|
411
|
+
'nom-animation': 'animation-name',
|
|
412
|
+
'nom animation': 'animation-name',
|
|
413
|
+
'animation-nom': 'animation-name',
|
|
414
|
+
'duree-animation': 'animation-duration',
|
|
415
|
+
'duree animation': 'animation-duration',
|
|
416
|
+
'animation-duree': 'animation-duration',
|
|
417
|
+
'durée-animation': 'animation-duration',
|
|
418
|
+
'durée animation': 'animation-duration',
|
|
419
|
+
'animation-durée': 'animation-duration',
|
|
420
|
+
'fonction-animation': 'animation-timing-function',
|
|
421
|
+
'fonction animation': 'animation-timing-function',
|
|
422
|
+
'animation-fonction': 'animation-timing-function',
|
|
423
|
+
'delai-animation': 'animation-delay',
|
|
424
|
+
'delai animation': 'animation-delay',
|
|
425
|
+
'animation-delai': 'animation-delay',
|
|
426
|
+
'délai-animation': 'animation-delay',
|
|
427
|
+
'délai animation': 'animation-delay',
|
|
428
|
+
'animation-délai': 'animation-delay',
|
|
429
|
+
'iterations-animation': 'animation-iteration-count',
|
|
430
|
+
'iterations animation': 'animation-iteration-count',
|
|
431
|
+
'animation-iterations': 'animation-iteration-count',
|
|
432
|
+
'itérations-animation': 'animation-iteration-count',
|
|
433
|
+
'itérations animation': 'animation-iteration-count',
|
|
434
|
+
'animation-itérations': 'animation-iteration-count',
|
|
435
|
+
'direction-animation': 'animation-direction',
|
|
436
|
+
'direction animation': 'animation-direction',
|
|
437
|
+
'animation-direction': 'animation-direction',
|
|
438
|
+
'mode-remplissage-animation': 'animation-fill-mode',
|
|
439
|
+
'mode remplissage animation': 'animation-fill-mode',
|
|
440
|
+
'animation-mode-remplissage': 'animation-fill-mode',
|
|
441
|
+
'etat-lecture-animation': 'animation-play-state',
|
|
442
|
+
'etat lecture animation': 'animation-play-state',
|
|
443
|
+
'animation-etat-lecture': 'animation-play-state',
|
|
444
|
+
'état-lecture-animation': 'animation-play-state',
|
|
445
|
+
'état lecture animation': 'animation-play-state',
|
|
446
|
+
'animation-état-lecture': 'animation-play-state',
|
|
447
|
+
'ajustement-objet': 'object-fit',
|
|
448
|
+
'ajustement objet': 'object-fit',
|
|
449
|
+
'objet-ajustement': 'object-fit',
|
|
450
|
+
'position-objet': 'object-position',
|
|
451
|
+
'position objet': 'object-position',
|
|
452
|
+
'objet-position': 'object-position',
|
|
453
|
+
'selection-utilisateur': 'user-select',
|
|
454
|
+
'selection utilisateur': 'user-select',
|
|
455
|
+
'utilisateur-selection': 'user-select',
|
|
456
|
+
'sélection-utilisateur': 'user-select',
|
|
457
|
+
'sélection utilisateur': 'user-select',
|
|
458
|
+
'utilisateur-sélection': 'user-select',
|
|
459
|
+
'evenements-pointeur': 'pointer-events',
|
|
460
|
+
'evenements pointeur': 'pointer-events',
|
|
461
|
+
'pointeur-evenements': 'pointer-events',
|
|
462
|
+
'évènements-pointeur': 'pointer-events',
|
|
463
|
+
'évènements pointeur': 'pointer-events',
|
|
464
|
+
'pointeur-évènements': 'pointer-events',
|
|
465
|
+
'événements-pointeur': 'pointer-events',
|
|
466
|
+
'événements pointeur': 'pointer-events',
|
|
467
|
+
'pointeur-événements': 'pointer-events',
|
|
468
|
+
'comportement-tactile': 'touch-action',
|
|
469
|
+
'comportement tactile': 'touch-action',
|
|
470
|
+
'tactile-comportement': 'touch-action',
|
|
471
|
+
'sens-ecriture': 'writing-mode',
|
|
472
|
+
'sens ecriture': 'writing-mode',
|
|
473
|
+
'ecriture-sens': 'writing-mode',
|
|
474
|
+
'sens-écriture': 'writing-mode',
|
|
475
|
+
'sens écriture': 'writing-mode',
|
|
476
|
+
'écriture-sens': 'writing-mode',
|
|
477
|
+
'direction-texte': 'direction',
|
|
478
|
+
'direction texte': 'direction',
|
|
479
|
+
'texte-direction': 'direction',
|
|
480
|
+
'orientation-texte': 'text-orientation',
|
|
481
|
+
'orientation texte': 'text-orientation',
|
|
482
|
+
'texte-orientation': 'text-orientation',
|
|
483
|
+
'colonnes': 'columns',
|
|
484
|
+
'nombre-colonnes': 'column-count',
|
|
485
|
+
'nombre colonnes': 'column-count',
|
|
486
|
+
'colonnes-nombre': 'column-count',
|
|
487
|
+
'largeur-colonnes': 'column-width',
|
|
488
|
+
'largeur colonnes': 'column-width',
|
|
489
|
+
'colonnes-largeur': 'column-width',
|
|
490
|
+
'ecart-colonnes': 'column-gap',
|
|
491
|
+
'ecart colonnes': 'column-gap',
|
|
492
|
+
'écart-colonnes': 'column-gap',
|
|
493
|
+
'écart colonnes': 'column-gap',
|
|
494
|
+
'colonnes-ecart': 'column-gap',
|
|
495
|
+
'colonnes-écart': 'column-gap',
|
|
496
|
+
'regle-colonnes': 'column-rule',
|
|
497
|
+
'règle-colonnes': 'column-rule',
|
|
498
|
+
'regle colonnes': 'column-rule',
|
|
499
|
+
'règle colonnes': 'column-rule',
|
|
500
|
+
'colonnes-regle': 'column-rule',
|
|
501
|
+
'etendue-colonnes': 'column-span',
|
|
502
|
+
'étendue-colonnes': 'column-span',
|
|
503
|
+
'etendue-colonnes': 'column-span',
|
|
504
|
+
'étendue colonnes': 'column-span',
|
|
505
|
+
'colonnes-etendue': 'column-span',
|
|
506
|
+
'remplissage-colonnes': 'column-fill',
|
|
507
|
+
'remplissage colonnes': 'column-fill',
|
|
508
|
+
'colonnes-remplissage': 'column-fill',
|
|
509
|
+
'modele-boite': 'box-sizing',
|
|
510
|
+
'modele boite': 'box-sizing',
|
|
511
|
+
'boite-modele': 'box-sizing',
|
|
512
|
+
'modèle-boite': 'box-sizing',
|
|
513
|
+
'modèle-boîte': 'box-sizing',
|
|
514
|
+
'modèle boite': 'box-sizing',
|
|
515
|
+
'modèle boîte': 'box-sizing',
|
|
516
|
+
'boite modele': 'box-sizing',
|
|
517
|
+
'boîte modèle': 'box-sizing',
|
|
518
|
+
'boîte-modèle': 'box-sizing',
|
|
519
|
+
'dimensionnement-boite': 'box-sizing',
|
|
520
|
+
'dimensionnement boite': 'box-sizing',
|
|
521
|
+
'dimensionnement-boîte': 'box-sizing',
|
|
522
|
+
'dimensionnement boîte': 'box-sizing',
|
|
523
|
+
'boite': 'box-sizing',
|
|
524
|
+
'boîte': 'box-sizing',
|
|
525
|
+
'taille-boite': 'box-sizing',
|
|
526
|
+
'taille boite': 'box-sizing',
|
|
527
|
+
'boite-taille': 'box-sizing',
|
|
528
|
+
'taille-boîte': 'box-sizing',
|
|
529
|
+
'taille boîte': 'box-sizing',
|
|
530
|
+
'boîte-taille': 'box-sizing',
|
|
531
|
+
'largeur-max': 'max-width',
|
|
532
|
+
'largeur max': 'max-width',
|
|
533
|
+
'hauteur-max': 'max-height',
|
|
534
|
+
'hauteur max': 'max-height',
|
|
535
|
+
'largeur-min': 'min-width',
|
|
536
|
+
'largeur min': 'min-width',
|
|
537
|
+
'hauteur-min': 'min-height',
|
|
538
|
+
'hauteur min': 'min-height',
|
|
539
|
+
'bordure-rayon': 'border-radius',
|
|
540
|
+
'bordure rayon': 'border-radius',
|
|
541
|
+
'rayon-bordure': 'border-radius',
|
|
542
|
+
'rayon bordure': 'border-radius',
|
|
543
|
+
'rayon bordure': 'border-radius',
|
|
544
|
+
'texte-aligner': 'text-align',
|
|
545
|
+
'texte aligner': 'text-align',
|
|
546
|
+
'aligner-texte': 'text-align',
|
|
547
|
+
'texte-decoration': 'text-decoration',
|
|
548
|
+
'texte decoration': 'text-decoration',
|
|
549
|
+
'liste-style': 'list-style',
|
|
550
|
+
'style-liste': 'list-style',
|
|
551
|
+
'couleur-caret': 'caret-color',
|
|
552
|
+
'couleur caret': 'caret-color',
|
|
553
|
+
'caret-couleur': 'caret-color',
|
|
554
|
+
'couleur-curseur': 'caret-color',
|
|
555
|
+
'couleur curseur texte': 'caret-color',
|
|
556
|
+
'couleur-accent': 'accent-color',
|
|
557
|
+
'couleur accent': 'accent-color',
|
|
558
|
+
'accent-couleur': 'accent-color',
|
|
559
|
+
'schema-couleurs': 'color-scheme',
|
|
560
|
+
'schema couleurs': 'color-scheme',
|
|
561
|
+
'couleurs-schema': 'color-scheme',
|
|
562
|
+
'ratio-aspect': 'aspect-ratio',
|
|
563
|
+
'ratio aspect': 'aspect-ratio',
|
|
564
|
+
'aspect-ratio': 'aspect-ratio',
|
|
565
|
+
'rapport-aspect': 'aspect-ratio',
|
|
566
|
+
'rapport aspect': 'aspect-ratio',
|
|
567
|
+
'rapport-proportions': 'aspect-ratio',
|
|
568
|
+
'rapport proportions': 'aspect-ratio',
|
|
569
|
+
'contenir': 'contain',
|
|
570
|
+
'confinement': 'contain',
|
|
571
|
+
'isolation': 'isolation',
|
|
572
|
+
'volonte-changement': 'will-change',
|
|
573
|
+
'volonte changement': 'will-change',
|
|
574
|
+
'changement-volonte': 'will-change',
|
|
575
|
+
'optimisation-changement': 'will-change',
|
|
576
|
+
'optimisation changement': 'will-change',
|
|
577
|
+
'masque': 'mask',
|
|
578
|
+
'image-masque': 'mask-image',
|
|
579
|
+
'image masque': 'mask-image',
|
|
580
|
+
'masque-image': 'mask-image',
|
|
581
|
+
'clip-masque': 'mask-clip',
|
|
582
|
+
'clip masque': 'mask-clip',
|
|
583
|
+
'masque-clip': 'mask-clip',
|
|
584
|
+
'chemin-decoupe': 'clip-path',
|
|
585
|
+
'chemin decoupe': 'clip-path',
|
|
586
|
+
'decoupe-chemin': 'clip-path',
|
|
587
|
+
'chemin-découpé': 'clip-path',
|
|
588
|
+
'chemin découpé': 'clip-path',
|
|
589
|
+
'découpe-chemin': 'clip-path',
|
|
590
|
+
'forme-exterieure': 'shape-outside',
|
|
591
|
+
'forme exterieure': 'shape-outside',
|
|
592
|
+
'exterieure-forme': 'shape-outside',
|
|
593
|
+
'forme-extérieure': 'shape-outside',
|
|
594
|
+
'forme extérieure': 'shape-outside',
|
|
595
|
+
'extérieure-forme': 'shape-outside',
|
|
596
|
+
'marge-forme': 'shape-margin',
|
|
597
|
+
'marge forme': 'shape-margin',
|
|
598
|
+
'forme-marge': 'shape-margin'
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
if (priorityMap[lower]) {
|
|
602
|
+
return priorityMap[lower]
|
|
603
|
+
}
|
|
604
|
+
|
|
111
605
|
if (this.propertyMap && this.propertyMap[lower]) {
|
|
112
606
|
return this.propertyMap[lower]
|
|
113
607
|
}
|
|
@@ -132,11 +626,11 @@ class CSSGenerator {
|
|
|
132
626
|
return `var(--${varName})`
|
|
133
627
|
})
|
|
134
628
|
|
|
135
|
-
result = result.replace(/
|
|
629
|
+
result = result.replace(/dégradé linéaire:\s*/gi, 'linear-gradient(')
|
|
136
630
|
result = result.replace(/degrade lineaire:\s*/gi, 'linear-gradient(')
|
|
137
|
-
result = result.replace(/
|
|
631
|
+
result = result.replace(/dégradé radial:\s*/gi, 'radial-gradient(')
|
|
138
632
|
result = result.replace(/degrade radial:\s*/gi, 'radial-gradient(')
|
|
139
|
-
result = result.replace(/
|
|
633
|
+
result = result.replace(/dégradé conique:\s*/gi, 'conic-gradient(')
|
|
140
634
|
result = result.replace(/degrade conique:\s*/gi, 'conic-gradient(')
|
|
141
635
|
|
|
142
636
|
result = result.replace(/rgba:\s*(\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)/gi, 'rgba($1, $2, $3, $4)')
|
|
@@ -145,30 +639,30 @@ class CSSGenerator {
|
|
|
145
639
|
result = result.replace(/hsla:\s*(\d+),\s*([\d.]+%?),\s*([\d.]+%?),\s*([\d.]+)/gi, 'hsla($1, $2, $3, $4)')
|
|
146
640
|
|
|
147
641
|
result = result.replace(/flou:\s*([\d.]+\w*)/gi, 'blur($1)')
|
|
148
|
-
result = result.replace(/luminosit
|
|
642
|
+
result = result.replace(/luminosité:\s*([\d.]+%?)/gi, 'brightness($1)')
|
|
149
643
|
result = result.replace(/luminosite:\s*([\d.]+%?)/gi, 'brightness($1)')
|
|
150
644
|
result = result.replace(/contraste:\s*([\d.]+%?)/gi, 'contrast($1)')
|
|
151
645
|
result = result.replace(/niveaux-gris:\s*([\d.]+%?)/gi, 'grayscale($1)')
|
|
152
646
|
result = result.replace(/niveaux gris:\s*([\d.]+%?)/gi, 'grayscale($1)')
|
|
153
647
|
result = result.replace(/inverser:\s*([\d.]+%?)/gi, 'invert($1)')
|
|
154
648
|
result = result.replace(/saturation:\s*([\d.]+%?)/gi, 'saturate($1)')
|
|
155
|
-
result = result.replace(/
|
|
649
|
+
result = result.replace(/sépia:\s*([\d.]+%?)/gi, 'sepia($1)')
|
|
156
650
|
result = result.replace(/sepia:\s*([\d.]+%?)/gi, 'sepia($1)')
|
|
157
651
|
result = result.replace(/teinte:\s*([\d.]+\w*)/gi, 'hue-rotate($1)')
|
|
158
652
|
|
|
159
|
-
result = result.replace(/
|
|
653
|
+
result = result.replace(/déplacer-y:\s*([\d.\-]+\w*)/gi, 'translateY($1)')
|
|
160
654
|
result = result.replace(/deplacer-y:\s*([\d.\-]+\w*)/gi, 'translateY($1)')
|
|
161
|
-
result = result.replace(/
|
|
655
|
+
result = result.replace(/déplacer-x:\s*([\d.\-]+\w*)/gi, 'translateX($1)')
|
|
162
656
|
result = result.replace(/deplacer-x:\s*([\d.\-]+\w*)/gi, 'translateX($1)')
|
|
163
|
-
result = result.replace(/
|
|
657
|
+
result = result.replace(/déplacer:\s*([\d.\-]+\w*),?\s*([\d.\-]+\w*)?/gi, (match, x, y) => {
|
|
164
658
|
if (y) return `translate(${x}, ${y})`
|
|
165
659
|
return `translate(${x})`
|
|
166
660
|
})
|
|
167
661
|
result = result.replace(/rotation:\s*([\d.\-]+\w*)/gi, 'rotate($1)')
|
|
168
|
-
result = result.replace(
|
|
662
|
+
result = result.replace(/échelle:\s*([\d.]+)/gi, 'scale($1)')
|
|
169
663
|
result = result.replace(/echelle:\s*([\d.]+)/gi, 'scale($1)')
|
|
170
664
|
|
|
171
|
-
result = result.replace(/
|
|
665
|
+
result = result.replace(/répéter:\s*([^,]+),\s*minmax:\s*([^,]+),\s*([^\s\)]+)/gi, 'repeat($1, minmax($2, $3))')
|
|
172
666
|
result = result.replace(/repeter:\s*([^,]+),\s*minmax:\s*([^,]+),\s*([^\s\)]+)/gi, 'repeat($1, minmax($2, $3))')
|
|
173
667
|
result = result.replace(/minmax:\s*([^,]+),\s*([^\s\)]+)/gi, 'minmax($1, $2)')
|
|
174
668
|
|
|
@@ -299,16 +793,16 @@ class CSSGenerator {
|
|
|
299
793
|
'aucun': 'none',
|
|
300
794
|
'aucune': 'none',
|
|
301
795
|
'auto': 'auto',
|
|
302
|
-
'
|
|
796
|
+
'hériter': 'inherit',
|
|
303
797
|
'heriter': 'inherit',
|
|
304
798
|
'initial': 'initial',
|
|
305
|
-
'
|
|
799
|
+
'caché': 'hidden',
|
|
306
800
|
'cache': 'hidden',
|
|
307
801
|
'visible': 'visible',
|
|
308
|
-
'
|
|
802
|
+
'défiler': 'scroll',
|
|
309
803
|
'defiler': 'scroll',
|
|
310
804
|
'fixe': 'fixed',
|
|
311
|
-
'
|
|
805
|
+
'fixée': 'fixed',
|
|
312
806
|
'fixee': 'fixed',
|
|
313
807
|
'absolue': 'absolute',
|
|
314
808
|
'absolu': 'absolute',
|
|
@@ -318,17 +812,17 @@ class CSSGenerator {
|
|
|
318
812
|
'collant': 'sticky',
|
|
319
813
|
'collante': 'sticky',
|
|
320
814
|
'centre': 'center',
|
|
321
|
-
'
|
|
322
|
-
'
|
|
815
|
+
'centré': 'center',
|
|
816
|
+
'début': 'flex-start',
|
|
323
817
|
'debut': 'flex-start',
|
|
324
818
|
'fin': 'flex-end',
|
|
325
819
|
'espace-entre': 'space-between',
|
|
326
820
|
'espace entre': 'space-between',
|
|
327
821
|
'espace-autour': 'space-around',
|
|
328
822
|
'espace autour': 'space-around',
|
|
329
|
-
'espace
|
|
823
|
+
'espace-égal': 'space-evenly',
|
|
330
824
|
'espace egal': 'space-evenly',
|
|
331
|
-
'
|
|
825
|
+
'étirer': 'stretch',
|
|
332
826
|
'etirer': 'stretch',
|
|
333
827
|
'ligne': 'row',
|
|
334
828
|
'colonne': 'column',
|
|
@@ -342,9 +836,9 @@ class CSSGenerator {
|
|
|
342
836
|
'gras': 'bold',
|
|
343
837
|
'normal': 'normal',
|
|
344
838
|
'italique': 'italic',
|
|
345
|
-
'
|
|
839
|
+
'souligné': 'underline',
|
|
346
840
|
'souligne': 'underline',
|
|
347
|
-
'
|
|
841
|
+
'barré': 'line-through',
|
|
348
842
|
'barre': 'line-through',
|
|
349
843
|
'majuscules': 'uppercase',
|
|
350
844
|
'minuscules': 'lowercase',
|
|
@@ -365,14 +859,14 @@ class CSSGenerator {
|
|
|
365
859
|
'grille': 'grid',
|
|
366
860
|
'grille-en-ligne': 'inline-grid',
|
|
367
861
|
'grille en ligne': 'inline-grid',
|
|
368
|
-
'
|
|
862
|
+
'préservé': 'pre',
|
|
369
863
|
'preserve': 'pre',
|
|
370
|
-
'pr
|
|
864
|
+
'pré-ligne': 'pre-line',
|
|
371
865
|
'pre-ligne': 'pre-line',
|
|
372
|
-
'pr
|
|
866
|
+
'pré-enveloppe': 'pre-wrap',
|
|
373
867
|
'pre-enveloppe': 'pre-wrap',
|
|
374
868
|
'solide': 'solid',
|
|
375
|
-
'
|
|
869
|
+
'pointillée': 'dotted',
|
|
376
870
|
'pointillee': 'dotted',
|
|
377
871
|
'tirets': 'dashed',
|
|
378
872
|
'double': 'double',
|
|
@@ -381,7 +875,7 @@ class CSSGenerator {
|
|
|
381
875
|
'ease-in': 'ease-in',
|
|
382
876
|
'ease-out': 'ease-out',
|
|
383
877
|
'ease-in-out': 'ease-in-out',
|
|
384
|
-
'
|
|
878
|
+
'linéaire': 'linear',
|
|
385
879
|
'lineaire': 'linear',
|
|
386
880
|
'infini': 'infinite',
|
|
387
881
|
'alternatif': 'alternate',
|
|
@@ -390,6 +884,19 @@ class CSSGenerator {
|
|
|
390
884
|
'en avant': 'forwards',
|
|
391
885
|
'en arriere': 'backwards',
|
|
392
886
|
'les deux': 'both',
|
|
887
|
+
'bordure-boite': 'border-box',
|
|
888
|
+
'boite-bordure': 'border-box',
|
|
889
|
+
'boite bordure': 'border-box',
|
|
890
|
+
'bordure-boîte': 'border-box',
|
|
891
|
+
'boîte-bordure': 'border-box',
|
|
892
|
+
'boîte bordure': 'border-box',
|
|
893
|
+
'boîte-contenu': 'content-box',
|
|
894
|
+
'boîte contenu': 'content-box',
|
|
895
|
+
'contenu-boîte': 'content-box',
|
|
896
|
+
'boite-contenu': 'content-box',
|
|
897
|
+
'boite contenu': 'content-box',
|
|
898
|
+
'contenu-boite': 'content-box',
|
|
899
|
+
'remplissage-boite': 'padding-box',
|
|
393
900
|
'en pause': 'paused',
|
|
394
901
|
'en cours': 'running',
|
|
395
902
|
'ombre': 'box-shadow',
|
|
@@ -439,7 +946,7 @@ class CSSGenerator {
|
|
|
439
946
|
}
|
|
440
947
|
|
|
441
948
|
for (const [fr, en] of Object.entries(keywords)) {
|
|
442
|
-
const regex = new RegExp(
|
|
949
|
+
const regex = new RegExp(`(?<![a-zA-ZÀ-ÿ])${fr}(?![a-zA-ZÀ-ÿ])`, 'gi')
|
|
443
950
|
result = result.replace(regex, en)
|
|
444
951
|
}
|
|
445
952
|
|
|
@@ -460,6 +967,8 @@ class CSSGenerator {
|
|
|
460
967
|
'couleur': 'color',
|
|
461
968
|
'fond': 'background',
|
|
462
969
|
'police': 'font-family',
|
|
970
|
+
'famille-police': 'font-family',
|
|
971
|
+
'famille police': 'font-family',
|
|
463
972
|
'taille police': 'font-size',
|
|
464
973
|
'taille-police': 'font-size',
|
|
465
974
|
'poids police': 'font-weight',
|
|
@@ -472,8 +981,8 @@ class CSSGenerator {
|
|
|
472
981
|
'espacement lettres': 'letter-spacing',
|
|
473
982
|
'alignement-texte': 'text-align',
|
|
474
983
|
'alignement texte': 'text-align',
|
|
475
|
-
'
|
|
476
|
-
'
|
|
984
|
+
'décoration-texte': 'text-decoration',
|
|
985
|
+
'décoration texte': 'text-decoration',
|
|
477
986
|
'decoration-texte': 'text-decoration',
|
|
478
987
|
'decoration texte': 'text-decoration',
|
|
479
988
|
'transformation-texte': 'text-transform',
|
|
@@ -532,16 +1041,24 @@ class CSSGenerator {
|
|
|
532
1041
|
'bordure couleur': 'border-color',
|
|
533
1042
|
'bordure-couleur': 'border-color',
|
|
534
1043
|
'arrondi': 'border-radius',
|
|
1044
|
+
'rayon-bordure': 'border-radius',
|
|
1045
|
+
'rayon bordure': 'border-radius',
|
|
1046
|
+
'bordure-arrondie': 'border-radius',
|
|
1047
|
+
'bordure arrondie': 'border-radius',
|
|
535
1048
|
'largeur': 'width',
|
|
536
1049
|
'hauteur': 'height',
|
|
537
1050
|
'largeur minimum': 'min-width',
|
|
538
1051
|
'largeur-minimum': 'min-width',
|
|
1052
|
+
'min-largeur': 'min-width',
|
|
539
1053
|
'largeur maximum': 'max-width',
|
|
540
1054
|
'largeur-maximum': 'max-width',
|
|
1055
|
+
'max-largeur': 'max-width',
|
|
541
1056
|
'hauteur minimum': 'min-height',
|
|
542
1057
|
'hauteur-minimum': 'min-height',
|
|
1058
|
+
'min-hauteur': 'min-height',
|
|
543
1059
|
'hauteur maximum': 'max-height',
|
|
544
1060
|
'hauteur-maximum': 'max-height',
|
|
1061
|
+
'max-hauteur': 'max-height',
|
|
545
1062
|
'affichage': 'display',
|
|
546
1063
|
'position': 'position',
|
|
547
1064
|
'haut': 'top',
|
|
@@ -550,13 +1067,13 @@ class CSSGenerator {
|
|
|
550
1067
|
'droite': 'right',
|
|
551
1068
|
'index-z': 'z-index',
|
|
552
1069
|
'z-index': 'z-index',
|
|
553
|
-
'
|
|
1070
|
+
'débordement': 'overflow',
|
|
554
1071
|
'debordement': 'overflow',
|
|
555
|
-
'
|
|
1072
|
+
'débordement-x': 'overflow-x',
|
|
556
1073
|
'debordement-x': 'overflow-x',
|
|
557
|
-
'
|
|
1074
|
+
'débordement-y': 'overflow-y',
|
|
558
1075
|
'debordement-y': 'overflow-y',
|
|
559
|
-
'
|
|
1076
|
+
'opacité': 'opacity',
|
|
560
1077
|
'opacite': 'opacity',
|
|
561
1078
|
'curseur': 'cursor',
|
|
562
1079
|
'transition': 'transition',
|
|
@@ -572,13 +1089,15 @@ class CSSGenerator {
|
|
|
572
1089
|
'filtre': 'filter',
|
|
573
1090
|
'filtre-fond': 'backdrop-filter',
|
|
574
1091
|
'filtre fond': 'backdrop-filter',
|
|
575
|
-
'
|
|
1092
|
+
'flou-fond': 'backdrop-filter',
|
|
1093
|
+
'flou fond': 'backdrop-filter',
|
|
1094
|
+
'ombre-boîte': 'box-shadow',
|
|
576
1095
|
'ombre-boite': 'box-shadow',
|
|
577
|
-
'ombre
|
|
1096
|
+
'ombre boîte': 'box-shadow',
|
|
578
1097
|
'ombre boite': 'box-shadow',
|
|
579
|
-
'
|
|
1098
|
+
'modèle-boîte': 'box-sizing',
|
|
580
1099
|
'modele-boite': 'box-sizing',
|
|
581
|
-
'
|
|
1100
|
+
'modèle boîte': 'box-sizing',
|
|
582
1101
|
'modele boite': 'box-sizing',
|
|
583
1102
|
'espace': 'gap',
|
|
584
1103
|
'espace ligne': 'row-gap',
|
|
@@ -587,9 +1106,9 @@ class CSSGenerator {
|
|
|
587
1106
|
'espace-colonne': 'column-gap',
|
|
588
1107
|
'justifier-contenu': 'justify-content',
|
|
589
1108
|
'justifier contenu': 'justify-content',
|
|
590
|
-
'aligner
|
|
1109
|
+
'aligner-éléments': 'align-items',
|
|
591
1110
|
'aligner-elements': 'align-items',
|
|
592
|
-
'aligner
|
|
1111
|
+
'aligner éléments': 'align-items',
|
|
593
1112
|
'aligner elements': 'align-items',
|
|
594
1113
|
'aligner-contenu': 'align-content',
|
|
595
1114
|
'aligner contenu': 'align-content',
|
|
@@ -605,14 +1124,16 @@ class CSSGenerator {
|
|
|
605
1124
|
'lignes grille': 'grid-template-rows',
|
|
606
1125
|
'style-liste': 'list-style',
|
|
607
1126
|
'style liste': 'list-style',
|
|
1127
|
+
'liste-style': 'list-style',
|
|
1128
|
+
'liste style': 'list-style',
|
|
608
1129
|
'contenu': 'content',
|
|
609
|
-
'
|
|
1130
|
+
'évènements-pointeur': 'pointer-events',
|
|
610
1131
|
'evenements-pointeur': 'pointer-events',
|
|
611
|
-
'
|
|
1132
|
+
'évènements pointeur': 'pointer-events',
|
|
612
1133
|
'evenements pointeur': 'pointer-events',
|
|
613
|
-
'
|
|
1134
|
+
'découpe-fond': 'background-clip',
|
|
614
1135
|
'decoupe-fond': 'background-clip',
|
|
615
|
-
'
|
|
1136
|
+
'découpe fond': 'background-clip',
|
|
616
1137
|
'decoupe fond': 'background-clip',
|
|
617
1138
|
'couleur-remplissage-texte': '-webkit-text-fill-color',
|
|
618
1139
|
'couleur remplissage texte': '-webkit-text-fill-color',
|
|
@@ -625,12 +1146,13 @@ class CSSGenerator {
|
|
|
625
1146
|
'decoration': 'text-decoration',
|
|
626
1147
|
'ombre': 'box-shadow',
|
|
627
1148
|
'ecart': 'gap',
|
|
1149
|
+
'écart': 'gap',
|
|
628
1150
|
'direction': 'flex-direction',
|
|
629
1151
|
'envelopper': 'flex-wrap',
|
|
630
1152
|
'justifier': 'justify-content',
|
|
631
1153
|
'aligner': 'align-items',
|
|
632
1154
|
'visibilite': 'visibility',
|
|
633
|
-
'
|
|
1155
|
+
'visibilité': 'visibility',
|
|
634
1156
|
'redimensionnement': 'resize',
|
|
635
1157
|
'apparence': 'appearance',
|
|
636
1158
|
'contour': 'outline'
|
|
@@ -645,31 +1167,31 @@ class CSSGenerator {
|
|
|
645
1167
|
|
|
646
1168
|
result = result.replace(/:racine\b/gi, ':root')
|
|
647
1169
|
result = result.replace(/::avant\b/gi, '::before')
|
|
648
|
-
result = result.replace(/::
|
|
1170
|
+
result = result.replace(/::après\b/gi, '::after')
|
|
649
1171
|
result = result.replace(/::apres\b/gi, '::after')
|
|
650
|
-
result = result.replace(/::
|
|
1172
|
+
result = result.replace(/::première-lettre\b/gi, '::first-letter')
|
|
651
1173
|
result = result.replace(/::premiere-lettre\b/gi, '::first-letter')
|
|
652
|
-
result = result.replace(/::
|
|
1174
|
+
result = result.replace(/::première-ligne\b/gi, '::first-line')
|
|
653
1175
|
result = result.replace(/::premiere-ligne\b/gi, '::first-line')
|
|
654
|
-
result = result.replace(/::
|
|
1176
|
+
result = result.replace(/::sélection\b/gi, '::selection')
|
|
655
1177
|
result = result.replace(/::selection\b/gi, '::selection')
|
|
656
1178
|
result = result.replace(/::marqueur\b/gi, '::marker')
|
|
657
1179
|
|
|
658
1180
|
result = result.replace(/\bau survol\b/gi, ':hover')
|
|
659
|
-
result = result.replace(/\bquand survol
|
|
1181
|
+
result = result.replace(/\bquand survolé\b/gi, ':hover')
|
|
660
1182
|
result = result.replace(/\bquand survole\b/gi, ':hover')
|
|
661
1183
|
result = result.replace(/\ben survol\b/gi, ':hover')
|
|
662
1184
|
result = result.replace(/\bau clic\b/gi, ':active')
|
|
663
|
-
result = result.replace(/\bquand cliqu
|
|
1185
|
+
result = result.replace(/\bquand cliqué\b/gi, ':active')
|
|
664
1186
|
result = result.replace(/\bquand clique\b/gi, ':active')
|
|
665
1187
|
result = result.replace(/\ben clic\b/gi, ':active')
|
|
666
1188
|
result = result.replace(/\bactif\b/gi, ':active')
|
|
667
1189
|
result = result.replace(/\bau focus\b/gi, ':focus')
|
|
668
|
-
result = result.replace(/\bquand focalis
|
|
1190
|
+
result = result.replace(/\bquand focalisé\b/gi, ':focus')
|
|
669
1191
|
result = result.replace(/\bquand focalise\b/gi, ':focus')
|
|
670
1192
|
result = result.replace(/\ben focus\b/gi, ':focus')
|
|
671
1193
|
result = result.replace(/\bau focus dans\b/gi, ':focus-within')
|
|
672
|
-
result = result.replace(/\bvisit
|
|
1194
|
+
result = result.replace(/\bvisité\b/gi, ':visited')
|
|
673
1195
|
result = result.replace(/\bvisite\b/gi, ':visited')
|
|
674
1196
|
|
|
675
1197
|
result = result.replace(/\s+(:hover|:active|:focus|:focus-within|:visited|:checked|:disabled|:enabled|:required|:optional|:valid|:invalid|:empty|:target)/gi, '$1')
|
|
@@ -683,18 +1205,18 @@ class CSSGenerator {
|
|
|
683
1205
|
result = result.replace(/\bunique de type\b/gi, ':only-of-type')
|
|
684
1206
|
result = result.replace(/\bvide\b/gi, ':empty')
|
|
685
1207
|
result = result.replace(/\bcible\b/gi, ':target')
|
|
686
|
-
result = result.replace(/\bcoch
|
|
1208
|
+
result = result.replace(/\bcoché\b/gi, ':checked')
|
|
687
1209
|
result = result.replace(/\bcoche\b/gi, ':checked')
|
|
688
|
-
result = result.replace(/\
|
|
1210
|
+
result = result.replace(/\bdésactivé\b/gi, ':disabled')
|
|
689
1211
|
result = result.replace(/\bdesactive\b/gi, ':disabled')
|
|
690
|
-
result = result.replace(/\bactiv
|
|
1212
|
+
result = result.replace(/\bactivé\b/gi, ':enabled')
|
|
691
1213
|
result = result.replace(/\brequis\b/gi, ':required')
|
|
692
1214
|
result = result.replace(/\boptionnel\b/gi, ':optional')
|
|
693
1215
|
result = result.replace(/\bvalide\b/gi, ':valid')
|
|
694
1216
|
result = result.replace(/\binvalide\b/gi, ':invalid')
|
|
695
1217
|
|
|
696
1218
|
result = result.replace(/\bcorps\b/gi, 'body')
|
|
697
|
-
result = result.replace(/\
|
|
1219
|
+
result = result.replace(/\btête\b/gi, 'head')
|
|
698
1220
|
result = result.replace(/\btete\b/gi, 'head')
|
|
699
1221
|
result = result.replace(/\btitre1\b/gi, 'h1')
|
|
700
1222
|
result = result.replace(/\btitre2\b/gi, 'h2')
|
|
@@ -709,24 +1231,24 @@ class CSSGenerator {
|
|
|
709
1231
|
result = result.replace(/\bformulaire\b/gi, 'form')
|
|
710
1232
|
result = result.replace(/\bchamp\b/gi, 'input')
|
|
711
1233
|
result = result.replace(/\bliste\b/gi, 'ul')
|
|
712
|
-
result = result.replace(/\bliste-
|
|
1234
|
+
result = result.replace(/\bliste-ordonnée\b/gi, 'ol')
|
|
713
1235
|
result = result.replace(/\bliste-ordonnee\b/gi, 'ol')
|
|
714
|
-
result = result.replace(/\
|
|
1236
|
+
result = result.replace(/\bélément-liste\b/gi, 'li')
|
|
715
1237
|
result = result.replace(/\belement-liste\b/gi, 'li')
|
|
716
1238
|
result = result.replace(/\btableau\b/gi, 'table')
|
|
717
1239
|
result = result.replace(/\bligne-tableau\b/gi, 'tr')
|
|
718
1240
|
result = result.replace(/\bcellule\b/gi, 'td')
|
|
719
|
-
result = result.replace(/\
|
|
1241
|
+
result = result.replace(/\bentête\b/gi, 'header')
|
|
720
1242
|
result = result.replace(/\bentete\b/gi, 'header')
|
|
721
1243
|
result = result.replace(/\bpied\b/gi, 'footer')
|
|
722
1244
|
result = result.replace(/\bnavigation\b/gi, 'nav')
|
|
723
1245
|
result = result.replace(/\bsection\b/gi, 'section')
|
|
724
1246
|
result = result.replace(/\barticle\b/gi, 'article')
|
|
725
|
-
result = result.replace(/\
|
|
1247
|
+
result = result.replace(/\bcôté\b/gi, 'aside')
|
|
726
1248
|
result = result.replace(/\bcote\b/gi, 'aside')
|
|
727
1249
|
result = result.replace(/\bprincipal\b/gi, 'main')
|
|
728
1250
|
result = result.replace(/\bdivision\b/gi, 'div')
|
|
729
|
-
result = result.replace(/\
|
|
1251
|
+
result = result.replace(/\bportée\b/gi, 'span')
|
|
730
1252
|
result = result.replace(/\bportee\b/gi, 'span')
|
|
731
1253
|
|
|
732
1254
|
return result
|
|
@@ -985,7 +1507,7 @@ class CSSGenerator {
|
|
|
985
1507
|
translateMediaQuery(query) {
|
|
986
1508
|
let result = query
|
|
987
1509
|
|
|
988
|
-
result = result.replace(
|
|
1510
|
+
result = result.replace(/écran/gi, 'screen')
|
|
989
1511
|
result = result.replace(/ecran/gi, 'screen')
|
|
990
1512
|
result = result.replace(/imprimante/gi, 'print')
|
|
991
1513
|
result = result.replace(/tous/gi, 'all')
|
|
@@ -1017,9 +1539,9 @@ class CSSGenerator {
|
|
|
1017
1539
|
|
|
1018
1540
|
const plusPetitMatch = condition.match(/plus petit que\s+([\d.]+\w*)/i)
|
|
1019
1541
|
const plusGrandMatch = condition.match(/plus grand que\s+([\d.]+\w*)/i)
|
|
1020
|
-
const inferieurMatch = condition.match(/
|
|
1021
|
-
const superieurMatch = condition.match(/
|
|
1022
|
-
const egalMatch = condition.match(
|
|
1542
|
+
const inferieurMatch = condition.match(/inférieur[e]?\s+a\s+([\d.]+\w*)/i) || condition.match(/inferieur[e]?\s+a\s+([\d.]+\w*)/i)
|
|
1543
|
+
const superieurMatch = condition.match(/supérieur[e]?\s+a\s+([\d.]+\w*)/i) || condition.match(/superieur[e]?\s+a\s+([\d.]+\w*)/i)
|
|
1544
|
+
const egalMatch = condition.match(/égal[e]?\s+a\s+([\d.]+\w*)/i) || condition.match(/egal[e]?\s+a\s+([\d.]+\w*)/i)
|
|
1023
1545
|
const simpleInfMatch = condition.match(/<\s*([\d.]+\w*)/i)
|
|
1024
1546
|
const simpleSupMatch = condition.match(/>\s*([\d.]+\w*)/i)
|
|
1025
1547
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ether-code",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"description": "Ether - Le langage intentionnel",
|
|
5
5
|
"main": "cli/compiler.js",
|
|
6
6
|
"bin": {
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
27
|
-
"url": "https://github.com/ether-
|
|
27
|
+
"url": "https://github.com/ether-code/ether"
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://ether-code.com",
|
|
30
30
|
"bugs": {
|
|
31
|
-
"url": "https://github.com/ether-
|
|
31
|
+
"url": "https://github.com/ether-code/ether/issues"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=14.0.0"
|