semmet-angular 0.21.0 → 0.23.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.
- package/README.md +33 -5
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,21 +1,48 @@
|
|
|
1
1
|
# semmet-angular
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Accessible UI Delivery Kit for Angular.**
|
|
4
4
|
|
|
5
|
-
`
|
|
5
|
+
`semmet-angular` is a delivery-focused schematic collection for Angular teams that want to ship accessible UI faster: components with real ARIA behavior, a consistent visual identity, and generated test files from the first command.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Semmet Angular helps teams generate, test, verify, and package accessible Angular UI using the Angular CLI ecosystem.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Gerar. Testar. Verificar. Empacotar.**
|
|
10
|
+
|
|
11
|
+
`ng generate semmet-angular:accordion my-faq` scaffolds a standalone, signals-based Angular component — `.ts`/`.html`/`.css` — plus `.spec.ts` and `.e2e-spec.ts` smoke tests. The generated component implements a W3C ARIA Authoring Practices Guide pattern for real: correct roles and `aria-*` wiring, the keyboard/focus behavior the pattern requires (arrow-key navigation, focus traps, focus restoration...), and a consistent visual identity out of the box.
|
|
10
12
|
|
|
11
13
|
## Usage
|
|
12
14
|
|
|
13
15
|
```
|
|
14
16
|
npm install -D semmet-angular
|
|
17
|
+
ng add semmet-angular
|
|
15
18
|
ng generate semmet-angular:accordion my-faq
|
|
16
19
|
```
|
|
17
20
|
|
|
18
|
-
Each generated component is dropped into your project exactly like `ng generate component` would (respecting your `angular.json` project, source root, and selector prefix), and has **zero runtime dependency** on this package — `semmet-angular` is only needed at generation time.
|
|
21
|
+
`ng add semmet-angular` configures the delivery workflow once for the target application, including Playwright e2e support and npm scripts. Each generated component is dropped into your project exactly like `ng generate component` would (respecting your `angular.json` project, source root, and selector prefix), and has **zero runtime dependency** on this package — `semmet-angular` is only needed at generation time.
|
|
22
|
+
|
|
23
|
+
## Generated tests
|
|
24
|
+
|
|
25
|
+
Every component schematic generates test files next to the component:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
my-faq.ts
|
|
29
|
+
my-faq.html
|
|
30
|
+
my-faq.css
|
|
31
|
+
my-faq.spec.ts
|
|
32
|
+
my-faq.e2e-spec.ts
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The unit test uses Angular's `TestBed` to verify that the standalone component can be created. The e2e test uses Playwright and becomes active as soon as the component is mounted in a route or host component. If the component has not been added to any rendered page yet, the generated e2e smoke test is skipped with a clear message instead of failing the whole suite.
|
|
36
|
+
|
|
37
|
+
After running `ng add semmet-angular`, use:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
npm test
|
|
41
|
+
npm run e2e
|
|
42
|
+
npm run e2e:ui
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`npm run e2e` runs Playwright against the Angular dev server configured by `playwright.config.ts`; `npm run e2e:ui` opens Playwright's interactive UI.
|
|
19
46
|
|
|
20
47
|
## Projected content containers
|
|
21
48
|
|
|
@@ -195,6 +222,7 @@ The smaller structural schematics keep their simple input APIs and add safe slot
|
|
|
195
222
|
- Templates use the built-in control flow (`@for`, `@if`), not `*ngFor`/`*ngIf`.
|
|
196
223
|
- No `.component` suffix on file names or class names (`accordion.ts`, `export class Accordion`), matching the current `ng generate component` convention.
|
|
197
224
|
- A unique per-instance id (`<name>-0`, `<name>-1`, ...) so multiple instances of the same generated component never collide on `id`/`aria-controls`/`aria-labelledby`.
|
|
225
|
+
- A generated unit test (`.spec.ts`) and Playwright e2e smoke test (`.e2e-spec.ts`) so the component starts life with a test surface.
|
|
198
226
|
|
|
199
227
|
## Visual identity
|
|
200
228
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semmet-angular",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Angular schematics that generate
|
|
3
|
+
"version": "0.23.0",
|
|
4
|
+
"description": "Accessible UI Delivery Kit for Angular: schematics that generate ARIA-conformant standalone components with styling, keyboard behavior, unit tests, and Playwright e2e smoke tests.",
|
|
5
5
|
"publisher": "danilodevsilva",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"aria",
|
|
12
12
|
"accessibility",
|
|
13
13
|
"a11y",
|
|
14
|
+
"e2e",
|
|
15
|
+
"playwright",
|
|
14
16
|
"standalone",
|
|
15
17
|
"signals"
|
|
16
18
|
],
|