@draftably/vue 0.1.0 → 0.2.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 +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.js +9 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -8,5 +8,5 @@ cleanup when it unmounts. Any number of diagrams can share a page.
|
|
|
8
8
|
pnpm add @draftably/vue
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
See [
|
|
11
|
+
See [Frameworks](https://draftably.dev/docs/frameworks) for the component, server
|
|
12
12
|
rendering with the `svg` prop, and a complete example.
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ export declare const DraftDiagram: import("vue").DefineComponent<import("vue").E
|
|
|
20
20
|
type: StringConstructor;
|
|
21
21
|
default: undefined;
|
|
22
22
|
};
|
|
23
|
+
/** `'visible'` shows the item list under the drawing; `'hidden'` (default) shows it on focus. */
|
|
24
|
+
outline: {
|
|
25
|
+
type: PropType<"visible" | "hidden">;
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
23
28
|
/** Static SVG from `renderSvg(source, { target: 'inline', idPrefix })`, shown until the viewer draws. */
|
|
24
29
|
svg: {
|
|
25
30
|
type: StringConstructor;
|
|
@@ -49,6 +54,11 @@ export declare const DraftDiagram: import("vue").DefineComponent<import("vue").E
|
|
|
49
54
|
type: StringConstructor;
|
|
50
55
|
default: undefined;
|
|
51
56
|
};
|
|
57
|
+
/** `'visible'` shows the item list under the drawing; `'hidden'` (default) shows it on focus. */
|
|
58
|
+
outline: {
|
|
59
|
+
type: PropType<"visible" | "hidden">;
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
52
62
|
/** Static SVG from `renderSvg(source, { target: 'inline', idPrefix })`, shown until the viewer draws. */
|
|
53
63
|
svg: {
|
|
54
64
|
type: StringConstructor;
|
|
@@ -63,6 +73,7 @@ export declare const DraftDiagram: import("vue").DefineComponent<import("vue").E
|
|
|
63
73
|
}>, {
|
|
64
74
|
label: string;
|
|
65
75
|
state: string | null;
|
|
76
|
+
outline: "visible" | "hidden";
|
|
66
77
|
svg: string;
|
|
67
78
|
options: ViewerOptions;
|
|
68
79
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,8 @@ export const DraftDiagram = defineComponent({
|
|
|
10
10
|
state: { type: String, default: undefined },
|
|
11
11
|
/** The accessible name. */
|
|
12
12
|
label: { type: String, default: undefined },
|
|
13
|
+
/** `'visible'` shows the item list under the drawing; `'hidden'` (default) shows it on focus. */
|
|
14
|
+
outline: { type: String, default: undefined },
|
|
13
15
|
/** Static SVG from `renderSvg(source, { target: 'inline', idPrefix })`, shown until the viewer draws. */
|
|
14
16
|
svg: { type: String, default: undefined },
|
|
15
17
|
options: { type: Object, default: undefined },
|
|
@@ -25,7 +27,13 @@ export const DraftDiagram = defineComponent({
|
|
|
25
27
|
el.value.options = props.options;
|
|
26
28
|
});
|
|
27
29
|
expose({ element: el });
|
|
28
|
-
return () => h('draft-diagram', {
|
|
30
|
+
return () => h('draft-diagram', {
|
|
31
|
+
ref: el,
|
|
32
|
+
source: props.source,
|
|
33
|
+
state: props.state ?? undefined,
|
|
34
|
+
label: props.label,
|
|
35
|
+
outline: props.outline,
|
|
36
|
+
}, props.svg ? [h('div', { innerHTML: props.svg })] : []);
|
|
29
37
|
},
|
|
30
38
|
});
|
|
31
39
|
export default DraftDiagram;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftably/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Vue components for Draftably diagrams.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@draftably/runtime": "0.
|
|
27
|
-
"@draftably/editor": "0.
|
|
26
|
+
"@draftably/runtime": "0.2.0",
|
|
27
|
+
"@draftably/editor": "0.2.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"vue": "^3.4"
|