@sealpixel/ui 1.0.0-rc.2 → 1.0.0-rc.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +2 -2
- package/README.md +1 -1
- package/dist/components/sealpixel-button.d.ts +0 -1
- package/dist/components/sealpixel-button.js +1 -1
- package/dist/components/sealpixel-button.js.map +1 -1
- package/dist/components/sealpixel-editor.d.ts +71 -20
- package/dist/components/sealpixel-editor.js +265 -57
- package/dist/components/sealpixel-editor.js.map +1 -1
- package/dist/components/sealpixel-nav.d.ts +0 -1
- package/dist/components/sealpixel-nav.js +1 -1
- package/dist/components/sealpixel-nav.js.map +1 -1
- package/dist/components/sealpixel-slider.d.ts +12 -17
- package/dist/components/sealpixel-slider.js +64 -10
- package/dist/components/sealpixel-slider.js.map +1 -1
- package/dist/components/sealpixel-stage.d.ts +17 -1
- package/dist/components/sealpixel-stage.js +57 -6
- package/dist/components/sealpixel-stage.js.map +1 -1
- package/dist/components/sealpixel-stepper.d.ts +0 -1
- package/dist/components/sealpixel-stepper.js +4 -4
- package/dist/components/sealpixel-stepper.js.map +1 -1
- package/dist/components/sealpixel-toolbar.d.ts +6 -2
- package/dist/components/sealpixel-toolbar.js +71 -5
- package/dist/components/sealpixel-toolbar.js.map +1 -1
- package/dist/controllers/gesture-controller.d.ts +5 -1
- package/dist/controllers/gesture-controller.js +24 -4
- package/dist/controllers/gesture-controller.js.map +1 -1
- package/dist/controllers/session-controller.d.ts +0 -1
- package/dist/controllers/session-controller.js +2 -0
- package/dist/controllers/session-controller.js.map +1 -1
- package/dist/define.d.ts +0 -1
- package/dist/define.js.map +1 -1
- package/dist/i18n.d.ts +0 -1
- package/dist/i18n.js.map +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +1 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/locales/de.d.ts +0 -1
- package/dist/locales/de.js +22 -0
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/en.d.ts +0 -1
- package/dist/locales/en.js +22 -0
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.d.ts +0 -1
- package/dist/locales/es.js +22 -0
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.d.ts +0 -1
- package/dist/locales/fr.js +22 -0
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/index.d.ts +0 -1
- package/dist/locales/index.js.map +1 -1
- package/dist/locales/ja.d.ts +0 -1
- package/dist/locales/ja.js +22 -0
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/pt.d.ts +0 -1
- package/dist/locales/pt.js +22 -0
- package/dist/locales/pt.js.map +1 -1
- package/dist/theme.d.ts +0 -1
- package/dist/theme.js.map +1 -1
- package/dist/tool.d.ts +12 -1
- package/dist/tool.js.map +1 -1
- package/dist/tools/annotate.d.ts +0 -1
- package/dist/tools/annotate.js +277 -28
- package/dist/tools/annotate.js.map +1 -1
- package/dist/tools/assist.d.ts +103 -0
- package/dist/tools/assist.js +361 -0
- package/dist/tools/assist.js.map +1 -0
- package/dist/tools/crop-mask.d.ts +0 -1
- package/dist/tools/crop-mask.js.map +1 -1
- package/dist/tools/crop-rotation.d.ts +64 -0
- package/dist/tools/crop-rotation.js +172 -0
- package/dist/tools/crop-rotation.js.map +1 -0
- package/dist/tools/crop.d.ts +0 -1
- package/dist/tools/crop.js +99 -15
- package/dist/tools/crop.js.map +1 -1
- package/dist/tools/delete-handle.d.ts +0 -1
- package/dist/tools/delete-handle.js +6 -0
- package/dist/tools/delete-handle.js.map +1 -1
- package/dist/tools/filter.d.ts +0 -1
- package/dist/tools/filter.js.map +1 -1
- package/dist/tools/finetune.d.ts +0 -1
- package/dist/tools/finetune.js.map +1 -1
- package/dist/tools/frame.d.ts +0 -1
- package/dist/tools/frame.js.map +1 -1
- package/dist/tools/handles.d.ts +26 -0
- package/dist/tools/handles.js +51 -0
- package/dist/tools/handles.js.map +1 -0
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +3 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/keys.d.ts +59 -0
- package/dist/tools/keys.js +120 -0
- package/dist/tools/keys.js.map +1 -0
- package/dist/tools/redact.d.ts +10 -1
- package/dist/tools/redact.js +176 -12
- package/dist/tools/redact.js.map +1 -1
- package/dist/tools/region-transform.d.ts +69 -0
- package/dist/tools/region-transform.js +192 -0
- package/dist/tools/region-transform.js.map +1 -0
- package/dist/tools/resize.d.ts +0 -1
- package/dist/tools/resize.js +19 -6
- package/dist/tools/resize.js.map +1 -1
- package/dist/tools/sticker.d.ts +0 -1
- package/dist/tools/sticker.js +57 -2
- package/dist/tools/sticker.js.map +1 -1
- package/dist/tools/watermark.d.ts +0 -1
- package/dist/tools/watermark.js.map +1 -1
- package/dist/view-mapping.d.ts +1 -2
- package/dist/view-mapping.js +1 -1
- package/dist/view-mapping.js.map +1 -1
- package/package.json +8 -8
- package/dist/components/sealpixel-button.d.ts.map +0 -1
- package/dist/components/sealpixel-editor.d.ts.map +0 -1
- package/dist/components/sealpixel-nav.d.ts.map +0 -1
- package/dist/components/sealpixel-slider.d.ts.map +0 -1
- package/dist/components/sealpixel-stage.d.ts.map +0 -1
- package/dist/components/sealpixel-stepper.d.ts.map +0 -1
- package/dist/components/sealpixel-toolbar.d.ts.map +0 -1
- package/dist/controllers/gesture-controller.d.ts.map +0 -1
- package/dist/controllers/session-controller.d.ts.map +0 -1
- package/dist/define.d.ts.map +0 -1
- package/dist/i18n.d.ts.map +0 -1
- package/dist/icons.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/locales/de.d.ts.map +0 -1
- package/dist/locales/en.d.ts.map +0 -1
- package/dist/locales/es.d.ts.map +0 -1
- package/dist/locales/fr.d.ts.map +0 -1
- package/dist/locales/index.d.ts.map +0 -1
- package/dist/locales/ja.d.ts.map +0 -1
- package/dist/locales/pt.d.ts.map +0 -1
- package/dist/theme.d.ts.map +0 -1
- package/dist/tool.d.ts.map +0 -1
- package/dist/tools/annotate.d.ts.map +0 -1
- package/dist/tools/crop-mask.d.ts.map +0 -1
- package/dist/tools/crop.d.ts.map +0 -1
- package/dist/tools/delete-handle.d.ts.map +0 -1
- package/dist/tools/filter.d.ts.map +0 -1
- package/dist/tools/finetune.d.ts.map +0 -1
- package/dist/tools/frame.d.ts.map +0 -1
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/redact.d.ts.map +0 -1
- package/dist/tools/resize.d.ts.map +0 -1
- package/dist/tools/sticker.d.ts.map +0 -1
- package/dist/tools/watermark.d.ts.map +0 -1
- package/dist/view-mapping.d.ts.map +0 -1
package/LICENSE.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Licensor:** nine feet UG (haftungsbeschränkt), Germany (https://9feet.io)
|
|
6
6
|
|
|
7
|
-
**Licensed Work:** Sealpixel, in every version the Licensor publishes: the source code, the npm packages under the `@sealpixel` scope and the unscoped `sealpixel` package, the Rust crates, the WebAssembly binaries, the documentation and the example projects. The Licensed Work is (c) 2026 nine feet UG (haftungsbeschränkt).
|
|
7
|
+
**Licensed Work:** Sealpixel, in every version the Licensor publishes: the source code, the npm packages under the `@sealpixel` scope and the unscoped `sealpixel` package, the Rust crates, the WebAssembly binaries, the documentation and the example projects, except the package `@sealpixel/c2pa-sign` and the crate `sealpixel-c2pa-sign`, which are licensed under the Business Source License 1.1 with their own parameters in `packages/c2pa-sign/LICENSE.md`. The Licensed Work is (c) 2026 nine feet UG (haftungsbeschränkt).
|
|
8
8
|
|
|
9
9
|
**Additional Use Grant:** You may make production use of the Licensed Work if you are a Small User. You are a Small User if you are a natural person acting for yourself, or if the organization you act for had less than EUR 1,000,000 of gross revenue in its most recent completed financial year. Revenue is counted across the whole group: the organization, everything that controls it, everything it controls, and everything under common control with it. Where the work is done for a client, the client's revenue decides.
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ This Additional Use Grant does not permit offering the Licensed Work, or a work
|
|
|
16
16
|
|
|
17
17
|
For information about alternative licensing arrangements for the Licensed Work, please visit: https://sealpixel.dev/pricing
|
|
18
18
|
|
|
19
|
-
Organizations, and anyone who develops with the Licensed Work for an organization, obtain the commercial license this License refers to as developer seats under the Sealpixel Developer Seat License
|
|
19
|
+
Organizations, and anyone who develops with the Licensed Work for an organization, obtain the commercial license this License refers to as developer seats under the Sealpixel Developer Seat License, published at https://sealpixel.dev/license#seats and as `LICENSE-COMMERCIAL.md` in the source repository.
|
|
20
20
|
|
|
21
21
|
## Notice
|
|
22
22
|
|
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
|
|
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
|
|
@@ -22,7 +22,7 @@ export class SealpixelButton extends LitElement {
|
|
|
22
22
|
background: var(--sealpixel-color-surface-2);
|
|
23
23
|
color: var(--sealpixel-color-fg);
|
|
24
24
|
font: inherit;
|
|
25
|
-
font-size:
|
|
25
|
+
font-size: calc(var(--sealpixel-font-size) * 13 / 14);
|
|
26
26
|
font-weight: 500;
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
display: inline-flex;
|
|
@@ -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,EAAE,IAAI,EAAE,MAAM,EAAE;KACxB,CAAC;IAOF;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA;;;kBAGG,IAAI,CAAC,QAAQ;qBACV,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;mBACjC,IAAI,CAAC,KAAK,IAAI,SAAS;cAC5B,IAAI,CAAC,KAAK,IAAI,SAAS;;;cAGvB,CAAC;IACb,CAAC"}
|
|
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,EAAE,IAAI,EAAE,MAAM,EAAE;KACxB,CAAC;IAOF;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA;;;kBAGG,IAAI,CAAC,QAAQ;qBACV,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;mBACjC,IAAI,CAAC,KAAK,IAAI,SAAS;cAC5B,IAAI,CAAC,KAAK,IAAI,SAAS;;;cAGvB,CAAC;IACb,CAAC","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { base } from '../theme.js';\n\nexport class SealpixelButton extends LitElement {\n static override styles = [\n base,\n css`\n :host {\n display: inline-block;\n }\n /*\n * The fill carries the button, not an outline. On a surface two steps\n * lighter than the bar a control reads on its own, and a row of six\n * outlined boxes was competing with the photo above it. The border stays\n * declared, transparent, so a theme can put it back and nothing shifts.\n */\n button {\n min-width: var(--sealpixel-control-height);\n min-height: var(--sealpixel-control-height);\n padding: 0 calc(var(--sealpixel-space) * 1.5);\n border: 1px solid transparent;\n border-radius: var(--sealpixel-radius-pill);\n background: var(--sealpixel-color-surface-2);\n color: var(--sealpixel-color-fg);\n font: inherit;\n font-size: calc(var(--sealpixel-font-size) * 13 / 14);\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"]}
|
|
@@ -3,13 +3,6 @@ import { LitElement, type TemplateResult } from 'lit';
|
|
|
3
3
|
import { type Dictionary } from '../i18n.js';
|
|
4
4
|
import type { UiTool } from '../tool.js';
|
|
5
5
|
export type EditorSource = File | Blob | Uint8Array | string;
|
|
6
|
-
/**
|
|
7
|
-
* The default editor. Headless `EditorSession` underneath; this element adds
|
|
8
|
-
* the responsive shell, tools and events.
|
|
9
|
-
*
|
|
10
|
-
* Events: `sealpixel:ready`, `sealpixel:load`, `sealpixel:change` ({ log, index }),
|
|
11
|
-
* `sealpixel:process` (ExportResult), `sealpixel:error` (SealpixelError).
|
|
12
|
-
*/
|
|
13
6
|
export declare class SealpixelEditor extends LitElement {
|
|
14
7
|
static styles: import("lit").CSSResult[];
|
|
15
8
|
static properties: {
|
|
@@ -20,7 +13,7 @@ export declare class SealpixelEditor extends LitElement {
|
|
|
20
13
|
attribute: string;
|
|
21
14
|
converter: {
|
|
22
15
|
fromAttribute: (value: string | null) => Readonly<Record<string, unknown>> | null;
|
|
23
|
-
toAttribute: (value:
|
|
16
|
+
toAttribute: (value: Readonly<Record<string, unknown>> | null) => string | null;
|
|
24
17
|
};
|
|
25
18
|
};
|
|
26
19
|
session: {
|
|
@@ -32,12 +25,18 @@ export declare class SealpixelEditor extends LitElement {
|
|
|
32
25
|
assets: {
|
|
33
26
|
attribute: boolean;
|
|
34
27
|
};
|
|
35
|
-
|
|
36
|
-
attribute: boolean;
|
|
37
|
-
};
|
|
38
|
-
serverEndpoint: {
|
|
39
|
-
type: StringConstructor;
|
|
28
|
+
limits: {
|
|
40
29
|
attribute: string;
|
|
30
|
+
converter: {
|
|
31
|
+
fromAttribute: (value: string | null) => {
|
|
32
|
+
maxClientMegapixels?: number;
|
|
33
|
+
maxClientBytes?: number;
|
|
34
|
+
} | null;
|
|
35
|
+
toAttribute: (value: {
|
|
36
|
+
maxClientMegapixels?: number;
|
|
37
|
+
maxClientBytes?: number;
|
|
38
|
+
} | null) => string | null;
|
|
39
|
+
};
|
|
41
40
|
};
|
|
42
41
|
src: {
|
|
43
42
|
attribute: boolean;
|
|
@@ -110,9 +109,13 @@ export declare class SealpixelEditor extends LitElement {
|
|
|
110
109
|
renderer: Renderer | null;
|
|
111
110
|
/** Fonts and images. Defaults to a fetch resolver over the plugins' declarations. */
|
|
112
111
|
assets: AssetResolver | null;
|
|
113
|
-
/**
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
/**
|
|
113
|
+
* How much of the original stays in the browser; `SessionOptions['limits']`
|
|
114
|
+
* (JSON in the attribute). Above `maxClientMegapixels` (16 by default) the
|
|
115
|
+
* image is not resident: Export and Download are disabled, and the host
|
|
116
|
+
* renders the original outside the browser.
|
|
117
|
+
*/
|
|
118
|
+
limits: SessionOptions['limits'] | null;
|
|
116
119
|
src: EditorSource | null;
|
|
117
120
|
/** Controlled mode: the host owns the log. */
|
|
118
121
|
editLog: unknown;
|
|
@@ -161,7 +164,13 @@ export declare class SealpixelEditor extends LitElement {
|
|
|
161
164
|
private lastAppliedControlled;
|
|
162
165
|
private hint;
|
|
163
166
|
private previousTool;
|
|
167
|
+
/** The source the tools last heard about; `load` replaces the object, so identity is the guard. */
|
|
168
|
+
private lastSource;
|
|
164
169
|
private loadedSrc;
|
|
170
|
+
/** The edit log of a session released while the element was out of the document. */
|
|
171
|
+
private detachedLog;
|
|
172
|
+
/** Whether the owned session was released while the element was out of the document. */
|
|
173
|
+
private released;
|
|
165
174
|
constructor();
|
|
166
175
|
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
167
176
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -190,21 +199,64 @@ export declare class SealpixelEditor extends LitElement {
|
|
|
190
199
|
embedEditLog?: boolean;
|
|
191
200
|
}): Promise<{
|
|
192
201
|
filename: string;
|
|
193
|
-
result: ExportResult
|
|
202
|
+
result: ExportResult;
|
|
194
203
|
}>;
|
|
195
204
|
private ensureSession;
|
|
196
205
|
connectedCallback(): void;
|
|
197
206
|
disconnectedCallback(): void;
|
|
207
|
+
/** Disposes the owned session and keeps its edit log for a later connection. */
|
|
208
|
+
private releaseSession;
|
|
198
209
|
willUpdate(changed: Map<string, unknown>): void;
|
|
199
210
|
updated(): void;
|
|
200
211
|
private lastError;
|
|
212
|
+
/** Tells every tool, active or not, that a new source has loaded. Once per source. */
|
|
213
|
+
private syncSource;
|
|
214
|
+
/**
|
|
215
|
+
* Collapses the settings bar when the open tool has nothing to put in it.
|
|
216
|
+
*
|
|
217
|
+
* A tool renders its own structure, and a structure can hold nothing: crop
|
|
218
|
+
* with `rotation`, `flip` and `reset` off and a single enforced aspect emits
|
|
219
|
+
* two empty wrappers. The bar is a fixed height on purpose — see `.panel` —
|
|
220
|
+
* so that reserved an empty bordered surface and took the same height off
|
|
221
|
+
* the stage. On the landing page's avatar card that was 240 px of nothing
|
|
222
|
+
* against a 178 px stage, and the photo rendered at 10 percent.
|
|
223
|
+
*
|
|
224
|
+
* Read from the DOM rather than asked of the tool: every tool would
|
|
225
|
+
* otherwise have to declare it, and a tool whose panel empties out only
|
|
226
|
+
* under some options would get it wrong.
|
|
227
|
+
*
|
|
228
|
+
* Not measured by size either. The empty wrappers still lay out — the row
|
|
229
|
+
* is 8px from its own gap and the group 4px from its border — so a
|
|
230
|
+
* bounding box tells content and scaffolding apart not at all. What counts
|
|
231
|
+
* is a control or a word: a custom element, a form control, or any text.
|
|
232
|
+
*/
|
|
233
|
+
private syncPanelFill;
|
|
234
|
+
/**
|
|
235
|
+
* Lets the settings bar grow to the height its content needs.
|
|
236
|
+
*
|
|
237
|
+
* The bar is a fixed height so that moving between tools does not resize
|
|
238
|
+
* the stage under the user. When a tool needs more than that height, the
|
|
239
|
+
* overflow has nowhere to go: a wrapping flex container of fixed height has
|
|
240
|
+
* no scrollable cross-axis overflow, so `overflow: auto` never produces a
|
|
241
|
+
* scrollbar, and the sticky choice row — which pins itself inside the
|
|
242
|
+
* scrollport — is dragged up over the settings instead. The colour swatch
|
|
243
|
+
* ends up half covered and the fill toggle disappears behind the shapes.
|
|
244
|
+
*
|
|
245
|
+
* WebKit is where this surfaced, on a real iPhone: it lays these controls
|
|
246
|
+
* taller than Blink does, and at phone width crop, finetune and annotate
|
|
247
|
+
* needed 138, 140 and 136 pixels against the 112 the bar had. Raising the
|
|
248
|
+
* default would have taken those pixels off every stage in every engine, so
|
|
249
|
+
* the height is measured instead and only the bar that needs more gets it.
|
|
250
|
+
* `34cqh` still caps it, so a busy tool cannot eat the stage.
|
|
251
|
+
*/
|
|
252
|
+
private syncPanelFit;
|
|
201
253
|
private loadSource;
|
|
202
254
|
private applyControlled;
|
|
203
|
-
/** Whether the owned session was built from the current `plugins` and `
|
|
255
|
+
/** Whether the owned session was built from the current `plugins`, `renderer`, `assets` and `limits`. */
|
|
204
256
|
private sessionMatchesProps;
|
|
205
257
|
private sessionRenderer;
|
|
206
258
|
private sessionAssets;
|
|
207
|
-
private
|
|
259
|
+
private sessionLimits;
|
|
208
260
|
private currentTools;
|
|
209
261
|
/** Plugins may ship their own tool; load each once and re-render when it arrives. */
|
|
210
262
|
private loadPluginTools;
|
|
@@ -223,4 +275,3 @@ export declare class SealpixelEditor extends LitElement {
|
|
|
223
275
|
render(): TemplateResult<1>;
|
|
224
276
|
private renderEmpty;
|
|
225
277
|
}
|
|
226
|
-
//# sourceMappingURL=sealpixel-editor.d.ts.map
|