@prenta/sections-react 0.18.14 → 0.20.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/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # @actuate-media/sections-react
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0cc9713: reCAPTCHA v3 keys can be entered in Forms → Form Settings → Spam protection. Public forms use them, and so can the admin login once it's switched on.
8
+
9
+ **@prenta/core**
10
+ - `GET` / `PUT /forms/captcha-settings` (owners and admins save; the secret is encrypted with `CMS_ENCRYPTION_KEY` and never returned). `RECAPTCHA_*` / `TURNSTILE_*` env vars still win.
11
+ - `POST /forms/captcha-settings/login` turns admin-login protection on with the saved keys, but only after verifying a fresh `login` token from the admin's browser, so keys that don't work on the domain are refused. Changing or removing the keys turns it off. With admin-entered keys the login is let through when Google can't be reached (audited as `captcha.provider_error`); env keys keep failing closed. `CAPTCHA_LOGIN=off` disables it. reCAPTCHA logins now require the `login` action (`LOGIN_CAPTCHA_ACTION`).
12
+ - `GET /captcha/config` returns what the admin login checks (env keys, or admin-entered keys once login protection is on), so existing login pages never pick up form-only keys. `?for=forms` returns the captcha public forms use; Settings → Security shows that.
13
+ - Saved keys whose secret no longer decrypts (missing or rotated `CMS_ENCRYPTION_KEY`) keep CAPTCHA on and fail as a provider outage, so `CAPTCHA_ON_PROVIDER_ERROR` decides (forms reject by default) instead of CAPTCHA silently turning off. A failed settings read errors rather than reading as "no keys". `CaptchaConfig` gains `unavailable`.
14
+ - Security: the generic `/globals/:slug` and `/collections/:slug…` routes now return 404 for internal `__`-prefixed settings rows (`__email_config__`, `__ai_config__`, `__seo_config__`, `__form_captcha__`). Previously any signed-in user could read them (encrypted secrets included) and editors could create them. `GET /collections/:slug/:id/workflow` now checks collection scope and matches the collection.
15
+ - The admin report-only CSP keeps `'self'` in `frame-src` for preview iframes.
16
+ - The Form Settings CAPTCHA scope now applies: on all forms, per form (forms whose spam strategies include `captcha`), or off. The public form schema only includes `captcha` when that form requires it.
17
+ - reCAPTCHA verification rejects tokens for another action (forms use `form_submit`, exported as `FORM_CAPTCHA_ACTION` from `@prenta/core/forms/client`), responses with no score (v2 keys), and scores below a threshold now clamped to 0–1.
18
+ - The admin's report-only CSP allows Google reCAPTCHA and Cloudflare Turnstile.
19
+
20
+ **@prenta/admin**
21
+ - Spam protection has reCAPTCHA site key, secret key and score threshold fields, plus a "Protect the admin login" switch, and the CAPTCHA row names the active provider.
22
+ - The login page loads the CAPTCHA script when its config arrives after the first render. It no longer refuses to sign in when it can't get a token (script blocked, key not registered for the domain, or no answer within 8 seconds); it sends the login and the server decides.
23
+
24
+ **@prenta/sections-react**
25
+ - `PrentaForm` loads reCAPTCHA v3 and fetches a fresh token on each submit, so reCAPTCHA forms no longer need a `captchaToken` prop. Turnstile still does. A script that stalls is dropped after 15 seconds and loaded again on the next submit.
26
+
27
+ **create-prenta**
28
+ - Scaffolded login pages read `/captcha/config?for=login`, naming the login config explicitly.
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [0cc9713]
33
+ - @prenta/core@8.16.0
34
+
35
+ ## 0.19.0
36
+
37
+ ### Minor Changes
38
+
39
+ - 9e0cb2c: Form submissions now follow the site attribution settings: public forms publish the windows, capture waits for consent when required, and a turned-off recorder stores no visit data.
40
+ - 9e0cb2c: Forms list rows and the editor's Build mode now follow the forms kit.
41
+ - **@prenta/core**: `GET /forms` adds `entries14d` (clean entries per day for the last 14 days, in the site timezone), `pageCount` (pages whose visible form sections embed the form) and `failedEmails7d` per form. `ConditionalLogic` gains `hide` rules and `match: 'any'`, enforced by the same visibility check on the server and client. `FormField` gains `autoKey`, `hideLabel`, `cssClass`, `nameFormat`, `nextLabel` and `backLabel`; schema validation rejects an unknown logic match or unsafe CSS class, and the public schema passes `hideLabel` and a sanitized `cssClass` through.
42
+ - **@prenta/admin**: the forms list is rebuilt as the kit's row list (initials tile, slug and page count, field badges, entries with a 14-day sparkline and "new" pill, notification switch with delivery status, status pill), with Needs attention / Most entries / Name sorting, status counts, the failed-email chip, and Schema and Duplicate in a row menu. The Build panel has the full General / Advanced / Logic field options, Duplicate and Delete, selectable layout fields, and `@dnd-kit` drag from the palette and between fields with keyboard reordering and screen-reader announcements. `UnderlineTabs` gains `fill` and per-tab `disabled`, `Segmented` gains `fill`, `StatusBadge` a `pill` shape and `Toggle` an `lg` size. Faint text on forms screens used a surface colour and was nearly invisible; it now uses `--muted`.
43
+ - **@prenta/sections-react**: `<PrentaForm>` honours `hideLabel` (label kept for screen readers) and `cssClass` on each field.
44
+
45
+ - 9e0cb2c: Public forms now behave the way the editor builds them.
46
+ - **@prenta/sections-react**: `<PrentaForm>` runs multi-step forms: one step at a time with the numbered list, progress bar or no indicator, Next and Back using each page break's button text, per-step required checks, answers kept on Back, focus moved to the new step's heading and the step announced. Conditional logic shows and hides fields as people answer, using cms-core's own rules; hidden fields aren't required and their answers aren't sent. Headings, content blocks and dividers render as content instead of text inputs, hidden fields post their value (with `{page_url}` and URL-parameter tokens filled in) without showing, consent renders as a checkbox, "Checkboxes" with choices post a list, half-width fields sit side by side, the submit button uses the form's text, and a validation message clears once the visitor edits.
47
+ - **@prenta/core**: forms gain `submitLabel`, `firstStep` and `progress` (validated on update and exposed on the public schema, with page-break `nextLabel` / `backLabel`). A checkbox field with choices validates and stores the picked values as a list on the server and client. `renderPublicFormHtml` renders layout fields as content, hidden fields as hidden inputs with tokens resolved from the page URL, consent and checkbox lists as checkboxes, each step as a labelled fieldset, and leaves the HTML `required` attribute off fields logic can hide.
48
+ - **@prenta/admin**: the form's General settings add Submit button text and a Steps card with First step title and Progress indicator; the Build canvas previews the submit text and first step title.
49
+
50
+ ### Patch Changes
51
+
52
+ - 9e0cb2c: Security fixes from the October 2026 audit.
53
+
54
+ **@prenta/core**
55
+ - Authors can no longer edit, delete, restore or purge documents someone else created. The ownership check ran before the document was loaded, so it never had an owner to compare.
56
+ - Scheduling or cancelling a publish or unpublish now needs a publishing role. Before, any signed-in user could do it on collections without review.
57
+ - Owners can publish. The publish allow-list left out the OWNER role.
58
+ - New `isSafeRedirectUrl` in `@prenta/core/forms/client`. A form's redirect URL must be `https://`, `http://` or a same-site path. A `javascript:` URL was stored and followed after submit. Forms saved earlier are checked again on submit.
59
+ - Only owners and admins can change form webhooks and notification recipients, or create a form with recipients. Forms can no longer be written through the generic `/collections/forms` routes.
60
+ - `PATCH /forms/entries/:id` applies the PHI gate and refuses an empty patch. Star and archive webhooks leave out entry data when PHI safeguards are on. Bulk entry updates are capped at 500.
61
+ - Public form submissions are capped at 1 MB (50 MB for uploads) before the body is parsed.
62
+ - `PRENTA_DISABLE_RATE_LIMIT` is ignored on Vercel deployments and on production servers outside CI.
63
+ - Dashboard stats routes need a session even when `CMS_SECRET` is missing (they answer 503).
64
+
65
+ **@prenta/sections-react**
66
+ - `PrentaForm` only follows an `http(s)` or same-site redirect after submit.
67
+
68
+ - Updated dependencies [9e0cb2c]
69
+ - Updated dependencies [9e0cb2c]
70
+ - Updated dependencies [9e0cb2c]
71
+ - Updated dependencies [9e0cb2c]
72
+ - Updated dependencies [9e0cb2c]
73
+ - Updated dependencies [9e0cb2c]
74
+ - Updated dependencies [9e0cb2c]
75
+ - Updated dependencies [9e0cb2c]
76
+ - @prenta/core@8.15.0
77
+
3
78
  ## 0.18.14
4
79
 
5
80
  ### Patch Changes
@@ -11,7 +11,10 @@ export interface PrentaFormProps {
11
11
  * the Prenta API at `/api/cms`.
12
12
  */
13
13
  baseUrl?: string;
14
- /** Optional captcha token, when the form requires one (consumer-supplied). */
14
+ /**
15
+ * A captcha token from your own widget. Needed for Turnstile; reCAPTCHA v3
16
+ * is handled automatically, and this overrides it when set.
17
+ */
15
18
  captchaToken?: string;
16
19
  /** Extra class names for the form wrapper. */
17
20
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"PrentaForm.d.ts","sourceRoot":"","sources":["../src/PrentaForm.tsx"],"names":[],"mappings":"AAoBA,OAA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E,WAAW,EACjB,OAAY,EACZ,YAAY,EACZ,SAAS,EACT,WAAW,GACZ,EAAE,eAAe,GAAG,SAAS,CAiV7B"}
@@ -8,8 +8,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  * to the schema's `submitPath`. Spam protections are wired automatically:
9
9
  * - a hidden honeypot field (key from `spam.honeypotFieldKey`),
10
10
  * - an `elapsedMs` timer (cheap "too fast" bot signal),
11
- * - an optional captcha token (pass via `captchaToken` — the consumer owns
12
- * the provider widget; nothing is auto-loaded).
11
+ * - reCAPTCHA v3, when the schema asks for it: the script loads with the
12
+ * form and a fresh token is fetched on each submit. For Turnstile, the
13
+ * consumer owns the widget and passes `captchaToken`.
13
14
  *
14
15
  * It is a Client Component (it fetches + holds form state). Render it directly,
15
16
  * or let the `form` section type render it for you via `@prenta/sections-react`.
@@ -20,18 +21,25 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
21
  import { useEffect, useMemo, useRef, useState } from 'react';
21
22
  import { trackFormError, trackFormStart, trackFormSubmit } from '@prenta/core/forms/analytics';
22
23
  import { getAttributionForSubmission } from '@prenta/core/forms/attribution';
24
+ import { FORM_CAPTCHA_ACTION } from '@prenta/core/forms/client';
23
25
  import { captureAttributionIfAllowed } from './attribution.js';
24
- import { buildSubmitBody, coercePublicForm, fieldControl, firstMissingRequired, htmlInputType, initialValues, resolveSubmitOutcome, } from './forms.js';
26
+ import { getRecaptchaV3Token, loadRecaptchaV3 } from './recaptcha.js';
27
+ import { buildSubmitBody, coercePublicForm, fieldControl, firstMissingRequired, htmlInputType, initialValues, isChoiceList, isPublicFieldVisible, resolveSubmitOutcome, splitSteps, submittableValues, } from './forms.js';
25
28
  import { webMcpFieldAttribute, webMcpFormAttributes } from './webmcp.js';
29
+ const currentPageUrl = () => typeof window !== 'undefined' ? window.location.href : null;
26
30
  const FIELD_BASE = 'w-full rounded-lg border border-zinc-300 bg-[var(--section-bg)] px-3 py-2 text-sm text-[var(--section-fg)] shadow-sm placeholder:text-[var(--section-muted)] focus:border-[var(--section-accent)] focus:ring-2 focus:ring-[color-mix(in_srgb,var(--section-accent)_40%,transparent)] focus:outline-none disabled:cursor-not-allowed disabled:opacity-60';
27
31
  export function PrentaForm({ slug, form: initialForm, baseUrl = '', captchaToken, className, onSubmitted, }) {
28
32
  const [form, setForm] = useState(initialForm ?? null);
29
33
  const [status, setStatus] = useState(initialForm ? 'ready' : 'loading');
30
34
  const [message, setMessage] = useState('');
31
- const [values, setValues] = useState(() => initialForm ? initialValues(initialForm) : {});
35
+ const [values, setValues] = useState(() => initialForm ? initialValues(initialForm, currentPageUrl()) : {});
36
+ const [step, setStep] = useState(0);
37
+ const [stepAnnouncement, setStepAnnouncement] = useState('');
32
38
  const honeypotRef = useRef('');
33
39
  const startedAtRef = useRef(null);
34
40
  const successRef = useRef(null);
41
+ const stepHeadingRef = useRef(null);
42
+ const movedStepRef = useRef(false);
35
43
  // GA4 "form_start" must fire once per render of the form, on first interaction.
36
44
  const startTrackedRef = useRef(false);
37
45
  // Set once the (consent-gated) attribution capture ran, so submit can attach
@@ -60,7 +68,8 @@ export function PrentaForm({ slug, form: initialForm, baseUrl = '', captchaToken
60
68
  if (!parsed)
61
69
  throw new Error('Form schema was malformed');
62
70
  setForm(parsed);
63
- setValues(initialValues(parsed));
71
+ setValues(initialValues(parsed, currentPageUrl()));
72
+ setStep(0);
64
73
  setStatus('ready');
65
74
  })
66
75
  .catch((err) => {
@@ -82,15 +91,17 @@ export function PrentaForm({ slug, form: initialForm, baseUrl = '', captchaToken
82
91
  // Record this page view as a marketing attribution touch (UTMs, ad click
83
92
  // IDs, referrer). Consent-gated when plugin-consent is installed.
84
93
  useEffect(() => {
94
+ if (!form)
95
+ return;
85
96
  let cancelled = false;
86
- void captureAttributionIfAllowed().then((allowed) => {
97
+ void captureAttributionIfAllowed(form.attribution).then((allowed) => {
87
98
  if (!cancelled && allowed)
88
99
  attributionAllowedRef.current = true;
89
100
  });
90
101
  return () => {
91
102
  cancelled = true;
92
103
  };
93
- }, []);
104
+ }, [form]);
94
105
  useEffect(() => {
95
106
  if (status !== 'success')
96
107
  return;
@@ -100,17 +111,55 @@ export function PrentaForm({ slug, form: initialForm, baseUrl = '', captchaToken
100
111
  el.focus();
101
112
  el.scrollIntoView({ block: 'nearest' });
102
113
  }, [status, message]);
114
+ const steps = useMemo(() => (form ? splitSteps(form) : []), [form]);
115
+ const multiStep = steps.length > 1;
116
+ const lastStep = steps.length - 1;
117
+ const currentStep = steps[Math.min(step, lastStep)];
118
+ // After Next or Back, move focus to the new step's heading so keyboard and
119
+ // screen-reader users land at the top of what changed.
120
+ useEffect(() => {
121
+ if (!movedStepRef.current)
122
+ return;
123
+ movedStepRef.current = false;
124
+ stepHeadingRef.current?.focus();
125
+ }, [step]);
126
+ function goToStep(next) {
127
+ const target = steps[next];
128
+ if (!target)
129
+ return;
130
+ movedStepRef.current = true;
131
+ setStep(next);
132
+ setMessage('');
133
+ setStatus('ready');
134
+ setStepAnnouncement(`Step ${next + 1} of ${steps.length}: ${target.title}`);
135
+ }
103
136
  const setValue = (key, value) => {
104
137
  if (!startTrackedRef.current && form?.analytics?.enabled) {
105
138
  startTrackedRef.current = true;
106
139
  trackFormStart(form.name, form.id, form.analytics);
107
140
  }
108
141
  setValues((prev) => ({ ...prev, [key]: value }));
142
+ // A validation message describes the answers as they were; editing clears it.
143
+ if (status === 'error') {
144
+ setStatus('ready');
145
+ setMessage('');
146
+ }
109
147
  };
110
148
  async function handleSubmit(e) {
111
149
  e.preventDefault();
112
150
  if (!form || status === 'submitting')
113
151
  return;
152
+ // On an earlier step, submitting (Enter or Next) checks this step only.
153
+ if (multiStep && step < lastStep) {
154
+ const missingHere = firstMissingRequired({ fields: currentStep?.fields ?? [] }, values);
155
+ if (missingHere) {
156
+ setMessage(`Please complete the “${missingHere}” field.`);
157
+ setStatus('error');
158
+ return;
159
+ }
160
+ goToStep(step + 1);
161
+ return;
162
+ }
114
163
  const missing = firstMissingRequired(form, values);
115
164
  if (missing) {
116
165
  setMessage(`Please complete the “${missing}” field.`);
@@ -119,18 +168,29 @@ export function PrentaForm({ slug, form: initialForm, baseUrl = '', captchaToken
119
168
  }
120
169
  setStatus('submitting');
121
170
  setMessage('');
171
+ let token = captchaToken ?? null;
172
+ if (!token && form.captcha?.provider === 'recaptcha') {
173
+ try {
174
+ token = await getRecaptchaV3Token(form.captcha.siteKey, FORM_CAPTCHA_ACTION);
175
+ }
176
+ catch {
177
+ setMessage('We couldn’t run the spam check. Please try again.');
178
+ setStatus('error');
179
+ return;
180
+ }
181
+ }
122
182
  const startedAt = startedAtRef.current;
123
183
  const body = buildSubmitBody({
124
- values,
184
+ values: submittableValues(form, values),
125
185
  honeypotKey: form.spam.honeypotFieldKey,
126
186
  honeypotValue: honeypotRef.current,
127
187
  elapsedMs: startedAt !== null ? Date.now() - startedAt : null,
128
188
  pageUrl: typeof window !== 'undefined' ? window.location.href : null,
129
- captchaToken: captchaToken ?? null,
189
+ captchaToken: token,
130
190
  // AttributionData is a closed interface; the wire format is a plain
131
191
  // JSON object, so widen it for the body builder.
132
192
  attribution: attributionAllowedRef.current
133
- ? getAttributionForSubmission()
193
+ ? getAttributionForSubmission(form.attribution)
134
194
  : null,
135
195
  });
136
196
  try {
@@ -168,10 +228,18 @@ export function PrentaForm({ slug, form: initialForm, baseUrl = '', captchaToken
168
228
  const captchaNote = useMemo(() => {
169
229
  if (!form?.captcha || form.captcha.provider === 'none')
170
230
  return null;
171
- if (captchaToken)
231
+ // reCAPTCHA v3 fetches its own token on submit.
232
+ if (captchaToken || form.captcha.provider === 'recaptcha')
172
233
  return null;
173
234
  return `This form is protected by ${form.captcha.provider}. Pass a captcha token to submit.`;
174
235
  }, [form?.captcha, captchaToken]);
236
+ const recaptchaSiteKey = form?.captcha?.provider === 'recaptcha' && !captchaToken ? form.captcha.siteKey : null;
237
+ useEffect(() => {
238
+ // Load early so the score has the visit to work with; a failure here
239
+ // surfaces on submit instead.
240
+ if (recaptchaSiteKey)
241
+ loadRecaptchaV3(recaptchaSiteKey).catch(() => { });
242
+ }, [recaptchaSiteKey]);
175
243
  if (status === 'loading') {
176
244
  return (_jsx("div", { className: className, "aria-busy": "true", children: _jsx("p", { className: "text-sm text-zinc-500", children: "Loading form\u2026" }) }));
177
245
  }
@@ -182,22 +250,67 @@ export function PrentaForm({ slug, form: initialForm, baseUrl = '', captchaToken
182
250
  return (_jsx("div", { ref: successRef, tabIndex: -1, className: className, role: "status", "aria-live": "polite", children: _jsx("p", { className: "rounded-lg border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-800", children: message }) }));
183
251
  }
184
252
  const busy = status === 'submitting';
185
- return (_jsxs("form", { className: `flex flex-col gap-5 ${className ?? ''}`.trim(), onSubmit: handleSubmit, noValidate: true, ...webMcpFormAttributes(form), children: [form.fields.map((field) => (_jsx(Field, { field: field, value: values[field.key], disabled: busy, form: form, onChange: (v) => setValue(field.key, v) }, field.id || field.key))), honeypotKey && (_jsxs("div", { "aria-hidden": "true", className: "pointer-events-none absolute -left-[9999px] h-0 w-0 overflow-hidden", children: [_jsx("label", { htmlFor: `prenta-hp-${honeypotKey}`, children: "Leave this field empty" }), _jsx("input", { id: `prenta-hp-${honeypotKey}`, type: "text", tabIndex: -1, autoComplete: "off", name: honeypotKey, defaultValue: "", onChange: (e) => {
253
+ return (_jsxs("form", { className: `flex flex-col gap-5 ${className ?? ''}`.trim(), onSubmit: handleSubmit, noValidate: true, ...webMcpFormAttributes(form), children: [multiStep && currentStep ? (_jsx(StepProgress, { steps: steps, current: step, style: form.progress ?? 'steps', headingRef: stepHeadingRef })) : null, _jsx("div", { className: "grid grid-cols-1 gap-5 sm:grid-cols-2", children: (currentStep?.fields ?? form.fields)
254
+ .filter((field) => field.type !== 'hidden' && isPublicFieldVisible(field, values))
255
+ .map((field) => (_jsx("div", { className: field.width === 'half' ? 'min-w-0' : 'min-w-0 sm:col-span-2', children: _jsx(Field, { field: field, value: values[field.key], disabled: busy, form: form, onChange: (v) => setValue(field.key, v) }) }, field.id || field.key))) }), honeypotKey && (_jsxs("div", { "aria-hidden": "true", className: "pointer-events-none absolute -left-[9999px] h-0 w-0 overflow-hidden", children: [_jsx("label", { htmlFor: `prenta-hp-${honeypotKey}`, children: "Leave this field empty" }), _jsx("input", { id: `prenta-hp-${honeypotKey}`, type: "text", tabIndex: -1, autoComplete: "off", name: honeypotKey, defaultValue: "", onChange: (e) => {
186
256
  honeypotRef.current = e.target.value;
187
- } })] })), captchaNote && _jsx("p", { className: "text-xs text-zinc-500", children: captchaNote }), status === 'error' && message && (_jsx("p", { role: "alert", className: "text-sm text-red-600", children: message })), _jsx("div", { children: _jsx("button", { type: "submit", disabled: busy || !!captchaNote, className: "inline-flex items-center justify-center rounded-lg bg-[var(--section-accent)] px-5 py-2.5 text-sm font-medium text-[var(--section-accent-foreground)] transition-colors hover:bg-[var(--section-accent-hover)] disabled:cursor-not-allowed disabled:opacity-60", children: busy ? 'Sending…' : 'Submit' }) }), _jsx("span", { className: "sr-only", "aria-live": "polite", children: busy ? 'Submitting your response' : '' })] }));
257
+ } })] })), captchaNote && _jsx("p", { className: "text-xs text-zinc-500", children: captchaNote }), status === 'error' && message && (_jsx("p", { role: "alert", className: "text-sm text-red-600", children: message })), _jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [multiStep && step > 0 ? (_jsx("button", { type: "button", onClick: () => goToStep(step - 1), disabled: busy, className: "inline-flex items-center justify-center rounded-lg border border-zinc-300 px-5 py-2.5 text-sm font-medium text-[var(--section-fg)] transition-colors hover:bg-zinc-50 disabled:cursor-not-allowed disabled:opacity-60", children: currentStep?.start?.backLabel || 'Back' })) : null, _jsx("button", { type: "submit", disabled: busy || (step >= lastStep && !!captchaNote), className: "inline-flex items-center justify-center rounded-lg bg-[var(--section-accent)] px-5 py-2.5 text-sm font-medium text-[var(--section-accent-foreground)] transition-colors hover:bg-[var(--section-accent-hover)] disabled:cursor-not-allowed disabled:opacity-60", children: busy
258
+ ? 'Sending…'
259
+ : multiStep && step < lastStep
260
+ ? steps[step + 1]?.start?.nextLabel || 'Next'
261
+ : form.submitLabel || 'Submit' })] }), _jsx("span", { className: "sr-only", "aria-live": "polite", children: busy ? 'Submitting your response' : stepAnnouncement })] }));
262
+ }
263
+ /**
264
+ * Progress for multi-step forms (kit `steps` / `bar` / `none`). The step
265
+ * title is always an `<h3>` so focus can move to it after Next or Back;
266
+ * with the numbered list it is visually hidden, since the list shows it.
267
+ */
268
+ function StepProgress({ steps, current, style, headingRef, }) {
269
+ const title = steps[current]?.title ?? '';
270
+ return (_jsxs("div", { className: "flex flex-col gap-3", children: [style === 'steps' ? (_jsx("ol", { className: "flex list-none gap-2 p-0", "aria-label": "Steps", children: steps.map((s, index) => {
271
+ const on = index === current;
272
+ const done = index < current;
273
+ return (_jsxs("li", { "aria-current": on ? 'step' : undefined, className: `flex min-w-0 flex-1 items-center gap-2 border-t-[3px] pt-2 text-xs ${on || done
274
+ ? 'border-[var(--section-accent)] text-[var(--section-fg)]'
275
+ : 'border-zinc-200 text-[var(--section-muted)]'}`, children: [_jsx("b", { className: `flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-[11px] ${on || done
276
+ ? 'bg-[var(--section-accent)] text-[var(--section-accent-foreground)]'
277
+ : 'border border-zinc-300'}`, children: index + 1 }), _jsx("span", { className: `truncate ${on ? '' : 'max-sm:hidden'}`, children: s.title })] }, index));
278
+ }) })) : style === 'bar' ? (_jsxs("div", { className: "text-xs text-[var(--section-muted)]", children: [_jsx("div", { className: "mb-1.5 flex justify-between", children: _jsxs("span", { children: ["Step ", current + 1, " of ", steps.length] }) }), _jsx("div", { className: "h-1.5 rounded-full bg-zinc-100", "aria-hidden": "true", children: _jsx("div", { className: "h-full rounded-full bg-[var(--section-accent)]", style: { width: `${((current + 1) / steps.length) * 100}%` } }) })] })) : null, _jsx("h3", { ref: headingRef, tabIndex: -1, className: style === 'steps'
279
+ ? 'sr-only'
280
+ : 'text-base font-semibold text-[var(--section-fg)] focus:outline-none', children: style === 'steps' ? `Step ${current + 1} of ${steps.length}: ${title}` : title })] }));
188
281
  }
189
282
  function Field({ field, value, disabled, onChange, form, }) {
190
283
  const control = fieldControl(field.type);
191
284
  const id = `prenta-field-${field.key}`;
192
285
  const describedBy = field.helpText ? `${id}-help` : undefined;
193
286
  const help = field.helpText ? (_jsx("p", { id: `${id}-help`, className: "text-xs text-zinc-500", children: field.helpText })) : null;
287
+ const extra = field.cssClass ? ` ${field.cssClass}` : '';
288
+ const labelVisibility = field.hideLabel ? ' sr-only' : '';
289
+ switch (field.type) {
290
+ case 'heading':
291
+ return (_jsxs("div", { className: `flex flex-col gap-1 pt-2${extra}`, children: [_jsx("h3", { className: "text-base font-semibold text-[var(--section-fg)]", children: field.label }), field.helpText ? (_jsx("p", { className: "text-sm text-[var(--section-muted)]", children: field.helpText })) : null] }));
292
+ case 'content':
293
+ case 'richtext':
294
+ case 'richText':
295
+ return field.helpText ? (_jsx("p", { className: `text-sm leading-relaxed text-[var(--section-muted)]${extra}`, children: field.helpText })) : null;
296
+ case 'divider':
297
+ return _jsx("hr", { className: "border-zinc-200" });
298
+ case 'pagebreak':
299
+ return null;
300
+ case 'consent':
301
+ return (_jsxs("div", { className: `flex flex-col gap-1${extra}`, children: [_jsxs("label", { className: "flex items-start gap-2 text-sm text-zinc-700", children: [_jsx("input", { id: id, type: "checkbox", checked: value === true, required: field.required, disabled: disabled, "aria-describedby": describedBy, onChange: (e) => onChange(e.target.checked), className: "mt-0.5 h-4 w-4 rounded border-zinc-300 text-[var(--section-accent)]", ...webMcpFieldAttribute(form, field) }), _jsxs("span", { children: [field.label, field.required && _jsx("span", { className: "text-red-500", children: " *" })] })] }), help] }));
302
+ }
303
+ if (isChoiceList(field)) {
304
+ const picked = Array.isArray(value) ? value.map(String) : [];
305
+ return (_jsxs("fieldset", { className: `flex flex-col gap-2${extra}`, children: [_jsxs("legend", { className: `text-sm font-medium text-zinc-700${labelVisibility}`, children: [field.label, field.required && _jsx("span", { className: "text-red-500", children: " *" })] }), (field.options ?? []).map((opt) => (_jsxs("label", { className: "flex items-center gap-2 text-sm text-zinc-700", children: [_jsx("input", { type: "checkbox", name: field.key, value: opt.value, checked: picked.includes(opt.value), disabled: disabled, onChange: (e) => onChange(e.target.checked ? [...picked, opt.value] : picked.filter((v) => v !== opt.value)), className: "h-4 w-4 rounded border-zinc-300 text-[var(--section-accent)]", ...webMcpFieldAttribute(form, field) }), opt.label] }, opt.value))), help] }));
306
+ }
194
307
  // Radio + checkbox use a group label rather than a single bound <label>.
195
308
  if (control === 'radio') {
196
- return (_jsxs("fieldset", { className: "flex flex-col gap-2", children: [_jsxs("legend", { className: "text-sm font-medium text-zinc-700", children: [field.label, field.required && _jsx("span", { className: "text-red-500", children: " *" })] }), (field.options ?? []).map((opt) => (_jsxs("label", { className: "flex items-center gap-2 text-sm text-zinc-700", children: [_jsx("input", { type: "radio", name: field.key, value: opt.value, checked: value === opt.value, required: field.required, disabled: disabled, onChange: () => onChange(opt.value), className: "h-4 w-4 text-[var(--section-accent)]", ...webMcpFieldAttribute(form, field) }), opt.label] }, opt.value))), help] }));
309
+ return (_jsxs("fieldset", { className: `flex flex-col gap-2${extra}`, children: [_jsxs("legend", { className: `text-sm font-medium text-zinc-700${labelVisibility}`, children: [field.label, field.required && _jsx("span", { className: "text-red-500", children: " *" })] }), (field.options ?? []).map((opt) => (_jsxs("label", { className: "flex items-center gap-2 text-sm text-zinc-700", children: [_jsx("input", { type: "radio", name: field.key, value: opt.value, checked: value === opt.value, required: field.required, disabled: disabled, onChange: () => onChange(opt.value), className: "h-4 w-4 text-[var(--section-accent)]", ...webMcpFieldAttribute(form, field) }), opt.label] }, opt.value))), help] }));
197
310
  }
198
311
  if (control === 'checkbox') {
199
- return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("label", { className: "flex items-center gap-2 text-sm text-zinc-700", children: [_jsx("input", { id: id, type: "checkbox", checked: value === true, required: field.required, disabled: disabled, "aria-describedby": describedBy, onChange: (e) => onChange(e.target.checked), className: "h-4 w-4 rounded border-zinc-300 text-[var(--section-accent)]", ...webMcpFieldAttribute(form, field) }), field.label, field.required && _jsx("span", { className: "text-red-500", children: " *" })] }), help] }));
312
+ return (_jsxs("div", { className: `flex flex-col gap-1${extra}`, children: [_jsxs("label", { className: "flex items-center gap-2 text-sm text-zinc-700", children: [_jsx("input", { id: id, type: "checkbox", checked: value === true, required: field.required, disabled: disabled, "aria-describedby": describedBy, onChange: (e) => onChange(e.target.checked), className: "h-4 w-4 rounded border-zinc-300 text-[var(--section-accent)]", ...webMcpFieldAttribute(form, field) }), field.label, field.required && _jsx("span", { className: "text-red-500", children: " *" })] }), help] }));
200
313
  }
201
- return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("label", { htmlFor: id, className: "text-sm font-medium text-zinc-700", children: [field.label, field.required && _jsx("span", { className: "text-red-500", children: " *" })] }), control === 'textarea' ? (_jsx("textarea", { id: id, name: field.key, required: field.required, disabled: disabled, placeholder: field.placeholder, "aria-describedby": describedBy, value: typeof value === 'string' ? value : '', onChange: (e) => onChange(e.target.value), rows: 5, className: `${FIELD_BASE} resize-y`, ...webMcpFieldAttribute(form, field) })) : control === 'select' ? (_jsxs("select", { id: id, name: field.key, required: field.required, disabled: disabled, "aria-describedby": describedBy, value: typeof value === 'string' ? value : '', onChange: (e) => onChange(e.target.value), className: FIELD_BASE, ...webMcpFieldAttribute(form, field), children: [_jsx("option", { value: "", children: field.placeholder || 'Select…' }), (field.options ?? []).map((opt) => (_jsx("option", { value: opt.value, children: opt.label }, opt.value)))] })) : (_jsx("input", { id: id, name: field.key, type: htmlInputType(field.type), required: field.required, disabled: disabled, placeholder: field.placeholder, "aria-describedby": describedBy, value: typeof value === 'string' || typeof value === 'number' ? String(value) : '', onChange: (e) => onChange(e.target.value), className: FIELD_BASE, ...webMcpFieldAttribute(form, field) })), help] }));
314
+ return (_jsxs("div", { className: `flex flex-col gap-1${extra}`, children: [_jsxs("label", { htmlFor: id, className: `text-sm font-medium text-zinc-700${labelVisibility}`, children: [field.label, field.required && _jsx("span", { className: "text-red-500", children: " *" })] }), control === 'textarea' ? (_jsx("textarea", { id: id, name: field.key, required: field.required, disabled: disabled, placeholder: field.placeholder, "aria-describedby": describedBy, value: typeof value === 'string' ? value : '', onChange: (e) => onChange(e.target.value), rows: 5, className: `${FIELD_BASE} resize-y`, ...webMcpFieldAttribute(form, field) })) : control === 'select' ? (_jsxs("select", { id: id, name: field.key, required: field.required, disabled: disabled, "aria-describedby": describedBy, value: typeof value === 'string' ? value : '', onChange: (e) => onChange(e.target.value), className: FIELD_BASE, ...webMcpFieldAttribute(form, field), children: [_jsx("option", { value: "", children: field.placeholder || 'Select…' }), (field.options ?? []).map((opt) => (_jsx("option", { value: opt.value, children: opt.label }, opt.value)))] })) : (_jsx("input", { id: id, name: field.key, type: htmlInputType(field.type), required: field.required, disabled: disabled, placeholder: field.placeholder, "aria-describedby": describedBy, value: typeof value === 'string' || typeof value === 'number' ? String(value) : '', onChange: (e) => onChange(e.target.value), className: FIELD_BASE, ...webMcpFieldAttribute(form, field) })), help] }));
202
315
  }
203
316
  //# sourceMappingURL=PrentaForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrentaForm.js","sourceRoot":"","sources":["../src/PrentaForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,oBAAoB,GAGr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AAa,CAAC,KAAK,CAAC,IAAI,CAAC,EAC/B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,sBACZ,WAAW,EAC7B,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EAClF,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,SAAS,EAAE,UAAU,KACjB,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC,GACrC,CACH,EACA,IAAI,IACD,CACP,CAAA;AACH,CAAC"}
@@ -1,31 +1,32 @@
1
+ export interface AttributionCaptureOptions {
2
+ record?: boolean;
3
+ requireConsent?: boolean;
4
+ firstTouchDays?: number;
5
+ lastTouchHours?: number;
6
+ }
1
7
  /**
2
8
  * Whether attribution may be captured under the site's consent state.
3
9
  *
4
10
  * - Plugin not installed → the site has no consent framework; resolve `true`.
5
11
  * - Analytics already granted → resolve `true` immediately.
6
- * - No decision yet → wait for the visitor's banner choice (the URL's UTM
7
- * params are still intact at that point, so a late grant loses nothing).
12
+ * - No decision yet → wait for the visitor's banner choice.
8
13
  *
9
- * The consent plugin is an optional peer, so it is loaded with a dynamic
10
- * import (documented exception to the no-inline-imports rule — same pattern
11
- * as `WidgetEmbedSection`): a static import would break sites that don't
12
- * install it.
14
+ * Kept for callers that have not opted into `requireConsent`. The settings-aware
15
+ * path is {@link captureAttributionIfAllowed}.
13
16
  */
14
17
  export declare function attributionConsentAllowed(): Promise<boolean>;
15
18
  /**
16
- * Capture the current page as an attribution touch if consent allows.
17
- * Resolves `true` when capture ran (callers can then attach attribution on
18
- * submit without re-checking consent).
19
+ * Capture the current page as an attribution touch when the site settings and
20
+ * consent decision allow it. Resolves `false` without writing storage when
21
+ * recording is off or consent was not given.
19
22
  */
20
- export declare function captureAttributionIfAllowed(): Promise<boolean>;
23
+ export declare function captureAttributionIfAllowed(options?: AttributionCaptureOptions): Promise<boolean>;
21
24
  /**
22
25
  * Site-wide attribution tracker. Mount once in the public site layout so
23
- * UTMs, ad click IDs, and referrers are recorded on the page the visitor
24
- * *lands* on — not just pages that contain a form. `<PrentaForm>` also
25
- * captures on mount, so this is optional but improves first-touch fidelity
26
- * for multi-page journeys (ad → landing page → contact page → submit).
27
- *
28
- * Renders nothing.
26
+ * UTMs, ad click IDs, and referrers are recorded on the landing page.
27
+ * Reads `/api/cms/public/attribution/config` (cached for 5 minutes).
29
28
  */
30
- export declare function AttributionTracker(): null;
29
+ export declare function AttributionTracker({ baseUrl }?: {
30
+ baseUrl?: string;
31
+ }): null;
31
32
  //# sourceMappingURL=attribution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attribution.d.ts","sourceRoot":"","sources":["../src/attribution.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC,CASlE;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,OAAO,CAAC,CAMpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAKzC"}
1
+ {"version":3,"file":"attribution.d.ts","sourceRoot":"","sources":["../src/attribution.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC,CASlE;AAcD;;;;GAIG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,OAAO,CAAC,CAYlB;AAMD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAY,EAAE,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,IAAI,CAuBpF"}
@@ -1,26 +1,24 @@
1
1
  'use client';
2
2
  /**
3
- * Consent-gated marketing attribution capture for the public site.
3
+ * Settings-aware marketing attribution capture for the public site.
4
4
  *
5
- * Wraps cms-core's attribution module with a consent check: when
6
- * `@prenta/plugin-consent` is installed (optional peer dependency),
7
- * capture only runs with an analytics grant; when it is not installed, the
8
- * site has no consent framework and first-party capture proceeds.
5
+ * `record` and the touch windows come from Form Settings. `requireConsent`
6
+ * follows the attribution spec: capture immediately when consent is not
7
+ * required; wait for an analytics grant when the consent plugin is installed;
8
+ * capture nothing when consent is required and the plugin is not installed.
9
9
  */
10
10
  import { useEffect } from 'react';
11
11
  import { captureAttribution } from '@prenta/core/forms/attribution';
12
+ import { shouldRecordAttribution } from '@prenta/core';
12
13
  /**
13
14
  * Whether attribution may be captured under the site's consent state.
14
15
  *
15
16
  * - Plugin not installed → the site has no consent framework; resolve `true`.
16
17
  * - Analytics already granted → resolve `true` immediately.
17
- * - No decision yet → wait for the visitor's banner choice (the URL's UTM
18
- * params are still intact at that point, so a late grant loses nothing).
18
+ * - No decision yet → wait for the visitor's banner choice.
19
19
  *
20
- * The consent plugin is an optional peer, so it is loaded with a dynamic
21
- * import (documented exception to the no-inline-imports rule — same pattern
22
- * as `WidgetEmbedSection`): a static import would break sites that don't
23
- * install it.
20
+ * Kept for callers that have not opted into `requireConsent`. The settings-aware
21
+ * path is {@link captureAttributionIfAllowed}.
24
22
  */
25
23
  export async function attributionConsentAllowed() {
26
24
  try {
@@ -34,33 +32,67 @@ export async function attributionConsentAllowed() {
34
32
  return true;
35
33
  }
36
34
  }
35
+ async function consentGranted(requireConsent) {
36
+ if (!requireConsent)
37
+ return true;
38
+ try {
39
+ const consent = await import('@prenta/plugin-consent');
40
+ const existing = consent.readConsentState();
41
+ if (existing)
42
+ return consent.hasAnalyticsConsent(existing);
43
+ return consent.hasAnalyticsConsent(await consent.waitForConsentState());
44
+ }
45
+ catch {
46
+ return false;
47
+ }
48
+ }
37
49
  /**
38
- * Capture the current page as an attribution touch if consent allows.
39
- * Resolves `true` when capture ran (callers can then attach attribution on
40
- * submit without re-checking consent).
50
+ * Capture the current page as an attribution touch when the site settings and
51
+ * consent decision allow it. Resolves `false` without writing storage when
52
+ * recording is off or consent was not given.
41
53
  */
42
- export async function captureAttributionIfAllowed() {
54
+ export async function captureAttributionIfAllowed(options) {
43
55
  if (typeof window === 'undefined')
44
56
  return false;
45
- const allowed = await attributionConsentAllowed();
46
- if (!allowed)
57
+ const record = options?.record !== false;
58
+ const requireConsent = options?.requireConsent === true;
59
+ const granted = await consentGranted(requireConsent);
60
+ if (!shouldRecordAttribution({ record, requireConsent, consentGranted: granted }))
47
61
  return false;
48
- captureAttribution();
62
+ captureAttribution({
63
+ record,
64
+ firstTouchDays: options?.firstTouchDays,
65
+ lastTouchHours: options?.lastTouchHours,
66
+ });
49
67
  return true;
50
68
  }
51
69
  /**
52
70
  * Site-wide attribution tracker. Mount once in the public site layout so
53
- * UTMs, ad click IDs, and referrers are recorded on the page the visitor
54
- * *lands* on — not just pages that contain a form. `<PrentaForm>` also
55
- * captures on mount, so this is optional but improves first-touch fidelity
56
- * for multi-page journeys (ad → landing page → contact page → submit).
57
- *
58
- * Renders nothing.
71
+ * UTMs, ad click IDs, and referrers are recorded on the landing page.
72
+ * Reads `/api/cms/public/attribution/config` (cached for 5 minutes).
59
73
  */
60
- export function AttributionTracker() {
74
+ export function AttributionTracker({ baseUrl = '' } = {}) {
61
75
  useEffect(() => {
62
- void captureAttributionIfAllowed();
63
- }, []);
76
+ let cancelled = false;
77
+ void (async () => {
78
+ let options;
79
+ try {
80
+ const response = await fetch(`${baseUrl}/api/cms/public/attribution/config`);
81
+ if (response.ok) {
82
+ const body = (await response.json());
83
+ options = 'data' in body && body.data ? body.data : body;
84
+ }
85
+ }
86
+ catch {
87
+ options = undefined;
88
+ }
89
+ if (!cancelled)
90
+ await captureAttributionIfAllowed(options);
91
+ })();
92
+ return () => {
93
+ cancelled = true;
94
+ };
95
+ }, [baseUrl]);
64
96
  return null;
65
97
  }
66
98
  //# sourceMappingURL=attribution.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"attribution.js","sourceRoot":"","sources":["../src/attribution.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAEnE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB;IAC7C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAA;QACtD,MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAA;QAC3C,IAAI,QAAQ;YAAE,OAAO,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAA;QAC1D,OAAO,OAAO,CAAC,mBAAmB,CAAC,MAAM,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAA;IACzE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B;IAC/C,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,KAAK,CAAA;IAC/C,MAAM,OAAO,GAAG,MAAM,yBAAyB,EAAE,CAAA;IACjD,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAC1B,kBAAkB,EAAE,CAAA;IACpB,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB;IAChC,SAAS,CAAC,GAAG,E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YACrB,CAAC;YACD,IAAI,CAAC,SAAS;gBAAE,MAAM,2BAA2B,CAAC,OAAO,CAAC,CAAA;QAC5D,CAAC,CAAC,EAAE,CAAA;QACJ,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAA;QAClB,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IACb,OAAO,IAAI,CAAA;AACb,CAAC"}
package/dist/forms.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * unit-tested in a Node environment and imported by server components.
8
8
  */
9
9
  import type { FormAnalyticsConfig } from '@prenta/core/forms/analytics';
10
+ import type { ConditionalLogic } from '@prenta/core/forms/client';
10
11
  /** A single renderable field, as delivered by the public form schema. */
11
12
  export interface PublicFormField {
12
13
  id: string;
@@ -23,6 +24,15 @@ export interface PublicFormField {
23
24
  }>;
24
25
  width?: string;
25
26
  sortOrder: number;
27
+ /** Visually hide the label (it stays for screen readers). */
28
+ hideLabel?: boolean;
29
+ /** Extra wrapper classes, `[A-Za-z0-9_-]` tokens only. */
30
+ cssClass?: string;
31
+ /** Show/hide/require rules, evaluated with cms-core's own visibility check. */
32
+ conditionalLogic?: ConditionalLogic;
33
+ /** Page breaks: the Next and Back button text. */
34
+ nextLabel?: string;
35
+ backLabel?: string;
26
36
  }
27
37
  /** The public form schema (honeypot field is stripped from `fields`). */
28
38
  export interface PublicForm {
@@ -35,6 +45,9 @@ export interface PublicForm {
35
45
  submitPath: string;
36
46
  successMessage?: string;
37
47
  redirectUrl?: string;
48
+ submitLabel?: string;
49
+ firstStep?: string;
50
+ progress?: 'steps' | 'bar' | 'none';
38
51
  spam: {
39
52
  honeypotFieldKey?: string;
40
53
  minSubmitSeconds?: number;
@@ -46,6 +59,13 @@ export interface PublicForm {
46
59
  schemaVersionId?: string | null;
47
60
  /** GA4 tracking config — present only when tracking is enabled for the form. */
48
61
  analytics?: FormAnalyticsConfig;
62
+ /** Site-wide attribution windows from Form Settings. */
63
+ attribution?: {
64
+ record: boolean;
65
+ requireConsent: boolean;
66
+ firstTouchDays: number;
67
+ lastTouchHours: number;
68
+ };
49
69
  webmcp?: {
50
70
  enabled: boolean;
51
71
  toolName: string;
@@ -81,9 +101,35 @@ export type FieldControl = 'input' | 'textarea' | 'select' | 'checkbox' | 'radio
81
101
  export declare function fieldControl(type: string): FieldControl;
82
102
  /** Map a field type to an `<input type="...">` value (control === 'input' only). */
83
103
  export declare function htmlInputType(type: string): string;
104
+ export declare function isDisplayOnly(type: string): boolean;
105
+ /** A checkbox with choices is a list of picks ("Checkboxes"); without, a single yes/no. */
106
+ export declare function isChoiceList(field: Pick<PublicFormField, 'type' | 'options'>): boolean;
107
+ /** Visible under the field's logic, using cms-core's own rule evaluation. */
108
+ export declare function isPublicFieldVisible(field: PublicFormField, values: Record<string, unknown>): boolean;
109
+ /**
110
+ * Resolve `{page_url}` and URL-parameter tokens (`{utm_source}`) in a hidden
111
+ * field's value. Unknown tokens become an empty string.
112
+ */
113
+ export declare function resolveHiddenValue(template: string, pageUrl: string | null): string;
114
+ export interface PublicStep {
115
+ title: string;
116
+ fields: PublicFormField[];
117
+ /** The page break that opens this step (absent on step 1). */
118
+ start?: PublicFormField;
119
+ }
120
+ /** Split at page breaks; step 1 takes the form's first-step title (kit default "About you"). */
121
+ export declare function splitSteps(form: Pick<PublicForm, 'fields' | 'firstStep'>): PublicStep[];
84
122
  /** The initial value map for a form (honeypot excluded — it is a hidden field). */
85
- export declare function initialValues(form: Pick<PublicForm, 'fields'>): Record<string, unknown>;
86
- /** Label of the first required field left empty, or `null` when all are filled. */
123
+ export declare function initialValues(form: Pick<PublicForm, 'fields'>, pageUrl?: string | null): Record<string, unknown>;
124
+ /**
125
+ * The values to send: answers to fields logic has hidden are dropped (the
126
+ * server skips them too), and display-only fields never carry a value.
127
+ */
128
+ export declare function submittableValues(form: Pick<PublicForm, 'fields'>, values: Record<string, unknown>): Record<string, unknown>;
129
+ /**
130
+ * Label of the first required field left empty, or `null` when all are
131
+ * filled. Fields hidden by logic and display-only fields are skipped.
132
+ */
87
133
  export declare function firstMissingRequired(form: Pick<PublicForm, 'fields'>, values: Record<string, unknown>): string | null;
88
134
  export interface SubmitBodyArgs {
89
135
  values: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../src/forms.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAGvE,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACjD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,yEAAyE;AACzE,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,6FAA6F;IAC7F,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE;QACJ,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAC1B,CAAA;IACD,OAAO,CAAC,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,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC7C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAc7E"}
package/dist/forms.js CHANGED
@@ -1,7 +1,44 @@
1
- import { isSafeRedirectUrl } from '@prenta/core/forms/client';
1
+ import { isFieldConditionallyRequired, isFieldVisible, isSafeRedirectUrl, } from '@prenta/core/forms/client';
2
2
  function isObj(v) {
3
3
  return typeof v === 'object' && v !== null && !Array.isArray(v);
4
4
  }
5
+ const OPERATORS = new Set(['equals', 'notEquals', 'contains', 'isEmpty', 'isNotEmpty']);
6
+ function coerceRules(v) {
7
+ if (!Array.isArray(v))
8
+ return undefined;
9
+ const rules = v
10
+ .filter(isObj)
11
+ .filter((r) => typeof r.fieldKey === 'string' && OPERATORS.has(String(r.operator)))
12
+ .map((r) => ({
13
+ fieldKey: r.fieldKey,
14
+ operator: r.operator,
15
+ ...(typeof r.value === 'string' ? { value: r.value } : {}),
16
+ }));
17
+ return rules.length > 0 ? rules : undefined;
18
+ }
19
+ function coerceLogic(v) {
20
+ if (!isObj(v))
21
+ return undefined;
22
+ const logic = {};
23
+ const show = coerceRules(v.show);
24
+ const hide = coerceRules(v.hide);
25
+ const require = coerceRules(v.require);
26
+ if (show)
27
+ logic.show = show;
28
+ if (hide)
29
+ logic.hide = hide;
30
+ if (require)
31
+ logic.require = require;
32
+ if (v.match === 'any')
33
+ logic.match = 'any';
34
+ return show || hide || require ? logic : undefined;
35
+ }
36
+ function safeClassList(v) {
37
+ if (typeof v !== 'string')
38
+ return undefined;
39
+ const tokens = v.split(/\s+/).filter((token) => /^[A-Za-z0-9_-]{1,60}$/.test(token));
40
+ return tokens.length > 0 ? tokens.slice(0, 8).join(' ') : undefined;
41
+ }
5
42
  /**
6
43
  * Coerce a raw JSON value into a {@link PublicForm}, or `null` when it is not a
7
44
  * usable form schema. Accepts either the bare form object or the API's
@@ -31,6 +68,11 @@ export function coercePublicForm(raw) {
31
68
  : undefined,
32
69
  width: typeof f.width === 'string' ? f.width : undefined,
33
70
  sortOrder: typeof f.sortOrder === 'number' ? f.sortOrder : 0,
71
+ hideLabel: f.hideLabel === true ? true : undefined,
72
+ cssClass: safeClassList(f.cssClass),
73
+ conditionalLogic: coerceLogic(f.conditionalLogic),
74
+ nextLabel: typeof f.nextLabel === 'string' ? f.nextLabel : undefined,
75
+ backLabel: typeof f.backLabel === 'string' ? f.backLabel : undefined,
34
76
  }));
35
77
  const spam = isObj(root.spam) ? root.spam : {};
36
78
  const captcha = isObj(root.captcha) &&
@@ -48,12 +90,31 @@ export function coercePublicForm(raw) {
48
90
  submitPath: root.submitPath,
49
91
  successMessage: typeof root.successMessage === 'string' ? root.successMessage : undefined,
50
92
  redirectUrl: typeof root.redirectUrl === 'string' ? root.redirectUrl : undefined,
93
+ submitLabel: typeof root.submitLabel === 'string' && root.submitLabel.trim()
94
+ ? root.submitLabel
95
+ : undefined,
96
+ firstStep: typeof root.firstStep === 'string' && root.firstStep.trim() ? root.firstStep : undefined,
97
+ progress: root.progress === 'steps' || root.progress === 'bar' || root.progress === 'none'
98
+ ? root.progress
99
+ : undefined,
51
100
  spam: {
52
101
  honeypotFieldKey: typeof spam.honeypotFieldKey === 'string' ? spam.honeypotFieldKey : undefined,
53
102
  minSubmitSeconds: typeof spam.minSubmitSeconds === 'number' ? spam.minSubmitSeconds : undefined,
54
103
  },
55
104
  captcha,
56
105
  analytics,
106
+ attribution: isObj(root.attribution)
107
+ ? {
108
+ record: root.attribution.record !== false,
109
+ requireConsent: root.attribution.requireConsent === true,
110
+ firstTouchDays: typeof root.attribution.firstTouchDays === 'number'
111
+ ? root.attribution.firstTouchDays
112
+ : 30,
113
+ lastTouchHours: typeof root.attribution.lastTouchHours === 'number'
114
+ ? root.attribution.lastTouchHours
115
+ : 24,
116
+ }
117
+ : undefined,
57
118
  schemaVersionId: typeof root.schemaVersionId === 'string' || root.schemaVersionId === null
58
119
  ? root.schemaVersionId
59
120
  : undefined,
@@ -167,23 +228,101 @@ export function htmlInputType(type) {
167
228
  return 'text';
168
229
  }
169
230
  }
231
+ /** Types that show content but take no answer. */
232
+ const DISPLAY_TYPES = new Set([
233
+ 'heading',
234
+ 'content',
235
+ 'richtext',
236
+ 'richText',
237
+ 'divider',
238
+ 'pagebreak',
239
+ ]);
240
+ export function isDisplayOnly(type) {
241
+ return DISPLAY_TYPES.has(type);
242
+ }
243
+ /** A checkbox with choices is a list of picks ("Checkboxes"); without, a single yes/no. */
244
+ export function isChoiceList(field) {
245
+ return field.type === 'checkbox' && (field.options?.length ?? 0) > 0;
246
+ }
247
+ /** Visible under the field's logic, using cms-core's own rule evaluation. */
248
+ export function isPublicFieldVisible(field, values) {
249
+ return isFieldVisible({ conditionalLogic: field.conditionalLogic }, values);
250
+ }
251
+ /**
252
+ * Resolve `{page_url}` and URL-parameter tokens (`{utm_source}`) in a hidden
253
+ * field's value. Unknown tokens become an empty string.
254
+ */
255
+ export function resolveHiddenValue(template, pageUrl) {
256
+ let url = null;
257
+ try {
258
+ url = pageUrl ? new URL(pageUrl) : null;
259
+ }
260
+ catch {
261
+ url = null;
262
+ }
263
+ return template.replace(/\{([a-z0-9_]+)\}/gi, (_match, token) => token === 'page_url' ? (pageUrl ?? '') : (url?.searchParams.get(token) ?? ''));
264
+ }
265
+ /** Split at page breaks; step 1 takes the form's first-step title (kit default "About you"). */
266
+ export function splitSteps(form) {
267
+ const steps = [{ title: form.firstStep || 'About you', fields: [] }];
268
+ for (const field of form.fields) {
269
+ if (field.type === 'pagebreak')
270
+ steps.push({ title: field.label, fields: [], start: field });
271
+ else
272
+ steps[steps.length - 1].fields.push(field);
273
+ }
274
+ return steps;
275
+ }
170
276
  /** The initial value map for a form (honeypot excluded — it is a hidden field). */
171
- export function initialValues(form) {
277
+ export function initialValues(form, pageUrl = null) {
172
278
  const out = {};
173
279
  for (const f of form.fields) {
174
- if (f.defaultValue !== undefined)
280
+ if (isDisplayOnly(f.type))
281
+ continue;
282
+ if (f.type === 'hidden') {
283
+ out[f.key] =
284
+ typeof f.defaultValue === 'string' ? resolveHiddenValue(f.defaultValue, pageUrl) : '';
285
+ }
286
+ else if (isChoiceList(f)) {
287
+ out[f.key] = Array.isArray(f.defaultValue) ? f.defaultValue.map(String) : [];
288
+ }
289
+ else if (f.defaultValue !== undefined)
175
290
  out[f.key] = f.defaultValue;
176
- else if (fieldControl(f.type) === 'checkbox')
291
+ else if (fieldControl(f.type) === 'checkbox' || f.type === 'consent')
177
292
  out[f.key] = false;
178
293
  else
179
294
  out[f.key] = '';
180
295
  }
181
296
  return out;
182
297
  }
183
- /** Label of the first required field left empty, or `null` when all are filled. */
298
+ /**
299
+ * The values to send: answers to fields logic has hidden are dropped (the
300
+ * server skips them too), and display-only fields never carry a value.
301
+ */
302
+ export function submittableValues(form, values) {
303
+ const out = {};
304
+ for (const f of form.fields) {
305
+ if (isDisplayOnly(f.type))
306
+ continue;
307
+ if (!isPublicFieldVisible(f, values))
308
+ continue;
309
+ if (f.key in values)
310
+ out[f.key] = values[f.key];
311
+ }
312
+ return out;
313
+ }
314
+ /**
315
+ * Label of the first required field left empty, or `null` when all are
316
+ * filled. Fields hidden by logic and display-only fields are skipped.
317
+ */
184
318
  export function firstMissingRequired(form, values) {
185
319
  for (const f of form.fields) {
186
- if (!f.required)
320
+ if (isDisplayOnly(f.type) || f.type === 'hidden')
321
+ continue;
322
+ if (!isPublicFieldVisible(f, values))
323
+ continue;
324
+ const asField = { conditionalLogic: f.conditionalLogic };
325
+ if (!f.required && !isFieldConditionallyRequired(asField, values))
187
326
  continue;
188
327
  const v = values[f.key];
189
328
  const empty = v === undefined ||
package/dist/forms.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"forms.js","sourceRoot":"","sources":["../src/forms.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AA6C7D,SAAS,KAAK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I,CAAC,OAAO,CAAA;IAC7C,IAAI,IAAI,CAAC,YAAY;QAAE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAA;IAC5D,IAAI,IAAI,CAAC,WAAW,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;QAC7D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;IACrC,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Google reCAPTCHA v3 for `<PrentaForm>`. v3 has no widget: the script scores
3
+ * the visit and `execute` returns a token. Tokens expire after two minutes and
4
+ * are single-use, so one is fetched for each submit rather than on load.
5
+ */
6
+ interface Grecaptcha {
7
+ ready: (callback: () => void) => void;
8
+ execute: (siteKey: string, options: {
9
+ action: string;
10
+ }) => Promise<string>;
11
+ }
12
+ declare global {
13
+ interface Window {
14
+ grecaptcha?: Grecaptcha;
15
+ }
16
+ }
17
+ /** Load the v3 script for a site key once per page, resolving when it's ready. */
18
+ export declare function loadRecaptchaV3(siteKey: string): Promise<Grecaptcha>;
19
+ /** A fresh token for `action`, or a rejection after `timeoutMs`. */
20
+ export declare function getRecaptchaV3Token(siteKey: string, action: string, timeoutMs?: number): Promise<string>;
21
+ export {};
22
+ //# sourceMappingURL=recaptcha.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recaptcha.d.ts","sourceRoot":"","sources":["../src/recaptcha.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,UAAU,UAAU;IAClB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;IACrC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC3E;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,CAAC,EAAE,UAAU,CAAA;KACxB;CACF;AAMD,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CA4CpE;AAED,oEAAoE;AACpE,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,SAAS,GACjB,OAAO,CAAC,MAAM,CAAC,CAajB"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Google reCAPTCHA v3 for `<PrentaForm>`. v3 has no widget: the script scores
3
+ * the visit and `execute` returns a token. Tokens expire after two minutes and
4
+ * are single-use, so one is fetched for each submit rather than on load.
5
+ */
6
+ const loads = new Map();
7
+ const LOAD_TIMEOUT_MS = 15_000;
8
+ /** Load the v3 script for a site key once per page, resolving when it's ready. */
9
+ export function loadRecaptchaV3(siteKey) {
10
+ const existing = loads.get(siteKey);
11
+ if (existing)
12
+ return existing;
13
+ const load = new Promise((resolve, reject) => {
14
+ if (typeof document === 'undefined') {
15
+ reject(new Error('reCAPTCHA needs a browser'));
16
+ return;
17
+ }
18
+ let script = null;
19
+ // A script that never fires load or error must not stay cached forever.
20
+ const timer = setTimeout(() => {
21
+ script?.remove();
22
+ reject(new Error('reCAPTCHA did not load'));
23
+ }, LOAD_TIMEOUT_MS);
24
+ const fail = () => {
25
+ clearTimeout(timer);
26
+ reject(new Error('reCAPTCHA did not load'));
27
+ };
28
+ const whenReady = () => {
29
+ const g = window.grecaptcha;
30
+ if (!g) {
31
+ fail();
32
+ return;
33
+ }
34
+ g.ready(() => {
35
+ clearTimeout(timer);
36
+ resolve(g);
37
+ });
38
+ };
39
+ if (window.grecaptcha) {
40
+ whenReady();
41
+ return;
42
+ }
43
+ script = document.createElement('script');
44
+ script.src = `https://www.google.com/recaptcha/api.js?render=${encodeURIComponent(siteKey)}`;
45
+ script.async = true;
46
+ script.onload = whenReady;
47
+ script.onerror = fail;
48
+ document.head.appendChild(script);
49
+ });
50
+ // A blocked or stalled script must be retried on the next submit, not cached as failed.
51
+ load.catch(() => loads.delete(siteKey));
52
+ loads.set(siteKey, load);
53
+ return load;
54
+ }
55
+ /** A fresh token for `action`, or a rejection after `timeoutMs`. */
56
+ export async function getRecaptchaV3Token(siteKey, action, timeoutMs = 10_000) {
57
+ let timer;
58
+ const timeout = new Promise((_, reject) => {
59
+ timer = setTimeout(() => reject(new Error('reCAPTCHA timed out')), timeoutMs);
60
+ });
61
+ try {
62
+ const g = await Promise.race([loadRecaptchaV3(siteKey), timeout]);
63
+ const token = await Promise.race([g.execute(siteKey, { action }), timeout]);
64
+ if (!token)
65
+ throw new Error('reCAPTCHA returned no token');
66
+ return token;
67
+ }
68
+ finally {
69
+ clearTimeout(timer);
70
+ }
71
+ }
72
+ //# sourceMappingURL=recaptcha.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recaptcha.js","sourceRoot":"","sources":["../src/recaptcha.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,MAAM,KAAK,GAAG,IAAI,GAAG,EAA+B,CAAA;AAEpD,MAAM,eAAe,GAAG,MAAM,CAAA;AAE9B,kFAAkF;AAClF,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAA;IAC7B,MAAM,IAAI,GAAG,IAAI,OAAO,CAAa,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACvD,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;YACpC,MAAM,CAAC,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAA;YAC9C,OAAM;QACR,CAAC;QACD,IAAI,MAAM,GAA6B,IAAI,CAAA;QAC3C,wEAAwE;QACxE,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,MAAM,EAAE,MAAM,EAAE,CAAA;YAChB,MAAM,CAAC,IAA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AK,UAAU,mBAAmB,CACvC,OAAe,EACf,MAAc,EACd,SAAS,GAAG,MAAM;IAElB,IAAI,KAAgD,CAAA;IACpD,MAAM,OAAO,GAAG,IAAI,OAAO,CAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE;QAC/C,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IAC/E,CAAC,CAAC,CAAA;IACF,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAA;QACjE,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAA;QAC3E,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;QAC1D,OAAO,KAAK,CAAA;IACd,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,KAAK,CAAC,CAAA;IACrB,CAAC;AACH,CAAC"}
package/dist/styles.css CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}@layer theme,base;@layer components{.prenta-sections{--section-accent:#7c3aed;--section-accent-hover:var(--section-accent)}@supports (color:color-mix(in lab, red, red)){.prenta-sections{--section-accent-hover:color-mix(in srgb, var(--section-accent) 82%, black)}}.prenta-sections{--section-accent-foreground:#fff;--section-accent-soft:var(--section-accent)}@supports (color:color-mix(in lab, red, red)){.prenta-sections{--section-accent-soft:color-mix(in srgb, var(--section-accent) 16%, white)}}.prenta-sections{--section-bg:#fff;--section-fg:#18181b;--section-muted:#71717a;--section-font:inherit;--section-radius:.75rem;color:var(--section-fg);font-family:var(--section-font)}}@layer utilities{.\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.bottom-0{bottom:calc(var(--spacing) * 0)}.-left-\[9999px\]{left:-9999px}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-3\/2{aspect-ratio:3/2}.aspect-\[4\/3\]{aspect-ratio:4/3}.aspect-\[9\/16\]{aspect-ratio:9/16}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.h-0{height:calc(var(--spacing) * 0)}.h-4{height:calc(var(--spacing) * 4)}.h-14{height:calc(var(--spacing) * 14)}.h-\[360px\]{height:360px}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-\[inherit\]{min-height:inherit}.w-0{width:calc(var(--spacing) * 0)}.w-4{width:calc(var(--spacing) * 4)}.w-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-xl{max-width:var(--container-xl)}.min-w-48{min-width:calc(var(--spacing) * 48)}.shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-current{border-color:currentColor}.border-green-200{border-color:var(--color-green-200)}.border-zinc-100{border-color:var(--color-zinc-100)}.border-zinc-200{border-color:var(--color-zinc-200)}.border-zinc-300{border-color:var(--color-zinc-300)}.bg-\[var\(--section-accent\)\]{background-color:var(--section-accent)}.bg-\[var\(--section-bg\)\]{background-color:var(--section-bg)}.bg-green-50{background-color:var(--color-green-50)}.bg-white{background-color:var(--color-white)}.bg-zinc-50{background-color:var(--color-zinc-50)}.bg-zinc-100{background-color:var(--color-zinc-100)}.bg-zinc-200{background-color:var(--color-zinc-200)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-\[var\(--section-accent\)\]{--tw-gradient-from:var(--section-accent);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab, red, red)){.from-black\/70{--tw-gradient-from:color-mix(in oklab, var(--color-black) 70%, transparent)}}.from-black\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[var\(--section-accent-hover\)\]{--tw-gradient-to:var(--section-accent-hover);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-black\/10{--tw-gradient-to:#0000001a}@supports (color:color-mix(in lab, red, red)){.to-black\/10{--tw-gradient-to:color-mix(in oklab, var(--color-black) 10%, transparent)}}.to-black\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing) * 1)}.p-3{padding:calc(var(--spacing) * 3)}.p-5{padding:calc(var(--spacing) * 5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[15px\]{font-size:15px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-pre-line{white-space:pre-line}.text-\[var\(--section-accent\)\]{color:var(--section-accent)}.text-\[var\(--section-accent-foreground\)\]{color:var(--section-accent-foreground)}.text-\[var\(--section-fg\)\]{color:var(--section-fg)}.text-\[var\(--section-muted\)\]{color:var(--section-muted)}.text-green-800{color:var(--color-green-800)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.text-white\/90{color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-700{color:var(--color-zinc-700)}.text-zinc-900{color:var(--color-zinc-900)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.opacity-15{opacity:.15}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.group-open\:rotate-180:is(:where(.group):is([open],:popover-open,:open) *){rotate:180deg}.placeholder\:text-\[var\(--section-muted\)\]::placeholder{color:var(--section-muted)}@media (hover:hover){.hover\:border-\[var\(--section-accent-soft\)\]:hover{border-color:var(--section-accent-soft)}.hover\:bg-\[var\(--section-accent-hover\)\]:hover{background-color:var(--section-accent-hover)}.hover\:bg-\[var\(--section-accent-soft\)\]:hover{background-color:var(--section-accent-soft)}.hover\:bg-zinc-50:hover{background-color:var(--color-zinc-50)}.hover\:bg-zinc-100:hover{background-color:var(--color-zinc-100)}.hover\:text-zinc-900:hover{color:var(--color-zinc-900)}.hover\:opacity-75:hover{opacity:.75}}.focus\:border-\[var\(--section-accent\)\]:focus{border-color:var(--section-accent)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-\[color-mix\(in_srgb\,var\(--section-accent\)_40\%\,transparent\)\]:focus{--tw-ring-color:var(--section-accent)}@supports (color:color-mix(in lab, red, red)){.focus\:ring-\[color-mix\(in_srgb\,var\(--section-accent\)_40\%\,transparent\)\]:focus{--tw-ring-color:color-mix(in srgb,var(--section-accent) 40%,transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-60:disabled{opacity:.6}@media (min-width:48rem){.md\:absolute{position:absolute}.md\:left-0{left:calc(var(--spacing) * 0)}.md\:z-10{z-index:10}}@container (min-width:460px){.\@pv-sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.\@pv-sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (min-width:700px){.\@pv-md\:order-1{order:1}.\@pv-md\:order-2{order:2}.\@pv-md\:h-\[440px\]{height:440px}.\@pv-md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.\@pv-md\:py-20{padding-block:calc(var(--spacing) * 20)}.\@pv-md\:py-28{padding-block:calc(var(--spacing) * 28)}.\@pv-md\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\@pv-md\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}}@container (min-width:900px){.\@pv-lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.\@pv-lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@container (min-width:1100px){.\@pv-xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@container (min-width:2000px){.\@pv-2xl\:py-28{padding-block:calc(var(--spacing) * 28)}.\@pv-2xl\:py-36{padding-block:calc(var(--spacing) * 36)}.\@pv-2xl\:text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}}}:root,:host{--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-800:oklch(44.8% .119 151.328);--color-zinc-50:oklch(98.5% 0 0);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}@layer theme,base;@layer components{.prenta-sections{--section-accent:#7c3aed;--section-accent-hover:var(--section-accent)}@supports (color:color-mix(in lab, red, red)){.prenta-sections{--section-accent-hover:color-mix(in srgb, var(--section-accent) 82%, black)}}.prenta-sections{--section-accent-foreground:#fff;--section-accent-soft:var(--section-accent)}@supports (color:color-mix(in lab, red, red)){.prenta-sections{--section-accent-soft:color-mix(in srgb, var(--section-accent) 16%, white)}}.prenta-sections{--section-bg:#fff;--section-fg:#18181b;--section-muted:#71717a;--section-font:inherit;--section-radius:.75rem;color:var(--section-fg);font-family:var(--section-font)}}@layer utilities{.\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.bottom-0{bottom:calc(var(--spacing) * 0)}.-left-\[9999px\]{left:-9999px}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-3\/2{aspect-ratio:3/2}.aspect-\[4\/3\]{aspect-ratio:4/3}.aspect-\[9\/16\]{aspect-ratio:9/16}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.h-0{height:calc(var(--spacing) * 0)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-14{height:calc(var(--spacing) * 14)}.h-\[360px\]{height:360px}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-\[inherit\]{min-height:inherit}.w-0{width:calc(var(--spacing) * 0)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-14{width:calc(var(--spacing) * 14)}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-48{min-width:calc(var(--spacing) * 48)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-\[3px\]{border-top-style:var(--tw-border-style);border-top-width:3px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-\[var\(--section-accent\)\]{border-color:var(--section-accent)}.border-current{border-color:currentColor}.border-green-200{border-color:var(--color-green-200)}.border-zinc-100{border-color:var(--color-zinc-100)}.border-zinc-200{border-color:var(--color-zinc-200)}.border-zinc-300{border-color:var(--color-zinc-300)}.bg-\[var\(--section-accent\)\]{background-color:var(--section-accent)}.bg-\[var\(--section-bg\)\]{background-color:var(--section-bg)}.bg-green-50{background-color:var(--color-green-50)}.bg-white{background-color:var(--color-white)}.bg-zinc-50{background-color:var(--color-zinc-50)}.bg-zinc-100{background-color:var(--color-zinc-100)}.bg-zinc-200{background-color:var(--color-zinc-200)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-\[var\(--section-accent\)\]{--tw-gradient-from:var(--section-accent);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab, red, red)){.from-black\/70{--tw-gradient-from:color-mix(in oklab, var(--color-black) 70%, transparent)}}.from-black\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[var\(--section-accent-hover\)\]{--tw-gradient-to:var(--section-accent-hover);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-black\/10{--tw-gradient-to:#0000001a}@supports (color:color-mix(in lab, red, red)){.to-black\/10{--tw-gradient-to:color-mix(in oklab, var(--color-black) 10%, transparent)}}.to-black\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-3{padding:calc(var(--spacing) * 3)}.p-5{padding:calc(var(--spacing) * 5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[11px\]{font-size:11px}.text-\[15px\]{font-size:15px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-pre-line{white-space:pre-line}.text-\[var\(--section-accent\)\]{color:var(--section-accent)}.text-\[var\(--section-accent-foreground\)\]{color:var(--section-accent-foreground)}.text-\[var\(--section-fg\)\]{color:var(--section-fg)}.text-\[var\(--section-muted\)\]{color:var(--section-muted)}.text-green-800{color:var(--color-green-800)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-white{color:var(--color-white)}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.text-white\/90{color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-700{color:var(--color-zinc-700)}.text-zinc-900{color:var(--color-zinc-900)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.opacity-15{opacity:.15}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.group-open\:rotate-180:is(:where(.group):is([open],:popover-open,:open) *){rotate:180deg}.placeholder\:text-\[var\(--section-muted\)\]::placeholder{color:var(--section-muted)}@media (hover:hover){.hover\:border-\[var\(--section-accent-soft\)\]:hover{border-color:var(--section-accent-soft)}.hover\:bg-\[var\(--section-accent-hover\)\]:hover{background-color:var(--section-accent-hover)}.hover\:bg-\[var\(--section-accent-soft\)\]:hover{background-color:var(--section-accent-soft)}.hover\:bg-zinc-50:hover{background-color:var(--color-zinc-50)}.hover\:bg-zinc-100:hover{background-color:var(--color-zinc-100)}.hover\:text-zinc-900:hover{color:var(--color-zinc-900)}.hover\:opacity-75:hover{opacity:.75}}.focus\:border-\[var\(--section-accent\)\]:focus{border-color:var(--section-accent)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-\[color-mix\(in_srgb\,var\(--section-accent\)_40\%\,transparent\)\]:focus{--tw-ring-color:var(--section-accent)}@supports (color:color-mix(in lab, red, red)){.focus\:ring-\[color-mix\(in_srgb\,var\(--section-accent\)_40\%\,transparent\)\]:focus{--tw-ring-color:color-mix(in srgb,var(--section-accent) 40%,transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-60:disabled{opacity:.6}@media not all and (min-width:40rem){.max-sm\:hidden{display:none}}@media (min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:48rem){.md\:absolute{position:absolute}.md\:left-0{left:calc(var(--spacing) * 0)}.md\:z-10{z-index:10}}@container (min-width:460px){.\@pv-sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.\@pv-sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (min-width:700px){.\@pv-md\:order-1{order:1}.\@pv-md\:order-2{order:2}.\@pv-md\:h-\[440px\]{height:440px}.\@pv-md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.\@pv-md\:py-20{padding-block:calc(var(--spacing) * 20)}.\@pv-md\:py-28{padding-block:calc(var(--spacing) * 28)}.\@pv-md\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\@pv-md\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}}@container (min-width:900px){.\@pv-lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.\@pv-lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@container (min-width:1100px){.\@pv-xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@container (min-width:2000px){.\@pv-2xl\:py-28{padding-block:calc(var(--spacing) * 28)}.\@pv-2xl\:py-36{padding-block:calc(var(--spacing) * 36)}.\@pv-2xl\:text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}}}:root,:host{--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-800:oklch(44.8% .119 151.328);--color-zinc-50:oklch(98.5% 0 0);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prenta/sections-react",
3
- "version": "0.18.14",
3
+ "version": "0.20.0",
4
4
  "license": "MIT",
5
5
  "description": "Public React renderer for Prenta CMS page sections — the canonical PageSection[] contract — with a consumer-controlled renderer registry.",
6
6
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "CHANGELOG.md"
36
36
  ],
37
37
  "dependencies": {
38
- "@prenta/core": "8.14.0"
38
+ "@prenta/core": "8.16.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=18.0.0",