@radnine/storybook-addon-claude 0.5.0 → 0.5.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/dist/manager.js +8 -2
- package/package.json +1 -1
package/dist/manager.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/manager.js
|
|
2
|
-
import
|
|
2
|
+
import React11 from "react";
|
|
3
|
+
import { addons, types, useStorybookState as useStorybookState2 } from "storybook/manager-api";
|
|
3
4
|
|
|
4
5
|
// src/constants.js
|
|
5
6
|
var ADDON_ID = "storybook-addon-claude";
|
|
@@ -1806,6 +1807,11 @@ function GlobalChatButton() {
|
|
|
1806
1807
|
}
|
|
1807
1808
|
|
|
1808
1809
|
// src/manager.js
|
|
1810
|
+
function ClaudePageRoute() {
|
|
1811
|
+
const { path } = useStorybookState2();
|
|
1812
|
+
if (path !== "/claude") return null;
|
|
1813
|
+
return /* @__PURE__ */ React11.createElement(GlobalPanel, null);
|
|
1814
|
+
}
|
|
1809
1815
|
addons.register(ADDON_ID, (api) => {
|
|
1810
1816
|
addons.add(PANEL_ID, {
|
|
1811
1817
|
type: types.PANEL,
|
|
@@ -1817,7 +1823,7 @@ addons.register(ADDON_ID, (api) => {
|
|
|
1817
1823
|
type: types.experimental_PAGE,
|
|
1818
1824
|
title: "Claude Global",
|
|
1819
1825
|
url: "/claude",
|
|
1820
|
-
render:
|
|
1826
|
+
render: ClaudePageRoute
|
|
1821
1827
|
});
|
|
1822
1828
|
addons.add(TOOL_ID, {
|
|
1823
1829
|
type: types.TOOLEXTRA,
|
package/package.json
CHANGED