@sealpixel/ui 1.0.0-rc.13 → 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 (119) 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 +0 -1
  5. package/dist/components/sealpixel-editor.js.map +1 -1
  6. package/dist/components/sealpixel-nav.d.ts +0 -1
  7. package/dist/components/sealpixel-nav.js.map +1 -1
  8. package/dist/components/sealpixel-slider.d.ts +0 -1
  9. package/dist/components/sealpixel-slider.js.map +1 -1
  10. package/dist/components/sealpixel-stage.d.ts +0 -1
  11. package/dist/components/sealpixel-stage.js.map +1 -1
  12. package/dist/components/sealpixel-stepper.d.ts +0 -1
  13. package/dist/components/sealpixel-stepper.js.map +1 -1
  14. package/dist/components/sealpixel-toolbar.d.ts +0 -1
  15. package/dist/components/sealpixel-toolbar.js.map +1 -1
  16. package/dist/controllers/gesture-controller.d.ts +0 -1
  17. package/dist/controllers/gesture-controller.js.map +1 -1
  18. package/dist/controllers/session-controller.d.ts +0 -1
  19. package/dist/controllers/session-controller.js.map +1 -1
  20. package/dist/define.d.ts +0 -1
  21. package/dist/define.js.map +1 -1
  22. package/dist/i18n.d.ts +0 -1
  23. package/dist/i18n.js.map +1 -1
  24. package/dist/icons.d.ts +0 -1
  25. package/dist/icons.js.map +1 -1
  26. package/dist/index.d.ts +0 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/locales/de.d.ts +0 -1
  29. package/dist/locales/de.js.map +1 -1
  30. package/dist/locales/en.d.ts +0 -1
  31. package/dist/locales/en.js.map +1 -1
  32. package/dist/locales/es.d.ts +0 -1
  33. package/dist/locales/es.js.map +1 -1
  34. package/dist/locales/fr.d.ts +0 -1
  35. package/dist/locales/fr.js.map +1 -1
  36. package/dist/locales/index.d.ts +0 -1
  37. package/dist/locales/index.js.map +1 -1
  38. package/dist/locales/ja.d.ts +0 -1
  39. package/dist/locales/ja.js.map +1 -1
  40. package/dist/locales/pt.d.ts +0 -1
  41. package/dist/locales/pt.js.map +1 -1
  42. package/dist/theme.d.ts +0 -1
  43. package/dist/theme.js.map +1 -1
  44. package/dist/tool.d.ts +0 -1
  45. package/dist/tool.js.map +1 -1
  46. package/dist/tools/annotate.d.ts +0 -1
  47. package/dist/tools/annotate.js.map +1 -1
  48. package/dist/tools/assist.d.ts +0 -1
  49. package/dist/tools/assist.js.map +1 -1
  50. package/dist/tools/crop-mask.d.ts +0 -1
  51. package/dist/tools/crop-mask.js.map +1 -1
  52. package/dist/tools/crop-rotation.d.ts +0 -1
  53. package/dist/tools/crop-rotation.js.map +1 -1
  54. package/dist/tools/crop.d.ts +0 -1
  55. package/dist/tools/crop.js.map +1 -1
  56. package/dist/tools/delete-handle.d.ts +0 -1
  57. package/dist/tools/delete-handle.js.map +1 -1
  58. package/dist/tools/filter.d.ts +0 -1
  59. package/dist/tools/filter.js.map +1 -1
  60. package/dist/tools/finetune.d.ts +0 -1
  61. package/dist/tools/finetune.js.map +1 -1
  62. package/dist/tools/frame.d.ts +0 -1
  63. package/dist/tools/frame.js.map +1 -1
  64. package/dist/tools/handles.d.ts +0 -1
  65. package/dist/tools/handles.js.map +1 -1
  66. package/dist/tools/index.d.ts +0 -1
  67. package/dist/tools/index.js.map +1 -1
  68. package/dist/tools/redact.d.ts +0 -1
  69. package/dist/tools/redact.js.map +1 -1
  70. package/dist/tools/region-transform.d.ts +0 -1
  71. package/dist/tools/region-transform.js.map +1 -1
  72. package/dist/tools/resize.d.ts +0 -1
  73. package/dist/tools/resize.js.map +1 -1
  74. package/dist/tools/sticker.d.ts +0 -1
  75. package/dist/tools/sticker.js.map +1 -1
  76. package/dist/tools/watermark.d.ts +0 -1
  77. package/dist/tools/watermark.js.map +1 -1
  78. package/dist/view-mapping.d.ts +0 -1
  79. package/dist/view-mapping.js.map +1 -1
  80. package/package.json +4 -4
  81. package/dist/components/sealpixel-button.d.ts.map +0 -1
  82. package/dist/components/sealpixel-editor.d.ts.map +0 -1
  83. package/dist/components/sealpixel-nav.d.ts.map +0 -1
  84. package/dist/components/sealpixel-slider.d.ts.map +0 -1
  85. package/dist/components/sealpixel-stage.d.ts.map +0 -1
  86. package/dist/components/sealpixel-stepper.d.ts.map +0 -1
  87. package/dist/components/sealpixel-toolbar.d.ts.map +0 -1
  88. package/dist/controllers/gesture-controller.d.ts.map +0 -1
  89. package/dist/controllers/session-controller.d.ts.map +0 -1
  90. package/dist/define.d.ts.map +0 -1
  91. package/dist/i18n.d.ts.map +0 -1
  92. package/dist/icons.d.ts.map +0 -1
  93. package/dist/index.d.ts.map +0 -1
  94. package/dist/locales/de.d.ts.map +0 -1
  95. package/dist/locales/en.d.ts.map +0 -1
  96. package/dist/locales/es.d.ts.map +0 -1
  97. package/dist/locales/fr.d.ts.map +0 -1
  98. package/dist/locales/index.d.ts.map +0 -1
  99. package/dist/locales/ja.d.ts.map +0 -1
  100. package/dist/locales/pt.d.ts.map +0 -1
  101. package/dist/theme.d.ts.map +0 -1
  102. package/dist/tool.d.ts.map +0 -1
  103. package/dist/tools/annotate.d.ts.map +0 -1
  104. package/dist/tools/assist.d.ts.map +0 -1
  105. package/dist/tools/crop-mask.d.ts.map +0 -1
  106. package/dist/tools/crop-rotation.d.ts.map +0 -1
  107. package/dist/tools/crop.d.ts.map +0 -1
  108. package/dist/tools/delete-handle.d.ts.map +0 -1
  109. package/dist/tools/filter.d.ts.map +0 -1
  110. package/dist/tools/finetune.d.ts.map +0 -1
  111. package/dist/tools/frame.d.ts.map +0 -1
  112. package/dist/tools/handles.d.ts.map +0 -1
  113. package/dist/tools/index.d.ts.map +0 -1
  114. package/dist/tools/redact.d.ts.map +0 -1
  115. package/dist/tools/region-transform.d.ts.map +0 -1
  116. package/dist/tools/resize.d.ts.map +0 -1
  117. package/dist/tools/sticker.d.ts.map +0 -1
  118. package/dist/tools/watermark.d.ts.map +0 -1
  119. 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,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;QACxC,KAAK,EAAE,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AAI,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"]}
@@ -275,4 +275,3 @@ export declare class SealpixelEditor extends LitElement {
275
275
  render(): TemplateResult<1>;
276
276
  private renderEmpty;
277
277
  }
278
- //# sourceMappingURL=sealpixel-editor.d.ts.map
@@ -1 +1 @@
1
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K,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,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,C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AAE;;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,IAAI,EAAE,MAAM,EAAE;QACrB,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACtB,MAAM,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;QAC5B,QAA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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
@@ -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,sCAAsC,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAEL,KAAK,EACL,MAAM,EACN,eAAe,EACf,UAAU,EACV,OAAO,GACR,MAAM,oBAAoB,CAAC;AAG5B,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;aAC5B,WAAM,GAAG;QACvB,IAAI;QACJ,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4GF;KACF,AA/GqB,CA+GpB;aAEc,eAAU,GAAG;QAC3B,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;QAC7B,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QAC1B,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;QAC7B,UAAU,EAAE,EAAE,SA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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 .viewport {\n position: absolute;\n inset: 0;\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 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 .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: 12px;\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 };\n\n declare preview: PreviewState | null;\n declare pending: 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.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 // 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\" part=\"viewport\">\n <div class=\"content ${this.glide ? 'glide' : ''}\" style=\"transform:${transform}\">\n <canvas\n part=\"canvas\"\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
@@ -1 +1 @@
1
- {"version":3,"file":"sealpixel-stepper.js","sourceRoot":"","sources":["../../src/components/sealpixel-stepper.ts"],"names":[],"mappings":"AAAA,O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AQ,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: 11px;\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: 15px;\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: 13px;\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: 11px;\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"]}
@@ -32,4 +32,3 @@ export declare class SealpixelToolbar extends LitElement {
32
32
  private select;
33
33
  private onKeydown;
34
34
  }
35
- //# sourceMappingURL=sealpixel-toolbar.d.ts.map