@documenso/embed-solid 0.5.1 → 0.6.1

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.
@@ -7,6 +7,7 @@ export type EmbedCreateDocumentProps = {
7
7
  css?: string | undefined;
8
8
  cssVars?: (CssVars & Record<string, string>) | undefined;
9
9
  darkModeDisabled?: boolean | undefined;
10
+ language?: string | undefined;
10
11
  features?: {
11
12
  allowConfigureSignatureTypes?: boolean;
12
13
  allowConfigureLanguage?: boolean;
@@ -0,0 +1,21 @@
1
+ import { CssVars } from './css-vars';
2
+ import { DeepPartial, EnvelopeEditorSettings } from './features-type';
3
+ export type EmbedCreateEnvelopeProps = {
4
+ className?: string;
5
+ host?: string;
6
+ presignToken: string;
7
+ externalId?: string;
8
+ type: "DOCUMENT" | "TEMPLATE";
9
+ folderId?: string;
10
+ css?: string | undefined;
11
+ cssVars?: (CssVars & Record<string, string>) | undefined;
12
+ darkModeDisabled?: boolean | undefined;
13
+ language?: string | undefined;
14
+ features?: DeepPartial<EnvelopeEditorSettings> & Record<string, any>;
15
+ onEnvelopeCreated?: (data: {
16
+ externalId: string | null;
17
+ envelopeId: number;
18
+ }) => void;
19
+ };
20
+ declare function EmbedCreateEnvelope(props: EmbedCreateEnvelopeProps): import("solid-js").JSX.Element;
21
+ export default EmbedCreateEnvelope;
@@ -7,6 +7,7 @@ export type EmbedCreateTemplateProps = {
7
7
  css?: string | undefined;
8
8
  cssVars?: (CssVars & Record<string, string>) | undefined;
9
9
  darkModeDisabled?: boolean | undefined;
10
+ language?: string | undefined;
10
11
  features?: {
11
12
  allowConfigureSignatureTypes?: boolean;
12
13
  allowConfigureLanguage?: boolean;
@@ -7,6 +7,7 @@ export type EmbedDirectTemplateProps = {
7
7
  css?: string | undefined;
8
8
  cssVars?: (CssVars & Record<string, string>) | undefined;
9
9
  darkModeDisabled?: boolean | undefined;
10
+ language?: string | undefined;
10
11
  email?: string | undefined;
11
12
  lockEmail?: boolean | undefined;
12
13
  name?: string | undefined;
@@ -0,0 +1,48 @@
1
+ export type DeepPartial<T> = T extends object ? {
2
+ [K in keyof T]?: DeepPartial<T[K]>;
3
+ } : T;
4
+ /**
5
+ * Envelope editor settings (features) for create/edit envelope embeds.
6
+ * Matches ZEnvelopeEditorSettingsSchema from the app.
7
+ */
8
+ export type EnvelopeEditorSettings = {
9
+ general: {
10
+ allowConfigureEnvelopeTitle: boolean;
11
+ allowUploadAndRecipientStep: boolean;
12
+ allowAddFieldsStep: boolean;
13
+ allowPreviewStep: boolean;
14
+ minimizeLeftSidebar: boolean;
15
+ };
16
+ /** If null, envelope settings will not be available to be seen/updated. */
17
+ settings: {
18
+ allowConfigureSignatureTypes: boolean;
19
+ allowConfigureLanguage: boolean;
20
+ allowConfigureDateFormat: boolean;
21
+ allowConfigureTimezone: boolean;
22
+ allowConfigureRedirectUrl: boolean;
23
+ allowConfigureDistribution: boolean;
24
+ allowConfigureExpirationPeriod: boolean;
25
+ allowConfigureEmailSender: boolean;
26
+ allowConfigureEmailReplyTo: boolean;
27
+ } | null;
28
+ actions: {
29
+ allowAttachments: boolean;
30
+ };
31
+ /** If null, no adjustments to envelope items will be allowed. */
32
+ envelopeItems: {
33
+ allowConfigureTitle: boolean;
34
+ allowConfigureOrder: boolean;
35
+ allowUpload: boolean;
36
+ allowDelete: boolean;
37
+ allowReplace: boolean;
38
+ } | null;
39
+ /** If null, recipients will not be configurable at all. */
40
+ recipients: {
41
+ allowConfigureSigningOrder: boolean;
42
+ allowConfigureDictateNextSigner: boolean;
43
+ allowApproverRole: boolean;
44
+ allowViewerRole: boolean;
45
+ allowCCerRole: boolean;
46
+ allowAssistantRole: boolean;
47
+ } | null;
48
+ };
package/dist/index.d.mts CHANGED
@@ -4,8 +4,13 @@ export { default as EmbedCreateDocumentV1 } from './create-document';
4
4
  export { default as EmbedCreateTemplateV1 } from './create-template';
5
5
  export { default as EmbedUpdateDocumentV1 } from './update-document';
6
6
  export { default as EmbedUpdateTemplateV1 } from './update-template';
7
+ export { default as EmbedCreateEnvelopeV2 } from './create-envelope';
8
+ export { default as EmbedUpdateEnvelopeV2 } from './update-envelope';
9
+ export type { EnvelopeEditorSettings } from './features-type';
7
10
  export { default as unstable_EmbedCreateDocument } from './create-document';
8
11
  export { default as unstable_EmbedCreateTemplate } from './create-template';
9
12
  export { default as unstable_EmbedUpdateDocument } from './update-document';
10
13
  export { default as unstable_EmbedUpdateTemplate } from './update-template';
14
+ export { default as unstable_EmbedCreateEnvelope } from './create-envelope';
15
+ export { default as unstable_EmbedUpdateEnvelope } from './update-envelope';
11
16
  export { default as unstable_EmbedMultiSignDocument } from './multisign-document';
package/dist/index.d.ts CHANGED
@@ -4,8 +4,13 @@ export { default as EmbedCreateDocumentV1 } from './create-document';
4
4
  export { default as EmbedCreateTemplateV1 } from './create-template';
5
5
  export { default as EmbedUpdateDocumentV1 } from './update-document';
6
6
  export { default as EmbedUpdateTemplateV1 } from './update-template';
7
+ export { default as EmbedCreateEnvelopeV2 } from './create-envelope';
8
+ export { default as EmbedUpdateEnvelopeV2 } from './update-envelope';
9
+ export type { EnvelopeEditorSettings } from './features-type';
7
10
  export { default as unstable_EmbedCreateDocument } from './create-document';
8
11
  export { default as unstable_EmbedCreateTemplate } from './create-template';
9
12
  export { default as unstable_EmbedUpdateDocument } from './update-document';
10
13
  export { default as unstable_EmbedUpdateTemplate } from './update-template';
14
+ export { default as unstable_EmbedCreateEnvelope } from './create-envelope';
15
+ export { default as unstable_EmbedUpdateEnvelope } from './update-envelope';
11
16
  export { default as unstable_EmbedMultiSignDocument } from './multisign-document';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("solid-js/web"),r=require("solid-js");var k=n.template("<iframe>");function g(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,email:e.email,lockEmail:e.lockEmail,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),a=new URL(`/embed/direct/${e.token}`,t);return e.externalId&&a.searchParams.set("externalId",e.externalId),`${a}#${d}`});function i(t){if(c?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"field-signed":e.onFieldSigned?.();break;case"field-unsigned":e.onFieldUnsigned?.();break}}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=k(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var h=n.template("<iframe>");function v(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps})));return`${new URL(`/embed/sign/${e.token}`,t)}#${d}`});function i(t){if(c?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"document-rejected":e.onDocumentRejected?.(t.data.data);break}}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=h(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var D=n.template("<iframe>");function l(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),a=new URL("/embed/v1/authoring/document/create",t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function i(t){c?.contentWindow===t.source&&t.data.type==="document-created"&&e.onDocumentCreated?.({documentId:t.data.documentId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=D(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var w=n.template("<iframe>");function u(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),a=new URL("/embed/v1/authoring/template/create",t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function i(t){c?.contentWindow===t.source&&t.data.type==="template-created"&&e.onTemplateCreated?.({templateId:t.data.templateId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=w(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var M=n.template("<iframe>");function f(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({token:e.presignToken,externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,onlyEditFields:e.onlyEditFields,...e.additionalProps}))),a=new URL(`/embed/v1/authoring/document/edit/${e.documentId}`,t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function i(t){c?.contentWindow===t.source&&t.data.type==="document-updated"&&e.onDocumentUpdated?.({documentId:t.data.documentId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=M(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var I=n.template("<iframe>");function b(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,onlyEditFields:e.onlyEditFields,...e.additionalProps}))),a=new URL(`/embed/v1/authoring/template/edit/${e.templateId}`,t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function i(t){c?.contentWindow===t.source&&t.data.type==="template-updated"&&e.onTemplateUpdated?.({templateId:t.data.templateId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=I(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var E=n.template("<iframe>");function U(e){const m=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps}))),a=new URL("/embed/v1/multisign",t);for(const o of e.tokens)a.searchParams.append("token",o);return`${a}#${d}`});function i(t){if(c?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"document-rejected":e.onDocumentRejected?.(t.data.data);break;case"all-documents-completed":e.onAllDocumentsCompleted?.(t.data.data);break}}let c;return r.onMount(()=>{window.addEventListener("message",i)}),(()=>{var t=E(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=m();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}exports.EmbedCreateDocumentV1=l;exports.EmbedCreateTemplateV1=u;exports.EmbedDirectTemplate=g;exports.EmbedSignDocument=v;exports.EmbedUpdateDocumentV1=f;exports.EmbedUpdateTemplateV1=b;exports.unstable_EmbedCreateDocument=l;exports.unstable_EmbedCreateTemplate=u;exports.unstable_EmbedMultiSignDocument=U;exports.unstable_EmbedUpdateDocument=f;exports.unstable_EmbedUpdateTemplate=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("solid-js/web"),r=require("solid-js");var k=n.template("<iframe>");function h(e){const i=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,email:e.email,lockEmail:e.lockEmail,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,language:e.language,...e.additionalProps}))),a=new URL(`/embed/direct/${e.token}`,t);return e.externalId&&a.searchParams.set("externalId",e.externalId),`${a}#${d}`});function l(t){if(c?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"field-signed":e.onFieldSigned?.();break;case"field-unsigned":e.onFieldUnsigned?.();break}}let c;return r.onMount(()=>{window.addEventListener("message",l)}),(()=>{var t=k(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=i();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var I=n.template("<iframe>");function E(e){const i=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,email:e.email,lockEmail:e.lockEmail,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,language:e.language,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps})));return`${new URL(`/embed/sign/${e.token}`,t)}#${d}`});function l(t){if(c?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"document-rejected":e.onDocumentRejected?.(t.data.data);break}}let c;return r.onMount(()=>{window.addEventListener("message",l)}),(()=>{var t=I(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=i();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var w=n.template("<iframe>");function m(e){const i=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,language:e.language,...e.additionalProps}))),a=new URL("/embed/v1/authoring/document/create",t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function l(t){c?.contentWindow===t.source&&t.data.type==="document-created"&&e.onDocumentCreated?.({documentId:t.data.documentId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",l)}),(()=>{var t=w(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=i();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var D=n.template("<iframe>");function u(e){const i=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,language:e.language,...e.additionalProps}))),a=new URL("/embed/v1/authoring/template/create",t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function l(t){c?.contentWindow===t.source&&t.data.type==="template-created"&&e.onTemplateCreated?.({templateId:t.data.templateId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",l)}),(()=>{var t=D(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=i();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var M=n.template("<iframe>");function f(e){const i=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({token:e.presignToken,externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,language:e.language,onlyEditFields:e.onlyEditFields,...e.additionalProps}))),a=new URL(`/embed/v1/authoring/document/edit/${e.documentId}`,t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function l(t){c?.contentWindow===t.source&&t.data.type==="document-updated"&&e.onDocumentUpdated?.({documentId:t.data.documentId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",l)}),(()=>{var t=M(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=i();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var U=n.template("<iframe>");function b(e){const i=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,language:e.language,onlyEditFields:e.onlyEditFields,...e.additionalProps}))),a=new URL(`/embed/v1/authoring/template/edit/${e.templateId}`,t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function l(t){c?.contentWindow===t.source&&t.data.type==="template-updated"&&e.onTemplateUpdated?.({templateId:t.data.templateId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",l)}),(()=>{var t=U(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=i();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var y=n.template("<iframe>");function g(e){const i=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,type:e.type,folderId:e.folderId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,language:e.language}))),a=new URL("/embed/v2/authoring/envelope/create",t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function l(t){c?.contentWindow===t.source&&t.data.type==="envelope-created"&&e.onEnvelopeCreated?.({envelopeId:t.data.envelopeId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",l)}),(()=>{var t=y(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=i();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var _=n.template("<iframe>");function v(e){const i=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,language:e.language}))),a=new URL(`/embed/v2/authoring/envelope/edit/${e.envelopeId}`,t);return a.searchParams.set("token",e.presignToken),a.hash=d,a.toString()});function l(t){c?.contentWindow===t.source&&t.data.type==="envelope-updated"&&e.onEnvelopeUpdated?.({envelopeId:t.data.envelopeId,externalId:t.data.externalId})}let c;return r.onMount(()=>{window.addEventListener("message",l)}),(()=>{var t=_(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=i();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}var N=n.template("<iframe>");function $(e){const i=r.createMemo(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps}))),a=new URL("/embed/v1/multisign",t);for(const o of e.tokens)a.searchParams.append("token",o);return`${a}#${d}`});function l(t){if(c?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"document-rejected":e.onDocumentRejected?.(t.data.data);break;case"all-documents-completed":e.onAllDocumentsCompleted?.(t.data.data);break}}let c;return r.onMount(()=>{window.addEventListener("message",l)}),(()=>{var t=N(),d=c;return typeof d=="function"?n.use(d,t):c=t,n.effect(a=>{var o=e.className,s=i();return o!==a.e&&n.className(t,a.e=o),s!==a.t&&n.setAttribute(t,"src",a.t=s),a},{e:void 0,t:void 0}),t})()}exports.EmbedCreateDocumentV1=m;exports.EmbedCreateEnvelopeV2=g;exports.EmbedCreateTemplateV1=u;exports.EmbedDirectTemplate=h;exports.EmbedSignDocument=E;exports.EmbedUpdateDocumentV1=f;exports.EmbedUpdateEnvelopeV2=v;exports.EmbedUpdateTemplateV1=b;exports.unstable_EmbedCreateDocument=m;exports.unstable_EmbedCreateEnvelope=g;exports.unstable_EmbedCreateTemplate=u;exports.unstable_EmbedMultiSignDocument=$;exports.unstable_EmbedUpdateDocument=f;exports.unstable_EmbedUpdateEnvelope=v;exports.unstable_EmbedUpdateTemplate=b;
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { effect as i, className as m, setAttribute as l, use as u, template as f } from "solid-js/web";
2
- import { createMemo as b, onMount as k } from "solid-js";
3
- var h = /* @__PURE__ */ f("<iframe>");
4
- function _(e) {
5
- const s = b(() => {
6
- const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
1
+ import { effect as i, className as l, setAttribute as m, use as u, template as f } from "solid-js/web";
2
+ import { createMemo as g, onMount as b } from "solid-js";
3
+ var v = /* @__PURE__ */ f("<iframe>");
4
+ function x(e) {
5
+ const s = g(() => {
6
+ const a = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
7
7
  name: e.name,
8
8
  lockName: e.lockName,
9
9
  email: e.email,
@@ -11,21 +11,22 @@ function _(e) {
11
11
  css: e.css,
12
12
  cssVars: e.cssVars,
13
13
  darkModeDisabled: e.darkModeDisabled,
14
+ language: e.language,
14
15
  ...e.additionalProps
15
- }))), a = new URL(`/embed/direct/${e.token}`, t);
16
- return e.externalId && a.searchParams.set("externalId", e.externalId), `${a}#${n}`;
16
+ }))), t = new URL(`/embed/direct/${e.token}`, a);
17
+ return e.externalId && t.searchParams.set("externalId", e.externalId), `${t}#${n}`;
17
18
  });
18
- function r(t) {
19
- if (d?.contentWindow === t.source)
20
- switch (t.data.action) {
19
+ function r(a) {
20
+ if (d?.contentWindow === a.source)
21
+ switch (a.data.action) {
21
22
  case "document-ready":
22
23
  e.onDocumentReady?.();
23
24
  break;
24
25
  case "document-completed":
25
- e.onDocumentCompleted?.(t.data.data);
26
+ e.onDocumentCompleted?.(a.data.data);
26
27
  break;
27
28
  case "document-error":
28
- e.onDocumentError?.(t.data.data);
29
+ e.onDocumentError?.(a.data.data);
29
30
  break;
30
31
  case "field-signed":
31
32
  e.onFieldSigned?.();
@@ -36,203 +37,278 @@ function _(e) {
36
37
  }
37
38
  }
38
39
  let d;
39
- return k(() => {
40
+ return b(() => {
40
41
  window.addEventListener("message", r);
41
42
  }), (() => {
42
- var t = h(), n = d;
43
- return typeof n == "function" ? u(n, t) : d = t, i((a) => {
43
+ var a = v(), n = d;
44
+ return typeof n == "function" ? u(n, a) : d = a, i((t) => {
44
45
  var c = e.className, o = s();
45
- return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
46
+ return c !== t.e && l(a, t.e = c), o !== t.t && m(a, "src", t.t = o), t;
46
47
  }, {
47
48
  e: void 0,
48
49
  t: void 0
49
- }), t;
50
+ }), a;
50
51
  })();
51
52
  }
52
- var v = /* @__PURE__ */ f("<iframe>");
53
- function M(e) {
54
- const s = b(() => {
55
- const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
53
+ var k = /* @__PURE__ */ f("<iframe>");
54
+ function $(e) {
55
+ const s = g(() => {
56
+ const a = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
56
57
  name: e.name,
57
58
  lockName: e.lockName,
59
+ email: e.email,
60
+ lockEmail: e.lockEmail,
58
61
  css: e.css,
59
62
  cssVars: e.cssVars,
60
63
  darkModeDisabled: e.darkModeDisabled,
64
+ language: e.language,
61
65
  allowDocumentRejection: e.allowDocumentRejection,
62
66
  ...e.additionalProps
63
67
  })));
64
- return `${new URL(`/embed/sign/${e.token}`, t)}#${n}`;
68
+ return `${new URL(`/embed/sign/${e.token}`, a)}#${n}`;
65
69
  });
66
- function r(t) {
67
- if (d?.contentWindow === t.source)
68
- switch (t.data.action) {
70
+ function r(a) {
71
+ if (d?.contentWindow === a.source)
72
+ switch (a.data.action) {
69
73
  case "document-ready":
70
74
  e.onDocumentReady?.();
71
75
  break;
72
76
  case "document-completed":
73
- e.onDocumentCompleted?.(t.data.data);
77
+ e.onDocumentCompleted?.(a.data.data);
74
78
  break;
75
79
  case "document-error":
76
- e.onDocumentError?.(t.data.data);
80
+ e.onDocumentError?.(a.data.data);
77
81
  break;
78
82
  case "document-rejected":
79
- e.onDocumentRejected?.(t.data.data);
83
+ e.onDocumentRejected?.(a.data.data);
80
84
  break;
81
85
  }
82
86
  }
83
87
  let d;
84
- return k(() => {
88
+ return b(() => {
85
89
  window.addEventListener("message", r);
86
90
  }), (() => {
87
- var t = v(), n = d;
88
- return typeof n == "function" ? u(n, t) : d = t, i((a) => {
91
+ var a = k(), n = d;
92
+ return typeof n == "function" ? u(n, a) : d = a, i((t) => {
89
93
  var c = e.className, o = s();
90
- return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
94
+ return c !== t.e && l(a, t.e = c), o !== t.t && m(a, "src", t.t = o), t;
91
95
  }, {
92
96
  e: void 0,
93
97
  t: void 0
94
- }), t;
98
+ }), a;
95
99
  })();
96
100
  }
97
- var g = /* @__PURE__ */ f("<iframe>");
101
+ var h = /* @__PURE__ */ f("<iframe>");
98
102
  function R(e) {
99
- const s = b(() => {
100
- const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
103
+ const s = g(() => {
104
+ const a = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
101
105
  externalId: e.externalId,
102
106
  features: e.features,
103
107
  css: e.css,
104
108
  cssVars: e.cssVars,
105
109
  darkModeDisabled: e.darkModeDisabled,
110
+ language: e.language,
106
111
  ...e.additionalProps
107
- }))), a = new URL("/embed/v1/authoring/document/create", t);
108
- return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
112
+ }))), t = new URL("/embed/v1/authoring/document/create", a);
113
+ return t.searchParams.set("token", e.presignToken), t.hash = n, t.toString();
109
114
  });
110
- function r(t) {
111
- d?.contentWindow === t.source && t.data.type === "document-created" && e.onDocumentCreated?.({
112
- documentId: t.data.documentId,
113
- externalId: t.data.externalId
115
+ function r(a) {
116
+ d?.contentWindow === a.source && a.data.type === "document-created" && e.onDocumentCreated?.({
117
+ documentId: a.data.documentId,
118
+ externalId: a.data.externalId
114
119
  });
115
120
  }
116
121
  let d;
117
- return k(() => {
122
+ return b(() => {
118
123
  window.addEventListener("message", r);
119
124
  }), (() => {
120
- var t = g(), n = d;
121
- return typeof n == "function" ? u(n, t) : d = t, i((a) => {
125
+ var a = h(), n = d;
126
+ return typeof n == "function" ? u(n, a) : d = a, i((t) => {
122
127
  var c = e.className, o = s();
123
- return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
128
+ return c !== t.e && l(a, t.e = c), o !== t.t && m(a, "src", t.t = o), t;
124
129
  }, {
125
130
  e: void 0,
126
131
  t: void 0
127
- }), t;
132
+ }), a;
128
133
  })();
129
134
  }
130
- var D = /* @__PURE__ */ f("<iframe>");
131
- function $(e) {
132
- const s = b(() => {
133
- const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
135
+ var I = /* @__PURE__ */ f("<iframe>");
136
+ function C(e) {
137
+ const s = g(() => {
138
+ const a = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
134
139
  externalId: e.externalId,
135
140
  features: e.features,
136
141
  css: e.css,
137
142
  cssVars: e.cssVars,
138
143
  darkModeDisabled: e.darkModeDisabled,
144
+ language: e.language,
139
145
  ...e.additionalProps
140
- }))), a = new URL("/embed/v1/authoring/template/create", t);
141
- return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
146
+ }))), t = new URL("/embed/v1/authoring/template/create", a);
147
+ return t.searchParams.set("token", e.presignToken), t.hash = n, t.toString();
142
148
  });
143
- function r(t) {
144
- d?.contentWindow === t.source && t.data.type === "template-created" && e.onTemplateCreated?.({
145
- templateId: t.data.templateId,
146
- externalId: t.data.externalId
149
+ function r(a) {
150
+ d?.contentWindow === a.source && a.data.type === "template-created" && e.onTemplateCreated?.({
151
+ templateId: a.data.templateId,
152
+ externalId: a.data.externalId
147
153
  });
148
154
  }
149
155
  let d;
150
- return k(() => {
156
+ return b(() => {
151
157
  window.addEventListener("message", r);
152
158
  }), (() => {
153
- var t = D(), n = d;
154
- return typeof n == "function" ? u(n, t) : d = t, i((a) => {
159
+ var a = I(), n = d;
160
+ return typeof n == "function" ? u(n, a) : d = a, i((t) => {
155
161
  var c = e.className, o = s();
156
- return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
162
+ return c !== t.e && l(a, t.e = c), o !== t.t && m(a, "src", t.t = o), t;
157
163
  }, {
158
164
  e: void 0,
159
165
  t: void 0
160
- }), t;
166
+ }), a;
161
167
  })();
162
168
  }
163
- var w = /* @__PURE__ */ f("<iframe>");
169
+ var E = /* @__PURE__ */ f("<iframe>");
164
170
  function N(e) {
165
- const s = b(() => {
166
- const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
171
+ const s = g(() => {
172
+ const a = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
167
173
  token: e.presignToken,
168
174
  externalId: e.externalId,
169
175
  features: e.features,
170
176
  css: e.css,
171
177
  cssVars: e.cssVars,
172
178
  darkModeDisabled: e.darkModeDisabled,
179
+ language: e.language,
173
180
  onlyEditFields: e.onlyEditFields,
174
181
  ...e.additionalProps
175
- }))), a = new URL(`/embed/v1/authoring/document/edit/${e.documentId}`, t);
176
- return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
182
+ }))), t = new URL(`/embed/v1/authoring/document/edit/${e.documentId}`, a);
183
+ return t.searchParams.set("token", e.presignToken), t.hash = n, t.toString();
177
184
  });
178
- function r(t) {
179
- d?.contentWindow === t.source && t.data.type === "document-updated" && e.onDocumentUpdated?.({
180
- documentId: t.data.documentId,
181
- externalId: t.data.externalId
185
+ function r(a) {
186
+ d?.contentWindow === a.source && a.data.type === "document-updated" && e.onDocumentUpdated?.({
187
+ documentId: a.data.documentId,
188
+ externalId: a.data.externalId
182
189
  });
183
190
  }
184
191
  let d;
185
- return k(() => {
192
+ return b(() => {
186
193
  window.addEventListener("message", r);
187
194
  }), (() => {
188
- var t = w(), n = d;
189
- return typeof n == "function" ? u(n, t) : d = t, i((a) => {
195
+ var a = E(), n = d;
196
+ return typeof n == "function" ? u(n, a) : d = a, i((t) => {
190
197
  var c = e.className, o = s();
191
- return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
198
+ return c !== t.e && l(a, t.e = c), o !== t.t && m(a, "src", t.t = o), t;
192
199
  }, {
193
200
  e: void 0,
194
201
  t: void 0
195
- }), t;
202
+ }), a;
196
203
  })();
197
204
  }
198
- var I = /* @__PURE__ */ f("<iframe>");
199
- function x(e) {
200
- const s = b(() => {
201
- const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
205
+ var w = /* @__PURE__ */ f("<iframe>");
206
+ function V(e) {
207
+ const s = g(() => {
208
+ const a = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
202
209
  externalId: e.externalId,
203
210
  features: e.features,
204
211
  css: e.css,
205
212
  cssVars: e.cssVars,
206
213
  darkModeDisabled: e.darkModeDisabled,
214
+ language: e.language,
207
215
  onlyEditFields: e.onlyEditFields,
208
216
  ...e.additionalProps
209
- }))), a = new URL(`/embed/v1/authoring/template/edit/${e.templateId}`, t);
210
- return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
217
+ }))), t = new URL(`/embed/v1/authoring/template/edit/${e.templateId}`, a);
218
+ return t.searchParams.set("token", e.presignToken), t.hash = n, t.toString();
211
219
  });
212
- function r(t) {
213
- d?.contentWindow === t.source && t.data.type === "template-updated" && e.onTemplateUpdated?.({
214
- templateId: t.data.templateId,
215
- externalId: t.data.externalId
220
+ function r(a) {
221
+ d?.contentWindow === a.source && a.data.type === "template-updated" && e.onTemplateUpdated?.({
222
+ templateId: a.data.templateId,
223
+ externalId: a.data.externalId
216
224
  });
217
225
  }
218
226
  let d;
219
- return k(() => {
227
+ return b(() => {
220
228
  window.addEventListener("message", r);
221
229
  }), (() => {
222
- var t = I(), n = d;
223
- return typeof n == "function" ? u(n, t) : d = t, i((a) => {
230
+ var a = w(), n = d;
231
+ return typeof n == "function" ? u(n, a) : d = a, i((t) => {
224
232
  var c = e.className, o = s();
225
- return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
233
+ return c !== t.e && l(a, t.e = c), o !== t.t && m(a, "src", t.t = o), t;
226
234
  }, {
227
235
  e: void 0,
228
236
  t: void 0
229
- }), t;
237
+ }), a;
230
238
  })();
231
239
  }
232
- var E = /* @__PURE__ */ f("<iframe>");
233
- function C(e) {
234
- const s = b(() => {
235
- const t = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
240
+ var D = /* @__PURE__ */ f("<iframe>");
241
+ function S(e) {
242
+ const s = g(() => {
243
+ const a = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
244
+ externalId: e.externalId,
245
+ type: e.type,
246
+ folderId: e.folderId,
247
+ features: e.features,
248
+ css: e.css,
249
+ cssVars: e.cssVars,
250
+ darkModeDisabled: e.darkModeDisabled,
251
+ language: e.language
252
+ }))), t = new URL("/embed/v2/authoring/envelope/create", a);
253
+ return t.searchParams.set("token", e.presignToken), t.hash = n, t.toString();
254
+ });
255
+ function r(a) {
256
+ d?.contentWindow === a.source && a.data.type === "envelope-created" && e.onEnvelopeCreated?.({
257
+ envelopeId: a.data.envelopeId,
258
+ externalId: a.data.externalId
259
+ });
260
+ }
261
+ let d;
262
+ return b(() => {
263
+ window.addEventListener("message", r);
264
+ }), (() => {
265
+ var a = D(), n = d;
266
+ return typeof n == "function" ? u(n, a) : d = a, i((t) => {
267
+ var c = e.className, o = s();
268
+ return c !== t.e && l(a, t.e = c), o !== t.t && m(a, "src", t.t = o), t;
269
+ }, {
270
+ e: void 0,
271
+ t: void 0
272
+ }), a;
273
+ })();
274
+ }
275
+ var U = /* @__PURE__ */ f("<iframe>");
276
+ function L(e) {
277
+ const s = g(() => {
278
+ const a = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
279
+ externalId: e.externalId,
280
+ features: e.features,
281
+ css: e.css,
282
+ cssVars: e.cssVars,
283
+ darkModeDisabled: e.darkModeDisabled,
284
+ language: e.language
285
+ }))), t = new URL(`/embed/v2/authoring/envelope/edit/${e.envelopeId}`, a);
286
+ return t.searchParams.set("token", e.presignToken), t.hash = n, t.toString();
287
+ });
288
+ function r(a) {
289
+ d?.contentWindow === a.source && a.data.type === "envelope-updated" && e.onEnvelopeUpdated?.({
290
+ envelopeId: a.data.envelopeId,
291
+ externalId: a.data.externalId
292
+ });
293
+ }
294
+ let d;
295
+ return b(() => {
296
+ window.addEventListener("message", r);
297
+ }), (() => {
298
+ var a = U(), n = d;
299
+ return typeof n == "function" ? u(n, a) : d = a, i((t) => {
300
+ var c = e.className, o = s();
301
+ return c !== t.e && l(a, t.e = c), o !== t.t && m(a, "src", t.t = o), t;
302
+ }, {
303
+ e: void 0,
304
+ t: void 0
305
+ }), a;
306
+ })();
307
+ }
308
+ var y = /* @__PURE__ */ f("<iframe>");
309
+ function O(e) {
310
+ const s = g(() => {
311
+ const a = e.host || "https://app.documenso.com", n = btoa(encodeURIComponent(JSON.stringify({
236
312
  name: e.name,
237
313
  lockName: e.lockName,
238
314
  css: e.css,
@@ -240,55 +316,59 @@ function C(e) {
240
316
  darkModeDisabled: e.darkModeDisabled,
241
317
  allowDocumentRejection: e.allowDocumentRejection,
242
318
  ...e.additionalProps
243
- }))), a = new URL("/embed/v1/multisign", t);
319
+ }))), t = new URL("/embed/v1/multisign", a);
244
320
  for (const c of e.tokens)
245
- a.searchParams.append("token", c);
246
- return `${a}#${n}`;
321
+ t.searchParams.append("token", c);
322
+ return `${t}#${n}`;
247
323
  });
248
- function r(t) {
249
- if (d?.contentWindow === t.source)
250
- switch (t.data.action) {
324
+ function r(a) {
325
+ if (d?.contentWindow === a.source)
326
+ switch (a.data.action) {
251
327
  case "document-ready":
252
328
  e.onDocumentReady?.();
253
329
  break;
254
330
  case "document-completed":
255
- e.onDocumentCompleted?.(t.data.data);
331
+ e.onDocumentCompleted?.(a.data.data);
256
332
  break;
257
333
  case "document-error":
258
- e.onDocumentError?.(t.data.data);
334
+ e.onDocumentError?.(a.data.data);
259
335
  break;
260
336
  case "document-rejected":
261
- e.onDocumentRejected?.(t.data.data);
337
+ e.onDocumentRejected?.(a.data.data);
262
338
  break;
263
339
  case "all-documents-completed":
264
- e.onAllDocumentsCompleted?.(t.data.data);
340
+ e.onAllDocumentsCompleted?.(a.data.data);
265
341
  break;
266
342
  }
267
343
  }
268
344
  let d;
269
- return k(() => {
345
+ return b(() => {
270
346
  window.addEventListener("message", r);
271
347
  }), (() => {
272
- var t = E(), n = d;
273
- return typeof n == "function" ? u(n, t) : d = t, i((a) => {
348
+ var a = y(), n = d;
349
+ return typeof n == "function" ? u(n, a) : d = a, i((t) => {
274
350
  var c = e.className, o = s();
275
- return c !== a.e && m(t, a.e = c), o !== a.t && l(t, "src", a.t = o), a;
351
+ return c !== t.e && l(a, t.e = c), o !== t.t && m(a, "src", t.t = o), t;
276
352
  }, {
277
353
  e: void 0,
278
354
  t: void 0
279
- }), t;
355
+ }), a;
280
356
  })();
281
357
  }
282
358
  export {
283
359
  R as EmbedCreateDocumentV1,
284
- $ as EmbedCreateTemplateV1,
285
- _ as EmbedDirectTemplate,
286
- M as EmbedSignDocument,
360
+ S as EmbedCreateEnvelopeV2,
361
+ C as EmbedCreateTemplateV1,
362
+ x as EmbedDirectTemplate,
363
+ $ as EmbedSignDocument,
287
364
  N as EmbedUpdateDocumentV1,
288
- x as EmbedUpdateTemplateV1,
365
+ L as EmbedUpdateEnvelopeV2,
366
+ V as EmbedUpdateTemplateV1,
289
367
  R as unstable_EmbedCreateDocument,
290
- $ as unstable_EmbedCreateTemplate,
291
- C as unstable_EmbedMultiSignDocument,
368
+ S as unstable_EmbedCreateEnvelope,
369
+ C as unstable_EmbedCreateTemplate,
370
+ O as unstable_EmbedMultiSignDocument,
292
371
  N as unstable_EmbedUpdateDocument,
293
- x as unstable_EmbedUpdateTemplate
372
+ L as unstable_EmbedUpdateEnvelope,
373
+ V as unstable_EmbedUpdateTemplate
294
374
  };
@@ -6,8 +6,11 @@ export type EmbedSignDocumentProps = {
6
6
  css?: string | undefined;
7
7
  cssVars?: (CssVars & Record<string, string>) | undefined;
8
8
  darkModeDisabled?: boolean | undefined;
9
+ language?: string | undefined;
9
10
  name?: string | undefined;
10
11
  lockName?: boolean | undefined;
12
+ email?: string | undefined;
13
+ lockEmail?: boolean | undefined;
11
14
  allowDocumentRejection?: boolean | undefined;
12
15
  additionalProps?: Record<string, string | number | boolean> | undefined;
13
16
  onDocumentReady?: () => void;
@@ -8,6 +8,7 @@ export type EmbedUpdateDocumentProps = {
8
8
  css?: string | undefined;
9
9
  cssVars?: (CssVars & Record<string, string>) | undefined;
10
10
  darkModeDisabled?: boolean | undefined;
11
+ language?: string | undefined;
11
12
  features?: {
12
13
  allowConfigureSignatureTypes?: boolean;
13
14
  allowConfigureLanguage?: boolean;
@@ -0,0 +1,20 @@
1
+ import { CssVars } from './css-vars';
2
+ import { DeepPartial, EnvelopeEditorSettings } from './features-type';
3
+ export type EmbedUpdateEnvelopeProps = {
4
+ className?: string;
5
+ host?: string;
6
+ presignToken: string;
7
+ externalId?: string;
8
+ envelopeId: string;
9
+ css?: string | undefined;
10
+ cssVars?: (CssVars & Record<string, string>) | undefined;
11
+ darkModeDisabled?: boolean | undefined;
12
+ language?: string | undefined;
13
+ features?: DeepPartial<EnvelopeEditorSettings> & Record<string, any>;
14
+ onEnvelopeUpdated?: (data: {
15
+ externalId: string | null;
16
+ envelopeId: string;
17
+ }) => void;
18
+ };
19
+ declare function EmbedUpdateEnvelope(props: EmbedUpdateEnvelopeProps): import("solid-js").JSX.Element;
20
+ export default EmbedUpdateEnvelope;
@@ -8,6 +8,7 @@ export type EmbedUpdateTemplateProps = {
8
8
  css?: string | undefined;
9
9
  cssVars?: (CssVars & Record<string, string>) | undefined;
10
10
  darkModeDisabled?: boolean | undefined;
11
+ language?: string | undefined;
11
12
  features?: {
12
13
  allowConfigureSignatureTypes?: boolean;
13
14
  allowConfigureLanguage?: boolean;
package/package.json CHANGED
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "name": "@documenso/embed-solid",
3
- "version": "0.5.1",
3
+ "version": "0.6.1",
4
4
  "license": "MIT",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/documenso/embeds",
8
+ "directory": "packages/solid"
9
+ },
5
10
  "files": [
6
11
  "dist"
7
12
  ],