cognite-create 0.3.4 → 0.3.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cognite-create",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Create a Next.js app preconfigured with Cognite defaults.",
5
5
  "bin": {
6
6
  "cognite-create": "./bin/index.js"
@@ -6,4 +6,15 @@ alwaysApply: false
6
6
 
7
7
  Use the ShadCN MCP server to retrieve the attached registries, make sure Cognite is available then list the components you can use.
8
8
 
9
- If you cannot find any variation of a Cognite component you may import a ShadCN one but make sure the styles are consistent.
9
+ If you cannot find any variation of a Cognite component you may import a ShadCN one but make sure the styles are consistent.
10
+
11
+ Layout & Components
12
+ Make sure to put the components together in a cohesive manner.
13
+ Make sure to properly handle x and y values to proper scales.
14
+ Make sure you are properly handling timezoned dates.
15
+
16
+ Chart Rendering Rules
17
+ Use direct hex colors: Avoid CSS variables like var(--color-\*) in stroke properties
18
+ Make sure charts have properly formatted value properties to display data.
19
+ Use real Cognite data from the SDK.
20
+ Be really careful with x chart values and make sure you are rendering them correctly. Keep consistent with date and timestamp formatting as this can cause rendering issues.
@@ -6,21 +6,12 @@ alwaysApply: true
6
6
 
7
7
  Package Manager: pnpm
8
8
 
9
+ Run pnpm lint after every change.
10
+
9
11
  Use the ShadCN MCP server to list the Cognite registry for components you can use. If there are no Cognite components fit for purpose, fallback to ShadCN registry ones. When building from reference, make sure to include all components in the reference material in your final build. Do not edit the styling of Cognite components.
10
12
 
11
13
  Always use semantic Tailwind color classes (e.g., bg-primary, text-primary, border-primary) instead of arbitrary color values (e.g., bg-blue-600, text-red-500). This ensures consistency with the design system.
12
14
 
13
- Layout & Components
14
- Make sure to put the components together in a cohesive manner.
15
- Make sure to properly handle x and y values to proper scales.
16
- Make sure you are properly handling timezoned dates.
17
-
18
- Chart Rendering Rules
19
- Use direct hex colors: Avoid CSS variables like var(--color-\*) in stroke properties
20
- Make sure charts have properly formatted value properties to display data.
21
- Use real Cognite data from the SDK.
22
- Be really careful with x chart values and make sure you are rendering them correctly. Keep consistent with date and timestamp formatting as this can cause rendering issues.
23
-
24
15
  CogniteSDK Rules
25
16
 
26
17
  This is a client-side only application. All Cognite SDK calls are made directly from the browser.
@@ -29,12 +20,12 @@ Environment Variables
29
20
 
30
21
  # Cognite Configuration
31
22
 
32
- COGNITE_PROJECT=
33
- COGNITE_BASE_URL=
23
+ VITE_COGNITE_PROJECT=
24
+ VITE_COGNITE_BASE_URL=
34
25
 
35
26
  # OIDC Authentication (Required for production)
36
27
 
37
- COGNITE_CLIENT_ID=
28
+ VITE_COGNITE_CLIENT_ID=
38
29
 
39
30
  SDK Usage
40
31
 
@@ -16,7 +16,15 @@
16
16
  "noEmit": true,
17
17
  "jsx": "react-jsx",
18
18
  "paths": {
19
- "@/*": ["./src/*"]
19
+ "@/*": ["./src/*"],
20
+ "@/components/ui/cognite/*": [
21
+ "./src/components/ui/cognite/*",
22
+ "./src/components/ui/draft/*"
23
+ ],
24
+ "@/components/ai-elements/cognite/*": [
25
+ "./src/components/ai-elements/cognite/*",
26
+ "./src/components/ai-elements/draft/*"
27
+ ]
20
28
  },
21
29
  /* Linting */
22
30
  "strict": true,
@@ -6,7 +6,15 @@
6
6
  ],
7
7
  "compilerOptions": {
8
8
  "paths": {
9
- "@/*": ["./src/*"]
9
+ "@/*": ["./src/*"],
10
+ "@/components/ui/cognite/*": [
11
+ "./src/components/ui/cognite/*",
12
+ "./src/components/ui/draft/*"
13
+ ],
14
+ "@/components/ai-elements/cognite/*": [
15
+ "./src/components/ai-elements/cognite/*",
16
+ "./src/components/ai-elements/draft/*"
17
+ ]
10
18
  }
11
19
  }
12
20
  }
@@ -22,7 +22,15 @@
22
22
  "noFallthroughCasesInSwitch": true,
23
23
  "noUncheckedSideEffectImports": true,
24
24
  "paths": {
25
- "@/*": ["./src/*"]
25
+ "@/*": ["./src/*"],
26
+ "@/components/ui/cognite/*": [
27
+ "./src/components/ui/cognite/*",
28
+ "./src/components/ui/draft/*"
29
+ ],
30
+ "@/components/ai-elements/cognite/*": [
31
+ "./src/components/ai-elements/cognite/*",
32
+ "./src/components/ai-elements/draft/*"
33
+ ]
26
34
  }
27
35
  },
28
36
  "include": ["vite.config.ts"],