@duffcloudservices/site-forms 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -115,7 +115,6 @@ Place a YAML file at `<site>/.dcs/forms/contact.yaml`:
115
115
 
116
116
  ```yaml
117
117
  formId: contact
118
- title: Contact Us
119
118
  submission:
120
119
  kind: lead
121
120
  fields:
@@ -177,7 +176,7 @@ shadcn primitives in without forking field components.
177
176
 
178
177
  | Slot | Scope | Default |
179
178
  | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------- |
180
- | `header` | `{ definition }` | `<h2>` + description |
179
+ | `header` | `{ definition }` | Empty; page/section headings live outside the managed form |
181
180
  | `progress` | `{ current, total, step }` | `Step N of M — Title` (multi-step only) |
182
181
  | `actions` | `{ isFirstStep, isLastStep, submitting, prev, next }` | Plain `<button>` elements |
183
182
  | `success` | `{ definition }` | `definition.successMessage` |
@@ -213,8 +212,19 @@ import {
213
212
 
214
213
  The form root carries `data-form-key="<formId>"` and every field
215
214
  wrapper carries `data-form-field-key="<fieldId>"`. The portal preview
216
- iframe bridge uses these to highlight and select form regions. Do not
217
- strip them in custom layouts.
215
+ iframe bridge uses these to discover managed forms, show the preview
216
+ affordance, and route preview click / context-menu actions into the same
217
+ portal `FormManagerSheet`. Do not strip these attributes in custom
218
+ layouts.
219
+
220
+ `definitionOverride` is a preview-only draft path for the iframe. The
221
+ durable form truth still lives in the form definition saved by the
222
+ portal and in the committed `.dcs/forms/<formId>.yaml` snapshot consumed
223
+ by the site runtime.
224
+
225
+ For the cross-package first-party component contract (runtime markers,
226
+ bridge discovery, portal entry points, rollout, validation), see
227
+ [`../FIRST-PARTY-COMPONENTS.md`](../FIRST-PARTY-COMPONENTS.md).
218
228
 
219
229
  ## Schema validation
220
230
 
@@ -249,6 +259,10 @@ pnpm --filter @duffcloudservices/site-forms type-check # vue-tsc --noEmit
249
259
  - **Publishing** — [`PUBLISHING.md`](./PUBLISHING.md) covers the
250
260
  registry, OIDC trusted publishing, version bump policy, and the
251
261
  exact dep line sibling customer-site repos should add.
262
+ - **First-party visual-editor contract** —
263
+ [`../FIRST-PARTY-COMPONENTS.md`](../FIRST-PARTY-COMPONENTS.md)
264
+ captures the shared adaptation model used by forms and future
265
+ component families.
252
266
  - **Validation CLI** — [`cli/forms/README.md`](../../cli/forms/README.md)
253
267
  documents `dcs forms validate` and `dcs forms doctor`, which lint
254
268
  the `.dcs/forms/*.yaml` files in a customer-site repo.
@@ -10,7 +10,7 @@ export interface SubmitOptions {
10
10
  }
11
11
  /**
12
12
  * POSTs a form submission to
13
- * `${apiBase}/public/sites/{siteSlug}/form-submissions`.
13
+ * `${apiBase}/sites/{siteSlug}/forms/{formId}/submissions`.
14
14
  *
15
15
  * Uses JSON for plain values and `multipart/form-data` when any
16
16
  * value is a `File` (file-upload fields).
package/dist/index.d.ts CHANGED
@@ -17,6 +17,8 @@ export { validateField, validateForm, isFieldVisible, hasErrors, } from './compo
17
17
  export { submitFormValues } from './composables/useFormSubmission';
18
18
  export type { SubmitOptions } from './composables/useFormSubmission';
19
19
  export { loadFormDefinitions, parseFormYaml } from './loaders/yaml';
20
+ export { buildStandardFormDefinition, STANDARD_FORM_PRESET_META, } from './presets';
21
+ export type { StandardFormPreset, BuildStandardFormOptions, } from './presets';
20
22
  export { validateFormDefinition, warnIfInvalid, } from './schema/validate';
21
23
  export type { SchemaValidationResult } from './schema/validate';
22
- export type { DcsFormSubmitPayload, DcsFormSubmitSuccess, DcsFormSubmitError, FormErrors, FormValues, PortalFormDefinition, PortalFormField, PortalFormFieldType, PortalFormFieldOption, PortalFormFieldValidation, PortalFormFieldVisibleIf, PortalFormFieldWidth, PortalFormStep, PortalFormSubmissionConfig, PortalFormSubmissionLeadConfig, PortalFormSubmissionEmailConfig, PortalFormSubmissionWebhookConfig, } from './types';
24
+ export type { DcsFormSubmitPayload, DcsFormSubmitSuccess, DcsFormSubmitError, FormErrors, FormValues, PortalFormDefinition, PortalFormField, PortalFormKind, PortalFormFieldRole, PortalFormAttachmentPolicy, PortalFormFieldType, PortalFormFieldOption, PortalFormFieldValidation, PortalFormFieldVisibleIf, PortalFormFieldWidth, PortalFormStep, PortalFormSubmissionConfig, PortalFormSubmissionLeadConfig, PortalFormSubmissionEmailConfig, PortalFormSubmissionWebhookConfig, } from './types';