executable-stories-react 0.14.0 → 0.15.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/dist/interactive.cjs +310 -232
- package/dist/interactive.cjs.map +1 -1
- package/dist/interactive.d.cts +4 -0
- package/dist/interactive.d.ts +4 -0
- package/dist/interactive.js +272 -194
- package/dist/interactive.js.map +1 -1
- package/dist/report-island.global.js +43 -42
- package/dist/ssr.cjs +5 -2
- package/dist/ssr.cjs.map +1 -1
- package/dist/ssr.d.cts +4 -0
- package/dist/ssr.d.ts +4 -0
- package/dist/ssr.js +5 -2
- package/dist/ssr.js.map +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +2 -2
package/dist/ssr.cjs
CHANGED
|
@@ -1835,7 +1835,9 @@ function renderReportToHtml(report, options = {}) {
|
|
|
1835
1835
|
mermaid = true,
|
|
1836
1836
|
islandScript = "",
|
|
1837
1837
|
staleAfterDays = 7,
|
|
1838
|
-
scenarioHistory
|
|
1838
|
+
scenarioHistory,
|
|
1839
|
+
share = false,
|
|
1840
|
+
shareCommand = ""
|
|
1839
1841
|
} = options;
|
|
1840
1842
|
const markup = (0, import_server.renderToStaticMarkup)(
|
|
1841
1843
|
(0, import_react10.createElement)(Report, { report, title })
|
|
@@ -1848,7 +1850,8 @@ function renderReportToHtml(report, options = {}) {
|
|
|
1848
1850
|
const historyScript = interactive && scenarioHistory && Object.keys(scenarioHistory).length > 0 ? `<script type="application/json" id="${HISTORY_ID}">${escapeJsonForScript(JSON.stringify(scenarioHistory))}</script>` : "";
|
|
1849
1851
|
const islandTag = interactive ? `<script>${islandScript}</script>` : "";
|
|
1850
1852
|
const cdnBody = interactive ? "" : cdn.body;
|
|
1851
|
-
const
|
|
1853
|
+
const shareAttrs = share ? ` data-es-share="true"${shareCommand ? ` data-es-share-cmd="${escapeHtml(shareCommand)}"` : ""}` : "";
|
|
1854
|
+
const islandConfigAttrs = interactive ? ` data-es-syntax="${syntaxHighlighting ? "true" : "false"}" data-es-mermaid="${mermaid ? "true" : "false"}" data-es-stale-days="${Number.isFinite(staleAfterDays) && staleAfterDays >= 0 ? staleAfterDays : 7}"${shareAttrs}` : "";
|
|
1852
1855
|
const rootAttrs = interactive ? ` id="${ROOT_ID}" data-title="${escapeHtml(title)}"${islandConfigAttrs}` : "";
|
|
1853
1856
|
return `<!DOCTYPE html>
|
|
1854
1857
|
<html lang="${escapeHtml(lang)}" data-theme="${theme === "dark" ? "dark" : "light"}">
|