@pixerate/editor-svelte 0.9.0 → 0.10.0
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 +34 -1
- package/dist/index.js +306 -203
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/history/createHistoryShortcuts.ts +95 -0
- package/src/history/history.svelte.ts +68 -0
- package/src/history/index.ts +2 -0
- package/src/index.d.ts +34 -1
- package/src/index.ts +9 -1
package/dist/index.d.ts
CHANGED
|
@@ -206,9 +206,42 @@ export declare function createNavigationGuard(
|
|
|
206
206
|
options: CreateNavigationGuardOptions,
|
|
207
207
|
): NavigationGuardManager;
|
|
208
208
|
|
|
209
|
+
export interface SvelteHistory extends HistoryState {
|
|
210
|
+
readonly manager: HistoryManager;
|
|
211
|
+
undo(): boolean;
|
|
212
|
+
redo(): boolean;
|
|
213
|
+
clear(): void;
|
|
214
|
+
execute(command: Command): void;
|
|
215
|
+
executeMerged(command: Command, options?: { windowMs?: number }): void;
|
|
216
|
+
batch(name: string, fn: () => void): void;
|
|
217
|
+
subscribe(run: (value: HistoryState) => void): () => void;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export declare function createHistory(
|
|
221
|
+
managerOrOptions?: HistoryManager | HistoryManagerOptions,
|
|
222
|
+
): SvelteHistory;
|
|
223
|
+
|
|
224
|
+
export interface HistoryShortcutsOptions {
|
|
225
|
+
enabled?: boolean;
|
|
226
|
+
target?: Window | HTMLElement | null;
|
|
227
|
+
ignoreEditableElements?: boolean;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export declare function createHistoryShortcuts(
|
|
231
|
+
manager: HistoryManager,
|
|
232
|
+
options?: HistoryShortcutsOptions,
|
|
233
|
+
): { destroy: () => void };
|
|
234
|
+
|
|
209
235
|
export {
|
|
210
236
|
DirtyTracker,
|
|
211
237
|
createDirtyTracker,
|
|
212
238
|
defaultIsEqual,
|
|
239
|
+
HistoryManager,
|
|
240
|
+
createHistoryManager,
|
|
241
|
+
} from "@pixerate/editor";
|
|
242
|
+
export type {
|
|
243
|
+
DirtyTrackerOptions,
|
|
244
|
+
Command,
|
|
245
|
+
HistoryState,
|
|
246
|
+
HistoryManagerOptions,
|
|
213
247
|
} from "@pixerate/editor";
|
|
214
|
-
export type { DirtyTrackerOptions } from "@pixerate/editor";
|