@fileverse-dev/dsheet 4.1.1-edit-mode-14 → 4.1.1-edit-mode-16
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/{constants-CRFfbkoQ.js → constants-B3rfAvvz.js} +79 -22
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +3 -3
- package/dist/{index-DzwlrPIa.js → index-DQvYqAJz.js} +20650 -21300
- package/dist/index.es.js +2 -2
- package/dist/sync-local/presence.d.ts +2 -0
- package/dist/sync-local/socketClient.d.ts +1 -0
- package/dist/{use-xlsx-import-impl-CeDHNaXi.js → use-xlsx-import-impl-DjiPGIoS.js} +3 -3
- package/dist/{xlsx-defined-names-CPlC1afa.js → xlsx-defined-names-Dr4_psg0.js} +1 -1
- package/dist/{xlsx-export-impl-SyIbZKQB.js → xlsx-export-impl-D2YNoxJm.js} +3 -3
- package/dist/{xlsx-hyperlink-inline-Ch9f11g5.js → xlsx-hyperlink-inline-BkLFFNwP.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
const
|
|
1
|
+
import { E as l, S as u } from "./crypto-constants-ZTlAYRUf.js";
|
|
2
|
+
const h = l, S = u, _ = [
|
|
3
3
|
{
|
|
4
4
|
id: "0",
|
|
5
5
|
name: "Sheet1",
|
|
@@ -7,7 +7,7 @@ const E = a, d = n, f = [
|
|
|
7
7
|
config: {},
|
|
8
8
|
order: 0
|
|
9
9
|
}
|
|
10
|
-
],
|
|
10
|
+
], g = [
|
|
11
11
|
"undo",
|
|
12
12
|
"redo",
|
|
13
13
|
"format-painter",
|
|
@@ -45,7 +45,7 @@ const E = a, d = n, f = [
|
|
|
45
45
|
"quick-formula",
|
|
46
46
|
"dataVerification",
|
|
47
47
|
"search"
|
|
48
|
-
],
|
|
48
|
+
], p = [
|
|
49
49
|
"cut",
|
|
50
50
|
"copy",
|
|
51
51
|
"paste",
|
|
@@ -82,7 +82,7 @@ const E = a, d = n, f = [
|
|
|
82
82
|
"freeze-row",
|
|
83
83
|
"|",
|
|
84
84
|
"clear-format"
|
|
85
|
-
],
|
|
85
|
+
], C = [
|
|
86
86
|
"cut",
|
|
87
87
|
"copy",
|
|
88
88
|
"paste",
|
|
@@ -119,14 +119,14 @@ const E = a, d = n, f = [
|
|
|
119
119
|
"freeze-column",
|
|
120
120
|
"|",
|
|
121
121
|
"clear-format"
|
|
122
|
-
],
|
|
122
|
+
], w = {
|
|
123
123
|
height: null,
|
|
124
124
|
isShow: !1,
|
|
125
125
|
left: null,
|
|
126
126
|
top: null,
|
|
127
127
|
value: "",
|
|
128
128
|
width: null
|
|
129
|
-
},
|
|
129
|
+
}, a = "#9CA3AF", s = [
|
|
130
130
|
"#30bced",
|
|
131
131
|
"#6eeb83",
|
|
132
132
|
"#fa69d1",
|
|
@@ -136,24 +136,81 @@ const E = a, d = n, f = [
|
|
|
136
136
|
"#0ad7f2",
|
|
137
137
|
"#1bff39"
|
|
138
138
|
];
|
|
139
|
-
function
|
|
140
|
-
|
|
139
|
+
function A(o) {
|
|
140
|
+
const t = /* @__PURE__ */ new Map();
|
|
141
|
+
return o.forEach((r) => {
|
|
142
|
+
const i = r == null ? void 0 : r.socketId, e = r == null ? void 0 : r.user;
|
|
143
|
+
typeof i == "string" && e && t.set(i, {
|
|
144
|
+
name: e.name ?? "",
|
|
145
|
+
color: e.color ?? a,
|
|
146
|
+
isEns: e.isEns ?? ""
|
|
147
|
+
});
|
|
148
|
+
}), t;
|
|
141
149
|
}
|
|
142
|
-
function
|
|
150
|
+
function L(o, t) {
|
|
151
|
+
const r = o.map((e) => {
|
|
152
|
+
const n = t.get(e);
|
|
153
|
+
return n ? {
|
|
154
|
+
clientId: e,
|
|
155
|
+
name: n.name,
|
|
156
|
+
color: n.color,
|
|
157
|
+
isEns: n.isEns,
|
|
158
|
+
isPlaceholder: !1
|
|
159
|
+
} : {
|
|
160
|
+
clientId: e,
|
|
161
|
+
name: "",
|
|
162
|
+
color: a,
|
|
163
|
+
isEns: "",
|
|
164
|
+
isPlaceholder: !0
|
|
165
|
+
};
|
|
166
|
+
});
|
|
167
|
+
r.sort((e, n) => !!e.isPlaceholder != !!n.isPlaceholder ? e.isPlaceholder ? 1 : -1 : String(e.clientId).localeCompare(String(n.clientId)));
|
|
168
|
+
const i = /* @__PURE__ */ new Set();
|
|
169
|
+
return r.filter((e) => e.isPlaceholder || !e.name ? !0 : i.has(e.name) ? !1 : (i.add(e.name), !0));
|
|
170
|
+
}
|
|
171
|
+
function R(o, t) {
|
|
172
|
+
const r = new Set(
|
|
173
|
+
o.filter(({ isPlaceholder: e, name: n }) => !e && n).map(({ name: e }) => e)
|
|
174
|
+
);
|
|
175
|
+
t.forEach((e, n) => {
|
|
176
|
+
r.has(n) || t.delete(n);
|
|
177
|
+
});
|
|
178
|
+
const i = /* @__PURE__ */ new Set();
|
|
179
|
+
return o.forEach((e) => {
|
|
180
|
+
if (e.isPlaceholder || !e.name) return;
|
|
181
|
+
let n = t.get(e.name);
|
|
182
|
+
(!n || i.has(n)) && (n = s.find((c) => !i.has(c)) ?? n ?? s[t.size % s.length], t.set(e.name, n)), i.add(n), e.color = n;
|
|
183
|
+
}), o;
|
|
184
|
+
}
|
|
185
|
+
function O(o, t) {
|
|
186
|
+
return o.slice().sort().map((r) => {
|
|
187
|
+
const i = t.get(r);
|
|
188
|
+
return i ? `${r}:${i.name}:${i.isEns}` : `${r}:?`;
|
|
189
|
+
}).join("|");
|
|
190
|
+
}
|
|
191
|
+
const d = "#5298FF";
|
|
192
|
+
function f(o) {
|
|
193
|
+
return s[o % s.length];
|
|
194
|
+
}
|
|
195
|
+
function E() {
|
|
143
196
|
return "#" + Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0");
|
|
144
197
|
}
|
|
145
|
-
function
|
|
146
|
-
return
|
|
198
|
+
function P(o, t, r) {
|
|
199
|
+
return t || (o ? d : r != null ? f(r) : E());
|
|
147
200
|
}
|
|
148
201
|
export {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
E,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
202
|
+
w as C,
|
|
203
|
+
_ as D,
|
|
204
|
+
h as E,
|
|
205
|
+
C as H,
|
|
206
|
+
S,
|
|
207
|
+
g as T,
|
|
208
|
+
R as a,
|
|
209
|
+
A as b,
|
|
210
|
+
s as c,
|
|
211
|
+
p as d,
|
|
212
|
+
d as e,
|
|
213
|
+
O as i,
|
|
214
|
+
L as m,
|
|
215
|
+
P as p
|
|
159
216
|
};
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, } from './editor/constants/shared-constants';
|
|
2
|
+
export { COLLAB_PRESENCE_COLORS } from './sync-local/presence';
|
|
2
3
|
export declare const ENS_PRESENCE_COLOR = "#5298FF";
|
|
3
|
-
|
|
4
|
-
/** ENS brand color, else `color`, else palette by `clientId`, else random. */
|
|
4
|
+
/** Explicit awareness color, else ENS brand color, palette, or random fallback. */
|
|
5
5
|
export declare function presenceColor(isEns: boolean | undefined, color?: string, clientId?: number): string;
|
package/dist/constants.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as R, e as _, E as C, S as s, p as O } from "./constants-B3rfAvvz.js";
|
|
2
2
|
export {
|
|
3
3
|
R as COLLAB_PRESENCE_COLORS,
|
|
4
4
|
_ as ENS_PRESENCE_COLOR,
|
|
5
5
|
C as ERROR_MESSAGES_FLAG,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
s as SERVICES_API_KEY,
|
|
7
|
+
O as presenceColor
|
|
8
8
|
};
|