@chaibuilder/sdk 1.3.0-beta.8 → 1.3.0
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/CodeEditor-C94XQmvL.cjs +1 -0
- package/dist/CodeEditor-D5t7A9Po.js +77 -0
- package/dist/STRINGS-eiGM83kj.js +7 -0
- package/dist/STRINGS-ew98weUe.cjs +1 -0
- package/dist/Topbar-Bnxt9C5B.js +113 -0
- package/dist/Topbar-DFm3YQZi.cjs +1 -0
- package/dist/UnsplashImages-BWT3eyq3.cjs +1 -0
- package/dist/UnsplashImages-D-9aNQGK.js +189 -0
- package/dist/UploadImages-CntfFAoV.cjs +1 -0
- package/dist/UploadImages-CrAaKlC1.js +101 -0
- package/dist/context-menu-BbqLeYFX.js +979 -0
- package/dist/context-menu-DfAXjmc8.cjs +1 -0
- package/dist/controls-C4n5ycp4.cjs +1 -0
- package/dist/controls-Com-zYCq.js +234 -0
- package/dist/core.cjs +1 -82
- package/dist/core.d.ts +10 -5
- package/dist/core.js +74 -74
- package/dist/iconBase-Cn2BsTrq.cjs +1 -0
- package/dist/iconBase-DHfFLkem.js +124 -0
- package/dist/index-C9LOYt3W.cjs +63 -0
- package/dist/index-CcLk7_o6.js +9319 -0
- package/dist/jsx-runtime-BYECrxsp.cjs +30 -0
- package/dist/jsx-runtime-DGlMoOmv.js +630 -0
- package/dist/plugin-BOEoR5jk.js +44 -0
- package/dist/plugin-COMQcYlW.cjs +1 -0
- package/dist/plugin-Dw854zFv.js +107 -0
- package/dist/plugin-I9XxF65G.cjs +1 -0
- package/dist/render.cjs +2 -208
- package/dist/render.js +125 -171
- package/dist/runtime.cjs +1 -26
- package/dist/runtime.js +16 -16
- package/dist/style.css +2 -1529
- package/dist/tailwind.cjs +1 -78
- package/dist/tailwind.js +19 -21
- package/dist/ui.cjs +1 -392
- package/dist/ui.js +257 -268
- package/dist/web-blocks.cjs +3 -1241
- package/dist/web-blocks.js +555 -764
- package/package.json +1 -1
- package/dist/CodeEditor-1LboGb1I.cjs +0 -91
- package/dist/CodeEditor-BKgZeXwz.js +0 -91
- package/dist/STRINGS-3Sn_NeX1.cjs +0 -9
- package/dist/STRINGS-DdpfVlsV.js +0 -10
- package/dist/Topbar-B8IS6y4H.js +0 -135
- package/dist/Topbar-DXC7DFU1.cjs +0 -135
- package/dist/UnsplashImages-CjJ5szAy.cjs +0 -215
- package/dist/UnsplashImages-Ck9qpKR0.js +0 -215
- package/dist/UploadImages-DW1mj4MB.cjs +0 -117
- package/dist/UploadImages-DgAMZ8GR.js +0 -117
- package/dist/context-menu-BLbuduri.cjs +0 -1073
- package/dist/context-menu-BgtRnByf.js +0 -1042
- package/dist/controls-8EZmm0Ns.js +0 -234
- package/dist/controls-DaW52RjX.cjs +0 -233
- package/dist/iconBase-BSrIcOaG.cjs +0 -146
- package/dist/iconBase-CWgVxu0A.js +0 -147
- package/dist/index-Bjw2sUN2.cjs +0 -12139
- package/dist/index-D8_rAW8B.js +0 -12124
- package/dist/jsx-runtime-B6vEU3CM.cjs +0 -925
- package/dist/jsx-runtime-ClFauRgV.js +0 -926
- package/dist/plugin-BYwesM58.cjs +0 -54
- package/dist/plugin-BiDLHDo3.cjs +0 -114
- package/dist/plugin-BukD7GJR.js +0 -115
- package/dist/plugin-tVAEvXiS.js +0 -55
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import "lodash-es";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { twMerge } from "tailwind-merge";
|
|
4
|
-
import React__default from "react";
|
|
5
|
-
function generateUUID(length = 6, chars = "abcdefghijklmnopqrstuvwxyzABCD") {
|
|
6
|
-
let result = "";
|
|
7
|
-
for (let i = length; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)];
|
|
8
|
-
return result;
|
|
9
|
-
}
|
|
10
|
-
const getBreakpointValue = (width) => width >= 1536 ? "2XL" : width >= 1280 ? "XL" : width >= 1024 ? "LG" : width >= 768 ? "MD" : width >= 640 ? "SM" : "XS";
|
|
11
|
-
const cn = (...inputs) => twMerge(clsx(inputs));
|
|
12
|
-
var DefaultContext = {
|
|
13
|
-
color: void 0,
|
|
14
|
-
size: void 0,
|
|
15
|
-
className: void 0,
|
|
16
|
-
style: void 0,
|
|
17
|
-
attr: void 0
|
|
18
|
-
};
|
|
19
|
-
var IconContext = React__default.createContext && /* @__PURE__ */ React__default.createContext(DefaultContext);
|
|
20
|
-
var _excluded = ["attr", "size", "title"];
|
|
21
|
-
function _objectWithoutProperties(source, excluded) {
|
|
22
|
-
if (source == null) return {};
|
|
23
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
24
|
-
var key, i;
|
|
25
|
-
if (Object.getOwnPropertySymbols) {
|
|
26
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
27
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
28
|
-
key = sourceSymbolKeys[i];
|
|
29
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
30
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
31
|
-
target[key] = source[key];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
}
|
|
36
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
37
|
-
if (source == null) return {};
|
|
38
|
-
var target = {};
|
|
39
|
-
for (var key in source) {
|
|
40
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
41
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
42
|
-
target[key] = source[key];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return target;
|
|
46
|
-
}
|
|
47
|
-
function _extends() {
|
|
48
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
49
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
50
|
-
var source = arguments[i];
|
|
51
|
-
for (var key in source) {
|
|
52
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
53
|
-
target[key] = source[key];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return target;
|
|
58
|
-
};
|
|
59
|
-
return _extends.apply(this, arguments);
|
|
60
|
-
}
|
|
61
|
-
function ownKeys(e, r) {
|
|
62
|
-
var t = Object.keys(e);
|
|
63
|
-
if (Object.getOwnPropertySymbols) {
|
|
64
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
65
|
-
r && (o = o.filter(function(r2) {
|
|
66
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
67
|
-
})), t.push.apply(t, o);
|
|
68
|
-
}
|
|
69
|
-
return t;
|
|
70
|
-
}
|
|
71
|
-
function _objectSpread(e) {
|
|
72
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
73
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
74
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
75
|
-
_defineProperty(e, r2, t[r2]);
|
|
76
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
77
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
return e;
|
|
81
|
-
}
|
|
82
|
-
function _defineProperty(obj, key, value) {
|
|
83
|
-
key = _toPropertyKey(key);
|
|
84
|
-
if (key in obj) {
|
|
85
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
86
|
-
} else {
|
|
87
|
-
obj[key] = value;
|
|
88
|
-
}
|
|
89
|
-
return obj;
|
|
90
|
-
}
|
|
91
|
-
function _toPropertyKey(t) {
|
|
92
|
-
var i = _toPrimitive(t, "string");
|
|
93
|
-
return "symbol" == typeof i ? i : i + "";
|
|
94
|
-
}
|
|
95
|
-
function _toPrimitive(t, r) {
|
|
96
|
-
if ("object" != typeof t || !t) return t;
|
|
97
|
-
var e = t[Symbol.toPrimitive];
|
|
98
|
-
if (void 0 !== e) {
|
|
99
|
-
var i = e.call(t, r || "default");
|
|
100
|
-
if ("object" != typeof i) return i;
|
|
101
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
102
|
-
}
|
|
103
|
-
return ("string" === r ? String : Number)(t);
|
|
104
|
-
}
|
|
105
|
-
function Tree2Element(tree) {
|
|
106
|
-
return tree && tree.map((node, i) => /* @__PURE__ */ React__default.createElement(node.tag, _objectSpread({
|
|
107
|
-
key: i
|
|
108
|
-
}, node.attr), Tree2Element(node.child)));
|
|
109
|
-
}
|
|
110
|
-
function GenIcon(data) {
|
|
111
|
-
return (props) => /* @__PURE__ */ React__default.createElement(IconBase, _extends({
|
|
112
|
-
attr: _objectSpread({}, data.attr)
|
|
113
|
-
}, props), Tree2Element(data.child));
|
|
114
|
-
}
|
|
115
|
-
function IconBase(props) {
|
|
116
|
-
var elem = (conf) => {
|
|
117
|
-
var {
|
|
118
|
-
attr,
|
|
119
|
-
size,
|
|
120
|
-
title
|
|
121
|
-
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
|
122
|
-
var computedSize = size || conf.size || "1em";
|
|
123
|
-
var className;
|
|
124
|
-
if (conf.className) className = conf.className;
|
|
125
|
-
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
126
|
-
return /* @__PURE__ */ React__default.createElement("svg", _extends({
|
|
127
|
-
stroke: "currentColor",
|
|
128
|
-
fill: "currentColor",
|
|
129
|
-
strokeWidth: "0"
|
|
130
|
-
}, conf.attr, attr, svgProps, {
|
|
131
|
-
className,
|
|
132
|
-
style: _objectSpread(_objectSpread({
|
|
133
|
-
color: props.color || conf.color
|
|
134
|
-
}, conf.style), props.style),
|
|
135
|
-
height: computedSize,
|
|
136
|
-
width: computedSize,
|
|
137
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
138
|
-
}), title && /* @__PURE__ */ React__default.createElement("title", null, title), props.children);
|
|
139
|
-
};
|
|
140
|
-
return IconContext !== void 0 ? /* @__PURE__ */ React__default.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
141
|
-
}
|
|
142
|
-
export {
|
|
143
|
-
GenIcon as G,
|
|
144
|
-
getBreakpointValue as a,
|
|
145
|
-
cn as c,
|
|
146
|
-
generateUUID as g
|
|
147
|
-
};
|