energy-visualization-sankey 1.0.11 → 1.0.13
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/.cursorrules +41 -0
- package/README.md +8 -1
- package/bun.lock +1426 -0
- package/dist/sankey.esm.js +108 -79
- package/dist/sankey.esm.js.map +1 -1
- package/dist/sankey.umd.js +8720 -8687
- package/dist/sankey.umd.js.map +1 -1
- package/dist/types/core/Sankey.d.ts +294 -0
- package/dist/types/core/Sankey.d.ts.map +1 -0
- package/dist/types/core/events/EventBus.d.ts +195 -0
- package/dist/types/core/events/EventBus.d.ts.map +1 -0
- package/dist/types/core/types/events.d.ts +42 -0
- package/dist/types/core/types/events.d.ts.map +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/services/AnimationService.d.ts +229 -0
- package/dist/types/services/AnimationService.d.ts.map +1 -0
- package/dist/types/services/ConfigurationService.d.ts +182 -0
- package/dist/types/services/ConfigurationService.d.ts.map +1 -0
- package/dist/types/services/InteractionService.d.ts +377 -0
- package/dist/types/services/InteractionService.d.ts.map +1 -0
- package/dist/types/services/RenderingService.d.ts +160 -0
- package/dist/types/services/RenderingService.d.ts.map +1 -0
- package/dist/types/services/calculation/GraphService.d.ts +111 -0
- package/dist/types/services/calculation/GraphService.d.ts.map +1 -0
- package/dist/types/services/calculation/SummaryService.d.ts +149 -0
- package/dist/types/services/calculation/SummaryService.d.ts.map +1 -0
- package/dist/types/services/data/DataService.d.ts +167 -0
- package/dist/types/services/data/DataService.d.ts.map +1 -0
- package/dist/types/services/data/DataValidationService.d.ts +48 -0
- package/dist/types/services/data/DataValidationService.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +194 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/utils/Logger.d.ts +88 -0
- package/dist/types/utils/Logger.d.ts.map +1 -0
- package/package.json +4 -3
- package/rollup.config.js +11 -2
- package/src/core/Sankey.ts +3 -9
- package/src/index.ts +3 -3
- package/src/services/ConfigurationService.ts +59 -22
- package/src/services/RenderingService.ts +3 -3
- package/src/services/calculation/GraphService.ts +6 -6
- package/src/services/calculation/SummaryService.ts +3 -3
- package/src/types/index.ts +8 -1
- package/tsconfig.json +1 -0
package/.cursorrules
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Cursor Rules for this Project
|
|
2
|
+
|
|
3
|
+
## Git Commit Policy - STRICT ENFORCEMENT
|
|
4
|
+
- NEVER EVER run `git commit` commands without EXPLICIT confirmation
|
|
5
|
+
- NEVER run `git add` or stage files without EXPLICIT user request
|
|
6
|
+
- NEVER interpret ambiguous requests as permission to commit
|
|
7
|
+
- Do not use the git_write permission to make commits automatically
|
|
8
|
+
|
|
9
|
+
### What counts as EXPLICIT permission:
|
|
10
|
+
- "commit it now"
|
|
11
|
+
- "create the commit"
|
|
12
|
+
- "run git commit"
|
|
13
|
+
- "stage and commit the changes"
|
|
14
|
+
|
|
15
|
+
### What DOES NOT count as permission to commit:
|
|
16
|
+
- "give me a commit message" → Just provide the message text, DO NOT commit
|
|
17
|
+
- "what should the commit message be?" → Just provide the message text, DO NOT commit
|
|
18
|
+
- "prepare a commit" → Just provide the message text, DO NOT commit
|
|
19
|
+
- "show me what to commit" → Show git diff and message, DO NOT commit
|
|
20
|
+
|
|
21
|
+
### Required workflow when user asks for a commit message:
|
|
22
|
+
1. Show the git status and diff
|
|
23
|
+
2. Review the current chat context
|
|
24
|
+
3. Provide the suggested commit message as plain text
|
|
25
|
+
4. Ask: "Would you like me to run `git add` and `git commit` with this message?"
|
|
26
|
+
5. Wait for explicit confirmation before running ANY git commands
|
|
27
|
+
6. NEVER assume permission - always ask first
|
|
28
|
+
|
|
29
|
+
## Emoji Policy
|
|
30
|
+
- STRICT NO EMOJI GENERATION in any context
|
|
31
|
+
- Do not use emojis in code, comments, documentation, commit messages, or responses
|
|
32
|
+
- Do not use emojis in file names, variable names, or any generated text
|
|
33
|
+
- Keep all output text-based and professional without emoji characters
|
|
34
|
+
|
|
35
|
+
## Documentation Policy
|
|
36
|
+
- NEVER proactively create documentation files (*.md) after fixes or updates
|
|
37
|
+
- Do not create README files, changelogs, or other documentation unless explicitly requested
|
|
38
|
+
- Present implementation details, fixes, and changes directly in the chat response
|
|
39
|
+
- Only create documentation files when the user specifically asks for it
|
|
40
|
+
- Focus on making code changes and explaining them in the conversation
|
|
41
|
+
|
package/README.md
CHANGED
|
@@ -170,8 +170,15 @@ interface SankeyOptions {
|
|
|
170
170
|
autoPlay?: boolean; // Start animation automatically (default: false)
|
|
171
171
|
showWasteHeat?: boolean; // Show waste heat flows (default: true)
|
|
172
172
|
animationSpeed?: number; // Animation speed in ms (default: 200)
|
|
173
|
-
width?: number
|
|
173
|
+
width?: number; // Container width (default = dynamic)
|
|
174
174
|
height?: number; // Container height (default: 620)
|
|
175
|
+
scale?: number; // Scaling factor (default: 0.02)
|
|
176
|
+
leftX?: number; // Source Start position X (default: 10)
|
|
177
|
+
leftY?: number; // Source Start position Y (default: 100)
|
|
178
|
+
electricityBoxX?: number; // Electricity box position X (default: 320)
|
|
179
|
+
electricityBoxY?: number; // Electricity box position Y (default: 120)
|
|
180
|
+
heatBoxX?: number; // Heat box position X (default: 750)
|
|
181
|
+
heatBoxY?: number; // Heat box position Y (default: 200)
|
|
175
182
|
loopAnimation?: boolean; // Loop animation (default: false)
|
|
176
183
|
debugLogging?: boolean; // Enable debug logging (default: false)
|
|
177
184
|
}
|