@mjml-agent-editor/editor 0.1.0 → 0.1.3
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/README.md +24 -0
- package/dist/canvas.cjs +4 -15
- package/dist/canvas.cjs.map +1 -1
- package/dist/canvas.js +2 -2
- package/dist/canvas.js.map +1 -1
- package/dist/{chunk-LSF33PSW.js → chunk-74EUKHXJ.js} +9 -18
- package/dist/chunk-74EUKHXJ.js.map +1 -0
- package/dist/index.cjs +7 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -12
- package/dist/index.d.ts +25 -12
- package/dist/index.js +1 -1
- package/package.json +6 -5
- package/dist/chunk-LSF33PSW.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -36,7 +36,7 @@ __export(index_exports, {
|
|
|
36
36
|
EditorHeader: () => EditorHeader,
|
|
37
37
|
EditorStoreProvider: () => EditorStoreProvider,
|
|
38
38
|
Markdown: () => Markdown,
|
|
39
|
-
STARTER_MJML: () => STARTER_MJML,
|
|
39
|
+
STARTER_MJML: () => import_core.STARTER_MJML,
|
|
40
40
|
useCommentStore: () => useCommentStore,
|
|
41
41
|
useDocumentStore: () => useDocumentStore
|
|
42
42
|
});
|
|
@@ -68,20 +68,8 @@ function useCommentStore() {
|
|
|
68
68
|
return useStores().comments;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
// src/
|
|
72
|
-
var
|
|
73
|
-
<mj-body background-color="#f4f4f5">
|
|
74
|
-
<mj-section background-color="#ffffff" padding="32px 24px">
|
|
75
|
-
<mj-column>
|
|
76
|
-
<mj-text font-size="22px" font-weight="bold">New email</mj-text>
|
|
77
|
-
<mj-text color="#555555">
|
|
78
|
-
Describe the email you need in the chat on the right \u2014 the agent
|
|
79
|
-
will design the sections, content and images.
|
|
80
|
-
</mj-text>
|
|
81
|
-
</mj-column>
|
|
82
|
-
</mj-section>
|
|
83
|
-
</mj-body>
|
|
84
|
-
</mjml>`;
|
|
71
|
+
// src/index.ts
|
|
72
|
+
var import_core = require("@mjml-agent-editor/core");
|
|
85
73
|
|
|
86
74
|
// src/components/editor/EditorHeader.tsx
|
|
87
75
|
var import_react2 = require("react");
|
|
@@ -1438,6 +1426,8 @@ function ToolActivity({ tools }) {
|
|
|
1438
1426
|
}
|
|
1439
1427
|
function ChatPanel({
|
|
1440
1428
|
docId,
|
|
1429
|
+
initialMessages,
|
|
1430
|
+
transport,
|
|
1441
1431
|
onBeforeSend,
|
|
1442
1432
|
onAgentFinish,
|
|
1443
1433
|
onLiveUpdate,
|
|
@@ -1457,7 +1447,8 @@ function ChatPanel({
|
|
|
1457
1447
|
return times.current.get(id);
|
|
1458
1448
|
};
|
|
1459
1449
|
const { messages, sendMessage, status, stop } = (0, import_react4.useChat)({
|
|
1460
|
-
|
|
1450
|
+
messages: initialMessages,
|
|
1451
|
+
transport: transport ?? new import_ai.DefaultChatTransport({
|
|
1461
1452
|
// Same-origin: the agent is a route handler in this app, not a separate service.
|
|
1462
1453
|
api: "/api/chat",
|
|
1463
1454
|
body: { docId }
|