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

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 (51) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/theme.js +6 -6
  3. package/package.json +5 -5
  4. package/dist/components/lumbra-button.d.ts +0 -28
  5. package/dist/components/lumbra-button.d.ts.map +0 -1
  6. package/dist/components/lumbra-button.js +0 -87
  7. package/dist/components/lumbra-button.js.map +0 -1
  8. package/dist/components/lumbra-editor.d.ts +0 -226
  9. package/dist/components/lumbra-editor.d.ts.map +0 -1
  10. package/dist/components/lumbra-editor.js +0 -873
  11. package/dist/components/lumbra-editor.js.map +0 -1
  12. package/dist/components/lumbra-nav.d.ts +0 -48
  13. package/dist/components/lumbra-nav.d.ts.map +0 -1
  14. package/dist/components/lumbra-nav.js +0 -159
  15. package/dist/components/lumbra-nav.js.map +0 -1
  16. package/dist/components/lumbra-slider.d.ts +0 -48
  17. package/dist/components/lumbra-slider.d.ts.map +0 -1
  18. package/dist/components/lumbra-slider.js +0 -168
  19. package/dist/components/lumbra-slider.js.map +0 -1
  20. package/dist/components/lumbra-stage.d.ts +0 -92
  21. package/dist/components/lumbra-stage.d.ts.map +0 -1
  22. package/dist/components/lumbra-stage.js +0 -344
  23. package/dist/components/lumbra-stage.js.map +0 -1
  24. package/dist/components/lumbra-toolbar.d.ts +0 -30
  25. package/dist/components/lumbra-toolbar.d.ts.map +0 -1
  26. package/dist/components/lumbra-toolbar.js +0 -127
  27. package/dist/components/lumbra-toolbar.js.map +0 -1
  28. package/dist/components/pincel-button.d.ts +0 -28
  29. package/dist/components/pincel-button.d.ts.map +0 -1
  30. package/dist/components/pincel-button.js +0 -87
  31. package/dist/components/pincel-button.js.map +0 -1
  32. package/dist/components/pincel-editor.d.ts +0 -195
  33. package/dist/components/pincel-editor.d.ts.map +0 -1
  34. package/dist/components/pincel-editor.js +0 -794
  35. package/dist/components/pincel-editor.js.map +0 -1
  36. package/dist/components/pincel-nav.d.ts +0 -33
  37. package/dist/components/pincel-nav.d.ts.map +0 -1
  38. package/dist/components/pincel-nav.js +0 -147
  39. package/dist/components/pincel-nav.js.map +0 -1
  40. package/dist/components/pincel-slider.d.ts +0 -48
  41. package/dist/components/pincel-slider.d.ts.map +0 -1
  42. package/dist/components/pincel-slider.js +0 -168
  43. package/dist/components/pincel-slider.js.map +0 -1
  44. package/dist/components/pincel-stage.d.ts +0 -66
  45. package/dist/components/pincel-stage.d.ts.map +0 -1
  46. package/dist/components/pincel-stage.js +0 -233
  47. package/dist/components/pincel-stage.js.map +0 -1
  48. package/dist/components/pincel-toolbar.d.ts +0 -30
  49. package/dist/components/pincel-toolbar.d.ts.map +0 -1
  50. package/dist/components/pincel-toolbar.js +0 -127
  51. package/dist/components/pincel-toolbar.js.map +0 -1
@@ -1,195 +0,0 @@
1
- import { type AnyPlugin, type AssetResolver, type EditorSession, type ExportResult, type OutputOptions, type Renderer, type SessionOptions } from '@pincel/core';
2
- import { LitElement, type TemplateResult } from 'lit';
3
- import { type Dictionary } from '../i18n.js';
4
- import type { UiTool } from '../tool.js';
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: `pincel:ready`, `pincel:load`, `pincel:change` ({ log, index }),
11
- * `pincel:process` (ExportResult), `pincel:error` (PincelError).
12
- */
13
- export declare class PincelEditor extends LitElement {
14
- static styles: import("lit").CSSResult[];
15
- static properties: {
16
- plugins: {
17
- attribute: boolean;
18
- };
19
- session: {
20
- attribute: boolean;
21
- };
22
- renderer: {
23
- attribute: boolean;
24
- };
25
- assets: {
26
- attribute: boolean;
27
- };
28
- server: {
29
- attribute: boolean;
30
- };
31
- serverEndpoint: {
32
- type: StringConstructor;
33
- attribute: string;
34
- };
35
- src: {
36
- attribute: boolean;
37
- };
38
- editLog: {
39
- attribute: boolean;
40
- };
41
- defaultEditLog: {
42
- attribute: boolean;
43
- };
44
- output: {
45
- attribute: boolean;
46
- };
47
- theme: {
48
- type: StringConstructor;
49
- reflect: boolean;
50
- };
51
- locale: {
52
- type: StringConstructor;
53
- };
54
- dictionary: {
55
- attribute: boolean;
56
- };
57
- tools: {
58
- attribute: boolean;
59
- };
60
- activeTool: {
61
- type: StringConstructor;
62
- attribute: string;
63
- };
64
- showExport: {
65
- type: StringConstructor;
66
- attribute: string;
67
- };
68
- _busy: {
69
- state: boolean;
70
- };
71
- _processListeners: {
72
- state: boolean;
73
- };
74
- _toast: {
75
- state: boolean;
76
- };
77
- _dragover: {
78
- state: boolean;
79
- };
80
- _wide: {
81
- state: boolean;
82
- };
83
- _pluginTools: {
84
- state: boolean;
85
- };
86
- };
87
- plugins: readonly AnyPlugin[] | null;
88
- session: EditorSession | null;
89
- renderer: Renderer | null;
90
- /** Fonts and images. Defaults to a fetch resolver over the plugins' declarations. */
91
- assets: AssetResolver | null;
92
- /** Server rendering configuration; `server-endpoint` is the attribute shorthand. */
93
- server: SessionOptions['server'] | null;
94
- serverEndpoint: string | null;
95
- src: EditorSource | null;
96
- /** Controlled mode: the host owns the log. */
97
- editLog: unknown;
98
- /** Uncontrolled: applied once on load. */
99
- defaultEditLog: unknown;
100
- output: OutputOptions;
101
- theme: 'dark' | 'light' | 'auto';
102
- locale: string;
103
- /** Overrides the shipped dictionary for `locale`; shipped locales resolve automatically. */
104
- dictionary: Dictionary | null;
105
- tools: Record<string, UiTool> | null;
106
- activeTool: string | null;
107
- /**
108
- * When the Export button is shown. `auto` (default) shows it only while a
109
- * `pincel:process` listener is attached, because Export hands the result to
110
- * the host and does nothing visible otherwise. Download is always shown.
111
- */
112
- showExport: 'auto' | 'always' | 'never';
113
- _busy: boolean;
114
- _processListeners: number;
115
- _toast: {
116
- text: string;
117
- hash: string;
118
- } | null;
119
- _dragover: boolean;
120
- _wide: boolean;
121
- /** Tools loaded from `plugin.tool()`, keyed by plugin id. */
122
- _pluginTools: Record<string, UiTool>;
123
- private resizeObserver;
124
- private toolLoads;
125
- /**
126
- * Used when no `renderer` property is set. `@pincel/element` installs a
127
- * factory that starts the bundled worker; without it the editor renders inline.
128
- */
129
- static defaultRendererFactory: ((plugins: readonly AnyPlugin[]) => Renderer) | null;
130
- private readonly ctl;
131
- private i18n;
132
- private ownsSession;
133
- private lastEmittedVersion;
134
- private lastAppliedControlled;
135
- private hint;
136
- private previousTool;
137
- private loadedSrc;
138
- constructor();
139
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
140
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
141
- removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
142
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
143
- /** The live session, created on first connection when none was passed. */
144
- getSession(): EditorSession;
145
- getEditLog(): {
146
- log: import("@pincel/core").EditLog;
147
- index: number;
148
- };
149
- setEditLog(saved: unknown, index?: number): void;
150
- undo(): void;
151
- redo(): void;
152
- timeTravel(index: number): void;
153
- export(output?: OutputOptions, options?: {
154
- embedEditLog?: boolean;
155
- }): Promise<ExportResult>;
156
- download(options?: {
157
- output?: OutputOptions;
158
- filename?: string;
159
- embedEditLog?: boolean;
160
- }): Promise<{
161
- filename: string;
162
- result: ExportResult | import("@pincel/core").ServerRenderResult;
163
- }>;
164
- private ensureSession;
165
- connectedCallback(): void;
166
- disconnectedCallback(): void;
167
- willUpdate(changed: Map<string, unknown>): void;
168
- updated(): void;
169
- private lastError;
170
- private loadSource;
171
- private applyControlled;
172
- /** Whether the owned session was built from the current `plugins` and `renderer`. */
173
- private sessionMatchesProps;
174
- private sessionRenderer;
175
- private sessionAssets;
176
- private sessionServer;
177
- private currentTools;
178
- /** Plugins may ship their own tool; load each once and re-render when it arrives. */
179
- private loadPluginTools;
180
- private get stage();
181
- private toolContext;
182
- private syncActiveTool;
183
- private onPointerDown;
184
- private onKeydown;
185
- private onExport;
186
- private onDownload;
187
- private announce;
188
- private toastTimer;
189
- /** Brief confirmation over the stage: format, size and hash of the result. */
190
- private toast;
191
- private onFiles;
192
- render(): TemplateResult<1>;
193
- private renderEmpty;
194
- }
195
- //# sourceMappingURL=pincel-editor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pincel-editor.d.ts","sourceRoot":"","sources":["../../src/components/pincel-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAIlB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,cAAc,EAEpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAa,UAAU,EAAW,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAE1E,OAAO,EAAc,KAAK,UAAU,EAAa,MAAM,YAAY,CAAC;AAGpE,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,YAAY,CAAC;AAIxD,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,UAAU,GAAG,MAAM,CAAC;AAE7D;;;;;;GAMG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC1C,OAAgB,MAAM,4BAqRpB;IAEF,OAAgB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBxB;IAEM,OAAO,EAAE,SAAS,SAAS,EAAE,GAAG,IAAI,CAAC;IACrC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAClC,qFAAqF;IAC7E,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,oFAAoF;IAC5E,MAAM,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