@weaverse/react 0.3.5 → 0.3.6
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.
- package/dist/index.js +46 -28
- package/dist/index.mjs +46 -28
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -77,14 +77,12 @@ var base_default = BaseElement;
|
|
|
77
77
|
// src/elements/button.tsx
|
|
78
78
|
var React2 = __toESM(require("react"));
|
|
79
79
|
var Button = React2.forwardRef((props, ref) => {
|
|
80
|
-
|
|
81
|
-
return /* @__PURE__ */ React2.createElement("button", __spreadProps(__spreadValues({
|
|
80
|
+
return /* @__PURE__ */ React2.createElement("button", __spreadValues({
|
|
82
81
|
ref
|
|
83
|
-
}, props),
|
|
84
|
-
onClick: () => setCount(count + 1)
|
|
85
|
-
}), "Test Button ", count);
|
|
82
|
+
}, props), props.value);
|
|
86
83
|
});
|
|
87
84
|
Button.defaultProps = {
|
|
85
|
+
value: "Click me",
|
|
88
86
|
style: {
|
|
89
87
|
borderRadius: "9999px",
|
|
90
88
|
fontSize: "13px",
|
|
@@ -94,47 +92,67 @@ Button.defaultProps = {
|
|
|
94
92
|
var schema2 = {
|
|
95
93
|
title: "Button",
|
|
96
94
|
type: "button",
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
settings: [
|
|
96
|
+
{
|
|
97
|
+
tab: "header",
|
|
98
|
+
label: "Group 1",
|
|
99
|
+
inspectors: [
|
|
100
|
+
{
|
|
101
|
+
binding: "data",
|
|
102
|
+
key: "value",
|
|
103
|
+
componentType: "textarea"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
binding: "style",
|
|
107
|
+
key: "backgroundColor",
|
|
108
|
+
componentType: "color"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
102
111
|
},
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
fontSize: "13px",
|
|
114
|
-
padding: "10px 15px"
|
|
115
|
-
}
|
|
112
|
+
{
|
|
113
|
+
tab: "header",
|
|
114
|
+
label: "Group 2",
|
|
115
|
+
inspectors: [
|
|
116
|
+
{
|
|
117
|
+
binding: "style",
|
|
118
|
+
key: "color",
|
|
119
|
+
componentType: "color"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
116
122
|
}
|
|
117
|
-
|
|
123
|
+
]
|
|
118
124
|
};
|
|
119
125
|
var button_default = Button;
|
|
120
126
|
|
|
121
127
|
// src/elements/text.tsx
|
|
122
128
|
var React3 = __toESM(require("react"));
|
|
123
129
|
var Text = React3.forwardRef((props, ref) => {
|
|
124
|
-
let _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
130
|
+
let _a = props, { children, value } = _a, rest = __objRest(_a, ["children", "value"]);
|
|
125
131
|
return /* @__PURE__ */ React3.createElement("span", __spreadProps(__spreadValues({
|
|
126
132
|
ref
|
|
127
133
|
}, rest), {
|
|
128
134
|
contentEditable: true,
|
|
129
|
-
dangerouslySetInnerHTML: { __html:
|
|
135
|
+
dangerouslySetInnerHTML: { __html: value }
|
|
130
136
|
}));
|
|
131
137
|
});
|
|
132
138
|
Text.defaultProps = {
|
|
133
|
-
|
|
139
|
+
value: "sample text",
|
|
134
140
|
tag: "span"
|
|
135
141
|
};
|
|
136
142
|
var schema3 = {
|
|
137
|
-
type: "text"
|
|
143
|
+
type: "text",
|
|
144
|
+
inspectors: [
|
|
145
|
+
{
|
|
146
|
+
binding: "data",
|
|
147
|
+
key: "value",
|
|
148
|
+
componentType: "textarea"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
binding: "style",
|
|
152
|
+
key: "color",
|
|
153
|
+
componentType: "color"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
138
156
|
};
|
|
139
157
|
var text_default = Text;
|
|
140
158
|
|
package/dist/index.mjs
CHANGED
|
@@ -50,14 +50,12 @@ var base_default = BaseElement;
|
|
|
50
50
|
// src/elements/button.tsx
|
|
51
51
|
import * as React2 from "react";
|
|
52
52
|
var Button = React2.forwardRef((props, ref) => {
|
|
53
|
-
|
|
54
|
-
return /* @__PURE__ */ React2.createElement("button", __spreadProps(__spreadValues({
|
|
53
|
+
return /* @__PURE__ */ React2.createElement("button", __spreadValues({
|
|
55
54
|
ref
|
|
56
|
-
}, props),
|
|
57
|
-
onClick: () => setCount(count + 1)
|
|
58
|
-
}), "Test Button ", count);
|
|
55
|
+
}, props), props.value);
|
|
59
56
|
});
|
|
60
57
|
Button.defaultProps = {
|
|
58
|
+
value: "Click me",
|
|
61
59
|
style: {
|
|
62
60
|
borderRadius: "9999px",
|
|
63
61
|
fontSize: "13px",
|
|
@@ -67,47 +65,67 @@ Button.defaultProps = {
|
|
|
67
65
|
var schema2 = {
|
|
68
66
|
title: "Button",
|
|
69
67
|
type: "button",
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
settings: [
|
|
69
|
+
{
|
|
70
|
+
tab: "header",
|
|
71
|
+
label: "Group 1",
|
|
72
|
+
inspectors: [
|
|
73
|
+
{
|
|
74
|
+
binding: "data",
|
|
75
|
+
key: "value",
|
|
76
|
+
componentType: "textarea"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
binding: "style",
|
|
80
|
+
key: "backgroundColor",
|
|
81
|
+
componentType: "color"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
75
84
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
fontSize: "13px",
|
|
87
|
-
padding: "10px 15px"
|
|
88
|
-
}
|
|
85
|
+
{
|
|
86
|
+
tab: "header",
|
|
87
|
+
label: "Group 2",
|
|
88
|
+
inspectors: [
|
|
89
|
+
{
|
|
90
|
+
binding: "style",
|
|
91
|
+
key: "color",
|
|
92
|
+
componentType: "color"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
89
95
|
}
|
|
90
|
-
|
|
96
|
+
]
|
|
91
97
|
};
|
|
92
98
|
var button_default = Button;
|
|
93
99
|
|
|
94
100
|
// src/elements/text.tsx
|
|
95
101
|
import * as React3 from "react";
|
|
96
102
|
var Text = React3.forwardRef((props, ref) => {
|
|
97
|
-
let _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
103
|
+
let _a = props, { children, value } = _a, rest = __objRest(_a, ["children", "value"]);
|
|
98
104
|
return /* @__PURE__ */ React3.createElement("span", __spreadProps(__spreadValues({
|
|
99
105
|
ref
|
|
100
106
|
}, rest), {
|
|
101
107
|
contentEditable: true,
|
|
102
|
-
dangerouslySetInnerHTML: { __html:
|
|
108
|
+
dangerouslySetInnerHTML: { __html: value }
|
|
103
109
|
}));
|
|
104
110
|
});
|
|
105
111
|
Text.defaultProps = {
|
|
106
|
-
|
|
112
|
+
value: "sample text",
|
|
107
113
|
tag: "span"
|
|
108
114
|
};
|
|
109
115
|
var schema3 = {
|
|
110
|
-
type: "text"
|
|
116
|
+
type: "text",
|
|
117
|
+
inspectors: [
|
|
118
|
+
{
|
|
119
|
+
binding: "data",
|
|
120
|
+
key: "value",
|
|
121
|
+
componentType: "textarea"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
binding: "style",
|
|
125
|
+
key: "color",
|
|
126
|
+
componentType: "color"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
111
129
|
};
|
|
112
130
|
var text_default = Text;
|
|
113
131
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
2
|
+
"version": "0.3.6",
|
|
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.3.
|
|
34
|
+
"@weaverse/core": "^0.3.5"
|
|
35
35
|
}
|
|
36
36
|
}
|