bb-relay 0.0.28 → 0.0.29

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 (37) hide show
  1. package/dist/COLOR_PRESET-DTyA0mA2.d.mts +10 -0
  2. package/dist/COLOR_PRESET-DTyA0mA2.d.ts +10 -0
  3. package/dist/{Locale-D_rGwMX3.d.mts → Locale-BZo4MfHK.d.mts} +15 -0
  4. package/dist/{Locale-D_rGwMX3.d.ts → Locale-BZo4MfHK.d.ts} +15 -0
  5. package/dist/{RequestReturn-DblMUa7Y.d.ts → RequestReturn-D5Nhd4bD.d.ts} +9 -49
  6. package/dist/{RequestReturn-BqjZo3Nj.d.mts → RequestReturn-Due33X_G.d.mts} +9 -49
  7. package/dist/api.d.mts +2 -2
  8. package/dist/api.d.ts +2 -2
  9. package/dist/constant.d.mts +1 -0
  10. package/dist/constant.d.ts +1 -0
  11. package/dist/constant.js +53 -1
  12. package/dist/constant.mjs +52 -0
  13. package/dist/database.d.mts +6 -0
  14. package/dist/database.d.ts +6 -0
  15. package/dist/editor.d.mts +25 -4
  16. package/dist/editor.d.ts +25 -4
  17. package/dist/index.d.mts +2 -2
  18. package/dist/index.d.ts +2 -2
  19. package/dist/locale.d.mts +2 -2
  20. package/dist/locale.d.ts +2 -2
  21. package/dist/locale.js +32 -2
  22. package/dist/locale.mjs +32 -2
  23. package/package.json +1 -1
  24. package/src/constant.ts +11 -1
  25. package/src/constants/COLOR_LIST.ts +23 -0
  26. package/src/constants/COLOR_PRESET.ts +33 -0
  27. package/src/editor.ts +4 -1
  28. package/src/locales/en-GB.ts +15 -0
  29. package/src/locales/fr-FR.ts +15 -0
  30. package/src/types/database/User.ts +6 -0
  31. package/src/types/editor/Manifest.ts +1 -0
  32. package/src/types/editor/Nav.ts +3 -0
  33. package/src/types/editor/Settings.ts +43 -5
  34. package/src/types/editor/TutorialHeader.ts +10 -10
  35. package/src/types/requests/app/index.ts +5 -5
  36. package/src/types/requests/git.ts +7 -28
  37. package/src/types/requests/storage.ts +1 -9
@@ -0,0 +1,10 @@
1
+ declare const COLOR_LIST: readonly ["red", "slate", "stone", "zinc", "gray", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"];
2
+
3
+ type Color = (typeof COLOR_LIST)[number];
4
+ declare const COLOR_PRESET: {
5
+ name: string;
6
+ value: Color;
7
+ color: string;
8
+ }[];
9
+
10
+ export { COLOR_LIST as C, COLOR_PRESET as a, type Color as b };
@@ -0,0 +1,10 @@
1
+ declare const COLOR_LIST: readonly ["red", "slate", "stone", "zinc", "gray", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"];
2
+
3
+ type Color = (typeof COLOR_LIST)[number];
4
+ declare const COLOR_PRESET: {
5
+ name: string;
6
+ value: Color;
7
+ color: string;
8
+ }[];
9
+
10
+ export { COLOR_LIST as C, COLOR_PRESET as a, type Color as b };
@@ -133,6 +133,21 @@ declare const enGB: {
133
133
  "uncheck.all": string;
134
134
  "checkpoint.latest": string;
135
135
  errors: string;
136
+ "path.copy": string;
137
+ general: string;
138
+ appearance: string;
139
+ registry: string;
140
+ shortcuts: string;
141
+ account: string;
142
+ "sidebar.toggle": string;
143
+ "project.open": string;
144
+ quit: string;
145
+ duplicate: string;
146
+ copy: string;
147
+ cut: string;
148
+ paste: string;
149
+ "en-GB": string;
150
+ "fr-FR": string;
136
151
  };
137
152
 
138
153
  type Language = keyof typeof enGB;
@@ -133,6 +133,21 @@ declare const enGB: {
133
133
  "uncheck.all": string;
134
134
  "checkpoint.latest": string;
135
135
  errors: string;
136
+ "path.copy": string;
137
+ general: string;
138
+ appearance: string;
139
+ registry: string;
140
+ shortcuts: string;
141
+ account: string;
142
+ "sidebar.toggle": string;
143
+ "project.open": string;
144
+ quit: string;
145
+ duplicate: string;
146
+ copy: string;
147
+ cut: string;
148
+ paste: string;
149
+ "en-GB": string;
150
+ "fr-FR": string;
136
151
  };
137
152
 
138
153
  type Language = keyof typeof enGB;
@@ -155,13 +155,6 @@ type ProjectRequest = {
155
155
  };
156
156
 
157
157
  type AppRequest = {
158
- "app:ping": {
159
- arg: {
160
- message: string;
161
- params: unknown;
162
- };
163
- response: unknown;
164
- };
165
158
  /**
166
159
  * To get the supported version of the app (plugin) e.g. if it's in version 2
167
160
  */
@@ -171,7 +164,7 @@ type AppRequest = {
171
164
  };
172
165
  "app:language": {
173
166
  arg: null;
174
- response: string[];
167
+ response: string;
175
168
  };
176
169
  "app:icon": {
177
170
  arg: {
@@ -197,46 +190,28 @@ type GitRequests = {
197
190
  };
198
191
  "git:stage": {
199
192
  arg: {
200
- path: string;
193
+ path: string[];
201
194
  };
202
195
  response: null;
203
196
  };
204
197
  "git:unstage": {
205
198
  arg: {
206
- path: string;
199
+ path: string[];
207
200
  };
208
201
  response: null;
209
202
  };
210
- "git:stage-all": {
211
- arg: null;
212
- response: null;
213
- };
214
- "git:unstage-all": {
215
- arg: null;
216
- response: null;
217
- };
218
203
  "git:commit": {
219
204
  arg: {
220
205
  message: string;
221
206
  };
222
207
  response: null;
223
208
  };
224
- "git:checkout": {
225
- arg: {
226
- ref: string;
227
- };
228
- response: null;
229
- };
230
209
  "git:discard": {
231
210
  arg: {
232
- path: string;
211
+ path: string[];
233
212
  };
234
213
  response: null;
235
214
  };
236
- "git:discard-all": {
237
- arg: null;
238
- response: null;
239
- };
240
215
  "git:log": {
241
216
  arg: null;
242
217
  response: Commit[];
@@ -245,15 +220,10 @@ type GitRequests = {
245
220
  arg: {
246
221
  path: string;
247
222
  };
248
- response: null;
249
- };
250
- "git:push": {
251
- arg: null;
252
- response: null;
253
- };
254
- "git:pull": {
255
- arg: null;
256
- response: null;
223
+ response: {
224
+ previous: string;
225
+ current: string;
226
+ };
257
227
  };
258
228
  "git:status": {
259
229
  arg: {
@@ -272,7 +242,7 @@ type StorageRequests = {
272
242
  arg: {
273
243
  key: string;
274
244
  };
275
- response: unknown;
245
+ response: string;
276
246
  };
277
247
  "storage:setItem": {
278
248
  arg: {
@@ -299,16 +269,6 @@ type StorageRequests = {
299
269
  arg: null;
300
270
  response: number;
301
271
  };
302
- "storage:getAll": {
303
- arg: null;
304
- response: Record<string, unknown>;
305
- };
306
- "storage:key": {
307
- arg: {
308
- index: number;
309
- };
310
- response: unknown;
311
- };
312
272
  };
313
273
 
314
274
  type BBRequest = FileRequests & FolderRequest & ProjectRequest & AppRequest & GitRequests & URLRequest & StorageRequests;
@@ -155,13 +155,6 @@ type ProjectRequest = {
155
155
  };
156
156
 
157
157
  type AppRequest = {
158
- "app:ping": {
159
- arg: {
160
- message: string;
161
- params: unknown;
162
- };
163
- response: unknown;
164
- };
165
158
  /**
166
159
  * To get the supported version of the app (plugin) e.g. if it's in version 2
167
160
  */
@@ -171,7 +164,7 @@ type AppRequest = {
171
164
  };
172
165
  "app:language": {
173
166
  arg: null;
174
- response: string[];
167
+ response: string;
175
168
  };
176
169
  "app:icon": {
177
170
  arg: {
@@ -197,46 +190,28 @@ type GitRequests = {
197
190
  };
198
191
  "git:stage": {
199
192
  arg: {
200
- path: string;
193
+ path: string[];
201
194
  };
202
195
  response: null;
203
196
  };
204
197
  "git:unstage": {
205
198
  arg: {
206
- path: string;
199
+ path: string[];
207
200
  };
208
201
  response: null;
209
202
  };
210
- "git:stage-all": {
211
- arg: null;
212
- response: null;
213
- };
214
- "git:unstage-all": {
215
- arg: null;
216
- response: null;
217
- };
218
203
  "git:commit": {
219
204
  arg: {
220
205
  message: string;
221
206
  };
222
207
  response: null;
223
208
  };
224
- "git:checkout": {
225
- arg: {
226
- ref: string;
227
- };
228
- response: null;
229
- };
230
209
  "git:discard": {
231
210
  arg: {
232
- path: string;
211
+ path: string[];
233
212
  };
234
213
  response: null;
235
214
  };
236
- "git:discard-all": {
237
- arg: null;
238
- response: null;
239
- };
240
215
  "git:log": {
241
216
  arg: null;
242
217
  response: Commit[];
@@ -245,15 +220,10 @@ type GitRequests = {
245
220
  arg: {
246
221
  path: string;
247
222
  };
248
- response: null;
249
- };
250
- "git:push": {
251
- arg: null;
252
- response: null;
253
- };
254
- "git:pull": {
255
- arg: null;
256
- response: null;
223
+ response: {
224
+ previous: string;
225
+ current: string;
226
+ };
257
227
  };
258
228
  "git:status": {
259
229
  arg: {
@@ -272,7 +242,7 @@ type StorageRequests = {
272
242
  arg: {
273
243
  key: string;
274
244
  };
275
- response: unknown;
245
+ response: string;
276
246
  };
277
247
  "storage:setItem": {
278
248
  arg: {
@@ -299,16 +269,6 @@ type StorageRequests = {
299
269
  arg: null;
300
270
  response: number;
301
271
  };
302
- "storage:getAll": {
303
- arg: null;
304
- response: Record<string, unknown>;
305
- };
306
- "storage:key": {
307
- arg: {
308
- index: number;
309
- };
310
- response: unknown;
311
- };
312
272
  };
313
273
 
314
274
  type BBRequest = FileRequests & FolderRequest & ProjectRequest & AppRequest & GitRequests & URLRequest & StorageRequests;
package/dist/api.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BBEvent, a as BBRequest } from './RequestReturn-BqjZo3Nj.mjs';
2
- export { E as EventReturn, R as RequestReturn } from './RequestReturn-BqjZo3Nj.mjs';
1
+ import { B as BBEvent, a as BBRequest } from './RequestReturn-Due33X_G.mjs';
2
+ export { E as EventReturn, R as RequestReturn } from './RequestReturn-Due33X_G.mjs';
3
3
  import './url-BuGlT8dE.mjs';
4
4
  import './Project-B7IjpqOJ.mjs';
5
5
  import './PROJECT_CATEGORY-BivLHtB6.mjs';
package/dist/api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BBEvent, a as BBRequest } from './RequestReturn-DblMUa7Y.js';
2
- export { E as EventReturn, R as RequestReturn } from './RequestReturn-DblMUa7Y.js';
1
+ import { B as BBEvent, a as BBRequest } from './RequestReturn-D5Nhd4bD.js';
2
+ export { E as EventReturn, R as RequestReturn } from './RequestReturn-D5Nhd4bD.js';
3
3
  import './url-BuGlT8dE.js';
4
4
  import './Project-B_Vppjgw.js';
5
5
  import './PROJECT_CATEGORY-BivLHtB6.js';
@@ -1,4 +1,5 @@
1
1
  export { P as PROJECT_CATEGORY } from './PROJECT_CATEGORY-BivLHtB6.mjs';
2
+ export { C as COLOR_LIST, a as COLOR_PRESET } from './COLOR_PRESET-DTyA0mA2.mjs';
2
3
 
3
4
  declare const SENTINEL_FILE = ".release.commit";
4
5
 
@@ -1,4 +1,5 @@
1
1
  export { P as PROJECT_CATEGORY } from './PROJECT_CATEGORY-BivLHtB6.js';
2
+ export { C as COLOR_LIST, a as COLOR_PRESET } from './COLOR_PRESET-DTyA0mA2.js';
2
3
 
3
4
  declare const SENTINEL_FILE = ".release.commit";
4
5
 
package/dist/constant.js CHANGED
@@ -45,9 +45,61 @@ var PROJECT_CATEGORY = [
45
45
  ];
46
46
  var PROJECT_CATEGORY_default = PROJECT_CATEGORY;
47
47
 
48
+ // src/constants/COLOR_PRESET.ts
49
+ var COLOR_PRESET = [
50
+ { name: "Stone", value: "stone", color: "oklch(0.27 0.01 34)" },
51
+ { name: "Zinc", value: "zinc", color: "oklch(0.27 0.01 286)" },
52
+ { name: "Slate", value: "slate", color: "oklch(0.28 0.04 260)" },
53
+ { name: "Gray", value: "gray", color: "oklch(0.28 0.03 257)" },
54
+ { name: "Red", value: "red", color: "oklch(0.44 0.16 27)" },
55
+ { name: "Orange", value: "orange", color: "oklch(0.47 0.14 37)" },
56
+ { name: "Amber", value: "amber", color: "oklch(0.47 0.12 46)" },
57
+ { name: "Yellow", value: "yellow", color: "oklch(0.48 0.10 62)" },
58
+ { name: "Lime", value: "lime", color: "oklch(0.45 0.11 131)" },
59
+ { name: "Green", value: "green", color: "oklch(0.45 0.11 151)" },
60
+ { name: "Emerald", value: "emerald", color: "oklch(0.43 0.09 167)" },
61
+ { name: "Teal", value: "teal", color: "oklch(0.44 0.07 188)" },
62
+ { name: "Cyan", value: "cyan", color: "oklch(0.45 0.08 224)" },
63
+ { name: "Sky", value: "sky", color: "oklch(0.44 0.10 241)" },
64
+ { name: "Blue", value: "blue", color: "oklch(0.42 0.18 266)" },
65
+ { name: "Indigo", value: "indigo", color: "oklch(0.40 0.18 277)" },
66
+ { name: "Violet", value: "violet", color: "oklch(0.43 0.21 293)" },
67
+ { name: "Purple", value: "purple", color: "oklch(0.44 0.20 304)" },
68
+ { name: "Fuchsia", value: "fuchsia", color: "oklch(0.45 0.19 325)" },
69
+ { name: "Pink", value: "pink", color: "oklch(0.46 0.17 4)" },
70
+ { name: "Rose", value: "rose", color: "oklch(0.45 0.17 14)" }
71
+ ];
72
+
73
+ // src/constants/COLOR_LIST.ts
74
+ var COLOR_LIST = [
75
+ "red",
76
+ "slate",
77
+ "stone",
78
+ "zinc",
79
+ "gray",
80
+ "orange",
81
+ "amber",
82
+ "yellow",
83
+ "lime",
84
+ "green",
85
+ "emerald",
86
+ "teal",
87
+ "cyan",
88
+ "sky",
89
+ "blue",
90
+ "indigo",
91
+ "violet",
92
+ "purple",
93
+ "fuchsia",
94
+ "pink",
95
+ "rose"
96
+ ];
97
+
98
+
99
+
48
100
 
49
101
 
50
102
 
51
103
 
52
104
 
53
- exports.DATA_ALIAS = DATA_ALIAS; exports.PLUGIN_URL = PLUGIN_URL_default; exports.PROJECT_CATEGORY = PROJECT_CATEGORY_default; exports.SENTINEL_FILE = SENTINEL_FILE_default; exports.WEBSITE = WEBSITE_default;
105
+ exports.COLOR_LIST = COLOR_LIST; exports.COLOR_PRESET = COLOR_PRESET; exports.DATA_ALIAS = DATA_ALIAS; exports.PLUGIN_URL = PLUGIN_URL_default; exports.PROJECT_CATEGORY = PROJECT_CATEGORY_default; exports.SENTINEL_FILE = SENTINEL_FILE_default; exports.WEBSITE = WEBSITE_default;
package/dist/constant.mjs CHANGED
@@ -44,7 +44,59 @@ var PROJECT_CATEGORY = [
44
44
  "Other"
45
45
  ];
46
46
  var PROJECT_CATEGORY_default = PROJECT_CATEGORY;
47
+
48
+ // src/constants/COLOR_PRESET.ts
49
+ var COLOR_PRESET = [
50
+ { name: "Stone", value: "stone", color: "oklch(0.27 0.01 34)" },
51
+ { name: "Zinc", value: "zinc", color: "oklch(0.27 0.01 286)" },
52
+ { name: "Slate", value: "slate", color: "oklch(0.28 0.04 260)" },
53
+ { name: "Gray", value: "gray", color: "oklch(0.28 0.03 257)" },
54
+ { name: "Red", value: "red", color: "oklch(0.44 0.16 27)" },
55
+ { name: "Orange", value: "orange", color: "oklch(0.47 0.14 37)" },
56
+ { name: "Amber", value: "amber", color: "oklch(0.47 0.12 46)" },
57
+ { name: "Yellow", value: "yellow", color: "oklch(0.48 0.10 62)" },
58
+ { name: "Lime", value: "lime", color: "oklch(0.45 0.11 131)" },
59
+ { name: "Green", value: "green", color: "oklch(0.45 0.11 151)" },
60
+ { name: "Emerald", value: "emerald", color: "oklch(0.43 0.09 167)" },
61
+ { name: "Teal", value: "teal", color: "oklch(0.44 0.07 188)" },
62
+ { name: "Cyan", value: "cyan", color: "oklch(0.45 0.08 224)" },
63
+ { name: "Sky", value: "sky", color: "oklch(0.44 0.10 241)" },
64
+ { name: "Blue", value: "blue", color: "oklch(0.42 0.18 266)" },
65
+ { name: "Indigo", value: "indigo", color: "oklch(0.40 0.18 277)" },
66
+ { name: "Violet", value: "violet", color: "oklch(0.43 0.21 293)" },
67
+ { name: "Purple", value: "purple", color: "oklch(0.44 0.20 304)" },
68
+ { name: "Fuchsia", value: "fuchsia", color: "oklch(0.45 0.19 325)" },
69
+ { name: "Pink", value: "pink", color: "oklch(0.46 0.17 4)" },
70
+ { name: "Rose", value: "rose", color: "oklch(0.45 0.17 14)" }
71
+ ];
72
+
73
+ // src/constants/COLOR_LIST.ts
74
+ var COLOR_LIST = [
75
+ "red",
76
+ "slate",
77
+ "stone",
78
+ "zinc",
79
+ "gray",
80
+ "orange",
81
+ "amber",
82
+ "yellow",
83
+ "lime",
84
+ "green",
85
+ "emerald",
86
+ "teal",
87
+ "cyan",
88
+ "sky",
89
+ "blue",
90
+ "indigo",
91
+ "violet",
92
+ "purple",
93
+ "fuchsia",
94
+ "pink",
95
+ "rose"
96
+ ];
47
97
  export {
98
+ COLOR_LIST,
99
+ COLOR_PRESET,
48
100
  DATA_ALIAS,
49
101
  PLUGIN_URL_default as PLUGIN_URL,
50
102
  PROJECT_CATEGORY_default as PROJECT_CATEGORY,
@@ -13,6 +13,12 @@ type BaseUser = {
13
13
  avatar: string;
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
+ verified: boolean;
17
+ emailNotifications: boolean;
18
+ marketingEmails: boolean;
19
+ twoFactorEnabled: boolean;
20
+ isPublic: boolean;
21
+ syncEnabled: boolean;
16
22
  };
17
23
  type User = Wrapper<BaseUser>;
18
24
 
@@ -13,6 +13,12 @@ type BaseUser = {
13
13
  avatar: string;
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
+ verified: boolean;
17
+ emailNotifications: boolean;
18
+ marketingEmails: boolean;
19
+ twoFactorEnabled: boolean;
20
+ isPublic: boolean;
21
+ syncEnabled: boolean;
16
22
  };
17
23
  type User = Wrapper<BaseUser>;
18
24
 
package/dist/editor.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { C as Commit } from './Commit-PdsjrKSG.mjs';
2
2
  export { C as CopyArg, a as FileContent, b as FileStat, F as FolderContent, c as FolderStat, G as GitFileStatus, I as IPCResponse } from './url-BuGlT8dE.mjs';
3
- import { L as Language, a as Locale } from './Locale-D_rGwMX3.mjs';
3
+ import { L as Language, a as Locale } from './Locale-BZo4MfHK.mjs';
4
+ import { b as Color } from './COLOR_PRESET-DTyA0mA2.mjs';
4
5
  export { R as Result } from './Result-BLbZLEgX.mjs';
5
6
 
6
7
  type IconArg = {
@@ -17,21 +18,41 @@ interface MenuContent {
17
18
  onClick?: () => void;
18
19
  }
19
20
 
20
- type Nav = "file-explorer" | "checkpoints" | "plugins" | "settings" | "remote" | "dev";
21
+ type Nav = "file-explorer" | "checkpoints" | "plugins" | "settings" | "remote" | "help" | "settings" | "notifications" | "dev";
21
22
 
22
23
  type Route = "welcome" | "project" | "new-project" | "settings" | "updates";
23
24
 
25
+ declare const SHORTCUTS: Language[];
26
+
27
+ type ShortcutID = Extract<Language, (typeof SHORTCUTS)[number]>;
28
+ type Shortcut = {
29
+ id: ShortcutID;
30
+ name: string;
31
+ description: string;
32
+ keys: string[];
33
+ };
24
34
  type Settings = {
25
35
  theme: "light" | "dark" | "system";
26
36
  language?: Locale;
27
37
  sidebarWidth: number;
38
+ color: Color;
39
+ baseAppFont: number;
40
+ autoUpdate: boolean;
41
+ direction: "ltr" | "rtl";
42
+ showAllFile: boolean;
43
+ trashBehaviour: "permanent" | "trash";
44
+ shortcuts: Shortcut[];
45
+ /**
46
+ * { [fileExtension: string]: pluginId }
47
+ */
48
+ registry: Record<string, string>;
28
49
  };
29
50
 
30
51
  interface TutorialHeader {
31
52
  slug: string;
32
53
  title: string;
33
54
  tags: string[];
34
- order: number | null;
55
+ order: number;
35
56
  date: string | null;
36
57
  excerpt: string;
37
58
  filePath: string;
@@ -40,4 +61,4 @@ interface TutorialHeader {
40
61
 
41
62
  type WatchFSEvent = "updated" | "deleted" | "updated" | "add";
42
63
 
43
- export type { IconArg, MenuContent, Nav, Route, Settings, TutorialHeader, WatchFSEvent };
64
+ export { Color, type IconArg, type MenuContent, type Nav, type Route, type Settings, type Shortcut, type TutorialHeader, type WatchFSEvent };
package/dist/editor.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { C as Commit } from './Commit-PdsjrKSG.js';
2
2
  export { C as CopyArg, a as FileContent, b as FileStat, F as FolderContent, c as FolderStat, G as GitFileStatus, I as IPCResponse } from './url-BuGlT8dE.js';
3
- import { L as Language, a as Locale } from './Locale-D_rGwMX3.js';
3
+ import { L as Language, a as Locale } from './Locale-BZo4MfHK.js';
4
+ import { b as Color } from './COLOR_PRESET-DTyA0mA2.js';
4
5
  export { R as Result } from './Result-BLbZLEgX.js';
5
6
 
6
7
  type IconArg = {
@@ -17,21 +18,41 @@ interface MenuContent {
17
18
  onClick?: () => void;
18
19
  }
19
20
 
20
- type Nav = "file-explorer" | "checkpoints" | "plugins" | "settings" | "remote" | "dev";
21
+ type Nav = "file-explorer" | "checkpoints" | "plugins" | "settings" | "remote" | "help" | "settings" | "notifications" | "dev";
21
22
 
22
23
  type Route = "welcome" | "project" | "new-project" | "settings" | "updates";
23
24
 
25
+ declare const SHORTCUTS: Language[];
26
+
27
+ type ShortcutID = Extract<Language, (typeof SHORTCUTS)[number]>;
28
+ type Shortcut = {
29
+ id: ShortcutID;
30
+ name: string;
31
+ description: string;
32
+ keys: string[];
33
+ };
24
34
  type Settings = {
25
35
  theme: "light" | "dark" | "system";
26
36
  language?: Locale;
27
37
  sidebarWidth: number;
38
+ color: Color;
39
+ baseAppFont: number;
40
+ autoUpdate: boolean;
41
+ direction: "ltr" | "rtl";
42
+ showAllFile: boolean;
43
+ trashBehaviour: "permanent" | "trash";
44
+ shortcuts: Shortcut[];
45
+ /**
46
+ * { [fileExtension: string]: pluginId }
47
+ */
48
+ registry: Record<string, string>;
28
49
  };
29
50
 
30
51
  interface TutorialHeader {
31
52
  slug: string;
32
53
  title: string;
33
54
  tags: string[];
34
- order: number | null;
55
+ order: number;
35
56
  date: string | null;
36
57
  excerpt: string;
37
58
  filePath: string;
@@ -40,4 +61,4 @@ interface TutorialHeader {
40
61
 
41
62
  type WatchFSEvent = "updated" | "deleted" | "updated" | "add";
42
63
 
43
- export type { IconArg, MenuContent, Nav, Route, Settings, TutorialHeader, WatchFSEvent };
64
+ export { Color, type IconArg, type MenuContent, type Nav, type Route, type Settings, type Shortcut, type TutorialHeader, type WatchFSEvent };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { B as BBEvent, E as EventReturn, a as BBRequest, R as RequestReturn } from './RequestReturn-BqjZo3Nj.mjs';
1
+ import { B as BBEvent, E as EventReturn, a as BBRequest, R as RequestReturn } from './RequestReturn-Due33X_G.mjs';
2
2
  import { a as FileContent } from './url-BuGlT8dE.mjs';
3
3
  export { R as Result } from './Result-BLbZLEgX.mjs';
4
4
  import { P as Plugin } from './Plugin-BMoQ48uq.mjs';
@@ -28,7 +28,7 @@ declare class BBRelay {
28
28
  */
29
29
  declare function injectStyles(css: string): () => void;
30
30
 
31
- type Permission = "file-system" | "storage" | "project" | "url" | "selection" | "token";
31
+ type Permission = "file-system" | "storage" | "project" | "url" | "selection" | "git" | "token";
32
32
  type Manifest = {
33
33
  id: string;
34
34
  name: string;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { B as BBEvent, E as EventReturn, a as BBRequest, R as RequestReturn } from './RequestReturn-DblMUa7Y.js';
1
+ import { B as BBEvent, E as EventReturn, a as BBRequest, R as RequestReturn } from './RequestReturn-D5Nhd4bD.js';
2
2
  import { a as FileContent } from './url-BuGlT8dE.js';
3
3
  export { R as Result } from './Result-BLbZLEgX.js';
4
4
  import { P as Plugin } from './Plugin-BojCB5ZJ.js';
@@ -28,7 +28,7 @@ declare class BBRelay {
28
28
  */
29
29
  declare function injectStyles(css: string): () => void;
30
30
 
31
- type Permission = "file-system" | "storage" | "project" | "url" | "selection" | "token";
31
+ type Permission = "file-system" | "storage" | "project" | "url" | "selection" | "git" | "token";
32
32
  type Manifest = {
33
33
  id: string;
34
34
  name: string;
package/dist/locale.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { L as Language } from './Locale-D_rGwMX3.mjs';
2
- export { a as Locale, e as enGB } from './Locale-D_rGwMX3.mjs';
1
+ import { L as Language } from './Locale-BZo4MfHK.mjs';
2
+ export { a as Locale, e as enGB } from './Locale-BZo4MfHK.mjs';
3
3
 
4
4
  declare const frFR: {
5
5
  [key in Language]: string;
package/dist/locale.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { L as Language } from './Locale-D_rGwMX3.js';
2
- export { a as Locale, e as enGB } from './Locale-D_rGwMX3.js';
1
+ import { L as Language } from './Locale-BZo4MfHK.js';
2
+ export { a as Locale, e as enGB } from './Locale-BZo4MfHK.js';
3
3
 
4
4
  declare const frFR: {
5
5
  [key in Language]: string;
package/dist/locale.js CHANGED
@@ -133,7 +133,22 @@ var enGB = {
133
133
  "check.all": "Check all",
134
134
  "uncheck.all": "Uncheck all",
135
135
  "checkpoint.latest": "Go back to latest",
136
- errors: "Errors"
136
+ errors: "Errors",
137
+ "path.copy": "Copy Path",
138
+ general: "General",
139
+ appearance: "Appearance",
140
+ registry: "Registry",
141
+ shortcuts: "Shortcuts",
142
+ account: "Account",
143
+ "sidebar.toggle": "Toggle Sidebar",
144
+ "project.open": "Open Project",
145
+ quit: "Quit",
146
+ duplicate: "Duplicate",
147
+ copy: "Copy",
148
+ cut: "Cut",
149
+ paste: "Paste",
150
+ "en-GB": "English (UK)",
151
+ "fr-FR": "French (France)"
137
152
  };
138
153
  var en_GB_default = enGB;
139
154
 
@@ -272,7 +287,22 @@ var frFR = {
272
287
  "check.all": "Tout cocher",
273
288
  "uncheck.all": "Tout d\xE9cocher",
274
289
  "checkpoint.latest": "Revenir au dernier point de contr\xF4le",
275
- errors: "Erreurs"
290
+ errors: "Erreurs",
291
+ "path.copy": "Copier le chemin",
292
+ general: "G\xE9n\xE9ral",
293
+ appearance: "Apparence",
294
+ registry: "Registre",
295
+ shortcuts: "Couches",
296
+ account: "Compte",
297
+ "sidebar.toggle": "Basculer la barre lat\xE9rale",
298
+ "project.open": "Ouvrir un projet",
299
+ quit: "Quitter",
300
+ duplicate: "Dupliquer",
301
+ copy: "Copier",
302
+ cut: "Couper",
303
+ paste: "Coller",
304
+ "en-GB": "Anglais (UK)",
305
+ "fr-FR": "Fran\xE7ais (France)"
276
306
  };
277
307
  var fr_FR_default = frFR;
278
308
 
package/dist/locale.mjs CHANGED
@@ -133,7 +133,22 @@ var enGB = {
133
133
  "check.all": "Check all",
134
134
  "uncheck.all": "Uncheck all",
135
135
  "checkpoint.latest": "Go back to latest",
136
- errors: "Errors"
136
+ errors: "Errors",
137
+ "path.copy": "Copy Path",
138
+ general: "General",
139
+ appearance: "Appearance",
140
+ registry: "Registry",
141
+ shortcuts: "Shortcuts",
142
+ account: "Account",
143
+ "sidebar.toggle": "Toggle Sidebar",
144
+ "project.open": "Open Project",
145
+ quit: "Quit",
146
+ duplicate: "Duplicate",
147
+ copy: "Copy",
148
+ cut: "Cut",
149
+ paste: "Paste",
150
+ "en-GB": "English (UK)",
151
+ "fr-FR": "French (France)"
137
152
  };
138
153
  var en_GB_default = enGB;
139
154
 
@@ -272,7 +287,22 @@ var frFR = {
272
287
  "check.all": "Tout cocher",
273
288
  "uncheck.all": "Tout d\xE9cocher",
274
289
  "checkpoint.latest": "Revenir au dernier point de contr\xF4le",
275
- errors: "Erreurs"
290
+ errors: "Erreurs",
291
+ "path.copy": "Copier le chemin",
292
+ general: "G\xE9n\xE9ral",
293
+ appearance: "Apparence",
294
+ registry: "Registre",
295
+ shortcuts: "Couches",
296
+ account: "Compte",
297
+ "sidebar.toggle": "Basculer la barre lat\xE9rale",
298
+ "project.open": "Ouvrir un projet",
299
+ quit: "Quitter",
300
+ duplicate: "Dupliquer",
301
+ copy: "Copier",
302
+ cut: "Couper",
303
+ paste: "Coller",
304
+ "en-GB": "Anglais (UK)",
305
+ "fr-FR": "Fran\xE7ais (France)"
276
306
  };
277
307
  var fr_FR_default = frFR;
278
308
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bb-relay",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "description": "For managing bb-editor extension",
5
5
  "license": "ISC",
6
6
  "author": "Ade Adeola",
package/src/constant.ts CHANGED
@@ -3,5 +3,15 @@ import WEBSITE from "./constants/WEBSITE";
3
3
  import { DATA_ALIAS } from "./constants/DATA_ALIAS";
4
4
  import PLUGIN_URL from "./constants/PLUGIN_URL";
5
5
  import PROJECT_CATEGORY from "./constants/PROJECT_CATEGORY";
6
+ import { COLOR_PRESET } from "./constants/COLOR_PRESET";
7
+ import { COLOR_LIST } from "./constants/COLOR_LIST";
6
8
 
7
- export { SENTINEL_FILE, WEBSITE, DATA_ALIAS, PLUGIN_URL, PROJECT_CATEGORY };
9
+ export {
10
+ SENTINEL_FILE,
11
+ WEBSITE,
12
+ DATA_ALIAS,
13
+ PLUGIN_URL,
14
+ PROJECT_CATEGORY,
15
+ COLOR_LIST,
16
+ COLOR_PRESET,
17
+ };
@@ -0,0 +1,23 @@
1
+ export const COLOR_LIST = [
2
+ "red",
3
+ "slate",
4
+ "stone",
5
+ "zinc",
6
+ "gray",
7
+ "orange",
8
+ "amber",
9
+ "yellow",
10
+ "lime",
11
+ "green",
12
+ "emerald",
13
+ "teal",
14
+ "cyan",
15
+ "sky",
16
+ "blue",
17
+ "indigo",
18
+ "violet",
19
+ "purple",
20
+ "fuchsia",
21
+ "pink",
22
+ "rose",
23
+ ] as const;
@@ -0,0 +1,33 @@
1
+ import { COLOR_LIST } from "./COLOR_LIST";
2
+
3
+ type Color = (typeof COLOR_LIST)[number];
4
+
5
+ export const COLOR_PRESET: {
6
+ name: string;
7
+ value: Color;
8
+ color: string;
9
+ }[] = [
10
+ { name: "Stone", value: "stone", color: "oklch(0.27 0.01 34)" },
11
+ { name: "Zinc", value: "zinc", color: "oklch(0.27 0.01 286)" },
12
+ { name: "Slate", value: "slate", color: "oklch(0.28 0.04 260)" },
13
+ { name: "Gray", value: "gray", color: "oklch(0.28 0.03 257)" },
14
+ { name: "Red", value: "red", color: "oklch(0.44 0.16 27)" },
15
+ { name: "Orange", value: "orange", color: "oklch(0.47 0.14 37)" },
16
+ { name: "Amber", value: "amber", color: "oklch(0.47 0.12 46)" },
17
+ { name: "Yellow", value: "yellow", color: "oklch(0.48 0.10 62)" },
18
+ { name: "Lime", value: "lime", color: "oklch(0.45 0.11 131)" },
19
+ { name: "Green", value: "green", color: "oklch(0.45 0.11 151)" },
20
+ { name: "Emerald", value: "emerald", color: "oklch(0.43 0.09 167)" },
21
+ { name: "Teal", value: "teal", color: "oklch(0.44 0.07 188)" },
22
+ { name: "Cyan", value: "cyan", color: "oklch(0.45 0.08 224)" },
23
+ { name: "Sky", value: "sky", color: "oklch(0.44 0.10 241)" },
24
+ { name: "Blue", value: "blue", color: "oklch(0.42 0.18 266)" },
25
+ { name: "Indigo", value: "indigo", color: "oklch(0.40 0.18 277)" },
26
+ { name: "Violet", value: "violet", color: "oklch(0.43 0.21 293)" },
27
+ { name: "Purple", value: "purple", color: "oklch(0.44 0.20 304)" },
28
+ { name: "Fuchsia", value: "fuchsia", color: "oklch(0.45 0.19 325)" },
29
+ { name: "Pink", value: "pink", color: "oklch(0.46 0.17 4)" },
30
+ { name: "Rose", value: "rose", color: "oklch(0.45 0.17 14)" },
31
+ ] as const;
32
+
33
+ export default Color;
package/src/editor.ts CHANGED
@@ -7,13 +7,14 @@ import IconArg from "./types/editor/IconArg";
7
7
  import { MenuContent } from "./types/editor/MenuContent";
8
8
  import Nav from "./types/editor/Nav";
9
9
  import { Route } from "./types/editor/Route";
10
- import { Settings } from "./types/editor/Settings";
10
+ import { Settings, Shortcut } from "./types/editor/Settings";
11
11
  import { TutorialHeader } from "./types/editor/TutorialHeader";
12
12
  import { WatchFSEvent } from "./types/editor/WatchFSEvent";
13
13
  import FileStat from "./types/requests/file/FileStat";
14
14
  import Result from "./types/editor/Result";
15
15
  import { FolderStat } from "./types/requests/folder/FolderStat";
16
16
  import { IPCResponse } from "./types/requests/url";
17
+ import Color from "./constants/COLOR_PRESET";
17
18
 
18
19
  export type {
19
20
  Commit,
@@ -32,4 +33,6 @@ export type {
32
33
  FolderStat,
33
34
  Result,
34
35
  IPCResponse,
36
+ Shortcut,
37
+ Color,
35
38
  };
@@ -142,6 +142,21 @@ export const enGB = {
142
142
  "uncheck.all": "Uncheck all",
143
143
  "checkpoint.latest": "Go back to latest",
144
144
  errors: "Errors",
145
+ "path.copy": "Copy Path",
146
+ general: "General",
147
+ appearance: "Appearance",
148
+ registry: "Registry",
149
+ shortcuts: "Shortcuts",
150
+ account: "Account",
151
+ "sidebar.toggle": "Toggle Sidebar",
152
+ "project.open": "Open Project",
153
+ quit: "Quit",
154
+ duplicate: "Duplicate",
155
+ copy: "Copy",
156
+ cut: "Cut",
157
+ paste: "Paste",
158
+ "en-GB": "English (UK)",
159
+ "fr-FR": "French (France)",
145
160
  };
146
161
 
147
162
  export default enGB;
@@ -145,6 +145,21 @@ export const frFR: { [key in Language]: string } = {
145
145
  "uncheck.all": "Tout décocher",
146
146
  "checkpoint.latest": "Revenir au dernier point de contrôle",
147
147
  errors: "Erreurs",
148
+ "path.copy": "Copier le chemin",
149
+ general: "Général",
150
+ appearance: "Apparence",
151
+ registry: "Registre",
152
+ shortcuts: "Couches",
153
+ account: "Compte",
154
+ "sidebar.toggle": "Basculer la barre latérale",
155
+ "project.open": "Ouvrir un projet",
156
+ quit: "Quitter",
157
+ duplicate: "Dupliquer",
158
+ copy: "Copier",
159
+ cut: "Couper",
160
+ paste: "Coller",
161
+ "en-GB": "Anglais (UK)",
162
+ "fr-FR": "Français (France)",
148
163
  };
149
164
 
150
165
  export default frFR;
@@ -9,6 +9,12 @@ export type BaseUser = {
9
9
  avatar: string;
10
10
  createdAt: string;
11
11
  updatedAt: string;
12
+ verified: boolean;
13
+ emailNotifications: boolean;
14
+ marketingEmails: boolean;
15
+ twoFactorEnabled: boolean;
16
+ isPublic: boolean;
17
+ syncEnabled: boolean;
12
18
  };
13
19
 
14
20
  export type User = Wrapper<BaseUser>;
@@ -6,6 +6,7 @@ type Permission =
6
6
  | "project"
7
7
  | "url"
8
8
  | "selection"
9
+ | "git"
9
10
  | "token";
10
11
 
11
12
  export type Manifest = {
@@ -4,6 +4,9 @@ type Nav =
4
4
  | "plugins"
5
5
  | "settings"
6
6
  | "remote"
7
+ | "help"
8
+ | "settings"
9
+ | "notifications"
7
10
  | "dev";
8
11
 
9
12
  export default Nav;
@@ -1,7 +1,45 @@
1
- import Locale from "./Locale"
1
+ import Language from "./Language";
2
+ import Locale from "./Locale";
3
+ import { Color } from "@/editor";
4
+
5
+ const SHORTCUTS: Language[] = [
6
+ "file.new",
7
+ "folder.new",
8
+ "sidebar.toggle",
9
+ "project.new",
10
+ "project.open",
11
+ "quit",
12
+ "duplicate",
13
+ "copy",
14
+ "cut",
15
+ "paste",
16
+ "file.location.open",
17
+ ] as const;
18
+
19
+ export default SHORTCUTS;
20
+
21
+ export type ShortcutID = Extract<Language, (typeof SHORTCUTS)[number]>;
22
+
23
+ export type Shortcut = {
24
+ id: ShortcutID;
25
+ name: string;
26
+ description: string;
27
+ keys: string[];
28
+ };
2
29
 
3
30
  export type Settings = {
4
- theme: "light" | "dark" | "system"
5
- language?: Locale
6
- sidebarWidth: number
7
- }
31
+ theme: "light" | "dark" | "system";
32
+ language?: Locale;
33
+ sidebarWidth: number;
34
+ color: Color;
35
+ baseAppFont: number;
36
+ autoUpdate: boolean;
37
+ direction: "ltr" | "rtl";
38
+ showAllFile: boolean;
39
+ trashBehaviour: "permanent" | "trash";
40
+ shortcuts: Shortcut[];
41
+ /**
42
+ * { [fileExtension: string]: pluginId }
43
+ */
44
+ registry: Record<string, string>;
45
+ };
@@ -1,10 +1,10 @@
1
- export interface TutorialHeader {
2
- slug: string
3
- title: string
4
- tags: string[]
5
- order: number | null
6
- date: string | null
7
- excerpt: string
8
- filePath: string
9
- body: string
10
- }
1
+ export interface TutorialHeader {
2
+ slug: string;
3
+ title: string;
4
+ tags: string[];
5
+ order: number;
6
+ date: string | null;
7
+ excerpt: string;
8
+ filePath: string;
9
+ body: string;
10
+ }
@@ -1,8 +1,8 @@
1
1
  export type AppRequest = {
2
- "app:ping": {
3
- arg: { message: string; params: unknown };
4
- response: unknown;
5
- };
2
+ // "app:ping": {
3
+ // arg: { message: string; params: unknown };
4
+ // response: unknown;
5
+ // };
6
6
  /**
7
7
  * To get the supported version of the app (plugin) e.g. if it's in version 2
8
8
  */
@@ -12,7 +12,7 @@ export type AppRequest = {
12
12
  };
13
13
  "app:language": {
14
14
  arg: null;
15
- response: string[];
15
+ response: string;
16
16
  };
17
17
  "app:icon": {
18
18
  arg: { extensionId: string; isFolder?: boolean };
@@ -6,35 +6,19 @@ export type GitRequests = {
6
6
  response: null;
7
7
  };
8
8
  "git:stage": {
9
- arg: { path: string };
9
+ arg: { path: string[] };
10
10
  response: null;
11
11
  };
12
12
  "git:unstage": {
13
- arg: { path: string };
14
- response: null;
15
- };
16
- "git:stage-all": {
17
- arg: null;
18
- response: null;
19
- };
20
- "git:unstage-all": {
21
- arg: null;
13
+ arg: { path: string[] };
22
14
  response: null;
23
15
  };
24
16
  "git:commit": {
25
17
  arg: { message: string };
26
18
  response: null;
27
19
  };
28
- "git:checkout": {
29
- arg: { ref: string };
30
- response: null;
31
- };
32
20
  "git:discard": {
33
- arg: { path: string };
34
- response: null;
35
- };
36
- "git:discard-all": {
37
- arg: null;
21
+ arg: { path: string[] };
38
22
  response: null;
39
23
  };
40
24
  "git:log": {
@@ -43,15 +27,10 @@ export type GitRequests = {
43
27
  };
44
28
  "git:diff": {
45
29
  arg: { path: string };
46
- response: null;
47
- };
48
- "git:push": {
49
- arg: null;
50
- response: null;
51
- };
52
- "git:pull": {
53
- arg: null;
54
- response: null;
30
+ response: {
31
+ previous: string;
32
+ current: string;
33
+ };
55
34
  };
56
35
  "git:status": {
57
36
  arg: { path: string };
@@ -1,7 +1,7 @@
1
1
  export type StorageRequests = {
2
2
  "storage:getItem": {
3
3
  arg: { key: string };
4
- response: unknown;
4
+ response: string;
5
5
  };
6
6
  "storage:setItem": {
7
7
  arg: { key: string; value: string };
@@ -23,12 +23,4 @@ export type StorageRequests = {
23
23
  arg: null;
24
24
  response: number;
25
25
  };
26
- "storage:getAll": {
27
- arg: null;
28
- response: Record<string, unknown>;
29
- };
30
- "storage:key": {
31
- arg: { index: number };
32
- response: unknown;
33
- };
34
26
  };