@neurodyn/react-room-viewer 0.0.35 → 0.1.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/dist/index.d.ts +152 -2
- package/dist/index.js +391 -146
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ declare const resources: {
|
|
|
51
51
|
};
|
|
52
52
|
readonly legal: {
|
|
53
53
|
readonly termsOfUse: "Terms of Use";
|
|
54
|
-
readonly conjunction: "and";
|
|
54
|
+
readonly conjunction: " and ";
|
|
55
55
|
readonly privacyPolicy: "Privacy Policy";
|
|
56
56
|
};
|
|
57
57
|
readonly shareMessage: {
|
|
@@ -201,7 +201,7 @@ declare const resources: {
|
|
|
201
201
|
};
|
|
202
202
|
readonly legal: {
|
|
203
203
|
readonly termsOfUse: "Условия использования";
|
|
204
|
-
readonly conjunction: "и";
|
|
204
|
+
readonly conjunction: " и ";
|
|
205
205
|
readonly privacyPolicy: "Политика конфиденциальности";
|
|
206
206
|
};
|
|
207
207
|
readonly shareMessage: {
|
|
@@ -331,6 +331,156 @@ declare const resources: {
|
|
|
331
331
|
};
|
|
332
332
|
};
|
|
333
333
|
};
|
|
334
|
+
ar: {
|
|
335
|
+
translation: {
|
|
336
|
+
readonly matting: "الحافة الداخلية";
|
|
337
|
+
readonly close: "إغلاق";
|
|
338
|
+
readonly mattingOptions: {
|
|
339
|
+
readonly none: "بدون";
|
|
340
|
+
};
|
|
341
|
+
readonly units: {
|
|
342
|
+
readonly cm: "سم";
|
|
343
|
+
readonly in: "بوصة";
|
|
344
|
+
};
|
|
345
|
+
readonly ar: {
|
|
346
|
+
readonly viewInPlace: "اعرضه في مكانك";
|
|
347
|
+
readonly scanQrCode: "امسح رمز QR هذا بكاميرا هاتفك لعرض المنتج بتقنية الواقع المعزز";
|
|
348
|
+
readonly deviceRequirementsDisclaimer: "*يتطلب جهازًا ومتصفحًا يدعمان الواقع المعزز. نوصي بنظام iOS 18 أو أحدث مع Safari، أو Android 7.0 أو أحدث مع Chrome.";
|
|
349
|
+
readonly appClipScanTitle: "امسح الرمز بكاميرا هاتفك";
|
|
350
|
+
readonly appClipRequirement: "يعمل عرض الواقع المعزز على iOS 18 أو أحدث";
|
|
351
|
+
};
|
|
352
|
+
readonly legal: {
|
|
353
|
+
readonly termsOfUse: "شروط الاستخدام";
|
|
354
|
+
readonly conjunction: " و";
|
|
355
|
+
readonly privacyPolicy: "سياسة الخصوصية";
|
|
356
|
+
};
|
|
357
|
+
readonly shareMessage: {
|
|
358
|
+
readonly 'wall-panel': "معاينة ألواح الجدران";
|
|
359
|
+
readonly wallart: "معاينة اللوحة الفنية";
|
|
360
|
+
readonly rugs: "معاينة السجادة";
|
|
361
|
+
readonly flooring: "معاينة الأرضية";
|
|
362
|
+
};
|
|
363
|
+
readonly rooms: {
|
|
364
|
+
readonly 'room-example-11': "غرفة نموذجية 11";
|
|
365
|
+
readonly 'room-example-12': "غرفة نموذجية 12";
|
|
366
|
+
readonly 'room-example-13': "غرفة نموذجية 13";
|
|
367
|
+
readonly 'room-example-14': "غرفة نموذجية 14";
|
|
368
|
+
readonly 'room-example-15': "غرفة نموذجية 15";
|
|
369
|
+
readonly 'carpet-bathroom': "الحمّام";
|
|
370
|
+
readonly 'carpet-bedroom': "غرفة النوم";
|
|
371
|
+
readonly 'carpet-entryway': "المدخل";
|
|
372
|
+
readonly 'carpet-living-room': "غرفة المعيشة";
|
|
373
|
+
};
|
|
374
|
+
readonly scene: {
|
|
375
|
+
readonly tunePosition: "ضبط الموضع";
|
|
376
|
+
readonly angle: "الزاوية";
|
|
377
|
+
readonly rotation: "الدوران";
|
|
378
|
+
readonly resetPosition: "إعادة التعيين";
|
|
379
|
+
};
|
|
380
|
+
readonly accessError: {
|
|
381
|
+
readonly unauthorized: "مفتاح API غير صالح";
|
|
382
|
+
readonly 'payment-required': "العارض غير متاح مؤقتًا";
|
|
383
|
+
};
|
|
384
|
+
readonly loadError: {
|
|
385
|
+
readonly 'viewer-load-failed': "تعذّر تحميل العارض. يُرجى المحاولة مرة أخرى.";
|
|
386
|
+
readonly 'artwork-load-failed': "تعذّر تحميل الصورة — رابطها مفقود أو غير صحيح في إعدادات الأداة.";
|
|
387
|
+
readonly 'room-load-failed': "تعذّر تحميل صورة الغرفة. يُرجى المحاولة مرة أخرى.";
|
|
388
|
+
};
|
|
389
|
+
readonly missingSurface: {
|
|
390
|
+
readonly floor: {
|
|
391
|
+
readonly title: "لم نتمكن من العثور على الأرضية";
|
|
392
|
+
readonly body: "جرّب صورة تظهر فيها الأرضية.";
|
|
393
|
+
};
|
|
394
|
+
readonly wall: {
|
|
395
|
+
readonly title: "لم نتمكن من العثور على جدار";
|
|
396
|
+
readonly body: "جرّب صورة يظهر فيها جدار.";
|
|
397
|
+
};
|
|
398
|
+
readonly uploadAnother: "رفع صورة أخرى";
|
|
399
|
+
};
|
|
400
|
+
readonly wallPanel: {
|
|
401
|
+
readonly loading: "جارٍ تحميل الخامة";
|
|
402
|
+
readonly panelActions: "إجراءات اللوح {{number}}";
|
|
403
|
+
readonly retry: "تعذّر التحميل. اختر مرة أخرى لإعادة المحاولة.";
|
|
404
|
+
readonly actions: "إجراءات اللوح";
|
|
405
|
+
readonly materials: "الخامات";
|
|
406
|
+
readonly materialFallback: "الخامة {{number}}";
|
|
407
|
+
readonly rotate: "تدوير اللوح";
|
|
408
|
+
readonly delete: "حذف اللوح";
|
|
409
|
+
};
|
|
410
|
+
readonly wallArt: {
|
|
411
|
+
readonly pictureFrame: "الإطار";
|
|
412
|
+
};
|
|
413
|
+
readonly resourceType: {
|
|
414
|
+
readonly 'wall-panel': {
|
|
415
|
+
readonly productCategory: "لوح جداري";
|
|
416
|
+
readonly productCardTitle: "اللوح المحدد";
|
|
417
|
+
readonly replaceProduct: "استبدال اللوح";
|
|
418
|
+
readonly replaceProductShort: "استبدال";
|
|
419
|
+
};
|
|
420
|
+
readonly wallart: {
|
|
421
|
+
readonly productCardTitle: "اللوحة الفنية المحددة";
|
|
422
|
+
readonly appearance: "استبدال";
|
|
423
|
+
};
|
|
424
|
+
readonly rugs: {
|
|
425
|
+
readonly productCategory: "سجادة";
|
|
426
|
+
readonly productCardTitle: "السجادة المحددة";
|
|
427
|
+
readonly replaceProduct: "استبدال السجادة";
|
|
428
|
+
readonly replaceProductShort: "استبدال";
|
|
429
|
+
};
|
|
430
|
+
readonly flooring: {
|
|
431
|
+
readonly productCategory: "أرضية";
|
|
432
|
+
readonly productCardTitle: "الأرضية المحددة";
|
|
433
|
+
readonly replaceProduct: "استبدال الأرضية";
|
|
434
|
+
readonly replaceProductShort: "استبدال";
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
readonly floor: {
|
|
438
|
+
readonly scene: {
|
|
439
|
+
readonly share: "مشاركة";
|
|
440
|
+
readonly download: "تنزيل";
|
|
441
|
+
readonly hideCatalog: "إخفاء الكتالوج";
|
|
442
|
+
readonly description: "الوصف";
|
|
443
|
+
readonly interiorCardTitle: "التصميم الداخلي";
|
|
444
|
+
readonly tryAtHome: "جرّبه في منزلك";
|
|
445
|
+
readonly tryAtHomeBody: "عبر كاميرا هاتفك";
|
|
446
|
+
};
|
|
447
|
+
readonly materialSelection: {
|
|
448
|
+
readonly flooring: "اختر الأرضية";
|
|
449
|
+
readonly rugs: "اختر سجادة";
|
|
450
|
+
readonly 'wall-panel': "اختر لوحًا";
|
|
451
|
+
readonly title: "اختيار الخامة";
|
|
452
|
+
};
|
|
453
|
+
readonly interiorSelection: {
|
|
454
|
+
readonly title: "اختر التصميم الداخلي";
|
|
455
|
+
readonly uploadPhoto: "ارفع صورتك";
|
|
456
|
+
readonly invalidFile: "تعذّر رفع الصورة، يُرجى المحاولة مرة أخرى";
|
|
457
|
+
readonly customTitle: "صورك";
|
|
458
|
+
readonly presetsTitle: "تصاميم داخلية جاهزة";
|
|
459
|
+
readonly currentInterior: "التصميم الداخلي الحالي";
|
|
460
|
+
readonly chooseInterior: "اختر التصميم الداخلي";
|
|
461
|
+
readonly chooseInteriorShort: "اختر";
|
|
462
|
+
};
|
|
463
|
+
readonly processing: {
|
|
464
|
+
readonly title: "جارٍ تجهيز غرفتك";
|
|
465
|
+
readonly progressLabel: "تقدّم تجهيز الغرفة";
|
|
466
|
+
readonly stages: {
|
|
467
|
+
readonly reading: "جارٍ قراءة صورتك...";
|
|
468
|
+
readonly mapping: "جارٍ تحديد الأرضيات والجدران...";
|
|
469
|
+
readonly lighting: "جارٍ موازنة الإضاءة والمنظور...";
|
|
470
|
+
readonly finalizing: "جارٍ إنشاء المعاينة...";
|
|
471
|
+
readonly ready: "الغرفة جاهزة...";
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
readonly error: {
|
|
475
|
+
readonly title: "حدث خطأ ما";
|
|
476
|
+
readonly processingBody: "لم نتمكن هذه المرة من رفع الصورة ومعالجتها";
|
|
477
|
+
readonly loadBody: "تعذّر تحميل العارض. يُرجى المحاولة مرة أخرى.";
|
|
478
|
+
readonly tryAgain: "حاول مرة أخرى";
|
|
479
|
+
readonly cancel: "إلغاء";
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
};
|
|
334
484
|
};
|
|
335
485
|
|
|
336
486
|
export declare function RoomViewer({ type, src, tinuuid, roomId, name, language, width, height, dimensionUnit, displayUnit, apiKey, source, widgetSession, className, ...props }: RoomViewerProps & React_2.ComponentProps<'div'>): JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Component, Suspense, createContext, memo, use as external_react_use, useCallback, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo as external_react_useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
3
|
+
import { Direction, Popover, Select, Slider } from "radix-ui";
|
|
3
4
|
import { createPortal } from "react-dom";
|
|
4
5
|
import { I18nextProvider, initReactI18next, useTranslation } from "react-i18next";
|
|
5
6
|
import react_shadow from "react-shadow";
|
|
@@ -27,7 +28,6 @@ import { formatHex, oklch } from "culori";
|
|
|
27
28
|
import qrcode from "qrcode";
|
|
28
29
|
import { GLTFExporter } from "three/examples/jsm/exporters/GLTFExporter.js";
|
|
29
30
|
import { USDZExporter } from "three/examples/jsm/exporters/USDZExporter.js";
|
|
30
|
-
import { Popover, Select, Slider } from "radix-ui";
|
|
31
31
|
var __webpack_modules__ = {
|
|
32
32
|
"./src/style.css?inline" (module, __webpack_exports__, __webpack_require__) {
|
|
33
33
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -528,6 +528,38 @@ var __webpack_modules__ = {
|
|
|
528
528
|
inset-block: calc(var(--spacing) * 0);
|
|
529
529
|
}
|
|
530
530
|
|
|
531
|
+
.start-0 {
|
|
532
|
+
inset-inline-start: calc(var(--spacing) * 0);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.start-2 {
|
|
536
|
+
inset-inline-start: calc(var(--spacing) * 2);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.start-6 {
|
|
540
|
+
inset-inline-start: calc(var(--spacing) * 6);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.end-0 {
|
|
544
|
+
inset-inline-end: calc(var(--spacing) * 0);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.end-1 {
|
|
548
|
+
inset-inline-end: calc(var(--spacing) * 1);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.end-2 {
|
|
552
|
+
inset-inline-end: calc(var(--spacing) * 2);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.end-4 {
|
|
556
|
+
inset-inline-end: calc(var(--spacing) * 4);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.end-6 {
|
|
560
|
+
inset-inline-end: calc(var(--spacing) * 6);
|
|
561
|
+
}
|
|
562
|
+
|
|
531
563
|
.top-0 {
|
|
532
564
|
top: calc(var(--spacing) * 0);
|
|
533
565
|
}
|
|
@@ -576,14 +608,6 @@ var __webpack_modules__ = {
|
|
|
576
608
|
top: 100%;
|
|
577
609
|
}
|
|
578
610
|
|
|
579
|
-
.right-0 {
|
|
580
|
-
right: calc(var(--spacing) * 0);
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
.right-1 {
|
|
584
|
-
right: calc(var(--spacing) * 1);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
611
|
.right-2 {
|
|
588
612
|
right: calc(var(--spacing) * 2);
|
|
589
613
|
}
|
|
@@ -592,14 +616,6 @@ var __webpack_modules__ = {
|
|
|
592
616
|
right: calc(var(--spacing) * 3);
|
|
593
617
|
}
|
|
594
618
|
|
|
595
|
-
.right-4 {
|
|
596
|
-
right: calc(var(--spacing) * 4);
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
.right-6 {
|
|
600
|
-
right: calc(var(--spacing) * 6);
|
|
601
|
-
}
|
|
602
|
-
|
|
603
619
|
.right-\\[-1\\.36\\%\\] {
|
|
604
620
|
right: -1.36%;
|
|
605
621
|
}
|
|
@@ -636,14 +652,6 @@ var __webpack_modules__ = {
|
|
|
636
652
|
left: 50%;
|
|
637
653
|
}
|
|
638
654
|
|
|
639
|
-
.left-2 {
|
|
640
|
-
left: calc(var(--spacing) * 2);
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
.left-6 {
|
|
644
|
-
left: calc(var(--spacing) * 6);
|
|
645
|
-
}
|
|
646
|
-
|
|
647
655
|
.left-\\[-1\\.36\\%\\] {
|
|
648
656
|
left: -1.36%;
|
|
649
657
|
}
|
|
@@ -762,6 +770,14 @@ var __webpack_modules__ = {
|
|
|
762
770
|
margin-inline-start: -1px;
|
|
763
771
|
}
|
|
764
772
|
|
|
773
|
+
.ms-4 {
|
|
774
|
+
margin-inline-start: calc(var(--spacing) * 4);
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.ms-auto {
|
|
778
|
+
margin-inline-start: auto;
|
|
779
|
+
}
|
|
780
|
+
|
|
765
781
|
.-mt-2 {
|
|
766
782
|
margin-top: calc(var(--spacing) * -2);
|
|
767
783
|
}
|
|
@@ -794,14 +810,6 @@ var __webpack_modules__ = {
|
|
|
794
810
|
margin-left: calc(var(--spacing) * 1);
|
|
795
811
|
}
|
|
796
812
|
|
|
797
|
-
.ml-4 {
|
|
798
|
-
margin-left: calc(var(--spacing) * 4);
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
.ml-auto {
|
|
802
|
-
margin-left: auto;
|
|
803
|
-
}
|
|
804
|
-
|
|
805
813
|
.box-border {
|
|
806
814
|
box-sizing: border-box;
|
|
807
815
|
}
|
|
@@ -2329,6 +2337,30 @@ var __webpack_modules__ = {
|
|
|
2329
2337
|
padding-block: calc(var(--spacing) * 14);
|
|
2330
2338
|
}
|
|
2331
2339
|
|
|
2340
|
+
.ps-2 {
|
|
2341
|
+
padding-inline-start: calc(var(--spacing) * 2);
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
.ps-3 {
|
|
2345
|
+
padding-inline-start: calc(var(--spacing) * 3);
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
.ps-8 {
|
|
2349
|
+
padding-inline-start: calc(var(--spacing) * 8);
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
.pe-1 {
|
|
2353
|
+
padding-inline-end: calc(var(--spacing) * 1);
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
.pe-2 {
|
|
2357
|
+
padding-inline-end: calc(var(--spacing) * 2);
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
.pe-8 {
|
|
2361
|
+
padding-inline-end: calc(var(--spacing) * 8);
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2332
2364
|
.pt-1 {
|
|
2333
2365
|
padding-top: calc(var(--spacing) * 1);
|
|
2334
2366
|
}
|
|
@@ -2349,10 +2381,6 @@ var __webpack_modules__ = {
|
|
|
2349
2381
|
padding-right: calc(var(--spacing) * 1);
|
|
2350
2382
|
}
|
|
2351
2383
|
|
|
2352
|
-
.pr-2 {
|
|
2353
|
-
padding-right: calc(var(--spacing) * 2);
|
|
2354
|
-
}
|
|
2355
|
-
|
|
2356
2384
|
.pr-2\\.5 {
|
|
2357
2385
|
padding-right: calc(var(--spacing) * 2.5);
|
|
2358
2386
|
}
|
|
@@ -2365,10 +2393,6 @@ var __webpack_modules__ = {
|
|
|
2365
2393
|
padding-right: calc(var(--spacing) * 5);
|
|
2366
2394
|
}
|
|
2367
2395
|
|
|
2368
|
-
.pr-8 {
|
|
2369
|
-
padding-right: calc(var(--spacing) * 8);
|
|
2370
|
-
}
|
|
2371
|
-
|
|
2372
2396
|
.pb-4 {
|
|
2373
2397
|
padding-bottom: calc(var(--spacing) * 4);
|
|
2374
2398
|
}
|
|
@@ -2385,18 +2409,10 @@ var __webpack_modules__ = {
|
|
|
2385
2409
|
padding-bottom: 5px;
|
|
2386
2410
|
}
|
|
2387
2411
|
|
|
2388
|
-
.pl-2 {
|
|
2389
|
-
padding-left: calc(var(--spacing) * 2);
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
2412
|
.pl-3 {
|
|
2393
2413
|
padding-left: calc(var(--spacing) * 3);
|
|
2394
2414
|
}
|
|
2395
2415
|
|
|
2396
|
-
.pl-8 {
|
|
2397
|
-
padding-left: calc(var(--spacing) * 8);
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
2416
|
.text-center {
|
|
2401
2417
|
text-align: center;
|
|
2402
2418
|
}
|
|
@@ -2405,6 +2421,10 @@ var __webpack_modules__ = {
|
|
|
2405
2421
|
text-align: left;
|
|
2406
2422
|
}
|
|
2407
2423
|
|
|
2424
|
+
.text-start {
|
|
2425
|
+
text-align: start;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2408
2428
|
.align-middle {
|
|
2409
2429
|
vertical-align: middle;
|
|
2410
2430
|
}
|
|
@@ -4620,6 +4640,10 @@ var __webpack_modules__ = {
|
|
|
4620
4640
|
}
|
|
4621
4641
|
|
|
4622
4642
|
@media (width >= 640px) {
|
|
4643
|
+
.sm\\:end-6 {
|
|
4644
|
+
inset-inline-end: calc(var(--spacing) * 6);
|
|
4645
|
+
}
|
|
4646
|
+
|
|
4623
4647
|
.sm\\:top-6 {
|
|
4624
4648
|
top: calc(var(--spacing) * 6);
|
|
4625
4649
|
}
|
|
@@ -4628,10 +4652,6 @@ var __webpack_modules__ = {
|
|
|
4628
4652
|
top: 50%;
|
|
4629
4653
|
}
|
|
4630
4654
|
|
|
4631
|
-
.sm\\:right-6 {
|
|
4632
|
-
right: calc(var(--spacing) * 6);
|
|
4633
|
-
}
|
|
4634
|
-
|
|
4635
4655
|
.sm\\:bottom-auto {
|
|
4636
4656
|
bottom: auto;
|
|
4637
4657
|
}
|
|
@@ -4862,6 +4882,10 @@ var __webpack_modules__ = {
|
|
|
4862
4882
|
}
|
|
4863
4883
|
}
|
|
4864
4884
|
|
|
4885
|
+
.rtl\\:rotate-180:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
|
|
4886
|
+
rotate: 180deg;
|
|
4887
|
+
}
|
|
4888
|
+
|
|
4865
4889
|
.dark\\:bg-input\\/30:is(.dark *) {
|
|
4866
4890
|
background-color: var(--input);
|
|
4867
4891
|
}
|
|
@@ -5091,6 +5115,10 @@ var __webpack_modules__ = {
|
|
|
5091
5115
|
}
|
|
5092
5116
|
}
|
|
5093
5117
|
|
|
5118
|
+
.\\[data-chrome-slot\\=\\"ar-card\\"\\]\\:visible:is(), .\\[data-chrome-slot\\=\\"product-card\\"\\]\\:visible:is() {
|
|
5119
|
+
visibility: visible;
|
|
5120
|
+
}
|
|
5121
|
+
|
|
5094
5122
|
:is(.\\*\\:\\[span\\]\\:last\\:flex > *):is(span):last-child {
|
|
5095
5123
|
display: flex;
|
|
5096
5124
|
}
|
|
@@ -5458,8 +5486,17 @@ var __webpack_modules__ = {
|
|
|
5458
5486
|
font-display: swap;
|
|
5459
5487
|
}
|
|
5460
5488
|
|
|
5489
|
+
@font-face {
|
|
5490
|
+
font-family: __tw4_shd_noto_arabic_7x4q2;
|
|
5491
|
+
src: url("https://fonts.gstatic.com/s/notosansarabic/v33/nwpCtLGrOAZMl5nJ_wfgRg3DrWFZWsnVBJ_sS6tlqHHFlj4wv4r4xA.woff2") format("woff2");
|
|
5492
|
+
font-weight: 100 900;
|
|
5493
|
+
font-style: normal;
|
|
5494
|
+
font-display: swap;
|
|
5495
|
+
unicode-range: U+6??, U+750-77F, U+870-891, U+897-8E1, U+8E3-8FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
|
|
5496
|
+
}
|
|
5497
|
+
|
|
5461
5498
|
:root {
|
|
5462
|
-
--v-font-family: "__tw4_shd_inter_7x4q2", sans-serif;
|
|
5499
|
+
--v-font-family: "__tw4_shd_inter_7x4q2", "__tw4_shd_noto_arabic_7x4q2", sans-serif;
|
|
5463
5500
|
font-family: var(--v-font-family);
|
|
5464
5501
|
font-feature-settings: "liga" 1, "calt" 1;
|
|
5465
5502
|
-webkit-font-smoothing: antialiased;
|
|
@@ -6125,6 +6162,15 @@ var __webpack_modules__ = {
|
|
|
6125
6162
|
font-style: normal;
|
|
6126
6163
|
font-display: swap;
|
|
6127
6164
|
}
|
|
6165
|
+
|
|
6166
|
+
@font-face {
|
|
6167
|
+
font-family: __tw4_shd_noto_arabic_7x4q2;
|
|
6168
|
+
src: url("https://fonts.gstatic.com/s/notosansarabic/v33/nwpCtLGrOAZMl5nJ_wfgRg3DrWFZWsnVBJ_sS6tlqHHFlj4wv4r4xA.woff2") format("woff2");
|
|
6169
|
+
font-weight: 100 900;
|
|
6170
|
+
font-style: normal;
|
|
6171
|
+
font-display: swap;
|
|
6172
|
+
unicode-range: U+6??, U+750-77F, U+870-891, U+897-8E1, U+8E3-8FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
|
|
6173
|
+
}
|
|
6128
6174
|
`,
|
|
6129
6175
|
""
|
|
6130
6176
|
]);
|
|
@@ -6257,6 +6303,155 @@ function ThemeProvider({ children, defaultTheme = 'system', storageKey = 'v-them
|
|
|
6257
6303
|
}
|
|
6258
6304
|
var fontsinline = __webpack_require__("../ui/src/styles/fonts.css?inline");
|
|
6259
6305
|
const ns1 = {
|
|
6306
|
+
matting: 'الحافة الداخلية',
|
|
6307
|
+
close: 'إغلاق',
|
|
6308
|
+
mattingOptions: {
|
|
6309
|
+
none: 'بدون'
|
|
6310
|
+
},
|
|
6311
|
+
units: {
|
|
6312
|
+
cm: 'سم',
|
|
6313
|
+
in: 'بوصة'
|
|
6314
|
+
},
|
|
6315
|
+
ar: {
|
|
6316
|
+
viewInPlace: 'اعرضه في مكانك',
|
|
6317
|
+
scanQrCode: 'امسح رمز QR هذا بكاميرا هاتفك لعرض المنتج بتقنية الواقع المعزز',
|
|
6318
|
+
deviceRequirementsDisclaimer: '*يتطلب جهازًا ومتصفحًا يدعمان الواقع المعزز. نوصي بنظام iOS 18 أو أحدث مع Safari، أو Android 7.0 أو أحدث مع Chrome.',
|
|
6319
|
+
appClipScanTitle: 'امسح الرمز بكاميرا هاتفك',
|
|
6320
|
+
appClipRequirement: 'يعمل عرض الواقع المعزز على iOS 18 أو أحدث'
|
|
6321
|
+
},
|
|
6322
|
+
legal: {
|
|
6323
|
+
termsOfUse: 'شروط الاستخدام',
|
|
6324
|
+
conjunction: ' و',
|
|
6325
|
+
privacyPolicy: 'سياسة الخصوصية'
|
|
6326
|
+
},
|
|
6327
|
+
shareMessage: {
|
|
6328
|
+
'wall-panel': 'معاينة ألواح الجدران',
|
|
6329
|
+
wallart: 'معاينة اللوحة الفنية',
|
|
6330
|
+
rugs: 'معاينة السجادة',
|
|
6331
|
+
flooring: 'معاينة الأرضية'
|
|
6332
|
+
},
|
|
6333
|
+
rooms: {
|
|
6334
|
+
'room-example-11': 'غرفة نموذجية 11',
|
|
6335
|
+
'room-example-12': 'غرفة نموذجية 12',
|
|
6336
|
+
'room-example-13': 'غرفة نموذجية 13',
|
|
6337
|
+
'room-example-14': 'غرفة نموذجية 14',
|
|
6338
|
+
'room-example-15': 'غرفة نموذجية 15',
|
|
6339
|
+
'carpet-bathroom': 'الحمّام',
|
|
6340
|
+
'carpet-bedroom': 'غرفة النوم',
|
|
6341
|
+
'carpet-entryway': 'المدخل',
|
|
6342
|
+
'carpet-living-room': 'غرفة المعيشة'
|
|
6343
|
+
},
|
|
6344
|
+
scene: {
|
|
6345
|
+
tunePosition: 'ضبط الموضع',
|
|
6346
|
+
angle: 'الزاوية',
|
|
6347
|
+
rotation: 'الدوران',
|
|
6348
|
+
resetPosition: 'إعادة التعيين'
|
|
6349
|
+
},
|
|
6350
|
+
accessError: {
|
|
6351
|
+
unauthorized: 'مفتاح API غير صالح',
|
|
6352
|
+
'payment-required': 'العارض غير متاح مؤقتًا'
|
|
6353
|
+
},
|
|
6354
|
+
loadError: {
|
|
6355
|
+
'viewer-load-failed': 'تعذّر تحميل العارض. يُرجى المحاولة مرة أخرى.',
|
|
6356
|
+
'artwork-load-failed': 'تعذّر تحميل الصورة — رابطها مفقود أو غير صحيح في إعدادات الأداة.',
|
|
6357
|
+
'room-load-failed': 'تعذّر تحميل صورة الغرفة. يُرجى المحاولة مرة أخرى.'
|
|
6358
|
+
},
|
|
6359
|
+
missingSurface: {
|
|
6360
|
+
floor: {
|
|
6361
|
+
title: 'لم نتمكن من العثور على الأرضية',
|
|
6362
|
+
body: 'جرّب صورة تظهر فيها الأرضية.'
|
|
6363
|
+
},
|
|
6364
|
+
wall: {
|
|
6365
|
+
title: 'لم نتمكن من العثور على جدار',
|
|
6366
|
+
body: 'جرّب صورة يظهر فيها جدار.'
|
|
6367
|
+
},
|
|
6368
|
+
uploadAnother: 'رفع صورة أخرى'
|
|
6369
|
+
},
|
|
6370
|
+
wallPanel: {
|
|
6371
|
+
loading: 'جارٍ تحميل الخامة',
|
|
6372
|
+
panelActions: 'إجراءات اللوح {{number}}',
|
|
6373
|
+
retry: 'تعذّر التحميل. اختر مرة أخرى لإعادة المحاولة.',
|
|
6374
|
+
actions: 'إجراءات اللوح',
|
|
6375
|
+
materials: 'الخامات',
|
|
6376
|
+
materialFallback: 'الخامة {{number}}',
|
|
6377
|
+
rotate: 'تدوير اللوح',
|
|
6378
|
+
delete: 'حذف اللوح'
|
|
6379
|
+
},
|
|
6380
|
+
wallArt: {
|
|
6381
|
+
pictureFrame: 'الإطار'
|
|
6382
|
+
},
|
|
6383
|
+
resourceType: {
|
|
6384
|
+
'wall-panel': {
|
|
6385
|
+
productCategory: 'لوح جداري',
|
|
6386
|
+
productCardTitle: 'اللوح المحدد',
|
|
6387
|
+
replaceProduct: 'استبدال اللوح',
|
|
6388
|
+
replaceProductShort: 'استبدال'
|
|
6389
|
+
},
|
|
6390
|
+
wallart: {
|
|
6391
|
+
productCardTitle: 'اللوحة الفنية المحددة',
|
|
6392
|
+
appearance: 'استبدال'
|
|
6393
|
+
},
|
|
6394
|
+
rugs: {
|
|
6395
|
+
productCategory: 'سجادة',
|
|
6396
|
+
productCardTitle: 'السجادة المحددة',
|
|
6397
|
+
replaceProduct: 'استبدال السجادة',
|
|
6398
|
+
replaceProductShort: 'استبدال'
|
|
6399
|
+
},
|
|
6400
|
+
flooring: {
|
|
6401
|
+
productCategory: 'أرضية',
|
|
6402
|
+
productCardTitle: 'الأرضية المحددة',
|
|
6403
|
+
replaceProduct: 'استبدال الأرضية',
|
|
6404
|
+
replaceProductShort: 'استبدال'
|
|
6405
|
+
}
|
|
6406
|
+
},
|
|
6407
|
+
floor: {
|
|
6408
|
+
scene: {
|
|
6409
|
+
share: 'مشاركة',
|
|
6410
|
+
download: 'تنزيل',
|
|
6411
|
+
hideCatalog: 'إخفاء الكتالوج',
|
|
6412
|
+
description: 'الوصف',
|
|
6413
|
+
interiorCardTitle: 'التصميم الداخلي',
|
|
6414
|
+
tryAtHome: 'جرّبه في منزلك',
|
|
6415
|
+
tryAtHomeBody: 'عبر كاميرا هاتفك'
|
|
6416
|
+
},
|
|
6417
|
+
materialSelection: {
|
|
6418
|
+
flooring: 'اختر الأرضية',
|
|
6419
|
+
rugs: 'اختر سجادة',
|
|
6420
|
+
'wall-panel': 'اختر لوحًا',
|
|
6421
|
+
title: 'اختيار الخامة'
|
|
6422
|
+
},
|
|
6423
|
+
interiorSelection: {
|
|
6424
|
+
title: 'اختر التصميم الداخلي',
|
|
6425
|
+
uploadPhoto: 'ارفع صورتك',
|
|
6426
|
+
invalidFile: 'تعذّر رفع الصورة، يُرجى المحاولة مرة أخرى',
|
|
6427
|
+
customTitle: 'صورك',
|
|
6428
|
+
presetsTitle: 'تصاميم داخلية جاهزة',
|
|
6429
|
+
currentInterior: 'التصميم الداخلي الحالي',
|
|
6430
|
+
chooseInterior: 'اختر التصميم الداخلي',
|
|
6431
|
+
chooseInteriorShort: 'اختر'
|
|
6432
|
+
},
|
|
6433
|
+
processing: {
|
|
6434
|
+
title: 'جارٍ تجهيز غرفتك',
|
|
6435
|
+
progressLabel: 'تقدّم تجهيز الغرفة',
|
|
6436
|
+
stages: {
|
|
6437
|
+
reading: 'جارٍ قراءة صورتك...',
|
|
6438
|
+
mapping: 'جارٍ تحديد الأرضيات والجدران...',
|
|
6439
|
+
lighting: 'جارٍ موازنة الإضاءة والمنظور...',
|
|
6440
|
+
finalizing: 'جارٍ إنشاء المعاينة...',
|
|
6441
|
+
ready: 'الغرفة جاهزة...'
|
|
6442
|
+
}
|
|
6443
|
+
},
|
|
6444
|
+
error: {
|
|
6445
|
+
title: 'حدث خطأ ما',
|
|
6446
|
+
processingBody: 'لم نتمكن هذه المرة من رفع الصورة ومعالجتها',
|
|
6447
|
+
loadBody: 'تعذّر تحميل العارض. يُرجى المحاولة مرة أخرى.',
|
|
6448
|
+
tryAgain: 'حاول مرة أخرى',
|
|
6449
|
+
cancel: 'إلغاء'
|
|
6450
|
+
}
|
|
6451
|
+
}
|
|
6452
|
+
};
|
|
6453
|
+
const ar_ns1 = ns1;
|
|
6454
|
+
const ns1_ns1 = {
|
|
6260
6455
|
matting: 'Matting',
|
|
6261
6456
|
close: 'Close',
|
|
6262
6457
|
mattingOptions: {
|
|
@@ -6275,7 +6470,7 @@ const ns1 = {
|
|
|
6275
6470
|
},
|
|
6276
6471
|
legal: {
|
|
6277
6472
|
termsOfUse: 'Terms of Use',
|
|
6278
|
-
conjunction: 'and',
|
|
6473
|
+
conjunction: ' and ',
|
|
6279
6474
|
privacyPolicy: 'Privacy Policy'
|
|
6280
6475
|
},
|
|
6281
6476
|
shareMessage: {
|
|
@@ -6404,8 +6599,8 @@ const ns1 = {
|
|
|
6404
6599
|
}
|
|
6405
6600
|
}
|
|
6406
6601
|
};
|
|
6407
|
-
const en_ns1 =
|
|
6408
|
-
const
|
|
6602
|
+
const en_ns1 = ns1_ns1;
|
|
6603
|
+
const ru_ns1_ns1 = {
|
|
6409
6604
|
matting: 'Паспарту',
|
|
6410
6605
|
close: 'Закрыть',
|
|
6411
6606
|
mattingOptions: {
|
|
@@ -6424,7 +6619,7 @@ const ns1_ns1 = {
|
|
|
6424
6619
|
},
|
|
6425
6620
|
legal: {
|
|
6426
6621
|
termsOfUse: 'Условия использования',
|
|
6427
|
-
conjunction: 'и',
|
|
6622
|
+
conjunction: ' и ',
|
|
6428
6623
|
privacyPolicy: 'Политика конфиденциальности'
|
|
6429
6624
|
},
|
|
6430
6625
|
shareMessage: {
|
|
@@ -6553,17 +6748,20 @@ const ns1_ns1 = {
|
|
|
6553
6748
|
}
|
|
6554
6749
|
}
|
|
6555
6750
|
};
|
|
6556
|
-
const ru_ns1 =
|
|
6751
|
+
const ru_ns1 = ru_ns1_ns1;
|
|
6557
6752
|
const resources = {
|
|
6558
6753
|
en: {
|
|
6559
6754
|
translation: en_ns1
|
|
6560
6755
|
},
|
|
6561
6756
|
ru: {
|
|
6562
6757
|
translation: ru_ns1
|
|
6758
|
+
},
|
|
6759
|
+
ar: {
|
|
6760
|
+
translation: ar_ns1
|
|
6563
6761
|
}
|
|
6564
6762
|
};
|
|
6565
|
-
const
|
|
6566
|
-
|
|
6763
|
+
const ROOM_VIEWER_LANGUAGES = Object.keys(resources);
|
|
6764
|
+
const initOptions = {
|
|
6567
6765
|
debug: false,
|
|
6568
6766
|
detection: {
|
|
6569
6767
|
caches: []
|
|
@@ -6573,7 +6771,38 @@ roomViewerI18n.use(i18next_browser_languagedetector).use(initReactI18next).init(
|
|
|
6573
6771
|
interpolation: {
|
|
6574
6772
|
escapeValue: false
|
|
6575
6773
|
}
|
|
6576
|
-
}
|
|
6774
|
+
};
|
|
6775
|
+
function createRoomViewerI18n(language) {
|
|
6776
|
+
const instance = i18next.createInstance();
|
|
6777
|
+
instance.use(i18next_browser_languagedetector).init({
|
|
6778
|
+
...initOptions,
|
|
6779
|
+
lng: language
|
|
6780
|
+
});
|
|
6781
|
+
return instance;
|
|
6782
|
+
}
|
|
6783
|
+
const roomViewerI18n = i18next.createInstance();
|
|
6784
|
+
roomViewerI18n.use(i18next_browser_languagedetector).use(initReactI18next).init(initOptions);
|
|
6785
|
+
function resolveRoomViewerLanguage(i18n) {
|
|
6786
|
+
const language = i18n.resolvedLanguage ?? i18n.language;
|
|
6787
|
+
return ROOM_VIEWER_LANGUAGES.find((candidate)=>candidate === language) ?? 'en';
|
|
6788
|
+
}
|
|
6789
|
+
function getRoomViewerDirection(language) {
|
|
6790
|
+
return 'ar' === language ? 'rtl' : 'ltr';
|
|
6791
|
+
}
|
|
6792
|
+
function useRoomViewerLanguage() {
|
|
6793
|
+
const { i18n } = useTranslation();
|
|
6794
|
+
return resolveRoomViewerLanguage(i18n);
|
|
6795
|
+
}
|
|
6796
|
+
function useRoomViewerDirection(viewerI18n) {
|
|
6797
|
+
const { i18n } = useTranslation(void 0, {
|
|
6798
|
+
i18n: viewerI18n
|
|
6799
|
+
});
|
|
6800
|
+
const language = resolveRoomViewerLanguage(i18n);
|
|
6801
|
+
return {
|
|
6802
|
+
language,
|
|
6803
|
+
direction: getRoomViewerDirection(language)
|
|
6804
|
+
};
|
|
6805
|
+
}
|
|
6577
6806
|
const PROPERTY_BLOCK_RE = /@property\s+(--[^{\s]+)\s*\{([^}]*)\}/g;
|
|
6578
6807
|
const INITIAL_VALUE_RE = /initial-value:([^;}]+)/i;
|
|
6579
6808
|
const NON_INHERITING_RE = /inherits:\s*false(?:\s*;|\s*$)/i;
|
|
@@ -7098,65 +7327,65 @@ async function publicApiControllerActivateWallart(params, config = {}) {
|
|
|
7098
7327
|
});
|
|
7099
7328
|
return res.data;
|
|
7100
7329
|
}
|
|
7101
|
-
async function
|
|
7330
|
+
async function publicApiControllerIssueWidgetToken(data, config = {}) {
|
|
7102
7331
|
const { client: request = client_client, ...requestConfig } = config;
|
|
7103
7332
|
const requestData = data;
|
|
7104
7333
|
const res = await request({
|
|
7105
7334
|
method: "POST",
|
|
7106
|
-
url: "/public/
|
|
7335
|
+
url: "/public/widget/token",
|
|
7107
7336
|
data: requestData,
|
|
7108
7337
|
...requestConfig
|
|
7109
7338
|
});
|
|
7110
7339
|
return res.data;
|
|
7111
7340
|
}
|
|
7112
|
-
async function
|
|
7341
|
+
async function publicApiControllerReadKitItems(data, config = {}) {
|
|
7113
7342
|
const { client: request = client_client, ...requestConfig } = config;
|
|
7114
7343
|
const requestData = data;
|
|
7115
7344
|
const res = await request({
|
|
7116
7345
|
method: "POST",
|
|
7117
|
-
url: "/public/
|
|
7118
|
-
params,
|
|
7346
|
+
url: "/public/kits/items",
|
|
7119
7347
|
data: requestData,
|
|
7120
7348
|
...requestConfig
|
|
7121
7349
|
});
|
|
7122
7350
|
return res.data;
|
|
7123
7351
|
}
|
|
7124
|
-
async function
|
|
7352
|
+
async function publicApiControllerReadObjectByTinuuid({ tinuuid }, params, config = {}) {
|
|
7125
7353
|
const { client: request = client_client, ...requestConfig } = config;
|
|
7126
7354
|
const res = await request({
|
|
7127
|
-
method: "
|
|
7128
|
-
url:
|
|
7355
|
+
method: "GET",
|
|
7356
|
+
url: `/public/objects/by-tinuuid/${tinuuid}`,
|
|
7129
7357
|
params,
|
|
7130
7358
|
...requestConfig
|
|
7131
7359
|
});
|
|
7132
7360
|
return res.data;
|
|
7133
7361
|
}
|
|
7134
|
-
async function
|
|
7362
|
+
async function publicApiControllerReadPublicObjects(data, params, config = {}) {
|
|
7135
7363
|
const { client: request = client_client, ...requestConfig } = config;
|
|
7364
|
+
const requestData = data;
|
|
7136
7365
|
const res = await request({
|
|
7137
7366
|
method: "POST",
|
|
7138
|
-
url: "/public/
|
|
7367
|
+
url: "/public/objects/public",
|
|
7368
|
+
params,
|
|
7369
|
+
data: requestData,
|
|
7139
7370
|
...requestConfig
|
|
7140
7371
|
});
|
|
7141
7372
|
return res.data;
|
|
7142
7373
|
}
|
|
7143
|
-
async function
|
|
7374
|
+
async function publicApiControllerReadShopifyWidgetRooms(params, config = {}) {
|
|
7144
7375
|
const { client: request = client_client, ...requestConfig } = config;
|
|
7145
|
-
const requestData = data;
|
|
7146
7376
|
const res = await request({
|
|
7147
7377
|
method: "POST",
|
|
7148
|
-
url: "/public/widget/
|
|
7149
|
-
|
|
7378
|
+
url: "/public/widget/shopify/get-rooms",
|
|
7379
|
+
params,
|
|
7150
7380
|
...requestConfig
|
|
7151
7381
|
});
|
|
7152
7382
|
return res.data;
|
|
7153
7383
|
}
|
|
7154
|
-
async function
|
|
7384
|
+
async function publicApiControllerReadWidgetRooms(config = {}) {
|
|
7155
7385
|
const { client: request = client_client, ...requestConfig } = config;
|
|
7156
7386
|
const res = await request({
|
|
7157
|
-
method: "
|
|
7158
|
-
url:
|
|
7159
|
-
params,
|
|
7387
|
+
method: "POST",
|
|
7388
|
+
url: "/public/widget/get-rooms",
|
|
7160
7389
|
...requestConfig
|
|
7161
7390
|
});
|
|
7162
7391
|
return res.data;
|
|
@@ -7267,10 +7496,20 @@ function createWidgetSessionClient(activationData, options) {
|
|
|
7267
7496
|
function sendWidgetEvent(session, event, options = {}) {
|
|
7268
7497
|
if (!session) return;
|
|
7269
7498
|
const createWidgetEvent = options.createWidgetEvent ?? createWidgetEventViaGeneratedApi;
|
|
7270
|
-
session.getApiConfigForRequest(options.apiConfig).then((apiConfig)=>
|
|
7499
|
+
session.getApiConfigForRequest(options.apiConfig).then((apiConfig)=>{
|
|
7500
|
+
const pagePath = currentPagePath();
|
|
7501
|
+
return createWidgetEvent({
|
|
7271
7502
|
event,
|
|
7272
|
-
timestamp: new Date().toISOString()
|
|
7273
|
-
|
|
7503
|
+
timestamp: new Date().toISOString(),
|
|
7504
|
+
...pagePath ? {
|
|
7505
|
+
page_path: pagePath
|
|
7506
|
+
} : {}
|
|
7507
|
+
}, apiConfig);
|
|
7508
|
+
}).catch(()=>{});
|
|
7509
|
+
}
|
|
7510
|
+
function currentPagePath(locationRef = globalThis.location) {
|
|
7511
|
+
const path = locationRef?.pathname;
|
|
7512
|
+
return 'string' == typeof path && path.startsWith('/') ? path : void 0;
|
|
7274
7513
|
}
|
|
7275
7514
|
async function getRoomViewerPublicApiHeaders(options) {
|
|
7276
7515
|
const headers = {
|
|
@@ -7282,9 +7521,10 @@ async function getRoomViewerPublicApiHeaders(options) {
|
|
|
7282
7521
|
return headers;
|
|
7283
7522
|
}
|
|
7284
7523
|
function getRoomViewerLanguageHeaders(options) {
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7524
|
+
if (!options.language) return;
|
|
7525
|
+
return {
|
|
7526
|
+
Lang: 'ru' === options.language ? 'ru' : 'en'
|
|
7527
|
+
};
|
|
7288
7528
|
}
|
|
7289
7529
|
function roomViewerObjectQueryKey(tinuuid, options) {
|
|
7290
7530
|
return [
|
|
@@ -7361,7 +7601,7 @@ async function fetchRoomViewerOwnerObjects(ownerUuid, page, options) {
|
|
|
7361
7601
|
signal: options.signal
|
|
7362
7602
|
});
|
|
7363
7603
|
const { query, config } = getRoomViewerPublicApiQuery(options);
|
|
7364
|
-
return await
|
|
7604
|
+
return await publicApiControllerReadPublicObjects({
|
|
7365
7605
|
...data,
|
|
7366
7606
|
productType: getRoomViewerPublicApiProductType(options)
|
|
7367
7607
|
}, query, {
|
|
@@ -7384,7 +7624,7 @@ async function fetchRoomViewerKitObjects(kitUuid, _ownerUuid, page, options) {
|
|
|
7384
7624
|
signal: options.signal
|
|
7385
7625
|
});
|
|
7386
7626
|
const { query, config } = getRoomViewerPublicApiQuery(options);
|
|
7387
|
-
const response = await
|
|
7627
|
+
const response = await publicApiControllerReadKitItems({
|
|
7388
7628
|
kitUuid,
|
|
7389
7629
|
page,
|
|
7390
7630
|
limit: KIT_PAGE_LIMIT
|
|
@@ -7423,10 +7663,10 @@ async function fetchRoomViewerRooms(options) {
|
|
|
7423
7663
|
signal: options.signal
|
|
7424
7664
|
};
|
|
7425
7665
|
const publicQuery = getRoomViewerPublicApiQuery(options);
|
|
7426
|
-
const response = 'shopify' === options.source ? await
|
|
7666
|
+
const response = 'shopify' === options.source ? await publicApiControllerReadShopifyWidgetRooms(publicQuery.query, {
|
|
7427
7667
|
...config,
|
|
7428
7668
|
...publicQuery.config
|
|
7429
|
-
}) : await
|
|
7669
|
+
}) : await publicApiControllerReadWidgetRooms(config);
|
|
7430
7670
|
return response.rooms.filter((room)=>false !== room.active).sort((left, right)=>(left.position ?? 0) - (right.position ?? 0)).map((room)=>({
|
|
7431
7671
|
id: room.id,
|
|
7432
7672
|
name: room.name,
|
|
@@ -7509,7 +7749,7 @@ function DialogContent({ className, children, contentInsideOverlay = false, show
|
|
|
7509
7749
|
children,
|
|
7510
7750
|
showCloseButton && /*#__PURE__*/ jsxs(Close, {
|
|
7511
7751
|
"data-slot": "dialog-close",
|
|
7512
|
-
className: "focus-visible:ring-ring/30 absolute top-4
|
|
7752
|
+
className: "focus-visible:ring-ring/30 absolute top-4 end-4 inline-flex size-6 cursor-pointer items-center justify-center rounded-full text-icons-light transition-colors hover:text-icons-normal focus-visible:text-icons-dark focus-visible:ring-2 focus-visible:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
7513
7753
|
children: [
|
|
7514
7754
|
/*#__PURE__*/ jsx(XIcon, {
|
|
7515
7755
|
className: "size-6"
|
|
@@ -8088,19 +8328,19 @@ function DropdownMenuItem({ className, inset, variant = 'default', ...props }) {
|
|
|
8088
8328
|
"data-slot": "dropdown-menu-item",
|
|
8089
8329
|
"data-inset": inset,
|
|
8090
8330
|
"data-variant": variant,
|
|
8091
|
-
className: utils_cn('relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden hover:bg-background-base focus:bg-background-base data-[highlighted]:bg-background-base data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:hover:bg-destructive/10 data-[highlighted][data-variant=destructive]:bg-destructive/10 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*=text-])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*=text-])]:text-inherit [&_svg]:pointer-events-none [&_svg]:shrink-0', inset && '
|
|
8331
|
+
className: utils_cn('relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden hover:bg-background-base focus:bg-background-base data-[highlighted]:bg-background-base data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:hover:bg-destructive/10 data-[highlighted][data-variant=destructive]:bg-destructive/10 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*=text-])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*=text-])]:text-inherit [&_svg]:pointer-events-none [&_svg]:shrink-0', inset && 'ps-8', className),
|
|
8092
8332
|
...props
|
|
8093
8333
|
});
|
|
8094
8334
|
}
|
|
8095
8335
|
function DropdownMenuCheckboxItem({ className, children, checked, indicatorPosition = 'left', ...props }) {
|
|
8096
8336
|
return /*#__PURE__*/ jsxs(CheckboxItem, {
|
|
8097
8337
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
8098
|
-
className: utils_cn('relative flex cursor-default select-none items-center rounded-sm py-1.5
|
|
8338
|
+
className: utils_cn('relative flex cursor-default select-none items-center rounded-sm py-1.5 pe-2 ps-8 text-sm outline-hidden hover:bg-background-base focus:bg-background-base data-[highlighted]:bg-background-base data-[disabled]:pointer-events-none data-[disabled]:opacity-50', 'right' === indicatorPosition && 'pe-8 ps-2', className),
|
|
8099
8339
|
checked: checked,
|
|
8100
8340
|
...props,
|
|
8101
8341
|
children: [
|
|
8102
8342
|
/*#__PURE__*/ jsx("span", {
|
|
8103
|
-
className: utils_cn('pointer-events-none absolute flex size-3.5 items-center justify-center', 'right' === indicatorPosition ? '
|
|
8343
|
+
className: utils_cn('pointer-events-none absolute flex size-3.5 items-center justify-center', 'right' === indicatorPosition ? 'end-2' : 'start-2'),
|
|
8104
8344
|
children: /*#__PURE__*/ jsx(ItemIndicator, {
|
|
8105
8345
|
children: /*#__PURE__*/ jsx(CheckIcon, {
|
|
8106
8346
|
className: "size-4"
|
|
@@ -8115,7 +8355,7 @@ function DropdownMenuLabel({ className, inset, ...props }) {
|
|
|
8115
8355
|
return /*#__PURE__*/ jsx(react_dropdown_menu_Label, {
|
|
8116
8356
|
"data-slot": "dropdown-menu-label",
|
|
8117
8357
|
"data-inset": inset,
|
|
8118
|
-
className: utils_cn('px-2 py-1.5 text-sm font-medium', inset && '
|
|
8358
|
+
className: utils_cn('px-2 py-1.5 text-sm font-medium', inset && 'ps-8', className),
|
|
8119
8359
|
...props
|
|
8120
8360
|
});
|
|
8121
8361
|
}
|
|
@@ -12234,7 +12474,7 @@ function InteriorSelectionEntry({ rooms, customRooms, selectedRoomId, isInvalidF
|
|
|
12234
12474
|
function renderInteriorCards(interiorRooms) {
|
|
12235
12475
|
return interiorRooms.map((room)=>/*#__PURE__*/ jsxs("button", {
|
|
12236
12476
|
type: "button",
|
|
12237
|
-
className: "group relative aspect-[4/3] overflow-hidden rounded-2xl bg-background-base text-
|
|
12477
|
+
className: "group relative aspect-[4/3] overflow-hidden rounded-2xl bg-background-base text-start transition focus-visible:ring-2 focus-visible:ring-icons-normal focus-visible:outline-hidden",
|
|
12238
12478
|
"aria-pressed": room.id === selectedRoomId,
|
|
12239
12479
|
onClick: ()=>onSelectRoom(room.id),
|
|
12240
12480
|
children: [
|
|
@@ -12259,7 +12499,7 @@ function InteriorSelectionEntry({ rooms, customRooms, selectedRoomId, isInvalidF
|
|
|
12259
12499
|
type: "button",
|
|
12260
12500
|
variant: "outline",
|
|
12261
12501
|
size: "icon",
|
|
12262
|
-
className: "absolute top-4
|
|
12502
|
+
className: "absolute top-4 end-4 sm:top-6 sm:end-6",
|
|
12263
12503
|
"aria-label": t('close'),
|
|
12264
12504
|
"data-testid": "floor-interior-selection-icon-close",
|
|
12265
12505
|
children: /*#__PURE__*/ jsx(close_Close, {})
|
|
@@ -12312,7 +12552,7 @@ function InteriorSelectionEntry({ rooms, customRooms, selectedRoomId, isInvalidF
|
|
|
12312
12552
|
]
|
|
12313
12553
|
}),
|
|
12314
12554
|
/*#__PURE__*/ jsx("div", {
|
|
12315
|
-
className: "grid min-h-0 overflow-y-auto overflow-x-hidden overscroll-contain
|
|
12555
|
+
className: "grid min-h-0 overflow-y-auto overflow-x-hidden overscroll-contain pe-1 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
12316
12556
|
"data-testid": "floor-interior-selection-scroll-content",
|
|
12317
12557
|
children: /*#__PURE__*/ jsxs("div", {
|
|
12318
12558
|
className: "grid min-h-max gap-4",
|
|
@@ -12775,7 +13015,7 @@ function MaterialSelectionContent({ className, gridClassName, titleClassName, on
|
|
|
12775
13015
|
/*#__PURE__*/ jsx("div", {
|
|
12776
13016
|
"data-testid": "material-selection-grid",
|
|
12777
13017
|
ref: gridRef,
|
|
12778
|
-
className: utils_cn('min-h-0 flex-1 overflow-y-auto overflow-x-hidden overscroll-contain
|
|
13018
|
+
className: utils_cn('min-h-0 flex-1 overflow-y-auto overflow-x-hidden overscroll-contain pe-1 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden', gridClassName),
|
|
12779
13019
|
onScroll: handleScroll,
|
|
12780
13020
|
children: /*#__PURE__*/ jsxs("div", {
|
|
12781
13021
|
className: "grid min-h-max grid-cols-3 gap-x-2 gap-y-2",
|
|
@@ -12788,7 +13028,7 @@ function MaterialSelectionContent({ className, gridClassName, titleClassName, on
|
|
|
12788
13028
|
type: "button",
|
|
12789
13029
|
"data-selected": isSelected,
|
|
12790
13030
|
"aria-pressed": isSelected,
|
|
12791
|
-
className: "group flex min-w-0 flex-col gap-1 rounded-lg bg-background-containers text-
|
|
13031
|
+
className: "group flex min-w-0 flex-col gap-1 rounded-lg bg-background-containers text-start focus-visible:ring-2 focus-visible:ring-icons-normal focus-visible:outline-hidden",
|
|
12792
13032
|
onClick: ()=>handleSelectMaterial(materialId),
|
|
12793
13033
|
onKeyDown: (event)=>{
|
|
12794
13034
|
if ('Enter' === event.key || ' ' === event.key) {
|
|
@@ -12808,7 +13048,7 @@ function MaterialSelectionContent({ className, gridClassName, titleClassName, on
|
|
|
12808
13048
|
className: "size-6 text-icons-normal"
|
|
12809
13049
|
}),
|
|
12810
13050
|
isSelected && /*#__PURE__*/ jsx("span", {
|
|
12811
|
-
className: "absolute top-1
|
|
13051
|
+
className: "absolute top-1 end-1 grid size-6 place-items-center rounded-full bg-icons-blue text-icons-white",
|
|
12812
13052
|
"data-testid": "material-selection-selected-check",
|
|
12813
13053
|
children: /*#__PURE__*/ jsx(CheckDone, {
|
|
12814
13054
|
className: "size-4"
|
|
@@ -12969,7 +13209,7 @@ function ProcessingRoomDialog({ isComplete, open, onCloseAnimationEnd, onOpenCha
|
|
|
12969
13209
|
className: "flex min-w-0 items-center justify-between gap-3",
|
|
12970
13210
|
children: [
|
|
12971
13211
|
/*#__PURE__*/ jsx("span", {
|
|
12972
|
-
className: "typo-base-14 min-w-0 flex-1 truncate text-
|
|
13212
|
+
className: "typo-base-14 min-w-0 flex-1 truncate text-start font-medium text-text-light",
|
|
12973
13213
|
children: t(activeStage.translationKey)
|
|
12974
13214
|
}),
|
|
12975
13215
|
/*#__PURE__*/ jsxs("span", {
|
|
@@ -13338,9 +13578,7 @@ function QRCode({ data, foreground, background, robustness = 'M', className, ...
|
|
|
13338
13578
|
});
|
|
13339
13579
|
}
|
|
13340
13580
|
function useRoomViewerTenant() {
|
|
13341
|
-
|
|
13342
|
-
const language = i18n.resolvedLanguage ?? i18n.language;
|
|
13343
|
-
return 'ru' === language ? 'arizo' : 'vizbl';
|
|
13581
|
+
return 'ru' === useRoomViewerLanguage() ? 'arizo' : 'vizbl';
|
|
13344
13582
|
}
|
|
13345
13583
|
function isAbsoluteUrl(value) {
|
|
13346
13584
|
return /^[a-z][a-z0-9+.-]*:/i.test(value) || value.startsWith('//');
|
|
@@ -13633,9 +13871,7 @@ function AR({ className, buttonClassName, buttonLeadingIcon, buttonLabel, button
|
|
|
13633
13871
|
},
|
|
13634
13872
|
children: t('legal.termsOfUse')
|
|
13635
13873
|
}),
|
|
13636
|
-
' ',
|
|
13637
13874
|
t('legal.conjunction'),
|
|
13638
|
-
' ',
|
|
13639
13875
|
/*#__PURE__*/ jsx("a", {
|
|
13640
13876
|
href: tenantConfig.PRIVACY_URL,
|
|
13641
13877
|
target: "_blank",
|
|
@@ -13790,12 +14026,12 @@ function SelectContent({ className, children, position = 'item-aligned', align =
|
|
|
13790
14026
|
function SelectItem({ className, children, ...props }) {
|
|
13791
14027
|
return /*#__PURE__*/ jsxs(Select.Item, {
|
|
13792
14028
|
"data-slot": "select-item",
|
|
13793
|
-
className: utils_cn('relative flex w-full cursor-pointer select-none items-center gap-2 rounded-md py-2.5
|
|
14029
|
+
className: utils_cn('relative flex w-full cursor-pointer select-none items-center gap-2 rounded-md py-2.5 pe-8 ps-3 outline-hidden', 'typo-base-16 text-text-sub', 'focus:bg-background-base focus:text-text-dark', 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50', '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-6 [&_svg:not([class*=text-])]:text-text-dark', '*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2', className),
|
|
13794
14030
|
...props,
|
|
13795
14031
|
children: [
|
|
13796
14032
|
/*#__PURE__*/ jsx("span", {
|
|
13797
14033
|
"data-slot": "select-item-indicator",
|
|
13798
|
-
className: "absolute
|
|
14034
|
+
className: "absolute end-2 flex size-6 items-center justify-center",
|
|
13799
14035
|
children: /*#__PURE__*/ jsx(Select.ItemIndicator, {
|
|
13800
14036
|
children: /*#__PURE__*/ jsx(CheckDone, {
|
|
13801
14037
|
className: "size-5"
|
|
@@ -14278,9 +14514,9 @@ function ResetPositionButton() {
|
|
|
14278
14514
|
});
|
|
14279
14515
|
}
|
|
14280
14516
|
const CONTAINER_CLASS_NAMES = {
|
|
14281
|
-
card: 'flex min-h-24 w-fit max-w-100 items-center gap-4 rounded-2xl bg-background-containers p-4 text-
|
|
14282
|
-
'compact-card': 'flex min-h-[116px] w-fit max-w-[421px] items-center gap-4 rounded-2xl bg-background-containers p-4 text-
|
|
14283
|
-
'flow-card': 'flex items-center justify-start gap-4 border-b border-border-light bg-background-containers p-4 text-
|
|
14517
|
+
card: 'flex min-h-24 w-fit max-w-100 items-center gap-4 rounded-2xl bg-background-containers p-4 text-start text-text-dark shadow-[var(--shadow-login)]',
|
|
14518
|
+
'compact-card': 'flex min-h-[116px] w-fit max-w-[421px] items-center gap-4 rounded-2xl bg-background-containers p-4 text-start text-text-dark shadow-[var(--shadow-login)]',
|
|
14519
|
+
'flow-card': 'flex items-center justify-start gap-4 border-b border-border-light bg-background-containers p-4 text-start'
|
|
14284
14520
|
};
|
|
14285
14521
|
const ICON_CLASS_NAMES = {
|
|
14286
14522
|
card: 'size-6 text-icons-normal',
|
|
@@ -14414,7 +14650,7 @@ function ProductCardSlot({ actions, band, slot, presentation }) {
|
|
|
14414
14650
|
children: [
|
|
14415
14651
|
/*#__PURE__*/ jsx(SelectTrigger, {
|
|
14416
14652
|
size: "sm",
|
|
14417
|
-
className: "
|
|
14653
|
+
className: "ms-auto w-fit min-w-0 shrink data-[size=sm]:h-8 *:data-[slot=select-value]:block *:data-[slot=select-value]:truncate",
|
|
14418
14654
|
"data-testid": `${testId}-variant-select`,
|
|
14419
14655
|
children: /*#__PURE__*/ jsx(SelectValue, {})
|
|
14420
14656
|
}),
|
|
@@ -14435,9 +14671,9 @@ function ProductCardSlot({ actions, band, slot, presentation }) {
|
|
|
14435
14671
|
});
|
|
14436
14672
|
}
|
|
14437
14673
|
const RoomCardSlot_CONTAINER_CLASS_NAMES = {
|
|
14438
|
-
card: 'flex h-24 w-[254px] items-center gap-4 overflow-hidden rounded-2xl bg-background-containers p-4 text-
|
|
14439
|
-
'framed-row': 'flex h-[72px] items-center justify-between gap-3 overflow-hidden rounded-2xl bg-background-containers p-4 text-
|
|
14440
|
-
'plain-row': 'flex w-full items-center justify-between gap-3 rounded-full bg-background-containers text-
|
|
14674
|
+
card: 'flex h-24 w-[254px] items-center gap-4 overflow-hidden rounded-2xl bg-background-containers p-4 text-start text-text-dark shadow-[var(--shadow-login)]',
|
|
14675
|
+
'framed-row': 'flex h-[72px] items-center justify-between gap-3 overflow-hidden rounded-2xl bg-background-containers p-4 text-start text-text-dark shadow-[var(--shadow-login)]',
|
|
14676
|
+
'plain-row': 'flex w-full items-center justify-between gap-3 rounded-full bg-background-containers text-start'
|
|
14441
14677
|
};
|
|
14442
14678
|
const RoomCardSlot_CARD_TEST_IDS = {
|
|
14443
14679
|
desktop: 'floor-room-card',
|
|
@@ -15806,7 +16042,7 @@ function ImmersiveRoomChrome({ showDialogCloseButton = false }) {
|
|
|
15806
16042
|
})
|
|
15807
16043
|
}),
|
|
15808
16044
|
/*#__PURE__*/ jsxs("div", {
|
|
15809
|
-
className: "pointer-events-none absolute top-0
|
|
16045
|
+
className: "pointer-events-none absolute top-0 end-0 start-0 z-20 flex min-h-22 items-start justify-between gap-4 bg-linear-to-b from-black/75 via-black/35 to-transparent px-4 pt-4 pb-8 text-constant-white sm:px-6 lg:min-h-25 lg:pt-6",
|
|
15810
16046
|
children: [
|
|
15811
16047
|
/*#__PURE__*/ jsx("div", {
|
|
15812
16048
|
className: "min-w-0 pt-1",
|
|
@@ -15902,7 +16138,7 @@ function ImmersiveRoomChrome({ showDialogCloseButton = false }) {
|
|
|
15902
16138
|
]
|
|
15903
16139
|
}),
|
|
15904
16140
|
/*#__PURE__*/ jsxs("div", {
|
|
15905
|
-
className: "pointer-events-none absolute
|
|
16141
|
+
className: "pointer-events-none absolute end-6 bottom-6 start-6 z-20 hidden items-end justify-between gap-4 lg:flex",
|
|
15906
16142
|
"data-testid": "floor-desktop-cards",
|
|
15907
16143
|
children: [
|
|
15908
16144
|
/*#__PURE__*/ jsx("div", {
|
|
@@ -15924,7 +16160,7 @@ function ImmersiveRoomChrome({ showDialogCloseButton = false }) {
|
|
|
15924
16160
|
]
|
|
15925
16161
|
}),
|
|
15926
16162
|
/*#__PURE__*/ jsxs("div", {
|
|
15927
|
-
className: "pointer-events-none absolute
|
|
16163
|
+
className: "pointer-events-none absolute end-6 bottom-6 start-6 z-20 hidden items-end justify-between gap-2 sm:flex lg:hidden",
|
|
15928
16164
|
"data-testid": "floor-tablet-cards",
|
|
15929
16165
|
children: [
|
|
15930
16166
|
/*#__PURE__*/ jsx("div", {
|
|
@@ -15970,7 +16206,7 @@ function ImmersiveRoomChrome({ showDialogCloseButton = false }) {
|
|
|
15970
16206
|
}),
|
|
15971
16207
|
isMaterialSelectionPanelOpen && !hasActiveError && /*#__PURE__*/ jsx(MaterialSelectionContent, {
|
|
15972
16208
|
[MATERIAL_SELECTION_PANEL_ATTRIBUTE]: true,
|
|
15973
|
-
className: "absolute bottom-[152px]
|
|
16209
|
+
className: "absolute bottom-[152px] start-6 z-30 hidden max-h-[calc(100%-252px)] w-[348px] rounded-2xl bg-background-containers sm:flex lg:bottom-[132px] lg:max-h-[calc(100%-232px)]",
|
|
15974
16210
|
gridClassName: "px-4 pb-4",
|
|
15975
16211
|
titleClassName: "px-4 pt-4",
|
|
15976
16212
|
onOpenChange: handleCloseMaterialSelection
|
|
@@ -16097,11 +16333,6 @@ function RoomViewerContainer(props) {
|
|
|
16097
16333
|
...props
|
|
16098
16334
|
});
|
|
16099
16335
|
}
|
|
16100
|
-
function useRoomViewerLanguage() {
|
|
16101
|
-
const { i18n } = useTranslation();
|
|
16102
|
-
const language = i18n.resolvedLanguage ?? i18n.language;
|
|
16103
|
-
return 'ru' === language ? 'ru' : 'en';
|
|
16104
|
-
}
|
|
16105
16336
|
function isBlankArtworkSource(src) {
|
|
16106
16337
|
return 'string' != typeof src || 0 === src.trim().length;
|
|
16107
16338
|
}
|
|
@@ -16666,7 +16897,7 @@ function RoomViewerRoot({ type, src, tinuuid, roomId, name, height, width, langu
|
|
|
16666
16897
|
type
|
|
16667
16898
|
]);
|
|
16668
16899
|
useEffect(()=>{
|
|
16669
|
-
if ('string' == typeof language) i18n.changeLanguage(language);
|
|
16900
|
+
if ('string' == typeof language && language !== i18n.language) i18n.changeLanguage(language);
|
|
16670
16901
|
}, [
|
|
16671
16902
|
i18n,
|
|
16672
16903
|
language
|
|
@@ -16701,6 +16932,8 @@ configureApiClient({
|
|
|
16701
16932
|
});
|
|
16702
16933
|
function RoomViewerDialog({ type, src, tinuuid, roomId, width, height, dimensionUnit, displayUnit, name, language, apiKey, source, widgetSession, disableClose = false, open, defaultOpen, onOpenChange }) {
|
|
16703
16934
|
const [themeRoot, setThemeRoot] = useState(null);
|
|
16935
|
+
const [viewerI18n] = useState(()=>createRoomViewerI18n(language));
|
|
16936
|
+
const { language: uiLanguage, direction } = useRoomViewerDirection(viewerI18n);
|
|
16704
16937
|
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen ?? false);
|
|
16705
16938
|
const dialogOpen = open ?? uncontrolledOpen;
|
|
16706
16939
|
const [hasRenderedDialogContent, setHasRenderedDialogContent] = useState(dialogOpen);
|
|
@@ -16764,15 +16997,20 @@ function RoomViewerDialog({ type, src, tinuuid, roomId, width, height, dimension
|
|
|
16764
16997
|
children: shadowRootCssText
|
|
16765
16998
|
}),
|
|
16766
16999
|
/*#__PURE__*/ jsx("div", {
|
|
16767
|
-
ref: setThemeRoot
|
|
17000
|
+
ref: setThemeRoot,
|
|
17001
|
+
dir: direction,
|
|
17002
|
+
lang: uiLanguage
|
|
16768
17003
|
}),
|
|
16769
17004
|
themeRoot && /*#__PURE__*/ jsx(ThemeProvider, {
|
|
16770
17005
|
root: themeRoot,
|
|
16771
17006
|
storageKey: "neurodyn-theme",
|
|
16772
17007
|
defaultTheme: "light",
|
|
16773
|
-
children: /*#__PURE__*/ jsx(
|
|
16774
|
-
|
|
16775
|
-
children:
|
|
17008
|
+
children: /*#__PURE__*/ jsx(Direction.Provider, {
|
|
17009
|
+
dir: direction,
|
|
17010
|
+
children: /*#__PURE__*/ jsx(I18nextProvider, {
|
|
17011
|
+
i18n: viewerI18n,
|
|
17012
|
+
children: shouldRenderRoomViewerRoot && roomViewerRoot
|
|
17013
|
+
})
|
|
16776
17014
|
})
|
|
16777
17015
|
})
|
|
16778
17016
|
]
|
|
@@ -16782,6 +17020,8 @@ function RoomViewerDialog({ type, src, tinuuid, roomId, width, height, dimension
|
|
|
16782
17020
|
}
|
|
16783
17021
|
function RoomViewer({ type, src, tinuuid, roomId, name, language, width, height, dimensionUnit, displayUnit, apiKey, source, widgetSession, className, ...props }) {
|
|
16784
17022
|
const [themeRoot, setThemeRoot] = useState(null);
|
|
17023
|
+
const [viewerI18n] = useState(()=>createRoomViewerI18n(language));
|
|
17024
|
+
const { language: uiLanguage, direction } = useRoomViewerDirection(viewerI18n);
|
|
16785
17025
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
16786
17026
|
children: [
|
|
16787
17027
|
/*#__PURE__*/ createPortal(/*#__PURE__*/ jsx("style", {
|
|
@@ -16802,6 +17042,8 @@ function RoomViewer({ type, src, tinuuid, roomId, name, language, width, height,
|
|
|
16802
17042
|
}),
|
|
16803
17043
|
/*#__PURE__*/ jsx("div", {
|
|
16804
17044
|
ref: setThemeRoot,
|
|
17045
|
+
dir: direction,
|
|
17046
|
+
lang: uiLanguage,
|
|
16805
17047
|
style: {
|
|
16806
17048
|
height: '100%',
|
|
16807
17049
|
width: '100%'
|
|
@@ -16810,22 +17052,25 @@ function RoomViewer({ type, src, tinuuid, roomId, name, language, width, height,
|
|
|
16810
17052
|
root: themeRoot,
|
|
16811
17053
|
storageKey: "neurodyn-theme",
|
|
16812
17054
|
defaultTheme: "light",
|
|
16813
|
-
children: /*#__PURE__*/ jsx(
|
|
16814
|
-
|
|
16815
|
-
children: /*#__PURE__*/ jsx(
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
|
|
16821
|
-
|
|
16822
|
-
|
|
16823
|
-
|
|
16824
|
-
|
|
16825
|
-
|
|
16826
|
-
|
|
16827
|
-
|
|
16828
|
-
|
|
17055
|
+
children: /*#__PURE__*/ jsx(Direction.Provider, {
|
|
17056
|
+
dir: direction,
|
|
17057
|
+
children: /*#__PURE__*/ jsx(I18nextProvider, {
|
|
17058
|
+
i18n: viewerI18n,
|
|
17059
|
+
children: /*#__PURE__*/ jsx(RoomViewerRoot, {
|
|
17060
|
+
type: type,
|
|
17061
|
+
src: src,
|
|
17062
|
+
tinuuid: tinuuid,
|
|
17063
|
+
roomId: roomId,
|
|
17064
|
+
name: name,
|
|
17065
|
+
language: language,
|
|
17066
|
+
width: width,
|
|
17067
|
+
height: height,
|
|
17068
|
+
dimensionUnit: dimensionUnit,
|
|
17069
|
+
displayUnit: displayUnit,
|
|
17070
|
+
apiKey: apiKey,
|
|
17071
|
+
source: source,
|
|
17072
|
+
widgetSession: widgetSession
|
|
17073
|
+
})
|
|
16829
17074
|
})
|
|
16830
17075
|
})
|
|
16831
17076
|
})
|