@widgetic/editor 4.1.11 → 4.1.12
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/components/WidgetPreview.svelte +1 -1
- package/dist/components/editors/CompositionEditorApp.svelte +229 -2
- package/dist/components/editors/CompositionEditorApp.svelte.d.ts +27 -2
- package/dist/components/editors/EditLeaseNotice.svelte +150 -0
- package/dist/components/editors/EditLeaseNotice.svelte.d.ts +25 -0
- package/dist/composition/compositionApi.d.ts +80 -1
- package/dist/composition/compositionApi.js +132 -7
- package/dist/composition/compositionEditorController.d.ts +106 -6
- package/dist/composition/compositionEditorController.js +211 -27
- package/dist/composition/compositionHelpers.d.ts +10 -0
- package/dist/composition/compositionHelpers.js +23 -0
- package/dist/composition/editLeaseController.d.ts +157 -0
- package/dist/composition/editLeaseController.js +441 -0
- package/dist/i18n/language.d.ts +28 -0
- package/dist/i18n/messages.d.ts +56 -0
- package/dist/i18n/messages.js +58 -0
- package/dist/i18n/translate.d.ts +1 -1
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who is editing this composition right now, as one open editor lives it: the claim this tab keeps while it edits, and
|
|
3
|
+
* what it does when somebody else holds it. No user interface in it, and no dependency but the API's answers, so a test
|
|
4
|
+
* can drive it with a fake port and fake timers.
|
|
5
|
+
*
|
|
6
|
+
* It is presence, never a lock. The rules that keep it harmless:
|
|
7
|
+
*
|
|
8
|
+
* - Nothing here can make a save fail or take edits away. The only thing it does to the editor is ask it to stop
|
|
9
|
+
* taking NEW edits (`editsBlocked`) while a teammate holds the claim; everything edited before is still saved.
|
|
10
|
+
* - Every doubt means "edit freely". The API cannot tell, the network is down, the composition has no presence
|
|
11
|
+
* (a personal one), the person may not write to it, the answer is unreadable: the editor behaves as if this feature
|
|
12
|
+
* did not exist, and tries again later (or, when the API refused for good, never).
|
|
13
|
+
* - The person always decides. When somebody else holds the claim the person may take over (their claim replaces the
|
|
14
|
+
* other's at once), or look only. Nobody is ever locked out: a claim that is not renewed ends by itself, and a
|
|
15
|
+
* take-over is always one click away.
|
|
16
|
+
* - A claim belongs to a tab (`sessionId`), not to a person: the same person in two windows is two holders, and the
|
|
17
|
+
* second window is told so ("you are editing this in another window").
|
|
18
|
+
* - A claim is kept up only while the tab is on screen. A tab left in the background all day does not keep a
|
|
19
|
+
* teammate out: its claim runs out after the time the API gave, and when the person comes back the tab asks again,
|
|
20
|
+
* and says so if somebody else has begun editing meanwhile.
|
|
21
|
+
* - One request at a time. A renewal never overlaps another call; a choice the person makes cancels the call on its
|
|
22
|
+
* way, and the answer of a cancelled call is ignored.
|
|
23
|
+
* - A claim is given up as soon as the editor closes (`dispose`) or the page goes (`pagehide`), with a request that
|
|
24
|
+
* outlives the page, so a teammate does not wait for it to run out.
|
|
25
|
+
* - After `dispose()` nothing more happens: no request goes out, and answers still on their way are ignored.
|
|
26
|
+
*/
|
|
27
|
+
import { createRandomIdempotencyKey } from './compositionApi.js';
|
|
28
|
+
/** How often to renew a claim when the API has not said (it says, with every answer). */
|
|
29
|
+
export const DEFAULT_HEARTBEAT_MS = 20_000;
|
|
30
|
+
/** The API's word is believed within these limits: a renewal more often than this is a flood, less often lets the claim run out. */
|
|
31
|
+
const MIN_HEARTBEAT_MS = 5_000;
|
|
32
|
+
const MAX_HEARTBEAT_MS = 120_000;
|
|
33
|
+
/** A tab that returns to the screen asks at once, unless it was answered this recently (one wake-up often reaches a page twice). */
|
|
34
|
+
const WAKE_MIN_GAP_MS = 3_000;
|
|
35
|
+
/** After failures the wait grows by one heartbeat each time, up to this many extra: a network that is down is not hammered. */
|
|
36
|
+
const MAX_BACKOFF_STEPS = 3;
|
|
37
|
+
/** What a failed call told, from the error the API client throws (`CompositionApiError`), without depending on the class. */
|
|
38
|
+
function describeFailure(error) {
|
|
39
|
+
const record = typeof error === 'object' && error !== null ? error : {};
|
|
40
|
+
return {
|
|
41
|
+
status: typeof record.status === 'number' ? record.status : 0,
|
|
42
|
+
code: typeof record.code === 'string' ? record.code : ''
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function clampHeartbeat(milliseconds) {
|
|
46
|
+
return Math.min(MAX_HEARTBEAT_MS, Math.max(MIN_HEARTBEAT_MS, milliseconds));
|
|
47
|
+
}
|
|
48
|
+
/** The browser's own environment; one that does nothing where there is no page (a server, a test). */
|
|
49
|
+
export function createBrowserPresenceEnvironment() {
|
|
50
|
+
const hasDocument = typeof document !== 'undefined';
|
|
51
|
+
const hasWindow = typeof window !== 'undefined';
|
|
52
|
+
return {
|
|
53
|
+
isVisible: () => !hasDocument || document.visibilityState !== 'hidden',
|
|
54
|
+
onWake(callback) {
|
|
55
|
+
if (!hasDocument || !hasWindow)
|
|
56
|
+
return () => { };
|
|
57
|
+
const onVisibilityChange = () => {
|
|
58
|
+
if (document.visibilityState === 'visible')
|
|
59
|
+
callback();
|
|
60
|
+
};
|
|
61
|
+
// A page restored from the back-forward cache comes back with its timers stopped and its claim given up.
|
|
62
|
+
const onPageShow = (event) => {
|
|
63
|
+
if (event.persisted)
|
|
64
|
+
callback();
|
|
65
|
+
};
|
|
66
|
+
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
67
|
+
window.addEventListener('online', callback);
|
|
68
|
+
window.addEventListener('pageshow', onPageShow);
|
|
69
|
+
return () => {
|
|
70
|
+
document.removeEventListener('visibilitychange', onVisibilityChange);
|
|
71
|
+
window.removeEventListener('online', callback);
|
|
72
|
+
window.removeEventListener('pageshow', onPageShow);
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
onPageHide(callback) {
|
|
76
|
+
if (!hasWindow)
|
|
77
|
+
return () => { };
|
|
78
|
+
window.addEventListener('pagehide', callback);
|
|
79
|
+
return () => window.removeEventListener('pagehide', callback);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const DEFAULT_TIMERS = {
|
|
84
|
+
setTimeout: (callback, milliseconds) => globalThis.setTimeout(callback, milliseconds),
|
|
85
|
+
clearTimeout: (handle) => globalThis.clearTimeout(handle)
|
|
86
|
+
};
|
|
87
|
+
/** The state of a tab with no presence: nothing is shown and nothing is blocked. What a page starts from, before the API has said. */
|
|
88
|
+
export const NO_PRESENCE = Object.freeze({
|
|
89
|
+
phase: 'off',
|
|
90
|
+
holder: null,
|
|
91
|
+
lostIt: false,
|
|
92
|
+
nobodyIsEditing: false,
|
|
93
|
+
working: false,
|
|
94
|
+
actionFailed: false,
|
|
95
|
+
editsBlocked: false
|
|
96
|
+
});
|
|
97
|
+
function initialState() {
|
|
98
|
+
return { ...NO_PRESENCE };
|
|
99
|
+
}
|
|
100
|
+
/** `editsBlocked` follows the phase and nothing else, so the two can never disagree. */
|
|
101
|
+
function withDerived(state) {
|
|
102
|
+
return { ...state, editsBlocked: state.phase === 'blocked' || state.phase === 'readOnly' };
|
|
103
|
+
}
|
|
104
|
+
export class EditLeaseController {
|
|
105
|
+
state = initialState();
|
|
106
|
+
stateListeners = new Set();
|
|
107
|
+
port;
|
|
108
|
+
sessionId;
|
|
109
|
+
timers;
|
|
110
|
+
now;
|
|
111
|
+
environment;
|
|
112
|
+
logger;
|
|
113
|
+
heartbeatMs;
|
|
114
|
+
timerHandle = null;
|
|
115
|
+
inFlight = null;
|
|
116
|
+
/** Which call is the current one: the answer of an older call is ignored. */
|
|
117
|
+
generation = 0;
|
|
118
|
+
started = false;
|
|
119
|
+
/** The API refused for good (or said there is no presence): no more requests. */
|
|
120
|
+
stopped = false;
|
|
121
|
+
disposed = false;
|
|
122
|
+
/** This tab holds the claim as far as it knows, so it must give it up when it goes. */
|
|
123
|
+
holding = false;
|
|
124
|
+
failureStreak = 0;
|
|
125
|
+
lastAnswerAt = Number.NEGATIVE_INFINITY;
|
|
126
|
+
removeWakeListener = null;
|
|
127
|
+
removeHideListener = null;
|
|
128
|
+
constructor(options) {
|
|
129
|
+
this.port = options.port;
|
|
130
|
+
this.sessionId = options.sessionId ?? createRandomIdempotencyKey();
|
|
131
|
+
this.heartbeatMs = clampHeartbeat(options.heartbeatMs ?? DEFAULT_HEARTBEAT_MS);
|
|
132
|
+
this.timers = options.timers ?? DEFAULT_TIMERS;
|
|
133
|
+
this.now = options.now ?? Date.now;
|
|
134
|
+
this.environment = options.environment ?? createBrowserPresenceEnvironment();
|
|
135
|
+
this.logger = options.logger ?? console;
|
|
136
|
+
}
|
|
137
|
+
// ---------------------------------------------------------------------------------------------
|
|
138
|
+
// Watching
|
|
139
|
+
// ---------------------------------------------------------------------------------------------
|
|
140
|
+
/** The state now. It is never changed in place: a change makes a new object. */
|
|
141
|
+
getState() {
|
|
142
|
+
return this.state;
|
|
143
|
+
}
|
|
144
|
+
/** Svelte store contract: calls `listener` with the state now, and again after every change. */
|
|
145
|
+
subscribe(listener) {
|
|
146
|
+
this.stateListeners.add(listener);
|
|
147
|
+
listener(this.state);
|
|
148
|
+
return () => {
|
|
149
|
+
this.stateListeners.delete(listener);
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/** The id of this tab, as the API knows it. */
|
|
153
|
+
get tabId() {
|
|
154
|
+
return this.sessionId;
|
|
155
|
+
}
|
|
156
|
+
// ---------------------------------------------------------------------------------------------
|
|
157
|
+
// Starting and the person's choices
|
|
158
|
+
// ---------------------------------------------------------------------------------------------
|
|
159
|
+
/** Asks to edit, and keeps asking while the tab is open. Asking again does nothing. */
|
|
160
|
+
start() {
|
|
161
|
+
if (this.started || this.disposed)
|
|
162
|
+
return;
|
|
163
|
+
this.started = true;
|
|
164
|
+
this.removeWakeListener = this.environment.onWake(() => this.wake());
|
|
165
|
+
this.removeHideListener = this.environment.onPageHide(() => this.releaseClaim());
|
|
166
|
+
this.beat();
|
|
167
|
+
}
|
|
168
|
+
/** The person chose to take the claim from whoever holds it. Only from `blocked` and `readOnly`. */
|
|
169
|
+
takeOver() {
|
|
170
|
+
if (!this.canChoose() || (this.state.phase !== 'blocked' && this.state.phase !== 'readOnly')) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
this.patch({ working: true, actionFailed: false });
|
|
174
|
+
void this.call('takeOver');
|
|
175
|
+
}
|
|
176
|
+
/** The person chose to only look, for now. Only from `blocked`. */
|
|
177
|
+
openReadOnly() {
|
|
178
|
+
if (!this.canChoose() || this.state.phase !== 'blocked')
|
|
179
|
+
return;
|
|
180
|
+
this.patch({ phase: 'readOnly', lostIt: false, nobodyIsEditing: false, actionFailed: false });
|
|
181
|
+
void this.call('look');
|
|
182
|
+
}
|
|
183
|
+
/** The person chose to begin editing after looking. Only from `readOnly`. */
|
|
184
|
+
startEditing() {
|
|
185
|
+
if (!this.canChoose() || this.state.phase !== 'readOnly')
|
|
186
|
+
return;
|
|
187
|
+
this.patch({ working: true, actionFailed: false });
|
|
188
|
+
void this.call('startEditing');
|
|
189
|
+
}
|
|
190
|
+
canChoose() {
|
|
191
|
+
return this.started && !this.disposed && !this.stopped;
|
|
192
|
+
}
|
|
193
|
+
// ---------------------------------------------------------------------------------------------
|
|
194
|
+
// Ending
|
|
195
|
+
// ---------------------------------------------------------------------------------------------
|
|
196
|
+
/** Stops everything, gives the claim up, and ignores any answer still on its way. */
|
|
197
|
+
dispose() {
|
|
198
|
+
if (this.disposed)
|
|
199
|
+
return;
|
|
200
|
+
this.disposed = true;
|
|
201
|
+
this.clearTimer();
|
|
202
|
+
this.inFlight?.abort();
|
|
203
|
+
this.inFlight = null;
|
|
204
|
+
this.removeWakeListener?.();
|
|
205
|
+
this.removeHideListener?.();
|
|
206
|
+
this.releaseClaim();
|
|
207
|
+
this.stateListeners.clear();
|
|
208
|
+
}
|
|
209
|
+
// ---------------------------------------------------------------------------------------------
|
|
210
|
+
// The calls
|
|
211
|
+
// ---------------------------------------------------------------------------------------------
|
|
212
|
+
/** The renewal the timer asks for: only while the tab is on screen (a hidden tab's claim is left to run out). */
|
|
213
|
+
beat() {
|
|
214
|
+
if (this.disposed || this.stopped)
|
|
215
|
+
return;
|
|
216
|
+
if (!this.environment.isVisible()) {
|
|
217
|
+
this.scheduleBeat();
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
void this.call('beat');
|
|
221
|
+
}
|
|
222
|
+
/** The tab came back to the screen (or the network did): ask at once instead of waiting for the timer. */
|
|
223
|
+
wake() {
|
|
224
|
+
if (this.disposed || this.stopped || !this.started)
|
|
225
|
+
return;
|
|
226
|
+
if (!this.environment.isVisible())
|
|
227
|
+
return;
|
|
228
|
+
if (this.now() - this.lastAnswerAt < WAKE_MIN_GAP_MS)
|
|
229
|
+
return;
|
|
230
|
+
void this.call('beat');
|
|
231
|
+
}
|
|
232
|
+
async call(kind) {
|
|
233
|
+
if (this.disposed || this.stopped)
|
|
234
|
+
return;
|
|
235
|
+
if (this.inFlight) {
|
|
236
|
+
// A renewal never overlaps another call; a choice of the person takes the place of the one on its way.
|
|
237
|
+
if (kind === 'beat')
|
|
238
|
+
return;
|
|
239
|
+
this.inFlight.abort();
|
|
240
|
+
}
|
|
241
|
+
this.clearTimer();
|
|
242
|
+
const generation = ++this.generation;
|
|
243
|
+
const controller = new AbortController();
|
|
244
|
+
this.inFlight = controller;
|
|
245
|
+
try {
|
|
246
|
+
const answer = await this.send(kind, controller.signal);
|
|
247
|
+
if (this.disposed || generation !== this.generation)
|
|
248
|
+
return;
|
|
249
|
+
this.apply(kind, answer);
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
if (this.disposed || generation !== this.generation)
|
|
253
|
+
return;
|
|
254
|
+
this.fail(kind, error);
|
|
255
|
+
}
|
|
256
|
+
finally {
|
|
257
|
+
if (generation === this.generation) {
|
|
258
|
+
this.inFlight = null;
|
|
259
|
+
this.scheduleBeat();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
send(kind, signal) {
|
|
264
|
+
switch (kind) {
|
|
265
|
+
case 'takeOver':
|
|
266
|
+
return this.port.takeOver(this.sessionId, { signal });
|
|
267
|
+
case 'startEditing':
|
|
268
|
+
return this.port.acquire(this.sessionId, { signal });
|
|
269
|
+
case 'look':
|
|
270
|
+
return this.port.peek({ signal });
|
|
271
|
+
default:
|
|
272
|
+
// A tab that only looks asks who is editing; one that edits (or is asked to wait) asks to edit.
|
|
273
|
+
return this.state.phase === 'readOnly'
|
|
274
|
+
? this.port.peek({ signal })
|
|
275
|
+
: this.port.acquire(this.sessionId, { signal });
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
/** What an answer changes. `kind` and the phase tell which question it answers. */
|
|
279
|
+
apply(kind, answer) {
|
|
280
|
+
// An answer that says "cannot tell" (or that nobody can read) counts as a failure for the pace of the next ask; an
|
|
281
|
+
// answer that tells ends the streak.
|
|
282
|
+
const tells = answer.outcome === 'held' ||
|
|
283
|
+
answer.outcome === 'held_by_other' ||
|
|
284
|
+
answer.outcome === 'free' ||
|
|
285
|
+
answer.outcome === 'not_applicable';
|
|
286
|
+
this.failureStreak = tells ? 0 : this.failureStreak + 1;
|
|
287
|
+
this.lastAnswerAt = this.now();
|
|
288
|
+
if (typeof answer.heartbeatSeconds === 'number' && answer.heartbeatSeconds > 0) {
|
|
289
|
+
this.heartbeatMs = clampHeartbeat(answer.heartbeatSeconds * 1000);
|
|
290
|
+
}
|
|
291
|
+
const phaseBefore = this.state.phase;
|
|
292
|
+
// Only a look (asked for, or the renewal of a tab that only looks) is answered about the others; the rest asked to edit.
|
|
293
|
+
const wasLooking = kind === 'look' || (kind === 'beat' && phaseBefore === 'readOnly');
|
|
294
|
+
if (answer.outcome === 'not_applicable') {
|
|
295
|
+
this.stop();
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
if (wasLooking) {
|
|
299
|
+
if (answer.outcome === 'held_by_other') {
|
|
300
|
+
this.patch({ holder: answer.holder ?? null, nobodyIsEditing: false });
|
|
301
|
+
}
|
|
302
|
+
else if (answer.outcome === 'free') {
|
|
303
|
+
this.patch({ holder: null, nobodyIsEditing: true });
|
|
304
|
+
}
|
|
305
|
+
// `unavailable` (or an answer that makes no sense for a look): what was known stays.
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
if (answer.outcome === 'held') {
|
|
309
|
+
this.holding = true;
|
|
310
|
+
this.patch({
|
|
311
|
+
phase: 'editing',
|
|
312
|
+
holder: null,
|
|
313
|
+
lostIt: false,
|
|
314
|
+
nobodyIsEditing: false,
|
|
315
|
+
working: false,
|
|
316
|
+
actionFailed: false
|
|
317
|
+
});
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
if (answer.outcome === 'held_by_other') {
|
|
321
|
+
this.holding = false;
|
|
322
|
+
this.patch({
|
|
323
|
+
phase: 'blocked',
|
|
324
|
+
holder: answer.holder ?? null,
|
|
325
|
+
// A claim that was this tab's and is not any more is told so, unlike a tab that arrived to find it held; and
|
|
326
|
+
// once told, it stays told for as long as the card is up (the next renewal finds the same thing).
|
|
327
|
+
lostIt: phaseBefore === 'blocked'
|
|
328
|
+
? this.state.lostIt
|
|
329
|
+
: phaseBefore === 'editing' && kind === 'beat',
|
|
330
|
+
nobodyIsEditing: false,
|
|
331
|
+
working: false,
|
|
332
|
+
actionFailed: false
|
|
333
|
+
});
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
// `unavailable` (or `free`, which asking to edit never answers): the editor goes on as it was, and the person's choice
|
|
337
|
+
// that was waiting for this answer can be tried again.
|
|
338
|
+
if (kind === 'takeOver' || kind === 'startEditing') {
|
|
339
|
+
this.patch({ working: false, actionFailed: true });
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
fail(kind, error) {
|
|
343
|
+
const { status, code } = describeFailure(error);
|
|
344
|
+
// A call this controller cancelled itself says nothing about the API.
|
|
345
|
+
if (code === 'ABORTED')
|
|
346
|
+
return;
|
|
347
|
+
if (status === 400) {
|
|
348
|
+
// The API understood the request as malformed: a bug of this editor, not a condition to wait out.
|
|
349
|
+
this.logger.warn('[EditLease] The API refused the request as malformed; presence is off for this tab:', error);
|
|
350
|
+
this.stop();
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
if (status === 403 || status === 404) {
|
|
354
|
+
// The person may not write to this composition, or it is not theirs to see: no presence, and nothing to say.
|
|
355
|
+
this.stop();
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
// A network that is down, a server that failed, a session that ended and may be renewed: presence is a convenience,
|
|
359
|
+
// so the editor goes on as it was and asks again later, further apart each time.
|
|
360
|
+
this.failureStreak += 1;
|
|
361
|
+
if (kind === 'takeOver' || kind === 'startEditing') {
|
|
362
|
+
this.patch({ working: false, actionFailed: true });
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
/** The API said there is no presence here (or refused for good): edit freely, and stop asking. */
|
|
366
|
+
stop() {
|
|
367
|
+
this.stopped = true;
|
|
368
|
+
this.clearTimer();
|
|
369
|
+
this.inFlight?.abort();
|
|
370
|
+
this.inFlight = null;
|
|
371
|
+
this.generation += 1;
|
|
372
|
+
this.patch({
|
|
373
|
+
phase: 'off',
|
|
374
|
+
holder: null,
|
|
375
|
+
lostIt: false,
|
|
376
|
+
nobodyIsEditing: false,
|
|
377
|
+
working: false,
|
|
378
|
+
actionFailed: false
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
// ---------------------------------------------------------------------------------------------
|
|
382
|
+
// Internals
|
|
383
|
+
// ---------------------------------------------------------------------------------------------
|
|
384
|
+
scheduleBeat() {
|
|
385
|
+
this.clearTimer();
|
|
386
|
+
if (this.disposed || this.stopped)
|
|
387
|
+
return;
|
|
388
|
+
const waits = this.heartbeatMs * (1 + Math.min(this.failureStreak, MAX_BACKOFF_STEPS));
|
|
389
|
+
this.timerHandle = this.timers.setTimeout(() => {
|
|
390
|
+
this.timerHandle = null;
|
|
391
|
+
this.beat();
|
|
392
|
+
}, waits);
|
|
393
|
+
}
|
|
394
|
+
clearTimer() {
|
|
395
|
+
if (this.timerHandle === null)
|
|
396
|
+
return;
|
|
397
|
+
this.timers.clearTimeout(this.timerHandle);
|
|
398
|
+
this.timerHandle = null;
|
|
399
|
+
}
|
|
400
|
+
/** Gives the claim up, if this tab holds it, with a request that outlives the page. Never throws, never waits. */
|
|
401
|
+
releaseClaim() {
|
|
402
|
+
if (!this.holding)
|
|
403
|
+
return;
|
|
404
|
+
this.holding = false;
|
|
405
|
+
try {
|
|
406
|
+
void this.port.release(this.sessionId, { keepalive: true }).catch(() => {
|
|
407
|
+
// The claim runs out by itself within the time the API gave: a failure to give it up costs a teammate seconds.
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
catch (error) {
|
|
411
|
+
this.logger.error('[EditLease] The claim could not be given up:', error);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
/** Makes the next state out of the changes and tells the watchers, once, when something changed. */
|
|
415
|
+
patch(changes) {
|
|
416
|
+
const next = withDerived({ ...this.state, ...changes });
|
|
417
|
+
const unchanged = Object.keys(next).every((key) => key === 'holder' ? sameHolder(this.state.holder, next.holder) : this.state[key] === next[key]);
|
|
418
|
+
if (unchanged)
|
|
419
|
+
return;
|
|
420
|
+
this.state = next;
|
|
421
|
+
for (const listener of [...this.stateListeners]) {
|
|
422
|
+
try {
|
|
423
|
+
listener(this.state);
|
|
424
|
+
}
|
|
425
|
+
catch (error) {
|
|
426
|
+
this.logger.error('[EditLease] A state listener failed:', error);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
/** Two holders are the same when nothing a person could see differs; an answer that repeats itself changes nothing. */
|
|
432
|
+
function sameHolder(left, right) {
|
|
433
|
+
if (left === right)
|
|
434
|
+
return true;
|
|
435
|
+
if (!left || !right)
|
|
436
|
+
return false;
|
|
437
|
+
return (left.id === right.id &&
|
|
438
|
+
left.name === right.name &&
|
|
439
|
+
left.isYou === right.isYou &&
|
|
440
|
+
left.since === right.since);
|
|
441
|
+
}
|
package/dist/i18n/language.d.ts
CHANGED
|
@@ -24,6 +24,34 @@ export declare const EDITOR_CATALOGS: {
|
|
|
24
24
|
readonly 'editor.failure.settingsLoadFailed': "The editor settings could not be loaded. Try again.";
|
|
25
25
|
readonly 'editor.failure.noSettings': "No editable settings found. Generate and publish the widget first.";
|
|
26
26
|
readonly 'editor.failure.errorCode': "Error code: {code}";
|
|
27
|
+
readonly 'editor.conflict.title': "This composition was changed by someone else";
|
|
28
|
+
readonly 'editor.conflict.bodyNamed': "{name} saved a newer version while you were editing. Your changes are not saved yet.";
|
|
29
|
+
readonly 'editor.conflict.body': "A newer version was saved while you were editing. Your changes are not saved yet.";
|
|
30
|
+
readonly 'editor.conflict.keepMine': "Keep my changes";
|
|
31
|
+
readonly 'editor.conflict.keepMineHint': "Saves your version in place of the newer one.";
|
|
32
|
+
readonly 'editor.conflict.loadLatest': "Use the latest version";
|
|
33
|
+
readonly 'editor.conflict.loadLatestHint': "Drops your changes and shows the newer version.";
|
|
34
|
+
readonly 'editor.conflict.working': "Working…";
|
|
35
|
+
readonly 'editor.conflict.resolveFailed': "The newer version could not be read, so nothing was changed. Check the connection and try again.";
|
|
36
|
+
readonly 'editor.presence.blockedTitleNamed': "{name} is editing this composition";
|
|
37
|
+
readonly 'editor.presence.blockedTitleYou': "You are editing this composition in another window";
|
|
38
|
+
readonly 'editor.presence.blockedTitle': "Someone is editing this composition";
|
|
39
|
+
readonly 'editor.presence.blockedBody': "Editing is paused here so your changes do not overwrite theirs.";
|
|
40
|
+
readonly 'editor.presence.lostTitleNamed': "{name} took over editing";
|
|
41
|
+
readonly 'editor.presence.lostTitleYou': "You took over editing in another window";
|
|
42
|
+
readonly 'editor.presence.lostTitle': "Someone took over editing";
|
|
43
|
+
readonly 'editor.presence.lostBody': "Editing is paused here so your changes do not overwrite theirs. What you changed before is saved as usual.";
|
|
44
|
+
readonly 'editor.presence.takeOver': "Take over editing";
|
|
45
|
+
readonly 'editor.presence.takeOverHint': "Their editing pauses. What they saved stays.";
|
|
46
|
+
readonly 'editor.presence.lookOnly': "Look only";
|
|
47
|
+
readonly 'editor.presence.lookOnlyHint': "Keeps editing paused here.";
|
|
48
|
+
readonly 'editor.presence.working': "Working…";
|
|
49
|
+
readonly 'editor.presence.actionFailed': "That did not work. Check the connection and try again.";
|
|
50
|
+
readonly 'editor.presence.readOnlyNamed': "{name} is editing. You are looking only.";
|
|
51
|
+
readonly 'editor.presence.readOnlyYou': "You are editing in another window. You are looking only.";
|
|
52
|
+
readonly 'editor.presence.readOnly': "Someone is editing. You are looking only.";
|
|
53
|
+
readonly 'editor.presence.readOnlyFree': "Nobody is editing now.";
|
|
54
|
+
readonly 'editor.presence.startEditing': "Start editing";
|
|
27
55
|
readonly 'editor.props.title': "Edit Properties";
|
|
28
56
|
readonly 'editor.props.designTab': "Design";
|
|
29
57
|
readonly 'editor.props.contentTab': "Content";
|
package/dist/i18n/messages.d.ts
CHANGED
|
@@ -36,6 +36,62 @@ export declare const EDITOR_MESSAGES: {
|
|
|
36
36
|
readonly 'editor.failure.noSettings': "No editable settings found. Generate and publish the widget first.";
|
|
37
37
|
/** A line under a message that has an error code: "Error code: CONFIG_NOT_FOUND". The code is not translated. */
|
|
38
38
|
readonly 'editor.failure.errorCode': "Error code: {code}";
|
|
39
|
+
/** The title of the card shown when the composition was saved by someone else after this editor loaded it. */
|
|
40
|
+
readonly 'editor.conflict.title': "This composition was changed by someone else";
|
|
41
|
+
/** Under the title, when the API says who saved it. `{name}` is that person's name. Nothing of the person's edits is lost yet. */
|
|
42
|
+
readonly 'editor.conflict.bodyNamed': "{name} saved a newer version while you were editing. Your changes are not saved yet.";
|
|
43
|
+
/** Under the title, when the API does not say who saved it. */
|
|
44
|
+
readonly 'editor.conflict.body': "A newer version was saved while you were editing. Your changes are not saved yet.";
|
|
45
|
+
/** The button that saves the person's own version over the newer one. */
|
|
46
|
+
readonly 'editor.conflict.keepMine': "Keep my changes";
|
|
47
|
+
/** Under that button: what it does to the newer version. */
|
|
48
|
+
readonly 'editor.conflict.keepMineHint': "Saves your version in place of the newer one.";
|
|
49
|
+
/** The button that drops the person's edits and shows the newer version. */
|
|
50
|
+
readonly 'editor.conflict.loadLatest': "Use the latest version";
|
|
51
|
+
/** Under that button: what it does to the person's edits. */
|
|
52
|
+
readonly 'editor.conflict.loadLatestHint': "Drops your changes and shows the newer version.";
|
|
53
|
+
/** In place of the two buttons while the newer version is being read. */
|
|
54
|
+
readonly 'editor.conflict.working': "Working…";
|
|
55
|
+
/** When the newer version could not be read: nothing was changed, so the person can choose again. */
|
|
56
|
+
readonly 'editor.conflict.resolveFailed': "The newer version could not be read, so nothing was changed. Check the connection and try again.";
|
|
57
|
+
/** The title of the card when a teammate holds the editing of this composition. `{name}` is their name. */
|
|
58
|
+
readonly 'editor.presence.blockedTitleNamed': "{name} is editing this composition";
|
|
59
|
+
/** The same, when the person holding it is this person, in another window or tab. */
|
|
60
|
+
readonly 'editor.presence.blockedTitleYou': "You are editing this composition in another window";
|
|
61
|
+
/** The same, when the API does not say who. */
|
|
62
|
+
readonly 'editor.presence.blockedTitle': "Someone is editing this composition";
|
|
63
|
+
/** Under the title: why nothing can be changed here. */
|
|
64
|
+
readonly 'editor.presence.blockedBody': "Editing is paused here so your changes do not overwrite theirs.";
|
|
65
|
+
/** The title of the card when this editor was editing and a teammate took the editing from it. `{name}` is their name. */
|
|
66
|
+
readonly 'editor.presence.lostTitleNamed': "{name} took over editing";
|
|
67
|
+
/** The same, when it was this person who took it, in another window or tab. */
|
|
68
|
+
readonly 'editor.presence.lostTitleYou': "You took over editing in another window";
|
|
69
|
+
/** The same, when the API does not say who. */
|
|
70
|
+
readonly 'editor.presence.lostTitle': "Someone took over editing";
|
|
71
|
+
/** Under that title: why nothing can be changed any more, and that what was changed before is not lost. */
|
|
72
|
+
readonly 'editor.presence.lostBody': "Editing is paused here so your changes do not overwrite theirs. What you changed before is saved as usual.";
|
|
73
|
+
/** The button that takes the editing from whoever holds it. */
|
|
74
|
+
readonly 'editor.presence.takeOver': "Take over editing";
|
|
75
|
+
/** Under that button: what it does to the other person. */
|
|
76
|
+
readonly 'editor.presence.takeOverHint': "Their editing pauses. What they saved stays.";
|
|
77
|
+
/** The button that keeps editing paused and shows the composition as it is. */
|
|
78
|
+
readonly 'editor.presence.lookOnly': "Look only";
|
|
79
|
+
/** Under that button. */
|
|
80
|
+
readonly 'editor.presence.lookOnlyHint': "Keeps editing paused here.";
|
|
81
|
+
/** Shown while a choice of the card is being carried out. */
|
|
82
|
+
readonly 'editor.presence.working': "Working…";
|
|
83
|
+
/** When a choice of the card could not be carried out: nothing changed, so the person can choose again. */
|
|
84
|
+
readonly 'editor.presence.actionFailed': "That did not work. Check the connection and try again.";
|
|
85
|
+
/** The bar of a person who chose to look only, when a teammate is editing. `{name}` is their name. */
|
|
86
|
+
readonly 'editor.presence.readOnlyNamed': "{name} is editing. You are looking only.";
|
|
87
|
+
/** The same, when the person editing is this person, in another window or tab. */
|
|
88
|
+
readonly 'editor.presence.readOnlyYou': "You are editing in another window. You are looking only.";
|
|
89
|
+
/** The same, when the API does not say who. */
|
|
90
|
+
readonly 'editor.presence.readOnly': "Someone is editing. You are looking only.";
|
|
91
|
+
/** The bar of a person who is looking only, once nobody is editing any more. */
|
|
92
|
+
readonly 'editor.presence.readOnlyFree': "Nobody is editing now.";
|
|
93
|
+
/** The button of that bar that begins editing. */
|
|
94
|
+
readonly 'editor.presence.startEditing': "Start editing";
|
|
39
95
|
readonly 'editor.props.title': "Edit Properties";
|
|
40
96
|
readonly 'editor.props.designTab': "Design";
|
|
41
97
|
readonly 'editor.props.contentTab': "Content";
|
package/dist/i18n/messages.js
CHANGED
|
@@ -38,6 +38,64 @@ export const EDITOR_MESSAGES = {
|
|
|
38
38
|
'editor.failure.noSettings': 'No editable settings found. Generate and publish the widget first.',
|
|
39
39
|
/** A line under a message that has an error code: "Error code: CONFIG_NOT_FOUND". The code is not translated. */
|
|
40
40
|
'editor.failure.errorCode': 'Error code: {code}',
|
|
41
|
+
// ===== A save that somebody else got in front of: the card that asks which version stays =====
|
|
42
|
+
/** The title of the card shown when the composition was saved by someone else after this editor loaded it. */
|
|
43
|
+
'editor.conflict.title': 'This composition was changed by someone else',
|
|
44
|
+
/** Under the title, when the API says who saved it. `{name}` is that person's name. Nothing of the person's edits is lost yet. */
|
|
45
|
+
'editor.conflict.bodyNamed': '{name} saved a newer version while you were editing. Your changes are not saved yet.',
|
|
46
|
+
/** Under the title, when the API does not say who saved it. */
|
|
47
|
+
'editor.conflict.body': 'A newer version was saved while you were editing. Your changes are not saved yet.',
|
|
48
|
+
/** The button that saves the person's own version over the newer one. */
|
|
49
|
+
'editor.conflict.keepMine': 'Keep my changes',
|
|
50
|
+
/** Under that button: what it does to the newer version. */
|
|
51
|
+
'editor.conflict.keepMineHint': 'Saves your version in place of the newer one.',
|
|
52
|
+
/** The button that drops the person's edits and shows the newer version. */
|
|
53
|
+
'editor.conflict.loadLatest': 'Use the latest version',
|
|
54
|
+
/** Under that button: what it does to the person's edits. */
|
|
55
|
+
'editor.conflict.loadLatestHint': 'Drops your changes and shows the newer version.',
|
|
56
|
+
/** In place of the two buttons while the newer version is being read. */
|
|
57
|
+
'editor.conflict.working': 'Working…',
|
|
58
|
+
/** When the newer version could not be read: nothing was changed, so the person can choose again. */
|
|
59
|
+
'editor.conflict.resolveFailed': 'The newer version could not be read, so nothing was changed. Check the connection and try again.',
|
|
60
|
+
// ===== Who else is editing: the card that asks, and the bar for looking only (a page that shows presence) =====
|
|
61
|
+
/** The title of the card when a teammate holds the editing of this composition. `{name}` is their name. */
|
|
62
|
+
'editor.presence.blockedTitleNamed': '{name} is editing this composition',
|
|
63
|
+
/** The same, when the person holding it is this person, in another window or tab. */
|
|
64
|
+
'editor.presence.blockedTitleYou': 'You are editing this composition in another window',
|
|
65
|
+
/** The same, when the API does not say who. */
|
|
66
|
+
'editor.presence.blockedTitle': 'Someone is editing this composition',
|
|
67
|
+
/** Under the title: why nothing can be changed here. */
|
|
68
|
+
'editor.presence.blockedBody': 'Editing is paused here so your changes do not overwrite theirs.',
|
|
69
|
+
/** The title of the card when this editor was editing and a teammate took the editing from it. `{name}` is their name. */
|
|
70
|
+
'editor.presence.lostTitleNamed': '{name} took over editing',
|
|
71
|
+
/** The same, when it was this person who took it, in another window or tab. */
|
|
72
|
+
'editor.presence.lostTitleYou': 'You took over editing in another window',
|
|
73
|
+
/** The same, when the API does not say who. */
|
|
74
|
+
'editor.presence.lostTitle': 'Someone took over editing',
|
|
75
|
+
/** Under that title: why nothing can be changed any more, and that what was changed before is not lost. */
|
|
76
|
+
'editor.presence.lostBody': 'Editing is paused here so your changes do not overwrite theirs. What you changed before is saved as usual.',
|
|
77
|
+
/** The button that takes the editing from whoever holds it. */
|
|
78
|
+
'editor.presence.takeOver': 'Take over editing',
|
|
79
|
+
/** Under that button: what it does to the other person. */
|
|
80
|
+
'editor.presence.takeOverHint': 'Their editing pauses. What they saved stays.',
|
|
81
|
+
/** The button that keeps editing paused and shows the composition as it is. */
|
|
82
|
+
'editor.presence.lookOnly': 'Look only',
|
|
83
|
+
/** Under that button. */
|
|
84
|
+
'editor.presence.lookOnlyHint': 'Keeps editing paused here.',
|
|
85
|
+
/** Shown while a choice of the card is being carried out. */
|
|
86
|
+
'editor.presence.working': 'Working…',
|
|
87
|
+
/** When a choice of the card could not be carried out: nothing changed, so the person can choose again. */
|
|
88
|
+
'editor.presence.actionFailed': 'That did not work. Check the connection and try again.',
|
|
89
|
+
/** The bar of a person who chose to look only, when a teammate is editing. `{name}` is their name. */
|
|
90
|
+
'editor.presence.readOnlyNamed': '{name} is editing. You are looking only.',
|
|
91
|
+
/** The same, when the person editing is this person, in another window or tab. */
|
|
92
|
+
'editor.presence.readOnlyYou': 'You are editing in another window. You are looking only.',
|
|
93
|
+
/** The same, when the API does not say who. */
|
|
94
|
+
'editor.presence.readOnly': 'Someone is editing. You are looking only.',
|
|
95
|
+
/** The bar of a person who is looking only, once nobody is editing any more. */
|
|
96
|
+
'editor.presence.readOnlyFree': 'Nobody is editing now.',
|
|
97
|
+
/** The button of that bar that begins editing. */
|
|
98
|
+
'editor.presence.startEditing': 'Start editing',
|
|
41
99
|
// ===== The settings editor =====
|
|
42
100
|
'editor.props.title': 'Edit Properties',
|
|
43
101
|
'editor.props.designTab': 'Design',
|
package/dist/i18n/translate.d.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* its sentences with it until the page gives another translator). The editor's screens get their words, in the page's
|
|
4
4
|
* language, from `useEditorLanguage` (see `language.ts`).
|
|
5
5
|
*/
|
|
6
|
-
export declare const translateEnglish: import("@widgetic/design-system/i18n").Translate<"editor.app.loading" | "editor.app.tryAgain" | "editor.app.retry" | "editor.failure.widgetNotPublished" | "editor.failure.sessionEndedWhileSaving" | "editor.failure.sessionEnded" | "editor.failure.compositionNotFound" | "editor.failure.noAccess" | "editor.failure.noWidget" | "editor.failure.widgetNotFound" | "editor.failure.saveNeedsConnection" | "editor.failure.loadNeedsConnection" | "editor.failure.saveFailed" | "editor.failure.loadFailed" | "editor.failure.settingsLoadFailed" | "editor.failure.noSettings" | "editor.failure.errorCode" | "editor.props.title" | "editor.props.designTab" | "editor.props.contentTab" | "editor.props.contentCard" | "editor.props.save" | "editor.props.saving" | "editor.props.noConfiguration" | "editor.props.noDesignSchema" | "editor.props.noSchemaData" | "editor.props.noComponents" | "editor.props.noProperties" | "editor.props.addItem" | "editor.props.deleteItem" | "editor.embed.title" | "editor.embed.loading" | "editor.embed.noCode" | "editor.embed.codeHeader" | "editor.embed.headerArea" | "editor.embed.readMore" | "editor.embed.copy" | "editor.embed.copied" | "editor.embed.copiedHint" | "editor.embed.copiedDone" | "editor.embed.copyFailed" | "editor.embed.copyFailedHint" | "editor.preview.title" | "editor.preview.dragHandle" | "editor.preview.desktop" | "editor.preview.mobile" | "editor.preview.widthShort" | "editor.preview.heightShort" | "editor.preview.noUrl" | "editor.preview.copyUrl" | "editor.preview.refresh" | "editor.preview.fitToPanel" | "editor.preview.mobileViewport" | "editor.preview.desktopViewport" | "editor.preview.openInNewTab" | "editor.preview.newTab" | "editor.preview.selectWidget" | "editor.preview.widgetName" | "editor.preview.notPublished" | "editor.preview.publishToPreview" | "editor.preview.frameTitle" | "editor.preview.frameTitleNamed" | "editor.preview.unavailable" | "editor.preview.loadFailedPreview" | "editor.preview.retry" | "editor.preview.retryBuild" | "editor.preview.retryPreview" | "editor.preview.fixErrors" | "editor.preview.viewErrors" | "editor.preview.runtimeError" | "editor.preview.compilationErrors" | "editor.preview.compilationErrorsDetail" | "editor.preview.noCodeYet" | "editor.preview.noPreview" | "editor.preview.building" | "editor.preview.loadingWidget" | "editor.preview.loadingPreview" | "editor.preview.checkingWidget" | "editor.preview.applyingSettings" | "editor.preview.connecting" | "editor.preview.generatingCode" | "editor.list.recentlyUsed" | "editor.list.more" | "editor.list.searchResults" | "editor.list.loadingMore" | "editor.list.deleteItem" | "editor.category.all" | "editor.category.mine" | "editor.category.sansSerif" | "editor.category.serif" | "editor.category.script" | "editor.category.other" | "editor.category.icons" | "editor.category.emojis" | "editor.category.clipart" | "editor.font.select" | "editor.font.title" | "editor.font.search" | "editor.font.list" | "editor.font.loading" | "editor.font.noneFound" | "editor.font.noneAvailable" | "editor.font.remove" | "editor.font.weight" | "editor.font.weightList" | "editor.fontWeight.withItalic" | "editor.fontWeight.italic" | "editor.fontWeight.thin" | "editor.fontWeight.extraLight" | "editor.fontWeight.light" | "editor.fontWeight.regular" | "editor.fontWeight.medium" | "editor.fontWeight.semiBold" | "editor.fontWeight.bold" | "editor.fontWeight.extraBold" | "editor.fontWeight.black" | "editor.vector.select" | "editor.vector.title" | "editor.vector.search" | "editor.vector.list" | "editor.vector.noneFound" | "editor.vector.noneAvailable" | "editor.file.useFile" | "editor.file.useImage" | "editor.file.useVideo" | "editor.file.useAudio" | "editor.file.useDocument" | "editor.file.addFile" | "editor.file.addImage" | "editor.file.addVideo" | "editor.file.addAudio" | "editor.file.addDocument" | "editor.file.play" | "editor.file.pause" | "editor.file.notFound" | "editor.file.emptyFolder" | "editor.file.clear" | "editor.file.pickFailed" | "editor.file.dialogTitle" | "editor.file.closeDialog" | "editor.color.noRecent" | "editor.color.picker" | "editor.date.pick" | "editor.date.pickRange" | "editor.date.invalid" | "editor.date.selectMonth" | "editor.date.selectYear" | "editor.date.calendarLabel" | "editor.date.rangeCalendarLabel" | "editor.date.previousMonth" | "editor.date.nextMonth" | "editor.dateField.dayHint" | "editor.dateField.monthHint" | "editor.dateField.yearHint" | "editor.dateField.dayLabel" | "editor.dateField.monthLabel" | "editor.dateField.yearLabel" | "editor.dropdown.select" | "editor.switch.off" | "editor.switch.on" | "editor.tags.add" | "editor.position.x" | "editor.position.y" | "editor.fixedPosition.set" | "editor.fixedPosition.topLeft" | "editor.fixedPosition.topCenter" | "editor.fixedPosition.topRight" | "editor.fixedPosition.centerLeft" | "editor.fixedPosition.centerCenter" | "editor.fixedPosition.centerRight" | "editor.fixedPosition.bottomLeft" | "editor.fixedPosition.bottomCenter" | "editor.fixedPosition.bottomRight" | "editor.corners.group" | "editor.corners.topLeft" | "editor.corners.topRight" | "editor.corners.bottomLeft" | "editor.corners.bottomRight" | "editor.corners.lock" | "editor.corners.unlock" | "editor.textArea.toolbar" | "editor.textArea.toggleBold" | "editor.textArea.toggleItalic" | "editor.textArea.toggleUnderline" | "editor.textArea.toggleLink" | "editor.textArea.text" | "editor.textArea.paragraph" | "editor.textArea.heading1" | "editor.textArea.heading2" | "editor.textArea.heading3" | "editor.textArea.bulletList" | "editor.textArea.numberedList" | "editor.textArea.checkList" | "editor.textArea.textStyles" | "editor.textArea.listStyles" | "editor.textArea.enterUrl" | "editor.schema.subtitleFont">;
|
|
6
|
+
export declare const translateEnglish: import("@widgetic/design-system/i18n").Translate<"editor.app.loading" | "editor.app.tryAgain" | "editor.app.retry" | "editor.failure.widgetNotPublished" | "editor.failure.sessionEndedWhileSaving" | "editor.failure.sessionEnded" | "editor.failure.compositionNotFound" | "editor.failure.noAccess" | "editor.failure.noWidget" | "editor.failure.widgetNotFound" | "editor.failure.saveNeedsConnection" | "editor.failure.loadNeedsConnection" | "editor.failure.saveFailed" | "editor.failure.loadFailed" | "editor.failure.settingsLoadFailed" | "editor.failure.noSettings" | "editor.failure.errorCode" | "editor.conflict.title" | "editor.conflict.bodyNamed" | "editor.conflict.body" | "editor.conflict.keepMine" | "editor.conflict.keepMineHint" | "editor.conflict.loadLatest" | "editor.conflict.loadLatestHint" | "editor.conflict.working" | "editor.conflict.resolveFailed" | "editor.presence.blockedTitleNamed" | "editor.presence.blockedTitleYou" | "editor.presence.blockedTitle" | "editor.presence.blockedBody" | "editor.presence.lostTitleNamed" | "editor.presence.lostTitleYou" | "editor.presence.lostTitle" | "editor.presence.lostBody" | "editor.presence.takeOver" | "editor.presence.takeOverHint" | "editor.presence.lookOnly" | "editor.presence.lookOnlyHint" | "editor.presence.working" | "editor.presence.actionFailed" | "editor.presence.readOnlyNamed" | "editor.presence.readOnlyYou" | "editor.presence.readOnly" | "editor.presence.readOnlyFree" | "editor.presence.startEditing" | "editor.props.title" | "editor.props.designTab" | "editor.props.contentTab" | "editor.props.contentCard" | "editor.props.save" | "editor.props.saving" | "editor.props.noConfiguration" | "editor.props.noDesignSchema" | "editor.props.noSchemaData" | "editor.props.noComponents" | "editor.props.noProperties" | "editor.props.addItem" | "editor.props.deleteItem" | "editor.embed.title" | "editor.embed.loading" | "editor.embed.noCode" | "editor.embed.codeHeader" | "editor.embed.headerArea" | "editor.embed.readMore" | "editor.embed.copy" | "editor.embed.copied" | "editor.embed.copiedHint" | "editor.embed.copiedDone" | "editor.embed.copyFailed" | "editor.embed.copyFailedHint" | "editor.preview.title" | "editor.preview.dragHandle" | "editor.preview.desktop" | "editor.preview.mobile" | "editor.preview.widthShort" | "editor.preview.heightShort" | "editor.preview.noUrl" | "editor.preview.copyUrl" | "editor.preview.refresh" | "editor.preview.fitToPanel" | "editor.preview.mobileViewport" | "editor.preview.desktopViewport" | "editor.preview.openInNewTab" | "editor.preview.newTab" | "editor.preview.selectWidget" | "editor.preview.widgetName" | "editor.preview.notPublished" | "editor.preview.publishToPreview" | "editor.preview.frameTitle" | "editor.preview.frameTitleNamed" | "editor.preview.unavailable" | "editor.preview.loadFailedPreview" | "editor.preview.retry" | "editor.preview.retryBuild" | "editor.preview.retryPreview" | "editor.preview.fixErrors" | "editor.preview.viewErrors" | "editor.preview.runtimeError" | "editor.preview.compilationErrors" | "editor.preview.compilationErrorsDetail" | "editor.preview.noCodeYet" | "editor.preview.noPreview" | "editor.preview.building" | "editor.preview.loadingWidget" | "editor.preview.loadingPreview" | "editor.preview.checkingWidget" | "editor.preview.applyingSettings" | "editor.preview.connecting" | "editor.preview.generatingCode" | "editor.list.recentlyUsed" | "editor.list.more" | "editor.list.searchResults" | "editor.list.loadingMore" | "editor.list.deleteItem" | "editor.category.all" | "editor.category.mine" | "editor.category.sansSerif" | "editor.category.serif" | "editor.category.script" | "editor.category.other" | "editor.category.icons" | "editor.category.emojis" | "editor.category.clipart" | "editor.font.select" | "editor.font.title" | "editor.font.search" | "editor.font.list" | "editor.font.loading" | "editor.font.noneFound" | "editor.font.noneAvailable" | "editor.font.remove" | "editor.font.weight" | "editor.font.weightList" | "editor.fontWeight.withItalic" | "editor.fontWeight.italic" | "editor.fontWeight.thin" | "editor.fontWeight.extraLight" | "editor.fontWeight.light" | "editor.fontWeight.regular" | "editor.fontWeight.medium" | "editor.fontWeight.semiBold" | "editor.fontWeight.bold" | "editor.fontWeight.extraBold" | "editor.fontWeight.black" | "editor.vector.select" | "editor.vector.title" | "editor.vector.search" | "editor.vector.list" | "editor.vector.noneFound" | "editor.vector.noneAvailable" | "editor.file.useFile" | "editor.file.useImage" | "editor.file.useVideo" | "editor.file.useAudio" | "editor.file.useDocument" | "editor.file.addFile" | "editor.file.addImage" | "editor.file.addVideo" | "editor.file.addAudio" | "editor.file.addDocument" | "editor.file.play" | "editor.file.pause" | "editor.file.notFound" | "editor.file.emptyFolder" | "editor.file.clear" | "editor.file.pickFailed" | "editor.file.dialogTitle" | "editor.file.closeDialog" | "editor.color.noRecent" | "editor.color.picker" | "editor.date.pick" | "editor.date.pickRange" | "editor.date.invalid" | "editor.date.selectMonth" | "editor.date.selectYear" | "editor.date.calendarLabel" | "editor.date.rangeCalendarLabel" | "editor.date.previousMonth" | "editor.date.nextMonth" | "editor.dateField.dayHint" | "editor.dateField.monthHint" | "editor.dateField.yearHint" | "editor.dateField.dayLabel" | "editor.dateField.monthLabel" | "editor.dateField.yearLabel" | "editor.dropdown.select" | "editor.switch.off" | "editor.switch.on" | "editor.tags.add" | "editor.position.x" | "editor.position.y" | "editor.fixedPosition.set" | "editor.fixedPosition.topLeft" | "editor.fixedPosition.topCenter" | "editor.fixedPosition.topRight" | "editor.fixedPosition.centerLeft" | "editor.fixedPosition.centerCenter" | "editor.fixedPosition.centerRight" | "editor.fixedPosition.bottomLeft" | "editor.fixedPosition.bottomCenter" | "editor.fixedPosition.bottomRight" | "editor.corners.group" | "editor.corners.topLeft" | "editor.corners.topRight" | "editor.corners.bottomLeft" | "editor.corners.bottomRight" | "editor.corners.lock" | "editor.corners.unlock" | "editor.textArea.toolbar" | "editor.textArea.toggleBold" | "editor.textArea.toggleItalic" | "editor.textArea.toggleUnderline" | "editor.textArea.toggleLink" | "editor.textArea.text" | "editor.textArea.paragraph" | "editor.textArea.heading1" | "editor.textArea.heading2" | "editor.textArea.heading3" | "editor.textArea.bulletList" | "editor.textArea.numberedList" | "editor.textArea.checkList" | "editor.textArea.textStyles" | "editor.textArea.listStyles" | "editor.textArea.enterUrl" | "editor.schema.subtitleFont">;
|