@embedpdf/plugin-form 3.0.0-next.19 → 3.0.0-next.20

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.
@@ -1,2 +1,2 @@
1
- import { A as FormRepairResult, B as FormValidationRejectedEvent, C as FormImportDrop, D as FormKind, E as FormImportResult, F as FormSettings, G as WidgetAnnotation, H as FormWidgetAddResult, I as FormSnapshot, J as FormWidgetItem, K as toFieldRef, L as FormTransfer, M as FormResyncedEvent, N as FormSetValueResult, O as FormPlainValue, P as FormSetValueStatus, Q as WidgetHit, R as FormUiEffect, S as FormFilter, T as FormImportOptions, U as WidgetActivationResult, V as FormValueChangedEvent, W as WidgetAddress, X as FormWidgetLook, Y as Box, _ as FormFieldResult, a as FormCommitResult, b as FormFieldUpdatedEvent, c as FormExportSelection, d as FormFieldDeletedEvent, f as FormFieldDraft, g as FormFieldRef, h as FormFieldPatch, i as FormCapability, j as FormResetResult, k as FormRepairOptions, l as FormFieldCreatedEvent, m as FormFieldFlagSetting, n as FillableFields, o as FormCommitStatus, p as FormFieldFamily, q as FormToken, r as FormBundle, s as FormConfig, t as FORM_DEFAULTS, u as FormFieldDTO, v as FormFieldSetting, w as FormImportDropReason, x as FormFieldValue, y as FormFieldSettings, z as FormValidation } from "./contract-D-yQxw3H.cjs";
2
- export { type Box, FORM_DEFAULTS, FillableFields, type FormBundle, FormCapability, FormCommitResult, FormCommitStatus, FormConfig, FormExportSelection, FormFieldCreatedEvent, type FormFieldDTO, FormFieldDeletedEvent, type FormFieldDraft, type FormFieldFamily, FormFieldFlagSetting, type FormFieldPatch, type FormFieldRef, FormFieldResult, FormFieldSetting, FormFieldSettings, FormFieldUpdatedEvent, type FormFieldValue, FormFilter, type FormImportDrop, type FormImportDropReason, type FormImportOptions, FormImportResult, type FormKind, FormPlainValue, type FormRepairOptions, type FormRepairResult, FormResetResult, FormResyncedEvent, FormSetValueResult, FormSetValueStatus, FormSettings, type FormSnapshot, FormToken, FormTransfer, FormUiEffect, FormValidation, FormValidationRejectedEvent, FormValueChangedEvent, FormWidgetAddResult, type FormWidgetItem, type FormWidgetLook, WidgetActivationResult, WidgetAddress, type WidgetAnnotation, type WidgetHit, toFieldRef };
1
+ import { A as FormKind, B as FormTransfer, C as FormFocusChangedEvent, D as FormImportDropReason, E as FormImportDrop, F as FormResyncedEvent, G as FormWidgetAddResult, H as FormValidation, I as FormSetValueResult, J as WidgetAnnotation, K as WidgetActivationResult, L as FormSetValueStatus, M as FormRepairOptions, N as FormRepairResult, O as FormImportOptions, P as FormResetResult, Q as Box, R as FormSettings, S as FormFilter, T as FormFocusOptions, U as FormValidationRejectedEvent, V as FormUiEffect, W as FormValueChangedEvent, X as FormToken, Y as toFieldRef, Z as FormWidgetItem, _ as FormFieldResult, a as FormCommitResult, b as FormFieldUpdatedEvent, c as FormExportSelection, d as FormFieldDeletedEvent, et as FormWidgetLook, f as FormFieldDraft, g as FormFieldRef, h as FormFieldPatch, i as FormCapability, j as FormPlainValue, k as FormImportResult, l as FormFieldCreatedEvent, m as FormFieldFlagSetting, n as FillableFields, nt as WidgetHit, o as FormCommitStatus, p as FormFieldFamily, q as WidgetAddress, r as FormBundle, s as FormConfig, t as FORM_DEFAULTS, u as FormFieldDTO, v as FormFieldSetting, w as FormFocusNextOptions, x as FormFieldValue, y as FormFieldSettings, z as FormSnapshot } from "./contract-c_wuhKk1.cjs";
2
+ export { type Box, FORM_DEFAULTS, FillableFields, type FormBundle, FormCapability, FormCommitResult, FormCommitStatus, FormConfig, FormExportSelection, FormFieldCreatedEvent, type FormFieldDTO, FormFieldDeletedEvent, type FormFieldDraft, type FormFieldFamily, FormFieldFlagSetting, type FormFieldPatch, type FormFieldRef, FormFieldResult, FormFieldSetting, FormFieldSettings, FormFieldUpdatedEvent, type FormFieldValue, FormFilter, FormFocusChangedEvent, FormFocusNextOptions, FormFocusOptions, type FormImportDrop, type FormImportDropReason, type FormImportOptions, FormImportResult, type FormKind, FormPlainValue, type FormRepairOptions, type FormRepairResult, FormResetResult, FormResyncedEvent, FormSetValueResult, FormSetValueStatus, FormSettings, type FormSnapshot, FormToken, FormTransfer, FormUiEffect, FormValidation, FormValidationRejectedEvent, FormValueChangedEvent, FormWidgetAddResult, type FormWidgetItem, type FormWidgetLook, WidgetActivationResult, WidgetAddress, type WidgetAnnotation, type WidgetHit, toFieldRef };
@@ -1,2 +1,2 @@
1
- import { A as FormRepairResult, B as FormValidationRejectedEvent, C as FormImportDrop, D as FormKind, E as FormImportResult, F as FormSettings, G as WidgetAnnotation, H as FormWidgetAddResult, I as FormSnapshot, J as FormWidgetItem, K as toFieldRef, L as FormTransfer, M as FormResyncedEvent, N as FormSetValueResult, O as FormPlainValue, P as FormSetValueStatus, Q as WidgetHit, R as FormUiEffect, S as FormFilter, T as FormImportOptions, U as WidgetActivationResult, V as FormValueChangedEvent, W as WidgetAddress, X as FormWidgetLook, Y as Box, _ as FormFieldResult, a as FormCommitResult, b as FormFieldUpdatedEvent, c as FormExportSelection, d as FormFieldDeletedEvent, f as FormFieldDraft, g as FormFieldRef, h as FormFieldPatch, i as FormCapability, j as FormResetResult, k as FormRepairOptions, l as FormFieldCreatedEvent, m as FormFieldFlagSetting, n as FillableFields, o as FormCommitStatus, p as FormFieldFamily, q as FormToken, r as FormBundle, s as FormConfig, t as FORM_DEFAULTS, u as FormFieldDTO, v as FormFieldSetting, w as FormImportDropReason, x as FormFieldValue, y as FormFieldSettings, z as FormValidation } from "./contract-BwcgtCOD.js";
2
- export { type Box, FORM_DEFAULTS, FillableFields, type FormBundle, FormCapability, FormCommitResult, FormCommitStatus, FormConfig, FormExportSelection, FormFieldCreatedEvent, type FormFieldDTO, FormFieldDeletedEvent, type FormFieldDraft, type FormFieldFamily, FormFieldFlagSetting, type FormFieldPatch, type FormFieldRef, FormFieldResult, FormFieldSetting, FormFieldSettings, FormFieldUpdatedEvent, type FormFieldValue, FormFilter, type FormImportDrop, type FormImportDropReason, type FormImportOptions, FormImportResult, type FormKind, FormPlainValue, type FormRepairOptions, type FormRepairResult, FormResetResult, FormResyncedEvent, FormSetValueResult, FormSetValueStatus, FormSettings, type FormSnapshot, FormToken, FormTransfer, FormUiEffect, FormValidation, FormValidationRejectedEvent, FormValueChangedEvent, FormWidgetAddResult, type FormWidgetItem, type FormWidgetLook, WidgetActivationResult, WidgetAddress, type WidgetAnnotation, type WidgetHit, toFieldRef };
1
+ import { A as FormKind, B as FormTransfer, C as FormFocusChangedEvent, D as FormImportDropReason, E as FormImportDrop, F as FormResyncedEvent, G as FormWidgetAddResult, H as FormValidation, I as FormSetValueResult, J as WidgetAnnotation, K as WidgetActivationResult, L as FormSetValueStatus, M as FormRepairOptions, N as FormRepairResult, O as FormImportOptions, P as FormResetResult, Q as Box, R as FormSettings, S as FormFilter, T as FormFocusOptions, U as FormValidationRejectedEvent, V as FormUiEffect, W as FormValueChangedEvent, X as FormToken, Y as toFieldRef, Z as FormWidgetItem, _ as FormFieldResult, a as FormCommitResult, b as FormFieldUpdatedEvent, c as FormExportSelection, d as FormFieldDeletedEvent, et as FormWidgetLook, f as FormFieldDraft, g as FormFieldRef, h as FormFieldPatch, i as FormCapability, j as FormPlainValue, k as FormImportResult, l as FormFieldCreatedEvent, m as FormFieldFlagSetting, n as FillableFields, nt as WidgetHit, o as FormCommitStatus, p as FormFieldFamily, q as WidgetAddress, r as FormBundle, s as FormConfig, t as FORM_DEFAULTS, u as FormFieldDTO, v as FormFieldSetting, w as FormFocusNextOptions, x as FormFieldValue, y as FormFieldSettings, z as FormSnapshot } from "./contract-D_9fiTkd.js";
2
+ export { type Box, FORM_DEFAULTS, FillableFields, type FormBundle, FormCapability, FormCommitResult, FormCommitStatus, FormConfig, FormExportSelection, FormFieldCreatedEvent, type FormFieldDTO, FormFieldDeletedEvent, type FormFieldDraft, type FormFieldFamily, FormFieldFlagSetting, type FormFieldPatch, type FormFieldRef, FormFieldResult, FormFieldSetting, FormFieldSettings, FormFieldUpdatedEvent, type FormFieldValue, FormFilter, FormFocusChangedEvent, FormFocusNextOptions, FormFocusOptions, type FormImportDrop, type FormImportDropReason, type FormImportOptions, FormImportResult, type FormKind, FormPlainValue, type FormRepairOptions, type FormRepairResult, FormResetResult, FormResyncedEvent, FormSetValueResult, FormSetValueStatus, FormSettings, type FormSnapshot, FormToken, FormTransfer, FormUiEffect, FormValidation, FormValidationRejectedEvent, FormValueChangedEvent, FormWidgetAddResult, type FormWidgetItem, type FormWidgetLook, WidgetActivationResult, WidgetAddress, type WidgetAnnotation, type WidgetHit, toFieldRef };
package/dist/contract.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as FormToken, n as FormTransfer, r as toFieldRef, t as FORM_DEFAULTS } from "./contract-DcncvPcF.js";
1
+ import { i as FormToken, n as FormTransfer, r as toFieldRef, t as FORM_DEFAULTS } from "./contract-BdEaLXUK.js";
2
2
  export { FORM_DEFAULTS, FormToken, FormTransfer, toFieldRef };
@@ -1,11 +1,12 @@
1
- import { N as FormSetValueResult, Y as Box, Z as ShownWidget, a as FormCommitResult, i as FormCapability } from "./contract-BwcgtCOD.js";
1
+ import { I as FormSetValueResult, Q as Box, a as FormCommitResult, i as FormCapability, tt as ShownWidget } from "./contract-c_wuhKk1.cjs";
2
2
  import "@embedpdf/core";
3
- import { ActionContext, ActionDiagnostic, ActionOrigin, ActionSubmitRequest, PdfAnnotationEventKind, SubmitIntent } from "@embedpdf/plugin-actions/contract";
4
3
  import { AnnotationRef, FormEffect, FormFieldDTO, FormFieldRef, PageRef, PdfActionTargetRef, WidgetAnnotation } from "@embedpdf/engine-core/runtime";
5
- import { FormCommitSinkResult } from "@embedpdf/plugin-actions/contract/host";
6
- import { SceneNode } from "@embedpdf/core-annotation";
4
+ import { ActionContext, ActionDiagnostic, ActionOrigin, ActionSubmitRequest, PdfAnnotationEventKind, SubmitIntent } from "@embedpdf/plugin-actions/contract";
7
5
  import { TextEditorLayout, TextEditorLayout as TextEditorLayout$1 } from "@embedpdf/core-form";
6
+ import { FormCommitSinkResult } from "@embedpdf/plugin-actions/contract/host";
7
+ import { FontCss } from "@embedpdf/plugin-fonts/contract";
8
8
  import { AppearancePicture } from "@embedpdf/plugin-render/contract/host";
9
+ import { SceneNode } from "@embedpdf/core-annotation";
9
10
  //#region src/services/looks.d.ts
10
11
  /** A widget as the painter draws it: its scene on the page (its text carries the faces it needs). */
11
12
  interface WidgetPainting {
@@ -13,6 +14,18 @@ interface WidgetPainting {
13
14
  }
14
15
  //#endregion
15
16
  //#region src/host-contract.d.ts
17
+ /**
18
+ * A field box's control, as the host shows it: what the cursor goes into. The form layer lends
19
+ * one for each box on screen (`attachFocusTarget`); in a browser it focuses the control's
20
+ * element without scrolling (`@embedpdf/web`'s `bindFieldFocus`), and the Stage brings the box
21
+ * into view.
22
+ */
23
+ interface FormFocusTarget {
24
+ /** Take the cursor; `select` selects a text box's text, so typing replaces it. */
25
+ focus(options: {
26
+ readonly select: boolean;
27
+ }): void;
28
+ }
16
29
  /**
17
30
  * The host lens: members for the framework layers and sibling plugins (the
18
31
  * widget event feed, the text being typed, and the actions plugin's
@@ -57,8 +70,27 @@ interface FormHostCapability extends FormCapability {
57
70
  * `null` for a widget that isn't a text field's.
58
71
  */
59
72
  getTextEditorLayout(widget: AnnotationRef, text: string): TextEditorLayout | null;
73
+ /**
74
+ * How a control the painter doesn't draw (a list box's rows) draws the widget's text: its font
75
+ * as CSS, as the engine picks it (the fonts plugin's; without it, the standard font the engine
76
+ * falls back to), with the programs the family list names, to mount. `null` for a widget that
77
+ * isn't there.
78
+ */
79
+ getWidgetFontCss(widget: AnnotationRef): FontCss | null;
60
80
  /** The page box in page space, for keeping a placement on the page; `null` for a page that isn't there. */
61
81
  getPageBox(page: PageRef): Box | null;
82
+ /**
83
+ * Lend the plugin a box's control while it's on screen, so `focus()` and `focusNext()` can put
84
+ * the cursor in it; a box `focus()` asked for before its page came in takes the cursor now.
85
+ * Returns the call that takes it back.
86
+ */
87
+ attachFocusTarget(widget: AnnotationRef, target: FormFocusTarget): () => void;
88
+ /**
89
+ * The arrow keys in a radio group: move the cursor to the group's next button (the one before,
90
+ * `backward`), going round, and pick it, as a click on it does. `false` for a widget that isn't a
91
+ * radio button the user can pick, or a group of one.
92
+ */
93
+ moveInGroup(widget: AnnotationRef, backward: boolean): boolean;
62
94
  /** Send a widget's pointer or focus event to the actions plugin, which runs its `/AA` actions. */
63
95
  notifyWidgetEvent(field: FormFieldRef, widget: AnnotationRef, event: PdfAnnotationEventKind): void;
64
96
  /** Run a ResetForm action: reset the fields it names (or all but them), then recalculate. */
@@ -83,5 +115,5 @@ interface FormHostCapability extends FormCapability {
83
115
  }
84
116
  declare const FormToken: import("@embedpdf/core").CapabilityToken<FormHostCapability>;
85
117
  //#endregion
86
- export { WidgetPainting as i, FormToken as n, TextEditorLayout$1 as r, FormHostCapability as t };
87
- //# sourceMappingURL=host-contract-BRYUbpT_.d.ts.map
118
+ export { WidgetPainting as a, TextEditorLayout$1 as i, FormHostCapability as n, FormToken as r, FormFocusTarget as t };
119
+ //# sourceMappingURL=host-contract-DaauiYfw.d.cts.map
@@ -1,11 +1,12 @@
1
- import { N as FormSetValueResult, Y as Box, Z as ShownWidget, a as FormCommitResult, i as FormCapability } from "./contract-D-yQxw3H.cjs";
1
+ import { I as FormSetValueResult, Q as Box, a as FormCommitResult, i as FormCapability, tt as ShownWidget } from "./contract-D_9fiTkd.js";
2
2
  import "@embedpdf/core";
3
- import { AnnotationRef, FormEffect, FormFieldDTO, FormFieldRef, PageRef, PdfActionTargetRef, WidgetAnnotation } from "@embedpdf/engine-core/runtime";
4
3
  import { ActionContext, ActionDiagnostic, ActionOrigin, ActionSubmitRequest, PdfAnnotationEventKind, SubmitIntent } from "@embedpdf/plugin-actions/contract";
5
- import { TextEditorLayout, TextEditorLayout as TextEditorLayout$1 } from "@embedpdf/core-form";
4
+ import { FontCss } from "@embedpdf/plugin-fonts/contract";
5
+ import { AnnotationRef, FormEffect, FormFieldDTO, FormFieldRef, PageRef, PdfActionTargetRef, WidgetAnnotation } from "@embedpdf/engine-core/runtime";
6
6
  import { FormCommitSinkResult } from "@embedpdf/plugin-actions/contract/host";
7
- import { AppearancePicture } from "@embedpdf/plugin-render/contract/host";
8
7
  import { SceneNode } from "@embedpdf/core-annotation";
8
+ import { TextEditorLayout, TextEditorLayout as TextEditorLayout$1 } from "@embedpdf/core-form";
9
+ import { AppearancePicture } from "@embedpdf/plugin-render/contract/host";
9
10
  //#region src/services/looks.d.ts
10
11
  /** A widget as the painter draws it: its scene on the page (its text carries the faces it needs). */
11
12
  interface WidgetPainting {
@@ -13,6 +14,18 @@ interface WidgetPainting {
13
14
  }
14
15
  //#endregion
15
16
  //#region src/host-contract.d.ts
17
+ /**
18
+ * A field box's control, as the host shows it: what the cursor goes into. The form layer lends
19
+ * one for each box on screen (`attachFocusTarget`); in a browser it focuses the control's
20
+ * element without scrolling (`@embedpdf/web`'s `bindFieldFocus`), and the Stage brings the box
21
+ * into view.
22
+ */
23
+ interface FormFocusTarget {
24
+ /** Take the cursor; `select` selects a text box's text, so typing replaces it. */
25
+ focus(options: {
26
+ readonly select: boolean;
27
+ }): void;
28
+ }
16
29
  /**
17
30
  * The host lens: members for the framework layers and sibling plugins (the
18
31
  * widget event feed, the text being typed, and the actions plugin's
@@ -57,8 +70,27 @@ interface FormHostCapability extends FormCapability {
57
70
  * `null` for a widget that isn't a text field's.
58
71
  */
59
72
  getTextEditorLayout(widget: AnnotationRef, text: string): TextEditorLayout | null;
73
+ /**
74
+ * How a control the painter doesn't draw (a list box's rows) draws the widget's text: its font
75
+ * as CSS, as the engine picks it (the fonts plugin's; without it, the standard font the engine
76
+ * falls back to), with the programs the family list names, to mount. `null` for a widget that
77
+ * isn't there.
78
+ */
79
+ getWidgetFontCss(widget: AnnotationRef): FontCss | null;
60
80
  /** The page box in page space, for keeping a placement on the page; `null` for a page that isn't there. */
61
81
  getPageBox(page: PageRef): Box | null;
82
+ /**
83
+ * Lend the plugin a box's control while it's on screen, so `focus()` and `focusNext()` can put
84
+ * the cursor in it; a box `focus()` asked for before its page came in takes the cursor now.
85
+ * Returns the call that takes it back.
86
+ */
87
+ attachFocusTarget(widget: AnnotationRef, target: FormFocusTarget): () => void;
88
+ /**
89
+ * The arrow keys in a radio group: move the cursor to the group's next button (the one before,
90
+ * `backward`), going round, and pick it, as a click on it does. `false` for a widget that isn't a
91
+ * radio button the user can pick, or a group of one.
92
+ */
93
+ moveInGroup(widget: AnnotationRef, backward: boolean): boolean;
62
94
  /** Send a widget's pointer or focus event to the actions plugin, which runs its `/AA` actions. */
63
95
  notifyWidgetEvent(field: FormFieldRef, widget: AnnotationRef, event: PdfAnnotationEventKind): void;
64
96
  /** Run a ResetForm action: reset the fields it names (or all but them), then recalculate. */
@@ -83,5 +115,5 @@ interface FormHostCapability extends FormCapability {
83
115
  }
84
116
  declare const FormToken: import("@embedpdf/core").CapabilityToken<FormHostCapability>;
85
117
  //#endregion
86
- export { WidgetPainting as i, FormToken as n, TextEditorLayout$1 as r, FormHostCapability as t };
87
- //# sourceMappingURL=host-contract-1epLfK1S.d.cts.map
118
+ export { WidgetPainting as a, TextEditorLayout$1 as i, FormHostCapability as n, FormToken as r, FormFocusTarget as t };
119
+ //# sourceMappingURL=host-contract-DdOsYM83.d.ts.map