@pixerate/editor-svelte 0.20.0 → 0.22.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/README.md +4 -3
- package/dist/canvas/CanvasGuidesLayer.svelte +32 -2
- package/dist/canvas/CanvasGuidesLayer.svelte.d.ts +2 -0
- package/dist/canvas/CanvasGuidesLayer.svelte.d.ts.map +1 -1
- package/dist/canvas/ShapeNode.svelte +57 -0
- package/dist/canvas/ShapeNode.svelte.d.ts +21 -0
- package/dist/canvas/ShapeNode.svelte.d.ts.map +1 -0
- package/dist/canvas/createCanvasArrange.svelte.d.ts +23 -1
- package/dist/canvas/createCanvasArrange.svelte.d.ts.map +1 -1
- package/dist/canvas/createCanvasArrange.svelte.js +19 -2
- package/dist/canvas/createCanvasMeasure.svelte.d.ts +53 -0
- package/dist/canvas/createCanvasMeasure.svelte.d.ts.map +1 -0
- package/dist/canvas/createCanvasMeasure.svelte.js +80 -0
- package/dist/canvas/index.d.ts +4 -0
- package/dist/canvas/index.d.ts.map +1 -1
- package/dist/canvas/index.js +6 -0
- package/dist/commands/CommandPalette.svelte +129 -0
- package/dist/commands/CommandPalette.svelte.d.ts +13 -0
- package/dist/commands/CommandPalette.svelte.d.ts.map +1 -0
- package/dist/commands/commandShortcuts.svelte.d.ts +30 -0
- package/dist/commands/commandShortcuts.svelte.d.ts.map +1 -0
- package/dist/commands/commandShortcuts.svelte.js +37 -0
- package/dist/commands/index.d.ts +7 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +3 -0
- package/dist/commands/palette.svelte.d.ts +34 -0
- package/dist/commands/palette.svelte.d.ts.map +1 -0
- package/dist/commands/palette.svelte.js +61 -0
- package/dist/history/createHistoryShortcuts.d.ts +1 -1
- package/dist/history/createHistoryShortcuts.d.ts.map +1 -1
- package/dist/history/createHistoryShortcuts.js +10 -32
- package/dist/history/history.svelte.d.ts +13 -4
- package/dist/history/history.svelte.d.ts.map +1 -1
- package/dist/history/history.svelte.js +10 -0
- package/dist/history/historyDirty.svelte.d.ts +31 -0
- package/dist/history/historyDirty.svelte.d.ts.map +1 -0
- package/dist/history/historyDirty.svelte.js +30 -0
- package/dist/history/index.d.ts +1 -0
- package/dist/history/index.d.ts.map +1 -1
- package/dist/history/index.js +1 -0
- package/dist/image-editor/ImageEditor.svelte +39 -0
- package/dist/image-editor/ImageEditor.svelte.d.ts.map +1 -1
- package/dist/image-editor/imageEditorState.svelte.d.ts +2 -0
- package/dist/image-editor/imageEditorState.svelte.d.ts.map +1 -1
- package/dist/image-editor/imageEditorState.svelte.js +4 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/review/ReviewToolbar.svelte +15 -0
- package/dist/review/ReviewToolbar.svelte.d.ts +4 -0
- package/dist/review/ReviewToolbar.svelte.d.ts.map +1 -1
- package/dist/spreadsheet/FormulaBar.svelte +12 -1
- package/dist/spreadsheet/FormulaBar.svelte.d.ts.map +1 -1
- package/dist/spreadsheet/SpreadsheetContextMenu.svelte +21 -2
- package/dist/spreadsheet/SpreadsheetContextMenu.svelte.d.ts +1 -1
- package/dist/spreadsheet/SpreadsheetContextMenu.svelte.d.ts.map +1 -1
- package/dist/spreadsheet/SpreadsheetEditor.svelte +48 -6
- package/dist/spreadsheet/SpreadsheetEditor.svelte.d.ts.map +1 -1
- package/dist/spreadsheet/SpreadsheetGroupRow.svelte +1 -1
- package/dist/spreadsheet/spreadsheet.svelte.d.ts.map +1 -1
- package/dist/spreadsheet/tableInteractions.d.ts.map +1 -1
- package/dist/spreadsheet/tableInteractions.js +2 -1
- package/package.json +10 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormulaBar.svelte.d.ts","sourceRoot":"","sources":["../../src/spreadsheet/FormulaBar.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAIvE,UAAU,KAAK;I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|
+
import { clampMenuPosition, type SpreadsheetMenuItem } from '@pixerate/editor/spreadsheet';
|
|
3
|
+
|
|
4
|
+
// Gap kept between the menu and the viewport edges.
|
|
5
|
+
const VIEWPORT_MARGIN = 4;
|
|
3
6
|
|
|
4
7
|
interface Props {
|
|
5
8
|
items: SpreadsheetMenuItem[];
|
|
@@ -10,6 +13,22 @@
|
|
|
10
13
|
|
|
11
14
|
let { items, x, y, onClose }: Props = $props();
|
|
12
15
|
let menuEl = $state<HTMLDivElement | null>(null);
|
|
16
|
+
let measured = $state<{ x: number; y: number } | null>(null);
|
|
17
|
+
const position = $derived(measured ?? { x, y });
|
|
18
|
+
|
|
19
|
+
// Keep the (fixed) menu inside the viewport: near the right or bottom edge
|
|
20
|
+
// it opens to the left of / above the pointer instead of being cut off.
|
|
21
|
+
$effect(() => {
|
|
22
|
+
void items; // re-measure when the items change
|
|
23
|
+
if (!menuEl || typeof window === 'undefined') return;
|
|
24
|
+
const { width, height } = menuEl.getBoundingClientRect();
|
|
25
|
+
measured = clampMenuPosition(
|
|
26
|
+
{ x, y },
|
|
27
|
+
{ width, height },
|
|
28
|
+
{ width: window.innerWidth, height: window.innerHeight },
|
|
29
|
+
VIEWPORT_MARGIN
|
|
30
|
+
);
|
|
31
|
+
});
|
|
13
32
|
|
|
14
33
|
// Close on outside press or Escape.
|
|
15
34
|
$effect(() => {
|
|
@@ -35,7 +54,7 @@
|
|
|
35
54
|
aria-label="Table actions"
|
|
36
55
|
tabindex="-1"
|
|
37
56
|
class="fixed z-50 min-w-[14rem] rounded-md border border-border bg-popover py-1 text-xs text-popover-foreground shadow-lg"
|
|
38
|
-
style="left: {x}px; top: {y}px; background: var(--popover, var(--background, #fff));"
|
|
57
|
+
style="left: {position.x}px; top: {position.y}px; max-height: calc(100vh - {VIEWPORT_MARGIN * 2}px); overflow-y: auto; background: var(--popover, var(--background, #fff));"
|
|
39
58
|
oncontextmenu={(e) => e.preventDefault()}
|
|
40
59
|
onkeydown={(e) => e.stopPropagation()}
|
|
41
60
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpreadsheetContextMenu.svelte.d.ts","sourceRoot":"","sources":["../../src/spreadsheet/SpreadsheetContextMenu.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"SpreadsheetContextMenu.svelte.d.ts","sourceRoot":"","sources":["../../src/spreadsheet/SpreadsheetContextMenu.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGzF,UAAU,KAAK;IACb,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AA6DH,QAAA,MAAM,sBAAsB,2CAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
type CellRange,
|
|
13
13
|
type SpreadsheetMenuItem,
|
|
14
14
|
type SpreadsheetViewColumn,
|
|
15
|
-
type SpreadsheetViewRow
|
|
15
|
+
type SpreadsheetViewRow,
|
|
16
|
+
formatCellDisplay
|
|
16
17
|
} from '@pixerate/editor/spreadsheet';
|
|
17
18
|
import FormulaBar from './FormulaBar.svelte';
|
|
18
19
|
import SpreadsheetContextMenu from './SpreadsheetContextMenu.svelte';
|
|
@@ -51,6 +52,18 @@
|
|
|
51
52
|
|
|
52
53
|
let gridContainer = $state<HTMLDivElement | null>(null);
|
|
53
54
|
let cellInput = $state<HTMLInputElement | null>(null);
|
|
55
|
+
|
|
56
|
+
// Focus the cell editor when it opens, with the caret after the draft
|
|
57
|
+
// (e.g. the key that started editing), so typing goes into the cell.
|
|
58
|
+
$effect(() => {
|
|
59
|
+
if (!cellInput) return;
|
|
60
|
+
// Editing started from the formula bar keeps focus there.
|
|
61
|
+
const active = typeof document !== 'undefined' ? document.activeElement : null;
|
|
62
|
+
if (active instanceof HTMLInputElement && active !== cellInput) return;
|
|
63
|
+
cellInput.focus();
|
|
64
|
+
const end = cellInput.value.length;
|
|
65
|
+
cellInput.setSelectionRange(end, end);
|
|
66
|
+
});
|
|
54
67
|
let resizingColId = $state<string | null>(null);
|
|
55
68
|
let hoveredColId = $state<string | null>(null);
|
|
56
69
|
let resizeStartX = $state(0);
|
|
@@ -76,6 +89,24 @@
|
|
|
76
89
|
return new Set(filter?.enabled ? filter.rules.map((r) => r.colId) : []);
|
|
77
90
|
});
|
|
78
91
|
let selection = $derived(sheetState.selectedRange ? normalizeRange(sheetState.selectedRange) : null);
|
|
92
|
+
// The dynamic array under the active cell (anchor or spilled cell) gets a border.
|
|
93
|
+
let activeSpill = $derived.by(() => {
|
|
94
|
+
void sheetState.document;
|
|
95
|
+
const cell = sheetState.activeCell;
|
|
96
|
+
return cell ? sheetState.controller.getSpillAt(cell.row, cell.col) : null;
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/** Thin border drawn on the outer edges of a dynamic array's spill range. */
|
|
100
|
+
function spillBorderStyle(range: CellRange, row: number, col: number): string {
|
|
101
|
+
const line = '1px solid color-mix(in srgb, var(--primary, #6366f1) 60%, transparent)';
|
|
102
|
+
return (
|
|
103
|
+
'position: absolute; inset: 0; pointer-events: none; z-index: 5;' +
|
|
104
|
+
(row === range.startRow ? ` border-top: ${line};` : '') +
|
|
105
|
+
(row === range.endRow ? ` border-bottom: ${line};` : '') +
|
|
106
|
+
(col === range.startCol ? ` border-left: ${line};` : '') +
|
|
107
|
+
(col === range.endCol ? ` border-right: ${line};` : '')
|
|
108
|
+
);
|
|
109
|
+
}
|
|
79
110
|
|
|
80
111
|
/** Fill handle: press, move over cells, release to autofill (one undo step). */
|
|
81
112
|
function startFill(e: MouseEvent) {
|
|
@@ -138,15 +169,21 @@
|
|
|
138
169
|
function handleKeyDown(e: KeyboardEvent) {
|
|
139
170
|
if (sheetState.editingCell) {
|
|
140
171
|
if (e.key === 'Escape') {
|
|
172
|
+
e.preventDefault();
|
|
141
173
|
sheetState.cancelEditing();
|
|
142
174
|
} else if (e.key === 'Enter') {
|
|
175
|
+
e.preventDefault();
|
|
143
176
|
sheetState.commitEditing();
|
|
144
177
|
sheetState.moveCursor('down');
|
|
145
178
|
} else if (e.key === 'Tab') {
|
|
146
179
|
e.preventDefault();
|
|
147
180
|
sheetState.commitEditing();
|
|
148
181
|
sheetState.moveCursor(e.shiftKey ? 'left' : 'right');
|
|
182
|
+
} else {
|
|
183
|
+
return;
|
|
149
184
|
}
|
|
185
|
+
// The cell input unmounts; keep focus on the grid so typing continues.
|
|
186
|
+
gridContainer?.focus();
|
|
150
187
|
return;
|
|
151
188
|
}
|
|
152
189
|
|
|
@@ -200,6 +237,9 @@
|
|
|
200
237
|
// Direct typing into cell starts editing
|
|
201
238
|
const col = sheetState.document.columns[sheetState.activeCell.col];
|
|
202
239
|
if (!col?.readOnly) {
|
|
240
|
+
// The key becomes the draft; without preventDefault the browser would
|
|
241
|
+
// also type it into the newly focused cell input ("1" -> "11").
|
|
242
|
+
e.preventDefault();
|
|
203
243
|
sheetState.startEditing(sheetState.activeCell.row, sheetState.activeCell.col, e.key);
|
|
204
244
|
}
|
|
205
245
|
}
|
|
@@ -420,9 +460,9 @@
|
|
|
420
460
|
<table class="border-collapse table-fixed w-max min-w-full">
|
|
421
461
|
<!-- Table Header Columns -->
|
|
422
462
|
<thead>
|
|
423
|
-
<tr class="h-7 bg-muted
|
|
463
|
+
<tr class="h-7 bg-muted sticky top-0 z-20 border-b border-border shadow-xs">
|
|
424
464
|
<!-- Top Left Corner Cell -->
|
|
425
|
-
<th class="w-12 min-w-[3rem] sticky left-0 z-30 bg-muted
|
|
465
|
+
<th class="w-12 min-w-[3rem] sticky left-0 z-30 bg-muted border-r border-border text-center text-[10px] text-muted-foreground font-medium">
|
|
426
466
|
#
|
|
427
467
|
</th>
|
|
428
468
|
{#each sheetState.viewModel.columns as viewCol (viewCol.column.id)}
|
|
@@ -492,7 +532,7 @@
|
|
|
492
532
|
>
|
|
493
533
|
<!-- Row Header Index -->
|
|
494
534
|
<td
|
|
495
|
-
class="w-12 min-w-[3rem] sticky left-0 z-10 bg-muted
|
|
535
|
+
class="w-12 min-w-[3rem] sticky left-0 z-10 bg-muted border-r border-border text-center text-[10px] text-muted-foreground font-mono select-none"
|
|
496
536
|
style={viewRow.frozen ? `top: ${COLUMN_HEADER_HEIGHT + viewRow.stickyTop}px; z-index: 15;` : undefined}
|
|
497
537
|
>
|
|
498
538
|
{displayRowIndex + 1}
|
|
@@ -540,7 +580,6 @@
|
|
|
540
580
|
bind:this={cellInput}
|
|
541
581
|
bind:value={sheetState.draftValue}
|
|
542
582
|
onblur={() => sheetState.commitEditing()}
|
|
543
|
-
|
|
544
583
|
/>
|
|
545
584
|
<FormulaHints input={cellInput} value={sheetState.draftValue} onAccept={(next) => (sheetState.draftValue = next)} />
|
|
546
585
|
{:else if customCellRenderer}
|
|
@@ -551,9 +590,12 @@
|
|
|
551
590
|
class="truncate block max-w-full {cell.error ? 'text-destructive font-semibold' : ''}"
|
|
552
591
|
title={cell.error ? (cell.errorMessage ?? cell.error) : undefined}
|
|
553
592
|
>
|
|
554
|
-
{
|
|
593
|
+
{formatCellDisplay(cell)}
|
|
555
594
|
</span>
|
|
556
595
|
{/if}
|
|
596
|
+
{#if activeSpill && rangeContains(activeSpill.range, rIdx, cIdx)}
|
|
597
|
+
<span aria-hidden="true" class="spreadsheet-spill-border" style={spillBorderStyle(activeSpill.range, rIdx, cIdx)}></span>
|
|
598
|
+
{/if}
|
|
557
599
|
{#if showFillHandle}
|
|
558
600
|
<!-- svelte-ignore a11y_no_static_element_interactions, a11y_click_events_have_key_events -->
|
|
559
601
|
<div
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpreadsheetEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/spreadsheet/SpreadsheetEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAMH,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"SpreadsheetEditor.svelte.d.ts","sourceRoot":"","sources":["../../src/spreadsheet/SpreadsheetEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAMH,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,QAAQ,EAMd,MAAM,8BAA8B,CAAC;AAKxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAIlE,UAAU,KAAK;IACb,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EACf,OAAO,CAAC,CAAC,QAAQ,EAAE,iBAAiB,EAAE,cAAc,CAAC,CAAC,GACtD,OAAO,CAAC,CAAC;QAAE,GAAG,EAAE,cAAc,CAAC;QAAC,GAAG,EAAE,iBAAiB,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC,CAAC;IAC/E,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACvD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD;AA+hBH,QAAA,MAAM,iBAAiB,2CAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
<!-- A category header row: collapse toggle, label, row count and per-column summaries. -->
|
|
23
23
|
<tr class="border-b border-border bg-muted/40 font-semibold" data-group-key={group.key} style="height: 28px;">
|
|
24
|
-
<td class="w-12 min-w-[3rem] sticky left-0 z-10 bg-muted
|
|
24
|
+
<td class="w-12 min-w-[3rem] sticky left-0 z-10 bg-muted border-r border-border text-center">
|
|
25
25
|
<button
|
|
26
26
|
type="button"
|
|
27
27
|
aria-label="{group.collapsed ? 'Expand' : 'Collapse'} group {group.label}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spreadsheet.svelte.d.ts","sourceRoot":"","sources":["../../src/spreadsheet/spreadsheet.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAErB,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AAEtC,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,4BAAiC;;
|
|
1
|
+
{"version":3,"file":"spreadsheet.svelte.d.ts","sourceRoot":"","sources":["../../src/spreadsheet/spreadsheet.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAErB,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AAEtC,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,4BAAiC;;aAmLy20B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AO;IAwBvB;;;;OAIG;;;
|
|
1
|
+
{"version":3,"file":"tableInteractions.d.ts","sourceRoot":"","sources":["../../src/spreadsheet/tableInteractions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEpH,yEAAyE;AACzE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,SAAS,GAAG,IAAI,CAAC;IACzC,mBAAmB,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,wBAAwB,CAAC;IACxE,kBAAkB,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC;IAChE,WAAW,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC;CAC/C;AAUD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,WAAW,GAAG,IAAI,EACjC,KAAK,EAAE,0BAA0B,EACjC,UAAU,EAAE,MAAM,OAAO;IAwBvB;;;;OAIG;;;EAcN"}
|
|
@@ -47,8 +47,9 @@ export function attachSpreadsheetClipboard(getGrid, sheet, isReadOnly) {
|
|
|
47
47
|
copyShortcutFallback() {
|
|
48
48
|
copied = false;
|
|
49
49
|
setTimeout(() => {
|
|
50
|
+
// Rejected when clipboard access is denied; nothing else to fall back to.
|
|
50
51
|
if (!copied)
|
|
51
|
-
navigator.clipboard?.writeText(sheet.exportToTsv(sheet.selectedRange));
|
|
52
|
+
Promise.resolve(navigator.clipboard?.writeText(sheet.exportToTsv(sheet.selectedRange))).catch(() => { });
|
|
52
53
|
}, 0);
|
|
53
54
|
},
|
|
54
55
|
destroy() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Svelte bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,6 +33,11 @@
|
|
|
33
33
|
"svelte": "./dist/image-editor/index.js",
|
|
34
34
|
"default": "./dist/image-editor/index.js"
|
|
35
35
|
},
|
|
36
|
+
"./commands": {
|
|
37
|
+
"types": "./dist/commands/index.d.ts",
|
|
38
|
+
"svelte": "./dist/commands/index.js",
|
|
39
|
+
"default": "./dist/commands/index.js"
|
|
40
|
+
},
|
|
36
41
|
"./package.json": "./package.json"
|
|
37
42
|
},
|
|
38
43
|
"typesVersions": {
|
|
@@ -45,6 +50,9 @@
|
|
|
45
50
|
],
|
|
46
51
|
"image-editor": [
|
|
47
52
|
"./dist/image-editor/index.d.ts"
|
|
53
|
+
],
|
|
54
|
+
"commands": [
|
|
55
|
+
"./dist/commands/index.d.ts"
|
|
48
56
|
]
|
|
49
57
|
}
|
|
50
58
|
},
|
|
@@ -59,7 +67,7 @@
|
|
|
59
67
|
"@tiptap/extension-bubble-menu": "^2.11.5",
|
|
60
68
|
"@tiptap/extension-placeholder": "^2.11.5",
|
|
61
69
|
"@tiptap/starter-kit": "^2.11.5",
|
|
62
|
-
"@pixerate/editor": "0.
|
|
70
|
+
"@pixerate/editor": "0.23.0"
|
|
63
71
|
},
|
|
64
72
|
"peerDependencies": {
|
|
65
73
|
"@dagrejs/dagre": "^1.1.4",
|