lib-pixelbuild 0.4.1 → 0.4.2

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.
@@ -28,6 +28,10 @@ const DividerComponent = memo(function DividerComponent({ component }) {
28
28
  marginLeft,
29
29
  marginRight
30
30
  };
31
- return (_jsx(ComponentShell, { component: component, outer: "div", children: _jsx("div", { style: { display: 'flex', flexDirection: isVertical ? 'row' : 'column', minHeight: isVertical ? undefined : '1px' }, children: _jsx("div", { style: line, "aria-hidden": "true" }) }) }));
31
+ return (_jsx(ComponentShell, { component: component, outer: "div", children: _jsx("div", { style: {
32
+ display: 'flex',
33
+ flexDirection: isVertical ? 'row' : 'column',
34
+ minHeight: isVertical ? undefined : '1px'
35
+ }, children: _jsx("div", { style: line, "aria-hidden": "true" }) }) }));
32
36
  });
33
37
  export { DividerComponent };
@@ -9,8 +9,11 @@ function gridClass(id) {
9
9
  return `pixelbuild-grid-${String(id).replace(/[^a-zA-Z0-9_-]/g, '_')}`;
10
10
  }
11
11
  const BlockGrid = memo(function BlockGrid({ block, editionMode, componentDefaults }) {
12
+ var _a;
12
13
  const grid = gridClass(block.id);
13
14
  const components = orderBySort(block.components);
15
+ const gap = (_a = block.properties) === null || _a === void 0 ? void 0 : _a.gap;
16
+ const gapValue = gap === '' || gap === undefined || gap === null ? '0' : String(gap);
14
17
  const css = useMemo(() => {
15
18
  const rules = components
16
19
  .map((component) => {
@@ -29,8 +32,8 @@ const BlockGrid = memo(function BlockGrid({ block, editionMode, componentDefault
29
32
  ].join('');
30
33
  })
31
34
  .join('');
32
- return `.${grid}{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:0}${rules}`;
33
- }, [grid, components]);
35
+ return `.${grid}{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:${gapValue}}${rules}`;
36
+ }, [grid, components, gapValue]);
34
37
  if (editionMode && components.length === 0) {
35
38
  return (_jsxs("div", { "data-pixelbuild-empty-block": block.id, style: {
36
39
  minHeight: 80,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lib-pixelbuild",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "engines": {
5
5
  "node": "^24.0.0",
6
6
  "npm": ">=10"