@peter.naydenov/shortcuts 3.5.2 → 4.0.1

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 (135) hide show
  1. package/API.md +939 -0
  2. package/CODE_OF_CONDUCT.md +84 -0
  3. package/CONTRIBUTING.md +476 -0
  4. package/Changelog.md +32 -2
  5. package/How.to.create.plugins.md +929 -0
  6. package/Migration.guide.md +48 -0
  7. package/README.md +396 -24
  8. package/dist/main.d.ts +54 -2
  9. package/dist/methods/_normalizeWithPlugins.d.ts +63 -1
  10. package/dist/methods/_readShortcutWithPlugins.d.ts +8 -1
  11. package/dist/methods/_setupPlugin.d.ts +9 -0
  12. package/dist/methods/_systemAction.d.ts +8 -1
  13. package/dist/methods/changeContext.d.ts +8 -1
  14. package/dist/methods/index.d.ts +2 -0
  15. package/dist/methods/listShortcuts.d.ts +1 -16
  16. package/dist/methods/load.d.ts +8 -1
  17. package/dist/methods/unload.d.ts +8 -1
  18. package/dist/plugins/click/_findTarget.d.ts +9 -1
  19. package/dist/plugins/click/_listenDOM.d.ts +76 -3
  20. package/dist/plugins/click/_normalizeShortcutName.d.ts +7 -1
  21. package/dist/plugins/click/_registerShortcutEvents.d.ts +26 -0
  22. package/dist/plugins/click/index.d.ts +6 -31
  23. package/dist/plugins/form/_defaults.d.ts +13 -1
  24. package/dist/plugins/form/_listenDOM.d.ts +66 -3
  25. package/dist/plugins/form/_registerShortcutEvents.d.ts +95 -1
  26. package/dist/plugins/form/index.d.ts +2 -29
  27. package/dist/plugins/hover/_findTarget.d.ts +10 -0
  28. package/dist/plugins/hover/_listenDOM.d.ts +68 -0
  29. package/dist/plugins/hover/_normalizeShortcutName.d.ts +2 -0
  30. package/dist/plugins/hover/_registerShortcutEvents.d.ts +28 -0
  31. package/dist/plugins/hover/index.d.ts +14 -0
  32. package/dist/plugins/key/_listenDOM.d.ts +61 -3
  33. package/dist/plugins/key/_registerShortcutEvents.d.ts +26 -0
  34. package/dist/plugins/key/_specialChars.d.ts +6 -31
  35. package/dist/plugins/key/index.d.ts +2 -29
  36. package/dist/plugins/scroll/_listenDOM.d.ts +58 -0
  37. package/dist/plugins/scroll/_normalizeShortcutName.d.ts +2 -0
  38. package/dist/plugins/scroll/_registerShortcutEvents.d.ts +28 -0
  39. package/dist/plugins/scroll/index.d.ts +16 -0
  40. package/dist/shortcuts.cjs +1 -1
  41. package/dist/shortcuts.esm.mjs +1 -1
  42. package/dist/shortcuts.umd.js +1 -1
  43. package/dist/src/main.d.ts +172 -0
  44. package/dist/src/methods/_normalizeWithPlugins.d.ts +64 -0
  45. package/dist/src/methods/_readShortcutWithPlugins.d.ts +9 -0
  46. package/dist/src/methods/_setupPlugin.d.ts +9 -0
  47. package/dist/src/methods/_systemAction.d.ts +9 -0
  48. package/dist/src/methods/changeContext.d.ts +9 -0
  49. package/dist/src/methods/index.d.ts +19 -0
  50. package/dist/src/methods/listShortcuts.d.ts +2 -0
  51. package/dist/src/methods/load.d.ts +9 -0
  52. package/dist/src/methods/unload.d.ts +9 -0
  53. package/dist/src/plugins/click/_findTarget.d.ts +10 -0
  54. package/dist/src/plugins/click/_listenDOM.d.ts +78 -0
  55. package/dist/src/plugins/click/_normalizeShortcutName.d.ts +8 -0
  56. package/dist/src/plugins/click/_readClickEvent.d.ts +2 -0
  57. package/dist/src/plugins/click/_registerShortcutEvents.d.ts +28 -0
  58. package/dist/src/plugins/click/index.d.ts +16 -0
  59. package/dist/src/plugins/form/_defaults.d.ts +17 -0
  60. package/dist/src/plugins/form/_listenDOM.d.ts +68 -0
  61. package/dist/src/plugins/form/_normalizeShortcutName.d.ts +2 -0
  62. package/dist/src/plugins/form/_registerShortcutEvents.d.ts +96 -0
  63. package/dist/src/plugins/form/index.d.ts +9 -0
  64. package/dist/src/plugins/hover/_findTarget.d.ts +10 -0
  65. package/dist/src/plugins/hover/_listenDOM.d.ts +68 -0
  66. package/dist/src/plugins/hover/_normalizeShortcutName.d.ts +2 -0
  67. package/dist/src/plugins/hover/_registerShortcutEvents.d.ts +28 -0
  68. package/dist/src/plugins/hover/index.d.ts +14 -0
  69. package/dist/src/plugins/key/_listenDOM.d.ts +63 -0
  70. package/dist/src/plugins/key/_normalizeShortcutName.d.ts +2 -0
  71. package/dist/src/plugins/key/_readKeyEvent.d.ts +2 -0
  72. package/dist/src/plugins/key/_registerShortcutEvents.d.ts +28 -0
  73. package/dist/src/plugins/key/_specialChars.d.ts +7 -0
  74. package/dist/src/plugins/key/index.d.ts +14 -0
  75. package/dist/src/plugins/scroll/_listenDOM.d.ts +58 -0
  76. package/dist/src/plugins/scroll/_normalizeShortcutName.d.ts +2 -0
  77. package/dist/src/plugins/scroll/_registerShortcutEvents.d.ts +28 -0
  78. package/dist/src/plugins/scroll/index.d.ts +16 -0
  79. package/eslint.config.js +80 -0
  80. package/html/assets/index-COTh6lXR.css +1 -0
  81. package/html/assets/index-DOkKC3NI.js +53 -0
  82. package/html/bg.png +0 -0
  83. package/html/favicon.ico +0 -0
  84. package/html/favicon.svg +5 -0
  85. package/html/html.meta.json.gz +0 -0
  86. package/html/index.html +32 -0
  87. package/package.json +24 -19
  88. package/shortcuts.png +0 -0
  89. package/src/main.js +52 -22
  90. package/src/methods/_normalizeWithPlugins.js +26 -2
  91. package/src/methods/_readShortcutWithPlugins.js +9 -2
  92. package/src/methods/_setupPlugin.js +93 -0
  93. package/src/methods/_systemAction.js +12 -4
  94. package/src/methods/changeContext.js +11 -3
  95. package/src/methods/index.js +2 -0
  96. package/src/methods/listShortcuts.js +5 -12
  97. package/src/methods/load.js +11 -4
  98. package/src/methods/unload.js +8 -1
  99. package/src/plugins/click/_findTarget.js +11 -5
  100. package/src/plugins/click/_listenDOM.js +58 -20
  101. package/src/plugins/click/_normalizeShortcutName.js +11 -4
  102. package/src/plugins/click/_readClickEvent.js +1 -1
  103. package/src/plugins/click/_registerShortcutEvents.js +33 -5
  104. package/src/plugins/click/index.js +33 -60
  105. package/src/plugins/form/_defaults.js +13 -3
  106. package/src/plugins/form/_listenDOM.js +46 -9
  107. package/src/plugins/form/_normalizeShortcutName.js +2 -2
  108. package/src/plugins/form/_registerShortcutEvents.js +93 -17
  109. package/src/plugins/form/index.js +25 -56
  110. package/src/plugins/hover/_findTarget.js +26 -0
  111. package/src/plugins/hover/_listenDOM.js +154 -0
  112. package/src/plugins/hover/_normalizeShortcutName.js +21 -0
  113. package/src/plugins/hover/_registerShortcutEvents.js +51 -0
  114. package/src/plugins/hover/index.js +71 -0
  115. package/src/plugins/key/_listenDOM.js +67 -33
  116. package/src/plugins/key/_normalizeShortcutName.js +4 -3
  117. package/src/plugins/key/_readKeyEvent.js +1 -1
  118. package/src/plugins/key/_registerShortcutEvents.js +34 -5
  119. package/src/plugins/key/_specialChars.js +5 -0
  120. package/src/plugins/key/index.js +34 -59
  121. package/src/plugins/scroll/_listenDOM.js +141 -0
  122. package/src/plugins/scroll/_normalizeShortcutName.js +21 -0
  123. package/src/plugins/scroll/_registerShortcutEvents.js +50 -0
  124. package/src/plugins/scroll/index.js +61 -0
  125. package/test/01-general.test.js +92 -23
  126. package/test/02-key.test.js +241 -40
  127. package/test/03-click.test.js +291 -47
  128. package/test/04-form.test.js +241 -47
  129. package/test/05-hover.test.js +463 -0
  130. package/test/06-scroll.test.js +374 -0
  131. package/test-helpers/Block.jsx +3 -2
  132. package/test-helpers/style.css +6 -1
  133. package/tsconfig.json +2 -1
  134. package/vitest.config.js +13 -11
  135. package/How..to.make.plugins.md +0 -41
@@ -0,0 +1,84 @@
1
+ # Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of:
6
+
7
+ - Age, body size, disability, ethnicity, gender identity and expression
8
+ - Level of experience, education, socioeconomic status, nationality, personal appearance
9
+ - Race, religion, or sexual identity and orientation
10
+
11
+ ## Our Standards
12
+
13
+ **Positive behavior that contributes to a welcoming environment:**
14
+
15
+ - Using welcoming and inclusive language
16
+ - Being respectful of differing viewpoints and experiences
17
+ - Gracefully accepting constructive criticism
18
+ - Focusing on what is best for the community
19
+ - Showing empathy towards other community members
20
+
21
+ **Unacceptable behavior:**
22
+
23
+ - Harassment, trolling, or deliberate intimidation
24
+ - Publishing private information without explicit permission
25
+ - Any conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Enforcement
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct. Project maintainers who do not follow the Code of Conduct may face temporary or permanent repercussions.
30
+
31
+ ## Reporting Guidelines
32
+
33
+ If you experience or witness unacceptable behavior, please report it through one of the following channels:
34
+
35
+ **For public issues:**
36
+ - Create an issue with the "Code of Conduct" label
37
+ - Contact any project maintainer directly
38
+
39
+ **For private or sensitive matters:**
40
+ - Email: peter.naydenov@gmail.com
41
+ - GitHub: @PeterNaydenov
42
+
43
+ When reporting, please include:
44
+ - Description of the incident
45
+ - People involved (if applicable)
46
+ - Any relevant context or screenshots
47
+ - Your preferred resolution (if any)
48
+
49
+ ## Enforcement Process
50
+
51
+ 1. **Initial Review** - Maintainers will review the report within 48 hours
52
+ 2. **Investigation** - We'll gather facts and speak with involved parties if needed
53
+ 3. **Action** - We'll take appropriate action based on severity
54
+ 4. **Follow-up** - We'll monitor the situation and ensure resolution
55
+
56
+ ## Consequences
57
+
58
+ Unacceptable behavior may result in:
59
+
60
+ - **Warning** - For minor first offenses
61
+ - **Temporary suspension** - For repeated or serious offenses
62
+ - **Permanent ban** - For severe violations or repeated offenses after warnings
63
+
64
+ ## Scope
65
+
66
+ This Code of Conduct applies to:
67
+
68
+ - All project spaces (GitHub, Discord, email, etc.)
69
+ - Public and private interactions
70
+ - In-person events related to the project
71
+
72
+ ## Attribution
73
+
74
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
75
+
76
+ For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
77
+
78
+ ---
79
+
80
+ **Contact for enforcement issues:**
81
+ - Email: peter.naydenov@gmail.com
82
+ - GitHub: @PeterNaydenov
83
+
84
+ **Last updated:** November 2025
@@ -0,0 +1,476 @@
1
+ # Contributing to @peter.naydenov/shortcuts
2
+
3
+ Thank you for your interest in contributing to the shortcuts library! This document provides guidelines and information for contributors.
4
+
5
+ ## 🤝 Code of Conduct
6
+
7
+ ### Our Pledge
8
+
9
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of:
10
+
11
+ - Age, body size, disability, ethnicity, gender identity and expression
12
+ - Level of experience, education, socioeconomic status, nationality, personal appearance
13
+ - Race, religion, or sexual identity and orientation
14
+
15
+ ### Our Standards
16
+
17
+ **Positive behavior that contributes to a welcoming environment:**
18
+ - Using welcoming and inclusive language
19
+ - Being respectful of differing viewpoints and experiences
20
+ - Gracefully accepting constructive criticism
21
+ - Focusing on what is best for the community
22
+ - Showing empathy towards other community members
23
+
24
+ **Unacceptable behavior:**
25
+ - Harassment, trolling, or deliberate intimidation
26
+ - Publishing private information without explicit permission
27
+ - Any conduct which could reasonably be considered inappropriate in a professional setting
28
+
29
+ ### Enforcement
30
+
31
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct. Project maintainers who do not follow the Code of Conduct may face temporary or permanent repercussions.
32
+
33
+ **Contact for enforcement issues:**
34
+ - Email: peter.naydenov@gmail.com
35
+ - GitHub: @PeterNaydenov
36
+
37
+
38
+
39
+
40
+ ## 🚀 Getting Started
41
+
42
+ ### Prerequisites
43
+
44
+ - Node.js 16 or higher
45
+ - Git
46
+ - Basic knowledge of JavaScript
47
+ - Familiarity with DOM events and browser APIs
48
+
49
+
50
+ ### Development Setup
51
+
52
+ 1. **Fork the repository**
53
+ ```bash
54
+ # Fork on GitHub, then clone your fork
55
+ git clone https://github.com/PeterNaydenov/shortcuts.git
56
+ cd shortcuts
57
+ ```
58
+
59
+ 2. **Install dependencies**
60
+ ```bash
61
+ npm install
62
+ ```
63
+
64
+ 3. **Start development server**
65
+ ```bash
66
+ npm run dev
67
+ ```
68
+
69
+ 4. **Run tests to verify setup**
70
+ ```bash
71
+ npm test
72
+ ```
73
+
74
+ ### Project Structure
75
+
76
+ ```
77
+ shortcuts/
78
+ ├── src/ # Source code
79
+ │ ├── methods/ # Core library methods
80
+ │ ├── plugins/ # Plugin implementations
81
+ │ └── main.js # Main entry point
82
+ ├── test/ # Test files
83
+ ├── test-helpers/ # Test utilities
84
+ └── dist/ # Built distribution files
85
+ ```
86
+
87
+
88
+
89
+
90
+
91
+ ## 📝 Contribution Types
92
+
93
+ ### Bug Reports
94
+
95
+ Before creating a bug report, please check:
96
+
97
+ 1. **Existing issues** - Search for similar issues
98
+ 2. **Latest version** - Ensure you're using the latest version
99
+ 3. **Minimal reproduction** - Create a minimal test case
100
+
101
+ **Bug report template:**
102
+ ```markdown
103
+ ## Bug Description
104
+ Brief description of the issue
105
+
106
+ ## Steps to Reproduce
107
+ 1. Step one
108
+ 2. Step two
109
+ 3. Step three
110
+
111
+ ## Expected Behavior
112
+ What should happen
113
+
114
+ ## Actual Behavior
115
+ What actually happens
116
+
117
+ ## Environment
118
+ - OS: [e.g., Windows 11, macOS 13.0]
119
+ - Browser: [e.g., Chrome 119, Firefox 118]
120
+ - Library version: [e.g., 3.5.2]
121
+
122
+ ## Additional Context
123
+ Any other relevant information
124
+ ```
125
+
126
+ ### Feature Requests
127
+
128
+ **Feature request template:**
129
+ ```markdown
130
+ ## Feature Description
131
+ Clear description of the proposed feature
132
+
133
+ ## Problem Statement
134
+ What problem does this feature solve?
135
+
136
+ ## Proposed Solution
137
+ How should this feature work?
138
+
139
+ ## Alternatives Considered
140
+ What other approaches did you consider?
141
+
142
+ ## Additional Context
143
+ Any other relevant information
144
+ ```
145
+
146
+
147
+
148
+ ### Code Contributions
149
+
150
+ #### Development Workflow
151
+
152
+ 1. **Create a feature branch**
153
+ ```bash
154
+ git checkout -b feature/your-feature-name
155
+ # or
156
+ git checkout -b fix/your-bug-fix
157
+ ```
158
+
159
+ 2. **Make your changes**
160
+ - Follow existing code style and patterns
161
+ - Add tests for new functionality
162
+ - Update documentation if needed
163
+
164
+ 3. **Run quality checks**
165
+ ```bash
166
+ npm run lint # Check code style
167
+ npm run test # Run all tests
168
+ npm run test:coverage # Check test coverage
169
+ ```
170
+
171
+ 4. **Commit your changes**
172
+ ```bash
173
+ git add .
174
+ git commit -m "feat: add new plugin feature"
175
+ ```
176
+
177
+ 5. **Push and create PR**
178
+ ```bash
179
+ git push origin feature/your-feature-name
180
+ # Create pull request on GitHub
181
+ ```
182
+
183
+ #### Commit Message Convention
184
+
185
+ We follow [Conventional Commits](https://www.conventionalcommits.org/) specification:
186
+
187
+ ```
188
+ <type>[optional scope]: <description>
189
+
190
+ [optional body]
191
+
192
+ [optional footer(s)]
193
+ ```
194
+
195
+ **Types:**
196
+ - `feat`: New feature
197
+ - `fix`: Bug fix
198
+ - `docs`: Documentation changes
199
+ - `style`: Code style changes (formatting, etc.)
200
+ - `refactor`: Code refactoring
201
+ - `test`: Adding or updating tests
202
+ - `chore`: Maintenance tasks
203
+
204
+ **Examples:**
205
+ ```
206
+ feat(click): add support for multiple target attributes
207
+ fix(hover): resolve hover detection on nested elements
208
+ docs: update API documentation for v4.0.0
209
+ test: add coverage for scroll plugin edge cases
210
+ ```
211
+
212
+ ## 🧪 Testing Guidelines
213
+
214
+ ### Test Requirements
215
+
216
+ - **Unit tests** for all new functions
217
+ - **Integration tests** for plugin interactions
218
+ - **Browser tests** for DOM-related functionality
219
+ - **Minimum 80% code coverage** for new code
220
+
221
+ ### Test Structure
222
+
223
+ ```javascript
224
+ // test/07-your-plugin.test.js
225
+ import { beforeEach, afterEach, describe, it, test, expect } from 'vitest'
226
+ import { shortcuts, pluginYourPlugin } from '../src/main.js'
227
+
228
+ describe('YourPlugin', () => {
229
+ let short
230
+
231
+ beforeEach(() => {
232
+ short = shortcuts()
233
+ short.enablePlugin(pluginYourPlugin)
234
+ })
235
+
236
+ afterEach(() => {
237
+ short.reset()
238
+ short.disablePlugin('yourPlugin')
239
+ })
240
+
241
+ it('should register shortcuts correctly', () => {
242
+ // Test implementation
243
+ })
244
+
245
+ it('should handle events properly', () => {
246
+ // Test implementation
247
+ })
248
+ })
249
+ ```
250
+
251
+ ### Running Tests
252
+
253
+ ```bash
254
+ # Run all tests
255
+ npm test
256
+
257
+ # Run tests in watch mode
258
+ npm run test:watch
259
+
260
+ # Run tests with coverage
261
+ npm run test:coverage
262
+
263
+ # Run specific test file
264
+ npm test 07-your-plugin.test.js
265
+ ```
266
+
267
+ ## 📚 Documentation Contributions
268
+
269
+ ### Types of Documentation
270
+
271
+ 1. **Code Documentation** - JSDoc comments in source code
272
+ 2. **API Documentation** - Technical API reference
273
+ 3. **User Documentation** - README, examples, tutorials
274
+ 4. **Developer Documentation** - Plugin development guides
275
+
276
+ ### Documentation Standards
277
+
278
+ - **Clear and concise** language
279
+ - **Code examples** for all major features
280
+ - **Consistent formatting** with existing docs
281
+ - **Cross-references** to related topics
282
+
283
+ ### Plugin Documentation
284
+
285
+ When creating a new plugin, include:
286
+
287
+ 1. **Plugin purpose and use cases**
288
+ 2. **Installation instructions**
289
+ 3. **Configuration options**
290
+ 4. **API reference**
291
+ 5. **Usage examples**
292
+ 6. **Migration guide** (if breaking changes)
293
+
294
+ ## 🔧 Plugin Development
295
+
296
+ ### Plugin Requirements
297
+
298
+ 1. **Follow standard plugin structure**
299
+ 2. **Implement required methods** (`getPrefix`, `shortcutName`, etc.)
300
+ 3. **Handle edge cases** gracefully
301
+ 4. **Provide comprehensive tests**
302
+ 5. **Include TypeScript definitions**
303
+
304
+ ### Plugin Structure
305
+
306
+ ```javascript
307
+ // src/plugins/yourPlugin/index.js
308
+ import _normalizeShortcutName from './_normalizeShortcutName.js'
309
+ import _registerShortcutEvents from './_registerShortcutEvents.js'
310
+ import _listenDOM from './_listenDOM.js'
311
+
312
+ function pluginYourPlugin(setupPlugin, options = {}) {
313
+ const deps = {
314
+ regex: /YOUR_PLUGIN:.+/i,
315
+ // ... other dependencies
316
+ }
317
+
318
+ const pluginState = {
319
+ active: false,
320
+ defaultOptions: {
321
+ // Default configuration
322
+ },
323
+ listenOptions: {},
324
+ // ... plugin-specific state
325
+ }
326
+
327
+ function resetState() {
328
+ // Cleanup logic
329
+ }
330
+ deps.resetState = resetState
331
+
332
+ return setupPlugin({
333
+ prefix: 'yourPlugin',
334
+ _normalizeShortcutName,
335
+ _registerShortcutEvents,
336
+ _listenDOM,
337
+ pluginState,
338
+ deps
339
+ })
340
+ }
341
+
342
+ export default pluginYourPlugin
343
+ ```
344
+
345
+ ## 📋 Pull Request Process
346
+
347
+ ### Before Submitting
348
+
349
+ 1. **Code Quality**
350
+ - [ ] Code follows project style guidelines
351
+ - [ ] All tests pass
352
+ - [ ] Test coverage is maintained or improved
353
+ - [ ] Documentation is updated
354
+
355
+ 2. **Functionality**
356
+ - [ ] Feature works as expected
357
+ - [ ] No breaking changes (unless documented)
358
+ - [ ] Backward compatibility maintained
359
+
360
+ 3. **Documentation**
361
+ - [ ] README updated if needed
362
+ - [ ] API docs updated
363
+ - [ ] Examples provided for new features
364
+
365
+ ### Pull Request Template
366
+
367
+ ```markdown
368
+ ## Description
369
+ Brief description of changes
370
+
371
+ ## Type of Change
372
+ - [ ] Bug fix
373
+ - [ ] New feature
374
+ - [ ] Breaking change
375
+ - [ ] Documentation update
376
+
377
+ ## Testing
378
+ - [ ] All tests pass
379
+ - [ ] New tests added for new functionality
380
+ - [ ] Manual testing completed
381
+
382
+ ## Checklist
383
+ - [ ] Code follows style guidelines
384
+ - [ ] Self-review completed
385
+ - [ ] Documentation updated
386
+ - [ ] No breaking changes (or documented)
387
+ ```
388
+
389
+ ### Review Process
390
+
391
+ 1. **Automated checks** - CI/CD pipeline runs tests
392
+ 2. **Code review** - Maintainer review for quality and standards
393
+ 3. **Testing** - Additional testing if needed
394
+ 4. **Approval** - Merge after approval and checks pass
395
+
396
+ ## ⚖️ Legal and Licensing
397
+
398
+ ### Contributor License Agreement (CLA)
399
+
400
+ By contributing to this project, you agree that your contributions will be licensed under the same license as the project (MIT License).
401
+
402
+ ### Intellectual Property
403
+
404
+ - Ensure you have rights to contribute the code
405
+ - Don't include proprietary or confidential information
406
+ - Respect third-party licenses and copyrights
407
+ - Attribute properly when using external code
408
+
409
+ ### License Compliance
410
+
411
+ - All contributions must be compatible with MIT License
412
+ - Include license headers for significant files
413
+ - Document any third-party dependencies
414
+ - Keep license information up to date
415
+
416
+ ## 🆘 Getting Help
417
+
418
+ ### Communication Channels
419
+
420
+ - **GitHub Issues** - Bug reports and feature requests
421
+ - **GitHub Discussions** - General questions and community discussion
422
+ - **Email** - Private or security-related matters
423
+
424
+ ### Resources
425
+
426
+ - [API Documentation](./API.md)
427
+ - [Plugin Development Guide](./How.to.create.plugins.md)
428
+ - [Migration Guide](./Migration.guide.md)
429
+ - [Examples](./EXAMPLES.md)
430
+
431
+ ## 🏆 Recognition
432
+
433
+ ### Contributor Recognition
434
+
435
+ - **Contributors list** in README
436
+ - **Release notes** mention significant contributors
437
+ - **GitHub badges** for active contributors
438
+ - **Community spotlight** in project updates
439
+
440
+ ### Becoming a Maintainer
441
+
442
+ Active contributors who demonstrate:
443
+ - Consistent quality contributions
444
+ - Good understanding of the codebase
445
+ - Helpful community engagement
446
+ - Commitment to project goals
447
+
448
+ May be invited to become maintainers with merge access.
449
+
450
+ ## 📈 Project Goals
451
+
452
+ ### Current Focus Areas
453
+
454
+ 1. **Plugin ecosystem expansion**
455
+ 2. **Performance optimization**
456
+ 3. **TypeScript improvements**
457
+ 4. **Browser compatibility**
458
+ 5. **Documentation enhancement**
459
+
460
+
461
+
462
+
463
+
464
+ ### Long-term Vision
465
+
466
+ - Become the de facto standard for user interaction with the interface;
467
+ - Support for emerging input methods (touch, voice, etc.);
468
+ - Comprehensive plugin marketplace;
469
+ - Strong community-driven development;
470
+
471
+ ---
472
+
473
+ Thank you for contributing to @peter.naydenov/shortcuts! Your contributions help make this project better for everyone.
474
+
475
+ **Last updated:** November 2025
476
+ **Version:** 4.0.0
package/Changelog.md CHANGED
@@ -2,19 +2,42 @@
2
2
 
3
3
 
4
4
 
5
+ ### 4.0.1 ( 2026-03-24 )
6
+ - [x] Dev deps update. TypeScript to v.6.0.2;
7
+ - [x] Types update according to TypeScript v.6.0.2;
8
+
9
+
10
+
11
+ ### 4.0.0 ( 2025-11-08 )
12
+ - [x] New plugin 'hover';
13
+ - [x] New plugin 'scroll';
14
+ - [x] Refactoring on plugin API. New method for building plugin interface;
15
+ - [x] API documentation;
16
+ - [x] Code: Plugin 'form' upgrade. Now you can take 'dependencies' on 'form:action' level. It's higher level that all declared actions can use. Minimize 'dependencies' declarations. Other named arguments are not available on top level;
17
+ - [x] Plugin 'click' has different parameters for maximum number of clicks for left and right mouse buttons;
18
+ - [x] Code: Plugin 'form' uses general app error event;
19
+ - [x] Code: Plugin 'form'. Event 'form:watch' has named argument 'dependencies';
20
+ - [x] Fix: Plugin 'form' on event 'form:define' - argument should be a named argument;
21
+ - [x] Feature: Plugin 'click' parameter 'clickTarget' now accepts array of attribute names (default: ['data-click', 'href']);
22
+ - [x] Feature: Plugin 'hover' parameter 'hoverTarget' now accepts array of attribute names (default: ['data-hover']);
23
+ - [x] Documentation: Updated README.md and JSDoc comments to reflect array-based target attributes;
24
+
25
+
26
+
5
27
  ### 3.5.2 ( 2025-10-20 )
6
28
  - [x] Types update;
7
-
29
+ - [ ] Bug: Plugin 'form' on event 'form:define' - argument should be a named argument;
8
30
 
9
31
 
10
32
  ### 3.5.1 ( 2025-10-20 )
11
33
  - [x] Update in package.json. Field 'types' was added;
12
-
34
+ - [ ] Bug: Plugin 'form' on event 'form:define' - argument should be a named argument;
13
35
 
14
36
 
15
37
  ### 3.5.0 ( 2025-10-19)
16
38
  - [x] Featire: New method 'listPlugins' to get list of enabled plugins;
17
39
  - [x] Upgrade: Improvment of type definitions. New d.ts files were added;
40
+ - [ ] Bug: Plugin 'form' on event 'form:define' - argument should be a named argument;
18
41
 
19
42
 
20
43
 
@@ -29,6 +52,7 @@
29
52
  - [x] Fix: Cleaning plugin-state variables on plugin stop;
30
53
  - [x] Fix: Wrong plugin name detection in 'enablePlugin' method;
31
54
  - [x] Fix: Custom events for plugins with works only with nomrmalized event-names. Fixed - event name normalization could be done from the enabled plugins;
55
+ - [ ] Bug: Plugin 'form' on event 'form:define' - argument should be a named argument;
32
56
 
33
57
 
34
58
 
@@ -37,6 +61,7 @@
37
61
  - [ ] Bug: Cleaning plugin-state variables on plugin stop;
38
62
  - [ ] Bug: Wrong plugin name detection in 'enablePlugin' method;
39
63
  - [ ] Bug: Custom events for plugins with works only with nomrmalized event-names;
64
+ - [ ] Bug: Plugin 'form' on event 'form:define' - argument should be a named argument;
40
65
 
41
66
 
42
67
 
@@ -46,6 +71,8 @@
46
71
  - [ ] Bug: Cleaning plugin-state variables on plugin stop;
47
72
  - [ ] Bug: Wrong plugin name detection in 'enablePlugin' method;
48
73
  - [ ] Bug: Custom events for plugins with works only with nomrmalized event-names;
74
+ - [ ] Bug: Plugin 'form' on event 'form:define' - argument should be a named argument;
75
+
49
76
 
50
77
 
51
78
  ### 3.2.1 ( 2025-08-15)
@@ -54,6 +81,8 @@
54
81
  - [ ] Bug: Cleaning plugin-state variables on plugin stop;
55
82
  - [ ] Bug: Wrong plugin name detection in 'enablePlugin' method;
56
83
  - [ ] Bug: Custom events for plugins with works only with nomrmalized event-names;
84
+ - [ ] Bug: Plugin 'form' on event 'form:define' - argument should be a named argument;
85
+
57
86
 
58
87
 
59
88
  ### 3.2.0 ( 2025-08-15)
@@ -63,6 +92,7 @@
63
92
  - [ ] Bug: Cleaning plugin-state variables on plugin stop;
64
93
  - [ ] Bug: Wrong plugin name detection in 'enablePlugin' method;
65
94
  - [ ] Bug: Custom events for plugins with works only with nomrmalized event-names;
95
+ - [ ] Bug: Plugin 'form' on event 'form:define' - argument should be a named argument;
66
96
 
67
97
 
68
98