@bigbinary/neeto-themes-frontend 4.0.29 → 4.0.30
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/.ready +1 -1
- package/dist/NeetoThemesBuilder.js +74 -6
- package/dist/NeetoThemesBuilder.js.map +1 -1
- package/dist/cjs/NeetoThemesBuilder.js +83 -15
- package/dist/cjs/NeetoThemesBuilder.js.map +1 -1
- package/dist/cjs/hooks.js +2 -5
- package/dist/cjs/hooks.js.map +1 -1
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/utils.js +1 -4
- package/dist/cjs/utils.js.map +1 -1
- package/dist/cjs/v2/NeetoThemesBuilder.js +3 -4
- package/dist/cjs/v2/NeetoThemesBuilder.js.map +1 -1
- package/dist/cjs/v2/hooks.js +2 -5
- package/dist/cjs/v2/hooks.js.map +1 -1
- package/dist/cjs/v2/index.js +3 -4
- package/dist/cjs/v2/index.js.map +1 -1
- package/dist/cjs/v2/utils.js +1 -4
- package/dist/cjs/v2/utils.js.map +1 -1
- package/dist/hooks.js +2 -5
- package/dist/hooks.js.map +1 -1
- package/dist/{index-BUeeI0XI.js → index-CZdpMMBb.js} +8 -80
- package/dist/index-CZdpMMBb.js.map +1 -0
- package/dist/{index-BZB12oJt.js → index-CzRk-Wf1.js} +9 -76
- package/dist/index-CzRk-Wf1.js.map +1 -0
- package/dist/index.js +6 -6
- package/dist/{useExpandedSection-GpzbAxmE.js → useExpandedSection-BTBI4UqP.js} +2 -2
- package/dist/{useExpandedSection-GpzbAxmE.js.map → useExpandedSection-BTBI4UqP.js.map} +1 -1
- package/dist/{useExpandedSection-CelNLEKQ.js → useExpandedSection-MjgB7rh6.js} +2 -2
- package/dist/{useExpandedSection-CelNLEKQ.js.map → useExpandedSection-MjgB7rh6.js.map} +1 -1
- package/dist/{useGlobalThemesApi-NQA1B1Zs.js → useGlobalThemesApi-BTyTasTb.js} +3 -3
- package/dist/{useGlobalThemesApi-NQA1B1Zs.js.map → useGlobalThemesApi-BTyTasTb.js.map} +1 -1
- package/dist/{useGlobalThemesApi-DOH4EK5Q.js → useGlobalThemesApi-BUsKyTn_.js} +3 -3
- package/dist/{useGlobalThemesApi-DOH4EK5Q.js.map → useGlobalThemesApi-BUsKyTn_.js.map} +1 -1
- package/dist/utils.js +1 -4
- package/dist/utils.js.map +1 -1
- package/dist/v2/NeetoThemesBuilder.js +3 -4
- package/dist/v2/NeetoThemesBuilder.js.map +1 -1
- package/dist/v2/hooks.js +2 -5
- package/dist/v2/hooks.js.map +1 -1
- package/dist/v2/index.js +3 -4
- package/dist/v2/index.js.map +1 -1
- package/dist/v2/utils.js +1 -4
- package/dist/v2/utils.js.map +1 -1
- package/package.json +3 -3
- package/dist/index-BUeeI0XI.js.map +0 -1
- package/dist/index-BZB12oJt.js.map +0 -1
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-06-
|
|
1
|
+
Built at 2026-06-30T13:52:28.940Z
|
|
@@ -4,9 +4,11 @@ import { isPresent, hyphenate, findBy, findIndexBy, isNot, filterBy, snakeToCame
|
|
|
4
4
|
import { withT, useQueryParams, useBreakpoints, PageTitle } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
5
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
6
6
|
import { useTranslation, Trans } from 'react-i18next';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
8
|
+
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
9
|
+
import Toastr from '@bigbinary/neetoui/Toastr';
|
|
10
|
+
import { u as useShowGlobalTheme, a as useFetchTheme, b as useCreateTheme, c as useUpdateTheme, d as routes, e as useCloneTheme, f as useApplyTheme, g as useListThemes, h as useShowThemeEntity, i as useDeleteTheme, r as registerNeetoThemesTranslations } from './useGlobalThemesApi-BTyTasTb.js';
|
|
11
|
+
import { a as useExpandedSection, b as useConfigStore, c as useThemeStore, u as useThemeUtils, P as POSITION_OPTIONS, H as HUNDRED, O as OVERLAY_OPACITY_SLIDER_MARKS, F as FONT_OPTIONS, d as useSyncExpandedSectionFromUrl, T as THEME_VALIDATION_SCHEMA, A as APPLY_SPINNER_DELAY } from './useExpandedSection-MjgB7rh6.js';
|
|
10
12
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
11
13
|
import classnames from 'classnames';
|
|
12
14
|
import { joinHyphenCase, buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
@@ -24,6 +26,7 @@ import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
|
24
26
|
import Form from '@bigbinary/neetoui/formik/Form';
|
|
25
27
|
import BlockNavigation from '@bigbinary/neetoui/formik/BlockNavigation';
|
|
26
28
|
import { useFormikContext, Field } from 'formik';
|
|
29
|
+
import { b as setCustomCSS } from './index-CzRk-Wf1.js';
|
|
27
30
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
28
31
|
import i18n, { t } from 'i18next';
|
|
29
32
|
import Right from '@bigbinary/neeto-icons/Right';
|
|
@@ -42,10 +45,7 @@ import Help from '@bigbinary/neeto-icons/Help';
|
|
|
42
45
|
import Checkbox from '@bigbinary/neetoui/Checkbox';
|
|
43
46
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
44
47
|
import Input from '@bigbinary/neetoui/Input';
|
|
45
|
-
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
46
|
-
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
47
48
|
import ImageUploader from '@bigbinary/neeto-image-uploader-frontend/ImageUploader';
|
|
48
|
-
import Toastr from '@bigbinary/neetoui/Toastr';
|
|
49
49
|
import Input$1 from '@bigbinary/neetoui/formik/Input';
|
|
50
50
|
import Search from '@bigbinary/neeto-molecules/Search';
|
|
51
51
|
import AddImage from '@bigbinary/neeto-icons/AddImage';
|
|
@@ -60,6 +60,74 @@ import 'axios';
|
|
|
60
60
|
import 'zustand';
|
|
61
61
|
import 'yup';
|
|
62
62
|
|
|
63
|
+
var getImageFromUrl = function getImageFromUrl(source) {
|
|
64
|
+
var image = new Image();
|
|
65
|
+
image.crossOrigin = "anonymous";
|
|
66
|
+
image.src = source;
|
|
67
|
+
return new Promise(function (resolve) {
|
|
68
|
+
image.onload = function () {
|
|
69
|
+
resolve(image);
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
var getDominantColorFromUrl = /*#__PURE__*/function () {
|
|
74
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(imageUrl) {
|
|
75
|
+
var image, context, c;
|
|
76
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
77
|
+
while (1) switch (_context.prev = _context.next) {
|
|
78
|
+
case 0:
|
|
79
|
+
_context.prev = 0;
|
|
80
|
+
_context.next = 3;
|
|
81
|
+
return getImageFromUrl(imageUrl);
|
|
82
|
+
case 3:
|
|
83
|
+
image = _context.sent;
|
|
84
|
+
context = document.createElement("canvas").getContext("2d");
|
|
85
|
+
context === null || context === void 0 || context.drawImage(image, 0, 0, 1, 1);
|
|
86
|
+
c = context === null || context === void 0 ? void 0 : context.getImageData(0, 0, 1, 1).data;
|
|
87
|
+
if (!c) {
|
|
88
|
+
_context.next = 9;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
return _context.abrupt("return", "#".concat(((1 << 24) + (c[0] << 16) + (c[1] << 8) + c[2]).toString(16).slice(1)));
|
|
92
|
+
case 9:
|
|
93
|
+
return _context.abrupt("return", null);
|
|
94
|
+
case 12:
|
|
95
|
+
_context.prev = 12;
|
|
96
|
+
_context.t0 = _context["catch"](0);
|
|
97
|
+
Toastr.error(_context.t0);
|
|
98
|
+
return _context.abrupt("return", null);
|
|
99
|
+
case 16:
|
|
100
|
+
case "end":
|
|
101
|
+
return _context.stop();
|
|
102
|
+
}
|
|
103
|
+
}, _callee, null, [[0, 12]]);
|
|
104
|
+
}));
|
|
105
|
+
return function getDominantColorFromUrl(_x) {
|
|
106
|
+
return _ref.apply(this, arguments);
|
|
107
|
+
};
|
|
108
|
+
}();
|
|
109
|
+
var scrollElementIntoView = function scrollElementIntoView(elementId) {
|
|
110
|
+
var elementToScroll = document.getElementById(elementId);
|
|
111
|
+
var sidebarContainer = document.querySelector(".neeto-themes-sidebar__scroll");
|
|
112
|
+
if (!elementToScroll || !sidebarContainer) return;
|
|
113
|
+
var elementRect = elementToScroll.getBoundingClientRect();
|
|
114
|
+
var sidebarContainerRect = sidebarContainer.getBoundingClientRect();
|
|
115
|
+
var offset = elementRect.top - sidebarContainerRect.top + sidebarContainer.scrollTop;
|
|
116
|
+
sidebarContainer.scrollTo({
|
|
117
|
+
top: offset,
|
|
118
|
+
behavior: "smooth"
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
var isFunction = function isFunction(obj) {
|
|
122
|
+
return typeof obj === "function";
|
|
123
|
+
};
|
|
124
|
+
var isNewThemeRoute = function isNewThemeRoute() {
|
|
125
|
+
return location.pathname.endsWith("new");
|
|
126
|
+
};
|
|
127
|
+
var isEditThemeRoute = function isEditThemeRoute() {
|
|
128
|
+
return location.pathname.endsWith("edit");
|
|
129
|
+
};
|
|
130
|
+
|
|
63
131
|
var DESIGN_SCREENS = {
|
|
64
132
|
THEMES: "Themes",
|
|
65
133
|
Customize: "Customize",
|