@gem-sdk/core 1.23.0-staging.125 → 1.23.0-staging.131

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.
@@ -59,7 +59,6 @@ const ComponentToolbarPreview = ({ ...props })=>{
59
59
  if (detail?.componentUid == props.uid) {
60
60
  const currentParents = getParents(props.uid).filter((parent)=>{
61
61
  if (parent.uid === 'ROOT') return false;
62
- if (parent.tag === 'Section') return false;
63
62
  if (parent.editorConfigs?.toolbar?.hide) return false;
64
63
  if (parent.editorConfigs?.component?.noSetting) return false;
65
64
  return true;
@@ -281,12 +280,21 @@ const ComponentToolbarPreview = ({ ...props })=>{
281
280
  })
282
281
  ]
283
282
  }),
284
- isShowParent && parents.map((parent, index)=>/*#__PURE__*/ jsxRuntime.jsxs("div", {
283
+ isShowParent && parents.map((parent, index)=>{
284
+ // Update count columns of Row
285
+ const parentLength = parent?.childrens?.length ?? 0;
286
+ let parent_label = parent.label;
287
+ if (parent.label === 'Row') {
288
+ parent_label = parentLength <= 1 ? parent.label + ' ' + parentLength + ' col' : parent.label + ' ' + parentLength + ' cols';
289
+ }
290
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
285
291
  "data-toolbar-parent": true,
286
292
  "data-parent-uid": parent.uid,
287
293
  "data-toolbar-theme-section": isThemeSectionEditor,
294
+ "data-toolbar-parent-revert": isShowParentRevert,
288
295
  style: {
289
- top: !isShowParentRevert ? `${-24 * (index + 1) + index}px` : `${31 + 24 * index - index}px`
296
+ top: !isShowParentRevert ? `${-36 * (index + 1)}px` // 32 height + 4 spacing
297
+ : `${36 * (index + 1)}px`
290
298
  },
291
299
  children: [
292
300
  /*#__PURE__*/ jsxRuntime.jsx("div", {
@@ -326,10 +334,11 @@ const ComponentToolbarPreview = ({ ...props })=>{
326
334
  }),
327
335
  /*#__PURE__*/ jsxRuntime.jsx("div", {
328
336
  "data-toolbar-name": true,
329
- children: parent.label
337
+ children: parent_label
330
338
  })
331
339
  ]
332
- }, parent.uid)),
340
+ }, parent.uid);
341
+ }),
333
342
  props.tag === 'Section' && !props.isThemeSection && editingPageType !== 'STATIC' && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsxRuntime.jsx(CreateThemeSection.CreateThemeSection, {
334
343
  ...props
335
344
  }),
@@ -417,8 +426,8 @@ const ComponentToolbarPreview = ({ ...props })=>{
417
426
  viewBox: "0 0 16 16",
418
427
  fill: "none",
419
428
  children: /*#__PURE__*/ jsxRuntime.jsx("path", {
420
- d: "M8.5 1.5C8.5 1.22386 8.27614 1 8 1C7.72386 1 7.5 1.22386 7.5 1.5V7.5H1.5C1.22386 7.5 1 7.72386 1 8C1 8.27614 1.22386 8.5 1.5 8.5H7.5V14.5C7.5 14.7761 7.72386 15 8 15C8.27614 15 8.5 14.7761 8.5 14.5V8.5H14.5C14.7761 8.5 15 8.27614 15 8C15 7.72386 14.7761 7.5 14.5 7.5H8.5V1.5Z",
421
- fill: "currentColor"
429
+ d: "M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",
430
+ fill: "#212121"
422
431
  })
423
432
  })
424
433
  }),
@@ -437,8 +446,8 @@ const ComponentToolbarPreview = ({ ...props })=>{
437
446
  viewBox: "0 0 16 16",
438
447
  fill: "none",
439
448
  children: /*#__PURE__*/ jsxRuntime.jsx("path", {
440
- d: "M8.5 1.5C8.5 1.22386 8.27614 1 8 1C7.72386 1 7.5 1.22386 7.5 1.5V7.5H1.5C1.22386 7.5 1 7.72386 1 8C1 8.27614 1.22386 8.5 1.5 8.5H7.5V14.5C7.5 14.7761 7.72386 15 8 15C8.27614 15 8.5 14.7761 8.5 14.5V8.5H14.5C14.7761 8.5 15 8.27614 15 8C15 7.72386 14.7761 7.5 14.5 7.5H8.5V1.5Z",
441
- fill: "currentColor"
449
+ d: "M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",
450
+ fill: "#212121"
442
451
  })
443
452
  })
444
453
  })
@@ -57,7 +57,6 @@ const ComponentToolbarPreview = ({ ...props })=>{
57
57
  if (detail?.componentUid == props.uid) {
58
58
  const currentParents = getParents(props.uid).filter((parent)=>{
59
59
  if (parent.uid === 'ROOT') return false;
60
- if (parent.tag === 'Section') return false;
61
60
  if (parent.editorConfigs?.toolbar?.hide) return false;
62
61
  if (parent.editorConfigs?.component?.noSetting) return false;
63
62
  return true;
@@ -279,12 +278,21 @@ const ComponentToolbarPreview = ({ ...props })=>{
279
278
  })
280
279
  ]
281
280
  }),
282
- isShowParent && parents.map((parent, index)=>/*#__PURE__*/ jsxs("div", {
281
+ isShowParent && parents.map((parent, index)=>{
282
+ // Update count columns of Row
283
+ const parentLength = parent?.childrens?.length ?? 0;
284
+ let parent_label = parent.label;
285
+ if (parent.label === 'Row') {
286
+ parent_label = parentLength <= 1 ? parent.label + ' ' + parentLength + ' col' : parent.label + ' ' + parentLength + ' cols';
287
+ }
288
+ return /*#__PURE__*/ jsxs("div", {
283
289
  "data-toolbar-parent": true,
284
290
  "data-parent-uid": parent.uid,
285
291
  "data-toolbar-theme-section": isThemeSectionEditor,
292
+ "data-toolbar-parent-revert": isShowParentRevert,
286
293
  style: {
287
- top: !isShowParentRevert ? `${-24 * (index + 1) + index}px` : `${31 + 24 * index - index}px`
294
+ top: !isShowParentRevert ? `${-36 * (index + 1)}px` // 32 height + 4 spacing
295
+ : `${36 * (index + 1)}px`
288
296
  },
289
297
  children: [
290
298
  /*#__PURE__*/ jsx("div", {
@@ -324,10 +332,11 @@ const ComponentToolbarPreview = ({ ...props })=>{
324
332
  }),
325
333
  /*#__PURE__*/ jsx("div", {
326
334
  "data-toolbar-name": true,
327
- children: parent.label
335
+ children: parent_label
328
336
  })
329
337
  ]
330
- }, parent.uid)),
338
+ }, parent.uid);
339
+ }),
331
340
  props.tag === 'Section' && !props.isThemeSection && editingPageType !== 'STATIC' && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsx(CreateThemeSection, {
332
341
  ...props
333
342
  }),
@@ -415,8 +424,8 @@ const ComponentToolbarPreview = ({ ...props })=>{
415
424
  viewBox: "0 0 16 16",
416
425
  fill: "none",
417
426
  children: /*#__PURE__*/ jsx("path", {
418
- d: "M8.5 1.5C8.5 1.22386 8.27614 1 8 1C7.72386 1 7.5 1.22386 7.5 1.5V7.5H1.5C1.22386 7.5 1 7.72386 1 8C1 8.27614 1.22386 8.5 1.5 8.5H7.5V14.5C7.5 14.7761 7.72386 15 8 15C8.27614 15 8.5 14.7761 8.5 14.5V8.5H14.5C14.7761 8.5 15 8.27614 15 8C15 7.72386 14.7761 7.5 14.5 7.5H8.5V1.5Z",
419
- fill: "currentColor"
427
+ d: "M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",
428
+ fill: "#212121"
420
429
  })
421
430
  })
422
431
  }),
@@ -435,8 +444,8 @@ const ComponentToolbarPreview = ({ ...props })=>{
435
444
  viewBox: "0 0 16 16",
436
445
  fill: "none",
437
446
  children: /*#__PURE__*/ jsx("path", {
438
- d: "M8.5 1.5C8.5 1.22386 8.27614 1 8 1C7.72386 1 7.5 1.22386 7.5 1.5V7.5H1.5C1.22386 7.5 1 7.72386 1 8C1 8.27614 1.22386 8.5 1.5 8.5H7.5V14.5C7.5 14.7761 7.72386 15 8 15C8.27614 15 8.5 14.7761 8.5 14.5V8.5H14.5C14.7761 8.5 15 8.27614 15 8C15 7.72386 14.7761 7.5 14.5 7.5H8.5V1.5Z",
439
- fill: "currentColor"
447
+ d: "M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",
448
+ fill: "#212121"
440
449
  })
441
450
  })
442
451
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.23.0-staging.125",
3
+ "version": "1.23.0-staging.131",
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.23.0-staging.26",
28
- "@gem-sdk/styles": "1.23.0-staging.78"
28
+ "@gem-sdk/styles": "1.23.0-staging.131"
29
29
  },
30
30
  "dependencies": {
31
31
  "react-error-boundary": "4.0.10",