pulse-js-framework 1.7.12 → 1.7.15
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 +87 -7
- package/cli/docs.js +712 -0
- package/cli/doctor.js +702 -0
- package/cli/index.js +338 -65
- package/cli/scaffold.js +1037 -0
- package/cli/test.js +455 -0
- package/package.json +19 -3
- package/runtime/a11y.js +824 -1
- package/runtime/dom-adapter.js +663 -0
package/README.md
CHANGED
|
@@ -38,6 +38,15 @@ npm install
|
|
|
38
38
|
npm run dev
|
|
39
39
|
```
|
|
40
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
|
+
|
|
41
50
|
### Or use directly
|
|
42
51
|
|
|
43
52
|
```javascript
|
|
@@ -126,13 +135,46 @@ See [Pulse DSL documentation](docs/pulse-dsl.md) for full syntax reference.
|
|
|
126
135
|
## CLI Commands
|
|
127
136
|
|
|
128
137
|
```bash
|
|
129
|
-
|
|
130
|
-
pulse
|
|
131
|
-
pulse
|
|
132
|
-
pulse
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
pulse
|
|
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 lint --fix # Auto-fix fixable issues
|
|
152
|
+
pulse format [files] # Format .pulse files
|
|
153
|
+
pulse analyze # Analyze bundle
|
|
154
|
+
|
|
155
|
+
# Testing
|
|
156
|
+
pulse test # Run tests with Node.js test runner
|
|
157
|
+
pulse test --coverage # Run tests with coverage
|
|
158
|
+
pulse test --watch # Watch mode
|
|
159
|
+
pulse test --create <name> # Generate test file
|
|
160
|
+
|
|
161
|
+
# Project Tools
|
|
162
|
+
pulse doctor # Run project diagnostics
|
|
163
|
+
pulse doctor --verbose # Detailed diagnostics
|
|
164
|
+
|
|
165
|
+
# Scaffolding
|
|
166
|
+
pulse scaffold component <name> # Generate component
|
|
167
|
+
pulse scaffold page <name> # Generate page
|
|
168
|
+
pulse scaffold store <name> # Generate store module
|
|
169
|
+
pulse scaffold hook <name> # Generate custom hook
|
|
170
|
+
pulse scaffold service <name> # Generate API service
|
|
171
|
+
pulse scaffold context <name> # Generate context provider
|
|
172
|
+
pulse scaffold layout <name> # Generate layout component
|
|
173
|
+
|
|
174
|
+
# Documentation
|
|
175
|
+
pulse docs --generate # Generate API docs (Markdown)
|
|
176
|
+
pulse docs --generate -f html # Generate HTML docs
|
|
177
|
+
pulse docs --generate -f json # Generate JSON docs
|
|
136
178
|
```
|
|
137
179
|
|
|
138
180
|
See [CLI documentation](docs/cli.md) for full command reference.
|
|
@@ -188,6 +230,38 @@ const { data, loading } = useAsync(() => fetch('/api/users').then(r => r.json())
|
|
|
188
230
|
const users = useResource('users', fetchUsers, { refreshInterval: 30000 });
|
|
189
231
|
```
|
|
190
232
|
|
|
233
|
+
### Accessibility
|
|
234
|
+
|
|
235
|
+
```javascript
|
|
236
|
+
import {
|
|
237
|
+
// Announcements
|
|
238
|
+
announce, createAnnouncementQueue,
|
|
239
|
+
// Focus management
|
|
240
|
+
trapFocus, onEscapeKey, createFocusVisibleTracker,
|
|
241
|
+
// User preferences
|
|
242
|
+
prefersReducedMotion, prefersReducedTransparency, forcedColorsMode,
|
|
243
|
+
// ARIA widgets
|
|
244
|
+
createModal, createTooltip, createAccordion, createMenu,
|
|
245
|
+
// Color contrast
|
|
246
|
+
getContrastRatio, meetsContrastRequirement,
|
|
247
|
+
// Validation
|
|
248
|
+
validateA11y
|
|
249
|
+
} from 'pulse-js-framework/runtime/a11y';
|
|
250
|
+
|
|
251
|
+
// Screen reader announcements
|
|
252
|
+
announce('Item saved successfully');
|
|
253
|
+
|
|
254
|
+
// Accessible modal dialog
|
|
255
|
+
const modal = createModal(dialog, { labelledBy: 'title', closeOnBackdropClick: true });
|
|
256
|
+
modal.open();
|
|
257
|
+
|
|
258
|
+
// Check color contrast (WCAG)
|
|
259
|
+
const ratio = getContrastRatio('#333', '#fff'); // 12.63
|
|
260
|
+
meetsContrastRequirement(ratio, 'AA'); // true
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
See [Accessibility documentation](docs/accessibility.md) for full guide.
|
|
264
|
+
|
|
191
265
|
See [API documentation](docs/api.md) for full reference.
|
|
192
266
|
|
|
193
267
|
## Mobile Apps
|
|
@@ -257,6 +331,12 @@ const count: Pulse<number> = pulse(0);
|
|
|
257
331
|
- [API Reference](docs/api.md) - Complete API documentation
|
|
258
332
|
- [CLI Commands](docs/cli.md) - Command line interface
|
|
259
333
|
- [Pulse DSL](docs/pulse-dsl.md) - .pulse file syntax
|
|
334
|
+
- [Accessibility](docs/accessibility.md) - A11y guide and ARIA helpers
|
|
335
|
+
- [HTTP Client](docs/http.md) - Fetch wrapper with interceptors
|
|
336
|
+
- [WebSocket](docs/websocket.md) - Real-time with auto-reconnect
|
|
337
|
+
- [GraphQL](docs/graphql.md) - Queries, mutations, subscriptions
|
|
338
|
+
- [Context API](docs/context.md) - Dependency injection
|
|
339
|
+
- [DevTools](docs/devtools.md) - Debugging and profiling
|
|
260
340
|
- [Mobile Apps](docs/mobile.md) - Native Android & iOS
|
|
261
341
|
|
|
262
342
|
## License
|