@omnipad/core 0.5.0 → 0.6.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 (45) hide show
  1. package/dist/chunk-42WBUPM3.cjs +1 -0
  2. package/dist/chunk-45F3BQT7.cjs +1 -0
  3. package/dist/chunk-52YF3VHH.cjs +1 -0
  4. package/dist/chunk-6XY2ZHZ3.mjs +1 -0
  5. package/dist/chunk-AK3RL7NL.mjs +1 -0
  6. package/dist/chunk-EYKCVOUA.mjs +1 -0
  7. package/dist/chunk-HCOFKHVV.cjs +1 -0
  8. package/dist/chunk-HQNUZXP5.mjs +1 -0
  9. package/dist/chunk-J5SVBM6K.mjs +1 -0
  10. package/dist/chunk-NB4FTDOP.cjs +1 -0
  11. package/dist/chunk-OVV5DKL6.cjs +1 -0
  12. package/dist/chunk-YAS6LFBF.mjs +1 -0
  13. package/dist/dom/index.cjs +1 -1
  14. package/dist/dom/index.d.cts +105 -36
  15. package/dist/dom/index.d.ts +105 -36
  16. package/dist/dom/index.mjs +1 -1
  17. package/dist/guest/index.cjs +1 -0
  18. package/dist/guest/index.d.cts +21 -0
  19. package/dist/guest/index.d.ts +21 -0
  20. package/dist/guest/index.mjs +1 -0
  21. package/dist/{index-DVegtw8s.d.cts → index-Dd0aHJaA.d.cts} +739 -27
  22. package/dist/{index-DVegtw8s.d.ts → index-Dd0aHJaA.d.ts} +739 -27
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.d.cts +282 -5
  25. package/dist/index.d.ts +282 -5
  26. package/dist/index.mjs +1 -1
  27. package/dist/sticky-CCj0ECTY.d.cts +285 -0
  28. package/dist/sticky-d_z_GU83.d.ts +285 -0
  29. package/dist/utils/index.cjs +1 -1
  30. package/dist/utils/index.d.cts +122 -69
  31. package/dist/utils/index.d.ts +122 -69
  32. package/dist/utils/index.mjs +1 -1
  33. package/package.json +9 -1
  34. package/dist/chunk-FSJTQU4W.cjs +0 -1
  35. package/dist/chunk-MKVX5ALC.mjs +0 -1
  36. package/dist/chunk-PACTGVBB.mjs +0 -1
  37. package/dist/chunk-U52W5J3K.cjs +0 -1
  38. package/dist/chunk-V7AHGFPB.mjs +0 -1
  39. package/dist/chunk-VHF3K5X6.cjs +0 -1
  40. package/dist/chunk-ZHPNS73J.cjs +0 -1
  41. package/dist/chunk-ZM2LX5IW.mjs +0 -1
  42. package/dist/sticky-4yk5DLzG.d.cts +0 -59
  43. package/dist/sticky-CLBq1EPa.d.ts +0 -59
  44. package/dist/traits-D6ePqSA6.d.cts +0 -152
  45. package/dist/traits-dAndzyWS.d.ts +0 -152
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Options for configuring the Iframe receiver security.
3
+ */
4
+ interface ReceiverOptions {
5
+ /**
6
+ * A whitelist of allowed parent origins.
7
+ * Only messages from these origins will be processed.
8
+ * Use '*' to allow all (not recommended for production).
9
+ * @example ['https://your-main-site.com', 'http://localhost:5173']
10
+ */
11
+ allowedOrigins: string[] | '*';
12
+ }
13
+ /**
14
+ * Initializes the Iframe IPC receiver.
15
+ * Must be executed within the context of the guest iframe.
16
+ *
17
+ * @param options - Security configuration for the receiver.
18
+ */
19
+ declare function initIframeReceiver(options: ReceiverOptions): void;
20
+
21
+ export { type ReceiverOptions, initIframeReceiver };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Options for configuring the Iframe receiver security.
3
+ */
4
+ interface ReceiverOptions {
5
+ /**
6
+ * A whitelist of allowed parent origins.
7
+ * Only messages from these origins will be processed.
8
+ * Use '*' to allow all (not recommended for production).
9
+ * @example ['https://your-main-site.com', 'http://localhost:5173']
10
+ */
11
+ allowedOrigins: string[] | '*';
12
+ }
13
+ /**
14
+ * Initializes the Iframe IPC receiver.
15
+ * Must be executed within the context of the guest iframe.
16
+ *
17
+ * @param options - Security configuration for the receiver.
18
+ */
19
+ declare function initIframeReceiver(options: ReceiverOptions): void;
20
+
21
+ export { type ReceiverOptions, initIframeReceiver };
@@ -0,0 +1 @@
1
+ import {f,d as d$1}from'../chunk-6XY2ZHZ3.mjs';import {b}from'../chunk-HQNUZXP5.mjs';var d=false,t=[];function g(c){d||(t=c.allowedOrigins,d=true,window.addEventListener("message",r=>{if(t!=="*"){if(!t.includes(r.origin)){import.meta.env?.DEV&&console.warn(`[OmniPad-IPC] Blocked message from unauthorized origin: ${r.origin}`);return}}else if(!import.meta.env?.DEV)throw new Error("Security Risk: Origin wildcard '*' is forbidden in production.");let e=r.data;if(e?.signature===b)try{if(e.type==="pointer"){let{x:i,y:o,opts:l}=e.payload;if(!Number.isFinite(i)||!Number.isFinite(o))return;f(e.action,i,o,l);}else e.type==="keyboard"&&d$1(e.action,e.payload);}catch(i){console.error("[OmniPad-IPC] Error dispatching guest event:",i);}}),import.meta.env?.DEV&&console.log("[OmniPad-IPC] Iframe receiver active and listening for Host commands."));}export{g as initIframeReceiver};