@fileverse-dev/fortune-react 1.0.39 → 1.0.41

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 (45) hide show
  1. package/es/components/CryptoDenominationSelector/index.css +67 -0
  2. package/es/components/CryptoDenominationSelector/index.d.ts +8 -0
  3. package/es/components/CryptoDenominationSelector/index.js +272 -0
  4. package/es/components/FormatSearch/index.js +9 -5
  5. package/es/components/SVGDefines.js +60 -1
  6. package/es/components/SheetTab/index.js +23 -2
  7. package/es/components/Toolbar/Combo.js +18 -4
  8. package/es/components/Toolbar/index.css +6 -0
  9. package/es/components/Toolbar/index.d.ts +1 -1
  10. package/es/components/Toolbar/index.js +334 -3
  11. package/es/components/Workbook/api.d.ts +2 -0
  12. package/es/components/Workbook/api.js +2 -0
  13. package/es/components/Workbook/index.d.ts +24 -23
  14. package/es/components/Workbook/index.js +36 -1
  15. package/es/constants.d.ts +26 -0
  16. package/es/constants.js +44 -3
  17. package/es/utils/convertCellsToCrypto.d.ts +8 -0
  18. package/es/utils/convertCellsToCrypto.js +215 -0
  19. package/es/utils/cryptoApi.d.ts +2 -0
  20. package/es/utils/cryptoApi.js +154 -0
  21. package/es/utils/updateCellsDecimalFormat.d.ts +6 -0
  22. package/es/utils/updateCellsDecimalFormat.js +80 -0
  23. package/lib/components/CryptoDenominationSelector/index.css +67 -0
  24. package/lib/components/CryptoDenominationSelector/index.d.ts +8 -0
  25. package/lib/components/CryptoDenominationSelector/index.js +281 -0
  26. package/lib/components/FormatSearch/index.js +9 -5
  27. package/lib/components/SVGDefines.js +60 -1
  28. package/lib/components/SheetTab/index.js +23 -2
  29. package/lib/components/Toolbar/Combo.js +18 -4
  30. package/lib/components/Toolbar/index.css +6 -0
  31. package/lib/components/Toolbar/index.d.ts +1 -1
  32. package/lib/components/Toolbar/index.js +333 -2
  33. package/lib/components/Workbook/api.d.ts +2 -0
  34. package/lib/components/Workbook/api.js +2 -0
  35. package/lib/components/Workbook/index.d.ts +24 -23
  36. package/lib/components/Workbook/index.js +35 -0
  37. package/lib/constants.d.ts +26 -0
  38. package/lib/constants.js +45 -3
  39. package/lib/utils/convertCellsToCrypto.d.ts +8 -0
  40. package/lib/utils/convertCellsToCrypto.js +222 -0
  41. package/lib/utils/cryptoApi.d.ts +2 -0
  42. package/lib/utils/cryptoApi.js +161 -0
  43. package/lib/utils/updateCellsDecimalFormat.d.ts +6 -0
  44. package/lib/utils/updateCellsDecimalFormat.js +86 -0
  45. package/package.json +2 -2
@@ -0,0 +1,281 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _fortuneCore = require("@fileverse-dev/fortune-core");
10
+ var _ui = require("@fileverse/ui");
11
+ require("./index.css");
12
+ var _SVGIcon = _interopRequireDefault(require("../SVGIcon"));
13
+ var _context = _interopRequireDefault(require("../../context"));
14
+ var _convertCellsToCrypto = require("../../utils/convertCellsToCrypto");
15
+ var _updateCellsDecimalFormat = require("../../utils/updateCellsDecimalFormat");
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
18
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
19
+ function adopt(value) {
20
+ return value instanceof P ? value : new P(function (resolve) {
21
+ resolve(value);
22
+ });
23
+ }
24
+ return new (P || (P = Promise))(function (resolve, reject) {
25
+ function fulfilled(value) {
26
+ try {
27
+ step(generator.next(value));
28
+ } catch (e) {
29
+ reject(e);
30
+ }
31
+ }
32
+ function rejected(value) {
33
+ try {
34
+ step(generator["throw"](value));
35
+ } catch (e) {
36
+ reject(e);
37
+ }
38
+ }
39
+ function step(result) {
40
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
41
+ }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
46
+ var _ = {
47
+ label: 0,
48
+ sent: function sent() {
49
+ if (t[0] & 1) throw t[1];
50
+ return t[1];
51
+ },
52
+ trys: [],
53
+ ops: []
54
+ },
55
+ f,
56
+ y,
57
+ t,
58
+ g;
59
+ return g = {
60
+ next: verb(0),
61
+ "throw": verb(1),
62
+ "return": verb(2)
63
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
64
+ return this;
65
+ }), g;
66
+ function verb(n) {
67
+ return function (v) {
68
+ return step([n, v]);
69
+ };
70
+ }
71
+ function step(op) {
72
+ if (f) throw new TypeError("Generator is already executing.");
73
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
74
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
75
+ if (y = 0, t) op = [op[0] & 2, t.value];
76
+ switch (op[0]) {
77
+ case 0:
78
+ case 1:
79
+ t = op;
80
+ break;
81
+ case 4:
82
+ _.label++;
83
+ return {
84
+ value: op[1],
85
+ done: false
86
+ };
87
+ case 5:
88
+ _.label++;
89
+ y = op[1];
90
+ op = [0];
91
+ continue;
92
+ case 7:
93
+ op = _.ops.pop();
94
+ _.trys.pop();
95
+ continue;
96
+ default:
97
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
98
+ _ = 0;
99
+ continue;
100
+ }
101
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
102
+ _.label = op[1];
103
+ break;
104
+ }
105
+ if (op[0] === 6 && _.label < t[1]) {
106
+ _.label = t[1];
107
+ t = op;
108
+ break;
109
+ }
110
+ if (t && _.label < t[2]) {
111
+ _.label = t[2];
112
+ _.ops.push(op);
113
+ break;
114
+ }
115
+ if (t[2]) _.ops.pop();
116
+ _.trys.pop();
117
+ continue;
118
+ }
119
+ op = body.call(thisArg, _);
120
+ } catch (e) {
121
+ op = [6, e];
122
+ y = 0;
123
+ } finally {
124
+ f = t = 0;
125
+ }
126
+ if (op[0] & 5) throw op[1];
127
+ return {
128
+ value: op[0] ? op[1] : void 0,
129
+ done: true
130
+ };
131
+ }
132
+ };
133
+ var CRYPTO_OPTIONS = [{
134
+ label: "Bitcoin (BTC)",
135
+ value: "BTC",
136
+ icon: "Btc"
137
+ }, {
138
+ label: "Ethereum (ETH)",
139
+ value: "ETH",
140
+ icon: "Ethereum"
141
+ }, {
142
+ label: "Solana (SOL)",
143
+ value: "SOL",
144
+ icon: "Solana"
145
+ }];
146
+ var CryptoDenominationSelector = function CryptoDenominationSelector(_a) {
147
+ var _b = _a.initialDecimals,
148
+ initialDecimals = _b === void 0 ? 6 : _b,
149
+ children = _a.children;
150
+ var _c = (0, _react.useContext)(_context.default),
151
+ setContext = _c.setContext,
152
+ context = _c.context;
153
+ var activeCryptoCurrency = (0, _react.useMemo)(function () {
154
+ var _a, _b;
155
+ var firstSelection = (_a = context.luckysheet_select_save) === null || _a === void 0 ? void 0 : _a[0];
156
+ var flowdata = (0, _fortuneCore.getFlowdata)(context);
157
+ if (!firstSelection || !flowdata) return null;
158
+ var row = firstSelection.row_focus;
159
+ var col = firstSelection.column_focus;
160
+ if (row == null || col == null) return null;
161
+ var cell = (_b = flowdata[row]) === null || _b === void 0 ? void 0 : _b[col];
162
+ if (!cell) return null;
163
+ var curr = (0, _fortuneCore.normalizedCellAttr)(cell, "ct");
164
+ if (!(curr === null || curr === void 0 ? void 0 : curr.fa)) return null;
165
+ var found = CRYPTO_OPTIONS.find(function (option) {
166
+ return curr.fa.includes(option.value);
167
+ });
168
+ return found ? found.value : null;
169
+ }, [context]);
170
+ var _d = (0, _react.useState)(initialDecimals),
171
+ decimals = _d[0],
172
+ setDecimals = _d[1];
173
+ var _e = (0, _react.useState)(false),
174
+ open = _e[0],
175
+ setOpen = _e[1];
176
+ var handleDenominationChange = (0, _react.useCallback)(function (newDenomination) {
177
+ return __awaiter(void 0, void 0, void 0, function () {
178
+ return __generator(this, function (_a) {
179
+ switch (_a.label) {
180
+ case 0:
181
+ return [4, (0, _convertCellsToCrypto.convertCellsToCrypto)({
182
+ context: context,
183
+ setContext: setContext,
184
+ denomination: newDenomination,
185
+ decimals: decimals,
186
+ baseCurrency: "USD"
187
+ })];
188
+ case 1:
189
+ _a.sent();
190
+ return [2];
191
+ }
192
+ });
193
+ });
194
+ }, [context, setContext, decimals]);
195
+ var handleDecimalsChange = (0, _react.useCallback)(function (newDecimals) {
196
+ setDecimals(newDecimals);
197
+ (0, _updateCellsDecimalFormat.updateCellsDecimalFormat)({
198
+ context: context,
199
+ setContext: setContext,
200
+ decimals: newDecimals
201
+ });
202
+ }, [context, setContext]);
203
+ var handleTriggerClick = (0, _react.useCallback)(function (e) {
204
+ e.preventDefault();
205
+ e.stopPropagation();
206
+ if (context.allowEdit === false) {
207
+ return;
208
+ }
209
+ setOpen(!open);
210
+ }, [open, context.allowEdit]);
211
+ return /*#__PURE__*/_react.default.createElement(_ui.Popover, {
212
+ open: open,
213
+ onOpenChange: setOpen
214
+ }, /*#__PURE__*/_react.default.createElement(_ui.PopoverTrigger, {
215
+ asChild: true
216
+ }, /*#__PURE__*/_react.default.createElement("div", {
217
+ onClick: handleTriggerClick
218
+ }, children)), /*#__PURE__*/_react.default.createElement(_ui.PopoverContent, {
219
+ align: "end",
220
+ side: "bottom",
221
+ sideOffset: 4,
222
+ className: "p-2"
223
+ }, /*#__PURE__*/_react.default.createElement("div", {
224
+ className: "crypto-denomination-selector"
225
+ }, /*#__PURE__*/_react.default.createElement("div", {
226
+ className: "cds-row px-2"
227
+ }, /*#__PURE__*/_react.default.createElement("span", null, "Decimal places:"), /*#__PURE__*/_react.default.createElement("span", {
228
+ className: "flex items-center"
229
+ }, /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
230
+ icon: "Minus",
231
+ variant: "ghost",
232
+ size: "sm",
233
+ className: "!bg-transparent",
234
+ disabled: decimals === 1,
235
+ onClick: function onClick() {
236
+ return handleDecimalsChange(Math.max(1, decimals - 1));
237
+ }
238
+ }), /*#__PURE__*/_react.default.createElement("input", {
239
+ type: "number",
240
+ min: 1,
241
+ max: 18,
242
+ value: decimals,
243
+ onChange: function onChange(e) {
244
+ return handleDecimalsChange(Math.max(1, Math.min(18, Number(e.target.value))));
245
+ }
246
+ }), /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
247
+ icon: "Plus",
248
+ variant: "ghost",
249
+ size: "sm",
250
+ className: "!bg-transparent",
251
+ disabled: decimals === 18,
252
+ onClick: function onClick() {
253
+ return handleDecimalsChange(Math.min(18, decimals + 1));
254
+ }
255
+ }))), /*#__PURE__*/_react.default.createElement("div", {
256
+ className: "cds-list"
257
+ }, CRYPTO_OPTIONS.map(function (opt) {
258
+ return /*#__PURE__*/_react.default.createElement("div", {
259
+ key: opt.value,
260
+ className: "flex items-center justify-between cds-option".concat(activeCryptoCurrency === opt.value ? " selected" : ""),
261
+ onClick: function onClick() {
262
+ return handleDenominationChange(opt.value);
263
+ }
264
+ }, /*#__PURE__*/_react.default.createElement("span", {
265
+ className: "flex items-center gap-2"
266
+ }, activeCryptoCurrency === opt.value ? (/*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
267
+ name: "Check",
268
+ className: "w-4 h-4"
269
+ })) : (/*#__PURE__*/_react.default.createElement("div", {
270
+ className: "w-4 h-4"
271
+ })), opt.label), /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
272
+ name: opt.icon,
273
+ className: "cds-icon"
274
+ }), opt.value === "SOL" && (/*#__PURE__*/_react.default.createElement(_SVGIcon.default, {
275
+ name: "solana",
276
+ width: 16,
277
+ height: 16
278
+ })));
279
+ })))));
280
+ };
281
+ var _default = exports.default = CryptoDenominationSelector;
@@ -54,7 +54,7 @@ var FormatSearch = exports.FormatSearch = function FormatSearch(_a) {
54
54
  var index = (0, _fortuneCore.getSheetIndex)(ctx, ctx.currentSheetId);
55
55
  if (_lodash.default.isNil(index)) return;
56
56
  var selectedFormat = toolbarFormat[selectedFormatIndex].value;
57
- var formatString = "".concat(selectedFormat, "#,##0.").concat("0".repeat(decimalPlace));
57
+ var formatString = "".concat(selectedFormat, " #,##0.").concat("0".repeat(decimalPlace));
58
58
  _lodash.default.forEach(ctx.luckysheet_select_save, function (selection) {
59
59
  var _a, _b, _c, _d;
60
60
  for (var r = selection.row[0]; r <= selection.row[1]; r += 1) {
@@ -107,15 +107,19 @@ var FormatSearch = exports.FormatSearch = function FormatSearch(_a) {
107
107
  }
108
108
  }, /*#__PURE__*/_react.default.createElement(_ui.SelectTrigger, {
109
109
  className: "w-full"
110
- }, /*#__PURE__*/_react.default.createElement(_ui.SelectValue, null, (_b = toolbarFormat[selectedFormatIndex]) === null || _b === void 0 ? void 0 : _b.name, " ", (_c = toolbarFormat[selectedFormatIndex]) === null || _c === void 0 ? void 0 : _c.value)), /*#__PURE__*/_react.default.createElement(_ui.SelectContent, null, toolbarFormat.map(function (v, index) {
110
+ }, /*#__PURE__*/_react.default.createElement(_ui.SelectValue, {
111
+ className: "flex items-center gap-2"
112
+ }, /*#__PURE__*/_react.default.createElement("span", null, (_b = toolbarFormat[selectedFormatIndex]) === null || _b === void 0 ? void 0 : _b.name), /*#__PURE__*/_react.default.createElement("span", {
113
+ className: "text-body-sm color-text-secondary ml-1"
114
+ }, "(", (_c = toolbarFormat[selectedFormatIndex]) === null || _c === void 0 ? void 0 : _c.value, ")"))), /*#__PURE__*/_react.default.createElement(_ui.SelectContent, null, toolbarFormat.map(function (v, index) {
111
115
  return /*#__PURE__*/_react.default.createElement(_ui.SelectItem, {
112
116
  key: v.name,
113
117
  value: String(index)
114
118
  }, /*#__PURE__*/_react.default.createElement("div", {
115
- className: "flex justify-between w-full"
119
+ className: "flex justify-between w-full items-center gap-2"
116
120
  }, /*#__PURE__*/_react.default.createElement("span", null, v.name), /*#__PURE__*/_react.default.createElement("span", {
117
- className: "text-body-sm text-icon-secondary"
118
- }, v.value)));
121
+ className: "text-body-sm color-text-secondary"
122
+ }, "(", v.value, ")")));
119
123
  }))))), /*#__PURE__*/_react.default.createElement(_ui.Divider, {
120
124
  className: "w-full border-t-[1px] my-4"
121
125
  }), /*#__PURE__*/_react.default.createElement("div", {
@@ -1904,6 +1904,65 @@ var SVGDefines = function SVGDefines(_a) {
1904
1904
  }), /*#__PURE__*/_react.default.createElement("path", {
1905
1905
  d: "M8.00147 1.3335C8.31859 1.33426 8.59155 1.55835 8.65382 1.86931C8.95517 3.3758 9.86768 4.83997 11.0835 5.81267L11.2677 5.96501C12.171 6.73236 12.8015 7.61685 13.1121 8.58741L12.4767 8.79053L11.842 8.99431C11.6214 8.30509 11.1562 7.61973 10.4045 6.98129L10.2508 6.85434C9.31898 6.10886 8.53727 5.12515 8.00017 4.03337C7.83296 4.35237 7.44178 4.48213 7.11671 4.32243C6.78643 4.15985 6.6502 3.76015 6.81267 3.42986C7.05681 2.9339 7.23662 2.40833 7.34717 1.86671L7.3615 1.80941C7.44507 1.52891 7.70415 1.33298 8.00147 1.3335Z",
1906
1906
  fill: "#363B3F"
1907
- })))));
1907
+ }))), /*#__PURE__*/_react.default.createElement("symbol", {
1908
+ id: "solana",
1909
+ width: "16",
1910
+ height: "16",
1911
+ viewBox: "0 0 16 16",
1912
+ fill: "none"
1913
+ }, /*#__PURE__*/_react.default.createElement("g", {
1914
+ "clip-path": "url(#clip0_568_119011)"
1915
+ }, /*#__PURE__*/_react.default.createElement("path", {
1916
+ d: "M2.59975 11.6853C2.69631 11.5775 2.82907 11.5146 2.96988 11.5146H15.7393C15.9726 11.5146 16.0893 11.8291 15.9244 12.0132L13.4019 14.8294C13.3053 14.9372 13.1725 15.0001 13.0317 15.0001H0.262315C0.0289729 15.0001 -0.0876979 14.6856 0.0772505 14.5015L2.59975 11.6853Z",
1917
+ fill: "url(#paint0_linear_568_119011)"
1918
+ }), /*#__PURE__*/_react.default.createElement("path", {
1919
+ d: "M2.59975 1.17068C2.70033 1.06288 2.8331 1 2.96988 1H15.7393C15.9726 1 16.0893 1.3144 15.9244 1.49856L13.4019 4.31473C13.3053 4.42252 13.1725 4.4854 13.0317 4.4854H0.262315C0.0289729 4.4854 -0.0876979 4.171 0.0772505 3.98685L2.59975 1.17068Z",
1920
+ fill: "url(#paint1_linear_568_119011)"
1921
+ }), /*#__PURE__*/_react.default.createElement("path", {
1922
+ d: "M13.4019 6.39431C13.3053 6.28651 13.1725 6.22363 13.0317 6.22363H0.262315C0.0289729 6.22363 -0.0876979 6.53804 0.0772505 6.72219L2.59975 9.53836C2.69631 9.64615 2.82907 9.70903 2.96988 9.70903H15.7393C15.9726 9.70903 16.0893 9.39463 15.9244 9.21048L13.4019 6.39431Z",
1923
+ fill: "url(#paint2_linear_568_119011)"
1924
+ })), /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
1925
+ id: "paint0_linear_568_119011",
1926
+ x1: "14.5195",
1927
+ y1: "-0.682254",
1928
+ x2: "4.0567",
1929
+ y2: "17.2684",
1930
+ gradientUnits: "userSpaceOnUse"
1931
+ }, /*#__PURE__*/_react.default.createElement("stop", {
1932
+ "stop-color": "#00FFA3"
1933
+ }), /*#__PURE__*/_react.default.createElement("stop", {
1934
+ offset: "1",
1935
+ "stop-color": "#DC1FFF"
1936
+ })), /*#__PURE__*/_react.default.createElement("linearGradient", {
1937
+ id: "paint1_linear_568_119011",
1938
+ x1: "10.6552",
1939
+ y1: "-2.93462",
1940
+ x2: "0.192482",
1941
+ y2: "15.016",
1942
+ gradientUnits: "userSpaceOnUse"
1943
+ }, /*#__PURE__*/_react.default.createElement("stop", {
1944
+ "stop-color": "#00FFA3"
1945
+ }), /*#__PURE__*/_react.default.createElement("stop", {
1946
+ offset: "1",
1947
+ "stop-color": "#DC1FFF"
1948
+ })), /*#__PURE__*/_react.default.createElement("linearGradient", {
1949
+ id: "paint2_linear_568_119011",
1950
+ x1: "12.575",
1951
+ y1: "-1.81561",
1952
+ x2: "2.11229",
1953
+ y2: "16.135",
1954
+ gradientUnits: "userSpaceOnUse"
1955
+ }, /*#__PURE__*/_react.default.createElement("stop", {
1956
+ "stop-color": "#00FFA3"
1957
+ }), /*#__PURE__*/_react.default.createElement("stop", {
1958
+ offset: "1",
1959
+ "stop-color": "#DC1FFF"
1960
+ })), /*#__PURE__*/_react.default.createElement("clipPath", {
1961
+ id: "clip0_568_119011"
1962
+ }, /*#__PURE__*/_react.default.createElement("rect", {
1963
+ width: "16",
1964
+ height: "16",
1965
+ fill: "white"
1966
+ }))))));
1908
1967
  };
1909
1968
  var _default = exports.default = SVGDefines;
@@ -66,7 +66,28 @@ var SheetTab = function SheetTab() {
66
66
  var _a;
67
67
  (_a = settings.onSheetCountChange) === null || _a === void 0 ? void 0 : _a.call(settings, context.luckysheetfile.length);
68
68
  }, [context.luckysheetfile.length]);
69
- return /*#__PURE__*/_react.default.createElement("div", {
69
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
70
+ className: "w-full",
71
+ id: "denomination-warning",
72
+ style: {
73
+ position: "fixed",
74
+ display: "none",
75
+ backgroundColor: "#F8F9FA",
76
+ borderBottom: "1px solid #E8EBEC",
77
+ color: "#77818A",
78
+ fontFamily: "Helvetica Neue",
79
+ fontSize: "var(--font-size-2xsm, 12px)",
80
+ fontStyle: "normal",
81
+ fontWeight: "400",
82
+ bottom: "31px"
83
+ }
84
+ }, /*#__PURE__*/_react.default.createElement("div", {
85
+ className: "max-w-7xl mx-auto px-4 py-1"
86
+ }, /*#__PURE__*/_react.default.createElement("p", {
87
+ className: "text-sm text-center"
88
+ }, /*#__PURE__*/_react.default.createElement("span", {
89
+ className: "font-medium"
90
+ }, "Disclaimer:"), " Prices aren't updated in real time, so they might be slightly different from the source when you check. Updates can be delayed by up to 20 minutes."))), /*#__PURE__*/_react.default.createElement("div", {
70
91
  className: "luckysheet-sheet-area luckysheet-noselected-text",
71
92
  onContextMenu: function onContextMenu(e) {
72
93
  return e.preventDefault();
@@ -147,6 +168,6 @@ var SheetTab = function SheetTab() {
147
168
  height: 12
148
169
  })))), /*#__PURE__*/_react.default.createElement("div", {
149
170
  className: "fortune-sheet-area-right"
150
- }, /*#__PURE__*/_react.default.createElement(_ZoomControl.default, null)));
171
+ }, /*#__PURE__*/_react.default.createElement(_ZoomControl.default, null))));
151
172
  };
152
173
  var _default = exports.default = SheetTab;
@@ -27,8 +27,11 @@ var Combo = function Combo(_a) {
27
27
  open = _c[0],
28
28
  setOpen = _c[1];
29
29
  var buttonRef = (0, _react.useRef)(null);
30
+ var handleOpenChange = function handleOpenChange(newOpen) {
31
+ setOpen(newOpen);
32
+ };
30
33
  var isLucideIcon = (0, _react.useMemo)(function () {
31
- return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template", "font-color", "background"].includes(iconId);
34
+ return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template", "font-color", "background", "currency"].includes(iconId);
32
35
  }, [iconId]);
33
36
  var trigger = !isLucideIcon ? (/*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
34
37
  text: tooltip,
@@ -84,7 +87,8 @@ var Combo = function Combo(_a) {
84
87
  return setOpen(!open);
85
88
  },
86
89
  className: (0, _ui.cn)("fortune-toolbar-combo-button", {
87
- "custom-color-button": iconId === "font-color" && fillColor
90
+ "custom-color-button": iconId === "font-color" && fillColor,
91
+ "min-w-fit rounded-l-none": iconId === "currency"
88
92
  }),
89
93
  style: {
90
94
  color: iconId === "font-color" ? fillColor : undefined
@@ -95,7 +99,8 @@ var Combo = function Combo(_a) {
95
99
  className: "fortune-toolbar-item"
96
100
  }, /*#__PURE__*/_react.default.createElement(_ui.Popover, {
97
101
  open: open,
98
- onOpenChange: setOpen
102
+ onOpenChange: handleOpenChange,
103
+ modal: true
99
104
  }, /*#__PURE__*/_react.default.createElement(_ui.PopoverTrigger, {
100
105
  asChild: true
101
106
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -105,7 +110,16 @@ var Combo = function Combo(_a) {
105
110
  side: "bottom",
106
111
  sideOffset: 4,
107
112
  alignOffset: -16,
108
- className: "fortune-toolbar-combo-popup border-none"
113
+ className: "fortune-toolbar-combo-popup border-none",
114
+ onMouseDown: function onMouseDown(e) {
115
+ return e.stopPropagation();
116
+ },
117
+ onMouseUp: function onMouseUp(e) {
118
+ return e.stopPropagation();
119
+ },
120
+ onClick: function onClick(e) {
121
+ return e.stopPropagation();
122
+ }
109
123
  }, children === null || children === void 0 ? void 0 : children(setOpen))));
110
124
  };
111
125
  var _default = exports.default = Combo;
@@ -403,3 +403,9 @@
403
403
  .custom-color-button > svg > path:first-child {
404
404
  display: none !important;
405
405
  }
406
+
407
+ #search-input-container [cmdk-input-wrapper] {
408
+ border: 1px solid hsl(var(--color-border-default));
409
+ border-radius: 8px;
410
+ margin: 8px 8px 0px 8px;
411
+ }
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import "./index.css";
3
- export declare const getLucideIcon: (title: string) => "" | "Undo" | "Redo" | "PaintRoller" | "Bold" | "Italic" | "Strikethrough" | "Underline" | "AlignLeft" | "AlignCenter" | "AlignRight" | "ArrowUpFromLine" | "AlignVerticalMiddle" | "ArrowDownToLine" | "TextOverflow" | "WrapText" | "TextClip" | "Baseline" | "PaintBucket" | "Border" | "MergeHorizontal" | "DollarSign" | "Percent" | "DecimalsArrowLeft" | "DecimalsArrowRight" | "PaintbrushVertical" | "Filter" | "Link" | "MessageSquarePlus" | "Image" | "Sigma" | "ShieldCheck" | "Search" | "DuneChart" | "Ellipsis";
3
+ export declare const getLucideIcon: (title: string) => "Ethereum" | "DollarSign" | "" | "ChevronDown" | "Undo" | "Redo" | "PaintRoller" | "Bold" | "Italic" | "Strikethrough" | "Underline" | "AlignLeft" | "AlignCenter" | "AlignRight" | "ArrowUpFromLine" | "AlignVerticalMiddle" | "ArrowDownToLine" | "TextOverflow" | "WrapText" | "TextClip" | "Baseline" | "PaintBucket" | "Border" | "MergeHorizontal" | "Percent" | "DecimalsArrowLeft" | "DecimalsArrowRight" | "PaintbrushVertical" | "Filter" | "Link" | "MessageSquarePlus" | "Image" | "Sigma" | "ShieldCheck" | "Search" | "DuneChart" | "Ellipsis";
4
4
  declare const Toolbar: React.FC<{
5
5
  setMoreItems: React.Dispatch<React.SetStateAction<React.ReactNode>>;
6
6
  moreItemsOpen: boolean;