@symbo.ls/mcp 1.0.22 → 1.0.23

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": "@symbo.ls/mcp",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "Symbols.app MCP — docs, code generation, publishing, CLI/SDK reference",
5
5
  "mcpName": "io.github.symbo-ls/symbols-mcp",
6
6
  "files": [
@@ -239,3 +239,32 @@ import { typography, spacing } from '@symbo.ls/scratch'
239
239
  const { color, theme } = context.designSystem
240
240
  set({ color: { blue: '#00f' }, typography: { base: 16 } })
241
241
  ```
242
+
243
+ ---
244
+
245
+ ## 14. Navigation — use `el.router()`, never `window.location`
246
+
247
+ ```js
248
+ // ❌ WRONG — bypasses SPA routing
249
+ onClick: () => { window.location.href = '/' }
250
+ onClick: () => { window.location.assign('/dashboard') }
251
+
252
+ // ✅ CORRECT — framework routing
253
+ onClick: (e, el) => el.router('/', el.getRoot())
254
+ onClick: (e, el) => el.router('/dashboard', el.getRoot())
255
+ ```
256
+
257
+ ---
258
+
259
+ ## 15. Links — use `extends: 'Link'` with `href` as prop, never `attr: { href }`
260
+
261
+ ```js
262
+ // ❌ WRONG — href in attrs
263
+ Nav: { extends: 'Link', attr: { href: '/about' } }
264
+
265
+ // ❌ WRONG — no Link component
266
+ Nav: { tag: 'a', attr: { href: '/about' } }
267
+
268
+ // ✅ CORRECT — Link component with href as prop
269
+ Nav: { extends: 'Link', href: '/about', text: 'About' }
270
+ ```
@@ -1185,6 +1185,30 @@ Nav: {
1185
1185
 
1186
1186
  ---
1187
1187
 
1188
+ ## Rule 42 — NEVER use `window.location` for navigation — use `el.router()`
1189
+
1190
+ All navigation MUST use `el.router()`. Never use `window.location.href`, `window.location.assign()`, `window.location.replace()`, or any `window.location` assignment. These bypass SPA routing and break the framework's navigation model.
1191
+
1192
+ ```js
1193
+ // ✅ CORRECT — SPA navigation via el.router
1194
+ onClick: (e, el) => el.router('/', el.getRoot())
1195
+ onClick: (e, el, s) => el.router('/profile/' + s.userId, el.getRoot())
1196
+
1197
+ // ❌ WRONG — bypasses framework routing
1198
+ onClick: () => { window.location.href = '/' }
1199
+ onClick: () => { window.location.assign('/profile') }
1200
+ ```
1201
+
1202
+ ---
1203
+
1204
+ ## Rule 43 — Use default template styles for new apps — no tiny fonts
1205
+
1206
+ When creating new apps, always base the design system on the default template at `templates/templates/default/designSystem/`. This includes typography, font sizes, spacing, colors, shapes, grid, and media breakpoints.
1207
+
1208
+ Never use font sizes smaller than what the default template defines. The default template enforces recommended, readable sizing for all new projects.
1209
+
1210
+ ---
1211
+
1188
1212
  ## Project Structure Quick Reference
1189
1213
 
1190
1214
  ```
@@ -1248,6 +1272,8 @@ Before finalizing generated code, verify ALL of the following:
1248
1272
  - [ ] `el.node` reads are fine, `el.node.x = ...` writes are forbidden (Rule 39)
1249
1273
  - [ ] No `document.getElementById`/`querySelector` — use `el.lookdown()`, `el.lookup()`, etc. (Rule 40)
1250
1274
  - [ ] All links use `extends: 'Link'` with `href` at root — never in `attrs`, never `tag: 'a'` (Rule 41)
1275
+ - [ ] No `window.location` for navigation — use `el.router()` (Rule 42)
1276
+ - [ ] Font sizes and spacing follow default template minimums — no tiny fonts (Rule 43)
1251
1277
  - [ ] Translations (`lang.js`) at root level, NOT inside `designSystem/`
1252
1278
  - [ ] `designSystem/` contains only visual tokens — no translations, no logic
1253
1279
  - [ ] `symbols/functions/` contains only frontend functions (called via `el.call()`)