@gem-sdk/core 1.22.31-new-feature.18 → 1.22.31-new-feature.23

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.
@@ -218,7 +218,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
218
218
  }),
219
219
  props.tag == 'Section' ? /*#__PURE__*/ jsxRuntime.jsx("div", {
220
220
  "data-toolbar-name": true,
221
- children: isThemeSection ? props.customLabel || props.label : `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`
221
+ children: isThemeSection ? props.name : `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`
222
222
  }) : /*#__PURE__*/ jsxRuntime.jsx("div", {
223
223
  "data-toolbar-name": true,
224
224
  children: props.customLabel || props.label
@@ -51,6 +51,13 @@ function Spacing(props) {
51
51
  if (delayMouseMove.current) clearTimeout(delayMouseMove.current);
52
52
  delayMouseMove.current = setTimeout(()=>{
53
53
  isDragging.current = true;
54
+ const event = new CustomEvent('editor:toolbar:resize-spacing', {
55
+ bubbles: true,
56
+ detail: {
57
+ value: true
58
+ }
59
+ });
60
+ window.dispatchEvent(event);
54
61
  document.addEventListener('mousemove', onMouseMoveDocument);
55
62
  document.addEventListener('mouseup', onMouseUpDocument);
56
63
  }, 100);
@@ -58,6 +65,13 @@ function Spacing(props) {
58
65
  const endDrag = ()=>{
59
66
  if (delayMouseMove.current) clearTimeout(delayMouseMove.current);
60
67
  isDragging.current = false;
68
+ const event = new CustomEvent('editor:toolbar:resize-spacing', {
69
+ bubbles: true,
70
+ detail: {
71
+ value: false
72
+ }
73
+ });
74
+ window.dispatchEvent(event);
61
75
  if ($bottomDrag.current) {
62
76
  const style = getComputedStyle($bottomDrag.current);
63
77
  const marginBottom = style.top;
@@ -216,7 +216,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
216
216
  }),
217
217
  props.tag == 'Section' ? /*#__PURE__*/ jsx("div", {
218
218
  "data-toolbar-name": true,
219
- children: isThemeSection ? props.customLabel || props.label : `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`
219
+ children: isThemeSection ? props.name : `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`
220
220
  }) : /*#__PURE__*/ jsx("div", {
221
221
  "data-toolbar-name": true,
222
222
  children: props.customLabel || props.label
@@ -47,6 +47,13 @@ function Spacing(props) {
47
47
  if (delayMouseMove.current) clearTimeout(delayMouseMove.current);
48
48
  delayMouseMove.current = setTimeout(()=>{
49
49
  isDragging.current = true;
50
+ const event = new CustomEvent('editor:toolbar:resize-spacing', {
51
+ bubbles: true,
52
+ detail: {
53
+ value: true
54
+ }
55
+ });
56
+ window.dispatchEvent(event);
50
57
  document.addEventListener('mousemove', onMouseMoveDocument);
51
58
  document.addEventListener('mouseup', onMouseUpDocument);
52
59
  }, 100);
@@ -54,6 +61,13 @@ function Spacing(props) {
54
61
  const endDrag = ()=>{
55
62
  if (delayMouseMove.current) clearTimeout(delayMouseMove.current);
56
63
  isDragging.current = false;
64
+ const event = new CustomEvent('editor:toolbar:resize-spacing', {
65
+ bubbles: true,
66
+ detail: {
67
+ value: false
68
+ }
69
+ });
70
+ window.dispatchEvent(event);
57
71
  if ($bottomDrag.current) {
58
72
  const style = getComputedStyle($bottomDrag.current);
59
73
  const marginBottom = style.top;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.22.31-new-feature.18",
3
+ "version": "1.22.31-new-feature.23",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@gem-sdk/adapter-shopify": "1.22.31-staging.0",
28
- "@gem-sdk/styles": "1.22.31-new-feature.18"
28
+ "@gem-sdk/styles": "1.22.31-new-feature.22"
29
29
  },
30
30
  "dependencies": {
31
31
  "react-error-boundary": "4.0.10",