@sheetwrite/svelte 0.5.0 → 0.5.1
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/package.json +2 -2
- package/src/index.ts +36 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetwrite/svelte",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Svelte adapter for Sheetwrite.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"svelte": ">=5"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@sheetwrite/core": "0.5.
|
|
51
|
+
"@sheetwrite/core": "0.5.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"svelte-check": "4.7.3",
|
package/src/index.ts
CHANGED
|
@@ -18,7 +18,42 @@ export type {
|
|
|
18
18
|
SimpleColumn,
|
|
19
19
|
} from "@sheetwrite/core/adapter";
|
|
20
20
|
export type { SheetwriteGridProps } from "./Grid.svelte";
|
|
21
|
+
/**
|
|
22
|
+
* Advanced component for an existing workbook or datasource.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { mount, unmount } from "svelte";
|
|
27
|
+
* import { SheetwriteGrid } from "@sheetwrite/svelte";
|
|
28
|
+
* import type { Workbook } from "@sheetwrite/core";
|
|
29
|
+
*
|
|
30
|
+
* function mountWorkbook(target: HTMLElement, workbook: Workbook) {
|
|
31
|
+
* const view = mount(SheetwriteGrid, { target, props: { workbook, height: 400 } });
|
|
32
|
+
* return () => unmount(view);
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
* @see Sheetwrite
|
|
36
|
+
* @see /docs/frameworks/svelte/
|
|
37
|
+
*/
|
|
21
38
|
export { default as SheetwriteGrid } from "./Grid.svelte";
|
|
22
39
|
export type { SheetwriteProps } from "./Sheetwrite.svelte";
|
|
23
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Convenience component for local object rows. Bind `grid` to access the live `Grid`.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* import { mount, unmount } from "svelte";
|
|
46
|
+
* import { Sheetwrite } from "@sheetwrite/svelte";
|
|
47
|
+
*
|
|
48
|
+
* const view = mount(Sheetwrite, { target: document.body, props: {
|
|
49
|
+
* columns: [{ key: "amount", title: "Amount", type: "number" }],
|
|
50
|
+
* defaultRows: [{ amount: 12 }, { amount: 18 }],
|
|
51
|
+
* height: 400,
|
|
52
|
+
* } });
|
|
53
|
+
* // Call when the host view is removed.
|
|
54
|
+
* await unmount(view);
|
|
55
|
+
* ```
|
|
56
|
+
* @see SheetwriteGrid
|
|
57
|
+
* @see /docs/frameworks/svelte/
|
|
58
|
+
*/
|
|
24
59
|
export { default as Sheetwrite } from "./Sheetwrite.svelte";
|