@principal-ai/storybook-addon-otel 0.2.7 → 0.3.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/package.json +2 -2
- package/dist/manager.js +0 -22
- package/dist/preset.js +0 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principal-ai/storybook-addon-otel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Storybook addon for capturing and visualizing OpenTelemetry data from story interactions",
|
|
5
5
|
"main": "preset.js",
|
|
6
6
|
"files": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
|
-
"build": "tsc && node scripts/copy-browser-files.js",
|
|
37
|
+
"build": "tsc && node scripts/copy-browser-files.js && rm -f dist/manager.js dist/manager.d.ts dist/preset.js dist/preset.d.ts dist/components/*.js dist/components/*.d.ts",
|
|
38
38
|
"dev": "tsc --watch",
|
|
39
39
|
"clean": "rm -rf dist"
|
|
40
40
|
},
|
package/dist/manager.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Addon Manager Registration
|
|
4
|
-
*
|
|
5
|
-
* Registers the telemetry panel in Storybook UI
|
|
6
|
-
*/
|
|
7
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
-
};
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
const react_1 = __importDefault(require("react"));
|
|
12
|
-
const manager_api_1 = require("@storybook/manager-api");
|
|
13
|
-
const TelemetryPanel_1 = require("./components/TelemetryPanel");
|
|
14
|
-
const constants_1 = require("./constants");
|
|
15
|
-
manager_api_1.addons.register(constants_1.ADDON_ID, (api) => {
|
|
16
|
-
manager_api_1.addons.add(constants_1.PANEL_ID, {
|
|
17
|
-
type: manager_api_1.types.PANEL,
|
|
18
|
-
title: 'OTEL Telemetry',
|
|
19
|
-
match: ({ viewMode }) => viewMode === 'story',
|
|
20
|
-
render: ({ active }) => react_1.default.createElement(TelemetryPanel_1.TelemetryPanel, { active: active || false }),
|
|
21
|
-
});
|
|
22
|
-
});
|
package/dist/preset.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Addon Preset
|
|
4
|
-
*
|
|
5
|
-
* Configures the addon for Storybook
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.managerEntries = managerEntries;
|
|
9
|
-
exports.previewAnnotations = previewAnnotations;
|
|
10
|
-
function managerEntries(entry = []) {
|
|
11
|
-
return [...entry, require.resolve('./manager')];
|
|
12
|
-
}
|
|
13
|
-
function previewAnnotations(entry = []) {
|
|
14
|
-
return [...entry, require.resolve('./decorator')];
|
|
15
|
-
}
|