@draftably/solid 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 +3 -0
- package/dist/index.jsx +1 -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/solid
|
|
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
|
@@ -11,6 +11,7 @@ declare module 'solid-js' {
|
|
|
11
11
|
source?: string;
|
|
12
12
|
state?: string;
|
|
13
13
|
label?: string;
|
|
14
|
+
outline?: 'visible' | 'hidden';
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
}
|
|
@@ -22,6 +23,8 @@ export interface DraftDiagramProps {
|
|
|
22
23
|
state?: string | null;
|
|
23
24
|
/** The accessible name. */
|
|
24
25
|
label?: string;
|
|
26
|
+
/** `'visible'` shows the item list under the drawing; `'hidden'` (default) shows it on focus. */
|
|
27
|
+
outline?: 'visible' | 'hidden';
|
|
25
28
|
/**
|
|
26
29
|
* Static SVG from `renderSvg(source, { target: 'inline', idPrefix })`, shown until the viewer
|
|
27
30
|
* draws. Server rendering and readers without JavaScript see it.
|
package/dist/index.jsx
CHANGED
|
@@ -19,7 +19,7 @@ export function DraftDiagram(props) {
|
|
|
19
19
|
return (<draft-diagram ref={(node) => {
|
|
20
20
|
el = node;
|
|
21
21
|
props.ref?.(node);
|
|
22
|
-
}} source={props.source} state={props.state ?? undefined} label={props.label} class={props.class} style={props.style}>
|
|
22
|
+
}} source={props.source} state={props.state ?? undefined} label={props.label} outline={props.outline} class={props.class} style={props.style}>
|
|
23
23
|
<Show when={props.svg}>{svg => <div innerHTML={svg()}/>}</Show>
|
|
24
24
|
</draft-diagram>);
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftably/solid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Solid 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
|
"solid-js": "^1.8"
|