pulse-js-framework 1.7.11 → 1.7.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/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # Pulse Framework
2
2
 
3
3
  [![CI](https://github.com/vincenthirtz/pulse-js-framework/actions/workflows/ci.yml/badge.svg)](https://github.com/vincenthirtz/pulse-js-framework/actions/workflows/ci.yml)
4
+ [![codecov](https://codecov.io/gh/vincenthirtz/pulse-js-framework/graph/badge.svg)](https://codecov.io/gh/vincenthirtz/pulse-js-framework)
4
5
  [![Netlify Status](https://api.netlify.com/api/v1/badges/2597dac2-228a-4d3e-bea8-4e7ef8ac5c53/deploy-status)](https://app.netlify.com/projects/pulse-js/deploys)
5
6
 
6
- A declarative DOM framework with CSS selector-based structure and reactive pulsations.
7
+ No build. No dependencies. Just JavaScript.
7
8
 
8
9
  ## Features
9
10
 
@@ -37,6 +38,15 @@ npm install
37
38
  npm run dev
38
39
  ```
39
40
 
41
+ ### Or with TypeScript
42
+
43
+ ```bash
44
+ npx pulse-js-framework create my-app --typescript
45
+ cd my-app
46
+ npm install
47
+ npm run dev
48
+ ```
49
+
40
50
  ### Or use directly
41
51
 
42
52
  ```javascript
@@ -125,13 +135,43 @@ See [Pulse DSL documentation](docs/pulse-dsl.md) for full syntax reference.
125
135
  ## CLI Commands
126
136
 
127
137
  ```bash
128
- pulse create <name> # Create new project
129
- pulse dev [port] # Start dev server (default: 3000)
130
- pulse build # Build for production
131
- pulse compile <file> # Compile .pulse file
132
- pulse lint [files] # Validate .pulse files
133
- pulse format [files] # Format .pulse files
134
- pulse analyze # Analyze bundle
138
+ # Project Creation
139
+ pulse create <name> # Create new project
140
+ pulse create <name> --typescript # Create TypeScript project
141
+ pulse init --typescript # Initialize in current directory
142
+
143
+ # Development
144
+ pulse dev [port] # Start dev server (default: 3000)
145
+ pulse build # Build for production
146
+ pulse preview [port] # Preview production build
147
+ pulse compile <file> # Compile .pulse file
148
+
149
+ # Code Quality
150
+ pulse lint [files] # Validate .pulse files
151
+ pulse format [files] # Format .pulse files
152
+ pulse analyze # Analyze bundle
153
+
154
+ # Testing
155
+ pulse test # Run tests with Node.js test runner
156
+ pulse test --coverage # Run tests with coverage
157
+ pulse test --watch # Watch mode
158
+ pulse test --create <name> # Generate test file
159
+
160
+ # Project Tools
161
+ pulse doctor # Run project diagnostics
162
+ pulse doctor --verbose # Detailed diagnostics
163
+
164
+ # Scaffolding
165
+ pulse scaffold component <name> # Generate component
166
+ pulse scaffold page <name> # Generate page
167
+ pulse scaffold store <name> # Generate store module
168
+ pulse scaffold hook <name> # Generate custom hook
169
+ pulse scaffold service <name> # Generate API service
170
+
171
+ # Documentation
172
+ pulse docs --generate # Generate API docs (Markdown)
173
+ pulse docs --generate -f html # Generate HTML docs
174
+ pulse docs --generate -f json # Generate JSON docs
135
175
  ```
136
176
 
137
177
  See [CLI documentation](docs/cli.md) for full command reference.
@@ -187,6 +227,38 @@ const { data, loading } = useAsync(() => fetch('/api/users').then(r => r.json())
187
227
  const users = useResource('users', fetchUsers, { refreshInterval: 30000 });
188
228
  ```
189
229
 
230
+ ### Accessibility
231
+
232
+ ```javascript
233
+ import {
234
+ // Announcements
235
+ announce, createAnnouncementQueue,
236
+ // Focus management
237
+ trapFocus, onEscapeKey, createFocusVisibleTracker,
238
+ // User preferences
239
+ prefersReducedMotion, prefersReducedTransparency, forcedColorsMode,
240
+ // ARIA widgets
241
+ createModal, createTooltip, createAccordion, createMenu,
242
+ // Color contrast
243
+ getContrastRatio, meetsContrastRequirement,
244
+ // Validation
245
+ validateA11y
246
+ } from 'pulse-js-framework/runtime/a11y';
247
+
248
+ // Screen reader announcements
249
+ announce('Item saved successfully');
250
+
251
+ // Accessible modal dialog
252
+ const modal = createModal(dialog, { labelledBy: 'title', closeOnBackdropClick: true });
253
+ modal.open();
254
+
255
+ // Check color contrast (WCAG)
256
+ const ratio = getContrastRatio('#333', '#fff'); // 12.63
257
+ meetsContrastRequirement(ratio, 'AA'); // true
258
+ ```
259
+
260
+ See [Accessibility documentation](docs/accessibility.md) for full guide.
261
+
190
262
  See [API documentation](docs/api.md) for full reference.
191
263
 
192
264
  ## Mobile Apps