@industry-theme/principal-view-panels 0.1.0 → 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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
/**
|
|
3
3
|
* ConfigLibraryBrowserPanel displays available .canvas configurations
|
|
4
|
-
* and component library items from the .
|
|
4
|
+
* and component library items from the .principal-views/ folder.
|
|
5
5
|
*/
|
|
6
6
|
declare const meta: {
|
|
7
7
|
title: string;
|
|
@@ -32,7 +32,7 @@ export declare const WithConfigsAndLibrary: Story;
|
|
|
32
32
|
*/
|
|
33
33
|
export declare const ConfigsOnly: Story;
|
|
34
34
|
/**
|
|
35
|
-
* Empty state - no .
|
|
35
|
+
* Empty state - no .principal-views folder
|
|
36
36
|
*/
|
|
37
37
|
export declare const EmptyState: Story;
|
|
38
38
|
/**
|
|
@@ -10,7 +10,7 @@ export interface ConfigFile {
|
|
|
10
10
|
source: 'folder' | 'standalone';
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Utility for loading and parsing .canvas configuration files from .
|
|
13
|
+
* Utility for loading and parsing .canvas configuration files from .principal-views/ folder
|
|
14
14
|
*/
|
|
15
15
|
export declare class ConfigLoader {
|
|
16
16
|
/**
|
|
@@ -22,7 +22,7 @@ export declare class ConfigLoader {
|
|
|
22
22
|
*/
|
|
23
23
|
static parseLibrary(content: string): ComponentLibrary;
|
|
24
24
|
/**
|
|
25
|
-
* Find the library.yaml file in the .
|
|
25
|
+
* Find the library.yaml file in the .principal-views/ folder
|
|
26
26
|
* Returns the relative path if found, null otherwise
|
|
27
27
|
*/
|
|
28
28
|
static findLibraryPath(files: Array<{
|
|
@@ -31,7 +31,7 @@ export declare class ConfigLoader {
|
|
|
31
31
|
name?: string;
|
|
32
32
|
}>): string | null;
|
|
33
33
|
/**
|
|
34
|
-
* Find all .canvas files in the .
|
|
34
|
+
* Find all .canvas files in the .principal-views/ folder
|
|
35
35
|
* Returns array of config files with metadata
|
|
36
36
|
*/
|
|
37
37
|
static findConfigs(files: Array<{
|
|
@@ -5,7 +5,7 @@ interface EmptyStateContentProps {
|
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Empty state component for Principal View Graph Panel
|
|
8
|
-
* Displays when no .
|
|
8
|
+
* Displays when no .principal-views/ folder with configuration files is found in the project
|
|
9
9
|
*/
|
|
10
10
|
export declare const EmptyStateContent: React.FC<EmptyStateContentProps>;
|
|
11
11
|
export {};
|
package/dist/panels.bundle.js
CHANGED
|
@@ -47386,11 +47386,11 @@ class ConfigLoader {
|
|
|
47386
47386
|
}
|
|
47387
47387
|
}
|
|
47388
47388
|
/**
|
|
47389
|
-
* Find the library.yaml file in the .
|
|
47389
|
+
* Find the library.yaml file in the .principal-views/ folder
|
|
47390
47390
|
* Returns the relative path if found, null otherwise
|
|
47391
47391
|
*/
|
|
47392
47392
|
static findLibraryPath(files) {
|
|
47393
|
-
const VGC_FOLDER = ".
|
|
47393
|
+
const VGC_FOLDER = ".principal-views";
|
|
47394
47394
|
for (const file of files) {
|
|
47395
47395
|
const filePath = file.relativePath || file.path || "";
|
|
47396
47396
|
const fileName = file.name || "";
|
|
@@ -47401,12 +47401,12 @@ class ConfigLoader {
|
|
|
47401
47401
|
return null;
|
|
47402
47402
|
}
|
|
47403
47403
|
/**
|
|
47404
|
-
* Find all .canvas files in the .
|
|
47404
|
+
* Find all .canvas files in the .principal-views/ folder
|
|
47405
47405
|
* Returns array of config files with metadata
|
|
47406
47406
|
*/
|
|
47407
47407
|
static findConfigs(files) {
|
|
47408
47408
|
const configs = [];
|
|
47409
|
-
const VGC_FOLDER = ".
|
|
47409
|
+
const VGC_FOLDER = ".principal-views";
|
|
47410
47410
|
for (const file of files) {
|
|
47411
47411
|
const filePath = file.relativePath || file.path || "";
|
|
47412
47412
|
const fileName = file.name || "";
|
|
@@ -51185,7 +51185,7 @@ const EmptyStateContent = ({ theme }) => {
|
|
|
51185
51185
|
/* @__PURE__ */ jsx("div", { style: {
|
|
51186
51186
|
fontSize: theme.fontSizes[0],
|
|
51187
51187
|
color: theme.colors.textSecondary
|
|
51188
|
-
}, children: "Learn how to create .
|
|
51188
|
+
}, children: "Learn how to create .principal-views/ configurations with path-based validation" })
|
|
51189
51189
|
] }),
|
|
51190
51190
|
/* @__PURE__ */ jsx(ExternalLink, { size: 16, color: theme.colors.textMuted, style: { flexShrink: 0 } })
|
|
51191
51191
|
]
|
|
@@ -51250,7 +51250,7 @@ const EmptyStateContent = ({ theme }) => {
|
|
|
51250
51250
|
borderRadius: theme.radii[0],
|
|
51251
51251
|
fontFamily: theme.fonts.monospace,
|
|
51252
51252
|
fontSize: theme.fontSizes[0]
|
|
51253
|
-
}, children: ".
|
|
51253
|
+
}, children: ".principal-views/" }),
|
|
51254
51254
|
" folder with YAML configuration files to your project root, the panel will automatically visualize your configurations."
|
|
51255
51255
|
] })
|
|
51256
51256
|
] })
|
|
@@ -52168,7 +52168,7 @@ const ConfigLibraryBrowserPanel = ({
|
|
|
52168
52168
|
});
|
|
52169
52169
|
const vgcFiles = fileTreeData2.allFiles.filter((f) => {
|
|
52170
52170
|
const path = f.relativePath || f.path || "";
|
|
52171
|
-
return path.startsWith(".
|
|
52171
|
+
return path.startsWith(".principal-views/");
|
|
52172
52172
|
});
|
|
52173
52173
|
for (const file of vgcFiles) {
|
|
52174
52174
|
const relativePath = file.relativePath || file.path || "";
|
|
@@ -52207,7 +52207,7 @@ const ConfigLibraryBrowserPanel = ({
|
|
|
52207
52207
|
canvasConfigs.push({
|
|
52208
52208
|
id: name,
|
|
52209
52209
|
name,
|
|
52210
|
-
path: `.
|
|
52210
|
+
path: `.principal-views/${name}.yaml`,
|
|
52211
52211
|
displayName
|
|
52212
52212
|
});
|
|
52213
52213
|
}
|
|
@@ -52271,7 +52271,7 @@ const ConfigLibraryBrowserPanel = ({
|
|
|
52271
52271
|
}, []);
|
|
52272
52272
|
const hasConfigs = state.configs.length > 0;
|
|
52273
52273
|
const cliCommand = hasConfigs ? "npx @principal-ai/principal-view-cli --help" : "npx @principal-ai/principal-view-cli init";
|
|
52274
|
-
const cliCommandDescription = hasConfigs ? "View all available CLI commands and options." : "This creates a .
|
|
52274
|
+
const cliCommandDescription = hasConfigs ? "View all available CLI commands and options." : "This creates a .principal-views/ folder with a starter canvas file.";
|
|
52275
52275
|
const handleCopyCommand = useCallback(() => {
|
|
52276
52276
|
navigator.clipboard.writeText(cliCommand).then(() => {
|
|
52277
52277
|
setCopied(true);
|
|
@@ -52891,7 +52891,7 @@ const ConfigLibraryBrowserPanel = ({
|
|
|
52891
52891
|
}, children: [
|
|
52892
52892
|
/* @__PURE__ */ jsx(Library, { size: 32, style: { marginBottom: theme.space[2], opacity: 0.5 } }),
|
|
52893
52893
|
/* @__PURE__ */ jsx("div", { children: "No component library found" }),
|
|
52894
|
-
/* @__PURE__ */ jsx("div", { style: { fontSize: theme.fontSizes[0], marginTop: theme.space[1] }, children: "Add library.yaml to the .
|
|
52894
|
+
/* @__PURE__ */ jsx("div", { style: { fontSize: theme.fontSizes[0], marginTop: theme.space[1] }, children: "Add library.yaml to the .principal-views/ folder" })
|
|
52895
52895
|
] })
|
|
52896
52896
|
] }),
|
|
52897
52897
|
showSetupInfo && /* @__PURE__ */ jsxs("div", { style: {
|