@sheetwrite/vue 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.
Files changed (2) hide show
  1. package/dist/index.d.ts +37 -2
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -109,9 +109,44 @@ export type SheetwriteComponentConstructor<Props, Emits, Expose = object> = new
109
109
  [EventName in keyof Emits & string as `on${Capitalize<EventName>}`]?: (payload: Emits[EventName]) => void;
110
110
  };
111
111
  };
112
- /** Advanced framework component for workbook data or datasource input. */
112
+ /**
113
+ * Advanced framework component for workbook data or datasource input.
114
+ *
115
+ * @example
116
+ * ```ts
117
+ * import { createApp, h } from "vue";
118
+ * import { SheetwriteGrid } from "@sheetwrite/vue";
119
+ * import type { Workbook } from "@sheetwrite/core";
120
+ *
121
+ * function mountWorkbook(host: HTMLElement, workbook: Workbook) {
122
+ * const app = createApp({ render: () => h(SheetwriteGrid, { workbook, height: 400 }) });
123
+ * app.mount(host);
124
+ * return () => app.unmount();
125
+ * }
126
+ * ```
127
+ * @see Sheetwrite
128
+ * @see /docs/frameworks/vue/
129
+ */
113
130
  export declare const SheetwriteGrid: SheetwriteComponentConstructor<SheetwriteGridProps, SheetwriteGridEmits, SheetwriteGridExpose>;
114
- /** Convenience component for local object rows with live option updates. */
131
+ /**
132
+ * Convenience component for local object rows with live option updates.
133
+ *
134
+ * @example
135
+ * ```ts
136
+ * import { createApp, h } from "vue";
137
+ * import { Sheetwrite } from "@sheetwrite/vue";
138
+ *
139
+ * const app = createApp({ render: () => h(Sheetwrite, {
140
+ * columns: [{ key: "amount", title: "Amount", type: "number" }],
141
+ * defaultRows: [{ amount: 12 }, { amount: 18 }],
142
+ * height: 400,
143
+ * }) });
144
+ * app.mount(document.body);
145
+ * // Call app.unmount() before removing the host view.
146
+ * ```
147
+ * @see SheetwriteGrid
148
+ * @see /docs/frameworks/vue/
149
+ */
115
150
  export declare const Sheetwrite: SheetwriteComponentConstructor<SheetwriteProps, SheetwriteGridEmits>;
116
151
  export type { CellEditor, CellEditorContext, CellEditorInstance, CellEditorNavigation, CellScalar, Grid, GridCommandName, GridCommandState, } from "@sheetwrite/core";
117
152
  export type { GridReadyEvent, RowBridge, RowBridgeDelta, RowBridgeHandler, RowBridgeId, RowBridgeProjection, SimpleColumn, } from "@sheetwrite/core/adapter";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheetwrite/vue",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "description": "Vue adapter for Sheetwrite.",
6
6
  "license": "MIT",
@@ -49,6 +49,6 @@
49
49
  "vue": ">=3.4"
50
50
  },
51
51
  "dependencies": {
52
- "@sheetwrite/core": "0.5.0"
52
+ "@sheetwrite/core": "0.5.1"
53
53
  }
54
54
  }