@fluentui/react-storybook-addon-export-to-sandbox 0.0.1 → 0.1.1
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/CHANGELOG.md +21 -3
- package/lib/decorators/with-export-to-sandbox-button.js +3 -8
- package/lib/decorators/with-export-to-sandbox-button.js.map +1 -1
- package/lib-commonjs/decorators/with-export-to-sandbox-button.js +3 -8
- package/lib-commonjs/decorators/with-export-to-sandbox-button.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-storybook-addon-export-to-sandbox
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 11 Jul 2025 15:56:57 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.1.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-storybook-addon-export-to-sandbox_v0.1.1)
|
|
8
|
+
|
|
9
|
+
Fri, 11 Jul 2025 15:56:57 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-storybook-addon-export-to-sandbox_v0.1.0..@fluentui/react-storybook-addon-export-to-sandbox_v0.1.1)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- fix: remove useEffect storybook/preview-api and directly trigger 'Open in ...' button rendering ([PR #34792](https://github.com/microsoft/fluentui/pull/34792) by martinhochel@microsoft.com)
|
|
15
|
+
|
|
16
|
+
## [0.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-storybook-addon-export-to-sandbox_v0.1.0)
|
|
17
|
+
|
|
18
|
+
Wed, 14 May 2025 13:28:52 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-storybook-addon-export-to-sandbox_v0.0.1..@fluentui/react-storybook-addon-export-to-sandbox_v0.1.0)
|
|
20
|
+
|
|
21
|
+
### Minor changes
|
|
22
|
+
|
|
23
|
+
- Bump @fluentui/babel-preset-storybook-full-source to v0.1.0 ([PR #34444](https://github.com/microsoft/fluentui/pull/34444) by beachball)
|
|
24
|
+
|
|
7
25
|
## [0.0.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-storybook-addon-export-to-sandbox_v0.0.1)
|
|
8
26
|
|
|
9
|
-
Tue, 01 Apr 2025
|
|
27
|
+
Tue, 01 Apr 2025 15:20:46 GMT
|
|
10
28
|
|
|
11
29
|
### Patches
|
|
12
30
|
|
|
13
31
|
- feat: release to npm ([PR #33983](https://github.com/microsoft/fluentui/pull/33983) by dmytrokirpa@microsoft.com)
|
|
14
|
-
- Bump @fluentui/babel-preset-storybook-full-source to v0.0.1 ([PR #
|
|
32
|
+
- Bump @fluentui/babel-preset-storybook-full-source to v0.0.1 ([PR #33909](https://github.com/microsoft/fluentui/pull/33909) by beachball)
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { useEffect } from '@storybook/preview-api';
|
|
2
1
|
import { addDemoActionButton } from '../sandbox-factory';
|
|
3
2
|
export const withExportToSandboxButton = (storyFn, context)=>{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
}, [
|
|
9
|
-
context
|
|
10
|
-
]);
|
|
3
|
+
if (context.viewMode === 'docs') {
|
|
4
|
+
addDemoActionButton(context);
|
|
5
|
+
}
|
|
11
6
|
return storyFn(context);
|
|
12
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/decorators/with-export-to-sandbox-button.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../src/decorators/with-export-to-sandbox-button.ts"],"sourcesContent":["import { addDemoActionButton } from '../sandbox-factory';\n\nimport { StoryContext } from '../types';\n\nexport const withExportToSandboxButton = (\n storyFn: (context: StoryContext) => // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element,\n context: StoryContext,\n) => {\n if (context.viewMode === 'docs') {\n addDemoActionButton(context);\n }\n\n return storyFn(context);\n};\n"],"names":["addDemoActionButton","withExportToSandboxButton","storyFn","context","viewMode"],"rangeMappings":";;;;;;","mappings":"AAAA,SAASA,mBAAmB,QAAQ,qBAAqB;AAIzD,OAAO,MAAMC,4BAA4B,CACvCC,SAEAC;IAEA,IAAIA,QAAQC,QAAQ,KAAK,QAAQ;QAC/BJ,oBAAoBG;IACtB;IAEA,OAAOD,QAAQC;AACjB,EAAE"}
|
|
@@ -8,15 +8,10 @@ Object.defineProperty(exports, "withExportToSandboxButton", {
|
|
|
8
8
|
return withExportToSandboxButton;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _previewapi = require("@storybook/preview-api");
|
|
12
11
|
const _sandboxfactory = require("../sandbox-factory");
|
|
13
12
|
const withExportToSandboxButton = (storyFn, context)=>{
|
|
14
|
-
(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}, [
|
|
19
|
-
context
|
|
20
|
-
]);
|
|
13
|
+
if (context.viewMode === 'docs') {
|
|
14
|
+
(0, _sandboxfactory.addDemoActionButton)(context);
|
|
15
|
+
}
|
|
21
16
|
return storyFn(context);
|
|
22
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/decorators/with-export-to-sandbox-button.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../src/decorators/with-export-to-sandbox-button.ts"],"sourcesContent":["import { addDemoActionButton } from '../sandbox-factory';\n\nimport { StoryContext } from '../types';\n\nexport const withExportToSandboxButton = (\n storyFn: (context: StoryContext) => // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element,\n context: StoryContext,\n) => {\n if (context.viewMode === 'docs') {\n addDemoActionButton(context);\n }\n\n return storyFn(context);\n};\n"],"names":["withExportToSandboxButton","storyFn","context","viewMode","addDemoActionButton"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;gCAJuB;AAI7B,MAAMA,4BAA4B,CACvCC,SAEAC;IAEA,IAAIA,QAAQC,QAAQ,KAAK,QAAQ;QAC/BC,IAAAA,mCAAmB,EAACF;IACtB;IAEA,OAAOD,QAAQC;AACjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-storybook-addon-export-to-sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Storybook addon that enables cloud/web sandbox exports for stories doc mode code examples",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@swc/helpers": "^0.5.1",
|
|
19
19
|
"babel-loader": "^9.1.3",
|
|
20
20
|
"codesandbox-import-utils": "^2.2.3",
|
|
21
|
-
"@fluentui/babel-preset-storybook-full-source": "^0.0
|
|
21
|
+
"@fluentui/babel-preset-storybook-full-source": "^0.1.0",
|
|
22
22
|
"dedent": "^1.2.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|