react-text-forge 1.1.1 → 1.2.0
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/LICENSE.txt +21 -0
- package/README.md +17 -1
- package/dist/components/FormatButton.d.ts +8 -6
- package/dist/components/ReactTextForge.d.ts +7 -1
- package/dist/components/ReactTextForgeContext.d.ts +8 -0
- package/dist/components/Toolbar.d.ts +1 -3
- package/dist/components/functions/deserializeDocx.d.ts +2 -0
- package/dist/components/utils/CustomEditor.d.ts +6 -0
- package/dist/components/utils/Images.d.ts +24 -0
- package/dist/components/utils/color.d.ts +21 -0
- package/dist/components/utils/dropdown/BlockListDropdown.d.ts +3 -5
- package/dist/components/utils/dropdown/BlockTypeDropdown.d.ts +1 -7
- package/dist/components/utils/dropdown/ContainerDropdown.d.ts +1 -1
- package/dist/components/utils/dropdown/FontSizeDropdown.d.ts +4 -0
- package/dist/components/utils/dropdown/LanguageDropdown.d.ts +1 -9
- package/dist/components/utils/dropdown/TableDropdown.d.ts +1 -6
- package/dist/components/utils/elements/BlockquoteElement.d.ts +20 -0
- package/dist/components/utils/elements/DefaultElement.d.ts +20 -0
- package/dist/components/utils/elements/ListElement.d.ts +20 -0
- package/dist/components/utils/form/BulletTypeSelector.d.ts +5 -3
- package/dist/components/utils/form/HistoryForm.d.ts +1 -5
- package/dist/components/utils/form/ImageForm.d.ts +1 -6
- package/dist/components/utils/form/LinkForm.d.ts +1 -1
- package/dist/components/utils/form/NumeredTypeSelector.d.ts +5 -3
- package/dist/components/utils/form/TableForm.d.ts +3 -5
- package/dist/react-text-forge.css +1 -1
- package/dist/react-text-forge.js +5473 -5131
- package/dist/react-text-forge.js.map +1 -1
- package/dist/react-text-forge.umd.cjs +223 -13
- package/dist/react-text-forge.umd.cjs.map +1 -1
- package/package.json +4 -2
- package/dist/components/utils/imageImport.d.ts +0 -41
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jahylis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ npm install react-texte-forge
|
|
|
11
11
|
```
|
|
12
12
|
## Utilisation
|
|
13
13
|
|
|
14
|
-
Voici un exemple
|
|
14
|
+
Voici un exemple pour utiliser ReactTextForge par défaut dans votre application React :
|
|
15
15
|
|
|
16
16
|
```jsx
|
|
17
17
|
import React, { useState } from "react";
|
|
@@ -26,6 +26,22 @@ export default function App() {
|
|
|
26
26
|
}
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
Par défaut, des couleurs sont données à l'éditeur: noire pour les images et les bordures, blanche pour l'arrière-plan
|
|
30
|
+
Vous pouvez personnaliser ces couleurs comme ceci :
|
|
31
|
+
|
|
32
|
+
```jsx
|
|
33
|
+
import React, { useState } from "react";
|
|
34
|
+
import ReactTextForge from "./components/ReactTextForge";
|
|
35
|
+
|
|
36
|
+
export default function App() {
|
|
37
|
+
const [value, setValue] = useState({});
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<ReactTextForge value={value} setValue={setValue} imageColor='#FFF' backgroundColor='#4a91e4' />
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
29
45
|
## Licence
|
|
30
46
|
Ce projet est sous licence MIT.
|
|
31
47
|
|
|
@@ -3,11 +3,13 @@ export default FormatButton;
|
|
|
3
3
|
* Ce composant permet d'afficher la liste des boutons de fonctionnalité
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
|
-
* @param {string}
|
|
7
|
-
* @param {
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {bool} isActive - état du format (actif ou non)
|
|
10
|
-
* @param {function} onMouseDown - Fonction déclenchée lors du clic de la souris
|
|
6
|
+
* @param {string} props.activeMarks - Liste des marques appliquées
|
|
7
|
+
* @param {string} props.format - format de texte sélectionné
|
|
8
|
+
* @param {bool} props.isActive - état du format (actif ou non)
|
|
11
9
|
* @returns {JSX.Element}
|
|
12
10
|
*/
|
|
13
|
-
declare function FormatButton({
|
|
11
|
+
declare function FormatButton({ activeMarks, format, isActive }: {
|
|
12
|
+
activeMarks: string;
|
|
13
|
+
format: string;
|
|
14
|
+
isActive: bool;
|
|
15
|
+
}): JSX.Element;
|
|
@@ -4,11 +4,17 @@ export default ReactTextForge;
|
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
6
|
* @param {object} props.value - contenu textuel
|
|
7
|
+
* @param {string} props.borderColor - couleur de bordure des éléments
|
|
8
|
+
* @param {string} props.backgroundColor - couleur d'arrière-plan
|
|
9
|
+
* @param {string} props.imageColor - couleur des images
|
|
7
10
|
* @param {function} props.setValue - change l'état du contenu
|
|
8
11
|
*
|
|
9
12
|
* @returns {JSX.Element }
|
|
10
13
|
*/
|
|
11
|
-
declare function ReactTextForge({ value, setValue }: {
|
|
14
|
+
declare function ReactTextForge({ value, setValue, borderColor, backgroundColor, imageColor }: {
|
|
12
15
|
value: object;
|
|
16
|
+
borderColor: string;
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
imageColor: string;
|
|
13
19
|
setValue: Function;
|
|
14
20
|
}): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function ReactTextForgeProvider({ backgroundColor, borderColor, imageColor, editor, children }: {
|
|
2
|
+
backgroundColor: any;
|
|
3
|
+
borderColor: any;
|
|
4
|
+
imageColor: any;
|
|
5
|
+
editor: any;
|
|
6
|
+
children: any;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export function useReactTextForgeContext(): any;
|
|
@@ -3,12 +3,10 @@ export default Toolbar;
|
|
|
3
3
|
* Ce composant permet d'afficher la barre d'outils
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
|
-
* @param {object} props.editor - éditeur de texte
|
|
7
6
|
* @param {object} props.activeMarks - Toutes les options (actifs ou non)
|
|
8
7
|
*
|
|
9
8
|
* @returns {JSX.Element }
|
|
10
9
|
*/
|
|
11
|
-
declare function Toolbar({
|
|
12
|
-
editor: object;
|
|
10
|
+
declare function Toolbar({ activeMarks }: {
|
|
13
11
|
activeMarks: object;
|
|
14
12
|
}): JSX.Element;
|
|
@@ -27,6 +27,12 @@ declare namespace CustomEditor {
|
|
|
27
27
|
* @returns {boolean}
|
|
28
28
|
*/
|
|
29
29
|
function isSelectionInList(editor: object): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Permet de définir la puce utilisée dans une liste à puces (non-ordonnée ou numérotée)
|
|
32
|
+
* @param {object} editor - éditeur de texte
|
|
33
|
+
* @returns {string}
|
|
34
|
+
*/
|
|
35
|
+
function getListStyleType(editor: object): string;
|
|
30
36
|
/**
|
|
31
37
|
* Permet de gérer l'application et la désapplication du bloc défini
|
|
32
38
|
* @param {object} editor - éditeur de texte
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2025 Jahylis
|
|
4
|
+
*
|
|
5
|
+
* This file is part of ReactTextForge.
|
|
6
|
+
*
|
|
7
|
+
* ReactTextForge is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published by
|
|
9
|
+
* the Open Source Initiative.
|
|
10
|
+
*
|
|
11
|
+
* ReactTextForge is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* MIT License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the MIT License
|
|
17
|
+
* along with ReactTextForge. If not, see <https://opensource.org/licenses/MIT>.
|
|
18
|
+
*
|
|
19
|
+
* For any questions or suggestions, please contact: administrateur@nhumeria.fr
|
|
20
|
+
*/
|
|
21
|
+
export default function Images({ format, imageColor }: {
|
|
22
|
+
format: any;
|
|
23
|
+
imageColor: any;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2025 Jahylis
|
|
4
|
+
*
|
|
5
|
+
* This file is part of ReactTextForge.
|
|
6
|
+
*
|
|
7
|
+
* ReactTextForge is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the MIT License as published by
|
|
9
|
+
* the Open Source Initiative.
|
|
10
|
+
*
|
|
11
|
+
* ReactTextForge is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* MIT License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the MIT License
|
|
17
|
+
* along with ReactTextForge. If not, see <https://opensource.org/licenses/MIT>.
|
|
18
|
+
*
|
|
19
|
+
* For any questions or suggestions, please contact: administrateur@nhumeria.fr
|
|
20
|
+
*/
|
|
21
|
+
export function isDarkColor(color: any): boolean;
|
|
@@ -3,16 +3,14 @@ export default BlockListDropdown;
|
|
|
3
3
|
* Ce composant affiche le formulaire de changement de puces (liste non-ordonnée ou numérotée)
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
|
-
* @param {string} props.editor - éditeur de texte
|
|
7
6
|
* @param {string} props.format - format sélectionné
|
|
8
|
-
* @param {
|
|
7
|
+
* @param {bool} props.isActive - état du format (actif ou non)
|
|
9
8
|
* @param {function} props.onMouseDown - Permet de définir l'élément comme une liste
|
|
10
9
|
*
|
|
11
10
|
* @returns {JSX.Element}
|
|
12
11
|
*/
|
|
13
|
-
declare function BlockListDropdown({
|
|
14
|
-
editor: string;
|
|
12
|
+
declare function BlockListDropdown({ format, isActive, onMouseDown }: {
|
|
15
13
|
format: string;
|
|
16
|
-
isActive:
|
|
14
|
+
isActive: bool;
|
|
17
15
|
onMouseDown: Function;
|
|
18
16
|
}): JSX.Element;
|
|
@@ -2,13 +2,7 @@ export default BlockTypeDropdown;
|
|
|
2
2
|
/**
|
|
3
3
|
* Ce composant affiche le formulaire de changement de type de bloc (paragraphe, titre ou sous-titre)
|
|
4
4
|
*
|
|
5
|
-
* @param {object} props
|
|
6
|
-
* @param {string} props.activeBlock - type de bloc sélectionné
|
|
7
|
-
* @param {function} props.onChange - Permet de changer le type de bloc
|
|
8
5
|
*
|
|
9
6
|
* @returns {JSX.Element}
|
|
10
7
|
*/
|
|
11
|
-
declare function BlockTypeDropdown(
|
|
12
|
-
activeBlock: string;
|
|
13
|
-
onChange: Function;
|
|
14
|
-
}): JSX.Element;
|
|
8
|
+
declare function BlockTypeDropdown(): JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Ce composant permet d'afficher un menu déroulant
|
|
2
|
+
* Ce composant permet d'afficher un menu déroulant à partir de la fonctionnalité sélectionnée
|
|
3
3
|
*
|
|
4
4
|
* @param {object} props
|
|
5
5
|
* @param {boolean} props.disabled - Active/désactive le bouton d'activation
|
|
@@ -3,14 +3,18 @@ export default FontSizeDropdown;
|
|
|
3
3
|
* Ce composant affiche le formulaire de sélection de la taille de police
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
|
+
* @param {string} props.backgroundColor - couleur d'arrière-plan
|
|
6
7
|
* @param {boolean} props.disabled - État du bouton (actif/inactif)
|
|
7
8
|
* @param {string} props.fontFamilySelected - taille sélectionnée
|
|
9
|
+
* @param {string} props.imageColor - couleur des images
|
|
8
10
|
* @param {func} props.onSelectFontFamily - Fonction permettant de changer la taille de police
|
|
9
11
|
*
|
|
10
12
|
* @returns {JSX.Element}
|
|
11
13
|
*/
|
|
12
14
|
declare function FontSizeDropdown({ disabled, sizeSelected, onSelectSize }: {
|
|
15
|
+
backgroundColor: string;
|
|
13
16
|
disabled: boolean;
|
|
14
17
|
fontFamilySelected: string;
|
|
18
|
+
imageColor: string;
|
|
15
19
|
onSelectFontFamily: func;
|
|
16
20
|
}): JSX.Element;
|
|
@@ -2,14 +2,6 @@ export default LanguageDropdown;
|
|
|
2
2
|
/**
|
|
3
3
|
* Ce composant permet de gérer l'affichage du formulaire de sélection de langage de code
|
|
4
4
|
*
|
|
5
|
-
* @param {object} props
|
|
6
|
-
* @param {object} props.editor | éditeur de texte
|
|
7
|
-
* @param {string} props.selectedLanguage | langage sélectionné dans le bloc courant
|
|
8
|
-
* @param {function} props.setSelectedLanguage | Modificateur du langage
|
|
9
5
|
* @returns {JSX.Element}
|
|
10
6
|
*/
|
|
11
|
-
declare function LanguageDropdown(
|
|
12
|
-
editor: object;
|
|
13
|
-
selectedLanguage: string;
|
|
14
|
-
setSelectedLanguage: Function;
|
|
15
|
-
}): JSX.Element;
|
|
7
|
+
declare function LanguageDropdown(): JSX.Element;
|
|
@@ -2,11 +2,6 @@ export default TableDropdown;
|
|
|
2
2
|
/**
|
|
3
3
|
* Ce composant permet de gérer l'affichage du formulaire de création de tableau
|
|
4
4
|
*
|
|
5
|
-
* @param {object} props
|
|
6
|
-
* @param {object} props.editor | éditeur de texte
|
|
7
|
-
*
|
|
8
5
|
* @returns {JSX.Element}
|
|
9
6
|
*/
|
|
10
|
-
declare function TableDropdown(
|
|
11
|
-
editor: object;
|
|
12
|
-
}): JSX.Element;
|
|
7
|
+
declare function TableDropdown(): JSX.Element;
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
export default BlockquoteElement;
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright (c) 2025 Jahylis
|
|
5
|
+
*
|
|
6
|
+
* This file is part of ReactTextForge.
|
|
7
|
+
*
|
|
8
|
+
* ReactTextForge is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the MIT License as published by
|
|
10
|
+
* the Open Source Initiative.
|
|
11
|
+
*
|
|
12
|
+
* ReactTextForge is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* MIT License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the MIT License
|
|
18
|
+
* along with ReactTextForge. If not, see <https://opensource.org/licenses/MIT>.
|
|
19
|
+
*
|
|
20
|
+
* For any questions or suggestions, please contact: administrateur@nhumeria.fr
|
|
21
|
+
*/
|
|
2
22
|
/**
|
|
3
23
|
* Permet de générer une citation
|
|
4
24
|
*
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
export default DefaultElement;
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright (c) 2025 Jahylis
|
|
5
|
+
*
|
|
6
|
+
* This file is part of ReactTextForge.
|
|
7
|
+
*
|
|
8
|
+
* ReactTextForge is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the MIT License as published by
|
|
10
|
+
* the Open Source Initiative.
|
|
11
|
+
*
|
|
12
|
+
* ReactTextForge is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* MIT License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the MIT License
|
|
18
|
+
* along with ReactTextForge. If not, see <https://opensource.org/licenses/MIT>.
|
|
19
|
+
*
|
|
20
|
+
* For any questions or suggestions, please contact: administrateur@nhumeria.fr
|
|
21
|
+
*/
|
|
2
22
|
/**
|
|
3
23
|
* Permet de générer un paragraphe (bloc par défaut)
|
|
4
24
|
*
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
export default ListElement;
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright (c) 2025 Jahylis
|
|
5
|
+
*
|
|
6
|
+
* This file is part of ReactTextForge.
|
|
7
|
+
*
|
|
8
|
+
* ReactTextForge is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the MIT License as published by
|
|
10
|
+
* the Open Source Initiative.
|
|
11
|
+
*
|
|
12
|
+
* ReactTextForge is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* MIT License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the MIT License
|
|
18
|
+
* along with ReactTextForge. If not, see <https://opensource.org/licenses/MIT>.
|
|
19
|
+
*
|
|
20
|
+
* For any questions or suggestions, please contact: administrateur@nhumeria.fr
|
|
21
|
+
*/
|
|
2
22
|
/**
|
|
3
23
|
* Permet de générer une liste
|
|
4
24
|
*
|
|
@@ -4,11 +4,13 @@ export default BulletTypeSelector;
|
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
6
|
* @param {function} props.onChange - permet de définir la nouvelle puce
|
|
7
|
-
* @param {
|
|
7
|
+
* @param {object} props.selectStyle - style appliqué pour l'élément
|
|
8
|
+
* @param {object} props.toggleForm - Affiche le formulaire
|
|
8
9
|
*
|
|
9
10
|
* @returns {JSX.Element}
|
|
10
11
|
*/
|
|
11
|
-
declare function BulletTypeSelector({ onChange,
|
|
12
|
+
declare function BulletTypeSelector({ onChange, selectStyle, toggleForm }: {
|
|
12
13
|
onChange: Function;
|
|
13
|
-
|
|
14
|
+
selectStyle: object;
|
|
15
|
+
toggleForm: object;
|
|
14
16
|
}): JSX.Element;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Ce composant permet d'afficher les boutons de gestion de l'historique
|
|
3
3
|
*
|
|
4
|
-
* @param {object} props
|
|
5
|
-
* @param {object} props.editor | Éditeur courant
|
|
6
4
|
* @returns {JSX.Element}
|
|
7
5
|
*/
|
|
8
|
-
export default function HistoryForm(
|
|
9
|
-
editor: object;
|
|
10
|
-
}): JSX.Element;
|
|
6
|
+
export default function HistoryForm(): JSX.Element;
|
|
@@ -2,11 +2,6 @@ export default ImageForm;
|
|
|
2
2
|
/**
|
|
3
3
|
* Permet de générer le formulaire d'insertion d'images
|
|
4
4
|
*
|
|
5
|
-
* @param {object} props
|
|
6
|
-
* @param {object} props.editor - éditeur de texte
|
|
7
|
-
*
|
|
8
5
|
* @returns {JSX.Element}
|
|
9
6
|
*/
|
|
10
|
-
declare function ImageForm(
|
|
11
|
-
editor: object;
|
|
12
|
-
}): JSX.Element;
|
|
7
|
+
declare function ImageForm(): JSX.Element;
|
|
@@ -9,7 +9,7 @@ export default LinkForm;
|
|
|
9
9
|
*
|
|
10
10
|
* @returns {JSX.Element}
|
|
11
11
|
*/
|
|
12
|
-
declare function LinkForm({
|
|
12
|
+
declare function LinkForm({ onClose, initialUrl, isOpenInNewTab }: {
|
|
13
13
|
onClose: Function;
|
|
14
14
|
initialUrl: string;
|
|
15
15
|
isOpenInNewTab: boolean;
|
|
@@ -4,11 +4,13 @@ export default NumeredTypeSelector;
|
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
6
|
* @param {function} props.onChange - permet de définir la nouvelle puce
|
|
7
|
-
* @param {
|
|
7
|
+
* @param {object} props.selectStyle - style appliqué pour l'élément
|
|
8
|
+
* @param {object} props.toggleForm - Affiche le formulaire
|
|
8
9
|
*
|
|
9
10
|
* @returns {JSX.Element}
|
|
10
11
|
*/
|
|
11
|
-
declare function NumeredTypeSelector({ onChange,
|
|
12
|
+
declare function NumeredTypeSelector({ onChange, selectStyle, toggleForm }: {
|
|
12
13
|
onChange: Function;
|
|
13
|
-
|
|
14
|
+
selectStyle: object;
|
|
15
|
+
toggleForm: object;
|
|
14
16
|
}): JSX.Element;
|
|
@@ -3,12 +3,10 @@ export default TableForm;
|
|
|
3
3
|
* Permet de générer le formulaire de création de tableau
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
|
-
* @param {function} props.
|
|
7
|
-
* @param {string} props.selectedType - puce sélectionnée
|
|
6
|
+
* @param {function} props.onClose - ferme le formulaire
|
|
8
7
|
*
|
|
9
8
|
* @returns {JSX.Element}
|
|
10
9
|
*/
|
|
11
|
-
declare function TableForm({
|
|
12
|
-
|
|
13
|
-
selectedType: string;
|
|
10
|
+
declare function TableForm({ onClose }: {
|
|
11
|
+
onClose: Function;
|
|
14
12
|
}): JSX.Element;
|
|
@@ -5,4 +5,4 @@ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5p
|
|
|
5
5
|
Author: (c) Henri Vandersleyen <hvandersleyen@gmail.com>
|
|
6
6
|
License: see project LICENSE
|
|
7
7
|
Touched: 2022
|
|
8
|
-
*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.toolbar{display:flex;gap:5px;margin-bottom:10px;flex-wrap:wrap}.tool{padding:5px;display:flex;justify-content:center;align-items:center;border:
|
|
8
|
+
*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.toolbar{display:flex;gap:5px;margin-bottom:10px;flex-wrap:wrap}.toolbar>div{display:flex}.toolbar>select,.toolbar>select:focus{outline:none;border:none;background:none}.toolbar>select option,.toolbar>select:focus option{border:none;outline:none;background:none;padding:0}.tool{padding:5px;display:flex;justify-content:center;align-items:center;border:none;border-radius:3px;background:none;cursor:pointer;outline:none}.tool--arrow{background:none;border:none;cursor:pointer;font-size:12px;margin-left:4px;position:relative;bottom:4px;height:18px;padding:0}.tool img,.tool svg{cursor:pointer;width:15px;height:15px}.react-text-forge{width:80%;margin:0 auto;border:1px solid;padding:10px;border-radius:5px;position:relative}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.react-text-forge .editor{min-height:200px;border:1px solid #ddd;padding:10px;border-radius:5px;outline:none}.react-text-forge .editor a{pointer-events:auto;cursor:pointer}.react-text-forge .editor img{max-height:200px}.react-text-forge .editor table{width:100%;table-layout:fixed;border-collapse:collapse}.react-text-forge .editor table tr{display:flex;width:100%}.react-text-forge .editor table th,.react-text-forge .editor table td{display:block;flex-grow:1;height:40px;max-height:40px;border:1px solid;border-color:inherit;padding:8px;overflow-y:scroll}.react-text-forge .color-picker-popup{position:relative}.react-text-forge .color-picker-popup .sketch-picker{position:absolute;top:100%;z-index:2}.react-text-forge .bullet-type-selector{display:inline-block;margin-left:8px}.react-text-forge .bullet-type-option{background:#f0f0f0;border:1px solid #ccc;border-radius:4px;padding:4px 8px;margin:2px;cursor:pointer}.react-text-forge .bullet-type-option:hover{background:#e0e0e0}.react-text-forge .dropdown{position:relative;display:flex}.react-text-forge .dropdown-toggle{background:none;border:none;cursor:pointer;padding:0}.react-text-forge .dropdown-menu{position:absolute;top:100%;background:#fff;border:1px solid #ccc;box-shadow:0 2px 8px #0000001a;list-style:none;height:100px;overflow-y:scroll;padding:10px 0;margin:5px 0;z-index:1000}.react-text-forge .dropdown-menu li{min-width:200px;width:max-content;height:20px;padding:5px 10px;line-height:20px;cursor:pointer}.react-text-forge .dropdown-menu li:hover{background:#f0f0f0}.react-text-forge pre{background-color:#6e6565;border:1px solid #ddd;border-radius:4px;padding:10px;overflow-x:auto;font-family:Consolas,Monaco,Courier New,monospace;font-size:14px;line-height:1.4;margin:1em 0}.react-text-forge .link-form{position:absolute;top:40px;left:0;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 10px #0000001a;padding:16px;z-index:10}.react-text-forge .link-form input[type=text]{width:calc(100% - 22px);padding:8px;margin-bottom:10px;border:1px solid #ccc;border-radius:4px}.react-text-forge .link-form label{display:flex;align-items:center;margin-bottom:10px}.react-text-forge .link-form label input[type=checkbox]{margin-right:8px}.react-text-forge .link-form-actions{display:flex;justify-content:flex-end;gap:8px}.react-text-forge .link-form-actions button{padding:8px 16px;border:none;border-radius:4px;cursor:pointer}.react-text-forge .image-upload-container{position:relative}.react-text-forge .hidden-file-input{display:none}.react-text-forge .table-grid-form{display:flex;flex-direction:column;align-items:center;height:fit-content;width:fit-content;overflow:visible;padding:0;border:0}.react-text-forge .table-grid-form .grid-container{display:grid;grid-template-columns:repeat(5,20px);grid-template-rows:repeat(5,20px);gap:2px}.react-text-forge .table-grid-form .grid-cell{width:20px;height:20px;background-color:#ddd;border:1px solid #ccc}.react-text-forge .table-grid-form .grid-cell.hovered{background-color:#007bff}.react-text-forge .table-grid-form .table-size-indicator{margin-top:10px;font-size:14px}.react-text-forge ::selection{background:#0078d74d;color:#000}.react-text-forge ::-moz-selection{background:#0078d74d;color:#000}.react-text-forge a{font-weight:500;color:#646cff;text-decoration:inherit}.react-text-forge a:hover{color:#535bf2}
|