@pexip-engage-public/plugin 1.1.25-canary-20250708143730 → 1.1.25-canary-20250718122120

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 (44) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/dist/events/index.d.ts +0 -11
  3. package/dist/events/index.d.ts.map +1 -1
  4. package/dist/events/index.js +0 -2
  5. package/dist/events/index.js.map +1 -1
  6. package/dist/instance/PluginInstance.d.ts +1 -1
  7. package/dist/instance/PluginInstance.d.ts.map +1 -1
  8. package/dist/instance/PluginInstance.js +27 -30
  9. package/dist/instance/PluginInstance.js.map +1 -1
  10. package/dist/state/PluginState.schema.d.ts +6 -6
  11. package/package.json +9 -10
  12. package/src/@types/iframe-resizer.iframeResizer.d.ts +211 -0
  13. package/src/events/index.ts +0 -14
  14. package/src/instance/PluginInstance.ts +40 -42
  15. package/dist/resizer/api-resize-handlers.d.ts +0 -9
  16. package/dist/resizer/api-resize-handlers.d.ts.map +0 -1
  17. package/dist/resizer/api-resize-handlers.js +0 -12
  18. package/dist/resizer/api-resize-handlers.js.map +0 -1
  19. package/dist/resizer/child.d.ts +0 -12
  20. package/dist/resizer/child.d.ts.map +0 -1
  21. package/dist/resizer/child.js +0 -80
  22. package/dist/resizer/child.js.map +0 -1
  23. package/dist/resizer/common.d.ts +0 -27
  24. package/dist/resizer/common.d.ts.map +0 -1
  25. package/dist/resizer/common.js +0 -82
  26. package/dist/resizer/common.js.map +0 -1
  27. package/dist/resizer/index.d.ts +0 -2
  28. package/dist/resizer/index.d.ts.map +0 -1
  29. package/dist/resizer/index.js +0 -2
  30. package/dist/resizer/index.js.map +0 -1
  31. package/dist/resizer/parent.d.ts +0 -4
  32. package/dist/resizer/parent.d.ts.map +0 -1
  33. package/dist/resizer/parent.js +0 -185
  34. package/dist/resizer/parent.js.map +0 -1
  35. package/dist/resizer/types.d.ts +0 -101
  36. package/dist/resizer/types.d.ts.map +0 -1
  37. package/dist/resizer/types.js +0 -2
  38. package/dist/resizer/types.js.map +0 -1
  39. package/src/resizer/api-resize-handlers.ts +0 -17
  40. package/src/resizer/child.ts +0 -128
  41. package/src/resizer/common.ts +0 -117
  42. package/src/resizer/index.ts +0 -0
  43. package/src/resizer/parent.ts +0 -277
  44. package/src/resizer/types.ts +0 -108
@@ -1,108 +0,0 @@
1
- /**
2
- * Automatically resize the selected iframes when their inner content grows.
3
- * @param settings The settings for the selected iframes. The default settings properties are picked if empty.
4
- * @param selector The selector for the iframe(s) or the HTMLIFrameElement to be resized. If empty, all document iframe elements will be selected.
5
- * @returns A result array, which can be used to clean up the listeners if you often remove iframes from the document.
6
- */
7
- export type InitializeFunction = (
8
- settings?: Partial<Settings>,
9
- selector?: string | HTMLIFrameElement,
10
- ) => InitializeResult[];
11
- export type InitializeResult = { unsubscribe: () => void };
12
-
13
- export type Settings = {
14
- /**
15
- * Offset added to the resize size (in pixels).
16
- *
17
- * Default: `0`
18
- */
19
- offsetSize: number;
20
- /**
21
- * Specifies whether to check the origin of incoming messages.
22
- * Accepts an array of allowed origins or a boolean.
23
- * If `true`, incoming messages are allowed from the origins of the registered iframes.
24
- *
25
- * Default: `true`
26
- */
27
- checkOrigin: string[] | boolean;
28
- /**
29
- * By default, the root element observed for resizing is the <html> document.
30
- * In more complex layouts, the scrolling container may be elsewhere.
31
- * This setting allows you to customize the root element that should be observed for resize events.
32
- *
33
- * Default: `undefined`
34
- */
35
- targetElementSelector?: string;
36
-
37
- /**
38
- * Customize the padding style of the iframe body.
39
- *
40
- * Default: `undefined`
41
- */
42
- bodyPadding?: string;
43
-
44
- /**
45
- * Customize the margin style of the iframe body.
46
- *
47
- * Default: `undefined`
48
- */
49
- bodyMargin?: string;
50
-
51
- /**
52
- * Called whenever the observed content size changes and the iframe is about to be resized.
53
- * Return `false` to cancel the resize; returning `true` or nothing will allow it.
54
- *
55
- * Default: `undefined`
56
- */
57
- onBeforeIframeResize?: (context: BeforeResizeContext) => boolean | undefined;
58
-
59
- /**
60
- * Listener that is called after the iframe has been resized.
61
- * You can use a predefined handler like `updateParentScrollOnResize` or create your own custom handler.
62
- *
63
- * Default: `undefined`
64
- */
65
- onIframeResize?: (context: ResizeContext) => void;
66
- };
67
-
68
- export type IframeResizeEventData = {
69
- type: "iframe-resized";
70
- width: number;
71
- height?: number;
72
- };
73
-
74
- export type IframeChildInitEventData = {
75
- type: "iframe-child-init";
76
- targetElementSelector?: string;
77
- bodyPadding?: string;
78
- bodyMargin?: string;
79
- };
80
-
81
- export type IframeResizeEvent = MessageEvent<IframeResizeEventData>;
82
-
83
- export type InteractionState = {
84
- isHovered: boolean;
85
- };
86
-
87
- export type ResizeRenderState = { rect: DOMRect };
88
-
89
- export type ResizeContext = {
90
- iframe: HTMLIFrameElement;
91
- settings: Settings;
92
- interactionState: InteractionState;
93
- previousRenderState: ResizeRenderState;
94
- nextRenderState: ResizeRenderState;
95
- };
96
-
97
- export type BeforeResizeContext = {
98
- iframe: HTMLIFrameElement;
99
- settings: Settings;
100
- observedHeight: number;
101
- };
102
-
103
- export type RegisteredElement = {
104
- iframe: HTMLIFrameElement;
105
- settings: Settings;
106
- interactionState: InteractionState;
107
- initContext: { isInitialized: boolean; retryAttempts: number; retryTimeoutId?: number };
108
- };