@sealpixel/ui 1.0.0-rc.2 → 1.0.0-rc.20

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 (148) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +1 -1
  3. package/dist/components/sealpixel-button.d.ts +0 -1
  4. package/dist/components/sealpixel-button.js +1 -1
  5. package/dist/components/sealpixel-button.js.map +1 -1
  6. package/dist/components/sealpixel-editor.d.ts +71 -20
  7. package/dist/components/sealpixel-editor.js +265 -57
  8. package/dist/components/sealpixel-editor.js.map +1 -1
  9. package/dist/components/sealpixel-nav.d.ts +0 -1
  10. package/dist/components/sealpixel-nav.js +1 -1
  11. package/dist/components/sealpixel-nav.js.map +1 -1
  12. package/dist/components/sealpixel-slider.d.ts +12 -17
  13. package/dist/components/sealpixel-slider.js +64 -10
  14. package/dist/components/sealpixel-slider.js.map +1 -1
  15. package/dist/components/sealpixel-stage.d.ts +17 -1
  16. package/dist/components/sealpixel-stage.js +57 -6
  17. package/dist/components/sealpixel-stage.js.map +1 -1
  18. package/dist/components/sealpixel-stepper.d.ts +0 -1
  19. package/dist/components/sealpixel-stepper.js +4 -4
  20. package/dist/components/sealpixel-stepper.js.map +1 -1
  21. package/dist/components/sealpixel-toolbar.d.ts +6 -2
  22. package/dist/components/sealpixel-toolbar.js +71 -5
  23. package/dist/components/sealpixel-toolbar.js.map +1 -1
  24. package/dist/controllers/gesture-controller.d.ts +5 -1
  25. package/dist/controllers/gesture-controller.js +24 -4
  26. package/dist/controllers/gesture-controller.js.map +1 -1
  27. package/dist/controllers/session-controller.d.ts +0 -1
  28. package/dist/controllers/session-controller.js +2 -0
  29. package/dist/controllers/session-controller.js.map +1 -1
  30. package/dist/define.d.ts +0 -1
  31. package/dist/define.js.map +1 -1
  32. package/dist/i18n.d.ts +0 -1
  33. package/dist/i18n.js.map +1 -1
  34. package/dist/icons.d.ts +1 -1
  35. package/dist/icons.js +1 -0
  36. package/dist/icons.js.map +1 -1
  37. package/dist/index.d.ts +1 -2
  38. package/dist/index.js +1 -1
  39. package/dist/index.js.map +1 -1
  40. package/dist/locales/de.d.ts +0 -1
  41. package/dist/locales/de.js +22 -0
  42. package/dist/locales/de.js.map +1 -1
  43. package/dist/locales/en.d.ts +0 -1
  44. package/dist/locales/en.js +22 -0
  45. package/dist/locales/en.js.map +1 -1
  46. package/dist/locales/es.d.ts +0 -1
  47. package/dist/locales/es.js +22 -0
  48. package/dist/locales/es.js.map +1 -1
  49. package/dist/locales/fr.d.ts +0 -1
  50. package/dist/locales/fr.js +22 -0
  51. package/dist/locales/fr.js.map +1 -1
  52. package/dist/locales/index.d.ts +0 -1
  53. package/dist/locales/index.js.map +1 -1
  54. package/dist/locales/ja.d.ts +0 -1
  55. package/dist/locales/ja.js +22 -0
  56. package/dist/locales/ja.js.map +1 -1
  57. package/dist/locales/pt.d.ts +0 -1
  58. package/dist/locales/pt.js +22 -0
  59. package/dist/locales/pt.js.map +1 -1
  60. package/dist/theme.d.ts +0 -1
  61. package/dist/theme.js.map +1 -1
  62. package/dist/tool.d.ts +12 -1
  63. package/dist/tool.js.map +1 -1
  64. package/dist/tools/annotate.d.ts +0 -1
  65. package/dist/tools/annotate.js +277 -28
  66. package/dist/tools/annotate.js.map +1 -1
  67. package/dist/tools/assist.d.ts +103 -0
  68. package/dist/tools/assist.js +361 -0
  69. package/dist/tools/assist.js.map +1 -0
  70. package/dist/tools/crop-mask.d.ts +0 -1
  71. package/dist/tools/crop-mask.js.map +1 -1
  72. package/dist/tools/crop-rotation.d.ts +64 -0
  73. package/dist/tools/crop-rotation.js +172 -0
  74. package/dist/tools/crop-rotation.js.map +1 -0
  75. package/dist/tools/crop.d.ts +0 -1
  76. package/dist/tools/crop.js +99 -15
  77. package/dist/tools/crop.js.map +1 -1
  78. package/dist/tools/delete-handle.d.ts +0 -1
  79. package/dist/tools/delete-handle.js +6 -0
  80. package/dist/tools/delete-handle.js.map +1 -1
  81. package/dist/tools/filter.d.ts +0 -1
  82. package/dist/tools/filter.js.map +1 -1
  83. package/dist/tools/finetune.d.ts +0 -1
  84. package/dist/tools/finetune.js.map +1 -1
  85. package/dist/tools/frame.d.ts +0 -1
  86. package/dist/tools/frame.js.map +1 -1
  87. package/dist/tools/handles.d.ts +26 -0
  88. package/dist/tools/handles.js +51 -0
  89. package/dist/tools/handles.js.map +1 -0
  90. package/dist/tools/index.d.ts +2 -2
  91. package/dist/tools/index.js +3 -1
  92. package/dist/tools/index.js.map +1 -1
  93. package/dist/tools/keys.d.ts +59 -0
  94. package/dist/tools/keys.js +120 -0
  95. package/dist/tools/keys.js.map +1 -0
  96. package/dist/tools/redact.d.ts +10 -1
  97. package/dist/tools/redact.js +176 -12
  98. package/dist/tools/redact.js.map +1 -1
  99. package/dist/tools/region-transform.d.ts +69 -0
  100. package/dist/tools/region-transform.js +192 -0
  101. package/dist/tools/region-transform.js.map +1 -0
  102. package/dist/tools/resize.d.ts +0 -1
  103. package/dist/tools/resize.js +19 -6
  104. package/dist/tools/resize.js.map +1 -1
  105. package/dist/tools/sticker.d.ts +0 -1
  106. package/dist/tools/sticker.js +57 -2
  107. package/dist/tools/sticker.js.map +1 -1
  108. package/dist/tools/watermark.d.ts +0 -1
  109. package/dist/tools/watermark.js.map +1 -1
  110. package/dist/view-mapping.d.ts +1 -2
  111. package/dist/view-mapping.js +1 -1
  112. package/dist/view-mapping.js.map +1 -1
  113. package/package.json +8 -8
  114. package/dist/components/sealpixel-button.d.ts.map +0 -1
  115. package/dist/components/sealpixel-editor.d.ts.map +0 -1
  116. package/dist/components/sealpixel-nav.d.ts.map +0 -1
  117. package/dist/components/sealpixel-slider.d.ts.map +0 -1
  118. package/dist/components/sealpixel-stage.d.ts.map +0 -1
  119. package/dist/components/sealpixel-stepper.d.ts.map +0 -1
  120. package/dist/components/sealpixel-toolbar.d.ts.map +0 -1
  121. package/dist/controllers/gesture-controller.d.ts.map +0 -1
  122. package/dist/controllers/session-controller.d.ts.map +0 -1
  123. package/dist/define.d.ts.map +0 -1
  124. package/dist/i18n.d.ts.map +0 -1
  125. package/dist/icons.d.ts.map +0 -1
  126. package/dist/index.d.ts.map +0 -1
  127. package/dist/locales/de.d.ts.map +0 -1
  128. package/dist/locales/en.d.ts.map +0 -1
  129. package/dist/locales/es.d.ts.map +0 -1
  130. package/dist/locales/fr.d.ts.map +0 -1
  131. package/dist/locales/index.d.ts.map +0 -1
  132. package/dist/locales/ja.d.ts.map +0 -1
  133. package/dist/locales/pt.d.ts.map +0 -1
  134. package/dist/theme.d.ts.map +0 -1
  135. package/dist/tool.d.ts.map +0 -1
  136. package/dist/tools/annotate.d.ts.map +0 -1
  137. package/dist/tools/crop-mask.d.ts.map +0 -1
  138. package/dist/tools/crop.d.ts.map +0 -1
  139. package/dist/tools/delete-handle.d.ts.map +0 -1
  140. package/dist/tools/filter.d.ts.map +0 -1
  141. package/dist/tools/finetune.d.ts.map +0 -1
  142. package/dist/tools/frame.d.ts.map +0 -1
  143. package/dist/tools/index.d.ts.map +0 -1
  144. package/dist/tools/redact.d.ts.map +0 -1
  145. package/dist/tools/resize.d.ts.map +0 -1
  146. package/dist/tools/sticker.d.ts.map +0 -1
  147. package/dist/tools/watermark.d.ts.map +0 -1
  148. package/dist/view-mapping.d.ts.map +0 -1
@@ -24,6 +24,9 @@ export declare class SealpixelStage extends LitElement {
24
24
  hintTransform: {
25
25
  attribute: boolean;
26
26
  };
27
+ hintRotate: {
28
+ attribute: boolean;
29
+ };
27
30
  clip: {
28
31
  attribute: boolean;
29
32
  };
@@ -36,12 +39,20 @@ export declare class SealpixelStage extends LitElement {
36
39
  t: {
37
40
  attribute: boolean;
38
41
  };
42
+ revealed: {
43
+ type: BooleanConstructor;
44
+ state: boolean;
45
+ };
39
46
  };
40
47
  preview: PreviewState | null;
41
48
  pending: boolean;
49
+ /** The first preview has been drawn; the content is shown. */
50
+ revealed: boolean;
42
51
  overlay: TemplateResult | null;
43
52
  hintFilter: string;
44
53
  hintTransform: string;
54
+ /** A rotation hint in radians. Zero is none. While set, the next preview keeps the zoom. */
55
+ hintRotate: number;
45
56
  /**
46
57
  * A CSS shape the preview is clipped to, or an empty string. A tool uses it
47
58
  * to take pixels away rather than paint over them: crop clips to its
@@ -88,6 +99,12 @@ export declare class SealpixelStage extends LitElement {
88
99
  /** `glide` animates the move; a resize or a first load must not animate. */
89
100
  fit(glide?: boolean): void;
90
101
  private fitZoom;
102
+ /**
103
+ * The CSS for a rotation hint: the turn about the centre, at the current
104
+ * zoom. When the turned preview lands, `draw` keeps that zoom (see
105
+ * `turned`), so the render lands on top of the hint.
106
+ */
107
+ private rotateHint;
91
108
  /**
92
109
  * The preview now shows another view of the same source (a tool switched
93
110
  * between cropped and uncropped, a resize changed the output). Keep the
@@ -115,4 +132,3 @@ export declare class SealpixelStage extends LitElement {
115
132
  render(): TemplateResult<1>;
116
133
  }
117
134
  export {};
118
- //# sourceMappingURL=sealpixel-stage.d.ts.map
@@ -28,9 +28,21 @@ export class SealpixelStage extends LitElement {
28
28
  touch-action: none;
29
29
  user-select: none;
30
30
  }
31
+ /*
32
+ * The first preview fades in over the checker instead of cutting in:
33
+ * the image arrives, it does not pop. Later previews draw straight onto
34
+ * the canvas, so only the first one is a reveal. The fade sits on the
35
+ * viewport, so the content's own transition stays the glide and nothing
36
+ * else.
37
+ */
31
38
  .viewport {
32
39
  position: absolute;
33
40
  inset: 0;
41
+ opacity: 0;
42
+ transition: opacity var(--sealpixel-duration-slow) var(--sealpixel-ease-out);
43
+ }
44
+ .viewport.revealed {
45
+ opacity: 1;
34
46
  }
35
47
  .content {
36
48
  position: absolute;
@@ -55,6 +67,17 @@ export class SealpixelStage extends LitElement {
55
67
  box-shadow: var(--sealpixel-shadow, none);
56
68
  transition: clip-path var(--sealpixel-duration-slow) var(--sealpixel-ease-out);
57
69
  }
70
+ /*
71
+ * A rotation hint eases into its angle, so a key press or a drag turns
72
+ * the picture instead of snapping it. The transition lives on the class
73
+ * and the class leaves with the hint: the rendered turn then lands in
74
+ * one step on top of the hint, and the canvas never swings back to zero.
75
+ */
76
+ canvas.turning {
77
+ transition:
78
+ clip-path var(--sealpixel-duration-slow) var(--sealpixel-ease-out),
79
+ transform var(--sealpixel-duration) var(--sealpixel-ease-out);
80
+ }
58
81
  svg.overlay {
59
82
  position: absolute;
60
83
  left: 0;
@@ -65,6 +88,11 @@ export class SealpixelStage extends LitElement {
65
88
  svg.overlay [data-interactive] {
66
89
  pointer-events: all;
67
90
  }
91
+ /* The outline from the base styles scales with the zoom on an SVG shape;
92
+ the stroke stays put and every engine paints it. */
93
+ svg.overlay [tabindex]:focus-visible {
94
+ stroke: var(--sealpixel-color-focus);
95
+ }
68
96
  .status {
69
97
  position: absolute;
70
98
  right: var(--sealpixel-space);
@@ -75,7 +103,7 @@ export class SealpixelStage extends LitElement {
75
103
  background: color-mix(in srgb, var(--sealpixel-color-surface) 85%, transparent);
76
104
  color: var(--sealpixel-color-fg-muted);
77
105
  font: inherit;
78
- font-size: 12px;
106
+ font-size: calc(var(--sealpixel-font-size) * 12 / 14);
79
107
  font-variant-numeric: tabular-nums;
80
108
  backdrop-filter: blur(6px);
81
109
  cursor: pointer;
@@ -128,10 +156,12 @@ export class SealpixelStage extends LitElement {
128
156
  overlay: { attribute: false },
129
157
  hintFilter: { attribute: false },
130
158
  hintTransform: { attribute: false },
159
+ hintRotate: { attribute: false },
131
160
  clip: { attribute: false },
132
161
  zoom: { type: Number },
133
162
  panEnabled: { type: Boolean },
134
163
  t: { attribute: false },
164
+ revealed: { type: Boolean, state: true },
135
165
  }; }
136
166
  constructor() {
137
167
  super();
@@ -187,9 +217,11 @@ export class SealpixelStage extends LitElement {
187
217
  });
188
218
  this.preview = null;
189
219
  this.pending = false;
220
+ this.revealed = false;
190
221
  this.overlay = null;
191
222
  this.hintFilter = '';
192
223
  this.hintTransform = '';
224
+ this.hintRotate = 0;
193
225
  this.clip = '';
194
226
  this.zoom = 1;
195
227
  this.panEnabled = true;
@@ -236,6 +268,17 @@ export class SealpixelStage extends LitElement {
236
268
  const zoom = Math.min((r.width - margin) / this.imageWidth, (r.height - margin) / this.imageHeight, 4);
237
269
  return Math.max(zoom, 0.01);
238
270
  }
271
+ /**
272
+ * The CSS for a rotation hint: the turn about the centre, at the current
273
+ * zoom. When the turned preview lands, `draw` keeps that zoom (see
274
+ * `turned`), so the render lands on top of the hint.
275
+ */
276
+ rotateHint() {
277
+ const a = this.hintRotate;
278
+ if (!a)
279
+ return '';
280
+ return `rotate(${(a * 180) / Math.PI}deg)`;
281
+ }
239
282
  /**
240
283
  * The preview now shows another view of the same source (a tool switched
241
284
  * between cropped and uncropped, a resize changed the output). Keep the
@@ -243,7 +286,7 @@ export class SealpixelStage extends LitElement {
243
286
  * screen, instead of fitting and letting the image jump. A view that was
244
287
  * fitted is fitted again only when the steady view would overflow.
245
288
  */
246
- reanchor(prev, next) {
289
+ reanchor(prev, next, keepZoom = false) {
247
290
  const r = this.getBoundingClientRect();
248
291
  const cx = r.width / 2;
249
292
  const cy = r.height / 2;
@@ -252,7 +295,7 @@ export class SealpixelStage extends LitElement {
252
295
  const zoom = Math.min(16, Math.max(0.05, (this.zoom * scaleOf(prev)) / scaleOf(next)));
253
296
  const iw = this.imageWidth * zoom;
254
297
  const ih = this.imageHeight * zoom;
255
- if (this.fitted && (iw > r.width || ih > r.height)) {
298
+ if (!keepZoom && this.fitted && (iw > r.width || ih > r.height)) {
256
299
  this.fit();
257
300
  return;
258
301
  }
@@ -329,6 +372,10 @@ export class SealpixelStage extends LitElement {
329
372
  canvas.width = image.width;
330
373
  canvas.height = image.height;
331
374
  }
375
+ // A rotation hint says the geometry change about to land is a turn: the
376
+ // view then keeps its zoom, so the image and the crop frame stay where the
377
+ // hint showed them, instead of fitting the larger box and shrinking both.
378
+ const turned = this.hintRotate !== 0;
332
379
  if (preview.version !== this.drawnVersion || sizeChanged) {
333
380
  const ctx = canvas.getContext('2d');
334
381
  if (ctx) {
@@ -337,9 +384,11 @@ export class SealpixelStage extends LitElement {
337
384
  ctx.putImageData(new ImageData(data, image.width, image.height), 0, 0);
338
385
  }
339
386
  this.drawnVersion = preview.version;
387
+ this.revealed = true;
340
388
  // A real preview landed: drop tier-A hints.
341
389
  this.hintFilter = '';
342
390
  this.hintTransform = '';
391
+ this.hintRotate = 0;
343
392
  }
344
393
  const nextMap = previewToSource(preview.viewGeometry);
345
394
  const prevMap = this.viewMap;
@@ -352,7 +401,7 @@ export class SealpixelStage extends LitElement {
352
401
  this.fit(true);
353
402
  }
354
403
  else if (prevMap && !sameAffine(prevMap, nextMap))
355
- this.reanchor(prevMap, nextMap);
404
+ this.reanchor(prevMap, nextMap, turned);
356
405
  else if (!prevMap || (!this.fitted && sizeChanged))
357
406
  this.fit();
358
407
  }
@@ -374,14 +423,16 @@ export class SealpixelStage extends LitElement {
374
423
  const w = this.imageWidth;
375
424
  const h = this.imageHeight;
376
425
  const transform = `translate(${this.pan.x}px, ${this.pan.y}px) scale(${this.zoom})`;
426
+ const hint = this.hintTransform || this.rotateHint();
377
427
  return html `
378
- <div class="viewport" part="viewport">
428
+ <div class="viewport ${this.revealed ? 'revealed' : ''}" part="viewport">
379
429
  <div class="content ${this.glide ? 'glide' : ''}" style="transform:${transform}">
380
430
  <canvas
381
431
  part="canvas"
432
+ class=${this.hintRotate !== 0 ? 'turning' : ''}
382
433
  width=${w}
383
434
  height=${h}
384
- style="filter:${this.hintFilter || 'none'};transform:${this.hintTransform || 'none'};clip-path:${this.clip || 'none'}"
435
+ style="filter:${this.hintFilter || 'none'};transform:${hint || 'none'};clip-path:${this.clip || 'none'}"
385
436
  role="img"
386
437
  aria-label="preview"
387
438
  ></canvas>
@@ -1 +1 @@
1
- {"version":3,"file":"sealpixel-stage.js","sourceRoot":"","sources":["../../src/components/sealpixel-stage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAuB,MAAM,KAAK,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAs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AI,CAAC,MAAM;gBACf,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;qBACd,GAAG,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE;iBAC/F,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;SAC5B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;KAC/B,CAAC;IACJ,CAAC;;AAGH,SAAS,KAAK,CAAC,CAAS,EAAE,EAAU,EAAE,EAAU;IAC9C,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import type { Geometry, PreviewState } from '@sealpixel/core';\nimport { css, html, LitElement, svg, type TemplateResult } from 'lit';\nimport { GestureController } from '../controllers/gesture-controller.js';\nimport { base } from '../theme.js';\nimport {\n type Affine,\n apply,\n invert,\n previewToSource,\n sameAffine,\n scaleOf,\n} from '../view-mapping.js';\n\ntype Translate = (key: string, params?: Record<string, string | number>) => string;\nconst DOUBLE_TAP_MS = 350;\nconst DOUBLE_TAP_PX = 24;\n\n/**\n * Shows the preview on a canvas, fitted and zoomable, with an SVG overlay in\n * image pixel coordinates for tool gizmos. Tier-A hints (CSS filter and\n * transform) are applied to the canvas until the next preview arrives.\n */\nexport class SealpixelStage extends LitElement {\n static override styles = [\n base,\n css`\n :host {\n display: block;\n position: relative;\n overflow: hidden;\n background-color: var(--sealpixel-color-bg);\n background-image:\n linear-gradient(45deg, var(--sealpixel-stage-checker-a) 25%, transparent 25%),\n linear-gradient(-45deg, var(--sealpixel-stage-checker-a) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--sealpixel-stage-checker-a) 75%),\n linear-gradient(-45deg, transparent 75%, var(--sealpixel-stage-checker-a) 75%);\n background-size: 16px 16px;\n background-position: 0 0, 0 8px, 8px -8px, -8px 0;\n touch-action: none;\n user-select: none;\n }\n /*\n * The first preview fades in over the checker instead of cutting in:\n * the image arrives, it does not pop. Later previews draw straight onto\n * the canvas, so only the first one is a reveal. The fade sits on the\n * viewport, so the content's own transition stays the glide and nothing\n * else.\n */\n .viewport {\n position: absolute;\n inset: 0;\n opacity: 0;\n transition: opacity var(--sealpixel-duration-slow) var(--sealpixel-ease-out);\n }\n .viewport.revealed {\n opacity: 1;\n }\n .content {\n position: absolute;\n left: 0;\n top: 0;\n transform-origin: 0 0;\n will-change: transform;\n }\n /*\n * Only a view the user did not drag glides: a fit, a double tap, a\n * re-anchor after the geometry changed. A pinch, a wheel and a drag must\n * track the pointer exactly, so they clear the class in the same update\n * that writes the new transform and the image never lags behind a finger.\n */\n .content.glide {\n transition: transform var(--sealpixel-duration-slow) var(--sealpixel-ease-out);\n }\n canvas {\n display: block;\n image-rendering: auto;\n transform-origin: 50% 50%;\n box-shadow: var(--sealpixel-shadow, none);\n transition: clip-path var(--sealpixel-duration-slow) var(--sealpixel-ease-out);\n }\n /*\n * A rotation hint eases into its angle, so a key press or a drag turns\n * the picture instead of snapping it. The transition lives on the class\n * and the class leaves with the hint: the rendered turn then lands in\n * one step on top of the hint, and the canvas never swings back to zero.\n */\n canvas.turning {\n transition:\n clip-path var(--sealpixel-duration-slow) var(--sealpixel-ease-out),\n transform var(--sealpixel-duration) var(--sealpixel-ease-out);\n }\n svg.overlay {\n position: absolute;\n left: 0;\n top: 0;\n overflow: visible;\n pointer-events: none;\n }\n svg.overlay [data-interactive] {\n pointer-events: all;\n }\n /* The outline from the base styles scales with the zoom on an SVG shape;\n the stroke stays put and every engine paints it. */\n svg.overlay [tabindex]:focus-visible {\n stroke: var(--sealpixel-color-focus);\n }\n .status {\n position: absolute;\n right: var(--sealpixel-space);\n bottom: var(--sealpixel-space);\n padding: 3px 9px;\n border: 0;\n border-radius: 999px;\n background: color-mix(in srgb, var(--sealpixel-color-surface) 85%, transparent);\n color: var(--sealpixel-color-fg-muted);\n font: inherit;\n font-size: calc(var(--sealpixel-font-size) * 12 / 14);\n font-variant-numeric: tabular-nums;\n backdrop-filter: blur(6px);\n cursor: pointer;\n transition:\n color var(--sealpixel-transition),\n background var(--sealpixel-transition),\n opacity var(--sealpixel-duration) var(--sealpixel-ease);\n }\n /* Fitted means the button does nothing; it fades back rather than vanishing. */\n .status:disabled {\n cursor: default;\n opacity: 0.55;\n }\n .status:not(:disabled):hover {\n color: var(--sealpixel-color-fg);\n background: color-mix(in srgb, var(--sealpixel-color-surface) 96%, transparent);\n }\n .status:focus-visible {\n outline: 2px solid var(--sealpixel-color-focus);\n outline-offset: 2px;\n }\n /*\n * A full render is in flight. The dot breathes instead of sitting still,\n * because a static dot is read as part of the image. It starts at the\n * resting opacity, so a render that finishes within one frame does not\n * flash.\n */\n .pending {\n position: absolute;\n left: var(--sealpixel-space);\n top: var(--sealpixel-space);\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--sealpixel-color-accent);\n opacity: 0.8;\n animation: sealpixel-pending 1.4s var(--sealpixel-ease) infinite;\n }\n @keyframes sealpixel-pending {\n 50% {\n opacity: 0.25;\n transform: scale(0.7);\n }\n }\n `,\n ];\n\n static override properties = {\n preview: { attribute: false },\n pending: { type: Boolean },\n overlay: { attribute: false },\n hintFilter: { attribute: false },\n hintTransform: { attribute: false },\n hintRotate: { attribute: false },\n clip: { attribute: false },\n zoom: { type: Number },\n panEnabled: { type: Boolean },\n t: { attribute: false },\n revealed: { type: Boolean, state: true },\n };\n\n declare preview: PreviewState | null;\n declare pending: boolean;\n /** The first preview has been drawn; the content is shown. */\n declare revealed: boolean;\n declare overlay: TemplateResult | null;\n declare hintFilter: string;\n declare hintTransform: string;\n /** A rotation hint in radians. Zero is none. While set, the next preview keeps the zoom. */\n declare hintRotate: number;\n /**\n * A CSS shape the preview is clipped to, or an empty string. A tool uses it\n * to take pixels away rather than paint over them: crop clips to its\n * rectangle so the stage's own backdrop shows around the result, which is\n * the only way the checker carries through without seams. Unlike a hint it\n * survives the next preview, because the tool owns it.\n */\n declare clip: string;\n declare zoom: number;\n declare panEnabled: boolean;\n declare t: Translate;\n\n private canvas: HTMLCanvasElement | null = null;\n private drawnVersion = -1;\n private pan = { x: 0, y: 0 };\n private fitted = false;\n /** Preview px → source px of the drawn preview; a change means the stage shows another view. */\n private viewMap: Affine | null = null;\n private lastTap: { x: number; y: number; at: number } | null = null;\n /**\n * True while the next transform should be animated. Every path that moves the\n * view sets it, so it can never linger from an earlier action into a drag.\n */\n private glide = false;\n /**\n * Set by a tool that wants the next preview to arrive as a movement rather\n * than a cut. Crop uses it: leaving the tool is the moment the image really\n * becomes the crop, and seeing it close is the only signal the user gets\n * that anything happened.\n */\n private glidePending = false;\n private resizeObserver: ResizeObserver | null = null;\n private readonly gestures = new GestureController(this, {\n drag: (e) => {\n if (!this.panEnabled) return;\n this.panBy(e.dx, e.dy);\n },\n // A second tap close to the first fits the image again (double-tap, double-click).\n tap: (e) => {\n const now = performance.now();\n const prev = this.lastTap;\n if (\n prev &&\n now - prev.at < DOUBLE_TAP_MS &&\n Math.hypot(e.x - prev.x, e.y - prev.y) < DOUBLE_TAP_PX\n ) {\n this.lastTap = null;\n this.fit(true);\n return;\n }\n this.lastTap = { x: e.x, y: e.y, at: now };\n },\n pinch: (e) => this.zoomAround(e.scale, e.cx, e.cy, e.dx, e.dy),\n wheelZoom: (e) => this.zoomAround(e.factor, e.cx, e.cy, 0, 0),\n // Plain scrolling pans only while the image is larger than the view;\n // otherwise the page scrolls as the user expects.\n wheelPan: (e) => {\n if (!this.overflows()) return false;\n this.panBy(e.dx, e.dy);\n return true;\n },\n });\n\n constructor() {\n super();\n this.preview = null;\n this.pending = false;\n this.revealed = false;\n this.overlay = null;\n this.hintFilter = '';\n this.hintTransform = '';\n this.hintRotate = 0;\n this.clip = '';\n this.zoom = 1;\n this.panEnabled = true;\n this.t = (key) => key;\n }\n\n get geometry(): Geometry | null {\n return this.preview?.geometry ?? null;\n }\n\n get imageWidth(): number {\n return this.preview?.image.width ?? 0;\n }\n\n get imageHeight(): number {\n return this.preview?.image.height ?? 0;\n }\n\n /** Converts a client point into preview image pixels. */\n toImage(clientX: number, clientY: number): { x: number; y: number } {\n const r = this.getBoundingClientRect();\n return {\n x: (clientX - r.left - this.pan.x) / this.zoom,\n y: (clientY - r.top - this.pan.y) / this.zoom,\n };\n }\n\n /** Asks for the next preview-driven view change to be animated, once. */\n glideNextView(): void {\n this.glidePending = true;\n }\n\n /** `glide` animates the move; a resize or a first load must not animate. */\n fit(glide = false): void {\n const w = this.imageWidth;\n const h = this.imageHeight;\n if (!w || !h) return;\n this.glide = glide;\n const r = this.getBoundingClientRect();\n this.zoom = this.fitZoom();\n this.pan = { x: (r.width - w * this.zoom) / 2, y: (r.height - h * this.zoom) / 2 };\n this.fitted = true;\n this.requestUpdate();\n this.viewChanged();\n }\n\n private fitZoom(): number {\n const r = this.getBoundingClientRect();\n const margin = 24;\n const zoom = Math.min(\n (r.width - margin) / this.imageWidth,\n (r.height - margin) / this.imageHeight,\n 4,\n );\n return Math.max(zoom, 0.01);\n }\n\n /**\n * The CSS for a rotation hint: the turn about the centre, at the current\n * zoom. When the turned preview lands, `draw` keeps that zoom (see\n * `turned`), so the render lands on top of the hint.\n */\n private rotateHint(): string {\n const a = this.hintRotate;\n if (!a) return '';\n return `rotate(${(a * 180) / Math.PI}deg)`;\n }\n\n /**\n * The preview now shows another view of the same source (a tool switched\n * between cropped and uncropped, a resize changed the output). Keep the\n * source pixel under the view centre where it was and keep its size on\n * screen, instead of fitting and letting the image jump. A view that was\n * fitted is fitted again only when the steady view would overflow.\n */\n private reanchor(prev: Affine, next: Affine, keepZoom = false): void {\n const r = this.getBoundingClientRect();\n const cx = r.width / 2;\n const cy = r.height / 2;\n const centre = apply(prev, (cx - this.pan.x) / this.zoom, (cy - this.pan.y) / this.zoom);\n const q = apply(invert(next), centre.x, centre.y);\n const zoom = Math.min(16, Math.max(0.05, (this.zoom * scaleOf(prev)) / scaleOf(next)));\n const iw = this.imageWidth * zoom;\n const ih = this.imageHeight * zoom;\n if (!keepZoom && this.fitted && (iw > r.width || ih > r.height)) {\n this.fit();\n return;\n }\n // No glide here on purpose: the point of re-anchoring is that the source\n // region does not appear to move at all. Animating it would show a slide\n // where the contract is that nothing happened.\n this.glide = false;\n this.zoom = zoom;\n this.pan = this.clampPan({ x: cx - q.x * zoom, y: cy - q.y * zoom });\n this.fitted = Math.abs(zoom - this.fitZoom()) < 1e-3;\n this.requestUpdate();\n this.viewChanged();\n }\n\n /** True when the zoomed image is larger than the view in at least one axis. */\n private overflows(): boolean {\n const r = this.getBoundingClientRect();\n return this.imageWidth * this.zoom > r.width || this.imageHeight * this.zoom > r.height;\n }\n\n /**\n * Keeps the image in view: an image smaller than the view stays fully\n * visible, a larger one never shows empty space beyond its edges.\n */\n private clampPan(pan: { x: number; y: number }): { x: number; y: number } {\n const r = this.getBoundingClientRect();\n const iw = this.imageWidth * this.zoom;\n const ih = this.imageHeight * this.zoom;\n if (!iw || !ih) return pan;\n const axis = (v: number, size: number, view: number) =>\n size <= view ? clamp(v, 0, view - size) : clamp(v, view - size, 0);\n return { x: axis(pan.x, iw, r.width), y: axis(pan.y, ih, r.height) };\n }\n\n private panBy(dx: number, dy: number): void {\n const next = this.clampPan({ x: this.pan.x + dx, y: this.pan.y + dy });\n if (next.x === this.pan.x && next.y === this.pan.y) return;\n this.glide = false;\n this.glidePending = false;\n this.pan = next;\n this.requestUpdate();\n this.viewChanged();\n }\n\n /** Zoom or pan changed: overlays scale their gizmos by zoom and must re-render. */\n private viewChanged(): void {\n this.dispatchEvent(\n new CustomEvent('stage-view', { detail: { zoom: this.zoom, pan: this.pan } }),\n );\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.resizeObserver = new ResizeObserver(() => {\n if (this.fitted) this.fit();\n });\n this.resizeObserver.observe(this);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.resizeObserver?.disconnect();\n }\n\n override firstUpdated(): void {\n this.canvas = this.renderRoot.querySelector('canvas');\n this.gestures.attach(this.renderRoot.querySelector('.viewport') as HTMLElement);\n }\n\n override updated(changed: Map<string, unknown>): void {\n if (changed.has('preview')) this.draw();\n }\n\n private draw(): void {\n const canvas = this.canvas;\n const preview = this.preview;\n if (!canvas || !preview) return;\n const { image } = preview;\n const sizeChanged = canvas.width !== image.width || canvas.height !== image.height;\n if (sizeChanged) {\n canvas.width = image.width;\n canvas.height = image.height;\n }\n // A rotation hint says the geometry change about to land is a turn: the\n // view then keeps its zoom, so the image and the crop frame stay where the\n // hint showed them, instead of fitting the larger box and shrinking both.\n const turned = this.hintRotate !== 0;\n if (preview.version !== this.drawnVersion || sizeChanged) {\n const ctx = canvas.getContext('2d');\n if (ctx) {\n const data = new Uint8ClampedArray(image.data.byteLength);\n data.set(image.data);\n ctx.putImageData(new ImageData(data, image.width, image.height), 0, 0);\n }\n this.drawnVersion = preview.version;\n this.revealed = true;\n // A real preview landed: drop tier-A hints.\n this.hintFilter = '';\n this.hintTransform = '';\n this.hintRotate = 0;\n }\n const nextMap = previewToSource(preview.viewGeometry);\n const prevMap = this.viewMap;\n this.viewMap = nextMap;\n if (this.glidePending) {\n // A tool asked to be seen. Fit rather than re-anchor: a crop that just\n // took half the image away should end up filling the stage, which is\n // what makes the move read as the crop closing.\n this.glidePending = false;\n this.fit(true);\n } else if (prevMap && !sameAffine(prevMap, nextMap)) this.reanchor(prevMap, nextMap, turned);\n else if (!prevMap || (!this.fitted && sizeChanged)) this.fit();\n }\n\n private zoomAround(factor: number, cx: number, cy: number, dx: number, dy: number): void {\n const next = Math.min(16, Math.max(0.05, this.zoom * factor));\n const k = next / this.zoom;\n this.glide = false;\n this.glidePending = false;\n this.zoom = next;\n this.pan = this.clampPan({\n x: cx - (cx - this.pan.x) * k + dx,\n y: cy - (cy - this.pan.y) * k + dy,\n });\n this.fitted = false;\n this.requestUpdate();\n this.viewChanged();\n }\n\n override render() {\n const w = this.imageWidth;\n const h = this.imageHeight;\n const transform = `translate(${this.pan.x}px, ${this.pan.y}px) scale(${this.zoom})`;\n const hint = this.hintTransform || this.rotateHint();\n return html`\n <div class=\"viewport ${this.revealed ? 'revealed' : ''}\" part=\"viewport\">\n <div class=\"content ${this.glide ? 'glide' : ''}\" style=\"transform:${transform}\">\n <canvas\n part=\"canvas\"\n class=${this.hintRotate !== 0 ? 'turning' : ''}\n width=${w}\n height=${h}\n style=\"filter:${this.hintFilter || 'none'};transform:${hint || 'none'};clip-path:${this.clip || 'none'}\"\n role=\"img\"\n aria-label=\"preview\"\n ></canvas>\n ${\n this.overlay\n ? svg`<svg class=\"overlay\" part=\"overlay\" width=${w} height=${h} viewBox=\"0 0 ${w} ${h}\">${this.overlay}</svg>`\n : null\n }\n </div>\n </div>\n ${this.pending ? html`<div class=\"pending\" aria-hidden=\"true\"></div>` : null}\n <button\n type=\"button\"\n class=\"status\"\n part=\"status\"\n ?disabled=${this.fitted}\n title=${this.t('stage.fit')}\n aria-label=${`${this.t('stage.zoom', { percent: Math.round(this.zoom * 100) })}. ${this.t('stage.fit')}`}\n @click=${() => this.fit(true)}\n >${Math.round(this.zoom * 100)}%</button>\n `;\n }\n}\n\nfunction clamp(v: number, lo: number, hi: number): number {\n return v < lo ? lo : v > hi ? hi : v;\n}\n"]}
@@ -66,4 +66,3 @@ export declare class SealpixelStepper extends LitElement {
66
66
  private onKeydown;
67
67
  disconnectedCallback(): void;
68
68
  }
69
- //# sourceMappingURL=sealpixel-stepper.d.ts.map
@@ -33,7 +33,7 @@ export class SealpixelStepper extends LitElement {
33
33
  }
34
34
  label {
35
35
  color: var(--sealpixel-color-fg-muted);
36
- font-size: 11px;
36
+ font-size: calc(var(--sealpixel-font-size) * 11 / 14);
37
37
  letter-spacing: 0.012em;
38
38
  }
39
39
  .box {
@@ -59,7 +59,7 @@ export class SealpixelStepper extends LitElement {
59
59
  background: transparent;
60
60
  color: var(--sealpixel-color-fg-muted);
61
61
  font: inherit;
62
- font-size: 15px;
62
+ font-size: calc(var(--sealpixel-font-size) * 15 / 14);
63
63
  line-height: 1;
64
64
  cursor: pointer;
65
65
  transition:
@@ -92,7 +92,7 @@ export class SealpixelStepper extends LitElement {
92
92
  background: transparent;
93
93
  color: var(--sealpixel-color-fg);
94
94
  font: inherit;
95
- font-size: 13px;
95
+ font-size: calc(var(--sealpixel-font-size) * 13 / 14);
96
96
  font-weight: 600;
97
97
  font-variant-numeric: tabular-nums;
98
98
  text-align: center;
@@ -113,7 +113,7 @@ export class SealpixelStepper extends LitElement {
113
113
  .unit {
114
114
  padding-right: 6px;
115
115
  color: var(--sealpixel-color-fg-muted);
116
- font-size: 11px;
116
+ font-size: calc(var(--sealpixel-font-size) * 11 / 14);
117
117
  }
118
118
  `,
119
119
  ]; }
@@ -1 +1 @@
1
- {"version":3,"file":"sealpixel-stepper.js","sourceRoot":"","sources":["../../src/components/sealpixel-stepper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,oFAAoF;AACpF,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,gBAAiB,SAAQ,UAAU;aAC9B,WAAM,GAAG;QACvB,IAAI;QACJ,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+FF;KACF,AAlGqB,CAkGpB;aAEc,eAAU,GAAG;QAC3B,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QAC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G,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;IAEO,IAAI,CAAC,IAAwB;QACnC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAC7E,CAAC;IACJ,CAAC;IAED,qFAAqF;IAC7E,IAAI,CAAC,GAAW,EAAE,KAAc,EAAE,IAAa;QACrD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzE,IAAI,IAAI,KAAK,IAAI,CAAC,KAAK;YAAE,OAAO;QAChC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IA2CQ,oBAAoB;QAC3B,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { base } from '../theme.js';\n\n/** Delay before a held button starts repeating, then the interval between steps. */\nconst REPEAT_DELAY_MS = 400;\nconst REPEAT_MS = 60;\n\n/**\n * A number with a floor. Where the dial is for a value the user feels their way\n * to from a middle, this is for one they already know: a font size, a line\n * width, a corner radius. It reads, it types, and it nudges by one, which is\n * everything a magnitude needs and none of what a wheel is good at. It also\n * costs about a fifth of the width.\n *\n * The value is a real `input[type=number]`, so the keyboard, the spinbutton\n * role and the value semantics are the platform's. Holding a button repeats;\n * holding Shift steps by ten.\n *\n * Emits `slide` while a held button is repeating (tier-A hints) and `commit`\n * when the value settles, so a held button writes one operation and not forty.\n */\nexport class SealpixelStepper extends LitElement {\n static override styles = [\n base,\n css`\n :host {\n display: block;\n }\n .row {\n display: flex;\n justify-content: center;\n align-items: baseline;\n gap: calc(var(--sealpixel-space) * 0.75);\n margin-bottom: 2px;\n }\n label {\n color: var(--sealpixel-color-fg-muted);\n font-size: calc(var(--sealpixel-font-size) * 11 / 14);\n letter-spacing: 0.012em;\n }\n .box {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n height: var(--sealpixel-control-height);\n padding: 2px;\n background: var(--sealpixel-color-surface-2);\n border: 1px solid transparent;\n border-radius: var(--sealpixel-radius-pill);\n }\n :host([disabled]) .box {\n opacity: 0.45;\n }\n button {\n width: calc(var(--sealpixel-control-height) - 6px);\n height: calc(var(--sealpixel-control-height) - 6px);\n display: grid;\n place-items: center;\n border: 0;\n border-radius: 50%;\n background: transparent;\n color: var(--sealpixel-color-fg-muted);\n font: inherit;\n font-size: calc(var(--sealpixel-font-size) * 15 / 14);\n line-height: 1;\n cursor: pointer;\n transition:\n background var(--sealpixel-transition),\n color var(--sealpixel-transition),\n transform var(--sealpixel-duration) var(--sealpixel-ease-spring);\n }\n button:hover:not(:disabled) {\n background: var(--sealpixel-color-surface);\n color: var(--sealpixel-color-fg);\n }\n button:active:not(:disabled) {\n transform: scale(0.9);\n transition-duration: var(--sealpixel-duration-fast);\n }\n button:disabled {\n opacity: 0.4;\n cursor: default;\n }\n /*\n * The field sizes to its digits rather than to the platform's idea of a\n * number box, and the native spinners go: the two buttons are the spinner.\n */\n input {\n width: 3.4em;\n min-width: 0;\n height: 100%;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--sealpixel-color-fg);\n font: inherit;\n font-size: calc(var(--sealpixel-font-size) * 13 / 14);\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n text-align: center;\n appearance: textfield;\n }\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n }\n input:focus {\n outline: none;\n }\n .box:has(input:focus-visible) {\n outline: 2px solid var(--sealpixel-color-focus);\n outline-offset: 2px;\n }\n .unit {\n padding-right: 6px;\n color: var(--sealpixel-color-fg-muted);\n font-size: calc(var(--sealpixel-font-size) * 11 / 14);\n }\n `,\n ];\n\n static override properties = {\n label: { type: String },\n value: { type: Number },\n min: { type: Number },\n max: { type: Number },\n step: { type: Number },\n unit: { type: String },\n decimals: { type: Number },\n disabled: { type: Boolean, reflect: true },\n };\n\n declare label: string;\n declare value: number;\n declare min: number;\n declare max: number;\n declare step: number;\n /** Shown after the number, unstyled: `px`, `%`. Empty for a bare ratio. */\n declare unit: string;\n /** Digits after the point, for both the field and the rounding. */\n declare decimals: number;\n declare disabled: boolean;\n\n constructor() {\n super();\n this.label = '';\n this.value = 0;\n this.min = 0;\n this.max = 100;\n this.step = 1;\n this.unit = '';\n this.decimals = 0;\n this.disabled = false;\n }\n\n override render() {\n const id = 'stepper';\n return html`\n <div class=\"row\">\n <label for=${id}>${this.label}</label>\n </div>\n <div class=\"box\" part=\"stepper\">\n <button\n type=\"button\"\n part=\"step-down\"\n aria-label=${`${this.label} −`}\n ?disabled=${this.disabled || this.value <= this.min}\n @pointerdown=${(e: PointerEvent) => this.hold(e, -1)}\n @pointerup=${this.release}\n @pointercancel=${this.release}\n @pointerleave=${this.release}\n >−</button>\n <input\n part=\"input\"\n id=${id}\n type=\"number\"\n inputmode=\"decimal\"\n .value=${this.value.toFixed(this.decimals)}\n min=${this.min}\n max=${this.max}\n step=${this.step}\n ?disabled=${this.disabled}\n aria-label=${this.label}\n @change=${this.onChange}\n @keydown=${this.onKeydown}\n />\n ${this.unit ? html`<span class=\"unit\" aria-hidden=\"true\">${this.unit}</span>` : ''}\n <button\n type=\"button\"\n part=\"step-up\"\n aria-label=${`${this.label} +`}\n ?disabled=${this.disabled || this.value >= this.max}\n @pointerdown=${(e: PointerEvent) => this.hold(e, 1)}\n @pointerup=${this.release}\n @pointercancel=${this.release}\n @pointerleave=${this.release}\n >+</button>\n </div>\n `;\n }\n\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n private repeating = false;\n\n private clamp(v: number): number {\n const factor = 10 ** this.decimals;\n const rounded = Math.round(v * factor) / factor;\n return Math.min(this.max, Math.max(this.min, rounded));\n }\n\n private emit(name: 'slide' | 'commit'): void {\n this.dispatchEvent(\n new CustomEvent(name, { detail: this.value, bubbles: true, composed: true }),\n );\n }\n\n /** One step. `live` reports progress; the commit follows when the button goes up. */\n private bump(dir: 1 | -1, shift: boolean, live: boolean): void {\n const next = this.clamp(this.value + dir * this.step * (shift ? 10 : 1));\n if (next === this.value) return;\n this.value = next;\n this.emit(live ? 'slide' : 'commit');\n }\n\n private hold = (e: PointerEvent, dir: 1 | -1) => {\n if (this.disabled || (e.button !== 0 && e.pointerType === 'mouse')) return;\n (e.currentTarget as HTMLElement).setPointerCapture?.(e.pointerId);\n this.repeating = false;\n this.bump(dir, e.shiftKey, false);\n this.timer = setTimeout(() => {\n this.repeating = true;\n this.timer = setInterval(() => this.bump(dir, e.shiftKey, true), REPEAT_MS);\n }, REPEAT_DELAY_MS);\n };\n\n private release = () => {\n if (this.timer !== null) {\n clearTimeout(this.timer);\n clearInterval(this.timer);\n this.timer = null;\n }\n // A single tap already committed; only a repeat still owes one.\n if (this.repeating) {\n this.repeating = false;\n this.emit('commit');\n }\n };\n\n private onChange = (e: Event) => {\n const raw = Number((e.target as HTMLInputElement).value);\n this.value = this.clamp(Number.isFinite(raw) ? raw : this.value);\n // Put the clamped value back, so 9999 in a 0..512 field does not stay there.\n (e.target as HTMLInputElement).value = this.value.toFixed(this.decimals);\n this.emit('commit');\n };\n\n private onKeydown = (e: KeyboardEvent) => {\n // The field's own arrow handling ignores `decimals` and never fires until\n // blur, so the stepper takes them and commits straight away.\n const dir = e.key === 'ArrowUp' ? 1 : e.key === 'ArrowDown' ? -1 : 0;\n if (dir === 0) return;\n e.preventDefault();\n this.bump(dir, e.shiftKey, false);\n };\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.release();\n }\n}\n"]}
@@ -7,6 +7,9 @@ export declare class SealpixelToolbar extends LitElement {
7
7
  tools: {
8
8
  attribute: boolean;
9
9
  };
10
+ badges: {
11
+ attribute: boolean;
12
+ };
10
13
  active: {
11
14
  type: StringConstructor;
12
15
  };
@@ -19,12 +22,13 @@ export declare class SealpixelToolbar extends LitElement {
19
22
  };
20
23
  };
21
24
  tools: UiTool[];
25
+ /** Counts by tool id, shown as a bubble on the button; a missing or zero entry shows nothing. */
26
+ badges: Record<string, number>;
22
27
  active: string | null;
23
28
  orientation: 'horizontal' | 'vertical';
24
- t: (key: string) => string;
29
+ t: (key: string, params?: Record<string, string | number>) => string;
25
30
  constructor();
26
31
  render(): import("lit").TemplateResult<1>;
27
32
  private select;
28
33
  private onKeydown;
29
34
  }
30
- //# sourceMappingURL=sealpixel-toolbar.d.ts.map
@@ -1,4 +1,4 @@
1
- import { css, html, LitElement } from 'lit';
1
+ import { css, html, LitElement, nothing } from 'lit';
2
2
  import { base } from '../theme.js';
3
3
  /** Tool switcher with roving tabindex. Horizontal on narrow layouts, vertical on wide. */
4
4
  export class SealpixelToolbar extends LitElement {
@@ -24,10 +24,22 @@ export class SealpixelToolbar extends LitElement {
24
24
  :host([orientation='vertical']) {
25
25
  border-top: none;
26
26
  border-right: 1px solid var(--sealpixel-color-border);
27
+ /* The rail has a fixed width: a long label truncates, it never scrolls sideways. */
28
+ overflow-x: hidden;
27
29
  }
28
30
  :host([orientation='vertical']) .tools {
29
31
  flex-direction: column;
30
32
  margin: 0;
33
+ width: 100%;
34
+ min-width: 0;
35
+ }
36
+ :host([orientation='vertical']) button {
37
+ width: 100%;
38
+ min-width: 0;
39
+ }
40
+ /* A long label (German, for example) must not widen the horizontal bar. */
41
+ :host(:not([orientation='vertical'])) button {
42
+ max-inline-size: var(--sealpixel-toolbar-label-max, 88px);
31
43
  }
32
44
  button {
33
45
  min-width: var(--sealpixel-touch-target);
@@ -37,7 +49,7 @@ export class SealpixelToolbar extends LitElement {
37
49
  background: transparent;
38
50
  color: var(--sealpixel-color-fg-muted);
39
51
  font: inherit;
40
- font-size: 11px;
52
+ font-size: calc(var(--sealpixel-font-size) * 11 / 14);
41
53
  font-weight: 500;
42
54
  letter-spacing: 0.01em;
43
55
  cursor: pointer;
@@ -61,13 +73,16 @@ export class SealpixelToolbar extends LitElement {
61
73
  background: var(--sealpixel-color-accent-soft, var(--sealpixel-color-surface-2));
62
74
  }
63
75
  .icon {
64
- font-size: 20px;
76
+ font-size: calc(var(--sealpixel-font-size) * 20 / 14);
65
77
  line-height: 1;
66
78
  width: 28px;
67
79
  height: 28px;
68
80
  display: grid;
69
81
  place-items: center;
70
- border-radius: 8px;
82
+ /* The chip sits inside the button, so it takes the small radius the
83
+ theme pairs with --sealpixel-radius. A pill rule on ::part(tool)
84
+ can set the token too and round the chip with the button. */
85
+ border-radius: var(--sealpixel-radius-sm);
71
86
  /*
72
87
  * The filled pill is the one element that says which tool is open, so
73
88
  * it is the one that earns a spring. Colour and shadow ride the
@@ -94,15 +109,58 @@ export class SealpixelToolbar extends LitElement {
94
109
  transition-duration: var(--sealpixel-duration-fast);
95
110
  }
96
111
  .label {
112
+ /*
113
+ * A block as wide as the button, so the ellipsis applies in every
114
+ * engine. It must not shrink: a flex item with overflow hidden may
115
+ * collapse in the column and cut the descenders. The line height stays
116
+ * inherited, because the host page sets it and the panel measures it.
117
+ */
118
+ display: block;
119
+ box-sizing: border-box;
120
+ width: 100%;
121
+ flex: none;
122
+ min-width: 0;
97
123
  max-width: 100%;
124
+ text-align: center;
98
125
  overflow: hidden;
99
126
  text-overflow: ellipsis;
100
127
  white-space: nowrap;
101
128
  }
129
+ /* A count over the icon's corner, notification style. Hidden at zero. */
130
+ .icon-wrap {
131
+ position: relative;
132
+ }
133
+ .badge {
134
+ position: absolute;
135
+ top: -6px;
136
+ right: -10px;
137
+ min-width: 16px;
138
+ height: 16px;
139
+ padding: 0 4px;
140
+ box-sizing: border-box;
141
+ border-radius: 999px;
142
+ background: var(--sealpixel-color-accent);
143
+ color: var(--sealpixel-color-accent-fg);
144
+ font-size: calc(var(--sealpixel-font-size) * 10 / 14);
145
+ line-height: 16px;
146
+ font-weight: 600;
147
+ font-variant-numeric: tabular-nums;
148
+ text-align: center;
149
+ pointer-events: none;
150
+ }
151
+ .sr-only {
152
+ position: absolute;
153
+ width: 1px;
154
+ height: 1px;
155
+ overflow: hidden;
156
+ clip: rect(0 0 0 0);
157
+ white-space: nowrap;
158
+ }
102
159
  `,
103
160
  ]; }
104
161
  static { this.properties = {
105
162
  tools: { attribute: false },
163
+ badges: { attribute: false },
106
164
  active: { type: String },
107
165
  orientation: { type: String, reflect: true },
108
166
  t: { attribute: false },
@@ -123,6 +181,7 @@ export class SealpixelToolbar extends LitElement {
123
181
  }
124
182
  };
125
183
  this.tools = [];
184
+ this.badges = {};
126
185
  this.active = null;
127
186
  this.orientation = 'horizontal';
128
187
  this.t = (k) => k;
@@ -133,11 +192,18 @@ export class SealpixelToolbar extends LitElement {
133
192
  part="tool"
134
193
  type="button"
135
194
  data-tool=${tool.id}
195
+ title=${this.t(tool.label)}
136
196
  aria-pressed=${this.active === tool.id ? 'true' : 'false'}
137
197
  tabindex=${this.active === tool.id || (this.active === null && i === 0) ? 0 : -1}
138
198
  @click=${() => this.select(tool.id)}
139
199
  >
140
- <span class="icon" aria-hidden="true">${tool.icon}</span>
200
+ <span class="icon-wrap">
201
+ <span class="icon" aria-hidden="true">${tool.icon}</span>
202
+ ${this.badges[tool.id]
203
+ ? html `<span part="badge" class="badge" aria-hidden="true">${this.badges[tool.id] > 99 ? '99+' : this.badges[tool.id]}</span>
204
+ <span class="sr-only">${this.t('tool.badge', { count: this.badges[tool.id] })}</span>`
205
+ : nothing}
206
+ </span>
141
207
  <span class="label">${this.t(tool.label)}</span>
142
208
  </button>`)}
143
209
  </div>`;
@@ -1 +1 @@
1
- {"version":3,"file":"sealpixel-toolbar.js","sourceRoot":"","sources":["../../src/components/sealpixel-toolb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C,SAAS;YAClG,CAAC,CAAC,OACN;;gCAEoB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;kBAChC,CACX;WACI,CAAC;IACV,CAAC;IAEO,MAAM,CAAC,EAAU;QACvB,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAC9E,CAAC;IACJ,CAAC","sourcesContent":["import { css, html, LitElement, nothing } from 'lit';\nimport { base } from '../theme.js';\nimport type { UiTool } from '../tool.js';\n\n/** Tool switcher with roving tabindex. Horizontal on narrow layouts, vertical on wide. */\nexport class SealpixelToolbar extends LitElement {\n static override styles = [\n base,\n css`\n :host {\n display: flex;\n padding: 4px;\n background: var(--sealpixel-color-surface);\n border-top: 1px solid var(--sealpixel-color-border);\n overflow: auto;\n scrollbar-width: thin;\n /* Arrow keys move the roving tabindex; the scroll follows it smoothly. */\n scroll-behavior: smooth;\n }\n .tools {\n display: flex;\n gap: 4px;\n /* Centres when it fits, scrolls from the first button when it does not. */\n margin: auto;\n }\n :host([orientation='vertical']) {\n border-top: none;\n border-right: 1px solid var(--sealpixel-color-border);\n /* The rail has a fixed width: a long label truncates, it never scrolls sideways. */\n overflow-x: hidden;\n }\n :host([orientation='vertical']) .tools {\n flex-direction: column;\n margin: 0;\n width: 100%;\n min-width: 0;\n }\n :host([orientation='vertical']) button {\n width: 100%;\n min-width: 0;\n }\n /* A long label (German, for example) must not widen the horizontal bar. */\n :host(:not([orientation='vertical'])) button {\n max-inline-size: var(--sealpixel-toolbar-label-max, 88px);\n }\n button {\n min-width: var(--sealpixel-touch-target);\n min-height: calc(var(--sealpixel-touch-target) + 10px);\n border: 1px solid transparent;\n border-radius: var(--sealpixel-radius);\n background: transparent;\n color: var(--sealpixel-color-fg-muted);\n font: inherit;\n font-size: calc(var(--sealpixel-font-size) * 11 / 14);\n font-weight: 500;\n letter-spacing: 0.01em;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 4px;\n padding: 6px 4px;\n max-width: 100%;\n transition:\n background var(--sealpixel-transition),\n color var(--sealpixel-transition);\n }\n button:hover {\n color: var(--sealpixel-color-fg);\n background: var(--sealpixel-color-surface-2);\n }\n button[aria-pressed='true'] {\n color: var(--sealpixel-color-accent);\n background: var(--sealpixel-color-accent-soft, var(--sealpixel-color-surface-2));\n }\n .icon {\n font-size: calc(var(--sealpixel-font-size) * 20 / 14);\n line-height: 1;\n width: 28px;\n height: 28px;\n display: grid;\n place-items: center;\n /* The chip sits inside the button, so it takes the small radius the\n theme pairs with --sealpixel-radius. A pill rule on ::part(tool)\n can set the token too and round the chip with the button. */\n border-radius: var(--sealpixel-radius-sm);\n /*\n * The filled pill is the one element that says which tool is open, so\n * it is the one that earns a spring. Colour and shadow ride the\n * standard curve underneath, otherwise the overshoot shows up as a\n * flash of accent at the edges.\n */\n transition:\n transform var(--sealpixel-duration) var(--sealpixel-ease-spring),\n background var(--sealpixel-duration) var(--sealpixel-ease),\n color var(--sealpixel-duration) var(--sealpixel-ease),\n box-shadow var(--sealpixel-duration) var(--sealpixel-ease);\n }\n button:hover .icon {\n transform: translateY(-1px);\n }\n button[aria-pressed='true'] .icon {\n background: var(--sealpixel-color-accent);\n color: var(--sealpixel-color-accent-fg);\n box-shadow: var(--sealpixel-shadow-sm, none);\n transform: none;\n }\n button:active .icon {\n transform: scale(0.92);\n transition-duration: var(--sealpixel-duration-fast);\n }\n .label {\n /*\n * A block as wide as the button, so the ellipsis applies in every\n * engine. It must not shrink: a flex item with overflow hidden may\n * collapse in the column and cut the descenders. The line height stays\n * inherited, because the host page sets it and the panel measures it.\n */\n display: block;\n box-sizing: border-box;\n width: 100%;\n flex: none;\n min-width: 0;\n max-width: 100%;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n /* A count over the icon's corner, notification style. Hidden at zero. */\n .icon-wrap {\n position: relative;\n }\n .badge {\n position: absolute;\n top: -6px;\n right: -10px;\n min-width: 16px;\n height: 16px;\n padding: 0 4px;\n box-sizing: border-box;\n border-radius: 999px;\n background: var(--sealpixel-color-accent);\n color: var(--sealpixel-color-accent-fg);\n font-size: calc(var(--sealpixel-font-size) * 10 / 14);\n line-height: 16px;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n text-align: center;\n pointer-events: none;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n }\n `,\n ];\n\n static override properties = {\n tools: { attribute: false },\n badges: { attribute: false },\n active: { type: String },\n orientation: { type: String, reflect: true },\n t: { attribute: false },\n };\n\n declare tools: UiTool[];\n /** Counts by tool id, shown as a bubble on the button; a missing or zero entry shows nothing. */\n declare badges: Record<string, number>;\n declare active: string | null;\n declare orientation: 'horizontal' | 'vertical';\n declare t: (key: string, params?: Record<string, string | number>) => string;\n\n constructor() {\n super();\n this.tools = [];\n this.badges = {};\n this.active = null;\n this.orientation = 'horizontal';\n this.t = (k) => k;\n }\n\n override render() {\n return html`<div class=\"tools\" role=\"toolbar\" aria-orientation=${this.orientation} @keydown=${this.onKeydown}>\n ${this.tools.map(\n (tool, i) => html`<button\n part=\"tool\"\n type=\"button\"\n data-tool=${tool.id}\n title=${this.t(tool.label)}\n aria-pressed=${this.active === tool.id ? 'true' : 'false'}\n tabindex=${this.active === tool.id || (this.active === null && i === 0) ? 0 : -1}\n @click=${() => this.select(tool.id)}\n >\n <span class=\"icon-wrap\">\n <span class=\"icon\" aria-hidden=\"true\">${tool.icon}</span>\n ${\n this.badges[tool.id]\n ? html`<span part=\"badge\" class=\"badge\" aria-hidden=\"true\">${(this.badges[tool.id] as number) > 99 ? '99+' : this.badges[tool.id]}</span>\n <span class=\"sr-only\">${this.t('tool.badge', { count: this.badges[tool.id] as number })}</span>`\n : nothing\n }\n </span>\n <span class=\"label\">${this.t(tool.label)}</span>\n </button>`,\n )}\n </div>`;\n }\n\n private select(id: string): void {\n this.dispatchEvent(\n new CustomEvent('tool-select', { detail: id, bubbles: true, composed: true }),\n );\n }\n\n private onKeydown = (e: KeyboardEvent) => {\n const keys =\n this.orientation === 'vertical' ? ['ArrowUp', 'ArrowDown'] : ['ArrowLeft', 'ArrowRight'];\n const dir = e.key === keys[0] ? -1 : e.key === keys[1] ? 1 : 0;\n if (dir === 0) return;\n e.preventDefault();\n const idx = Math.max(\n 0,\n this.tools.findIndex((t) => t.id === this.active),\n );\n const next = this.tools[(idx + dir + this.tools.length) % this.tools.length];\n if (next) {\n this.select(next.id);\n this.updateComplete.then(() =>\n (this.renderRoot.querySelector(`[data-tool=\"${next.id}\"]`) as HTMLElement | null)?.focus(),\n );\n }\n };\n}\n"]}
@@ -49,10 +49,15 @@ export declare class GestureController implements ReactiveController {
49
49
  private last;
50
50
  private moved;
51
51
  private pinchPrev;
52
+ /** The element the listeners are on, while the host is connected. */
52
53
  private element;
54
+ /** The element given to `attach`, kept across a disconnection. */
55
+ private target;
53
56
  constructor(host: ReactiveControllerHost, handlers: GestureHandlers);
54
57
  attach(element: HTMLElement): void;
55
58
  detach(): void;
59
+ private listen;
60
+ private unlisten;
56
61
  hostConnected(): void;
57
62
  hostDisconnected(): void;
58
63
  private local;
@@ -62,4 +67,3 @@ export declare class GestureController implements ReactiveController {
62
67
  private onWheel;
63
68
  private pinchState;
64
69
  }
65
- //# sourceMappingURL=gesture-controller.d.ts.map