@fileverse-dev/dsheet 2.0.33-rtc-a → 2.0.33-rtc-b

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.
@@ -1,5 +1,5 @@
1
- import { E as e, S as t } from "./crypto-constants-CqpCRs86.js";
2
- const o = e, a = t, l = [
1
+ import { E as n, S as a } from "./crypto-constants-CqpCRs86.js";
2
+ const E = n, d = a, f = [
3
3
  {
4
4
  id: "0",
5
5
  name: "Sheet1",
@@ -9,7 +9,7 @@ const o = e, a = t, l = [
9
9
  row: 500,
10
10
  column: 26
11
11
  }
12
- ], c = [
12
+ ], m = [
13
13
  "undo",
14
14
  "redo",
15
15
  "format-painter",
@@ -47,7 +47,7 @@ const o = e, a = t, l = [
47
47
  "quick-formula",
48
48
  "dataVerification",
49
49
  "search"
50
- ], n = [
50
+ ], u = [
51
51
  "cut",
52
52
  "copy",
53
53
  "paste",
@@ -84,7 +84,7 @@ const o = e, a = t, l = [
84
84
  "freeze-row",
85
85
  "|",
86
86
  "clear-format"
87
- ], i = [
87
+ ], S = [
88
88
  "cut",
89
89
  "copy",
90
90
  "paste",
@@ -121,20 +121,41 @@ const o = e, a = t, l = [
121
121
  "freeze-column",
122
122
  "|",
123
123
  "clear-format"
124
- ], s = {
124
+ ], _ = {
125
125
  height: null,
126
126
  isShow: !1,
127
127
  left: null,
128
128
  top: null,
129
129
  value: "",
130
130
  width: null
131
- };
131
+ }, l = "#5298FF", r = [
132
+ "#30bced",
133
+ "#6eeb83",
134
+ "#fa69d1",
135
+ "#ecd444",
136
+ "#ee6352",
137
+ "#db3041",
138
+ "#0ad7f2",
139
+ "#1bff39"
140
+ ];
141
+ function c(e) {
142
+ return r[e % r.length];
143
+ }
144
+ function i() {
145
+ return "#" + Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0");
146
+ }
147
+ function h(e, o, t) {
148
+ return e ? l : o ?? (t != null ? c(t) : i());
149
+ }
132
150
  export {
133
- s as C,
134
- l as D,
135
- o as E,
136
- i as H,
137
- a as S,
138
- c as T,
139
- n as a
151
+ _ as C,
152
+ f as D,
153
+ E,
154
+ S as H,
155
+ d as S,
156
+ m as T,
157
+ r as a,
158
+ u as b,
159
+ l as c,
160
+ h as p
140
161
  };
@@ -1 +1,5 @@
1
1
  export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, } from './editor/constants/shared-constants';
2
+ export declare const ENS_PRESENCE_COLOR = "#5298FF";
3
+ export declare const COLLAB_PRESENCE_COLORS: readonly ["#30bced", "#6eeb83", "#fa69d1", "#ecd444", "#ee6352", "#db3041", "#0ad7f2", "#1bff39"];
4
+ /** ENS brand color, else `color`, else palette by `clientId`, else random. */
5
+ export declare function presenceColor(isEns: boolean | undefined, color?: string, clientId?: number): string;
package/dist/constants.js CHANGED
@@ -1,5 +1,8 @@
1
- import { E as R, S as _ } from "./constants-CnhOvijG.js";
1
+ import { a as R, c as _, E as C, S as a, p as s } from "./constants-yStXQJiK.js";
2
2
  export {
3
- R as ERROR_MESSAGES_FLAG,
4
- _ as SERVICES_API_KEY
3
+ R as COLLAB_PRESENCE_COLORS,
4
+ _ as ENS_PRESENCE_COLOR,
5
+ C as ERROR_MESSAGES_FLAG,
6
+ a as SERVICES_API_KEY,
7
+ s as presenceColor
5
8
  };
@@ -7,5 +7,5 @@ import { WorkbookInstance } from '../../sheet-engine/react';
7
7
  * labels automatically via context.presences[].
8
8
  */
9
9
  export declare const useCollabAwareness: (awareness: Awareness | null | undefined, sheetEditorRef: React.MutableRefObject<WorkbookInstance | null>) => {
10
- localColor: string;
10
+ localColor: "#30bced" | "#6eeb83" | "#fa69d1" | "#ecd444" | "#ee6352" | "#db3041" | "#0ad7f2" | "#1bff39";
11
11
  };