@bigbinary/neeto-themes-frontend 1.2.1 → 1.2.3

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { shallow } from 'zustand/shallow';
2
- import { useEffect, createElement, memo, useState, useRef, useCallback } from 'react';
2
+ import { useEffect, createElement, useState, useRef, memo, useCallback } from 'react';
3
3
  import { t as t$1 } from 'i18next';
4
4
  import { withImmutableActions, useMutationWithInvalidation, withT, withTitle } from '@bigbinary/neeto-commons-frontend/react-utils';
5
5
  import Spinner from '@bigbinary/neetoui/Spinner';
@@ -7,7 +7,7 @@ import { create as create$1 } from 'zustand';
7
7
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
8
8
  import { isNotPresent, snakeToCamelCase, filterBy, isPresent, isNot, findBy, findIndexBy, toLabelAndValue, humanize, isNotEmpty } from '@bigbinary/neeto-cist';
9
9
  import Alert from '@bigbinary/neetoui/Alert';
10
- import { useTranslation } from 'react-i18next';
10
+ import { useTranslation, Trans } from 'react-i18next';
11
11
  import '@babel/runtime/helpers/asyncToGenerator';
12
12
  import '@babel/runtime/regenerator';
13
13
  import '@bigbinary/neetoui/Toastr';
@@ -16,11 +16,13 @@ import axios from 'axios';
16
16
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
17
17
  import { prop, isEmpty, negate } from 'ramda';
18
18
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
19
+ import { Close, LeftArrow, Plus } from '@bigbinary/neeto-icons';
19
20
  import Button from '@bigbinary/neetoui/Button';
21
+ import Popover from '@bigbinary/neetoui/Popover';
22
+ import Typography from '@bigbinary/neetoui/Typography';
20
23
  import Form from '@bigbinary/neetoui/formik/Form';
21
24
  import * as yup from 'yup';
22
25
  import { useFormikContext } from 'formik';
23
- import Typography from '@bigbinary/neetoui/Typography';
24
26
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
25
27
  import { ImageUploader } from '@bigbinary/neeto-image-uploader-frontend';
26
28
  import { joinHyphenCase } from '@bigbinary/neeto-commons-frontend/utils';
@@ -30,10 +32,8 @@ import { Slider } from 'antd';
30
32
  import Switch from '@bigbinary/neetoui/Switch';
31
33
  import Input from '@bigbinary/neetoui/formik/Input';
32
34
  import Search from '@bigbinary/neeto-molecules/Search';
33
- import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
34
- import Tag from '@bigbinary/neetoui/Tag';
35
35
  import classnames from 'classnames';
36
- import { LeftArrow, Plus } from '@bigbinary/neeto-icons';
36
+ import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
37
37
 
38
38
  /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
39
39
  var useConfigStore = create$1(withImmutableActions(function (set) {
@@ -545,8 +545,8 @@ var ColorBlock = function ColorBlock(_ref) {
545
545
  });
546
546
  };
547
547
 
548
- function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
549
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
548
+ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
549
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
550
550
  var FontPickerBlock = function FontPickerBlock(_ref) {
551
551
  var label = _ref.label,
552
552
  _ref$placeholder = _ref.placeholder,
@@ -572,7 +572,7 @@ var FontPickerBlock = function FontPickerBlock(_ref) {
572
572
  styles: {
573
573
  option: function option(styles, _ref2) {
574
574
  var data = _ref2.data;
575
- return _objectSpread$2(_objectSpread$2({}, styles), {}, {
575
+ return _objectSpread$3(_objectSpread$3({}, styles), {}, {
576
576
  fontFamily: data.value
577
577
  });
578
578
  }
@@ -637,8 +637,8 @@ var SliderBlock = function SliderBlock(_ref) {
637
637
  };
638
638
 
639
639
  var _excluded = ["label", "name"];
640
- function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
641
- function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
640
+ function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
641
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
642
642
  var SwitchBlock = function SwitchBlock(_ref) {
643
643
  var label = _ref.label,
644
644
  name = _ref.name,
@@ -648,23 +648,22 @@ var SwitchBlock = function SwitchBlock(_ref) {
648
648
  children: [/*#__PURE__*/jsx(Typography, {
649
649
  style: "body2",
650
650
  children: label
651
- }), /*#__PURE__*/jsx(Switch, _objectSpread$1({}, _objectSpread$1({
651
+ }), /*#__PURE__*/jsx(Switch, _objectSpread$2({}, _objectSpread$2({
652
652
  name: name
653
653
  }, switchProps)))]
654
654
  });
655
655
  };
656
656
 
657
- var Properties = function Properties() {
657
+ var Properties = function Properties(_ref) {
658
+ var onPropertiesChange = _ref.onPropertiesChange;
658
659
  var _useTranslation = useTranslation(),
659
660
  t = _useTranslation.t;
660
661
  var _useConfigStore = useConfigStore(function (store) {
661
662
  return {
662
- themePropertiesSchema: store["themePropertiesSchema"],
663
- onPropertiesChange: store["onPropertiesChange"]
663
+ themePropertiesSchema: store["themePropertiesSchema"]
664
664
  };
665
665
  }, shallow),
666
- themePropertiesSchema = _useConfigStore.themePropertiesSchema,
667
- onPropertiesChange = _useConfigStore.onPropertiesChange;
666
+ themePropertiesSchema = _useConfigStore.themePropertiesSchema;
668
667
  var _useThemeStore = useThemeStore(function (store) {
669
668
  return {
670
669
  setThemeState: store["setThemeState"]
@@ -678,9 +677,9 @@ var Properties = function Properties() {
678
677
  setVariable = _useThemeUtils.setVariable,
679
678
  setTheme = _useThemeUtils.setTheme;
680
679
  var handleColorChange = function handleColorChange(name) {
681
- return function (_ref) {
682
- var hex = _ref.hex,
683
- rgb = _ref.rgb;
680
+ return function (_ref2) {
681
+ var hex = _ref2.hex,
682
+ rgb = _ref2.rgb;
684
683
  handleChange(name, hex, "".concat(rgb.r, ", ").concat(rgb.g, ", ").concat(rgb.b, ", ").concat(rgb.a));
685
684
  };
686
685
  };
@@ -717,27 +716,27 @@ var Properties = function Properties() {
717
716
  className: "divide-y divide-gray-200",
718
717
  children: [filterBy({
719
718
  kind: "font_family"
720
- }, values.properties).map(function (_ref2) {
721
- var key = _ref2.key,
722
- value = _ref2.value,
723
- kind = _ref2.kind;
719
+ }, values.properties).map(function (_ref3) {
720
+ var key = _ref3.key,
721
+ value = _ref3.value,
722
+ kind = _ref3.kind;
724
723
  return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsx(FontPickerBlock, {
725
724
  label: buildLabel(key, kind),
726
725
  options: FONT_OPTIONS,
727
726
  value: findBy({
728
727
  value: value || null
729
728
  }, FONT_OPTIONS),
730
- onChange: function onChange(_ref3) {
731
- var value = _ref3.value;
729
+ onChange: function onChange(_ref4) {
730
+ var value = _ref4.value;
732
731
  handleChange(key, value);
733
732
  }
734
733
  }, key);
735
734
  }), filterBy({
736
735
  kind: "color"
737
- }, values.properties).map(function (_ref4) {
738
- var key = _ref4.key,
739
- value = _ref4.value,
740
- kind = _ref4.kind;
736
+ }, values.properties).map(function (_ref5) {
737
+ var key = _ref5.key,
738
+ value = _ref5.value,
739
+ kind = _ref5.kind;
741
740
  return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsx(ColorBlock, {
742
741
  color: value,
743
742
  label: buildLabel(key, kind),
@@ -745,10 +744,10 @@ var Properties = function Properties() {
745
744
  }, key);
746
745
  }), filterBy({
747
746
  kind: "overlay_opacity"
748
- }, values.properties).map(function (_ref5) {
749
- var key = _ref5.key,
750
- value = _ref5.value,
751
- kind = _ref5.kind;
747
+ }, values.properties).map(function (_ref6) {
748
+ var key = _ref6.key,
749
+ value = _ref6.value,
750
+ kind = _ref6.kind;
752
751
  return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsx(SliderBlock, {
753
752
  label: buildLabel(key, kind),
754
753
  marks: OVERLAY_OPACITY_SLIDER_MARKS,
@@ -761,11 +760,11 @@ var Properties = function Properties() {
761
760
  }, key);
762
761
  }), filterBy({
763
762
  kind: "position_selector"
764
- }, values.properties).map(function (_ref6) {
763
+ }, values.properties).map(function (_ref7) {
765
764
  var _findBy;
766
- var key = _ref6.key,
767
- kind = _ref6.kind,
768
- value = _ref6.value;
765
+ var key = _ref7.key,
766
+ kind = _ref7.kind,
767
+ value = _ref7.value;
769
768
  var index = findIndexBy({
770
769
  key: key
771
770
  }, values.properties);
@@ -783,10 +782,10 @@ var Properties = function Properties() {
783
782
  }, key);
784
783
  }), filterBy({
785
784
  kind: "boolean"
786
- }, values.properties).map(function (_ref7) {
787
- var key = _ref7.key,
788
- kind = _ref7.kind,
789
- value = _ref7.value;
785
+ }, values.properties).map(function (_ref8) {
786
+ var key = _ref8.key,
787
+ kind = _ref8.kind,
788
+ value = _ref8.value;
790
789
  var index = findIndexBy({
791
790
  key: key
792
791
  }, values.properties);
@@ -814,20 +813,33 @@ var ThemeMeta = withT(function (_ref) {
814
813
  });
815
814
  });
816
815
 
817
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
818
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
816
+ function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
817
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
819
818
  var Customize = function Customize(_ref) {
820
819
  var themeId = _ref.themeId,
821
820
  theme = _ref.theme,
822
- onCreateTheme = _ref.onCreateTheme;
821
+ onCreateTheme = _ref.onCreateTheme,
822
+ onApplyTheme = _ref.onApplyTheme,
823
+ isApplyingTheme = _ref.isApplyingTheme,
824
+ onPropertiesChange = _ref.onPropertiesChange;
823
825
  var _useTranslation = useTranslation(),
824
826
  t = _useTranslation.t;
827
+ var _useState = useState({}),
828
+ _useState2 = _slicedToArray(_useState, 2),
829
+ popoverInstance = _useState2[0],
830
+ setPopoverInstance = _useState2[1];
825
831
  var _useConfigStore = useConfigStore(function (store) {
826
832
  return {
827
- themePropertiesSchema: store["themePropertiesSchema"]
833
+ themePropertiesSchema: store["themePropertiesSchema"],
834
+ entityType: store["entityType"]
828
835
  };
829
836
  }, shallow),
830
- themePropertiesSchema = _useConfigStore.themePropertiesSchema;
837
+ themePropertiesSchema = _useConfigStore.themePropertiesSchema,
838
+ entityType = _useConfigStore.entityType;
839
+ var _useThemeUtils = useThemeUtils(),
840
+ currentTheme = _useThemeUtils.currentTheme;
841
+ var isEditingCurrentlyAppliedTheme = themeId === (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id);
842
+ var submitBtnRef = useRef(null);
831
843
  var _useCreateTheme = useCreateTheme(),
832
844
  createTheme = _useCreateTheme.mutate,
833
845
  isCreating = _useCreateTheme.isLoading;
@@ -838,7 +850,7 @@ var Customize = function Customize(_ref) {
838
850
  var onSubmit = function onSubmit(values, _ref2) {
839
851
  var resetForm = _ref2.resetForm;
840
852
  var imageData = buildImageData(values, themePropertiesSchema);
841
- var themeToSave = _objectSpread({
853
+ var themeToSave = _objectSpread$1({
842
854
  propertiesAttributes: values.properties,
843
855
  name: values.name
844
856
  }, imageData);
@@ -846,6 +858,9 @@ var Customize = function Customize(_ref) {
846
858
  return createTheme(themeToSave, {
847
859
  onSuccess: function onSuccess(_ref3) {
848
860
  var theme = _ref3.theme;
861
+ resetForm({
862
+ values: values
863
+ });
849
864
  onCreateTheme(theme);
850
865
  }
851
866
  });
@@ -870,7 +885,9 @@ var Customize = function Customize(_ref) {
870
885
  className: "neeto-themes-sidebar__scroll",
871
886
  children: [/*#__PURE__*/jsxs("div", {
872
887
  className: "flex flex-col gap-6 p-4",
873
- children: [/*#__PURE__*/jsx(ThemeMeta, {}), /*#__PURE__*/jsx(Properties, {}), filterBy({
888
+ children: [/*#__PURE__*/jsx(ThemeMeta, {}), /*#__PURE__*/jsx(Properties, {
889
+ onPropertiesChange: onPropertiesChange
890
+ }), filterBy({
874
891
  kind: "image"
875
892
  }, themePropertiesSchema).map(function (_ref5) {
876
893
  var key = _ref5.key;
@@ -891,14 +908,127 @@ var Customize = function Customize(_ref) {
891
908
  disabled: !dirty && (theme === null || theme === void 0 ? void 0 : theme.id) || isSubmitting,
892
909
  label: t("neetoThemes.buttons.save"),
893
910
  loading: isSubmitting,
911
+ ref: submitBtnRef,
894
912
  type: "submit"
895
913
  })]
914
+ }), /*#__PURE__*/jsx(Popover, {
915
+ appendTo: function appendTo() {
916
+ return document.body;
917
+ },
918
+ disabled: isEditingCurrentlyAppliedTheme,
919
+ position: "top",
920
+ reference: submitBtnRef,
921
+ trigger: "click",
922
+ content: /*#__PURE__*/jsxs("div", {
923
+ className: "flex flex-col items-start gap-2",
924
+ children: [/*#__PURE__*/jsx(Button, {
925
+ className: "absolute right-1 top-1 z-0",
926
+ icon: Close,
927
+ size: "small",
928
+ style: "text",
929
+ onClick: function onClick() {
930
+ var _popoverInstance$hide;
931
+ return popoverInstance === null || popoverInstance === void 0 || (_popoverInstance$hide = popoverInstance.hide) === null || _popoverInstance$hide === void 0 ? void 0 : _popoverInstance$hide.call(popoverInstance);
932
+ }
933
+ }), /*#__PURE__*/jsx(Typography, {
934
+ className: "w-72 pr-5",
935
+ style: "body2",
936
+ weight: "normal",
937
+ children: /*#__PURE__*/jsx(Trans, {
938
+ components: {
939
+ bold: /*#__PURE__*/jsx("strong", {})
940
+ },
941
+ i18nKey: "neetoThemes.build.leftSideBar.themes.notAppliedYet",
942
+ values: {
943
+ entityType: entityType
944
+ }
945
+ })
946
+ }), /*#__PURE__*/jsx(Button, {
947
+ disabled: isApplyingTheme,
948
+ label: t("neetoThemes.buttons.applyThisTheme"),
949
+ loading: isApplyingTheme,
950
+ onClick: function onClick() {
951
+ return onApplyTheme(theme);
952
+ }
953
+ })]
954
+ }),
955
+ onMount: setPopoverInstance
896
956
  })]
897
957
  });
898
958
  }
899
959
  });
900
960
  };
901
961
 
962
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
963
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
964
+ var Check = function Check(props) {
965
+ return /*#__PURE__*/jsxs("svg", _objectSpread(_objectSpread({
966
+ fill: "none",
967
+ height: "24",
968
+ viewBox: "0 0 24 24",
969
+ width: "24",
970
+ xmlns: "http://www.w3.org/2000/svg"
971
+ }, props), {}, {
972
+ children: [/*#__PURE__*/jsxs("g", {
973
+ filter: "url(#filter0_d_9519_161)",
974
+ children: [/*#__PURE__*/jsx("rect", {
975
+ fill: "#4558F9",
976
+ height: "20",
977
+ rx: "10",
978
+ width: "20",
979
+ x: "2",
980
+ y: "2"
981
+ }), /*#__PURE__*/jsx("rect", {
982
+ height: "20",
983
+ rx: "10",
984
+ stroke: "#fff",
985
+ strokeWidth: "1.5",
986
+ width: "20",
987
+ x: "2",
988
+ y: "2"
989
+ }), /*#__PURE__*/jsx("path", {
990
+ d: "M16.375 9.5l-5.95 6.25-2.8-2.941",
991
+ stroke: "#fff",
992
+ strokeLinecap: "round",
993
+ strokeLinejoin: "round",
994
+ strokeWidth: "1.25"
995
+ })]
996
+ }), /*#__PURE__*/jsx("defs", {
997
+ children: /*#__PURE__*/jsxs("filter", {
998
+ colorInterpolationFilters: "sRGB",
999
+ filterUnits: "userSpaceOnUse",
1000
+ height: "23.5",
1001
+ id: "filter0_d_9519_161",
1002
+ width: "23.5",
1003
+ x: "0.25",
1004
+ y: "0.25",
1005
+ children: [/*#__PURE__*/jsx("feFlood", {
1006
+ floodOpacity: "0",
1007
+ result: "BackgroundImageFix"
1008
+ }), /*#__PURE__*/jsx("feColorMatrix", {
1009
+ "in": "SourceAlpha",
1010
+ result: "hardAlpha",
1011
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
1012
+ }), /*#__PURE__*/jsx("feOffset", {}), /*#__PURE__*/jsx("feGaussianBlur", {
1013
+ stdDeviation: "0.5"
1014
+ }), /*#__PURE__*/jsx("feComposite", {
1015
+ in2: "hardAlpha",
1016
+ operator: "out"
1017
+ }), /*#__PURE__*/jsx("feColorMatrix", {
1018
+ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.09 0"
1019
+ }), /*#__PURE__*/jsx("feBlend", {
1020
+ in2: "BackgroundImageFix",
1021
+ result: "effect1_dropShadow_9519_161"
1022
+ }), /*#__PURE__*/jsx("feBlend", {
1023
+ "in": "SourceGraphic",
1024
+ in2: "effect1_dropShadow_9519_161",
1025
+ result: "shape"
1026
+ })]
1027
+ })
1028
+ })]
1029
+ }));
1030
+ };
1031
+
902
1032
  var Thumbnail = function Thumbnail(_ref) {
903
1033
  var _theme$snakeToCamelCa, _findBy, _findBy2;
904
1034
  var active = _ref.active,
@@ -985,35 +1115,17 @@ var Card = function Card(_ref) {
985
1115
  onSetPreviewTheme = _ref.onSetPreviewTheme,
986
1116
  onDeleteTheme = _ref.onDeleteTheme,
987
1117
  onEditTheme = _ref.onEditTheme,
988
- applyTheme = _ref.applyTheme,
989
1118
  theme = _ref.theme,
990
1119
  isApplyingTheme = _ref.isApplyingTheme,
991
1120
  onCloneTheme = _ref.onCloneTheme,
992
1121
  isHighLightedTheme = _ref.isHighLightedTheme,
993
- setThemeBeingApplied = _ref.setThemeBeingApplied,
1122
+ onApplyTheme = _ref.onApplyTheme,
994
1123
  Thumbnail$1 = _ref.thumbnail;
995
1124
  var _useTranslation = useTranslation(),
996
1125
  t = _useTranslation.t;
997
1126
  var id = theme.id,
998
1127
  name = theme.name,
999
1128
  appliedCount = theme.appliedCount;
1000
- var _useConfigStore = useConfigStore(function (store) {
1001
- return {
1002
- entityId: store["entityId"],
1003
- entityType: store["entityType"]
1004
- };
1005
- }, shallow),
1006
- entityId = _useConfigStore.entityId,
1007
- entityType = _useConfigStore.entityType;
1008
- var handleApplyThemeClick = function handleApplyThemeClick() {
1009
- if (isApplyingTheme) return;
1010
- setThemeBeingApplied(theme);
1011
- applyTheme({
1012
- themeId: theme.id,
1013
- entityId: entityId,
1014
- entityType: entityType
1015
- });
1016
- };
1017
1129
  var handleCloneTheme = function handleCloneTheme() {
1018
1130
  return onCloneTheme(theme);
1019
1131
  };
@@ -1023,55 +1135,73 @@ var Card = function Card(_ref) {
1023
1135
  var handleDeleteTheme = function handleDeleteTheme() {
1024
1136
  return onDeleteTheme(id, name, appliedCount);
1025
1137
  };
1026
- return /*#__PURE__*/jsxs("div", {
1138
+ return /*#__PURE__*/jsx("div", {
1027
1139
  className: "group space-y-2 pt-0.5",
1028
1140
  "data-cy": active ? "active-theme-card" : "theme-card",
1029
1141
  id: theme.id,
1030
- children: [/*#__PURE__*/jsx("div", {
1142
+ children: /*#__PURE__*/jsxs("div", {
1143
+ className: classnames("neeto-themes-theme-thumbnail neeto-ui-rounded-lg cursor-pointer border transition-all duration-300 ease-in-out", {
1144
+ "neeto-ui-border-gray-200": !active,
1145
+ "neeto-themes-theme-thumbnail--active": active,
1146
+ "neeto-themes-theme-thumbnail--preview-active": isPreviewing,
1147
+ "neeto-themes-theme-thumbnail--highlight-active": isHighLightedTheme
1148
+ }),
1031
1149
  onClick: function onClick() {
1032
1150
  return onSetPreviewTheme(theme);
1033
1151
  },
1034
- children: Thumbnail$1 ? /*#__PURE__*/jsx(Thumbnail$1, {
1035
- active: active,
1036
- isHighLightedTheme: isHighLightedTheme,
1037
- isPreviewing: isPreviewing,
1038
- theme: theme
1039
- }) : /*#__PURE__*/jsx(Thumbnail, {
1040
- active: active,
1041
- isHighLightedTheme: isHighLightedTheme,
1042
- isPreviewing: isPreviewing,
1043
- theme: theme
1044
- })
1045
- }), /*#__PURE__*/jsxs("div", {
1046
- className: "flex items-start justify-between gap-1",
1047
- children: [/*#__PURE__*/jsx(Typography, {
1048
- className: "line-clamp-2 min-w-0 flex-grow break-words pt-1",
1049
- "data-cy": "theme-name",
1050
- lineHeight: "snug",
1051
- style: "body2",
1052
- children: name
1152
+ children: [/*#__PURE__*/jsxs("div", {
1153
+ className: "neeto-ui-rounded-lg relative overflow-hidden rounded-bl-none rounded-br-none transition-all duration-300 ease-in-out group-hover:opacity-85",
1154
+ children: [/*#__PURE__*/jsx("div", {
1155
+ className: "absolute right-0 top-0 p-3",
1156
+ children: active ? /*#__PURE__*/jsx(Check, {
1157
+ className: "flex-shrink-0",
1158
+ "data-cy": "active-theme-label"
1159
+ }) : /*#__PURE__*/jsx("div", {
1160
+ className: classnames({
1161
+ hidden: !isPreviewing,
1162
+ "group-hover:block": true
1163
+ }),
1164
+ children: /*#__PURE__*/jsx(Button, {
1165
+ className: "neeto-themes-theme-thumbnail__apply-btn flex-shrink-0",
1166
+ "data-cy": "apply-theme-button",
1167
+ disabled: isApplyingTheme,
1168
+ label: t("neetoThemes.common.apply"),
1169
+ loading: isApplyingTheme,
1170
+ size: "small",
1171
+ style: "tertiary",
1172
+ onClick: function onClick() {
1173
+ return onApplyTheme(theme);
1174
+ }
1175
+ })
1176
+ })
1177
+ }), Thumbnail$1 ? /*#__PURE__*/jsx(Thumbnail$1, {
1178
+ active: active,
1179
+ isHighLightedTheme: isHighLightedTheme,
1180
+ isPreviewing: isPreviewing,
1181
+ theme: theme
1182
+ }) : /*#__PURE__*/jsx(Thumbnail, {
1183
+ active: active,
1184
+ isHighLightedTheme: isHighLightedTheme,
1185
+ isPreviewing: isPreviewing,
1186
+ theme: theme
1187
+ })]
1053
1188
  }), /*#__PURE__*/jsxs("div", {
1054
- className: "flex items-center gap-2",
1055
- children: [active ? /*#__PURE__*/jsx(Tag, {
1056
- className: "flex-shrink-0",
1057
- "data-cy": "active-theme-label",
1058
- label: t("neetoThemes.common.active"),
1059
- style: "success"
1060
- }) : /*#__PURE__*/jsx(Button, {
1061
- className: "flex-shrink-0",
1062
- "data-cy": "apply-theme-button",
1063
- disabled: isApplyingTheme,
1064
- label: t("neetoThemes.common.apply"),
1065
- loading: isApplyingTheme,
1066
- size: "small",
1067
- style: "link",
1068
- onClick: handleApplyThemeClick
1189
+ className: "flex items-start justify-between gap-1 p-3",
1190
+ children: [/*#__PURE__*/jsx(Typography, {
1191
+ className: "line-clamp-2 min-w-0 flex-grow break-words pt-1",
1192
+ "data-cy": "theme-name",
1193
+ lineHeight: "snug",
1194
+ style: "body2",
1195
+ children: name
1069
1196
  }), /*#__PURE__*/jsx(MoreDropdown, {
1070
1197
  dropdownButtonProps: {
1071
1198
  size: "small"
1072
1199
  },
1073
1200
  dropdownProps: {
1074
- strategy: "fixed"
1201
+ strategy: "fixed",
1202
+ onClick: function onClick(e) {
1203
+ return e.stopPropagation();
1204
+ }
1075
1205
  },
1076
1206
  menuItems: [{
1077
1207
  key: "edit",
@@ -1095,7 +1225,7 @@ var Card = function Card(_ref) {
1095
1225
  }]
1096
1226
  })]
1097
1227
  })]
1098
- })]
1228
+ })
1099
1229
  });
1100
1230
  };
1101
1231
  var Card$1 = /*#__PURE__*/memo(Card);
@@ -1108,12 +1238,14 @@ var Themes = function Themes(_ref) {
1108
1238
  defaultThemes = _ref$defaultThemes === void 0 ? [] : _ref$defaultThemes,
1109
1239
  onDeleteTheme = _ref.onDeleteTheme,
1110
1240
  themeToHighlight = _ref.themeToHighlight,
1111
- highlightTheme = _ref.highlightTheme,
1112
1241
  didScrollActiveThemeIntoView = _ref.didScrollActiveThemeIntoView,
1113
1242
  isLoading = _ref.isLoading,
1114
1243
  currentTheme = _ref.currentTheme,
1115
1244
  isCurrentThemeLoading = _ref.isCurrentThemeLoading,
1116
- thumbnail = _ref.thumbnail;
1245
+ thumbnail = _ref.thumbnail,
1246
+ themeBeingApplied = _ref.themeBeingApplied,
1247
+ onApplyTheme = _ref.onApplyTheme,
1248
+ isApplyingTheme = _ref.isApplyingTheme;
1117
1249
  var _useTranslation = useTranslation(),
1118
1250
  t = _useTranslation.t;
1119
1251
  var _useThemeUtils = useThemeUtils(),
@@ -1130,24 +1262,8 @@ var Themes = function Themes(_ref) {
1130
1262
  _useState2 = _slicedToArray(_useState, 2),
1131
1263
  searchQuery = _useState2[0],
1132
1264
  setSearchQuery = _useState2[1];
1133
- var _useState3 = useState({}),
1134
- _useState4 = _slicedToArray(_useState3, 2),
1135
- themeBeingApplied = _useState4[0],
1136
- setThemeBeingApplied = _useState4[1];
1137
1265
  var _useCloneTheme = useCloneTheme(),
1138
1266
  cloneTheme = _useCloneTheme.mutate;
1139
- var _useApplyTheme = useApplyTheme({
1140
- onSuccess: function onSuccess(_ref2) {
1141
- var theme = _ref2.theme;
1142
- setTheme(theme);
1143
- setThemeState({
1144
- previewingTheme: theme
1145
- });
1146
- setThemeBeingApplied({});
1147
- }
1148
- }),
1149
- applyTheme = _useApplyTheme.mutate,
1150
- isApplyingTheme = _useApplyTheme.isLoading;
1151
1267
  useEffect(function () {
1152
1268
  if (didScrollActiveThemeIntoView.current || !(currentTheme !== null && currentTheme !== void 0 && currentTheme.id)) return;
1153
1269
  didScrollActiveThemeIntoView.current = true;
@@ -1170,9 +1286,9 @@ var Themes = function Themes(_ref) {
1170
1286
  var isSearchFieldVisible = (themes === null || themes === void 0 ? void 0 : themes.length) + (defaultThemes === null || defaultThemes === void 0 ? void 0 : defaultThemes.length) > 10;
1171
1287
  var handleCloneTheme = function handleCloneTheme(data) {
1172
1288
  cloneTheme(data.id, {
1173
- onSuccess: function onSuccess(_ref3) {
1174
- var clonedTheme = _ref3.theme;
1175
- highlightTheme(clonedTheme);
1289
+ onSuccess: function onSuccess(_ref2) {
1290
+ var clonedTheme = _ref2.theme;
1291
+ onEditTheme(clonedTheme);
1176
1292
  }
1177
1293
  });
1178
1294
  };
@@ -1207,8 +1323,7 @@ var Themes = function Themes(_ref) {
1207
1323
  className: "flex flex-col gap-4 px-4 pb-10 lg:px-5 xl:px-6",
1208
1324
  children: filteredDefaultThemes.map(function (theme) {
1209
1325
  return /*#__PURE__*/createElement(Card$1, {
1210
- applyTheme: applyTheme,
1211
- setThemeBeingApplied: setThemeBeingApplied,
1326
+ onApplyTheme: onApplyTheme,
1212
1327
  theme: theme,
1213
1328
  thumbnail: thumbnail,
1214
1329
  active: (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === theme.id,
@@ -1235,10 +1350,9 @@ var Themes = function Themes(_ref) {
1235
1350
  var isActive = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === theme.id;
1236
1351
  var isPreviewing = (previewingTheme === null || previewingTheme === void 0 ? void 0 : previewingTheme.id) === theme.id;
1237
1352
  return /*#__PURE__*/createElement(Card$1, {
1238
- applyTheme: applyTheme,
1239
1353
  isPreviewing: isPreviewing,
1354
+ onApplyTheme: onApplyTheme,
1240
1355
  onEditTheme: onEditTheme,
1241
- setThemeBeingApplied: setThemeBeingApplied,
1242
1356
  theme: theme,
1243
1357
  thumbnail: thumbnail,
1244
1358
  active: isActive,
@@ -1318,7 +1432,8 @@ var TitleBar = function TitleBar(_ref) {
1318
1432
  var MemoizedAlert = /*#__PURE__*/memo(Alert);
1319
1433
  var Sidebar = function Sidebar(_ref) {
1320
1434
  var _themeToEdit$current, _themeToEdit$current2, _themeToDelete$curren2, _themeToDelete$curren3;
1321
- var thumbnail = _ref.thumbnail;
1435
+ var thumbnail = _ref.thumbnail,
1436
+ onPropertiesChange = _ref.onPropertiesChange;
1322
1437
  var _useState = useState(DESIGN_SCREENS.THEMES),
1323
1438
  _useState2 = _slicedToArray(_useState, 2),
1324
1439
  currentScreen = _useState2[0],
@@ -1331,6 +1446,10 @@ var Sidebar = function Sidebar(_ref) {
1331
1446
  _useState6 = _slicedToArray(_useState5, 2),
1332
1447
  themeToHighlight = _useState6[0],
1333
1448
  setThemeToHighlight = _useState6[1];
1449
+ var _useState7 = useState({}),
1450
+ _useState8 = _slicedToArray(_useState7, 2),
1451
+ themeBeingApplied = _useState8[0],
1452
+ setThemeBeingApplied = _useState8[1];
1334
1453
  var _useConfigStore = useConfigStore(function (store) {
1335
1454
  return {
1336
1455
  entityType: store["entityType"],
@@ -1369,12 +1488,34 @@ var Sidebar = function Sidebar(_ref) {
1369
1488
  var _useDeleteTheme = useDeleteTheme(),
1370
1489
  deleteTheme = _useDeleteTheme.mutate,
1371
1490
  isDeleting = _useDeleteTheme.isLoading;
1491
+ var _useApplyTheme = useApplyTheme({
1492
+ onSuccess: function onSuccess(_ref2) {
1493
+ var theme = _ref2.theme;
1494
+ setTheme(theme);
1495
+ setThemeState({
1496
+ previewingTheme: theme
1497
+ });
1498
+ setThemeBeingApplied({});
1499
+ setCurrentScreen(DESIGN_SCREENS.THEMES);
1500
+ }
1501
+ }),
1502
+ applyTheme = _useApplyTheme.mutate,
1503
+ isApplyingTheme = _useApplyTheme.isLoading;
1372
1504
  var themeToDelete = useRef(null);
1373
1505
  var themeToEdit = useRef(null);
1374
1506
  var handleEditTheme = function handleEditTheme(theme) {
1375
1507
  themeToEdit.current = theme;
1376
1508
  setCurrentScreen(DESIGN_SCREENS.Customize);
1377
1509
  };
1510
+ var onApplyTheme = function onApplyTheme(theme) {
1511
+ if (isApplyingTheme) return;
1512
+ setThemeBeingApplied(theme);
1513
+ applyTheme({
1514
+ themeId: theme.id,
1515
+ entityId: entityId,
1516
+ entityType: entityType
1517
+ });
1518
+ };
1378
1519
  var handleBackPress = function handleBackPress() {
1379
1520
  setTheme(currentTheme);
1380
1521
  setThemeState({
@@ -1393,13 +1534,11 @@ var Sidebar = function Sidebar(_ref) {
1393
1534
  setThemeToHighlight(themeToHighlight.id);
1394
1535
  };
1395
1536
  var onCreateTheme = function onCreateTheme(createdTheme) {
1396
- setCurrentScreen(DESIGN_SCREENS.THEMES);
1537
+ themeToEdit.current = createdTheme;
1397
1538
  setTheme(createdTheme);
1398
1539
  setThemeState({
1399
1540
  previewingTheme: createdTheme
1400
1541
  });
1401
- highlightTheme(createdTheme);
1402
- themeToEdit.current = null;
1403
1542
  };
1404
1543
  var handleDelete = function handleDelete(themeId, name, appliedCount) {
1405
1544
  setIsDeleteAlertOpen(true);
@@ -1448,7 +1587,10 @@ var Sidebar = function Sidebar(_ref) {
1448
1587
  defaultThemes: defaultThemes,
1449
1588
  didScrollActiveThemeIntoView: didScrollActiveThemeIntoView,
1450
1589
  highlightTheme: highlightTheme,
1590
+ isApplyingTheme: isApplyingTheme,
1451
1591
  isCurrentThemeLoading: isCurrentThemeLoading,
1592
+ onApplyTheme: onApplyTheme,
1593
+ themeBeingApplied: themeBeingApplied,
1452
1594
  themeToHighlight: themeToHighlight,
1453
1595
  themes: themes,
1454
1596
  thumbnail: thumbnail,
@@ -1456,7 +1598,10 @@ var Sidebar = function Sidebar(_ref) {
1456
1598
  onDeleteTheme: handleDelete,
1457
1599
  onEditTheme: handleEditTheme
1458
1600
  }) : /*#__PURE__*/jsx(Customize, {
1601
+ isApplyingTheme: isApplyingTheme,
1602
+ onApplyTheme: onApplyTheme,
1459
1603
  onCreateTheme: onCreateTheme,
1604
+ onPropertiesChange: onPropertiesChange,
1460
1605
  theme: themeToEdit.current,
1461
1606
  themeId: (_themeToEdit$current2 = themeToEdit.current) === null || _themeToEdit$current2 === void 0 ? void 0 : _themeToEdit$current2.id
1462
1607
  }), /*#__PURE__*/jsx(MemoizedAlert, {
@@ -1495,13 +1640,13 @@ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
1495
1640
  useEffect(function () {
1496
1641
  setConfigState({
1497
1642
  entityType: entityType,
1498
- entityId: entityId,
1499
- onPropertiesChange: onPropertiesChange
1643
+ entityId: entityId
1500
1644
  });
1501
1645
  }, []);
1502
1646
  return /*#__PURE__*/jsxs("div", {
1503
1647
  className: "neeto-themes__wrapper",
1504
1648
  children: [/*#__PURE__*/jsx(Sidebar, {
1649
+ onPropertiesChange: onPropertiesChange,
1505
1650
  thumbnail: thumbnail
1506
1651
  }), /*#__PURE__*/jsx("div", {
1507
1652
  className: "neeto-themes-preview__wrapper",
@@ -1516,7 +1661,7 @@ var index = withTitle(NeetoThemesBuilder, t$1("neetoThemes.common.design"));
1516
1661
 
1517
1662
  var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
1518
1663
 
1519
- var css = ".neeto-themes__wrapper{display:flex;width:100%}.neeto-themes__wrapper .neeto-themes-sidebar{background-color:rgb(var(--neeto-ui-white));box-shadow:var(--neeto-ui-shadow-s);height:calc(100vh - 64px);width:240px}@media (min-width:1024px){.neeto-themes__wrapper .neeto-themes-sidebar{width:280px}}@media (min-width:1280px){.neeto-themes__wrapper .neeto-themes-sidebar{width:320px}}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__header{padding-bottom:8px;padding-top:16px}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__scroll{height:calc(100vh - 120px);overflow-y:auto}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__scroll .neeto-ui-colorpicker__target .neeto-ui-colorpicker-target__code{display:none}.neeto-themes__wrapper .neeto-themes-preview__wrapper{flex-grow:1;height:calc(100vh - 64px);position:relative}.neeto-themes-theme-thumbnail--active{border-color:rgb(var(--neeto-ui-primary-500))!important;box-shadow:0 0 0 1px rgb(var(--neeto-ui-primary-500))!important}.neeto-themes-theme-thumbnail--preview-active{border-color:rgb(var(--neeto-ui-gray-700));box-shadow:0 0 0 1px rgb(var(--neeto-ui-gray-700))}.neeto-themes-theme-thumbnail--highlight-active{border-color:rgb(var(--neeto-ui-success-500));box-shadow:0 0 0 1px rgb(var(--neeto-ui-success-500));transition:border-color box-shadow .1s .1s}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3RoZW1lcy5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3R5bGVzaGVldHMvYXBwbGljYXRpb24uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1QkFFRSxZQUFBLENBREEsVUNFRixDRENFLD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GFkb3c6IDBweCAwcHggMHB4IDFweCByZ2IodmFyKC0tbmVldG8tdWktc3VjY2Vzcy01MDApKTtcbn0iXX0= */";
1664
+ var css = ".neeto-themes__wrapper{display:flex;width:100%}.neeto-themes__wrapper .neeto-themes-sidebar{background-color:rgb(var(--neeto-ui-white));box-shadow:var(--neeto-ui-shadow-s);height:calc(100vh - 64px);width:240px}@media (min-width:1024px){.neeto-themes__wrapper .neeto-themes-sidebar{width:280px}}@media (min-width:1280px){.neeto-themes__wrapper .neeto-themes-sidebar{width:320px}}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__header{padding-bottom:8px;padding-top:16px}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__scroll{height:calc(100vh - 120px);overflow-y:auto}.neeto-themes__wrapper .neeto-themes-sidebar .neeto-themes-sidebar__scroll .neeto-ui-colorpicker__target .neeto-ui-colorpicker-target__code{display:none}.neeto-themes__wrapper .neeto-themes-preview__wrapper{flex-grow:1;height:calc(100vh - 64px);position:relative}.neeto-themes-theme-thumbnail--preview-active{border-color:rgb(var(--neeto-ui-gray-600))!important;outline:1px solid rgb(var(--neeto-ui-gray-600))!important}.neeto-themes-theme-thumbnail--active,.neeto-themes-theme-thumbnail--highlight-active{border-color:rgb(var(--neeto-ui-primary-500))!important;outline:2px solid rgb(var(--neeto-ui-primary-500))!important}.neeto-themes-theme-thumbnail__apply-btn{--neeto-ui-btn-padding-x:12px;--neeto-ui-btn-border-radius:100px}.neeto-themes-theme-thumbnail__apply-btn:disabled,.neeto-themes-theme-thumbnail__apply-btn[disabled]{opacity:1!important}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3RoZW1lcy5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3R5bGVzaGVldHMvYXBwbGljYXRpb24uc2NzcyJdLCJuYW1lcyI6W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weCBzb2xpZCByZ2IodmFyKC0tbmVldG8tdWktcHJpbWFyeS01MDApKSAhaW1wb3J0YW50O1xufVxuXG4ubmVldG8tdGhlbWVzLXRoZW1lLXRodW1ibmFpbC0taGlnaGxpZ2h0LWFjdGl2ZSB7XG4gIGJvcmRlci1jb2xvcjogcmdiKHZhcigtLW5lZXRvLXVpLXByaW1hcnktNTAwKSkgIWltcG9ydGFudDtcbiAgb3V0bGluZTogMnB4IHNvbGlkIHJnYih2YXIoLS1uZWV0by11aS1wcmltYXJ5LTUwMCkpICFpbXBvcnRhbnQ7XG59XG5cbi5uZWV0by10aGVtZXMtdGhlbWUtdGh1bWJuYWlsX19hcHBseS1idG4ge1xuICAtLW5lZXRvLXVpLWJ0bi1wYWRkaW5nLXg6IDEycHg7XG4gIC0tbmVldG8tdWktYnRuLWJvcmRlci1yYWRpdXM6IDEwMHB4O1xufVxuLm5lZXRvLXRoZW1lcy10aGVtZS10aHVtYm5haWxfX2FwcGx5LWJ0bjpkaXNhYmxlZCwgLm5lZXRvLXRoZW1lcy10aGVtZS10aHVtYm5haWxfX2FwcGx5LWJ0bltkaXNhYmxlZF0ge1xuICBvcGFjaXR5OiAxICFpbXBvcnRhbnQ7XG59Il19 */";
1520
1665
  n(css,{});
1521
1666
 
1522
1667
  export { index as NeetoThemesBuilder, setTheme, useThemeUtils };