@simmalugnt-se/payload-editor-assistant 0.7.0 → 0.9.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +21 -0
  3. package/dist/components/EditorAssistantAside.js +15 -5
  4. package/dist/components/ReplyText.d.ts +4 -0
  5. package/dist/components/ReplyText.js +26 -0
  6. package/dist/components/copy.d.ts +8 -0
  7. package/dist/components/copy.js +18 -0
  8. package/dist/components/reply-markdown.d.ts +26 -0
  9. package/dist/components/reply-markdown.js +142 -0
  10. package/dist/components/translation-offer.d.ts +16 -0
  11. package/dist/components/translation-offer.js +38 -0
  12. package/dist/domain/content.js +3 -0
  13. package/dist/domain/decide.js +10 -8
  14. package/dist/domain/propose.js +56 -19
  15. package/dist/domain/relations.d.ts +5 -1
  16. package/dist/domain/relations.js +6 -2
  17. package/dist/endpoints/translation.d.ts +11 -0
  18. package/dist/endpoints/translation.js +56 -0
  19. package/dist/form/diff.d.ts +6 -1
  20. package/dist/form/diff.js +35 -1
  21. package/dist/form/empty.d.ts +0 -1
  22. package/dist/form/empty.js +0 -20
  23. package/dist/form/rich-text.d.ts +72 -0
  24. package/dist/form/rich-text.js +254 -0
  25. package/dist/form/shape.d.ts +12 -3
  26. package/dist/form/shape.js +92 -13
  27. package/dist/form/translation.d.ts +14 -0
  28. package/dist/form/translation.js +81 -0
  29. package/dist/plugin.js +2 -0
  30. package/dist/runtime/agent.js +3 -0
  31. package/dist/runtime/context.d.ts +7 -0
  32. package/dist/runtime/context.js +25 -7
  33. package/dist/runtime/system-prompt.js +32 -21
  34. package/dist/runtime/tools.js +1 -1
  35. package/dist/runtime/translation-source.d.ts +10 -0
  36. package/dist/runtime/translation-source.js +12 -0
  37. package/dist/runtime/voice.js +20 -7
  38. package/dist/schema/discover.d.ts +2 -0
  39. package/dist/schema/discover.js +9 -0
  40. package/dist/schema/fields.d.ts +7 -0
  41. package/dist/schema/fields.js +26 -0
  42. package/dist/schema/project.js +4 -0
  43. package/dist/styles/assistant.css +30 -1
  44. package/package.json +8 -1
@@ -108,7 +108,7 @@ html[data-theme="dark"] .ea-aside {
108
108
  gap: calc(var(--base) * 0.8);
109
109
  }
110
110
 
111
- /* The assistant writes plain text, the editor's messages sit in a quiet bubble. */
111
+ /* The assistant's replies sit on the panel, the editor's messages in a quiet bubble. */
112
112
  .ea-msg {
113
113
  max-width: 100%;
114
114
  line-height: 1.5;
@@ -128,6 +128,35 @@ html[data-theme="dark"] .ea-aside {
128
128
  align-self: flex-start;
129
129
  }
130
130
 
131
+ /* A reply's Markdown: paragraphs and lists spaced like the thread, a line break kept inside one. */
132
+ .ea-reply__p,
133
+ .ea-reply__list {
134
+ margin: 0;
135
+ }
136
+
137
+ .ea-reply__p + .ea-reply__p,
138
+ .ea-reply__p + .ea-reply__list,
139
+ .ea-reply__list + .ea-reply__p,
140
+ .ea-reply__list + .ea-reply__list {
141
+ margin-top: calc(var(--base) * 0.5);
142
+ }
143
+
144
+ .ea-reply__list {
145
+ padding-inline-start: calc(var(--base) * 1.2);
146
+ white-space: normal;
147
+ }
148
+
149
+ .ea-reply__list li + li {
150
+ margin-top: calc(var(--base) * 0.2);
151
+ }
152
+
153
+ .ea-msg code {
154
+ font-size: 0.9em;
155
+ padding: 0 0.25em;
156
+ border-radius: var(--style-radius-s);
157
+ background: var(--theme-elevation-100);
158
+ }
159
+
131
160
  .ea-msg--system {
132
161
  color: var(--theme-elevation-500);
133
162
  font-size: 12px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simmalugnt-se/payload-editor-assistant",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Context-aware editor assistant plugin for Payload Admin",
5
5
  "keywords": [
6
6
  "payload",
@@ -40,6 +40,7 @@
40
40
  "access": "public"
41
41
  },
42
42
  "peerDependencies": {
43
+ "@payloadcms/richtext-lexical": ">=3.87.1 <4",
43
44
  "@payloadcms/ui": ">=3.87.1 <4",
44
45
  "ai": "^7.0.0",
45
46
  "next": ">=16.2.6 <17",
@@ -47,7 +48,13 @@
47
48
  "react": "^19.0.0",
48
49
  "react-dom": "^19.0.0"
49
50
  },
51
+ "peerDependenciesMeta": {
52
+ "@payloadcms/richtext-lexical": {
53
+ "optional": true
54
+ }
55
+ },
50
56
  "devDependencies": {
57
+ "@payloadcms/richtext-lexical": "3.90.2",
51
58
  "@payloadcms/ui": "3.90.2",
52
59
  "@types/node": "^22",
53
60
  "@types/react": "^19.2.18",