Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 32 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"permissions": {
"allow": [
"Read(net/Semio.Grasshopper/Semio.Grasshopper.cs)",
"Edit(net/Semio.Grasshopper/Semio.Grasshopper.cs)",
"Read(net\\Semio.Grasshopper\\Semio.Grasshopper.cs)",
"Edit(net\\Semio.Grasshopper\\Semio.Grasshopper.cs)",
"Read(net/Semio/Semio.cs)",
"Edit(net/Semio/Semio.cs)",
"Read(net\\Semio\\Semio.cs)",
"Edit(net\\Semio\\Semio.cs)",
"Read(py/engine.py)",
"Edit(py/engine.py)",
"Read(py\\engine.py)",
"Edit(py\\engine.py)",
"Read(js/core/semio.ts)",
"Edit(js/core/semio.ts)",
"Read(js\\core\\semio.ts)",
"Edit(js\\core\\semio.ts)",
"Read(js/core/components/**)",
"Edit(js/core/components/**)",
"Read(js\\core\\components/**)",
"Edit(js\\core\\components/**)"
],
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(./secrets/**)"
],
"ask": []
}
}
2 changes: 1 addition & 1 deletion .cursor/mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"url": "http://localhost:9041/sse"
}
}
}
}
15 changes: 10 additions & 5 deletions .cursor/rules/js-core.mdc
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
---
description:
description:
globs: js/core/**/*.*
alwaysApply: false
---

# Project

Shared react components. The main component is Sketchpad. Sketchpad is used in three different szenarios:

1. As guest mode (readonly) in a statically generated pages.
2. As user mode in the browser (nextjs).
3. As user mode in a desktop app (electron).
Sketchpad has a local store in yjs which syncs with indexeddb and the backend provider.
There are two different undo managers.
1. User level: For creating and deleting kits, types and designs.
2. Editor level: For updating individual types and designs.
Sketchpad has a local store in yjs which syncs with indexeddb and the backend provider.

# Guidelines

- All domain logic is in semio.ts and whenever an operation is not ui bound, it should be implemented there.
- All state is stored in the SketchpadStore. All state and cruds are accessed over hooks.
- There are different scopes: SketchpadScope, KitScope, DesignScope, DesignEditorScope.
- There is a transaction mechanism for kits. Every design editor transaction is an extended kit transaction. The undo redo manager is on editor level and stores the diff of the transaction along with the editor state. This way undo redo works even when the kit changes because only the diff is stored.
- Internal components use `import {default as NAME} from "@semio/js/components/ui/NAME.tsx"` as import and external components use `import {NAME} from "@semio/js"`.
3 changes: 3 additions & 0 deletions .cursor/rules/js.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ Nx monorepo with shared core (@semio/js) that uses storybook and exports a handf
- No rounded borders (unless full rounded).
- No shadows.

# Styling

- The ui consists of a navbar and edgeless content. Everything else is displayed as HUD with floating panels that show different colors.
13 changes: 10 additions & 3 deletions .cursor/rules/repo.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,23 @@ An ecosystem for designing kit-of-parts architecture together.
- Almost everything is in a single file if possible.
- Folders are avoided if possible.
- No need to ask in between. Be opionionated and just go for it. Try to do as much as you can.
- Don't ask to execute commands in the cli. Assume all the tools are properly setup.
- No need to delete files, you can tell me when once you are 100% done with everything and I will do it manually.
- You are allowed to change everything (names, apis, creating/modifying/deleting fields, props, …) and don't have to worry about breaking compatiblity. Choose the most elegant approach even if it requires changing more than necessary.
- Don't create additional example files and implement it directly in the dependent parts.
- Don't remove code that is commented out.
- README.md files are for developers which are GFM.
- Assume all dev servers and debugging processes are running. No need to ask to start them. Don't ask to run commands for building, testing, linting, etc.
- Assume all dev servers, debugging and testing processes are running. No need to ask to start them. Don't ask to run commands for building, testing, linting, etc if you are not inspecting the output yourself.
- Don't add comments to the code.
- Don't create tests unless you are explicitly asked to.
- Always use inline syntax if possible.
- If a variable is only used once, use it inline unless the line of code exceeds the screen.
- Don't add extra new lines inside of code.

# Styling

- No rounded corners unless a circle.
- Never use shadows.
- All colors are explicitly defined as variables and should never be hardcoded.

# Glossary

Expand All @@ -36,7 +43,7 @@ An ecosystem for designing kit-of-parts architecture together.
- Port: A conceptual connection point with an outwards direction.
- Connection: A 3D-Link between two pieces with translation parameters (gap, shift, rise) and rotation parameters (rotation, turn, tilt).
- Representation: A tagged url to a resource with an optional description.
- Quality: Metadata with a name, an optional value, an optional unit and an optional definition (url or text).
- Attribute: Metadata with a name, an optional value, an optional unit and an optional definition (url or text).
- Tag: A kebab-cased name.
- Plane: A location (origin) and orientation (x-axis, y-axis and derived z-axis) in 3D space.
- Url: Either relative (to the root of the .zip file) or remote (http, https, ftp, …) string.
Expand Down
39 changes: 15 additions & 24 deletions .github/chatmodes/Dev.chatmode.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
---
description: Help senior developer working.
tools: [
'changes',
'codebase',
'editFiles',
'fetch',
'findTestFiles',
'problems',
'readCellOutput',
'runCommands',
'runNotebooks',
'runTasks',
'runTests',
'search',
'searchResults',
'terminalLastCommand',
'terminalSelection',
'testFailure',
'usages',
'vscodeAPI',
'markitdown'
]
tools: ["changes", "codebase", "editFiles", "fetch", "findTestFiles", "problems", "runCommands", "runNotebooks", "runTasks", "runTests", "search", "searchResults", "terminalLastCommand", "terminalSelection", "testFailure", "usages", "vscodeAPI"]
model: Claude Sonnet 4
---

Expand All @@ -34,16 +14,27 @@ An ecosystem for designing kit-of-parts architecture together.
- Almost everything is in a single file if possible.
- Folders are avoided if possible.
- No need to ask in between. Be opionionated and just go for it. Try to do as much as you can.
- Don't ask to execute commands in the cli. Assume all the tools are properly setup.
- No need to delete files, you can tell me when once you are 100% done with everything and I will do it manually.
- You are allowed to change everything (names, apis, creating/modifying/deleting fields, props, …) and don't have to worry about breaking compatiblity. Choose the most elegant approach even if it requires changing more than necessary.
- Don't create additional example files and implement it directly in the dependent parts.
- Don't remove code that is commented out.
- README.md files are for developers which are GFM.
- Assume all dev servers and debugging processes are running. No need to ask to start them. Don't ask to run commands for building, testing, linting, etc.
- Assume all dev servers, debugging and testing processes are running. No need to ask to start them. Don't ask to run commands for building, testing, linting, etc if you are not inspecting the output yourself.
- Don't add comments to the code.
- Don't create tests unless you are explicitly asked to.
- Always use inline syntax if possible.
- If a variable is only used once, use it inline unless the line of code exceeds the screen.
- Don't add extra new lines inside of code.

# Styling

- No rounded corners unless a circle.
- Never use shadows.
- All colors are explicitly defined as variables and should never be hardcoded.

## sketchpad

- The ui consists of a navbar and edgeless content. Everything else is displayed as HUD with floating panels that show different colors.

# Glossary

Expand All @@ -56,7 +47,7 @@ An ecosystem for designing kit-of-parts architecture together.
- Port: A conceptual connection point with an outwards direction.
- Connection: A 3D-Link between two pieces with translation parameters (gap, shift, rise) and rotation parameters (rotation, turn, tilt).
- Representation: A tagged url to a resource with an optional description.
- Quality: Metadata with a name, an optional value, an optional unit and an optional definition (url or text).
- Attribute: Metadata with a name, an optional value, an optional unit and an optional definition (url or text).
- Tag: A kebab-cased name.
- Plane: A location (origin) and orientation (x-axis, y-axis and derived z-axis) in 3D space.
- Url: Either relative (to the root of the .zip file) or remote (http, https, ftp, …) string.
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#--------------------------------------GENERAL--------------------------------------
local
*.local.*
debug
*.debug.*
temp
*.temp.*
log
*.log.*
#--------------------------------------MACOS--------------------------------------
.DS_Store
#--------------------------------------NX--------------------------------------
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
7 changes: 1 addition & 6 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"printWidth": 120,
"unusedImports": "on"
"printWidth": 250
}
7 changes: 3 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@
"ms-dotnettools.dotnet-interactive-vscode",
// python
"njpwerner.autodocstring",
"ms-python.black-formatter",
"ms-python.isort",
"ms-toolsai.jupyter",
"ms-python.pylint",
"ms-python.python",
"ms-python.vscode-pylance",
"charliermarsh.ruff",
"ms-toolsai.jupyter"
],
"unwantedRecommendations": []
}
Loading