Skip to content

Commit c3c748e

Browse files
serpentbladeclaude
andcommitted
fix(chartjs): widen codegen type-prop guard for multi-line docs + regenerate all leaves
The prop-docs backfill (7c6a8eb) expanded Chart.rozie's `type` prop from a single line to a multi-line block with a `docs: { description }`. The chartjs per-type variant codegen removes the `type` prop via a regex that only matched the old single-line shape, so `@rozie-ui/chartjs#build` failed the transform guard ("no `type` prop line") — cascading every framework matrix to red. - Widen `typePropRe` to match the multi-line `type` block (keeps the `type: String` / `default: 'line'` anchors fail-loud; lazily skips the nested 4-space `docs: {` close to the 2-space prop close). - Regenerate all 19 families' leaves: `docs.description` now emits as prop JSDoc (`@example` on primary/model props) across React/Vue/Svelte/Solid/Angular/Lit and into the generated family READMEs. Local CI-equivalent gate green: turbo build (25 families), typecheck (253), core (1689), dist-parity (1001). Additive JSDoc only — no emitter/type changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011JE6gykywo57CcqUJZTsB9
1 parent 7c6a8eb commit c3c748e

291 files changed

Lines changed: 10291 additions & 44 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/ui/captcha/packages/angular/src/Captcha.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,35 @@ import { loadCaptchaApi } from './internal/loadCaptchaApi';
3131
host: { '(focusout)': '__rozieCvaOnTouched()' },
3232
})
3333
export class Captcha {
34+
/**
35+
* Which widget to render: `recaptcha` (Google reCAPTCHA v2), `hcaptcha`, `turnstile` (Cloudflare), or `friendly` (Friendly Captcha). The first three share a near-identical explicit-render API; Friendly Captcha rides an internal `adapt()` bridge onto the same surface. Construction-time — re-key the component to switch it live.
36+
*/
3437
provider = input<string>('recaptcha');
38+
/**
39+
* Required. The public site key from your provider dashboard. Identifies your site to the chosen provider.
40+
*/
3541
sitekey = input.required<string>();
42+
/**
43+
* The verified response token (two-way `r-model`). As the sole `model: true` prop it drives the Angular `ControlValueAccessor`. Written by the widget on success and cleared on expire/reset, so reading it gives you the live response to send to your server for form submission.
44+
* @example
45+
* <Captcha r-model:token="token" provider="recaptcha" sitekey="…" />
46+
*/
3647
token = model<string>('');
48+
/**
49+
* Widget color theme: `light` or `dark` (all three core providers), or `auto` (Turnstile only). Construction-time — re-key the component to change it live.
50+
*/
3751
theme = input<string>('light');
52+
/**
53+
* Widget size. reCAPTCHA/hCaptcha accept `normal`/`compact`/`invisible`; Turnstile accepts `normal`/`compact`/`flexible`. A no-op for Friendly Captcha (its `startMode` analog rides through the `options` escape hatch instead). Construction-time.
54+
*/
3855
size = input<string>('normal');
56+
/**
57+
* Optional tab index forwarded to the rendered widget. Omitted from the render config when left unset (`null`).
58+
*/
3959
tabindex = input<(number) | null>(null);
60+
/**
61+
* Escape hatch — provider-specific render options merged last (e.g. Turnstile `action`/`cData`/`retry`, hCaptcha `hl`, reCAPTCHA `badge`, Friendly Captcha `startMode`). Lets you reach keys this component does not promote to first-class props.
62+
*/
4063
options = input<Record<string, any>>((() => ({}))());
4164
widgetEl = viewChild<ElementRef<HTMLDivElement>>('widgetEl');
4265
verify = output<unknown>();

packages/ui/captcha/packages/angular/src/RecaptchaV3.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,23 @@ import { loadRecaptchaV3, execute as v3Execute } from './internal/loadRecaptchaV
3131
host: { '(focusout)': '__rozieCvaOnTouched()' },
3232
})
3333
export class RecaptchaV3 {
34+
/**
35+
* Required. The public reCAPTCHA v3 site key from your Google admin console.
36+
*/
3437
sitekey = input.required<string>();
38+
/**
39+
* The default action label reported to reCAPTCHA's risk analysis (e.g. `submit`, `login`). Overridable per call via `execute(action)`.
40+
*/
3541
action = input<string>('submit');
42+
/**
43+
* The latest verification token (two-way `r-model`). As the sole `model: true` prop it drives the Angular `ControlValueAccessor`. Written on each successful `execute()` — read it to attach the fresh token to your request.
44+
* @example
45+
* <RecaptchaV3 r-model:token="token" sitekey="…" action="signup" />
46+
*/
3647
token = model<string>('');
48+
/**
49+
* Opt in to running one `execute()` at mount and emitting `@verify` with the initial token. Off by default — v3 is imperative-first and tokens are short-lived (~2 min), so fetch one at the moment of submission rather than eagerly at mount.
50+
*/
3751
executeOnMount = input<boolean>(false);
3852
error = output<unknown>();
3953
verify = output<unknown>();

packages/ui/captcha/packages/lit/src/Captcha.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,36 @@ import { loadCaptchaApi } from './internal/loadCaptchaApi';
1616

1717
@customElement('rozie-captcha')
1818
export default class Captcha extends SignalWatcher(LitElement) {
19+
/**
20+
* Which widget to render: `recaptcha` (Google reCAPTCHA v2), `hcaptcha`, `turnstile` (Cloudflare), or `friendly` (Friendly Captcha). The first three share a near-identical explicit-render API; Friendly Captcha rides an internal `adapt()` bridge onto the same surface. Construction-time — re-key the component to switch it live.
21+
*/
1922
@property({ type: String, reflect: true }) provider: string = 'recaptcha';
23+
/**
24+
* Required. The public site key from your provider dashboard. Identifies your site to the chosen provider.
25+
*/
2026
@property({ type: String, reflect: true }) sitekey!: string;
27+
/**
28+
* The verified response token (two-way `r-model`). As the sole `model: true` prop it drives the Angular `ControlValueAccessor`. Written by the widget on success and cleared on expire/reset, so reading it gives you the live response to send to your server for form submission.
29+
* @example
30+
* <Captcha r-model:token="token" provider="recaptcha" sitekey="…" />
31+
*/
2132
@property({ type: String, attribute: 'token' }) _token_attr: string = '';
2233
private _tokenControllable = createLitControllableProperty<string>({ host: this, eventName: 'token-change', defaultValue: '', initialControlledValue: undefined });
34+
/**
35+
* Widget color theme: `light` or `dark` (all three core providers), or `auto` (Turnstile only). Construction-time — re-key the component to change it live.
36+
*/
2337
@property({ type: String, reflect: true }) theme: string = 'light';
38+
/**
39+
* Widget size. reCAPTCHA/hCaptcha accept `normal`/`compact`/`invisible`; Turnstile accepts `normal`/`compact`/`flexible`. A no-op for Friendly Captcha (its `startMode` analog rides through the `options` escape hatch instead). Construction-time.
40+
*/
2441
@property({ type: String, reflect: true }) size: string = 'normal';
42+
/**
43+
* Optional tab index forwarded to the rendered widget. Omitted from the render config when left unset (`null`).
44+
*/
2545
@property({ type: Number, reflect: true }) tabindex: number = null;
46+
/**
47+
* Escape hatch — provider-specific render options merged last (e.g. Turnstile `action`/`cData`/`retry`, hCaptcha `hl`, reCAPTCHA `badge`, Friendly Captcha `startMode`). Lets you reach keys this component does not promote to first-class props.
48+
*/
2649
@property({ type: Object }) options: any = {};
2750
@query('[data-rozie-ref="widgetEl"]') private _refWidgetEl!: HTMLElement;
2851

packages/ui/captcha/packages/lit/src/RecaptchaV3.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,24 @@ import { loadRecaptchaV3, execute as v3Execute } from './internal/loadRecaptchaV
1616

1717
@customElement('rozie-recaptcha-v3')
1818
export default class RecaptchaV3 extends SignalWatcher(LitElement) {
19+
/**
20+
* Required. The public reCAPTCHA v3 site key from your Google admin console.
21+
*/
1922
@property({ type: String, reflect: true }) sitekey!: string;
23+
/**
24+
* The default action label reported to reCAPTCHA's risk analysis (e.g. `submit`, `login`). Overridable per call via `execute(action)`.
25+
*/
2026
@property({ type: String, reflect: true }) action: string = 'submit';
27+
/**
28+
* The latest verification token (two-way `r-model`). As the sole `model: true` prop it drives the Angular `ControlValueAccessor`. Written on each successful `execute()` — read it to attach the fresh token to your request.
29+
* @example
30+
* <RecaptchaV3 r-model:token="token" sitekey="…" action="signup" />
31+
*/
2132
@property({ type: String, attribute: 'token' }) _token_attr: string = '';
2233
private _tokenControllable = createLitControllableProperty<string>({ host: this, eventName: 'token-change', defaultValue: '', initialControlledValue: undefined });
34+
/**
35+
* Opt in to running one `execute()` at mount and emitting `@verify` with the initial token. Off by default — v3 is imperative-first and tokens are short-lived (~2 min), so fetch one at the moment of submission rather than eagerly at mount.
36+
*/
2337
@property({ type: Boolean, reflect: true }) executeOnMount: boolean = false;
2438

2539
private _disconnectCleanups: Array<() => void> = [];

packages/ui/captcha/packages/react/src/Captcha.d.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,37 @@ import type { ForwardRefExoticComponent, RefAttributes } from 'react';
33
import type * as React from 'react';
44

55
export interface CaptchaProps {
6+
/**
7+
* Which widget to render: `recaptcha` (Google reCAPTCHA v2), `hcaptcha`, `turnstile` (Cloudflare), or `friendly` (Friendly Captcha). The first three share a near-identical explicit-render API; Friendly Captcha rides an internal `adapt()` bridge onto the same surface. Construction-time — re-key the component to switch it live.
8+
*/
69
provider?: string;
10+
/**
11+
* Required. The public site key from your provider dashboard. Identifies your site to the chosen provider.
12+
*/
713
sitekey: string;
14+
/**
15+
* The verified response token (two-way `r-model`). As the sole `model: true` prop it drives the Angular `ControlValueAccessor`. Written by the widget on success and cleared on expire/reset, so reading it gives you the live response to send to your server for form submission.
16+
* @example
17+
* <Captcha r-model:token="token" provider="recaptcha" sitekey="…" />
18+
*/
819
token?: string;
920
defaultToken?: string;
1021
onTokenChange?: (next: string) => void;
22+
/**
23+
* Widget color theme: `light` or `dark` (all three core providers), or `auto` (Turnstile only). Construction-time — re-key the component to change it live.
24+
*/
1125
theme?: string;
26+
/**
27+
* Widget size. reCAPTCHA/hCaptcha accept `normal`/`compact`/`invisible`; Turnstile accepts `normal`/`compact`/`flexible`. A no-op for Friendly Captcha (its `startMode` analog rides through the `options` escape hatch instead). Construction-time.
28+
*/
1229
size?: string;
30+
/**
31+
* Optional tab index forwarded to the rendered widget. Omitted from the render config when left unset (`null`).
32+
*/
1333
tabindex?: (number) | null;
34+
/**
35+
* Escape hatch — provider-specific render options merged last (e.g. Turnstile `action`/`cData`/`retry`, hCaptcha `hl`, reCAPTCHA `badge`, Friendly Captcha `startMode`). Lets you reach keys this component does not promote to first-class props.
36+
*/
1437
options?: Record<string, unknown>;
1538
onVerify?: (...args: unknown[]) => void;
1639
onExpire?: (...args: unknown[]) => void;

packages/ui/captcha/packages/react/src/Captcha.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,37 @@ import { loadCaptchaApi } from './internal/loadCaptchaApi';
1313
// teardown (TS2304). Top-level — like api/widgetId — is visible to both.
1414

1515
interface CaptchaProps {
16+
/**
17+
* Which widget to render: `recaptcha` (Google reCAPTCHA v2), `hcaptcha`, `turnstile` (Cloudflare), or `friendly` (Friendly Captcha). The first three share a near-identical explicit-render API; Friendly Captcha rides an internal `adapt()` bridge onto the same surface. Construction-time — re-key the component to switch it live.
18+
*/
1619
provider?: string;
20+
/**
21+
* Required. The public site key from your provider dashboard. Identifies your site to the chosen provider.
22+
*/
1723
sitekey: string;
24+
/**
25+
* The verified response token (two-way `r-model`). As the sole `model: true` prop it drives the Angular `ControlValueAccessor`. Written by the widget on success and cleared on expire/reset, so reading it gives you the live response to send to your server for form submission.
26+
* @example
27+
* <Captcha r-model:token="token" provider="recaptcha" sitekey="…" />
28+
*/
1829
token?: string;
1930
defaultToken?: string;
2031
onTokenChange?: (token: string) => void;
32+
/**
33+
* Widget color theme: `light` or `dark` (all three core providers), or `auto` (Turnstile only). Construction-time — re-key the component to change it live.
34+
*/
2135
theme?: string;
36+
/**
37+
* Widget size. reCAPTCHA/hCaptcha accept `normal`/`compact`/`invisible`; Turnstile accepts `normal`/`compact`/`flexible`. A no-op for Friendly Captcha (its `startMode` analog rides through the `options` escape hatch instead). Construction-time.
38+
*/
2239
size?: string;
40+
/**
41+
* Optional tab index forwarded to the rendered widget. Omitted from the render config when left unset (`null`).
42+
*/
2343
tabindex?: (number) | null;
44+
/**
45+
* Escape hatch — provider-specific render options merged last (e.g. Turnstile `action`/`cData`/`retry`, hCaptcha `hl`, reCAPTCHA `badge`, Friendly Captcha `startMode`). Lets you reach keys this component does not promote to first-class props.
46+
*/
2447
options?: Record<string, any>;
2548
onVerify?: (...args: any[]) => void;
2649
onExpire?: (...args: any[]) => void;

packages/ui/captcha/packages/react/src/RecaptchaV3.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,25 @@ import type { ForwardRefExoticComponent, RefAttributes } from 'react';
33
import type * as React from 'react';
44

55
export interface RecaptchaV3Props {
6+
/**
7+
* Required. The public reCAPTCHA v3 site key from your Google admin console.
8+
*/
69
sitekey: string;
10+
/**
11+
* The default action label reported to reCAPTCHA's risk analysis (e.g. `submit`, `login`). Overridable per call via `execute(action)`.
12+
*/
713
action?: string;
14+
/**
15+
* The latest verification token (two-way `r-model`). As the sole `model: true` prop it drives the Angular `ControlValueAccessor`. Written on each successful `execute()` — read it to attach the fresh token to your request.
16+
* @example
17+
* <RecaptchaV3 r-model:token="token" sitekey="…" action="signup" />
18+
*/
819
token?: string;
920
defaultToken?: string;
1021
onTokenChange?: (next: string) => void;
22+
/**
23+
* Opt in to running one `execute()` at mount and emitting `@verify` with the initial token. Off by default — v3 is imperative-first and tokens are short-lived (~2 min), so fetch one at the moment of submission rather than eagerly at mount.
24+
*/
1125
executeOnMount?: boolean;
1226
onError?: (...args: unknown[]) => void;
1327
onVerify?: (...args: unknown[]) => void;

packages/ui/captcha/packages/react/src/RecaptchaV3.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,25 @@ import { loadRecaptchaV3, execute as v3Execute } from './internal/loadRecaptchaV
1313
// guards a late execute() resolve that fires after the component unmounts.
1414

1515
interface RecaptchaV3Props {
16+
/**
17+
* Required. The public reCAPTCHA v3 site key from your Google admin console.
18+
*/
1619
sitekey: string;
20+
/**
21+
* The default action label reported to reCAPTCHA's risk analysis (e.g. `submit`, `login`). Overridable per call via `execute(action)`.
22+
*/
1723
action?: string;
24+
/**
25+
* The latest verification token (two-way `r-model`). As the sole `model: true` prop it drives the Angular `ControlValueAccessor`. Written on each successful `execute()` — read it to attach the fresh token to your request.
26+
* @example
27+
* <RecaptchaV3 r-model:token="token" sitekey="…" action="signup" />
28+
*/
1829
token?: string;
1930
defaultToken?: string;
2031
onTokenChange?: (token: string) => void;
32+
/**
33+
* Opt in to running one `execute()` at mount and emitting `@verify` with the initial token. Off by default — v3 is imperative-first and tokens are short-lived (~2 min), so fetch one at the moment of submission rather than eagerly at mount.
34+
*/
2135
executeOnMount?: boolean;
2236
onError?: (...args: any[]) => void;
2337
onVerify?: (...args: any[]) => void;

packages/ui/captcha/packages/solid/src/Captcha.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,37 @@ import { loadCaptchaApi } from './internal/loadCaptchaApi';
1414
// teardown (TS2304). Top-level — like api/widgetId — is visible to both.
1515

1616
interface CaptchaProps {
17+
/**
18+
* Which widget to render: `recaptcha` (Google reCAPTCHA v2), `hcaptcha`, `turnstile` (Cloudflare), or `friendly` (Friendly Captcha). The first three share a near-identical explicit-render API; Friendly Captcha rides an internal `adapt()` bridge onto the same surface. Construction-time — re-key the component to switch it live.
19+
*/
1720
provider?: string;
21+
/**
22+
* Required. The public site key from your provider dashboard. Identifies your site to the chosen provider.
23+
*/
1824
sitekey: string;
25+
/**
26+
* The verified response token (two-way `r-model`). As the sole `model: true` prop it drives the Angular `ControlValueAccessor`. Written by the widget on success and cleared on expire/reset, so reading it gives you the live response to send to your server for form submission.
27+
* @example
28+
* <Captcha r-model:token="token" provider="recaptcha" sitekey="…" />
29+
*/
1930
token?: string;
2031
defaultToken?: string;
2132
onTokenChange?: (token: string) => void;
33+
/**
34+
* Widget color theme: `light` or `dark` (all three core providers), or `auto` (Turnstile only). Construction-time — re-key the component to change it live.
35+
*/
2236
theme?: string;
37+
/**
38+
* Widget size. reCAPTCHA/hCaptcha accept `normal`/`compact`/`invisible`; Turnstile accepts `normal`/`compact`/`flexible`. A no-op for Friendly Captcha (its `startMode` analog rides through the `options` escape hatch instead). Construction-time.
39+
*/
2340
size?: string;
41+
/**
42+
* Optional tab index forwarded to the rendered widget. Omitted from the render config when left unset (`null`).
43+
*/
2444
tabindex?: (number) | null;
45+
/**
46+
* Escape hatch — provider-specific render options merged last (e.g. Turnstile `action`/`cData`/`retry`, hCaptcha `hl`, reCAPTCHA `badge`, Friendly Captcha `startMode`). Lets you reach keys this component does not promote to first-class props.
47+
*/
2548
options?: Record<string, any>;
2649
onVerify?: (...args: unknown[]) => void;
2750
onExpire?: (...args: unknown[]) => void;

packages/ui/captcha/packages/solid/src/RecaptchaV3.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,25 @@ import { loadRecaptchaV3, execute as v3Execute } from './internal/loadRecaptchaV
1414
// guards a late execute() resolve that fires after the component unmounts.
1515

1616
interface RecaptchaV3Props {
17+
/**
18+
* Required. The public reCAPTCHA v3 site key from your Google admin console.
19+
*/
1720
sitekey: string;
21+
/**
22+
* The default action label reported to reCAPTCHA's risk analysis (e.g. `submit`, `login`). Overridable per call via `execute(action)`.
23+
*/
1824
action?: string;
25+
/**
26+
* The latest verification token (two-way `r-model`). As the sole `model: true` prop it drives the Angular `ControlValueAccessor`. Written on each successful `execute()` — read it to attach the fresh token to your request.
27+
* @example
28+
* <RecaptchaV3 r-model:token="token" sitekey="…" action="signup" />
29+
*/
1930
token?: string;
2031
defaultToken?: string;
2132
onTokenChange?: (token: string) => void;
33+
/**
34+
* Opt in to running one `execute()` at mount and emitting `@verify` with the initial token. Off by default — v3 is imperative-first and tokens are short-lived (~2 min), so fetch one at the moment of submission rather than eagerly at mount.
35+
*/
2236
executeOnMount?: boolean;
2337
onError?: (...args: unknown[]) => void;
2438
onVerify?: (...args: unknown[]) => void;

0 commit comments

Comments
 (0)