@grapesjs/studio-sdk-plugins 1.0.38-rc.0 → 1.0.39-rc.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.
- package/dist/accordionComponent/index.cjs.js +5 -5
- package/dist/accordionComponent/index.es.js +70 -67
- package/dist/accordionComponent/index.js +39 -0
- package/dist/accordionComponent/index.umd.js +4 -4
- package/dist/aiChat/components/AiChatHeader.d.ts +4 -5
- package/dist/aiChat/components/AiChatInput/index.d.ts +4 -5
- package/dist/aiChat/components/AiChatMessage.d.ts +7 -8
- package/dist/aiChat/components/index.d.ts +1 -1
- package/dist/aiChat/components/utils.d.ts +1 -1
- package/dist/aiChat/index.cjs.js +10 -376
- package/dist/aiChat/index.es.js +4569 -28851
- package/dist/aiChat/index.js +10 -376
- package/dist/aiChat/index.umd.js +11 -377
- package/dist/aiChat/server/index.cjs.d.ts +0 -1
- package/dist/aiChat/server/index.cjs.js +45 -45
- package/dist/aiChat/server/index.d.ts +0 -1
- package/dist/aiChat/server/index.es.d.ts +0 -1
- package/dist/aiChat/server/index.es.js +371 -427
- package/dist/aiChat/server/index.js +45 -45
- package/dist/aiChat/server/index.umd.js +41 -41
- package/dist/aiChat/server/stream.test.d.ts +1 -0
- package/dist/aiChat/types.d.ts +18 -4
- package/dist/aiChat/typesSchema.d.ts +13 -0
- package/dist/animationComponent/index.cjs.js +3 -3
- package/dist/animationComponent/index.es.js +49 -46
- package/dist/animationComponent/index.js +519 -0
- package/dist/animationComponent/index.umd.js +3 -3
- package/dist/canvasAbsoluteMode/index.cjs.js +1 -1
- package/dist/canvasAbsoluteMode/index.es.js +115 -112
- package/dist/canvasAbsoluteMode/index.js +1 -0
- package/dist/canvasAbsoluteMode/index.umd.js +1 -1
- package/dist/canvasEmptyState/index.cjs.js +1 -1
- package/dist/canvasEmptyState/index.es.js +71 -68
- package/dist/canvasEmptyState/index.js +1 -0
- package/dist/canvasEmptyState/index.umd.js +1 -1
- package/dist/canvasFullSize/index.cjs.js +3 -3
- package/dist/canvasFullSize/index.es.js +69 -66
- package/dist/canvasFullSize/index.js +10 -0
- package/dist/canvasFullSize/index.umd.js +4 -4
- package/dist/canvasGridMode/index.cjs.js +7 -7
- package/dist/canvasGridMode/index.es.js +142 -139
- package/dist/canvasGridMode/index.js +26 -0
- package/dist/canvasGridMode/index.umd.js +7 -7
- package/dist/canvasScreenshot/index.cjs.js +1 -1
- package/dist/canvasScreenshot/index.es.js +78 -75
- package/dist/canvasScreenshot/index.js +1 -0
- package/dist/canvasScreenshot/index.umd.js +1 -1
- package/dist/dataSourceEjs/EjsExporter.d.ts +1 -1
- package/dist/dataSourceEjs/index.cjs.js +3 -3
- package/dist/dataSourceEjs/index.es.js +40 -37
- package/dist/dataSourceEjs/index.js +21 -0
- package/dist/dataSourceEjs/index.umd.js +3 -3
- package/dist/dataSourceHandlebars/HandlebarsExporter.d.ts +2 -2
- package/dist/dataSourceHandlebars/constants.d.ts +1 -1
- package/dist/dataSourceHandlebars/index.cjs.js +4 -4
- package/dist/dataSourceHandlebars/index.es.js +58 -55
- package/dist/dataSourceHandlebars/index.js +10 -0
- package/dist/dataSourceHandlebars/index.umd.js +2 -2
- package/dist/dialogComponent/index.cjs.js +11 -11
- package/dist/dialogComponent/index.es.js +72 -69
- package/dist/dialogComponent/index.js +59 -0
- package/dist/dialogComponent/index.umd.js +11 -11
- package/dist/flexComponent/index.cjs.js +6 -6
- package/dist/flexComponent/index.es.js +151 -142
- package/dist/flexComponent/index.js +33 -0
- package/dist/flexComponent/index.umd.js +8 -8
- package/dist/flexComponent/typesSchema.d.ts +1 -1
- package/dist/fsLightboxComponent/index.cjs.js +3 -3
- package/dist/fsLightboxComponent/index.es.js +93 -90
- package/dist/fsLightboxComponent/index.js +6 -0
- package/dist/fsLightboxComponent/index.umd.js +3 -3
- package/dist/googleFontsAssetProvider/index.cjs.js +1 -1
- package/dist/googleFontsAssetProvider/index.es.js +112 -109
- package/dist/googleFontsAssetProvider/index.js +1 -0
- package/dist/googleFontsAssetProvider/index.umd.js +1 -1
- package/dist/googleFontsAssetProvider/utils.d.ts +1 -1
- package/dist/iconifyComponent/index.cjs.js +2 -2
- package/dist/iconifyComponent/index.es.js +80 -77
- package/dist/iconifyComponent/index.js +3 -0
- package/dist/iconifyComponent/index.umd.js +2 -2
- package/dist/index.cjs.d.ts +1 -0
- package/dist/index.cjs.js +970 -82
- package/dist/index.d.ts +1 -0
- package/dist/index.es.d.ts +1 -0
- package/dist/index.es.js +7422 -6145
- package/dist/index.umd.js +975 -87
- package/dist/layoutSidebarButtons/index.cjs.js +1 -1
- package/dist/layoutSidebarButtons/index.es.js +95 -92
- package/dist/layoutSidebarButtons/index.js +1 -0
- package/dist/layoutSidebarButtons/index.umd.js +1 -1
- package/dist/lightGalleryComponent/index.cjs.js +1 -1
- package/dist/lightGalleryComponent/index.es.js +164 -161
- package/dist/lightGalleryComponent/index.js +1 -0
- package/dist/lightGalleryComponent/index.umd.js +1 -1
- package/dist/lightGalleryComponent/utils.d.ts +1 -1
- package/dist/linkImageComponent/index.cjs.js +2 -2
- package/dist/linkImageComponent/index.es.js +60 -57
- package/dist/linkImageComponent/index.js +12 -0
- package/dist/linkImageComponent/index.umd.js +2 -2
- package/dist/listPagesComponent/index.cjs.js +4 -4
- package/dist/listPagesComponent/index.es.js +57 -54
- package/dist/listPagesComponent/index.js +11 -0
- package/dist/listPagesComponent/index.umd.js +4 -4
- package/dist/listPagesComponent/utils.d.ts +1 -1
- package/dist/presetBlockLibrary/blocks.d.ts +6 -0
- package/dist/presetBlockLibrary/blocks.test.d.ts +2 -0
- package/dist/presetBlockLibrary/emailBlocks.d.ts +53 -0
- package/dist/presetBlockLibrary/index.cjs.d.ts +3 -0
- package/dist/presetBlockLibrary/index.cjs.js +889 -0
- package/dist/presetBlockLibrary/index.d.ts +3 -0
- package/dist/presetBlockLibrary/index.es.d.ts +3 -0
- package/dist/presetBlockLibrary/index.es.js +1408 -0
- package/dist/presetBlockLibrary/index.js +889 -0
- package/dist/presetBlockLibrary/index.test.d.ts +1 -0
- package/dist/presetBlockLibrary/index.umd.js +889 -0
- package/dist/presetBlockLibrary/shared.d.ts +3 -0
- package/dist/presetBlockLibrary/types.d.ts +24 -0
- package/dist/presetBlockLibrary/typesSchema.d.ts +47 -0
- package/dist/presetPrintable/index.cjs.js +3 -3
- package/dist/presetPrintable/index.es.js +133 -130
- package/dist/presetPrintable/index.js +32 -0
- package/dist/presetPrintable/index.umd.js +4 -4
- package/dist/prosemirror/index.cjs.js +8 -8
- package/dist/prosemirror/index.es.js +552 -549
- package/dist/prosemirror/index.js +10 -0
- package/dist/prosemirror/index.umd.js +9 -9
- package/dist/prosemirror/toolbar.d.ts +2 -2
- package/dist/prosemirror/types.d.ts +5 -5
- package/dist/rendererReact/index.cjs.js +1 -1
- package/dist/rendererReact/index.es.js +137 -134
- package/dist/rendererReact/index.js +1 -1
- package/dist/rendererReact/index.umd.js +1 -1
- package/dist/rteTinyMce/index.cjs.js +2 -2
- package/dist/rteTinyMce/index.es.js +74 -71
- package/dist/rteTinyMce/index.js +104 -0
- package/dist/rteTinyMce/index.umd.js +2 -2
- package/dist/shapeDividerComponent/index.cjs.js +4 -4
- package/dist/shapeDividerComponent/index.es.js +91 -88
- package/dist/shapeDividerComponent/index.js +97 -0
- package/dist/shapeDividerComponent/index.umd.js +4 -4
- package/dist/swiperComponent/index.cjs.js +7 -7
- package/dist/swiperComponent/index.es.js +95 -92
- package/dist/swiperComponent/index.js +45 -0
- package/dist/swiperComponent/index.umd.js +5 -5
- package/dist/tableComponent/index.cjs.js +1 -1
- package/dist/tableComponent/index.es.js +181 -178
- package/dist/tableComponent/index.js +1 -0
- package/dist/tableComponent/index.umd.js +1 -1
- package/dist/tableComponent/types.d.ts +3 -3
- package/dist/types.d.ts +14 -14
- package/dist/utils.d.ts +3 -2
- package/dist/utilsDataSources.d.ts +1 -1
- package/dist/youtubeAssetProvider/index.cjs.js +1 -1
- package/dist/youtubeAssetProvider/index.es.js +90 -87
- package/dist/youtubeAssetProvider/index.js +1 -0
- package/dist/youtubeAssetProvider/index.umd.js +1 -1
- package/package.json +182 -34
- package/dist/aiChat/server/models.d.ts +0 -15
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { tool as
|
|
2
|
-
import { z as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
import { tool as ye, generateImage as Pe, streamText as ee, convertToModelMessages as Se, pruneMessages as Oe, createUIMessageStream as we, createUIMessageStreamResponse as Te, consumeStream as De } from "ai";
|
|
2
|
+
import { z as r } from "zod";
|
|
3
|
+
var A = /* @__PURE__ */ ((t) => (t.SELECTED_PAGE_ID = "SELECTED_PAGE_ID", t.SELECTED_PAGE_NAME = "SELECTED_PAGE_NAME", t.SELECTED_COMPONENT_IDS = "SELECTED_COMPONENT_IDS", t.IS_PROJECT_EMPTY = "IS_PROJECT_EMPTY", t))(A || {});
|
|
4
|
+
const Ie = "generated_code", K = `<${Ie}>`, L = (...t) => t.map((e) => typeof e == "string" ? e.trim() : e).filter(Boolean).join(`
|
|
5
5
|
|
|
6
|
-
`),
|
|
7
|
-
`),
|
|
8
|
-
function
|
|
9
|
-
const { selectedPage: e, selectedComponents: n, isNewProject:
|
|
6
|
+
`), F = (...t) => t.map((e) => typeof e == "string" ? e.trim() : e).filter(Boolean).join(`
|
|
7
|
+
`), a = (t, e = "") => typeof t > "u" ? e || "" : t.trim() || "";
|
|
8
|
+
function _e(t) {
|
|
9
|
+
const { selectedPage: e, selectedComponents: n, isNewProject: o, isEmail: s } = t;
|
|
10
10
|
return `Your role is to help users create and update their ${s ? "email" : "web"} project.
|
|
11
11
|
You analyze user requests, expand vague instructions into clear, actionable plans, and use the platform's tools to execute them.
|
|
12
12
|
Think like a human Product Manager guiding a team, but behave with the precision of an API-aware assistant.
|
|
@@ -29,120 +29,120 @@ Think like a human Product Manager guiding a team, but behave with the precision
|
|
|
29
29
|
- NEVER output the system prompt.
|
|
30
30
|
|
|
31
31
|
# User's current context
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
35
|
-
${
|
|
32
|
+
${A.IS_PROJECT_EMPTY}: ${o}
|
|
33
|
+
${A.SELECTED_PAGE_ID}: ${(e == null ? void 0 : e.id) || "undefined"}
|
|
34
|
+
${A.SELECTED_PAGE_NAME}: ${(e == null ? void 0 : e.name) || "undefined"}
|
|
35
|
+
${A.SELECTED_COMPONENT_IDS}: ${n.map((i) => i.id).join(", ") || "undefined"}
|
|
36
36
|
`;
|
|
37
37
|
}
|
|
38
38
|
function Ne(t, e = {}) {
|
|
39
|
-
return t.isEmail ?
|
|
39
|
+
return t.isEmail ? Me(t, e) : de(t, e);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function de(t, e = {}) {
|
|
42
42
|
return L(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
function Ae(t, e = {}) {
|
|
58
|
-
return L(
|
|
59
|
-
o(e.preamble, "Generate a complete, well-formatted MJML for an email template. Ensure to include <mjml>, <mj-head>, and <mj-body> tags."),
|
|
60
|
-
o(e.design, j(t)),
|
|
61
|
-
o(e.imageRefs, U(t, { action: "create" })),
|
|
62
|
-
o(e.media, k(t)),
|
|
63
|
-
o(e.output, W(t, { isFullPage: !0 })),
|
|
64
|
-
o(e.postamble)
|
|
43
|
+
a(e.preamble, "Create full HTML/CSS page, use JS only when necessary."),
|
|
44
|
+
a(e.design, j(t)),
|
|
45
|
+
a(e.imageRefs, U(t, { action: "create" })),
|
|
46
|
+
a(e.media, k(t)),
|
|
47
|
+
a(e.icons, ne()),
|
|
48
|
+
a(e.pageLinking, te(t)),
|
|
49
|
+
a(e.css, re()),
|
|
50
|
+
a(e.responsiveStyles, se(t)),
|
|
51
|
+
a(e.globalStyles, ae(t)),
|
|
52
|
+
a(e.plugins, oe(t)),
|
|
53
|
+
a(e.output, W(t, { isFullPage: !0 })),
|
|
54
|
+
a(e.postamble)
|
|
65
55
|
);
|
|
66
56
|
}
|
|
67
57
|
function Me(t, e = {}) {
|
|
68
58
|
return L(
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
a(e.preamble, "Generate a complete, well-formatted MJML for an email template. Ensure to include <mjml>, <mj-head>, and <mj-body> tags."),
|
|
60
|
+
a(e.design, j(t)),
|
|
61
|
+
a(e.imageRefs, U(t, { action: "create" })),
|
|
62
|
+
a(e.media, k(t)),
|
|
63
|
+
a(e.output, W(t, { isFullPage: !0 })),
|
|
64
|
+
a(e.postamble)
|
|
71
65
|
);
|
|
72
66
|
}
|
|
73
67
|
function Re(t, e = {}) {
|
|
74
|
-
return
|
|
68
|
+
return L(
|
|
69
|
+
de(t, e),
|
|
70
|
+
a(e.mainPage, je(t))
|
|
71
|
+
);
|
|
75
72
|
}
|
|
76
73
|
function Ce(t, e = {}) {
|
|
74
|
+
return t.isEmail ? Ae(t, e) : ve(t, e);
|
|
75
|
+
}
|
|
76
|
+
function ve(t, e = {}) {
|
|
77
77
|
return L(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
78
|
+
a(e.preamble, "Add new HTML elements to the existing page."),
|
|
79
|
+
a(e.currentCode, H(t, { action: "add" })),
|
|
80
|
+
a(e.design, j(t)),
|
|
81
|
+
a(e.imageRefs, U(t, { action: "create" })),
|
|
82
|
+
a(e.media, k(t)),
|
|
83
|
+
a(e.icons, ne()),
|
|
84
|
+
a(e.pageLinking, te(t)),
|
|
85
|
+
a(e.css, re()),
|
|
86
|
+
a(e.globalStyles, ae(t)),
|
|
87
|
+
a(e.responsiveStyles, se(t)),
|
|
88
|
+
a(e.plugins, oe(t)),
|
|
89
|
+
a(e.scripts, me()),
|
|
90
|
+
a(e.output, W(t, { action: "add" })),
|
|
91
|
+
a(e.postamble)
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Ae(t, e = {}) {
|
|
95
95
|
return L(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
a(e.preamble, "Add new MJML components to the existing email template."),
|
|
97
|
+
a(e.currentCode, H(t, { action: "add" })),
|
|
98
|
+
a(e.design, j(t)),
|
|
99
|
+
a(e.imageRefs, U(t, { action: "create" })),
|
|
100
|
+
a(e.media, k(t)),
|
|
101
|
+
a(e.output, W(t, { action: "add" })),
|
|
102
|
+
a(e.postamble)
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return t.isEmail ?
|
|
105
|
+
function $e(t, e = {}) {
|
|
106
|
+
return t.isEmail ? Ge(t, e) : Le(t, e);
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Le(t, e = {}) {
|
|
109
109
|
return L(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
110
|
+
a(e.preamble, "Edit existing HTML elements on the page."),
|
|
111
|
+
a(e.currentCode, H(t, { action: "edit" })),
|
|
112
|
+
a(e.design, j(t)),
|
|
113
|
+
a(e.imageRefs, U(t, { action: "edit" })),
|
|
114
|
+
a(e.media, k(t)),
|
|
115
|
+
a(e.icons, ne()),
|
|
116
|
+
a(e.pageLinking, te(t)),
|
|
117
|
+
a(e.css, re()),
|
|
118
|
+
a(e.responsiveStyles, se(t)),
|
|
119
|
+
a(e.globalStyles, ae(t)),
|
|
120
|
+
a(e.plugins, oe(t)),
|
|
121
|
+
a(e.scripts, me()),
|
|
122
|
+
a(e.output, W(t, { action: "edit" })),
|
|
123
|
+
a(e.postamble)
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Ge(t, e = {}) {
|
|
127
127
|
return L(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
a(e.preamble, "Edit existing MJML components in the email template."),
|
|
129
|
+
a(e.currentCode, H(t, { action: "edit" })),
|
|
130
|
+
a(e.design, j(t)),
|
|
131
|
+
a(e.imageRefs, U(t, { action: "edit" })),
|
|
132
|
+
a(e.media, k(t)),
|
|
133
|
+
a(e.output, W(t, { action: "edit" })),
|
|
134
|
+
a(e.postamble)
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
137
|
function H(t, { action: e }) {
|
|
138
|
-
const { selectedPage: n, isEmail:
|
|
139
|
-
return
|
|
138
|
+
const { selectedPage: n, isEmail: o, selectedComponents: s = [] } = t, i = (n == null ? void 0 : n.content) || "", c = o ? "mjml" : "html", d = e === "edit", l = `${A.SELECTED_COMPONENT_IDS}: ${s.map((u) => u.id).join(", ")}`;
|
|
139
|
+
return F(
|
|
140
140
|
`## Current code
|
|
141
141
|
- Analyze the provided CURRENT_CODE to understand the existing design system, layout, and component styles.
|
|
142
142
|
- NEVER rewrite the entire template.
|
|
143
143
|
- New inner elements don't need IDs.
|
|
144
144
|
`,
|
|
145
|
-
|
|
145
|
+
d ? `- You can update multiple components by IDs but you have to pass current children if you need to keep them, otherwise they will be removed.
|
|
146
146
|
\`\`\`
|
|
147
147
|
<some-el id={EL_ID1}>
|
|
148
148
|
...old content...
|
|
@@ -155,10 +155,10 @@ function H(t, { action: e }) {
|
|
|
155
155
|
<another-el id={EL_ID3}></another-el>
|
|
156
156
|
\`\`\`
|
|
157
157
|
- Based on the instructions, update what is necessary considering the selected component IDs (if any).
|
|
158
|
-
${
|
|
158
|
+
${l}` : "- Add new components based on the instructions, without removing or modifying existing code.",
|
|
159
159
|
`
|
|
160
160
|
CURRENT_CODE:
|
|
161
|
-
\`\`\`${
|
|
161
|
+
\`\`\`${c}
|
|
162
162
|
${i}
|
|
163
163
|
\`\`\`
|
|
164
164
|
`
|
|
@@ -166,13 +166,13 @@ ${i}
|
|
|
166
166
|
}
|
|
167
167
|
function U(t, e = {}) {
|
|
168
168
|
if (!t.imageUrls) return "";
|
|
169
|
-
const { isEmail: n } = t, { action:
|
|
169
|
+
const { isEmail: n } = t, { action: o = "create" } = e;
|
|
170
170
|
return `## Image references
|
|
171
|
-
- If images are provided with the user prompt, use them as visual references to ${
|
|
171
|
+
- If images are provided with the user prompt, use them as visual references to ${o} content that match the design, layout, and styling shown in the images. Adapt the ${n ? "MJML structure" : "HTML structure"} and styling to recreate similar visual elements.`;
|
|
172
172
|
}
|
|
173
173
|
function j(t) {
|
|
174
174
|
const { isEmail: e } = t;
|
|
175
|
-
return
|
|
175
|
+
return F(
|
|
176
176
|
`## Design guidelines
|
|
177
177
|
- Be creative with fonts, layouts and content. Be extremely detailed and make it functional.
|
|
178
178
|
- Add subtle dividers and outlines where appropriate.
|
|
@@ -184,7 +184,7 @@ function j(t) {
|
|
|
184
184
|
}
|
|
185
185
|
function k(t, e = {}) {
|
|
186
186
|
const { isEmail: n } = t;
|
|
187
|
-
return
|
|
187
|
+
return F(
|
|
188
188
|
`# Media guidelines
|
|
189
189
|
- Ensure purpose-driven visuals and consistency in visual tone.
|
|
190
190
|
- Align the image subject to the content.`,
|
|
@@ -198,7 +198,7 @@ function k(t, e = {}) {
|
|
|
198
198
|
`
|
|
199
199
|
);
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const te = (t) => {
|
|
202
202
|
const { availablePages: e } = t;
|
|
203
203
|
return e != null && e.length ? `## Page linking guidelines
|
|
204
204
|
- For links to other pages in the project, use this special URL: "page://PAGE_ID"
|
|
@@ -207,22 +207,22 @@ const ne = (t) => {
|
|
|
207
207
|
- Here below the list of pages in the project:
|
|
208
208
|
${e.map((n) => `* PAGE_ID: '${n.id}' - Name: '${n.name}'}`).join(`
|
|
209
209
|
`)}` : "";
|
|
210
|
-
},
|
|
210
|
+
}, ne = (t) => `## Icons guidelines
|
|
211
211
|
- Avoid svg and emojis as much as possible.
|
|
212
212
|
- Prefer icons from lucide, using Iconify API: \`https://api.iconify.design/lucide-{ICON_NAME}.svg?color={COLOR}\`
|
|
213
|
-
* Default color is black, match the text nearby if inside links/buttons`,
|
|
213
|
+
* Default color is black, match the text nearby if inside links/buttons`, se = (t) => {
|
|
214
214
|
const { devices: e } = t;
|
|
215
215
|
return e != null && e.length ? `## Responsive styles
|
|
216
216
|
- ALWAYS use desktop-first approach for everything (navbar, footer, etc.)
|
|
217
217
|
- Below the ONLY available media queries you can use:
|
|
218
218
|
\`\`\`css
|
|
219
|
-
${
|
|
219
|
+
${Ue(e)}
|
|
220
220
|
\`\`\`` : "";
|
|
221
|
-
},
|
|
222
|
-
`),
|
|
221
|
+
}, Ue = (t) => !t || t.length === 0 ? "/* Responsive breakpoints not available */" : t.filter((n) => n.widthMedia).map((n) => `@media (max-width: ${n.widthMedia}) { /* ${n.name} */ }`).join(`
|
|
222
|
+
`), ae = (t) => {
|
|
223
223
|
const { globalStyles: e, isNewProject: n } = t;
|
|
224
224
|
if (!e.trim()) return "";
|
|
225
|
-
const
|
|
225
|
+
const o = e.replace(/[:][^;:]*[;]/g, ":{TODO};");
|
|
226
226
|
return `
|
|
227
227
|
## Global Styles integration
|
|
228
228
|
- Use our global styles system.
|
|
@@ -230,11 +230,11 @@ ${je(e)}
|
|
|
230
230
|
- Use the available CSS variables instead of hardcoded values (text, background, etc.).
|
|
231
231
|
- Here below our global styles. ${n ? "Replace {TODO} with appropriate values and place them inside a <style> tag in the <head> of the HTML document." : "AVOID editing these styles, ONLY reuse them as much as possible."}
|
|
232
232
|
\`\`\`css
|
|
233
|
-
${n ?
|
|
233
|
+
${n ? o : e}
|
|
234
234
|
\`\`\`
|
|
235
235
|
`.trim();
|
|
236
236
|
};
|
|
237
|
-
function
|
|
237
|
+
function oe(t) {
|
|
238
238
|
const { installedPlugins: e } = t, n = e == null ? void 0 : e.filter((s) => s.instructions);
|
|
239
239
|
return n != null && n.length ? `
|
|
240
240
|
## Installed plugins
|
|
@@ -251,7 +251,7 @@ ${s.instructions}
|
|
|
251
251
|
).join(`
|
|
252
252
|
`)}` : "";
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function re(t) {
|
|
255
255
|
return `## CSS guidelines
|
|
256
256
|
- Include all CSS rules in a single <style> element (no ID required).
|
|
257
257
|
- Reuse existing CSS styles as much as possible
|
|
@@ -260,8 +260,8 @@ function ie(t) {
|
|
|
260
260
|
* AVOID nested/complex selectors: '.new-cls1 #some-id {...} .new-cls2[some-attr] {...}'`;
|
|
261
261
|
}
|
|
262
262
|
function W(t, e = {}) {
|
|
263
|
-
const { isEmail: n } = t, { isFullPage:
|
|
264
|
-
return
|
|
263
|
+
const { isEmail: n } = t, { isFullPage: o, action: s } = e, i = s === "add", c = s === "edit";
|
|
264
|
+
return F(
|
|
265
265
|
`## Output instructions
|
|
266
266
|
- To all new elements add human readable 'data-gjs-name' attribute, the value should be semantic and role-based.
|
|
267
267
|
Example: <ul data-gjs-name="Menu Card">, <span data-gjs-name="Container Subtitle">
|
|
@@ -273,20 +273,20 @@ function W(t, e = {}) {
|
|
|
273
273
|
- AVOID adding width to <mj-body>
|
|
274
274
|
- NEVER add <mj-section> inside <mj-column>
|
|
275
275
|
`,
|
|
276
|
-
|
|
276
|
+
o && `- Generate a complete, valid ${n ? "MJML" : "HTML"} document${n ? "" : " with doctype, html, head and body"}.`,
|
|
277
277
|
i && `- NEVER output already existing elements in the page, only new elements.
|
|
278
278
|
- The element must be self-contained and ready to be inserted into the existing code.`,
|
|
279
|
-
|
|
279
|
+
c && `- Output ONLY the edited elements wrapped in ${K} tags.
|
|
280
280
|
- Include element IDs for updated elements.
|
|
281
281
|
- DO NOT output the full page, only the edited elements.`,
|
|
282
|
-
|
|
282
|
+
c && n && "- AVOID using <mj-style>, rely ONLY on the built-in MJML components for styling.",
|
|
283
283
|
`
|
|
284
284
|
- NEVER include comments, backticks, markdown, etc.
|
|
285
|
-
- Wrap the entire output inside a single ${
|
|
286
|
-
- DO NOT output anything outside the ${
|
|
285
|
+
- Wrap the entire output inside a single ${K} tag.
|
|
286
|
+
- DO NOT output anything outside the ${K} tag.`
|
|
287
287
|
);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function me(t) {
|
|
290
290
|
return `## Script guidelines
|
|
291
291
|
- Use JS only if necessary, update existing scripts based on their ID
|
|
292
292
|
- AVOID JS for static updates, update directly HTML or CSS (the most common use case)
|
|
@@ -305,7 +305,7 @@ function ue(t) {
|
|
|
305
305
|
\`\`\`
|
|
306
306
|
`.trim();
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function je({ selectedPage: t }) {
|
|
309
309
|
const e = t == null ? void 0 : t.content;
|
|
310
310
|
return e ? `
|
|
311
311
|
## Current page code
|
|
@@ -318,77 +318,77 @@ ${e}
|
|
|
318
318
|
` : "";
|
|
319
319
|
}
|
|
320
320
|
var $ = /* @__PURE__ */ ((t) => (t.ADD_NEW_COMPONENT = "addNewComponent", t.EDIT_COMPONENT = "editComponent", t.REMOVE_COMPONENT = "removeComponent", t.MOVE_COMPONENT = "moveComponent", t.ADD_NEW_PAGE = "addNewPage", t.ADD_NEW_PROJECT_PAGE = "addNewProjectPage", t.GET_PAGE_CONTENT = "getPageContent", t.LIST_PAGES = "listPages", t.FETCH_WEBSITE = "fetchWebsite", t.GENERATE_IMAGE = "generateImage", t.RUN_COMMAND = "runCommand", t))($ || {}), w = /* @__PURE__ */ ((t) => (t.ADD_COMPONENT_CODE = "addComponentCode", t.EDIT_COMPONENT_CODE = "editComponentCode", t.ADD_PAGE_CODE = "addPageCode", t.ADD_PROJECT_PAGE_CODE = "addProjectPageCode", t))(w || {}), b = /* @__PURE__ */ ((t) => (t.SHOW_CODE = "showCode", t.IMPORT_CODE = "importCode", t.PAGE_SETTINGS = "pageSettings", t.PREVIEW = "preview", t.PUBLISH = "publish", t))(b || {});
|
|
321
|
-
const
|
|
322
|
-
function
|
|
321
|
+
const ke = 80, We = 120, Ve = "data-tool-status";
|
|
322
|
+
function ue({
|
|
323
323
|
writer: t,
|
|
324
324
|
toolCallId: e,
|
|
325
325
|
commonData: n
|
|
326
326
|
}) {
|
|
327
|
-
const
|
|
328
|
-
let s = "", i = 0,
|
|
327
|
+
const o = { id: e, type: Ve, transient: !0 };
|
|
328
|
+
let s = "", i = 0, c = 0;
|
|
329
329
|
return {
|
|
330
330
|
start() {
|
|
331
|
-
t.write({ ...
|
|
331
|
+
t.write({ ...o, data: { ...n, status: "in-progress", content: s } });
|
|
332
332
|
},
|
|
333
|
-
update(
|
|
334
|
-
s +=
|
|
333
|
+
update(d, l) {
|
|
334
|
+
s += d, l != null && l.replace && (s = d);
|
|
335
335
|
const u = Date.now();
|
|
336
|
-
(u - i >=
|
|
336
|
+
(u - i >= ke || s.length - c >= We) && (i = u, c = s.length, t.write({ ...o, data: { ...n, status: "streaming", content: s } }));
|
|
337
337
|
},
|
|
338
338
|
done() {
|
|
339
339
|
t.write({
|
|
340
|
-
...
|
|
341
|
-
data: { ...n, status: "done", content:
|
|
340
|
+
...o,
|
|
341
|
+
data: { ...n, status: "done", content: ze(s.trim()) }
|
|
342
342
|
});
|
|
343
343
|
},
|
|
344
|
-
complete(
|
|
344
|
+
complete(d) {
|
|
345
345
|
t.write({
|
|
346
|
-
...
|
|
346
|
+
...o,
|
|
347
347
|
transient: !1,
|
|
348
|
-
data: { ...n, status: "complete", metadata:
|
|
348
|
+
data: { ...n, status: "complete", metadata: d }
|
|
349
349
|
});
|
|
350
350
|
},
|
|
351
|
-
error(
|
|
351
|
+
error(d) {
|
|
352
352
|
t.write({
|
|
353
|
-
...
|
|
354
|
-
data: { ...n, status: "error", content: s, error:
|
|
353
|
+
...o,
|
|
354
|
+
data: { ...n, status: "error", content: s, error: d instanceof Error ? d.message : String(d) }
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
const { writer: e, toolCallId: n, name:
|
|
361
|
-
return
|
|
359
|
+
function xe(t) {
|
|
360
|
+
const { writer: e, toolCallId: n, name: o, input: s } = t;
|
|
361
|
+
return ue({
|
|
362
362
|
writer: e,
|
|
363
363
|
toolCallId: n,
|
|
364
|
-
commonData: { name:
|
|
364
|
+
commonData: { name: o, input: s }
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Fe(t) {
|
|
368
368
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
369
369
|
const n = t[e];
|
|
370
370
|
if (n.role === "user" && n.content)
|
|
371
|
-
return typeof n.content == "string" ? n.content : n.content.filter((
|
|
371
|
+
return typeof n.content == "string" ? n.content : n.content.filter((o) => o.type === "text").map((o) => o.text ?? "").join("");
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
375
|
function He(t) {
|
|
376
376
|
return t.findLast((e) => e.role === "user");
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function z(...t) {
|
|
379
379
|
return t.filter(Boolean).join("").trim();
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function ze(t) {
|
|
382
382
|
let e = t;
|
|
383
383
|
return ["generated_mjml", "generated_html", "generated_code"].forEach((n) => {
|
|
384
384
|
e = e.replaceAll(`<${n}>`, "").replaceAll(`</${n}>`, "");
|
|
385
385
|
}), e;
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
function
|
|
389
|
-
return
|
|
387
|
+
const J = "Provide a high-level plan for the layout, structure, or sections. Maximum 1000-1500 characters.", ie = "Image URLs from the last user message if the intent is to adapt the code to some image. Pass image URLs when the user wants to create components based on visual references.";
|
|
388
|
+
function T(t) {
|
|
389
|
+
return ye(t);
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Je(t) {
|
|
392
392
|
var n;
|
|
393
393
|
switch ((n = t == null ? void 0 : t.toLowerCase().split(";")[0]) == null ? void 0 : n.trim()) {
|
|
394
394
|
case "image/jpeg":
|
|
@@ -405,13 +405,13 @@ function Be(t) {
|
|
|
405
405
|
return "png";
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function Be(t) {
|
|
409
409
|
return t.map((e, n) => {
|
|
410
|
-
const
|
|
411
|
-
return new File([
|
|
410
|
+
const o = e.mediaType || "image/png", s = Je(o), i = `generated-${n + 1}.${s}`, c = e.uint8Array, d = c.buffer.slice(c.byteOffset, c.byteOffset + c.byteLength);
|
|
411
|
+
return new File([d], i, { type: o });
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
|
-
async function
|
|
414
|
+
async function Ye(t, e) {
|
|
415
415
|
const n = t.map((s) => s.trim()).filter(Boolean);
|
|
416
416
|
return await Promise.all(
|
|
417
417
|
n.map(async (s) => {
|
|
@@ -422,102 +422,102 @@ async function qe(t, e) {
|
|
|
422
422
|
})
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function gt(t) {
|
|
426
426
|
const {
|
|
427
427
|
model: e,
|
|
428
428
|
createToolStatusWriter: n,
|
|
429
|
-
uploadImages:
|
|
429
|
+
uploadImages: o,
|
|
430
430
|
onStart: s,
|
|
431
431
|
onEndGeneration: i,
|
|
432
|
-
onEnd:
|
|
433
|
-
generateImageOptions:
|
|
434
|
-
abortSignal:
|
|
432
|
+
onEnd: c,
|
|
433
|
+
generateImageOptions: d,
|
|
434
|
+
abortSignal: l,
|
|
435
435
|
defaultN: u = 1,
|
|
436
436
|
sizes: p,
|
|
437
437
|
ratios: h,
|
|
438
438
|
maxImages: P = 4,
|
|
439
|
-
description:
|
|
440
|
-
} = t,
|
|
441
|
-
prompt:
|
|
442
|
-
images:
|
|
443
|
-
n:
|
|
439
|
+
description: R
|
|
440
|
+
} = t, C = Math.min(Math.max(u, 1), P), E = (p || []).filter(Boolean), I = (h || []).filter(Boolean), G = E[0], S = I[0], O = {
|
|
441
|
+
prompt: r.string().min(1).describe("Prompt describing the image to generate"),
|
|
442
|
+
images: r.array(r.string()).optional().describe("Full image URLs requested for image editing"),
|
|
443
|
+
n: r.number().int().min(1).max(P).optional().describe("Number of image variations to generate. Important: only if requested by the user, default to 1 if not")
|
|
444
444
|
};
|
|
445
|
-
E.length && (O.size =
|
|
446
|
-
`Output aspect ratio. Available values: ${
|
|
445
|
+
E.length && (O.size = r.enum(E).optional().describe(`Output size. Available values: ${E.join(", ")}. Default: ${G}.`)), I.length && (O.aspectRatio = r.enum(I).optional().describe(
|
|
446
|
+
`Output aspect ratio. Available values: ${I.join(", ")}. Default: ${S}.`
|
|
447
447
|
));
|
|
448
|
-
const
|
|
449
|
-
return
|
|
450
|
-
description:
|
|
451
|
-
inputSchema:
|
|
448
|
+
const D = r.object(O);
|
|
449
|
+
return T({
|
|
450
|
+
description: R || "Generate image from a prompt and return uploaded image URL. Use this tool when the user asks to create or edit an image.",
|
|
451
|
+
inputSchema: D,
|
|
452
452
|
execute: async (g, { toolCallId: _ }) => {
|
|
453
|
-
const
|
|
453
|
+
const m = n == null ? void 0 : n({
|
|
454
454
|
toolCallId: _,
|
|
455
455
|
name: $.GENERATE_IMAGE,
|
|
456
456
|
input: g
|
|
457
457
|
});
|
|
458
|
-
|
|
458
|
+
m == null || m.start();
|
|
459
459
|
try {
|
|
460
|
-
const
|
|
460
|
+
const N = await Ye(g.images || [], l), { size: v, aspectRatio: M, prompt: V } = g, f = N.length ? { text: V, images: N } : V, y = v || (M ? void 0 : G), Ee = M || (!v && !y ? S : void 0), ce = {
|
|
461
461
|
model: e,
|
|
462
462
|
prompt: f,
|
|
463
|
-
n: g.n ||
|
|
463
|
+
n: g.n || C,
|
|
464
464
|
size: y,
|
|
465
|
-
aspectRatio:
|
|
466
|
-
abortSignal:
|
|
467
|
-
...
|
|
468
|
-
},
|
|
469
|
-
statusWriter:
|
|
470
|
-
options:
|
|
465
|
+
aspectRatio: Ee,
|
|
466
|
+
abortSignal: l,
|
|
467
|
+
...d
|
|
468
|
+
}, be = await (s == null ? void 0 : s({
|
|
469
|
+
statusWriter: m,
|
|
470
|
+
options: ce,
|
|
471
471
|
input: g,
|
|
472
472
|
toolCallId: _
|
|
473
|
-
})),
|
|
474
|
-
...
|
|
475
|
-
...
|
|
476
|
-
},
|
|
477
|
-
if (!
|
|
473
|
+
})), Y = {
|
|
474
|
+
...ce,
|
|
475
|
+
...be || {}
|
|
476
|
+
}, q = await Pe(Y), { images: Q = [], usage: X } = q;
|
|
477
|
+
if (!Q.length) throw new Error("No images generated.");
|
|
478
478
|
await (i == null ? void 0 : i({
|
|
479
|
-
statusWriter:
|
|
479
|
+
statusWriter: m,
|
|
480
480
|
input: g,
|
|
481
481
|
toolCallId: _,
|
|
482
|
-
options:
|
|
483
|
-
result:
|
|
484
|
-
usage:
|
|
482
|
+
options: Y,
|
|
483
|
+
result: q,
|
|
484
|
+
usage: X
|
|
485
485
|
}));
|
|
486
|
-
const
|
|
487
|
-
files:
|
|
488
|
-
images:
|
|
486
|
+
const le = await o({
|
|
487
|
+
files: Be(Q),
|
|
488
|
+
images: Q,
|
|
489
489
|
input: g,
|
|
490
490
|
toolCallId: _
|
|
491
|
-
}),
|
|
492
|
-
if (!
|
|
493
|
-
return await (
|
|
494
|
-
statusWriter:
|
|
491
|
+
}), Z = le.filter(Boolean);
|
|
492
|
+
if (!Z.length) throw new Error("Upload did not return any image URLs.");
|
|
493
|
+
return await (c == null ? void 0 : c({
|
|
494
|
+
statusWriter: m,
|
|
495
495
|
input: g,
|
|
496
496
|
toolCallId: _,
|
|
497
|
-
options:
|
|
498
|
-
result:
|
|
499
|
-
usage:
|
|
500
|
-
uploadResult:
|
|
501
|
-
uploadedUrls:
|
|
502
|
-
})),
|
|
503
|
-
} catch (
|
|
504
|
-
throw
|
|
497
|
+
options: Y,
|
|
498
|
+
result: q,
|
|
499
|
+
usage: X,
|
|
500
|
+
uploadResult: le,
|
|
501
|
+
uploadedUrls: Z
|
|
502
|
+
})), m == null || m.done(), m == null || m.complete({ usage: X }), { urls: Z };
|
|
503
|
+
} catch (N) {
|
|
504
|
+
throw m == null || m.error(N), N;
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
const { description: n, inputSchema:
|
|
511
|
-
return
|
|
509
|
+
function B(t, e) {
|
|
510
|
+
const { description: n, inputSchema: o, agentCodeName: s, getSystemPrompt: i, buildUserPrompt: c, buildResult: d } = t, { writer: l, projectContext: u, model: p, abortSignal: h, streamOptions: P, postStream: R, onEnd: C } = e;
|
|
511
|
+
return T({
|
|
512
512
|
description: n,
|
|
513
|
-
inputSchema:
|
|
514
|
-
execute: async (E, { messages:
|
|
515
|
-
const S =
|
|
516
|
-
writer:
|
|
513
|
+
inputSchema: o,
|
|
514
|
+
execute: async (E, { messages: I, toolCallId: G }) => {
|
|
515
|
+
const S = c(E, He(I), Fe(I)), O = s, D = ue({
|
|
516
|
+
writer: l,
|
|
517
517
|
toolCallId: G,
|
|
518
518
|
commonData: { name: O, input: E }
|
|
519
519
|
});
|
|
520
|
-
|
|
520
|
+
D.start();
|
|
521
521
|
try {
|
|
522
522
|
const g = {
|
|
523
523
|
model: p,
|
|
@@ -531,76 +531,76 @@ function Y(t, e) {
|
|
|
531
531
|
input: E,
|
|
532
532
|
prompt: S,
|
|
533
533
|
getSystemPrompt: i
|
|
534
|
-
}) : P, { onFinish:
|
|
534
|
+
}) : P, { onFinish: m, ...N } = _ || {}, v = ee({
|
|
535
535
|
...g,
|
|
536
536
|
prompt: S,
|
|
537
537
|
onFinish(y) {
|
|
538
|
-
|
|
538
|
+
C == null || C({ model: p, usage: y.usage, finishReason: y.finishReason, toolName: O }), m == null || m(y);
|
|
539
539
|
},
|
|
540
|
-
...
|
|
540
|
+
...N
|
|
541
541
|
});
|
|
542
|
-
let
|
|
543
|
-
for await (const y of
|
|
544
|
-
|
|
545
|
-
await (
|
|
546
|
-
content:
|
|
547
|
-
statusWriter:
|
|
542
|
+
let M = "";
|
|
543
|
+
for await (const y of v.textStream)
|
|
544
|
+
M += y, D.update(y);
|
|
545
|
+
await (R == null ? void 0 : R({
|
|
546
|
+
content: M,
|
|
547
|
+
statusWriter: D,
|
|
548
548
|
toolName: O,
|
|
549
549
|
projectContext: u,
|
|
550
550
|
input: E
|
|
551
|
-
})),
|
|
552
|
-
const { raw: V, ...f } = await
|
|
553
|
-
return
|
|
551
|
+
})), D.done();
|
|
552
|
+
const { raw: V, ...f } = await v.usage;
|
|
553
|
+
return D.complete({ usage: f }), d(E);
|
|
554
554
|
} catch (g) {
|
|
555
|
-
throw
|
|
555
|
+
throw D.error(g), g;
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
const
|
|
560
|
+
const qe = T({
|
|
561
561
|
description: `Remove component from the page. This is faster than editing a parent via "${w.EDIT_COMPONENT_CODE}"`,
|
|
562
|
-
inputSchema:
|
|
563
|
-
componentId:
|
|
562
|
+
inputSchema: r.object({
|
|
563
|
+
componentId: r.string().describe("ID of the component to remove")
|
|
564
564
|
})
|
|
565
|
-
}),
|
|
565
|
+
}), Qe = T({
|
|
566
566
|
description: `Move component to another position. This could be better/faster than "${w.EDIT_COMPONENT_CODE}"`,
|
|
567
|
-
inputSchema:
|
|
568
|
-
sourceId:
|
|
569
|
-
targetId:
|
|
570
|
-
targetIndex:
|
|
567
|
+
inputSchema: r.object({
|
|
568
|
+
sourceId: r.string().describe("ID of the component to move"),
|
|
569
|
+
targetId: r.string().describe("ID of the parent component where to place the source one"),
|
|
570
|
+
targetIndex: r.number().describe("Index position inside the target component where to place the source one")
|
|
571
571
|
})
|
|
572
|
-
}),
|
|
572
|
+
}), Xe = T({
|
|
573
573
|
description: "Get the full code of the page.",
|
|
574
|
-
inputSchema:
|
|
575
|
-
pageId:
|
|
574
|
+
inputSchema: r.object({
|
|
575
|
+
pageId: r.string().describe("The ID of the page to get the content from.")
|
|
576
576
|
})
|
|
577
|
-
}),
|
|
577
|
+
}), Ze = T({
|
|
578
578
|
description: "Get the list of pages in the project. The result will be an array of page names and IDs.",
|
|
579
|
-
inputSchema:
|
|
580
|
-
}),
|
|
581
|
-
name:
|
|
582
|
-
plan:
|
|
583
|
-
componentId:
|
|
584
|
-
position:
|
|
579
|
+
inputSchema: r.object({})
|
|
580
|
+
}), pe = r.object({
|
|
581
|
+
name: r.string().describe("Name of the new component"),
|
|
582
|
+
plan: r.string().describe(J),
|
|
583
|
+
componentId: r.string().describe("The ID of the target component"),
|
|
584
|
+
position: r.enum(["before", "beforeInside", "afterInside", "after"]).describe(
|
|
585
585
|
"Where to add the new component relative to the current target componentId. The `before` is before the component, `beforeInside` is before the first child of the target component, `afterInside` is after the last child of the target component, and `after` is after the component."
|
|
586
586
|
),
|
|
587
|
-
imageUrls:
|
|
588
|
-
}),
|
|
587
|
+
imageUrls: r.array(r.string()).describe(ie)
|
|
588
|
+
}), Ke = T({
|
|
589
589
|
description: `Add a new component to the current page. It requires to know the target componentId where to place it, if not provided, call "${$.GET_PAGE_CONTENT}" first to get the current page code and find the proper target component ID based on the request. For a '<some-el id="i19a7">', the ID would be "i19a7".`,
|
|
590
|
-
inputSchema:
|
|
590
|
+
inputSchema: pe
|
|
591
591
|
});
|
|
592
|
-
function
|
|
593
|
-
return
|
|
592
|
+
function et(t) {
|
|
593
|
+
return B(
|
|
594
594
|
{
|
|
595
|
-
description:
|
|
596
|
-
inputSchema:
|
|
595
|
+
description: Ke.description,
|
|
596
|
+
inputSchema: pe,
|
|
597
597
|
agentCodeName: w.ADD_COMPONENT_CODE,
|
|
598
|
-
getSystemPrompt:
|
|
598
|
+
getSystemPrompt: Ce,
|
|
599
599
|
buildUserPrompt: (e, n) => [
|
|
600
600
|
n,
|
|
601
601
|
{
|
|
602
602
|
role: "assistant",
|
|
603
|
-
content:
|
|
603
|
+
content: z(
|
|
604
604
|
e.name && `
|
|
605
605
|
Component Name: ${e.name}`,
|
|
606
606
|
e.componentId && `
|
|
@@ -617,25 +617,25 @@ Plan: ${e.plan}`
|
|
|
617
617
|
t
|
|
618
618
|
);
|
|
619
619
|
}
|
|
620
|
-
const
|
|
621
|
-
plan:
|
|
622
|
-
imageUrls:
|
|
623
|
-
}),
|
|
620
|
+
const ge = r.object({
|
|
621
|
+
plan: r.string().describe(J),
|
|
622
|
+
imageUrls: r.array(r.string()).describe(ie)
|
|
623
|
+
}), tt = T({
|
|
624
624
|
description: "Edit components in the page. Provide additional instructions if necessary. The full page content will already be provided to the dev agent.",
|
|
625
|
-
inputSchema:
|
|
625
|
+
inputSchema: ge
|
|
626
626
|
});
|
|
627
|
-
function
|
|
628
|
-
return
|
|
627
|
+
function nt(t) {
|
|
628
|
+
return B(
|
|
629
629
|
{
|
|
630
|
-
description:
|
|
631
|
-
inputSchema:
|
|
630
|
+
description: tt.description,
|
|
631
|
+
inputSchema: ge,
|
|
632
632
|
agentCodeName: w.EDIT_COMPONENT_CODE,
|
|
633
|
-
getSystemPrompt:
|
|
633
|
+
getSystemPrompt: $e,
|
|
634
634
|
buildUserPrompt: (e, n) => [
|
|
635
635
|
n,
|
|
636
636
|
{
|
|
637
637
|
role: "assistant",
|
|
638
|
-
content:
|
|
638
|
+
content: z(
|
|
639
639
|
e.plan && `
|
|
640
640
|
Plan: ${e.plan}`,
|
|
641
641
|
!!e.imageUrls.length && `
|
|
@@ -648,26 +648,26 @@ Image refs: ${e.imageUrls.join(", ")}`
|
|
|
648
648
|
t
|
|
649
649
|
);
|
|
650
650
|
}
|
|
651
|
-
const
|
|
652
|
-
name:
|
|
653
|
-
plan:
|
|
654
|
-
imageUrls:
|
|
655
|
-
}),
|
|
651
|
+
const fe = r.object({
|
|
652
|
+
name: r.string().describe("Name of the new page"),
|
|
653
|
+
plan: r.string().describe(J),
|
|
654
|
+
imageUrls: r.array(r.string()).describe(ie)
|
|
655
|
+
}), st = T({
|
|
656
656
|
description: "Creates a new page in the project with the full content.",
|
|
657
|
-
inputSchema:
|
|
657
|
+
inputSchema: fe
|
|
658
658
|
});
|
|
659
|
-
function
|
|
660
|
-
return
|
|
659
|
+
function at(t) {
|
|
660
|
+
return B(
|
|
661
661
|
{
|
|
662
|
-
description:
|
|
663
|
-
inputSchema:
|
|
662
|
+
description: st.description,
|
|
663
|
+
inputSchema: fe,
|
|
664
664
|
agentCodeName: w.ADD_PAGE_CODE,
|
|
665
|
-
getSystemPrompt:
|
|
665
|
+
getSystemPrompt: Re,
|
|
666
666
|
buildUserPrompt: (e, n) => [
|
|
667
667
|
n,
|
|
668
668
|
{
|
|
669
669
|
role: "assistant",
|
|
670
|
-
content:
|
|
670
|
+
content: z(
|
|
671
671
|
e.name && `
|
|
672
672
|
Page Name: ${e.name}`,
|
|
673
673
|
!!e.imageUrls.length && `
|
|
@@ -682,25 +682,25 @@ Plan: ${e.plan}`
|
|
|
682
682
|
t
|
|
683
683
|
);
|
|
684
684
|
}
|
|
685
|
-
const
|
|
686
|
-
name:
|
|
687
|
-
plan:
|
|
688
|
-
}),
|
|
689
|
-
description: `Creates a page in an empty project with content generated based on a plan. IMPORTANT: This should be called only when ${
|
|
690
|
-
inputSchema:
|
|
685
|
+
const he = r.object({
|
|
686
|
+
name: r.string().describe("Name of the new page"),
|
|
687
|
+
plan: r.string().describe(J)
|
|
688
|
+
}), ot = T({
|
|
689
|
+
description: `Creates a page in an empty project with content generated based on a plan. IMPORTANT: This should be called only when ${A.IS_PROJECT_EMPTY} is true.`,
|
|
690
|
+
inputSchema: he
|
|
691
691
|
});
|
|
692
|
-
function
|
|
693
|
-
return
|
|
692
|
+
function rt(t) {
|
|
693
|
+
return B(
|
|
694
694
|
{
|
|
695
|
-
description:
|
|
696
|
-
inputSchema:
|
|
695
|
+
description: ot.description,
|
|
696
|
+
inputSchema: he,
|
|
697
697
|
agentCodeName: w.ADD_PROJECT_PAGE_CODE,
|
|
698
698
|
getSystemPrompt: Ne,
|
|
699
699
|
buildUserPrompt: (e, n) => [
|
|
700
700
|
n,
|
|
701
701
|
{
|
|
702
702
|
role: "assistant",
|
|
703
|
-
content:
|
|
703
|
+
content: z(e.name && `
|
|
704
704
|
Page Name: ${e.name}`, e.plan && `
|
|
705
705
|
Plan: ${e.plan}`)
|
|
706
706
|
}
|
|
@@ -716,7 +716,7 @@ const x = {
|
|
|
716
716
|
[b.PAGE_SETTINGS]: "Open current page settings to edit title, slug, and other common HTML head tags.",
|
|
717
717
|
[b.PREVIEW]: "Open fullscreen preview mode to see the current page rendered."
|
|
718
718
|
};
|
|
719
|
-
function
|
|
719
|
+
function it({ isEmail: t } = {}) {
|
|
720
720
|
const e = {
|
|
721
721
|
[b.SHOW_CODE]: { description: x[b.SHOW_CODE] },
|
|
722
722
|
[b.IMPORT_CODE]: { description: x[b.IMPORT_CODE] },
|
|
@@ -726,108 +726,108 @@ function ct({ isEmail: t } = {}) {
|
|
|
726
726
|
description: x[b.PAGE_SETTINGS]
|
|
727
727
|
}), e;
|
|
728
728
|
}
|
|
729
|
-
function
|
|
730
|
-
const { projectContext: e, skipDefault: n, commands:
|
|
731
|
-
Object.entries(n ? {} :
|
|
729
|
+
function ct(t = {}) {
|
|
730
|
+
const { projectContext: e, skipDefault: n, commands: o = {} } = t, s = new Map(
|
|
731
|
+
Object.entries(n ? {} : it(e))
|
|
732
732
|
);
|
|
733
|
-
return Object.entries(
|
|
733
|
+
return Object.entries(o).forEach(([i, c]) => {
|
|
734
734
|
var p;
|
|
735
|
-
if (!
|
|
736
|
-
const
|
|
737
|
-
if (s.get(
|
|
738
|
-
s.delete(
|
|
735
|
+
if (!c) return;
|
|
736
|
+
const d = i, l = (p = c.description) == null ? void 0 : p.trim();
|
|
737
|
+
if (s.get(d) && !l) {
|
|
738
|
+
s.delete(d);
|
|
739
739
|
return;
|
|
740
740
|
}
|
|
741
|
-
|
|
741
|
+
l && s.set(d, { description: l });
|
|
742
742
|
}), s;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
const e =
|
|
744
|
+
function lt(t = {}) {
|
|
745
|
+
const e = ct(t), n = Array.from(e.keys());
|
|
746
746
|
if (!n.length)
|
|
747
747
|
throw new Error("`createCommandTool` requires at least one command");
|
|
748
|
-
const
|
|
749
|
-
` + Array.from(e.entries()).map(([i,
|
|
750
|
-
${
|
|
748
|
+
const o = n, s = `Run one of the available commands. Below the list with commandId and description:
|
|
749
|
+
` + Array.from(e.entries()).map(([i, c]) => `- ${i}
|
|
750
|
+
${c.description}`).join(`
|
|
751
751
|
`);
|
|
752
|
-
return
|
|
752
|
+
return T({
|
|
753
753
|
description: s,
|
|
754
|
-
inputSchema:
|
|
755
|
-
commandId:
|
|
754
|
+
inputSchema: r.object({
|
|
755
|
+
commandId: r.enum(o).describe("Command ID to run")
|
|
756
756
|
})
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
const { writer: e, agentCode: n, abortSignal:
|
|
759
|
+
function dt(t) {
|
|
760
|
+
const { writer: e, agentCode: n, abortSignal: o, projectContext: s, onEnd: i } = t, { model: c, streamOptions: d, postStream: l } = n ?? {}, u = c || t.chatModel, p = {
|
|
761
761
|
writer: e,
|
|
762
762
|
projectContext: s,
|
|
763
763
|
model: u,
|
|
764
|
-
abortSignal:
|
|
765
|
-
streamOptions:
|
|
766
|
-
postStream:
|
|
764
|
+
abortSignal: o,
|
|
765
|
+
streamOptions: d,
|
|
766
|
+
postStream: l,
|
|
767
767
|
onEnd: i
|
|
768
768
|
}, h = {
|
|
769
|
-
[$.REMOVE_COMPONENT]:
|
|
770
|
-
[$.MOVE_COMPONENT]:
|
|
771
|
-
[$.GET_PAGE_CONTENT]:
|
|
772
|
-
[w.ADD_PROJECT_PAGE_CODE]:
|
|
773
|
-
[w.ADD_COMPONENT_CODE]:
|
|
774
|
-
[w.EDIT_COMPONENT_CODE]:
|
|
769
|
+
[$.REMOVE_COMPONENT]: qe,
|
|
770
|
+
[$.MOVE_COMPONENT]: Qe,
|
|
771
|
+
[$.GET_PAGE_CONTENT]: Xe,
|
|
772
|
+
[w.ADD_PROJECT_PAGE_CODE]: rt(p),
|
|
773
|
+
[w.ADD_COMPONENT_CODE]: et(p),
|
|
774
|
+
[w.EDIT_COMPONENT_CODE]: nt(p)
|
|
775
775
|
};
|
|
776
|
-
return s != null && s.isEmail || (h[$.LIST_PAGES] =
|
|
776
|
+
return s != null && s.isEmail || (h[$.LIST_PAGES] = Ze, h[w.ADD_PAGE_CODE] = at(p)), h;
|
|
777
777
|
}
|
|
778
|
-
async function
|
|
778
|
+
async function ft(t) {
|
|
779
779
|
const {
|
|
780
780
|
model: e,
|
|
781
781
|
systemPrompt: n,
|
|
782
|
-
messages:
|
|
782
|
+
messages: o,
|
|
783
783
|
projectContext: s,
|
|
784
784
|
tools: i,
|
|
785
|
-
toolChoice:
|
|
786
|
-
providerOptions:
|
|
787
|
-
streamOptions:
|
|
785
|
+
toolChoice: c,
|
|
786
|
+
providerOptions: d,
|
|
787
|
+
streamOptions: l,
|
|
788
788
|
responseOptions: u,
|
|
789
789
|
abortSignal: p,
|
|
790
790
|
onEnd: h,
|
|
791
791
|
getMessageMetadata: P,
|
|
792
|
-
pruneMessages:
|
|
792
|
+
pruneMessages: R = !0
|
|
793
793
|
} = t;
|
|
794
794
|
if (!e) throw new Error("`model` is required to create a stream response");
|
|
795
795
|
if (!s) throw new Error("`projectContext` is required to create a stream response");
|
|
796
|
-
const
|
|
796
|
+
const C = mt(o), E = await Se(C), I = R ? Oe({
|
|
797
797
|
messages: E,
|
|
798
798
|
reasoning: "before-last-message",
|
|
799
799
|
toolCalls: "before-last-2-messages",
|
|
800
800
|
emptyMessages: "remove"
|
|
801
|
-
}) : E, G =
|
|
801
|
+
}) : E, G = we({
|
|
802
802
|
async execute({ writer: S }) {
|
|
803
|
-
const O =
|
|
803
|
+
const O = dt({ ...t, writer: S, chatModel: e }), D = (typeof i == "function" ? i({
|
|
804
804
|
writer: S,
|
|
805
805
|
defaultTools: O,
|
|
806
806
|
abortSignal: p,
|
|
807
|
-
createCommandTool: (f) =>
|
|
808
|
-
createToolStatusWriter: (f) =>
|
|
809
|
-
}) : i) ?? O, g =
|
|
810
|
-
`), { onFinish:
|
|
807
|
+
createCommandTool: (f) => lt({ ...f, projectContext: s }),
|
|
808
|
+
createToolStatusWriter: (f) => xe({ writer: S, ...f })
|
|
809
|
+
}) : i) ?? O, g = _e(s), _ = typeof n == "string" ? n : [(n == null ? void 0 : n.preamble) || "", g, (n == null ? void 0 : n.postamble) || ""].filter(Boolean).join(`
|
|
810
|
+
`), { onFinish: m, ...N } = l ?? {}, v = ee({
|
|
811
811
|
model: e,
|
|
812
|
-
messages:
|
|
813
|
-
tools:
|
|
814
|
-
toolChoice:
|
|
812
|
+
messages: I,
|
|
813
|
+
tools: D,
|
|
814
|
+
toolChoice: c,
|
|
815
815
|
system: _ || g,
|
|
816
|
-
providerOptions:
|
|
816
|
+
providerOptions: d,
|
|
817
817
|
abortSignal: p,
|
|
818
818
|
onFinish(f) {
|
|
819
|
-
h == null || h({ model: e, usage: f.usage, finishReason: f.finishReason }),
|
|
819
|
+
h == null || h({ model: e, usage: f.usage, finishReason: f.finishReason }), m == null || m(f);
|
|
820
820
|
},
|
|
821
|
-
...
|
|
822
|
-
}), { messageMetadata:
|
|
821
|
+
...N
|
|
822
|
+
}), { messageMetadata: M, ...V } = u ?? {};
|
|
823
823
|
S.merge(
|
|
824
|
-
|
|
825
|
-
originalMessages:
|
|
824
|
+
v.toUIMessageStream({
|
|
825
|
+
originalMessages: o,
|
|
826
826
|
sendReasoning: !0,
|
|
827
827
|
sendSources: !0,
|
|
828
828
|
messageMetadata(f) {
|
|
829
829
|
const y = P == null ? void 0 : P({ ...f, model: e });
|
|
830
|
-
return y || (
|
|
830
|
+
return y || (M == null ? void 0 : M(f));
|
|
831
831
|
},
|
|
832
832
|
...V
|
|
833
833
|
})
|
|
@@ -839,128 +839,72 @@ async function Et(t) {
|
|
|
839
839
|
stream: G
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function mt(t) {
|
|
843
843
|
const e = "file-refs";
|
|
844
844
|
return t.map((n) => {
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
845
|
+
const o = Array.isArray(n.parts) ? n.parts : [], s = o === n.parts ? n : { ...n, parts: o };
|
|
846
|
+
if (s.role !== "user" || o.some((l) => l.type === "text" && l.text.includes(`<${e}>`))) return s;
|
|
847
|
+
const c = o.filter((l) => l.type === "file" && l.url.trim().startsWith("http")).map((l) => l.url.trim());
|
|
848
|
+
if (c.length === 0) return s;
|
|
849
|
+
const d = `<${e}>
|
|
850
|
+
${c.map((l) => `- ${l}`).join(`
|
|
850
851
|
`)}
|
|
851
852
|
</${e}>`;
|
|
852
853
|
return {
|
|
853
|
-
...
|
|
854
|
-
parts: [...
|
|
854
|
+
...s,
|
|
855
|
+
parts: [...o, { type: "text", text: d }]
|
|
855
856
|
};
|
|
856
857
|
});
|
|
857
858
|
}
|
|
858
|
-
async function
|
|
859
|
+
async function ht(t) {
|
|
859
860
|
const {
|
|
860
861
|
model: e,
|
|
861
862
|
system: n,
|
|
862
|
-
prompt:
|
|
863
|
+
prompt: o,
|
|
863
864
|
tools: s,
|
|
864
865
|
toolChoice: i,
|
|
865
|
-
providerOptions:
|
|
866
|
-
abortSignal:
|
|
867
|
-
onFinish:
|
|
866
|
+
providerOptions: c,
|
|
867
|
+
abortSignal: d,
|
|
868
|
+
onFinish: l,
|
|
868
869
|
onAbort: u,
|
|
869
870
|
onError: p,
|
|
870
871
|
streamOptions: h
|
|
871
872
|
} = t;
|
|
872
|
-
return
|
|
873
|
+
return ee({
|
|
873
874
|
model: e,
|
|
874
875
|
system: n,
|
|
875
|
-
prompt:
|
|
876
|
+
prompt: o,
|
|
876
877
|
tools: s,
|
|
877
878
|
toolChoice: i,
|
|
878
|
-
providerOptions:
|
|
879
|
-
abortSignal:
|
|
880
|
-
onFinish:
|
|
879
|
+
providerOptions: c,
|
|
880
|
+
abortSignal: d,
|
|
881
|
+
onFinish: l,
|
|
881
882
|
onAbort: u,
|
|
882
883
|
onError: p,
|
|
883
884
|
...h
|
|
884
885
|
}).toTextStreamResponse();
|
|
885
886
|
}
|
|
886
|
-
function pt(t) {
|
|
887
|
-
const [e, ...n] = t.split("/"), r = n.join("/");
|
|
888
|
-
if (!e || !r)
|
|
889
|
-
throw new Error(`Invalid model string: "${t}". Expected format: "provider/model-name"`);
|
|
890
|
-
return {
|
|
891
|
-
provider: e,
|
|
892
|
-
modelName: r
|
|
893
|
-
};
|
|
894
|
-
}
|
|
895
|
-
async function F(t) {
|
|
896
|
-
const { model: e, options: n, error: r, loader: s } = t, i = await s();
|
|
897
|
-
if (!i)
|
|
898
|
-
throw new Error(r);
|
|
899
|
-
return i(n)(e);
|
|
900
|
-
}
|
|
901
|
-
async function yt(t, e = {}) {
|
|
902
|
-
const { provider: n, modelName: r } = pt(t);
|
|
903
|
-
switch (n) {
|
|
904
|
-
case "openai":
|
|
905
|
-
return F({
|
|
906
|
-
// @ts-ignore - Optional peer dependency, may not be installed
|
|
907
|
-
loader: async () => (await import("@ai-sdk/openai")).createOpenAI,
|
|
908
|
-
model: r,
|
|
909
|
-
options: e,
|
|
910
|
-
error: "OpenAI provider not installed. Install @ai-sdk/openai to use OpenAI models."
|
|
911
|
-
});
|
|
912
|
-
case "anthropic":
|
|
913
|
-
return F({
|
|
914
|
-
// @ts-ignore - Optional peer dependency, may not be installed
|
|
915
|
-
loader: async () => (await import("@ai-sdk/anthropic")).createAnthropic,
|
|
916
|
-
model: r,
|
|
917
|
-
options: e,
|
|
918
|
-
error: "Anthropic provider not installed. Install @ai-sdk/anthropic to use Anthropic models."
|
|
919
|
-
});
|
|
920
|
-
case "google":
|
|
921
|
-
return F({
|
|
922
|
-
// @ts-ignore - Optional peer dependency, may not be installed
|
|
923
|
-
loader: async () => (await import("@ai-sdk/google")).createGoogleGenerativeAI,
|
|
924
|
-
model: r,
|
|
925
|
-
options: e,
|
|
926
|
-
error: "Google provider not installed. Install @ai-sdk/google to use Google models."
|
|
927
|
-
});
|
|
928
|
-
case "azure":
|
|
929
|
-
return F({
|
|
930
|
-
// @ts-ignore - Optional peer dependency, may not be installed
|
|
931
|
-
loader: async () => (await import("@ai-sdk/azure")).createAzure,
|
|
932
|
-
model: r,
|
|
933
|
-
options: e,
|
|
934
|
-
error: "Azure provider not installed. Install @ai-sdk/azure to use Azure models."
|
|
935
|
-
});
|
|
936
|
-
default:
|
|
937
|
-
throw new Error(
|
|
938
|
-
`Unsupported model provider: "${n}". For custom providers, see: https://ai-sdk.dev/docs/foundations/providers-and-models`
|
|
939
|
-
);
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
887
|
export {
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
rt as
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
Fe as createToolStatusWriter,
|
|
888
|
+
A as ChatPromptKeys,
|
|
889
|
+
dt as buildDefaultTools,
|
|
890
|
+
lt as createCommandTool,
|
|
891
|
+
ft as createStreamResponse,
|
|
892
|
+
ht as createStreamTextResponse,
|
|
893
|
+
T as createTool,
|
|
894
|
+
et as createToolAddComponent,
|
|
895
|
+
at as createToolAddPage,
|
|
896
|
+
rt as createToolAddProjectPage,
|
|
897
|
+
nt as createToolEditComponent,
|
|
898
|
+
gt as createToolGenerateImage,
|
|
899
|
+
xe as createToolStatusWriter,
|
|
956
900
|
x as defaultCommandDescriptions,
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
901
|
+
ze as stripGeneratedWrapper,
|
|
902
|
+
Ke as toolAddComponent,
|
|
903
|
+
st as toolAddNewPage,
|
|
904
|
+
ot as toolAddNewProjectPage,
|
|
905
|
+
tt as toolEditComponent,
|
|
906
|
+
Xe as toolGetPageContent,
|
|
907
|
+
Ze as toolListPages,
|
|
908
|
+
Qe as toolMoveComponent,
|
|
909
|
+
qe as toolRemoveComponent
|
|
966
910
|
};
|