@raketa-builder/menu-builder 1.8.0 → 1.8.1

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.
@@ -86,98 +86,91 @@ const ColumnBuilder = ({ value, onChange }) => {
86
86
  minWidth: `calc(${column.width / 5 * 100}% - 0.5em)`,
87
87
  flex: `0 0 calc(${column.width / 5 * 100}% - 0.5em)`
88
88
  } : {};
89
- return /* @__PURE__ */ jsxs(
90
- Panel,
91
- {
92
- style: widthStyle,
93
- children: [
94
- /* @__PURE__ */ jsxs(
95
- PanelTitle,
96
- {
97
- style: {
98
- display: "flex",
99
- flexWrap: "wrap",
100
- gap: "0.5em",
101
- alignItems: "center",
102
- justifyContent: "space-between"
103
- },
104
- children: [
105
- /* @__PURE__ */ jsxs(
106
- Stack,
107
- {
108
- className: "r-stack-align-center",
109
- style: { gap: "0.5em" },
110
- children: [
111
- /* @__PURE__ */ jsx(Handle, { className: "r-chandle" }),
112
- /* @__PURE__ */ jsxs("span", { style: { whiteSpace: "nowrap" }, children: [
113
- "Column #",
114
- idx + 1
115
- ] }),
116
- /* @__PURE__ */ jsxs(
117
- "select",
118
- {
119
- value: selectValue,
120
- onChange: (e) => updateColumnWidth(column, e.target.value),
121
- style: {
122
- padding: "0.25em 0.35em",
123
- borderRadius: "4px",
124
- border: "1px solid #ccc",
125
- fontSize: "0.875rem",
126
- minWidth: "60px"
127
- },
128
- title: selectValue === "" ? "Width: Auto" : `Width: ${selectValue}/5`,
129
- children: [
130
- /* @__PURE__ */ jsx("option", { value: "", children: "Auto" }),
131
- /* @__PURE__ */ jsx("option", { value: "1", children: "Width 1" }),
132
- /* @__PURE__ */ jsx("option", { value: "2", children: "Width 2" }),
133
- /* @__PURE__ */ jsx("option", { value: "3", children: "Width 3" }),
134
- /* @__PURE__ */ jsx("option", { value: "4", children: "Width 4" }),
135
- /* @__PURE__ */ jsx("option", { value: "5", children: "Width 5" })
136
- ]
137
- }
138
- )
139
- ]
140
- }
141
- ),
142
- /* @__PURE__ */ jsxs(
143
- Stack,
144
- {
145
- className: "r-stack-align-center",
146
- style: { gap: "0.25em" },
147
- children: [
148
- /* @__PURE__ */ jsx(
149
- Button,
150
- {
151
- variant: "secondary",
152
- onClick: () => duplicateColumn(state.columns, column),
153
- children: /* @__PURE__ */ jsx(Copy, {})
154
- }
155
- ),
156
- /* @__PURE__ */ jsx(
157
- Button,
158
- {
159
- variant: "secondary",
160
- onClick: () => removeColumn(state.columns, column),
161
- children: /* @__PURE__ */ jsx(Delete, {})
162
- }
163
- )
164
- ]
165
- }
166
- )
167
- ]
168
- }
169
- ),
170
- /* @__PURE__ */ jsx(PanelContent, { children: /* @__PURE__ */ jsx(
171
- ContentBuilder,
172
- {
173
- value: column,
174
- onChange: (column2) => updateColumn(state.columns, column2)
175
- }
176
- ) })
177
- ]
178
- },
179
- column.id
180
- );
89
+ return /* @__PURE__ */ jsxs(Panel, { style: widthStyle, children: [
90
+ /* @__PURE__ */ jsxs(
91
+ PanelTitle,
92
+ {
93
+ style: {
94
+ display: "flex",
95
+ flexWrap: "wrap",
96
+ gap: "0.5em",
97
+ alignItems: "center",
98
+ justifyContent: "space-between"
99
+ },
100
+ children: [
101
+ /* @__PURE__ */ jsxs(
102
+ Stack,
103
+ {
104
+ className: "r-stack-align-center",
105
+ style: { gap: "0.5em" },
106
+ children: [
107
+ /* @__PURE__ */ jsx(Handle, { className: "r-chandle" }),
108
+ /* @__PURE__ */ jsxs("span", { style: { whiteSpace: "nowrap" }, children: [
109
+ "Column #",
110
+ idx + 1
111
+ ] }),
112
+ /* @__PURE__ */ jsxs(
113
+ "select",
114
+ {
115
+ value: selectValue,
116
+ onChange: (e) => updateColumnWidth(column, e.target.value),
117
+ style: {
118
+ padding: "0.25em 0.35em",
119
+ borderRadius: "4px",
120
+ border: "1px solid #ccc",
121
+ fontSize: "0.875rem",
122
+ minWidth: "60px"
123
+ },
124
+ title: selectValue === "" ? "Width: Auto" : `Width: ${selectValue}/5`,
125
+ children: [
126
+ /* @__PURE__ */ jsx("option", { value: "", children: "Auto" }),
127
+ /* @__PURE__ */ jsx("option", { value: "1", children: "Width 1" }),
128
+ /* @__PURE__ */ jsx("option", { value: "2", children: "Width 2" }),
129
+ /* @__PURE__ */ jsx("option", { value: "3", children: "Width 3" }),
130
+ /* @__PURE__ */ jsx("option", { value: "4", children: "Width 4" }),
131
+ /* @__PURE__ */ jsx("option", { value: "5", children: "Width 5" })
132
+ ]
133
+ }
134
+ )
135
+ ]
136
+ }
137
+ ),
138
+ /* @__PURE__ */ jsxs(
139
+ Stack,
140
+ {
141
+ className: "r-stack-align-center",
142
+ style: { gap: "0.25em" },
143
+ children: [
144
+ /* @__PURE__ */ jsx(
145
+ Button,
146
+ {
147
+ variant: "secondary",
148
+ onClick: () => duplicateColumn(state.columns, column),
149
+ children: /* @__PURE__ */ jsx(Copy, {})
150
+ }
151
+ ),
152
+ /* @__PURE__ */ jsx(
153
+ Button,
154
+ {
155
+ variant: "secondary",
156
+ onClick: () => removeColumn(state.columns, column),
157
+ children: /* @__PURE__ */ jsx(Delete, {})
158
+ }
159
+ )
160
+ ]
161
+ }
162
+ )
163
+ ]
164
+ }
165
+ ),
166
+ /* @__PURE__ */ jsx(PanelContent, { children: /* @__PURE__ */ jsx(
167
+ ContentBuilder,
168
+ {
169
+ value: column,
170
+ onChange: (column2) => updateColumn(state.columns, column2)
171
+ }
172
+ ) })
173
+ ] }, column.id);
181
174
  })
182
175
  }
183
176
  )
@@ -1,6 +1,5 @@
1
1
  import { __spreadProps, __spreadValues } from '../chunk-ORMEWXMH.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import 'react';
4
3
  import { Copy, Delete } from './icons';
5
4
  import { Stack, FormGroup, Label, Input, Select, Toolbar, Button } from '@raketa-builder/ui';
6
5
 
@@ -1,6 +1,5 @@
1
1
  import { __objRest, __spreadValues } from '../chunk-ORMEWXMH.js';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
- import 'react';
4
3
  import { ReactSortable } from 'react-sortablejs';
5
4
  import { append } from './utils';
6
5
  import Factories from './Factories';
@@ -1,5 +1,5 @@
1
1
  import { __objRest, __spreadProps, __spreadValues } from '../chunk-ORMEWXMH.js';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { cn } from '@raketa-builder/ui';
4
4
 
5
5
  function filterStyle(props) {
@@ -8,7 +8,7 @@ function filterStyle(props) {
8
8
  }
9
9
  function Edit(_a) {
10
10
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
11
- return /* @__PURE__ */ jsx(
11
+ return /* @__PURE__ */ jsxs(
12
12
  "svg",
13
13
  __spreadProps(__spreadValues({
14
14
  className: cn(
@@ -29,7 +29,10 @@ function Edit(_a) {
29
29
  strokeLinecap: "round",
30
30
  strokeLinejoin: "round"
31
31
  }, rest), {
32
- children: /* @__PURE__ */ jsx("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
32
+ children: [
33
+ /* @__PURE__ */ jsx("title", { children: "Edit" }),
34
+ /* @__PURE__ */ jsx("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
35
+ ]
33
36
  })
34
37
  );
35
38
  }
@@ -57,6 +60,7 @@ function Delete(_c) {
57
60
  strokeLinejoin: "round"
58
61
  }, rest), {
59
62
  children: [
63
+ /* @__PURE__ */ jsx("title", { children: "Remove" }),
60
64
  /* @__PURE__ */ jsx("polyline", { points: "3 6 5 6 21 6" }),
61
65
  /* @__PURE__ */ jsx("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
62
66
  ]
@@ -87,6 +91,7 @@ function Plus(_e) {
87
91
  strokeLinejoin: "round"
88
92
  }, rest), {
89
93
  children: [
94
+ /* @__PURE__ */ jsx("title", { children: "Add" }),
90
95
  /* @__PURE__ */ jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
91
96
  /* @__PURE__ */ jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
92
97
  ]
@@ -117,6 +122,7 @@ function Copy(_g) {
117
122
  strokeLinejoin: "round"
118
123
  }, rest), {
119
124
  children: [
125
+ /* @__PURE__ */ jsx("title", { children: "Copy" }),
120
126
  /* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
121
127
  /* @__PURE__ */ jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
122
128
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-builder/menu-builder",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -27,16 +27,18 @@
27
27
  "scripts": {
28
28
  "build": "tsup",
29
29
  "dev": "tsup --watch",
30
- "format": "prettier --write .",
31
- "lint": "biome lint --max-diagnostics=5000 ."
30
+ "format": "prettier --ignore-path ../../.prettierignore --write .",
31
+ "format:check": "prettier --ignore-path ../../.prettierignore --check .",
32
+ "lint": "biome lint --write --max-diagnostics=5000 .",
33
+ "lint:check": "biome lint --max-diagnostics=5000 ."
32
34
  },
33
35
  "peerDependencies": {
34
36
  "react": ">=19.1.0 && <=19.3.0",
35
37
  "react-dom": ">=19.1.0 && <=19.3.0"
36
38
  },
37
39
  "dependencies": {
38
- "@raketa-builder/builder": "1.8.0",
39
- "@raketa-builder/ui": "1.8.0",
40
+ "@raketa-builder/builder": "1.8.1",
41
+ "@raketa-builder/ui": "1.8.1",
40
42
  "react-sortablejs": "6.1.4"
41
43
  },
42
44
  "devDependencies": {