processfocus 0.1.0-next.2 → 0.1.0-next.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.
Files changed (67) hide show
  1. package/dist/{auth-FmXptohB.mjs → auth-DWWupwJA.mjs} +57 -24
  2. package/dist/auth-config/src/lib/authentication-config.d.ts +13 -8
  3. package/dist/auth-config/src/lib/aws-role-binding.d.ts +21 -0
  4. package/dist/auth-config/src/lib/provider-types.d.ts +87 -76
  5. package/dist/auth-config/src/lib/workload-trust.d.ts +41 -0
  6. package/dist/auth.mjs +1 -2
  7. package/dist/business-calendar/src/lib/calendar-config.d.ts +73 -76
  8. package/dist/business-calendar/src/lib/calendar-period.d.ts +30 -30
  9. package/dist/business-calendar/src/lib/calendar-service.d.ts +10 -10
  10. package/dist/business-calendar/src/lib/datetime-utils.d.ts +1 -1
  11. package/dist/business-calendar/src/lib/holidays.d.ts +40 -40
  12. package/dist/business-calendar/src/lib/types.d.ts +29 -29
  13. package/dist/calendar.mjs +73 -63
  14. package/dist/form-schema/src/index.d.ts +4 -1
  15. package/dist/form-schema/src/lib/annotation-helpers.d.ts +2 -2
  16. package/dist/form-schema/src/lib/email.d.ts +2 -2
  17. package/dist/form-schema/src/lib/field-count.d.ts +2 -2
  18. package/dist/form-schema/src/lib/form-annotations.d.ts +6 -0
  19. package/dist/form-schema/src/lib/form-presentation.d.ts +30 -0
  20. package/dist/form-schema/src/lib/form-schema.d.ts +64 -34
  21. package/dist/form-schema/src/lib/number-from-string.d.ts +3 -0
  22. package/dist/form-schema/src/lib/phone.d.ts +2 -2
  23. package/dist/form-schema/src/lib/public-completion-correction.d.ts +5 -0
  24. package/dist/form-schema/src/lib/search-lookup-items.d.ts +3 -0
  25. package/dist/form-submission-schema/src/index.d.ts +3 -0
  26. package/dist/form-submission-schema/src/lib/executable-rules.d.ts +43 -0
  27. package/dist/form-submission-schema/src/lib/form-submission-schema.d.ts +33 -10
  28. package/dist/form-submission-schema/src/lib/json-schema.d.ts +3 -0
  29. package/dist/form-submission-schema/src/lib/submission-utils.d.ts +19 -0
  30. package/dist/forms.mjs +26 -2
  31. package/dist/frontend-manifest/src/lib/browser-plugin-artifact.d.ts +9 -0
  32. package/dist/frontend-manifest/src/lib/frontend-manifest.d.ts +8 -6
  33. package/dist/frontend-plugin-host/src/lib/frontend-plugin-host.d.ts +11 -1
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.mjs +466 -972
  36. package/dist/manifest.mjs +1 -2
  37. package/dist/plugin.mjs +1 -2
  38. package/dist/process/src/lib/form-authoring.d.ts +1 -1
  39. package/dist/process/src/lib/form-decoration.d.ts +3 -3
  40. package/dist/process/src/lib/form.d.ts +61 -97
  41. package/dist/process/src/lib/list.d.ts +36 -23
  42. package/dist/process/src/lib/lookup-accessor.d.ts +4 -1
  43. package/dist/process/src/lib/organisation.d.ts +14 -0
  44. package/dist/process/src/lib/process.d.ts +24 -2
  45. package/dist/process/src/lib/schedule.d.ts +1 -1
  46. package/dist/process/src/lib/step.d.ts +13 -3
  47. package/dist/process/src/lib/system-step-executor.d.ts +4 -4
  48. package/dist/process/src/lib/system-step.d.ts +11 -1
  49. package/dist/sdk/src/index.d.ts +1 -1
  50. package/dist/sdk/src/testing.d.ts +0 -1
  51. package/dist/{src-C-909PVQ.mjs → src-BQ55-khF.mjs} +118 -66
  52. package/dist/testing.d.ts +0 -1
  53. package/dist/testing.mjs +2 -4
  54. package/package.json +4 -4
  55. package/dist/form-client-representation/src/index.d.ts +0 -6
  56. package/dist/form-client-representation/src/lib/as-client-representation.d.ts +0 -31
  57. package/dist/form-client-representation/src/lib/client-form-definition.d.ts +0 -17
  58. package/dist/form-client-representation/src/lib/extract-annotations.d.ts +0 -20
  59. package/dist/form-client-representation/src/lib/plugin-registry.d.ts +0 -6
  60. package/dist/form-client-representation/src/lib/types.d.ts +0 -239
  61. package/dist/form-client-representation/src/lib/walker.d.ts +0 -68
  62. package/dist/form-rule/src/index.d.ts +0 -3
  63. package/dist/form-rule/src/lib/evaluator.d.ts +0 -2
  64. package/dist/form-rule/src/lib/paths.d.ts +0 -9
  65. package/dist/form-rule/src/lib/types.d.ts +0 -89
  66. package/dist/form-schema/src/lib/property-signature.d.ts +0 -3
  67. package/dist/paths-BkzLn-rG.mjs +0 -282
@@ -104,7 +104,7 @@ export type CalendarSlotMarker = {
104
104
  readonly __calendarSlot: unique symbol;
105
105
  };
106
106
  /** Preserve read-only classification in downstream process-state inference. */
107
- export declare const ReadOnly: <A, I, R>(schema: Schema.Schema<A, I, R>) => Schema.Schema<A, I, R> & ReadOnlyMarker;
107
+ export declare const ReadOnly: <A, I, R>(schema: Schema.Codec<A, I, R, R>) => Schema.Codec<A, I, R, R> & ReadOnlyMarker;
108
108
  type PresentationOnly<Field> = Field extends StructuralOnlyMarker ? true : Field extends FlattenMarker & {
109
109
  readonly fields: infer Fields;
110
110
  } ? Exclude<{
@@ -118,15 +118,20 @@ export type StableFormFields<Fields> = {
118
118
  readonly fields: StableFormFields<Nested>;
119
119
  } : Fields[Key];
120
120
  };
121
- export declare const Wrapper: <Fields extends Schema.Struct.Fields>(fields: Fields & StableFormFields<NoInfer<Fields>>) => Schema.Struct<Fields> & FlattenMarker;
122
- export declare const StructuralOnly: Schema.Schema.Any & StructuralOnlyMarker;
123
- export declare const Divider: Schema.Schema.Any & StructuralOnlyMarker;
124
- export declare const TextBlock: (text: string) => Schema.Schema.Any & StructuralOnlyMarker;
125
- export declare const DynamicTextBlock: (options: DynamicTextBlockOptions) => Schema.Schema.Any & StructuralOnlyMarker;
126
- export declare const Image: (src: string, alt?: string) => Schema.Schema.Any & StructuralOnlyMarker;
127
- export declare const Link: (url: string, text: string) => Schema.Schema.Any & StructuralOnlyMarker;
128
- export declare const LinkButton: (url: string, text: string, options?: LinkButtonOptions) => Schema.Schema.Any & StructuralOnlyMarker;
129
- export declare const MetricBreakdown: (options: MetricBreakdownOptions) => Schema.Schema.Any & StructuralOnlyMarker;
121
+ export declare const Wrapper: <Fields extends Schema.Struct.Fields>(fields: Fields & StableFormFields<NoInfer<Fields>>, options?: {
122
+ readonly label?: string;
123
+ readonly description?: string;
124
+ }) => Schema.Struct<Fields> & FlattenMarker;
125
+ export declare const StructuralOnly: Schema.Codec<unknown, unknown, never, never> & StructuralOnlyMarker;
126
+ export declare const Divider: Schema.Codec<unknown, unknown, never, never> & StructuralOnlyMarker;
127
+ export declare const TextBlock: (text: string) => Schema.Codec<unknown, unknown, never, never> & StructuralOnlyMarker;
128
+ /** Display-only list: blank lines separate items; an empty body hides the list. */
129
+ export declare const TextList: (heading: string) => Schema.Codec<unknown, unknown, never, never> & StructuralOnlyMarker;
130
+ export declare const DynamicTextBlock: (options: DynamicTextBlockOptions) => Schema.Codec<unknown, unknown, never, never> & StructuralOnlyMarker;
131
+ export declare const Image: (src: string, alt?: string) => Schema.Codec<unknown, unknown, never, never> & StructuralOnlyMarker;
132
+ export declare const Link: (url: string, text: string) => Schema.Codec<unknown, unknown, never, never> & StructuralOnlyMarker;
133
+ export declare const LinkButton: (url: string, text: string, options?: LinkButtonOptions) => Schema.Codec<unknown, unknown, never, never> & StructuralOnlyMarker;
134
+ export declare const MetricBreakdown: (options: MetricBreakdownOptions) => Schema.Codec<unknown, unknown, never, never> & StructuralOnlyMarker;
130
135
  export declare const isMetricBreakdownOptions: (value: unknown) => value is MetricBreakdownOptions;
131
136
  /**
132
137
  * Type for field options, generic over the field's value type.
@@ -177,7 +182,7 @@ export interface FieldPermissionMetadata {
177
182
  readonly modify: FieldPermissionRoleRef;
178
183
  }
179
184
  export declare const isFieldPermissionMetadata: (value: unknown) => value is FieldPermissionMetadata;
180
- export declare const applyFieldAnnotations: <A, I, R>(schema: Schema.Schema<A, I, R>, options?: FieldOptions<unknown>) => Schema.Schema<A, I, R>;
185
+ export declare const applyFieldAnnotations: <A, I, R>(schema: Schema.Codec<A, I, R, R>, options?: FieldOptions<unknown>) => Schema.Codec<A, I, R, R>;
181
186
  /**
182
187
  * Create a text field with optional label and description
183
188
  *
@@ -190,12 +195,12 @@ export declare const applyFieldAnnotations: <A, I, R>(schema: Schema.Schema<A, I
190
195
  */
191
196
  export declare function TextField(options: FieldOptions<string> & {
192
197
  readonly readOnly: true;
193
- }): Schema.Schema<string, string, never> & ReadOnlyMarker;
194
- export declare function TextField(options?: FieldOptions<string>): Schema.Schema<string, string, never>;
198
+ }): Schema.Codec<string, string, never, never> & ReadOnlyMarker;
199
+ export declare function TextField(options?: FieldOptions<string>): Schema.Codec<string, string, never, never>;
195
200
  export declare function TextArea(options: FieldOptions<string> & {
196
201
  readonly readOnly: true;
197
- }): Schema.Schema<string, string, never> & ReadOnlyMarker;
198
- export declare function TextArea(options?: FieldOptions<string>): Schema.Schema<string, string, never>;
202
+ }): Schema.Codec<string, string, never, never> & ReadOnlyMarker;
203
+ export declare function TextArea(options?: FieldOptions<string>): Schema.Codec<string, string, never, never>;
199
204
  /**
200
205
  * Create a text field from a transformation schema
201
206
  *
@@ -206,7 +211,7 @@ export declare function TextArea(options?: FieldOptions<string>): Schema.Schema<
206
211
  * })
207
212
  * ```
208
213
  */
209
- export declare const TextFieldFrom: <I, R>(schema: Schema.Schema<string, I, R>, options?: FieldOptions<I>) => Schema.Schema<string, I, R>;
214
+ export declare const TextFieldFrom: <I, R>(schema: Schema.Codec<string, I, R, R>, options?: FieldOptions<I>) => Schema.Codec<string, I, R, R>;
210
215
  /**
211
216
  * Validate that a string is a well-formed HTTPS URL.
212
217
  *
@@ -233,7 +238,7 @@ export declare const isHttpsUrl: (value: string) => boolean;
233
238
  * })
234
239
  * ```
235
240
  */
236
- export declare const HttpsUrlField: (options?: FieldOptions<string>) => Schema.Schema<string, string, never>;
241
+ export declare const HttpsUrlField: (options?: FieldOptions<string>) => Schema.Codec<string, string, never, never>;
237
242
  /**
238
243
  * Create a number field with optional label and description
239
244
  *
@@ -244,21 +249,25 @@ export declare const HttpsUrlField: (options?: FieldOptions<string>) => Schema.S
244
249
  * })
245
250
  * ```
246
251
  */
247
- export declare const NumberField: (options?: FieldOptions<number>) => Schema.Schema<number, number, never>;
252
+ export declare const NumberField: (options?: FieldOptions<number>) => Schema.Codec<number, number, never, never>;
248
253
  /**
249
254
  * Create a number field from a transformation schema
250
255
  *
251
256
  * @example
252
257
  * ```typescript
253
258
  * const schema = Schema.Struct({
254
- * age: NumberFieldFrom(Schema.NumberFromString, { label: "Your age" })
259
+ * age: NumberFieldFrom(NumberFromString, { label: "Your age" })
255
260
  * })
256
261
  * ```
257
262
  */
258
- export declare const NumberFieldFrom: <I, R>(schema: Schema.Schema<number, I, R>, options?: FieldOptions<I> & {
263
+ export declare const NumberFieldFrom: <I, R>(schema: Schema.Codec<number, I, R, R>, options?: FieldOptions<I> & {
264
+ required?: boolean;
265
+ }) => Schema.Codec<number, I, R, R>;
266
+ export declare const DateField: (options?: FieldOptions<string>) => Schema.Codec<DateTime.Utc, string, never, never>;
267
+ /** A wall-clock date and time. The caller interprets it in the intended zone. */
268
+ export declare const LocalDateTimeField: (options?: FieldOptions<string> & {
259
269
  required?: boolean;
260
- }) => Schema.Schema<number, I, R>;
261
- export declare const DateField: (options?: FieldOptions<string>) => Schema.Schema<DateTime.Utc, string, never>;
270
+ }) => Schema.Codec<string, string, never, never>;
262
271
  /**
263
272
  * Create a boolean field with optional label and description
264
273
  *
@@ -274,7 +283,7 @@ export declare const DateField: (options?: FieldOptions<string>) => Schema.Schem
274
283
  */
275
284
  export declare const BooleanField: (options?: FieldOptions<boolean> & {
276
285
  required?: boolean;
277
- }) => Schema.Schema<boolean, boolean, never>;
286
+ }) => Schema.Codec<boolean, boolean, never, never>;
278
287
  /**
279
288
  * File upload metadata embedded in the FormFileInput annotation.
280
289
  * Flows through the AST walker to the client representation.
@@ -307,7 +316,7 @@ export declare const FileField: (options: FieldOptions<string> & {
307
316
  documentStore: DocumentStoreRef;
308
317
  accept?: string;
309
318
  maxSize?: number;
310
- }) => Schema.Schema<string, string, never>;
319
+ }) => Schema.Codec<string, string, never, never>;
311
320
  /**
312
321
  * Create a list/array field whose items are structs.
313
322
  *
@@ -323,7 +332,7 @@ export declare const FileField: (options: FieldOptions<string> & {
323
332
  * })
324
333
  * ```
325
334
  */
326
- export declare const ListField: <Fields extends Schema.Struct.Fields>(itemFields: Fields & StableFormFields<NoInfer<Fields>>, options?: ListFieldOptions<ReadonlyArray<Schema.Struct.Encoded<Fields>>>) => Schema.Schema<ReadonlyArray<Schema.Struct.Type<Fields>>, ReadonlyArray<Schema.Struct.Encoded<Fields>>, Schema.Struct.Context<Fields>> & ListFieldMarker<Fields>;
335
+ export declare const ListField: <Fields extends Schema.Struct.Fields>(itemFields: Fields & StableFormFields<NoInfer<Fields>>, options?: ListFieldOptions<ReadonlyArray<Schema.Struct.Encoded<Fields>>>) => Schema.Codec<ReadonlyArray<Schema.Struct.Type<Fields>>, ReadonlyArray<Schema.Struct.Encoded<Fields>>, Schema.Struct<Fields>["DecodingServices"], Schema.Struct<Fields>["DecodingServices"]> & ListFieldMarker<Fields>;
327
336
  export type ListFieldMarker<Fields extends Schema.Struct.Fields> = {
328
337
  readonly __listFields: Fields;
329
338
  };
@@ -336,18 +345,29 @@ export type TableFieldMarker = {
336
345
  * The row field labels become the table column headings. Table fields are for
337
346
  * display only and are excluded from form submissions via the read-only marker.
338
347
  */
339
- export declare const TableField: <Fields extends Schema.Struct.Fields>(itemFields: Fields & StableFormFields<NoInfer<Fields>>, options?: Omit<FieldOptions<ReadonlyArray<Schema.Struct.Encoded<Fields>>>, "permission" | "readOnly">) => Schema.Schema<ReadonlyArray<Schema.Schema.Type<Schema.Struct<Fields>>>, ReadonlyArray<Schema.Schema.Encoded<Schema.Struct<Fields>>>, never> & TableFieldMarker & ReadOnlyMarker;
348
+ export declare const TableField: <Fields extends Schema.Struct.Fields>(itemFields: Fields & StableFormFields<NoInfer<Fields>>, options?: Omit<FieldOptions<ReadonlyArray<Schema.Struct.Encoded<Fields>>>, "permission" | "readOnly">) => Schema.Codec<ReadonlyArray<Schema.Schema.Type<Schema.Struct<Fields>>>, ReadonlyArray<Schema.Codec.Encoded<Schema.Struct<Fields>>>, never, never> & TableFieldMarker & ReadOnlyMarker;
340
349
  /**
341
350
  * An item returned by a lookup query.
342
351
  */
343
352
  export interface LookupItem {
344
353
  readonly value: string;
345
354
  readonly label: string;
355
+ /** Additional authored search text; IDs are not implicitly searchable. */
356
+ readonly searchText?: string;
346
357
  }
347
358
  export interface RadioFieldOption<Value extends string = string> {
348
359
  readonly value: Value;
349
360
  readonly label: string;
350
361
  }
362
+ export interface CheckboxGroupOption {
363
+ readonly value: string;
364
+ readonly label: string;
365
+ readonly description?: string;
366
+ }
367
+ /** Choices are presentation, not an eligibility constraint: retain unavailable IDs. */
368
+ export declare const CheckboxGroupField: (options: FieldOptions<readonly string[]> & {
369
+ readonly options: readonly CheckboxGroupOption[];
370
+ }) => Schema.Codec<readonly string[], readonly string[], never, never>;
351
371
  export interface RadioFieldMetadata<Value extends string = string> {
352
372
  readonly options: readonly [
353
373
  RadioFieldOption<Value>,
@@ -363,16 +383,25 @@ type RadioOptionValues<Options extends readonly [
363
383
  ]> = Options[number]["value"];
364
384
  export declare const RadioField: <const Options extends readonly [RadioFieldOption<string>, ...RadioFieldOption<string>[]]>(options: FieldOptions<RadioOptionValues<Options>> & {
365
385
  readonly options: Options;
366
- }) => Schema.Schema<RadioOptionValues<Options>, RadioOptionValues<Options>, never> & RadioFieldMarker;
386
+ }) => Schema.Codec<RadioOptionValues<Options>, RadioOptionValues<Options>, never, never> & RadioFieldMarker;
367
387
  /**
368
388
  * Metadata stored in the FormLookupInput annotation.
369
389
  * Contains the optional query function that searches for matching items.
370
390
  * When no query is provided, the field is still marked as a lookup
371
391
  * but the query must be supplied via `Form.lookups.<field>.setQuery()`.
372
392
  */
373
- export interface LookupFieldMetadata {
393
+ export type LookupMode = {
394
+ readonly mode?: "server";
395
+ readonly maxItems?: never;
396
+ } | {
397
+ readonly mode: "local";
398
+ readonly maxItems: number;
399
+ };
400
+ export type LookupFieldMetadata = LookupMode & {
401
+ /** Resolve one currently eligible identity independently of choice loading. */
402
+ readonly resolve?: (value: string) => Effect.Effect<LookupItem | null, unknown, unknown>;
374
403
  readonly query?: (filter: string, limit: number) => Effect.Effect<ReadonlyArray<LookupItem>, unknown, unknown>;
375
- }
404
+ };
376
405
  type QueryValue<Query> = Query | DeferredValue<Query>;
377
406
  export interface CalendarSlotItem {
378
407
  readonly value: string;
@@ -430,9 +459,10 @@ export type CalendarSlotFieldOptions = FieldOptions<string> & {
430
459
  * })
431
460
  * ```
432
461
  */
433
- export declare const LookupField: (options: FieldOptions<string> & {
462
+ export declare const LookupField: (options: FieldOptions<string> & LookupMode & {
463
+ readonly resolve?: LookupFieldMetadata["resolve"];
434
464
  query?: QueryValue<(filter: string, limit: number) => Effect.Effect<ReadonlyArray<LookupItem>, unknown, unknown>>;
435
- }) => Schema.Schema<string, string, never> & LookupMarker;
465
+ }) => Schema.Codec<string, string, never, never> & LookupMarker;
436
466
  /**
437
467
  * Create a text field with searchable suggestions.
438
468
  *
@@ -442,8 +472,8 @@ export declare const LookupField: (options: FieldOptions<string> & {
442
472
  */
443
473
  export declare const SuggestionField: (options: FieldOptions<string> & {
444
474
  query?: QueryValue<(filter: string, limit: number) => Effect.Effect<ReadonlyArray<LookupItem>, unknown, unknown>>;
445
- }) => Schema.Schema<string, string, never> & LookupMarker;
446
- export declare const CalendarSlotField: (options: CalendarSlotFieldOptions) => Schema.Schema<string, string, never> & CalendarSlotMarker;
475
+ }) => Schema.Codec<string, string, never, never> & LookupMarker;
476
+ export declare const CalendarSlotField: (options: CalendarSlotFieldOptions) => Schema.Codec<string, string, never, never> & CalendarSlotMarker;
447
477
  export type ProviderUserDefault = string | typeof CurrentProviderUser;
448
478
  export type ProviderUserFieldOptions = Omit<FieldOptions<ProviderUserDefault>, "default"> & {
449
479
  readonly default?: FormValue<ProviderUserDefault> | (() => ProviderUserDefault);
@@ -455,5 +485,5 @@ export type ProviderUserFieldOptions = Omit<FieldOptions<ProviderUserDefault>, "
455
485
  * email. `CurrentProviderUser` can be used as a symbolic default for later
456
486
  * runtime resolution.
457
487
  */
458
- export declare const ProviderUserField: (options?: ProviderUserFieldOptions) => Schema.Schema<string, string, never> & ProviderUserMarker;
488
+ export declare const ProviderUserField: (options?: ProviderUserFieldOptions) => Schema.Codec<string, string, never, never> & ProviderUserMarker;
459
489
  export {};
@@ -0,0 +1,3 @@
1
+ import { Schema } from "effect";
2
+ /** Preserve the authored numeric-string contract, including explicit non-finite values. */
3
+ export declare const NumberFromString: Schema.decodeTo<Schema.Number, Schema.String, never, never>;
@@ -1,4 +1,4 @@
1
1
  import { Schema } from "effect";
2
2
  import { type FieldOptions } from "./form-schema.js";
3
- export declare const Phone: Schema.refine<string, typeof Schema.Trim>;
4
- export declare const PhoneField: (options?: FieldOptions<string>) => Schema.Schema<string, string, never>;
3
+ export declare const Phone: Schema.Trim;
4
+ export declare const PhoneField: (options?: FieldOptions<string>) => Schema.Codec<string, string, never, never>;
@@ -0,0 +1,5 @@
1
+ import { Schema } from "effect";
2
+ /** System-owned correction has its own authorization and submission operation. */
3
+ export declare const publicCompletionCorrectionForm: Schema.Struct<{
4
+ readonly correctedEmail: Schema.Codec<string, string, never, never>;
5
+ }>;
@@ -0,0 +1,3 @@
1
+ import type { LookupItem } from "./form-schema.js";
2
+ /** Apply the lookup search contract to a complete eligible datasource, before limiting. */
3
+ export declare function searchLookupItems(items: readonly LookupItem[], filter: string, limit: number): LookupItem[];
@@ -1,2 +1,5 @@
1
+ export * from "./lib/executable-rules.js";
1
2
  export * from "./lib/form-submission-schema.js";
3
+ export * from "./lib/json-schema.js";
2
4
  export * from "./lib/schema-defaults.js";
5
+ export * from "./lib/submission-utils.js";
@@ -0,0 +1,43 @@
1
+ import { Schema } from "effect";
2
+ import { type ListFieldMarker, type ReadOnlyMarker, type StructuralOnlyMarker } from "../../../form-schema/src/index.js";
3
+ import { type FlattenFields } from "./form-submission-schema.js";
4
+ export interface ExecutableFieldState {
5
+ readonly hidden?: boolean;
6
+ readonly disabled?: boolean;
7
+ readonly required?: boolean;
8
+ readonly label?: string;
9
+ }
10
+ type DeclaredField<F> = F extends {
11
+ readonly members: ReadonlyArray<infer M>;
12
+ } ? Exclude<DeclaredField<M>, typeof Schema.Undefined | typeof Schema.Null> : F extends {
13
+ readonly schema: infer S;
14
+ } ? DeclaredField<S> : F;
15
+ type Targets<F extends Schema.Struct.Fields> = {
16
+ readonly [K in keyof F]?: DeclaredField<F[K]> extends ReadOnlyMarker | StructuralOnlyMarker ? Omit<ExecutableFieldState, "required"> : DeclaredField<F[K]> extends Schema.Struct<infer Children> ? Targets<Children> & {
17
+ readonly $self?: Omit<ExecutableFieldState, "required">;
18
+ } & Omit<ExecutableFieldState, "required"> : DeclaredField<F[K]> extends ListFieldMarker<infer Children> ? Targets<Children> & ExecutableFieldState : ExecutableFieldState;
19
+ };
20
+ type Available<T> = T extends ReadonlyArray<unknown> ? T : T extends object ? {
21
+ readonly [K in keyof T]?: Available<T[K]>;
22
+ } : T;
23
+ /** Rules live in the public schema module and execute over independently decoded input. */
24
+ export declare const withFormRules: <F extends Schema.Struct.Fields>(schema: Schema.Struct<F>, ...rules: ReadonlyArray<(values: Available<Schema.Struct.Type<FlattenFields<F> extends infer P extends Schema.Struct.Fields ? P : never>>) => Targets<F>>) => Schema.Struct<F>;
25
+ export interface ExecutableField {
26
+ readonly kind: "input" | "container" | "display";
27
+ readonly path: readonly string[];
28
+ readonly target: readonly string[];
29
+ readonly schema: Schema.Top;
30
+ readonly state: ExecutableFieldState;
31
+ }
32
+ export declare const executableFields: (schema: Schema.Struct<Schema.Struct.Fields>, input: Record<string, unknown>, inaccessible?: readonly string[], originals?: Record<string, unknown>) => readonly ExecutableField[];
33
+ /** Stored process values are decoded; authored defaults are already encoded. */
34
+ export declare const executableOriginalValues: (schema: Schema.Struct<Schema.Struct.Fields>, defaults: Record<string, unknown>, state?: Record<string, unknown>) => Record<string, unknown>;
35
+ /** Returns encoded submission values; hidden drafts are left untouched. */
36
+ export declare const prepareExecutableSubmission: (schema: Schema.Struct<Schema.Struct.Fields>, input: Record<string, unknown>, originals: Record<string, unknown>, inaccessible?: readonly string[]) => {
37
+ readonly values: Record<string, unknown>;
38
+ readonly errors: readonly {
39
+ field: string;
40
+ message: string;
41
+ }[];
42
+ };
43
+ export {};
@@ -20,23 +20,46 @@ export declare class InvalidFlattenAnnotationError extends InvalidFlattenAnnotat
20
20
  }
21
21
  type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
22
22
  type IsExcluded<Field> = Field extends StructuralOnlyMarker | ReadOnlyMarker ? true : Field extends {
23
+ readonly schema: infer Inner;
24
+ } ? IsExcluded<Inner> : Field extends {
23
25
  readonly from: infer From;
24
26
  } ? IsExcluded<From> : Field extends {
25
27
  readonly members: ReadonlyArray<infer Member>;
26
28
  } ? true extends IsExcluded<Member> ? true : false : false;
27
- type ProjectedStruct<Fields extends Schema.Struct.Fields> = Schema.Struct<FlattenFields<Fields> extends infer F extends Schema.Struct.Fields ? F : never>;
28
- type ProjectSchema<S extends Schema.Schema.All> = S extends Schema.Struct<infer Fields> ? ProjectedStruct<Fields> : S extends ListFieldMarker<infer Items> ? Schema.Array$<ProjectedStruct<Items>> : S extends Schema.Union<infer Members> ? Schema.Union<{
29
- [K in keyof Members]: ProjectSchema<Members[K]>;
30
- }> : S extends Schema.transformOrFail<infer From, infer To, infer R> ? Schema.Schema<Schema.Schema.Type<ProjectSchema<To>>, Schema.Schema.Encoded<ProjectSchema<From>>, R | Schema.Schema.Context<ProjectSchema<From>> | Schema.Schema.Context<ProjectSchema<To>>> : S extends Schema.refine<infer A, infer From> ? Schema.Schema<Schema.Schema.Type<ProjectSchema<From>> & Omit<A, keyof Schema.Schema.Type<From>>, Schema.Schema.Encoded<ProjectSchema<From>>, Schema.Schema.Context<ProjectSchema<From>>> : S;
31
- type ProjectField<Field extends Schema.Struct.Fields[string]> = Field extends Schema.PropertySignature<infer TT, infer A, infer Key, infer ET, infer I, infer Default, infer _R> & {
32
- readonly from: infer From extends Schema.Schema.All;
33
- } ? Schema.PropertySignature<TT, Schema.Schema.Type<ProjectSchema<From>> | Exclude<A, Schema.Schema.Type<From>>, Key, ET, Schema.Schema.Encoded<ProjectSchema<From>> | Exclude<I, Schema.Schema.Encoded<From>>, Default, Schema.Schema.Context<ProjectSchema<From>>> : Field extends Schema.Schema.All ? ProjectSchema<Field> : Field;
29
+ type ProjectedStruct<Fields extends Schema.Struct.Fields, KeepReadOnly extends boolean> = Schema.Struct<(KeepReadOnly extends true ? FlattenFieldsKeepingReadOnly<Fields> : FlattenFields<Fields>) extends infer F extends Schema.Struct.Fields ? F : never>;
30
+ type ProjectSchema<S extends Schema.Constraint, KeepReadOnly extends boolean = false> = S extends Schema.Struct<infer Fields> ? ProjectedStruct<Fields, KeepReadOnly> : S extends ListFieldMarker<infer Items> ? Schema.$Array<ProjectedStruct<Items, KeepReadOnly>> : S extends Schema.Union<infer Members> ? Schema.Union<{
31
+ [K in keyof Members]: ProjectSchema<Members[K], KeepReadOnly>;
32
+ }> : S extends Schema.optionalKey<infer Inner> ? Schema.optionalKey<ProjectSchema<Inner, KeepReadOnly>> : S extends Schema.optional<infer Inner> ? Schema.optional<ProjectSchema<Inner, KeepReadOnly>> : S extends Schema.decodeTo<infer To, infer From, infer RD, infer RE> ? Schema.decodeTo<ProjectSchema<To, KeepReadOnly>, ProjectSchema<From, KeepReadOnly>, RD, RE> : S extends Schema.toType<infer Inner> ? Schema.toType<ProjectSchema<Inner, KeepReadOnly>> : S extends Schema.toEncoded<infer Inner> ? Schema.toEncoded<ProjectSchema<Inner, KeepReadOnly>> : KeepReadOnly extends true ? S extends Schema.$Array<infer Item> ? Schema.$Array<ProjectSchema<Item, KeepReadOnly>> : S : S;
33
+ type ProjectField<Field extends Schema.Struct.Fields[string]> = ProjectSchema<Field>;
34
+ type WrapperFields<Field> = Field extends Schema.Struct<infer Fields> & FlattenMarker ? FlattenFields<Fields> : Field extends Schema.toEncoded<infer Inner> ? WrapperFields<Inner> extends infer Fields extends Schema.Struct.Fields ? {
35
+ [K in keyof Fields]: Schema.toEncoded<Fields[K]>;
36
+ } : never : never;
34
37
  export type FlattenFields<Fields extends Schema.Struct.Fields> = UnionToIntersection<{
35
- [K in keyof Fields]: IsExcluded<Fields[K]> extends true ? never : Fields[K] extends Schema.Struct<infer F> & FlattenMarker ? FlattenFields<F> : {
38
+ [K in keyof Fields]: IsExcluded<Fields[K]> extends true ? never : [WrapperFields<Fields[K]>] extends [never] ? {
36
39
  [P in K]: ProjectField<Fields[K]>;
37
- };
40
+ } : WrapperFields<Fields[K]>;
38
41
  }[keyof Fields]>;
39
- export declare const isStructSchema: (field: Schema.Schema.Any) => field is Schema.Struct<Schema.Struct.Fields>;
42
+ type IsStructuralOnly<Field> = Field extends StructuralOnlyMarker ? true : Field extends {
43
+ readonly schema: infer Inner;
44
+ } ? IsStructuralOnly<Inner> : Field extends {
45
+ readonly from: infer From;
46
+ } ? IsStructuralOnly<From> : Field extends {
47
+ readonly members: ReadonlyArray<infer Member>;
48
+ } ? true extends IsStructuralOnly<Member> ? true : false : false;
49
+ type WrapperFieldsKeepingReadOnly<Field> = Field extends Schema.Struct<infer Fields> & FlattenMarker ? FlattenFieldsKeepingReadOnly<Fields> : Field extends Schema.toEncoded<infer Inner> ? WrapperFieldsKeepingReadOnly<Inner> extends infer Fields extends Schema.Struct.Fields ? {
50
+ [K in keyof Fields]: Schema.toEncoded<Fields[K]>;
51
+ } : never : never;
52
+ /**
53
+ * Flatten wrapper fields like `FlattenFields`, but keep read-only fields:
54
+ * detail/output data is display-only content that queries still return.
55
+ * Structural-only elements are omitted, matching GraphQL output walking.
56
+ */
57
+ export type FlattenFieldsKeepingReadOnly<Fields extends Schema.Struct.Fields> = UnionToIntersection<{
58
+ [K in keyof Fields]: IsStructuralOnly<Fields[K]> extends true ? never : [WrapperFieldsKeepingReadOnly<Fields[K]>] extends [never] ? {
59
+ [P in K]: ProjectSchema<Fields[K], true>;
60
+ } : WrapperFieldsKeepingReadOnly<Fields[K]>;
61
+ }[keyof Fields]>;
62
+ export declare const isStructSchema: (field: Schema.Constraint) => field is Schema.Struct<Schema.Struct.Fields>;
40
63
  type FlattenedSubmissionStruct<Fields extends Schema.Struct.Fields> = Schema.Struct<FlattenFields<Fields> extends infer F extends Schema.Struct.Fields ? F : never>;
41
64
  export type SubmissionSchemaError = FieldNameCollisionError | InvalidFlattenAnnotationError;
42
65
  export declare const submissionSchema: <Fields extends Schema.Struct.Fields>(schema: Schema.Struct<Fields>) => Effect.Effect<FlattenedSubmissionStruct<Fields>, SubmissionSchemaError>;
@@ -0,0 +1,3 @@
1
+ import { JsonSchema, Schema } from "effect";
2
+ /** Render the existing draft-07 form contract, including referenced definitions. */
3
+ export declare const toFormJsonSchema: (schema: Schema.Constraint) => JsonSchema.JsonSchema;
@@ -0,0 +1,19 @@
1
+ import { Option, Schema } from "effect";
2
+ interface ValidationError {
3
+ readonly field: string;
4
+ readonly message: string;
5
+ }
6
+ /**
7
+ * Extracts validation errors from an Effect Schema ParseError.
8
+ * Field path is returned in dot notation (e.g., "address.city").
9
+ */
10
+ export declare const extractValidationErrors: (parseError: Schema.SchemaError) => ValidationError[];
11
+ export declare const getSubmissionFields: (fields: Schema.Struct.Fields) => {
12
+ readonly [x: string]: Schema.Constraint;
13
+ } & {
14
+ readonly [x: number]: Schema.Constraint;
15
+ } & {
16
+ readonly [x: symbol]: Schema.Constraint;
17
+ };
18
+ export declare const getSchemaAnnotationDeep: (schema: Schema.Struct.Fields[string], annotationId: symbol) => Option.Option<unknown>;
19
+ export {};
package/dist/forms.mjs CHANGED
@@ -1,2 +1,26 @@
1
- import { $ as Wrapper, A as LINK_URL_SYMBOL, B as RadioField, C as FLATTEN_SYMBOL, Ct as FormRequired, D as LINK_COLOR_SYMBOL, Dt as FormTextAreaInput, E as Image, Et as FormTableInput, F as METRIC_BREAKDOWN_SYMBOL, G as SuggestionField, H as STRUCTURAL_ONLY_SYMBOL, I as MetricBreakdown, J as TableField, K as TEXTBLOCK_CONTENT_SYMBOL, L as NumberField, M as LinkButton, N as ListField, O as LINK_DISPLAY_SYMBOL, P as LookupField, Q as TextFieldFrom, R as NumberFieldFrom, S as DynamicTextBlock, St as FormReadOnly, T as HttpsUrlField, Tt as FormSuggestionInput, U as STRUCTURAL_TYPE_SYMBOL, V as ReadOnly, W as StructuralOnly, X as TextBlock, Y as TextArea, Z as TextField, _ as BooleanField, _t as FormNumberInput, a as countInvalidFields, at as FormAutoComplete, b as DateField, bt as FormProviderUserInput, c as EmailField, ct as FormDateInput, d as isDeferredValue, dt as FormEmailInput, et as applyFieldAnnotations, f as fieldAnnotation, ft as FormFileInput, g as isReadOnlyField, gt as FormMessage, h as hasStructuralOnlyAnnotation, ht as FormLookupInput, i as calculateFieldCompletion, it as isMetricBreakdownOptions, j as Link, k as LINK_TEXT_SYMBOL, l as DeferredValueTypeId, lt as FormDefault, m as hasFlattenAnnotation, mt as FormListInput, n as Phone, nt as isHttpsUrl, o as countTotalFields, ot as FormCalendarSlotInput, p as fieldInputAst, pt as FormLabel, q as TEXTBLOCK_DYNAMIC_CONTENT_SYMBOL, r as PhoneField, rt as isListFieldMetadata, s as Email, st as FormComponentPluginType, t as mapFormPropertySignature, tt as isFieldPermissionMetadata, u as FormDeferredContent, ut as FormDescription, v as CalendarSlotField, vt as FormPermission, w as FileField, wt as FormStaticText, x as Divider, xt as FormRadioInput, y as CurrentProviderUser, yt as FormPhoneInput, z as ProviderUserField } from "./src-C-909PVQ.mjs";
2
- export { BooleanField, CalendarSlotField, CurrentProviderUser, DateField, DeferredValueTypeId, Divider, DynamicTextBlock, Email, EmailField, FLATTEN_SYMBOL, FileField, FormAutoComplete, FormCalendarSlotInput, FormComponentPluginType, FormDateInput, FormDefault, FormDeferredContent, FormDescription, FormEmailInput, FormFileInput, FormLabel, FormListInput, FormLookupInput, FormMessage, FormNumberInput, FormPermission, FormPhoneInput, FormProviderUserInput, FormRadioInput, FormReadOnly, FormRequired, FormStaticText, FormSuggestionInput, FormTableInput, FormTextAreaInput, HttpsUrlField, Image, LINK_COLOR_SYMBOL, LINK_DISPLAY_SYMBOL, LINK_TEXT_SYMBOL, LINK_URL_SYMBOL, Link, LinkButton, ListField, LookupField, METRIC_BREAKDOWN_SYMBOL, MetricBreakdown, NumberField, NumberFieldFrom, Phone, PhoneField, ProviderUserField, RadioField, ReadOnly, STRUCTURAL_ONLY_SYMBOL, STRUCTURAL_TYPE_SYMBOL, StructuralOnly, SuggestionField, TEXTBLOCK_CONTENT_SYMBOL, TEXTBLOCK_DYNAMIC_CONTENT_SYMBOL, TableField, TextArea, TextBlock, TextField, TextFieldFrom, Wrapper, applyFieldAnnotations, calculateFieldCompletion, countInvalidFields, countTotalFields, fieldAnnotation, fieldInputAst, hasFlattenAnnotation, hasStructuralOnlyAnnotation, isDeferredValue, isFieldPermissionMetadata, isHttpsUrl, isListFieldMetadata, isMetricBreakdownOptions, isReadOnlyField, mapFormPropertySignature };
1
+ import { $ as TableField, A as Image, At as FormProviderUserInput, B as METRIC_BREAKDOWN_SYMBOL, C as CurrentProviderUser, Ct as FormLocalDateTimeInput, D as FLATTEN_SYMBOL, Dt as FormPermission, E as DynamicTextBlock, Et as FormNumberInput, F as Link, Ft as FormSuggestionInput, G as RadioField, H as NumberField, I as LinkButton, It as FormTableInput, J as STRUCTURAL_TYPE_SYMBOL, K as ReadOnly, L as ListField, Lt as FormTextAreaInput, M as LINK_DISPLAY_SYMBOL, Mt as FormReadOnly, N as LINK_TEXT_SYMBOL, Nt as FormRequired, O as FileField, Ot as FormPhoneInput, P as LINK_URL_SYMBOL, Pt as FormStaticText, Q as TEXTBLOCK_DYNAMIC_CONTENT_SYMBOL, R as LocalDateTimeField, S as CheckboxGroupField, St as FormListInput, T as Divider, Tt as FormMessage, U as NumberFieldFrom, V as MetricBreakdown, W as ProviderUserField, X as SuggestionField, Y as StructuralOnly, Z as TEXTBLOCK_CONTENT_SYMBOL, _ as hasFlattenAnnotation, _t as FormDefault, a as FormPresentation, at as Wrapper, b as BooleanField, bt as FormFileInput, c as countInvalidFields, ct as isHttpsUrl, d as EmailField, dt as FormAutoComplete, et as TextArea, f as DeferredValueTypeId, ft as FormAutoFocus, g as fieldInputAst, gt as FormDateInput, h as fieldAnnotation, ht as FormComponentPluginType, i as NumberFromString, it as TextList, j as LINK_COLOR_SYMBOL, jt as FormRadioInput, k as HttpsUrlField, kt as FormPluginData, l as countTotalFields, lt as isListFieldMetadata, m as isDeferredValue, mt as FormCheckboxGroupInput, n as Phone, nt as TextField, o as FormRequestData, ot as applyFieldAnnotations, p as FormDeferredContent, pt as FormCalendarSlotInput, q as STRUCTURAL_ONLY_SYMBOL, r as PhoneField, rt as TextFieldFrom, s as calculateFieldCompletion, st as isFieldPermissionMetadata, t as publicCompletionCorrectionForm, tt as TextBlock, u as Email, ut as isMetricBreakdownOptions, v as hasStructuralOnlyAnnotation, vt as FormDescription, w as DateField, wt as FormLookupInput, x as CalendarSlotField, xt as FormLabel, y as isReadOnlyField, yt as FormEmailInput, z as LookupField } from "./src-BQ55-khF.mjs";
2
+ // ../form-schema/src/lib/search-lookup-items.ts
3
+ const normalize = (text) => text.normalize("NFD").replace(/\p{M}/gu, "").toLowerCase().trim();
4
+ /** Apply the lookup search contract to a complete eligible datasource, before limiting. */
5
+ function searchLookupItems(items, filter, limit) {
6
+ const query = normalize(filter);
7
+ if (!query) return items.slice(0, limit);
8
+ const words = query.split(/\s+/u);
9
+ const exact = [];
10
+ const prefix = [];
11
+ const remaining = [];
12
+ for (const item of items) {
13
+ const label = normalize(item.label);
14
+ const text = `${label} ${normalize(item.searchText ?? "")}`;
15
+ if (!words.every((word) => text.includes(word))) continue;
16
+ if (label === query) exact.push(item);
17
+ else if (label.startsWith(query)) prefix.push(item);
18
+ else remaining.push(item);
19
+ }
20
+ return [
21
+ ...exact,
22
+ ...prefix,
23
+ ...remaining
24
+ ].slice(0, limit);
25
+ }
26
+ export { BooleanField, CalendarSlotField, CheckboxGroupField, CurrentProviderUser, DateField, DeferredValueTypeId, Divider, DynamicTextBlock, Email, EmailField, FLATTEN_SYMBOL, FileField, FormAutoComplete, FormAutoFocus, FormCalendarSlotInput, FormCheckboxGroupInput, FormComponentPluginType, FormDateInput, FormDefault, FormDeferredContent, FormDescription, FormEmailInput, FormFileInput, FormLabel, FormListInput, FormLocalDateTimeInput, FormLookupInput, FormMessage, FormNumberInput, FormPermission, FormPhoneInput, FormPluginData, FormPresentation, FormProviderUserInput, FormRadioInput, FormReadOnly, FormRequestData, FormRequired, FormStaticText, FormSuggestionInput, FormTableInput, FormTextAreaInput, HttpsUrlField, Image, LINK_COLOR_SYMBOL, LINK_DISPLAY_SYMBOL, LINK_TEXT_SYMBOL, LINK_URL_SYMBOL, Link, LinkButton, ListField, LocalDateTimeField, LookupField, METRIC_BREAKDOWN_SYMBOL, MetricBreakdown, NumberField, NumberFieldFrom, NumberFromString, Phone, PhoneField, ProviderUserField, RadioField, ReadOnly, STRUCTURAL_ONLY_SYMBOL, STRUCTURAL_TYPE_SYMBOL, StructuralOnly, SuggestionField, TEXTBLOCK_CONTENT_SYMBOL, TEXTBLOCK_DYNAMIC_CONTENT_SYMBOL, TableField, TextArea, TextBlock, TextField, TextFieldFrom, TextList, Wrapper, applyFieldAnnotations, calculateFieldCompletion, countInvalidFields, countTotalFields, fieldAnnotation, fieldInputAst, hasFlattenAnnotation, hasStructuralOnlyAnnotation, isDeferredValue, isFieldPermissionMetadata, isHttpsUrl, isListFieldMetadata, isMetricBreakdownOptions, isReadOnlyField, publicCompletionCorrectionForm, searchLookupItems };
@@ -17,9 +17,18 @@ export interface BrowserPluginPreparationArtifact {
17
17
  readonly path: string;
18
18
  readonly sha256: string;
19
19
  }
20
+ export declare const BROWSER_FORM_HOST_INTERFACE_VERSION = 1;
21
+ export interface BrowserFormArtifactEntry {
22
+ readonly stepPath: string;
23
+ readonly exportName: string;
24
+ readonly hostInterfaceVersion: number;
25
+ readonly path: string;
26
+ readonly sha256: string;
27
+ }
20
28
  export interface BrowserPluginArtifactManifest {
21
29
  readonly format: typeof BROWSER_PLUGIN_ARTIFACT_MANIFEST_FORMAT;
22
30
  readonly version: typeof BROWSER_PLUGIN_ARTIFACT_MANIFEST_VERSION;
23
31
  readonly plugins: ReadonlyArray<BrowserPluginArtifactEntry>;
32
+ readonly forms?: ReadonlyArray<BrowserFormArtifactEntry>;
24
33
  }
25
34
  export declare const parseBrowserPluginArtifactManifest: (value: unknown) => BrowserPluginArtifactManifest;
@@ -38,9 +38,12 @@ export interface OrganisationFrontendManifestPublicFormBranding {
38
38
  readonly headerHtml?: string | undefined;
39
39
  readonly footerHtml?: string | undefined;
40
40
  }
41
- export interface OrganisationFrontendManifestClientFormDefinition {
42
- readonly components: Readonly<Record<string, unknown>>;
43
- readonly rules: readonly unknown[];
41
+ export interface EmbedLookupDefinition {
42
+ readonly type: "lookup" | "calendarSlot";
43
+ readonly field: string;
44
+ readonly normalizedField: string;
45
+ readonly dependencies: readonly string[];
46
+ readonly queryName?: string | undefined;
44
47
  }
45
48
  export interface OrganisationFrontendManifestEmbedEntry {
46
49
  readonly stepPath: string;
@@ -49,9 +52,8 @@ export interface OrganisationFrontendManifestEmbedEntry {
49
52
  readonly mutationName: string;
50
53
  readonly inputTypeName: string;
51
54
  readonly totalFields: number;
52
- readonly formDefinition: OrganisationFrontendManifestClientFormDefinition | null;
53
- readonly defaultValues: Record<string, unknown> | null;
54
- readonly jsonSchema: Record<string, unknown> | null;
55
+ readonly formPath: string;
56
+ readonly lookups: readonly EmbedLookupDefinition[];
55
57
  readonly sites: readonly string[];
56
58
  readonly thankYou: string;
57
59
  }
@@ -52,7 +52,13 @@ export interface FrontendPluginField {
52
52
  export interface FrontendPluginForm {
53
53
  readonly AppField: ComponentType<{
54
54
  readonly name: string;
55
- readonly children: () => JSX.Element;
55
+ readonly children: (field: {
56
+ readonly state: {
57
+ readonly value: unknown;
58
+ };
59
+ readonly handleChange: (value: unknown) => void;
60
+ readonly handleBlur: () => void;
61
+ }) => JSX.Element;
56
62
  }>;
57
63
  readonly Subscribe: <TSelected = unknown>(props: {
58
64
  readonly selector?: (state: Readonly<{
@@ -69,6 +75,10 @@ export type FormRenderer = (form: FrontendPluginForm, component: FrontendPluginF
69
75
  export interface FormRendererRegistration {
70
76
  readonly type: string;
71
77
  readonly renderer: FormRenderer;
78
+ readonly scripts?: ReadonlyArray<{
79
+ readonly src: string;
80
+ readonly async?: boolean;
81
+ }>;
72
82
  }
73
83
  export interface ExecutionMenuActionVisibilityContext {
74
84
  readonly executionId: string;
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { DocumentStore, type DocumentStoreProps, } from "./process/src/lib/docum
5
5
  export { ExecutionFailureNotifications, type ExecutionFailureNotificationsProps, } from "./process/src/lib/execution-failure-notifications.js";
6
6
  export type { CamelCase, FlowContext, ForEachOutput, FormStepMeta, MergeFormStep, MergeSteps, ProcessMeta, ProviderUserDisplayResolver, StepMeta, StepProviderUserInfo, StepUserInfo, SummaryContext, } from "./process/src/lib/flow-context.js";
7
7
  export { type ConditionOptions, ElseBranch, type ElseTransitionOptions, FlowPath, type MergeState, type OnErrorOptions, type ScheduleOptions, type TransitionOptions, } from "./process/src/lib/flow-path.js";
8
- export { Form, type FormEmbedConfig, type FormPublicCompletionConfig, FormRuleSelf, type FormRuleTargetTree, type FormStepProps, LookupFieldNotFoundError, type PublicCompletionCorrectionConfig, type PublicCompletionEmailTemplate, type PublicCompletionRecipient, type Summary, } from "./process/src/lib/form.js";
8
+ export { Form, type FormEmbedConfig, type FormPublicCompletionConfig, type FormStepProps, LookupFieldNotFoundError, type PublicCompletionCorrectionConfig, type PublicCompletionEmailTemplate, type PublicCompletionRecipient, type Summary, } from "./process/src/lib/form.js";
9
9
  export { Invitation, type InvitationProps, } from "./process/src/lib/invitation.js";
10
10
  export { DEFAULT_PAGE_SIZE, List, type ListDeleteFunction, type ListItemQueryContext, type ListItemQueryFunction, type ListProps, type ListQueryContext, type ListQueryFunction, type ListQueryResult, type ListSortDirection, type ListSortInput, ListSortable, type ListUpdateFunction, ListUpdateValidationError, ListVisibleInList, MAX_PAGE_SIZE, type OutputItem, } from "./process/src/lib/list.js";
11
11
  export { type DependentQueryInput, LookupAccessor, LookupBuilder, type QueryInput, } from "./process/src/lib/lookup-accessor.js";