@formepdf/svelte 0.11.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/README.md +101 -0
- package/dist/components/AreaChart.svelte +8 -0
- package/dist/components/AreaChart.svelte.d.ts +4 -0
- package/dist/components/BarChart.svelte +8 -0
- package/dist/components/BarChart.svelte.d.ts +4 -0
- package/dist/components/Barcode.svelte +23 -0
- package/dist/components/Barcode.svelte.d.ts +18 -0
- package/dist/components/Canvas.svelte +28 -0
- package/dist/components/Canvas.svelte.d.ts +21 -0
- package/dist/components/Cell.svelte +16 -0
- package/dist/components/Cell.svelte.d.ts +11 -0
- package/dist/components/Checkbox.svelte +22 -0
- package/dist/components/Checkbox.svelte.d.ts +17 -0
- package/dist/components/Code.svelte +14 -0
- package/dist/components/Code.svelte.d.ts +9 -0
- package/dist/components/Document.svelte +33 -0
- package/dist/components/Document.svelte.d.ts +28 -0
- package/dist/components/DotPlot.svelte +8 -0
- package/dist/components/DotPlot.svelte.d.ts +4 -0
- package/dist/components/Dropdown.svelte +26 -0
- package/dist/components/Dropdown.svelte.d.ts +21 -0
- package/dist/components/Em.svelte +14 -0
- package/dist/components/Em.svelte.d.ts +9 -0
- package/dist/components/Fixed.svelte +18 -0
- package/dist/components/Fixed.svelte.d.ts +13 -0
- package/dist/components/H1.svelte +16 -0
- package/dist/components/H1.svelte.d.ts +11 -0
- package/dist/components/H2.svelte +16 -0
- package/dist/components/H2.svelte.d.ts +11 -0
- package/dist/components/H3.svelte +16 -0
- package/dist/components/H3.svelte.d.ts +11 -0
- package/dist/components/H4.svelte +16 -0
- package/dist/components/H4.svelte.d.ts +11 -0
- package/dist/components/H5.svelte +16 -0
- package/dist/components/H5.svelte.d.ts +11 -0
- package/dist/components/H6.svelte +16 -0
- package/dist/components/H6.svelte.d.ts +11 -0
- package/dist/components/Image.svelte +25 -0
- package/dist/components/Image.svelte.d.ts +20 -0
- package/dist/components/LineChart.svelte +8 -0
- package/dist/components/LineChart.svelte.d.ts +4 -0
- package/dist/components/Link.svelte +15 -0
- package/dist/components/Link.svelte.d.ts +10 -0
- package/dist/components/ListItem.svelte +14 -0
- package/dist/components/ListItem.svelte.d.ts +9 -0
- package/dist/components/OrderedList.svelte +19 -0
- package/dist/components/OrderedList.svelte.d.ts +14 -0
- package/dist/components/Page.svelte +26 -0
- package/dist/components/Page.svelte.d.ts +24 -0
- package/dist/components/PageBreak.svelte +6 -0
- package/dist/components/PageBreak.svelte.d.ts +18 -0
- package/dist/components/PieChart.svelte +8 -0
- package/dist/components/PieChart.svelte.d.ts +4 -0
- package/dist/components/QrCode.svelte +19 -0
- package/dist/components/QrCode.svelte.d.ts +14 -0
- package/dist/components/RadioButton.svelte +24 -0
- package/dist/components/RadioButton.svelte.d.ts +19 -0
- package/dist/components/Row.svelte +17 -0
- package/dist/components/Row.svelte.d.ts +12 -0
- package/dist/components/Strong.svelte +14 -0
- package/dist/components/Strong.svelte.d.ts +9 -0
- package/dist/components/Svg.svelte +26 -0
- package/dist/components/Svg.svelte.d.ts +21 -0
- package/dist/components/Table.svelte +18 -0
- package/dist/components/Table.svelte.d.ts +13 -0
- package/dist/components/Text.svelte +16 -0
- package/dist/components/Text.svelte.d.ts +11 -0
- package/dist/components/TextField.svelte +32 -0
- package/dist/components/TextField.svelte.d.ts +27 -0
- package/dist/components/UnorderedList.svelte +17 -0
- package/dist/components/UnorderedList.svelte.d.ts +12 -0
- package/dist/components/View.svelte +17 -0
- package/dist/components/View.svelte.d.ts +12 -0
- package/dist/components/Watermark.svelte +23 -0
- package/dist/components/Watermark.svelte.d.ts +18 -0
- package/dist/constants.d.ts +20 -0
- package/dist/constants.js +20 -0
- package/dist/encode.d.ts +27 -0
- package/dist/encode.js +93 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +50 -0
- package/dist/parser.d.ts +30 -0
- package/dist/parser.js +756 -0
- package/dist/preview/index.d.ts +87 -0
- package/dist/preview/index.js +256 -0
- package/dist/preview/preview-html.generated.d.ts +5 -0
- package/dist/preview/preview-html.generated.js +5 -0
- package/dist/render-document.d.ts +36 -0
- package/dist/render-document.js +47 -0
- package/dist/serialize.d.ts +36 -0
- package/dist/serialize.js +39 -0
- package/dist/stylesheet.d.ts +4 -0
- package/dist/stylesheet.js +5 -0
- package/package.json +63 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
style?: Style;
|
|
5
|
+
href?: string;
|
|
6
|
+
bookmark?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
}
|
|
9
|
+
declare const H5: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type H5 = ReturnType<typeof H5>;
|
|
11
|
+
export default H5;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Style } from '@formepdf/shared';
|
|
4
|
+
import { encodeProps } from '../encode.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
style?: Style;
|
|
8
|
+
href?: string;
|
|
9
|
+
bookmark?: string;
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { children, ...rest }: Props = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<forme-h6 props={encodeProps('H6', rest)}>{@render children?.()}</forme-h6>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
style?: Style;
|
|
5
|
+
href?: string;
|
|
6
|
+
bookmark?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
}
|
|
9
|
+
declare const H6: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type H6 = ReturnType<typeof H6>;
|
|
11
|
+
export default H6;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
import { encodeProps } from '../encode.js';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Image source: a `data:image/...;base64,...` URI, a path relative
|
|
7
|
+
* to the template file, or an absolute file path. Passed through
|
|
8
|
+
* unresolved - resolution happens at render time. */
|
|
9
|
+
src: string;
|
|
10
|
+
/** Display width in points. If only one dimension is given, the
|
|
11
|
+
* other is computed from the image's aspect ratio. */
|
|
12
|
+
width?: number;
|
|
13
|
+
/** Display height in points. */
|
|
14
|
+
height?: number;
|
|
15
|
+
style?: Style;
|
|
16
|
+
/** Optional hyperlink URL - makes the image clickable. */
|
|
17
|
+
href?: string;
|
|
18
|
+
/** Alt text for accessibility. */
|
|
19
|
+
alt?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let rest: Props = $props();
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<forme-image props={encodeProps('Image', rest)}></forme-image>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Style } from '@formepdf/shared';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Image source: a `data:image/...;base64,...` URI, a path relative
|
|
4
|
+
* to the template file, or an absolute file path. Passed through
|
|
5
|
+
* unresolved - resolution happens at render time. */
|
|
6
|
+
src: string;
|
|
7
|
+
/** Display width in points. If only one dimension is given, the
|
|
8
|
+
* other is computed from the image's aspect ratio. */
|
|
9
|
+
width?: number;
|
|
10
|
+
/** Display height in points. */
|
|
11
|
+
height?: number;
|
|
12
|
+
style?: Style;
|
|
13
|
+
/** Optional hyperlink URL - makes the image clickable. */
|
|
14
|
+
href?: string;
|
|
15
|
+
/** Alt text for accessibility. */
|
|
16
|
+
alt?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const Image: import("svelte").Component<Props, {}, "">;
|
|
19
|
+
type Image = ReturnType<typeof Image>;
|
|
20
|
+
export default Image;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Style } from '@formepdf/shared';
|
|
4
|
+
import { encodeProps } from '../encode.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
href: string;
|
|
8
|
+
style?: Style;
|
|
9
|
+
children?: Snippet;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let { children, ...rest }: Props = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<forme-link props={encodeProps('Link', rest)}>{@render children?.()}</forme-link>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
href: string;
|
|
5
|
+
style?: Style;
|
|
6
|
+
children?: Snippet;
|
|
7
|
+
}
|
|
8
|
+
declare const Link: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type Link = ReturnType<typeof Link>;
|
|
10
|
+
export default Link;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Style } from '@formepdf/shared';
|
|
4
|
+
import { encodeProps } from '../encode.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
style?: Style;
|
|
8
|
+
children?: Snippet;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let { children, ...rest }: Props = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<forme-list-item props={encodeProps('ListItem', rest)}>{@render children?.()}</forme-list-item>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
style?: Style;
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
}
|
|
7
|
+
declare const ListItem: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type ListItem = ReturnType<typeof ListItem>;
|
|
9
|
+
export default ListItem;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Style } from '@formepdf/shared';
|
|
4
|
+
import { encodeProps } from '../encode.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
/** Marker style. Defaults to 'decimal'. */
|
|
8
|
+
type?: 'decimal' | 'lower-alpha' | 'upper-alpha' | 'lower-roman' | 'upper-roman';
|
|
9
|
+
/** Starting index. Defaults to 1. */
|
|
10
|
+
start?: number;
|
|
11
|
+
style?: Style;
|
|
12
|
+
bookmark?: string;
|
|
13
|
+
children?: Snippet;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let { children, ...rest }: Props = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<forme-ordered-list props={encodeProps('OrderedList', rest)}>{@render children?.()}</forme-ordered-list>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Marker style. Defaults to 'decimal'. */
|
|
5
|
+
type?: 'decimal' | 'lower-alpha' | 'upper-alpha' | 'lower-roman' | 'upper-roman';
|
|
6
|
+
/** Starting index. Defaults to 1. */
|
|
7
|
+
start?: number;
|
|
8
|
+
style?: Style;
|
|
9
|
+
bookmark?: string;
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
}
|
|
12
|
+
declare const OrderedList: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type OrderedList = ReturnType<typeof OrderedList>;
|
|
14
|
+
export default OrderedList;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Edges, Style } from '@formepdf/shared';
|
|
4
|
+
import { encodeProps } from '../encode.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
size?: 'A4' | 'A3' | 'A5' | 'Letter' | 'Legal' | 'Tabloid' | { width: number; height: number };
|
|
8
|
+
margin?: number | string | number[] | Edges;
|
|
9
|
+
/** Style applied to the page's content area (background, padding, default text styles). */
|
|
10
|
+
style?: Style;
|
|
11
|
+
/** Optional background image painted behind the page's content. URL,
|
|
12
|
+
* file path, or `data:image/...;base64,` URI. */
|
|
13
|
+
backgroundImage?: string;
|
|
14
|
+
/** Background image opacity 0–1. Defaults to 1.0. */
|
|
15
|
+
backgroundOpacity?: number;
|
|
16
|
+
/** How the background image is sized within the page. */
|
|
17
|
+
backgroundSize?: 'fill' | 'cover' | 'contain';
|
|
18
|
+
/** Where the background image is positioned within the page. */
|
|
19
|
+
backgroundPosition?: 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
20
|
+
children?: Snippet;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
let { children, ...rest }: Props = $props();
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<forme-page props={encodeProps('Page', rest)}>{@render children?.()}</forme-page>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { Edges, Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
size?: 'A4' | 'A3' | 'A5' | 'Letter' | 'Legal' | 'Tabloid' | {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
margin?: number | string | number[] | Edges;
|
|
9
|
+
/** Style applied to the page's content area (background, padding, default text styles). */
|
|
10
|
+
style?: Style;
|
|
11
|
+
/** Optional background image painted behind the page's content. URL,
|
|
12
|
+
* file path, or `data:image/...;base64,` URI. */
|
|
13
|
+
backgroundImage?: string;
|
|
14
|
+
/** Background image opacity 0–1. Defaults to 1.0. */
|
|
15
|
+
backgroundOpacity?: number;
|
|
16
|
+
/** How the background image is sized within the page. */
|
|
17
|
+
backgroundSize?: 'fill' | 'cover' | 'contain';
|
|
18
|
+
/** Where the background image is positioned within the page. */
|
|
19
|
+
backgroundPosition?: 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
20
|
+
children?: Snippet;
|
|
21
|
+
}
|
|
22
|
+
declare const Page: import("svelte").Component<Props, {}, "">;
|
|
23
|
+
type Page = ReturnType<typeof Page>;
|
|
24
|
+
export default Page;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 PageBreak: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type PageBreak = InstanceType<typeof PageBreak>;
|
|
18
|
+
export default PageBreak;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
import { encodeProps } from '../encode.js';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Data to encode (URL, text, etc.). */
|
|
7
|
+
data: string;
|
|
8
|
+
/** Display size in points (QR codes are square). Defaults to
|
|
9
|
+
* available width. */
|
|
10
|
+
size?: number;
|
|
11
|
+
/** QR code color. Default: black. */
|
|
12
|
+
color?: string;
|
|
13
|
+
style?: Style;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let rest: Props = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<forme-qrcode props={encodeProps('QrCode', rest)}></forme-qrcode>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Style } from '@formepdf/shared';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Data to encode (URL, text, etc.). */
|
|
4
|
+
data: string;
|
|
5
|
+
/** Display size in points (QR codes are square). Defaults to
|
|
6
|
+
* available width. */
|
|
7
|
+
size?: number;
|
|
8
|
+
/** QR code color. Default: black. */
|
|
9
|
+
color?: string;
|
|
10
|
+
style?: Style;
|
|
11
|
+
}
|
|
12
|
+
declare const QrCode: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type QrCode = ReturnType<typeof QrCode>;
|
|
14
|
+
export default QrCode;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
import { encodeProps } from '../encode.js';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Field name - multiple RadioButtons with the same name form a group. */
|
|
7
|
+
name: string;
|
|
8
|
+
/** The value this button represents within the group. */
|
|
9
|
+
value: string;
|
|
10
|
+
/** Whether this button is selected. Default: false. */
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
/** Display width in points. Default: 14. */
|
|
13
|
+
width?: number;
|
|
14
|
+
/** Display height in points. Default: 14. */
|
|
15
|
+
height?: number;
|
|
16
|
+
/** Prevent editing. Default: false. */
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
style?: Style;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let rest: Props = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<forme-radio-button props={encodeProps('RadioButton', rest)}></forme-radio-button>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Style } from '@formepdf/shared';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Field name - multiple RadioButtons with the same name form a group. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** The value this button represents within the group. */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Whether this button is selected. Default: false. */
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
/** Display width in points. Default: 14. */
|
|
10
|
+
width?: number;
|
|
11
|
+
/** Display height in points. Default: 14. */
|
|
12
|
+
height?: number;
|
|
13
|
+
/** Prevent editing. Default: false. */
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
style?: Style;
|
|
16
|
+
}
|
|
17
|
+
declare const RadioButton: import("svelte").Component<Props, {}, "">;
|
|
18
|
+
type RadioButton = ReturnType<typeof RadioButton>;
|
|
19
|
+
export default RadioButton;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Style } from '@formepdf/shared';
|
|
4
|
+
import { encodeProps } from '../encode.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
/** Header rows repeat at the top of every continuation page when
|
|
8
|
+
* the table splits across pages. */
|
|
9
|
+
header?: boolean;
|
|
10
|
+
style?: Style;
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { children, ...rest }: Props = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<forme-row props={encodeProps('Row', rest)}>{@render children?.()}</forme-row>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Header rows repeat at the top of every continuation page when
|
|
5
|
+
* the table splits across pages. */
|
|
6
|
+
header?: boolean;
|
|
7
|
+
style?: Style;
|
|
8
|
+
children?: Snippet;
|
|
9
|
+
}
|
|
10
|
+
declare const Row: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type Row = ReturnType<typeof Row>;
|
|
12
|
+
export default Row;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Style } from '@formepdf/shared';
|
|
4
|
+
import { encodeProps } from '../encode.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
style?: Style;
|
|
8
|
+
children?: Snippet;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let { children, ...rest }: Props = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<forme-strong props={encodeProps('Strong', rest)}>{@render children?.()}</forme-strong>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
style?: Style;
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
}
|
|
7
|
+
declare const Strong: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type Strong = ReturnType<typeof Strong>;
|
|
9
|
+
export default Strong;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
import { encodeProps } from '../encode.js';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Display width in points. */
|
|
7
|
+
width: number;
|
|
8
|
+
/** Display height in points. */
|
|
9
|
+
height: number;
|
|
10
|
+
/** SVG viewBox string (e.g., "0 0 100 100"). */
|
|
11
|
+
viewBox?: string;
|
|
12
|
+
/** SVG markup string - the inner content, not the outer `<svg>` tag.
|
|
13
|
+
* Supported shapes: rect, circle, ellipse, line, path, polygon,
|
|
14
|
+
* polyline. */
|
|
15
|
+
content?: string;
|
|
16
|
+
style?: Style;
|
|
17
|
+
/** Optional hyperlink URL - makes the SVG clickable. */
|
|
18
|
+
href?: string;
|
|
19
|
+
/** Alt text for accessibility. */
|
|
20
|
+
alt?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
let rest: Props = $props();
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<forme-svg props={encodeProps('Svg', rest)}></forme-svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Style } from '@formepdf/shared';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Display width in points. */
|
|
4
|
+
width: number;
|
|
5
|
+
/** Display height in points. */
|
|
6
|
+
height: number;
|
|
7
|
+
/** SVG viewBox string (e.g., "0 0 100 100"). */
|
|
8
|
+
viewBox?: string;
|
|
9
|
+
/** SVG markup string - the inner content, not the outer `<svg>` tag.
|
|
10
|
+
* Supported shapes: rect, circle, ellipse, line, path, polygon,
|
|
11
|
+
* polyline. */
|
|
12
|
+
content?: string;
|
|
13
|
+
style?: Style;
|
|
14
|
+
/** Optional hyperlink URL - makes the SVG clickable. */
|
|
15
|
+
href?: string;
|
|
16
|
+
/** Alt text for accessibility. */
|
|
17
|
+
alt?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const Svg: import("svelte").Component<Props, {}, "">;
|
|
20
|
+
type Svg = ReturnType<typeof Svg>;
|
|
21
|
+
export default Svg;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ColumnDef, Style } from '@formepdf/shared';
|
|
4
|
+
import { encodeProps } from '../encode.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
/** Column width definitions: `{ fraction }`, `{ fixed }`, or `'auto'`.
|
|
8
|
+
* Rows split across pages automatically; header rows repeat on
|
|
9
|
+
* continuation pages. */
|
|
10
|
+
columns?: ColumnDef[];
|
|
11
|
+
style?: Style;
|
|
12
|
+
children?: Snippet;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let { children, ...rest }: Props = $props();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<forme-table props={encodeProps('Table', rest)}>{@render children?.()}</forme-table>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { ColumnDef, Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Column width definitions: `{ fraction }`, `{ fixed }`, or `'auto'`.
|
|
5
|
+
* Rows split across pages automatically; header rows repeat on
|
|
6
|
+
* continuation pages. */
|
|
7
|
+
columns?: ColumnDef[];
|
|
8
|
+
style?: Style;
|
|
9
|
+
children?: Snippet;
|
|
10
|
+
}
|
|
11
|
+
declare const Table: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type Table = ReturnType<typeof Table>;
|
|
13
|
+
export default Table;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Style } from '@formepdf/shared';
|
|
4
|
+
import { encodeProps } from '../encode.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
style?: Style;
|
|
8
|
+
href?: string;
|
|
9
|
+
bookmark?: string;
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { children, ...rest }: Props = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<forme-text props={encodeProps('Text', rest)}>{@render children?.()}</forme-text>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
style?: Style;
|
|
5
|
+
href?: string;
|
|
6
|
+
bookmark?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
}
|
|
9
|
+
declare const Text: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type Text = ReturnType<typeof Text>;
|
|
11
|
+
export default Text;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
import { encodeProps } from '../encode.js';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Unique field name (used as the PDF field identifier). */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Pre-filled value. */
|
|
9
|
+
value?: string;
|
|
10
|
+
/** Placeholder text shown when empty. */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Field width in points. */
|
|
13
|
+
width: number;
|
|
14
|
+
/** Field height in points. Default: 24. */
|
|
15
|
+
height?: number;
|
|
16
|
+
/** Allow multi-line input. Default: false. */
|
|
17
|
+
multiline?: boolean;
|
|
18
|
+
/** Mask input as password. Default: false. */
|
|
19
|
+
password?: boolean;
|
|
20
|
+
/** Prevent editing. Default: false. */
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
/** Maximum number of characters. */
|
|
23
|
+
maxLength?: number;
|
|
24
|
+
/** Font size in points. Default: 12. */
|
|
25
|
+
fontSize?: number;
|
|
26
|
+
style?: Style;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let rest: Props = $props();
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<forme-text-field props={encodeProps('TextField', rest)}></forme-text-field>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Style } from '@formepdf/shared';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Unique field name (used as the PDF field identifier). */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Pre-filled value. */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Placeholder text shown when empty. */
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Field width in points. */
|
|
10
|
+
width: number;
|
|
11
|
+
/** Field height in points. Default: 24. */
|
|
12
|
+
height?: number;
|
|
13
|
+
/** Allow multi-line input. Default: false. */
|
|
14
|
+
multiline?: boolean;
|
|
15
|
+
/** Mask input as password. Default: false. */
|
|
16
|
+
password?: boolean;
|
|
17
|
+
/** Prevent editing. Default: false. */
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
/** Maximum number of characters. */
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
/** Font size in points. Default: 12. */
|
|
22
|
+
fontSize?: number;
|
|
23
|
+
style?: Style;
|
|
24
|
+
}
|
|
25
|
+
declare const TextField: import("svelte").Component<Props, {}, "">;
|
|
26
|
+
type TextField = ReturnType<typeof TextField>;
|
|
27
|
+
export default TextField;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Style } from '@formepdf/shared';
|
|
4
|
+
import { encodeProps } from '../encode.js';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
/** Bullet glyph style. Defaults to 'disc'. */
|
|
8
|
+
marker?: 'disc' | 'circle' | 'square' | 'none';
|
|
9
|
+
style?: Style;
|
|
10
|
+
bookmark?: string;
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { children, ...rest }: Props = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<forme-unordered-list props={encodeProps('UnorderedList', rest)}>{@render children?.()}</forme-unordered-list>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { Style } from '@formepdf/shared';
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Bullet glyph style. Defaults to 'disc'. */
|
|
5
|
+
marker?: 'disc' | 'circle' | 'square' | 'none';
|
|
6
|
+
style?: Style;
|
|
7
|
+
bookmark?: string;
|
|
8
|
+
children?: Snippet;
|
|
9
|
+
}
|
|
10
|
+
declare const UnorderedList: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type UnorderedList = ReturnType<typeof UnorderedList>;
|
|
12
|
+
export default UnorderedList;
|