qumra-engine 2.0.116 → 2.0.118

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.
@@ -388,12 +388,32 @@ exports.default = new (class SeoExtension {
388
388
  </script>
389
389
 
390
390
 
391
+ <script>
392
+ // الاستماع لأي رسائل جاية من الـ parent
393
+ window.addEventListener("message", (event) => {
394
+ // يفضل تتحقق من الـ origin لو عايز أمان أكتر
395
+ // if (event.origin !== "https://dashboard.qumra.cloud") return;
396
+
397
+ const data = event.data;
398
+
399
+ if (data?.type === "reRender") {
400
+ console.log("📩 تم استقبال رسالة إعادة الرندر:", data);
401
+ // هنا تقدر تنفذ أي كود لإعادة الرندر أو تحديث الصفحة
402
+ // مثلا:
403
+ // location.reload();
404
+ } else {
405
+ console.log("📩 رسالة وصلت:", data);
406
+ }
407
+ });
408
+ </script>
409
+
391
410
  <script>
392
411
  window.addEventListener("message", (event) => {
393
412
  // لو عايز تتحقق من الـ origin:
394
413
  // if (event.origin !== "https://dashboard.qumra.cloud") return;
395
414
 
396
415
  const data = event.data;
416
+ console.log("🚀 ~ run ~ data:", data)
397
417
 
398
418
  if (data?.type === "reRender") {
399
419
  console.log("📩 تم استقبال رسالة إعادة الرندر:", data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qumra-engine",
3
- "version": "2.0.116",
3
+ "version": "2.0.118",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {