@rxdrag/website-studio 0.0.55 → 0.0.56
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/components/ThemeDesigner/Toolbar/CodeSyncModal.d.ts +5 -0
- package/dist/{cssMode-18541991.js → cssMode-91c5028f.js} +2 -2
- package/dist/{cssMode-18541991.js.map → cssMode-91c5028f.js.map} +1 -1
- package/dist/{freemarker2-76b6858d.js → freemarker2-809f7e92.js} +2 -2
- package/dist/{freemarker2-76b6858d.js.map → freemarker2-809f7e92.js.map} +1 -1
- package/dist/{handlebars-e03ceb02.js → handlebars-435daeb8.js} +2 -2
- package/dist/{handlebars-e03ceb02.js.map → handlebars-435daeb8.js.map} +1 -1
- package/dist/{html-e668fd88.js → html-c08d0c2f.js} +2 -2
- package/dist/{html-e668fd88.js.map → html-c08d0c2f.js.map} +1 -1
- package/dist/{htmlMode-0f48cfd2.js → htmlMode-b275349e.js} +2 -2
- package/dist/{htmlMode-0f48cfd2.js.map → htmlMode-b275349e.js.map} +1 -1
- package/dist/{index-00f0a2d9.js → index-00576497.js} +135 -593
- package/dist/{index-00f0a2d9.js.map → index-00576497.js.map} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{javascript-256b008b.js → javascript-eabe9c28.js} +3 -3
- package/dist/{javascript-256b008b.js.map → javascript-eabe9c28.js.map} +1 -1
- package/dist/{jsonMode-5da638d3.js → jsonMode-af4e2a56.js} +2 -2
- package/dist/{jsonMode-5da638d3.js.map → jsonMode-af4e2a56.js.map} +1 -1
- package/dist/{liquid-a834f881.js → liquid-88c26e28.js} +2 -2
- package/dist/{liquid-a834f881.js.map → liquid-88c26e28.js.map} +1 -1
- package/dist/{mdx-9237a94f.js → mdx-2fa366c7.js} +2 -2
- package/dist/{mdx-9237a94f.js.map → mdx-2fa366c7.js.map} +1 -1
- package/dist/{python-f0642f2a.js → python-477e1416.js} +2 -2
- package/dist/{python-f0642f2a.js.map → python-477e1416.js.map} +1 -1
- package/dist/{razor-6cfe0935.js → razor-1fe57a2b.js} +2 -2
- package/dist/{razor-6cfe0935.js.map → razor-1fe57a2b.js.map} +1 -1
- package/dist/{tsMode-3eb3f6fa.js → tsMode-41007fbc.js} +2 -2
- package/dist/{tsMode-3eb3f6fa.js.map → tsMode-41007fbc.js.map} +1 -1
- package/dist/{typescript-20834fcb.js → typescript-db59573b.js} +2 -2
- package/dist/{typescript-20834fcb.js.map → typescript-db59573b.js.map} +1 -1
- package/dist/{xml-faee240c.js → xml-34916896.js} +2 -2
- package/dist/{xml-faee240c.js.map → xml-34916896.js.map} +1 -1
- package/dist/{yaml-c459fcdd.js → yaml-21c57711.js} +2 -2
- package/dist/{yaml-c459fcdd.js.map → yaml-21c57711.js.map} +1 -1
- package/package.json +16 -16
- package/dist/components/LeftDrawer/ComponentsPanel/TemplatesRootNode.d.ts +0 -7
- package/dist/components/common/TemplateCategoryList/TemplateCategoryModal.d.ts +0 -4
- package/dist/components/common/TemplateCategoryList/TemplateCategoryNode.d.ts +0 -9
- package/dist/components/common/TemplateCategoryList/TemplateList.d.ts +0 -13
- package/dist/components/common/TemplateCategoryList/TemplateModal.d.ts +0 -9
- package/dist/components/common/TemplateCategoryList/TemplateNode.d.ts +0 -8
- package/dist/components/common/TemplateCategoryList/index.d.ts +0 -10
- package/dist/components/common/TemplateCategoryList/useRegisterTemplate.d.ts +0 -3
- package/dist/components/common/TemplateCategoryListScope/index.d.ts +0 -4
|
@@ -7,7 +7,7 @@ var __publicField = (obj, key2, value) => {
|
|
|
7
7
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i2, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$2, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa;
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import React__default, { createContext, useMemo, useContext, useCallback, useEffect, memo, useState, useRef, forwardRef as forwardRef$2, Component, useImperativeHandle, isValidElement, cloneElement } from "react";
|
|
10
|
-
import { ThemeBranchFields, PageQueryOptions, PageFields, FrontComponentQueryOptions, FrontComponentFields, MediaQueryOptions, ComponentCategoryFields, SectionTemplateQueryOptions, SectionTemplateFields, ComponentCategoryQueryOptions, TemplateCategoryQueryOptions, TemplateCategoryFields, ThemeBranchQueryOptions, StyleConfigFields, LangFields, ThemeConfigQueryOptions, ThemeConfigFields, ThemeFields, WebsiteQueryOptions, WebsiteFields, PageAssciations, TaskQueryOptions, TaskFields, AppModule, TaskStatus, PageType, websiteToInput, TaskType, LangQueryOptions, WebsiteAssciations, ExtendFieldType, ThemeConfigAssciations, WebsiteSettingsQueryOptions, WebsiteSettingsFields, themeConfigToInputCascade, ThemeConfigEntityName, MediaType, themeConfigToInput, websiteSettingsToInput, WebsiteSettingsEntityName, WebsiteSettingsAssciations, PageEntityName, ThemeBranchEntityName, themeBranchToInputCascade, ThemeQueryOptions, ThemeCategoryFields, FrontComponentEntityName, pageToInputCascade, sectionTemplateToInput, ProductCategoryEntityName, ProductCategoryQueryOptions, ProductCategoryFields, ProductQueryOptions, ProductFields, PublishableStatus, TaskEntityName, ComponentCategoryEntityName, themeBranchToInput, frontComponentToInput, SectionTemplateEntityName, pageToInput, PageMetaQueryOptions, PageMetaFields, PageMetaAssciations, FrontComponentAssciations, componentCategoryToInput
|
|
10
|
+
import { ThemeBranchFields, PageQueryOptions, PageFields, FrontComponentQueryOptions, FrontComponentFields, MediaQueryOptions, ComponentCategoryFields, SectionTemplateQueryOptions, SectionTemplateFields, ComponentCategoryQueryOptions, TemplateCategoryQueryOptions, TemplateCategoryFields, ThemeBranchQueryOptions, StyleConfigFields, LangFields, ThemeConfigQueryOptions, ThemeConfigFields, ThemeFields, WebsiteQueryOptions, WebsiteFields, PageAssciations, TaskQueryOptions, TaskFields, AppModule, TaskStatus, PageType, websiteToInput, TaskType, LangQueryOptions, WebsiteAssciations, ExtendFieldType, ThemeConfigAssciations, WebsiteSettingsQueryOptions, WebsiteSettingsFields, themeConfigToInputCascade, ThemeConfigEntityName, MediaType, themeConfigToInput, websiteSettingsToInput, WebsiteSettingsEntityName, WebsiteSettingsAssciations, PageEntityName, ThemeBranchEntityName, themeBranchToInputCascade, ThemeQueryOptions, ThemeCategoryFields, FrontComponentEntityName, pageToInputCascade, sectionTemplateToInput, ProductCategoryEntityName, ProductCategoryQueryOptions, ProductCategoryFields, ProductQueryOptions, ProductFields, PublishableStatus, TaskEntityName, ComponentCategoryEntityName, themeBranchToInput, frontComponentToInput, SectionTemplateEntityName, pageToInput, PageMetaQueryOptions, PageMetaFields, PageMetaAssciations, FrontComponentAssciations, componentCategoryToInput } from "@rxdrag/rxcms-models";
|
|
11
11
|
import { GlobalLoading, EntityForm, SubmitButton, useListData, SearchInput, EntityPagination, useIsLoading, QueryListScope, EntitySelect, useRemoveRow, useEditRow, EntityEditModal, useSelectionsState, EntityTable, EntityListScope, NewButton, EntityRowScope, EntitySelectField, useNewRow } from "@rxdrag/rxcms-models-ui";
|
|
12
12
|
import { useOneThemeBranch, usePageList, useTemplateCategoryList, useSectionTemplateList, useComponentCategoryList, useFrontComponentList, useOneThemeBranchById, useTaskList, useUpsertOneWebsite, useDeleteThemeBranchById, useUpsertOneThemeBranch, useLangList, useOneWebsiteSettings, useOneThemeConfig, useUpsertOneThemeConfig, useUpsertOneWebsiteSettings, useUpsertOnePage, useUpsertOneSectionTemplate, useUpsertOneFrontComponent, useDeletePageById } from "@rxdrag/rxcms-model-hooks";
|
|
13
13
|
import { newPageMetaOptions, useWebsite, useCurrentLangId, ComponentType, MediaSingleSelectField, FullImageSelectField, useSiteId, useCurrentLang, TitleAndSlug, TitleViewField, DescriptionViewField, RxcmsMedias, SiteRoot, usePreviewUrl, LangSelect } from "@rxdrag/biz-components";
|
|
@@ -18,7 +18,7 @@ import { PageLoader, PopoverController, ModalController, AnimateController, Tabs
|
|
|
18
18
|
import gsap$2 from "gsap";
|
|
19
19
|
import { useLazyQueryEntityList, useLazyQueryOneEntity, emitEntityChange, useEntifyEndpoint, useEntifyToken, useCreateEntityClient } from "@rxdrag/entify-hooks";
|
|
20
20
|
import JSZip from "jszip";
|
|
21
|
-
import { 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, WarningIcon, PinIcon, ErrorBoundary, CloneIcon, RemoveIcon, MonacoEditor, RunningIcon, StyledTooltip, PlayIcon, getTheFile, MoreIcon, Logo, PagesIcon, WidgetIcon, SeoIcon, TextIcon, HeadingIcon, StarIcon, ImageIcon, VideoIcon, SplineIcon, CardIcon, TableIcon, GridIcon, BoxIcon, DividerIcon, SpacerIcon, SlotIcon, LinkIcon, BreadcrumbIcon, TabsIcon, PopoverIcon, ModalIcon, FormIcon, LeafNode, GroupNode, TreeView, DesignIcon, ResetIcon, ImportIcon, AstroIcon, AddFolderIcon,
|
|
21
|
+
import { 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, WarningIcon, PinIcon, ErrorBoundary, CloneIcon, RemoveIcon, MonacoEditor, RunningIcon, StyledTooltip, PlayIcon, getTheFile, MoreIcon, CodeSyncIcon, Logo, PagesIcon, WidgetIcon, SeoIcon, TextIcon, HeadingIcon, StarIcon, ImageIcon, VideoIcon, SplineIcon, CardIcon, TableIcon, GridIcon, BoxIcon, DividerIcon, SpacerIcon, SlotIcon, LinkIcon, BreadcrumbIcon, TabsIcon, PopoverIcon, ModalIcon, FormIcon, LeafNode, GroupNode, TreeView, DesignIcon, ResetIcon, ImportIcon, AstroIcon, AddFolderIcon, MediasIcon, LanguageIcon, SettingsMinimalisticIcon, CodeSquareIcon, DownloadIcon, UploadIcon } from "@rxdrag/rxcms-common";
|
|
22
22
|
import { create as create$4 } from "zustand";
|
|
23
23
|
import { Card, CardBody, Button as Button$2, CircularProgress, addToast, CardHeader, Select, SelectItem, Dropdown, DropdownTrigger, DropdownMenu as DropdownMenu$1, DropdownItem, Accordion, AccordionItem, Input, Tabs, Tab, Divider, cn, Checkbox, Chip, Skeleton, CardFooter, Image, useDisclosure, Modal as Modal$2, ModalContent as ModalContent$2, ModalHeader as ModalHeader$1, ModalBody as ModalBody$1, ModalFooter as ModalFooter$1, Tooltip, RadioGroup, Radio } from "@heroui/react";
|
|
24
24
|
import { Icon } from "@iconify/react";
|
|
@@ -505,11 +505,11 @@ const componentsQueryOptions = new FrontComponentQueryOptions(
|
|
|
505
505
|
FrontComponentFields.seqValue,
|
|
506
506
|
FrontComponentFields.updatedAt,
|
|
507
507
|
FrontComponentFields.code,
|
|
508
|
-
FrontComponentFields.
|
|
509
|
-
FrontComponentFields.
|
|
508
|
+
FrontComponentFields.propsSchema,
|
|
509
|
+
FrontComponentFields.propsTest,
|
|
510
510
|
FrontComponentFields.slots,
|
|
511
511
|
FrontComponentFields.droppable,
|
|
512
|
-
FrontComponentFields.
|
|
512
|
+
FrontComponentFields.compileResult,
|
|
513
513
|
FrontComponentFields.updatedAt
|
|
514
514
|
],
|
|
515
515
|
{
|
|
@@ -816,14 +816,14 @@ function StudioRoot(props) {
|
|
|
816
816
|
FrontComponentFields.seqValue,
|
|
817
817
|
FrontComponentFields.updatedAt,
|
|
818
818
|
FrontComponentFields.code,
|
|
819
|
-
FrontComponentFields.
|
|
820
|
-
FrontComponentFields.
|
|
819
|
+
FrontComponentFields.propsSchema,
|
|
820
|
+
FrontComponentFields.propsTest,
|
|
821
821
|
FrontComponentFields.slots,
|
|
822
822
|
FrontComponentFields.droppable,
|
|
823
823
|
FrontComponentFields.isInMarket,
|
|
824
824
|
FrontComponentFields.isSectionBlock,
|
|
825
825
|
FrontComponentFields.parentId,
|
|
826
|
-
FrontComponentFields.
|
|
826
|
+
FrontComponentFields.compileResult,
|
|
827
827
|
FrontComponentFields.updatedAt
|
|
828
828
|
],
|
|
829
829
|
{
|
|
@@ -1342,7 +1342,7 @@ const _ModuleManager = class _ModuleManager {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
covertComToReact(com) {
|
|
1344
1344
|
var _a3;
|
|
1345
|
-
const compiledCode = (_a3 = com == null ? void 0 : com.
|
|
1345
|
+
const compiledCode = (_a3 = com == null ? void 0 : com.compileResult) == null ? void 0 : _a3.code;
|
|
1346
1346
|
if (!compiledCode) {
|
|
1347
1347
|
throw new Error(`组件 ${com.name} 未编译,请先保存组件以生成编译结果`);
|
|
1348
1348
|
}
|
|
@@ -3699,7 +3699,7 @@ const LoadingDisplay = ({ message }) => /* @__PURE__ */ jsxRuntimeExports.jsx("d
|
|
|
3699
3699
|
function AstroComponentRender(props) {
|
|
3700
3700
|
const { componentName, ...componentProps } = props;
|
|
3701
3701
|
const fCom = useFrontComponent(componentName);
|
|
3702
|
-
const compileResult = fCom == null ? void 0 : fCom.
|
|
3702
|
+
const compileResult = fCom == null ? void 0 : fCom.compileResult;
|
|
3703
3703
|
const moduleMgr = useModuleManager();
|
|
3704
3704
|
const scriptsWithVars = useMemo(() => {
|
|
3705
3705
|
if (!(compileResult == null ? void 0 : compileResult.scripts))
|
|
@@ -3840,8 +3840,8 @@ function useGetFrontComponents() {
|
|
|
3840
3840
|
FrontComponentFields.seqValue,
|
|
3841
3841
|
FrontComponentFields.updatedAt,
|
|
3842
3842
|
FrontComponentFields.code,
|
|
3843
|
-
FrontComponentFields.
|
|
3844
|
-
FrontComponentFields.
|
|
3843
|
+
FrontComponentFields.propsSchema,
|
|
3844
|
+
FrontComponentFields.propsTest,
|
|
3845
3845
|
FrontComponentFields.slots,
|
|
3846
3846
|
FrontComponentFields.droppable
|
|
3847
3847
|
],
|
|
@@ -136381,7 +136381,7 @@ registerLanguage({
|
|
|
136381
136381
|
aliases: ["FreeMarker2", "Apache FreeMarker2"],
|
|
136382
136382
|
loader: () => {
|
|
136383
136383
|
{
|
|
136384
|
-
return import("./freemarker2-
|
|
136384
|
+
return import("./freemarker2-809f7e92.js").then((m2) => m2.TagAutoInterpolationDollar);
|
|
136385
136385
|
}
|
|
136386
136386
|
}
|
|
136387
136387
|
});
|
|
@@ -136390,7 +136390,7 @@ registerLanguage({
|
|
|
136390
136390
|
aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
|
|
136391
136391
|
loader: () => {
|
|
136392
136392
|
{
|
|
136393
|
-
return import("./freemarker2-
|
|
136393
|
+
return import("./freemarker2-809f7e92.js").then((m2) => m2.TagAngleInterpolationDollar);
|
|
136394
136394
|
}
|
|
136395
136395
|
}
|
|
136396
136396
|
});
|
|
@@ -136399,7 +136399,7 @@ registerLanguage({
|
|
|
136399
136399
|
aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
|
|
136400
136400
|
loader: () => {
|
|
136401
136401
|
{
|
|
136402
|
-
return import("./freemarker2-
|
|
136402
|
+
return import("./freemarker2-809f7e92.js").then((m2) => m2.TagBracketInterpolationDollar);
|
|
136403
136403
|
}
|
|
136404
136404
|
}
|
|
136405
136405
|
});
|
|
@@ -136408,7 +136408,7 @@ registerLanguage({
|
|
|
136408
136408
|
aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
|
|
136409
136409
|
loader: () => {
|
|
136410
136410
|
{
|
|
136411
|
-
return import("./freemarker2-
|
|
136411
|
+
return import("./freemarker2-809f7e92.js").then((m2) => m2.TagAngleInterpolationBracket);
|
|
136412
136412
|
}
|
|
136413
136413
|
}
|
|
136414
136414
|
});
|
|
@@ -136417,7 +136417,7 @@ registerLanguage({
|
|
|
136417
136417
|
aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
|
|
136418
136418
|
loader: () => {
|
|
136419
136419
|
{
|
|
136420
|
-
return import("./freemarker2-
|
|
136420
|
+
return import("./freemarker2-809f7e92.js").then((m2) => m2.TagBracketInterpolationBracket);
|
|
136421
136421
|
}
|
|
136422
136422
|
}
|
|
136423
136423
|
});
|
|
@@ -136426,7 +136426,7 @@ registerLanguage({
|
|
|
136426
136426
|
aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
|
|
136427
136427
|
loader: () => {
|
|
136428
136428
|
{
|
|
136429
|
-
return import("./freemarker2-
|
|
136429
|
+
return import("./freemarker2-809f7e92.js").then((m2) => m2.TagAutoInterpolationDollar);
|
|
136430
136430
|
}
|
|
136431
136431
|
}
|
|
136432
136432
|
});
|
|
@@ -136435,7 +136435,7 @@ registerLanguage({
|
|
|
136435
136435
|
aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
|
|
136436
136436
|
loader: () => {
|
|
136437
136437
|
{
|
|
136438
|
-
return import("./freemarker2-
|
|
136438
|
+
return import("./freemarker2-809f7e92.js").then((m2) => m2.TagAutoInterpolationBracket);
|
|
136439
136439
|
}
|
|
136440
136440
|
}
|
|
136441
136441
|
});
|
|
@@ -136485,7 +136485,7 @@ registerLanguage({
|
|
|
136485
136485
|
mimetypes: ["text/x-handlebars-template"],
|
|
136486
136486
|
loader: () => {
|
|
136487
136487
|
{
|
|
136488
|
-
return import("./handlebars-
|
|
136488
|
+
return import("./handlebars-435daeb8.js");
|
|
136489
136489
|
}
|
|
136490
136490
|
}
|
|
136491
136491
|
});
|
|
@@ -136518,7 +136518,7 @@ registerLanguage({
|
|
|
136518
136518
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
136519
136519
|
loader: () => {
|
|
136520
136520
|
{
|
|
136521
|
-
return import("./html-
|
|
136521
|
+
return import("./html-c08d0c2f.js");
|
|
136522
136522
|
}
|
|
136523
136523
|
}
|
|
136524
136524
|
});
|
|
@@ -136571,7 +136571,7 @@ registerLanguage({
|
|
|
136571
136571
|
mimetypes: ["text/javascript"],
|
|
136572
136572
|
loader: () => {
|
|
136573
136573
|
{
|
|
136574
|
-
return import("./javascript-
|
|
136574
|
+
return import("./javascript-eabe9c28.js");
|
|
136575
136575
|
}
|
|
136576
136576
|
}
|
|
136577
136577
|
});
|
|
@@ -136670,7 +136670,7 @@ registerLanguage({
|
|
|
136670
136670
|
mimetypes: ["application/liquid"],
|
|
136671
136671
|
loader: () => {
|
|
136672
136672
|
{
|
|
136673
|
-
return import("./liquid-
|
|
136673
|
+
return import("./liquid-88c26e28.js");
|
|
136674
136674
|
}
|
|
136675
136675
|
}
|
|
136676
136676
|
});
|
|
@@ -136718,7 +136718,7 @@ registerLanguage({
|
|
|
136718
136718
|
aliases: ["MDX", "mdx"],
|
|
136719
136719
|
loader: () => {
|
|
136720
136720
|
{
|
|
136721
|
-
return import("./mdx-
|
|
136721
|
+
return import("./mdx-2fa366c7.js");
|
|
136722
136722
|
}
|
|
136723
136723
|
}
|
|
136724
136724
|
});
|
|
@@ -136977,7 +136977,7 @@ registerLanguage({
|
|
|
136977
136977
|
firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
|
|
136978
136978
|
loader: () => {
|
|
136979
136979
|
{
|
|
136980
|
-
return import("./python-
|
|
136980
|
+
return import("./python-477e1416.js");
|
|
136981
136981
|
}
|
|
136982
136982
|
}
|
|
136983
136983
|
});
|
|
@@ -137026,7 +137026,7 @@ registerLanguage({
|
|
|
137026
137026
|
mimetypes: ["text/x-cshtml"],
|
|
137027
137027
|
loader: () => {
|
|
137028
137028
|
{
|
|
137029
|
-
return import("./razor-
|
|
137029
|
+
return import("./razor-1fe57a2b.js");
|
|
137030
137030
|
}
|
|
137031
137031
|
}
|
|
137032
137032
|
});
|
|
@@ -137362,7 +137362,7 @@ registerLanguage({
|
|
|
137362
137362
|
mimetypes: ["text/typescript"],
|
|
137363
137363
|
loader: () => {
|
|
137364
137364
|
{
|
|
137365
|
-
return import("./typescript-
|
|
137365
|
+
return import("./typescript-db59573b.js");
|
|
137366
137366
|
}
|
|
137367
137367
|
}
|
|
137368
137368
|
});
|
|
@@ -137446,7 +137446,7 @@ registerLanguage({
|
|
|
137446
137446
|
mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
|
|
137447
137447
|
loader: () => {
|
|
137448
137448
|
{
|
|
137449
|
-
return import("./xml-
|
|
137449
|
+
return import("./xml-34916896.js");
|
|
137450
137450
|
}
|
|
137451
137451
|
}
|
|
137452
137452
|
});
|
|
@@ -137463,7 +137463,7 @@ registerLanguage({
|
|
|
137463
137463
|
mimetypes: ["application/x-yaml", "text/x-yaml"],
|
|
137464
137464
|
loader: () => {
|
|
137465
137465
|
{
|
|
137466
|
-
return import("./yaml-
|
|
137466
|
+
return import("./yaml-21c57711.js");
|
|
137467
137467
|
}
|
|
137468
137468
|
}
|
|
137469
137469
|
});
|
|
@@ -137587,7 +137587,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3(
|
|
|
137587
137587
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
137588
137588
|
function getMode$3() {
|
|
137589
137589
|
{
|
|
137590
|
-
return import("./cssMode-
|
|
137590
|
+
return import("./cssMode-91c5028f.js");
|
|
137591
137591
|
}
|
|
137592
137592
|
}
|
|
137593
137593
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -137718,7 +137718,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
137718
137718
|
};
|
|
137719
137719
|
function getMode$2() {
|
|
137720
137720
|
{
|
|
137721
|
-
return import("./htmlMode-
|
|
137721
|
+
return import("./htmlMode-b275349e.js");
|
|
137722
137722
|
}
|
|
137723
137723
|
}
|
|
137724
137724
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -137816,7 +137816,7 @@ var getWorker = () => getMode$1().then((mode) => mode.getWorker());
|
|
|
137816
137816
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults, getWorker };
|
|
137817
137817
|
function getMode$1() {
|
|
137818
137818
|
{
|
|
137819
|
-
return import("./jsonMode-
|
|
137819
|
+
return import("./jsonMode-af4e2a56.js");
|
|
137820
137820
|
}
|
|
137821
137821
|
}
|
|
137822
137822
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -138092,7 +138092,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
138092
138092
|
};
|
|
138093
138093
|
function getMode() {
|
|
138094
138094
|
{
|
|
138095
|
-
return import("./tsMode-
|
|
138095
|
+
return import("./tsMode-41007fbc.js");
|
|
138096
138096
|
}
|
|
138097
138097
|
}
|
|
138098
138098
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -188365,16 +188365,16 @@ function ComponentSaveButton() {
|
|
|
188365
188365
|
}
|
|
188366
188366
|
);
|
|
188367
188367
|
const { slots } = splitSchema((json == null ? void 0 : json.children) || []);
|
|
188368
|
-
const
|
|
188368
|
+
const compileResult = await compileAstroToReact(code || "");
|
|
188369
188369
|
console.log("====>component slots", slots);
|
|
188370
188370
|
await save({
|
|
188371
188371
|
id: component.id,
|
|
188372
|
-
|
|
188373
|
-
|
|
188372
|
+
propsSchema: component.propsSchema,
|
|
188373
|
+
propsTest: component.propsTest,
|
|
188374
188374
|
code,
|
|
188375
188375
|
slots,
|
|
188376
188376
|
droppable: component.droppable,
|
|
188377
|
-
|
|
188377
|
+
compileResult
|
|
188378
188378
|
});
|
|
188379
188379
|
} catch (error) {
|
|
188380
188380
|
addToast({
|
|
@@ -190224,7 +190224,7 @@ const DocCanvas = memo((props) => {
|
|
|
190224
190224
|
const astroVariables = useImportVariables();
|
|
190225
190225
|
const variables = useCalcVariables(
|
|
190226
190226
|
resource == null ? void 0 : resource.frontmatter,
|
|
190227
|
-
editingComponent == null ? void 0 : editingComponent.
|
|
190227
|
+
editingComponent == null ? void 0 : editingComponent.propsTest
|
|
190228
190228
|
);
|
|
190229
190229
|
const allVariables = useMemo(() => {
|
|
190230
190230
|
return {
|
|
@@ -191501,7 +191501,7 @@ function DocumentPreview() {
|
|
|
191501
191501
|
{
|
|
191502
191502
|
resource,
|
|
191503
191503
|
schema: treeSchema,
|
|
191504
|
-
astroProps: editingComponent == null ? void 0 : editingComponent.
|
|
191504
|
+
astroProps: editingComponent == null ? void 0 : editingComponent.propsTest
|
|
191505
191505
|
}
|
|
191506
191506
|
);
|
|
191507
191507
|
}
|
|
@@ -199907,8 +199907,51 @@ function traverseFiles(files, callback, parentPath = "") {
|
|
|
199907
199907
|
}
|
|
199908
199908
|
}
|
|
199909
199909
|
}
|
|
199910
|
+
function CodeSyncModal(props) {
|
|
199911
|
+
const { open, onClose, syncUrl } = props;
|
|
199912
|
+
const handleCopyUrl = async () => {
|
|
199913
|
+
try {
|
|
199914
|
+
await navigator.clipboard.writeText(syncUrl || "");
|
|
199915
|
+
addToast({
|
|
199916
|
+
title: "复制链接成功",
|
|
199917
|
+
color: "success"
|
|
199918
|
+
});
|
|
199919
|
+
onClose();
|
|
199920
|
+
} catch (error) {
|
|
199921
|
+
console.error("复制失败:", error);
|
|
199922
|
+
addToast({
|
|
199923
|
+
title: "复制失败",
|
|
199924
|
+
description: "请检查浏览器权限",
|
|
199925
|
+
color: "danger"
|
|
199926
|
+
});
|
|
199927
|
+
}
|
|
199928
|
+
};
|
|
199929
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Modal$1, { isOpen: open, onClose, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ModalContent$1, { className: "h-64 shadow-lg", width: 500, children: [
|
|
199930
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ModalHeader, { className: "px-4 pr-3 h-14 ", children: [
|
|
199931
|
+
"代码同步链接",
|
|
199932
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ModalClose, {})
|
|
199933
|
+
] }),
|
|
199934
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ModalBody, { className: "flex-1 p-3 border-t border-b border-divider gap-4 flex min-h-0 ", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-default-500 border border-divider rounded-md p-2 w-full", children: syncUrl }) }),
|
|
199935
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ModalFooter, { children: [
|
|
199936
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { onPress: onClose, variant: "flat", children: "关闭" }),
|
|
199937
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
199938
|
+
Button$2,
|
|
199939
|
+
{
|
|
199940
|
+
variant: "solid",
|
|
199941
|
+
className: "ml-2",
|
|
199942
|
+
onPress: handleCopyUrl,
|
|
199943
|
+
title: "复制链接",
|
|
199944
|
+
color: "primary",
|
|
199945
|
+
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(CloneIcon, { className: "size-4" }),
|
|
199946
|
+
children: "复制URL"
|
|
199947
|
+
}
|
|
199948
|
+
)
|
|
199949
|
+
] })
|
|
199950
|
+
] }) });
|
|
199951
|
+
}
|
|
199910
199952
|
function MoreActions$1() {
|
|
199911
199953
|
const [isParentThemeOpen, setIsParentThemeClose] = useState();
|
|
199954
|
+
const [isCodeSyncOpen, setIsCodeSyncOpen] = useState();
|
|
199912
199955
|
const {
|
|
199913
199956
|
isOpen: isStyleConfigOpen,
|
|
199914
199957
|
onOpen: onStyleConfigOpen,
|
|
@@ -199917,6 +199960,7 @@ function MoreActions$1() {
|
|
|
199917
199960
|
const setConfigType = useStudioStore((state) => state.setConfigType);
|
|
199918
199961
|
const theme = useStudioTheme();
|
|
199919
199962
|
const { exportAsZip, isExporting } = useThemeZipExport("theme-" + (theme == null ? void 0 : theme.id));
|
|
199963
|
+
const enfityEndPoint = useEntifyEndpoint();
|
|
199920
199964
|
const {
|
|
199921
199965
|
upload,
|
|
199922
199966
|
isUploading,
|
|
@@ -199925,6 +199969,7 @@ function MoreActions$1() {
|
|
|
199925
199969
|
handleConfirm,
|
|
199926
199970
|
confirmText
|
|
199927
199971
|
} = useImportTheme();
|
|
199972
|
+
const syncUrl = `${enfityEndPoint}$theme-branch$${theme == null ? void 0 : theme.id}`;
|
|
199928
199973
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
199929
199974
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown, { children: [
|
|
199930
199975
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownTrigger, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -200058,6 +200103,15 @@ function MoreActions$1() {
|
|
|
200058
200103
|
children: "创建分支"
|
|
200059
200104
|
},
|
|
200060
200105
|
"create-branch"
|
|
200106
|
+
),
|
|
200107
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
200108
|
+
DropdownItem,
|
|
200109
|
+
{
|
|
200110
|
+
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(CodeSyncIcon, { className: "size-5" }),
|
|
200111
|
+
onPress: () => setIsCodeSyncOpen(true),
|
|
200112
|
+
children: "代码同步"
|
|
200113
|
+
},
|
|
200114
|
+
"sync-code"
|
|
200061
200115
|
)
|
|
200062
200116
|
] })
|
|
200063
200117
|
] }),
|
|
@@ -200085,6 +200139,14 @@ function MoreActions$1() {
|
|
|
200085
200139
|
onConfirm: handleConfirm,
|
|
200086
200140
|
confirm: confirmText
|
|
200087
200141
|
}
|
|
200142
|
+
),
|
|
200143
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
200144
|
+
CodeSyncModal,
|
|
200145
|
+
{
|
|
200146
|
+
open: isCodeSyncOpen,
|
|
200147
|
+
onClose: () => setIsCodeSyncOpen(false),
|
|
200148
|
+
syncUrl
|
|
200149
|
+
}
|
|
200088
200150
|
)
|
|
200089
200151
|
] });
|
|
200090
200152
|
}
|
|
@@ -200630,7 +200692,7 @@ function useRegisterComponent(component) {
|
|
|
200630
200692
|
componentName: component.name,
|
|
200631
200693
|
props: {
|
|
200632
200694
|
//默认属性配置
|
|
200633
|
-
...component.
|
|
200695
|
+
...component.propsTest
|
|
200634
200696
|
},
|
|
200635
200697
|
//默认slots
|
|
200636
200698
|
slots: newSlots,
|
|
@@ -200652,7 +200714,7 @@ function useRegisterComponent(component) {
|
|
|
200652
200714
|
component.id,
|
|
200653
200715
|
component.name,
|
|
200654
200716
|
component.slots,
|
|
200655
|
-
component.
|
|
200717
|
+
component.propsTest,
|
|
200656
200718
|
component.title,
|
|
200657
200719
|
engine
|
|
200658
200720
|
]);
|
|
@@ -202398,13 +202460,13 @@ function ComponentSchemaPanel(props) {
|
|
|
202398
202460
|
function PropsTest(props) {
|
|
202399
202461
|
var _a3;
|
|
202400
202462
|
const { editingComponent, onChangeComponent } = props;
|
|
202401
|
-
const tabs = (_a3 = editingComponent == null ? void 0 : editingComponent.
|
|
202463
|
+
const tabs = (_a3 = editingComponent == null ? void 0 : editingComponent.propsSchema) == null ? void 0 : _a3.tabs;
|
|
202402
202464
|
const handleChange = useCallback(
|
|
202403
202465
|
(value) => {
|
|
202404
202466
|
onChangeComponent({
|
|
202405
202467
|
...editingComponent,
|
|
202406
|
-
|
|
202407
|
-
...editingComponent == null ? void 0 : editingComponent.
|
|
202468
|
+
propsTest: {
|
|
202469
|
+
...editingComponent == null ? void 0 : editingComponent.propsTest,
|
|
202408
202470
|
...value
|
|
202409
202471
|
}
|
|
202410
202472
|
});
|
|
@@ -202414,7 +202476,7 @@ function PropsTest(props) {
|
|
|
202414
202476
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-2 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
202415
202477
|
PropTabs,
|
|
202416
202478
|
{
|
|
202417
|
-
meta: editingComponent == null ? void 0 : editingComponent.
|
|
202479
|
+
meta: editingComponent == null ? void 0 : editingComponent.propsTest,
|
|
202418
202480
|
onMetaChange: handleChange,
|
|
202419
202481
|
propsSchema: tabs
|
|
202420
202482
|
}
|
|
@@ -204001,8 +204063,8 @@ class ImportComponentsTask {
|
|
|
204001
204063
|
title: component.title,
|
|
204002
204064
|
description: component.description,
|
|
204003
204065
|
code: component.code,
|
|
204004
|
-
|
|
204005
|
-
|
|
204066
|
+
propsSchema: component.propsSchema,
|
|
204067
|
+
propsTest: component.propsTest
|
|
204006
204068
|
});
|
|
204007
204069
|
});
|
|
204008
204070
|
this.components = components;
|
|
@@ -204031,8 +204093,8 @@ class ImportComponentsTask {
|
|
|
204031
204093
|
FrontComponentFields.description,
|
|
204032
204094
|
FrontComponentFields.title,
|
|
204033
204095
|
FrontComponentFields.seqValue,
|
|
204034
|
-
FrontComponentFields.
|
|
204035
|
-
FrontComponentFields.
|
|
204096
|
+
FrontComponentFields.propsSchema,
|
|
204097
|
+
FrontComponentFields.propsTest
|
|
204036
204098
|
],
|
|
204037
204099
|
{
|
|
204038
204100
|
where: {
|
|
@@ -204153,8 +204215,8 @@ function ImportComponentModal({
|
|
|
204153
204215
|
FrontComponentFields.name,
|
|
204154
204216
|
FrontComponentFields.title,
|
|
204155
204217
|
FrontComponentFields.code,
|
|
204156
|
-
FrontComponentFields.
|
|
204157
|
-
FrontComponentFields.
|
|
204218
|
+
FrontComponentFields.propsSchema,
|
|
204219
|
+
FrontComponentFields.propsTest,
|
|
204158
204220
|
FrontComponentFields.isInMarket,
|
|
204159
204221
|
FrontComponentFields.isSectionBlock
|
|
204160
204222
|
]).category()
|
|
@@ -204548,540 +204610,8 @@ function ComponentsRootNode(props) {
|
|
|
204548
204610
|
)
|
|
204549
204611
|
] });
|
|
204550
204612
|
}
|
|
204551
|
-
function useRegisterTemplate(template) {
|
|
204552
|
-
const [rxProps, setRxProps] = React__default.useState();
|
|
204553
|
-
const engine = useDesignerEngine();
|
|
204554
|
-
const editingTemplate = useStudioStore((state) => state.editingTemplate);
|
|
204555
|
-
useEffect(() => {
|
|
204556
|
-
if (engine && (editingTemplate == null ? void 0 : editingTemplate.id) !== template.id && template.id) {
|
|
204557
|
-
const code = template.code || "";
|
|
204558
|
-
transformCodeToSchema(code).then((value) => {
|
|
204559
|
-
var _a3;
|
|
204560
|
-
if (!template.id) {
|
|
204561
|
-
return;
|
|
204562
|
-
}
|
|
204563
|
-
engine.getResourceManager().registerResources({
|
|
204564
|
-
name: template.id,
|
|
204565
|
-
title: template.title,
|
|
204566
|
-
elements: (value == null ? void 0 : value.template) || []
|
|
204567
|
-
});
|
|
204568
|
-
const props = (_a3 = engine.getResourceManager().getResourceByName(template.id)) == null ? void 0 : _a3.rxProps;
|
|
204569
|
-
if (props) {
|
|
204570
|
-
setRxProps(props);
|
|
204571
|
-
}
|
|
204572
|
-
});
|
|
204573
|
-
return () => {
|
|
204574
|
-
if (template.id) {
|
|
204575
|
-
engine.getResourceManager().unregisterResources(template.id);
|
|
204576
|
-
}
|
|
204577
|
-
};
|
|
204578
|
-
}
|
|
204579
|
-
}, [engine, template, editingTemplate == null ? void 0 : editingTemplate.id]);
|
|
204580
|
-
return rxProps;
|
|
204581
|
-
}
|
|
204582
|
-
function TemplateNode(props) {
|
|
204583
|
-
const { template, readonly, selectedId, onSelect } = props;
|
|
204584
|
-
const [open, setOpen] = React__default.useState(false);
|
|
204585
|
-
const [remove, { isMutating }] = useRemoveRow();
|
|
204586
|
-
const edit = useEditRow();
|
|
204587
|
-
const rxProps = useRegisterTemplate(template);
|
|
204588
|
-
const handleOpenChange = React__default.useCallback((open2) => {
|
|
204589
|
-
setOpen(open2);
|
|
204590
|
-
}, []);
|
|
204591
|
-
const handleDesign = React__default.useCallback(() => {
|
|
204592
|
-
onSelect == null ? void 0 : onSelect(template.id || null);
|
|
204593
|
-
}, [onSelect, template.id]);
|
|
204594
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204595
|
-
LeafNode,
|
|
204596
|
-
{
|
|
204597
|
-
fiexdAction: open || isMutating,
|
|
204598
|
-
hover: open || isMutating,
|
|
204599
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(TemplateIcon, { className: "size-4" }),
|
|
204600
|
-
className: "text-sm",
|
|
204601
|
-
selected: selectedId === template.id,
|
|
204602
|
-
actions: !readonly && /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown, { onOpenChange: handleOpenChange, children: [
|
|
204603
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownTrigger, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204604
|
-
Button$2,
|
|
204605
|
-
{
|
|
204606
|
-
isLoading: isMutating,
|
|
204607
|
-
isIconOnly: true,
|
|
204608
|
-
variant: "light",
|
|
204609
|
-
size: "sm",
|
|
204610
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204611
|
-
Icon,
|
|
204612
|
-
{
|
|
204613
|
-
icon: "mdi:more-horiz",
|
|
204614
|
-
className: "size-5 text-default-600"
|
|
204615
|
-
}
|
|
204616
|
-
)
|
|
204617
|
-
}
|
|
204618
|
-
) }),
|
|
204619
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu$1, { "aria-label": "Actions", children: [
|
|
204620
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204621
|
-
DropdownItem,
|
|
204622
|
-
{
|
|
204623
|
-
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(DesignIcon, { className: "size-4" }),
|
|
204624
|
-
onPress: handleDesign,
|
|
204625
|
-
children: "设计"
|
|
204626
|
-
},
|
|
204627
|
-
"design"
|
|
204628
|
-
),
|
|
204629
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204630
|
-
DropdownItem,
|
|
204631
|
-
{
|
|
204632
|
-
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, { className: "size-4" }),
|
|
204633
|
-
onPress: edit,
|
|
204634
|
-
children: "编辑"
|
|
204635
|
-
},
|
|
204636
|
-
"edit"
|
|
204637
|
-
),
|
|
204638
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204639
|
-
DropdownItem,
|
|
204640
|
-
{
|
|
204641
|
-
color: "danger",
|
|
204642
|
-
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(RemoveIcon, { className: "size-4" }),
|
|
204643
|
-
onPress: () => remove(),
|
|
204644
|
-
children: "删除"
|
|
204645
|
-
},
|
|
204646
|
-
"remove"
|
|
204647
|
-
)
|
|
204648
|
-
] })
|
|
204649
|
-
] }),
|
|
204650
|
-
...rxProps,
|
|
204651
|
-
children: template.title || ""
|
|
204652
|
-
}
|
|
204653
|
-
);
|
|
204654
|
-
}
|
|
204655
|
-
function TemplateModal(props) {
|
|
204656
|
-
const { themeId, categoryId, noCagegory, onFilter, ...rest } = props;
|
|
204657
|
-
const webSite = useWebsite();
|
|
204658
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204659
|
-
EntityEditModal,
|
|
204660
|
-
{
|
|
204661
|
-
entityName: SectionTemplateEntityName,
|
|
204662
|
-
entityLabel: "区块模板",
|
|
204663
|
-
initialValue: {
|
|
204664
|
-
theme: { id: themeId },
|
|
204665
|
-
category: { id: categoryId }
|
|
204666
|
-
},
|
|
204667
|
-
zIndexCls: "z-[1000]",
|
|
204668
|
-
entityToInput: sectionTemplateToInput,
|
|
204669
|
-
onFilter,
|
|
204670
|
-
...rest,
|
|
204671
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
204672
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204673
|
-
InputField,
|
|
204674
|
-
{
|
|
204675
|
-
autoFocus: true,
|
|
204676
|
-
name: "title",
|
|
204677
|
-
label: "标题",
|
|
204678
|
-
validateSchema: {
|
|
204679
|
-
type: "string",
|
|
204680
|
-
required: true
|
|
204681
|
-
},
|
|
204682
|
-
labelPlacement: "outside",
|
|
204683
|
-
placeholder: "请输入标题"
|
|
204684
|
-
}
|
|
204685
|
-
),
|
|
204686
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204687
|
-
MediaSingleSelectField,
|
|
204688
|
-
{
|
|
204689
|
-
name: SectionTemplateAssciations.cover,
|
|
204690
|
-
label: "缩略图",
|
|
204691
|
-
websiteId: webSite == null ? void 0 : webSite.id,
|
|
204692
|
-
classNames: {
|
|
204693
|
-
label: "text-sm",
|
|
204694
|
-
base: "flex-col gap-1 w-2/3",
|
|
204695
|
-
shower: "aspect-[3/2] w-[600px] h-[400px]"
|
|
204696
|
-
},
|
|
204697
|
-
mediaTypes: [MediaType.image]
|
|
204698
|
-
}
|
|
204699
|
-
),
|
|
204700
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204701
|
-
TextareaField,
|
|
204702
|
-
{
|
|
204703
|
-
name: "description",
|
|
204704
|
-
label: "描述",
|
|
204705
|
-
labelPlacement: "outside",
|
|
204706
|
-
placeholder: "请输入描述"
|
|
204707
|
-
}
|
|
204708
|
-
),
|
|
204709
|
-
!noCagegory && !categoryId && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204710
|
-
EntitySelectField,
|
|
204711
|
-
{
|
|
204712
|
-
name: "category.id",
|
|
204713
|
-
label: "分类",
|
|
204714
|
-
placeholder: "请选择分类",
|
|
204715
|
-
queryOptions: new TemplateCategoryQueryOptions(
|
|
204716
|
-
[TemplateCategoryFields.id, TemplateCategoryFields.name],
|
|
204717
|
-
{
|
|
204718
|
-
where: {
|
|
204719
|
-
theme: {
|
|
204720
|
-
id: {
|
|
204721
|
-
_eq: themeId
|
|
204722
|
-
}
|
|
204723
|
-
}
|
|
204724
|
-
}
|
|
204725
|
-
}
|
|
204726
|
-
)
|
|
204727
|
-
}
|
|
204728
|
-
)
|
|
204729
|
-
] })
|
|
204730
|
-
}
|
|
204731
|
-
);
|
|
204732
|
-
}
|
|
204733
|
-
function TemplateList(props) {
|
|
204734
|
-
var _a3;
|
|
204735
|
-
const {
|
|
204736
|
-
themeId,
|
|
204737
|
-
readonly,
|
|
204738
|
-
list: list2,
|
|
204739
|
-
category,
|
|
204740
|
-
newTemplate,
|
|
204741
|
-
noCagegory,
|
|
204742
|
-
selectedId,
|
|
204743
|
-
onSelect,
|
|
204744
|
-
onClearNewTemplate
|
|
204745
|
-
} = props;
|
|
204746
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
204747
|
-
EntityListScope,
|
|
204748
|
-
{
|
|
204749
|
-
entityName: SectionTemplateEntityName,
|
|
204750
|
-
data: list2,
|
|
204751
|
-
children: [
|
|
204752
|
-
(_a3 = list2 == null ? void 0 : list2.items) == null ? void 0 : _a3.map((item) => {
|
|
204753
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(EntityRowScope, { row: item, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204754
|
-
TemplateNode,
|
|
204755
|
-
{
|
|
204756
|
-
template: item,
|
|
204757
|
-
readonly,
|
|
204758
|
-
selectedId,
|
|
204759
|
-
categoryId: category == null ? void 0 : category.id,
|
|
204760
|
-
onSelect
|
|
204761
|
-
}
|
|
204762
|
-
) }, item.id);
|
|
204763
|
-
}),
|
|
204764
|
-
!readonly && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204765
|
-
TemplateModal,
|
|
204766
|
-
{
|
|
204767
|
-
themeId,
|
|
204768
|
-
value: newTemplate,
|
|
204769
|
-
noCagegory,
|
|
204770
|
-
onClose: onClearNewTemplate,
|
|
204771
|
-
categoryId: category == null ? void 0 : category.id
|
|
204772
|
-
}
|
|
204773
|
-
)
|
|
204774
|
-
]
|
|
204775
|
-
}
|
|
204776
|
-
);
|
|
204777
|
-
}
|
|
204778
|
-
const TemplateCategoryNode = memo(
|
|
204779
|
-
(props) => {
|
|
204780
|
-
var _a3;
|
|
204781
|
-
const { category, themeId, readonly, selectedId, onSelect } = props;
|
|
204782
|
-
const [open, setOpen] = React__default.useState(false);
|
|
204783
|
-
const [remove, { isMutating }] = useRemoveRow({
|
|
204784
|
-
onSuccess: () => {
|
|
204785
|
-
emitEntityChange(SectionTemplateEntityName);
|
|
204786
|
-
}
|
|
204787
|
-
});
|
|
204788
|
-
const [newTemplate, setNewTemplate] = React__default.useState();
|
|
204789
|
-
const edit = useEditRow();
|
|
204790
|
-
const templates = useSectionTemplates();
|
|
204791
|
-
const templatesInCategory = useMemo(
|
|
204792
|
-
() => templates == null ? void 0 : templates.filter(
|
|
204793
|
-
(item) => {
|
|
204794
|
-
var _a4;
|
|
204795
|
-
return ((_a4 = item.category) == null ? void 0 : _a4.id) === category.id;
|
|
204796
|
-
}
|
|
204797
|
-
),
|
|
204798
|
-
[templates, category.id]
|
|
204799
|
-
);
|
|
204800
|
-
const handleOpenChange = React__default.useCallback((open2) => {
|
|
204801
|
-
setOpen(open2);
|
|
204802
|
-
}, []);
|
|
204803
|
-
const handleNewTemplate = React__default.useCallback(() => {
|
|
204804
|
-
setNewTemplate({
|
|
204805
|
-
category: { id: category.id },
|
|
204806
|
-
theme: { id: themeId }
|
|
204807
|
-
});
|
|
204808
|
-
setOpen(false);
|
|
204809
|
-
}, [category.id, themeId]);
|
|
204810
|
-
const handleEdit = React__default.useCallback(() => {
|
|
204811
|
-
edit();
|
|
204812
|
-
setOpen(false);
|
|
204813
|
-
}, [edit]);
|
|
204814
|
-
const data = useMemo(() => {
|
|
204815
|
-
return {
|
|
204816
|
-
items: templatesInCategory
|
|
204817
|
-
};
|
|
204818
|
-
}, [templatesInCategory]);
|
|
204819
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204820
|
-
GroupNode,
|
|
204821
|
-
{
|
|
204822
|
-
title: category.name,
|
|
204823
|
-
fiexdAction: open || isMutating,
|
|
204824
|
-
icon: null,
|
|
204825
|
-
classNames: {
|
|
204826
|
-
title: "text-sm"
|
|
204827
|
-
},
|
|
204828
|
-
defaultExpanded: !!((_a3 = data.items) == null ? void 0 : _a3.find((item) => item.id === selectedId)),
|
|
204829
|
-
action: !readonly && /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown, { onOpenChange: handleOpenChange, children: [
|
|
204830
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownTrigger, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204831
|
-
Button$2,
|
|
204832
|
-
{
|
|
204833
|
-
isLoading: isMutating,
|
|
204834
|
-
isIconOnly: true,
|
|
204835
|
-
variant: "light",
|
|
204836
|
-
size: "sm",
|
|
204837
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204838
|
-
Icon,
|
|
204839
|
-
{
|
|
204840
|
-
icon: "mdi:more-horiz",
|
|
204841
|
-
className: "size-5 text-default-600"
|
|
204842
|
-
}
|
|
204843
|
-
)
|
|
204844
|
-
}
|
|
204845
|
-
) }),
|
|
204846
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu$1, { "aria-label": "Actions", children: [
|
|
204847
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204848
|
-
DropdownItem,
|
|
204849
|
-
{
|
|
204850
|
-
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(AddTemplateIcon, { className: "size-4" }),
|
|
204851
|
-
onPress: handleNewTemplate,
|
|
204852
|
-
children: "添加模板"
|
|
204853
|
-
},
|
|
204854
|
-
"add"
|
|
204855
|
-
),
|
|
204856
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204857
|
-
DropdownItem,
|
|
204858
|
-
{
|
|
204859
|
-
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, { className: "size-4" }),
|
|
204860
|
-
showDivider: true,
|
|
204861
|
-
onPress: handleEdit,
|
|
204862
|
-
children: "编辑"
|
|
204863
|
-
},
|
|
204864
|
-
"edit"
|
|
204865
|
-
),
|
|
204866
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204867
|
-
DropdownItem,
|
|
204868
|
-
{
|
|
204869
|
-
color: "danger",
|
|
204870
|
-
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(RemoveIcon, { className: "size-4" }),
|
|
204871
|
-
onPress: () => remove(),
|
|
204872
|
-
children: "删除"
|
|
204873
|
-
},
|
|
204874
|
-
"remove"
|
|
204875
|
-
)
|
|
204876
|
-
] })
|
|
204877
|
-
] }),
|
|
204878
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204879
|
-
TemplateList,
|
|
204880
|
-
{
|
|
204881
|
-
category,
|
|
204882
|
-
themeId,
|
|
204883
|
-
readonly,
|
|
204884
|
-
list: data,
|
|
204885
|
-
newTemplate,
|
|
204886
|
-
selectedId,
|
|
204887
|
-
onSelect,
|
|
204888
|
-
onClearNewTemplate: () => setNewTemplate(void 0)
|
|
204889
|
-
}
|
|
204890
|
-
)
|
|
204891
|
-
}
|
|
204892
|
-
);
|
|
204893
|
-
}
|
|
204894
|
-
);
|
|
204895
|
-
function TemplateCategoryModal(props) {
|
|
204896
|
-
const { themeId, onClose } = props;
|
|
204897
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204898
|
-
EntityEditModal,
|
|
204899
|
-
{
|
|
204900
|
-
entityName: TemplateCategoryEntityName,
|
|
204901
|
-
entityLabel: "模板分类",
|
|
204902
|
-
initialValue: {
|
|
204903
|
-
theme: { id: themeId }
|
|
204904
|
-
},
|
|
204905
|
-
entityToInput: templateCategoryToInput,
|
|
204906
|
-
onClose,
|
|
204907
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
204908
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204909
|
-
InputField,
|
|
204910
|
-
{
|
|
204911
|
-
name: "name",
|
|
204912
|
-
label: "名称",
|
|
204913
|
-
validateSchema: {
|
|
204914
|
-
type: "string",
|
|
204915
|
-
required: true
|
|
204916
|
-
},
|
|
204917
|
-
labelPlacement: "outside",
|
|
204918
|
-
placeholder: "请输入名称"
|
|
204919
|
-
}
|
|
204920
|
-
),
|
|
204921
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204922
|
-
InputField,
|
|
204923
|
-
{
|
|
204924
|
-
name: "seqValue",
|
|
204925
|
-
label: "顺序",
|
|
204926
|
-
type: "number",
|
|
204927
|
-
labelPlacement: "outside",
|
|
204928
|
-
placeholder: "请输入顺序"
|
|
204929
|
-
}
|
|
204930
|
-
)
|
|
204931
|
-
] })
|
|
204932
|
-
}
|
|
204933
|
-
);
|
|
204934
|
-
}
|
|
204935
|
-
function TemplateCategoryList(props) {
|
|
204936
|
-
var _a3;
|
|
204937
|
-
const { readonly, selectedId, onSelect } = props;
|
|
204938
|
-
const data = useListData();
|
|
204939
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (_a3 = data == null ? void 0 : data.items) == null ? void 0 : _a3.map((item) => {
|
|
204940
|
-
var _a4, _b3;
|
|
204941
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(EntityRowScope, { row: item, children: ((_a4 = item.theme) == null ? void 0 : _a4.id) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
204942
|
-
TemplateCategoryNode,
|
|
204943
|
-
{
|
|
204944
|
-
category: item,
|
|
204945
|
-
themeId: (_b3 = item.theme) == null ? void 0 : _b3.id,
|
|
204946
|
-
readonly,
|
|
204947
|
-
selectedId,
|
|
204948
|
-
onSelect: (id) => onSelect == null ? void 0 : onSelect(id, [item.name || ""])
|
|
204949
|
-
}
|
|
204950
|
-
) }, item.id);
|
|
204951
|
-
}) });
|
|
204952
|
-
}
|
|
204953
|
-
function TemplatesRootNode(props) {
|
|
204954
|
-
const { themeId, readonly, selectedContent, onSelectContent } = props;
|
|
204955
|
-
const [open, setOpen] = React__default.useState(false);
|
|
204956
|
-
const [newTemplate, setNewTemplate] = React__default.useState();
|
|
204957
|
-
const setEditingPage = useStudioStore((state) => state.setEditingPage);
|
|
204958
|
-
const setEditingTemplate = useStudioStore(
|
|
204959
|
-
(state) => state.setEditingTemplate
|
|
204960
|
-
);
|
|
204961
|
-
const handleNewCagegory = useNewRow();
|
|
204962
|
-
const templates = useSectionTemplates();
|
|
204963
|
-
const templatesNoCategory = useMemo(
|
|
204964
|
-
() => templates == null ? void 0 : templates.filter((item) => {
|
|
204965
|
-
var _a3;
|
|
204966
|
-
return !((_a3 = item.category) == null ? void 0 : _a3.id);
|
|
204967
|
-
}),
|
|
204968
|
-
[templates]
|
|
204969
|
-
);
|
|
204970
|
-
const handleNewTemplate = React__default.useCallback(() => {
|
|
204971
|
-
setNewTemplate({
|
|
204972
|
-
theme: { id: themeId }
|
|
204973
|
-
});
|
|
204974
|
-
}, [themeId]);
|
|
204975
|
-
const handleOpenChange = React__default.useCallback((open2) => {
|
|
204976
|
-
setOpen(open2);
|
|
204977
|
-
}, []);
|
|
204978
|
-
const data = useMemo(() => {
|
|
204979
|
-
return {
|
|
204980
|
-
items: templatesNoCategory
|
|
204981
|
-
};
|
|
204982
|
-
}, [templatesNoCategory]);
|
|
204983
|
-
const handleSelect = React__default.useCallback(
|
|
204984
|
-
(id, breadcrumbs) => {
|
|
204985
|
-
setEditingPage(void 0);
|
|
204986
|
-
const template = templates == null ? void 0 : templates.find((item) => item.id === id);
|
|
204987
|
-
setEditingTemplate(template);
|
|
204988
|
-
if (id) {
|
|
204989
|
-
onSelectContent == null ? void 0 : onSelectContent({
|
|
204990
|
-
type: ContentType.Template,
|
|
204991
|
-
id,
|
|
204992
|
-
breadcrumbs: [
|
|
204993
|
-
"区块模板",
|
|
204994
|
-
...breadcrumbs || [],
|
|
204995
|
-
(template == null ? void 0 : template.title) || ""
|
|
204996
|
-
]
|
|
204997
|
-
});
|
|
204998
|
-
}
|
|
204999
|
-
},
|
|
205000
|
-
[setEditingPage, templates, setEditingTemplate, onSelectContent]
|
|
205001
|
-
);
|
|
205002
|
-
if (!themeId) {
|
|
205003
|
-
return null;
|
|
205004
|
-
}
|
|
205005
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
205006
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
205007
|
-
GroupNode,
|
|
205008
|
-
{
|
|
205009
|
-
title: "区块模板",
|
|
205010
|
-
fiexdAction: open,
|
|
205011
|
-
icon: null,
|
|
205012
|
-
classNames: {
|
|
205013
|
-
title: "text-sm font-semibold"
|
|
205014
|
-
},
|
|
205015
|
-
defaultExpanded: (selectedContent == null ? void 0 : selectedContent.type) === ContentType.Template,
|
|
205016
|
-
action: /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown, { onOpenChange: handleOpenChange, children: [
|
|
205017
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownTrigger, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { size: "sm", variant: "light", isIconOnly: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205018
|
-
Icon,
|
|
205019
|
-
{
|
|
205020
|
-
icon: "mdi:more-horiz",
|
|
205021
|
-
className: "size-5 text-default-600"
|
|
205022
|
-
}
|
|
205023
|
-
) }) }),
|
|
205024
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu$1, { "aria-label": "区块模板菜单", children: [
|
|
205025
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205026
|
-
DropdownItem,
|
|
205027
|
-
{
|
|
205028
|
-
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(AddFolderIcon, { className: "size-4" }),
|
|
205029
|
-
onPress: () => handleNewCagegory(),
|
|
205030
|
-
children: "添加分类"
|
|
205031
|
-
},
|
|
205032
|
-
"add-category"
|
|
205033
|
-
),
|
|
205034
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205035
|
-
DropdownItem,
|
|
205036
|
-
{
|
|
205037
|
-
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(AddTemplateIcon, { className: "size-4" }),
|
|
205038
|
-
onPress: handleNewTemplate,
|
|
205039
|
-
children: "添加模板"
|
|
205040
|
-
},
|
|
205041
|
-
"add-template"
|
|
205042
|
-
)
|
|
205043
|
-
] })
|
|
205044
|
-
] }),
|
|
205045
|
-
children: [
|
|
205046
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205047
|
-
TemplateCategoryList,
|
|
205048
|
-
{
|
|
205049
|
-
selectedId: selectedContent == null ? void 0 : selectedContent.id,
|
|
205050
|
-
onSelect: handleSelect
|
|
205051
|
-
}
|
|
205052
|
-
),
|
|
205053
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205054
|
-
TemplateList,
|
|
205055
|
-
{
|
|
205056
|
-
themeId,
|
|
205057
|
-
readonly,
|
|
205058
|
-
list: data,
|
|
205059
|
-
newTemplate,
|
|
205060
|
-
selectedId: selectedContent == null ? void 0 : selectedContent.id,
|
|
205061
|
-
onSelect: handleSelect,
|
|
205062
|
-
onClearNewTemplate: () => setNewTemplate(void 0)
|
|
205063
|
-
}
|
|
205064
|
-
)
|
|
205065
|
-
]
|
|
205066
|
-
}
|
|
205067
|
-
),
|
|
205068
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TemplateCategoryModal, { themeId })
|
|
205069
|
-
] });
|
|
205070
|
-
}
|
|
205071
|
-
function TemplateCategoryListScope(props) {
|
|
205072
|
-
const { children } = props;
|
|
205073
|
-
const templateCategories = useTemplateCategories();
|
|
205074
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205075
|
-
EntityListScope,
|
|
205076
|
-
{
|
|
205077
|
-
data: templateCategories,
|
|
205078
|
-
entityName: TemplateCategoryEntityName,
|
|
205079
|
-
children
|
|
205080
|
-
}
|
|
205081
|
-
);
|
|
205082
|
-
}
|
|
205083
204613
|
function ComponentsPanel(props) {
|
|
205084
|
-
const { hidden
|
|
204614
|
+
const { hidden } = props;
|
|
205085
204615
|
const setDrawerType = useStudioStore((state) => state.setDrawerType);
|
|
205086
204616
|
const theme = useStudioTheme();
|
|
205087
204617
|
const selectedContent = useStudioStore((state) => state.selectedContent);
|
|
@@ -205096,14 +204626,6 @@ function ComponentsPanel(props) {
|
|
|
205096
204626
|
[setDrawerType, setWillSelectedContent]
|
|
205097
204627
|
);
|
|
205098
204628
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("flex-col", hidden ? "hidden" : "flex"), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TreeView, { children: [
|
|
205099
|
-
isTheme && /* @__PURE__ */ jsxRuntimeExports.jsx(TemplateCategoryListScope, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205100
|
-
TemplatesRootNode,
|
|
205101
|
-
{
|
|
205102
|
-
themeId: theme == null ? void 0 : theme.id,
|
|
205103
|
-
selectedContent,
|
|
205104
|
-
onSelectContent: handleSelection
|
|
205105
|
-
}
|
|
205106
|
-
) }),
|
|
205107
204629
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ComponentCategoryListScope, { isSectionBlock: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205108
204630
|
ComponentsRootNode,
|
|
205109
204631
|
{
|
|
@@ -205417,6 +204939,7 @@ function DownloadCodeModal(props) {
|
|
|
205417
204939
|
}
|
|
205418
204940
|
function MoreActions() {
|
|
205419
204941
|
var _a3;
|
|
204942
|
+
const [isCodeSyncOpen, setIsCodeSyncOpen] = useState();
|
|
205420
204943
|
const [isDownloadOpen, setIsDownloadOpen] = useState(false);
|
|
205421
204944
|
const [parentThemeOpen, setParentThemeOpen] = useState(false);
|
|
205422
204945
|
const [styleConfigOpen, setStyleConfigOpen] = useState(false);
|
|
@@ -205424,6 +204947,7 @@ function MoreActions() {
|
|
|
205424
204947
|
const isBaseLangTheme = useIsBaseLangTheme();
|
|
205425
204948
|
const theme = useStudioTheme();
|
|
205426
204949
|
const website = useWebsite();
|
|
204950
|
+
const enfityEndPoint = useEntifyEndpoint();
|
|
205427
204951
|
const { exportAsZip, isExporting } = useThemeZipExport(
|
|
205428
204952
|
`website-${website == null ? void 0 : website.name}-` + ((_a3 = theme == null ? void 0 : theme.lang) == null ? void 0 : _a3.abbr)
|
|
205429
204953
|
);
|
|
@@ -205435,6 +204959,7 @@ function MoreActions() {
|
|
|
205435
204959
|
handleConfirm,
|
|
205436
204960
|
confirmText
|
|
205437
204961
|
} = useImportTheme();
|
|
204962
|
+
const syncUrl = `${enfityEndPoint}$website$${website == null ? void 0 : website.id}`;
|
|
205438
204963
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
205439
204964
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown, { children: [
|
|
205440
204965
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownTrigger, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -205591,6 +205116,15 @@ function MoreActions() {
|
|
|
205591
205116
|
children: "网站导入"
|
|
205592
205117
|
},
|
|
205593
205118
|
"import-website"
|
|
205119
|
+
),
|
|
205120
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205121
|
+
DropdownItem,
|
|
205122
|
+
{
|
|
205123
|
+
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(CodeSyncIcon, { className: "size-5" }),
|
|
205124
|
+
onPress: () => setIsCodeSyncOpen(true),
|
|
205125
|
+
children: "代码同步"
|
|
205126
|
+
},
|
|
205127
|
+
"sync-code"
|
|
205594
205128
|
)
|
|
205595
205129
|
]
|
|
205596
205130
|
}
|
|
@@ -205627,6 +205161,14 @@ function MoreActions() {
|
|
|
205627
205161
|
isOpen: isDownloadOpen,
|
|
205628
205162
|
onClose: () => setIsDownloadOpen(false)
|
|
205629
205163
|
}
|
|
205164
|
+
),
|
|
205165
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
205166
|
+
CodeSyncModal,
|
|
205167
|
+
{
|
|
205168
|
+
open: isCodeSyncOpen,
|
|
205169
|
+
onClose: () => setIsCodeSyncOpen(false),
|
|
205170
|
+
syncUrl
|
|
205171
|
+
}
|
|
205630
205172
|
)
|
|
205631
205173
|
] });
|
|
205632
205174
|
}
|
|
@@ -205967,4 +205509,4 @@ export {
|
|
|
205967
205509
|
typescriptDefaults as t,
|
|
205968
205510
|
useCustomizedMaterials as u
|
|
205969
205511
|
};
|
|
205970
|
-
//# sourceMappingURL=index-
|
|
205512
|
+
//# sourceMappingURL=index-00576497.js.map
|