@flamingo-stack/openframe-frontend-core 0.0.853 → 0.0.855
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/build/export-map.json +1 -1
- package/dist/{case-study-card-WP5Z234Q.cjs → case-study-card-6VAMNHLU.cjs} +8 -8
- package/dist/{chunk-2W22LY3W.cjs → chunk-2JCA7BRK.cjs} +19 -19
- package/dist/{chunk-53QPG7SJ.cjs → chunk-2MCPK6AX.cjs} +28 -28
- package/dist/{chunk-QOW2GP3V.cjs → chunk-2P72KAG5.cjs} +23 -23
- package/dist/{chunk-NMWLXHFH.cjs → chunk-3GJ75OUL.cjs} +183 -183
- package/dist/{chunk-P63CRPWI.cjs → chunk-4H3J57AN.cjs} +25 -25
- package/dist/{chunk-6GWRPW6B.cjs → chunk-5NK3FUHY.cjs} +4 -4
- package/dist/{chunk-DLTPSP5F.cjs → chunk-5TYG5JNB.cjs} +2 -2
- package/dist/{chunk-EIACEY2L.cjs → chunk-65NMKAPQ.cjs} +12 -12
- package/dist/{chunk-IGVAPIEW.cjs → chunk-6C4OR4MZ.cjs} +2 -2
- package/dist/{chunk-GG466XFQ.cjs → chunk-6DMH4GXN.cjs} +30 -5
- package/dist/{chunk-EF2FZ7GT.cjs → chunk-6VVQJU76.cjs} +54 -54
- package/dist/{chunk-G7GF4PWA.cjs → chunk-77GX573I.cjs} +9 -9
- package/dist/{chunk-7RZHSBNX.cjs → chunk-AOOHJLXS.cjs} +90 -90
- package/dist/{chunk-O3EKOXFZ.cjs → chunk-AYMY2VNB.cjs} +37 -43
- package/dist/{chunk-67CZ2Q5K.cjs → chunk-BSPIGZCC.cjs} +36 -36
- package/dist/{chunk-FW7RKWPY.cjs → chunk-D6GEMVHD.cjs} +3 -3
- package/dist/{chunk-KEV6F3QN.cjs → chunk-DPNFI5XM.cjs} +100 -100
- package/dist/{chunk-6V2M2X3M.cjs → chunk-DTZ6KASI.cjs} +6 -6
- package/dist/{chunk-SSKMGH5O.cjs → chunk-DXVGGWLG.cjs} +10 -10
- package/dist/{chunk-IO6NN3SL.cjs → chunk-EOUEUYCQ.cjs} +54 -54
- package/dist/{chunk-5RMBLOJ5.cjs → chunk-ESGE7CUX.cjs} +14 -14
- package/dist/{chunk-ETZFBB7O.cjs → chunk-EXQSIX2I.cjs} +4 -4
- package/dist/{chunk-IC4IJJB2.cjs → chunk-F33EAPD2.cjs} +124 -124
- package/dist/{chunk-COWMXUHN.cjs → chunk-GK577ZLJ.cjs} +6 -14
- package/dist/{chunk-E4MFQKPC.cjs → chunk-GZYRDLJW.cjs} +103 -103
- package/dist/{chunk-LFEURIZN.cjs → chunk-HML3JUXF.cjs} +324 -322
- package/dist/{chunk-BNHTBLAG.cjs → chunk-J3CFRGZ2.cjs} +17 -17
- package/dist/{chunk-USPUZO53.cjs → chunk-KZAQPRTA.cjs} +9 -11
- package/dist/{chunk-HTYJUMFB.cjs → chunk-LSLRJJFP.cjs} +2 -2
- package/dist/{chunk-TBGQMHCG.cjs → chunk-MINFN3IG.cjs} +8 -8
- package/dist/{chunk-KHOB3TES.cjs → chunk-MX52LZ6M.cjs} +6 -6
- package/dist/{chunk-OH5TXFRR.cjs → chunk-O4CPT3RK.cjs} +7 -7
- package/dist/{chunk-HF3V6WBJ.cjs → chunk-OTHQ2KQW.cjs} +3 -3
- package/dist/{chunk-IUDBG3HJ.cjs → chunk-PCQ2HKU3.cjs} +5 -5
- package/dist/{chunk-BNG6JOGZ.cjs → chunk-QPHXYE5P.cjs} +27 -27
- package/dist/{chunk-UO2EJGRJ.cjs → chunk-QZXCUY36.cjs} +53 -53
- package/dist/{chunk-COJG2ATY.cjs → chunk-RIJU4HZ2.cjs} +51 -55
- package/dist/{chunk-KKFDRCQF.cjs → chunk-RY7INTYU.cjs} +14 -1
- package/dist/{chunk-GI3MMBP3.cjs → chunk-SQ7YHWEP.cjs} +228 -15
- package/dist/{chunk-U767P4JU.cjs → chunk-STV6VJ3U.cjs} +21 -21
- package/dist/chunk-T54I5ZZY.cjs +62 -0
- package/dist/{chunk-UV45EPXN.cjs → chunk-TW5Y4D5I.cjs} +7 -7
- package/dist/{chunk-FX35L4Y6.cjs → chunk-XCQ5I27Z.cjs} +3 -3
- package/dist/{chunk-AZEO7HBB.cjs → chunk-Y44EF4JW.cjs} +2 -2
- package/dist/{chunk-W7OFAROY.cjs → chunk-YSXVRTGT.cjs} +9 -12
- package/dist/{chunk-GI6ECCWB.cjs → chunk-ZUGJLCYP.cjs} +1272 -856
- package/dist/{chunk-KNN2GCMW.cjs → chunk-ZYAVIRQV.cjs} +25 -25
- package/dist/{cloud-tenants-QUL2XPAS.cjs → cloud-tenants-2XFIDDGU.cjs} +28 -29
- package/dist/components/case-studies/index.cjs +44 -45
- package/dist/components/chat/chat-message-row.d.ts +1 -1
- package/dist/components/chat/chat-message-row.d.ts.map +1 -1
- package/dist/components/chat/chat-message-row.js +4 -4
- package/dist/components/chat/entity-cards/use-cover-image-fallback.d.ts +7 -13
- package/dist/components/chat/entity-cards/use-cover-image-fallback.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/use-cover-image-fallback.js +2 -8
- package/dist/components/chat/hooks/use-chat-attachment-image-gallery.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-chat-attachment-image-gallery.js +8 -4
- package/dist/components/chat/index.cjs +22 -23
- package/dist/components/contact/index.cjs +29 -30
- package/dist/components/docs/index.cjs +32 -33
- package/dist/components/embeds/index.cjs +29 -30
- package/dist/components/faq/index.cjs +30 -31
- package/dist/components/features/cloud-tenants/index.d.ts +7 -5
- package/dist/components/features/cloud-tenants/index.d.ts.map +1 -1
- package/dist/components/features/cloud-tenants/index.js +8 -1
- package/dist/components/features/cloud-tenants/single-customer-tenants-table-view.d.ts +26 -0
- package/dist/components/features/cloud-tenants/single-customer-tenants-table-view.d.ts.map +1 -0
- package/dist/components/features/cloud-tenants/single-customer-tenants-table-view.js +176 -0
- package/dist/components/features/cloud-tenants/tenant-access-cell.d.ts +4 -2
- package/dist/components/features/cloud-tenants/tenant-access-cell.d.ts.map +1 -1
- package/dist/components/features/cloud-tenants/tenant-access-cell.js +3 -2
- package/dist/components/features/cloud-tenants/tenant-customer-cell.d.ts +12 -5
- package/dist/components/features/cloud-tenants/tenant-customer-cell.d.ts.map +1 -1
- package/dist/components/features/cloud-tenants/tenant-customer-cell.js +38 -7
- package/dist/components/features/cloud-tenants/tenant-licenses-cell.d.ts +7 -0
- package/dist/components/features/cloud-tenants/tenant-licenses-cell.d.ts.map +1 -0
- package/dist/components/features/cloud-tenants/tenant-licenses-cell.js +17 -0
- package/dist/components/features/cloud-tenants/tenant-presentation.d.ts +19 -0
- package/dist/components/features/cloud-tenants/tenant-presentation.d.ts.map +1 -1
- package/dist/components/features/cloud-tenants/tenant-presentation.js +24 -3
- package/dist/components/features/cloud-tenants/tenant-row.d.ts +35 -8
- package/dist/components/features/cloud-tenants/tenant-row.d.ts.map +1 -1
- package/dist/components/features/cloud-tenants/tenants-table-columns.d.ts +9 -3
- package/dist/components/features/cloud-tenants/tenants-table-columns.d.ts.map +1 -1
- package/dist/components/features/cloud-tenants/tenants-table-columns.js +5 -3
- package/dist/components/features/cloud-tenants/tenants-table-view.d.ts +27 -6
- package/dist/components/features/cloud-tenants/tenants-table-view.d.ts.map +1 -1
- package/dist/components/features/cloud-tenants/tenants-table-view.js +75 -17
- package/dist/components/features/devices/device-directory.d.ts +18 -0
- package/dist/components/features/devices/device-directory.d.ts.map +1 -0
- package/dist/components/features/devices/device-directory.js +35 -0
- package/dist/components/features/devices/devices-filter-toolbar.d.ts +3 -1
- package/dist/components/features/devices/devices-filter-toolbar.d.ts.map +1 -1
- package/dist/components/features/devices/devices-filter-toolbar.js +2 -1
- package/dist/components/features/devices/devices-panel-view.d.ts +3 -1
- package/dist/components/features/devices/devices-panel-view.d.ts.map +1 -1
- package/dist/components/features/devices/devices-panel-view.js +11 -2
- package/dist/components/features/devices/devices-table-columns.d.ts +17 -3
- package/dist/components/features/devices/devices-table-columns.d.ts.map +1 -1
- package/dist/components/features/devices/devices-table-columns.js +80 -10
- package/dist/components/features/devices/index.d.ts +1 -0
- package/dist/components/features/devices/index.d.ts.map +1 -1
- package/dist/components/features/devices/index.js +8 -0
- package/dist/components/features/devices/types.d.ts +14 -0
- package/dist/components/features/devices/types.d.ts.map +1 -1
- package/dist/components/features/devices/use-tag-filter-modal.d.ts +1 -0
- package/dist/components/features/devices/use-tag-filter-modal.d.ts.map +1 -1
- package/dist/components/features/devices/use-tag-filter-modal.js +13 -8
- package/dist/components/features/index.cjs +42 -29
- package/dist/components/help-center-pages/index.cjs +134 -135
- package/dist/components/index.cjs +126 -113
- package/dist/components/meeting-scheduler/index.cjs +102 -103
- package/dist/components/navigation/app-layout.js +2 -2
- package/dist/components/navigation/index.cjs +31 -32
- package/dist/components/onboarding-guides/index.cjs +31 -32
- package/dist/components/product-demo/index.cjs +39 -40
- package/dist/components/related-content/index.cjs +16 -17
- package/dist/components/tickets/index.cjs +35 -36
- package/dist/components/ui/date-picker.d.ts +2 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -1
- package/dist/components/ui/date-picker.js +19 -6
- package/dist/components/ui/entity-image.d.ts +1 -2
- package/dist/components/ui/entity-image.d.ts.map +1 -1
- package/dist/components/ui/entity-image.js +4 -8
- package/dist/components/ui/index.cjs +28 -29
- package/dist/components/ui/markdown/base-components.d.ts +0 -13
- package/dist/components/ui/markdown/base-components.d.ts.map +1 -1
- package/dist/components/ui/markdown/base-components.js +7 -7
- package/dist/components/ui/square-avatar.d.ts.map +1 -1
- package/dist/components/ui/square-avatar.js +3 -8
- package/dist/{devices-LNB4CYPP.cjs → devices-O3DYGIZB.cjs} +29 -30
- package/dist/embed-shims/index.cjs +3 -2
- package/dist/embed-shims/next-image.cjs +3 -2
- package/dist/embed-shims/next-image.d.ts +2 -0
- package/dist/embed-shims/next-image.d.ts.map +1 -1
- package/dist/embed-shims/next-image.js +14 -4
- package/dist/{embeddable-chat-SJEEJI4N.cjs → embeddable-chat-QD7NFD2H.cjs} +100 -101
- package/dist/hooks/index.cjs +27 -16
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/ui/use-content-breakpoint.d.ts +8 -0
- package/dist/hooks/ui/use-content-breakpoint.d.ts.map +1 -1
- package/dist/hooks/ui/use-content-breakpoint.js +17 -3
- package/dist/hooks/ui/use-media-query.d.ts +1 -0
- package/dist/hooks/ui/use-media-query.d.ts.map +1 -1
- package/dist/hooks/ui/use-media-query.js +3 -1
- package/dist/hooks/use-authed-asset-src.d.ts +77 -2
- package/dist/hooks/use-authed-asset-src.d.ts.map +1 -1
- package/dist/hooks/use-authed-asset-src.js +185 -73
- package/dist/hooks/use-authed-image-src.d.ts +11 -4
- package/dist/hooks/use-authed-image-src.d.ts.map +1 -1
- package/dist/hooks/use-authed-image-src.js +6 -2
- package/dist/hooks/use-image-fallback.d.ts +16 -0
- package/dist/hooks/use-image-fallback.d.ts.map +1 -0
- package/dist/hooks/use-image-fallback.js +14 -0
- package/dist/index.cjs +58 -36
- package/dist/{knowledge-UTWKB6XG.cjs → knowledge-K7AFNZNO.cjs} +29 -30
- package/dist/{logs-PMXIWMBQ.cjs → logs-MZ3BR2FR.cjs} +35 -36
- package/dist/{policies-6DCMFDL7.cjs → policies-XVKQ2W7S.cjs} +32 -33
- package/dist/{remote-session-SG44CNOK.cjs → remote-session-VOZJXDM4.cjs} +13 -14
- package/dist/{scripts-2G7LXW7Z.cjs → scripts-IBPMBS6G.cjs} +35 -36
- package/dist/{software-update-MYLKHDHC.cjs → software-update-PXTANMAO.cjs} +32 -33
- package/dist/{tickets-board-SQY2Y6QV.cjs → tickets-board-POYZS7BW.cjs} +16 -17
- package/dist/utils/app-origins.d.ts +3 -6
- package/dist/utils/app-origins.d.ts.map +1 -1
- package/dist/utils/app-origins.js +8 -1
- package/dist/utils/embed-authed-fetch.d.ts +46 -26
- package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
- package/dist/utils/embed-authed-fetch.js +24 -8
- package/dist/utils/index.cjs +4 -1
- package/dist/utils/presentation-for.d.ts +6 -0
- package/dist/utils/presentation-for.d.ts.map +1 -0
- package/dist/utils/presentation-for.js +7 -0
- package/dist/{video-file-player-XMOB234V.cjs → video-file-player-RIOT24NT.cjs} +3 -4
- package/package.json +1 -1
- package/src/components/chat/chat-message-row.tsx +8 -7
- package/src/components/chat/entity-cards/use-cover-image-fallback.ts +8 -28
- package/src/components/chat/hooks/use-chat-attachment-image-gallery.tsx +19 -8
- package/src/components/features/cloud-tenants/index.ts +8 -3
- package/src/components/features/cloud-tenants/single-customer-tenants-table-view.tsx +234 -0
- package/src/components/features/cloud-tenants/tenant-access-cell.tsx +12 -5
- package/src/components/features/cloud-tenants/tenant-customer-cell.tsx +48 -12
- package/src/components/features/cloud-tenants/tenant-licenses-cell.tsx +28 -0
- package/src/components/features/cloud-tenants/tenant-presentation.ts +46 -4
- package/src/components/features/cloud-tenants/tenant-row.ts +38 -8
- package/src/components/features/cloud-tenants/tenants-table-columns.ts +8 -5
- package/src/components/features/cloud-tenants/tenants-table-view.tsx +123 -28
- package/src/components/features/devices/device-directory.ts +55 -0
- package/src/components/features/devices/devices-filter-toolbar.tsx +4 -1
- package/src/components/features/devices/devices-panel-view.tsx +12 -2
- package/src/components/features/devices/devices-table-columns.tsx +123 -8
- package/src/components/features/devices/index.ts +7 -0
- package/src/components/features/devices/types.ts +14 -0
- package/src/components/features/devices/use-tag-filter-modal.ts +32 -14
- package/src/components/navigation/app-layout.tsx +4 -4
- package/src/components/ui/date-picker.tsx +21 -3
- package/src/components/ui/entity-image.tsx +4 -12
- package/src/components/ui/markdown/base-components.tsx +15 -20
- package/src/components/ui/square-avatar.tsx +5 -8
- package/src/embed-shims/next-image.tsx +34 -3
- package/src/hooks/index.ts +1 -0
- package/src/hooks/ui/use-content-breakpoint.ts +21 -2
- package/src/hooks/ui/use-media-query.ts +1 -0
- package/src/hooks/use-authed-asset-src.ts +323 -107
- package/src/hooks/use-authed-image-src.ts +15 -5
- package/src/hooks/use-image-fallback.ts +31 -0
- package/src/utils/app-origins.ts +12 -7
- package/src/utils/embed-authed-fetch.ts +71 -32
- package/src/utils/presentation-for.ts +10 -0
- package/dist/chunk-UAI4VMEF.cjs +0 -46
- package/dist/chunk-YSDB6HGQ.cjs +0 -102
|
@@ -15,24 +15,24 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
require('./chunk-
|
|
18
|
+
var _chunkZUGJLCYPcjs = require('./chunk-ZUGJLCYP.cjs');
|
|
19
|
+
require('./chunk-KZAQPRTA.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
23
|
-
require('./chunk-
|
|
22
|
+
var _chunkRIJU4HZ2cjs = require('./chunk-RIJU4HZ2.cjs');
|
|
23
|
+
require('./chunk-4H3J57AN.cjs');
|
|
24
24
|
require('./chunk-HQQE74RO.cjs');
|
|
25
25
|
require('./chunk-DEY6XXGO.cjs');
|
|
26
|
-
require('./chunk-
|
|
26
|
+
require('./chunk-QZXCUY36.cjs');
|
|
27
27
|
require('./chunk-24I6RFVU.cjs');
|
|
28
|
-
require('./chunk-
|
|
28
|
+
require('./chunk-PCQ2HKU3.cjs');
|
|
29
29
|
require('./chunk-MZ4KBSH7.cjs');
|
|
30
30
|
require('./chunk-ZZDFMUEU.cjs');
|
|
31
|
-
require('./chunk-
|
|
32
|
-
require('./chunk-
|
|
31
|
+
require('./chunk-F33EAPD2.cjs');
|
|
32
|
+
require('./chunk-HML3JUXF.cjs');
|
|
33
33
|
require('./chunk-OT6P57ZS.cjs');
|
|
34
|
-
require('./chunk-
|
|
35
|
-
require('./chunk-
|
|
34
|
+
require('./chunk-65NMKAPQ.cjs');
|
|
35
|
+
require('./chunk-STV6VJ3U.cjs');
|
|
36
36
|
require('./chunk-KXFIYO4O.cjs');
|
|
37
37
|
require('./chunk-PGAMWM6C.cjs');
|
|
38
38
|
require('./chunk-7HH4Y27U.cjs');
|
|
@@ -1825,22 +1825,22 @@ require('./chunk-LMBYZITR.cjs');
|
|
|
1825
1825
|
require('./chunk-TMVC7S2R.cjs');
|
|
1826
1826
|
require('./chunk-IYHH5EIO.cjs');
|
|
1827
1827
|
require('./chunk-XIBCMGBW.cjs');
|
|
1828
|
-
require('./chunk-
|
|
1829
|
-
require('./chunk-
|
|
1830
|
-
require('./chunk-
|
|
1831
|
-
require('./chunk-
|
|
1828
|
+
require('./chunk-O4CPT3RK.cjs');
|
|
1829
|
+
require('./chunk-77GX573I.cjs');
|
|
1830
|
+
require('./chunk-D6GEMVHD.cjs');
|
|
1831
|
+
require('./chunk-6C4OR4MZ.cjs');
|
|
1832
1832
|
require('./chunk-JKX2C3I2.cjs');
|
|
1833
1833
|
require('./chunk-WWUSFOJ7.cjs');
|
|
1834
1834
|
require('./chunk-SKI6NKOE.cjs');
|
|
1835
1835
|
require('./chunk-EWPR7662.cjs');
|
|
1836
1836
|
require('./chunk-IX2E3AN7.cjs');
|
|
1837
1837
|
require('./chunk-7DNL734S.cjs');
|
|
1838
|
-
require('./chunk-
|
|
1839
|
-
require('./chunk-
|
|
1840
|
-
require('./chunk-
|
|
1841
|
-
require('./chunk-
|
|
1842
|
-
require('./chunk-
|
|
1843
|
-
require('./chunk-
|
|
1838
|
+
require('./chunk-2JCA7BRK.cjs');
|
|
1839
|
+
require('./chunk-3GJ75OUL.cjs');
|
|
1840
|
+
require('./chunk-LSLRJJFP.cjs');
|
|
1841
|
+
require('./chunk-YSXVRTGT.cjs');
|
|
1842
|
+
require('./chunk-AYMY2VNB.cjs');
|
|
1843
|
+
require('./chunk-DXVGGWLG.cjs');
|
|
1844
1844
|
require('./chunk-X432Y6RM.cjs');
|
|
1845
1845
|
require('./chunk-S5C3OZCO.cjs');
|
|
1846
1846
|
require('./chunk-32ASZMTV.cjs');
|
|
@@ -1850,15 +1850,14 @@ require('./chunk-6VOOPMP5.cjs');
|
|
|
1850
1850
|
require('./chunk-ORO54HDF.cjs');
|
|
1851
1851
|
require('./chunk-RUHKTWGB.cjs');
|
|
1852
1852
|
require('./chunk-BLH2SFOO.cjs');
|
|
1853
|
-
require('./chunk-
|
|
1854
|
-
require('./chunk-
|
|
1855
|
-
require('./chunk-
|
|
1856
|
-
require('./chunk-
|
|
1857
|
-
require('./chunk-
|
|
1858
|
-
require('./chunk-KKFDRCQF.cjs');
|
|
1853
|
+
require('./chunk-T54I5ZZY.cjs');
|
|
1854
|
+
require('./chunk-GK577ZLJ.cjs');
|
|
1855
|
+
require('./chunk-EXQSIX2I.cjs');
|
|
1856
|
+
require('./chunk-XCQ5I27Z.cjs');
|
|
1857
|
+
require('./chunk-RY7INTYU.cjs');
|
|
1859
1858
|
require('./chunk-NTPX5GXI.cjs');
|
|
1860
|
-
require('./chunk-
|
|
1861
|
-
require('./chunk-
|
|
1859
|
+
require('./chunk-6DMH4GXN.cjs');
|
|
1860
|
+
require('./chunk-SQ7YHWEP.cjs');
|
|
1862
1861
|
require('./chunk-UJ7AXHRZ.cjs');
|
|
1863
1862
|
require('./chunk-HXURNKXI.cjs');
|
|
1864
1863
|
require('./chunk-VCFQHPOO.cjs');
|
|
@@ -1923,14 +1922,14 @@ var noop = () => {
|
|
|
1923
1922
|
var HIDDEN_WHEN_COMPACT = ["organization"];
|
|
1924
1923
|
function StaticPackageField({ value }) {
|
|
1925
1924
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1926
|
-
|
|
1925
|
+
_chunkRIJU4HZ2cjs.Autocomplete,
|
|
1927
1926
|
{
|
|
1928
|
-
label:
|
|
1927
|
+
label: _chunkZUGJLCYPcjs.PACKAGE_SEARCH_LABEL,
|
|
1929
1928
|
labelVariant: "large",
|
|
1930
1929
|
options: value ? [{ value: value.id, label: value.name, description: _nullishCoalesce(value.description, () => ( void 0)) }] : [],
|
|
1931
1930
|
value: _nullishCoalesce(_optionalChain([value, 'optionalAccess', _ => _.id]), () => ( null)),
|
|
1932
1931
|
onChange: noop,
|
|
1933
|
-
placeholder:
|
|
1932
|
+
placeholder: _chunkZUGJLCYPcjs.PACKAGE_SEARCH_PLACEHOLDER
|
|
1934
1933
|
}
|
|
1935
1934
|
);
|
|
1936
1935
|
}
|
|
@@ -1944,7 +1943,7 @@ function SoftwareUpdateScreen({ compact = false }) {
|
|
|
1944
1943
|
[fixture.devices, fixture.selectedIds]
|
|
1945
1944
|
);
|
|
1946
1945
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg pt-[var(--spacing-system-l)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1947
|
-
|
|
1946
|
+
_chunkZUGJLCYPcjs.SoftwareActionForm,
|
|
1948
1947
|
{
|
|
1949
1948
|
action: fixture.action,
|
|
1950
1949
|
showHeader: false,
|
|
@@ -1956,7 +1955,7 @@ function SoftwareUpdateScreen({ compact = false }) {
|
|
|
1956
1955
|
initialValues: fixture.initialValues,
|
|
1957
1956
|
renderPackageSearch,
|
|
1958
1957
|
renderDevicePicker: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1959
|
-
|
|
1958
|
+
_chunkZUGJLCYPcjs.DeviceSelector,
|
|
1960
1959
|
{
|
|
1961
1960
|
devices: selected,
|
|
1962
1961
|
loading: false,
|
|
@@ -10,9 +10,9 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
13
|
+
var _chunk4H3J57ANcjs = require('./chunk-4H3J57AN.cjs');
|
|
14
|
+
require('./chunk-PCQ2HKU3.cjs');
|
|
15
|
+
require('./chunk-STV6VJ3U.cjs');
|
|
16
16
|
require('./chunk-KXFIYO4O.cjs');
|
|
17
17
|
require('./chunk-7HH4Y27U.cjs');
|
|
18
18
|
require('./chunk-QKCF77NZ.cjs');
|
|
@@ -1804,11 +1804,11 @@ require('./chunk-LMBYZITR.cjs');
|
|
|
1804
1804
|
require('./chunk-TMVC7S2R.cjs');
|
|
1805
1805
|
require('./chunk-IYHH5EIO.cjs');
|
|
1806
1806
|
require('./chunk-XIBCMGBW.cjs');
|
|
1807
|
-
require('./chunk-
|
|
1807
|
+
require('./chunk-6C4OR4MZ.cjs');
|
|
1808
1808
|
require('./chunk-WWUSFOJ7.cjs');
|
|
1809
1809
|
require('./chunk-SKI6NKOE.cjs');
|
|
1810
|
-
require('./chunk-
|
|
1811
|
-
require('./chunk-
|
|
1810
|
+
require('./chunk-YSXVRTGT.cjs');
|
|
1811
|
+
require('./chunk-DXVGGWLG.cjs');
|
|
1812
1812
|
require('./chunk-S5C3OZCO.cjs');
|
|
1813
1813
|
require('./chunk-32ASZMTV.cjs');
|
|
1814
1814
|
require('./chunk-OOYBIS7D.cjs');
|
|
@@ -1816,12 +1816,11 @@ require('./chunk-4IYNDV3G.cjs');
|
|
|
1816
1816
|
require('./chunk-6VOOPMP5.cjs');
|
|
1817
1817
|
require('./chunk-ORO54HDF.cjs');
|
|
1818
1818
|
require('./chunk-RUHKTWGB.cjs');
|
|
1819
|
-
require('./chunk-
|
|
1820
|
-
require('./chunk-
|
|
1821
|
-
require('./chunk-
|
|
1822
|
-
require('./chunk-
|
|
1823
|
-
require('./chunk-
|
|
1824
|
-
require('./chunk-GG466XFQ.cjs');
|
|
1819
|
+
require('./chunk-GK577ZLJ.cjs');
|
|
1820
|
+
require('./chunk-XCQ5I27Z.cjs');
|
|
1821
|
+
require('./chunk-RY7INTYU.cjs');
|
|
1822
|
+
require('./chunk-6DMH4GXN.cjs');
|
|
1823
|
+
require('./chunk-SQ7YHWEP.cjs');
|
|
1825
1824
|
require('./chunk-VCFQHPOO.cjs');
|
|
1826
1825
|
require('./chunk-Z74QE57T.cjs');
|
|
1827
1826
|
require('./chunk-XZJCBIYR.cjs');
|
|
@@ -1842,7 +1841,7 @@ function buildTicketsBoardFixture(cast) {
|
|
|
1842
1841
|
const dana = assignee(cast.person("dana"));
|
|
1843
1842
|
const alex = assignee(cast.person("alex"));
|
|
1844
1843
|
return [
|
|
1845
|
-
|
|
1844
|
+
_chunk4H3J57ANcjs.columnFromTicketStatus.call(void 0, "ACTIVE", [
|
|
1846
1845
|
ticket("tk-1051", "Printer offline at the front desk", "ACTIVE", {
|
|
1847
1846
|
ticketNumber: "1051",
|
|
1848
1847
|
agent: "fae",
|
|
@@ -1860,7 +1859,7 @@ function buildTicketsBoardFixture(cast) {
|
|
|
1860
1859
|
tags: ["onboarding"]
|
|
1861
1860
|
})
|
|
1862
1861
|
]),
|
|
1863
|
-
|
|
1862
|
+
_chunk4H3J57ANcjs.columnFromTicketStatus.call(void 0, "TECH_REQUIRED", [
|
|
1864
1863
|
ticket("tk-1049", "Acrobat Pro for Maya", "TECH_REQUIRED", {
|
|
1865
1864
|
ticketNumber: "1049",
|
|
1866
1865
|
agent: "fae",
|
|
@@ -1884,7 +1883,7 @@ function buildTicketsBoardFixture(cast) {
|
|
|
1884
1883
|
escalatedByUser: true
|
|
1885
1884
|
})
|
|
1886
1885
|
]),
|
|
1887
|
-
|
|
1886
|
+
_chunk4H3J57ANcjs.columnFromTicketStatus.call(void 0, "ON_HOLD", [
|
|
1888
1887
|
ticket("tk-1046", "Replace the conference room display", "ON_HOLD", {
|
|
1889
1888
|
ticketNumber: "1046",
|
|
1890
1889
|
organizationName: _chunkFDZOE5TLcjs.DEMO_ORGANIZATIONS.acme.name,
|
|
@@ -1893,7 +1892,7 @@ function buildTicketsBoardFixture(cast) {
|
|
|
1893
1892
|
activity: { kind: "waiting-external" }
|
|
1894
1893
|
})
|
|
1895
1894
|
]),
|
|
1896
|
-
|
|
1895
|
+
_chunk4H3J57ANcjs.columnFromTicketStatus.call(void 0,
|
|
1897
1896
|
"RESOLVED",
|
|
1898
1897
|
[
|
|
1899
1898
|
ticket("tk-1048", "Slow laptop", "RESOLVED", {
|
|
@@ -1929,7 +1928,7 @@ function TicketsBoardScreen({ compact = false }) {
|
|
|
1929
1928
|
const cast = _chunkLHV2R6QUcjs.useProductDemoCast.call(void 0, );
|
|
1930
1929
|
const board = _react.useMemo.call(void 0, () => buildTicketsBoardFixture(cast), [cast]);
|
|
1931
1930
|
const columns = compact ? board.filter((column) => column.id !== "ON_HOLD") : board;
|
|
1932
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg p-[var(--spacing-system-m)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1931
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg p-[var(--spacing-system-m)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4H3J57ANcjs.Board, { columns, onChange: noop, initialCollapsed: compact ? void 0 : FOLDED }) });
|
|
1933
1932
|
}
|
|
1934
1933
|
|
|
1935
1934
|
|
|
@@ -18,12 +18,9 @@ export declare const SERVER_APP_ORIGINS: AppOrigins;
|
|
|
18
18
|
export declare function readAppOrigins(): AppOrigins;
|
|
19
19
|
/** Called when a host registers, replaces or clears its auth adapter, which can change `allowedOrigins`. */
|
|
20
20
|
export declare const subscribeAppOrigins: (listener: () => void) => () => void;
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* The page match compares scheme and host instead of `URL.origin`, which is
|
|
25
|
-
* `"null"` for a `capacitor://` page.
|
|
26
|
-
*/
|
|
21
|
+
/** Whether `target` is on the page's own origin rather than on an origin the host sanctioned. */
|
|
22
|
+
export declare function isPageOriginUrl(target: URL, origins?: AppOrigins): boolean;
|
|
23
|
+
/** `url` resolved against the page when it belongs to the app, otherwise `null`. */
|
|
27
24
|
export declare function resolveAppOriginUrl(url: string, origins?: AppOrigins): URL | null;
|
|
28
25
|
/**
|
|
29
26
|
* Whether `url` loads from the app itself rather than from a third party.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-origins.d.ts","sourceRoot":"","sources":["../../src/utils/app-origins.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,qHAAqH;IACrH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,6GAA6G;AAC7G,eAAO,MAAM,kBAAkB,EAAE,UAAgF,CAAC;AAOlH;;;GAGG;AACH,wBAAgB,cAAc,IAAI,UAAU,CAqB3C;AAED,4GAA4G;AAC5G,eAAO,MAAM,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"app-origins.d.ts","sourceRoot":"","sources":["../../src/utils/app-origins.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,qHAAqH;IACrH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,6GAA6G;AAC7G,eAAO,MAAM,kBAAkB,EAAE,UAAgF,CAAC;AAOlH;;;GAGG;AACH,wBAAgB,cAAc,IAAI,UAAU,CAqB3C;AAED,4GAA4G;AAC5G,eAAO,MAAM,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAiC,CAAC;AAOpG,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,GAAE,UAA6B,GAAG,OAAO,CAE5F;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,UAA6B,GAAG,GAAG,GAAG,IAAI,CAYnG;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAEzE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,UAA6B,GAAG,MAAM,GAAG,IAAI,CAOlG"}
|
|
@@ -17,6 +17,12 @@ function readAppOrigins() {
|
|
|
17
17
|
return snapshot;
|
|
18
18
|
}
|
|
19
19
|
const subscribeAppOrigins = subscribeRegisteredAdapter;
|
|
20
|
+
function isOnPage(target, page) {
|
|
21
|
+
return target.protocol === page.protocol && target.host === page.host;
|
|
22
|
+
}
|
|
23
|
+
function isPageOriginUrl(target, origins = readAppOrigins()) {
|
|
24
|
+
return isOnPage(target, new URL(origins.pageUrl ?? SERVER_PAGE_URL));
|
|
25
|
+
}
|
|
20
26
|
function resolveAppOriginUrl(url, origins = readAppOrigins()) {
|
|
21
27
|
let page;
|
|
22
28
|
let target;
|
|
@@ -26,7 +32,7 @@ function resolveAppOriginUrl(url, origins = readAppOrigins()) {
|
|
|
26
32
|
} catch {
|
|
27
33
|
return null;
|
|
28
34
|
}
|
|
29
|
-
if (target
|
|
35
|
+
if (isOnPage(target, page)) return target;
|
|
30
36
|
if (target.protocol !== "http:" && target.protocol !== "https:") return null;
|
|
31
37
|
return origins.allowedOrigins.includes(target.origin) ? target : null;
|
|
32
38
|
}
|
|
@@ -45,6 +51,7 @@ export {
|
|
|
45
51
|
SERVER_APP_ORIGINS,
|
|
46
52
|
absoluteHttpUrl,
|
|
47
53
|
isAppOriginUrl,
|
|
54
|
+
isPageOriginUrl,
|
|
48
55
|
readAppOrigins,
|
|
49
56
|
resolveAppOriginUrl,
|
|
50
57
|
subscribeAppOrigins
|
|
@@ -99,6 +99,27 @@ export interface EmbedAuthAdapter {
|
|
|
99
99
|
* remains the rule, this is the narrow exception.
|
|
100
100
|
*/
|
|
101
101
|
allowedOrigins?: string[];
|
|
102
|
+
/**
|
|
103
|
+
* Optional: where a picture or other asset URL found in the host's data actually lives. Every asset the lib
|
|
104
|
+
* loads natively (the boxed `Image`, and everything drawn through `useAuthedAsset`) passes its URL through
|
|
105
|
+
* this first. A backend path that the page's origin does not serve, such as `/images/user/1` stored on a
|
|
106
|
+
* record but served at `{gateway}/api/images/user/1`, then loads from the gateway on every host, including a
|
|
107
|
+
* native shell, whose page origin has no server behind it.
|
|
108
|
+
*
|
|
109
|
+
* Must be idempotent. It must return absolute URLs and `data:` / `blob:` URLs unchanged, and leave the host's
|
|
110
|
+
* own static assets alone. Omit it when every URL in the host's data is already loadable as it stands. A host
|
|
111
|
+
* that registers `next/image` with its optimizer on must allow the hosts this returns in its image config.
|
|
112
|
+
*/
|
|
113
|
+
resolveAssetUrl?: (url: string) => string;
|
|
114
|
+
/**
|
|
115
|
+
* Optional, side-effect-free: whether `getHeaders()` would carry an `Authorization` header now. Declaring it also
|
|
116
|
+
* says the host authenticates by header: a picture on an origin in `allowedOrigins` then waits for the credential
|
|
117
|
+
* (`assetLoadMode`'s `awaiting-credential`) instead of loading natively into a 401. The lib asks it for every
|
|
118
|
+
* mounted picture and right after every credential change, so a host whose `getHeaders` has per-call side effects
|
|
119
|
+
* needs it to keep classifying from counting as sending.
|
|
120
|
+
* Without it the lib reads `getHeaders()` and never waits.
|
|
121
|
+
*/
|
|
122
|
+
hasCredential?: () => boolean;
|
|
102
123
|
/**
|
|
103
124
|
* Optional: call `listener` whenever `getHeaders()` starts returning a NEW
|
|
104
125
|
* credential (a rotation the host ran on its own — e.g. a native shell's
|
|
@@ -137,34 +158,28 @@ export declare function hasEmbedAuthAdapter(): boolean;
|
|
|
137
158
|
*/
|
|
138
159
|
export declare function subscribeEmbedCredentialChange(listener: () => void): () => void;
|
|
139
160
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
161
|
+
* How the browser has to load an asset URL on this host. Native asset loads (`<img src>`, `<track src>`, CSS
|
|
162
|
+
* `background-image`) can't carry custom headers, so where the host authenticates by HEADER (its adapter has a
|
|
163
|
+
* credential: `hasCredential`, else an `Authorization` from `getHeaders`) nothing the browser fetches on its own is
|
|
164
|
+
* authenticated:
|
|
142
165
|
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* `
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* header
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* shells, whose page origin is `capacitor://` / `tauri://`);
|
|
155
|
-
* - a same-origin / relative reverse-proxy path (`/content/api/...`) —
|
|
156
|
-
* dev-ticket web, where the token lives in localStorage and there is NO
|
|
157
|
-
* session cookie to fall back on. This case used to be excluded on the
|
|
158
|
-
* assumption that same-origin implies "cookies work"; true for a cookie
|
|
159
|
-
* session, false for every header-auth host, which is exactly when this
|
|
160
|
-
* predicate is consulted at all.
|
|
161
|
-
*
|
|
162
|
-
* Everything else loads natively, unchanged: cookie-auth web (the adapter
|
|
163
|
-
* supplies no `Authorization`), no adapter at all (the hub), and third-party
|
|
164
|
-
* origins the bearer does NOT belong to (public images) — those stay out of
|
|
165
|
-
* reach of the token by the same origin rules `embedAuthedFetch` enforces.
|
|
166
|
+
* - `native`: hand it to the element as it stands. Cookie-auth web (no credential), no adapter at all (the hub), a
|
|
167
|
+
* third-party origin the bearer does NOT belong to (public images: out of the token's reach by the same origin
|
|
168
|
+
* rules `embedAuthedFetch` enforces), or a non-http(s) URL (`data:`, `blob:`, a native shell's own bundle).
|
|
169
|
+
* - `bearer`: fetch it with the adapter's credential (`embedAuthedFetch`) and draw the blob. That covers both shapes
|
|
170
|
+
* a header-auth host takes: a cross-origin gateway sanctioned in `allowedOrigins` (native shells, whose page
|
|
171
|
+
* origin is `capacitor://` / `tauri://`), and a same-origin or relative reverse-proxy path (`/content/api/...`)
|
|
172
|
+
* on dev-ticket web, where the token lives in localStorage and there is NO session cookie to fall back on.
|
|
173
|
+
* - `awaiting-credential`: it lives on a gateway the host sanctioned in `allowedOrigins`, which only the bearer
|
|
174
|
+
* opens, and the host, which declared header auth (`hasCredential`), has no credential yet. A native shell
|
|
175
|
+
* renders before its tokens arrive: a native load at that moment is a guaranteed 401, so the caller waits for
|
|
176
|
+
* `subscribeEmbedCredentialChange` instead.
|
|
166
177
|
*/
|
|
167
|
-
export
|
|
178
|
+
export type AssetLoadMode = 'native' | 'bearer' | 'awaiting-credential';
|
|
179
|
+
/** `url`'s `AssetLoadMode` on this host now. Pass the URL after `resolveAssetUrl`. */
|
|
180
|
+
export declare function assetLoadMode(url: string): AssetLoadMode;
|
|
181
|
+
/** `url` where the host says it lives (`EmbedAuthAdapter.resolveAssetUrl`); unchanged when no host says. */
|
|
182
|
+
export declare function resolveAssetUrl(url: string): string;
|
|
168
183
|
/**
|
|
169
184
|
* `fetch` wrapper that attaches embed-proxy bearer headers (when
|
|
170
185
|
* present in sessionStorage) and forces `credentials: 'same-origin'`
|
|
@@ -201,4 +216,9 @@ export declare function needsBearerAssetFetch(url: string): boolean;
|
|
|
201
216
|
* the wrapper behaves exactly as described above.
|
|
202
217
|
*/
|
|
203
218
|
export declare function embedAuthedFetch(url: string, init?: RequestInit): Promise<Response>;
|
|
219
|
+
/**
|
|
220
|
+
* Whether `response` answered the retry `embedAuthedFetch` sent after refreshing the credential: a 401 here is a
|
|
221
|
+
* refusal of a credential just issued, which another refresh will not lift.
|
|
222
|
+
*/
|
|
223
|
+
export declare function answeredAfterRefresh(response: Response): boolean;
|
|
204
224
|
//# sourceMappingURL=embed-authed-fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embed-authed-fetch.d.ts","sourceRoot":"","sources":["../../src/utils/embed-authed-fetch.ts"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;4EAMwE;IACxE,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACtD;;6EAEyE;IACzE,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CAClD;AAOD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAS1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAE/E;AAED
|
|
1
|
+
{"version":3,"file":"embed-authed-fetch.d.ts","sourceRoot":"","sources":["../../src/utils/embed-authed-fetch.ts"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;4EAMwE;IACxE,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACtD;;6EAEyE;IACzE,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC;IAC9B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CAClD;AAOD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAS1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAE/E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,qBAAqB,CAAC;AAExE,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAaxD;AAED,4GAA4G;AAC5G,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkCvF;AAwDD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEhE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { resolveAppOriginUrl } from "./app-origins.js";
|
|
2
|
+
import { isPageOriginUrl, readAppOrigins, resolveAppOriginUrl } from "./app-origins.js";
|
|
3
3
|
import { readRegisteredAdapter, writeRegisteredAdapter } from "./embed-auth-adapter-registry.js";
|
|
4
4
|
import { applyProxyAuth } from "./embed-proxy-auth-storage.js";
|
|
5
5
|
function getRegisteredAuthAdapter() {
|
|
@@ -20,12 +20,20 @@ function subscribeEmbedCredentialChange(listener) {
|
|
|
20
20
|
return getRegisteredAuthAdapter()?.subscribe?.(listener) ?? (() => {
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
if (typeof window === "undefined") return
|
|
23
|
+
function assetLoadMode(url) {
|
|
24
|
+
if (typeof window === "undefined") return "native";
|
|
25
25
|
const adapter = getRegisteredAuthAdapter();
|
|
26
|
-
if (!adapter
|
|
27
|
-
const
|
|
28
|
-
|
|
26
|
+
if (!adapter) return "native";
|
|
27
|
+
const origins = readAppOrigins();
|
|
28
|
+
const target = resolveAppOriginUrl(url, origins);
|
|
29
|
+
if (!target || target.protocol !== "http:" && target.protocol !== "https:") return "native";
|
|
30
|
+
if (!adapter.hasCredential) return adapter.getHeaders?.().Authorization !== void 0 ? "bearer" : "native";
|
|
31
|
+
if (adapter.hasCredential()) return "bearer";
|
|
32
|
+
return isPageOriginUrl(target, origins) ? "native" : "awaiting-credential";
|
|
33
|
+
}
|
|
34
|
+
function resolveAssetUrl(url) {
|
|
35
|
+
const resolve = getRegisteredAuthAdapter()?.resolveAssetUrl;
|
|
36
|
+
return resolve ? resolve(url) : url;
|
|
29
37
|
}
|
|
30
38
|
function embedAuthedFetch(url, init = {}) {
|
|
31
39
|
assertSameOrigin(url);
|
|
@@ -68,6 +76,10 @@ function dedupedRefresh() {
|
|
|
68
76
|
}
|
|
69
77
|
return inFlightRefresh;
|
|
70
78
|
}
|
|
79
|
+
const answersAfterRefresh = /* @__PURE__ */ new WeakSet();
|
|
80
|
+
function answeredAfterRefresh(response) {
|
|
81
|
+
return answersAfterRefresh.has(response);
|
|
82
|
+
}
|
|
71
83
|
async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
72
84
|
const adapter = getRegisteredAuthAdapter();
|
|
73
85
|
await adapter?.beforeRequest?.();
|
|
@@ -92,7 +104,9 @@ async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
|
92
104
|
if (response.status === 401 && !isRetry && adapter?.refresh) {
|
|
93
105
|
const refreshed = await dedupedRefresh();
|
|
94
106
|
if (refreshed) {
|
|
95
|
-
|
|
107
|
+
const retried = await fetchWithRefresh(url, init, baseHeaders, true);
|
|
108
|
+
answersAfterRefresh.add(retried);
|
|
109
|
+
return retried;
|
|
96
110
|
}
|
|
97
111
|
}
|
|
98
112
|
return response;
|
|
@@ -128,9 +142,11 @@ function assertSameOrigin(url) {
|
|
|
128
142
|
}
|
|
129
143
|
}
|
|
130
144
|
export {
|
|
145
|
+
answeredAfterRefresh,
|
|
146
|
+
assetLoadMode,
|
|
131
147
|
embedAuthedFetch,
|
|
132
148
|
hasEmbedAuthAdapter,
|
|
133
|
-
|
|
149
|
+
resolveAssetUrl,
|
|
134
150
|
setEmbedAuthAdapter,
|
|
135
151
|
subscribeEmbedCredentialChange
|
|
136
152
|
};
|
package/dist/utils/index.cjs
CHANGED
|
@@ -83636,6 +83636,7 @@ function dedupedRefresh() {
|
|
|
83636
83636
|
}
|
|
83637
83637
|
return inFlightRefresh;
|
|
83638
83638
|
}
|
|
83639
|
+
var answersAfterRefresh = /* @__PURE__ */ new WeakSet();
|
|
83639
83640
|
async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
83640
83641
|
const adapter2 = getRegisteredAuthAdapter();
|
|
83641
83642
|
await adapter2?.beforeRequest?.();
|
|
@@ -83660,7 +83661,9 @@ async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
|
|
|
83660
83661
|
if (response.status === 401 && !isRetry && adapter2?.refresh) {
|
|
83661
83662
|
const refreshed = await dedupedRefresh();
|
|
83662
83663
|
if (refreshed) {
|
|
83663
|
-
|
|
83664
|
+
const retried = await fetchWithRefresh(url, init, baseHeaders, true);
|
|
83665
|
+
answersAfterRefresh.add(retried);
|
|
83666
|
+
return retried;
|
|
83664
83667
|
}
|
|
83665
83668
|
}
|
|
83666
83669
|
return response;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The entry of a value → presentation table for a value off the wire, `undefined` for one the table does not know.
|
|
3
|
+
* Own keys only: `in` or a bare index would answer `toString` or `constructor` with the prototype's function.
|
|
4
|
+
*/
|
|
5
|
+
export declare function presentationFor<K extends string, V>(map: Readonly<Record<K, V>>, key: string | null | undefined): V | undefined;
|
|
6
|
+
//# sourceMappingURL=presentation-for.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-for.d.ts","sourceRoot":"","sources":["../../src/utils/presentation-for.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EACjD,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAC3B,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC7B,CAAC,GAAG,SAAS,CAEf"}
|
|
@@ -16,11 +16,10 @@ var _chunkJKX2C3I2cjs = require('./chunk-JKX2C3I2.cjs');
|
|
|
16
16
|
var _chunkX432Y6RMcjs = require('./chunk-X432Y6RM.cjs');
|
|
17
17
|
require('./chunk-S5C3OZCO.cjs');
|
|
18
18
|
require('./chunk-4IYNDV3G.cjs');
|
|
19
|
+
require('./chunk-NTPX5GXI.cjs');
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
var
|
|
22
|
-
require('./chunk-NTPX5GXI.cjs');
|
|
23
|
-
require('./chunk-GI3MMBP3.cjs');
|
|
22
|
+
var _chunkSQ7YHWEPcjs = require('./chunk-SQ7YHWEP.cjs');
|
|
24
23
|
require('./chunk-UJ7AXHRZ.cjs');
|
|
25
24
|
|
|
26
25
|
|
|
@@ -416,7 +415,7 @@ function FilePlayer({
|
|
|
416
415
|
const hover = useHoverPlayback(mediaRef, sound, { playOnHover, playWhenHovered, mutedIntent });
|
|
417
416
|
const health = usePlaybackHealth(mediaRef, url, !chromeless);
|
|
418
417
|
useIosNativeVideoFullscreen(mediaRef);
|
|
419
|
-
const captions =
|
|
418
|
+
const captions = _chunkSQ7YHWEPcjs.useAuthedAssetSrc.call(void 0, captionsUrl, "text/vtt, */*");
|
|
420
419
|
const player = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
421
420
|
_muxplayerreact2.default,
|
|
422
421
|
{
|
package/package.json
CHANGED
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
* "N replies" badge; the ticket feed passes `<TicketAttachmentsList>`.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import {
|
|
22
|
+
import type { ReactNode } from 'react';
|
|
23
23
|
import Image from '../../embed-shims/next-image';
|
|
24
|
+
import { useAuthedImageSrc } from '../../hooks/use-authed-image-src';
|
|
25
|
+
import { useImageFallback } from '../../hooks/use-image-fallback';
|
|
24
26
|
import { AVATAR_SIZE_PX } from '../../styles/component-sizes';
|
|
25
27
|
import { cn } from '../../utils/cn';
|
|
26
28
|
import { personInitials } from '../../utils/format';
|
|
@@ -84,11 +86,10 @@ function ChatMessageRowLoaded(props: ChatMessageRowProps) {
|
|
|
84
86
|
const proxiedAvatar = useProxiedImageUrl(avatarUrl ?? '');
|
|
85
87
|
const resolvedAvatar = proxiedAvatar || avatarUrl || undefined;
|
|
86
88
|
// Fall back to the initials box if the avatar load FAILS (transient CDN 429,
|
|
87
|
-
// ad-blocker, dead URL) instead of showing a broken image.
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
const
|
|
91
|
-
const src = resolvedAvatar && resolvedAvatar !== failedSrc ? resolvedAvatar : undefined;
|
|
89
|
+
// ad-blocker, dead URL) instead of showing a broken image.
|
|
90
|
+
// Keyed on the store's answer, not the URL: this row keeps holding the avatar's store entry, so where it needs the
|
|
91
|
+
// bearer, a fetch that got no answer, or a 401 the session can refresh past, is retried and the picture comes back.
|
|
92
|
+
const { src, onError } = useImageFallback(useAuthedImageSrc(resolvedAvatar));
|
|
92
93
|
const hasBody = typeof body === 'string' ? body.trim().length > 0 : body != null && body !== false;
|
|
93
94
|
|
|
94
95
|
return (
|
|
@@ -103,7 +104,7 @@ function ChatMessageRowLoaded(props: ChatMessageRowProps) {
|
|
|
103
104
|
className={cn(AVATAR_BOX_CLASS, 'object-cover')}
|
|
104
105
|
width={AVATAR_SIZE_PX.md}
|
|
105
106
|
height={AVATAR_SIZE_PX.md}
|
|
106
|
-
onError={
|
|
107
|
+
onError={onError}
|
|
107
108
|
/>
|
|
108
109
|
) : (
|
|
109
110
|
<div
|
|
@@ -8,42 +8,22 @@
|
|
|
8
8
|
* ternary (they drift: the pre-hook BlogCard chain couldn't recover from a
|
|
9
9
|
* FAILING placeholder, EntityPortraitCard duplicated the same logic with
|
|
10
10
|
* different state). Cards wire `src` + `onError` and render their own
|
|
11
|
-
* empty-state when `src` is null.
|
|
12
|
-
*
|
|
13
|
-
* Implementation note: state is the SET of candidate URLs that failed, and
|
|
14
|
-
* `src` is derived — so a prop change (new cover URL) re-resolves instantly
|
|
15
|
-
* with no reset effect, and a URL that failed once isn't retried in a loop.
|
|
11
|
+
* empty-state when `src` is null. The chain itself is `useImageFallback`.
|
|
16
12
|
*/
|
|
17
13
|
|
|
18
|
-
import {
|
|
14
|
+
import type { SyntheticEvent } from 'react';
|
|
15
|
+
import { type ImageFallback, useImageFallback } from '../../../hooks/use-image-fallback';
|
|
19
16
|
|
|
20
|
-
export
|
|
21
|
-
/** Resolved source: first non-failed of [imageUrl, placeholderUrl], else null. */
|
|
22
|
-
src: string | null;
|
|
23
|
-
/** Wire to the media element's `onError`. */
|
|
24
|
-
onError: () => void;
|
|
25
|
-
}
|
|
17
|
+
export type CoverImageFallback = ImageFallback;
|
|
26
18
|
|
|
27
19
|
export function useCoverImageFallback(imageUrl?: string | null, placeholderUrl?: string | null): CoverImageFallback {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const src =
|
|
31
|
-
imageUrl && !failed.has(imageUrl)
|
|
32
|
-
? imageUrl
|
|
33
|
-
: placeholderUrl && !failed.has(placeholderUrl)
|
|
34
|
-
? placeholderUrl
|
|
35
|
-
: null;
|
|
36
|
-
|
|
37
|
-
const onError = useCallback(() => {
|
|
38
|
-
if (!src) return;
|
|
39
|
-
setFailed(prev => new Set(prev).add(src));
|
|
40
|
-
}, [src]);
|
|
41
|
-
|
|
42
|
-
return { src, onError };
|
|
20
|
+
return useImageFallback(imageUrl, placeholderUrl);
|
|
43
21
|
}
|
|
44
22
|
|
|
45
23
|
/** Fallback for cards with NO placeholder chain (compact/sm image slots):
|
|
46
|
-
* a broken cover simply disappears, leaving the slot's background.
|
|
24
|
+
* a broken cover simply disappears, leaving the slot's background.
|
|
25
|
+
* Legacy: a DOM write in `onError`, which the next src does not undo. New
|
|
26
|
+
* code renders nothing when `useImageFallback(url).src` is null instead. */
|
|
47
27
|
export const hideOnError = (e: SyntheticEvent<HTMLImageElement>) => {
|
|
48
28
|
const img = e.currentTarget;
|
|
49
29
|
img.style.display = 'none';
|