@bigbinary/neeto-themes-frontend 1.1.22 → 1.1.24

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.cjs.js CHANGED
@@ -78,11 +78,11 @@ var Tag__default = /*#__PURE__*/_interopDefaultLegacy(Tag);
78
78
  /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
79
79
  var useConfigStore = zustand.create(reactUtils.withImmutableActions(function (set) {
80
80
  return {
81
- themeConfig: [],
81
+ themePropertiesSchema: [],
82
82
  entityType: "",
83
83
  entityId: "",
84
84
  variableNamesMap: {},
85
- isFetchingConfig: true,
85
+ isFetchingSchema: true,
86
86
  setConfigState: set
87
87
  };
88
88
  }));
@@ -522,22 +522,16 @@ var WHITE = "255, 255, 255";
522
522
  var BLACK = "0, 0, 0";
523
523
 
524
524
  var show$1 = function show(entityId) {
525
- return axios__default["default"].get("".concat(BASE_URL, "/api/v1/theme/entities/").concat(entityId));
526
- };
527
- var create$2 = function create(payload) {
528
- return axios__default["default"].post("".concat(BASE_URL, "/api/v1/theme/entities"), {
529
- entity: payload
530
- });
525
+ return axios__default["default"].get("".concat(BASE_URL, "/api/v1/entities/").concat(entityId));
531
526
  };
532
527
  var entitiesApi = {
533
- show: show$1,
534
- create: create$2
528
+ show: show$1
535
529
  };
536
530
 
537
531
  var QUERY_KEYS$1 = {
538
532
  THEMES_LIST: "themes-list",
539
533
  THEME_DETAILS: "theme-details",
540
- CONFIG_DETAILS: "config-details"
534
+ SCHEMA_DETAILS: "schema-details"
541
535
  };
542
536
 
543
537
  var useShowThemeEntity = function useShowThemeEntity(entityId) {
@@ -547,14 +541,37 @@ var useShowThemeEntity = function useShowThemeEntity(entityId) {
547
541
  enabled: !!entityId
548
542
  });
549
543
  };
550
- var useCreateThemeEntity = function useCreateThemeEntity(_ref) {
551
- var onSuccess = _ref.onSuccess;
552
- return reactUtils.useMutationWithInvalidation(entitiesApi.create, {
553
- keysToInvalidate: [QUERY_KEYS$1.THEMES_LIST, QUERY_KEYS$1.THEME_ENTITY_DETAILS],
554
- onSuccess: onSuccess
555
- });
556
- };
557
544
 
545
+ function _objectWithoutPropertiesLoose$6(source, excluded) {
546
+ if (source == null) return {};
547
+ var target = {};
548
+ var sourceKeys = Object.keys(source);
549
+ var key, i;
550
+ for (i = 0; i < sourceKeys.length; i++) {
551
+ key = sourceKeys[i];
552
+ if (excluded.indexOf(key) >= 0) continue;
553
+ target[key] = source[key];
554
+ }
555
+ return target;
556
+ }
557
+
558
+ function _objectWithoutProperties$6(source, excluded) {
559
+ if (source == null) return {};
560
+ var target = _objectWithoutPropertiesLoose$6(source, excluded);
561
+ var key, i;
562
+ if (Object.getOwnPropertySymbols) {
563
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
564
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
565
+ key = sourceSymbolKeys[i];
566
+ if (excluded.indexOf(key) >= 0) continue;
567
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
568
+ target[key] = source[key];
569
+ }
570
+ }
571
+ return target;
572
+ }
573
+
574
+ var _excluded$9 = ["themeId"];
558
575
  var list$1 = function list() {
559
576
  return axios__default["default"].get("".concat(BASE_URL, "/api/v1/themes"));
560
577
  };
@@ -579,13 +596,21 @@ var destroy = function destroy(id) {
579
596
  var clone = function clone(id) {
580
597
  return axios__default["default"].post("".concat(BASE_URL, "/api/v1/themes/").concat(id, "/clone"));
581
598
  };
599
+ var apply = function apply(_ref2) {
600
+ var themeId = _ref2.themeId,
601
+ payload = _objectWithoutProperties$6(_ref2, _excluded$9);
602
+ return axios__default["default"].post("".concat(BASE_URL, "/api/v1/themes/").concat(themeId, "/apply"), {
603
+ entity: payload
604
+ });
605
+ };
582
606
  var themesApi = {
583
607
  list: list$1,
584
608
  show: show,
585
609
  create: create$1,
586
610
  update: update$1,
587
611
  destroy: destroy,
588
- clone: clone
612
+ clone: clone,
613
+ apply: apply
589
614
  };
590
615
 
591
616
  var useListThemes = function useListThemes() {
@@ -616,17 +641,54 @@ var useCloneTheme = function useCloneTheme() {
616
641
  keysToInvalidate: [QUERY_KEYS$1.THEMES_LIST]
617
642
  });
618
643
  };
644
+ var useApplyTheme = function useApplyTheme(_ref) {
645
+ var onSuccess = _ref.onSuccess;
646
+ return reactUtils.useMutationWithInvalidation(themesApi.apply, {
647
+ keysToInvalidate: [QUERY_KEYS$1.THEMES_LIST, QUERY_KEYS$1.THEME_ENTITY_DETAILS],
648
+ onSuccess: onSuccess
649
+ });
650
+ };
651
+
652
+ var root = document.querySelector(":root");
653
+ var setVariable = function setVariable(name, value, variableNamesMap) {
654
+ var variableName = variableNamesMap[name];
655
+ if (!variableName) return;
656
+ root.style.setProperty(variableName, value);
657
+ };
658
+ var setTheme = function setTheme(theme, variableNamesMap, themeConfig) {
659
+ if (neetoCist.isNotPresent(theme === null || theme === void 0 ? void 0 : theme.properties)) return;
660
+ theme.properties.forEach(function (property) {
661
+ var attribute = neetoCist.snakeToCamelCase(property.key);
662
+ if (property.kind === "color") {
663
+ setVariable(attribute, hexToRgba(property.value), variableNamesMap);
664
+ } else if (property.kind === "overlay_opacity") {
665
+ var overlayOpacity = Number(property.value);
666
+ setVariable(neetoCist.snakeToCamelCase("".concat(property.key, "_overlay_opacity")), Math.abs(overlayOpacity / 100), variableNamesMap);
667
+ setVariable(neetoCist.snakeToCamelCase("".concat(property.key, "_overlay_color")), overlayOpacity < 0 ? BLACK : WHITE, variableNamesMap);
668
+ } else {
669
+ setVariable(attribute, property.value, variableNamesMap);
670
+ }
671
+ });
672
+ neetoCist.filterBy({
673
+ kind: "image"
674
+ }, themeConfig).forEach(function (_ref) {
675
+ var _theme$attribute;
676
+ var key = _ref.key;
677
+ var attribute = neetoCist.snakeToCamelCase(key);
678
+ setVariable(attribute, "url(".concat((_theme$attribute = theme[attribute]) === null || _theme$attribute === void 0 ? void 0 : _theme$attribute.url, ")"), variableNamesMap);
679
+ });
680
+ };
619
681
 
620
682
  var list = function list() {
621
- return axios__default["default"].get("".concat(BASE_URL, "/api/v1/theme/configs"));
683
+ return axios__default["default"].get("".concat(BASE_URL, "/api/v1/schema"));
622
684
  };
623
- var configsApi = {
685
+ var schemasApi = {
624
686
  list: list
625
687
  };
626
688
 
627
- var useListConfigs = function useListConfigs(_ref) {
689
+ var useListSchema = function useListSchema(_ref) {
628
690
  var onSuccess = _ref.onSuccess;
629
- return reactQuery.useQuery(QUERY_KEYS$1.CONFIG_DETAILS, configsApi.list, {
691
+ return reactQuery.useQuery(QUERY_KEYS$1.SCHEMA_DETAILS, schemasApi.list, {
630
692
  onSuccess: onSuccess
631
693
  });
632
694
  };
@@ -641,65 +703,42 @@ var useThemeUtils = function useThemeUtils() {
641
703
  }, shallow.shallow),
642
704
  previewingTheme = _useThemeStore.previewingTheme,
643
705
  currentTheme = _useThemeStore.currentTheme;
644
- var _useListConfigs = useListConfigs({
706
+ var _useListSchema = useListSchema({
645
707
  onSuccess: function onSuccess(_ref) {
646
- var _ref$config = _ref.config,
647
- themeConfig = _ref$config === void 0 ? [] : _ref$config,
708
+ var _ref$schema = _ref.schema,
709
+ themePropertiesSchema = _ref$schema === void 0 ? [] : _ref$schema,
648
710
  _ref$variableNamesMap = _ref.variableNamesMap,
649
711
  variableNamesMap = _ref$variableNamesMap === void 0 ? {} : _ref$variableNamesMap;
650
712
  return setConfigState({
651
- themeConfig: themeConfig,
713
+ themePropertiesSchema: themePropertiesSchema,
652
714
  variableNamesMap: variableNamesMap
653
715
  });
654
716
  }
655
717
  }),
656
- isFetchingConfig = _useListConfigs.isLoading,
657
- _useListConfigs$data = _useListConfigs.data,
658
- _useListConfigs$data2 = _useListConfigs$data === void 0 ? {} : _useListConfigs$data,
659
- _useListConfigs$data3 = _useListConfigs$data2.config,
660
- themeConfig = _useListConfigs$data3 === void 0 ? [] : _useListConfigs$data3,
661
- _useListConfigs$data4 = _useListConfigs$data2.variableNamesMap,
662
- variableNamesMap = _useListConfigs$data4 === void 0 ? {} : _useListConfigs$data4;
718
+ isFetchingSchema = _useListSchema.isLoading,
719
+ _useListSchema$data = _useListSchema.data,
720
+ _useListSchema$data2 = _useListSchema$data === void 0 ? {} : _useListSchema$data,
721
+ _useListSchema$data2$ = _useListSchema$data2.schema,
722
+ themePropertiesSchema = _useListSchema$data2$ === void 0 ? [] : _useListSchema$data2$,
723
+ _useListSchema$data2$2 = _useListSchema$data2.variableNamesMap,
724
+ variableNamesMap = _useListSchema$data2$2 === void 0 ? {} : _useListSchema$data2$2;
663
725
  React.useEffect(function () {
664
726
  return setConfigState({
665
- isFetchingConfig: isFetchingConfig
727
+ isFetchingSchema: isFetchingSchema
666
728
  });
667
- }, [isFetchingConfig]);
668
- var root = document.querySelector(":root");
669
- var setVariable = function setVariable(name, value) {
670
- var variableName = variableNamesMap[name];
671
- if (!variableName) return;
672
- root.style.setProperty(variableName, value);
729
+ }, [isFetchingSchema]);
730
+ var setVariable$1 = function setVariable$1(name, value) {
731
+ return setVariable(name, value, variableNamesMap);
673
732
  };
674
- var setTheme = function setTheme(theme) {
675
- if (neetoCist.isNotPresent(theme === null || theme === void 0 ? void 0 : theme.properties)) return;
676
- theme.properties.forEach(function (property) {
677
- var attribute = neetoCist.snakeToCamelCase(property.key);
678
- if (property.kind === "color") {
679
- setVariable(attribute, hexToRgba(property.value));
680
- } else if (property.kind === "overlay_opacity") {
681
- var overlayOpacity = Number(property.value);
682
- setVariable(neetoCist.snakeToCamelCase("".concat(property.key, "_overlay_opacity")), Math.abs(overlayOpacity / 100));
683
- setVariable(neetoCist.snakeToCamelCase("".concat(property.key, "_overlay_color")), overlayOpacity < 0 ? BLACK : WHITE);
684
- } else {
685
- setVariable(attribute, property.value);
686
- }
687
- });
688
- neetoCist.filterBy({
689
- kind: "image"
690
- }, themeConfig).forEach(function (_ref2) {
691
- var _theme$attribute;
692
- var key = _ref2.key;
693
- var attribute = neetoCist.snakeToCamelCase(key);
694
- setVariable(attribute, "url(".concat((_theme$attribute = theme[attribute]) === null || _theme$attribute === void 0 ? void 0 : _theme$attribute.url, ")"));
695
- });
733
+ var setTheme$1 = function setTheme$1(theme) {
734
+ return setTheme(theme, variableNamesMap, themePropertiesSchema);
696
735
  };
697
736
  return {
698
- setTheme: setTheme,
699
- setVariable: setVariable,
737
+ setTheme: setTheme$1,
738
+ setVariable: setVariable$1,
700
739
  previewingTheme: previewingTheme,
701
740
  currentTheme: currentTheme,
702
- isFetchingConfig: isFetchingConfig
741
+ isFetchingSchema: isFetchingSchema
703
742
  };
704
743
  };
705
744
 
@@ -820,11 +859,11 @@ var OVERLAY_OPACITY_SLIDER_MARKS = {
820
859
  };
821
860
  var HUNDRED = 100;
822
861
 
823
- var buildInitialValues = function buildInitialValues(theme, themeConfig) {
862
+ var buildInitialValues = function buildInitialValues(theme, themePropertiesSchema) {
824
863
  if (neetoCist.isPresent(theme)) return theme;
825
864
  return {
826
865
  name: i18next.t("neetoThemes.build.leftSideBar.themes.createTheme.newThemeName"),
827
- properties: themeConfig.map(function (_ref) {
866
+ properties: themePropertiesSchema.map(function (_ref) {
828
867
  var key = _ref.key,
829
868
  kind = _ref.kind,
830
869
  defaultValue = _ref.defaultValue;
@@ -871,27 +910,27 @@ var buildInitialValues = function buildInitialValues(theme, themeConfig) {
871
910
  }).filter(neetoCist.isNot(null))
872
911
  };
873
912
  };
874
- var buildImageData = function buildImageData(values, themeConfig) {
913
+ var buildImageData = function buildImageData(values, themePropertiesSchema) {
875
914
  return neetoCist.filterBy({
876
915
  kind: "image"
877
- }, themeConfig).reduce(function (acc, item) {
916
+ }, themePropertiesSchema).reduce(function (acc, item) {
878
917
  var _values$snakeToCamelC;
879
918
  var signedId = (_values$snakeToCamelC = values[neetoCist.snakeToCamelCase(item.key)]) === null || _values$snakeToCamelC === void 0 ? void 0 : _values$snakeToCamelC.signedId;
880
919
  acc[item.key] = signedId;
881
920
  return acc;
882
921
  }, {});
883
922
  };
884
- var isPropertyVisible = function isPropertyVisible(key, formikValues, themeConfig) {
923
+ var isPropertyVisible = function isPropertyVisible(key, formikValues, themePropertiesSchema) {
885
924
  var _findBy;
886
925
  var property = neetoCist.findBy({
887
926
  key: key
888
- }, themeConfig);
927
+ }, themePropertiesSchema);
889
928
  if (neetoCist.isNotPresent(property)) return false;
890
929
  var conditionalKey = property === null || property === void 0 ? void 0 : property.dependsOn;
891
930
  if (neetoCist.isNotPresent(conditionalKey)) return true;
892
931
  var dependentProperty = neetoCist.findBy({
893
932
  key: conditionalKey
894
- }, themeConfig);
933
+ }, themePropertiesSchema);
895
934
  if (dependentProperty.kind === "image") {
896
935
  var _formikValues$snakeTo;
897
936
  return neetoCist.isPresent((_formikValues$snakeTo = formikValues[neetoCist.snakeToCamelCase(conditionalKey)]) === null || _formikValues$snakeTo === void 0 ? void 0 : _formikValues$snakeTo.url);
@@ -2826,9 +2865,9 @@ function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) {
2826
2865
 
2827
2866
  function _defineProperty$1$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2828
2867
 
2829
- function _objectWithoutProperties$1$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$6(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
2868
+ function _objectWithoutProperties$1$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$5(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
2830
2869
 
2831
- function _objectWithoutPropertiesLoose$6(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
2870
+ function _objectWithoutPropertiesLoose$5(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
2832
2871
  /**
2833
2872
  * Convenience wrapper component for the `useDropzone` hook
2834
2873
  *
@@ -6219,7 +6258,7 @@ var _reactInfiniteScroller2 = _interopRequireDefault(_reactInfiniteScroller);
6219
6258
 
6220
6259
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6221
6260
 
6222
- function _objectWithoutProperties$6(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
6261
+ function _objectWithoutProperties$5(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
6223
6262
 
6224
6263
  function _classCallCheck$4(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6225
6264
 
@@ -6323,7 +6362,7 @@ var MasonryInfiniteScroller = (_temp2 = _class = function (_Component) {
6323
6362
  _props.packed;
6324
6363
  _props.position;
6325
6364
  _props.sizes;
6326
- var props = _objectWithoutProperties$6(_props, ['children', 'className', 'style', 'pack', 'packed', 'position', 'sizes']);
6365
+ var props = _objectWithoutProperties$5(_props, ['children', 'className', 'style', 'pack', 'packed', 'position', 'sizes']);
6327
6366
 
6328
6367
  return _react2.default.createElement(
6329
6368
  _reactInfiniteScroller2.default,
@@ -13902,7 +13941,7 @@ function supportRef$3(nodeOrComponent) {
13902
13941
  }
13903
13942
  /* eslint-enable */
13904
13943
 
13905
- function _objectWithoutPropertiesLoose$5(source, excluded) {
13944
+ function _objectWithoutPropertiesLoose$4(source, excluded) {
13906
13945
  if (source == null) return {};
13907
13946
  var target = {};
13908
13947
  var sourceKeys = Object.keys(source);
@@ -13915,9 +13954,9 @@ function _objectWithoutPropertiesLoose$5(source, excluded) {
13915
13954
  return target;
13916
13955
  }
13917
13956
 
13918
- function _objectWithoutProperties$5(source, excluded) {
13957
+ function _objectWithoutProperties$4(source, excluded) {
13919
13958
  if (source == null) return {};
13920
- var target = _objectWithoutPropertiesLoose$5(source, excluded);
13959
+ var target = _objectWithoutPropertiesLoose$4(source, excluded);
13921
13960
  var key, i;
13922
13961
  if (Object.getOwnPropertySymbols) {
13923
13962
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -13935,7 +13974,7 @@ var _excluded$7 = ["children"];
13935
13974
  var Context$1 = /*#__PURE__*/React__namespace.createContext({});
13936
13975
  function MotionProvider(_ref) {
13937
13976
  var children = _ref.children,
13938
- props = _objectWithoutProperties$5(_ref, _excluded$7);
13977
+ props = _objectWithoutProperties$4(_ref, _excluded$7);
13939
13978
  return /*#__PURE__*/React__namespace.createElement(Context$1.Provider, {
13940
13979
  value: props
13941
13980
  }, children);
@@ -14748,7 +14787,7 @@ function genCSSMotionList$1(transitionSupport) {
14748
14787
  children = _this$props.children,
14749
14788
  _onVisibleChanged = _this$props.onVisibleChanged,
14750
14789
  onAllRemoved = _this$props.onAllRemoved,
14751
- restProps = _objectWithoutProperties$5(_this$props, _excluded$6);
14790
+ restProps = _objectWithoutProperties$4(_this$props, _excluded$6);
14752
14791
  var Component = component || React__namespace.Fragment;
14753
14792
  var motionProps = {};
14754
14793
  MOTION_PROP_NAMES$1.forEach(function (prop) {
@@ -14758,7 +14797,7 @@ function genCSSMotionList$1(transitionSupport) {
14758
14797
  delete restProps.keys;
14759
14798
  return /*#__PURE__*/React__namespace.createElement(Component, restProps, keyEntities.map(function (_ref2, index) {
14760
14799
  var status = _ref2.status,
14761
- eventProps = _objectWithoutProperties$5(_ref2, _excluded2$1);
14800
+ eventProps = _objectWithoutProperties$4(_ref2, _excluded2$1);
14762
14801
  var visible = status === STATUS_ADD$1 || status === STATUS_KEEP$1;
14763
14802
  return /*#__PURE__*/React__namespace.createElement(CSSMotion, _extends$6({}, motionProps, {
14764
14803
  key: eventProps.key,
@@ -16546,7 +16585,7 @@ function supportRef$1(nodeOrComponent) {
16546
16585
  }
16547
16586
  /* eslint-enable */
16548
16587
 
16549
- function _objectWithoutPropertiesLoose$4(source, excluded) {
16588
+ function _objectWithoutPropertiesLoose$3(source, excluded) {
16550
16589
  if (source == null) return {};
16551
16590
  var target = {};
16552
16591
  var sourceKeys = Object.keys(source);
@@ -16559,9 +16598,9 @@ function _objectWithoutPropertiesLoose$4(source, excluded) {
16559
16598
  return target;
16560
16599
  }
16561
16600
 
16562
- function _objectWithoutProperties$4(source, excluded) {
16601
+ function _objectWithoutProperties$3(source, excluded) {
16563
16602
  if (source == null) return {};
16564
- var target = _objectWithoutPropertiesLoose$4(source, excluded);
16603
+ var target = _objectWithoutPropertiesLoose$3(source, excluded);
16565
16604
  var key, i;
16566
16605
  if (Object.getOwnPropertySymbols) {
16567
16606
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -17497,7 +17536,7 @@ function genCSSMotionList(transitionSupport) {
17497
17536
  children = _this$props.children,
17498
17537
  _onVisibleChanged = _this$props.onVisibleChanged,
17499
17538
  onAllRemoved = _this$props.onAllRemoved,
17500
- restProps = _objectWithoutProperties$4(_this$props, _excluded$5);
17539
+ restProps = _objectWithoutProperties$3(_this$props, _excluded$5);
17501
17540
  var Component = component || React__namespace.Fragment;
17502
17541
  var motionProps = {};
17503
17542
  MOTION_PROP_NAMES.forEach(function (prop) {
@@ -17507,7 +17546,7 @@ function genCSSMotionList(transitionSupport) {
17507
17546
  delete restProps.keys;
17508
17547
  return /*#__PURE__*/React__namespace.createElement(Component, restProps, keyEntities.map(function (_ref2) {
17509
17548
  var status = _ref2.status,
17510
- eventProps = _objectWithoutProperties$4(_ref2, _excluded2);
17549
+ eventProps = _objectWithoutProperties$3(_ref2, _excluded2);
17511
17550
  var visible = status === STATUS_ADD || status === STATUS_KEEP;
17512
17551
  return /*#__PURE__*/React__namespace.createElement(CSSMotion$1, _extends$4({}, motionProps, {
17513
17552
  key: eventProps.key,
@@ -18031,7 +18070,7 @@ function _slicedToArray$2(arr, i) {
18031
18070
  return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$2(arr, i) || _nonIterableRest$2();
18032
18071
  }
18033
18072
 
18034
- function _objectWithoutPropertiesLoose$3(source, excluded) {
18073
+ function _objectWithoutPropertiesLoose$2(source, excluded) {
18035
18074
  if (source == null) return {};
18036
18075
  var target = {};
18037
18076
  var sourceKeys = Object.keys(source);
@@ -18044,9 +18083,9 @@ function _objectWithoutPropertiesLoose$3(source, excluded) {
18044
18083
  return target;
18045
18084
  }
18046
18085
 
18047
- function _objectWithoutProperties$3(source, excluded) {
18086
+ function _objectWithoutProperties$2(source, excluded) {
18048
18087
  if (source == null) return {};
18049
- var target = _objectWithoutPropertiesLoose$3(source, excluded);
18088
+ var target = _objectWithoutPropertiesLoose$2(source, excluded);
18050
18089
  var key, i;
18051
18090
  if (Object.getOwnPropertySymbols) {
18052
18091
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -20020,7 +20059,7 @@ function generateTrigger() {
20020
20059
  maskAnimation = props.maskAnimation,
20021
20060
  className = props.className,
20022
20061
  getTriggerDOMNode = props.getTriggerDOMNode,
20023
- restProps = _objectWithoutProperties$3(props, _excluded$4);
20062
+ restProps = _objectWithoutProperties$2(props, _excluded$4);
20024
20063
  var mergedAutoDestroy = autoDestroy || destroyPopupOnHide || false;
20025
20064
 
20026
20065
  // =========================== Mobile ===========================
@@ -20567,7 +20606,7 @@ function _objectSpread2$1(target) {
20567
20606
  return target;
20568
20607
  }
20569
20608
 
20570
- function _objectWithoutPropertiesLoose$2(source, excluded) {
20609
+ function _objectWithoutPropertiesLoose$1(source, excluded) {
20571
20610
  if (source == null) return {};
20572
20611
  var target = {};
20573
20612
  var sourceKeys = Object.keys(source);
@@ -20580,9 +20619,9 @@ function _objectWithoutPropertiesLoose$2(source, excluded) {
20580
20619
  return target;
20581
20620
  }
20582
20621
 
20583
- function _objectWithoutProperties$2(source, excluded) {
20622
+ function _objectWithoutProperties$1(source, excluded) {
20584
20623
  if (source == null) return {};
20585
- var target = _objectWithoutPropertiesLoose$2(source, excluded);
20624
+ var target = _objectWithoutPropertiesLoose$1(source, excluded);
20586
20625
  var key, i;
20587
20626
  if (Object.getOwnPropertySymbols) {
20588
20627
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -20712,7 +20751,7 @@ var Tooltip$2 = function Tooltip(props, ref) {
20712
20751
  id = props.id,
20713
20752
  _props$showArrow = props.showArrow,
20714
20753
  showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
20715
- restProps = _objectWithoutProperties$2(props, _excluded$3);
20754
+ restProps = _objectWithoutProperties$1(props, _excluded$3);
20716
20755
  var triggerRef = React.useRef(null);
20717
20756
  React.useImperativeHandle(ref, function () {
20718
20757
  return triggerRef.current;
@@ -21636,7 +21675,7 @@ function _extends() {
21636
21675
  return _extends.apply(this, arguments);
21637
21676
  }
21638
21677
 
21639
- function _objectWithoutPropertiesLoose$1(source, excluded) {
21678
+ function _objectWithoutPropertiesLoose(source, excluded) {
21640
21679
  if (source == null) return {};
21641
21680
  var target = {};
21642
21681
  var sourceKeys = Object.keys(source);
@@ -21649,9 +21688,9 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
21649
21688
  return target;
21650
21689
  }
21651
21690
 
21652
- function _objectWithoutProperties$1(source, excluded) {
21691
+ function _objectWithoutProperties(source, excluded) {
21653
21692
  if (source == null) return {};
21654
- var target = _objectWithoutPropertiesLoose$1(source, excluded);
21693
+ var target = _objectWithoutPropertiesLoose(source, excluded);
21655
21694
  var key, i;
21656
21695
  if (Object.getOwnPropertySymbols) {
21657
21696
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -21708,7 +21747,7 @@ var Handle = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21708
21747
  render = props.render,
21709
21748
  dragging = props.dragging,
21710
21749
  onOffsetChange = props.onOffsetChange,
21711
- restProps = _objectWithoutProperties$1(props, _excluded$2);
21750
+ restProps = _objectWithoutProperties(props, _excluded$2);
21712
21751
  var _React$useContext = React__namespace.useContext(SliderContext),
21713
21752
  min = _React$useContext.min,
21714
21753
  max = _React$useContext.max,
@@ -21818,7 +21857,7 @@ var Handles = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
21818
21857
  values = props.values,
21819
21858
  handleRender = props.handleRender,
21820
21859
  draggingIndex = props.draggingIndex,
21821
- restProps = _objectWithoutProperties$1(props, _excluded$1);
21860
+ restProps = _objectWithoutProperties(props, _excluded$1);
21822
21861
  var handlesRef = React__namespace.useRef({});
21823
21862
  React__namespace.useImperativeHandle(ref, function () {
21824
21863
  return {
@@ -23361,42 +23400,13 @@ var SliderBlock = function SliderBlock(_ref) {
23361
23400
  });
23362
23401
  };
23363
23402
 
23364
- function _objectWithoutPropertiesLoose(source, excluded) {
23365
- if (source == null) return {};
23366
- var target = {};
23367
- var sourceKeys = Object.keys(source);
23368
- var key, i;
23369
- for (i = 0; i < sourceKeys.length; i++) {
23370
- key = sourceKeys[i];
23371
- if (excluded.indexOf(key) >= 0) continue;
23372
- target[key] = source[key];
23373
- }
23374
- return target;
23375
- }
23376
-
23377
- function _objectWithoutProperties(source, excluded) {
23378
- if (source == null) return {};
23379
- var target = _objectWithoutPropertiesLoose(source, excluded);
23380
- var key, i;
23381
- if (Object.getOwnPropertySymbols) {
23382
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
23383
- for (i = 0; i < sourceSymbolKeys.length; i++) {
23384
- key = sourceSymbolKeys[i];
23385
- if (excluded.indexOf(key) >= 0) continue;
23386
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
23387
- target[key] = source[key];
23388
- }
23389
- }
23390
- return target;
23391
- }
23392
-
23393
23403
  var _excluded = ["label", "name"];
23394
23404
  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; }
23395
23405
  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$9(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; }
23396
23406
  var SwitchBlock = function SwitchBlock(_ref) {
23397
23407
  var label = _ref.label,
23398
23408
  name = _ref.name,
23399
- switchProps = _objectWithoutProperties(_ref, _excluded);
23409
+ switchProps = _objectWithoutProperties$6(_ref, _excluded);
23400
23410
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
23401
23411
  className: "flex items-center justify-between py-3 first:pt-0 last:pb-0",
23402
23412
  children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
@@ -23413,10 +23423,10 @@ var Properties = function Properties() {
23413
23423
  t = _useTranslation.t;
23414
23424
  var _useConfigStore = useConfigStore(function (store) {
23415
23425
  return {
23416
- themeConfig: store["themeConfig"]
23426
+ themePropertiesSchema: store["themePropertiesSchema"]
23417
23427
  };
23418
23428
  }, shallow.shallow),
23419
- themeConfig = _useConfigStore.themeConfig;
23429
+ themePropertiesSchema = _useConfigStore.themePropertiesSchema;
23420
23430
  var _useThemeStore = useThemeStore(function (store) {
23421
23431
  return {
23422
23432
  setThemeState: store["setThemeState"]
@@ -23472,7 +23482,7 @@ var Properties = function Properties() {
23472
23482
  var key = _ref2.key,
23473
23483
  value = _ref2.value,
23474
23484
  kind = _ref2.kind;
23475
- return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsxRuntime.jsx(FontPickerBlock, {
23485
+ return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(FontPickerBlock, {
23476
23486
  label: buildLabel(key, kind),
23477
23487
  options: FONT_OPTIONS,
23478
23488
  value: neetoCist.findBy({
@@ -23491,7 +23501,7 @@ var Properties = function Properties() {
23491
23501
  var key = _ref4.key,
23492
23502
  value = _ref4.value,
23493
23503
  kind = _ref4.kind;
23494
- return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsxRuntime.jsx(ColorBlock, {
23504
+ return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(ColorBlock, {
23495
23505
  color: value,
23496
23506
  label: buildLabel(key, kind),
23497
23507
  onChange: handleColorChange(key)
@@ -23502,7 +23512,7 @@ var Properties = function Properties() {
23502
23512
  var key = _ref5.key,
23503
23513
  value = _ref5.value,
23504
23514
  kind = _ref5.kind;
23505
- return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsxRuntime.jsx(SliderBlock, {
23515
+ return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(SliderBlock, {
23506
23516
  label: buildLabel(key, kind),
23507
23517
  marks: OVERLAY_OPACITY_SLIDER_MARKS,
23508
23518
  max: HUNDRED,
@@ -23524,8 +23534,8 @@ var Properties = function Properties() {
23524
23534
  }, values.properties);
23525
23535
  var options = (_findBy = neetoCist.findBy({
23526
23536
  key: key
23527
- }, themeConfig)) === null || _findBy === void 0 || (_findBy = _findBy.options) === null || _findBy === void 0 ? void 0 : _findBy.map(neetoCist.toLabelAndValue);
23528
- return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsxRuntime.jsx(SelectBlock, {
23537
+ }, themePropertiesSchema)) === null || _findBy === void 0 || (_findBy = _findBy.options) === null || _findBy === void 0 ? void 0 : _findBy.map(neetoCist.toLabelAndValue);
23538
+ return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(SelectBlock, {
23529
23539
  label: buildLabel(key, kind),
23530
23540
  options: options || POSITION_OPTIONS,
23531
23541
  placeholder: "left",
@@ -23543,7 +23553,7 @@ var Properties = function Properties() {
23543
23553
  var index = neetoCist.findIndexBy({
23544
23554
  key: key
23545
23555
  }, values.properties);
23546
- return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsxRuntime.jsx(SwitchBlock, {
23556
+ return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsxRuntime.jsx(SwitchBlock, {
23547
23557
  checked: value !== "false",
23548
23558
  label: buildLabel(key, kind),
23549
23559
  onChange: function onChange(e) {
@@ -23577,10 +23587,10 @@ var Customize = function Customize(_ref) {
23577
23587
  t = _useTranslation.t;
23578
23588
  var _useConfigStore = useConfigStore(function (store) {
23579
23589
  return {
23580
- themeConfig: store["themeConfig"]
23590
+ themePropertiesSchema: store["themePropertiesSchema"]
23581
23591
  };
23582
23592
  }, shallow.shallow),
23583
- themeConfig = _useConfigStore.themeConfig;
23593
+ themePropertiesSchema = _useConfigStore.themePropertiesSchema;
23584
23594
  var _useCreateTheme = useCreateTheme(),
23585
23595
  createTheme = _useCreateTheme.mutate,
23586
23596
  isCreating = _useCreateTheme.isLoading;
@@ -23590,7 +23600,7 @@ var Customize = function Customize(_ref) {
23590
23600
  var isSubmitting = isCreating || isUpdating;
23591
23601
  var onSubmit = function onSubmit(values, _ref2) {
23592
23602
  var resetForm = _ref2.resetForm;
23593
- var imageData = buildImageData(values, themeConfig);
23603
+ var imageData = buildImageData(values, themePropertiesSchema);
23594
23604
  var themeToSave = _objectSpread({
23595
23605
  propertiesAttributes: values.properties,
23596
23606
  name: values.name
@@ -23613,7 +23623,7 @@ var Customize = function Customize(_ref) {
23613
23623
  };
23614
23624
  return /*#__PURE__*/jsxRuntime.jsx(Form__default["default"], {
23615
23625
  formikProps: {
23616
- initialValues: buildInitialValues(theme, themeConfig),
23626
+ initialValues: buildInitialValues(theme, themePropertiesSchema),
23617
23627
  validationSchema: THEME_VALIDATION_SCHEMA,
23618
23628
  onSubmit: onSubmit
23619
23629
  },
@@ -23625,7 +23635,7 @@ var Customize = function Customize(_ref) {
23625
23635
  className: "flex flex-col gap-6 p-4",
23626
23636
  children: [/*#__PURE__*/jsxRuntime.jsx(ThemeMeta, {}), /*#__PURE__*/jsxRuntime.jsx(Properties, {}), neetoCist.filterBy({
23627
23637
  kind: "image"
23628
- }, themeConfig).map(function (_ref5) {
23638
+ }, themePropertiesSchema).map(function (_ref5) {
23629
23639
  var key = _ref5.key;
23630
23640
  return /*#__PURE__*/jsxRuntime.jsx(Images, {
23631
23641
  attribute: key
@@ -23660,14 +23670,14 @@ var Thumbnail = function Thumbnail(_ref) {
23660
23670
  theme = _ref.theme;
23661
23671
  var _useConfigStore = useConfigStore(function (store) {
23662
23672
  return {
23663
- themeConfig: store["themeConfig"]
23673
+ themePropertiesSchema: store["themePropertiesSchema"]
23664
23674
  };
23665
23675
  }, shallow.shallow),
23666
- _useConfigStore$theme = _useConfigStore.themeConfig,
23667
- themeConfig = _useConfigStore$theme === void 0 ? [] : _useConfigStore$theme;
23668
- var _themeConfig = _slicedToArray$9(themeConfig, 2),
23669
- colorObject1 = _themeConfig[0],
23670
- colorObject2 = _themeConfig[1];
23676
+ _useConfigStore$theme = _useConfigStore.themePropertiesSchema,
23677
+ themePropertiesSchema = _useConfigStore$theme === void 0 ? [] : _useConfigStore$theme;
23678
+ var _themePropertiesSchem = _slicedToArray$9(themePropertiesSchema, 2),
23679
+ colorObject1 = _themePropertiesSchem[0],
23680
+ colorObject2 = _themePropertiesSchem[1];
23671
23681
  var primaryLabel = neetoCist.humanize(colorObject1 === null || colorObject1 === void 0 ? void 0 : colorObject1.key);
23672
23682
  var secondaryLabel = neetoCist.humanize(colorObject2 === null || colorObject2 === void 0 ? void 0 : colorObject2.key);
23673
23683
  var primaryColor = neetoCist.findBy({
@@ -23678,11 +23688,11 @@ var Thumbnail = function Thumbnail(_ref) {
23678
23688
  }, theme.properties).value;
23679
23689
  var backgroundImageUrl = (_theme$snakeToCamelCa = theme[neetoCist.snakeToCamelCase(neetoCist.findBy({
23680
23690
  useAsCardBackground: true
23681
- }, themeConfig).key)]) === null || _theme$snakeToCamelCa === void 0 ? void 0 : _theme$snakeToCamelCa.url;
23691
+ }, themePropertiesSchema).key)]) === null || _theme$snakeToCamelCa === void 0 ? void 0 : _theme$snakeToCamelCa.url;
23682
23692
  var buttonBackgroundColor = (_findBy = neetoCist.findBy({
23683
23693
  key: (_findBy2 = neetoCist.findBy({
23684
23694
  useAsCardButtonBackground: true
23685
- }, themeConfig)) === null || _findBy2 === void 0 ? void 0 : _findBy2.key
23695
+ }, themePropertiesSchema)) === null || _findBy2 === void 0 ? void 0 : _findBy2.key
23686
23696
  }, theme.properties)) === null || _findBy === void 0 ? void 0 : _findBy.value;
23687
23697
  return /*#__PURE__*/jsxRuntime.jsx("div", {
23688
23698
  className: classNames__default["default"]("neeto-themes-theme-thumbnail neeto-ui-rounded-lg border transition-all duration-300 ease-in-out", {
@@ -23738,7 +23748,7 @@ var Card = function Card(_ref) {
23738
23748
  onSetPreviewTheme = _ref.onSetPreviewTheme,
23739
23749
  onDeleteTheme = _ref.onDeleteTheme,
23740
23750
  onEditTheme = _ref.onEditTheme,
23741
- onApplyTheme = _ref.onApplyTheme,
23751
+ applyTheme = _ref.applyTheme,
23742
23752
  theme = _ref.theme,
23743
23753
  isApplyingTheme = _ref.isApplyingTheme,
23744
23754
  onCloneTheme = _ref.onCloneTheme,
@@ -23761,7 +23771,7 @@ var Card = function Card(_ref) {
23761
23771
  var handleApplyThemeClick = function handleApplyThemeClick() {
23762
23772
  if (isApplyingTheme) return;
23763
23773
  setThemeBeingApplied(theme);
23764
- onApplyTheme({
23774
+ applyTheme({
23765
23775
  themeId: theme.id,
23766
23776
  entityId: entityId,
23767
23777
  entityType: entityType
@@ -23887,7 +23897,7 @@ var Themes = function Themes(_ref) {
23887
23897
  setThemeBeingApplied = _useState4[1];
23888
23898
  var _useCloneTheme = useCloneTheme(),
23889
23899
  cloneTheme = _useCloneTheme.mutate;
23890
- var _useCreateThemeEntity = useCreateThemeEntity({
23900
+ var _useApplyTheme = useApplyTheme({
23891
23901
  onSuccess: function onSuccess(_ref2) {
23892
23902
  var theme = _ref2.theme;
23893
23903
  setTheme(theme);
@@ -23897,8 +23907,8 @@ var Themes = function Themes(_ref) {
23897
23907
  setThemeBeingApplied({});
23898
23908
  }
23899
23909
  }),
23900
- onApplyTheme = _useCreateThemeEntity.mutate,
23901
- isApplyingTheme = _useCreateThemeEntity.isLoading;
23910
+ applyTheme = _useApplyTheme.mutate,
23911
+ isApplyingTheme = _useApplyTheme.isLoading;
23902
23912
  React.useEffect(function () {
23903
23913
  if (didScrollActiveThemeIntoView.current || !(currentTheme !== null && currentTheme !== void 0 && currentTheme.id)) return;
23904
23914
  didScrollActiveThemeIntoView.current = true;
@@ -23958,7 +23968,7 @@ var Themes = function Themes(_ref) {
23958
23968
  className: "flex flex-col gap-4 px-4 pb-10 lg:px-5 xl:px-6",
23959
23969
  children: filteredDefaultThemes.map(function (theme) {
23960
23970
  return /*#__PURE__*/React.createElement(Card$1, {
23961
- onApplyTheme: onApplyTheme,
23971
+ applyTheme: applyTheme,
23962
23972
  setThemeBeingApplied: setThemeBeingApplied,
23963
23973
  theme: theme,
23964
23974
  thumbnail: thumbnail,
@@ -23986,8 +23996,8 @@ var Themes = function Themes(_ref) {
23986
23996
  var isActive = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === theme.id;
23987
23997
  var isPreviewing = (previewingTheme === null || previewingTheme === void 0 ? void 0 : previewingTheme.id) === theme.id;
23988
23998
  return /*#__PURE__*/React.createElement(Card$1, {
23999
+ applyTheme: applyTheme,
23989
24000
  isPreviewing: isPreviewing,
23990
- onApplyTheme: onApplyTheme,
23991
24001
  onEditTheme: onEditTheme,
23992
24002
  setThemeBeingApplied: setThemeBeingApplied,
23993
24003
  theme: theme,
@@ -24086,12 +24096,12 @@ var Sidebar = function Sidebar(_ref) {
24086
24096
  return {
24087
24097
  entityType: store["entityType"],
24088
24098
  entityId: store["entityId"],
24089
- isFetchingConfig: store["isFetchingConfig"]
24099
+ isFetchingSchema: store["isFetchingSchema"]
24090
24100
  };
24091
24101
  }, shallow.shallow),
24092
24102
  entityType = _useConfigStore.entityType,
24093
24103
  entityId = _useConfigStore.entityId,
24094
- isFetchingConfig = _useConfigStore.isFetchingConfig;
24104
+ isFetchingSchema = _useConfigStore.isFetchingSchema;
24095
24105
  var _useThemeStore = useThemeStore(function (store) {
24096
24106
  return {
24097
24107
  setThemeState: store["setThemeState"]
@@ -24203,7 +24213,7 @@ var Sidebar = function Sidebar(_ref) {
24203
24213
  themeToHighlight: themeToHighlight,
24204
24214
  themes: themes,
24205
24215
  thumbnail: thumbnail,
24206
- isLoading: isLoading || isFetchingConfig,
24216
+ isLoading: isLoading || isFetchingSchema,
24207
24217
  onDeleteTheme: handleDelete,
24208
24218
  onEditTheme: handleEditTheme
24209
24219
  }) : /*#__PURE__*/jsxRuntime.jsx(Customize, {
@@ -24225,7 +24235,7 @@ var Sidebar = function Sidebar(_ref) {
24225
24235
  });
24226
24236
  };
24227
24237
 
24228
- var NeetoThemes = function NeetoThemes(_ref) {
24238
+ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
24229
24239
  var children = _ref.children,
24230
24240
  entityType = _ref.entityType,
24231
24241
  entityId = _ref.entityId,
@@ -24261,13 +24271,14 @@ var NeetoThemes = function NeetoThemes(_ref) {
24261
24271
  })]
24262
24272
  });
24263
24273
  };
24264
- var index = reactUtils.withTitle(NeetoThemes, i18next.t("neetoThemes.common.design"));
24274
+ var index = reactUtils.withTitle(NeetoThemesBuilder, i18next.t("neetoThemes.common.design"));
24265
24275
 
24266
24276
  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}}
24267
24277
 
24268
24278
  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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3RoZW1lcy5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3R5bGVzaGVldHMvYXBwbGljYXRpb24uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1QkFFRSxZQUFBLENBREEsVUNFRixDRENFLDZDQUdFLDJDQUFBLENBQ0EsbUNBQUEsQ0FGQSx5QkFBQSxDQURBLFdDSUosQ0RBSSwwQkFMRiw2Q0FNSSxXQ0dKLENBQ0YsQ0RGSSwwQkFSRiw2Q0FTSSxXQ0tKLENBQ0YsQ0RISSwyRUFFRSxrQkFBQSxDQURBLGdCQ01OLENERkksMkVBQ0UsMEJBQUEsQ0FDQSxlQ0lOLENERFEsNElBQ0UsWUNHVixDREdFLHNEQUdFLFdBQUEsQ0FEQSx5QkFBQSxDQURBLGlCQ0NKLENES0Esc0NBQ0UsdURBQUEsQ0FDQSwrRENGRixDREtBLDhDQUNFLDBDQUFBLENBQ0Esa0RDRkYsQ0RLQSxnREFFRSw2Q0FBQSxDQUNBLHFEQUFBLENBRkEsMENDQUYiLCJzb3VyY2VzQ29udGVudCI6WyIubmVldG8tdGhlbWVzX193cmFwcGVyIHtcbiAgd2lkdGg6IDEwMCU7XG4gIGRpc3BsYXk6IGZsZXg7XG5cbiAgLm5lZXRvLXRoZW1lcy1zaWRlYmFyIHtcbiAgICB3aWR0aDogJHRoZW1lcy1zaWRlYmFyLXdpZHRoLXNtO1xuICAgIGhlaWdodDogY2FsYygxMDB2aCAtICN7JGJ1aWxkZXItaGVhZGVyLWhlaWdodH0pO1xuICAgIGJhY2tncm91bmQtY29sb3I6IHJnYih2YX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XItY29sb3I6IHJnYih2YXIoLS1uZWV0by11aS1ncmF5LTcwMCkpO1xuICBib3gtc2hhZG93OiAwcHggMHB4IDBweCAxcHggcmdiKHZhcigtLW5lZXRvLXVpLWdyYXktNzAwKSk7XG59XG5cbi5uZWV0by10aGVtZXMtdGhlbWUtdGh1bWJuYWlsLS1oaWdobGlnaHQtYWN0aXZlIHtcbiAgdHJhbnNpdGlvbjogYm9yZGVyLWNvbG9yIDEwMG1zIGJveC1zaGFkb3cgMTAwbXM7XG4gIGJvcmRlci1jb2xvcjogcmdiKHZhcigtLW5lZXRvLXVpLXN1Y2Nlc3MtNTAwKSk7XG4gIGJveC1zaGFkb3c6IDBweCAwcHggMHB4IDFweCByZ2IodmFyKC0tbmVldG8tdWktc3VjY2Vzcy01MDApKTtcbn0iXX0= */";
24269
24279
  n(css,{});
24270
24280
 
24271
- exports.NeetoThemes = index;
24281
+ exports.NeetoThemesBuilder = index;
24282
+ exports.setTheme = setTheme;
24272
24283
  exports.useThemeUtils = useThemeUtils;
24273
24284
  //# sourceMappingURL=index.cjs.js.map