fix: ajout du composant rich text editor (TipTap v3) #39
Reference in New Issue
Block a user
Delete Branch "develop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Résumé
Release pour publier le composant
MalioInputRichText(mergé via #37 dansdevelop).Inclut également un correctif de configuration
semantic-releasepour tolérer le format de commits du repo (<type>(<scope>) : <message>avec espace avant:).Changements
feat(input-rich-text): composant éditeur de texte riche TipTap v3 (déjà surdevelop)parserOpts.headerPatternajouté àcommit-analyzeretrelease-notes-generatordans.releaserc.jsonpour matcher le format Malio avec espacePourquoi un titre
fix:et pasfeat:Choix utilisateur — bump souhaité patch (
v1.4.6→v1.4.7) plutôt que minor.Test plan
fix:et bump env1.4.7v1.4.7créénpm update @malio/layer-ui→ import<MalioInputRichText>Note durable
Pour les futures PR de release : titre de la PR = un commit Conventional Commits (ex:
fix: …,feat: …,chore: …). Avec ce parserOpts en place, l'espace avant:est désormais toléré par semantic-release.## Résumé Nouveau composant `MalioInputRichText` : éditeur WYSIWYG basé sur **TipTap v3** + **StarterKit** + **tiptap-markdown**, aligné sur le thème Malio (couleurs `m-*`, icônes `mdi:*`, états error / success / hint). ## Détails - **Toolbar** : gras, italique, barré, H2, H3, liste à puces, liste numérotée, citation, code inline, bloc de code, lien (prompt URL), undo / redo - **Sortie** : `markdown` (par défaut) ou `html` via la prop `outputFormat` - **Modes** : `editable`, `disabled`, `readonly` ; mode lecture seule (`editable=false`) rend le contenu en `prose` sans toolbar - **Accessibilité** : label `for/id`, `aria-invalid`, `aria-describedby`, `aria-pressed` sur les boutons toolbar - **Style** : floating focus border `m-primary`, error `m-danger`, success `m-success`, toolbar `bg-m-bg` ## Dépendances ajoutées (purement additives, aucun bump existant) - `@tiptap/vue-3` ^3.22.5 - `@tiptap/starter-kit` ^3.22.5 - `@tiptap/extension-placeholder` ^3.22.5 - `@tiptap/pm` ^3.22.5 - `tiptap-markdown` ^0.9.0 > Note : `@tiptap/extension-link` n'est pas installé séparément car StarterKit v3 l'inclut nativement (configuré via `StarterKit.configure({ link: { ... } })`). ## Test plan - [x] `npm run test` — 315/315 (12 nouveaux tests sur InputRichText) - [x] `npm run lint` — 0 erreur sur les fichiers ajoutés - [x] `npm run story:build` — Histoire build OK (story `Input/RichText` listée) - [x] `npm run dev` — playground `/composant/input/inputRichText` (vérification visuelle des 8 variantes : simple, hint, erreur, succès, readonly, disabled, lecture seule, sortie HTML) - [x] `npm run story:dev` — story `Input/RichText` avec docs ## Fichiers - `app/components/malio/input/InputRichText.vue` — composant - `app/components/malio/input/InputRichText.test.ts` — tests - `.playground/pages/composant/input/inputRichText.vue` — playground - `app/story/input/inputRichText.story.vue` — story Histoire - `histoire.config.ts` — alias ESM + `optimizeDeps` pour `tiptap-markdown` (sinon Histoire choisit la build UMD) - `CHANGELOG.md`, `COMPONENTS.md` — documentation Reviewed-on: #37 Co-authored-by: matthieu <matthieu@yuno.malio.fr> Co-committed-by: matthieu <matthieu@yuno.malio.fr>