@rxdrag/website-studio 0.0.65 → 0.0.66
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/ConfigDrawer/StyleConfigModal/ExtraCodesTab.d.ts +7 -0
- package/dist/{cssMode-0c23a08a.js → cssMode-c65468b2.js} +2 -2
- package/dist/{cssMode-0c23a08a.js.map → cssMode-c65468b2.js.map} +1 -1
- package/dist/{freemarker2-396cac18.js → freemarker2-dba7e455.js} +2 -2
- package/dist/{freemarker2-396cac18.js.map → freemarker2-dba7e455.js.map} +1 -1
- package/dist/{handlebars-039139b0.js → handlebars-91467872.js} +2 -2
- package/dist/{handlebars-039139b0.js.map → handlebars-91467872.js.map} +1 -1
- package/dist/{html-8b21d5ed.js → html-2286fa08.js} +2 -2
- package/dist/{html-8b21d5ed.js.map → html-2286fa08.js.map} +1 -1
- package/dist/{htmlMode-77196fd5.js → htmlMode-807ee170.js} +2 -2
- package/dist/{htmlMode-77196fd5.js.map → htmlMode-807ee170.js.map} +1 -1
- package/dist/{index-3256baa8.js → index-fc7a9154.js} +147 -169
- package/dist/{index-3256baa8.js.map → index-fc7a9154.js.map} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{javascript-8a7fcc5d.js → javascript-19735631.js} +3 -3
- package/dist/{javascript-8a7fcc5d.js.map → javascript-19735631.js.map} +1 -1
- package/dist/{jsonMode-a8a7410a.js → jsonMode-05e0b6a9.js} +2 -2
- package/dist/{jsonMode-a8a7410a.js.map → jsonMode-05e0b6a9.js.map} +1 -1
- package/dist/{liquid-1ae5e803.js → liquid-697db49a.js} +2 -2
- package/dist/{liquid-1ae5e803.js.map → liquid-697db49a.js.map} +1 -1
- package/dist/{mdx-a32b8d38.js → mdx-9cee59dc.js} +2 -2
- package/dist/{mdx-a32b8d38.js.map → mdx-9cee59dc.js.map} +1 -1
- package/dist/{python-cfdc6bef.js → python-7341e362.js} +2 -2
- package/dist/{python-cfdc6bef.js.map → python-7341e362.js.map} +1 -1
- package/dist/{razor-3d879fe0.js → razor-b07a664d.js} +2 -2
- package/dist/{razor-3d879fe0.js.map → razor-b07a664d.js.map} +1 -1
- package/dist/{tsMode-b04b0224.js → tsMode-8542abc3.js} +2 -2
- package/dist/{tsMode-b04b0224.js.map → tsMode-8542abc3.js.map} +1 -1
- package/dist/{typescript-dd1ac52a.js → typescript-e70a9547.js} +2 -2
- package/dist/{typescript-dd1ac52a.js.map → typescript-e70a9547.js.map} +1 -1
- package/dist/{xml-bbfc39e4.js → xml-2581e592.js} +2 -2
- package/dist/{xml-bbfc39e4.js.map → xml-2581e592.js.map} +1 -1
- package/dist/{yaml-125518c0.js → yaml-f58359ab.js} +2 -2
- package/dist/{yaml-125518c0.js.map → yaml-f58359ab.js.map} +1 -1
- package/package.json +17 -17
- package/dist/components/ConfigDrawer/StyleConfigModal/GoogleFontsTab.d.ts +0 -5
- package/dist/components/ConfigDrawer/StyleConfigModal/ImageSizeTab.d.ts +0 -6
|
@@ -33,7 +33,7 @@ import { Designer, useDesignerEngine, useDocumentModified, useClearModified, use
|
|
|
33
33
|
import { useAiAgent, AiWidget, AiAgentRoot } from "@rxdrag/ai-agent";
|
|
34
34
|
import { useUpsertEntityWithIndicator } from "@rxdrag/rxcms-entify-wrapper";
|
|
35
35
|
import dayjs from "dayjs";
|
|
36
|
-
import { cn as cn$1, Tabs as Tabs$1, TabsList, TabsTrigger, TabsContent, Button as Button$3, Label as Label$1,
|
|
36
|
+
import { cn as cn$1, Tabs as Tabs$1, TabsList, TabsTrigger, TabsContent, Button as Button$3, Label as Label$1, AccordionTrigger, Accordion as Accordion$1, AccordionItem as AccordionItem$1, AccordionContent, DialogHeader, DialogTitle, DialogFooter, Dialog, DialogContent } from "@rxdrag/shadcn";
|
|
37
37
|
import { isObj, isStr } from "@rxdrag/shared";
|
|
38
38
|
import { TextNodeName, CommentNodeName } from "@rxdrag/schema-pro";
|
|
39
39
|
import { emit, EVENT_ENTITY_POSTED } from "@rxdrag/entify-lib";
|
|
@@ -581,7 +581,9 @@ function newThemeQueryOptions(websiteId, langId) {
|
|
|
581
581
|
StyleConfigFields.css,
|
|
582
582
|
StyleConfigFields.cssVariants,
|
|
583
583
|
StyleConfigFields.tailwindConfig,
|
|
584
|
-
StyleConfigFields.description
|
|
584
|
+
StyleConfigFields.description,
|
|
585
|
+
StyleConfigFields.headCode,
|
|
586
|
+
StyleConfigFields.footCode
|
|
585
587
|
]).lang([
|
|
586
588
|
LangFields.id,
|
|
587
589
|
LangFields.abbr,
|
|
@@ -613,7 +615,9 @@ function fullThemeQueryOptions() {
|
|
|
613
615
|
StyleConfigFields.css,
|
|
614
616
|
StyleConfigFields.cssVariants,
|
|
615
617
|
StyleConfigFields.tailwindConfig,
|
|
616
|
-
StyleConfigFields.description
|
|
618
|
+
StyleConfigFields.description,
|
|
619
|
+
StyleConfigFields.headCode,
|
|
620
|
+
StyleConfigFields.footCode
|
|
617
621
|
]).config([
|
|
618
622
|
ThemeConfigFields.id,
|
|
619
623
|
ThemeConfigFields.domain,
|
|
@@ -135534,7 +135538,7 @@ registerLanguage({
|
|
|
135534
135538
|
aliases: ["FreeMarker2", "Apache FreeMarker2"],
|
|
135535
135539
|
loader: () => {
|
|
135536
135540
|
{
|
|
135537
|
-
return import("./freemarker2-
|
|
135541
|
+
return import("./freemarker2-dba7e455.js").then((m2) => m2.TagAutoInterpolationDollar);
|
|
135538
135542
|
}
|
|
135539
135543
|
}
|
|
135540
135544
|
});
|
|
@@ -135543,7 +135547,7 @@ registerLanguage({
|
|
|
135543
135547
|
aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
|
|
135544
135548
|
loader: () => {
|
|
135545
135549
|
{
|
|
135546
|
-
return import("./freemarker2-
|
|
135550
|
+
return import("./freemarker2-dba7e455.js").then((m2) => m2.TagAngleInterpolationDollar);
|
|
135547
135551
|
}
|
|
135548
135552
|
}
|
|
135549
135553
|
});
|
|
@@ -135552,7 +135556,7 @@ registerLanguage({
|
|
|
135552
135556
|
aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
|
|
135553
135557
|
loader: () => {
|
|
135554
135558
|
{
|
|
135555
|
-
return import("./freemarker2-
|
|
135559
|
+
return import("./freemarker2-dba7e455.js").then((m2) => m2.TagBracketInterpolationDollar);
|
|
135556
135560
|
}
|
|
135557
135561
|
}
|
|
135558
135562
|
});
|
|
@@ -135561,7 +135565,7 @@ registerLanguage({
|
|
|
135561
135565
|
aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
|
|
135562
135566
|
loader: () => {
|
|
135563
135567
|
{
|
|
135564
|
-
return import("./freemarker2-
|
|
135568
|
+
return import("./freemarker2-dba7e455.js").then((m2) => m2.TagAngleInterpolationBracket);
|
|
135565
135569
|
}
|
|
135566
135570
|
}
|
|
135567
135571
|
});
|
|
@@ -135570,7 +135574,7 @@ registerLanguage({
|
|
|
135570
135574
|
aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
|
|
135571
135575
|
loader: () => {
|
|
135572
135576
|
{
|
|
135573
|
-
return import("./freemarker2-
|
|
135577
|
+
return import("./freemarker2-dba7e455.js").then((m2) => m2.TagBracketInterpolationBracket);
|
|
135574
135578
|
}
|
|
135575
135579
|
}
|
|
135576
135580
|
});
|
|
@@ -135579,7 +135583,7 @@ registerLanguage({
|
|
|
135579
135583
|
aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
|
|
135580
135584
|
loader: () => {
|
|
135581
135585
|
{
|
|
135582
|
-
return import("./freemarker2-
|
|
135586
|
+
return import("./freemarker2-dba7e455.js").then((m2) => m2.TagAutoInterpolationDollar);
|
|
135583
135587
|
}
|
|
135584
135588
|
}
|
|
135585
135589
|
});
|
|
@@ -135588,7 +135592,7 @@ registerLanguage({
|
|
|
135588
135592
|
aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
|
|
135589
135593
|
loader: () => {
|
|
135590
135594
|
{
|
|
135591
|
-
return import("./freemarker2-
|
|
135595
|
+
return import("./freemarker2-dba7e455.js").then((m2) => m2.TagAutoInterpolationBracket);
|
|
135592
135596
|
}
|
|
135593
135597
|
}
|
|
135594
135598
|
});
|
|
@@ -135638,7 +135642,7 @@ registerLanguage({
|
|
|
135638
135642
|
mimetypes: ["text/x-handlebars-template"],
|
|
135639
135643
|
loader: () => {
|
|
135640
135644
|
{
|
|
135641
|
-
return import("./handlebars-
|
|
135645
|
+
return import("./handlebars-91467872.js");
|
|
135642
135646
|
}
|
|
135643
135647
|
}
|
|
135644
135648
|
});
|
|
@@ -135671,7 +135675,7 @@ registerLanguage({
|
|
|
135671
135675
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
135672
135676
|
loader: () => {
|
|
135673
135677
|
{
|
|
135674
|
-
return import("./html-
|
|
135678
|
+
return import("./html-2286fa08.js");
|
|
135675
135679
|
}
|
|
135676
135680
|
}
|
|
135677
135681
|
});
|
|
@@ -135724,7 +135728,7 @@ registerLanguage({
|
|
|
135724
135728
|
mimetypes: ["text/javascript"],
|
|
135725
135729
|
loader: () => {
|
|
135726
135730
|
{
|
|
135727
|
-
return import("./javascript-
|
|
135731
|
+
return import("./javascript-19735631.js");
|
|
135728
135732
|
}
|
|
135729
135733
|
}
|
|
135730
135734
|
});
|
|
@@ -135823,7 +135827,7 @@ registerLanguage({
|
|
|
135823
135827
|
mimetypes: ["application/liquid"],
|
|
135824
135828
|
loader: () => {
|
|
135825
135829
|
{
|
|
135826
|
-
return import("./liquid-
|
|
135830
|
+
return import("./liquid-697db49a.js");
|
|
135827
135831
|
}
|
|
135828
135832
|
}
|
|
135829
135833
|
});
|
|
@@ -135871,7 +135875,7 @@ registerLanguage({
|
|
|
135871
135875
|
aliases: ["MDX", "mdx"],
|
|
135872
135876
|
loader: () => {
|
|
135873
135877
|
{
|
|
135874
|
-
return import("./mdx-
|
|
135878
|
+
return import("./mdx-9cee59dc.js");
|
|
135875
135879
|
}
|
|
135876
135880
|
}
|
|
135877
135881
|
});
|
|
@@ -136130,7 +136134,7 @@ registerLanguage({
|
|
|
136130
136134
|
firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
|
|
136131
136135
|
loader: () => {
|
|
136132
136136
|
{
|
|
136133
|
-
return import("./python-
|
|
136137
|
+
return import("./python-7341e362.js");
|
|
136134
136138
|
}
|
|
136135
136139
|
}
|
|
136136
136140
|
});
|
|
@@ -136179,7 +136183,7 @@ registerLanguage({
|
|
|
136179
136183
|
mimetypes: ["text/x-cshtml"],
|
|
136180
136184
|
loader: () => {
|
|
136181
136185
|
{
|
|
136182
|
-
return import("./razor-
|
|
136186
|
+
return import("./razor-b07a664d.js");
|
|
136183
136187
|
}
|
|
136184
136188
|
}
|
|
136185
136189
|
});
|
|
@@ -136515,7 +136519,7 @@ registerLanguage({
|
|
|
136515
136519
|
mimetypes: ["text/typescript"],
|
|
136516
136520
|
loader: () => {
|
|
136517
136521
|
{
|
|
136518
|
-
return import("./typescript-
|
|
136522
|
+
return import("./typescript-e70a9547.js");
|
|
136519
136523
|
}
|
|
136520
136524
|
}
|
|
136521
136525
|
});
|
|
@@ -136599,7 +136603,7 @@ registerLanguage({
|
|
|
136599
136603
|
mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
|
|
136600
136604
|
loader: () => {
|
|
136601
136605
|
{
|
|
136602
|
-
return import("./xml-
|
|
136606
|
+
return import("./xml-2581e592.js");
|
|
136603
136607
|
}
|
|
136604
136608
|
}
|
|
136605
136609
|
});
|
|
@@ -136616,7 +136620,7 @@ registerLanguage({
|
|
|
136616
136620
|
mimetypes: ["application/x-yaml", "text/x-yaml"],
|
|
136617
136621
|
loader: () => {
|
|
136618
136622
|
{
|
|
136619
|
-
return import("./yaml-
|
|
136623
|
+
return import("./yaml-f58359ab.js");
|
|
136620
136624
|
}
|
|
136621
136625
|
}
|
|
136622
136626
|
});
|
|
@@ -136740,7 +136744,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3(
|
|
|
136740
136744
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
136741
136745
|
function getMode$3() {
|
|
136742
136746
|
{
|
|
136743
|
-
return import("./cssMode-
|
|
136747
|
+
return import("./cssMode-c65468b2.js");
|
|
136744
136748
|
}
|
|
136745
136749
|
}
|
|
136746
136750
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -136871,7 +136875,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
136871
136875
|
};
|
|
136872
136876
|
function getMode$2() {
|
|
136873
136877
|
{
|
|
136874
|
-
return import("./htmlMode-
|
|
136878
|
+
return import("./htmlMode-807ee170.js");
|
|
136875
136879
|
}
|
|
136876
136880
|
}
|
|
136877
136881
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -136969,7 +136973,7 @@ var getWorker = () => getMode$1().then((mode) => mode.getWorker());
|
|
|
136969
136973
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults, getWorker };
|
|
136970
136974
|
function getMode$1() {
|
|
136971
136975
|
{
|
|
136972
|
-
return import("./jsonMode-
|
|
136976
|
+
return import("./jsonMode-05e0b6a9.js");
|
|
136973
136977
|
}
|
|
136974
136978
|
}
|
|
136975
136979
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -137245,7 +137249,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
137245
137249
|
};
|
|
137246
137250
|
function getMode() {
|
|
137247
137251
|
{
|
|
137248
|
-
return import("./tsMode-
|
|
137252
|
+
return import("./tsMode-8542abc3.js");
|
|
137249
137253
|
}
|
|
137250
137254
|
}
|
|
137251
137255
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -187096,7 +187100,9 @@ const ApplyModeStep = (props) => {
|
|
|
187096
187100
|
StyleConfigFields.name,
|
|
187097
187101
|
StyleConfigFields.css,
|
|
187098
187102
|
StyleConfigFields.cssVariants,
|
|
187099
|
-
StyleConfigFields.tailwindConfig
|
|
187103
|
+
StyleConfigFields.tailwindConfig,
|
|
187104
|
+
StyleConfigFields.headCode,
|
|
187105
|
+
StyleConfigFields.footCode
|
|
187100
187106
|
]).setNoQuery(!(selectedTheme == null ? void 0 : selectedTheme.id)).toGqlOptions()
|
|
187101
187107
|
);
|
|
187102
187108
|
if (applyOptions.overwriteStyles) {
|
|
@@ -198436,116 +198442,60 @@ function PreviewContent(props) {
|
|
|
198436
198442
|
}
|
|
198437
198443
|
);
|
|
198438
198444
|
}
|
|
198439
|
-
function
|
|
198440
|
-
|
|
198441
|
-
|
|
198442
|
-
|
|
198443
|
-
|
|
198444
|
-
|
|
198445
|
-
|
|
198446
|
-
|
|
198447
|
-
|
|
198448
|
-
|
|
198449
|
-
|
|
198450
|
-
|
|
198451
|
-
},
|
|
198452
|
-
[value, onChange]
|
|
198453
|
-
);
|
|
198454
|
-
const renderSizeConfig = (sizeType, title) => {
|
|
198455
|
-
const currentSize = value[sizeType];
|
|
198456
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
|
|
198457
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-sm font-medium", children: title }),
|
|
198458
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
198459
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
|
|
198460
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-xs text-muted-foreground", children: "宽度 (px)" }),
|
|
198461
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198462
|
-
Input$1,
|
|
198463
|
-
{
|
|
198464
|
-
type: "number",
|
|
198465
|
-
placeholder: "宽度",
|
|
198466
|
-
value: (currentSize == null ? void 0 : currentSize.width) || "",
|
|
198467
|
-
onChange: (e) => handleSizeChange(sizeType, "width", e.target.value),
|
|
198468
|
-
min: "1",
|
|
198469
|
-
size: "sm"
|
|
198470
|
-
}
|
|
198471
|
-
)
|
|
198472
|
-
] }),
|
|
198473
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
|
|
198474
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-xs text-muted-foreground", children: "高度 (px)" }),
|
|
198475
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198476
|
-
Input$1,
|
|
198477
|
-
{
|
|
198478
|
-
type: "number",
|
|
198479
|
-
placeholder: "高度",
|
|
198480
|
-
value: (currentSize == null ? void 0 : currentSize.height) || "",
|
|
198481
|
-
onChange: (e) => handleSizeChange(sizeType, "height", e.target.value),
|
|
198482
|
-
min: "1",
|
|
198483
|
-
size: "sm"
|
|
198484
|
-
}
|
|
198485
|
-
)
|
|
198486
|
-
] })
|
|
198487
|
-
] })
|
|
198488
|
-
] });
|
|
198489
|
-
};
|
|
198490
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-6 p-6", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-5", children: [
|
|
198491
|
-
renderSizeConfig("small", "小尺寸"),
|
|
198492
|
-
renderSizeConfig("medium", "中尺寸"),
|
|
198493
|
-
renderSizeConfig("large", "大尺寸")
|
|
198494
|
-
] }) });
|
|
198495
|
-
}
|
|
198496
|
-
function GoogleFontsTab({ value, onChange }) {
|
|
198497
|
-
const handleChange = useCallback((newValue) => {
|
|
198498
|
-
onChange(newValue);
|
|
198499
|
-
}, [onChange]);
|
|
198445
|
+
function ExtraCodesTab({
|
|
198446
|
+
headCode,
|
|
198447
|
+
footCode,
|
|
198448
|
+
onHeadCodeChange,
|
|
198449
|
+
onFootCodeChange
|
|
198450
|
+
}) {
|
|
198451
|
+
const handleHeadCodeChange = useCallback((newValue) => {
|
|
198452
|
+
onHeadCodeChange(newValue);
|
|
198453
|
+
}, [onHeadCodeChange]);
|
|
198454
|
+
const handleFootCodeChange = useCallback((newValue) => {
|
|
198455
|
+
onFootCodeChange(newValue);
|
|
198456
|
+
}, [onFootCodeChange]);
|
|
198500
198457
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
198501
198458
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
|
|
198502
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-sm font-medium", children: "
|
|
198459
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-sm font-medium", children: "Head 代码" }),
|
|
198503
198460
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
|
|
198504
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-xs text-muted-foreground", children: "
|
|
198461
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-xs text-muted-foreground", children: "在页面 <head> 标签中插入的代码(如 Google Fonts、Meta 标签等)" }),
|
|
198505
198462
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198506
198463
|
"textarea",
|
|
198507
198464
|
{
|
|
198508
|
-
className: "w-full h-
|
|
198465
|
+
className: "w-full h-40 p-3 text-sm font-mono border border-gray-300 dark:border-gray-600 rounded-md bg-transparent resize-y focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",
|
|
198509
198466
|
placeholder: `<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
|
|
198510
|
-
<
|
|
198511
|
-
|
|
198512
|
-
|
|
198467
|
+
<meta name="description" content="Your description">
|
|
198468
|
+
<link rel="icon" href="/favicon.ico">`,
|
|
198469
|
+
value: headCode || "",
|
|
198470
|
+
onChange: (e) => handleHeadCodeChange(e.target.value)
|
|
198513
198471
|
}
|
|
198514
198472
|
)
|
|
198515
198473
|
] })
|
|
198516
198474
|
] }),
|
|
198517
198475
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
|
|
198518
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-sm font-medium
|
|
198519
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "
|
|
198520
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
198521
|
-
|
|
198522
|
-
|
|
198523
|
-
|
|
198524
|
-
|
|
198525
|
-
|
|
198526
|
-
|
|
198527
|
-
|
|
198528
|
-
|
|
198529
|
-
|
|
198530
|
-
|
|
198531
|
-
|
|
198532
|
-
|
|
198533
|
-
|
|
198534
|
-
|
|
198535
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "• 支持多个字体,每行一个 link 标签" }),
|
|
198536
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "• 脚本会被直接添加到页面的 <head> 部分" }),
|
|
198537
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
|
|
198538
|
-
"• 可以在 ",
|
|
198539
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: "https://fonts.google.com", target: "_blank", rel: "noopener noreferrer", className: "text-primary underline", children: "Google Fonts" }),
|
|
198540
|
-
" 官网获取完整脚本"
|
|
198541
|
-
] }),
|
|
198542
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "• 建议添加 &display=swap 参数以优化加载性能" })
|
|
198476
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-sm font-medium", children: "Foot 代码" }),
|
|
198477
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
|
|
198478
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Label$1, { className: "text-xs text-muted-foreground", children: "在页面 </body> 标签前插入的代码(如统计脚本、第三方插件等)" }),
|
|
198479
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198480
|
+
"textarea",
|
|
198481
|
+
{
|
|
198482
|
+
className: "w-full h-40 p-3 text-sm font-mono border border-gray-300 dark:border-gray-600 rounded-md bg-transparent resize-y focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",
|
|
198483
|
+
placeholder: `<script>
|
|
198484
|
+
// Google Analytics
|
|
198485
|
+
(function(i,s,o,g,r,a,m){...})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
198486
|
+
ga('create', 'UA-XXXXX-Y', 'auto');
|
|
198487
|
+
ga('send', 'pageview');
|
|
198488
|
+
<\/script>`,
|
|
198489
|
+
value: footCode || "",
|
|
198490
|
+
onChange: (e) => handleFootCodeChange(e.target.value)
|
|
198491
|
+
}
|
|
198492
|
+
)
|
|
198543
198493
|
] })
|
|
198544
198494
|
] })
|
|
198545
198495
|
] });
|
|
198546
198496
|
}
|
|
198547
198497
|
function StyleConfigModal(props) {
|
|
198548
|
-
var _a3, _b3, _c2, _d2, _e2, _f2, _g2;
|
|
198498
|
+
var _a3, _b3, _c2, _d2, _e2, _f2, _g2, _h2, _i3;
|
|
198549
198499
|
const { isOpen, onClose, ...modalProps } = props;
|
|
198550
198500
|
const [themeMode, setThemeMode] = useState("light");
|
|
198551
198501
|
const [tailwindConfig, setTailwindConfig] = useState("");
|
|
@@ -198554,7 +198504,8 @@ function StyleConfigModal(props) {
|
|
|
198554
198504
|
medium: DEFAULT_MEDIUM,
|
|
198555
198505
|
large: DEFAULT_LARGE
|
|
198556
198506
|
});
|
|
198557
|
-
const [
|
|
198507
|
+
const [headCode, setHeadCode] = useState("");
|
|
198508
|
+
const [footCode, setFootCode] = useState("");
|
|
198558
198509
|
const [cssVariant, setCssVariant] = useState("");
|
|
198559
198510
|
const [css, setCss] = useState("");
|
|
198560
198511
|
const styleConfig = useThemeStyleConfig();
|
|
@@ -198566,17 +198517,25 @@ function StyleConfigModal(props) {
|
|
|
198566
198517
|
}
|
|
198567
198518
|
});
|
|
198568
198519
|
useEffect(() => {
|
|
198569
|
-
var _a4, _b4;
|
|
198520
|
+
var _a4, _b4, _c3;
|
|
198570
198521
|
setTailwindConfig((styleConfig == null ? void 0 : styleConfig.tailwindConfig) || "");
|
|
198571
198522
|
setCssVariant((styleConfig == null ? void 0 : styleConfig.cssVariants) || "");
|
|
198572
198523
|
setCss((styleConfig == null ? void 0 : styleConfig.css) || "");
|
|
198573
|
-
setImageSizes(
|
|
198574
|
-
|
|
198575
|
-
|
|
198576
|
-
|
|
198577
|
-
|
|
198578
|
-
|
|
198579
|
-
|
|
198524
|
+
setImageSizes(
|
|
198525
|
+
((_a4 = theme == null ? void 0 : theme.settings) == null ? void 0 : _a4.imageSizes) || {
|
|
198526
|
+
small: DEFAULT_SAMLL,
|
|
198527
|
+
medium: DEFAULT_MEDIUM,
|
|
198528
|
+
large: DEFAULT_LARGE
|
|
198529
|
+
}
|
|
198530
|
+
);
|
|
198531
|
+
setHeadCode(((_b4 = theme == null ? void 0 : theme.styleConfig) == null ? void 0 : _b4.headCode) || "");
|
|
198532
|
+
setFootCode(((_c3 = theme == null ? void 0 : theme.styleConfig) == null ? void 0 : _c3.footCode) || "");
|
|
198533
|
+
}, [
|
|
198534
|
+
styleConfig,
|
|
198535
|
+
(_a3 = theme == null ? void 0 : theme.settings) == null ? void 0 : _a3.imageSizes,
|
|
198536
|
+
(_b3 = theme == null ? void 0 : theme.styleConfig) == null ? void 0 : _b3.headCode,
|
|
198537
|
+
(_c2 = theme == null ? void 0 : theme.styleConfig) == null ? void 0 : _c2.footCode
|
|
198538
|
+
]);
|
|
198580
198539
|
const handleTailwindConfigChange = useCallback((value) => {
|
|
198581
198540
|
setTailwindConfig(value || "");
|
|
198582
198541
|
}, []);
|
|
@@ -198586,11 +198545,11 @@ function StyleConfigModal(props) {
|
|
|
198586
198545
|
const handleCssChange = useCallback((value) => {
|
|
198587
198546
|
setCss(value || "");
|
|
198588
198547
|
}, []);
|
|
198589
|
-
const
|
|
198590
|
-
|
|
198548
|
+
const handleHeadCodeChange = useCallback((value) => {
|
|
198549
|
+
setHeadCode(value);
|
|
198591
198550
|
}, []);
|
|
198592
|
-
const
|
|
198593
|
-
|
|
198551
|
+
const handleFootCodeChange = useCallback((value) => {
|
|
198552
|
+
setFootCode(value);
|
|
198594
198553
|
}, []);
|
|
198595
198554
|
const handleConfirm = useCallback(() => {
|
|
198596
198555
|
if (theme == null ? void 0 : theme.id) {
|
|
@@ -198601,34 +198560,50 @@ function StyleConfigModal(props) {
|
|
|
198601
198560
|
id: styleConfig == null ? void 0 : styleConfig.id,
|
|
198602
198561
|
tailwindConfig,
|
|
198603
198562
|
cssVariants: cssVariant,
|
|
198604
|
-
css
|
|
198563
|
+
css,
|
|
198564
|
+
headCode,
|
|
198565
|
+
footCode
|
|
198605
198566
|
}
|
|
198606
198567
|
},
|
|
198607
198568
|
settings: {
|
|
198608
198569
|
...theme.settings,
|
|
198609
|
-
imageSizes
|
|
198610
|
-
googleFonts
|
|
198570
|
+
imageSizes
|
|
198611
198571
|
}
|
|
198612
198572
|
});
|
|
198613
198573
|
}
|
|
198614
|
-
}, [
|
|
198574
|
+
}, [
|
|
198575
|
+
theme == null ? void 0 : theme.id,
|
|
198576
|
+
theme == null ? void 0 : theme.settings,
|
|
198577
|
+
save,
|
|
198578
|
+
styleConfig == null ? void 0 : styleConfig.id,
|
|
198579
|
+
tailwindConfig,
|
|
198580
|
+
cssVariant,
|
|
198581
|
+
css,
|
|
198582
|
+
headCode,
|
|
198583
|
+
footCode,
|
|
198584
|
+
imageSizes
|
|
198585
|
+
]);
|
|
198615
198586
|
const handleReset = useCallback(() => {
|
|
198616
|
-
var _a4, _b4, _c3, _d3, _e3;
|
|
198587
|
+
var _a4, _b4, _c3, _d3, _e3, _f3;
|
|
198617
198588
|
setTailwindConfig(((_a4 = parentTheme == null ? void 0 : parentTheme.styleConfig) == null ? void 0 : _a4.tailwindConfig) || "");
|
|
198618
198589
|
setCssVariant(((_b4 = parentTheme == null ? void 0 : parentTheme.styleConfig) == null ? void 0 : _b4.cssVariants) || "");
|
|
198619
198590
|
setCss(((_c3 = parentTheme == null ? void 0 : parentTheme.styleConfig) == null ? void 0 : _c3.css) || "");
|
|
198620
|
-
setImageSizes(
|
|
198621
|
-
|
|
198622
|
-
|
|
198623
|
-
|
|
198624
|
-
|
|
198625
|
-
|
|
198591
|
+
setImageSizes(
|
|
198592
|
+
((_d3 = parentTheme == null ? void 0 : parentTheme.settings) == null ? void 0 : _d3.imageSizes) || {
|
|
198593
|
+
small: DEFAULT_SAMLL,
|
|
198594
|
+
medium: DEFAULT_MEDIUM,
|
|
198595
|
+
large: DEFAULT_LARGE
|
|
198596
|
+
}
|
|
198597
|
+
);
|
|
198598
|
+
setHeadCode(((_e3 = parentTheme == null ? void 0 : parentTheme.styleConfig) == null ? void 0 : _e3.headCode) || "");
|
|
198599
|
+
setFootCode(((_f3 = parentTheme == null ? void 0 : parentTheme.styleConfig) == null ? void 0 : _f3.footCode) || "");
|
|
198626
198600
|
}, [
|
|
198627
|
-
(
|
|
198628
|
-
(
|
|
198629
|
-
(
|
|
198630
|
-
(
|
|
198631
|
-
(
|
|
198601
|
+
(_d2 = parentTheme == null ? void 0 : parentTheme.styleConfig) == null ? void 0 : _d2.tailwindConfig,
|
|
198602
|
+
(_e2 = parentTheme == null ? void 0 : parentTheme.styleConfig) == null ? void 0 : _e2.cssVariants,
|
|
198603
|
+
(_f2 = parentTheme == null ? void 0 : parentTheme.styleConfig) == null ? void 0 : _f2.css,
|
|
198604
|
+
(_g2 = parentTheme == null ? void 0 : parentTheme.styleConfig) == null ? void 0 : _g2.headCode,
|
|
198605
|
+
(_h2 = parentTheme == null ? void 0 : parentTheme.styleConfig) == null ? void 0 : _h2.footCode,
|
|
198606
|
+
(_i3 = parentTheme == null ? void 0 : parentTheme.settings) == null ? void 0 : _i3.imageSizes
|
|
198632
198607
|
]);
|
|
198633
198608
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Modal$1, { isOpen, onClose, ...modalProps, children: [
|
|
198634
198609
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ModalOverlay$1, {}),
|
|
@@ -198649,16 +198624,24 @@ function StyleConfigModal(props) {
|
|
|
198649
198624
|
},
|
|
198650
198625
|
destroyInactiveTabPanel: false,
|
|
198651
198626
|
children: [
|
|
198652
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198653
|
-
|
|
198627
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198628
|
+
Tab,
|
|
198654
198629
|
{
|
|
198655
|
-
|
|
198656
|
-
|
|
198657
|
-
|
|
198658
|
-
|
|
198659
|
-
|
|
198660
|
-
|
|
198661
|
-
|
|
198630
|
+
title: "Tailwind 配置",
|
|
198631
|
+
className: "min-h-0",
|
|
198632
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198633
|
+
MonacoEditor,
|
|
198634
|
+
{
|
|
198635
|
+
height: "100%",
|
|
198636
|
+
language: "javascript",
|
|
198637
|
+
theme: "dark-plus",
|
|
198638
|
+
value: tailwindConfig,
|
|
198639
|
+
onChange: handleTailwindConfigChange
|
|
198640
|
+
}
|
|
198641
|
+
) })
|
|
198642
|
+
},
|
|
198643
|
+
"tailwind-config"
|
|
198644
|
+
),
|
|
198662
198645
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Tab, { title: "CSS 变量", className: "min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198663
198646
|
MonacoEditor,
|
|
198664
198647
|
{
|
|
@@ -198679,20 +198662,15 @@ function StyleConfigModal(props) {
|
|
|
198679
198662
|
onChange: handleCssChange
|
|
198680
198663
|
}
|
|
198681
198664
|
) }) }, "css"),
|
|
198682
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Tab, { title: "
|
|
198683
|
-
|
|
198684
|
-
{
|
|
198685
|
-
value: googleFonts,
|
|
198686
|
-
onChange: handleGoogleFontsChange
|
|
198687
|
-
}
|
|
198688
|
-
) }) }, "font"),
|
|
198689
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Tab, { title: "图片尺寸", className: "min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full overflow-y-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198690
|
-
ImageSizeTab,
|
|
198665
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tab, { title: "附加代码", className: "min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full overflow-y-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198666
|
+
ExtraCodesTab,
|
|
198691
198667
|
{
|
|
198692
|
-
|
|
198693
|
-
|
|
198668
|
+
headCode,
|
|
198669
|
+
footCode,
|
|
198670
|
+
onHeadCodeChange: handleHeadCodeChange,
|
|
198671
|
+
onFootCodeChange: handleFootCodeChange
|
|
198694
198672
|
}
|
|
198695
|
-
) }) }, "
|
|
198673
|
+
) }) }, "font")
|
|
198696
198674
|
]
|
|
198697
198675
|
}
|
|
198698
198676
|
) }),
|
|
@@ -204626,4 +204604,4 @@ export {
|
|
|
204626
204604
|
typescriptDefaults as t,
|
|
204627
204605
|
useCustomizedMaterials as u
|
|
204628
204606
|
};
|
|
204629
|
-
//# sourceMappingURL=index-
|
|
204607
|
+
//# sourceMappingURL=index-fc7a9154.js.map
|