@rxdrag/website-studio 0.0.23 → 0.0.25

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.
Files changed (35) hide show
  1. package/dist/components/ConfigDrawer/Map301Panel/index.d.ts +1 -1
  2. package/dist/{cssMode-f00a354a.js → cssMode-d365a465.js} +2 -2
  3. package/dist/{cssMode-f00a354a.js.map → cssMode-d365a465.js.map} +1 -1
  4. package/dist/{freemarker2-47b25665.js → freemarker2-101e13bf.js} +2 -2
  5. package/dist/{freemarker2-47b25665.js.map → freemarker2-101e13bf.js.map} +1 -1
  6. package/dist/{handlebars-b518f905.js → handlebars-7d67afeb.js} +2 -2
  7. package/dist/{handlebars-b518f905.js.map → handlebars-7d67afeb.js.map} +1 -1
  8. package/dist/{html-771134cd.js → html-1cd3adde.js} +2 -2
  9. package/dist/{html-771134cd.js.map → html-1cd3adde.js.map} +1 -1
  10. package/dist/{htmlMode-f37dc203.js → htmlMode-dea1e902.js} +2 -2
  11. package/dist/{htmlMode-f37dc203.js.map → htmlMode-dea1e902.js.map} +1 -1
  12. package/dist/{index-1a250dd3.js → index-b67688cb.js} +49 -45
  13. package/dist/{index-1a250dd3.js.map → index-b67688cb.js.map} +1 -1
  14. package/dist/index.mjs +1 -1
  15. package/dist/{javascript-fb03ed4b.js → javascript-6f606d7b.js} +3 -3
  16. package/dist/{javascript-fb03ed4b.js.map → javascript-6f606d7b.js.map} +1 -1
  17. package/dist/{jsonMode-9dece0a1.js → jsonMode-658e571c.js} +2 -2
  18. package/dist/{jsonMode-9dece0a1.js.map → jsonMode-658e571c.js.map} +1 -1
  19. package/dist/{liquid-4c50637c.js → liquid-0c099bea.js} +2 -2
  20. package/dist/{liquid-4c50637c.js.map → liquid-0c099bea.js.map} +1 -1
  21. package/dist/{mdx-eac4dfcd.js → mdx-7e13478b.js} +2 -2
  22. package/dist/{mdx-eac4dfcd.js.map → mdx-7e13478b.js.map} +1 -1
  23. package/dist/{python-939381bf.js → python-3df35a65.js} +2 -2
  24. package/dist/{python-939381bf.js.map → python-3df35a65.js.map} +1 -1
  25. package/dist/{razor-a34c712c.js → razor-257de6d5.js} +2 -2
  26. package/dist/{razor-a34c712c.js.map → razor-257de6d5.js.map} +1 -1
  27. package/dist/{tsMode-364628ce.js → tsMode-518df584.js} +2 -2
  28. package/dist/{tsMode-364628ce.js.map → tsMode-518df584.js.map} +1 -1
  29. package/dist/{typescript-5889218e.js → typescript-3e21e66c.js} +2 -2
  30. package/dist/{typescript-5889218e.js.map → typescript-3e21e66c.js.map} +1 -1
  31. package/dist/{xml-ddade1e8.js → xml-e8c39dfc.js} +2 -2
  32. package/dist/{xml-ddade1e8.js.map → xml-e8c39dfc.js.map} +1 -1
  33. package/dist/{yaml-5189e3d1.js → yaml-d67ac605.js} +2 -2
  34. package/dist/{yaml-5189e3d1.js.map → yaml-d67ac605.js.map} +1 -1
  35. package/package.json +13 -13
@@ -15,7 +15,7 @@ import { parseExpressionValue, isExpression, extractVariables, compileCode, Asyn
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";
17
17
  import { NodeMountedEvent, RXID_ATTR_NAME, HistoryableActionType, IFrameCanvasImpl, KeyboardDriver, DragDropDriver, DragOverDriver, MouseClickDriver, MouseMoveDriver, MouseOverOutDriver, CanvasResizeDriver, CanvasScrollDriver, MouseUpDriver, ContainerImpl } from "@rxdrag/core-pro";
18
- import { useVariables, useExecuteExpression, VariableProvider, expressionAndName, expressionTernaryName, expressionLoopName, useViewKey, createSchema, staticMaterials, ViewKeyProvider, slotContentName, expressionName } from "@rxdrag/website-materials";
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
21
  import { useEntifyEndpoint, useEntifyToken, useLazyQueryEntityList, useLazyQueryOneEntity, useCreateEntityClient, emitEntityChange } from "@rxdrag/entify-hooks";
@@ -3424,10 +3424,7 @@ const tsconfigCode = `{
3424
3424
  `;
3425
3425
  const createEnv = (theme) => {
3426
3426
  var _a3, _b3;
3427
- return `#PUBLIC_ENTIFY_SERVER_URL = https://api.yizhanfei.com/graphql
3428
- #PUBLIC_ENTIFY_SERVER_URL = http://localhost:3000/graphql
3429
- PUBLIC_ENTIFY_SERVER_URL =http://localhost:4000/graphql
3430
- #PUBLIC_ENTIFY_SERVER_URL =https://api-test2.liaoker.com/graphql
3427
+ return `PUBLIC_ENTIFY_SERVER_URL =${ENTIFY_SERVER_URL}
3431
3428
  #测试服务器跟生产服务器
3432
3429
  PUBLIC_WEBSITE_ID = ${(_a3 = theme == null ? void 0 : theme.website) == null ? void 0 : _a3.id}
3433
3430
  #语言
@@ -135901,7 +135898,7 @@ registerLanguage({
135901
135898
  aliases: ["FreeMarker2", "Apache FreeMarker2"],
135902
135899
  loader: () => {
135903
135900
  {
135904
- return import("./freemarker2-47b25665.js").then((m2) => m2.TagAutoInterpolationDollar);
135901
+ return import("./freemarker2-101e13bf.js").then((m2) => m2.TagAutoInterpolationDollar);
135905
135902
  }
135906
135903
  }
135907
135904
  });
@@ -135910,7 +135907,7 @@ registerLanguage({
135910
135907
  aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
135911
135908
  loader: () => {
135912
135909
  {
135913
- return import("./freemarker2-47b25665.js").then((m2) => m2.TagAngleInterpolationDollar);
135910
+ return import("./freemarker2-101e13bf.js").then((m2) => m2.TagAngleInterpolationDollar);
135914
135911
  }
135915
135912
  }
135916
135913
  });
@@ -135919,7 +135916,7 @@ registerLanguage({
135919
135916
  aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
135920
135917
  loader: () => {
135921
135918
  {
135922
- return import("./freemarker2-47b25665.js").then((m2) => m2.TagBracketInterpolationDollar);
135919
+ return import("./freemarker2-101e13bf.js").then((m2) => m2.TagBracketInterpolationDollar);
135923
135920
  }
135924
135921
  }
135925
135922
  });
@@ -135928,7 +135925,7 @@ registerLanguage({
135928
135925
  aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
135929
135926
  loader: () => {
135930
135927
  {
135931
- return import("./freemarker2-47b25665.js").then((m2) => m2.TagAngleInterpolationBracket);
135928
+ return import("./freemarker2-101e13bf.js").then((m2) => m2.TagAngleInterpolationBracket);
135932
135929
  }
135933
135930
  }
135934
135931
  });
@@ -135937,7 +135934,7 @@ registerLanguage({
135937
135934
  aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
135938
135935
  loader: () => {
135939
135936
  {
135940
- return import("./freemarker2-47b25665.js").then((m2) => m2.TagBracketInterpolationBracket);
135937
+ return import("./freemarker2-101e13bf.js").then((m2) => m2.TagBracketInterpolationBracket);
135941
135938
  }
135942
135939
  }
135943
135940
  });
@@ -135946,7 +135943,7 @@ registerLanguage({
135946
135943
  aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
135947
135944
  loader: () => {
135948
135945
  {
135949
- return import("./freemarker2-47b25665.js").then((m2) => m2.TagAutoInterpolationDollar);
135946
+ return import("./freemarker2-101e13bf.js").then((m2) => m2.TagAutoInterpolationDollar);
135950
135947
  }
135951
135948
  }
135952
135949
  });
@@ -135955,7 +135952,7 @@ registerLanguage({
135955
135952
  aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
135956
135953
  loader: () => {
135957
135954
  {
135958
- return import("./freemarker2-47b25665.js").then((m2) => m2.TagAutoInterpolationBracket);
135955
+ return import("./freemarker2-101e13bf.js").then((m2) => m2.TagAutoInterpolationBracket);
135959
135956
  }
135960
135957
  }
135961
135958
  });
@@ -136005,7 +136002,7 @@ registerLanguage({
136005
136002
  mimetypes: ["text/x-handlebars-template"],
136006
136003
  loader: () => {
136007
136004
  {
136008
- return import("./handlebars-b518f905.js");
136005
+ return import("./handlebars-7d67afeb.js");
136009
136006
  }
136010
136007
  }
136011
136008
  });
@@ -136038,7 +136035,7 @@ registerLanguage({
136038
136035
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
136039
136036
  loader: () => {
136040
136037
  {
136041
- return import("./html-771134cd.js");
136038
+ return import("./html-1cd3adde.js");
136042
136039
  }
136043
136040
  }
136044
136041
  });
@@ -136091,7 +136088,7 @@ registerLanguage({
136091
136088
  mimetypes: ["text/javascript"],
136092
136089
  loader: () => {
136093
136090
  {
136094
- return import("./javascript-fb03ed4b.js");
136091
+ return import("./javascript-6f606d7b.js");
136095
136092
  }
136096
136093
  }
136097
136094
  });
@@ -136190,7 +136187,7 @@ registerLanguage({
136190
136187
  mimetypes: ["application/liquid"],
136191
136188
  loader: () => {
136192
136189
  {
136193
- return import("./liquid-4c50637c.js");
136190
+ return import("./liquid-0c099bea.js");
136194
136191
  }
136195
136192
  }
136196
136193
  });
@@ -136238,7 +136235,7 @@ registerLanguage({
136238
136235
  aliases: ["MDX", "mdx"],
136239
136236
  loader: () => {
136240
136237
  {
136241
- return import("./mdx-eac4dfcd.js");
136238
+ return import("./mdx-7e13478b.js");
136242
136239
  }
136243
136240
  }
136244
136241
  });
@@ -136497,7 +136494,7 @@ registerLanguage({
136497
136494
  firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
136498
136495
  loader: () => {
136499
136496
  {
136500
- return import("./python-939381bf.js");
136497
+ return import("./python-3df35a65.js");
136501
136498
  }
136502
136499
  }
136503
136500
  });
@@ -136546,7 +136543,7 @@ registerLanguage({
136546
136543
  mimetypes: ["text/x-cshtml"],
136547
136544
  loader: () => {
136548
136545
  {
136549
- return import("./razor-a34c712c.js");
136546
+ return import("./razor-257de6d5.js");
136550
136547
  }
136551
136548
  }
136552
136549
  });
@@ -136882,7 +136879,7 @@ registerLanguage({
136882
136879
  mimetypes: ["text/typescript"],
136883
136880
  loader: () => {
136884
136881
  {
136885
- return import("./typescript-5889218e.js");
136882
+ return import("./typescript-3e21e66c.js");
136886
136883
  }
136887
136884
  }
136888
136885
  });
@@ -136966,7 +136963,7 @@ registerLanguage({
136966
136963
  mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
136967
136964
  loader: () => {
136968
136965
  {
136969
- return import("./xml-ddade1e8.js");
136966
+ return import("./xml-e8c39dfc.js");
136970
136967
  }
136971
136968
  }
136972
136969
  });
@@ -136983,7 +136980,7 @@ registerLanguage({
136983
136980
  mimetypes: ["application/x-yaml", "text/x-yaml"],
136984
136981
  loader: () => {
136985
136982
  {
136986
- return import("./yaml-5189e3d1.js");
136983
+ return import("./yaml-d67ac605.js");
136987
136984
  }
136988
136985
  }
136989
136986
  });
@@ -137107,7 +137104,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3(
137107
137104
  monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
137108
137105
  function getMode$3() {
137109
137106
  {
137110
- return import("./cssMode-f00a354a.js");
137107
+ return import("./cssMode-d365a465.js");
137111
137108
  }
137112
137109
  }
137113
137110
  monaco_editor_core_exports$3.languages.onLanguage("less", () => {
@@ -137238,7 +137235,7 @@ monaco_editor_core_exports$2.languages.html = {
137238
137235
  };
137239
137236
  function getMode$2() {
137240
137237
  {
137241
- return import("./htmlMode-f37dc203.js");
137238
+ return import("./htmlMode-dea1e902.js");
137242
137239
  }
137243
137240
  }
137244
137241
  function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
@@ -137336,7 +137333,7 @@ var getWorker = () => getMode$1().then((mode) => mode.getWorker());
137336
137333
  monaco_editor_core_exports$1.languages.json = { jsonDefaults, getWorker };
137337
137334
  function getMode$1() {
137338
137335
  {
137339
- return import("./jsonMode-9dece0a1.js");
137336
+ return import("./jsonMode-658e571c.js");
137340
137337
  }
137341
137338
  }
137342
137339
  monaco_editor_core_exports$1.languages.register({
@@ -137612,7 +137609,7 @@ monaco_editor_core_exports.languages.typescript = {
137612
137609
  };
137613
137610
  function getMode() {
137614
137611
  {
137615
- return import("./tsMode-364628ce.js");
137612
+ return import("./tsMode-518df584.js");
137616
137613
  }
137617
137614
  }
137618
137615
  monaco_editor_core_exports.languages.onLanguage("typescript", () => {
@@ -186889,7 +186886,7 @@ memo(
186889
186886
  }
186890
186887
  );
186891
186888
  function Map301Panel(props) {
186892
- const { onSuccess } = props;
186889
+ const { onClose } = props;
186893
186890
  const [items, setItems] = React__default.useState([]);
186894
186891
  const [changed, setChanged] = React__default.useState(false);
186895
186892
  const [selectedIndexes, setSelectedIndexes] = React__default.useState([]);
@@ -186898,7 +186895,7 @@ function Map301Panel(props) {
186898
186895
  newThemeIconConfigOptions(theme)
186899
186896
  );
186900
186897
  const [save, { isMutating }] = useUpsertOneThemeConfig({
186901
- onSuccess
186898
+ //onSuccess: onClose,
186902
186899
  });
186903
186900
  useEffect(() => {
186904
186901
  var _a3;
@@ -186951,6 +186948,9 @@ function Map301Panel(props) {
186951
186948
  redirects: items.map(({ oldUrl, newUrl }) => `${oldUrl},${newUrl}`).join("\n")
186952
186949
  });
186953
186950
  };
186951
+ const handleCancel = () => {
186952
+ onClose == null ? void 0 : onClose();
186953
+ };
186954
186954
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 p-0 min-h-0 flex flex-col", children: [
186955
186955
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-7 py-4 pr-4", children: [
186956
186956
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
@@ -187007,16 +187007,19 @@ function Map301Panel(props) {
187007
187007
  ))
187008
187008
  ] }),
187009
187009
  /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {}),
187010
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-end gap-2 px-4 py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
187011
- Button$2,
187012
- {
187013
- color: "primary",
187014
- disabled: isLoading || !changed,
187015
- isLoading: isMutating,
187016
- onPress: handleSave,
187017
- children: "保存"
187018
- }
187019
- ) })
187010
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-end gap-2 px-4 py-2", children: [
187011
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { variant: "flat", onPress: handleCancel, children: "关闭" }),
187012
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
187013
+ Button$2,
187014
+ {
187015
+ color: "primary",
187016
+ isDisabled: isLoading || !changed,
187017
+ isLoading: isMutating,
187018
+ onPress: handleSave,
187019
+ children: "保存"
187020
+ }
187021
+ )
187022
+ ] })
187020
187023
  ] });
187021
187024
  }
187022
187025
  function ConfigDrawer() {
@@ -187049,7 +187052,7 @@ function ConfigDrawer() {
187049
187052
  openSettingsType === ThemeConfigType.Extends && /* @__PURE__ */ jsxRuntimeExports.jsx(ExtendsPanel, {}),
187050
187053
  openSettingsType === ThemeConfigType.WebsiteInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(WebsiteInfoPanel, { onSuccess: () => setOpenSettingsType(void 0) }),
187051
187054
  openSettingsType === ThemeConfigType.EmailTemplates && /* @__PURE__ */ jsxRuntimeExports.jsx(EmialTemplatesPanel, { onSuccess: () => setOpenSettingsType(void 0) }),
187052
- openSettingsType === ThemeConfigType.Redirects && /* @__PURE__ */ jsxRuntimeExports.jsx(Map301Panel, { onSuccess: () => setOpenSettingsType(void 0) })
187055
+ openSettingsType === ThemeConfigType.Redirects && /* @__PURE__ */ jsxRuntimeExports.jsx(Map301Panel, { onClose: () => setOpenSettingsType(void 0) })
187053
187056
  ]
187054
187057
  }
187055
187058
  );
@@ -188444,7 +188447,7 @@ function useImportTheme() {
188444
188447
  const [upserPage] = useUpsertOnePage({ showSuccess: false });
188445
188448
  const setError = useSetRecoilState(globalErrorState);
188446
188449
  const handleImport = async (data) => {
188447
- var _a3, _b3, _c2, _d2, _e2;
188450
+ var _a3, _b3, _c2, _d2, _e2, _f2, _g2;
188448
188451
  setIsImporting(true);
188449
188452
  try {
188450
188453
  if (!data || !theme)
@@ -188454,8 +188457,9 @@ function useImportTheme() {
188454
188457
  //这连个字段不需要导入
188455
188458
  //name: data.theme?.name || "默认主题",
188456
188459
  //description: data.theme?.description,
188457
- settings: (_a3 = data.theme) == null ? void 0 : _a3.settings,
188458
- styleConfig: ((_b3 = data.theme) == null ? void 0 : _b3.styleConfig) ? { ...(_c2 = data.theme) == null ? void 0 : _c2.styleConfig, id: void 0 } : void 0
188460
+ config: ((_a3 = data.theme) == null ? void 0 : _a3.config) ? { ...(_b3 = data.theme) == null ? void 0 : _b3.config, id: void 0 } : void 0,
188461
+ settings: (_c2 = data.theme) == null ? void 0 : _c2.settings,
188462
+ styleConfig: ((_d2 = data.theme) == null ? void 0 : _d2.styleConfig) ? { ...(_e2 = data.theme) == null ? void 0 : _e2.styleConfig, id: void 0 } : void 0
188459
188463
  };
188460
188464
  const savedTheme = await upsertTheme(themeToInput(baseTheme));
188461
188465
  const componentIdMap = [];
@@ -188501,8 +188505,8 @@ function useImportTheme() {
188501
188505
  id: savedPage.id
188502
188506
  });
188503
188507
  }
188504
- const comCategories = (_d2 = data.theme) == null ? void 0 : _d2.componentCategories;
188505
- const templateCategories = (_e2 = data.theme) == null ? void 0 : _e2.templateCategories;
188508
+ const comCategories = (_f2 = data.theme) == null ? void 0 : _f2.componentCategories;
188509
+ const templateCategories = (_g2 = data.theme) == null ? void 0 : _g2.templateCategories;
188506
188510
  const newTheme = {
188507
188511
  id: theme == null ? void 0 : theme.id,
188508
188512
  pages: pageRefs || [],
@@ -200816,4 +200820,4 @@ export {
200816
200820
  typescriptDefaults as t,
200817
200821
  useCustomizedMaterials as u
200818
200822
  };
200819
- //# sourceMappingURL=index-1a250dd3.js.map
200823
+ //# sourceMappingURL=index-b67688cb.js.map