sketchmark 1.1.0 → 1.1.2

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 CHANGED
@@ -60,15 +60,52 @@ a --> b label="greets"
60
60
  end
61
61
  `.trim();
62
62
 
63
- const instance = render({
64
- container: document.getElementById('diagram'),
65
- dsl,
66
- renderer: 'svg',
67
- svgOptions: { showTitle: true, theme: 'light', transparent: true },
68
- });
69
- ```
70
-
71
- ---
63
+ const instance = render({
64
+ container: document.getElementById('diagram'),
65
+ dsl,
66
+ renderer: 'svg',
67
+ svgOptions: { showTitle: true, theme: 'light', transparent: true },
68
+ });
69
+ ```
70
+
71
+ ### Reusable UI Widgets
72
+
73
+ ```javascript
74
+ import { SketchmarkCanvas, SketchmarkEditor } from 'sketchmark';
75
+
76
+ const editor = new SketchmarkEditor({
77
+ container: document.getElementById('editor'),
78
+ value: `
79
+ diagram
80
+ box app label="App"
81
+ box api label="API"
82
+ app --> api
83
+ end
84
+ `.trim(),
85
+ });
86
+
87
+ const canvas = new SketchmarkCanvas({
88
+ container: document.getElementById('viewport'),
89
+ });
90
+
91
+ canvas.bindEditor(editor);
92
+ ```
93
+
94
+ ```javascript
95
+ import { SketchmarkEmbed } from 'sketchmark';
96
+
97
+ const embed = new SketchmarkEmbed({
98
+ container: document.getElementById('article-embed'),
99
+ dsl,
100
+ width: 960,
101
+ height: 540,
102
+ playStepDelay: 700,
103
+ });
104
+ ```
105
+
106
+ Use `SketchmarkCanvas` for the full playground-style surface, and `SketchmarkEmbed` for fixed-size embeds that clip overflow and follow animation targets as steps advance.
107
+
108
+ ---
72
109
 
73
110
  ## Framework Setup
74
111