@industry-theme/principal-view-panels 0.1.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/LICENSE +21 -0
- package/README.md +536 -0
- package/dist/adapters/PanelFileSystemAdapter.d.ts +82 -0
- package/dist/adapters/PanelFileSystemAdapter.d.ts.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/mocks/panelContext.d.ts +24 -0
- package/dist/mocks/panelContext.d.ts.map +1 -0
- package/dist/mocks/vvfConfigs.d.ts +32 -0
- package/dist/mocks/vvfConfigs.d.ts.map +1 -0
- package/dist/panels/ConfigLibraryBrowserPanel.d.ts +18 -0
- package/dist/panels/ConfigLibraryBrowserPanel.d.ts.map +1 -0
- package/dist/panels/ConfigLibraryBrowserPanel.stories.d.ts +42 -0
- package/dist/panels/ConfigLibraryBrowserPanel.stories.d.ts.map +1 -0
- package/dist/panels/ControlTowerIntegration.stories.d.ts +12 -0
- package/dist/panels/ControlTowerIntegration.stories.d.ts.map +1 -0
- package/dist/panels/EventControllerPanel.d.ts +32 -0
- package/dist/panels/EventControllerPanel.d.ts.map +1 -0
- package/dist/panels/EventControllerPanel.stories.d.ts +53 -0
- package/dist/panels/EventControllerPanel.stories.d.ts.map +1 -0
- package/dist/panels/EventRecorderPanel.d.ts +54 -0
- package/dist/panels/EventRecorderPanel.d.ts.map +1 -0
- package/dist/panels/EventRecorderPanel.stories.d.ts +12 -0
- package/dist/panels/EventRecorderPanel.stories.d.ts.map +1 -0
- package/dist/panels/EventRecordingIntegration.stories.d.ts +21 -0
- package/dist/panels/EventRecordingIntegration.stories.d.ts.map +1 -0
- package/dist/panels/PrincipalViewGraphPanel.d.ts +10 -0
- package/dist/panels/PrincipalViewGraphPanel.d.ts.map +1 -0
- package/dist/panels/PrincipalViewGraphPanel.stories.d.ts +77 -0
- package/dist/panels/PrincipalViewGraphPanel.stories.d.ts.map +1 -0
- package/dist/panels/principal-view/ConfigLoader.d.ts +43 -0
- package/dist/panels/principal-view/ConfigLoader.d.ts.map +1 -0
- package/dist/panels/principal-view/EmptyStateContent.d.ts +12 -0
- package/dist/panels/principal-view/EmptyStateContent.d.ts.map +1 -0
- package/dist/panels/principal-view/ErrorStateContent.d.ts +14 -0
- package/dist/panels/principal-view/ErrorStateContent.d.ts.map +1 -0
- package/dist/panels/principal-view/forceLayout.d.ts +38 -0
- package/dist/panels/principal-view/forceLayout.d.ts.map +1 -0
- package/dist/panels.bundle.js +53682 -0
- package/dist/panels.bundle.js.map +1 -0
- package/dist/tools/index.d.ts +32 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools.bundle.js +111 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +116 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Panel Tools
|
|
3
|
+
*
|
|
4
|
+
* UTCP-compatible tools for the Principal View panel extension.
|
|
5
|
+
* These tools can be invoked by AI agents and emit events that panels listen for.
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: This file should NOT import any React components to ensure
|
|
8
|
+
* it can be imported server-side without pulling in React dependencies.
|
|
9
|
+
* Use the './tools' subpath export for server-safe imports.
|
|
10
|
+
*/
|
|
11
|
+
import type { PanelTool, PanelToolsMetadata } from '@principal-ade/utcp-panel-event';
|
|
12
|
+
/**
|
|
13
|
+
* Tool: Focus Node
|
|
14
|
+
*/
|
|
15
|
+
export declare const focusNodeTool: PanelTool;
|
|
16
|
+
/**
|
|
17
|
+
* Tool: Reset View
|
|
18
|
+
*/
|
|
19
|
+
export declare const resetViewTool: PanelTool;
|
|
20
|
+
/**
|
|
21
|
+
* Tool: Trigger Event
|
|
22
|
+
*/
|
|
23
|
+
export declare const triggerEventTool: PanelTool;
|
|
24
|
+
/**
|
|
25
|
+
* All tools exported as an array.
|
|
26
|
+
*/
|
|
27
|
+
export declare const principalViewPanelTools: PanelTool[];
|
|
28
|
+
/**
|
|
29
|
+
* Panel tools metadata for registration with PanelToolRegistry.
|
|
30
|
+
*/
|
|
31
|
+
export declare const principalViewPanelToolsMetadata: PanelToolsMetadata;
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SA6B3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAuB3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAqC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,EAI9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B,EAAE,kBAK7C,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// src/tools/index.ts
|
|
2
|
+
var focusNodeTool = {
|
|
3
|
+
name: "focus_node",
|
|
4
|
+
description: "Focuses the graph view on a specific node",
|
|
5
|
+
inputs: {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {
|
|
8
|
+
nodeId: {
|
|
9
|
+
type: "string",
|
|
10
|
+
description: "The ID of the node to focus on"
|
|
11
|
+
},
|
|
12
|
+
animate: {
|
|
13
|
+
type: "boolean",
|
|
14
|
+
description: "Whether to animate the transition"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
required: ["nodeId"]
|
|
18
|
+
},
|
|
19
|
+
outputs: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
success: { type: "boolean" },
|
|
23
|
+
message: { type: "string" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
tags: ["graph", "navigation", "focus"],
|
|
27
|
+
tool_call_template: {
|
|
28
|
+
call_template_type: "panel_event",
|
|
29
|
+
event_type: "industry-theme.principal-view-panels:focus-node"
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var resetViewTool = {
|
|
33
|
+
name: "reset_view",
|
|
34
|
+
description: "Resets the graph view to fit all nodes",
|
|
35
|
+
inputs: {
|
|
36
|
+
type: "object",
|
|
37
|
+
properties: {
|
|
38
|
+
animate: {
|
|
39
|
+
type: "boolean",
|
|
40
|
+
description: "Whether to animate the reset"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
outputs: {
|
|
45
|
+
type: "object",
|
|
46
|
+
properties: {
|
|
47
|
+
success: { type: "boolean" }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
tags: ["graph", "navigation", "reset"],
|
|
51
|
+
tool_call_template: {
|
|
52
|
+
call_template_type: "panel_event",
|
|
53
|
+
event_type: "industry-theme.principal-view-panels:reset-view"
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var triggerEventTool = {
|
|
57
|
+
name: "trigger_event",
|
|
58
|
+
description: "Triggers a graph event for animation or state change",
|
|
59
|
+
inputs: {
|
|
60
|
+
type: "object",
|
|
61
|
+
properties: {
|
|
62
|
+
eventType: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "The type of event to trigger"
|
|
65
|
+
},
|
|
66
|
+
sourceNodeId: {
|
|
67
|
+
type: "string",
|
|
68
|
+
description: "The source node ID for the event"
|
|
69
|
+
},
|
|
70
|
+
targetNodeId: {
|
|
71
|
+
type: "string",
|
|
72
|
+
description: "The target node ID for the event"
|
|
73
|
+
},
|
|
74
|
+
payload: {
|
|
75
|
+
type: "object",
|
|
76
|
+
description: "Additional event payload data"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
required: ["eventType"]
|
|
80
|
+
},
|
|
81
|
+
outputs: {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: {
|
|
84
|
+
success: { type: "boolean" },
|
|
85
|
+
eventId: { type: "string" }
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
tags: ["graph", "event", "animation"],
|
|
89
|
+
tool_call_template: {
|
|
90
|
+
call_template_type: "panel_event",
|
|
91
|
+
event_type: "industry-theme.principal-view-panels:trigger-event"
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
var principalViewPanelTools = [
|
|
95
|
+
focusNodeTool,
|
|
96
|
+
resetViewTool,
|
|
97
|
+
triggerEventTool
|
|
98
|
+
];
|
|
99
|
+
var principalViewPanelToolsMetadata = {
|
|
100
|
+
id: "industry-theme.principal-view-panels",
|
|
101
|
+
name: "Principal View Panels",
|
|
102
|
+
description: "Tools provided by the principal view graph panel extension",
|
|
103
|
+
tools: principalViewPanelTools
|
|
104
|
+
};
|
|
105
|
+
export {
|
|
106
|
+
triggerEventTool,
|
|
107
|
+
resetViewTool,
|
|
108
|
+
principalViewPanelToolsMetadata,
|
|
109
|
+
principalViewPanelTools,
|
|
110
|
+
focusNodeTool
|
|
111
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Panel Extension Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Re-exports core types from @principal-ade/panel-framework-core
|
|
5
|
+
*/
|
|
6
|
+
export type { DataSlice, WorkspaceMetadata, RepositoryMetadata, FileTreeSource, ActiveFileSlice, PanelEventType, PanelEvent, PanelEventEmitter, PanelActions, PanelContextValue, PanelComponentProps, PanelMetadata, PanelLifecycleHooks, PanelDefinition, PanelModule, PanelRegistryEntry, PanelLoader, PanelRegistryConfig, } from '@principal-ade/panel-framework-core';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAEV,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EAGf,cAAc,EACd,UAAU,EACV,iBAAiB,EAGjB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EAGnB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,WAAW,EAGX,kBAAkB,EAClB,WAAW,EACX,mBAAmB,GACpB,MAAM,qCAAqC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@industry-theme/principal-view-panels",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Principal View Graph Panels for visualizing graph configurations from .vgc/ folder as interactive diagrams",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/panels.bundle.js",
|
|
7
|
+
"module": "dist/panels.bundle.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/panels.bundle.js",
|
|
13
|
+
"require": "./dist/panels.bundle.js",
|
|
14
|
+
"default": "./dist/panels.bundle.js"
|
|
15
|
+
},
|
|
16
|
+
"./tools": {
|
|
17
|
+
"types": "./dist/tools/index.d.ts",
|
|
18
|
+
"import": "./dist/tools.bundle.js",
|
|
19
|
+
"require": "./dist/tools.bundle.js",
|
|
20
|
+
"default": "./dist/tools.bundle.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"panel-extension",
|
|
25
|
+
"principal-view",
|
|
26
|
+
"graph",
|
|
27
|
+
"panel"
|
|
28
|
+
],
|
|
29
|
+
"author": "Principal AI",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "bun run clean && bun run build:panel && bun run build:tools && bun run build:types",
|
|
33
|
+
"build:panel": "vite build",
|
|
34
|
+
"build:tools": "bun build ./src/tools/index.ts --outfile ./dist/tools.bundle.js --format esm --target browser",
|
|
35
|
+
"build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly --declaration --declarationMap",
|
|
36
|
+
"dev": "vite build --watch",
|
|
37
|
+
"clean": "rm -rf dist",
|
|
38
|
+
"typecheck": "tsc --noEmit",
|
|
39
|
+
"lint": "eslint . --ext .ts,.tsx",
|
|
40
|
+
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
|
41
|
+
"format": "prettier --write .",
|
|
42
|
+
"format:check": "prettier --check .",
|
|
43
|
+
"test": "bun test",
|
|
44
|
+
"test:watch": "bun test --watch",
|
|
45
|
+
"storybook": "storybook dev -p 6006",
|
|
46
|
+
"build-storybook": "storybook build"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"react": ">=19.0.0",
|
|
50
|
+
"react-dom": ">=19.0.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependenciesMeta": {
|
|
53
|
+
"@principal-ade/panel-framework-core": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@principal-ade/industry-theme": "^0.1.3",
|
|
59
|
+
"@principal-ade/panel-framework-core": "^0.1.10",
|
|
60
|
+
"@principal-ade/utcp-panel-event": "^0.1.0",
|
|
61
|
+
"@principal-ai/repository-abstraction": "0.2.5",
|
|
62
|
+
"@principal-ai/principal-view-core": "0.5.6",
|
|
63
|
+
"@principal-ai/principal-view-react": "0.6.6",
|
|
64
|
+
"@xyflow/react": "^12.0.0",
|
|
65
|
+
"clsx": "^2.1.1",
|
|
66
|
+
"d3-dag": "^1.1.0",
|
|
67
|
+
"d3-force": "^3.0.0",
|
|
68
|
+
"framer-motion": "^11.0.0",
|
|
69
|
+
"js-yaml": "^4.1.1",
|
|
70
|
+
"lucide-react": "^0.552.0"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@chromatic-com/storybook": "^4.1.3",
|
|
74
|
+
"@eslint/js": "^9.32.0",
|
|
75
|
+
"@storybook/addon-docs": "10.1.2",
|
|
76
|
+
"@storybook/addon-links": "10.1.2",
|
|
77
|
+
"@storybook/addon-onboarding": "10.1.2",
|
|
78
|
+
"@storybook/react-vite": "10.1.2",
|
|
79
|
+
"@types/bun": "latest",
|
|
80
|
+
"@types/d3-force": "^3.0.10",
|
|
81
|
+
"@types/js-yaml": "^4.0.9",
|
|
82
|
+
"@types/node": "^22.15.26",
|
|
83
|
+
"@types/react": "^19.0.0",
|
|
84
|
+
"@types/react-dom": "^19.0.0",
|
|
85
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
86
|
+
"@typescript-eslint/parser": "^8.38.0",
|
|
87
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
88
|
+
"esbuild": "^0.25.8",
|
|
89
|
+
"eslint": "^9.32.0",
|
|
90
|
+
"eslint-config-prettier": "^10.1.8",
|
|
91
|
+
"eslint-plugin-react": "^7.37.2",
|
|
92
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
93
|
+
"eslint-plugin-storybook": "10.1.2",
|
|
94
|
+
"prettier": "^3.6.2",
|
|
95
|
+
"react": "^19.0.0",
|
|
96
|
+
"react-dom": "^19.0.0",
|
|
97
|
+
"storybook": "10.1.2",
|
|
98
|
+
"typescript": "^5.0.4",
|
|
99
|
+
"typescript-eslint": "^8.38.0",
|
|
100
|
+
"vite": "^6.0.7",
|
|
101
|
+
"vite-plugin-css-injected-by-js": "^3.5.2"
|
|
102
|
+
},
|
|
103
|
+
"files": [
|
|
104
|
+
"dist",
|
|
105
|
+
"README.md",
|
|
106
|
+
"LICENSE"
|
|
107
|
+
],
|
|
108
|
+
"repository": {
|
|
109
|
+
"type": "git",
|
|
110
|
+
"url": "git+https://github.com/your-org/panel-starter.git"
|
|
111
|
+
},
|
|
112
|
+
"publishConfig": {
|
|
113
|
+
"access": "public",
|
|
114
|
+
"registry": "https://registry.npmjs.org/"
|
|
115
|
+
}
|
|
116
|
+
}
|