@lvl99dotcom/paintcanvas 0.2.0 → 0.3.0

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/README.md +2 -2
  2. package/dist/lib/i18n/index.d.ts +50 -13
  3. package/dist/lib/i18n/index.js +121 -26
  4. package/dist/locales/en-GB.js +177 -184
  5. package/dist/locales/en-US.js +177 -184
  6. package/dist/locales/fr.js +177 -184
  7. package/dist/locales/ja.js +177 -184
  8. package/dist/locales/ko.js +177 -184
  9. package/dist/locales/zh-Hans.js +177 -184
  10. package/dist/locales/zh-Hant.js +177 -184
  11. package/dist/package.js +1 -1
  12. package/dist/ui/base/index.d.ts +1 -1
  13. package/dist/ui/base/index.js +1 -1
  14. package/dist/ui/elements/PaintCanvas/index.js +11 -11
  15. package/dist/ui/elements/PcBrushConfig/index.d.ts +3 -3
  16. package/dist/ui/elements/PcBrushConfig/index.js +43 -41
  17. package/dist/ui/elements/PcBrushMenu/index.js +18 -18
  18. package/dist/ui/elements/PcBrushTest/index.js +2 -2
  19. package/dist/ui/elements/PcCanvas/index.js +1 -1
  20. package/dist/ui/elements/PcCanvasMap/index.js +1 -1
  21. package/dist/ui/elements/PcInfoTip/index.js +1 -1
  22. package/dist/ui/elements/PcInputSettings/index.js +17 -13
  23. package/dist/ui/elements/PcLayerItem/index.js +34 -34
  24. package/dist/ui/elements/PcLayersMenu/index.js +1 -1
  25. package/dist/ui/elements/PcStats/index.js +8 -5
  26. package/dist/ui/elements/PcThemePicker/index.js +2 -2
  27. package/dist/ui/elements/PcToast/index.js +1 -1
  28. package/dist/ui/elements/PcToolSettings/index.js +51 -45
  29. package/dist/ui/elements/PcToolbar/index.js +19 -19
  30. package/locales/en-GB.json +177 -184
  31. package/locales/en-US.json +177 -184
  32. package/locales/fr.json +177 -184
  33. package/locales/ja.json +177 -184
  34. package/locales/ko.json +177 -184
  35. package/locales/zh-Hans.json +177 -184
  36. package/locales/zh-Hant.json +177 -184
  37. package/package.json +1 -1
@@ -11,66 +11,66 @@ import { html, nothing, unsafeCSS } from "lit";
11
11
  var BLEND_MODE_OPTIONS = [
12
12
  {
13
13
  value: BlendMode.Normal,
14
- label: "blendMode.normal"
14
+ label: "paintCanvas.blendMode.normal"
15
15
  },
16
16
  {
17
17
  value: BlendMode.Screen,
18
- label: "blendMode.screen"
18
+ label: "paintCanvas.blendMode.screen"
19
19
  },
20
20
  {
21
21
  value: BlendMode.Lighten,
22
- label: "blendMode.lighten"
22
+ label: "paintCanvas.blendMode.lighten"
23
23
  },
24
24
  {
25
25
  value: BlendMode.Multiply,
26
- label: "blendMode.multiply"
26
+ label: "paintCanvas.blendMode.multiply"
27
27
  },
28
28
  {
29
29
  value: BlendMode.Darken,
30
- label: "blendMode.darken"
30
+ label: "paintCanvas.blendMode.darken"
31
31
  },
32
32
  {
33
33
  value: BlendMode.Overlay,
34
- label: "blendMode.overlay"
34
+ label: "paintCanvas.blendMode.overlay"
35
35
  }
36
36
  ];
37
37
  /** Context menu options in display order, with the translation keys of their labels */
38
38
  var LAYER_ACTIONS = [
39
39
  {
40
40
  action: "mask",
41
- label: "layers.createMask"
41
+ label: "paintCanvas.layers.createMask"
42
42
  },
43
43
  {
44
44
  action: "duplicate",
45
- label: "layers.duplicate"
45
+ label: "paintCanvas.layers.duplicate"
46
46
  },
47
47
  {
48
48
  action: "merge",
49
- label: "layers.mergeDown"
49
+ label: "paintCanvas.layers.mergeDown"
50
50
  },
51
51
  {
52
52
  action: "clear",
53
- label: "layers.clear"
53
+ label: "paintCanvas.layers.clear"
54
54
  },
55
55
  {
56
56
  action: "delete",
57
- label: "layers.delete"
57
+ label: "paintCanvas.layers.delete"
58
58
  },
59
59
  {
60
60
  action: "up",
61
- label: "layers.moveUp"
61
+ label: "paintCanvas.layers.moveUp"
62
62
  },
63
63
  {
64
64
  action: "top",
65
- label: "layers.moveToTop"
65
+ label: "paintCanvas.layers.moveToTop"
66
66
  },
67
67
  {
68
68
  action: "down",
69
- label: "layers.moveDown"
69
+ label: "paintCanvas.layers.moveDown"
70
70
  },
71
71
  {
72
72
  action: "bottom",
73
- label: "layers.moveToBottom"
73
+ label: "paintCanvas.layers.moveToBottom"
74
74
  }
75
75
  ];
76
76
  /**
@@ -79,38 +79,38 @@ var LAYER_ACTIONS = [
79
79
  */
80
80
  var CONFIRMATIONS = {
81
81
  merge: {
82
- heading: "layers.mergeDownTitle",
83
- message: "layers.mergeDownConfirm",
82
+ heading: "paintCanvas.layers.mergeDownTitle",
83
+ message: "paintCanvas.layers.mergeDownConfirm",
84
84
  choices: [{
85
85
  value: "merge",
86
- label: "layers.mergeLayer"
86
+ label: "paintCanvas.layers.mergeLayer"
87
87
  }, {
88
88
  value: CANCEL_CHOICE,
89
- label: "common.dismiss",
89
+ label: "paintCanvas.common.dismiss",
90
90
  variant: "dismiss"
91
91
  }]
92
92
  },
93
93
  clear: {
94
- heading: "layers.clearTitle",
95
- message: "layers.clearConfirm",
94
+ heading: "paintCanvas.layers.clearTitle",
95
+ message: "paintCanvas.layers.clearConfirm",
96
96
  choices: [{
97
97
  value: "clear",
98
- label: "common.clear"
98
+ label: "paintCanvas.common.clear"
99
99
  }, {
100
100
  value: CANCEL_CHOICE,
101
- label: "common.dismiss",
101
+ label: "paintCanvas.common.dismiss",
102
102
  variant: "dismiss"
103
103
  }]
104
104
  },
105
105
  delete: {
106
- heading: "layers.deleteTitle",
107
- message: "layers.deleteConfirm",
106
+ heading: "paintCanvas.layers.deleteTitle",
107
+ message: "paintCanvas.layers.deleteConfirm",
108
108
  choices: [{
109
109
  value: "delete",
110
- label: "common.delete"
110
+ label: "paintCanvas.common.delete"
111
111
  }, {
112
112
  value: CANCEL_CHOICE,
113
- label: "common.dismiss",
113
+ label: "paintCanvas.common.dismiss",
114
114
  variant: "dismiss"
115
115
  }]
116
116
  }
@@ -480,7 +480,7 @@ var PcLayerItem = class extends PcElement {
480
480
  <button
481
481
  type="button"
482
482
  class="handle"
483
- aria-label=${this.t("layers.reorder", { name: layer.name })}
483
+ aria-label=${this.t("paintCanvas.layers.reorder", { name: layer.name })}
484
484
  aria-haspopup="menu"
485
485
  aria-expanded=${this.menuOpen ? "true" : "false"}
486
486
  @contextmenu=${this.onContextMenu}
@@ -496,7 +496,7 @@ var PcLayerItem = class extends PcElement {
496
496
  <canvas class="thumbnail" aria-hidden="true"></canvas>
497
497
  <input
498
498
  class="name ${active ? "active" : ""}"
499
- aria-label=${this.t("layers.name")}
499
+ aria-label=${this.t("paintCanvas.layers.name")}
500
500
  .value=${layer.name}
501
501
  @change=${(e) => this.onRename(e, stack, layer)}
502
502
  />
@@ -504,12 +504,12 @@ var PcLayerItem = class extends PcElement {
504
504
  type="range"
505
505
  min="0"
506
506
  max="100"
507
- aria-label=${this.t("common.opacity")}
507
+ aria-label=${this.t("paintCanvas.common.opacity")}
508
508
  .value=${String(Math.round(layer.opacity * 100))}
509
509
  @change=${(e) => stack.update(layer.id, { opacity: Number(e.target.value) / 100 })}
510
510
  />
511
511
  <select
512
- aria-label=${this.t("layers.blendMode")}
512
+ aria-label=${this.t("paintCanvas.layers.blendMode")}
513
513
  @change=${(e) => stack.update(layer.id, { blendMode: e.target.value })}
514
514
  >
515
515
  ${BLEND_MODE_OPTIONS.map(({ value, label }) => html`<option
@@ -523,7 +523,7 @@ var PcLayerItem = class extends PcElement {
523
523
  <button
524
524
  type="button"
525
525
  class="alpha-lock"
526
- aria-label=${this.t("layers.alphaLock")}
526
+ aria-label=${this.t("paintCanvas.layers.alphaLock")}
527
527
  aria-pressed=${layer.alphaLock}
528
528
  @click=${() => stack.update(layer.id, { alphaLock: !layer.alphaLock })}
529
529
  >
@@ -535,13 +535,13 @@ var PcLayerItem = class extends PcElement {
535
535
  <button
536
536
  type="button"
537
537
  class="visibility"
538
- aria-label=${this.t("layers.visible")}
538
+ aria-label=${this.t("paintCanvas.layers.visible")}
539
539
  aria-pressed=${layer.visible}
540
540
  @click=${() => stack.update(layer.id, { visible: !layer.visible })}
541
541
  >
542
542
  <img src=${this.iconUrl(layer.visible ? "visible" : "hidden")} alt="" />
543
543
  </button>
544
- ${this.menuOpen ? html`<menu aria-label=${this.t("layers.actions")}>
544
+ ${this.menuOpen ? html`<menu aria-label=${this.t("paintCanvas.layers.actions")}>
545
545
  ${LAYER_ACTIONS.map(({ action, label }) => html`<li>
546
546
  <button
547
547
  type="button"
@@ -196,7 +196,7 @@ var PcLayersMenu = class extends PcElement {
196
196
  ?disabled=${!layers.canCreate}
197
197
  @click=${() => layers.create()}
198
198
  >
199
- ${this.t("layers.new")}
199
+ ${this.t("paintCanvas.layers.new")}
200
200
  </button>
201
201
  <p class="announcement" role="status" aria-live="polite">
202
202
  ${this.announcement || nothing}
@@ -114,21 +114,24 @@ var PcStats = class extends PcElement {
114
114
  if (!app) return nothing;
115
115
  const colour = app.pointer && app.sampleColour(app.pointer);
116
116
  const autosave = app.autosave;
117
- return html`<ul part="stats" aria-label=${this.t("stats.label")}>
117
+ return html`<ul
118
+ part="stats"
119
+ aria-label=${this.t("paintCanvas.stats.label")}
120
+ >
118
121
  <li class="size">
119
- ${this.t("stats.size", {
122
+ ${this.t("paintCanvas.stats.size", {
120
123
  width: app.width,
121
124
  height: app.height
122
125
  })}
123
126
  </li>
124
127
  ${autosave ? html`<li class="stored">
125
- ${this.t("stats.stored", { size: formatBytes(autosave.storedBytes, this.translations.locale) })}
128
+ ${this.t("paintCanvas.stats.stored", { size: formatBytes(autosave.storedBytes, this.translations.locale) })}
126
129
  </li>` : nothing}
127
130
  <li class="zoom">
128
- ${this.t("stats.zoom", { zoom: zoomPercent(app.viewport.zoom) })}
131
+ ${this.t("paintCanvas.stats.zoom", { zoom: zoomPercent(app.viewport.zoom) })}
129
132
  </li>
130
133
  <li class="colour">
131
- ${this.t("stats.colour", { colour: colour ?? "—" })}
134
+ ${this.t("paintCanvas.stats.colour", { colour: colour ?? "—" })}
132
135
  ${colour ? html`<span
133
136
  class="swatch"
134
137
  style=${styleMap({ background: colour })}
@@ -113,7 +113,7 @@ var PcThemePicker = class extends PcElement {
113
113
  }
114
114
  render() {
115
115
  return html`<fieldset>
116
- <legend>${this.t("theme.label")}</legend>
116
+ <legend>${this.t("paintCanvas.theme.label")}</legend>
117
117
  <pc-button-group joined>
118
118
  ${THEMES.map((theme) => html`<label class="icon-toggle" data-theme=${theme}>
119
119
  <input
@@ -124,7 +124,7 @@ var PcThemePicker = class extends PcElement {
124
124
  @change=${() => this.pick(theme)}
125
125
  />
126
126
  <img src=${this.iconUrl(THEME_ICONS[theme])} alt="" />
127
- <span>${this.t(`theme.${theme}`)}</span>
127
+ <span>${this.t(`paintCanvas.theme.${theme}`)}</span>
128
128
  </label>`)}
129
129
  </pc-button-group>
130
130
  </fieldset>`;
@@ -100,7 +100,7 @@ var PcToast = class extends PcElement {
100
100
  >${this.action}</pc-button
101
101
  >` : nothing}
102
102
  <pc-button variant="dismiss" @click=${() => this.dismiss()}
103
- >${this.t("common.dismiss")}</pc-button
103
+ >${this.t("paintCanvas.common.dismiss")}</pc-button
104
104
  >
105
105
  </div>
106
106
  </div>`;
@@ -155,14 +155,14 @@ var PcToolSettings = class extends PcElement {
155
155
  renderFocusPen(app) {
156
156
  return html`<label
157
157
  class="icon-toggle focus-pen"
158
- title=${this.t("toolSettings.focusPenHint")}
158
+ title=${this.t("paintCanvas.toolSettings.focusPenHint")}
159
159
  >
160
160
  <input
161
161
  type="checkbox"
162
162
  .checked=${live(app.input.data.focusPen)}
163
163
  @change=${(e) => app.input.update({ focusPen: e.target.checked })}
164
164
  />
165
- ${iconLabel(this.iconUrl("focusPen"), this.t("toolSettings.focusPen"))}
165
+ ${iconLabel(this.iconUrl("focusPen"), this.t("paintCanvas.toolSettings.focusPen"))}
166
166
  </label>`;
167
167
  }
168
168
  /** Render the brush or eraser settings */
@@ -170,16 +170,16 @@ var PcToolSettings = class extends PcElement {
170
170
  const preset = settings.preset;
171
171
  const pressure = PRESSURE_PARAMS.some((param) => preset[param]?.usePressure);
172
172
  const tilt = TILT_PARAMS.some((param) => preset[param]?.useTilt);
173
- const label = this.t(kind === "eraser" ? "tool.eraser" : "tool.brush");
173
+ const label = this.t(kind === "eraser" ? "paintCanvas.tool.eraser" : "paintCanvas.tool.brush");
174
174
  const panel = kind === "eraser" ? Panel.Eraser : Panel.Brush;
175
175
  return html`<div
176
176
  role="toolbar"
177
- aria-label=${this.t("toolSettings.settings", { tool: label })}
177
+ aria-label=${this.t("paintCanvas.toolSettings.settings", { tool: label })}
178
178
  >
179
179
  <button
180
180
  type="button"
181
181
  class="preset"
182
- title=${this.t("toolSettings.presets", { tool: label })}
182
+ title=${this.t("paintCanvas.toolSettings.presets", { tool: label })}
183
183
  aria-expanded=${app.panel === panel ? "true" : "false"}
184
184
  @click=${() => app.togglePanel(panel)}
185
185
  >
@@ -190,7 +190,7 @@ var PcToolSettings = class extends PcElement {
190
190
  ${preset.name ?? preset.id}
191
191
  </button>
192
192
  <label>
193
- ${this.t("common.width")}
193
+ ${this.t("paintCanvas.common.width")}
194
194
  <input
195
195
  type="number"
196
196
  class="width"
@@ -205,7 +205,7 @@ var PcToolSettings = class extends PcElement {
205
205
  </label>
206
206
  <label
207
207
  class="icon-toggle"
208
- title=${this.t("toolSettings.constrainProportions")}
208
+ title=${this.t("paintCanvas.toolSettings.constrainProportions")}
209
209
  >
210
210
  <input
211
211
  type="checkbox"
@@ -213,10 +213,10 @@ var PcToolSettings = class extends PcElement {
213
213
  .checked=${preset.constrainProportions ?? false}
214
214
  @change=${(e) => settings.update({ constrainProportions: e.target.checked })}
215
215
  />
216
- ${iconLabel(this.iconUrl(preset.constrainProportions ? "linked" : "unlinked"), this.t("toolSettings.constrainProportions"))}
216
+ ${iconLabel(this.iconUrl(preset.constrainProportions ? "linked" : "unlinked"), this.t("paintCanvas.toolSettings.constrainProportions"))}
217
217
  </label>
218
218
  <label>
219
- ${this.t("common.height")}
219
+ ${this.t("paintCanvas.common.height")}
220
220
  <input
221
221
  type="number"
222
222
  class="height"
@@ -229,26 +229,32 @@ var PcToolSettings = class extends PcElement {
229
229
  }}
230
230
  />
231
231
  </label>
232
- <label class="icon-toggle" title=${this.t("toolSettings.pressure")}>
232
+ <label
233
+ class="icon-toggle"
234
+ title=${this.t("paintCanvas.toolSettings.pressure")}
235
+ >
233
236
  <input
234
237
  type="checkbox"
235
238
  class="pressure"
236
239
  .checked=${pressure}
237
240
  @change=${(e) => settings.update(withSource(preset, PRESSURE_PARAMS, "usePressure", e.target.checked))}
238
241
  />
239
- ${iconLabel(this.iconUrl("pressure"), this.t("toolSettings.pressure"))}
242
+ ${iconLabel(this.iconUrl("pressure"), this.t("paintCanvas.toolSettings.pressure"))}
240
243
  </label>
241
- <label class="icon-toggle" title=${this.t("toolSettings.tilt")}>
244
+ <label
245
+ class="icon-toggle"
246
+ title=${this.t("paintCanvas.toolSettings.tilt")}
247
+ >
242
248
  <input
243
249
  type="checkbox"
244
250
  class="tilt"
245
251
  .checked=${tilt}
246
252
  @change=${(e) => settings.update(withSource(preset, TILT_PARAMS, "useTilt", e.target.checked))}
247
253
  />
248
- ${iconLabel(this.iconUrl("tilt"), this.t("toolSettings.tilt"))}
254
+ ${iconLabel(this.iconUrl("tilt"), this.t("paintCanvas.toolSettings.tilt"))}
249
255
  </label>
250
256
  <label>
251
- ${this.t("common.opacity")}
257
+ ${this.t("paintCanvas.common.opacity")}
252
258
  <input
253
259
  type="number"
254
260
  class="opacity"
@@ -267,7 +273,7 @@ var PcToolSettings = class extends PcElement {
267
273
  class="configure"
268
274
  @click=${() => this.emit("pc-configure-brush", kind)}
269
275
  >
270
- ${this.t("toolSettings.configure")}
276
+ ${this.t("paintCanvas.toolSettings.configure")}
271
277
  </button>
272
278
  ${this.renderFocusPen(app)}
273
279
  </div>`;
@@ -276,14 +282,14 @@ var PcToolSettings = class extends PcElement {
276
282
  renderMask(app) {
277
283
  return html`<div
278
284
  role="toolbar"
279
- aria-label=${this.t("toolSettings.maskSettings")}
285
+ aria-label=${this.t("paintCanvas.toolSettings.maskSettings")}
280
286
  >
281
287
  <button
282
288
  type="button"
283
289
  class="pill select-all"
284
290
  @click=${() => app.selection.selectAll()}
285
291
  >
286
- ${this.t("toolSettings.selectAll")}
292
+ ${this.t("paintCanvas.toolSettings.selectAll")}
287
293
  </button>
288
294
  <button
289
295
  type="button"
@@ -291,7 +297,7 @@ var PcToolSettings = class extends PcElement {
291
297
  ?disabled=${!app.selection.active}
292
298
  @click=${() => app.selection.invert()}
293
299
  >
294
- ${this.t("toolSettings.invertSelection")}
300
+ ${this.t("paintCanvas.toolSettings.invertSelection")}
295
301
  </button>
296
302
  <button
297
303
  type="button"
@@ -299,7 +305,7 @@ var PcToolSettings = class extends PcElement {
299
305
  ?disabled=${!app.selection.active}
300
306
  @click=${() => app.selection.clear()}
301
307
  >
302
- ${this.t("toolSettings.deselect")}
308
+ ${this.t("paintCanvas.toolSettings.deselect")}
303
309
  </button>
304
310
  ${this.renderFocusPen(app)}
305
311
  </div>`;
@@ -347,12 +353,12 @@ var PcToolSettings = class extends PcElement {
347
353
  const rotate = (by) => this.changeBox(app, (current) => ({ rotation: by(current.rotation) % 360 }));
348
354
  return html`<div
349
355
  role="toolbar"
350
- aria-label=${this.t("toolSettings.settings", { tool: this.t("tool.move") })}
356
+ aria-label=${this.t("paintCanvas.toolSettings.settings", { tool: this.t("paintCanvas.tool.move") })}
351
357
  >
352
- ${side("width", this.t("common.width"))}
358
+ ${side("width", this.t("paintCanvas.common.width"))}
353
359
  <label
354
360
  class="icon-toggle"
355
- title=${this.t("toolSettings.constrainProportions")}
361
+ title=${this.t("paintCanvas.toolSettings.constrainProportions")}
356
362
  >
357
363
  <input
358
364
  type="checkbox"
@@ -360,9 +366,9 @@ var PcToolSettings = class extends PcElement {
360
366
  .checked=${live(app.constrainProportions)}
361
367
  @change=${(e) => app.setConstrainProportions(e.target.checked)}
362
368
  />
363
- ${iconLabel(this.iconUrl(app.constrainProportions ? "linked" : "unlinked"), this.t("toolSettings.constrainProportions"))}
369
+ ${iconLabel(this.iconUrl(app.constrainProportions ? "linked" : "unlinked"), this.t("paintCanvas.toolSettings.constrainProportions"))}
364
370
  </label>
365
- ${side("height", this.t("common.height"))}
371
+ ${side("height", this.t("paintCanvas.common.height"))}
366
372
  <label>
367
373
  <input
368
374
  type="checkbox"
@@ -370,28 +376,28 @@ var PcToolSettings = class extends PcElement {
370
376
  .checked=${this.percent}
371
377
  @change=${(e) => this.percent = e.target.checked}
372
378
  />
373
- ${this.t("toolSettings.percent")}
379
+ ${this.t("paintCanvas.toolSettings.percent")}
374
380
  </label>
375
381
  <button
376
382
  type="button"
377
383
  class="icon-button flip-horizontal"
378
- title=${this.t("toolSettings.flipHorizontal")}
384
+ title=${this.t("paintCanvas.toolSettings.flipHorizontal")}
379
385
  ?disabled=${disabled}
380
386
  @click=${() => this.changeBox(app, (current) => ({ width: -current.width }))}
381
387
  >
382
- ${iconLabel(this.iconUrl("flipHorizontal"), this.t("toolSettings.flipHorizontal"))}
388
+ ${iconLabel(this.iconUrl("flipHorizontal"), this.t("paintCanvas.toolSettings.flipHorizontal"))}
383
389
  </button>
384
390
  <button
385
391
  type="button"
386
392
  class="icon-button flip-vertical"
387
- title=${this.t("toolSettings.flipVertical")}
393
+ title=${this.t("paintCanvas.toolSettings.flipVertical")}
388
394
  ?disabled=${disabled}
389
395
  @click=${() => this.changeBox(app, (current) => ({ height: -current.height }))}
390
396
  >
391
- ${iconLabel(this.iconUrl("flipVertical"), this.t("toolSettings.flipVertical"))}
397
+ ${iconLabel(this.iconUrl("flipVertical"), this.t("paintCanvas.toolSettings.flipVertical"))}
392
398
  </button>
393
399
  <label>
394
- ${this.t("toolSettings.angle")}
400
+ ${this.t("paintCanvas.toolSettings.angle")}
395
401
  <input
396
402
  type="number"
397
403
  class="angle"
@@ -408,20 +414,20 @@ var PcToolSettings = class extends PcElement {
408
414
  <button
409
415
  type="button"
410
416
  class="icon-button rotate-left"
411
- title=${this.t("toolSettings.rotateLeft")}
417
+ title=${this.t("paintCanvas.toolSettings.rotateLeft")}
412
418
  ?disabled=${disabled}
413
419
  @click=${() => rotate((rotation) => rotation - 90)}
414
420
  >
415
- ${iconLabel(this.iconUrl("rotate90Left"), this.t("toolSettings.rotateLeft"))}
421
+ ${iconLabel(this.iconUrl("rotate90Left"), this.t("paintCanvas.toolSettings.rotateLeft"))}
416
422
  </button>
417
423
  <button
418
424
  type="button"
419
425
  class="icon-button rotate-right"
420
- title=${this.t("toolSettings.rotateRight")}
426
+ title=${this.t("paintCanvas.toolSettings.rotateRight")}
421
427
  ?disabled=${disabled}
422
428
  @click=${() => rotate((rotation) => rotation + 90)}
423
429
  >
424
- ${iconLabel(this.iconUrl("rotate90Right"), this.t("toolSettings.rotateRight"))}
430
+ ${iconLabel(this.iconUrl("rotate90Right"), this.t("paintCanvas.toolSettings.rotateRight"))}
425
431
  </button>
426
432
  <button
427
433
  type="button"
@@ -429,7 +435,7 @@ var PcToolSettings = class extends PcElement {
429
435
  ?disabled=${disabled}
430
436
  @click=${() => app.cancelTransform()}
431
437
  >
432
- ${this.t("toolSettings.reset")}
438
+ ${this.t("paintCanvas.toolSettings.reset")}
433
439
  </button>
434
440
  ${this.renderFocusPen(app)}
435
441
  </div>`;
@@ -443,13 +449,13 @@ var PcToolSettings = class extends PcElement {
443
449
  };
444
450
  return html`<div
445
451
  role="toolbar"
446
- aria-label=${this.t("toolSettings.settings", { tool: this.t("tool.zoom") })}
452
+ aria-label=${this.t("paintCanvas.toolSettings.settings", { tool: this.t("paintCanvas.tool.zoom") })}
447
453
  >
448
454
  <button
449
455
  type="button"
450
456
  class="zoom-in"
451
- title=${this.t("toolSettings.zoomIn")}
452
- aria-label=${this.t("toolSettings.zoomIn")}
457
+ title=${this.t("paintCanvas.toolSettings.zoomIn")}
458
+ aria-label=${this.t("paintCanvas.toolSettings.zoomIn")}
453
459
  ?disabled=${view.zoom >= MAX_ZOOM}
454
460
  @click=${() => view.zoomIn(centre)}
455
461
  >
@@ -458,15 +464,15 @@ var PcToolSettings = class extends PcElement {
458
464
  <button
459
465
  type="button"
460
466
  class="zoom-out"
461
- title=${this.t("toolSettings.zoomOut")}
462
- aria-label=${this.t("toolSettings.zoomOut")}
467
+ title=${this.t("paintCanvas.toolSettings.zoomOut")}
468
+ aria-label=${this.t("paintCanvas.toolSettings.zoomOut")}
463
469
  ?disabled=${view.zoom <= MIN_ZOOM}
464
470
  @click=${() => view.zoomOut(centre)}
465
471
  >
466
472
  <img src=${this.iconUrl("zoomOut")} alt="" />
467
473
  </button>
468
474
  <label>
469
- ${this.t("tool.zoom")}
475
+ ${this.t("paintCanvas.tool.zoom")}
470
476
  <input
471
477
  type="range"
472
478
  class="zoom"
@@ -483,7 +489,7 @@ var PcToolSettings = class extends PcElement {
483
489
  class="pill reset"
484
490
  @click=${() => view.zoomAt(centre, 1)}
485
491
  >
486
- ${this.t("toolSettings.reset")}
492
+ ${this.t("paintCanvas.toolSettings.reset")}
487
493
  </button>
488
494
  ${this.renderFocusPen(app)}
489
495
  </div>`;
@@ -492,16 +498,16 @@ var PcToolSettings = class extends PcElement {
492
498
  renderColourSample(app) {
493
499
  const modes = [[
494
500
  "point",
495
- this.t("toolSettings.pointSample"),
501
+ this.t("paintCanvas.toolSettings.pointSample"),
496
502
  svg`<circle cx="10" cy="10" r="6" /><circle cx="10" cy="10" r="1.5" fill="currentColor" /><path d="M10 1 V5 M10 15 V19 M1 10 H5 M15 10 H19" />`
497
503
  ], [
498
504
  "area",
499
- this.t("toolSettings.areaSample"),
505
+ this.t("paintCanvas.toolSettings.areaSample"),
500
506
  svg`<defs><linearGradient id="area-gradient"><stop offset="0" stop-color="currentColor" stop-opacity="0" /><stop offset="1" stop-color="currentColor" /></linearGradient></defs><rect x="2" y="4" width="16" height="12" fill="url(#area-gradient)" />`
501
507
  ]];
502
508
  return html`<div
503
509
  role="toolbar"
504
- aria-label=${this.t("toolSettings.settings", { tool: this.t("tool.colourSample") })}
510
+ aria-label=${this.t("paintCanvas.toolSettings.settings", { tool: this.t("paintCanvas.tool.colourSample") })}
505
511
  >
506
512
  ${modes.map(([mode, label, icon]) => html`<button
507
513
  type="button"