@embedpdf/plugin-form 2.15.0 → 3.0.0-next.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.
Files changed (175) hide show
  1. package/LICENSE +192 -21
  2. package/dist/index.cjs +1416 -2
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +277 -0
  5. package/dist/index.d.ts +277 -1
  6. package/dist/index.js +1398 -1779
  7. package/dist/index.js.map +1 -1
  8. package/package.json +24 -61
  9. package/dist/lib/actions.d.ts +0 -33
  10. package/dist/lib/form-plugin.d.ts +0 -59
  11. package/dist/lib/handlers/checkbox.handler.d.ts +0 -3
  12. package/dist/lib/handlers/combobox.handler.d.ts +0 -3
  13. package/dist/lib/handlers/index.d.ts +0 -5
  14. package/dist/lib/handlers/listbox.handler.d.ts +0 -3
  15. package/dist/lib/handlers/radio-button.handler.d.ts +0 -3
  16. package/dist/lib/handlers/text-field.handler.d.ts +0 -3
  17. package/dist/lib/index.d.ts +0 -10
  18. package/dist/lib/manifest.d.ts +0 -4
  19. package/dist/lib/reducer.d.ts +0 -6
  20. package/dist/lib/tools.d.ts +0 -457
  21. package/dist/lib/types.d.ts +0 -98
  22. package/dist/preact/adapter.d.ts +0 -13
  23. package/dist/preact/annotation.d.ts +0 -1
  24. package/dist/preact/core.d.ts +0 -1
  25. package/dist/preact/index.cjs +0 -2
  26. package/dist/preact/index.cjs.map +0 -1
  27. package/dist/preact/index.d.ts +0 -1
  28. package/dist/preact/index.js +0 -1359
  29. package/dist/preact/index.js.map +0 -1
  30. package/dist/react/adapter.d.ts +0 -6
  31. package/dist/react/annotation.d.ts +0 -1
  32. package/dist/react/core.d.ts +0 -1
  33. package/dist/react/index.cjs +0 -2
  34. package/dist/react/index.cjs.map +0 -1
  35. package/dist/react/index.d.ts +0 -1
  36. package/dist/react/index.js +0 -1358
  37. package/dist/react/index.js.map +0 -1
  38. package/dist/shared/components/annotations/form-checkbox.d.ts +0 -12
  39. package/dist/shared/components/annotations/form-combobox.d.ts +0 -12
  40. package/dist/shared/components/annotations/form-listbox.d.ts +0 -12
  41. package/dist/shared/components/annotations/form-radio-button.d.ts +0 -12
  42. package/dist/shared/components/annotations/form-text-field.d.ts +0 -12
  43. package/dist/shared/components/fields/checkbox.d.ts +0 -2
  44. package/dist/shared/components/fields/combobox.d.ts +0 -2
  45. package/dist/shared/components/fields/listbox.d.ts +0 -2
  46. package/dist/shared/components/fields/push-button.d.ts +0 -2
  47. package/dist/shared/components/fields/radio-button.d.ts +0 -2
  48. package/dist/shared/components/fields/style.d.ts +0 -6
  49. package/dist/shared/components/fields/text.d.ts +0 -2
  50. package/dist/shared/components/fill-mode/combobox-fill-mode.d.ts +0 -3
  51. package/dist/shared/components/fill-mode/listbox-fill-mode.d.ts +0 -3
  52. package/dist/shared/components/fill-mode/push-button-fill-mode.d.ts +0 -3
  53. package/dist/shared/components/fill-mode/radio-button-fill-mode.d.ts +0 -3
  54. package/dist/shared/components/fill-mode/text-fill-mode.d.ts +0 -3
  55. package/dist/shared/components/fill-mode/toggle-fill-mode.d.ts +0 -3
  56. package/dist/shared/components/form-renderer-registration.d.ts +0 -5
  57. package/dist/shared/components/form-renderers.d.ts +0 -9
  58. package/dist/shared/components/index.d.ts +0 -2
  59. package/dist/shared/components/render-widget.d.ts +0 -12
  60. package/dist/shared/components/types.d.ts +0 -42
  61. package/dist/shared/hooks/index.d.ts +0 -1
  62. package/dist/shared/hooks/use-form-widget-state.d.ts +0 -12
  63. package/dist/shared/hooks/use-form.d.ts +0 -16
  64. package/dist/shared/index.d.ts +0 -4
  65. package/dist/shared-preact/components/annotations/form-checkbox.d.ts +0 -12
  66. package/dist/shared-preact/components/annotations/form-combobox.d.ts +0 -12
  67. package/dist/shared-preact/components/annotations/form-listbox.d.ts +0 -12
  68. package/dist/shared-preact/components/annotations/form-radio-button.d.ts +0 -12
  69. package/dist/shared-preact/components/annotations/form-text-field.d.ts +0 -12
  70. package/dist/shared-preact/components/fields/checkbox.d.ts +0 -2
  71. package/dist/shared-preact/components/fields/combobox.d.ts +0 -2
  72. package/dist/shared-preact/components/fields/listbox.d.ts +0 -2
  73. package/dist/shared-preact/components/fields/push-button.d.ts +0 -2
  74. package/dist/shared-preact/components/fields/radio-button.d.ts +0 -2
  75. package/dist/shared-preact/components/fields/style.d.ts +0 -6
  76. package/dist/shared-preact/components/fields/text.d.ts +0 -2
  77. package/dist/shared-preact/components/fill-mode/combobox-fill-mode.d.ts +0 -3
  78. package/dist/shared-preact/components/fill-mode/listbox-fill-mode.d.ts +0 -3
  79. package/dist/shared-preact/components/fill-mode/push-button-fill-mode.d.ts +0 -3
  80. package/dist/shared-preact/components/fill-mode/radio-button-fill-mode.d.ts +0 -3
  81. package/dist/shared-preact/components/fill-mode/text-fill-mode.d.ts +0 -3
  82. package/dist/shared-preact/components/fill-mode/toggle-fill-mode.d.ts +0 -3
  83. package/dist/shared-preact/components/form-renderer-registration.d.ts +0 -5
  84. package/dist/shared-preact/components/form-renderers.d.ts +0 -9
  85. package/dist/shared-preact/components/index.d.ts +0 -2
  86. package/dist/shared-preact/components/render-widget.d.ts +0 -12
  87. package/dist/shared-preact/components/types.d.ts +0 -42
  88. package/dist/shared-preact/hooks/index.d.ts +0 -1
  89. package/dist/shared-preact/hooks/use-form-widget-state.d.ts +0 -12
  90. package/dist/shared-preact/hooks/use-form.d.ts +0 -16
  91. package/dist/shared-preact/index.d.ts +0 -4
  92. package/dist/shared-react/components/annotations/form-checkbox.d.ts +0 -12
  93. package/dist/shared-react/components/annotations/form-combobox.d.ts +0 -12
  94. package/dist/shared-react/components/annotations/form-listbox.d.ts +0 -12
  95. package/dist/shared-react/components/annotations/form-radio-button.d.ts +0 -12
  96. package/dist/shared-react/components/annotations/form-text-field.d.ts +0 -12
  97. package/dist/shared-react/components/fields/checkbox.d.ts +0 -2
  98. package/dist/shared-react/components/fields/combobox.d.ts +0 -2
  99. package/dist/shared-react/components/fields/listbox.d.ts +0 -2
  100. package/dist/shared-react/components/fields/push-button.d.ts +0 -2
  101. package/dist/shared-react/components/fields/radio-button.d.ts +0 -2
  102. package/dist/shared-react/components/fields/style.d.ts +0 -6
  103. package/dist/shared-react/components/fields/text.d.ts +0 -2
  104. package/dist/shared-react/components/fill-mode/combobox-fill-mode.d.ts +0 -3
  105. package/dist/shared-react/components/fill-mode/listbox-fill-mode.d.ts +0 -3
  106. package/dist/shared-react/components/fill-mode/push-button-fill-mode.d.ts +0 -3
  107. package/dist/shared-react/components/fill-mode/radio-button-fill-mode.d.ts +0 -3
  108. package/dist/shared-react/components/fill-mode/text-fill-mode.d.ts +0 -3
  109. package/dist/shared-react/components/fill-mode/toggle-fill-mode.d.ts +0 -3
  110. package/dist/shared-react/components/form-renderer-registration.d.ts +0 -5
  111. package/dist/shared-react/components/form-renderers.d.ts +0 -9
  112. package/dist/shared-react/components/index.d.ts +0 -2
  113. package/dist/shared-react/components/render-widget.d.ts +0 -12
  114. package/dist/shared-react/components/types.d.ts +0 -42
  115. package/dist/shared-react/hooks/index.d.ts +0 -1
  116. package/dist/shared-react/hooks/use-form-widget-state.d.ts +0 -12
  117. package/dist/shared-react/hooks/use-form.d.ts +0 -16
  118. package/dist/shared-react/index.d.ts +0 -4
  119. package/dist/svelte/components/FormRendererRegistration.svelte.d.ts +0 -18
  120. package/dist/svelte/components/RenderWidget.svelte.d.ts +0 -11
  121. package/dist/svelte/components/annotations/FormCheckbox.svelte.d.ts +0 -5
  122. package/dist/svelte/components/annotations/FormCombobox.svelte.d.ts +0 -5
  123. package/dist/svelte/components/annotations/FormListbox.svelte.d.ts +0 -5
  124. package/dist/svelte/components/annotations/FormRadioButton.svelte.d.ts +0 -5
  125. package/dist/svelte/components/annotations/FormTextField.svelte.d.ts +0 -5
  126. package/dist/svelte/components/fields/ComboboxField.svelte.d.ts +0 -4
  127. package/dist/svelte/components/fields/ListboxField.svelte.d.ts +0 -4
  128. package/dist/svelte/components/fields/TextField.svelte.d.ts +0 -4
  129. package/dist/svelte/components/fill-mode/ComboboxFillMode.svelte.d.ts +0 -5
  130. package/dist/svelte/components/fill-mode/ListboxFillMode.svelte.d.ts +0 -5
  131. package/dist/svelte/components/fill-mode/RadioButtonFillMode.svelte.d.ts +0 -5
  132. package/dist/svelte/components/fill-mode/TextFillMode.svelte.d.ts +0 -5
  133. package/dist/svelte/components/fill-mode/ToggleFillMode.svelte.d.ts +0 -5
  134. package/dist/svelte/components/form-renderers.d.ts +0 -9
  135. package/dist/svelte/components/previews/CheckboxPreview.svelte.d.ts +0 -9
  136. package/dist/svelte/components/previews/ListboxPreview.svelte.d.ts +0 -9
  137. package/dist/svelte/components/previews/RadioButtonPreview.svelte.d.ts +0 -9
  138. package/dist/svelte/components/previews/TextFieldPreview.svelte.d.ts +0 -9
  139. package/dist/svelte/hooks/index.d.ts +0 -2
  140. package/dist/svelte/hooks/use-form-widget-state.svelte.d.ts +0 -12
  141. package/dist/svelte/hooks/use-form.svelte.d.ts +0 -14
  142. package/dist/svelte/index.cjs +0 -2
  143. package/dist/svelte/index.cjs.map +0 -1
  144. package/dist/svelte/index.d.ts +0 -3
  145. package/dist/svelte/index.js +0 -1592
  146. package/dist/svelte/index.js.map +0 -1
  147. package/dist/vue/components/annotations/form-checkbox.vue.d.ts +0 -6
  148. package/dist/vue/components/annotations/form-combobox.vue.d.ts +0 -6
  149. package/dist/vue/components/annotations/form-listbox.vue.d.ts +0 -6
  150. package/dist/vue/components/annotations/form-radio-button.vue.d.ts +0 -6
  151. package/dist/vue/components/annotations/form-text-field.vue.d.ts +0 -6
  152. package/dist/vue/components/fields/combobox-field.vue.d.ts +0 -4
  153. package/dist/vue/components/fields/listbox-field.vue.d.ts +0 -4
  154. package/dist/vue/components/fields/style.d.ts +0 -6
  155. package/dist/vue/components/fields/text-field.vue.d.ts +0 -4
  156. package/dist/vue/components/fill-mode/combobox-fill-mode.vue.d.ts +0 -6
  157. package/dist/vue/components/fill-mode/listbox-fill-mode.vue.d.ts +0 -6
  158. package/dist/vue/components/fill-mode/radio-button-fill-mode.vue.d.ts +0 -6
  159. package/dist/vue/components/fill-mode/text-fill-mode.vue.d.ts +0 -6
  160. package/dist/vue/components/fill-mode/toggle-fill-mode.vue.d.ts +0 -6
  161. package/dist/vue/components/form-renderer-registration.vue.d.ts +0 -13
  162. package/dist/vue/components/form-renderers.d.ts +0 -3
  163. package/dist/vue/components/previews/checkbox-preview.vue.d.ts +0 -10
  164. package/dist/vue/components/previews/listbox-preview.vue.d.ts +0 -10
  165. package/dist/vue/components/previews/radio-button-preview.vue.d.ts +0 -10
  166. package/dist/vue/components/previews/text-field-preview.vue.d.ts +0 -10
  167. package/dist/vue/components/render-widget.vue.d.ts +0 -15
  168. package/dist/vue/hooks/index.d.ts +0 -2
  169. package/dist/vue/hooks/use-form-widget-state.d.ts +0 -12
  170. package/dist/vue/hooks/use-form.d.ts +0 -12
  171. package/dist/vue/index.cjs +0 -2
  172. package/dist/vue/index.cjs.map +0 -1
  173. package/dist/vue/index.d.ts +0 -3
  174. package/dist/vue/index.js +0 -1643
  175. package/dist/vue/index.js.map +0 -1
@@ -1,9 +0,0 @@
1
- import { PdfStandardFont, Rect } from '@embedpdf/models';
2
- import { BoxedAnnotationRenderer } from '../../preact/annotation.ts';
3
- export interface WidgetPreviewData {
4
- rect: Rect;
5
- fontFamily?: PdfStandardFont;
6
- fontSize?: number;
7
- fontColor?: string;
8
- }
9
- export declare const formRenderers: BoxedAnnotationRenderer[];
@@ -1,2 +0,0 @@
1
- export * from './form-renderers';
2
- export * from './form-renderer-registration';
@@ -1,12 +0,0 @@
1
- import { HTMLAttributes, CSSProperties } from '../../preact/adapter.ts';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- type RenderWidgetProps = Omit<HTMLAttributes<HTMLImageElement>, 'style'> & {
4
- pageIndex: number;
5
- annotation: PdfWidgetAnnoObject;
6
- scaleFactor?: number;
7
- dpr?: number;
8
- renderKey?: number;
9
- style?: CSSProperties;
10
- };
11
- export declare function RenderWidget({ pageIndex, annotation, scaleFactor, renderKey, style, ...props }: RenderWidgetProps): import("preact").JSX.Element;
12
- export {};
@@ -1,42 +0,0 @@
1
- import { PdfWidgetAnnoField, PdfWidgetAnnoObject, PdfTextWidgetAnnoField, PdfCheckboxWidgetAnnoField, PdfRadioButtonWidgetAnnoField, PdfComboboxWidgetAnnoField, PdfListboxWidgetAnnoField, PdfPushButtonWidgetAnnoField } from '@embedpdf/models';
2
- export interface FieldProps {
3
- annotation: PdfWidgetAnnoObject;
4
- scale: number;
5
- pageIndex: number;
6
- isEditable: boolean;
7
- onChangeField?: (field: PdfWidgetAnnoField) => void;
8
- onFocus?: () => void;
9
- onBlur?: () => void;
10
- inputRef?: (el: HTMLElement | null) => void;
11
- syncExternalValue?: boolean;
12
- }
13
- export type TextFieldProps = Omit<FieldProps, 'annotation'> & {
14
- annotation: PdfWidgetAnnoObject & {
15
- field: PdfTextWidgetAnnoField;
16
- };
17
- };
18
- export type CheckboxFieldProps = Omit<FieldProps, 'annotation'> & {
19
- annotation: PdfWidgetAnnoObject & {
20
- field: PdfCheckboxWidgetAnnoField;
21
- };
22
- };
23
- export type RadioButtonFieldProps = Omit<FieldProps, 'annotation'> & {
24
- annotation: PdfWidgetAnnoObject & {
25
- field: PdfRadioButtonWidgetAnnoField;
26
- };
27
- };
28
- export type ComboboxFieldProps = Omit<FieldProps, 'annotation'> & {
29
- annotation: PdfWidgetAnnoObject & {
30
- field: PdfComboboxWidgetAnnoField;
31
- };
32
- };
33
- export type ListboxFieldProps = Omit<FieldProps, 'annotation'> & {
34
- annotation: PdfWidgetAnnoObject & {
35
- field: PdfListboxWidgetAnnoField;
36
- };
37
- };
38
- export type PushButtonFieldProps = Omit<FieldProps, 'annotation'> & {
39
- annotation: PdfWidgetAnnoObject & {
40
- field: PdfPushButtonWidgetAnnoField;
41
- };
42
- };
@@ -1 +0,0 @@
1
- export * from './use-form';
@@ -1,12 +0,0 @@
1
- import { PdfWidgetAnnoField, PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '../../preact/annotation.ts';
3
- export declare function useFormWidgetState(props: AnnotationRendererProps<PdfWidgetAnnoObject>): {
4
- annotation: PdfWidgetAnnoObject;
5
- field: PdfWidgetAnnoField;
6
- scale: number;
7
- pageIndex: number;
8
- scope: import('src/preact').FormScope | undefined;
9
- handleChangeField: (newField: PdfWidgetAnnoField) => void;
10
- renderKey: number;
11
- isReadOnly: boolean;
12
- };
@@ -1,16 +0,0 @@
1
- import { FormPlugin, FormDocumentState } from '../../lib/index.ts';
2
- export declare const useFormPlugin: () => {
3
- plugin: FormPlugin | null;
4
- isLoading: boolean;
5
- ready: Promise<void>;
6
- };
7
- export declare const useFormCapability: () => {
8
- provides: Readonly<import('../../lib/index.ts').FormCapability> | null;
9
- isLoading: boolean;
10
- ready: Promise<void>;
11
- };
12
- /**
13
- * Hook that subscribes to the form plugin's document state for a specific document.
14
- * Returns selectedFieldId and re-renders when the state changes.
15
- */
16
- export declare const useFormDocumentState: (documentId: string) => FormDocumentState;
@@ -1,4 +0,0 @@
1
- export * from './hooks';
2
- export * from './components';
3
- export * from '../lib/index.ts';
4
- export declare const FormPluginPackage: import('@embedpdf/core').WithAutoMount<import('@embedpdf/core').PluginPackage<import('../lib/index.ts').FormPlugin, import('../lib/index.ts').FormPluginConfig, import('../lib/index.ts').FormState, import('../lib/actions').FormAction>>;
@@ -1,12 +0,0 @@
1
- import { CSSProperties, MouseEvent } from '../../../react/adapter.ts';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- import { TrackedAnnotation } from '@embedpdf/plugin-annotation';
4
- export interface FormCheckboxProps {
5
- annotation: TrackedAnnotation<PdfWidgetAnnoObject>;
6
- isSelected: boolean;
7
- scale: number;
8
- pageIndex: number;
9
- onClick?: (e: MouseEvent<Element>) => void;
10
- style?: CSSProperties;
11
- }
12
- export declare function FormCheckbox({ annotation, isSelected, scale, onClick, style }: FormCheckboxProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { CSSProperties, MouseEvent } from '../../../react/adapter.ts';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- import { TrackedAnnotation } from '@embedpdf/plugin-annotation';
4
- export interface FormComboboxProps {
5
- annotation: TrackedAnnotation<PdfWidgetAnnoObject>;
6
- isSelected: boolean;
7
- scale: number;
8
- pageIndex: number;
9
- onClick?: (e: MouseEvent<Element>) => void;
10
- style?: CSSProperties;
11
- }
12
- export declare function FormCombobox({ annotation, isSelected, scale, onClick, style }: FormComboboxProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { CSSProperties, MouseEvent } from '../../../react/adapter.ts';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- import { TrackedAnnotation } from '@embedpdf/plugin-annotation';
4
- export interface FormListboxProps {
5
- annotation: TrackedAnnotation<PdfWidgetAnnoObject>;
6
- isSelected: boolean;
7
- scale: number;
8
- pageIndex: number;
9
- onClick?: (e: MouseEvent<Element>) => void;
10
- style?: CSSProperties;
11
- }
12
- export declare function FormListbox({ annotation, isSelected, scale, onClick, style }: FormListboxProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { CSSProperties, MouseEvent } from '../../../react/adapter.ts';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- import { TrackedAnnotation } from '@embedpdf/plugin-annotation';
4
- export interface FormRadioButtonProps {
5
- annotation: TrackedAnnotation<PdfWidgetAnnoObject>;
6
- isSelected: boolean;
7
- scale: number;
8
- pageIndex: number;
9
- onClick?: (e: MouseEvent<Element>) => void;
10
- style?: CSSProperties;
11
- }
12
- export declare function FormRadioButton({ annotation, isSelected, scale, onClick, style, }: FormRadioButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { CSSProperties, MouseEvent } from '../../../react/adapter.ts';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- import { TrackedAnnotation } from '@embedpdf/plugin-annotation';
4
- export interface FormTextFieldProps {
5
- annotation: TrackedAnnotation<PdfWidgetAnnoObject>;
6
- isSelected: boolean;
7
- scale: number;
8
- pageIndex: number;
9
- onClick?: (e: MouseEvent<Element>) => void;
10
- style?: CSSProperties;
11
- }
12
- export declare function FormTextField({ annotation, isSelected, scale, onClick, style, }: FormTextFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { CheckboxFieldProps } from '../types';
2
- export declare function CheckboxField(props: CheckboxFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { ComboboxFieldProps } from '../types';
2
- export declare function ComboboxField(props: ComboboxFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { ListboxFieldProps } from '../types';
2
- export declare function ListboxField(props: ListboxFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { PushButtonFieldProps } from '../types';
2
- export declare function PushButtonField(props: PushButtonFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { RadioButtonFieldProps } from '../types';
2
- export declare function RadioButtonField(props: RadioButtonFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { CSSProperties } from '../../../react/adapter.ts';
2
- export declare const checkboxStyle: CSSProperties;
3
- export declare const inputStyle: CSSProperties;
4
- export declare const selectStyle: CSSProperties;
5
- export declare const textareaStyle: CSSProperties;
6
- export declare const buttonStyle: CSSProperties;
@@ -1,2 +0,0 @@
1
- import { TextFieldProps } from '../types';
2
- export declare function TextField(props: TextFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '../../../react/annotation.ts';
3
- export declare function ComboboxFillMode(props: AnnotationRendererProps<PdfWidgetAnnoObject>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '../../../react/annotation.ts';
3
- export declare function ListboxFillMode(props: AnnotationRendererProps<PdfWidgetAnnoObject>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '../../../react/annotation.ts';
3
- export declare function PushButtonFillMode(props: AnnotationRendererProps<PdfWidgetAnnoObject>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '../../../react/annotation.ts';
3
- export declare function RadioButtonFillMode(props: AnnotationRendererProps<PdfWidgetAnnoObject>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '../../../react/annotation.ts';
3
- export declare function TextFillMode(props: AnnotationRendererProps<PdfWidgetAnnoObject>): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '../../../react/annotation.ts';
3
- export declare function ToggleFillMode(props: AnnotationRendererProps<PdfWidgetAnnoObject>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- /**
2
- * Utility component that registers form field renderers once at app level.
3
- * Added via addUtility() so it mounts once, not per-page.
4
- */
5
- export declare function FormRendererRegistration(): null;
@@ -1,9 +0,0 @@
1
- import { PdfStandardFont, Rect } from '@embedpdf/models';
2
- import { BoxedAnnotationRenderer } from '../../react/annotation.ts';
3
- export interface WidgetPreviewData {
4
- rect: Rect;
5
- fontFamily?: PdfStandardFont;
6
- fontSize?: number;
7
- fontColor?: string;
8
- }
9
- export declare const formRenderers: BoxedAnnotationRenderer[];
@@ -1,2 +0,0 @@
1
- export * from './form-renderers';
2
- export * from './form-renderer-registration';
@@ -1,12 +0,0 @@
1
- import { HTMLAttributes, CSSProperties } from '../../react/adapter.ts';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- type RenderWidgetProps = Omit<HTMLAttributes<HTMLImageElement>, 'style'> & {
4
- pageIndex: number;
5
- annotation: PdfWidgetAnnoObject;
6
- scaleFactor?: number;
7
- dpr?: number;
8
- renderKey?: number;
9
- style?: CSSProperties;
10
- };
11
- export declare function RenderWidget({ pageIndex, annotation, scaleFactor, renderKey, style, ...props }: RenderWidgetProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,42 +0,0 @@
1
- import { PdfWidgetAnnoField, PdfWidgetAnnoObject, PdfTextWidgetAnnoField, PdfCheckboxWidgetAnnoField, PdfRadioButtonWidgetAnnoField, PdfComboboxWidgetAnnoField, PdfListboxWidgetAnnoField, PdfPushButtonWidgetAnnoField } from '@embedpdf/models';
2
- export interface FieldProps {
3
- annotation: PdfWidgetAnnoObject;
4
- scale: number;
5
- pageIndex: number;
6
- isEditable: boolean;
7
- onChangeField?: (field: PdfWidgetAnnoField) => void;
8
- onFocus?: () => void;
9
- onBlur?: () => void;
10
- inputRef?: (el: HTMLElement | null) => void;
11
- syncExternalValue?: boolean;
12
- }
13
- export type TextFieldProps = Omit<FieldProps, 'annotation'> & {
14
- annotation: PdfWidgetAnnoObject & {
15
- field: PdfTextWidgetAnnoField;
16
- };
17
- };
18
- export type CheckboxFieldProps = Omit<FieldProps, 'annotation'> & {
19
- annotation: PdfWidgetAnnoObject & {
20
- field: PdfCheckboxWidgetAnnoField;
21
- };
22
- };
23
- export type RadioButtonFieldProps = Omit<FieldProps, 'annotation'> & {
24
- annotation: PdfWidgetAnnoObject & {
25
- field: PdfRadioButtonWidgetAnnoField;
26
- };
27
- };
28
- export type ComboboxFieldProps = Omit<FieldProps, 'annotation'> & {
29
- annotation: PdfWidgetAnnoObject & {
30
- field: PdfComboboxWidgetAnnoField;
31
- };
32
- };
33
- export type ListboxFieldProps = Omit<FieldProps, 'annotation'> & {
34
- annotation: PdfWidgetAnnoObject & {
35
- field: PdfListboxWidgetAnnoField;
36
- };
37
- };
38
- export type PushButtonFieldProps = Omit<FieldProps, 'annotation'> & {
39
- annotation: PdfWidgetAnnoObject & {
40
- field: PdfPushButtonWidgetAnnoField;
41
- };
42
- };
@@ -1 +0,0 @@
1
- export * from './use-form';
@@ -1,12 +0,0 @@
1
- import { PdfWidgetAnnoField, PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '../../react/annotation.ts';
3
- export declare function useFormWidgetState(props: AnnotationRendererProps<PdfWidgetAnnoObject>): {
4
- annotation: PdfWidgetAnnoObject;
5
- field: PdfWidgetAnnoField;
6
- scale: number;
7
- pageIndex: number;
8
- scope: import('src/react').FormScope | undefined;
9
- handleChangeField: (newField: PdfWidgetAnnoField) => void;
10
- renderKey: number;
11
- isReadOnly: boolean;
12
- };
@@ -1,16 +0,0 @@
1
- import { FormPlugin, FormDocumentState } from '../../lib/index.ts';
2
- export declare const useFormPlugin: () => {
3
- plugin: FormPlugin | null;
4
- isLoading: boolean;
5
- ready: Promise<void>;
6
- };
7
- export declare const useFormCapability: () => {
8
- provides: Readonly<import('../../lib/index.ts').FormCapability> | null;
9
- isLoading: boolean;
10
- ready: Promise<void>;
11
- };
12
- /**
13
- * Hook that subscribes to the form plugin's document state for a specific document.
14
- * Returns selectedFieldId and re-renders when the state changes.
15
- */
16
- export declare const useFormDocumentState: (documentId: string) => FormDocumentState;
@@ -1,4 +0,0 @@
1
- export * from './hooks';
2
- export * from './components';
3
- export * from '../lib/index.ts';
4
- export declare const FormPluginPackage: import('@embedpdf/core').WithAutoMount<import('@embedpdf/core').PluginPackage<import('../lib/index.ts').FormPlugin, import('../lib/index.ts').FormPluginConfig, import('../lib/index.ts').FormState, import('../lib/actions').FormAction>>;
@@ -1,18 +0,0 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- declare const FormRendererRegistration: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
- [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
17
- type FormRendererRegistration = InstanceType<typeof FormRendererRegistration>;
18
- export default FormRendererRegistration;
@@ -1,11 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- interface RenderWidgetProps {
3
- pageIndex: number;
4
- annotation: PdfWidgetAnnoObject;
5
- scaleFactor?: number;
6
- renderKey?: number;
7
- style?: string;
8
- }
9
- declare const RenderWidget: import('svelte', { with: { "resolution-mode": "import" } }).Component<RenderWidgetProps, {}, "">;
10
- type RenderWidget = ReturnType<typeof RenderWidget>;
11
- export default RenderWidget;
@@ -1,5 +0,0 @@
1
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- declare const FormCheckbox: import('svelte', { with: { "resolution-mode": "import" } }).Component<AnnotationRendererProps<PdfWidgetAnnoObject>, {}, "">;
4
- type FormCheckbox = ReturnType<typeof FormCheckbox>;
5
- export default FormCheckbox;
@@ -1,5 +0,0 @@
1
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- declare const FormCombobox: import('svelte', { with: { "resolution-mode": "import" } }).Component<AnnotationRendererProps<PdfWidgetAnnoObject>, {}, "">;
4
- type FormCombobox = ReturnType<typeof FormCombobox>;
5
- export default FormCombobox;
@@ -1,5 +0,0 @@
1
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- declare const FormListbox: import('svelte', { with: { "resolution-mode": "import" } }).Component<AnnotationRendererProps<PdfWidgetAnnoObject>, {}, "">;
4
- type FormListbox = ReturnType<typeof FormListbox>;
5
- export default FormListbox;
@@ -1,5 +0,0 @@
1
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- declare const FormRadioButton: import('svelte', { with: { "resolution-mode": "import" } }).Component<AnnotationRendererProps<PdfWidgetAnnoObject>, {}, "">;
4
- type FormRadioButton = ReturnType<typeof FormRadioButton>;
5
- export default FormRadioButton;
@@ -1,5 +0,0 @@
1
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
2
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
3
- declare const FormTextField: import('svelte', { with: { "resolution-mode": "import" } }).Component<AnnotationRendererProps<PdfWidgetAnnoObject>, {}, "">;
4
- type FormTextField = ReturnType<typeof FormTextField>;
5
- export default FormTextField;
@@ -1,4 +0,0 @@
1
- import { ComboboxFieldProps } from '../../../shared-svelte/components/types';
2
- declare const ComboboxField: import('svelte', { with: { "resolution-mode": "import" } }).Component<ComboboxFieldProps, {}, "">;
3
- type ComboboxField = ReturnType<typeof ComboboxField>;
4
- export default ComboboxField;
@@ -1,4 +0,0 @@
1
- import { ListboxFieldProps } from '../../../shared-svelte/components/types';
2
- declare const ListboxField: import('svelte', { with: { "resolution-mode": "import" } }).Component<ListboxFieldProps, {}, "">;
3
- type ListboxField = ReturnType<typeof ListboxField>;
4
- export default ListboxField;
@@ -1,4 +0,0 @@
1
- import { TextFieldProps } from '../../../shared-svelte/components/types';
2
- declare const TextField: import('svelte', { with: { "resolution-mode": "import" } }).Component<TextFieldProps, {}, "">;
3
- type TextField = ReturnType<typeof TextField>;
4
- export default TextField;
@@ -1,5 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
3
- declare const ComboboxFillMode: import('svelte', { with: { "resolution-mode": "import" } }).Component<AnnotationRendererProps<PdfWidgetAnnoObject>, {}, "">;
4
- type ComboboxFillMode = ReturnType<typeof ComboboxFillMode>;
5
- export default ComboboxFillMode;
@@ -1,5 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
3
- declare const ListboxFillMode: import('svelte', { with: { "resolution-mode": "import" } }).Component<AnnotationRendererProps<PdfWidgetAnnoObject>, {}, "">;
4
- type ListboxFillMode = ReturnType<typeof ListboxFillMode>;
5
- export default ListboxFillMode;
@@ -1,5 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
3
- declare const RadioButtonFillMode: import('svelte', { with: { "resolution-mode": "import" } }).Component<AnnotationRendererProps<PdfWidgetAnnoObject>, {}, "">;
4
- type RadioButtonFillMode = ReturnType<typeof RadioButtonFillMode>;
5
- export default RadioButtonFillMode;
@@ -1,5 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
3
- declare const TextFillMode: import('svelte', { with: { "resolution-mode": "import" } }).Component<AnnotationRendererProps<PdfWidgetAnnoObject>, {}, "">;
4
- type TextFillMode = ReturnType<typeof TextFillMode>;
5
- export default TextFillMode;
@@ -1,5 +0,0 @@
1
- import { PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
3
- declare const ToggleFillMode: import('svelte', { with: { "resolution-mode": "import" } }).Component<AnnotationRendererProps<PdfWidgetAnnoObject>, {}, "">;
4
- type ToggleFillMode = ReturnType<typeof ToggleFillMode>;
5
- export default ToggleFillMode;
@@ -1,9 +0,0 @@
1
- import { Rect, PdfStandardFont } from '@embedpdf/models';
2
- import { BoxedAnnotationRenderer } from '@embedpdf/plugin-annotation/svelte';
3
- export interface WidgetPreviewData {
4
- rect: Rect;
5
- fontFamily?: PdfStandardFont;
6
- fontSize?: number;
7
- fontColor?: string;
8
- }
9
- export declare const formRenderers: BoxedAnnotationRenderer[];
@@ -1,9 +0,0 @@
1
- import { Rect } from '@embedpdf/models';
2
- type $$ComponentProps = {
3
- data: unknown;
4
- bounds: Rect;
5
- scale: number;
6
- };
7
- declare const CheckboxPreview: import('svelte', { with: { "resolution-mode": "import" } }).Component<$$ComponentProps, {}, "">;
8
- type CheckboxPreview = ReturnType<typeof CheckboxPreview>;
9
- export default CheckboxPreview;
@@ -1,9 +0,0 @@
1
- import { Rect } from '@embedpdf/models';
2
- type $$ComponentProps = {
3
- data: unknown;
4
- bounds: Rect;
5
- scale: number;
6
- };
7
- declare const ListboxPreview: import('svelte', { with: { "resolution-mode": "import" } }).Component<$$ComponentProps, {}, "">;
8
- type ListboxPreview = ReturnType<typeof ListboxPreview>;
9
- export default ListboxPreview;
@@ -1,9 +0,0 @@
1
- import { Rect } from '@embedpdf/models';
2
- type $$ComponentProps = {
3
- data: unknown;
4
- bounds: Rect;
5
- scale: number;
6
- };
7
- declare const RadioButtonPreview: import('svelte', { with: { "resolution-mode": "import" } }).Component<$$ComponentProps, {}, "">;
8
- type RadioButtonPreview = ReturnType<typeof RadioButtonPreview>;
9
- export default RadioButtonPreview;
@@ -1,9 +0,0 @@
1
- import { Rect } from '@embedpdf/models';
2
- type $$ComponentProps = {
3
- data: unknown;
4
- bounds: Rect;
5
- scale: number;
6
- };
7
- declare const TextFieldPreview: import('svelte', { with: { "resolution-mode": "import" } }).Component<$$ComponentProps, {}, "">;
8
- type TextFieldPreview = ReturnType<typeof TextFieldPreview>;
9
- export default TextFieldPreview;
@@ -1,2 +0,0 @@
1
- export * from './use-form.svelte';
2
- export * from './use-form-widget-state.svelte';
@@ -1,12 +0,0 @@
1
- import { PdfWidgetAnnoField, PdfWidgetAnnoObject } from '@embedpdf/models';
2
- import { AnnotationRendererProps } from '@embedpdf/plugin-annotation/svelte';
3
- export declare function useFormWidgetState(props: AnnotationRendererProps<PdfWidgetAnnoObject>): {
4
- readonly annotation: PdfWidgetAnnoObject;
5
- readonly field: PdfWidgetAnnoField;
6
- readonly scale: number;
7
- readonly pageIndex: number;
8
- readonly scope: import('../../lib/index.ts').FormScope | null;
9
- handleChangeField: (newField: PdfWidgetAnnoField) => void;
10
- readonly renderKey: number;
11
- readonly isReadOnly: boolean;
12
- };
@@ -1,14 +0,0 @@
1
- import { FormPlugin, FormDocumentState } from '../../lib/index.ts';
2
- export declare const useFormPlugin: () => {
3
- plugin: FormPlugin | null;
4
- isLoading: boolean;
5
- ready: Promise<void>;
6
- };
7
- export declare const useFormCapability: () => {
8
- provides: Readonly<import('../../lib/index.ts').FormCapability> | null;
9
- isLoading: boolean;
10
- ready: Promise<void>;
11
- };
12
- export declare const useFormDocumentState: (getDocumentId: () => string) => {
13
- readonly state: FormDocumentState;
14
- };