@schalkneethling/toolkit 0.5.1 → 0.6.0

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.
Files changed (28) hide show
  1. package/dist/index.mjs.map +1 -1
  2. package/hooks/auto-approve-safe-commands/hook.mjs +5 -1
  3. package/hooks/auto-approve-safe-commands/hook.mts +7 -6
  4. package/hooks/block-dangerous-commands/hook.mjs +3 -3
  5. package/hooks/block-dangerous-commands/hook.mts +10 -22
  6. package/package.json +1 -1
  7. package/skills/css-tokens/SKILL.md +1 -1
  8. package/skills/css-tokens/references/tokens.css +6 -10
  9. package/skills/frontend-security/SKILL.md +3 -0
  10. package/skills/frontend-security/references/csp-configuration.md +68 -51
  11. package/skills/frontend-security/references/csrf-protection.md +74 -70
  12. package/skills/frontend-security/references/dom-security.md +36 -29
  13. package/skills/frontend-security/references/file-upload-security.md +101 -69
  14. package/skills/frontend-security/references/framework-patterns.md +42 -40
  15. package/skills/frontend-security/references/input-validation.md +36 -31
  16. package/skills/frontend-security/references/jwt-security.md +68 -84
  17. package/skills/frontend-security/references/nodejs-npm-security.md +63 -55
  18. package/skills/frontend-security/references/xss-prevention.md +38 -36
  19. package/skills/frontend-testing/SKILL.md +31 -38
  20. package/skills/frontend-testing/references/accessibility-testing.md +56 -62
  21. package/skills/frontend-testing/references/aria-snapshots.md +35 -34
  22. package/skills/frontend-testing/references/locator-strategies.md +37 -40
  23. package/skills/frontend-testing/references/visual-regression.md +29 -23
  24. package/skills/more-secure-dependabot-config/SKILL.md +120 -0
  25. package/skills/more-secure-dependabot-config/references/ecosystem.md +35 -0
  26. package/skills/npm-publishing-best-practices/SKILL.md +316 -0
  27. package/skills/semantic-html/SKILL.md +5 -21
  28. package/skills/semantic-html/references/heading-patterns.md +1 -5
@@ -209,9 +209,7 @@ When in doubt: if the content serves the primary purpose of the page, it belongs
209
209
  ```html
210
210
  <!-- Correct: pull quote from the article's own content -->
211
211
  <aside aria-label="Pull quote">
212
- <p>
213
- "The biggest gains came not from new features, but from removing old ones."
214
- </p>
212
+ <p>"The biggest gains came not from new features, but from removing old ones."</p>
215
213
  </aside>
216
214
 
217
215
  <!-- Use blockquote for genuine external quotations -->
@@ -462,9 +460,7 @@ HTML's `required` attribute communicates required state to assistive technology,
462
460
  ```html
463
461
  <!-- Pattern: asterisk with legend explaining it -->
464
462
  <fieldset>
465
- <legend>
466
- Contact details <span aria-hidden="true">*</span> required fields
467
- </legend>
463
+ <legend>Contact details <span aria-hidden="true">*</span> required fields</legend>
468
464
 
469
465
  <label for="name">Full name <span aria-hidden="true">*</span></label>
470
466
  <input type="text" id="name" required />
@@ -486,12 +482,7 @@ When inputs have format hints or helper text, associate them with the input via
486
482
  Multiple associations are allowed—comma-separated IDs work for both hint and error:
487
483
 
488
484
  ```html
489
- <input
490
- type="email"
491
- id="email"
492
- aria-invalid="true"
493
- aria-describedby="email-hint email-error"
494
- />
485
+ <input type="email" id="email" aria-invalid="true" aria-describedby="email-hint email-error" />
495
486
  ```
496
487
 
497
488
  ### Error Messages
@@ -505,15 +496,8 @@ Current best practice (due to browser support gaps with `aria-errormessage`):
505
496
 
506
497
  ```html
507
498
  <label for="email">Email</label>
508
- <input
509
- type="email"
510
- id="email"
511
- aria-invalid="true"
512
- aria-describedby="email-error"
513
- />
514
- <p id="email-error" class="error">
515
- Enter a valid email address, like name@example.com
516
- </p>
499
+ <input type="email" id="email" aria-invalid="true" aria-describedby="email-error" />
500
+ <p id="email-error" class="error">Enter a valid email address, like name@example.com</p>
517
501
  ```
518
502
 
519
503
  ## Tables
@@ -139,11 +139,7 @@ function Card({ title, headingLevel = 3, headingClass, children }) {
139
139
  // Specialised product card - knows its context
140
140
  function ProductCard({ product, headingLevel = 3 }) {
141
141
  return (
142
- <Card
143
- title={product.name}
144
- headingLevel={headingLevel}
145
- headingClass="product-card__title"
146
- >
142
+ <Card title={product.name} headingLevel={headingLevel} headingClass="product-card__title">
147
143
  <p className="product-card__price">{product.price}</p>
148
144
  <p className="product-card__description">{product.description}</p>
149
145
  </Card>