@sealpixel/ui 1.0.0-rc.12 → 1.0.0-rc.15

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 (122) hide show
  1. package/README.md +1 -1
  2. package/dist/components/sealpixel-button.d.ts +0 -1
  3. package/dist/components/sealpixel-button.js.map +1 -1
  4. package/dist/components/sealpixel-editor.d.ts +4 -15
  5. package/dist/components/sealpixel-editor.js +3 -19
  6. package/dist/components/sealpixel-editor.js.map +1 -1
  7. package/dist/components/sealpixel-nav.d.ts +0 -1
  8. package/dist/components/sealpixel-nav.js.map +1 -1
  9. package/dist/components/sealpixel-slider.d.ts +0 -1
  10. package/dist/components/sealpixel-slider.js.map +1 -1
  11. package/dist/components/sealpixel-stage.d.ts +0 -1
  12. package/dist/components/sealpixel-stage.js.map +1 -1
  13. package/dist/components/sealpixel-stepper.d.ts +0 -1
  14. package/dist/components/sealpixel-stepper.js.map +1 -1
  15. package/dist/components/sealpixel-toolbar.d.ts +0 -1
  16. package/dist/components/sealpixel-toolbar.js.map +1 -1
  17. package/dist/controllers/gesture-controller.d.ts +0 -1
  18. package/dist/controllers/gesture-controller.js.map +1 -1
  19. package/dist/controllers/session-controller.d.ts +0 -1
  20. package/dist/controllers/session-controller.js.map +1 -1
  21. package/dist/define.d.ts +0 -1
  22. package/dist/define.js.map +1 -1
  23. package/dist/i18n.d.ts +0 -1
  24. package/dist/i18n.js.map +1 -1
  25. package/dist/icons.d.ts +0 -1
  26. package/dist/icons.js.map +1 -1
  27. package/dist/index.d.ts +0 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/locales/de.d.ts +0 -1
  30. package/dist/locales/de.js.map +1 -1
  31. package/dist/locales/en.d.ts +0 -1
  32. package/dist/locales/en.js.map +1 -1
  33. package/dist/locales/es.d.ts +0 -1
  34. package/dist/locales/es.js.map +1 -1
  35. package/dist/locales/fr.d.ts +0 -1
  36. package/dist/locales/fr.js.map +1 -1
  37. package/dist/locales/index.d.ts +0 -1
  38. package/dist/locales/index.js.map +1 -1
  39. package/dist/locales/ja.d.ts +0 -1
  40. package/dist/locales/ja.js.map +1 -1
  41. package/dist/locales/pt.d.ts +0 -1
  42. package/dist/locales/pt.js.map +1 -1
  43. package/dist/theme.d.ts +0 -1
  44. package/dist/theme.js.map +1 -1
  45. package/dist/tool.d.ts +0 -1
  46. package/dist/tool.js.map +1 -1
  47. package/dist/tools/annotate.d.ts +0 -1
  48. package/dist/tools/annotate.js.map +1 -1
  49. package/dist/tools/assist.d.ts +2 -3
  50. package/dist/tools/assist.js +1 -1
  51. package/dist/tools/assist.js.map +1 -1
  52. package/dist/tools/crop-mask.d.ts +0 -1
  53. package/dist/tools/crop-mask.js.map +1 -1
  54. package/dist/tools/crop-rotation.d.ts +0 -1
  55. package/dist/tools/crop-rotation.js.map +1 -1
  56. package/dist/tools/crop.d.ts +0 -1
  57. package/dist/tools/crop.js.map +1 -1
  58. package/dist/tools/delete-handle.d.ts +0 -1
  59. package/dist/tools/delete-handle.js.map +1 -1
  60. package/dist/tools/filter.d.ts +0 -1
  61. package/dist/tools/filter.js.map +1 -1
  62. package/dist/tools/finetune.d.ts +0 -1
  63. package/dist/tools/finetune.js.map +1 -1
  64. package/dist/tools/frame.d.ts +0 -1
  65. package/dist/tools/frame.js.map +1 -1
  66. package/dist/tools/handles.d.ts +0 -1
  67. package/dist/tools/handles.js.map +1 -1
  68. package/dist/tools/index.d.ts +0 -1
  69. package/dist/tools/index.js.map +1 -1
  70. package/dist/tools/redact.d.ts +0 -1
  71. package/dist/tools/redact.js.map +1 -1
  72. package/dist/tools/region-transform.d.ts +0 -1
  73. package/dist/tools/region-transform.js.map +1 -1
  74. package/dist/tools/resize.d.ts +0 -1
  75. package/dist/tools/resize.js.map +1 -1
  76. package/dist/tools/sticker.d.ts +0 -1
  77. package/dist/tools/sticker.js.map +1 -1
  78. package/dist/tools/watermark.d.ts +0 -1
  79. package/dist/tools/watermark.js.map +1 -1
  80. package/dist/view-mapping.d.ts +1 -2
  81. package/dist/view-mapping.js +1 -1
  82. package/dist/view-mapping.js.map +1 -1
  83. package/package.json +4 -4
  84. package/dist/components/sealpixel-button.d.ts.map +0 -1
  85. package/dist/components/sealpixel-editor.d.ts.map +0 -1
  86. package/dist/components/sealpixel-nav.d.ts.map +0 -1
  87. package/dist/components/sealpixel-slider.d.ts.map +0 -1
  88. package/dist/components/sealpixel-stage.d.ts.map +0 -1
  89. package/dist/components/sealpixel-stepper.d.ts.map +0 -1
  90. package/dist/components/sealpixel-toolbar.d.ts.map +0 -1
  91. package/dist/controllers/gesture-controller.d.ts.map +0 -1
  92. package/dist/controllers/session-controller.d.ts.map +0 -1
  93. package/dist/define.d.ts.map +0 -1
  94. package/dist/i18n.d.ts.map +0 -1
  95. package/dist/icons.d.ts.map +0 -1
  96. package/dist/index.d.ts.map +0 -1
  97. package/dist/locales/de.d.ts.map +0 -1
  98. package/dist/locales/en.d.ts.map +0 -1
  99. package/dist/locales/es.d.ts.map +0 -1
  100. package/dist/locales/fr.d.ts.map +0 -1
  101. package/dist/locales/index.d.ts.map +0 -1
  102. package/dist/locales/ja.d.ts.map +0 -1
  103. package/dist/locales/pt.d.ts.map +0 -1
  104. package/dist/theme.d.ts.map +0 -1
  105. package/dist/tool.d.ts.map +0 -1
  106. package/dist/tools/annotate.d.ts.map +0 -1
  107. package/dist/tools/assist.d.ts.map +0 -1
  108. package/dist/tools/crop-mask.d.ts.map +0 -1
  109. package/dist/tools/crop-rotation.d.ts.map +0 -1
  110. package/dist/tools/crop.d.ts.map +0 -1
  111. package/dist/tools/delete-handle.d.ts.map +0 -1
  112. package/dist/tools/filter.d.ts.map +0 -1
  113. package/dist/tools/finetune.d.ts.map +0 -1
  114. package/dist/tools/frame.d.ts.map +0 -1
  115. package/dist/tools/handles.d.ts.map +0 -1
  116. package/dist/tools/index.d.ts.map +0 -1
  117. package/dist/tools/redact.d.ts.map +0 -1
  118. package/dist/tools/region-transform.d.ts.map +0 -1
  119. package/dist/tools/resize.d.ts.map +0 -1
  120. package/dist/tools/sticker.d.ts.map +0 -1
  121. package/dist/tools/watermark.d.ts.map +0 -1
  122. package/dist/view-mapping.d.ts.map +0 -1
package/README.md CHANGED
@@ -7,4 +7,4 @@ The default, themeable editor UI for Sealpixel, built on Lit as Web Components.
7
7
  - `@sealpixel/ui/locales/*` ships en, de, fr, es, pt and ja.
8
8
  - Tool panels for every first-party plugin live here, keyed by plugin id, so plugin packages stay free of Lit.
9
9
 
10
- Most apps use `@sealpixel/element`, which bundles this UI with every first-party plugin and a worker-backed renderer. Documentation: https://docs.sealpixel.dev/guide/ui
10
+ Most apps use `@sealpixel/element`, which bundles this UI with the default first-party plugins and a worker-backed renderer. Sticker, watermark and assist are outside the default set: set `plugins` to `allPlugins` to install all of them. Documentation: https://docs.sealpixel.dev/guide/ui
@@ -25,4 +25,3 @@ export declare class SealpixelButton extends LitElement {
25
25
  constructor();
26
26
  render(): import("lit").TemplateResult<1>;
27
27
  }
28
- //# sourceMappingURL=sealpixel-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sealpixel-button.js","sourceRoot":"","sources":["../../src/components/sealpixel-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,OAAO,eAAgB,SAAQ,UAAU;aAC7B,WAAM,GAAG;QACvB,IAAI;QACJ,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmFF;KACF,CAAC;aAEc,eAAU,GAAG;QAC3B,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QAC1C,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QACzC,OA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AAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACxB,CAAC;IAOF;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA;;;kBAGG,IAAI,CAAC,QAAQ;qBACV,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;mBACjC,IAAI,CAAC,KAAK,IAAI,SAAS;cAC5B,IAAI,CAAC,KAAK,IAAI,SAAS;;;cAGvB,CAAC;IACb,CAAC","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { base } from '../theme.js';\n\nexport class SealpixelButton extends LitElement {\n static override styles = [\n base,\n css`\n :host {\n display: inline-block;\n }\n /*\n * The fill carries the button, not an outline. On a surface two steps\n * lighter than the bar a control reads on its own, and a row of six\n * outlined boxes was competing with the photo above it. The border stays\n * declared, transparent, so a theme can put it back and nothing shifts.\n */\n button {\n min-width: var(--sealpixel-control-height);\n min-height: var(--sealpixel-control-height);\n padding: 0 calc(var(--sealpixel-space) * 1.5);\n border: 1px solid transparent;\n border-radius: var(--sealpixel-radius-pill);\n background: var(--sealpixel-color-surface-2);\n color: var(--sealpixel-color-fg);\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--sealpixel-space);\n width: 100%;\n transition:\n background var(--sealpixel-transition),\n border-color var(--sealpixel-transition),\n color var(--sealpixel-transition),\n box-shadow var(--sealpixel-duration) var(--sealpixel-ease-out),\n opacity var(--sealpixel-transition),\n transform var(--sealpixel-duration) var(--sealpixel-ease-spring);\n }\n button:hover:not(:disabled) {\n background: var(--sealpixel-color-surface-3, var(--sealpixel-color-surface-2));\n }\n /*\n * The press scales down rather than nudging the button down by a pixel.\n * A translate moves the label against a static border and reads as a\n * glitch on a 44 px target; the scale keeps every edge moving together.\n * It also settles fast enough to finish inside a normal tap.\n */\n button:active:not(:disabled) {\n transform: scale(0.96);\n transition-duration: var(--sealpixel-duration-fast);\n transition-timing-function: var(--sealpixel-ease);\n }\n button:disabled {\n opacity: 0.45;\n cursor: default;\n }\n :host([variant='primary']) button {\n background: var(--sealpixel-color-accent);\n border-color: var(--sealpixel-color-accent);\n color: var(--sealpixel-color-accent-fg);\n }\n :host([variant='ghost']) button {\n background: transparent;\n border-color: transparent;\n }\n :host([pressed]) button {\n background: var(--sealpixel-color-accent-soft, transparent);\n border-color: var(--sealpixel-color-accent);\n color: var(--sealpixel-color-fg);\n }\n /*\n * A brightness filter used to do this. It repaints the whole button\n * including its text and washes out a light accent, so the hover now\n * lifts the button instead of bleaching it.\n */\n :host([variant='primary']) button {\n box-shadow: var(--sealpixel-shadow-sm, none);\n }\n :host([variant='primary']) button:hover:not(:disabled) {\n box-shadow: var(--sealpixel-shadow-raised, none);\n transform: translateY(-1px);\n }\n :host([variant='primary']) button:active:not(:disabled) {\n box-shadow: var(--sealpixel-shadow-sm, none);\n transform: scale(0.96);\n }\n `,\n ];\n\n static override properties = {\n disabled: { type: Boolean, reflect: true },\n pressed: { type: Boolean, reflect: true },\n variant: { type: String, reflect: true },\n label: { type: String },\n };\n\n declare disabled: boolean;\n declare pressed: boolean;\n declare variant: 'default' | 'primary' | 'ghost';\n declare label: string;\n\n constructor() {\n super();\n this.disabled = false;\n this.pressed = false;\n this.variant = 'default';\n this.label = '';\n }\n\n override render() {\n return html`<button\n part=\"button\"\n type=\"button\"\n ?disabled=${this.disabled}\n aria-pressed=${this.pressed ? 'true' : 'false'}\n aria-label=${this.label || undefined}\n title=${this.label || undefined}\n >\n <slot></slot>\n </button>`;\n }\n}\n"]}
@@ -25,13 +25,6 @@ export declare class SealpixelEditor extends LitElement {
25
25
  assets: {
26
26
  attribute: boolean;
27
27
  };
28
- server: {
29
- attribute: boolean;
30
- };
31
- serverEndpoint: {
32
- type: StringConstructor;
33
- attribute: string;
34
- };
35
28
  limits: {
36
29
  attribute: string;
37
30
  converter: {
@@ -116,13 +109,11 @@ export declare class SealpixelEditor extends LitElement {
116
109
  renderer: Renderer | null;
117
110
  /** Fonts and images. Defaults to a fetch resolver over the plugins' declarations. */
118
111
  assets: AssetResolver | null;
119
- /** Server rendering configuration; `server-endpoint` is the attribute shorthand. */
120
- server: SessionOptions['server'] | null;
121
- serverEndpoint: string | null;
122
112
  /**
123
113
  * How much of the original stays in the browser; `SessionOptions['limits']`
124
114
  * (JSON in the attribute). Above `maxClientMegapixels` (16 by default) the
125
- * image is not resident and Export needs a `server`.
115
+ * image is not resident: Export and Download are disabled, and the host
116
+ * renders the original outside the browser.
126
117
  */
127
118
  limits: SessionOptions['limits'] | null;
128
119
  src: EditorSource | null;
@@ -208,7 +199,7 @@ export declare class SealpixelEditor extends LitElement {
208
199
  embedEditLog?: boolean;
209
200
  }): Promise<{
210
201
  filename: string;
211
- result: ExportResult | import("@sealpixel/core").ServerRenderResult;
202
+ result: ExportResult;
212
203
  }>;
213
204
  private ensureSession;
214
205
  connectedCallback(): void;
@@ -261,11 +252,10 @@ export declare class SealpixelEditor extends LitElement {
261
252
  private syncPanelFit;
262
253
  private loadSource;
263
254
  private applyControlled;
264
- /** Whether the owned session was built from the current `plugins`, `renderer`, `server` and `limits`. */
255
+ /** Whether the owned session was built from the current `plugins`, `renderer`, `assets` and `limits`. */
265
256
  private sessionMatchesProps;
266
257
  private sessionRenderer;
267
258
  private sessionAssets;
268
- private sessionServer;
269
259
  private sessionLimits;
270
260
  private currentTools;
271
261
  /** Plugins may ship their own tool; load each once and re-render when it arrives. */
@@ -285,4 +275,3 @@ export declare class SealpixelEditor extends LitElement {
285
275
  render(): TemplateResult<1>;
286
276
  private renderEmpty;
287
277
  }
288
- //# sourceMappingURL=sealpixel-editor.d.ts.map
@@ -714,8 +714,6 @@ export class SealpixelEditor extends LitElement {
714
714
  session: { attribute: false },
715
715
  renderer: { attribute: false },
716
716
  assets: { attribute: false },
717
- server: { attribute: false },
718
- serverEndpoint: { type: String, attribute: 'server-endpoint' },
719
717
  limits: {
720
718
  attribute: 'limits',
721
719
  converter: jsonAttribute('limits'),
@@ -766,7 +764,6 @@ export class SealpixelEditor extends LitElement {
766
764
  this.lastError = null;
767
765
  this.sessionRenderer = null;
768
766
  this.sessionAssets = null;
769
- this.sessionServer = null;
770
767
  this.sessionLimits = null;
771
768
  this.onPointerDown = () => {
772
769
  if (!this.matches(':focus-within'))
@@ -801,8 +798,6 @@ export class SealpixelEditor extends LitElement {
801
798
  this.session = null;
802
799
  this.renderer = null;
803
800
  this.assets = null;
804
- this.server = null;
805
- this.serverEndpoint = null;
806
801
  this.limits = null;
807
802
  this.src = null;
808
803
  this.editLog = undefined;
@@ -892,15 +887,12 @@ export class SealpixelEditor extends LitElement {
892
887
  const renderer = this.renderer ?? SealpixelEditor.defaultRendererFactory?.(plugins) ?? null;
893
888
  this.sessionRenderer = renderer;
894
889
  const assets = this.assets ?? createAssetResolver({ assets: plugins.flatMap((p) => p.assets ?? []) });
895
- const server = this.server ?? (this.serverEndpoint ? { endpoint: this.serverEndpoint } : null);
896
- this.sessionServer = server;
897
890
  this.sessionAssets = this.assets;
898
891
  this.sessionLimits = this.limits;
899
892
  const session = createEditorSession({
900
893
  plugins,
901
894
  assets,
902
895
  ...(renderer ? { renderer } : {}),
903
- ...(server ? { server } : {}),
904
896
  ...(this.limits ? { limits: this.limits } : {}),
905
897
  });
906
898
  this.ownsSession = true;
@@ -985,8 +977,6 @@ export class SealpixelEditor extends LitElement {
985
977
  changed.has('pluginOptions') ||
986
978
  changed.has('renderer') ||
987
979
  changed.has('assets') ||
988
- changed.has('server') ||
989
- changed.has('serverEndpoint') ||
990
980
  changed.has('limits')) &&
991
981
  this.ownsSession &&
992
982
  !this.sessionMatchesProps()) {
@@ -1141,7 +1131,7 @@ export class SealpixelEditor extends LitElement {
1141
1131
  this.dispatchEvent(new CustomEvent('sealpixel:error', { detail: error, bubbles: true, composed: true }));
1142
1132
  }
1143
1133
  }
1144
- /** Whether the owned session was built from the current `plugins`, `renderer`, `server` and `limits`. */
1134
+ /** Whether the owned session was built from the current `plugins`, `renderer`, `assets` and `limits`. */
1145
1135
  sessionMatchesProps() {
1146
1136
  const session = this.ctl.session;
1147
1137
  if (!session)
@@ -1150,12 +1140,6 @@ export class SealpixelEditor extends LitElement {
1150
1140
  return false;
1151
1141
  if (this.assets && this.assets !== this.sessionAssets)
1152
1142
  return false;
1153
- const wantServer = this.server ?? (this.serverEndpoint ? { endpoint: this.serverEndpoint } : null);
1154
- if (JSON.stringify(wantServer?.endpoint ?? null) !==
1155
- JSON.stringify(this.sessionServer?.endpoint ?? null))
1156
- return false;
1157
- if (wantServer !== this.sessionServer && wantServer?.fetch !== this.sessionServer?.fetch)
1158
- return false;
1159
1143
  if (canonicalJson(this.limits ?? null) !== canonicalJson(this.sessionLimits ?? null))
1160
1144
  return false;
1161
1145
  // Compare id, version and resolved options (options JSON may contain commas, so no string splitting).
@@ -1287,7 +1271,7 @@ export class SealpixelEditor extends LitElement {
1287
1271
  /** Brief confirmation over the stage: format, size and hash of the result. */
1288
1272
  toast(key, result) {
1289
1273
  const format = result.mimeType.replace('image/', '').toUpperCase();
1290
- const size = result.bytes ? formatBytes(result.bytes.byteLength) : 'server';
1274
+ const size = formatBytes(result.bytes.byteLength);
1291
1275
  const text = this.i18n.t(key, { format, width: result.width, height: result.height, size });
1292
1276
  this._toast = { text, hash: result.hash.slice(0, 12) };
1293
1277
  this.announce(text);
@@ -1326,7 +1310,7 @@ export class SealpixelEditor extends LitElement {
1326
1310
  .state=${state}
1327
1311
  .t=${this.i18n.t}
1328
1312
  .busy=${this._busy}
1329
- .canExport=${(state?.resident ?? false) || this.server !== null || this.serverEndpoint !== null}
1313
+ .canExport=${state?.resident ?? false}
1330
1314
  .showExport=${this.showExport === 'always' || (this.showExport === 'auto' && this._processListeners > 0)}
1331
1315
  .showDownload=${this.showDownload !== 'never'}
1332
1316
  .showHistory=${this.showHistory}
@@ -1 +1 @@
1
- {"version":3,"file":"sealpixel-editor.js","sourceRoot":"","sources":["../../src/components/sealpixel-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EAMnB,cAAc,GAIf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,UAAU,EAA8B,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,gEAAgE;AAChE,SAAS,aAAa,CAAmB,IAAY;IACnD,OAAO;QACL,aAAa,EAAE,CAAC,KAAoB,EAAE,EAAE;YACtC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;gBAAE,OAAO,IAAI,CAAC;YACvD,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAM,CAAC;YAChC,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,CAAC,IAAI,CAAC,eAAe,IAAI,oBAAoB,CAAC,CAAC;gBACtD,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,WAAW,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,C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,CAAC;IAC9B,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1E,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AAChD,CAAC","sourcesContent":["import {\n type AnyPlugin,\n type AssetResolver,\n canonicalJson,\n configurePlugins,\n createAssetResolver,\n createEditorSession,\n type EditorSession,\n type ExportResult,\n type OutputOptions,\n type PluginOptionsMap,\n type Renderer,\n SealpixelError,\n type SessionOptions,\n type SessionState,\n type SourceDescriptor,\n} from '@sealpixel/core';\nimport { defaultPlugins } from '@sealpixel/plugins';\nimport { css, html, LitElement, nothing, type TemplateResult } from 'lit';\nimport { SessionController } from '../controllers/session-controller.js';\nimport { createI18n, type Dictionary, type I18n } from '../i18n.js';\nimport { resolveLocale } from '../locales/index.js';\nimport { base, tokens } from '../theme.js';\nimport type { UiTool, UiToolContext } from '../tool.js';\nimport { toolsFor } from '../tools/index.js';\nimport type { SealpixelStage } from './sealpixel-stage.js';\n\nexport type EditorSource = File | Blob | Uint8Array | string;\n\n/** `plugin-options='{\"filter\":{...}}'` attribute ↔ property. */\nfunction jsonAttribute<T extends object>(name: string) {\n return {\n fromAttribute: (value: string | null) => {\n if (value === null || value.trim() === '') return null;\n try {\n return JSON.parse(value) as T;\n } catch {\n console.warn(`[sealpixel] ${name} is not valid JSON`);\n return null;\n }\n },\n toAttribute: (value: T | null) => (value ? JSON.stringify(value) : null),\n };\n}\n\n/**\n * The default editor. Headless `EditorSession` underneath; this element adds\n * the responsive shell, tools and events.\n *\n * Events: `sealpixel:ready`, `sealpixel:load`, `sealpixel:change` ({ log, index }),\n * `sealpixel:process` (ExportResult), `sealpixel:error` (SealpixelError).\n */\n/**\n * What makes a settings bar worth its height: a control, or anything that\n * draws. Plain `div`s are the tools' own scaffolding and never count.\n */\nconst PANEL_CONTENT = 'select, input, textarea, button, img, svg, canvas, a, [role]';\n\nexport class SealpixelEditor extends LitElement {\n static override styles = [\n tokens,\n base,\n css`\n :host {\n display: block;\n container-type: inline-size;\n background: var(--sealpixel-color-bg);\n color: var(--sealpixel-color-fg);\n height: 100%;\n min-height: 480px;\n min-width: 0;\n overflow: hidden;\n }\n :host(:focus) {\n outline: none;\n }\n .root {\n position: relative;\n display: grid;\n height: 100%;\n min-width: 0;\n grid-template:\n 'nav' auto\n 'stage' 1fr\n 'panel' auto\n 'toolbar' auto / 1fr;\n padding-bottom: env(safe-area-inset-bottom);\n }\n .root > * {\n min-width: 0;\n min-height: 0;\n }\n sealpixel-stage {\n grid-area: stage;\n min-height: 160px;\n }\n sealpixel-nav {\n grid-area: nav;\n }\n sealpixel-toolbar {\n grid-area: toolbar;\n }\n .panel {\n grid-area: panel;\n background: var(--sealpixel-color-surface);\n border-top: 1px solid var(--sealpixel-color-border);\n padding: var(--sealpixel-space) calc(var(--sealpixel-space) * 1.5);\n /*\n * The configured height, not a fitted one: a bar that grew and shrank\n * as the user moved between tools would resize the stage under them,\n * and the image would shift every time they changed their mind.\n *\n * The exception is a tool whose settings do not fit at all. Then the\n * bar takes the height they need, measured by syncPanelFit(), because\n * the alternative is worse: a fixed-height wrapping flex container has\n * no scrollable cross-axis overflow, so nothing scrolls and the sticky\n * choice row is pulled up over the settings. 34cqh caps both heights,\n * so a busy tool can never take the stage on a short viewport.\n */\n height: min(34cqh, max(var(--sealpixel-panel-size), var(--sealpixel-panel-fit, 0px)));\n overflow: auto;\n /*\n * A bottom bar lays its blocks across the width and wraps, where the\n * old right-hand column stacked them. Stacking five blocks in a bar\n * that is one or two rows tall would push the last of them out of\n * sight, so a block takes a full row only when it asks for one.\n */\n display: flex;\n flex-wrap: wrap;\n /*\n * Safe centring places the blocks in the middle while they fit and\n * at the start once they do not. Plain centring overflows a fixed bar\n * at both ends, and nothing scrolls back to what sits above the top.\n */\n align-items: center;\n align-content: safe center;\n justify-content: safe center;\n gap: var(--sealpixel-space) calc(var(--sealpixel-space) * 2);\n scrollbar-width: thin;\n scroll-behavior: smooth;\n }\n /*\n * A tool whose panel lays out to nothing gets no bar. Without this the\n * fixed height above reserves an empty surface and takes it off the\n * stage; see syncPanelFill(), which sets the attribute.\n */\n .panel[data-empty] {\n height: 0;\n padding: 0;\n border-top: 0;\n overflow: hidden;\n }\n /*\n * A dial needs room to be worth dragging, but it must not grow into all\n * of it: a dial that stretches pushes the controls beside it against the\n * two edges of the bar, and they stop reading as one group.\n */\n .panel > sealpixel-slider {\n flex: 0 1 360px;\n min-width: 240px;\n }\n /* Chips, presets and asset libraries always get their own full row. */\n .panel > .strip,\n .panel > .grid {\n flex: 1 1 100%;\n }\n .panel > .row,\n .panel > .rows,\n .panel > .field,\n .panel > .hint {\n flex: 0 1 auto;\n }\n /*\n * A tool panel has two kinds of control: the choice of what to work with\n * (a shape, a frame style, a preset, a parameter) and the settings for\n * whatever is chosen. The choice belongs at the bottom, next to the tool\n * rail it continues, and its settings appear above it. Side by side they\n * read as one undifferentiated row of buttons and it is not obvious which\n * of them changes what.\n *\n * Ordering here rather than in each tool keeps a panel's source in\n * reading order and lets a third-party tool join in with one class.\n */\n .panel > * {\n order: 1;\n }\n /*\n * Switching tools rebuilds the panel, so the rows rise on the new\n * children and never on a value change inside the open tool, where Lit\n * patches the same nodes.\n *\n * Transform only, deliberately. A fade would put the labels at partial\n * opacity for a moment, and a contrast audit that samples the panel\n * during that moment reports text it can read on screen as failing.\n * Transform also keeps the panel's own height still, which the layout\n * around it is measured against.\n */\n .panel > * {\n animation: sealpixel-panel-in var(--sealpixel-duration) var(--sealpixel-ease-out) both;\n }\n .panel > *:nth-child(2) {\n animation-delay: 25ms;\n }\n .panel > *:nth-child(n + 3) {\n animation-delay: 50ms;\n }\n @keyframes sealpixel-panel-in {\n from {\n transform: translateY(8px);\n }\n }\n /* Phones: option grids become one horizontal strip so the stage keeps its height. */\n .panel .grid,\n .panel .strip {\n display: flex;\n gap: var(--sealpixel-space);\n overflow-x: auto;\n scrollbar-width: none;\n padding-bottom: 2px;\n scroll-snap-type: x proximity;\n }\n .panel .grid::-webkit-scrollbar,\n .panel .strip::-webkit-scrollbar {\n display: none;\n }\n .panel .grid > *,\n .panel .strip > * {\n flex: 0 0 auto;\n min-width: 96px;\n scroll-snap-align: start;\n }\n .panel .strip > * {\n min-width: 0;\n }\n /*\n * The strip centres while it fits and scrolls from the first item once\n * it does not, so a short row of presets is not stranded at the left\n * edge of a wide bar.\n */\n .panel .strip {\n justify-content: safe center;\n align-items: end;\n scroll-behavior: smooth;\n }\n .panel .chips {\n gap: 2px;\n }\n /*\n * A segmented control: one pill holds the row, the segments share it. Six\n * separate buttons put six borders in a row and made the choice look like\n * six unrelated actions; one container says they are one decision with\n * one answer at a time.\n */\n .panel .group {\n display: inline-flex;\n gap: 2px;\n padding: 2px;\n background: var(--sealpixel-color-surface-2);\n border-radius: var(--sealpixel-radius-pill);\n flex: 0 0 auto;\n }\n .panel .group sealpixel-button::part(button) {\n background: transparent;\n border-color: transparent;\n min-height: calc(var(--sealpixel-control-height) - 4px);\n min-width: calc(var(--sealpixel-control-height) - 4px);\n padding: 0 calc(var(--sealpixel-space) * 1.25);\n }\n .panel .group sealpixel-button:hover::part(button) {\n background: color-mix(in srgb, var(--sealpixel-color-fg) 7%, transparent);\n }\n .panel .group sealpixel-button[pressed]::part(button) {\n background: var(--sealpixel-color-surface);\n color: var(--sealpixel-color-accent);\n box-shadow: var(--sealpixel-shadow-sm, none);\n }\n\n /* Filter tiles: the image is the control, the label only names it. */\n .panel .tiles {\n gap: calc(var(--sealpixel-space) * 0.75);\n }\n /*\n * The one control in the bar that gets bigger. Everywhere else the chrome\n * shrank; here the chrome is the point, because a preset is judged by\n * looking at it.\n */\n .panel .thumb {\n display: block;\n width: 100%;\n height: 64px;\n object-fit: cover;\n border-radius: var(--sealpixel-radius);\n background: var(--sealpixel-color-surface-2);\n box-shadow: 0 0 0 1px var(--sealpixel-color-border);\n transition:\n box-shadow var(--sealpixel-duration) var(--sealpixel-ease),\n transform var(--sealpixel-duration) var(--sealpixel-ease-spring);\n }\n .panel .tiles sealpixel-button {\n min-width: 84px;\n max-width: 84px;\n }\n .panel .tiles sealpixel-button::part(button) {\n flex-direction: column;\n gap: 6px;\n padding: 0;\n min-height: 0;\n height: auto;\n font-size: 11px;\n background: transparent;\n color: var(--sealpixel-color-fg-muted);\n }\n .panel .tiles sealpixel-button:hover .thumb {\n transform: translateY(-2px);\n }\n .panel .tiles sealpixel-button[pressed] .thumb {\n box-shadow:\n 0 0 0 2px var(--sealpixel-color-surface),\n 0 0 0 4px var(--sealpixel-color-accent);\n }\n .panel .tiles sealpixel-button[pressed]::part(button) {\n background: transparent;\n border-color: transparent;\n color: var(--sealpixel-color-fg);\n }\n /* Separates the untouched image from the presets. */\n .panel .divider {\n flex: 0 0 auto;\n align-self: stretch;\n width: 1px;\n min-width: 1px;\n margin: 6px calc(var(--sealpixel-space) * 0.5);\n background: var(--sealpixel-color-border);\n opacity: 0.55;\n }\n .panel .row.compact > sealpixel-button {\n flex: 0 0 auto;\n min-width: 72px;\n }\n /* Phones: sibling groups share one line and hints make room for the stage. */\n .panel .rows {\n display: flex;\n gap: var(--sealpixel-space);\n align-items: end;\n }\n /*\n * Content width, not an equal share. An equal share squeezed a text field\n * and a colour well down to a few pixels each and their labels ran into\n * one another; only a dial has a reason to take the leftover room.\n */\n .panel .rows > * {\n flex: 0 1 auto;\n min-width: 0;\n }\n /*\n * A dial needs travel to be worth dragging. Inside a settings row it was\n * sharing the width equally with a colour swatch and a checkbox and ended\n * up a few ticks wide, which is not a control any more. The row grows to\n * give it that width instead of shrinking to its contents.\n */\n /*\n * A settings row scrolls sideways when it is wider than the bar, the way\n * the choice row does. Letting it overflow instead left the last control\n * cut off at the edge with nothing to say it was there.\n */\n .panel > .rows {\n flex: 0 1 auto;\n max-width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-width: none;\n scroll-behavior: smooth;\n padding-bottom: 1px;\n }\n .panel > .rows::-webkit-scrollbar {\n display: none;\n }\n .panel > .rows > * {\n flex-shrink: 0;\n }\n .panel .rows > sealpixel-slider {\n flex: 0 1 260px;\n min-width: 220px;\n }\n .panel .rows .row {\n flex-wrap: nowrap;\n }\n .panel .rows .row > sealpixel-button {\n flex: 1 1 0;\n min-width: 0;\n }\n /*\n * A field fills its label, but never shrinks to nothing: a text box a\n * few pixels wide hides what was typed into it, and a select that narrow\n * hides which option is chosen.\n */\n .panel .rows select,\n .panel .rows input:not([type='checkbox']):not([type='color']) {\n width: 100%;\n min-width: 7em;\n }\n .panel .rows input[type='text'],\n .panel .rows textarea {\n min-width: 11em;\n }\n .panel .rows > .field:has(input[type='color']),\n .panel .rows > .field.check {\n flex: 0 0 auto;\n }\n /* A colour well is square, which makes the disc round. */\n .panel .rows > .field:has(input[type='color']) input {\n width: var(--sealpixel-control-height);\n aspect-ratio: 1;\n }\n .panel .swatches {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-bottom: 6px;\n }\n .panel .swatch {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n border: 0;\n box-shadow: 0 0 0 1px var(--sealpixel-color-border);\n cursor: pointer;\n padding: 0;\n transition:\n transform var(--sealpixel-duration) var(--sealpixel-ease-spring),\n border-color var(--sealpixel-transition),\n box-shadow var(--sealpixel-duration) var(--sealpixel-ease);\n }\n .panel .swatch:hover {\n transform: scale(1.12);\n }\n .panel .swatch:active {\n transform: scale(0.94);\n }\n /* The ring sits off the disc, so the colour itself is never covered. */\n .panel .swatch[aria-pressed='true'] {\n box-shadow:\n 0 0 0 2px var(--sealpixel-color-surface),\n 0 0 0 3.5px var(--sealpixel-color-accent);\n }\n .panel:empty {\n display: none;\n }\n .toast {\n position: absolute;\n left: 50%;\n bottom: calc(var(--sealpixel-toolbar-size) + var(--sealpixel-space) * 2);\n /* Sits above the stage, never over the bar the user is working in. */\n transform: translateX(-50%);\n display: flex;\n align-items: center;\n gap: var(--sealpixel-space);\n max-width: calc(100% - var(--sealpixel-space) * 4);\n padding: calc(var(--sealpixel-space) * 1.25) calc(var(--sealpixel-space) * 2);\n border-radius: 999px;\n background: color-mix(in srgb, var(--sealpixel-color-surface) 92%, transparent);\n border: 1px solid var(--sealpixel-color-border);\n box-shadow: var(--sealpixel-shadow, 0 8px 24px rgba(0, 0, 0, 0.3));\n color: var(--sealpixel-color-fg);\n font-size: 13px;\n white-space: nowrap;\n backdrop-filter: blur(8px);\n cursor: pointer;\n z-index: 2;\n animation: sealpixel-toast-in var(--sealpixel-duration) var(--sealpixel-ease-out) both;\n }\n .toast:hover {\n border-color: var(--sealpixel-color-fg-muted);\n }\n .toast code {\n font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;\n color: var(--sealpixel-color-fg-muted);\n padding: 2px 8px;\n border-radius: 999px;\n background: var(--sealpixel-color-surface-2);\n }\n @keyframes sealpixel-toast-in {\n from {\n opacity: 0;\n transform: translate(-50%, 12px) scale(0.96);\n }\n }\n /*\n * Wide layouts move the tool rail to the left edge and nothing else. The\n * panel stays a bottom bar at every width, so a control sits in the same\n * place on a phone and on a desktop, and the stage keeps the full width\n * it needs for a landscape image.\n */\n @container (min-width: 48rem) {\n /*\n * The rail runs the full height beside both the stage and the bar.\n * Stopping it above the bar cost it the bar's height, and with ten or\n * more tools the last of them ended up scrolled out of sight behind\n * the settings of the one already open.\n */\n .root {\n grid-template:\n 'nav nav' auto\n 'toolbar stage' 1fr\n 'toolbar panel' auto / var(--sealpixel-toolbar-size) 1fr;\n }\n .panel {\n height: max(var(--sealpixel-panel-size), var(--sealpixel-panel-fit, 0px));\n padding: var(--sealpixel-space) calc(var(--sealpixel-space) * 2);\n }\n .panel[data-empty] {\n height: 0;\n padding: 0;\n }\n .toast {\n bottom: calc(var(--sealpixel-space) * 2);\n }\n }\n .panel .row {\n display: flex;\n gap: var(--sealpixel-space);\n flex-wrap: wrap;\n }\n .panel > .choice {\n order: 2;\n flex: 1 1 100%;\n justify-content: safe center;\n /*\n * Pinned to the foot of the bar. The choice is what gets the user out\n * of the tool they are in, so it has to stay reachable even when a\n * busy panel scrolls its settings.\n */\n position: sticky;\n bottom: 0;\n z-index: 1;\n background: var(--sealpixel-color-surface);\n padding-top: 4px;\n /*\n * One line that scrolls, never two that wrap. A wrapped second line\n * falls below the bar and takes whatever was on it out of reach, and\n * on a phone that was the reset button.\n */\n flex-wrap: nowrap;\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-width: none;\n scroll-behavior: smooth;\n }\n .panel > .choice::-webkit-scrollbar {\n display: none;\n }\n .panel > .choice > * {\n flex-shrink: 0;\n }\n .panel .field {\n display: grid;\n gap: 3px;\n justify-items: center;\n color: var(--sealpixel-color-fg-muted);\n }\n /* The label names the control; it is not the thing being read. */\n .panel .field > span,\n .panel .field > .lab {\n font-size: 11px;\n letter-spacing: 0.012em;\n line-height: 1.2;\n }\n .panel .hint {\n margin: 0;\n color: var(--sealpixel-color-fg-muted);\n font-size: 12px;\n }\n /*\n * Width and height are one measurement, so they sit against the link that\n * binds them rather than being two fields that happen to be adjacent.\n */\n .panel .dims {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n .panel .dims input[type='number'] {\n width: 5.5em;\n min-width: 0;\n text-align: center;\n font-variant-numeric: tabular-nums;\n appearance: textfield;\n }\n .panel .dims input::-webkit-outer-spin-button,\n .panel .dims input::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n }\n /* A value the link worked out, not one that was typed. */\n .panel .dims input.derived {\n color: var(--sealpixel-color-fg-muted);\n font-weight: 400;\n }\n .panel .dims sealpixel-button::part(button) {\n min-width: calc(var(--sealpixel-control-height) - 6px);\n min-height: calc(var(--sealpixel-control-height) - 6px);\n padding: 0;\n background: transparent;\n color: var(--sealpixel-color-fg-muted);\n }\n .panel .dims sealpixel-button[pressed]::part(button) {\n background: var(--sealpixel-color-accent-soft);\n color: var(--sealpixel-color-accent);\n }\n .panel .anchors {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 4px;\n max-width: 180px;\n }\n .panel .field.check {\n grid-template-columns: auto 1fr;\n align-items: center;\n }\n .panel textarea {\n font: inherit;\n color: var(--sealpixel-color-fg);\n background: var(--sealpixel-color-surface-2);\n border: 1px solid var(--sealpixel-color-border);\n border-radius: var(--sealpixel-radius-sm);\n padding: var(--sealpixel-space);\n resize: vertical;\n }\n /* A colour is a disc, not a box: it shows the colour and nothing else. */\n .panel input[type='color'] {\n /* Without this the engine keeps its own swatch metrics inside the box\n and the disc comes out an ellipse. */\n appearance: none;\n min-height: var(--sealpixel-control-height);\n height: var(--sealpixel-control-height);\n width: var(--sealpixel-control-height);\n padding: 0;\n border: 0;\n border-radius: 50%;\n background: transparent;\n cursor: pointer;\n overflow: hidden;\n }\n /* The swatch has to be told to fill the box; it does not by default. */\n .panel input[type='color']::-webkit-color-swatch-wrapper {\n padding: 0;\n width: 100%;\n height: 100%;\n }\n .panel input[type='color']::-webkit-color-swatch {\n width: 100%;\n height: 100%;\n border: 0;\n border-radius: 50%;\n box-shadow: 0 0 0 1px var(--sealpixel-color-border);\n }\n .panel input[type='color']::-moz-color-swatch {\n width: 100%;\n height: 100%;\n border: 0;\n border-radius: 50%;\n box-shadow: 0 0 0 1px var(--sealpixel-color-border);\n }\n .panel input:not([type='checkbox']):not([type='color']),\n .panel select {\n font: inherit;\n font-size: 13px;\n color: var(--sealpixel-color-fg);\n background: var(--sealpixel-color-surface-2);\n border: 1px solid transparent;\n border-radius: var(--sealpixel-radius-pill);\n min-height: var(--sealpixel-control-height);\n padding: 0 calc(var(--sealpixel-space) * 1.5);\n }\n /*\n * The chevron is drawn rather than left to the platform, so a select sits\n * next to a pill button instead of looking like a form field that walked\n * in from another page. The right padding keeps the text off it.\n */\n .panel select {\n appearance: none;\n padding-right: calc(var(--sealpixel-space) * 3);\n background-image:\n linear-gradient(45deg, transparent 50%, currentColor 50%),\n linear-gradient(135deg, currentColor 50%, transparent 50%);\n background-size: 5px 5px, 5px 5px;\n background-position:\n right 14px top 52%,\n right 10px top 52%;\n background-repeat: no-repeat;\n color: var(--sealpixel-color-fg);\n }\n .empty {\n grid-area: stage;\n display: grid;\n place-content: center;\n gap: var(--sealpixel-space);\n text-align: center;\n color: var(--sealpixel-color-fg-muted);\n padding: var(--sealpixel-space);\n }\n .empty {\n transition:\n background var(--sealpixel-duration) var(--sealpixel-ease),\n color var(--sealpixel-duration) var(--sealpixel-ease);\n }\n .empty.dragover {\n outline: 2px dashed var(--sealpixel-color-accent);\n outline-offset: -8px;\n background: var(--sealpixel-color-accent-soft, transparent);\n color: var(--sealpixel-color-fg);\n }\n .error {\n grid-area: nav;\n align-self: end;\n justify-self: center;\n margin-top: calc(var(--sealpixel-toolbar-size) + 4px);\n z-index: 1;\n padding: 6px 10px;\n border-radius: var(--sealpixel-radius);\n background: var(--sealpixel-color-danger);\n color: white;\n font-size: 12px;\n box-shadow: var(--sealpixel-shadow-raised, none);\n animation: sealpixel-panel-in var(--sealpixel-duration) var(--sealpixel-ease-out) both;\n }\n `,\n ];\n\n static override properties = {\n plugins: { attribute: false },\n pluginOptions: {\n attribute: 'plugin-options',\n converter: jsonAttribute<PluginOptionsMap>('plugin-options'),\n },\n session: { attribute: false },\n renderer: { attribute: false },\n assets: { attribute: false },\n limits: {\n attribute: 'limits',\n converter: jsonAttribute<NonNullable<SessionOptions['limits']>>('limits'),\n },\n src: { attribute: false },\n editLog: { attribute: false },\n defaultEditLog: { attribute: false },\n output: { attribute: false },\n theme: { type: String, reflect: true },\n locale: { type: String },\n dictionary: { attribute: false },\n tools: { attribute: false },\n activeTool: { type: String, attribute: 'active-tool' },\n showExport: { type: String, attribute: 'show-export' },\n showDownload: { type: String, attribute: 'show-download' },\n showHistory: { type: String, attribute: 'show-history' },\n downloadLabel: { type: String, attribute: 'download-label' },\n _busy: { state: true },\n _processListeners: { state: true },\n _toast: { state: true },\n _dragover: { state: true },\n _wide: { state: true },\n _pluginTools: { state: true },\n };\n\n declare plugins: readonly AnyPlugin[] | null;\n /** `{ pluginId: partialOptions }` applied to `plugins` (or the defaults) through each plugin's `configure()`. */\n declare pluginOptions: PluginOptionsMap | null;\n declare session: EditorSession | null;\n declare renderer: Renderer | null;\n /** Fonts and images. Defaults to a fetch resolver over the plugins' declarations. */\n declare assets: AssetResolver | null;\n /**\n * How much of the original stays in the browser; `SessionOptions['limits']`\n * (JSON in the attribute). Above `maxClientMegapixels` (16 by default) the\n * image is not resident: Export and Download are disabled, and the host\n * renders the original outside the browser.\n */\n declare limits: SessionOptions['limits'] | null;\n declare src: EditorSource | null;\n /** Controlled mode: the host owns the log. */\n declare editLog: unknown;\n /** Uncontrolled: applied once on load. */\n declare defaultEditLog: unknown;\n declare output: OutputOptions;\n declare theme: 'dark' | 'light' | 'auto';\n declare locale: string;\n /** Overrides the shipped dictionary for `locale`; shipped locales resolve automatically. */\n declare dictionary: Dictionary | null;\n declare tools: Record<string, UiTool> | null;\n declare activeTool: string | null;\n /**\n * When the Export button is shown. `auto` (default) shows it only while a\n * `sealpixel:process` listener is attached, because Export hands the result to\n * the host and does nothing visible otherwise. Download is always shown.\n */\n declare showExport: 'auto' | 'always' | 'never';\n /** `always` (default) or `never`. Hosts that only consume `sealpixel:process` hide the button. */\n declare showDownload: 'always' | 'never';\n /** `all` (default), `buttons` (undo and redo, no timeline) or `none` (also disables the undo/redo shortcuts). */\n declare showHistory: 'all' | 'buttons' | 'none';\n /** Custom text for the Download button; the localized label when null. */\n declare downloadLabel: string | null;\n declare _busy: boolean;\n declare _processListeners: number;\n declare _toast: { text: string; hash: string } | null;\n declare _dragover: boolean;\n declare _wide: boolean;\n /** Tools loaded from `plugin.tool()`, keyed by plugin id. */\n declare _pluginTools: Record<string, UiTool>;\n private resizeObserver: ResizeObserver | null = null;\n private toolLoads = new Set<string>();\n\n /**\n * Used when no `renderer` property is set. `@sealpixel/element` installs a\n * factory that starts the bundled worker; without it the editor renders inline.\n */\n static defaultRendererFactory: ((plugins: readonly AnyPlugin[]) => Renderer) | null = null;\n\n private readonly ctl = new SessionController(this, null);\n private i18n: I18n = createI18n('en');\n private ownsSession = false;\n private lastEmittedVersion = -1;\n private lastAppliedControlled = '';\n private hint: { filter?: string; transform?: string; rotate?: number } | null = null;\n private previousTool: UiTool | null = null;\n /** The source the tools last heard about; `load` replaces the object, so identity is the guard. */\n private lastSource: SourceDescriptor | null = null;\n private loadedSrc: EditorSource | null = null;\n /** The edit log of a session released while the element was out of the document. */\n private detachedLog: { log: unknown; index: number } | null = null;\n /** Whether the owned session was released while the element was out of the document. */\n private released = false;\n\n constructor() {\n super();\n this.plugins = null;\n this.pluginOptions = null;\n this.session = null;\n this.renderer = null;\n this.assets = null;\n this.limits = null;\n this.src = null;\n this.editLog = undefined;\n this.defaultEditLog = undefined;\n this.output = { format: 'image/png' };\n this.theme = 'dark';\n this.locale = 'en';\n this.dictionary = null;\n this.tools = null;\n this.activeTool = null;\n this.showExport = 'auto';\n this.showDownload = 'always';\n this.showHistory = 'all';\n this.downloadLabel = null;\n this._busy = false;\n this._processListeners = 0;\n this._toast = null;\n this._dragover = false;\n this._wide = false;\n this._pluginTools = {};\n }\n\n // Export hands the result to the host, so the button is shown only while\n // someone listens for `sealpixel:process`. Listener counts are tracked here.\n override addEventListener<K extends keyof HTMLElementEventMap>(\n type: K,\n listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => unknown,\n options?: boolean | AddEventListenerOptions,\n ): void;\n override addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): void;\n override addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | ((ev: Event) => unknown),\n options?: boolean | AddEventListenerOptions,\n ): void {\n super.addEventListener(type, listener as EventListenerOrEventListenerObject, options);\n if (type === 'sealpixel:process') this._processListeners += 1;\n }\n\n override removeEventListener<K extends keyof HTMLElementEventMap>(\n type: K,\n listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => unknown,\n options?: boolean | EventListenerOptions,\n ): void;\n override removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): void;\n override removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | ((ev: Event) => unknown),\n options?: boolean | EventListenerOptions,\n ): void {\n super.removeEventListener(type, listener as EventListenerOrEventListenerObject, options);\n if (type === 'sealpixel:process' && this._processListeners > 0) this._processListeners -= 1;\n }\n\n /** A renderer the editor made through the factory dies with the session; a host's renderer lives on. */\n private disposeOwnedRenderer(): void {\n if (this.sessionRenderer && this.sessionRenderer !== this.renderer) {\n this.sessionRenderer.dispose();\n }\n this.sessionRenderer = null;\n }\n\n /** `plugins` (or the defaults) with `pluginOptions` applied. Invalid options raise `sealpixel:error`. */\n private effectivePlugins(): readonly AnyPlugin[] {\n const base = this.plugins ?? defaultPlugins;\n if (!this.pluginOptions) return base;\n try {\n return configurePlugins(base, this.pluginOptions);\n } catch (error) {\n this.dispatchEvent(\n new CustomEvent('sealpixel:error', { detail: error, bubbles: true, composed: true }),\n );\n return base;\n }\n }\n\n /** The live session, created on first connection when none was passed. */\n getSession(): EditorSession {\n if (!this.ctl.session) this.ensureSession();\n return this.ctl.session as EditorSession;\n }\n getEditLog() {\n return this.getSession().getEditLog();\n }\n setEditLog(saved: unknown, index?: number) {\n this.getSession().setEditLog(saved, index);\n }\n undo() {\n this.getSession().undo();\n }\n redo() {\n this.getSession().redo();\n }\n timeTravel(index: number) {\n this.getSession().timeTravel(index);\n }\n async export(output: OutputOptions = this.output, options: { embedEditLog?: boolean } = {}) {\n return this.getSession().export({ output, ...options });\n }\n async download(\n options: { output?: OutputOptions; filename?: string; embedEditLog?: boolean } = {},\n ) {\n return this.getSession().download({ output: this.output, ...options });\n }\n\n private ensureSession(): void {\n if (this.ctl.session) return;\n if (this.session) {\n this.ctl.session = this.session;\n return;\n }\n const plugins = this.effectivePlugins();\n const renderer = this.renderer ?? SealpixelEditor.defaultRendererFactory?.(plugins) ?? null;\n this.sessionRenderer = renderer;\n const assets =\n this.assets ?? createAssetResolver({ assets: plugins.flatMap((p) => p.assets ?? []) });\n this.sessionAssets = this.assets;\n this.sessionLimits = this.limits;\n const session = createEditorSession({\n plugins,\n assets,\n ...(renderer ? { renderer } : {}),\n ...(this.limits ? { limits: this.limits } : {}),\n });\n this.ownsSession = true;\n this.ctl.session = session;\n this.dispatchEvent(new CustomEvent('sealpixel:ready', { bubbles: true, composed: true }));\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.ensureSession();\n // Out of the document long enough to lose the session: the source comes\n // back with the edit log it had when it left.\n if (this.released) {\n const restore = this.detachedLog ?? undefined;\n this.released = false;\n this.detachedLog = null;\n if (this.loadedSrc) void this.loadSource(this.loadedSrc, restore);\n }\n // Keyboard shortcuts need focus inside the editor. WebKit does not focus\n // buttons on click, so pull focus in on any pointer interaction.\n if (!this.hasAttribute('tabindex')) this.tabIndex = -1;\n this.addEventListener('keydown', this.onKeydown);\n this.addEventListener('pointerdown', this.onPointerDown);\n this.resizeObserver = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? this.clientWidth;\n this._wide = width >= 768;\n });\n this.resizeObserver.observe(this);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this.onKeydown);\n this.removeEventListener('pointerdown', this.onPointerDown);\n this.resizeObserver?.disconnect();\n // A move in the DOM (an append into another parent, a portal, a keyed\n // reorder) disconnects and connects again in the same task. Disposing here\n // would throw the image and its history away on every move, so the\n // session goes only if the element is still out after the task.\n if (this.ownsSession) {\n queueMicrotask(() => {\n if (!this.isConnected) this.releaseSession();\n });\n }\n }\n\n /** Disposes the owned session and keeps its edit log for a later connection. */\n private releaseSession(): void {\n const session = this.ctl.session;\n if (!this.ownsSession || !session) return;\n this.released = true;\n this.detachedLog = session.getState().status === 'ready' ? session.getEditLog() : null;\n session.dispose();\n this.disposeOwnedRenderer();\n this.ctl.session = null;\n this.ownsSession = false;\n this.lastEmittedVersion = -1;\n this.lastSource = null;\n // The tools activate again on the session that replaces this one.\n this.previousTool = null;\n }\n\n override willUpdate(changed: Map<string, unknown>): void {\n if (changed.has('locale') || changed.has('dictionary')) {\n // A dictionary changes the strings it names; every other string stays\n // in the shipped locale.\n this.i18n = createI18n(this.locale, {\n ...resolveLocale(this.locale),\n ...(this.dictionary ?? {}),\n });\n }\n if (changed.has('session') && this.session && this.session !== this.ctl.session) {\n if (this.ownsSession) {\n this.ctl.session?.dispose();\n this.disposeOwnedRenderer();\n }\n this.ownsSession = false;\n this.ctl.session = this.session;\n }\n // A new plugin list or renderer needs a new session; reload the current source into it.\n if (\n (changed.has('plugins') ||\n changed.has('pluginOptions') ||\n changed.has('renderer') ||\n changed.has('assets') ||\n changed.has('limits')) &&\n this.ownsSession &&\n !this.sessionMatchesProps()\n ) {\n this.ctl.session?.dispose();\n this.disposeOwnedRenderer();\n this.ctl.session = null;\n this.ownsSession = false;\n this.toolLoads.clear();\n this._pluginTools = {};\n this.lastEmittedVersion = -1;\n this.lastSource = null;\n this.ensureSession();\n if (this.loadedSrc) void this.loadSource(this.loadedSrc);\n }\n if (changed.has('src') && this.src && this.src !== this.loadedSrc) {\n this.loadedSrc = this.src;\n void this.loadSource(this.src);\n }\n if (changed.has('editLog') && this.editLog != null) this.applyControlled();\n }\n\n override updated(): void {\n const state = this.ctl.state;\n const session = this.ctl.session;\n if (!state || !session) return;\n if (state.version !== this.lastEmittedVersion && state.status === 'ready') {\n this.lastEmittedVersion = state.version;\n const detail = session.getEditLog();\n this.lastAppliedControlled = canonicalJson(detail);\n this.dispatchEvent(\n new CustomEvent('sealpixel:change', { detail, bubbles: true, composed: true }),\n );\n }\n if (state.error && state.error !== this.lastError) {\n this.lastError = state.error;\n this.dispatchEvent(\n new CustomEvent('sealpixel:error', { detail: state.error, bubbles: true, composed: true }),\n );\n }\n this.syncActiveTool();\n this.syncSource(state);\n this.syncPanelFill();\n }\n private lastError: unknown = null;\n\n /** Tells every tool, active or not, that a new source has loaded. Once per source. */\n private syncSource(state: SessionState): void {\n if (state.status !== 'ready' || !state.source || state.source === this.lastSource) return;\n this.lastSource = state.source;\n const ctx = this.toolContext(state);\n for (const tool of this.currentTools()) tool.onSource?.(ctx);\n }\n\n /**\n * Collapses the settings bar when the open tool has nothing to put in it.\n *\n * A tool renders its own structure, and a structure can hold nothing: crop\n * with `rotation`, `flip` and `reset` off and a single enforced aspect emits\n * two empty wrappers. The bar is a fixed height on purpose — see `.panel` —\n * so that reserved an empty bordered surface and took the same height off\n * the stage. On the landing page's avatar card that was 240 px of nothing\n * against a 178 px stage, and the photo rendered at 10 percent.\n *\n * Read from the DOM rather than asked of the tool: every tool would\n * otherwise have to declare it, and a tool whose panel empties out only\n * under some options would get it wrong.\n *\n * Not measured by size either. The empty wrappers still lay out — the row\n * is 8px from its own gap and the group 4px from its border — so a\n * bounding box tells content and scaffolding apart not at all. What counts\n * is a control or a word: a custom element, a form control, or any text.\n */\n private syncPanelFill(): void {\n const panel = this.renderRoot.querySelector('.panel') as HTMLElement | null;\n if (!panel) return;\n const filled =\n (panel.textContent ?? '').trim().length > 0 ||\n Array.from(panel.querySelectorAll('*')).some(\n (node) => node.tagName.includes('-') || node.matches(PANEL_CONTENT),\n );\n panel.toggleAttribute('data-empty', !filled);\n this.syncPanelFit(panel, filled);\n }\n\n /**\n * Lets the settings bar grow to the height its content needs.\n *\n * The bar is a fixed height so that moving between tools does not resize\n * the stage under the user. When a tool needs more than that height, the\n * overflow has nowhere to go: a wrapping flex container of fixed height has\n * no scrollable cross-axis overflow, so `overflow: auto` never produces a\n * scrollbar, and the sticky choice row — which pins itself inside the\n * scrollport — is dragged up over the settings instead. The colour swatch\n * ends up half covered and the fill toggle disappears behind the shapes.\n *\n * WebKit is where this surfaced, on a real iPhone: it lays these controls\n * taller than Blink does, and at phone width crop, finetune and annotate\n * needed 138, 140 and 136 pixels against the 112 the bar had. Raising the\n * default would have taken those pixels off every stage in every engine, so\n * the height is measured instead and only the bar that needs more gets it.\n * `34cqh` still caps it, so a busy tool cannot eat the stage.\n */\n private syncPanelFit(panel: HTMLElement, filled: boolean): void {\n panel.style.removeProperty('--sealpixel-panel-fit');\n if (!filled) return;\n // Read after the reset, so a bar that has since shrunk measures its own\n // content and not the height it was given last time.\n const needed = panel.scrollHeight;\n if (needed > panel.clientHeight) {\n panel.style.setProperty('--sealpixel-panel-fit', `${needed}px`);\n }\n }\n\n private async loadSource(src: EditorSource, restore?: unknown): Promise<void> {\n const session = this.getSession();\n try {\n // `null` is \"no saved log\", the same as `undefined`: framework props\n // commonly type an absent log as null.\n const saved = this.editLog ?? restore ?? this.defaultEditLog ?? undefined;\n const bytes = src instanceof Uint8Array ? src : src;\n const descriptor = await session.load(bytes, saved === undefined ? {} : { editLog: saved });\n // Option defaults become real ops in an otherwise empty log.\n if (saved === undefined && session.getState().history.log.ops.length === 0) {\n for (const op of session.registry.initialOps(descriptor)) {\n session.dispatch({\n ...op,\n id: `init-${Math.random().toString(36).slice(2, 8)}`,\n } as Parameters<typeof session.dispatch>[0]);\n }\n }\n this.dispatchEvent(\n new CustomEvent('sealpixel:load', { detail: descriptor, bubbles: true, composed: true }),\n );\n if (!this.activeTool) {\n const first = this.currentTools()[0];\n if (first) this.activeTool = first.id;\n }\n } catch (error) {\n // A newer `src` replaced this load. That load reports its own outcome.\n if ((error as Error | null)?.name === 'ABORTED') return;\n this.dispatchEvent(\n new CustomEvent('sealpixel:error', { detail: error, bubbles: true, composed: true }),\n );\n }\n }\n\n private applyControlled(): void {\n const session = this.ctl.session;\n if (!session || session.getState().status !== 'ready' || this.editLog == null) return;\n const wanted = this.editLog as { log?: unknown; index?: number };\n const key = canonicalJson(wanted);\n if (key === this.lastAppliedControlled) return;\n try {\n session.setEditLog(wanted, wanted.index);\n this.lastAppliedControlled = key;\n } catch (error) {\n this.dispatchEvent(\n new CustomEvent('sealpixel:error', { detail: error, bubbles: true, composed: true }),\n );\n }\n }\n\n /** Whether the owned session was built from the current `plugins`, `renderer`, `assets` and `limits`. */\n private sessionMatchesProps(): boolean {\n const session = this.ctl.session;\n if (!session) return false;\n if (this.renderer && this.renderer !== this.sessionRenderer) return false;\n if (this.assets && this.assets !== this.sessionAssets) return false;\n if (canonicalJson(this.limits ?? null) !== canonicalJson(this.sessionLimits ?? null))\n return false;\n // Compare id, version and resolved options (options JSON may contain commas, so no string splitting).\n const key = (plugins: readonly AnyPlugin[]) =>\n canonicalJson(\n [...plugins]\n .sort((a, b) => a.id.localeCompare(b.id))\n .map((p) => [p.id, p.version, p.options ?? null]),\n );\n return key(this.effectivePlugins()) === key(session.registry.plugins);\n }\n private sessionRenderer: Renderer | null = null;\n private sessionAssets: AssetResolver | null = null;\n private sessionLimits: SessionOptions['limits'] | null = null;\n\n private currentTools(): UiTool[] {\n const plugins = this.effectivePlugins();\n this.loadPluginTools(plugins);\n return toolsFor(plugins, { ...this._pluginTools, ...(this.tools ?? {}) });\n }\n\n /** Plugins may ship their own tool; load each once and re-render when it arrives. */\n private loadPluginTools(plugins: readonly AnyPlugin[]): void {\n for (const plugin of plugins) {\n if (!plugin.tool || this.toolLoads.has(plugin.id)) continue;\n this.toolLoads.add(plugin.id);\n plugin\n .tool()\n .then((tool) => {\n this._pluginTools = { ...this._pluginTools, [plugin.id]: tool as unknown as UiTool };\n })\n .catch((error) => {\n this.dispatchEvent(\n new CustomEvent('sealpixel:error', { detail: error, bubbles: true, composed: true }),\n );\n });\n }\n }\n\n private get stage(): SealpixelStage | null {\n return this.renderRoot.querySelector('sealpixel-stage');\n }\n\n private toolContext(state: SessionState): UiToolContext {\n const session = this.getSession();\n const stage = this.stage;\n return {\n session,\n state,\n document: state.document,\n dispatch: (op) => {\n try {\n session.dispatch(op);\n } catch (error) {\n // A tool asked for something the options forbid: tell the user, keep the log intact.\n if (error instanceof SealpixelError && error.name === 'OPTION_VIOLATION') {\n this._toast = { text: error.message, hash: '' };\n this.announce(error.message);\n return;\n }\n throw error;\n }\n },\n t: this.i18n.t,\n stage: {\n width: state.preview?.image.width ?? 0,\n height: state.preview?.image.height ?? 0,\n zoom: stage?.zoom ?? 1,\n geometry: state.preview?.geometry ?? null,\n toImage: (x, y) => stage?.toImage(x, y) ?? { x: 0, y: 0 },\n },\n hint: (hint) => {\n this.hint = hint;\n const s = this.stage;\n if (s) {\n s.hintFilter = hint?.filter ?? '';\n s.hintTransform = hint?.transform ?? '';\n s.hintRotate = hint?.rotate ?? 0;\n }\n },\n refresh: () => this.requestUpdate(),\n animateNextView: () => this.stage?.glideNextView(),\n clipPreview: (clip) => {\n const s = this.stage;\n if (s) s.clip = clip ?? '';\n },\n layout: this._wide ? 'wide' : 'narrow',\n options: <T>(pluginId: string) =>\n session.registry.byId.get(pluginId)?.options as T | undefined,\n };\n }\n\n private syncActiveTool(): void {\n const state = this.ctl.state;\n if (!state || state.status !== 'ready') return;\n const tool = this.currentTools().find((t) => t.id === this.activeTool) ?? null;\n if (tool === this.previousTool) return;\n const ctx = this.toolContext(state);\n this.previousTool?.deactivate?.(ctx);\n tool?.activate?.(ctx);\n this.previousTool = tool;\n }\n\n private onPointerDown = () => {\n if (!this.matches(':focus-within')) this.focus({ preventScroll: true });\n };\n\n private onKeydown = (e: KeyboardEvent) => {\n const session = this.ctl.session;\n if (!session || session.getState().status !== 'ready') return;\n // Undo inside a text field belongs to the field: it takes back the typing,\n // not the last edit of the image.\n if (isTextEntry(e.composedPath()[0])) return;\n const mod = e.metaKey || e.ctrlKey;\n if (this.showHistory === 'none') return;\n if (mod && e.key.toLowerCase() === 'z') {\n e.preventDefault();\n if (e.shiftKey) session.redo();\n else session.undo();\n } else if (mod && e.key.toLowerCase() === 'y') {\n e.preventDefault();\n session.redo();\n }\n };\n\n private async onExport(): Promise<void> {\n const session = this.getSession();\n this._busy = true;\n try {\n const result: ExportResult = await session.export({ output: this.output });\n this.dispatchEvent(\n new CustomEvent('sealpixel:process', { detail: result, bubbles: true, composed: true }),\n );\n this.toast('toast.exported', result);\n } catch (error) {\n this.dispatchEvent(\n new CustomEvent('sealpixel:error', { detail: error, bubbles: true, composed: true }),\n );\n } finally {\n this._busy = false;\n }\n }\n\n private async onDownload(): Promise<void> {\n const session = this.getSession();\n this._busy = true;\n try {\n const { result } = await session.download({ output: this.output });\n this.dispatchEvent(\n new CustomEvent('sealpixel:process', { detail: result, bubbles: true, composed: true }),\n );\n this.toast('toast.downloaded', result);\n } catch (error) {\n this.dispatchEvent(\n new CustomEvent('sealpixel:error', { detail: error, bubbles: true, composed: true }),\n );\n } finally {\n this._busy = false;\n }\n }\n\n private announce(text: string): void {\n const live = this.renderRoot.querySelector('#live');\n if (live) live.textContent = text;\n }\n\n private toastTimer: ReturnType<typeof setTimeout> | null = null;\n\n /** Brief confirmation over the stage: format, size and hash of the result. */\n private toast(\n key: 'toast.exported' | 'toast.downloaded',\n result: Pick<ExportResult, 'mimeType' | 'width' | 'height' | 'hash' | 'bytes'>,\n ): void {\n const format = result.mimeType.replace('image/', '').toUpperCase();\n const size = formatBytes(result.bytes.byteLength);\n const text = this.i18n.t(key, { format, width: result.width, height: result.height, size });\n this._toast = { text, hash: result.hash.slice(0, 12) };\n this.announce(text);\n if (this.toastTimer) clearTimeout(this.toastTimer);\n this.toastTimer = setTimeout(() => {\n this._toast = null;\n this.toastTimer = null;\n }, 5000);\n }\n\n private onFiles(files: FileList | null): void {\n const file = files?.[0];\n if (file) this.src = file;\n }\n\n override render() {\n const state = this.ctl.state;\n const tools = this.currentTools();\n const tool = tools.find((t) => t.id === this.activeTool) ?? null;\n const ready = state?.status === 'ready';\n const ctx = state && ready ? this.toolContext(state) : null;\n const badges: Record<string, number> = {};\n if (ctx) {\n for (const t of tools) {\n const n = t.badge?.(ctx);\n if (n) badges[t.id] = n;\n }\n }\n const wide = this._wide;\n return html`\n <div class=\"root\" part=\"root\">\n <sealpixel-nav\n part=\"nav\"\n exportparts=\"undo, redo, history, export, download, dimensions, button\"\n .state=${state}\n .t=${this.i18n.t}\n .busy=${this._busy}\n .canExport=${state?.resident ?? false}\n .showExport=${this.showExport === 'always' || (this.showExport === 'auto' && this._processListeners > 0)}\n .showDownload=${this.showDownload !== 'never'}\n .showHistory=${this.showHistory}\n .downloadLabel=${this.downloadLabel}\n @nav-undo=${() => this.getSession().undo()}\n @nav-redo=${() => this.getSession().redo()}\n @nav-time-travel=${(e: CustomEvent<number>) => this.getSession().timeTravel(e.detail)}\n @nav-export=${() => this.onExport()}\n @nav-download=${() => this.onDownload()}\n ></sealpixel-nav>\n ${\n ready\n ? html`<sealpixel-stage\n part=\"stage\"\n exportparts=\"viewport, canvas, overlay, status\"\n .preview=${state?.preview ?? null}\n .t=${this.i18n.t}\n .pending=${state?.previewPending ?? false}\n .overlay=${ctx && tool?.overlay ? tool.overlay(ctx) : null}\n @stage-view=${() => this.requestUpdate()}\n ></sealpixel-stage>`\n : this.renderEmpty(state)\n }\n <div class=\"panel\" part=\"panel\">${ctx && tool ? tool.panel(ctx) : nothing}</div>\n <sealpixel-toolbar\n part=\"toolbar\"\n exportparts=\"tool, badge\"\n .tools=${tools}\n .badges=${badges}\n .active=${this.activeTool}\n .t=${this.i18n.t}\n .orientation=${wide ? 'vertical' : 'horizontal'}\n @tool-select=${(e: CustomEvent<string>) => {\n this.activeTool = e.detail;\n }}\n ></sealpixel-toolbar>\n ${state?.error ? html`<div class=\"error\" role=\"alert\">${this.i18n.t('editor.error', { message: state.error.message })}</div>` : nothing}\n ${\n this._toast\n ? html`<div class=\"toast\" part=\"toast\" data-testid=\"toast\" @click=${() => {\n this._toast = null;\n }}>\n <span>${this._toast.text}</span>\n ${this._toast.hash ? html`<code>${this._toast.hash}</code>` : nothing}\n </div>`\n : nothing\n }\n <span id=\"live\" class=\"visually-hidden\" role=\"status\" aria-live=\"polite\"></span>\n </div>\n `;\n }\n\n private renderEmpty(state: SessionState | null): TemplateResult {\n if (state?.status === 'loading') {\n return html`<div class=\"empty\" part=\"empty\" role=\"status\">${this.i18n.t('editor.loading')}</div>`;\n }\n return html`<div\n class=\"empty ${this._dragover ? 'dragover' : ''}\"\n part=\"empty\"\n @dragover=${(e: DragEvent) => {\n e.preventDefault();\n this._dragover = true;\n }}\n @dragleave=${() => {\n this._dragover = false;\n }}\n @drop=${(e: DragEvent) => {\n e.preventDefault();\n this._dragover = false;\n this.onFiles(e.dataTransfer?.files ?? null);\n }}\n >\n <p>${this.i18n.t('editor.empty')}</p>\n <label>\n <input class=\"visually-hidden\" type=\"file\" accept=\"image/png,image/jpeg,image/webp\" @change=${(e: Event) => this.onFiles((e.target as HTMLInputElement).files)} />\n <sealpixel-button variant=\"primary\" @click=${(e: Event) => ((e.currentTarget as HTMLElement).previousElementSibling as HTMLInputElement).click()}>\n ${this.i18n.t('editor.choose')}\n </sealpixel-button>\n </label>\n </div>`;\n }\n}\n\n/** Input types that hold no text, so Cmd/Ctrl+Z on them has nothing of their own to undo. */\nconst NON_TEXT_INPUTS = new Set([\n 'button',\n 'checkbox',\n 'color',\n 'file',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit',\n]);\n\nfunction isTextEntry(target: EventTarget | undefined): boolean {\n if (!(target instanceof HTMLElement)) return false;\n if (target.isContentEditable || target instanceof HTMLTextAreaElement) return true;\n return target instanceof HTMLInputElement && !NON_TEXT_INPUTS.has(target.type);\n}\n\nfunction formatBytes(n: number): string {\n if (n < 1024) return `${n} B`;\n if (n < 1024 * 1024) return `${(n / 1024).toFixed(n < 10240 ? 1 : 0)} KB`;\n return `${(n / (1024 * 1024)).toFixed(1)} MB`;\n}\n"]}
@@ -45,4 +45,3 @@ export declare class SealpixelNav extends LitElement {
45
45
  render(): import("lit").TemplateResult<1>;
46
46
  private emit;
47
47
  }
48
- //# sourceMappingURL=sealpixel-nav.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sealpixel-nav.js","sourceRoot":"","sources":["../../src/components/sealpixel-nav.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,U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C,CAAC,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;;QAGlF,IAAI,CAAC,UAAU;YACb,CAAC,CAAC,IAAI,CAAA,+DAA+D,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,WAAW,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAC3K,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC;gCACJ;YACtB,CAAC,CAAC,OACN;QAEE,IAAI,CAAC,YAAY;YACf,CAAC,CAAC,IAAI,CAAA,mFAAmF,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,cAAc,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,WAAW,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;gBACzN,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC;gCAC9C;YACtB,CAAC,CAAC,OACN;KACD,CAAC;IACJ,CAAC;IAEO,IAAI,CAAC,IAAY,EAAE,MAAgB;QACzC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,OAAO,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAChG,CAAC","sourcesContent":["import type { SessionState } from '@sealpixel/core';\nimport { css, html, LitElement, nothing } from 'lit';\nimport { icons } from '../icons.js';\nimport { base } from '../theme.js';\n\n/** Undo, redo, history scrubber, export and download. */\nexport class SealpixelNav extends LitElement {\n static override styles = [\n base,\n css`\n :host {\n display: flex;\n align-items: center;\n gap: var(--sealpixel-space);\n padding: 4px var(--sealpixel-space);\n background: var(--sealpixel-color-surface);\n border-bottom: 1px solid var(--sealpixel-color-border);\n min-height: var(--sealpixel-toolbar-size);\n min-width: 0;\n container-type: inline-size;\n overflow: hidden;\n }\n sealpixel-button {\n flex: 0 0 auto;\n }\n .history {\n flex: 1;\n display: flex;\n align-items: center;\n gap: var(--sealpixel-space);\n min-width: 0;\n }\n input[type='range'] {\n flex: 1;\n min-width: 60px;\n accent-color: var(--sealpixel-color-accent);\n height: var(--sealpixel-touch-target);\n margin: 0;\n appearance: none;\n background: transparent;\n }\n input[type='range']::-webkit-slider-runnable-track {\n height: 3px;\n border-radius: 999px;\n background: var(--sealpixel-color-surface-3, var(--sealpixel-color-border));\n }\n input[type='range']::-moz-range-track {\n height: 3px;\n border-radius: 999px;\n background: var(--sealpixel-color-surface-3, var(--sealpixel-color-border));\n }\n input[type='range']::-webkit-slider-thumb {\n appearance: none;\n width: 16px;\n height: 16px;\n margin-top: -6.5px;\n border-radius: 50%;\n background: var(--sealpixel-color-accent);\n border: 3px solid var(--sealpixel-color-surface);\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);\n }\n input[type='range']::-moz-range-thumb {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: var(--sealpixel-color-accent);\n border: 3px solid var(--sealpixel-color-surface);\n }\n .status {\n color: var(--sealpixel-color-fg-muted);\n font-size: 12px;\n white-space: nowrap;\n font-variant-numeric: tabular-nums;\n }\n [part='dimensions'] {\n padding: 4px 10px;\n border-radius: 999px;\n background: var(--sealpixel-color-surface-2);\n }\n .spacer {\n flex: 1;\n }\n @container (max-width: 36rem) {\n .status {\n display: none;\n }\n sealpixel-button[part='export'] {\n display: none;\n }\n }\n `,\n ];\n\n static override properties = {\n state: { attribute: false },\n t: { attribute: false },\n busy: { type: Boolean },\n canExport: { type: Boolean },\n showExport: { type: Boolean },\n showDownload: { type: Boolean },\n showHistory: { type: String },\n downloadLabel: { type: String },\n };\n\n declare state: SessionState | null;\n declare t: (key: string, params?: Record<string, string | number>) => string;\n declare busy: boolean;\n declare canExport: boolean;\n /** False hides Export: nobody listens for the result. */\n declare showExport: boolean;\n /** False hides Download; hosts that only consume `sealpixel:process` set it. */\n declare showDownload: boolean;\n /** `all`: undo, redo and the timeline; `buttons`: undo and redo only; `none`: nothing. */\n declare showHistory: 'all' | 'buttons' | 'none';\n /** Overrides the localized Download label. */\n declare downloadLabel: string | null;\n\n constructor() {\n super();\n this.state = null;\n this.t = (k) => k;\n this.busy = false;\n this.canExport = true;\n this.showExport = true;\n this.showDownload = true;\n this.showHistory = 'all';\n this.downloadLabel = null;\n }\n\n override render() {\n const s = this.state;\n const ready = s?.status === 'ready';\n const total = s?.history.log.ops.length ?? 0;\n const index = s?.history.index ?? 0;\n const out = s?.preview?.geometry.logicalOut;\n return html`\n ${\n this.showHistory === 'none'\n ? nothing\n : html`<sealpixel-button variant=\"ghost\" part=\"undo\" exportparts=\"button\" .label=${this.t('nav.undo')} ?disabled=${!ready || index === 0} @click=${() => this.emit('undo')}>${icons.undo}</sealpixel-button>\n <sealpixel-button variant=\"ghost\" part=\"redo\" exportparts=\"button\" .label=${this.t('nav.redo')} ?disabled=${!ready || index >= total} @click=${() => this.emit('redo')}>${icons.redo}</sealpixel-button>`\n }\n ${\n this.showHistory === 'all'\n ? html`<div class=\"history\">\n <input\n part=\"history\"\n type=\"range\"\n min=\"0\"\n max=${total}\n step=\"1\"\n .value=${String(index)}\n ?disabled=${!ready || total === 0}\n aria-label=${this.t('nav.history')}\n aria-valuetext=${`${index} / ${total}`}\n @input=${(e: Event) => this.emit('time-travel', Number((e.target as HTMLInputElement).value))}\n />\n <span class=\"status\" aria-hidden=\"true\">${index}/${total}</span>\n </div>`\n : html`<div class=\"spacer\"></div>`\n }\n <span class=\"status\" role=\"status\" aria-live=\"polite\" part=\"dimensions\">\n ${out ? this.t('status.dimensions', { width: out.width, height: out.height }) : ''}\n </span>\n ${\n this.showExport\n ? html`<sealpixel-button part=\"export\" exportparts=\"button\" .label=${this.t('nav.export')} ?disabled=${!ready || this.busy || !this.canExport} @click=${() => this.emit('export')}>\n ${this.t('nav.export')}\n </sealpixel-button>`\n : nothing\n }\n ${\n this.showDownload\n ? html`<sealpixel-button variant=\"primary\" part=\"download\" exportparts=\"button\" .label=${this.downloadLabel ?? this.t('nav.download')} ?disabled=${!ready || this.busy || !this.canExport} @click=${() => this.emit('download')}>\n ${icons.download} ${this.downloadLabel ?? this.t('nav.download')}\n </sealpixel-button>`\n : nothing\n }\n `;\n }\n\n private emit(name: string, detail?: unknown): void {\n this.dispatchEvent(new CustomEvent(`nav-${name}`, { detail, bubbles: true, composed: true }));\n }\n}\n"]}
@@ -72,4 +72,3 @@ export declare class SealpixelSlider extends LitElement {
72
72
  private onChange;
73
73
  private onKeydown;
74
74
  }
75
- //# sourceMappingURL=sealpixel-slider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sealpixel-slider.js","sourceRoot":"","sources":["../../src/components/sealpixel-slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,eAAgB,SAAQ,UAAU;aAC7B,WAAM,GAAG;QACvB,IAAI;QACJ,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkGF;KACF,AArGqB,CAqGpB;aAEc,eAAU,GAAG;QAC3B,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACvB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACvB,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACrB,GAAG,EAAE,EAAE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AAC,CAAC;IACnD,CAAC;IAED;;;OAGG;IACK,QAAQ,CAAC,CAAS;QACxB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;QACvC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5E,CAAC","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { base } from '../theme.js';\n\n/**\n * A value dial. The scale travels under a fixed needle the way a thumbwheel\n * does, instead of a thumb travelling along a rail, because the bar at the\n * bottom of the editor gives a control one row: the number stays in the same\n * place and the moving texture is what shows the change.\n *\n * Underneath it is still `input[type=range]`, so the control keeps native\n * keyboard handling, the `slider` role and the value semantics a screen reader\n * and an audit expect. The input does not take the pointer; the wrapper does,\n * and it moves the value by how far the pointer travelled rather than by where\n * it landed. Dragging a wheel is relative, and a range input is not.\n *\n * Emits `slide` while dragging (tier-A hints) and `commit` on release\n * (dispatch an op). Keyboard: arrows step, shift steps 10x.\n */\nexport class SealpixelSlider extends LitElement {\n static override styles = [\n base,\n css`\n :host {\n display: block;\n --tick: var(--sealpixel-color-fg-muted);\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: 11px;\n letter-spacing: 0.012em;\n }\n /* The value is the thing being read, so it keeps its size. */\n output {\n font-size: 13px;\n font-variant-numeric: tabular-nums;\n color: var(--sealpixel-color-fg);\n font-weight: 600;\n transition: color var(--sealpixel-transition);\n }\n .dial {\n position: relative;\n height: var(--sealpixel-control-height);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: none;\n /* The ends fade out, so the scale reads as a wheel and not as a rail. */\n mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);\n }\n :host([disabled]) .dial {\n cursor: default;\n opacity: 0.45;\n }\n /*\n * Twice the width of the dial, centred, with the range drawn across its\n * middle half. That leaves half a dial of blank scale at each end, which\n * is exactly the travel needed to bring either end of the range under\n * the needle in the centre.\n */\n .scale {\n position: absolute;\n inset: 0;\n left: -50%;\n width: 200%;\n background-image:\n linear-gradient(to right, var(--sealpixel-color-fg-muted) 0 2px, transparent 2px),\n repeating-linear-gradient(to right, var(--tick) 0 2px, transparent 2px 14px);\n background-size:\n 50% 40%,\n 50% 22%;\n background-position: center center;\n background-repeat: no-repeat;\n opacity: 0.45;\n transition: opacity var(--sealpixel-duration) var(--sealpixel-ease);\n }\n .dial:hover .scale {\n opacity: 0.7;\n }\n .needle {\n position: absolute;\n left: 50%;\n top: 18%;\n bottom: 18%;\n width: 2px;\n margin-left: -1px;\n border-radius: 2px;\n background: var(--sealpixel-color-accent);\n transition: transform var(--sealpixel-duration) var(--sealpixel-ease-spring);\n }\n .dial:active .needle {\n transform: scaleY(1.25);\n }\n /*\n * The input carries the keyboard and the semantics, never the pointer: a\n * range maps a click to where it landed, and a wheel has to move by how\n * far the pointer travelled instead.\n */\n input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n pointer-events: none;\n appearance: none;\n background: transparent;\n }\n .dial:has(input:focus-visible) {\n outline: 2px solid var(--sealpixel-color-focus);\n outline-offset: 2px;\n border-radius: var(--sealpixel-radius-sm);\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 format: { attribute: false },\n disabled: { type: Boolean, reflect: true },\n detent: { type: Number },\n };\n\n declare label: string;\n declare value: number;\n declare min: number;\n declare max: number;\n declare step: number;\n declare format: (v: number) => string;\n declare disabled: boolean;\n /** Value the dial snaps to when it passes close by, usually the neutral one. */\n declare detent: number | null;\n\n constructor() {\n super();\n this.label = '';\n this.value = 0;\n this.min = -1;\n this.max = 1;\n this.step = 0.01;\n this.format = (v) => v.toFixed(2);\n this.disabled = false;\n this.detent = null;\n }\n\n override render() {\n const id = 'slider';\n const span = this.max - this.min || 1;\n const t = (this.value - this.min) / span;\n // The scale is twice as wide as the dial, so half of it is one dial width.\n const travel = (0.5 - t) * 50;\n return html`\n <div class=\"row\">\n <label for=${id}>${this.label}</label>\n <output for=${id} aria-hidden=\"true\">${this.format(this.value)}</output>\n </div>\n <div\n class=\"dial\"\n part=\"dial\"\n @pointerdown=${this.onPointerDown}\n @pointermove=${this.onPointerMove}\n @pointerup=${this.onPointerEnd}\n @pointercancel=${this.onPointerEnd}\n @lostpointercapture=${this.onPointerEnd}\n >\n <div class=\"scale\" style=\"transform:translateX(${travel}%)\"></div>\n <div class=\"needle\"></div>\n <input\n part=\"input\"\n id=${id}\n type=\"range\"\n .value=${String(this.value)}\n min=${this.min}\n max=${this.max}\n step=${this.step}\n ?disabled=${this.disabled}\n aria-valuetext=${this.format(this.value)}\n @input=${this.onInput}\n @change=${this.onChange}\n @keydown=${this.onKeydown}\n />\n </div>\n `;\n }\n\n private dragging = false;\n\n private suppressChange = false;\n\n /** Client x where the current drag last moved the value. */\n private lastX = 0;\n\n private get input(): HTMLInputElement | null {\n return this.renderRoot.querySelector('input');\n }\n\n private clamp(v: number): number {\n return Math.min(this.max, Math.max(this.min, v));\n }\n\n /**\n * Rounds to the step, then pulls to the detent when the value passes close\n * to it. Without that, landing exactly on neutral takes luck.\n */\n private quantize(v: number): number {\n const stepped = this.step > 0 ? Math.round(v / this.step) * this.step : v;\n const exact = this.clamp(Number(stepped.toFixed(6)));\n if (this.detent === null) return exact;\n const span = this.max - this.min || 1;\n return Math.abs(exact - this.detent) < span * 0.015 ? this.detent : exact;\n }\n\n private onPointerDown = (e: PointerEvent) => {\n if (this.disabled || (e.button !== 0 && e.pointerType === 'mouse')) return;\n (e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);\n this.dragging = true;\n this.suppressChange = false;\n this.lastX = e.clientX;\n // The pointer never reaches the input, so focus it by hand: a drag should\n // leave the keyboard on the control the user just touched.\n this.input?.focus();\n };\n\n private onPointerMove = (e: PointerEvent) => {\n if (!this.dragging) return;\n const width = (e.currentTarget as HTMLElement).clientWidth || 1;\n // One dial width of travel covers the whole range, so a drag is as precise\n // as the rail it replaces.\n const moved = ((e.clientX - this.lastX) / width) * (this.max - this.min);\n const next = this.quantize(this.value + moved);\n if (next === this.value) return;\n this.lastX = e.clientX;\n this.value = next;\n this.dispatchEvent(new CustomEvent('slide', { detail: next, bubbles: true, composed: true }));\n };\n\n private onPointerEnd = (e: PointerEvent) => {\n if (!this.dragging) return;\n this.dragging = false;\n (e.currentTarget as HTMLElement).releasePointerCapture?.(e.pointerId);\n this.dispatchEvent(\n new CustomEvent('commit', { detail: this.value, bubbles: true, composed: true }),\n );\n // A `change` from the input can still arrive in a later task; it must not\n // commit the same value twice. Cleared by the next interaction.\n this.suppressChange = true;\n setTimeout(() => {\n this.suppressChange = false;\n }, 500);\n };\n\n private onInput = (e: Event) => {\n if (!this.dragging) this.suppressChange = false;\n this.value = Number((e.target as HTMLInputElement).value);\n this.dispatchEvent(\n new CustomEvent('slide', { detail: this.value, bubbles: true, composed: true }),\n );\n };\n\n private onChange = (e: Event) => {\n if (this.dragging || this.suppressChange) return;\n this.value = Number((e.target as HTMLInputElement).value);\n this.dispatchEvent(\n new CustomEvent('commit', { detail: this.value, bubbles: true, composed: true }),\n );\n };\n\n private onKeydown = (e: KeyboardEvent) => {\n this.suppressChange = false;\n if (!e.shiftKey) return;\n const dir =\n e.key === 'ArrowRight' || e.key === 'ArrowUp'\n ? 1\n : e.key === 'ArrowLeft' || e.key === 'ArrowDown'\n ? -1\n : 0;\n if (dir === 0) return;\n e.preventDefault();\n this.value = this.clamp(Number((this.value + dir * this.step * 10).toFixed(6)));\n this.dispatchEvent(\n new CustomEvent('commit', { detail: this.value, bubbles: true, composed: true }),\n );\n };\n}\n"]}
@@ -126,4 +126,3 @@ export declare class SealpixelStage extends LitElement {
126
126
  render(): TemplateResult<1>;
127
127
  }
128
128
  export {};
129
- //# sourceMappingURL=sealpixel-stage.d.ts.map