@synertech/ui 0.39.0 → 0.39.1
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/.claude/skills/use-synertech-ui/SKILL.md +14 -3
- package/README.md +12 -2
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +14 -6
- package/dist/index.d.ts +14 -6
- package/dist/index.js +9 -9
- package/dist/markdown-editor.cjs +1 -0
- package/dist/markdown-editor.d.cts +15 -0
- package/dist/markdown-editor.d.ts +15 -0
- package/dist/markdown-editor.js +1 -0
- package/dist/types-99-Ej5og.d.cts +15 -0
- package/dist/types-99-Ej5og.d.ts +15 -0
- package/package.json +12 -2
|
@@ -53,17 +53,28 @@ import "@synertech/ui/styles.css";
|
|
|
53
53
|
React >= 18 et React-DOM >= 18 doivent etre installés dans le projet consommateur.
|
|
54
54
|
|
|
55
55
|
`@mdxeditor/editor` est une peer dependency **optionnelle**, utilisée uniquement par
|
|
56
|
-
`<HelpButton markdown editable>`.
|
|
57
|
-
|
|
56
|
+
`<HelpButton markdown editable>`. L'éditeur est publié sur un point d'entrée séparé, pour
|
|
57
|
+
que les applications qui n'éditent pas de Markdown ne l'installent ni ne l'embarquent :
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
pnpm add @mdxeditor/editor
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
```tsx
|
|
64
|
-
|
|
64
|
+
"use client";
|
|
65
|
+
|
|
66
|
+
import { HelpButton } from "@synertech/ui";
|
|
67
|
+
import { MarkdownEditor } from "@synertech/ui/markdown-editor";
|
|
68
|
+
|
|
69
|
+
<HelpButton content={aide} markdown editable markdownEditor={MarkdownEditor} />;
|
|
65
70
|
```
|
|
66
71
|
|
|
72
|
+
`markdownEditor` est un composant : passez-le depuis un Client Component. La feuille de
|
|
73
|
+
style de l'éditeur est incluse. Sans cette prop, le mode édition affiche un message.
|
|
74
|
+
|
|
75
|
+
**Anti-pattern** : ne jamais importer `@synertech/ui/markdown-editor` dans une application
|
|
76
|
+
qui n'installe pas `@mdxeditor/editor` — son build échouerait sur un module introuvable.
|
|
77
|
+
|
|
67
78
|
---
|
|
68
79
|
|
|
69
80
|
## Imports
|
package/README.md
CHANGED
|
@@ -51,15 +51,25 @@ module.exports = {
|
|
|
51
51
|
**optional** peer dependency — it pulls in a large dependency tree, so it is not
|
|
52
52
|
installed with the library. Every other component works without it.
|
|
53
53
|
|
|
54
|
+
The editor ships from its own entry point, so apps that never edit Markdown
|
|
55
|
+
never install or bundle it:
|
|
56
|
+
|
|
54
57
|
```bash
|
|
55
58
|
pnpm add @mdxeditor/editor
|
|
56
59
|
```
|
|
57
60
|
|
|
58
61
|
```tsx
|
|
59
|
-
|
|
62
|
+
"use client";
|
|
63
|
+
|
|
64
|
+
import { HelpButton } from "@synertech/ui";
|
|
65
|
+
import { MarkdownEditor } from "@synertech/ui/markdown-editor";
|
|
66
|
+
|
|
67
|
+
<HelpButton content={help} markdown editable markdownEditor={MarkdownEditor} />;
|
|
60
68
|
```
|
|
61
69
|
|
|
62
|
-
|
|
70
|
+
`markdownEditor` is a component, so pass it from a Client Component. The editor's
|
|
71
|
+
stylesheet is included. Without the prop, the edit mode renders an explanatory
|
|
72
|
+
message instead of the editor.
|
|
63
73
|
|
|
64
74
|
|
|
65
75
|
## Usage
|