Skip to content

Commit 791bf39

Browse files
chore: format
1 parent 5902ad8 commit 791bf39

File tree

8 files changed

+134
-140
lines changed

8 files changed

+134
-140
lines changed

firebase.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{
22
"hosting": {
33
"public": "www",
4-
"ignore": [
5-
"firebase.json",
6-
"**/.*",
7-
"**/node_modules/**"
8-
],
4+
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
95
"rewrites": [
106
{
117
"source": "**",

src/assets/i18n/fr.ts

+44-44
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
import { I18n } from '../../types/i18n';
1+
import {I18n} from '../../types/i18n';
22

33
export const fr: I18n = {
4-
lang: 'fr',
5-
plugins: {
6-
huge_title: 'Très grand titre',
7-
large_title: 'Grand titre',
8-
small_title: 'Petit titre',
9-
paragraph: 'Paragraphe',
10-
separator: 'Séparateur',
11-
unordered_list: 'Liste',
12-
ordered_list: 'Liste numérotée',
13-
image: 'Image',
14-
code: 'Code',
15-
no_matches: 'Aucun résultat',
16-
blockquote: 'Citation',
17-
},
18-
add: {
19-
placeholder: 'Appuyez sur "/" pour le menu',
20-
add_element: 'Ajouter cet élément',
21-
},
22-
toolbar: {
23-
align_left: 'Justifié à gauche',
24-
align_center: 'Centré',
25-
align_right: 'Justifié à droite',
26-
font_size: 'Taille de police',
27-
list_ol: 'Liste ordonée',
28-
list_ul: 'Liste',
29-
style_list: 'Liste de styles',
30-
style_align: 'Alignment du style',
31-
style_font_size: 'Taille du style',
32-
style_color: 'Couleur du style',
33-
style_background: 'Couleur de fond du style',
34-
link: 'Créer ou supprimer un lien',
35-
bold: 'Gras',
36-
italic: 'Italique',
37-
underline: 'Souligné',
38-
strikethrough: 'Barré',
39-
},
40-
menus: {
41-
img_width_original: 'Largeur originale',
42-
img_width_large: 'Grande largeur',
43-
img_width_medium: 'Moyenne largeur',
44-
img_width_small: 'Petite largeur',
45-
img_delete: 'supprimer l\'image',
46-
},
4+
lang: 'fr',
5+
plugins: {
6+
huge_title: 'Très grand titre',
7+
large_title: 'Grand titre',
8+
small_title: 'Petit titre',
9+
paragraph: 'Paragraphe',
10+
separator: 'Séparateur',
11+
unordered_list: 'Liste',
12+
ordered_list: 'Liste numérotée',
13+
image: 'Image',
14+
code: 'Code',
15+
no_matches: 'Aucun résultat',
16+
blockquote: 'Citation'
17+
},
18+
add: {
19+
placeholder: 'Appuyez sur "/" pour le menu',
20+
add_element: 'Ajouter cet élément'
21+
},
22+
toolbar: {
23+
align_left: 'Justifié à gauche',
24+
align_center: 'Centré',
25+
align_right: 'Justifié à droite',
26+
font_size: 'Taille de police',
27+
list_ol: 'Liste ordonée',
28+
list_ul: 'Liste',
29+
style_list: 'Liste de styles',
30+
style_align: 'Alignment du style',
31+
style_font_size: 'Taille du style',
32+
style_color: 'Couleur du style',
33+
style_background: 'Couleur de fond du style',
34+
link: 'Créer ou supprimer un lien',
35+
bold: 'Gras',
36+
italic: 'Italique',
37+
underline: 'Souligné',
38+
strikethrough: 'Barré'
39+
},
40+
menus: {
41+
img_width_original: 'Largeur originale',
42+
img_width_large: 'Grande largeur',
43+
img_width_medium: 'Moyenne largeur',
44+
img_width_small: 'Petite largeur',
45+
img_delete: "supprimer l'image"
46+
}
4747
};

src/components/icons/blockquote.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import {FunctionalComponent, h} from '@stencil/core';
22

33
// Source: https://fonts.google.com/icons?selected=Material%20Icons%20Outlined%3Aformat_quote%3A
44
export const IconBlockquote: FunctionalComponent = () => (
5-
<svg
6-
xmlns="http://www.w3.org/2000/svg"
7-
viewBox="0 0 24 24"
8-
fill="currentColor">
5+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
96
<path d="M0 0h24v24H0V0z" fill="none" />
107
<path d="M18.62 18h-5.24l2-4H13V6h8v7.24L18.62 18zm-2-2h.76L19 12.76V8h-4v4h3.62l-2 4zm-8 2H3.38l2-4H3V6h8v7.24L8.62 18zm-2-2h.76L9 12.76V8H5v4h3.62l-2 4z" />
118
</svg>

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export type {Components, JSX} from './components';
22
export * from './menus/img.menu';
3+
export * from './plugins/blockquote.plugin';
34
export * from './plugins/code.plugin';
45
export * from './plugins/h1.plugin';
56
export * from './plugins/h2.plugin';
67
export * from './plugins/h3.plugin';
7-
export * from './plugins/blockquote.plugin';
88
export * from './plugins/hr.plugin';
99
export * from './plugins/img.plugin';
1010
export * from './plugins/list.plugin';

src/interface.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export * from './components';
22
export * from './menus/img.menu';
3+
export * from './plugins/blockquote.plugin';
34
export * from './plugins/code.plugin';
45
export * from './plugins/h1.plugin';
56
export * from './plugins/h2.plugin';
67
export * from './plugins/h3.plugin';
7-
export * from './plugins/blockquote.plugin';
88
export * from './plugins/hr.plugin';
99
export * from './plugins/img.plugin';
1010
export * from './plugins/list.plugin';

src/stores/i18n.store.ts

+46-45
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,75 @@
1-
import { createStore } from '@stencil/store';
2-
import { en } from '../assets/i18n/en';
3-
import { I18n, Languages } from '../types/i18n';
1+
import {createStore} from '@stencil/store';
2+
import {en} from '../assets/i18n/en';
3+
import {I18n, Languages} from '../types/i18n';
44

55
interface I18nStore extends I18n {
6-
custom?: Record<string, string>;
6+
custom?: Record<string, string>;
77
}
88

9-
const { state, onChange } = createStore<I18nStore>(en);
9+
const {state, onChange} = createStore<I18nStore>(en);
1010

1111
const esI18n = async (): Promise<I18n> => {
12-
const { es } = await import(`../assets/i18n/es`);
13-
return es;
12+
const {es} = await import(`../assets/i18n/es`);
13+
return es;
1414
};
1515

1616
const deI18n = async (): Promise<I18n> => {
17-
const { de } = await import(`../assets/i18n/de`);
18-
return de;
17+
const {de} = await import(`../assets/i18n/de`);
18+
return de;
1919
};
2020

2121
const nlI18n = async (): Promise<I18n> => {
22-
const { nl } = await import(`../assets/i18n/nl`);
23-
return nl;
22+
const {nl} = await import(`../assets/i18n/nl`);
23+
return nl;
2424
};
2525

2626
const jaI18n = async (): Promise<I18n> => {
27-
const { ja } = await import(`../assets/i18n/ja`);
28-
return ja;
27+
const {ja} = await import(`../assets/i18n/ja`);
28+
return ja;
2929
};
3030

3131
const zhCnI18n = async (): Promise<I18n> => {
32-
const { zhCn } = await import(`../assets/i18n/zh-cn`);
33-
return zhCn;
32+
const {zhCn} = await import(`../assets/i18n/zh-cn`);
33+
return zhCn;
3434
};
35+
3536
const frI18n = async (): Promise<I18n> => {
36-
const { fr } = await import(`../assets/i18n/fr`);
37-
return fr;
37+
const {fr} = await import(`../assets/i18n/fr`);
38+
return fr;
3839
};
3940

4041
const enI18n = (): I18n => en;
4142

4243
onChange('lang', async (lang: Languages) => {
43-
let bundle: I18n;
44+
let bundle: I18n;
4445

45-
switch (lang) {
46-
case 'es':
47-
bundle = await esI18n();
48-
break;
49-
case 'de':
50-
bundle = await deI18n();
51-
break;
52-
case 'nl':
53-
bundle = await nlI18n();
54-
break;
55-
case 'ja':
56-
bundle = await jaI18n();
57-
break;
58-
case 'zh-cn':
59-
bundle = await zhCnI18n();
60-
break;
61-
case 'fr':
62-
bundle = await frI18n();
63-
break;
64-
default:
65-
bundle = enI18n();
66-
}
46+
switch (lang) {
47+
case 'es':
48+
bundle = await esI18n();
49+
break;
50+
case 'de':
51+
bundle = await deI18n();
52+
break;
53+
case 'nl':
54+
bundle = await nlI18n();
55+
break;
56+
case 'ja':
57+
bundle = await jaI18n();
58+
break;
59+
case 'zh-cn':
60+
bundle = await zhCnI18n();
61+
break;
62+
case 'fr':
63+
bundle = await frI18n();
64+
break;
65+
default:
66+
bundle = enI18n();
67+
}
6768

68-
Object.assign(state, {
69-
custom: state.custom,
70-
...bundle
71-
});
69+
Object.assign(state, {
70+
custom: state.custom,
71+
...bundle
72+
});
7273
});
7374

74-
export default { state };
75+
export default {state};

src/types/i18n.ts

+39-39
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
export interface I18nPlugins {
2-
huge_title: string;
3-
large_title: string;
4-
small_title: string;
5-
paragraph: string;
6-
separator: string;
7-
unordered_list: string;
8-
ordered_list: string;
9-
image: string;
10-
code: string;
11-
no_matches: string;
12-
blockquote: string;
2+
huge_title: string;
3+
large_title: string;
4+
small_title: string;
5+
paragraph: string;
6+
separator: string;
7+
unordered_list: string;
8+
ordered_list: string;
9+
image: string;
10+
code: string;
11+
no_matches: string;
12+
blockquote: string;
1313
}
1414

1515
export interface I18nAdd {
16-
placeholder: string;
17-
add_element: string;
16+
placeholder: string;
17+
add_element: string;
1818
}
1919

2020
export interface I18Toolbar {
21-
align_left: string;
22-
align_center: string;
23-
align_right: string;
24-
font_size: string;
25-
list_ol: string;
26-
list_ul: string;
27-
style_list: string;
28-
style_align: string;
29-
style_font_size: string;
30-
style_color: string;
31-
style_background: string;
32-
link: string;
33-
bold: string;
34-
italic: string;
35-
underline: string;
36-
strikethrough: string;
21+
align_left: string;
22+
align_center: string;
23+
align_right: string;
24+
font_size: string;
25+
list_ol: string;
26+
list_ul: string;
27+
style_list: string;
28+
style_align: string;
29+
style_font_size: string;
30+
style_color: string;
31+
style_background: string;
32+
link: string;
33+
bold: string;
34+
italic: string;
35+
underline: string;
36+
strikethrough: string;
3737
}
3838

3939
export interface I18Menus {
40-
img_width_original: string;
41-
img_width_large: string;
42-
img_width_medium: string;
43-
img_width_small: string;
44-
img_delete: string;
40+
img_width_original: string;
41+
img_width_large: string;
42+
img_width_medium: string;
43+
img_width_small: string;
44+
img_delete: string;
4545
}
4646

4747
export type Languages = 'en' | 'es' | 'de' | 'nl' | 'ja' | 'zh-cn' | 'fr';
4848

4949
export interface I18n {
50-
lang: Languages;
51-
plugins: I18nPlugins;
52-
add: I18nAdd;
53-
toolbar: I18Toolbar;
54-
menus: I18Menus;
50+
lang: Languages;
51+
plugins: I18nPlugins;
52+
add: I18nAdd;
53+
toolbar: I18Toolbar;
54+
menus: I18Menus;
5555
}

src/utils/icon.utils.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {h, JSX} from '@stencil/core';
22
import {IconBlockquote} from '../components/icons/blockquote';
33
import {IconCode} from '../components/icons/code';
4-
import {IconEllipsisHorizontal} from '../components/icons/more';
54
import {IconImage} from '../components/icons/image';
5+
import {IconEllipsisHorizontal} from '../components/icons/more';
66
import {IconOl} from '../components/icons/ol';
77
import {IconUl} from '../components/icons/ul';
88
import {StyloIcon} from '../types/icon';

0 commit comments

Comments
 (0)