@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.js CHANGED
@@ -4,7 +4,7 @@ import React__default, { useEffect, forwardRef, useImperativeHandle, Fragment, u
4
4
  import i18next, { t as t$6 } from 'i18next';
5
5
  import { withImmutableActions, useMutationWithInvalidation, useDebounce, useFuncDebounce, withT, withTitle } from '@bigbinary/neeto-commons-frontend/react-utils';
6
6
  import Spinner$1 from '@bigbinary/neetoui/Spinner';
7
- import { create as create$3 } from 'zustand';
7
+ import { create as create$2 } from 'zustand';
8
8
  import { isNotPresent, snakeToCamelCase, filterBy, isPresent, isNot, findBy, noop as noop$3, keysToCamelCase, findIndexBy, toLabelAndValue, humanize, isNotEmpty } from '@bigbinary/neeto-cist';
9
9
  import Alert from '@bigbinary/neetoui/Alert';
10
10
  import { useTranslation, Trans } from 'react-i18next';
@@ -33,19 +33,19 @@ import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
33
33
  import Tag from '@bigbinary/neetoui/Tag';
34
34
 
35
35
  /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
36
- var useConfigStore = create$3(withImmutableActions(function (set) {
36
+ var useConfigStore = create$2(withImmutableActions(function (set) {
37
37
  return {
38
- themeConfig: [],
38
+ themePropertiesSchema: [],
39
39
  entityType: "",
40
40
  entityId: "",
41
41
  variableNamesMap: {},
42
- isFetchingConfig: true,
42
+ isFetchingSchema: true,
43
43
  setConfigState: set
44
44
  };
45
45
  }));
46
46
 
47
47
  /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
48
- var useThemeStore = create$3(withImmutableActions(function (set) {
48
+ var useThemeStore = create$2(withImmutableActions(function (set) {
49
49
  return {
50
50
  currentTheme: {},
51
51
  isCurrentThemeLoading: true,
@@ -479,22 +479,16 @@ var WHITE = "255, 255, 255";
479
479
  var BLACK = "0, 0, 0";
480
480
 
481
481
  var show$1 = function show(entityId) {
482
- return axios.get("".concat(BASE_URL, "/api/v1/theme/entities/").concat(entityId));
483
- };
484
- var create$2 = function create(payload) {
485
- return axios.post("".concat(BASE_URL, "/api/v1/theme/entities"), {
486
- entity: payload
487
- });
482
+ return axios.get("".concat(BASE_URL, "/api/v1/entities/").concat(entityId));
488
483
  };
489
484
  var entitiesApi = {
490
- show: show$1,
491
- create: create$2
485
+ show: show$1
492
486
  };
493
487
 
494
488
  var QUERY_KEYS$1 = {
495
489
  THEMES_LIST: "themes-list",
496
490
  THEME_DETAILS: "theme-details",
497
- CONFIG_DETAILS: "config-details"
491
+ SCHEMA_DETAILS: "schema-details"
498
492
  };
499
493
 
500
494
  var useShowThemeEntity = function useShowThemeEntity(entityId) {
@@ -504,14 +498,37 @@ var useShowThemeEntity = function useShowThemeEntity(entityId) {
504
498
  enabled: !!entityId
505
499
  });
506
500
  };
507
- var useCreateThemeEntity = function useCreateThemeEntity(_ref) {
508
- var onSuccess = _ref.onSuccess;
509
- return useMutationWithInvalidation(entitiesApi.create, {
510
- keysToInvalidate: [QUERY_KEYS$1.THEMES_LIST, QUERY_KEYS$1.THEME_ENTITY_DETAILS],
511
- onSuccess: onSuccess
512
- });
513
- };
514
501
 
502
+ function _objectWithoutPropertiesLoose$6(source, excluded) {
503
+ if (source == null) return {};
504
+ var target = {};
505
+ var sourceKeys = Object.keys(source);
506
+ var key, i;
507
+ for (i = 0; i < sourceKeys.length; i++) {
508
+ key = sourceKeys[i];
509
+ if (excluded.indexOf(key) >= 0) continue;
510
+ target[key] = source[key];
511
+ }
512
+ return target;
513
+ }
514
+
515
+ function _objectWithoutProperties$6(source, excluded) {
516
+ if (source == null) return {};
517
+ var target = _objectWithoutPropertiesLoose$6(source, excluded);
518
+ var key, i;
519
+ if (Object.getOwnPropertySymbols) {
520
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
521
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
522
+ key = sourceSymbolKeys[i];
523
+ if (excluded.indexOf(key) >= 0) continue;
524
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
525
+ target[key] = source[key];
526
+ }
527
+ }
528
+ return target;
529
+ }
530
+
531
+ var _excluded$9 = ["themeId"];
515
532
  var list$1 = function list() {
516
533
  return axios.get("".concat(BASE_URL, "/api/v1/themes"));
517
534
  };
@@ -536,13 +553,21 @@ var destroy = function destroy(id) {
536
553
  var clone = function clone(id) {
537
554
  return axios.post("".concat(BASE_URL, "/api/v1/themes/").concat(id, "/clone"));
538
555
  };
556
+ var apply = function apply(_ref2) {
557
+ var themeId = _ref2.themeId,
558
+ payload = _objectWithoutProperties$6(_ref2, _excluded$9);
559
+ return axios.post("".concat(BASE_URL, "/api/v1/themes/").concat(themeId, "/apply"), {
560
+ entity: payload
561
+ });
562
+ };
539
563
  var themesApi = {
540
564
  list: list$1,
541
565
  show: show,
542
566
  create: create$1,
543
567
  update: update$1,
544
568
  destroy: destroy,
545
- clone: clone
569
+ clone: clone,
570
+ apply: apply
546
571
  };
547
572
 
548
573
  var useListThemes = function useListThemes() {
@@ -573,17 +598,54 @@ var useCloneTheme = function useCloneTheme() {
573
598
  keysToInvalidate: [QUERY_KEYS$1.THEMES_LIST]
574
599
  });
575
600
  };
601
+ var useApplyTheme = function useApplyTheme(_ref) {
602
+ var onSuccess = _ref.onSuccess;
603
+ return useMutationWithInvalidation(themesApi.apply, {
604
+ keysToInvalidate: [QUERY_KEYS$1.THEMES_LIST, QUERY_KEYS$1.THEME_ENTITY_DETAILS],
605
+ onSuccess: onSuccess
606
+ });
607
+ };
608
+
609
+ var root = document.querySelector(":root");
610
+ var setVariable = function setVariable(name, value, variableNamesMap) {
611
+ var variableName = variableNamesMap[name];
612
+ if (!variableName) return;
613
+ root.style.setProperty(variableName, value);
614
+ };
615
+ var setTheme = function setTheme(theme, variableNamesMap, themeConfig) {
616
+ if (isNotPresent(theme === null || theme === void 0 ? void 0 : theme.properties)) return;
617
+ theme.properties.forEach(function (property) {
618
+ var attribute = snakeToCamelCase(property.key);
619
+ if (property.kind === "color") {
620
+ setVariable(attribute, hexToRgba(property.value), variableNamesMap);
621
+ } else if (property.kind === "overlay_opacity") {
622
+ var overlayOpacity = Number(property.value);
623
+ setVariable(snakeToCamelCase("".concat(property.key, "_overlay_opacity")), Math.abs(overlayOpacity / 100), variableNamesMap);
624
+ setVariable(snakeToCamelCase("".concat(property.key, "_overlay_color")), overlayOpacity < 0 ? BLACK : WHITE, variableNamesMap);
625
+ } else {
626
+ setVariable(attribute, property.value, variableNamesMap);
627
+ }
628
+ });
629
+ filterBy({
630
+ kind: "image"
631
+ }, themeConfig).forEach(function (_ref) {
632
+ var _theme$attribute;
633
+ var key = _ref.key;
634
+ var attribute = snakeToCamelCase(key);
635
+ setVariable(attribute, "url(".concat((_theme$attribute = theme[attribute]) === null || _theme$attribute === void 0 ? void 0 : _theme$attribute.url, ")"), variableNamesMap);
636
+ });
637
+ };
576
638
 
577
639
  var list = function list() {
578
- return axios.get("".concat(BASE_URL, "/api/v1/theme/configs"));
640
+ return axios.get("".concat(BASE_URL, "/api/v1/schema"));
579
641
  };
580
- var configsApi = {
642
+ var schemasApi = {
581
643
  list: list
582
644
  };
583
645
 
584
- var useListConfigs = function useListConfigs(_ref) {
646
+ var useListSchema = function useListSchema(_ref) {
585
647
  var onSuccess = _ref.onSuccess;
586
- return useQuery(QUERY_KEYS$1.CONFIG_DETAILS, configsApi.list, {
648
+ return useQuery(QUERY_KEYS$1.SCHEMA_DETAILS, schemasApi.list, {
587
649
  onSuccess: onSuccess
588
650
  });
589
651
  };
@@ -598,65 +660,42 @@ var useThemeUtils = function useThemeUtils() {
598
660
  }, shallow),
599
661
  previewingTheme = _useThemeStore.previewingTheme,
600
662
  currentTheme = _useThemeStore.currentTheme;
601
- var _useListConfigs = useListConfigs({
663
+ var _useListSchema = useListSchema({
602
664
  onSuccess: function onSuccess(_ref) {
603
- var _ref$config = _ref.config,
604
- themeConfig = _ref$config === void 0 ? [] : _ref$config,
665
+ var _ref$schema = _ref.schema,
666
+ themePropertiesSchema = _ref$schema === void 0 ? [] : _ref$schema,
605
667
  _ref$variableNamesMap = _ref.variableNamesMap,
606
668
  variableNamesMap = _ref$variableNamesMap === void 0 ? {} : _ref$variableNamesMap;
607
669
  return setConfigState({
608
- themeConfig: themeConfig,
670
+ themePropertiesSchema: themePropertiesSchema,
609
671
  variableNamesMap: variableNamesMap
610
672
  });
611
673
  }
612
674
  }),
613
- isFetchingConfig = _useListConfigs.isLoading,
614
- _useListConfigs$data = _useListConfigs.data,
615
- _useListConfigs$data2 = _useListConfigs$data === void 0 ? {} : _useListConfigs$data,
616
- _useListConfigs$data3 = _useListConfigs$data2.config,
617
- themeConfig = _useListConfigs$data3 === void 0 ? [] : _useListConfigs$data3,
618
- _useListConfigs$data4 = _useListConfigs$data2.variableNamesMap,
619
- variableNamesMap = _useListConfigs$data4 === void 0 ? {} : _useListConfigs$data4;
675
+ isFetchingSchema = _useListSchema.isLoading,
676
+ _useListSchema$data = _useListSchema.data,
677
+ _useListSchema$data2 = _useListSchema$data === void 0 ? {} : _useListSchema$data,
678
+ _useListSchema$data2$ = _useListSchema$data2.schema,
679
+ themePropertiesSchema = _useListSchema$data2$ === void 0 ? [] : _useListSchema$data2$,
680
+ _useListSchema$data2$2 = _useListSchema$data2.variableNamesMap,
681
+ variableNamesMap = _useListSchema$data2$2 === void 0 ? {} : _useListSchema$data2$2;
620
682
  useEffect(function () {
621
683
  return setConfigState({
622
- isFetchingConfig: isFetchingConfig
684
+ isFetchingSchema: isFetchingSchema
623
685
  });
624
- }, [isFetchingConfig]);
625
- var root = document.querySelector(":root");
626
- var setVariable = function setVariable(name, value) {
627
- var variableName = variableNamesMap[name];
628
- if (!variableName) return;
629
- root.style.setProperty(variableName, value);
686
+ }, [isFetchingSchema]);
687
+ var setVariable$1 = function setVariable$1(name, value) {
688
+ return setVariable(name, value, variableNamesMap);
630
689
  };
631
- var setTheme = function setTheme(theme) {
632
- if (isNotPresent(theme === null || theme === void 0 ? void 0 : theme.properties)) return;
633
- theme.properties.forEach(function (property) {
634
- var attribute = snakeToCamelCase(property.key);
635
- if (property.kind === "color") {
636
- setVariable(attribute, hexToRgba(property.value));
637
- } else if (property.kind === "overlay_opacity") {
638
- var overlayOpacity = Number(property.value);
639
- setVariable(snakeToCamelCase("".concat(property.key, "_overlay_opacity")), Math.abs(overlayOpacity / 100));
640
- setVariable(snakeToCamelCase("".concat(property.key, "_overlay_color")), overlayOpacity < 0 ? BLACK : WHITE);
641
- } else {
642
- setVariable(attribute, property.value);
643
- }
644
- });
645
- filterBy({
646
- kind: "image"
647
- }, themeConfig).forEach(function (_ref2) {
648
- var _theme$attribute;
649
- var key = _ref2.key;
650
- var attribute = snakeToCamelCase(key);
651
- setVariable(attribute, "url(".concat((_theme$attribute = theme[attribute]) === null || _theme$attribute === void 0 ? void 0 : _theme$attribute.url, ")"));
652
- });
690
+ var setTheme$1 = function setTheme$1(theme) {
691
+ return setTheme(theme, variableNamesMap, themePropertiesSchema);
653
692
  };
654
693
  return {
655
- setTheme: setTheme,
656
- setVariable: setVariable,
694
+ setTheme: setTheme$1,
695
+ setVariable: setVariable$1,
657
696
  previewingTheme: previewingTheme,
658
697
  currentTheme: currentTheme,
659
- isFetchingConfig: isFetchingConfig
698
+ isFetchingSchema: isFetchingSchema
660
699
  };
661
700
  };
662
701
 
@@ -777,11 +816,11 @@ var OVERLAY_OPACITY_SLIDER_MARKS = {
777
816
  };
778
817
  var HUNDRED = 100;
779
818
 
780
- var buildInitialValues = function buildInitialValues(theme, themeConfig) {
819
+ var buildInitialValues = function buildInitialValues(theme, themePropertiesSchema) {
781
820
  if (isPresent(theme)) return theme;
782
821
  return {
783
822
  name: t$6("neetoThemes.build.leftSideBar.themes.createTheme.newThemeName"),
784
- properties: themeConfig.map(function (_ref) {
823
+ properties: themePropertiesSchema.map(function (_ref) {
785
824
  var key = _ref.key,
786
825
  kind = _ref.kind,
787
826
  defaultValue = _ref.defaultValue;
@@ -828,27 +867,27 @@ var buildInitialValues = function buildInitialValues(theme, themeConfig) {
828
867
  }).filter(isNot(null))
829
868
  };
830
869
  };
831
- var buildImageData = function buildImageData(values, themeConfig) {
870
+ var buildImageData = function buildImageData(values, themePropertiesSchema) {
832
871
  return filterBy({
833
872
  kind: "image"
834
- }, themeConfig).reduce(function (acc, item) {
873
+ }, themePropertiesSchema).reduce(function (acc, item) {
835
874
  var _values$snakeToCamelC;
836
875
  var signedId = (_values$snakeToCamelC = values[snakeToCamelCase(item.key)]) === null || _values$snakeToCamelC === void 0 ? void 0 : _values$snakeToCamelC.signedId;
837
876
  acc[item.key] = signedId;
838
877
  return acc;
839
878
  }, {});
840
879
  };
841
- var isPropertyVisible = function isPropertyVisible(key, formikValues, themeConfig) {
880
+ var isPropertyVisible = function isPropertyVisible(key, formikValues, themePropertiesSchema) {
842
881
  var _findBy;
843
882
  var property = findBy({
844
883
  key: key
845
- }, themeConfig);
884
+ }, themePropertiesSchema);
846
885
  if (isNotPresent(property)) return false;
847
886
  var conditionalKey = property === null || property === void 0 ? void 0 : property.dependsOn;
848
887
  if (isNotPresent(conditionalKey)) return true;
849
888
  var dependentProperty = findBy({
850
889
  key: conditionalKey
851
- }, themeConfig);
890
+ }, themePropertiesSchema);
852
891
  if (dependentProperty.kind === "image") {
853
892
  var _formikValues$snakeTo;
854
893
  return isPresent((_formikValues$snakeTo = formikValues[snakeToCamelCase(conditionalKey)]) === null || _formikValues$snakeTo === void 0 ? void 0 : _formikValues$snakeTo.url);
@@ -2783,9 +2822,9 @@ function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) {
2783
2822
 
2784
2823
  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; }
2785
2824
 
2786
- 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; }
2825
+ 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; }
2787
2826
 
2788
- 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; }
2827
+ 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; }
2789
2828
  /**
2790
2829
  * Convenience wrapper component for the `useDropzone` hook
2791
2830
  *
@@ -6176,7 +6215,7 @@ var _reactInfiniteScroller2 = _interopRequireDefault(_reactInfiniteScroller);
6176
6215
 
6177
6216
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6178
6217
 
6179
- 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; }
6218
+ 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; }
6180
6219
 
6181
6220
  function _classCallCheck$4(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6182
6221
 
@@ -6280,7 +6319,7 @@ var MasonryInfiniteScroller = (_temp2 = _class = function (_Component) {
6280
6319
  _props.packed;
6281
6320
  _props.position;
6282
6321
  _props.sizes;
6283
- var props = _objectWithoutProperties$6(_props, ['children', 'className', 'style', 'pack', 'packed', 'position', 'sizes']);
6322
+ var props = _objectWithoutProperties$5(_props, ['children', 'className', 'style', 'pack', 'packed', 'position', 'sizes']);
6284
6323
 
6285
6324
  return _react2.default.createElement(
6286
6325
  _reactInfiniteScroller2.default,
@@ -13859,7 +13898,7 @@ function supportRef$3(nodeOrComponent) {
13859
13898
  }
13860
13899
  /* eslint-enable */
13861
13900
 
13862
- function _objectWithoutPropertiesLoose$5(source, excluded) {
13901
+ function _objectWithoutPropertiesLoose$4(source, excluded) {
13863
13902
  if (source == null) return {};
13864
13903
  var target = {};
13865
13904
  var sourceKeys = Object.keys(source);
@@ -13872,9 +13911,9 @@ function _objectWithoutPropertiesLoose$5(source, excluded) {
13872
13911
  return target;
13873
13912
  }
13874
13913
 
13875
- function _objectWithoutProperties$5(source, excluded) {
13914
+ function _objectWithoutProperties$4(source, excluded) {
13876
13915
  if (source == null) return {};
13877
- var target = _objectWithoutPropertiesLoose$5(source, excluded);
13916
+ var target = _objectWithoutPropertiesLoose$4(source, excluded);
13878
13917
  var key, i;
13879
13918
  if (Object.getOwnPropertySymbols) {
13880
13919
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -13892,7 +13931,7 @@ var _excluded$7 = ["children"];
13892
13931
  var Context$1 = /*#__PURE__*/React.createContext({});
13893
13932
  function MotionProvider(_ref) {
13894
13933
  var children = _ref.children,
13895
- props = _objectWithoutProperties$5(_ref, _excluded$7);
13934
+ props = _objectWithoutProperties$4(_ref, _excluded$7);
13896
13935
  return /*#__PURE__*/React.createElement(Context$1.Provider, {
13897
13936
  value: props
13898
13937
  }, children);
@@ -14705,7 +14744,7 @@ function genCSSMotionList$1(transitionSupport) {
14705
14744
  children = _this$props.children,
14706
14745
  _onVisibleChanged = _this$props.onVisibleChanged,
14707
14746
  onAllRemoved = _this$props.onAllRemoved,
14708
- restProps = _objectWithoutProperties$5(_this$props, _excluded$6);
14747
+ restProps = _objectWithoutProperties$4(_this$props, _excluded$6);
14709
14748
  var Component = component || React.Fragment;
14710
14749
  var motionProps = {};
14711
14750
  MOTION_PROP_NAMES$1.forEach(function (prop) {
@@ -14715,7 +14754,7 @@ function genCSSMotionList$1(transitionSupport) {
14715
14754
  delete restProps.keys;
14716
14755
  return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2, index) {
14717
14756
  var status = _ref2.status,
14718
- eventProps = _objectWithoutProperties$5(_ref2, _excluded2$1);
14757
+ eventProps = _objectWithoutProperties$4(_ref2, _excluded2$1);
14719
14758
  var visible = status === STATUS_ADD$1 || status === STATUS_KEEP$1;
14720
14759
  return /*#__PURE__*/React.createElement(CSSMotion, _extends$6({}, motionProps, {
14721
14760
  key: eventProps.key,
@@ -16503,7 +16542,7 @@ function supportRef$1(nodeOrComponent) {
16503
16542
  }
16504
16543
  /* eslint-enable */
16505
16544
 
16506
- function _objectWithoutPropertiesLoose$4(source, excluded) {
16545
+ function _objectWithoutPropertiesLoose$3(source, excluded) {
16507
16546
  if (source == null) return {};
16508
16547
  var target = {};
16509
16548
  var sourceKeys = Object.keys(source);
@@ -16516,9 +16555,9 @@ function _objectWithoutPropertiesLoose$4(source, excluded) {
16516
16555
  return target;
16517
16556
  }
16518
16557
 
16519
- function _objectWithoutProperties$4(source, excluded) {
16558
+ function _objectWithoutProperties$3(source, excluded) {
16520
16559
  if (source == null) return {};
16521
- var target = _objectWithoutPropertiesLoose$4(source, excluded);
16560
+ var target = _objectWithoutPropertiesLoose$3(source, excluded);
16522
16561
  var key, i;
16523
16562
  if (Object.getOwnPropertySymbols) {
16524
16563
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -17454,7 +17493,7 @@ function genCSSMotionList(transitionSupport) {
17454
17493
  children = _this$props.children,
17455
17494
  _onVisibleChanged = _this$props.onVisibleChanged,
17456
17495
  onAllRemoved = _this$props.onAllRemoved,
17457
- restProps = _objectWithoutProperties$4(_this$props, _excluded$5);
17496
+ restProps = _objectWithoutProperties$3(_this$props, _excluded$5);
17458
17497
  var Component = component || React.Fragment;
17459
17498
  var motionProps = {};
17460
17499
  MOTION_PROP_NAMES.forEach(function (prop) {
@@ -17464,7 +17503,7 @@ function genCSSMotionList(transitionSupport) {
17464
17503
  delete restProps.keys;
17465
17504
  return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2) {
17466
17505
  var status = _ref2.status,
17467
- eventProps = _objectWithoutProperties$4(_ref2, _excluded2);
17506
+ eventProps = _objectWithoutProperties$3(_ref2, _excluded2);
17468
17507
  var visible = status === STATUS_ADD || status === STATUS_KEEP;
17469
17508
  return /*#__PURE__*/React.createElement(CSSMotion$1, _extends$4({}, motionProps, {
17470
17509
  key: eventProps.key,
@@ -17988,7 +18027,7 @@ function _slicedToArray$2(arr, i) {
17988
18027
  return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$2(arr, i) || _nonIterableRest$2();
17989
18028
  }
17990
18029
 
17991
- function _objectWithoutPropertiesLoose$3(source, excluded) {
18030
+ function _objectWithoutPropertiesLoose$2(source, excluded) {
17992
18031
  if (source == null) return {};
17993
18032
  var target = {};
17994
18033
  var sourceKeys = Object.keys(source);
@@ -18001,9 +18040,9 @@ function _objectWithoutPropertiesLoose$3(source, excluded) {
18001
18040
  return target;
18002
18041
  }
18003
18042
 
18004
- function _objectWithoutProperties$3(source, excluded) {
18043
+ function _objectWithoutProperties$2(source, excluded) {
18005
18044
  if (source == null) return {};
18006
- var target = _objectWithoutPropertiesLoose$3(source, excluded);
18045
+ var target = _objectWithoutPropertiesLoose$2(source, excluded);
18007
18046
  var key, i;
18008
18047
  if (Object.getOwnPropertySymbols) {
18009
18048
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -19977,7 +20016,7 @@ function generateTrigger() {
19977
20016
  maskAnimation = props.maskAnimation,
19978
20017
  className = props.className,
19979
20018
  getTriggerDOMNode = props.getTriggerDOMNode,
19980
- restProps = _objectWithoutProperties$3(props, _excluded$4);
20019
+ restProps = _objectWithoutProperties$2(props, _excluded$4);
19981
20020
  var mergedAutoDestroy = autoDestroy || destroyPopupOnHide || false;
19982
20021
 
19983
20022
  // =========================== Mobile ===========================
@@ -20524,7 +20563,7 @@ function _objectSpread2$1(target) {
20524
20563
  return target;
20525
20564
  }
20526
20565
 
20527
- function _objectWithoutPropertiesLoose$2(source, excluded) {
20566
+ function _objectWithoutPropertiesLoose$1(source, excluded) {
20528
20567
  if (source == null) return {};
20529
20568
  var target = {};
20530
20569
  var sourceKeys = Object.keys(source);
@@ -20537,9 +20576,9 @@ function _objectWithoutPropertiesLoose$2(source, excluded) {
20537
20576
  return target;
20538
20577
  }
20539
20578
 
20540
- function _objectWithoutProperties$2(source, excluded) {
20579
+ function _objectWithoutProperties$1(source, excluded) {
20541
20580
  if (source == null) return {};
20542
- var target = _objectWithoutPropertiesLoose$2(source, excluded);
20581
+ var target = _objectWithoutPropertiesLoose$1(source, excluded);
20543
20582
  var key, i;
20544
20583
  if (Object.getOwnPropertySymbols) {
20545
20584
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -20669,7 +20708,7 @@ var Tooltip$2 = function Tooltip(props, ref) {
20669
20708
  id = props.id,
20670
20709
  _props$showArrow = props.showArrow,
20671
20710
  showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
20672
- restProps = _objectWithoutProperties$2(props, _excluded$3);
20711
+ restProps = _objectWithoutProperties$1(props, _excluded$3);
20673
20712
  var triggerRef = useRef(null);
20674
20713
  useImperativeHandle(ref, function () {
20675
20714
  return triggerRef.current;
@@ -21593,7 +21632,7 @@ function _extends() {
21593
21632
  return _extends.apply(this, arguments);
21594
21633
  }
21595
21634
 
21596
- function _objectWithoutPropertiesLoose$1(source, excluded) {
21635
+ function _objectWithoutPropertiesLoose(source, excluded) {
21597
21636
  if (source == null) return {};
21598
21637
  var target = {};
21599
21638
  var sourceKeys = Object.keys(source);
@@ -21606,9 +21645,9 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
21606
21645
  return target;
21607
21646
  }
21608
21647
 
21609
- function _objectWithoutProperties$1(source, excluded) {
21648
+ function _objectWithoutProperties(source, excluded) {
21610
21649
  if (source == null) return {};
21611
- var target = _objectWithoutPropertiesLoose$1(source, excluded);
21650
+ var target = _objectWithoutPropertiesLoose(source, excluded);
21612
21651
  var key, i;
21613
21652
  if (Object.getOwnPropertySymbols) {
21614
21653
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -21665,7 +21704,7 @@ var Handle = /*#__PURE__*/React.forwardRef(function (props, ref) {
21665
21704
  render = props.render,
21666
21705
  dragging = props.dragging,
21667
21706
  onOffsetChange = props.onOffsetChange,
21668
- restProps = _objectWithoutProperties$1(props, _excluded$2);
21707
+ restProps = _objectWithoutProperties(props, _excluded$2);
21669
21708
  var _React$useContext = React.useContext(SliderContext),
21670
21709
  min = _React$useContext.min,
21671
21710
  max = _React$useContext.max,
@@ -21775,7 +21814,7 @@ var Handles = /*#__PURE__*/React.forwardRef(function (props, ref) {
21775
21814
  values = props.values,
21776
21815
  handleRender = props.handleRender,
21777
21816
  draggingIndex = props.draggingIndex,
21778
- restProps = _objectWithoutProperties$1(props, _excluded$1);
21817
+ restProps = _objectWithoutProperties(props, _excluded$1);
21779
21818
  var handlesRef = React.useRef({});
21780
21819
  React.useImperativeHandle(ref, function () {
21781
21820
  return {
@@ -23318,42 +23357,13 @@ var SliderBlock = function SliderBlock(_ref) {
23318
23357
  });
23319
23358
  };
23320
23359
 
23321
- function _objectWithoutPropertiesLoose(source, excluded) {
23322
- if (source == null) return {};
23323
- var target = {};
23324
- var sourceKeys = Object.keys(source);
23325
- var key, i;
23326
- for (i = 0; i < sourceKeys.length; i++) {
23327
- key = sourceKeys[i];
23328
- if (excluded.indexOf(key) >= 0) continue;
23329
- target[key] = source[key];
23330
- }
23331
- return target;
23332
- }
23333
-
23334
- function _objectWithoutProperties(source, excluded) {
23335
- if (source == null) return {};
23336
- var target = _objectWithoutPropertiesLoose(source, excluded);
23337
- var key, i;
23338
- if (Object.getOwnPropertySymbols) {
23339
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
23340
- for (i = 0; i < sourceSymbolKeys.length; i++) {
23341
- key = sourceSymbolKeys[i];
23342
- if (excluded.indexOf(key) >= 0) continue;
23343
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
23344
- target[key] = source[key];
23345
- }
23346
- }
23347
- return target;
23348
- }
23349
-
23350
23360
  var _excluded = ["label", "name"];
23351
23361
  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; }
23352
23362
  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; }
23353
23363
  var SwitchBlock = function SwitchBlock(_ref) {
23354
23364
  var label = _ref.label,
23355
23365
  name = _ref.name,
23356
- switchProps = _objectWithoutProperties(_ref, _excluded);
23366
+ switchProps = _objectWithoutProperties$6(_ref, _excluded);
23357
23367
  return /*#__PURE__*/jsxs("div", {
23358
23368
  className: "flex items-center justify-between py-3 first:pt-0 last:pb-0",
23359
23369
  children: [/*#__PURE__*/jsx(Typography, {
@@ -23370,10 +23380,10 @@ var Properties = function Properties() {
23370
23380
  t = _useTranslation.t;
23371
23381
  var _useConfigStore = useConfigStore(function (store) {
23372
23382
  return {
23373
- themeConfig: store["themeConfig"]
23383
+ themePropertiesSchema: store["themePropertiesSchema"]
23374
23384
  };
23375
23385
  }, shallow),
23376
- themeConfig = _useConfigStore.themeConfig;
23386
+ themePropertiesSchema = _useConfigStore.themePropertiesSchema;
23377
23387
  var _useThemeStore = useThemeStore(function (store) {
23378
23388
  return {
23379
23389
  setThemeState: store["setThemeState"]
@@ -23429,7 +23439,7 @@ var Properties = function Properties() {
23429
23439
  var key = _ref2.key,
23430
23440
  value = _ref2.value,
23431
23441
  kind = _ref2.kind;
23432
- return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsx(FontPickerBlock, {
23442
+ return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsx(FontPickerBlock, {
23433
23443
  label: buildLabel(key, kind),
23434
23444
  options: FONT_OPTIONS,
23435
23445
  value: findBy({
@@ -23448,7 +23458,7 @@ var Properties = function Properties() {
23448
23458
  var key = _ref4.key,
23449
23459
  value = _ref4.value,
23450
23460
  kind = _ref4.kind;
23451
- return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsx(ColorBlock, {
23461
+ return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsx(ColorBlock, {
23452
23462
  color: value,
23453
23463
  label: buildLabel(key, kind),
23454
23464
  onChange: handleColorChange(key)
@@ -23459,7 +23469,7 @@ var Properties = function Properties() {
23459
23469
  var key = _ref5.key,
23460
23470
  value = _ref5.value,
23461
23471
  kind = _ref5.kind;
23462
- return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsx(SliderBlock, {
23472
+ return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsx(SliderBlock, {
23463
23473
  label: buildLabel(key, kind),
23464
23474
  marks: OVERLAY_OPACITY_SLIDER_MARKS,
23465
23475
  max: HUNDRED,
@@ -23481,8 +23491,8 @@ var Properties = function Properties() {
23481
23491
  }, values.properties);
23482
23492
  var options = (_findBy = findBy({
23483
23493
  key: key
23484
- }, themeConfig)) === null || _findBy === void 0 || (_findBy = _findBy.options) === null || _findBy === void 0 ? void 0 : _findBy.map(toLabelAndValue);
23485
- return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsx(SelectBlock, {
23494
+ }, themePropertiesSchema)) === null || _findBy === void 0 || (_findBy = _findBy.options) === null || _findBy === void 0 ? void 0 : _findBy.map(toLabelAndValue);
23495
+ return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsx(SelectBlock, {
23486
23496
  label: buildLabel(key, kind),
23487
23497
  options: options || POSITION_OPTIONS,
23488
23498
  placeholder: "left",
@@ -23500,7 +23510,7 @@ var Properties = function Properties() {
23500
23510
  var index = findIndexBy({
23501
23511
  key: key
23502
23512
  }, values.properties);
23503
- return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsx(SwitchBlock, {
23513
+ return isPropertyVisible(key, values, themePropertiesSchema) && /*#__PURE__*/jsx(SwitchBlock, {
23504
23514
  checked: value !== "false",
23505
23515
  label: buildLabel(key, kind),
23506
23516
  onChange: function onChange(e) {
@@ -23534,10 +23544,10 @@ var Customize = function Customize(_ref) {
23534
23544
  t = _useTranslation.t;
23535
23545
  var _useConfigStore = useConfigStore(function (store) {
23536
23546
  return {
23537
- themeConfig: store["themeConfig"]
23547
+ themePropertiesSchema: store["themePropertiesSchema"]
23538
23548
  };
23539
23549
  }, shallow),
23540
- themeConfig = _useConfigStore.themeConfig;
23550
+ themePropertiesSchema = _useConfigStore.themePropertiesSchema;
23541
23551
  var _useCreateTheme = useCreateTheme(),
23542
23552
  createTheme = _useCreateTheme.mutate,
23543
23553
  isCreating = _useCreateTheme.isLoading;
@@ -23547,7 +23557,7 @@ var Customize = function Customize(_ref) {
23547
23557
  var isSubmitting = isCreating || isUpdating;
23548
23558
  var onSubmit = function onSubmit(values, _ref2) {
23549
23559
  var resetForm = _ref2.resetForm;
23550
- var imageData = buildImageData(values, themeConfig);
23560
+ var imageData = buildImageData(values, themePropertiesSchema);
23551
23561
  var themeToSave = _objectSpread({
23552
23562
  propertiesAttributes: values.properties,
23553
23563
  name: values.name
@@ -23570,7 +23580,7 @@ var Customize = function Customize(_ref) {
23570
23580
  };
23571
23581
  return /*#__PURE__*/jsx(Form, {
23572
23582
  formikProps: {
23573
- initialValues: buildInitialValues(theme, themeConfig),
23583
+ initialValues: buildInitialValues(theme, themePropertiesSchema),
23574
23584
  validationSchema: THEME_VALIDATION_SCHEMA,
23575
23585
  onSubmit: onSubmit
23576
23586
  },
@@ -23582,7 +23592,7 @@ var Customize = function Customize(_ref) {
23582
23592
  className: "flex flex-col gap-6 p-4",
23583
23593
  children: [/*#__PURE__*/jsx(ThemeMeta, {}), /*#__PURE__*/jsx(Properties, {}), filterBy({
23584
23594
  kind: "image"
23585
- }, themeConfig).map(function (_ref5) {
23595
+ }, themePropertiesSchema).map(function (_ref5) {
23586
23596
  var key = _ref5.key;
23587
23597
  return /*#__PURE__*/jsx(Images, {
23588
23598
  attribute: key
@@ -23617,14 +23627,14 @@ var Thumbnail = function Thumbnail(_ref) {
23617
23627
  theme = _ref.theme;
23618
23628
  var _useConfigStore = useConfigStore(function (store) {
23619
23629
  return {
23620
- themeConfig: store["themeConfig"]
23630
+ themePropertiesSchema: store["themePropertiesSchema"]
23621
23631
  };
23622
23632
  }, shallow),
23623
- _useConfigStore$theme = _useConfigStore.themeConfig,
23624
- themeConfig = _useConfigStore$theme === void 0 ? [] : _useConfigStore$theme;
23625
- var _themeConfig = _slicedToArray$9(themeConfig, 2),
23626
- colorObject1 = _themeConfig[0],
23627
- colorObject2 = _themeConfig[1];
23633
+ _useConfigStore$theme = _useConfigStore.themePropertiesSchema,
23634
+ themePropertiesSchema = _useConfigStore$theme === void 0 ? [] : _useConfigStore$theme;
23635
+ var _themePropertiesSchem = _slicedToArray$9(themePropertiesSchema, 2),
23636
+ colorObject1 = _themePropertiesSchem[0],
23637
+ colorObject2 = _themePropertiesSchem[1];
23628
23638
  var primaryLabel = humanize(colorObject1 === null || colorObject1 === void 0 ? void 0 : colorObject1.key);
23629
23639
  var secondaryLabel = humanize(colorObject2 === null || colorObject2 === void 0 ? void 0 : colorObject2.key);
23630
23640
  var primaryColor = findBy({
@@ -23635,11 +23645,11 @@ var Thumbnail = function Thumbnail(_ref) {
23635
23645
  }, theme.properties).value;
23636
23646
  var backgroundImageUrl = (_theme$snakeToCamelCa = theme[snakeToCamelCase(findBy({
23637
23647
  useAsCardBackground: true
23638
- }, themeConfig).key)]) === null || _theme$snakeToCamelCa === void 0 ? void 0 : _theme$snakeToCamelCa.url;
23648
+ }, themePropertiesSchema).key)]) === null || _theme$snakeToCamelCa === void 0 ? void 0 : _theme$snakeToCamelCa.url;
23639
23649
  var buttonBackgroundColor = (_findBy = findBy({
23640
23650
  key: (_findBy2 = findBy({
23641
23651
  useAsCardButtonBackground: true
23642
- }, themeConfig)) === null || _findBy2 === void 0 ? void 0 : _findBy2.key
23652
+ }, themePropertiesSchema)) === null || _findBy2 === void 0 ? void 0 : _findBy2.key
23643
23653
  }, theme.properties)) === null || _findBy === void 0 ? void 0 : _findBy.value;
23644
23654
  return /*#__PURE__*/jsx("div", {
23645
23655
  className: classNames("neeto-themes-theme-thumbnail neeto-ui-rounded-lg border transition-all duration-300 ease-in-out", {
@@ -23695,7 +23705,7 @@ var Card = function Card(_ref) {
23695
23705
  onSetPreviewTheme = _ref.onSetPreviewTheme,
23696
23706
  onDeleteTheme = _ref.onDeleteTheme,
23697
23707
  onEditTheme = _ref.onEditTheme,
23698
- onApplyTheme = _ref.onApplyTheme,
23708
+ applyTheme = _ref.applyTheme,
23699
23709
  theme = _ref.theme,
23700
23710
  isApplyingTheme = _ref.isApplyingTheme,
23701
23711
  onCloneTheme = _ref.onCloneTheme,
@@ -23718,7 +23728,7 @@ var Card = function Card(_ref) {
23718
23728
  var handleApplyThemeClick = function handleApplyThemeClick() {
23719
23729
  if (isApplyingTheme) return;
23720
23730
  setThemeBeingApplied(theme);
23721
- onApplyTheme({
23731
+ applyTheme({
23722
23732
  themeId: theme.id,
23723
23733
  entityId: entityId,
23724
23734
  entityType: entityType
@@ -23844,7 +23854,7 @@ var Themes = function Themes(_ref) {
23844
23854
  setThemeBeingApplied = _useState4[1];
23845
23855
  var _useCloneTheme = useCloneTheme(),
23846
23856
  cloneTheme = _useCloneTheme.mutate;
23847
- var _useCreateThemeEntity = useCreateThemeEntity({
23857
+ var _useApplyTheme = useApplyTheme({
23848
23858
  onSuccess: function onSuccess(_ref2) {
23849
23859
  var theme = _ref2.theme;
23850
23860
  setTheme(theme);
@@ -23854,8 +23864,8 @@ var Themes = function Themes(_ref) {
23854
23864
  setThemeBeingApplied({});
23855
23865
  }
23856
23866
  }),
23857
- onApplyTheme = _useCreateThemeEntity.mutate,
23858
- isApplyingTheme = _useCreateThemeEntity.isLoading;
23867
+ applyTheme = _useApplyTheme.mutate,
23868
+ isApplyingTheme = _useApplyTheme.isLoading;
23859
23869
  useEffect(function () {
23860
23870
  if (didScrollActiveThemeIntoView.current || !(currentTheme !== null && currentTheme !== void 0 && currentTheme.id)) return;
23861
23871
  didScrollActiveThemeIntoView.current = true;
@@ -23915,7 +23925,7 @@ var Themes = function Themes(_ref) {
23915
23925
  className: "flex flex-col gap-4 px-4 pb-10 lg:px-5 xl:px-6",
23916
23926
  children: filteredDefaultThemes.map(function (theme) {
23917
23927
  return /*#__PURE__*/createElement(Card$1, {
23918
- onApplyTheme: onApplyTheme,
23928
+ applyTheme: applyTheme,
23919
23929
  setThemeBeingApplied: setThemeBeingApplied,
23920
23930
  theme: theme,
23921
23931
  thumbnail: thumbnail,
@@ -23943,8 +23953,8 @@ var Themes = function Themes(_ref) {
23943
23953
  var isActive = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === theme.id;
23944
23954
  var isPreviewing = (previewingTheme === null || previewingTheme === void 0 ? void 0 : previewingTheme.id) === theme.id;
23945
23955
  return /*#__PURE__*/createElement(Card$1, {
23956
+ applyTheme: applyTheme,
23946
23957
  isPreviewing: isPreviewing,
23947
- onApplyTheme: onApplyTheme,
23948
23958
  onEditTheme: onEditTheme,
23949
23959
  setThemeBeingApplied: setThemeBeingApplied,
23950
23960
  theme: theme,
@@ -24043,12 +24053,12 @@ var Sidebar = function Sidebar(_ref) {
24043
24053
  return {
24044
24054
  entityType: store["entityType"],
24045
24055
  entityId: store["entityId"],
24046
- isFetchingConfig: store["isFetchingConfig"]
24056
+ isFetchingSchema: store["isFetchingSchema"]
24047
24057
  };
24048
24058
  }, shallow),
24049
24059
  entityType = _useConfigStore.entityType,
24050
24060
  entityId = _useConfigStore.entityId,
24051
- isFetchingConfig = _useConfigStore.isFetchingConfig;
24061
+ isFetchingSchema = _useConfigStore.isFetchingSchema;
24052
24062
  var _useThemeStore = useThemeStore(function (store) {
24053
24063
  return {
24054
24064
  setThemeState: store["setThemeState"]
@@ -24160,7 +24170,7 @@ var Sidebar = function Sidebar(_ref) {
24160
24170
  themeToHighlight: themeToHighlight,
24161
24171
  themes: themes,
24162
24172
  thumbnail: thumbnail,
24163
- isLoading: isLoading || isFetchingConfig,
24173
+ isLoading: isLoading || isFetchingSchema,
24164
24174
  onDeleteTheme: handleDelete,
24165
24175
  onEditTheme: handleEditTheme
24166
24176
  }) : /*#__PURE__*/jsx(Customize, {
@@ -24182,7 +24192,7 @@ var Sidebar = function Sidebar(_ref) {
24182
24192
  });
24183
24193
  };
24184
24194
 
24185
- var NeetoThemes = function NeetoThemes(_ref) {
24195
+ var NeetoThemesBuilder = function NeetoThemesBuilder(_ref) {
24186
24196
  var children = _ref.children,
24187
24197
  entityType = _ref.entityType,
24188
24198
  entityId = _ref.entityId,
@@ -24218,12 +24228,12 @@ var NeetoThemes = function NeetoThemes(_ref) {
24218
24228
  })]
24219
24229
  });
24220
24230
  };
24221
- var index = withTitle(NeetoThemes, t$6("neetoThemes.common.design"));
24231
+ var index = withTitle(NeetoThemesBuilder, t$6("neetoThemes.common.design"));
24222
24232
 
24223
24233
  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}}
24224
24234
 
24225
24235
  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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3RoZW1lcy5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3R5bGVzaGVldHMvYXBwbGljYXRpb24uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1QkFFRSxZQUFBLENBREEsVUNFRixDRENFLDZDQUdFLDJDQUFBLENBQ0EsbUNBQUEsQ0FGQSx5QkFBQSxDQURBLFdDSUosQ0RBSSwwQkFMRiw2Q0FNSSxXQ0dKLENBQ0YsQ0RGSSwwQkFSRiw2Q0FTSSxXQ0tKLENBQ0YsQ0RISSwyRUFFRSxrQkFBQSxDQURBLGdCQ01OLENERkksMkVBQ0UsMEJBQUEsQ0FDQSxlQ0lOLENERFEsNElBQ0UsWUNHVixDREdFLHNEQUdFLFdBQUEsQ0FEQSx5QkFBQSxDQURBLGlCQ0NKLENES0Esc0NBQ0UsdURBQUEsQ0FDQSwrRENGRixDREtBLDhDQUNFLDBDQUFBLENBQ0Esa0RDRkYsQ0RLQSxnREFFRSw2Q0FBQSxDQUNBLHFEQUFBLENBRkEsMENDQUYiLCJzb3VyY2VzQ29udGVudCI6WyIubmVldG8tdGhlbWVzX193cmFwcGVyIHtcbiAgd2lkdGg6IDEwMCU7XG4gIGRpc3BsYXk6IGZsZXg7XG5cbiAgLm5lZXRvLXRoZW1lcy1zaWRlYmFyIHtcbiAgICB3aWR0aDogJHRoZW1lcy1zaWRlYmFyLXdpZHRoLXNtO1xuICAgIGhlaWdodDogY2FsYygxMDB2aCAtICN7JGJ1aWxkZXItaGVhZGVyLWhlaWdod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odW1ibmFpbC0tcHJldmlldy1hY3RpdmUge1xuICBib3JkZXItY29sb3I6IHJnYih2YXIoLS1uZWV0by11aS1ncmF5LTcwMCkpO1xuICBib3gtc2hhZG93OiAwcHggMHB4IDBweCAxcHggcmdiKHZhcigtLW5lZXRvLXVpLWdyYXktNzAwKSk7XG59XG5cbi5uZWV0by10aGVtZXMtdGhlbWUtdGh1bWJuYWlsLS1oaWdobGlnaHQtYWN0aXZlIHtcbiAgdHJhbnNpdGlvbjogYm9yZGVyLWNvbG9yIDEwMG1zIGJveC1zaGFkb3cgMTAwbXM7XG4gIGJvcmRlci1jb2xvcjogcmdiKHZhcigtLW5lZXRvLXVpLXN1Y2Nlc3MtNTAwKSk7XG4gIGJveC1zaGFkb3c6IDBweCAwcHggMHB4IDFweCByZ2IodmFyKC0tbmVldG8tdWktc3VjY2Vzcy01MDApKTtcbn0iXX0= */";
24226
24236
  n(css,{});
24227
24237
 
24228
- export { index as NeetoThemes, useThemeUtils };
24238
+ export { index as NeetoThemesBuilder, setTheme, useThemeUtils };
24229
24239
  //# sourceMappingURL=index.js.map