@rxdrag/website-studio 0.0.42 → 0.0.44
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/ThemeStudio.d.ts +1 -0
- package/dist/WebsiteStudio.d.ts +1 -1
- package/dist/components/StudioRoot/StudioRoot.d.ts +1 -1
- package/dist/components/StudioRoot/contexts.d.ts +2 -0
- package/dist/components/WebsiteDesigner/Toolbar/index.d.ts +3 -1
- package/dist/components/WebsiteDesigner/index.d.ts +1 -0
- package/dist/components/utils/uploadDeploymentFile.d.ts +1 -0
- package/dist/{cssMode-f2090bd3.js → cssMode-f6ed7ab1.js} +3 -2
- package/dist/{cssMode-f2090bd3.js.map → cssMode-f6ed7ab1.js.map} +1 -1
- package/dist/{freemarker2-8ad8aeb1.js → freemarker2-0b5a20e1.js} +3 -2
- package/dist/{freemarker2-8ad8aeb1.js.map → freemarker2-0b5a20e1.js.map} +1 -1
- package/dist/generator/hooks/useGetFrontComponents.d.ts +2 -0
- package/dist/generator/hooks/useGetPages.d.ts +2 -0
- package/dist/{handlebars-22c22910.js → handlebars-3e804cdc.js} +3 -2
- package/dist/{handlebars-22c22910.js.map → handlebars-3e804cdc.js.map} +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useTranslateTheme.d.ts +1 -0
- package/dist/{html-60ec2af9.js → html-bef31e01.js} +3 -2
- package/dist/{html-60ec2af9.js.map → html-bef31e01.js.map} +1 -1
- package/dist/{htmlMode-c8640f90.js → htmlMode-190446f0.js} +3 -2
- package/dist/{htmlMode-c8640f90.js.map → htmlMode-190446f0.js.map} +1 -1
- package/dist/{index-0841cd20.js → index-add86284.js} +81 -47
- package/dist/{index-0841cd20.js.map → index-add86284.js.map} +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{javascript-0c8adee5.js → javascript-a482a18d.js} +4 -3
- package/dist/{javascript-0c8adee5.js.map → javascript-a482a18d.js.map} +1 -1
- package/dist/{jsonMode-8ad9852a.js → jsonMode-36321e55.js} +3 -2
- package/dist/{jsonMode-8ad9852a.js.map → jsonMode-36321e55.js.map} +1 -1
- package/dist/{liquid-acc1cf0e.js → liquid-91f2b334.js} +3 -2
- package/dist/{liquid-acc1cf0e.js.map → liquid-91f2b334.js.map} +1 -1
- package/dist/{mdx-85dd6b94.js → mdx-5b3f4043.js} +3 -2
- package/dist/{mdx-85dd6b94.js.map → mdx-5b3f4043.js.map} +1 -1
- package/dist/{python-48d1977e.js → python-5ab24881.js} +3 -2
- package/dist/{python-48d1977e.js.map → python-5ab24881.js.map} +1 -1
- package/dist/{razor-22507fac.js → razor-e2cba756.js} +3 -2
- package/dist/{razor-22507fac.js.map → razor-e2cba756.js.map} +1 -1
- package/dist/{tsMode-324fb60b.js → tsMode-a884ed37.js} +3 -2
- package/dist/{tsMode-324fb60b.js.map → tsMode-a884ed37.js.map} +1 -1
- package/dist/{typescript-5f93813d.js → typescript-47724791.js} +3 -2
- package/dist/{typescript-5f93813d.js.map → typescript-47724791.js.map} +1 -1
- package/dist/{xml-bda370ff.js → xml-3d847f47.js} +3 -2
- package/dist/{xml-bda370ff.js.map → xml-3d847f47.js.map} +1 -1
- package/dist/{yaml-5915841b.js → yaml-f547855f.js} +3 -2
- package/dist/{yaml-5915841b.js.map → yaml-f547855f.js.map} +1 -1
- package/package.json +21 -20
|
@@ -20,7 +20,7 @@ import { isHTMLElement as isHTMLElement$1, isStr } from "@rxdrag/shared";
|
|
|
20
20
|
import { isFunction as isFunction$2, debounce, keys, uniqueId } from "lodash-es";
|
|
21
21
|
import { useEntifyEndpoint, useEntifyToken, useLazyQueryEntityList, useLazyQueryOneEntity, useCreateEntityClient, emitEntityChange } from "@rxdrag/entify-hooks";
|
|
22
22
|
import dayjs from "dayjs";
|
|
23
|
-
import { ErrorBoundary, ColorPicker, useSave, CheckCircleIcon as CheckCircleIcon$1, CloseIcon, ModalBody, AddIcon as AddIcon$1, TaskStopIcon, AiStarIcon, ConfirmDialog, SettingsIcon, ModalFooter, FavouriteIcon, LightIcon, DarkIcon, EditIcon, TextInput, Drawer, ModalHeader, ModalClose, SearchIcon, ModalContent as ModalContent$1, Modal as Modal$1, ModalOverlay as ModalOverlay$1, MonacoEditor, getTheFile, MoreIcon, LanguageIcon, SeoIcon, SettingsMinimalisticIcon, CodeSquareIcon, DownloadIcon, UploadIcon, StyledTooltip, PlayIcon, Logo, GlobalIcon, SnsIcon, LightBoltIcon, WarningIcon, PinIcon, PredefinedColorPicker, PagesIcon, WidgetIcon, LeafNode, GroupNode, TreeView, DesignIcon, RemoveIcon, ResetIcon, ImportIcon, AstroIcon, AddFolderIcon, TemplateIcon, AddTemplateIcon } from "@rxdrag/rxcms-common";
|
|
23
|
+
import { ErrorBoundary, ColorPicker, useSave, CheckCircleIcon as CheckCircleIcon$1, CloseIcon, ModalBody, AddIcon as AddIcon$1, TaskStopIcon, AiStarIcon, ConfirmDialog, SettingsIcon, ModalFooter, FavouriteIcon, LightIcon, DarkIcon, EditIcon, TextInput, Drawer, ModalHeader, ModalClose, SearchIcon, ModalContent as ModalContent$1, Modal as Modal$1, ModalOverlay as ModalOverlay$1, MonacoEditor, getTheFile, MoreIcon, LanguageIcon, SeoIcon, AiIcon, SettingsMinimalisticIcon, CodeSquareIcon, DownloadIcon, UploadIcon, StyledTooltip, PlayIcon, Logo, GlobalIcon, SnsIcon, LightBoltIcon, WarningIcon, PinIcon, PredefinedColorPicker, PagesIcon, WidgetIcon, LeafNode, GroupNode, TreeView, DesignIcon, RemoveIcon, ResetIcon, ImportIcon, AstroIcon, AddFolderIcon, TemplateIcon, AddTemplateIcon } from "@rxdrag/rxcms-common";
|
|
24
24
|
import { PageLoader, PopoverController, ModalController, AnimateController, TabsController, NumberController, FlipController, CollapseController, AosController } from "@rxdrag/website-lib-core";
|
|
25
25
|
import gsap$2 from "gsap";
|
|
26
26
|
import { Input, Textarea, StringArrayInput, ImageSelect, TargetSetter, propSetters, DeviceBreakpoints, DeviceContext } from "@rxdrag/schema-setters";
|
|
@@ -37,6 +37,7 @@ import "react-colorful";
|
|
|
37
37
|
import { motion, AnimatePresence, LazyMotion, m } from "framer-motion";
|
|
38
38
|
import $4AOtR$reactdom, { createPortal } from "react-dom";
|
|
39
39
|
import { DeployType, useExportWebsite as useExportWebsite$1 } from "@rxdrag/code-generator";
|
|
40
|
+
import "@rxdrag/entify-lib";
|
|
40
41
|
import { ComponentRender } from "@rxdrag/react-runner-pro";
|
|
41
42
|
import tinycolor from "tinycolor2";
|
|
42
43
|
var jsxRuntime = { exports: {} };
|
|
@@ -1280,7 +1281,7 @@ function newComponentCategoryQueryOptions(themeId) {
|
|
|
1280
1281
|
}
|
|
1281
1282
|
function StudioRoot(props) {
|
|
1282
1283
|
var _a3, _b3;
|
|
1283
|
-
const { theme,
|
|
1284
|
+
const { theme, deployUrl, children } = props;
|
|
1284
1285
|
const website = useWebsite();
|
|
1285
1286
|
const { data: baseLangThemeData, isLoading: baseLangThemeLoading } = useOneTheme(
|
|
1286
1287
|
new ThemeQueryOptions([ThemeFields.id, ThemeFields.parentThemeId], {
|
|
@@ -1409,20 +1410,9 @@ function StudioRoot(props) {
|
|
|
1409
1410
|
parentTheme,
|
|
1410
1411
|
baseLangThemeId: baseLangThemeData == null ? void 0 : baseLangThemeData.id,
|
|
1411
1412
|
loading,
|
|
1412
|
-
|
|
1413
|
+
deployUrl
|
|
1413
1414
|
};
|
|
1414
|
-
}, [
|
|
1415
|
-
theme,
|
|
1416
|
-
templateCategories,
|
|
1417
|
-
templatesData == null ? void 0 : templatesData.items,
|
|
1418
|
-
componentCategories,
|
|
1419
|
-
componentsData == null ? void 0 : componentsData.items,
|
|
1420
|
-
pagesData == null ? void 0 : pagesData.items,
|
|
1421
|
-
parentTheme,
|
|
1422
|
-
baseLangThemeData == null ? void 0 : baseLangThemeData.id,
|
|
1423
|
-
loading,
|
|
1424
|
-
previewUrl
|
|
1425
|
-
]);
|
|
1415
|
+
}, [theme, templateCategories, templatesData == null ? void 0 : templatesData.items, componentCategories, componentsData == null ? void 0 : componentsData.items, pagesData == null ? void 0 : pagesData.items, parentTheme, baseLangThemeData == null ? void 0 : baseLangThemeData.id, loading, deployUrl]);
|
|
1426
1416
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(StudioContext.Provider, { value: studioData, children: [
|
|
1427
1417
|
children,
|
|
1428
1418
|
/* @__PURE__ */ jsxRuntimeExports.jsx(GlobalLoading, { loading })
|
|
@@ -138172,7 +138162,7 @@ registerLanguage({
|
|
|
138172
138162
|
aliases: ["FreeMarker2", "Apache FreeMarker2"],
|
|
138173
138163
|
loader: () => {
|
|
138174
138164
|
{
|
|
138175
|
-
return import("./freemarker2-
|
|
138165
|
+
return import("./freemarker2-0b5a20e1.js").then((m2) => m2.TagAutoInterpolationDollar);
|
|
138176
138166
|
}
|
|
138177
138167
|
}
|
|
138178
138168
|
});
|
|
@@ -138181,7 +138171,7 @@ registerLanguage({
|
|
|
138181
138171
|
aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
|
|
138182
138172
|
loader: () => {
|
|
138183
138173
|
{
|
|
138184
|
-
return import("./freemarker2-
|
|
138174
|
+
return import("./freemarker2-0b5a20e1.js").then((m2) => m2.TagAngleInterpolationDollar);
|
|
138185
138175
|
}
|
|
138186
138176
|
}
|
|
138187
138177
|
});
|
|
@@ -138190,7 +138180,7 @@ registerLanguage({
|
|
|
138190
138180
|
aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
|
|
138191
138181
|
loader: () => {
|
|
138192
138182
|
{
|
|
138193
|
-
return import("./freemarker2-
|
|
138183
|
+
return import("./freemarker2-0b5a20e1.js").then((m2) => m2.TagBracketInterpolationDollar);
|
|
138194
138184
|
}
|
|
138195
138185
|
}
|
|
138196
138186
|
});
|
|
@@ -138199,7 +138189,7 @@ registerLanguage({
|
|
|
138199
138189
|
aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
|
|
138200
138190
|
loader: () => {
|
|
138201
138191
|
{
|
|
138202
|
-
return import("./freemarker2-
|
|
138192
|
+
return import("./freemarker2-0b5a20e1.js").then((m2) => m2.TagAngleInterpolationBracket);
|
|
138203
138193
|
}
|
|
138204
138194
|
}
|
|
138205
138195
|
});
|
|
@@ -138208,7 +138198,7 @@ registerLanguage({
|
|
|
138208
138198
|
aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
|
|
138209
138199
|
loader: () => {
|
|
138210
138200
|
{
|
|
138211
|
-
return import("./freemarker2-
|
|
138201
|
+
return import("./freemarker2-0b5a20e1.js").then((m2) => m2.TagBracketInterpolationBracket);
|
|
138212
138202
|
}
|
|
138213
138203
|
}
|
|
138214
138204
|
});
|
|
@@ -138217,7 +138207,7 @@ registerLanguage({
|
|
|
138217
138207
|
aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
|
|
138218
138208
|
loader: () => {
|
|
138219
138209
|
{
|
|
138220
|
-
return import("./freemarker2-
|
|
138210
|
+
return import("./freemarker2-0b5a20e1.js").then((m2) => m2.TagAutoInterpolationDollar);
|
|
138221
138211
|
}
|
|
138222
138212
|
}
|
|
138223
138213
|
});
|
|
@@ -138226,7 +138216,7 @@ registerLanguage({
|
|
|
138226
138216
|
aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
|
|
138227
138217
|
loader: () => {
|
|
138228
138218
|
{
|
|
138229
|
-
return import("./freemarker2-
|
|
138219
|
+
return import("./freemarker2-0b5a20e1.js").then((m2) => m2.TagAutoInterpolationBracket);
|
|
138230
138220
|
}
|
|
138231
138221
|
}
|
|
138232
138222
|
});
|
|
@@ -138276,7 +138266,7 @@ registerLanguage({
|
|
|
138276
138266
|
mimetypes: ["text/x-handlebars-template"],
|
|
138277
138267
|
loader: () => {
|
|
138278
138268
|
{
|
|
138279
|
-
return import("./handlebars-
|
|
138269
|
+
return import("./handlebars-3e804cdc.js");
|
|
138280
138270
|
}
|
|
138281
138271
|
}
|
|
138282
138272
|
});
|
|
@@ -138309,7 +138299,7 @@ registerLanguage({
|
|
|
138309
138299
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
138310
138300
|
loader: () => {
|
|
138311
138301
|
{
|
|
138312
|
-
return import("./html-
|
|
138302
|
+
return import("./html-bef31e01.js");
|
|
138313
138303
|
}
|
|
138314
138304
|
}
|
|
138315
138305
|
});
|
|
@@ -138362,7 +138352,7 @@ registerLanguage({
|
|
|
138362
138352
|
mimetypes: ["text/javascript"],
|
|
138363
138353
|
loader: () => {
|
|
138364
138354
|
{
|
|
138365
|
-
return import("./javascript-
|
|
138355
|
+
return import("./javascript-a482a18d.js");
|
|
138366
138356
|
}
|
|
138367
138357
|
}
|
|
138368
138358
|
});
|
|
@@ -138461,7 +138451,7 @@ registerLanguage({
|
|
|
138461
138451
|
mimetypes: ["application/liquid"],
|
|
138462
138452
|
loader: () => {
|
|
138463
138453
|
{
|
|
138464
|
-
return import("./liquid-
|
|
138454
|
+
return import("./liquid-91f2b334.js");
|
|
138465
138455
|
}
|
|
138466
138456
|
}
|
|
138467
138457
|
});
|
|
@@ -138509,7 +138499,7 @@ registerLanguage({
|
|
|
138509
138499
|
aliases: ["MDX", "mdx"],
|
|
138510
138500
|
loader: () => {
|
|
138511
138501
|
{
|
|
138512
|
-
return import("./mdx-
|
|
138502
|
+
return import("./mdx-5b3f4043.js");
|
|
138513
138503
|
}
|
|
138514
138504
|
}
|
|
138515
138505
|
});
|
|
@@ -138768,7 +138758,7 @@ registerLanguage({
|
|
|
138768
138758
|
firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
|
|
138769
138759
|
loader: () => {
|
|
138770
138760
|
{
|
|
138771
|
-
return import("./python-
|
|
138761
|
+
return import("./python-5ab24881.js");
|
|
138772
138762
|
}
|
|
138773
138763
|
}
|
|
138774
138764
|
});
|
|
@@ -138817,7 +138807,7 @@ registerLanguage({
|
|
|
138817
138807
|
mimetypes: ["text/x-cshtml"],
|
|
138818
138808
|
loader: () => {
|
|
138819
138809
|
{
|
|
138820
|
-
return import("./razor-
|
|
138810
|
+
return import("./razor-e2cba756.js");
|
|
138821
138811
|
}
|
|
138822
138812
|
}
|
|
138823
138813
|
});
|
|
@@ -139153,7 +139143,7 @@ registerLanguage({
|
|
|
139153
139143
|
mimetypes: ["text/typescript"],
|
|
139154
139144
|
loader: () => {
|
|
139155
139145
|
{
|
|
139156
|
-
return import("./typescript-
|
|
139146
|
+
return import("./typescript-47724791.js");
|
|
139157
139147
|
}
|
|
139158
139148
|
}
|
|
139159
139149
|
});
|
|
@@ -139237,7 +139227,7 @@ registerLanguage({
|
|
|
139237
139227
|
mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
|
|
139238
139228
|
loader: () => {
|
|
139239
139229
|
{
|
|
139240
|
-
return import("./xml-
|
|
139230
|
+
return import("./xml-3d847f47.js");
|
|
139241
139231
|
}
|
|
139242
139232
|
}
|
|
139243
139233
|
});
|
|
@@ -139254,7 +139244,7 @@ registerLanguage({
|
|
|
139254
139244
|
mimetypes: ["application/x-yaml", "text/x-yaml"],
|
|
139255
139245
|
loader: () => {
|
|
139256
139246
|
{
|
|
139257
|
-
return import("./yaml-
|
|
139247
|
+
return import("./yaml-f547855f.js");
|
|
139258
139248
|
}
|
|
139259
139249
|
}
|
|
139260
139250
|
});
|
|
@@ -139378,7 +139368,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3(
|
|
|
139378
139368
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
139379
139369
|
function getMode$3() {
|
|
139380
139370
|
{
|
|
139381
|
-
return import("./cssMode-
|
|
139371
|
+
return import("./cssMode-f6ed7ab1.js");
|
|
139382
139372
|
}
|
|
139383
139373
|
}
|
|
139384
139374
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -139509,7 +139499,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
139509
139499
|
};
|
|
139510
139500
|
function getMode$2() {
|
|
139511
139501
|
{
|
|
139512
|
-
return import("./htmlMode-
|
|
139502
|
+
return import("./htmlMode-190446f0.js");
|
|
139513
139503
|
}
|
|
139514
139504
|
}
|
|
139515
139505
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -139607,7 +139597,7 @@ var getWorker = () => getMode$1().then((mode) => mode.getWorker());
|
|
|
139607
139597
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults, getWorker };
|
|
139608
139598
|
function getMode$1() {
|
|
139609
139599
|
{
|
|
139610
|
-
return import("./jsonMode-
|
|
139600
|
+
return import("./jsonMode-36321e55.js");
|
|
139611
139601
|
}
|
|
139612
139602
|
}
|
|
139613
139603
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -139883,7 +139873,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
139883
139873
|
};
|
|
139884
139874
|
function getMode() {
|
|
139885
139875
|
{
|
|
139886
|
-
return import("./tsMode-
|
|
139876
|
+
return import("./tsMode-a884ed37.js");
|
|
139887
139877
|
}
|
|
139888
139878
|
}
|
|
139889
139879
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -191322,6 +191312,14 @@ function MoreActions$1() {
|
|
|
191322
191312
|
},
|
|
191323
191313
|
"parent-theme"
|
|
191324
191314
|
),
|
|
191315
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191316
|
+
DropdownItem,
|
|
191317
|
+
{
|
|
191318
|
+
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(AiIcon, { className: "size-5" }),
|
|
191319
|
+
children: "AI配置"
|
|
191320
|
+
},
|
|
191321
|
+
"ai-config"
|
|
191322
|
+
),
|
|
191325
191323
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191326
191324
|
DropdownItem,
|
|
191327
191325
|
{
|
|
@@ -198162,8 +198160,25 @@ function Welcome(props) {
|
|
|
198162
198160
|
] })
|
|
198163
198161
|
] });
|
|
198164
198162
|
}
|
|
198165
|
-
|
|
198163
|
+
async function uploadDeploymentFile(formData, deployURL) {
|
|
198164
|
+
console.log("uploadDeploymentFile to", deployURL);
|
|
198165
|
+
if (!deployURL) {
|
|
198166
|
+
throw new Error("No deploy URL");
|
|
198167
|
+
}
|
|
198168
|
+
const response = await fetch(deployURL, {
|
|
198169
|
+
method: "POST",
|
|
198170
|
+
body: formData
|
|
198171
|
+
});
|
|
198172
|
+
if (!response.ok) {
|
|
198173
|
+
throw new Error("Network response was not ok");
|
|
198174
|
+
}
|
|
198175
|
+
return await Promise.resolve();
|
|
198176
|
+
}
|
|
198177
|
+
const WebsiteToolbar = memo((props) => {
|
|
198166
198178
|
var _a3, _b3;
|
|
198179
|
+
const { deployUrl } = props;
|
|
198180
|
+
const [isDeploying, setIsDeploying] = useState(false);
|
|
198181
|
+
const setError = useEntifyWrapperStore((state) => state.setGlobalError);
|
|
198167
198182
|
const website = useWebsite();
|
|
198168
198183
|
const currentLang = useCurrentLang();
|
|
198169
198184
|
const previewUrl = usePreviewUrl();
|
|
@@ -198173,6 +198188,23 @@ const WebsiteToolbar = memo(() => {
|
|
|
198173
198188
|
useEffect(() => {
|
|
198174
198189
|
setSelectedContent(void 0);
|
|
198175
198190
|
}, [currentLang, setSelectedContent]);
|
|
198191
|
+
const deployWebsite = useCallback(async () => {
|
|
198192
|
+
try {
|
|
198193
|
+
setIsDeploying(true);
|
|
198194
|
+
const content = "hello world";
|
|
198195
|
+
const blob = new Blob([content], { type: "text/plain" });
|
|
198196
|
+
const formData = new FormData();
|
|
198197
|
+
formData.append("websiteId", (website == null ? void 0 : website.id) || "");
|
|
198198
|
+
formData.append("file", blob, "test.txt");
|
|
198199
|
+
uploadDeploymentFile(formData, deployUrl).then(() => {
|
|
198200
|
+
setIsDeploying(false);
|
|
198201
|
+
});
|
|
198202
|
+
} catch (e) {
|
|
198203
|
+
const typedE = e;
|
|
198204
|
+
setIsDeploying(false);
|
|
198205
|
+
setError(typedE instanceof Error ? typedE.message : typedE);
|
|
198206
|
+
}
|
|
198207
|
+
}, [deployUrl, setError, website == null ? void 0 : website.id]);
|
|
198176
198208
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
198177
198209
|
"div",
|
|
198178
198210
|
{
|
|
@@ -198211,6 +198243,8 @@ const WebsiteToolbar = memo(() => {
|
|
|
198211
198243
|
{
|
|
198212
198244
|
size: "sm",
|
|
198213
198245
|
variant: "bordered",
|
|
198246
|
+
isLoading: isDeploying,
|
|
198247
|
+
onPress: deployWebsite,
|
|
198214
198248
|
children: "部署网站"
|
|
198215
198249
|
}
|
|
198216
198250
|
),
|
|
@@ -202840,7 +202874,7 @@ function useCapabilities() {
|
|
|
202840
202874
|
useCapabilityTheme();
|
|
202841
202875
|
}
|
|
202842
202876
|
function WebsiteDesigner(props) {
|
|
202843
|
-
const { themeLoading } = props;
|
|
202877
|
+
const { themeLoading, deployUrl } = props;
|
|
202844
202878
|
const aiAgent = useAiAgent();
|
|
202845
202879
|
const [selected, setSelected] = useState("local");
|
|
202846
202880
|
const drawerType = useStudioStore((state) => state.drawerType);
|
|
@@ -202956,7 +202990,7 @@ function WebsiteDesigner(props) {
|
|
|
202956
202990
|
className: `dark flex-1 flex flex-col min-h-screen`,
|
|
202957
202991
|
ref: handleRefChange,
|
|
202958
202992
|
children: [
|
|
202959
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(WebsiteToolbar, {}),
|
|
202993
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(WebsiteToolbar, { deployUrl }),
|
|
202960
202994
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DocumentRoot, { doc, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "website-studio-core flex flex-1 h-full min-h-0 relative", children: [
|
|
202961
202995
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
202962
202996
|
LeftBar,
|
|
@@ -203007,20 +203041,20 @@ function WebsiteDesigner(props) {
|
|
|
203007
203041
|
);
|
|
203008
203042
|
}
|
|
203009
203043
|
const WebsiteStudio = (props) => {
|
|
203010
|
-
const {
|
|
203044
|
+
const { deployUrl, aiUrl, params } = props;
|
|
203011
203045
|
const { websiteId } = params;
|
|
203012
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(SiteRoot, { websiteId, children: /* @__PURE__ */ jsxRuntimeExports.jsx(WebsiteStudioInner, { aiUrl,
|
|
203046
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SiteRoot, { websiteId, children: /* @__PURE__ */ jsxRuntimeExports.jsx(WebsiteStudioInner, { aiUrl, deployUrl }) });
|
|
203013
203047
|
};
|
|
203014
203048
|
function WebsiteStudioInner(props) {
|
|
203015
203049
|
var _a3, _b3;
|
|
203016
|
-
const { aiUrl,
|
|
203050
|
+
const { aiUrl, deployUrl } = props;
|
|
203017
203051
|
const website = useWebsite();
|
|
203018
203052
|
const langId = ((_a3 = useCurrentLang()) == null ? void 0 : _a3.id) || ((_b3 = website == null ? void 0 : website.baseLang) == null ? void 0 : _b3.id);
|
|
203019
203053
|
const { data: theme, isLoading: themeLoading } = useOneTheme(
|
|
203020
203054
|
newThemeQueryOptions(website == null ? void 0 : website.id, langId)
|
|
203021
203055
|
);
|
|
203022
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(StudioRoot, { theme,
|
|
203023
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(EditorScope, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AiAgentRoot, { endpoint: aiUrl, globalProvider: WEBSITE_DESIGN_PROMPT, children: /* @__PURE__ */ jsxRuntimeExports.jsx(WebsiteDesigner, { themeLoading }) }) }),
|
|
203056
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(StudioRoot, { theme, deployUrl, children: [
|
|
203057
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(EditorScope, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AiAgentRoot, { endpoint: aiUrl, globalProvider: WEBSITE_DESIGN_PROMPT, children: /* @__PURE__ */ jsxRuntimeExports.jsx(WebsiteDesigner, { themeLoading, deployUrl }) }) }),
|
|
203024
203058
|
/* @__PURE__ */ jsxRuntimeExports.jsx(GlobalLoading, { loading: themeLoading })
|
|
203025
203059
|
] });
|
|
203026
203060
|
}
|
|
@@ -203889,12 +203923,12 @@ function ThemeDesigner(props) {
|
|
|
203889
203923
|
] });
|
|
203890
203924
|
}
|
|
203891
203925
|
const ThemeStudio = (props) => {
|
|
203892
|
-
const { aiUrl, themeId } = props;
|
|
203926
|
+
const { aiUrl, deployURL, themeId } = props;
|
|
203893
203927
|
const { data: theme, isLoading: themeLoading } = useOneThemeById(
|
|
203894
203928
|
themeId,
|
|
203895
203929
|
newThemeByIdQueryOptions()
|
|
203896
203930
|
);
|
|
203897
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(StudioRoot, { theme, children: [
|
|
203931
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(StudioRoot, { theme, deployUrl: deployURL, children: [
|
|
203898
203932
|
/* @__PURE__ */ jsxRuntimeExports.jsx(EditorScope, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AiAgentRoot, { endpoint: aiUrl, globalProvider: WEBSITE_DESIGN_PROMPT, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeDesigner, {}) }) }),
|
|
203899
203933
|
/* @__PURE__ */ jsxRuntimeExports.jsx(GlobalLoading, { loading: themeLoading })
|
|
203900
203934
|
] });
|
|
@@ -203913,4 +203947,4 @@ export {
|
|
|
203913
203947
|
typescriptDefaults as t,
|
|
203914
203948
|
useCustomizedMaterials as u
|
|
203915
203949
|
};
|
|
203916
|
-
//# sourceMappingURL=index-
|
|
203950
|
+
//# sourceMappingURL=index-add86284.js.map
|