@rxdrag/website-studio 0.0.38 → 0.0.39
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/backup/useExportTheme.d.ts +0 -4
- package/dist/components/ConfigDrawer/DeployConfigPanel/DeploySettings.d.ts +1 -0
- package/dist/components/ConfigDrawer/DeployConfigPanel/index.d.ts +3 -0
- package/dist/components/ConfigDrawer/types.d.ts +2 -1
- package/dist/components/StudioRoot/contexts.d.ts +0 -2
- package/dist/components/WebsiteDesigner/Toolbar/DownloadCodeModal.d.ts +6 -0
- package/dist/{cssMode-9d59bb7b.js → cssMode-f2090bd3.js} +3 -2
- package/dist/{cssMode-9d59bb7b.js.map → cssMode-f2090bd3.js.map} +1 -1
- package/dist/{freemarker2-90a46d02.js → freemarker2-8ad8aeb1.js} +3 -2
- package/dist/{freemarker2-90a46d02.js.map → freemarker2-8ad8aeb1.js.map} +1 -1
- package/dist/{handlebars-30a5598d.js → handlebars-22c22910.js} +3 -2
- package/dist/{handlebars-30a5598d.js.map → handlebars-22c22910.js.map} +1 -1
- package/dist/{html-4d445396.js → html-60ec2af9.js} +3 -2
- package/dist/{html-4d445396.js.map → html-60ec2af9.js.map} +1 -1
- package/dist/{htmlMode-ea12bb68.js → htmlMode-c8640f90.js} +3 -2
- package/dist/{htmlMode-ea12bb68.js.map → htmlMode-c8640f90.js.map} +1 -1
- package/dist/{index-0fa107c4.js → index-0841cd20.js} +292 -76
- package/dist/{index-0fa107c4.js.map → index-0841cd20.js.map} +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{javascript-b4eb4c88.js → javascript-0c8adee5.js} +4 -3
- package/dist/{javascript-b4eb4c88.js.map → javascript-0c8adee5.js.map} +1 -1
- package/dist/{jsonMode-a59da8ed.js → jsonMode-8ad9852a.js} +3 -2
- package/dist/{jsonMode-a59da8ed.js.map → jsonMode-8ad9852a.js.map} +1 -1
- package/dist/{liquid-0d0b67e6.js → liquid-acc1cf0e.js} +3 -2
- package/dist/{liquid-0d0b67e6.js.map → liquid-acc1cf0e.js.map} +1 -1
- package/dist/{mdx-0ab7eeab.js → mdx-85dd6b94.js} +3 -2
- package/dist/{mdx-0ab7eeab.js.map → mdx-85dd6b94.js.map} +1 -1
- package/dist/{python-72d25c72.js → python-48d1977e.js} +3 -2
- package/dist/{python-72d25c72.js.map → python-48d1977e.js.map} +1 -1
- package/dist/{razor-a884d84f.js → razor-22507fac.js} +3 -2
- package/dist/{razor-a884d84f.js.map → razor-22507fac.js.map} +1 -1
- package/dist/{tsMode-0f746593.js → tsMode-324fb60b.js} +3 -2
- package/dist/{tsMode-0f746593.js.map → tsMode-324fb60b.js.map} +1 -1
- package/dist/{typescript-b1fb2468.js → typescript-5f93813d.js} +3 -2
- package/dist/{typescript-b1fb2468.js.map → typescript-5f93813d.js.map} +1 -1
- package/dist/{xml-1abe5033.js → xml-bda370ff.js} +3 -2
- package/dist/{xml-1abe5033.js.map → xml-bda370ff.js.map} +1 -1
- package/dist/{yaml-f40dd63b.js → yaml-5915841b.js} +3 -2
- package/dist/{yaml-f40dd63b.js.map → yaml-5915841b.js.map} +1 -1
- package/package.json +18 -17
|
@@ -7,10 +7,10 @@ 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, useContext, useMemo, memo, useEffect, useCallback, useState, useRef, forwardRef as forwardRef$2, Component, useImperativeHandle, isValidElement, cloneElement } from "react";
|
|
10
|
-
import { ThemeFields, PageQueryOptions, PageFields, FrontComponentQueryOptions, FrontComponentFields, ComponentCategoryFields, SectionTemplateQueryOptions, SectionTemplateFields, ComponentCategoryQueryOptions, TemplateCategoryQueryOptions, TemplateCategoryFields, ThemeQueryOptions, StyleConfigFields, LangFields, ThemeConfigQueryOptions, ThemeConfigFields, PageAssciations, PageType, ProductCategoryEntityName, ProductCategoryQueryOptions, ProductCategoryFields, ProductQueryOptions, ProductFields, PublishableStatus, websiteToInput, LangQueryOptions, WebsiteAssciations, ExtendFieldType, ThemeConfigAssciations, MediaQueryOptions, themeConfigToInputCascade, ThemeConfigEntityName, MediaType, themeConfigToInput, PageEntityName, ThemeEntityName, themeToInputCascade, ThemeCategoryFields, themeToInput, frontComponentToInput, sectionTemplateToInput, pageToInputCascade, ComponentCategoryEntityName, SectionTemplateEntityName, FrontComponentEntityName, PageMetaFields, pageToInput, PageMetaAssciations, componentCategoryToInput, TemplateCategoryEntityName, templateCategoryToInput } from "@rxdrag/rxcms-models";
|
|
10
|
+
import { ThemeFields, PageQueryOptions, PageFields, FrontComponentQueryOptions, FrontComponentFields, ComponentCategoryFields, SectionTemplateQueryOptions, SectionTemplateFields, ComponentCategoryQueryOptions, TemplateCategoryQueryOptions, TemplateCategoryFields, ThemeQueryOptions, StyleConfigFields, LangFields, ThemeConfigQueryOptions, ThemeConfigFields, PageAssciations, PageType, ProductCategoryEntityName, ProductCategoryQueryOptions, ProductCategoryFields, ProductQueryOptions, ProductFields, PublishableStatus, websiteToInput, LangQueryOptions, WebsiteAssciations, ExtendFieldType, ThemeConfigAssciations, MediaQueryOptions, WebsiteSettingsQueryOptions, WebsiteSettingsFields, themeConfigToInputCascade, ThemeConfigEntityName, MediaType, themeConfigToInput, websiteSettingsToInput, WebsiteSettingsEntityName, WebsiteSettingsAssciations, PageEntityName, ThemeEntityName, themeToInputCascade, ThemeCategoryFields, themeToInput, frontComponentToInput, sectionTemplateToInput, pageToInputCascade, ComponentCategoryEntityName, SectionTemplateEntityName, FrontComponentEntityName, PageMetaFields, pageToInput, PageMetaAssciations, componentCategoryToInput, TemplateCategoryEntityName, templateCategoryToInput } from "@rxdrag/rxcms-models";
|
|
11
11
|
import { GlobalLoading, EntityForm, SubmitButton, useListData, SearchInput, EntityPagination, useIsLoading, QueryListScope, useRemoveRow, useEditRow, EntityEditModal, useSelectionsState, EntityTable, EntityListScope, NewButton, EntityRowScope, EntitySelectField, useNewRow } from "@rxdrag/rxcms-models-ui";
|
|
12
|
-
import { useOneTheme, usePageList, useTemplateCategoryList, useSectionTemplateList, useComponentCategoryList, useFrontComponentList, useOneThemeById, useUpsertOneWebsite, useDeleteThemeById, useUpsertOneTheme, useLangList, useOneThemeConfig, useUpsertOneThemeConfig, useUpsertOnePage, useUpsertOneFrontComponent, useUpsertOneSectionTemplate, useDeletePageById } from "@rxdrag/rxcms-model-hooks";
|
|
13
|
-
import { newPageMetaOptions, useWebsite, useCurrentLang, ComponentType, currentLangState, useCurrentLangId, MediaSingleSelectField, FullImageSelectField, LangSelect, TitleAndSlug, TitleViewField, DescriptionViewField, SiteRoot } from "@rxdrag/biz-components";
|
|
12
|
+
import { useOneTheme, usePageList, useTemplateCategoryList, useSectionTemplateList, useComponentCategoryList, useFrontComponentList, useOneThemeById, useUpsertOneWebsite, useDeleteThemeById, useUpsertOneTheme, useLangList, useOneWebsiteSettings, useOneThemeConfig, useUpsertOneThemeConfig, useUpsertOneWebsiteSettings, useUpsertOnePage, useUpsertOneFrontComponent, useUpsertOneSectionTemplate, useDeletePageById } from "@rxdrag/rxcms-model-hooks";
|
|
13
|
+
import { newPageMetaOptions, useWebsite, useCurrentLang, ComponentType, currentLangState, useCurrentLangId, MediaSingleSelectField, FullImageSelectField, useSiteId, usePreviewUrl, LangSelect, TitleAndSlug, TitleViewField, DescriptionViewField, SiteRoot } from "@rxdrag/biz-components";
|
|
14
14
|
import { parseExpressionValue, isExpression, extractVariables, compileCode, AsyncFunction, transformCodeToSchema, transformSchemaToCode } from "@rxdrag/astro-compiler";
|
|
15
15
|
import { CommentNodeName, TextNodeName, CharNodeName } from "@rxdrag/schema-pro";
|
|
16
16
|
import { useDesignerEngine, useComponentManager, useTreeNode, useComponentDesigner, usePlaceHolder, DefaultPlaceHolder, useBehavior, NodeContext, DocumentContext, useNode, Designer, useUndo, useRedo, useCurrentNode, useNodeMeta, useChangeNodeMeta, useSetters, useDocument, useDocumentChangedState, useActiveIdState, useSelect, useGetNode, useActions, useCurrentTree, useSelectedNodeIds, useResourceNode, DocumentRoot } from "@rxdrag/react-core-pro";
|
|
@@ -18,24 +18,25 @@ import { NodeMountedEvent, RXID_ATTR_NAME, HistoryableActionType, IFrameCanvasIm
|
|
|
18
18
|
import { useVariables, useExecuteExpression, VariableProvider, expressionAndName, expressionTernaryName, expressionLoopName, useViewKey, createSchema, ENTIFY_SERVER_URL, staticMaterials, ViewKeyProvider, slotContentName, expressionName } from "@rxdrag/website-materials";
|
|
19
19
|
import { isHTMLElement as isHTMLElement$1, isStr } from "@rxdrag/shared";
|
|
20
20
|
import { isFunction as isFunction$2, debounce, keys, uniqueId } from "lodash-es";
|
|
21
|
-
import { useEntifyEndpoint, useEntifyToken, useLazyQueryEntityList, useLazyQueryOneEntity, useCreateEntityClient, emitEntityChange
|
|
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, 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, 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";
|
|
27
|
-
import { Switch, Card, CardBody, Button as Button$2, CircularProgress, CardHeader, Select, SelectItem, Dropdown, DropdownTrigger, DropdownMenu as DropdownMenu$1, DropdownItem, Accordion, AccordionItem, Input as Input$1, Tabs, Tab, Divider, cn, Checkbox, Chip, Skeleton, CardFooter, Image, useDisclosure, Popover, PopoverTrigger, PopoverContent } from "@heroui/react";
|
|
27
|
+
import { Switch, Card, CardBody, Button as Button$2, CircularProgress, CardHeader, Select, SelectItem, Dropdown, DropdownTrigger, DropdownMenu as DropdownMenu$1, DropdownItem, Accordion, AccordionItem, Input as Input$1, 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, RadioGroup, ModalFooter as ModalFooter$1, Radio, Popover, PopoverTrigger, PopoverContent } from "@heroui/react";
|
|
28
28
|
import { useEntifyWrapperStore, useUpsertEntityWithIndicator } from "@rxdrag/rxcms-entify-wrapper";
|
|
29
29
|
import JSZip from "jszip";
|
|
30
30
|
import { create as create$4 } from "zustand";
|
|
31
31
|
import { Icon } from "@iconify/react";
|
|
32
32
|
import { useInprogressTaskByKey, useUpdateTask, taskPool, TranslateThemeTask, TaskManager, ResetPageTask, ImportPagesTask, ImportComponentsTask } from "@rxdrag/ai-tasks";
|
|
33
33
|
import { useAiUrl, useAiAgent, AiWidget, AiAgentRoot } from "@rxdrag/ai-agent";
|
|
34
|
-
import { InputField, TextareaField, toField, ColorField, Form } from "@rxdrag/fieldy-heroui";
|
|
34
|
+
import { InputField, TextareaField, toField, ColorField, SwitchField, SelectField, PasswordField, Form } from "@rxdrag/fieldy-heroui";
|
|
35
35
|
import { ObjectField, useFormValue, useForm, VirtualForm } from "@rxdrag/react-fieldy-pro";
|
|
36
36
|
import "react-colorful";
|
|
37
37
|
import { motion, AnimatePresence, LazyMotion, m } from "framer-motion";
|
|
38
38
|
import $4AOtR$reactdom, { createPortal } from "react-dom";
|
|
39
|
+
import { DeployType, useExportWebsite as useExportWebsite$1 } from "@rxdrag/code-generator";
|
|
39
40
|
import { ComponentRender } from "@rxdrag/react-runner-pro";
|
|
40
41
|
import tinycolor from "tinycolor2";
|
|
41
42
|
var jsxRuntime = { exports: {} };
|
|
@@ -6477,6 +6478,7 @@ var ThemeConfigType = /* @__PURE__ */ ((ThemeConfigType2) => {
|
|
|
6477
6478
|
ThemeConfigType2["Fonts"] = "fonts";
|
|
6478
6479
|
ThemeConfigType2["Favicon"] = "favicon";
|
|
6479
6480
|
ThemeConfigType2["Redirects"] = "redirects";
|
|
6481
|
+
ThemeConfigType2["DeployConfig"] = "deployConfig";
|
|
6480
6482
|
return ThemeConfigType2;
|
|
6481
6483
|
})(ThemeConfigType || {});
|
|
6482
6484
|
function LangCard(props) {
|
|
@@ -7298,7 +7300,8 @@ function newThemeConfigOptions(theme) {
|
|
|
7298
7300
|
ThemeConfigFields.mobile,
|
|
7299
7301
|
ThemeConfigFields.wechat,
|
|
7300
7302
|
ThemeConfigFields.websiteTitle,
|
|
7301
|
-
ThemeConfigFields.domain
|
|
7303
|
+
ThemeConfigFields.domain,
|
|
7304
|
+
ThemeConfigFields.previewUrl
|
|
7302
7305
|
],
|
|
7303
7306
|
{
|
|
7304
7307
|
where: {
|
|
@@ -7338,6 +7341,20 @@ function WebsiteInfoPanel(props) {
|
|
|
7338
7341
|
const theme = useStudioTheme();
|
|
7339
7342
|
const website = useWebsite();
|
|
7340
7343
|
const websiteId = website == null ? void 0 : website.id;
|
|
7344
|
+
const { data: websiteSettings } = useOneWebsiteSettings(
|
|
7345
|
+
new WebsiteSettingsQueryOptions(
|
|
7346
|
+
[WebsiteSettingsFields.id, WebsiteSettingsFields.privateDeploy],
|
|
7347
|
+
{
|
|
7348
|
+
where: {
|
|
7349
|
+
website: {
|
|
7350
|
+
id: {
|
|
7351
|
+
_eq: websiteId
|
|
7352
|
+
}
|
|
7353
|
+
}
|
|
7354
|
+
}
|
|
7355
|
+
}
|
|
7356
|
+
)
|
|
7357
|
+
);
|
|
7341
7358
|
const { data: themeConfig2 } = useOneThemeConfig(newThemeConfigOptions(theme));
|
|
7342
7359
|
const [save, { isMutating }] = useUpsertOneThemeConfig({
|
|
7343
7360
|
onSuccess
|
|
@@ -7376,6 +7393,16 @@ function WebsiteInfoPanel(props) {
|
|
|
7376
7393
|
description: "包含二级域名,不含http(s)://"
|
|
7377
7394
|
}
|
|
7378
7395
|
),
|
|
7396
|
+
(websiteSettings == null ? void 0 : websiteSettings.privateDeploy) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7397
|
+
InputField,
|
|
7398
|
+
{
|
|
7399
|
+
name: ThemeConfigFields.previewUrl,
|
|
7400
|
+
label: "预览地址",
|
|
7401
|
+
labelPlacement: "outside",
|
|
7402
|
+
placeholder: "请输入预览地址",
|
|
7403
|
+
description: "私有化部署时使用,不填不能预览网站"
|
|
7404
|
+
}
|
|
7405
|
+
),
|
|
7379
7406
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7380
7407
|
InputField,
|
|
7381
7408
|
{
|
|
@@ -138145,7 +138172,7 @@ registerLanguage({
|
|
|
138145
138172
|
aliases: ["FreeMarker2", "Apache FreeMarker2"],
|
|
138146
138173
|
loader: () => {
|
|
138147
138174
|
{
|
|
138148
|
-
return import("./freemarker2-
|
|
138175
|
+
return import("./freemarker2-8ad8aeb1.js").then((m2) => m2.TagAutoInterpolationDollar);
|
|
138149
138176
|
}
|
|
138150
138177
|
}
|
|
138151
138178
|
});
|
|
@@ -138154,7 +138181,7 @@ registerLanguage({
|
|
|
138154
138181
|
aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
|
|
138155
138182
|
loader: () => {
|
|
138156
138183
|
{
|
|
138157
|
-
return import("./freemarker2-
|
|
138184
|
+
return import("./freemarker2-8ad8aeb1.js").then((m2) => m2.TagAngleInterpolationDollar);
|
|
138158
138185
|
}
|
|
138159
138186
|
}
|
|
138160
138187
|
});
|
|
@@ -138163,7 +138190,7 @@ registerLanguage({
|
|
|
138163
138190
|
aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
|
|
138164
138191
|
loader: () => {
|
|
138165
138192
|
{
|
|
138166
|
-
return import("./freemarker2-
|
|
138193
|
+
return import("./freemarker2-8ad8aeb1.js").then((m2) => m2.TagBracketInterpolationDollar);
|
|
138167
138194
|
}
|
|
138168
138195
|
}
|
|
138169
138196
|
});
|
|
@@ -138172,7 +138199,7 @@ registerLanguage({
|
|
|
138172
138199
|
aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
|
|
138173
138200
|
loader: () => {
|
|
138174
138201
|
{
|
|
138175
|
-
return import("./freemarker2-
|
|
138202
|
+
return import("./freemarker2-8ad8aeb1.js").then((m2) => m2.TagAngleInterpolationBracket);
|
|
138176
138203
|
}
|
|
138177
138204
|
}
|
|
138178
138205
|
});
|
|
@@ -138181,7 +138208,7 @@ registerLanguage({
|
|
|
138181
138208
|
aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
|
|
138182
138209
|
loader: () => {
|
|
138183
138210
|
{
|
|
138184
|
-
return import("./freemarker2-
|
|
138211
|
+
return import("./freemarker2-8ad8aeb1.js").then((m2) => m2.TagBracketInterpolationBracket);
|
|
138185
138212
|
}
|
|
138186
138213
|
}
|
|
138187
138214
|
});
|
|
@@ -138190,7 +138217,7 @@ registerLanguage({
|
|
|
138190
138217
|
aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
|
|
138191
138218
|
loader: () => {
|
|
138192
138219
|
{
|
|
138193
|
-
return import("./freemarker2-
|
|
138220
|
+
return import("./freemarker2-8ad8aeb1.js").then((m2) => m2.TagAutoInterpolationDollar);
|
|
138194
138221
|
}
|
|
138195
138222
|
}
|
|
138196
138223
|
});
|
|
@@ -138199,7 +138226,7 @@ registerLanguage({
|
|
|
138199
138226
|
aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
|
|
138200
138227
|
loader: () => {
|
|
138201
138228
|
{
|
|
138202
|
-
return import("./freemarker2-
|
|
138229
|
+
return import("./freemarker2-8ad8aeb1.js").then((m2) => m2.TagAutoInterpolationBracket);
|
|
138203
138230
|
}
|
|
138204
138231
|
}
|
|
138205
138232
|
});
|
|
@@ -138249,7 +138276,7 @@ registerLanguage({
|
|
|
138249
138276
|
mimetypes: ["text/x-handlebars-template"],
|
|
138250
138277
|
loader: () => {
|
|
138251
138278
|
{
|
|
138252
|
-
return import("./handlebars-
|
|
138279
|
+
return import("./handlebars-22c22910.js");
|
|
138253
138280
|
}
|
|
138254
138281
|
}
|
|
138255
138282
|
});
|
|
@@ -138282,7 +138309,7 @@ registerLanguage({
|
|
|
138282
138309
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
138283
138310
|
loader: () => {
|
|
138284
138311
|
{
|
|
138285
|
-
return import("./html-
|
|
138312
|
+
return import("./html-60ec2af9.js");
|
|
138286
138313
|
}
|
|
138287
138314
|
}
|
|
138288
138315
|
});
|
|
@@ -138335,7 +138362,7 @@ registerLanguage({
|
|
|
138335
138362
|
mimetypes: ["text/javascript"],
|
|
138336
138363
|
loader: () => {
|
|
138337
138364
|
{
|
|
138338
|
-
return import("./javascript-
|
|
138365
|
+
return import("./javascript-0c8adee5.js");
|
|
138339
138366
|
}
|
|
138340
138367
|
}
|
|
138341
138368
|
});
|
|
@@ -138434,7 +138461,7 @@ registerLanguage({
|
|
|
138434
138461
|
mimetypes: ["application/liquid"],
|
|
138435
138462
|
loader: () => {
|
|
138436
138463
|
{
|
|
138437
|
-
return import("./liquid-
|
|
138464
|
+
return import("./liquid-acc1cf0e.js");
|
|
138438
138465
|
}
|
|
138439
138466
|
}
|
|
138440
138467
|
});
|
|
@@ -138482,7 +138509,7 @@ registerLanguage({
|
|
|
138482
138509
|
aliases: ["MDX", "mdx"],
|
|
138483
138510
|
loader: () => {
|
|
138484
138511
|
{
|
|
138485
|
-
return import("./mdx-
|
|
138512
|
+
return import("./mdx-85dd6b94.js");
|
|
138486
138513
|
}
|
|
138487
138514
|
}
|
|
138488
138515
|
});
|
|
@@ -138741,7 +138768,7 @@ registerLanguage({
|
|
|
138741
138768
|
firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
|
|
138742
138769
|
loader: () => {
|
|
138743
138770
|
{
|
|
138744
|
-
return import("./python-
|
|
138771
|
+
return import("./python-48d1977e.js");
|
|
138745
138772
|
}
|
|
138746
138773
|
}
|
|
138747
138774
|
});
|
|
@@ -138790,7 +138817,7 @@ registerLanguage({
|
|
|
138790
138817
|
mimetypes: ["text/x-cshtml"],
|
|
138791
138818
|
loader: () => {
|
|
138792
138819
|
{
|
|
138793
|
-
return import("./razor-
|
|
138820
|
+
return import("./razor-22507fac.js");
|
|
138794
138821
|
}
|
|
138795
138822
|
}
|
|
138796
138823
|
});
|
|
@@ -139126,7 +139153,7 @@ registerLanguage({
|
|
|
139126
139153
|
mimetypes: ["text/typescript"],
|
|
139127
139154
|
loader: () => {
|
|
139128
139155
|
{
|
|
139129
|
-
return import("./typescript-
|
|
139156
|
+
return import("./typescript-5f93813d.js");
|
|
139130
139157
|
}
|
|
139131
139158
|
}
|
|
139132
139159
|
});
|
|
@@ -139210,7 +139237,7 @@ registerLanguage({
|
|
|
139210
139237
|
mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
|
|
139211
139238
|
loader: () => {
|
|
139212
139239
|
{
|
|
139213
|
-
return import("./xml-
|
|
139240
|
+
return import("./xml-bda370ff.js");
|
|
139214
139241
|
}
|
|
139215
139242
|
}
|
|
139216
139243
|
});
|
|
@@ -139227,7 +139254,7 @@ registerLanguage({
|
|
|
139227
139254
|
mimetypes: ["application/x-yaml", "text/x-yaml"],
|
|
139228
139255
|
loader: () => {
|
|
139229
139256
|
{
|
|
139230
|
-
return import("./yaml-
|
|
139257
|
+
return import("./yaml-5915841b.js");
|
|
139231
139258
|
}
|
|
139232
139259
|
}
|
|
139233
139260
|
});
|
|
@@ -139351,7 +139378,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3(
|
|
|
139351
139378
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
139352
139379
|
function getMode$3() {
|
|
139353
139380
|
{
|
|
139354
|
-
return import("./cssMode-
|
|
139381
|
+
return import("./cssMode-f2090bd3.js");
|
|
139355
139382
|
}
|
|
139356
139383
|
}
|
|
139357
139384
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -139482,7 +139509,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
139482
139509
|
};
|
|
139483
139510
|
function getMode$2() {
|
|
139484
139511
|
{
|
|
139485
|
-
return import("./htmlMode-
|
|
139512
|
+
return import("./htmlMode-c8640f90.js");
|
|
139486
139513
|
}
|
|
139487
139514
|
}
|
|
139488
139515
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -139580,7 +139607,7 @@ var getWorker = () => getMode$1().then((mode) => mode.getWorker());
|
|
|
139580
139607
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults, getWorker };
|
|
139581
139608
|
function getMode$1() {
|
|
139582
139609
|
{
|
|
139583
|
-
return import("./jsonMode-
|
|
139610
|
+
return import("./jsonMode-8ad9852a.js");
|
|
139584
139611
|
}
|
|
139585
139612
|
}
|
|
139586
139613
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -139856,7 +139883,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
139856
139883
|
};
|
|
139857
139884
|
function getMode() {
|
|
139858
139885
|
{
|
|
139859
|
-
return import("./tsMode-
|
|
139886
|
+
return import("./tsMode-324fb60b.js");
|
|
139860
139887
|
}
|
|
139861
139888
|
}
|
|
139862
139889
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -189269,6 +189296,140 @@ function Map301Panel(props) {
|
|
|
189269
189296
|
] })
|
|
189270
189297
|
] });
|
|
189271
189298
|
}
|
|
189299
|
+
function DeploySettings() {
|
|
189300
|
+
const formValue = useFormValue();
|
|
189301
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
189302
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row justify-between py-4", children: [
|
|
189303
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { children: "私有化部署" }) }),
|
|
189304
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SwitchField, { name: WebsiteSettingsFields.privateDeploy, size: "sm", children: "启用" })
|
|
189305
|
+
] }),
|
|
189306
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col gap-3", children: [
|
|
189307
|
+
!(formValue == null ? void 0 : formValue.privateDeploy) && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-default-500 italic text-sm", children: "未启用私有化部署" }),
|
|
189308
|
+
(formValue == null ? void 0 : formValue.privateDeploy) && /* @__PURE__ */ jsxRuntimeExports.jsxs(ObjectField, { name: WebsiteSettingsFields.deployConfig, children: [
|
|
189309
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
189310
|
+
SelectField,
|
|
189311
|
+
{
|
|
189312
|
+
name: "deployType",
|
|
189313
|
+
label: "部署类型",
|
|
189314
|
+
labelPlacement: "outside",
|
|
189315
|
+
placeholder: "请选择部署类型",
|
|
189316
|
+
children: [
|
|
189317
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { children: "Cloudare Pages" }, DeployType.CloudarePages),
|
|
189318
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { children: "Vercel" }, DeployType.Vercel),
|
|
189319
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { children: "自托管" }, DeployType.SelfHosted)
|
|
189320
|
+
]
|
|
189321
|
+
}
|
|
189322
|
+
),
|
|
189323
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
189324
|
+
PasswordField,
|
|
189325
|
+
{
|
|
189326
|
+
name: "githubToken",
|
|
189327
|
+
label: "GitHub Token",
|
|
189328
|
+
labelPlacement: "outside",
|
|
189329
|
+
placeholder: "请输入 GitHub Token"
|
|
189330
|
+
}
|
|
189331
|
+
),
|
|
189332
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
189333
|
+
InputField,
|
|
189334
|
+
{
|
|
189335
|
+
name: "githubOwner",
|
|
189336
|
+
label: "GitHub 用户",
|
|
189337
|
+
labelPlacement: "outside",
|
|
189338
|
+
placeholder: "请输入 GitHub 用户"
|
|
189339
|
+
}
|
|
189340
|
+
),
|
|
189341
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
189342
|
+
InputField,
|
|
189343
|
+
{
|
|
189344
|
+
name: "githubRepo",
|
|
189345
|
+
label: "生产仓库",
|
|
189346
|
+
labelPlacement: "outside",
|
|
189347
|
+
placeholder: "请输入生产仓库"
|
|
189348
|
+
}
|
|
189349
|
+
),
|
|
189350
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
189351
|
+
InputField,
|
|
189352
|
+
{
|
|
189353
|
+
name: "githubPreviewRepo",
|
|
189354
|
+
label: "预览仓库",
|
|
189355
|
+
labelPlacement: "outside",
|
|
189356
|
+
placeholder: "请输入预览仓库"
|
|
189357
|
+
}
|
|
189358
|
+
)
|
|
189359
|
+
] })
|
|
189360
|
+
] })
|
|
189361
|
+
] });
|
|
189362
|
+
}
|
|
189363
|
+
function DeployConfigPanel(props) {
|
|
189364
|
+
const { onSuccess } = props;
|
|
189365
|
+
const websiteId = useSiteId();
|
|
189366
|
+
const { data: websiteSettings } = useOneWebsiteSettings(
|
|
189367
|
+
new WebsiteSettingsQueryOptions(
|
|
189368
|
+
[
|
|
189369
|
+
WebsiteSettingsFields.id,
|
|
189370
|
+
WebsiteSettingsFields.smtpConfig,
|
|
189371
|
+
WebsiteSettingsFields.noticeEmail,
|
|
189372
|
+
WebsiteSettingsFields.useCustomizedSmtp,
|
|
189373
|
+
WebsiteSettingsFields.replyToEmail,
|
|
189374
|
+
WebsiteSettingsFields.privateDeploy,
|
|
189375
|
+
WebsiteSettingsFields.deployConfig
|
|
189376
|
+
],
|
|
189377
|
+
{
|
|
189378
|
+
where: {
|
|
189379
|
+
website: {
|
|
189380
|
+
id: {
|
|
189381
|
+
_eq: websiteId
|
|
189382
|
+
}
|
|
189383
|
+
}
|
|
189384
|
+
}
|
|
189385
|
+
}
|
|
189386
|
+
)
|
|
189387
|
+
);
|
|
189388
|
+
const [upsert, { isMutating }] = useUpsertOneWebsiteSettings({
|
|
189389
|
+
onSuccess
|
|
189390
|
+
});
|
|
189391
|
+
const handleSubmit = useCallback(
|
|
189392
|
+
(values) => {
|
|
189393
|
+
upsert(
|
|
189394
|
+
websiteSettingsToInput({
|
|
189395
|
+
...values,
|
|
189396
|
+
website: {
|
|
189397
|
+
id: websiteId
|
|
189398
|
+
}
|
|
189399
|
+
})
|
|
189400
|
+
);
|
|
189401
|
+
},
|
|
189402
|
+
[upsert, websiteId]
|
|
189403
|
+
);
|
|
189404
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ModalBody, { className: "flex-1 min-h-0 flex flex-col p-0", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
189405
|
+
EntityForm,
|
|
189406
|
+
{
|
|
189407
|
+
className: "flex-1 min-h-0 flex flex-col",
|
|
189408
|
+
entityName: WebsiteSettingsEntityName,
|
|
189409
|
+
initialValue: websiteSettings || {
|
|
189410
|
+
[WebsiteSettingsAssciations.website]: {
|
|
189411
|
+
id: websiteId
|
|
189412
|
+
}
|
|
189413
|
+
},
|
|
189414
|
+
globalValidationErrorMessage: "部分输入项有错误,请检查",
|
|
189415
|
+
onSubmit: handleSubmit,
|
|
189416
|
+
children: [
|
|
189417
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 flex flex-col gap-4 min-h-0 overflow-auto p-4 px-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(DeploySettings, {}) }),
|
|
189418
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { className: "mt-4" }),
|
|
189419
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-end p-4 px-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
189420
|
+
SubmitButton,
|
|
189421
|
+
{
|
|
189422
|
+
isLoading: isMutating,
|
|
189423
|
+
size: "sm",
|
|
189424
|
+
variant: "solid",
|
|
189425
|
+
color: "primary",
|
|
189426
|
+
children: "保存"
|
|
189427
|
+
}
|
|
189428
|
+
) })
|
|
189429
|
+
]
|
|
189430
|
+
}
|
|
189431
|
+
) });
|
|
189432
|
+
}
|
|
189272
189433
|
function ConfigDrawer() {
|
|
189273
189434
|
const openSettingsType = useStudioStore((state) => state.configType);
|
|
189274
189435
|
const setOpenSettingsType = useStudioStore((state) => state.setConfigType);
|
|
@@ -189292,6 +189453,7 @@ function ConfigDrawer() {
|
|
|
189292
189453
|
openSettingsType === ThemeConfigType.WebsiteInfo && "站点信息",
|
|
189293
189454
|
openSettingsType === ThemeConfigType.EmailTemplates && "邮件模板",
|
|
189294
189455
|
openSettingsType === ThemeConfigType.Redirects && "301 跳转映射",
|
|
189456
|
+
openSettingsType === ThemeConfigType.DeployConfig && "部署配置",
|
|
189295
189457
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ModalClose, {})
|
|
189296
189458
|
] }),
|
|
189297
189459
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {}),
|
|
@@ -189300,7 +189462,8 @@ function ConfigDrawer() {
|
|
|
189300
189462
|
openSettingsType === ThemeConfigType.Extends && /* @__PURE__ */ jsxRuntimeExports.jsx(ExtendsPanel, {}),
|
|
189301
189463
|
openSettingsType === ThemeConfigType.WebsiteInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(WebsiteInfoPanel, { onSuccess: () => setOpenSettingsType(void 0) }),
|
|
189302
189464
|
openSettingsType === ThemeConfigType.EmailTemplates && /* @__PURE__ */ jsxRuntimeExports.jsx(EmialTemplatesPanel, { onSuccess: () => setOpenSettingsType(void 0) }),
|
|
189303
|
-
openSettingsType === ThemeConfigType.Redirects && /* @__PURE__ */ jsxRuntimeExports.jsx(Map301Panel, { onClose: () => setOpenSettingsType(void 0) })
|
|
189465
|
+
openSettingsType === ThemeConfigType.Redirects && /* @__PURE__ */ jsxRuntimeExports.jsx(Map301Panel, { onClose: () => setOpenSettingsType(void 0) }),
|
|
189466
|
+
openSettingsType === ThemeConfigType.DeployConfig && /* @__PURE__ */ jsxRuntimeExports.jsx(DeployConfigPanel, { onSuccess: () => setOpenSettingsType(void 0) })
|
|
189304
189467
|
]
|
|
189305
189468
|
}
|
|
189306
189469
|
);
|
|
@@ -190891,36 +191054,6 @@ function useThemeZipExport(fileName) {
|
|
|
190891
191054
|
}, [files, save, fileName]);
|
|
190892
191055
|
return { exportAsZip, isExporting };
|
|
190893
191056
|
}
|
|
190894
|
-
function useThemeGitUpload(repoName) {
|
|
190895
|
-
const [uploading, setUploading] = useState(false);
|
|
190896
|
-
const { files } = useThemeFiles();
|
|
190897
|
-
const [upload] = useGithubUploadMutation();
|
|
190898
|
-
const uploadToGit = useCallback(async () => {
|
|
190899
|
-
setUploading(true);
|
|
190900
|
-
try {
|
|
190901
|
-
const githubFiles = [];
|
|
190902
|
-
traverseFiles(files, (file, fullPath) => {
|
|
190903
|
-
if (file.type === "folder")
|
|
190904
|
-
return;
|
|
190905
|
-
githubFiles.push({ path: fullPath, content: file.content || "" });
|
|
190906
|
-
});
|
|
190907
|
-
await upload({
|
|
190908
|
-
owner: "wljQAQ",
|
|
190909
|
-
branch: "master",
|
|
190910
|
-
repo: repoName + Date.now(),
|
|
190911
|
-
commit: "初始化模板",
|
|
190912
|
-
files: githubFiles
|
|
190913
|
-
});
|
|
190914
|
-
alert(`上传到github成功`);
|
|
190915
|
-
} catch (err) {
|
|
190916
|
-
console.error("上传失败", err);
|
|
190917
|
-
alert("上传到github失败");
|
|
190918
|
-
} finally {
|
|
190919
|
-
setUploading(false);
|
|
190920
|
-
}
|
|
190921
|
-
}, [files, upload, repoName]);
|
|
190922
|
-
return { uploadToGit, uploading };
|
|
190923
|
-
}
|
|
190924
191057
|
function useThemeFiles() {
|
|
190925
191058
|
const theme = useStudioTheme();
|
|
190926
191059
|
const styleConfig = useThemeStyleConfig();
|
|
@@ -190992,8 +191125,68 @@ function traverseFiles(files, callback, parentPath = "") {
|
|
|
190992
191125
|
}
|
|
190993
191126
|
}
|
|
190994
191127
|
}
|
|
191128
|
+
const CustomRadio = (props) => {
|
|
191129
|
+
const { children, ...otherProps } = props;
|
|
191130
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191131
|
+
Radio,
|
|
191132
|
+
{
|
|
191133
|
+
...otherProps,
|
|
191134
|
+
classNames: {
|
|
191135
|
+
base: cn(
|
|
191136
|
+
"inline-flex m-0 bg-content1 hover:bg-content2 items-center justify-between",
|
|
191137
|
+
"flex-row-reverse max-w-full cursor-pointer rounded-lg gap-4 p-4 border-2 border-transparent",
|
|
191138
|
+
"data-[selected=true]:border-primary"
|
|
191139
|
+
)
|
|
191140
|
+
},
|
|
191141
|
+
children
|
|
191142
|
+
}
|
|
191143
|
+
);
|
|
191144
|
+
};
|
|
191145
|
+
function DownloadCodeModal(props) {
|
|
191146
|
+
const { isOpen, onClose } = props;
|
|
191147
|
+
const [selected, setSelected] = useState(DeployType.CloudarePages);
|
|
191148
|
+
const website = useWebsite();
|
|
191149
|
+
const { exportWebsite, isExporting } = useExportWebsite$1(
|
|
191150
|
+
website,
|
|
191151
|
+
selected,
|
|
191152
|
+
() => {
|
|
191153
|
+
onClose();
|
|
191154
|
+
}
|
|
191155
|
+
);
|
|
191156
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Modal$2, { isOpen, onClose, title: "发布", size: "sm", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ModalContent$2, { children: [
|
|
191157
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ModalHeader$1, { className: "flex gap-1 justify-between pr-12", children: "下载代码" }),
|
|
191158
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {}),
|
|
191159
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ModalBody$1, { className: "w-full h-[400px] flex flex-col gap-2 p-6", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
191160
|
+
RadioGroup,
|
|
191161
|
+
{
|
|
191162
|
+
label: "请选择代码部署方式",
|
|
191163
|
+
value: selected,
|
|
191164
|
+
onValueChange: setSelected,
|
|
191165
|
+
children: [
|
|
191166
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CustomRadio, { value: DeployType.CloudarePages, children: "Cloudare Pages" }),
|
|
191167
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CustomRadio, { value: DeployType.Vercel, children: "Vercel" }),
|
|
191168
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CustomRadio, { value: DeployType.SelfHosted, children: "自托管" })
|
|
191169
|
+
]
|
|
191170
|
+
}
|
|
191171
|
+
) }),
|
|
191172
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {}),
|
|
191173
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ModalFooter$1, { children: [
|
|
191174
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { onPress: onClose, children: "取消" }),
|
|
191175
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191176
|
+
Button$2,
|
|
191177
|
+
{
|
|
191178
|
+
isLoading: isExporting,
|
|
191179
|
+
color: "primary",
|
|
191180
|
+
onPress: exportWebsite,
|
|
191181
|
+
children: "下载"
|
|
191182
|
+
}
|
|
191183
|
+
)
|
|
191184
|
+
] })
|
|
191185
|
+
] }) });
|
|
191186
|
+
}
|
|
190995
191187
|
function MoreActions$1() {
|
|
190996
|
-
var _a3
|
|
191188
|
+
var _a3;
|
|
191189
|
+
const [isDownloadOpen, setIsDownloadOpen] = useState(false);
|
|
190997
191190
|
const [parentThemeOpen, setParentThemeOpen] = useState(false);
|
|
190998
191191
|
const [styleConfigOpen, setStyleConfigOpen] = useState(false);
|
|
190999
191192
|
const setConfigType = useStudioStore((state) => state.setConfigType);
|
|
@@ -191003,7 +191196,6 @@ function MoreActions$1() {
|
|
|
191003
191196
|
const { exportAsZip, isExporting } = useThemeZipExport(
|
|
191004
191197
|
`website-${website == null ? void 0 : website.name}-` + ((_a3 = theme == null ? void 0 : theme.lang) == null ? void 0 : _a3.abbr)
|
|
191005
191198
|
);
|
|
191006
|
-
const { uploadToGit, uploading: isUploadingToGit } = useThemeGitUpload(`website-${website == null ? void 0 : website.name}-` + ((_b3 = theme == null ? void 0 : theme.lang) == null ? void 0 : _b3.abbr));
|
|
191007
191199
|
const {
|
|
191008
191200
|
upload,
|
|
191009
191201
|
isUploading,
|
|
@@ -191021,7 +191213,7 @@ function MoreActions$1() {
|
|
|
191021
191213
|
variant: "light",
|
|
191022
191214
|
isIconOnly: true,
|
|
191023
191215
|
className: "text-default-500",
|
|
191024
|
-
isLoading: isExporting || isUploading
|
|
191216
|
+
isLoading: isExporting || isUploading,
|
|
191025
191217
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(MoreIcon, { className: "size-5" })
|
|
191026
191218
|
}
|
|
191027
191219
|
) }),
|
|
@@ -191031,15 +191223,12 @@ function MoreActions$1() {
|
|
|
191031
191223
|
"aria-label": "更多操作",
|
|
191032
191224
|
disabledKeys: isBaseLangTheme ? [] : ["parent-theme"],
|
|
191033
191225
|
children: [
|
|
191034
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
191226
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191035
191227
|
DropdownItem,
|
|
191036
191228
|
{
|
|
191037
191229
|
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(LanguageIcon, { className: "size-5" }),
|
|
191038
191230
|
onPress: () => setConfigType(ThemeConfigType.MultiLang),
|
|
191039
|
-
children:
|
|
191040
|
-
"多语言配置 ",
|
|
191041
|
-
isUploadingToGit
|
|
191042
|
-
]
|
|
191231
|
+
children: "多语言配置"
|
|
191043
191232
|
},
|
|
191044
191233
|
"multi-lang"
|
|
191045
191234
|
),
|
|
@@ -191136,18 +191325,27 @@ function MoreActions$1() {
|
|
|
191136
191325
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191137
191326
|
DropdownItem,
|
|
191138
191327
|
{
|
|
191139
|
-
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191140
|
-
onPress:
|
|
191141
|
-
children: "
|
|
191328
|
+
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(SettingsMinimalisticIcon, { className: "size-5" }),
|
|
191329
|
+
onPress: () => setConfigType(ThemeConfigType.DeployConfig),
|
|
191330
|
+
children: "部署配置"
|
|
191142
191331
|
},
|
|
191143
|
-
"
|
|
191332
|
+
"deploy-config"
|
|
191333
|
+
),
|
|
191334
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191335
|
+
DropdownItem,
|
|
191336
|
+
{
|
|
191337
|
+
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(CodeSquareIcon, { className: "size-5" }),
|
|
191338
|
+
onPress: () => setIsDownloadOpen(true),
|
|
191339
|
+
children: "导出代码"
|
|
191340
|
+
},
|
|
191341
|
+
"download-code"
|
|
191144
191342
|
),
|
|
191145
191343
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191146
191344
|
DropdownItem,
|
|
191147
191345
|
{
|
|
191148
191346
|
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx(DownloadIcon, { className: "size-5" }),
|
|
191149
|
-
onPress:
|
|
191150
|
-
children: "
|
|
191347
|
+
onPress: exportAsZip,
|
|
191348
|
+
children: "网站导出"
|
|
191151
191349
|
},
|
|
191152
191350
|
"export-website"
|
|
191153
191351
|
),
|
|
@@ -191188,6 +191386,13 @@ function MoreActions$1() {
|
|
|
191188
191386
|
onConfirm: handleConfirm,
|
|
191189
191387
|
confirm: confirmText
|
|
191190
191388
|
}
|
|
191389
|
+
),
|
|
191390
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191391
|
+
DownloadCodeModal,
|
|
191392
|
+
{
|
|
191393
|
+
isOpen: isDownloadOpen,
|
|
191394
|
+
onClose: () => setIsDownloadOpen(false)
|
|
191395
|
+
}
|
|
191191
191396
|
)
|
|
191192
191397
|
] });
|
|
191193
191398
|
}
|
|
@@ -197961,6 +198166,7 @@ const WebsiteToolbar = memo(() => {
|
|
|
197961
198166
|
var _a3, _b3;
|
|
197962
198167
|
const website = useWebsite();
|
|
197963
198168
|
const currentLang = useCurrentLang();
|
|
198169
|
+
const previewUrl = usePreviewUrl();
|
|
197964
198170
|
const setSelectedContent = useStudioStore(
|
|
197965
198171
|
(state) => state.setSelectedContent
|
|
197966
198172
|
);
|
|
@@ -197987,17 +198193,27 @@ const WebsiteToolbar = memo(() => {
|
|
|
197987
198193
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ViewModeButtons, {}),
|
|
197988
198194
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical", className: "h-5" }),
|
|
197989
198195
|
!!((_a3 = website == null ? void 0 : website.langs) == null ? void 0 : _a3.length) && ((_b3 = website == null ? void 0 : website.langs) == null ? void 0 : _b3.length) > 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(LangSelect, {}),
|
|
198196
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "save-action" }),
|
|
197990
198197
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
197991
198198
|
Button$2,
|
|
197992
198199
|
{
|
|
197993
198200
|
as: "a",
|
|
197994
198201
|
size: "sm",
|
|
197995
198202
|
variant: "bordered",
|
|
198203
|
+
isDisabled: !previewUrl,
|
|
198204
|
+
href: previewUrl,
|
|
197996
198205
|
target: "_blank",
|
|
197997
198206
|
children: "预览网站"
|
|
197998
198207
|
}
|
|
197999
198208
|
),
|
|
198000
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198209
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198210
|
+
Button$2,
|
|
198211
|
+
{
|
|
198212
|
+
size: "sm",
|
|
198213
|
+
variant: "bordered",
|
|
198214
|
+
children: "部署网站"
|
|
198215
|
+
}
|
|
198216
|
+
),
|
|
198001
198217
|
/* @__PURE__ */ jsxRuntimeExports.jsx(MoreActions$1, {})
|
|
198002
198218
|
]
|
|
198003
198219
|
}
|
|
@@ -203697,4 +203913,4 @@ export {
|
|
|
203697
203913
|
typescriptDefaults as t,
|
|
203698
203914
|
useCustomizedMaterials as u
|
|
203699
203915
|
};
|
|
203700
|
-
//# sourceMappingURL=index-
|
|
203916
|
+
//# sourceMappingURL=index-0841cd20.js.map
|