cognite-create 0.2.26 → 0.2.31
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/bin/index.js +1 -0
- package/package.json +1 -1
- package/templates/.cursor/rules/general.mdc +13 -0
package/bin/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const fs = require("node:fs/promises");
|
|
|
8
8
|
const path = require("node:path");
|
|
9
9
|
|
|
10
10
|
const REQUIRED_DEPENDENCIES = [
|
|
11
|
+
{ name: "@tanstack/react-query", version: "^5.90.2" },
|
|
11
12
|
{ name: "recharts", version: "^3.2.1" },
|
|
12
13
|
{ name: "@cognite/sdk", version: "^10.2.0" },
|
|
13
14
|
{ name: "date-fns", version: "^4.1.0" },
|
package/package.json
CHANGED
|
@@ -8,6 +8,17 @@ Use the ShadCN MCP server to list the Cognite registry for components you can us
|
|
|
8
8
|
|
|
9
9
|
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.
|
|
10
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 between client and server.
|
|
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.
|
|
21
|
+
|
|
11
22
|
CogniteSDK Rules
|
|
12
23
|
|
|
13
24
|
Environment Variables
|
|
@@ -65,6 +76,8 @@ Aggregated Data Display: Updated chart component to handle both regular datapoin
|
|
|
65
76
|
|
|
66
77
|
UI Enhancement: Replaced search dialog with dropdown interface for time series selection, providing better UX with automatic loading and filtering of available time series.
|
|
67
78
|
|
|
79
|
+
Prefer select dropdowns with in built search
|
|
80
|
+
|
|
68
81
|
WATCH OUT FOR THIS BUG WITH SHADCN SELECTS:
|
|
69
82
|
A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.
|
|
70
83
|
|