@embedpdf/plugin-form 3.2.0 → 3.4.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/dist/contract/host.cjs +1 -1
- package/dist/contract/host.cjs.map +1 -1
- package/dist/contract/host.d.cts +3 -3
- package/dist/contract/host.d.ts +3 -3
- package/dist/contract/host.js +1 -1
- package/dist/contract/host.js.map +1 -1
- package/dist/{contract-Bq_ewUE5.d.cts → contract-B7rB7jYx.d.cts} +201 -21
- package/dist/{contract-DJLVUeAe.d.ts → contract-BkTJQ39E.d.ts} +201 -21
- package/dist/{contract-DO7k0ua0.cjs → contract-CMb6PYbf.cjs} +4 -2
- package/dist/contract-CMb6PYbf.cjs.map +1 -0
- package/dist/{contract-Bu3RA2jA.js → contract-J_QN_Igp.js} +4 -2
- package/dist/contract-J_QN_Igp.js.map +1 -0
- package/dist/contract.cjs +1 -1
- package/dist/contract.d.cts +2 -2
- package/dist/contract.d.ts +2 -2
- package/dist/contract.js +1 -1
- package/dist/{host-contract-DI1Gf4fB.d.cts → host-contract-C8HiD6sJ.d.cts} +28 -6
- package/dist/{host-contract-D9NExKAu.d.ts → host-contract-cOcPAwaN.d.ts} +27 -5
- package/dist/index.cjs +518 -97
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -5
- package/dist/index.d.ts +24 -5
- package/dist/index.js +528 -99
- package/dist/index.js.map +1 -1
- package/dist/scripting.d.cts +1 -1
- package/dist/scripting.d.ts +1 -1
- package/package.json +17 -17
- package/dist/contract-Bu3RA2jA.js.map +0 -1
- package/dist/contract-DO7k0ua0.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { n as FormHostCapability } from "./host-contract-
|
|
1
|
+
import { $ as WidgetActivationResult, A as FormGroupMoveResult, B as FormResetResult, C as FormFieldUpdatedEvent, D as FormFocusNextOptions, E as FormFocusChangedEvent, F as FormImportResult, G as FormSnapshot, H as FormSetValueResult, I as FormKind, J as FormValidation, K as FormTransfer, L as FormPlainValue, M as FormImportDrop, N as FormImportDropReason, O as FormFocusOptions, P as FormImportOptions, Q as FormWidgetAnchor, R as FormRepairOptions, S as FormFieldSettings, T as FormFilter, U as FormSetValueStatus, V as FormResyncedEvent, W as FormSettings, X as FormValueChangedEvent, Y as FormValidationRejectedEvent, Z as FormWidgetAddResult, _ as FormFieldKind, a as FormCommitResult, at as GroupPosition, b as FormFieldResult, c as FormDesignGroupChangedEvent, ct as FormModel, d as FormExportSelection, dt as WidgetHit, et as WidgetAddress, f as FormField, ft as WidgetPlace, g as FormFieldFlagSetting, h as FormFieldDraft, i as FormCapability, it as FormWidgetItem, j as FormGroupsChangedEvent, k as FormGroupInput, l as FormDuplicateOptions, lt as FormWidgetLook, m as FormFieldDeletedEvent, n as FillableFields, nt as toFieldRef, o as FormCommitStatus, ot as FormGroup, p as FormFieldCreatedEvent, q as FormUiEffect, r as FormBundle, rt as FormToken, s as FormConfig, st as Box, t as FORM_DEFAULTS, tt as WidgetAnnotation, u as FormDuplicateResult, v as FormFieldPatch, w as FormFieldValue, x as FormFieldSetting, y as FormFieldRef, z as FormRepairResult } from "./contract-B7rB7jYx.cjs";
|
|
2
|
+
import { n as FormHostCapability } from "./host-contract-C8HiD6sJ.cjs";
|
|
3
3
|
import { FormScriptingController, createFormScriptingController } from "./scripting.cjs";
|
|
4
4
|
import { ResourceStatus } from "@embedpdf/core";
|
|
5
5
|
import { FormField as FormField$1, FormFieldKind as FormFieldKind$1, FormKind as FormKind$1, WidgetAppearance } from "@embedpdf/engine-core/runtime";
|
|
@@ -15,13 +15,18 @@ import { ClickCreate } from "@embedpdf/plugin-annotation/contract";
|
|
|
15
15
|
* the annotation plugin present, the form lends it the widgets, which its
|
|
16
16
|
* tools then select, move, restyle and delete. The render plugin draws the
|
|
17
17
|
* widgets' pictures in both modes. With the fonts plugin, a text field in a
|
|
18
|
-
* font of its own is edited in that font's program.
|
|
18
|
+
* font of its own is edited in that font's program. With the Stage, `focus()` and
|
|
19
|
+
* `focusNext()` bring the box they go to into view. `config` is the settings the app
|
|
19
20
|
* registers, over {@link FORM_DEFAULTS}.
|
|
20
21
|
*/
|
|
21
22
|
declare const formPlugin: (config?: FormConfig) => import("@embedpdf/core").PluginDefinition<FormModel, FormHostCapability, FormSettings>;
|
|
22
23
|
//#endregion
|
|
23
24
|
//#region src/state.d.ts
|
|
24
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Every field, whether the form is read, what kind of form it is, the selected widget's field,
|
|
27
|
+
* every selected field, the field the cursor is in, the document's groups, and the group new
|
|
28
|
+
* fields are placed for.
|
|
29
|
+
*/
|
|
25
30
|
interface FormState {
|
|
26
31
|
/** Every field. The same array while nothing changes. */
|
|
27
32
|
readonly fields: readonly FormField$1[];
|
|
@@ -33,6 +38,12 @@ interface FormState {
|
|
|
33
38
|
readonly selectedField: FormField$1 | null;
|
|
34
39
|
/** The field the cursor is in, or `null`. */
|
|
35
40
|
readonly focusedField: FormField$1 | null;
|
|
41
|
+
/** Every field with a selected widget (in design mode). The same array while nothing changes. */
|
|
42
|
+
readonly selectedFields: readonly FormField$1[];
|
|
43
|
+
/** Every group the app named or the form's fields are in. The same array while nothing changes. */
|
|
44
|
+
readonly groups: readonly FormGroup[];
|
|
45
|
+
/** The group that fields placed with a tool go in (in design mode), or `null` when it names none. */
|
|
46
|
+
readonly designGroup: string | null;
|
|
36
47
|
}
|
|
37
48
|
declare const formState: import("@embedpdf/core").StateDeclaration<FormCapability, FormState>;
|
|
38
49
|
//#endregion
|
|
@@ -50,6 +61,14 @@ interface FormToolDefinition {
|
|
|
50
61
|
clickCreate: Extract<ClickCreate, {
|
|
51
62
|
width: number;
|
|
52
63
|
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Place the field as the author sees the page: on a page shown turned, it
|
|
66
|
+
* shows the click's size as seen and its contents are turned to read
|
|
67
|
+
* upright there (a quarter turn, `/MK /R`), as Acrobat places a field on a
|
|
68
|
+
* rotated page. With the annotation plugin, the tool registered there
|
|
69
|
+
* decides (an app may change it); this is its value without it.
|
|
70
|
+
*/
|
|
71
|
+
upright: boolean;
|
|
53
72
|
/** Seed drawing defaults, the widget's appearance fields: a placed field is
|
|
54
73
|
* visible (white box, gray border) and restylable per tool through the
|
|
55
74
|
* shared style panel. */
|
|
@@ -59,5 +78,5 @@ interface FormToolDefinition {
|
|
|
59
78
|
declare const FORM_TOOLS: readonly FormToolDefinition[];
|
|
60
79
|
declare const FORM_TOOL_BY_ID: ReadonlyMap<string, FormToolDefinition>;
|
|
61
80
|
//#endregion
|
|
62
|
-
export { type AuthorableFormKind, type Box, FORM_DEFAULTS, FORM_TOOLS, FORM_TOOL_BY_ID, FillableFields, type FormBundle, FormCapability, FormCommitResult, FormCommitStatus, FormConfig, FormDuplicateOptions, FormDuplicateResult, FormExportSelection, type FormField, FormFieldCreatedEvent, FormFieldDeletedEvent, type FormFieldDraft, FormFieldFlagSetting, type FormFieldKind, 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, FormScriptingController, FormSetValueResult, FormSetValueStatus, FormSettings, type FormSnapshot, type FormState, FormToken, type FormToolDefinition, FormTransfer, FormUiEffect, FormValidation, FormValidationRejectedEvent, FormValueChangedEvent, FormWidgetAddResult, type FormWidgetItem, type FormWidgetLook, WidgetActivationResult, WidgetAddress, type WidgetAnnotation, type WidgetHit, createFormScriptingController, formPlugin, formState, toFieldRef };
|
|
81
|
+
export { type AuthorableFormKind, type Box, FORM_DEFAULTS, FORM_TOOLS, FORM_TOOL_BY_ID, FillableFields, type FormBundle, FormCapability, FormCommitResult, FormCommitStatus, FormConfig, FormDesignGroupChangedEvent, FormDuplicateOptions, FormDuplicateResult, FormExportSelection, type FormField, FormFieldCreatedEvent, FormFieldDeletedEvent, type FormFieldDraft, FormFieldFlagSetting, type FormFieldKind, type FormFieldPatch, type FormFieldRef, FormFieldResult, FormFieldSetting, FormFieldSettings, FormFieldUpdatedEvent, type FormFieldValue, FormFilter, FormFocusChangedEvent, FormFocusNextOptions, FormFocusOptions, type FormGroup, FormGroupInput, FormGroupMoveResult, FormGroupsChangedEvent, type FormImportDrop, type FormImportDropReason, type FormImportOptions, FormImportResult, type FormKind, FormPlainValue, type FormRepairOptions, type FormRepairResult, FormResetResult, FormResyncedEvent, FormScriptingController, FormSetValueResult, FormSetValueStatus, FormSettings, type FormSnapshot, type FormState, FormToken, type FormToolDefinition, FormTransfer, FormUiEffect, FormValidation, FormValidationRejectedEvent, FormValueChangedEvent, FormWidgetAddResult, FormWidgetAnchor, type FormWidgetItem, type FormWidgetLook, type GroupPosition, WidgetActivationResult, WidgetAddress, type WidgetAnnotation, type WidgetHit, type WidgetPlace, createFormScriptingController, formPlugin, formState, toFieldRef };
|
|
63
82
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { n as FormHostCapability } from "./host-contract-
|
|
1
|
+
import { $ as WidgetActivationResult, A as FormGroupMoveResult, B as FormResetResult, C as FormFieldUpdatedEvent, D as FormFocusNextOptions, E as FormFocusChangedEvent, F as FormImportResult, G as FormSnapshot, H as FormSetValueResult, I as FormKind, J as FormValidation, K as FormTransfer, L as FormPlainValue, M as FormImportDrop, N as FormImportDropReason, O as FormFocusOptions, P as FormImportOptions, Q as FormWidgetAnchor, R as FormRepairOptions, S as FormFieldSettings, T as FormFilter, U as FormSetValueStatus, V as FormResyncedEvent, W as FormSettings, X as FormValueChangedEvent, Y as FormValidationRejectedEvent, Z as FormWidgetAddResult, _ as FormFieldKind, a as FormCommitResult, at as GroupPosition, b as FormFieldResult, c as FormDesignGroupChangedEvent, ct as FormModel, d as FormExportSelection, dt as WidgetHit, et as WidgetAddress, f as FormField, ft as WidgetPlace, g as FormFieldFlagSetting, h as FormFieldDraft, i as FormCapability, it as FormWidgetItem, j as FormGroupsChangedEvent, k as FormGroupInput, l as FormDuplicateOptions, lt as FormWidgetLook, m as FormFieldDeletedEvent, n as FillableFields, nt as toFieldRef, o as FormCommitStatus, ot as FormGroup, p as FormFieldCreatedEvent, q as FormUiEffect, r as FormBundle, rt as FormToken, s as FormConfig, st as Box, t as FORM_DEFAULTS, tt as WidgetAnnotation, u as FormDuplicateResult, v as FormFieldPatch, w as FormFieldValue, x as FormFieldSetting, y as FormFieldRef, z as FormRepairResult } from "./contract-BkTJQ39E.js";
|
|
2
|
+
import { n as FormHostCapability } from "./host-contract-cOcPAwaN.js";
|
|
3
3
|
import { FormScriptingController, createFormScriptingController } from "./scripting.js";
|
|
4
4
|
import { ResourceStatus } from "@embedpdf/core";
|
|
5
5
|
import { ClickCreate } from "@embedpdf/plugin-annotation/contract";
|
|
@@ -15,13 +15,18 @@ import { FormField as FormField$1, FormFieldKind as FormFieldKind$1, FormKind as
|
|
|
15
15
|
* the annotation plugin present, the form lends it the widgets, which its
|
|
16
16
|
* tools then select, move, restyle and delete. The render plugin draws the
|
|
17
17
|
* widgets' pictures in both modes. With the fonts plugin, a text field in a
|
|
18
|
-
* font of its own is edited in that font's program.
|
|
18
|
+
* font of its own is edited in that font's program. With the Stage, `focus()` and
|
|
19
|
+
* `focusNext()` bring the box they go to into view. `config` is the settings the app
|
|
19
20
|
* registers, over {@link FORM_DEFAULTS}.
|
|
20
21
|
*/
|
|
21
22
|
declare const formPlugin: (config?: FormConfig) => import("@embedpdf/core").PluginDefinition<FormModel, FormHostCapability, FormSettings>;
|
|
22
23
|
//#endregion
|
|
23
24
|
//#region src/state.d.ts
|
|
24
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Every field, whether the form is read, what kind of form it is, the selected widget's field,
|
|
27
|
+
* every selected field, the field the cursor is in, the document's groups, and the group new
|
|
28
|
+
* fields are placed for.
|
|
29
|
+
*/
|
|
25
30
|
interface FormState {
|
|
26
31
|
/** Every field. The same array while nothing changes. */
|
|
27
32
|
readonly fields: readonly FormField$1[];
|
|
@@ -33,6 +38,12 @@ interface FormState {
|
|
|
33
38
|
readonly selectedField: FormField$1 | null;
|
|
34
39
|
/** The field the cursor is in, or `null`. */
|
|
35
40
|
readonly focusedField: FormField$1 | null;
|
|
41
|
+
/** Every field with a selected widget (in design mode). The same array while nothing changes. */
|
|
42
|
+
readonly selectedFields: readonly FormField$1[];
|
|
43
|
+
/** Every group the app named or the form's fields are in. The same array while nothing changes. */
|
|
44
|
+
readonly groups: readonly FormGroup[];
|
|
45
|
+
/** The group that fields placed with a tool go in (in design mode), or `null` when it names none. */
|
|
46
|
+
readonly designGroup: string | null;
|
|
36
47
|
}
|
|
37
48
|
declare const formState: import("@embedpdf/core").StateDeclaration<FormCapability, FormState>;
|
|
38
49
|
//#endregion
|
|
@@ -50,6 +61,14 @@ interface FormToolDefinition {
|
|
|
50
61
|
clickCreate: Extract<ClickCreate, {
|
|
51
62
|
width: number;
|
|
52
63
|
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Place the field as the author sees the page: on a page shown turned, it
|
|
66
|
+
* shows the click's size as seen and its contents are turned to read
|
|
67
|
+
* upright there (a quarter turn, `/MK /R`), as Acrobat places a field on a
|
|
68
|
+
* rotated page. With the annotation plugin, the tool registered there
|
|
69
|
+
* decides (an app may change it); this is its value without it.
|
|
70
|
+
*/
|
|
71
|
+
upright: boolean;
|
|
53
72
|
/** Seed drawing defaults, the widget's appearance fields: a placed field is
|
|
54
73
|
* visible (white box, gray border) and restylable per tool through the
|
|
55
74
|
* shared style panel. */
|
|
@@ -59,5 +78,5 @@ interface FormToolDefinition {
|
|
|
59
78
|
declare const FORM_TOOLS: readonly FormToolDefinition[];
|
|
60
79
|
declare const FORM_TOOL_BY_ID: ReadonlyMap<string, FormToolDefinition>;
|
|
61
80
|
//#endregion
|
|
62
|
-
export { type AuthorableFormKind, type Box, FORM_DEFAULTS, FORM_TOOLS, FORM_TOOL_BY_ID, FillableFields, type FormBundle, FormCapability, FormCommitResult, FormCommitStatus, FormConfig, FormDuplicateOptions, FormDuplicateResult, FormExportSelection, type FormField, FormFieldCreatedEvent, FormFieldDeletedEvent, type FormFieldDraft, FormFieldFlagSetting, type FormFieldKind, 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, FormScriptingController, FormSetValueResult, FormSetValueStatus, FormSettings, type FormSnapshot, type FormState, FormToken, type FormToolDefinition, FormTransfer, FormUiEffect, FormValidation, FormValidationRejectedEvent, FormValueChangedEvent, FormWidgetAddResult, type FormWidgetItem, type FormWidgetLook, WidgetActivationResult, WidgetAddress, type WidgetAnnotation, type WidgetHit, createFormScriptingController, formPlugin, formState, toFieldRef };
|
|
81
|
+
export { type AuthorableFormKind, type Box, FORM_DEFAULTS, FORM_TOOLS, FORM_TOOL_BY_ID, FillableFields, type FormBundle, FormCapability, FormCommitResult, FormCommitStatus, FormConfig, FormDesignGroupChangedEvent, FormDuplicateOptions, FormDuplicateResult, FormExportSelection, type FormField, FormFieldCreatedEvent, FormFieldDeletedEvent, type FormFieldDraft, FormFieldFlagSetting, type FormFieldKind, type FormFieldPatch, type FormFieldRef, FormFieldResult, FormFieldSetting, FormFieldSettings, FormFieldUpdatedEvent, type FormFieldValue, FormFilter, FormFocusChangedEvent, FormFocusNextOptions, FormFocusOptions, type FormGroup, FormGroupInput, FormGroupMoveResult, FormGroupsChangedEvent, type FormImportDrop, type FormImportDropReason, type FormImportOptions, FormImportResult, type FormKind, FormPlainValue, type FormRepairOptions, type FormRepairResult, FormResetResult, FormResyncedEvent, FormScriptingController, FormSetValueResult, FormSetValueStatus, FormSettings, type FormSnapshot, type FormState, FormToken, type FormToolDefinition, FormTransfer, FormUiEffect, FormValidation, FormValidationRejectedEvent, FormValueChangedEvent, FormWidgetAddResult, FormWidgetAnchor, type FormWidgetItem, type FormWidgetLook, type GroupPosition, WidgetActivationResult, WidgetAddress, type WidgetAnnotation, type WidgetHit, type WidgetPlace, createFormScriptingController, formPlugin, formState, toFieldRef };
|
|
63
82
|
//# sourceMappingURL=index.d.ts.map
|