@featurevisor/catalog 0.0.1 → 3.0.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/LICENSE +21 -0
- package/dist/assets/index-BVAfG1yl.js +25 -0
- package/dist/assets/index-BrUFr8px.css +2 -0
- package/dist/favicon.png +0 -0
- package/dist/index.html +14 -0
- package/dist/logo-text.png +0 -0
- package/lib/entityTypes.d.ts +15 -0
- package/lib/entityTypes.js +89 -0
- package/lib/entityTypes.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/lib/node/index.d.ts +74 -0
- package/lib/node/index.js +1352 -0
- package/lib/node/index.js.map +1 -0
- package/lib/types.d.ts +94 -0
- package/lib/types.js +3 -0
- package/lib/types.js.map +1 -0
- package/package.json +66 -13
- package/public/favicon.png +0 -0
- package/public/logo-text.png +0 -0
- package/src/App.tsx +60 -0
- package/src/api.ts +74 -0
- package/src/components/trees.tsx +202 -0
- package/src/components/ui.tsx +660 -0
- package/src/components/variables.tsx +700 -0
- package/src/components/variations.tsx +450 -0
- package/src/context/CatalogContext.tsx +30 -0
- package/src/entityTypes.ts +95 -0
- package/src/index.ts +1 -0
- package/src/main.tsx +26 -0
- package/src/node/index.spec.ts +236 -0
- package/src/node/index.ts +1888 -0
- package/src/pages/EntityDetailPage.tsx +1004 -0
- package/src/pages/HistoryPage.tsx +144 -0
- package/src/pages/HomePage.tsx +21 -0
- package/src/pages/ListPage.tsx +743 -0
- package/src/styles.css +59 -0
- package/src/types.ts +111 -0
- package/src/vite-env.d.ts +1 -0
- package/index.js +0 -1
package/src/styles.css
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@config "../tailwind.config.mts";
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
color-scheme: light;
|
|
6
|
+
|
|
7
|
+
--mv-color-background: #e5e7eb;
|
|
8
|
+
--mv-color-surface: #ffffff;
|
|
9
|
+
--mv-color-elevated: #f8fafc;
|
|
10
|
+
--mv-color-border: #e5e7eb;
|
|
11
|
+
--mv-color-text: #374151;
|
|
12
|
+
--mv-color-muted: #6b7280;
|
|
13
|
+
--mv-color-primary: #475569;
|
|
14
|
+
--mv-color-success: #16a34a;
|
|
15
|
+
--mv-color-warning: #ea580c;
|
|
16
|
+
--mv-color-danger: #dc2626;
|
|
17
|
+
--mv-color-header: #1f2937;
|
|
18
|
+
--mv-color-header-active: #374151;
|
|
19
|
+
--mv-color-header-text: #f9fafb;
|
|
20
|
+
--mv-color-pill: #cbd5e1;
|
|
21
|
+
--mv-color-faint: #9ca3af;
|
|
22
|
+
--mv-color-success-surface: #bbf7d0;
|
|
23
|
+
--mv-color-warning-surface: #fed7aa;
|
|
24
|
+
--mv-color-danger-surface: #fee2e2;
|
|
25
|
+
--mv-shadow-soft: 0 10px 30px rgb(15 23 42 / 0.08);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
body {
|
|
29
|
+
margin: 0;
|
|
30
|
+
background: var(--mv-color-background);
|
|
31
|
+
color: var(--mv-color-text);
|
|
32
|
+
font-family:
|
|
33
|
+
ui-sans-serif,
|
|
34
|
+
system-ui,
|
|
35
|
+
-apple-system,
|
|
36
|
+
BlinkMacSystemFont,
|
|
37
|
+
"Segoe UI",
|
|
38
|
+
sans-serif;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
a {
|
|
42
|
+
color: inherit;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.variable-schema-col-path {
|
|
46
|
+
width: 28%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.variable-schema-col-type {
|
|
50
|
+
width: 14%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.variable-schema-col-constraints {
|
|
54
|
+
width: 30%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.variable-schema-col-description {
|
|
58
|
+
width: 28%;
|
|
59
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { EntityType } from "@featurevisor/types";
|
|
2
|
+
|
|
3
|
+
export type CatalogEntityType = EntityType;
|
|
4
|
+
export type EntityPath =
|
|
5
|
+
| "features"
|
|
6
|
+
| "segments"
|
|
7
|
+
| "attributes"
|
|
8
|
+
| "targets"
|
|
9
|
+
| "groups"
|
|
10
|
+
| "schemas"
|
|
11
|
+
| "tests";
|
|
12
|
+
export type GitProvider = "github" | "gitlab" | "bitbucket";
|
|
13
|
+
export type DevEditorId = "cursor" | "vscode";
|
|
14
|
+
|
|
15
|
+
export interface DevEditor {
|
|
16
|
+
id: DevEditorId;
|
|
17
|
+
label: string;
|
|
18
|
+
icon: DevEditorId;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface LastModified {
|
|
22
|
+
commit: string;
|
|
23
|
+
author: string;
|
|
24
|
+
timestamp: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface EntitySummary {
|
|
28
|
+
key: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
archived?: boolean;
|
|
31
|
+
deprecated?: boolean;
|
|
32
|
+
promotable?: boolean;
|
|
33
|
+
environmentStatus?: "production" | "other" | "disabled";
|
|
34
|
+
environmentStatusEnvironment?: string;
|
|
35
|
+
tags?: string[];
|
|
36
|
+
targets?: string[];
|
|
37
|
+
usedInFeatureCount?: number;
|
|
38
|
+
usedInSegmentCount?: number;
|
|
39
|
+
environments?: string[];
|
|
40
|
+
variationValues?: string[];
|
|
41
|
+
variableKeys?: string[];
|
|
42
|
+
hasVariations?: boolean;
|
|
43
|
+
hasVariables?: boolean;
|
|
44
|
+
lastModified?: LastModified;
|
|
45
|
+
href: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface CatalogIndex {
|
|
49
|
+
set: string;
|
|
50
|
+
counts: Record<CatalogEntityType, number>;
|
|
51
|
+
entities: Record<CatalogEntityType, EntitySummary[]>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface CatalogManifest {
|
|
55
|
+
schemaVersion: string;
|
|
56
|
+
generatedAt: string;
|
|
57
|
+
router?: "hash" | "browser";
|
|
58
|
+
sets: boolean;
|
|
59
|
+
setKeys: string[];
|
|
60
|
+
projectConfig: {
|
|
61
|
+
tags: string[];
|
|
62
|
+
environments?: string[];
|
|
63
|
+
};
|
|
64
|
+
dev?: {
|
|
65
|
+
editors: DevEditor[];
|
|
66
|
+
};
|
|
67
|
+
links?: {
|
|
68
|
+
provider?: GitProvider;
|
|
69
|
+
repository?: string;
|
|
70
|
+
source: string;
|
|
71
|
+
commit: string;
|
|
72
|
+
};
|
|
73
|
+
paths: {
|
|
74
|
+
projectHistory: string;
|
|
75
|
+
root?: string;
|
|
76
|
+
sets?: Record<string, string>;
|
|
77
|
+
};
|
|
78
|
+
counts: Record<string, Record<CatalogEntityType, number>>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface HistoryEntity {
|
|
82
|
+
type: CatalogEntityType;
|
|
83
|
+
key: string;
|
|
84
|
+
set?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface HistoryEntry {
|
|
88
|
+
commit: string;
|
|
89
|
+
author: string;
|
|
90
|
+
timestamp: string;
|
|
91
|
+
entities: HistoryEntity[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface HistoryPage {
|
|
95
|
+
page: number;
|
|
96
|
+
pageSize: number;
|
|
97
|
+
totalPages: number;
|
|
98
|
+
entries: HistoryEntry[];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface EntityDetail<T = Record<string, unknown>> {
|
|
102
|
+
type: CatalogEntityType;
|
|
103
|
+
key: string;
|
|
104
|
+
entity: T;
|
|
105
|
+
sourcePath?: string;
|
|
106
|
+
editLinks?: Partial<Record<DevEditorId, string>>;
|
|
107
|
+
lastModified?: LastModified;
|
|
108
|
+
relationships?: Record<string, string[]>;
|
|
109
|
+
environments?: string[];
|
|
110
|
+
historyPath?: string;
|
|
111
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = {};
|