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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -47,10 +47,6 @@ export declare const SealpixelEditor: import("vue").DefineComponent<import("vue"
47
47
  type: PropType<EditorSession | null>;
48
48
  default: null;
49
49
  };
50
- server: {
51
- type: PropType<SessionOptions["server"] | null>;
52
- default: null;
53
- };
54
50
  limits: {
55
51
  type: PropType<SessionOptions["limits"] | null>;
56
52
  default: null;
@@ -141,10 +137,6 @@ export declare const SealpixelEditor: import("vue").DefineComponent<import("vue"
141
137
  type: PropType<EditorSession | null>;
142
138
  default: null;
143
139
  };
144
- server: {
145
- type: PropType<SessionOptions["server"] | null>;
146
- default: null;
147
- };
148
140
  limits: {
149
141
  type: PropType<SessionOptions["limits"] | null>;
150
142
  default: null;
@@ -195,13 +187,6 @@ export declare const SealpixelEditor: import("vue").DefineComponent<import("vue"
195
187
  onReady?: () => any;
196
188
  onLoad?: (_descriptor: SourceDescriptor) => any;
197
189
  }>, {
198
- server: {
199
- endpoint: string;
200
- fetch?: typeof fetch;
201
- headers?: Record<string, string>;
202
- uploadOver?: number;
203
- uploadEndpoint?: string;
204
- } | null | undefined;
205
190
  limits: {
206
191
  maxClientMegapixels?: number;
207
192
  maxClientBytes?: number;
@@ -233,4 +218,3 @@ export declare function useSealpixel(options: SessionOptions): {
233
218
  export declare const Sealpixel: {
234
219
  install(app: App): void;
235
220
  };
236
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -20,7 +20,6 @@ export const SealpixelEditor = defineComponent({
20
20
  renderer: { type: Object, default: null },
21
21
  assets: { type: Object, default: null },
22
22
  session: { type: Object, default: null },
23
- server: { type: Object, default: null },
24
23
  limits: { type: Object, default: null },
25
24
  output: { type: Object, default: () => ({ format: 'image/png' }) },
26
25
  theme: { type: String, default: 'dark' },
@@ -74,7 +73,6 @@ export const SealpixelEditor = defineComponent({
74
73
  '.renderer': this.renderer,
75
74
  '.assets': this.assets,
76
75
  '.session': this.session,
77
- '.server': this.server,
78
76
  '.limits': this.limits,
79
77
  '.output': this.output,
80
78
  '.locale': this.locale,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,GAOpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAG5B,OAAO,EAEL,eAAe,EACf,CAAC,EACD,cAAc,EAGd,UAAU,GACX,MAAM,KAAK,CAAC;AASb;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;IAC7C,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE;QACL,GAAG,EAAE;YACH,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAuD;YAC5E,OAAO,EAAE,IAAI;SACd;QACD,OAAO,EAAE,EAAE,IAAI,EAAE,MAAuC,EAAE,OAAO,EAAE,SAAS,EAAE;QAC9E,cAAc,EAAE,EAAE,IAAI,EAAE,MAAuC,EAAE,OAAO,EAAE,SAAS,EAAE;QACrF,OAAO,EAAE,EAAE,IAAI,EAAE,KAA8C,EAAE,OAAO,EAAE,IAAI,EAAE;QAChF,aAAa,EAAE,EAAE,IAAI,EAAE,MAA2C,EAAE,OAAO,EAAE,IAAI,EAAE;QACnF,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAmC,EAAE,OAAO,EAAE,IAAI,EAAE;QACtE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAwC,EAAE,OAAO,EAAE,IAAI,EAAE;QACzE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAwC,EAAE,OAAO,EAAE,IAAI,EAAE;QAC1E,MAAM,EAAE,EAAE,IAAI,EAAE,MAAmD,EAAE,OAAO,EAAE,IAAI,EAAE;QACpF,MAAM,EAAE,EAAE,IAAI,EAAE,MAA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,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;SACvF,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,mBAAmB;AACnB,4FAA4F;AAC5F,MAAM,UAAU,YAAY,CAAC,OAAuB;IAIlD,MAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;QAC1C,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IACH,cAAc,CAAC,GAAG,EAAE;QAClB,WAAW,EAAE,CAAC;QACd,OAAO,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAC5B,CAAC;AACD,sBAAsB;AAEtB,mEAAmE;AACnE,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO,CAAC,GAAQ;QACd,GAAG,CAAC,SAAS,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IACpD,CAAC;CACF,CAAC","sourcesContent":["import type { PluginOptionsMap } from '@sealpixel/core';\nimport {\n createEditorSession,\n type EditorSession,\n type ExportResult,\n type SealpixelError,\n type SessionOptions,\n type SessionState,\n type SourceDescriptor,\n} from '@sealpixel/core';\nimport '@sealpixel/element';\nimport type { AnyPlugin, AssetResolver, OutputOptions, Renderer } from '@sealpixel/core';\nimport type { SealpixelEditor as SealpixelEditorElement } from '@sealpixel/element';\nimport {\n type App,\n defineComponent,\n h,\n onScopeDispose,\n type PropType,\n type ShallowRef,\n shallowRef,\n} from 'vue';\n\nexport type { EditorSession, SessionOptions, SessionState } from '@sealpixel/core';\n\nexport interface EditLogState {\n log: unknown;\n index: number;\n}\n\n/**\n * `<SealpixelEditor>` for Vue 3. `v-model:editLog` gives controlled mode; without\n * it the editor owns the log and emits `change`. Add `sealpixel-editor` to your\n * compiler's `isCustomElement` when you also use the raw tag in templates.\n */\nexport const SealpixelEditor = defineComponent({\n name: 'SealpixelEditor',\n props: {\n src: {\n type: [Object, String] as PropType<File | Blob | Uint8Array | string | null>,\n default: null,\n },\n editLog: { type: Object as PropType<EditLogState | null>, default: undefined },\n defaultEditLog: { type: Object as PropType<EditLogState | null>, default: undefined },\n plugins: { type: Array as PropType<readonly AnyPlugin[] | null>, default: null },\n pluginOptions: { type: Object as PropType<PluginOptionsMap | null>, default: null },\n renderer: { type: Object as PropType<Renderer | null>, default: null },\n assets: { type: Object as PropType<AssetResolver | null>, default: null },\n session: { type: Object as PropType<EditorSession | null>, default: null },\n limits: { type: Object as PropType<SessionOptions['limits'] | null>, default: null },\n output: { type: Object as PropType<OutputOptions>, default: () => ({ format: 'image/png' }) },\n theme: { type: String as PropType<'dark' | 'light' | 'auto'>, default: 'dark' },\n showExport: { type: String as PropType<'auto' | 'always' | 'never'>, default: 'auto' },\n showDownload: { type: String as PropType<'always' | 'never'>, default: 'always' },\n showHistory: { type: String as PropType<'all' | 'buttons' | 'none'>, default: 'all' },\n downloadLabel: { type: String as PropType<string | null>, default: null },\n locale: { type: String, default: 'en' },\n dictionary: { type: Object as PropType<Record<string, string> | null>, default: null },\n activeTool: { type: String as PropType<string | null>, default: null },\n },\n emits: {\n 'update:editLog': (_state: EditLogState) => true,\n change: (_state: EditLogState) => true,\n process: (_result: ExportResult) => true,\n error: (_error: SealpixelError) => true,\n ready: () => true,\n load: (_descriptor: SourceDescriptor) => true,\n },\n // The `expose` option, unlike an `expose()` call, types the template ref.\n expose: ['element', 'getSession', 'getEditLog', 'undo', 'redo', 'export', 'download'],\n setup() {\n const element = shallowRef<SealpixelEditorElement | null>(null);\n return {\n element,\n getSession: (): EditorSession | undefined => element.value?.getSession(),\n getEditLog: (): ReturnType<EditorSession['getEditLog']> | undefined =>\n element.value?.getEditLog(),\n undo: (): void => element.value?.undo(),\n redo: (): void => element.value?.redo(),\n export: (output?: OutputOptions): Promise<ExportResult> | undefined =>\n element.value?.export(output),\n download: (\n options?: Parameters<SealpixelEditorElement['download']>[0],\n ): ReturnType<SealpixelEditorElement['download']> | undefined =>\n element.value?.download(options),\n };\n },\n render() {\n // The element shows Export in `auto` mode while a `sealpixel:process`\n // listener exists, so listen only when the parent listens to `process`.\n const parent = this.$.vnode.props as { onProcess?: unknown; onProcessOnce?: unknown } | null;\n const listensToProcess = Boolean(parent?.onProcess || parent?.onProcessOnce);\n return h('sealpixel-editor', {\n ref: 'element',\n theme: this.theme,\n 'show-export': this.showExport,\n 'show-download': this.showDownload,\n 'show-history': this.showHistory,\n 'download-label': this.downloadLabel ?? undefined,\n '.src': this.src,\n '.editLog': this.editLog,\n '.defaultEditLog': this.defaultEditLog,\n '.plugins': this.plugins,\n '.pluginOptions': this.pluginOptions,\n '.renderer': this.renderer,\n '.assets': this.assets,\n '.session': this.session,\n '.limits': this.limits,\n '.output': this.output,\n '.locale': this.locale,\n '.dictionary': this.dictionary,\n '.activeTool': this.activeTool,\n 'onSealpixel:change': (e: CustomEvent<EditLogState>) => {\n this.$emit('update:editLog', e.detail);\n this.$emit('change', e.detail);\n },\n ...(listensToProcess\n ? {\n 'onSealpixel:process': (e: CustomEvent<ExportResult>) =>\n this.$emit('process', e.detail),\n }\n : {}),\n 'onSealpixel:error': (e: CustomEvent<SealpixelError>) => this.$emit('error', e.detail),\n 'onSealpixel:ready': () => this.$emit('ready'),\n 'onSealpixel:load': (e: CustomEvent<SourceDescriptor>) => this.$emit('load', e.detail),\n });\n },\n});\n\n// #region headless\n/** Headless composable: a session whose state is a shallow ref, disposed with the scope. */\nexport function useSealpixel(options: SessionOptions): {\n session: EditorSession;\n state: ShallowRef<SessionState>;\n} {\n const session = createEditorSession(options);\n const state = shallowRef(session.getState());\n const unsubscribe = session.subscribe((s) => {\n state.value = s;\n });\n onScopeDispose(() => {\n unsubscribe();\n session.dispose();\n });\n return { session, state };\n}\n// #endregion headless\n\n/** `app.use(Sealpixel)` registers `<SealpixelEditor>` globally. */\nexport const Sealpixel = {\n install(app: App) {\n app.component('SealpixelEditor', SealpixelEditor);\n },\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealpixel/vue",
3
- "version": "1.0.0-rc.12",
3
+ "version": "1.0.0-rc.15",
4
4
  "description": "Vue 3 bindings for the Sealpixel image editor: <SealpixelEditor> with v-model:editLog and the useSealpixel composable.",
5
5
  "license": "BUSL-1.1",
6
6
  "repository": {
@@ -24,9 +24,9 @@
24
24
  "./package.json": "./package.json"
25
25
  },
26
26
  "dependencies": {
27
- "@sealpixel/core": "1.0.0-rc.12",
28
- "@sealpixel/element": "1.0.0-rc.12",
29
- "@sealpixel/ui": "1.0.0-rc.12"
27
+ "@sealpixel/core": "1.0.0-rc.15",
28
+ "@sealpixel/element": "1.0.0-rc.15",
29
+ "@sealpixel/ui": "1.0.0-rc.15"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "vue": "^3.4.0"
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EACL,KAAK,GAAG,EAIR,KAAK,QAAQ,EACb,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