@fileverse-dev/fortune-react 1.2.78 → 1.2.79
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.
|
@@ -306,7 +306,7 @@ var FxEditor = function FxEditor() {
|
|
|
306
306
|
}, /*#__PURE__*/React.createElement(NameBox, null), /*#__PURE__*/React.createElement("div", {
|
|
307
307
|
className: "fortune-fx-icon",
|
|
308
308
|
style: {
|
|
309
|
-
cursor:
|
|
309
|
+
cursor: "pointer"
|
|
310
310
|
},
|
|
311
311
|
onClick: function onClick() {
|
|
312
312
|
var _a;
|
|
@@ -185,13 +185,19 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
185
185
|
className: " flex-grow color-text-default"
|
|
186
186
|
}, /*#__PURE__*/React.createElement("code", {
|
|
187
187
|
style: {
|
|
188
|
-
fontWeight:
|
|
188
|
+
fontWeight: "bold"
|
|
189
189
|
},
|
|
190
190
|
className: "luckysheet-arguments-help-function-name font-family-mono mb-1 mt-2 color-text-default font-family-mono"
|
|
191
191
|
}, fn.n), /*#__PURE__*/React.createElement("code", {
|
|
192
|
-
className: "luckysheet-arguments-paren font-family-mono mb-1 mt-2 color-text-default"
|
|
192
|
+
className: "luckysheet-arguments-paren font-family-mono mb-1 mt-2 color-text-default",
|
|
193
|
+
style: {
|
|
194
|
+
fontWeight: "bold"
|
|
195
|
+
}
|
|
193
196
|
}, "("), /*#__PURE__*/React.createElement("code", {
|
|
194
|
-
className: "luckysheet-arguments-parameter-holder font-family-mono mb-1 mt-2 color-text-default"
|
|
197
|
+
className: "luckysheet-arguments-parameter-holder font-family-mono mb-1 mt-2 color-text-default",
|
|
198
|
+
style: {
|
|
199
|
+
fontWeight: "bold"
|
|
200
|
+
}
|
|
195
201
|
}, fn.p.map(function (param, i) {
|
|
196
202
|
var name = param.name;
|
|
197
203
|
if (param.repeat === "y") {
|
|
@@ -205,7 +211,8 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
205
211
|
dir: "auto",
|
|
206
212
|
key: name,
|
|
207
213
|
style: {
|
|
208
|
-
backgroundColor: commaCount === i ? bgColor(fn.BRAND_SECONDARY_COLOR) : "transparent"
|
|
214
|
+
backgroundColor: commaCount === i ? bgColor(fn.BRAND_SECONDARY_COLOR) : "transparent",
|
|
215
|
+
fontWeight: "bold"
|
|
209
216
|
}
|
|
210
217
|
}, name), i !== fn.p.length - 1 && ", ");
|
|
211
218
|
})), /*#__PURE__*/React.createElement("code", {
|
|
@@ -335,12 +342,13 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
335
342
|
className: "font-family-mono mb-1 color-text-secondary"
|
|
336
343
|
}, formulaMore.helpExample), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("code", {
|
|
337
344
|
style: {
|
|
338
|
-
overflowWrap: "break-word"
|
|
345
|
+
overflowWrap: "break-word",
|
|
346
|
+
fontWeight: "bold"
|
|
339
347
|
},
|
|
340
348
|
className: "example-value-code"
|
|
341
349
|
}, /*#__PURE__*/React.createElement("span", {
|
|
342
350
|
className: "luckysheet-arguments-help-function-name"
|
|
343
|
-
}, fn.n), /*#__PURE__*/React.createElement("span", {
|
|
351
|
+
}, "=", fn.n), /*#__PURE__*/React.createElement("span", {
|
|
344
352
|
className: "luckysheet-arguments-paren"
|
|
345
353
|
}, "("), /*#__PURE__*/React.createElement("span", {
|
|
346
354
|
className: "luckysheet-arguments-parameter-holder"
|
|
@@ -348,8 +356,15 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
348
356
|
return /*#__PURE__*/React.createElement("span", {
|
|
349
357
|
key: param.name,
|
|
350
358
|
className: "luckysheet-arguments-help-parameter",
|
|
351
|
-
dir: "auto"
|
|
352
|
-
|
|
359
|
+
dir: "auto",
|
|
360
|
+
style: {
|
|
361
|
+
color: param.type === "string" ? "#177E23" : "black"
|
|
362
|
+
}
|
|
363
|
+
}, param.example, /*#__PURE__*/React.createElement("span", {
|
|
364
|
+
style: {
|
|
365
|
+
color: "black"
|
|
366
|
+
}
|
|
367
|
+
}, i !== fn.p.length - 1 && ", "));
|
|
353
368
|
})), /*#__PURE__*/React.createElement("span", {
|
|
354
369
|
className: "luckysheet-arguments-paren"
|
|
355
370
|
}, ")")))), /*#__PURE__*/React.createElement("div", {
|
|
@@ -381,6 +396,7 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
381
396
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("code", {
|
|
382
397
|
className: "font-family-mono mb-1 mt-2 color-text-default font-family-mono",
|
|
383
398
|
style: {
|
|
399
|
+
fontWeight: 600,
|
|
384
400
|
backgroundColor: commaCount === index ? bgColor(fn.BRAND_SECONDARY_COLOR) : "transparent"
|
|
385
401
|
}
|
|
386
402
|
}, param.name, param.repeat === "y" && (/*#__PURE__*/React.createElement("span", {
|
|
@@ -406,13 +422,42 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
406
422
|
borderBottomLeftRadius: "10px",
|
|
407
423
|
borderBottomRightRadius: "10px"
|
|
408
424
|
},
|
|
409
|
-
className: "w-full"
|
|
425
|
+
className: "w-full flex items-center gap-4"
|
|
410
426
|
}, /*#__PURE__*/React.createElement("div", {
|
|
411
427
|
onClick: function onClick() {
|
|
412
428
|
var _a;
|
|
413
429
|
(_a = document.getElementById("function-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
414
430
|
},
|
|
415
431
|
className: "color-text-link cursor-pointer text-helper-text-sm"
|
|
416
|
-
}, "Learn More"))))
|
|
432
|
+
}, "Learn More"), (fn.n.includes("SMARTCONTRACT") || fn.n.includes("smartcontract")) && (/*#__PURE__*/React.createElement("div", {
|
|
433
|
+
className: "flex justify-center items-center gap-1 color-text-link cursor-pointer text-helper-text-sm ml-2",
|
|
434
|
+
onClick: function onClick() {
|
|
435
|
+
var _a;
|
|
436
|
+
(_a = document.getElementById("smartcontract-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
437
|
+
}
|
|
438
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
439
|
+
className: ""
|
|
440
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
441
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
442
|
+
width: "17",
|
|
443
|
+
height: "17",
|
|
444
|
+
viewBox: "0 0 24 24",
|
|
445
|
+
fill: "none",
|
|
446
|
+
stroke: "currentColor",
|
|
447
|
+
strokeWidth: "2",
|
|
448
|
+
strokeLinecap: "round",
|
|
449
|
+
strokeLinejoin: "round",
|
|
450
|
+
className: "lucide lucide-circle-question-mark-icon lucide-circle-question-mark"
|
|
451
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
452
|
+
cx: "12",
|
|
453
|
+
cy: "12",
|
|
454
|
+
r: "10"
|
|
455
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
456
|
+
d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"
|
|
457
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
458
|
+
d: "M12 17h.01"
|
|
459
|
+
}))), /*#__PURE__*/React.createElement("span", {
|
|
460
|
+
className: "font-normal text-xs text-[#5c0aff]"
|
|
461
|
+
}, "How to use imported contract?")))))))));
|
|
417
462
|
};
|
|
418
463
|
export default FormulaHint;
|
|
@@ -315,7 +315,7 @@ var FxEditor = function FxEditor() {
|
|
|
315
315
|
}, /*#__PURE__*/_react.default.createElement(_NameBox.default, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
316
316
|
className: "fortune-fx-icon",
|
|
317
317
|
style: {
|
|
318
|
-
cursor:
|
|
318
|
+
cursor: "pointer"
|
|
319
319
|
},
|
|
320
320
|
onClick: function onClick() {
|
|
321
321
|
var _a;
|
|
@@ -194,13 +194,19 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
194
194
|
className: " flex-grow color-text-default"
|
|
195
195
|
}, /*#__PURE__*/_react.default.createElement("code", {
|
|
196
196
|
style: {
|
|
197
|
-
fontWeight:
|
|
197
|
+
fontWeight: "bold"
|
|
198
198
|
},
|
|
199
199
|
className: "luckysheet-arguments-help-function-name font-family-mono mb-1 mt-2 color-text-default font-family-mono"
|
|
200
200
|
}, fn.n), /*#__PURE__*/_react.default.createElement("code", {
|
|
201
|
-
className: "luckysheet-arguments-paren font-family-mono mb-1 mt-2 color-text-default"
|
|
201
|
+
className: "luckysheet-arguments-paren font-family-mono mb-1 mt-2 color-text-default",
|
|
202
|
+
style: {
|
|
203
|
+
fontWeight: "bold"
|
|
204
|
+
}
|
|
202
205
|
}, "("), /*#__PURE__*/_react.default.createElement("code", {
|
|
203
|
-
className: "luckysheet-arguments-parameter-holder font-family-mono mb-1 mt-2 color-text-default"
|
|
206
|
+
className: "luckysheet-arguments-parameter-holder font-family-mono mb-1 mt-2 color-text-default",
|
|
207
|
+
style: {
|
|
208
|
+
fontWeight: "bold"
|
|
209
|
+
}
|
|
204
210
|
}, fn.p.map(function (param, i) {
|
|
205
211
|
var name = param.name;
|
|
206
212
|
if (param.repeat === "y") {
|
|
@@ -214,7 +220,8 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
214
220
|
dir: "auto",
|
|
215
221
|
key: name,
|
|
216
222
|
style: {
|
|
217
|
-
backgroundColor: commaCount === i ? bgColor(fn.BRAND_SECONDARY_COLOR) : "transparent"
|
|
223
|
+
backgroundColor: commaCount === i ? bgColor(fn.BRAND_SECONDARY_COLOR) : "transparent",
|
|
224
|
+
fontWeight: "bold"
|
|
218
225
|
}
|
|
219
226
|
}, name), i !== fn.p.length - 1 && ", ");
|
|
220
227
|
})), /*#__PURE__*/_react.default.createElement("code", {
|
|
@@ -344,12 +351,13 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
344
351
|
className: "font-family-mono mb-1 color-text-secondary"
|
|
345
352
|
}, formulaMore.helpExample), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("code", {
|
|
346
353
|
style: {
|
|
347
|
-
overflowWrap: "break-word"
|
|
354
|
+
overflowWrap: "break-word",
|
|
355
|
+
fontWeight: "bold"
|
|
348
356
|
},
|
|
349
357
|
className: "example-value-code"
|
|
350
358
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
351
359
|
className: "luckysheet-arguments-help-function-name"
|
|
352
|
-
}, fn.n), /*#__PURE__*/_react.default.createElement("span", {
|
|
360
|
+
}, "=", fn.n), /*#__PURE__*/_react.default.createElement("span", {
|
|
353
361
|
className: "luckysheet-arguments-paren"
|
|
354
362
|
}, "("), /*#__PURE__*/_react.default.createElement("span", {
|
|
355
363
|
className: "luckysheet-arguments-parameter-holder"
|
|
@@ -357,8 +365,15 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
357
365
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
358
366
|
key: param.name,
|
|
359
367
|
className: "luckysheet-arguments-help-parameter",
|
|
360
|
-
dir: "auto"
|
|
361
|
-
|
|
368
|
+
dir: "auto",
|
|
369
|
+
style: {
|
|
370
|
+
color: param.type === "string" ? "#177E23" : "black"
|
|
371
|
+
}
|
|
372
|
+
}, param.example, /*#__PURE__*/_react.default.createElement("span", {
|
|
373
|
+
style: {
|
|
374
|
+
color: "black"
|
|
375
|
+
}
|
|
376
|
+
}, i !== fn.p.length - 1 && ", "));
|
|
362
377
|
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
363
378
|
className: "luckysheet-arguments-paren"
|
|
364
379
|
}, ")")))), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -390,6 +405,7 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
390
405
|
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("code", {
|
|
391
406
|
className: "font-family-mono mb-1 mt-2 color-text-default font-family-mono",
|
|
392
407
|
style: {
|
|
408
|
+
fontWeight: 600,
|
|
393
409
|
backgroundColor: commaCount === index ? bgColor(fn.BRAND_SECONDARY_COLOR) : "transparent"
|
|
394
410
|
}
|
|
395
411
|
}, param.name, param.repeat === "y" && (/*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -415,13 +431,42 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
415
431
|
borderBottomLeftRadius: "10px",
|
|
416
432
|
borderBottomRightRadius: "10px"
|
|
417
433
|
},
|
|
418
|
-
className: "w-full"
|
|
434
|
+
className: "w-full flex items-center gap-4"
|
|
419
435
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
420
436
|
onClick: function onClick() {
|
|
421
437
|
var _a;
|
|
422
438
|
(_a = document.getElementById("function-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
423
439
|
},
|
|
424
440
|
className: "color-text-link cursor-pointer text-helper-text-sm"
|
|
425
|
-
}, "Learn More"))))
|
|
441
|
+
}, "Learn More"), (fn.n.includes("SMARTCONTRACT") || fn.n.includes("smartcontract")) && (/*#__PURE__*/_react.default.createElement("div", {
|
|
442
|
+
className: "flex justify-center items-center gap-1 color-text-link cursor-pointer text-helper-text-sm ml-2",
|
|
443
|
+
onClick: function onClick() {
|
|
444
|
+
var _a;
|
|
445
|
+
(_a = document.getElementById("smartcontract-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
446
|
+
}
|
|
447
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
448
|
+
className: ""
|
|
449
|
+
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
450
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
451
|
+
width: "17",
|
|
452
|
+
height: "17",
|
|
453
|
+
viewBox: "0 0 24 24",
|
|
454
|
+
fill: "none",
|
|
455
|
+
stroke: "currentColor",
|
|
456
|
+
strokeWidth: "2",
|
|
457
|
+
strokeLinecap: "round",
|
|
458
|
+
strokeLinejoin: "round",
|
|
459
|
+
className: "lucide lucide-circle-question-mark-icon lucide-circle-question-mark"
|
|
460
|
+
}, /*#__PURE__*/_react.default.createElement("circle", {
|
|
461
|
+
cx: "12",
|
|
462
|
+
cy: "12",
|
|
463
|
+
r: "10"
|
|
464
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
465
|
+
d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"
|
|
466
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
467
|
+
d: "M12 17h.01"
|
|
468
|
+
}))), /*#__PURE__*/_react.default.createElement("span", {
|
|
469
|
+
className: "font-normal text-xs text-[#5c0aff]"
|
|
470
|
+
}, "How to use imported contract?")))))))));
|
|
426
471
|
};
|
|
427
472
|
var _default = exports.default = FormulaHint;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.79",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"tsc": "tsc"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@fileverse-dev/fortune-core": "1.2.
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.2.79",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-40",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|