@mjml-agent-editor/editor 0.1.1 → 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-IO4AKLYJ.js → chunk-74EUKHXJ.js} +7 -18
- package/dist/chunk-74EUKHXJ.js.map +1 -0
- package/dist/index.cjs +5 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -13
- package/dist/index.d.ts +15 -13
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-IO4AKLYJ.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");
|
|
@@ -1439,6 +1427,7 @@ function ToolActivity({ tools }) {
|
|
|
1439
1427
|
function ChatPanel({
|
|
1440
1428
|
docId,
|
|
1441
1429
|
initialMessages,
|
|
1430
|
+
transport,
|
|
1442
1431
|
onBeforeSend,
|
|
1443
1432
|
onAgentFinish,
|
|
1444
1433
|
onLiveUpdate,
|
|
@@ -1459,7 +1448,7 @@ function ChatPanel({
|
|
|
1459
1448
|
};
|
|
1460
1449
|
const { messages, sendMessage, status, stop } = (0, import_react4.useChat)({
|
|
1461
1450
|
messages: initialMessages,
|
|
1462
|
-
transport: new import_ai.DefaultChatTransport({
|
|
1451
|
+
transport: transport ?? new import_ai.DefaultChatTransport({
|
|
1463
1452
|
// Same-origin: the agent is a route handler in this app, not a separate service.
|
|
1464
1453
|
api: "/api/chat",
|
|
1465
1454
|
body: { docId }
|