@weaverse/react 0.5.11 → 0.6.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.
Files changed (3) hide show
  1. package/dist/index.js +30 -152
  2. package/dist/index.mjs +30 -152
  3. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -90,106 +90,24 @@ Button.defaultProps = {
90
90
  var schema2 = {
91
91
  title: "Button",
92
92
  type: "button",
93
- settings: [
93
+ styles: [
94
94
  {
95
- tab: "Settings",
96
- label: "Alignment",
97
- inspectors: [
98
- {
99
- binding: "style",
100
- type: "alignment"
101
- }
102
- ]
95
+ type: "alignment"
103
96
  },
104
97
  {
105
- tab: "Settings",
106
- label: "Visibility",
107
- inspectors: [
108
- {
109
- binding: "style",
110
- type: "visibility"
111
- }
112
- ]
98
+ type: "visibility"
113
99
  },
114
100
  {
115
- tab: "Settings",
116
- label: "Dimensions",
117
- inspectors: [
118
- {
119
- binding: "style",
120
- type: "dimensions"
121
- }
122
- ]
101
+ type: "dimensions"
123
102
  },
124
103
  {
125
- tab: "Settings",
126
- label: "Spacing",
127
- inspectors: [
128
- {
129
- binding: "style",
130
- type: "spacing"
131
- }
132
- ]
104
+ type: "spacing"
133
105
  },
134
106
  {
135
- tab: "Settings",
136
- label: "Overlay",
137
- inspectors: [
138
- {
139
- binding: "data",
140
- key: "applyOverlay",
141
- label: "Apply Overlay",
142
- type: "switch"
143
- },
144
- {
145
- binding: "data",
146
- key: "buttonType",
147
- label: "Button Type",
148
- type: "select",
149
- options: [
150
- { value: 1, label: "One" },
151
- { value: 2, label: "Two" }
152
- ]
153
- }
154
- ]
155
- },
156
- {
157
- tab: "Settings",
158
- label: "Group 1",
159
- inspectors: [
160
- {
161
- binding: "data",
162
- key: "value",
163
- type: "textarea",
164
- placeholder: "Button text",
165
- label: "Button text 1"
166
- },
167
- {
168
- binding: "data",
169
- key: "value",
170
- type: "input",
171
- placeholder: "Button text",
172
- label: "Button text 2"
173
- },
174
- {
175
- binding: "style",
176
- key: "backgroundColor",
177
- type: "color"
178
- }
179
- ]
180
- },
181
- {
182
- tab: "Settings",
183
- label: "Group 2",
184
- inspectors: [
185
- {
186
- binding: "style",
187
- key: "color",
188
- type: "color"
189
- }
190
- ]
107
+ type: "background"
191
108
  }
192
109
  ],
110
+ settings: [],
193
111
  toolbar: [],
194
112
  data: {
195
113
  css: {
@@ -218,46 +136,29 @@ var schema3 = {
218
136
  "@desktop": {
219
137
  display: "flex",
220
138
  backgroundColor: "rgba(248,203,203,0.38)",
139
+ flexDirection: "column",
140
+ alignItems: "flex-start",
141
+ justifyContent: "center",
142
+ textAlign: "left",
221
143
  gridArea: "1 / 1 / 3 / 6",
222
- minHeight: "96px",
223
- overflow: "hidden"
224
- },
225
- "@mobile": {
226
- width: "100%"
144
+ overflow: "hidden",
145
+ width: "100%",
146
+ height: "fit-content"
227
147
  }
228
148
  }
229
149
  },
230
- settings: [
231
- {
232
- tab: "Settings",
233
- label: "Alignment",
234
- inspectors: [
235
- {
236
- binding: "style",
237
- type: "alignment"
238
- }
239
- ]
240
- },
241
- {
242
- tab: "Settings",
243
- label: "Visibility",
244
- inspectors: [
245
- {
246
- binding: "style",
247
- type: "visibility"
248
- }
249
- ]
250
- }
251
- ]
150
+ settings: []
252
151
  };
253
152
  var container_default = Container;
254
153
 
255
154
  // src/elements/layout.tsx
256
155
  var import_react3 = __toESM(require("react"));
257
156
  var Layout = (0, import_react3.forwardRef)((props, ref) => {
258
- return /* @__PURE__ */ import_react3.default.createElement("div", __spreadValues({
157
+ return /* @__PURE__ */ import_react3.default.createElement("div", __spreadProps(__spreadValues({
259
158
  ref
260
- }, props));
159
+ }, props), {
160
+ children: props.children || "Layout Placeholder"
161
+ }));
261
162
  });
262
163
  var schema4 = {
263
164
  title: "Layout",
@@ -268,28 +169,19 @@ var schema4 = {
268
169
  display: "grid !important",
269
170
  gridTemplateRows: "repeat(auto-fill, $rowSize)",
270
171
  gridTemplateColumns: "repeat($columns, 1fr)",
172
+ gridAutoRows: "$sizes$rowSize",
271
173
  gridGap: "$gap",
272
174
  minHeight: "104px",
273
175
  width: "100%",
274
176
  margin: "0 auto"
275
177
  },
276
178
  "@mobile": {
277
- display: "flex !important"
179
+ display: "flex !important",
180
+ flexDirection: "column"
278
181
  }
279
182
  }
280
183
  },
281
- settings: [
282
- {
283
- tab: "Settings",
284
- label: "Spacing",
285
- inspectors: [
286
- {
287
- binding: "style",
288
- type: "spacing"
289
- }
290
- ]
291
- }
292
- ]
184
+ settings: []
293
185
  };
294
186
  var layout_default = Layout;
295
187
 
@@ -309,32 +201,18 @@ Text.defaultProps = {
309
201
  var schema5 = {
310
202
  type: "text",
311
203
  title: "Text Settings",
312
- settings: [
313
- {
314
- tab: "General",
315
- label: "Text",
316
- inspectors: [
317
- {
318
- binding: "data",
319
- key: "value",
320
- type: "textarea"
321
- },
322
- {
323
- binding: "style",
324
- key: "color",
325
- type: "color"
326
- }
327
- ]
328
- }
329
- ],
204
+ settings: [],
330
205
  data: {
331
206
  css: {
332
207
  "@desktop": {
333
208
  width: "100%",
334
209
  height: "fit-content",
335
- "&:focus": {
336
- outline: "none"
337
- }
210
+ padding: 0,
211
+ margin: 0,
212
+ outline: "none",
213
+ wordBreak: "break-word",
214
+ overflowWrap: "break-word",
215
+ whitespace: "break-spaces"
338
216
  }
339
217
  }
340
218
  }
package/dist/index.mjs CHANGED
@@ -63,106 +63,24 @@ Button.defaultProps = {
63
63
  var schema2 = {
64
64
  title: "Button",
65
65
  type: "button",
66
- settings: [
66
+ styles: [
67
67
  {
68
- tab: "Settings",
69
- label: "Alignment",
70
- inspectors: [
71
- {
72
- binding: "style",
73
- type: "alignment"
74
- }
75
- ]
68
+ type: "alignment"
76
69
  },
77
70
  {
78
- tab: "Settings",
79
- label: "Visibility",
80
- inspectors: [
81
- {
82
- binding: "style",
83
- type: "visibility"
84
- }
85
- ]
71
+ type: "visibility"
86
72
  },
87
73
  {
88
- tab: "Settings",
89
- label: "Dimensions",
90
- inspectors: [
91
- {
92
- binding: "style",
93
- type: "dimensions"
94
- }
95
- ]
74
+ type: "dimensions"
96
75
  },
97
76
  {
98
- tab: "Settings",
99
- label: "Spacing",
100
- inspectors: [
101
- {
102
- binding: "style",
103
- type: "spacing"
104
- }
105
- ]
77
+ type: "spacing"
106
78
  },
107
79
  {
108
- tab: "Settings",
109
- label: "Overlay",
110
- inspectors: [
111
- {
112
- binding: "data",
113
- key: "applyOverlay",
114
- label: "Apply Overlay",
115
- type: "switch"
116
- },
117
- {
118
- binding: "data",
119
- key: "buttonType",
120
- label: "Button Type",
121
- type: "select",
122
- options: [
123
- { value: 1, label: "One" },
124
- { value: 2, label: "Two" }
125
- ]
126
- }
127
- ]
128
- },
129
- {
130
- tab: "Settings",
131
- label: "Group 1",
132
- inspectors: [
133
- {
134
- binding: "data",
135
- key: "value",
136
- type: "textarea",
137
- placeholder: "Button text",
138
- label: "Button text 1"
139
- },
140
- {
141
- binding: "data",
142
- key: "value",
143
- type: "input",
144
- placeholder: "Button text",
145
- label: "Button text 2"
146
- },
147
- {
148
- binding: "style",
149
- key: "backgroundColor",
150
- type: "color"
151
- }
152
- ]
153
- },
154
- {
155
- tab: "Settings",
156
- label: "Group 2",
157
- inspectors: [
158
- {
159
- binding: "style",
160
- key: "color",
161
- type: "color"
162
- }
163
- ]
80
+ type: "background"
164
81
  }
165
82
  ],
83
+ settings: [],
166
84
  toolbar: [],
167
85
  data: {
168
86
  css: {
@@ -191,46 +109,29 @@ var schema3 = {
191
109
  "@desktop": {
192
110
  display: "flex",
193
111
  backgroundColor: "rgba(248,203,203,0.38)",
112
+ flexDirection: "column",
113
+ alignItems: "flex-start",
114
+ justifyContent: "center",
115
+ textAlign: "left",
194
116
  gridArea: "1 / 1 / 3 / 6",
195
- minHeight: "96px",
196
- overflow: "hidden"
197
- },
198
- "@mobile": {
199
- width: "100%"
117
+ overflow: "hidden",
118
+ width: "100%",
119
+ height: "fit-content"
200
120
  }
201
121
  }
202
122
  },
203
- settings: [
204
- {
205
- tab: "Settings",
206
- label: "Alignment",
207
- inspectors: [
208
- {
209
- binding: "style",
210
- type: "alignment"
211
- }
212
- ]
213
- },
214
- {
215
- tab: "Settings",
216
- label: "Visibility",
217
- inspectors: [
218
- {
219
- binding: "style",
220
- type: "visibility"
221
- }
222
- ]
223
- }
224
- ]
123
+ settings: []
225
124
  };
226
125
  var container_default = Container;
227
126
 
228
127
  // src/elements/layout.tsx
229
128
  import React4, { forwardRef as forwardRef3 } from "react";
230
129
  var Layout = forwardRef3((props, ref) => {
231
- return /* @__PURE__ */ React4.createElement("div", __spreadValues({
130
+ return /* @__PURE__ */ React4.createElement("div", __spreadProps(__spreadValues({
232
131
  ref
233
- }, props));
132
+ }, props), {
133
+ children: props.children || "Layout Placeholder"
134
+ }));
234
135
  });
235
136
  var schema4 = {
236
137
  title: "Layout",
@@ -241,28 +142,19 @@ var schema4 = {
241
142
  display: "grid !important",
242
143
  gridTemplateRows: "repeat(auto-fill, $rowSize)",
243
144
  gridTemplateColumns: "repeat($columns, 1fr)",
145
+ gridAutoRows: "$sizes$rowSize",
244
146
  gridGap: "$gap",
245
147
  minHeight: "104px",
246
148
  width: "100%",
247
149
  margin: "0 auto"
248
150
  },
249
151
  "@mobile": {
250
- display: "flex !important"
152
+ display: "flex !important",
153
+ flexDirection: "column"
251
154
  }
252
155
  }
253
156
  },
254
- settings: [
255
- {
256
- tab: "Settings",
257
- label: "Spacing",
258
- inspectors: [
259
- {
260
- binding: "style",
261
- type: "spacing"
262
- }
263
- ]
264
- }
265
- ]
157
+ settings: []
266
158
  };
267
159
  var layout_default = Layout;
268
160
 
@@ -282,32 +174,18 @@ Text.defaultProps = {
282
174
  var schema5 = {
283
175
  type: "text",
284
176
  title: "Text Settings",
285
- settings: [
286
- {
287
- tab: "General",
288
- label: "Text",
289
- inspectors: [
290
- {
291
- binding: "data",
292
- key: "value",
293
- type: "textarea"
294
- },
295
- {
296
- binding: "style",
297
- key: "color",
298
- type: "color"
299
- }
300
- ]
301
- }
302
- ],
177
+ settings: [],
303
178
  data: {
304
179
  css: {
305
180
  "@desktop": {
306
181
  width: "100%",
307
182
  height: "fit-content",
308
- "&:focus": {
309
- outline: "none"
310
- }
183
+ padding: 0,
184
+ margin: 0,
185
+ outline: "none",
186
+ wordBreak: "break-word",
187
+ overflowWrap: "break-word",
188
+ whitespace: "break-spaces"
311
189
  }
312
190
  }
313
191
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.5.11",
2
+ "version": "0.6.1",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -31,6 +31,6 @@
31
31
  "name": "@weaverse/react",
32
32
  "author": "Weaverse Team",
33
33
  "dependencies": {
34
- "@weaverse/core": "0.5.11"
34
+ "@weaverse/core": "0.5.14"
35
35
  }
36
36
  }