sfn-diagram-react 0.5.0 → 0.6.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 CHANGED
@@ -15,7 +15,7 @@ npm install sfn-diagram-react sfn-diagram
15
15
  pnpm add sfn-diagram-react sfn-diagram
16
16
  ```
17
17
 
18
- `react` and `sfn-diagram` are peer dependencies. `sfn-diagram >= 1.6.0` is required — earlier versions don't have the options this package forwards (`collapse`, `catchHandling`, `showVariables`, `generateHtml`, and `edgeOverrides`' qualified-id form).
18
+ `react` and `sfn-diagram` are peer dependencies. `sfn-diagram >= 1.7.0` is required — earlier versions don't have the options this package forwards (`collapse`, `catchHandling`, `showVariables`, `generateHtml`, `edgeOverrides`' qualified-id form, and `layout`/`theme` on the Mermaid path).
19
19
 
20
20
  ## Usage
21
21
 
@@ -83,8 +83,9 @@ Consequences worth knowing:
83
83
  wrapper with a fixed aspect ratio).
84
84
  - `onStateClick` does not fire from inside it — clicks inside a sandboxed iframe never
85
85
  reach the parent document's event handlers.
86
- - `history` cannot be combined with `format="html"` — core's `generateHtml` accepts
87
- neither `history` nor a diff. Combining them calls `onError` and renders `null`.
86
+ - `history` cannot be combined with `format="html"` yet — core's `generateHtml` accepts
87
+ `history` and `diff` overlays since sfn-diagram 1.8, but this hook does not wire them
88
+ up. Combining them calls `onError` and renders `null`.
88
89
 
89
90
  ```tsx
90
91
  <SfnDiagram definition={definition} format="html" style={{ height: 600, width: '100%' }} />
package/dist/index.cjs CHANGED
@@ -183,7 +183,7 @@ const SfnDiagram = (0, react.forwardRef)(function SfnDiagram({ className, onErro
183
183
  });
184
184
  if (result.type === "html") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("iframe", {
185
185
  className,
186
- sandbox: "allow-scripts",
186
+ sandbox: "allow-downloads allow-scripts",
187
187
  srcDoc: result.html,
188
188
  style,
189
189
  title
package/dist/index.d.cts CHANGED
@@ -6,8 +6,9 @@ interface UseSfnDiagramParams extends Pick<DiagramOptions, 'catchHandling' | 'co
6
6
  * When set, `definition` is treated as the *after* side of a diff and `before`
7
7
  * as the *original* side: the rendered diagram highlights added, modified, and
8
8
  * removed states rather than the plain machine. Accepts an ASL object or a
9
- * JSON string. Cannot be combined with `history` or `format="html"` - core has
10
- * no diff API for either combination.
9
+ * JSON string. Cannot be combined with `history` (core's SVG and Mermaid diff
10
+ * functions take no history) or with `format="html"` (core's `generateHtml`
11
+ * accepts a diff since sfn-diagram 1.8, but this hook does not wire it up yet).
11
12
  *
12
13
  * The Mermaid diff (`generateMermaidDiff`) ignores every option in this
13
14
  * type's `Pick<DiagramOptions, ...>` list - `layout`, `theme`, and the rest -
package/dist/index.d.ts CHANGED
@@ -6,8 +6,9 @@ interface UseSfnDiagramParams extends Pick<DiagramOptions, 'catchHandling' | 'co
6
6
  * When set, `definition` is treated as the *after* side of a diff and `before`
7
7
  * as the *original* side: the rendered diagram highlights added, modified, and
8
8
  * removed states rather than the plain machine. Accepts an ASL object or a
9
- * JSON string. Cannot be combined with `history` or `format="html"` - core has
10
- * no diff API for either combination.
9
+ * JSON string. Cannot be combined with `history` (core's SVG and Mermaid diff
10
+ * functions take no history) or with `format="html"` (core's `generateHtml`
11
+ * accepts a diff since sfn-diagram 1.8, but this hook does not wire it up yet).
11
12
  *
12
13
  * The Mermaid diff (`generateMermaidDiff`) ignores every option in this
13
14
  * type's `Pick<DiagramOptions, ...>` list - `layout`, `theme`, and the rest -
package/dist/index.js CHANGED
@@ -182,7 +182,7 @@ const SfnDiagram = forwardRef(function SfnDiagram({ className, onError, onStateC
182
182
  });
183
183
  if (result.type === "html") return /* @__PURE__ */ jsx("iframe", {
184
184
  className,
185
- sandbox: "allow-scripts",
185
+ sandbox: "allow-downloads allow-scripts",
186
186
  srcDoc: result.html,
187
187
  style,
188
188
  title
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfn-diagram-react",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "React component for AWS Step Functions ASL diagrams",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -64,7 +64,7 @@
64
64
  "homepage": "https://sfn.yusufaf.dev/ecosystem/react/",
65
65
  "peerDependencies": {
66
66
  "react": "^18.0.0 || ^19.0.0",
67
- "sfn-diagram": "^1.6.0"
67
+ "sfn-diagram": "^1.7.0"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@arethetypeswrong/cli": "^0.18.5",