@mountaya/studio-react 0.0.0-stage → 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/CHANGELOG.md +54 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1087 -2
- package/THIRD-PARTY-NOTICES.txt +149 -0
- package/dist/AgentMarkdown-RNLATZYN.cjs +213 -0
- package/dist/AgentMarkdown-RNLATZYN.cjs.map +1 -0
- package/dist/AgentMarkdown-TMN6E2XC.js +206 -0
- package/dist/AgentMarkdown-TMN6E2XC.js.map +1 -0
- package/dist/ContextMenuPopup-EOYN42YZ.js +468 -0
- package/dist/ContextMenuPopup-EOYN42YZ.js.map +1 -0
- package/dist/ContextMenuPopup-VQLAYYYZ.cjs +470 -0
- package/dist/ContextMenuPopup-VQLAYYYZ.cjs.map +1 -0
- package/dist/CopilotPanel-CCLEYZUN.js +29 -0
- package/dist/CopilotPanel-CCLEYZUN.js.map +1 -0
- package/dist/CopilotPanel-LYPMTDKX.cjs +38 -0
- package/dist/CopilotPanel-LYPMTDKX.cjs.map +1 -0
- package/dist/DateTimePickerField-FZRKJ2SU.js +53 -0
- package/dist/DateTimePickerField-FZRKJ2SU.js.map +1 -0
- package/dist/DateTimePickerField-NB456C6F.cjs +55 -0
- package/dist/DateTimePickerField-NB456C6F.cjs.map +1 -0
- package/dist/DirectionsModal-4Y346QFU.cjs +291 -0
- package/dist/DirectionsModal-4Y346QFU.cjs.map +1 -0
- package/dist/DirectionsModal-DRPO2654.js +289 -0
- package/dist/DirectionsModal-DRPO2654.js.map +1 -0
- package/dist/DuplicateItineraryModal-2QGWI7E7.js +321 -0
- package/dist/DuplicateItineraryModal-2QGWI7E7.js.map +1 -0
- package/dist/DuplicateItineraryModal-WFGMU6JL.cjs +323 -0
- package/dist/DuplicateItineraryModal-WFGMU6JL.cjs.map +1 -0
- package/dist/EditCollectionModal-4QYP53SX.js +90 -0
- package/dist/EditCollectionModal-4QYP53SX.js.map +1 -0
- package/dist/EditCollectionModal-T2TMAO53.cjs +92 -0
- package/dist/EditCollectionModal-T2TMAO53.cjs.map +1 -0
- package/dist/EmbedSnippetCode-NMFCQ7TF.cjs +62 -0
- package/dist/EmbedSnippetCode-NMFCQ7TF.cjs.map +1 -0
- package/dist/EmbedSnippetCode-TGBSWDMD.js +60 -0
- package/dist/EmbedSnippetCode-TGBSWDMD.js.map +1 -0
- package/dist/EmbedTablePreview-3RRHM63Q.js +72 -0
- package/dist/EmbedTablePreview-3RRHM63Q.js.map +1 -0
- package/dist/EmbedTablePreview-Z3W62MRV.cjs +74 -0
- package/dist/EmbedTablePreview-Z3W62MRV.cjs.map +1 -0
- package/dist/ExportModal-5NUZZPXN.cjs +267 -0
- package/dist/ExportModal-5NUZZPXN.cjs.map +1 -0
- package/dist/ExportModal-H7OYP6CK.js +265 -0
- package/dist/ExportModal-H7OYP6CK.js.map +1 -0
- package/dist/FileDropzone-GKPMAZF5.cjs +41 -0
- package/dist/FileDropzone-GKPMAZF5.cjs.map +1 -0
- package/dist/FileDropzone-GRXY4FXR.js +39 -0
- package/dist/FileDropzone-GRXY4FXR.js.map +1 -0
- package/dist/LocationPermissionModal-AFHI5J4S.cjs +92 -0
- package/dist/LocationPermissionModal-AFHI5J4S.cjs.map +1 -0
- package/dist/LocationPermissionModal-MURJ5DDB.js +90 -0
- package/dist/LocationPermissionModal-MURJ5DDB.js.map +1 -0
- package/dist/ManageCollectionsModal-E3IUHUTO.cjs +402 -0
- package/dist/ManageCollectionsModal-E3IUHUTO.cjs.map +1 -0
- package/dist/ManageCollectionsModal-FIHSZXSR.js +400 -0
- package/dist/ManageCollectionsModal-FIHSZXSR.js.map +1 -0
- package/dist/NewCollectionModal-7TBWVA3G.js +75 -0
- package/dist/NewCollectionModal-7TBWVA3G.js.map +1 -0
- package/dist/NewCollectionModal-QFQYCKCG.cjs +77 -0
- package/dist/NewCollectionModal-QFQYCKCG.cjs.map +1 -0
- package/dist/RoadAccessModal-DNUJV5PC.js +57 -0
- package/dist/RoadAccessModal-DNUJV5PC.js.map +1 -0
- package/dist/RoadAccessModal-WLLL2ASZ.cjs +59 -0
- package/dist/RoadAccessModal-WLLL2ASZ.cjs.map +1 -0
- package/dist/SegmentColorPicker-7Y4JEPFC.cjs +81 -0
- package/dist/SegmentColorPicker-7Y4JEPFC.cjs.map +1 -0
- package/dist/SegmentColorPicker-UNLPITUA.js +79 -0
- package/dist/SegmentColorPicker-UNLPITUA.js.map +1 -0
- package/dist/SegmentGroupModal-F54FZUR2.cjs +32 -0
- package/dist/SegmentGroupModal-F54FZUR2.cjs.map +1 -0
- package/dist/SegmentGroupModal-KBU7OPNJ.js +23 -0
- package/dist/SegmentGroupModal-KBU7OPNJ.js.map +1 -0
- package/dist/ShareCollectionModal-TWYE6JJ4.cjs +82 -0
- package/dist/ShareCollectionModal-TWYE6JJ4.cjs.map +1 -0
- package/dist/ShareCollectionModal-VXSRHX4S.js +80 -0
- package/dist/ShareCollectionModal-VXSRHX4S.js.map +1 -0
- package/dist/ShareModal-HLYNE7OL.js +115 -0
- package/dist/ShareModal-HLYNE7OL.js.map +1 -0
- package/dist/ShareModal-WISND27S.cjs +117 -0
- package/dist/ShareModal-WISND27S.cjs.map +1 -0
- package/dist/VideoExportWizard-BSDWA3B5.js +44 -0
- package/dist/VideoExportWizard-BSDWA3B5.js.map +1 -0
- package/dist/VideoExportWizard-UOHR4MNS.cjs +53 -0
- package/dist/VideoExportWizard-UOHR4MNS.cjs.map +1 -0
- package/dist/WaypointDetailsModal-LK5LBK6S.js +270 -0
- package/dist/WaypointDetailsModal-LK5LBK6S.js.map +1 -0
- package/dist/WaypointDetailsModal-MEMOLLUY.cjs +272 -0
- package/dist/WaypointDetailsModal-MEMOLLUY.cjs.map +1 -0
- package/dist/WaypointWorkbench-DCCLBURG.cjs +1204 -0
- package/dist/WaypointWorkbench-DCCLBURG.cjs.map +1 -0
- package/dist/WaypointWorkbench-NRCLGU23.js +1202 -0
- package/dist/WaypointWorkbench-NRCLGU23.js.map +1 -0
- package/dist/chunk-22BNE3YV.js +13 -0
- package/dist/chunk-22BNE3YV.js.map +1 -0
- package/dist/chunk-24RNBTO2.cjs +154 -0
- package/dist/chunk-24RNBTO2.cjs.map +1 -0
- package/dist/chunk-2DDL2LIJ.cjs +65 -0
- package/dist/chunk-2DDL2LIJ.cjs.map +1 -0
- package/dist/chunk-2GAMKPS2.cjs +16 -0
- package/dist/chunk-2GAMKPS2.cjs.map +1 -0
- package/dist/chunk-2K4HCCZJ.cjs +51 -0
- package/dist/chunk-2K4HCCZJ.cjs.map +1 -0
- package/dist/chunk-2MHWH3TS.cjs +119 -0
- package/dist/chunk-2MHWH3TS.cjs.map +1 -0
- package/dist/chunk-2MQBPZNR.cjs +12 -0
- package/dist/chunk-2MQBPZNR.cjs.map +1 -0
- package/dist/chunk-2QSPCXLM.js +84 -0
- package/dist/chunk-2QSPCXLM.js.map +1 -0
- package/dist/chunk-32WRG44G.js +66 -0
- package/dist/chunk-32WRG44G.js.map +1 -0
- package/dist/chunk-32XMYLEB.js +9 -0
- package/dist/chunk-32XMYLEB.js.map +1 -0
- package/dist/chunk-3BEHHSVE.cjs +790 -0
- package/dist/chunk-3BEHHSVE.cjs.map +1 -0
- package/dist/chunk-3HF2XZKQ.js +8 -0
- package/dist/chunk-3HF2XZKQ.js.map +1 -0
- package/dist/chunk-3K2NX5FH.js +51 -0
- package/dist/chunk-3K2NX5FH.js.map +1 -0
- package/dist/chunk-3Q23QKNI.cjs +26 -0
- package/dist/chunk-3Q23QKNI.cjs.map +1 -0
- package/dist/chunk-3TQV2M4C.cjs +16 -0
- package/dist/chunk-3TQV2M4C.cjs.map +1 -0
- package/dist/chunk-3XDKDTE6.js +16 -0
- package/dist/chunk-3XDKDTE6.js.map +1 -0
- package/dist/chunk-46EARJWC.js +288 -0
- package/dist/chunk-46EARJWC.js.map +1 -0
- package/dist/chunk-4DQOJIUV.js +96 -0
- package/dist/chunk-4DQOJIUV.js.map +1 -0
- package/dist/chunk-4T52NAVT.js +10 -0
- package/dist/chunk-4T52NAVT.js.map +1 -0
- package/dist/chunk-4TPRVQGY.js +12 -0
- package/dist/chunk-4TPRVQGY.js.map +1 -0
- package/dist/chunk-4TX5E63A.cjs +12 -0
- package/dist/chunk-4TX5E63A.cjs.map +1 -0
- package/dist/chunk-4VKJF24B.js +22 -0
- package/dist/chunk-4VKJF24B.js.map +1 -0
- package/dist/chunk-4Z734K3L.js +15 -0
- package/dist/chunk-4Z734K3L.js.map +1 -0
- package/dist/chunk-4ZRSEOZM.js +629 -0
- package/dist/chunk-4ZRSEOZM.js.map +1 -0
- package/dist/chunk-52T3VZR5.js +55 -0
- package/dist/chunk-52T3VZR5.js.map +1 -0
- package/dist/chunk-56DP2X7U.js +15 -0
- package/dist/chunk-56DP2X7U.js.map +1 -0
- package/dist/chunk-5AHT62LO.js +24 -0
- package/dist/chunk-5AHT62LO.js.map +1 -0
- package/dist/chunk-5BR4CTVV.cjs +17 -0
- package/dist/chunk-5BR4CTVV.cjs.map +1 -0
- package/dist/chunk-5CTZOFDV.cjs +17 -0
- package/dist/chunk-5CTZOFDV.cjs.map +1 -0
- package/dist/chunk-5F55MFIX.cjs +45 -0
- package/dist/chunk-5F55MFIX.cjs.map +1 -0
- package/dist/chunk-5FMQJ4A4.cjs +362 -0
- package/dist/chunk-5FMQJ4A4.cjs.map +1 -0
- package/dist/chunk-5PMEAMHS.js +82 -0
- package/dist/chunk-5PMEAMHS.js.map +1 -0
- package/dist/chunk-676DNRSN.js +85 -0
- package/dist/chunk-676DNRSN.js.map +1 -0
- package/dist/chunk-6H2F7JKL.js +179 -0
- package/dist/chunk-6H2F7JKL.js.map +1 -0
- package/dist/chunk-6HMRMON7.js +10 -0
- package/dist/chunk-6HMRMON7.js.map +1 -0
- package/dist/chunk-6NKPZ3LT.cjs +14 -0
- package/dist/chunk-6NKPZ3LT.cjs.map +1 -0
- package/dist/chunk-6TG2HZDG.js +75 -0
- package/dist/chunk-6TG2HZDG.js.map +1 -0
- package/dist/chunk-6WU7XEQA.cjs +103 -0
- package/dist/chunk-6WU7XEQA.cjs.map +1 -0
- package/dist/chunk-6YD325QI.cjs +90 -0
- package/dist/chunk-6YD325QI.cjs.map +1 -0
- package/dist/chunk-7B6TUEL5.js +20 -0
- package/dist/chunk-7B6TUEL5.js.map +1 -0
- package/dist/chunk-7KS5F27H.js +33 -0
- package/dist/chunk-7KS5F27H.js.map +1 -0
- package/dist/chunk-A2N6553V.cjs +295 -0
- package/dist/chunk-A2N6553V.cjs.map +1 -0
- package/dist/chunk-A66FJAVG.js +44 -0
- package/dist/chunk-A66FJAVG.js.map +1 -0
- package/dist/chunk-AF43JU4W.js +27 -0
- package/dist/chunk-AF43JU4W.js.map +1 -0
- package/dist/chunk-AHGHAWYR.js +99 -0
- package/dist/chunk-AHGHAWYR.js.map +1 -0
- package/dist/chunk-AKN5KIZT.js +1969 -0
- package/dist/chunk-AKN5KIZT.js.map +1 -0
- package/dist/chunk-ANTDR5MJ.cjs +12 -0
- package/dist/chunk-ANTDR5MJ.cjs.map +1 -0
- package/dist/chunk-AQ5JIIAE.js +26 -0
- package/dist/chunk-AQ5JIIAE.js.map +1 -0
- package/dist/chunk-ARHO5MLJ.js +10 -0
- package/dist/chunk-ARHO5MLJ.js.map +1 -0
- package/dist/chunk-BAYGKSWY.cjs +26 -0
- package/dist/chunk-BAYGKSWY.cjs.map +1 -0
- package/dist/chunk-BEJ5I724.js +8 -0
- package/dist/chunk-BEJ5I724.js.map +1 -0
- package/dist/chunk-BFNXXLVV.cjs +34 -0
- package/dist/chunk-BFNXXLVV.cjs.map +1 -0
- package/dist/chunk-BFQJDFGB.js +57 -0
- package/dist/chunk-BFQJDFGB.js.map +1 -0
- package/dist/chunk-CHEQJ6N7.cjs +2214 -0
- package/dist/chunk-CHEQJ6N7.cjs.map +1 -0
- package/dist/chunk-CJOJWZM7.js +92 -0
- package/dist/chunk-CJOJWZM7.js.map +1 -0
- package/dist/chunk-CJRSFC45.cjs +578 -0
- package/dist/chunk-CJRSFC45.cjs.map +1 -0
- package/dist/chunk-CWQ4WHPI.cjs +46 -0
- package/dist/chunk-CWQ4WHPI.cjs.map +1 -0
- package/dist/chunk-D3INXUFT.js +360 -0
- package/dist/chunk-D3INXUFT.js.map +1 -0
- package/dist/chunk-D6CDAYZ6.cjs +18 -0
- package/dist/chunk-D6CDAYZ6.cjs.map +1 -0
- package/dist/chunk-DDPXRXRD.cjs +23 -0
- package/dist/chunk-DDPXRXRD.cjs.map +1 -0
- package/dist/chunk-DUUPWSOZ.cjs +14 -0
- package/dist/chunk-DUUPWSOZ.cjs.map +1 -0
- package/dist/chunk-DVWYOHOB.cjs +43 -0
- package/dist/chunk-DVWYOHOB.cjs.map +1 -0
- package/dist/chunk-DZPHWBMC.cjs +11 -0
- package/dist/chunk-DZPHWBMC.cjs.map +1 -0
- package/dist/chunk-E26FROI3.js +68 -0
- package/dist/chunk-E26FROI3.js.map +1 -0
- package/dist/chunk-E7ZTDAQW.cjs +37 -0
- package/dist/chunk-E7ZTDAQW.cjs.map +1 -0
- package/dist/chunk-ECI4EKIV.cjs +94 -0
- package/dist/chunk-ECI4EKIV.cjs.map +1 -0
- package/dist/chunk-EN5RWYHP.cjs +28 -0
- package/dist/chunk-EN5RWYHP.cjs.map +1 -0
- package/dist/chunk-ET3UASEF.cjs +91 -0
- package/dist/chunk-ET3UASEF.cjs.map +1 -0
- package/dist/chunk-EW5SY246.cjs +97 -0
- package/dist/chunk-EW5SY246.cjs.map +1 -0
- package/dist/chunk-EWWHVV7R.cjs +18 -0
- package/dist/chunk-EWWHVV7R.cjs.map +1 -0
- package/dist/chunk-F2LZZC6X.js +90 -0
- package/dist/chunk-F2LZZC6X.js.map +1 -0
- package/dist/chunk-F6VFOI4U.cjs +12 -0
- package/dist/chunk-F6VFOI4U.cjs.map +1 -0
- package/dist/chunk-FGX3TEU4.cjs +12 -0
- package/dist/chunk-FGX3TEU4.cjs.map +1 -0
- package/dist/chunk-FK4F24KE.js +10 -0
- package/dist/chunk-FK4F24KE.js.map +1 -0
- package/dist/chunk-FLIGKB6K.js +313 -0
- package/dist/chunk-FLIGKB6K.js.map +1 -0
- package/dist/chunk-G2NDWNFB.cjs +185 -0
- package/dist/chunk-G2NDWNFB.cjs.map +1 -0
- package/dist/chunk-G2XORRLH.js +15 -0
- package/dist/chunk-G2XORRLH.js.map +1 -0
- package/dist/chunk-GIZN7NX5.cjs +25 -0
- package/dist/chunk-GIZN7NX5.cjs.map +1 -0
- package/dist/chunk-GM2BQ24D.js +47 -0
- package/dist/chunk-GM2BQ24D.js.map +1 -0
- package/dist/chunk-GMQJZ5N7.cjs +50 -0
- package/dist/chunk-GMQJZ5N7.cjs.map +1 -0
- package/dist/chunk-GT7RJOAA.cjs +315 -0
- package/dist/chunk-GT7RJOAA.cjs.map +1 -0
- package/dist/chunk-GWGUMPOL.js +9 -0
- package/dist/chunk-GWGUMPOL.js.map +1 -0
- package/dist/chunk-GWVKSSE3.cjs +154 -0
- package/dist/chunk-GWVKSSE3.cjs.map +1 -0
- package/dist/chunk-GY7UMPHT.cjs +99 -0
- package/dist/chunk-GY7UMPHT.cjs.map +1 -0
- package/dist/chunk-HMVBS5DU.js +150 -0
- package/dist/chunk-HMVBS5DU.js.map +1 -0
- package/dist/chunk-HXHA2C7C.js +169 -0
- package/dist/chunk-HXHA2C7C.js.map +1 -0
- package/dist/chunk-IHMOFX2A.js +208 -0
- package/dist/chunk-IHMOFX2A.js.map +1 -0
- package/dist/chunk-II6C3LU2.cjs +49 -0
- package/dist/chunk-II6C3LU2.cjs.map +1 -0
- package/dist/chunk-IOOAFCSR.cjs +58 -0
- package/dist/chunk-IOOAFCSR.cjs.map +1 -0
- package/dist/chunk-IQZSIOMM.js +10 -0
- package/dist/chunk-IQZSIOMM.js.map +1 -0
- package/dist/chunk-J2H3WIUM.cjs +12 -0
- package/dist/chunk-J2H3WIUM.cjs.map +1 -0
- package/dist/chunk-J62OBSUE.cjs +54 -0
- package/dist/chunk-J62OBSUE.cjs.map +1 -0
- package/dist/chunk-JFJVSJUX.cjs +16 -0
- package/dist/chunk-JFJVSJUX.cjs.map +1 -0
- package/dist/chunk-JI2M77Y7.cjs +68 -0
- package/dist/chunk-JI2M77Y7.cjs.map +1 -0
- package/dist/chunk-JLSOLL3C.js +31 -0
- package/dist/chunk-JLSOLL3C.js.map +1 -0
- package/dist/chunk-JRME3LCP.cjs +41 -0
- package/dist/chunk-JRME3LCP.cjs.map +1 -0
- package/dist/chunk-JUD3CWTI.cjs +2005 -0
- package/dist/chunk-JUD3CWTI.cjs.map +1 -0
- package/dist/chunk-JVFHF3LE.cjs +11 -0
- package/dist/chunk-JVFHF3LE.cjs.map +1 -0
- package/dist/chunk-JVS2WNKQ.js +26 -0
- package/dist/chunk-JVS2WNKQ.js.map +1 -0
- package/dist/chunk-JXAFIYLV.js +94 -0
- package/dist/chunk-JXAFIYLV.js.map +1 -0
- package/dist/chunk-K2E744ST.cjs +18 -0
- package/dist/chunk-K2E744ST.cjs.map +1 -0
- package/dist/chunk-K2ZEMBJ7.js +56 -0
- package/dist/chunk-K2ZEMBJ7.js.map +1 -0
- package/dist/chunk-KCXNMLKB.js +22 -0
- package/dist/chunk-KCXNMLKB.js.map +1 -0
- package/dist/chunk-KMMDPXY4.js +35 -0
- package/dist/chunk-KMMDPXY4.js.map +1 -0
- package/dist/chunk-KMSGFBAJ.cjs +78 -0
- package/dist/chunk-KMSGFBAJ.cjs.map +1 -0
- package/dist/chunk-KPD7K4XQ.cjs +11 -0
- package/dist/chunk-KPD7K4XQ.cjs.map +1 -0
- package/dist/chunk-KUD3B3BA.js +12 -0
- package/dist/chunk-KUD3B3BA.js.map +1 -0
- package/dist/chunk-L62LSMJ5.js +9 -0
- package/dist/chunk-L62LSMJ5.js.map +1 -0
- package/dist/chunk-LB57H6LF.cjs +261 -0
- package/dist/chunk-LB57H6LF.cjs.map +1 -0
- package/dist/chunk-LCPKNSC4.cjs +48 -0
- package/dist/chunk-LCPKNSC4.cjs.map +1 -0
- package/dist/chunk-LE3W2CSF.cjs +84 -0
- package/dist/chunk-LE3W2CSF.cjs.map +1 -0
- package/dist/chunk-LG736CNC.js +13 -0
- package/dist/chunk-LG736CNC.js.map +1 -0
- package/dist/chunk-LGNTAZ3L.cjs +33 -0
- package/dist/chunk-LGNTAZ3L.cjs.map +1 -0
- package/dist/chunk-LHXINV6N.cjs +47 -0
- package/dist/chunk-LHXINV6N.cjs.map +1 -0
- package/dist/chunk-LLZUTIQB.cjs +24 -0
- package/dist/chunk-LLZUTIQB.cjs.map +1 -0
- package/dist/chunk-LPGXRU7R.cjs +12 -0
- package/dist/chunk-LPGXRU7R.cjs.map +1 -0
- package/dist/chunk-MA2BBWF5.cjs +96 -0
- package/dist/chunk-MA2BBWF5.cjs.map +1 -0
- package/dist/chunk-MLGORMWF.js +23 -0
- package/dist/chunk-MLGORMWF.js.map +1 -0
- package/dist/chunk-MO7XCKLA.js +62 -0
- package/dist/chunk-MO7XCKLA.js.map +1 -0
- package/dist/chunk-N37UE6RQ.cjs +1797 -0
- package/dist/chunk-N37UE6RQ.cjs.map +1 -0
- package/dist/chunk-N6NWKUOR.cjs +60 -0
- package/dist/chunk-N6NWKUOR.cjs.map +1 -0
- package/dist/chunk-NI5CAMFC.js +568 -0
- package/dist/chunk-NI5CAMFC.js.map +1 -0
- package/dist/chunk-NNLCZGZK.js +21 -0
- package/dist/chunk-NNLCZGZK.js.map +1 -0
- package/dist/chunk-NWHFUVYX.js +97 -0
- package/dist/chunk-NWHFUVYX.js.map +1 -0
- package/dist/chunk-OMDB6ZB2.cjs +176 -0
- package/dist/chunk-OMDB6ZB2.cjs.map +1 -0
- package/dist/chunk-P5W4TRJO.cjs +33 -0
- package/dist/chunk-P5W4TRJO.cjs.map +1 -0
- package/dist/chunk-PADS6TDO.js +89 -0
- package/dist/chunk-PADS6TDO.js.map +1 -0
- package/dist/chunk-PFLNOHBT.js +92 -0
- package/dist/chunk-PFLNOHBT.js.map +1 -0
- package/dist/chunk-PTLYNDZS.cjs +13 -0
- package/dist/chunk-PTLYNDZS.cjs.map +1 -0
- package/dist/chunk-QC3X4DAW.cjs +71 -0
- package/dist/chunk-QC3X4DAW.cjs.map +1 -0
- package/dist/chunk-QPTICYGD.cjs +272 -0
- package/dist/chunk-QPTICYGD.cjs.map +1 -0
- package/dist/chunk-QZ7W2E4U.cjs +319 -0
- package/dist/chunk-QZ7W2E4U.cjs.map +1 -0
- package/dist/chunk-RJJPUPOY.cjs +97 -0
- package/dist/chunk-RJJPUPOY.cjs.map +1 -0
- package/dist/chunk-RRSMCCFS.js +43 -0
- package/dist/chunk-RRSMCCFS.js.map +1 -0
- package/dist/chunk-S6VCR6F5.js +91 -0
- package/dist/chunk-S6VCR6F5.js.map +1 -0
- package/dist/chunk-S7Y2GMYJ.cjs +89 -0
- package/dist/chunk-S7Y2GMYJ.cjs.map +1 -0
- package/dist/chunk-SIMEDLX3.cjs +645 -0
- package/dist/chunk-SIMEDLX3.cjs.map +1 -0
- package/dist/chunk-SQYF7HKF.cjs +59 -0
- package/dist/chunk-SQYF7HKF.cjs.map +1 -0
- package/dist/chunk-ST7BNVC2.cjs +13 -0
- package/dist/chunk-ST7BNVC2.cjs.map +1 -0
- package/dist/chunk-SZVRMMLS.js +16 -0
- package/dist/chunk-SZVRMMLS.js.map +1 -0
- package/dist/chunk-T27LICRD.js +2212 -0
- package/dist/chunk-T27LICRD.js.map +1 -0
- package/dist/chunk-TAU5HGJ3.cjs +11 -0
- package/dist/chunk-TAU5HGJ3.cjs.map +1 -0
- package/dist/chunk-TOM7TV5E.js +25 -0
- package/dist/chunk-TOM7TV5E.js.map +1 -0
- package/dist/chunk-TSRUDRT3.js +59 -0
- package/dist/chunk-TSRUDRT3.js.map +1 -0
- package/dist/chunk-U4FX33MW.js +257 -0
- package/dist/chunk-U4FX33MW.js.map +1 -0
- package/dist/chunk-UBOPWQWC.cjs +28 -0
- package/dist/chunk-UBOPWQWC.cjs.map +1 -0
- package/dist/chunk-UFE26GNF.js +42 -0
- package/dist/chunk-UFE26GNF.js.map +1 -0
- package/dist/chunk-UMQQVTEO.js +257 -0
- package/dist/chunk-UMQQVTEO.js.map +1 -0
- package/dist/chunk-UWY3SFAS.js +10 -0
- package/dist/chunk-UWY3SFAS.js.map +1 -0
- package/dist/chunk-V6EIIZPJ.js +57 -0
- package/dist/chunk-V6EIIZPJ.js.map +1 -0
- package/dist/chunk-V6G6W5CF.cjs +61 -0
- package/dist/chunk-V6G6W5CF.cjs.map +1 -0
- package/dist/chunk-VC4ZBWOK.js +152 -0
- package/dist/chunk-VC4ZBWOK.js.map +1 -0
- package/dist/chunk-VJRF6ILX.js +35 -0
- package/dist/chunk-VJRF6ILX.js.map +1 -0
- package/dist/chunk-VNSLCFO4.js +787 -0
- package/dist/chunk-VNSLCFO4.js.map +1 -0
- package/dist/chunk-W7GAP7ST.js +21 -0
- package/dist/chunk-W7GAP7ST.js.map +1 -0
- package/dist/chunk-WFUASJHS.js +64 -0
- package/dist/chunk-WFUASJHS.js.map +1 -0
- package/dist/chunk-WIKSIT3M.js +46 -0
- package/dist/chunk-WIKSIT3M.js.map +1 -0
- package/dist/chunk-WKLZLFLY.cjs +32 -0
- package/dist/chunk-WKLZLFLY.cjs.map +1 -0
- package/dist/chunk-WNB5HYON.cjs +10 -0
- package/dist/chunk-WNB5HYON.cjs.map +1 -0
- package/dist/chunk-WO5P2XBP.js +86 -0
- package/dist/chunk-WO5P2XBP.js.map +1 -0
- package/dist/chunk-WPYC4NGZ.cjs +46 -0
- package/dist/chunk-WPYC4NGZ.cjs.map +1 -0
- package/dist/chunk-WQRYZY67.cjs +89 -0
- package/dist/chunk-WQRYZY67.cjs.map +1 -0
- package/dist/chunk-WVCYVMJU.js +11 -0
- package/dist/chunk-WVCYVMJU.js.map +1 -0
- package/dist/chunk-WX25G2S3.js +116 -0
- package/dist/chunk-WX25G2S3.js.map +1 -0
- package/dist/chunk-X4FE7RRQ.js +23 -0
- package/dist/chunk-X4FE7RRQ.js.map +1 -0
- package/dist/chunk-X6EIJNOQ.cjs +67 -0
- package/dist/chunk-X6EIJNOQ.cjs.map +1 -0
- package/dist/chunk-XUBATJH6.js +1769 -0
- package/dist/chunk-XUBATJH6.js.map +1 -0
- package/dist/chunk-XUMREYMG.js +293 -0
- package/dist/chunk-XUMREYMG.js.map +1 -0
- package/dist/chunk-XYAJ2FS2.js +31 -0
- package/dist/chunk-XYAJ2FS2.js.map +1 -0
- package/dist/chunk-YKES5P4H.cjs +58 -0
- package/dist/chunk-YKES5P4H.cjs.map +1 -0
- package/dist/chunk-YYAQ75AV.cjs +216 -0
- package/dist/chunk-YYAQ75AV.cjs.map +1 -0
- package/dist/chunk-YZ3NJKVV.js +42 -0
- package/dist/chunk-YZ3NJKVV.js.map +1 -0
- package/dist/chunk-Z5ECTUMN.cjs +104 -0
- package/dist/chunk-Z5ECTUMN.cjs.map +1 -0
- package/dist/chunk-ZAKVHYDL.cjs +28 -0
- package/dist/chunk-ZAKVHYDL.cjs.map +1 -0
- package/dist/chunk-ZF34JXGU.js +39 -0
- package/dist/chunk-ZF34JXGU.js.map +1 -0
- package/dist/chunk-ZHGWDP2M.cjs +101 -0
- package/dist/chunk-ZHGWDP2M.cjs.map +1 -0
- package/dist/chunk-ZLHTQQLT.js +13 -0
- package/dist/chunk-ZLHTQQLT.js.map +1 -0
- package/dist/chunk-ZPAMY3IZ.cjs +25 -0
- package/dist/chunk-ZPAMY3IZ.cjs.map +1 -0
- package/dist/chunk-ZR63UB4V.js +42 -0
- package/dist/chunk-ZR63UB4V.js.map +1 -0
- package/dist/chunk-ZRCEB3KL.js +11 -0
- package/dist/chunk-ZRCEB3KL.js.map +1 -0
- package/dist/chunk-ZRGQNRQI.cjs +36 -0
- package/dist/chunk-ZRGQNRQI.cjs.map +1 -0
- package/dist/chunk-ZVY4IL7O.cjs +22 -0
- package/dist/chunk-ZVY4IL7O.cjs.map +1 -0
- package/dist/chunk-ZWIVKODQ.js +49 -0
- package/dist/chunk-ZWIVKODQ.js.map +1 -0
- package/dist/chunk-ZYF2HNMZ.js +10 -0
- package/dist/chunk-ZYF2HNMZ.js.map +1 -0
- package/dist/copilot/index.cjs +43 -0
- package/dist/copilot/index.cjs.map +1 -0
- package/dist/copilot/index.d.cts +66 -0
- package/dist/copilot/index.d.ts +66 -0
- package/dist/copilot/index.js +30 -0
- package/dist/copilot/index.js.map +1 -0
- package/dist/directionsPdf-GITP3SCP.cjs +274 -0
- package/dist/directionsPdf-GITP3SCP.cjs.map +1 -0
- package/dist/directionsPdf-TDKVUBCU.js +272 -0
- package/dist/directionsPdf-TDKVUBCU.js.map +1 -0
- package/dist/embed/index.cjs +1816 -0
- package/dist/embed/index.cjs.map +1 -0
- package/dist/embed/index.d.cts +300 -0
- package/dist/embed/index.d.ts +300 -0
- package/dist/embed/index.js +1809 -0
- package/dist/embed/index.js.map +1 -0
- package/dist/headless/index.cjs +408 -0
- package/dist/headless/index.cjs.map +1 -0
- package/dist/headless/index.d.cts +23 -0
- package/dist/headless/index.d.ts +23 -0
- package/dist/headless/index.js +31 -0
- package/dist/headless/index.js.map +1 -0
- package/dist/hostRegistry-BTG-KkRY.d.cts +115 -0
- package/dist/hostRegistry-BTG-KkRY.d.ts +115 -0
- package/dist/import/index.cjs +433 -0
- package/dist/import/index.cjs.map +1 -0
- package/dist/import/index.d.cts +169 -0
- package/dist/import/index.d.ts +169 -0
- package/dist/import/index.js +421 -0
- package/dist/import/index.js.map +1 -0
- package/dist/index-CELBpE13.d.cts +4198 -0
- package/dist/index-nqc3A-ty.d.ts +4198 -0
- package/dist/index.cjs +10597 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4949 -0
- package/dist/index.d.ts +4949 -0
- package/dist/index.js +9907 -0
- package/dist/index.js.map +1 -0
- package/dist/map/index.cjs +122 -0
- package/dist/map/index.cjs.map +1 -0
- package/dist/map/index.d.cts +988 -0
- package/dist/map/index.d.ts +988 -0
- package/dist/map/index.js +25 -0
- package/dist/map/index.js.map +1 -0
- package/dist/routingGuidePictures-CxgXiuNd.d.cts +22 -0
- package/dist/routingGuidePictures-CxgXiuNd.d.ts +22 -0
- package/dist/studioStrings-lNvOeC1g.d.cts +72 -0
- package/dist/studioStrings-lNvOeC1g.d.ts +72 -0
- package/dist/styles.css +14677 -0
- package/dist/testing/index.cjs +357 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +319 -0
- package/dist/testing/index.d.ts +319 -0
- package/dist/testing/index.js +344 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/video/index.cjs +53 -0
- package/dist/video/index.cjs.map +1 -0
- package/dist/video/index.d.cts +127 -0
- package/dist/video/index.d.ts +127 -0
- package/dist/video/index.js +44 -0
- package/dist/video/index.js.map +1 -0
- package/package.json +227 -4
- package/src/agent/components/ActivityRow.tsx +226 -0
- package/src/agent/components/AgentEntityIndicator.tsx +67 -0
- package/src/agent/components/AgentMarkdown.tsx +530 -0
- package/src/agent/components/ChatComposer.tsx +161 -0
- package/src/agent/components/ChatTranscript.tsx +1358 -0
- package/src/agent/components/CopilotPanel.tsx +415 -0
- package/src/agent/components/CopilotStates.tsx +238 -0
- package/src/agent/components/CopilotTranscript.tsx +191 -0
- package/src/agent/components/MessageFeedback.tsx +100 -0
- package/src/agent/hooks/useAgentChatTransport.ts +61 -0
- package/src/agent/hooks/useAgentErrorCopy.ts +27 -0
- package/src/agent/hooks/useCopilotOpen.ts +68 -0
- package/src/agent/providers/AgentThreadsProvider.tsx +360 -0
- package/src/agent/providers/PromptPanelConversation.tsx +135 -0
- package/src/agent/rules/drawnNode.ts +24 -0
- package/src/alerts/components/MapAlerts.tsx +127 -0
- package/src/cache/hooks/useStudioCache.ts +40 -0
- package/src/cache/rules/studioCache.ts +145 -0
- package/src/collab/components/PeerEntityIndicator.tsx +150 -0
- package/src/collab/components/PresenceRoster.tsx +113 -0
- package/src/collab/components/peerLock.tsx +59 -0
- package/src/collab/hooks/useCollabOrganizationId.ts +24 -0
- package/src/collab/hooks/usePeerLockLabel.ts +41 -0
- package/src/collections/components/CollectionFormModal.tsx +280 -0
- package/src/collections/components/CollectionMultiSelect.tsx +640 -0
- package/src/collections/components/EditCollectionModal.tsx +114 -0
- package/src/collections/components/ManageCollectionsModal.tsx +692 -0
- package/src/collections/components/NewCollectionModal.tsx +87 -0
- package/src/collections/components/ShareCollectionModal.tsx +150 -0
- package/src/collections/hooks/useEntityCollections.ts +126 -0
- package/src/collections/hooks/useEveryPage.ts +33 -0
- package/src/controls/components/MapControlTooltip.tsx +84 -0
- package/src/controls/components/PoiOverlayMenu.tsx +342 -0
- package/src/controls/components/StudioControls.tsx +278 -0
- package/src/controls/rules/constants.ts +34 -0
- package/src/copilot/hooks/useStudioCopilotInset.ts +39 -0
- package/src/copilot/index.ts +29 -0
- package/src/directions/components/DirectionsModal.tsx +447 -0
- package/src/directions/components/directionsPdf.tsx +557 -0
- package/src/embed/components/DefaultViewControl.tsx +159 -0
- package/src/embed/components/EmbedBaseMapPicker.tsx +107 -0
- package/src/embed/components/EmbedCodeSection.tsx +329 -0
- package/src/embed/components/EmbedColumnsSection.tsx +167 -0
- package/src/embed/components/EmbedConfigForm.tsx +239 -0
- package/src/embed/components/EmbedElementSwitcher.tsx +87 -0
- package/src/embed/components/EmbedFieldControl.tsx +488 -0
- package/src/embed/components/EmbedGeneralSection.tsx +279 -0
- package/src/embed/components/EmbedKeyPanel.tsx +138 -0
- package/src/embed/components/EmbedSnippetCode.tsx +154 -0
- package/src/embed/components/EmbedStage.tsx +505 -0
- package/src/embed/components/EmbedTablePreview.tsx +134 -0
- package/src/embed/components/EmbedThemePicker.tsx +74 -0
- package/src/embed/components/EmbedTintPicker.tsx +76 -0
- package/src/embed/components/EmbedWizard.tsx +1031 -0
- package/src/embed/hooks/useEmbedCode.ts +170 -0
- package/src/embed/hooks/useEmbedCollectionItineraries.ts +42 -0
- package/src/embed/hooks/useEmbedLayerOptions.ts +75 -0
- package/src/embed/hooks/useEmbedPreviewCamera.ts +169 -0
- package/src/embed/index.ts +48 -0
- package/src/fullscreen/components/FullscreenHeader.tsx +77 -0
- package/src/fullscreen/components/FullscreenModal.tsx +80 -0
- package/src/fullscreen/components/WizardLayout.tsx +129 -0
- package/src/guards/components/AgentDrivingGuard.tsx +59 -0
- package/src/guards/components/UnsavedEditsGuard.tsx +210 -0
- package/src/guards/hooks/useReportUnsavedForm.ts +34 -0
- package/src/guards/hooks/useUnsavedEditsGuard.ts +44 -0
- package/src/headless/hooks/useAgentDriving.ts +21 -0
- package/src/headless/hooks/useBeginSegmentEdit.ts +89 -0
- package/src/headless/hooks/useBeginWaypointEdit.ts +74 -0
- package/src/headless/hooks/useCapabilitySet.ts +65 -0
- package/src/headless/hooks/useCollabResources.ts +148 -0
- package/src/headless/hooks/useCollectionScope.ts +37 -0
- package/src/headless/hooks/useEditActions.ts +250 -0
- package/src/headless/hooks/useEscapeKey.ts +43 -0
- package/src/headless/hooks/useInlineRename.ts +276 -0
- package/src/headless/hooks/useLiveAwareSegments.ts +88 -0
- package/src/headless/hooks/useLiveAwareWaypoints.ts +39 -0
- package/src/headless/hooks/useMapHoveredRow.ts +76 -0
- package/src/headless/hooks/usePlatformViewer.ts +452 -0
- package/src/headless/hooks/usePluginSlot.ts +235 -0
- package/src/headless/hooks/useRowEmphasis.ts +66 -0
- package/src/headless/hooks/useSegmentList.ts +428 -0
- package/src/headless/hooks/useSegmentRow.ts +366 -0
- package/src/headless/hooks/useSegmentRowActions.ts +267 -0
- package/src/headless/hooks/useShallowSelector.ts +145 -0
- package/src/headless/hooks/useStableMembers.ts +74 -0
- package/src/headless/hooks/useStoreSlice.ts +52 -0
- package/src/headless/hooks/useStreetViewCorridor.ts +120 -0
- package/src/headless/hooks/useStudioApi.ts +18 -0
- package/src/headless/hooks/useStudioDispatch.ts +181 -0
- package/src/headless/hooks/useStudioDispatchCount.ts +147 -0
- package/src/headless/hooks/useStudioDispatchUnsafe.ts +111 -0
- package/src/headless/hooks/useStudioEntitlement.ts +29 -0
- package/src/headless/hooks/useStudioFailureAlert.ts +67 -0
- package/src/headless/hooks/useStudioObserve.ts +38 -0
- package/src/headless/hooks/useStudioPreferences.ts +8 -0
- package/src/headless/hooks/useStudioSignedIn.ts +12 -0
- package/src/headless/hooks/useStudioStore.ts +72 -0
- package/src/headless/hooks/useStudioUnits.ts +23 -0
- package/src/headless/hooks/useStudioUrl.ts +24 -0
- package/src/headless/hooks/useStudioUserId.ts +5 -0
- package/src/headless/hooks/useStudioVerbHeld.ts +43 -0
- package/src/headless/hooks/useStudioViewer.ts +19 -0
- package/src/headless/hooks/useStudioViewerEntitlement.ts +40 -0
- package/src/headless/hooks/useStudioViewerItineraryLimit.ts +34 -0
- package/src/headless/hooks/useStudioViewerPreferences.ts +44 -0
- package/src/headless/hooks/useStudioViewerUnits.ts +50 -0
- package/src/headless/hooks/useStudioViewerUserId.ts +23 -0
- package/src/headless/hooks/useUiStore.ts +91 -0
- package/src/headless/hooks/useUiStoreShallow.ts +43 -0
- package/src/headless/hooks/useWaypointDetailsDialog.ts +52 -0
- package/src/headless/hooks/useWaypointList.ts +89 -0
- package/src/headless/hooks/useWaypointRow.ts +227 -0
- package/src/headless/hooks/useWaypointRowActions.ts +166 -0
- package/src/headless/index.ts +287 -0
- package/src/headless/providers/billingGate.tsx +129 -0
- package/src/headless/providers/copilot.tsx +155 -0
- package/src/headless/providers/mountayaStudio.tsx +126 -0
- package/src/headless/providers/navigationBlocker.tsx +91 -0
- package/src/headless/providers/notify.tsx +36 -0
- package/src/headless/providers/organizations.tsx +267 -0
- package/src/headless/providers/plugins.tsx +173 -0
- package/src/headless/providers/studio.tsx +1295 -0
- package/src/headless/providers/studioStrings.tsx +243 -0
- package/src/headless/rules/inputMethod.ts +19 -0
- package/src/hooks/useAgreementLimits.ts +165 -0
- package/src/hooks/useLayerCatalogOptions.ts +106 -0
- package/src/host/components/MountayaStudioHost.tsx +1018 -0
- package/src/host/hooks/useEmbeddedStudio.ts +24 -0
- package/src/host/hooks/useItineraryActivation.ts +126 -0
- package/src/host/hooks/useMemberGrants.ts +51 -0
- package/src/host/hooks/useStudioHostSurfaces.ts +100 -0
- package/src/host/hooks/useStudioPluginBinding.ts +133 -0
- package/src/host/hooks/useStudioSessionHeld.ts +111 -0
- package/src/host/hooks/useStudioToolBus.ts +127 -0
- package/src/host/hooks/useStudioToolContext.ts +175 -0
- package/src/host/providers/hostRegistry.tsx +144 -0
- package/src/host/providers/hostSurface.tsx +47 -0
- package/src/host/providers/hostVideo.tsx +73 -0
- package/src/import/components/DraftEntityList.tsx +298 -0
- package/src/import/components/FileDropInput.tsx +261 -0
- package/src/import/components/FileDropzone.tsx +97 -0
- package/src/import/components/ImportItineraryContent.tsx +133 -0
- package/src/import/components/ImportPreviewLegend.tsx +50 -0
- package/src/import/components/ImportPrimer.tsx +113 -0
- package/src/import/index.ts +32 -0
- package/src/import/providers/ImportRoutingGuideProvider.tsx +319 -0
- package/src/import/rules/routingGuidePictures.ts +20 -0
- package/src/index.ts +633 -0
- package/src/internal/components/Glyph.tsx +34 -0
- package/src/internal/components/MarkerGlyph.tsx +23 -0
- package/src/internal/components/MountayaMark.tsx +142 -0
- package/src/internal/hooks/useTextOverflow.ts +90 -0
- package/src/internal/providers/studioEditorRoot.tsx +42 -0
- package/src/internal/rules/editorRoot.ts +9 -0
- package/src/internal/rules/missingSeam.ts +32 -0
- package/src/itinerary/components/ActivityGuideModal.tsx +345 -0
- package/src/itinerary/components/ActivitySelect.tsx +204 -0
- package/src/itinerary/components/AddWaypointButton.tsx +151 -0
- package/src/itinerary/components/AscentInput.tsx +65 -0
- package/src/itinerary/components/Characteristics.tsx +129 -0
- package/src/itinerary/components/CursorReadout.tsx +66 -0
- package/src/itinerary/components/DistanceInput.tsx +67 -0
- package/src/itinerary/components/DraftProvenanceBanner.tsx +79 -0
- package/src/itinerary/components/DuplicateItineraryModal.tsx +341 -0
- package/src/itinerary/components/EditorSaveFooter.tsx +424 -0
- package/src/itinerary/components/ItineraryActionsMenu.tsx +655 -0
- package/src/itinerary/components/ItineraryForm.tsx +887 -0
- package/src/itinerary/components/ItineraryHeaderIdentity.tsx +121 -0
- package/src/itinerary/components/ItineraryHeaderMeta.tsx +68 -0
- package/src/itinerary/components/ItineraryHeaderTitle.tsx +88 -0
- package/src/itinerary/components/ItineraryIdentityFields.tsx +153 -0
- package/src/itinerary/components/ItineraryProfilePanel.tsx +619 -0
- package/src/itinerary/components/ItineraryProfileSheet.tsx +219 -0
- package/src/itinerary/components/ItinerarySubHeader.tsx +236 -0
- package/src/itinerary/components/PendingProfile.tsx +142 -0
- package/src/itinerary/components/PlaceCard.tsx +35 -0
- package/src/itinerary/components/PlaceMark.tsx +76 -0
- package/src/itinerary/components/ProfileAnalysisBars.tsx +84 -0
- package/src/itinerary/components/ProfileBar.tsx +215 -0
- package/src/itinerary/components/ProfileHeaderControls.tsx +116 -0
- package/src/itinerary/components/ProfileHeaderFigures.tsx +119 -0
- package/src/itinerary/components/ProfilePaceControl.tsx +97 -0
- package/src/itinerary/components/ProfileStat.tsx +76 -0
- package/src/itinerary/components/ProfileStatStrip.tsx +38 -0
- package/src/itinerary/components/RoadAccessModal.tsx +76 -0
- package/src/itinerary/components/RouteTypeControl.tsx +73 -0
- package/src/itinerary/components/SegmentGroupModal.tsx +311 -0
- package/src/itinerary/components/SegmentGroupRangePicker.tsx +228 -0
- package/src/itinerary/components/StagingCreateFooter.tsx +185 -0
- package/src/itinerary/components/StudioItineraryProfile.tsx +620 -0
- package/src/itinerary/components/SuggestForm.tsx +256 -0
- package/src/itinerary/components/SuggestFormActions.tsx +124 -0
- package/src/itinerary/components/SuggestionResultRow.tsx +98 -0
- package/src/itinerary/components/SuggestionResultsList.tsx +85 -0
- package/src/itinerary/components/WaypointAmenityPicker.tsx +105 -0
- package/src/itinerary/components/WaypointDetailFields.tsx +604 -0
- package/src/itinerary/components/WaypointDetailsModal.tsx +134 -0
- package/src/itinerary/components/WaypointDetailsRows.tsx +707 -0
- package/src/itinerary/components/WaypointDetailsView.tsx +389 -0
- package/src/itinerary/components/WaypointIconCircle.tsx +211 -0
- package/src/itinerary/components/WaypointIconPicker.tsx +82 -0
- package/src/itinerary/components/WaypointMarkers.tsx +293 -0
- package/src/itinerary/components/WaypointPreviewCard.tsx +56 -0
- package/src/itinerary/components/WaypointSectionNav.tsx +151 -0
- package/src/itinerary/components/WaypointSwitcher.tsx +143 -0
- package/src/itinerary/components/WaypointWorkbench.tsx +263 -0
- package/src/itinerary/hooks/useDuplicateDraft.ts +205 -0
- package/src/itinerary/hooks/useDuplicateSource.ts +69 -0
- package/src/itinerary/hooks/useFriendlyNameBanks.ts +26 -0
- package/src/itinerary/hooks/useItineraryEditable.ts +89 -0
- package/src/itinerary/hooks/useItineraryPace.ts +103 -0
- package/src/itinerary/hooks/useItinerarySubject.ts +117 -0
- package/src/itinerary/hooks/useOpenItineraryEditable.ts +39 -0
- package/src/itinerary/hooks/useProfileOverlay.tsx +61 -0
- package/src/itinerary/hooks/useProfileSeries.ts +95 -0
- package/src/itinerary/hooks/useProfileVisibility.ts +149 -0
- package/src/itinerary/hooks/useSeedDraftOrganization.ts +85 -0
- package/src/itinerary/hooks/useSegmentGroupSave.ts +143 -0
- package/src/itinerary/hooks/useStartFromSuggestion.ts +63 -0
- package/src/itinerary/hooks/useStudioItinerary.ts +35 -0
- package/src/itinerary/hooks/useSuggestionPin.ts +36 -0
- package/src/itinerary/hooks/useWaypointCardWords.ts +51 -0
- package/src/itinerary/hooks/useWaypointCreateFollowUp.ts +158 -0
- package/src/itinerary/hooks/useWaypointDetailsEditor.ts +280 -0
- package/src/itinerary/hooks/useWaypointSectionEntries.ts +114 -0
- package/src/itinerary/providers/ActivityGuideProvider.tsx +113 -0
- package/src/itinerary/providers/ItineraryViewProvider.tsx +146 -0
- package/src/itinerary/rules/amenityGlyphs.ts +25 -0
- package/src/itinerary/rules/cursorReadoutData.ts +34 -0
- package/src/itinerary/rules/profileCursor.ts +11 -0
- package/src/itinerary/rules/profileModel.ts +98 -0
- package/src/itinerary/rules/shownFocus.ts +11 -0
- package/src/itinerary/rules/waypointGlyphs.ts +42 -0
- package/src/itinerary/stores/profileHover.ts +54 -0
- package/src/lists/components/AddSegmentButton.tsx +240 -0
- package/src/lists/components/EditActions.tsx +153 -0
- package/src/lists/components/EditorListSection.tsx +117 -0
- package/src/lists/components/EditorSegmentRow.tsx +458 -0
- package/src/lists/components/ItineraryAddSegmentButton.tsx +66 -0
- package/src/lists/components/ItinerarySegmentList.tsx +301 -0
- package/src/lists/components/ItineraryWaypointList.tsx +257 -0
- package/src/lists/components/SegmentList.tsx +549 -0
- package/src/lists/components/SegmentSeam.tsx +292 -0
- package/src/lists/components/WaypointList.tsx +232 -0
- package/src/map/components/ContextMenuPopup.tsx +913 -0
- package/src/map/components/MapAnchoredPopup.tsx +284 -0
- package/src/map/components/SegmentViaPopup.tsx +133 -0
- package/src/map/hooks/useAccessRestrictions.ts +25 -0
- package/src/map/hooks/useEmbedConstraints.ts +359 -0
- package/src/map/hooks/useEmbedDisplaySeed.ts +61 -0
- package/src/map/hooks/useEmbedReady.ts +137 -0
- package/src/map/hooks/useHeldTileSources.ts +65 -0
- package/src/map/hooks/useSegmentColor.ts +24 -0
- package/src/map/hooks/useSpecificationLayers.ts +25 -0
- package/src/map/hooks/useStudioConstraints.ts +135 -0
- package/src/map/hooks/useStudioContextMenu.ts +34 -0
- package/src/map/hooks/useStudioContextMenuWaypoint.ts +119 -0
- package/src/map/hooks/useStudioEditCommitReporter.ts +56 -0
- package/src/map/hooks/useStudioEditEngine.ts +270 -0
- package/src/map/hooks/useStudioEnrichment.ts +117 -0
- package/src/map/hooks/useStudioItinerarySelection.ts +484 -0
- package/src/map/hooks/useStudioLayersScope.ts +34 -0
- package/src/map/hooks/useStudioMapBindings.ts +178 -0
- package/src/map/hooks/useStudioMapEditSeams.ts +161 -0
- package/src/map/hooks/useStudioMapSync.ts +127 -0
- package/src/map/hooks/useStudioOverlay.ts +75 -0
- package/src/map/hooks/useStudioOverlayWithdrawal.ts +52 -0
- package/src/map/hooks/useStudioOverlaysEntitled.ts +12 -0
- package/src/map/hooks/useStudioPeerDrafts.ts +126 -0
- package/src/map/hooks/useStudioPoiLayers.ts +110 -0
- package/src/map/hooks/useStudioPreviewSync.ts +205 -0
- package/src/map/hooks/useStudioSegmentEditing.ts +239 -0
- package/src/map/hooks/useStudioSegmentViaPrompt.ts +38 -0
- package/src/map/hooks/useStudioSplitPicking.ts +411 -0
- package/src/map/hooks/useStudioSuggestionPicking.ts +178 -0
- package/src/map/hooks/useStudioTimestamp.ts +226 -0
- package/src/map/hooks/useStudioUrlState.ts +340 -0
- package/src/map/hooks/useStudioWaypointEditing.ts +251 -0
- package/src/map/hooks/useStudioZoneEditing.ts +260 -0
- package/src/map/hooks/useStudioZoneOriginPicking.ts +129 -0
- package/src/map/hooks/useStudioZoneSelection.ts +240 -0
- package/src/map/hooks/useTileLayers.ts +33 -0
- package/src/map/index.ts +67 -0
- package/src/map/rules/editKeyboard.ts +216 -0
- package/src/map/rules/editTooltip.ts +222 -0
- package/src/map/rules/nearerEscape.ts +107 -0
- package/src/map/rules/poiGlyphs.ts +40 -0
- package/src/modals/components/AppModal.tsx +280 -0
- package/src/modals/components/ConfirmModal.tsx +223 -0
- package/src/modals/components/ExportModal.tsx +538 -0
- package/src/modals/components/LocationPermissionModal.tsx +129 -0
- package/src/modals/components/ModalFooter.tsx +187 -0
- package/src/modals/hooks/useConfirmGate.tsx +209 -0
- package/src/modals/hooks/useDiscardGuard.tsx +168 -0
- package/src/panels/components/EditShortcutHint.tsx +115 -0
- package/src/panels/components/FloatingOverlay.tsx +243 -0
- package/src/panels/components/GlyphPickerGrid.tsx +84 -0
- package/src/panels/components/PanelRouter.tsx +133 -0
- package/src/panels/components/PickerCard.tsx +108 -0
- package/src/panels/components/RadioOptionCard.tsx +116 -0
- package/src/panels/components/SidenavContentBody.tsx +56 -0
- package/src/panels/components/SidenavContentFooter.tsx +27 -0
- package/src/panels/components/SidenavContentHeader.tsx +172 -0
- package/src/panels/components/SidenavFormActions.tsx +96 -0
- package/src/panels/components/StudioFormStack.tsx +44 -0
- package/src/panels/components/StudioHeader.tsx +117 -0
- package/src/panels/components/StudioLayersPanel.tsx +909 -0
- package/src/panels/components/StudioPreferencesPanel.tsx +199 -0
- package/src/panels/rules/studioHeader.ts +68 -0
- package/src/plugins/components/PluginBoundary.tsx +62 -0
- package/src/plugins/components/PluginContextMenuActions.tsx +73 -0
- package/src/plugins/components/PluginControls.tsx +101 -0
- package/src/plugins/components/PluginHeldView.tsx +77 -0
- package/src/plugins/components/PluginMenuItems.tsx +63 -0
- package/src/plugins/components/PluginProfileHeader.tsx +71 -0
- package/src/plugins/components/PluginProfilePlot.tsx +134 -0
- package/src/plugins/components/PluginSlotItems.tsx +55 -0
- package/src/primitives/components/ActivityIcon.tsx +106 -0
- package/src/primitives/components/AllowlistField.tsx +508 -0
- package/src/primitives/components/CopyIconButton.tsx +80 -0
- package/src/primitives/components/DateTimeInput.tsx +133 -0
- package/src/primitives/components/DateTimePickerField.tsx +101 -0
- package/src/primitives/components/DescriptiveMenuItem.tsx +80 -0
- package/src/primitives/components/DialogSubject.tsx +102 -0
- package/src/primitives/components/DisabledMenuItem.tsx +45 -0
- package/src/primitives/components/DisabledReason.tsx +34 -0
- package/src/primitives/components/EmptyState.tsx +186 -0
- package/src/primitives/components/ErrorAlert.tsx +35 -0
- package/src/primitives/components/ErrorBoundary.tsx +55 -0
- package/src/primitives/components/FieldLabel.tsx +34 -0
- package/src/primitives/components/FormErrorAlert.tsx +33 -0
- package/src/primitives/components/GroupLabelledBy.tsx +31 -0
- package/src/primitives/components/LanguageSelect.tsx +139 -0
- package/src/primitives/components/ListSkeleton.tsx +64 -0
- package/src/primitives/components/MarqueeText.tsx +61 -0
- package/src/primitives/components/OrganizationScopeItem.tsx +146 -0
- package/src/primitives/components/OrganizationSelect.tsx +149 -0
- package/src/primitives/components/PointField.tsx +75 -0
- package/src/primitives/components/PrivacyControl.tsx +127 -0
- package/src/primitives/components/RenameInput.tsx +159 -0
- package/src/primitives/components/RequiredLabelWithHelp.tsx +76 -0
- package/src/primitives/components/SegmentIcon.tsx +43 -0
- package/src/primitives/components/SegmentIconLabel.tsx +37 -0
- package/src/primitives/components/SpeedInput.tsx +222 -0
- package/src/primitives/components/StudioSectionBoundary.tsx +56 -0
- package/src/primitives/components/StudioSegmentedControl.tsx +23 -0
- package/src/primitives/components/UnitPickerField.tsx +62 -0
- package/src/primitives/components/UnitPickerGrid.tsx +71 -0
- package/src/primitives/components/WarningAlert.tsx +34 -0
- package/src/primitives/hooks/useCompactLayout.ts +30 -0
- package/src/primitives/hooks/useSpeedControlLabel.ts +28 -0
- package/src/primitives/rules/activityBadge.ts +87 -0
- package/src/publication/components/PublicationBadge.tsx +42 -0
- package/src/publication/components/PublicationDot.tsx +31 -0
- package/src/publication/components/PublicationNotice.tsx +115 -0
- package/src/publication/components/PublicationSettledPill.tsx +43 -0
- package/src/publication/components/PublicationStatus.tsx +52 -0
- package/src/publication/components/UnpublishedPanel.tsx +133 -0
- package/src/publication/hooks/usePublicationHint.ts +235 -0
- package/src/publication/hooks/usePublishAct.ts +101 -0
- package/src/publication/hooks/usePublishItinerary.ts +27 -0
- package/src/publication/hooks/usePublishZone.ts +27 -0
- package/src/publication/hooks/usePublishableScope.ts +23 -0
- package/src/publication/hooks/usePublishedItinerary.ts +83 -0
- package/src/rows/components/ReadOnlySegmentRow.tsx +155 -0
- package/src/rows/components/RouteMetricLine.tsx +90 -0
- package/src/rows/components/RowMetadata.tsx +92 -0
- package/src/rows/components/SegmentRow.tsx +381 -0
- package/src/rows/components/SegmentRowActions.tsx +187 -0
- package/src/rows/components/SegmentRowBody.tsx +197 -0
- package/src/rows/components/StudioToggleRow.tsx +71 -0
- package/src/rows/components/SuggestionList.tsx +100 -0
- package/src/rows/components/SuggestionRowLayout.tsx +164 -0
- package/src/rows/components/WaypointRow.tsx +175 -0
- package/src/rows/components/WaypointRowLayout.tsx +278 -0
- package/src/rows/components/lockChrome.tsx +106 -0
- package/src/rules/menuActions.ts +149 -0
- package/src/rules/sizing.ts +127 -0
- package/src/rules/studioConfig.ts +719 -0
- package/src/search/components/CategoryTabs.tsx +136 -0
- package/src/search/components/ResultRow.tsx +242 -0
- package/src/search/components/ResultsList.tsx +182 -0
- package/src/search/components/SearchInput.tsx +100 -0
- package/src/search/components/SearchTab.tsx +614 -0
- package/src/sections/components/RailSwitcher.tsx +179 -0
- package/src/sections/components/SectionCard.tsx +48 -0
- package/src/sections/components/SectionHead.tsx +42 -0
- package/src/sections/components/SectionTabs.tsx +231 -0
- package/src/segments/components/SegmentColorCircle.tsx +118 -0
- package/src/segments/components/SegmentColorPicker.tsx +134 -0
- package/src/segments/components/SegmentModeControl.tsx +118 -0
- package/src/segments/components/SegmentRowMenu.tsx +449 -0
- package/src/segments/components/SegmentRowPopover.tsx +163 -0
- package/src/segments/components/SegmentSelect.tsx +116 -0
- package/src/segments/components/SegmentSpeedControl.tsx +299 -0
- package/src/share/components/ShareLinkManage.tsx +699 -0
- package/src/share/components/ShareModal.tsx +182 -0
- package/src/share/components/ShareSheet.tsx +178 -0
- package/src/share/components/ShareViewModal.tsx +131 -0
- package/src/share/hooks/useCanManageShareLink.ts +51 -0
- package/src/studio/components/MountayaStudio.tsx +1170 -0
- package/src/studio/components/MountayaStudioViewer.tsx +775 -0
- package/src/studio/hooks/useEmbeddedStudioConfig.ts +60 -0
- package/src/studio/hooks/useViewerActivation.ts +47 -0
- package/src/studio/hooks/useViewerCollectionSpecification.ts +58 -0
- package/src/studio/hooks/useViewerEmbedConfig.ts +74 -0
- package/src/studio/hooks/useViewerFraming.ts +211 -0
- package/src/studio/hooks/useViewerMapBindings.ts +109 -0
- package/src/styles.css +3993 -0
- package/src/testing/collections.ts +40 -0
- package/src/testing/hostRegistry.tsx +109 -0
- package/src/testing/index.ts +65 -0
- package/src/testing/itinerary.ts +297 -0
- package/src/testing/mountayaClient.tsx +218 -0
- package/src/testing/viewer.tsx +171 -0
- package/src/theme/components/StudioPortalScope.tsx +130 -0
- package/src/theme/hooks/useResolvedStudioTheme.ts +37 -0
- package/src/theme/rules/density.ts +157 -0
- package/src/theme/rules/mountayaStudioTheme.ts +114 -0
- package/src/theme/rules/passwordManager.ts +20 -0
- package/src/theme/rules/tokenStyle.ts +18 -0
- package/src/theme/rules/tokens.ts +71 -0
- package/src/theme/rules/tone.ts +34 -0
- package/src/theme/rules/zIndex.ts +40 -0
- package/src/video/components/CameraStep.tsx +82 -0
- package/src/video/components/DirectingScrim.tsx +28 -0
- package/src/video/components/DirectorChat.tsx +79 -0
- package/src/video/components/FormatStep.tsx +487 -0
- package/src/video/components/ModeCards.tsx +141 -0
- package/src/video/components/PlanNumberField.tsx +54 -0
- package/src/video/components/PreviewControls.tsx +212 -0
- package/src/video/components/PreviewStage.tsx +319 -0
- package/src/video/components/PreviewSurface.tsx +247 -0
- package/src/video/components/PreviewWatermark.tsx +77 -0
- package/src/video/components/ProfileOverlayCanvas.tsx +195 -0
- package/src/video/components/ProfileStep.tsx +254 -0
- package/src/video/components/RecordProgress.tsx +117 -0
- package/src/video/components/ReviewStep.tsx +244 -0
- package/src/video/components/ShotList.tsx +452 -0
- package/src/video/components/VideoExportWizard.tsx +829 -0
- package/src/video/components/WizardDirectingIndicator.tsx +57 -0
- package/src/video/components/WizardFooter.tsx +112 -0
- package/src/video/hooks/usePreviewPlanRefresh.ts +91 -0
- package/src/video/hooks/useVideoItinerarySubject.ts +18 -0
- package/src/video/hooks/useVideoOrganizationId.ts +30 -0
- package/src/video/hooks/useVideoPreviewSeed.ts +203 -0
- package/src/video/hooks/useVideoProfileSeed.ts +53 -0
- package/src/video/hooks/useVideoPublication.ts +29 -0
- package/src/video/hooks/useVideoRouteReady.ts +52 -0
- package/src/video/hooks/useVideoRouteSync.ts +100 -0
- package/src/video/hooks/useVideoTileTransform.ts +88 -0
- package/src/video/index.ts +24 -0
- package/src/video/providers/DirectorChatProvider.tsx +293 -0
- package/src/video/rules/changeTo.ts +20 -0
- package/src/zone/components/ZoneActionsMenu.tsx +305 -0
- package/src/zone/components/ZoneAvailabilityFields.tsx +98 -0
- package/src/zone/components/ZoneForm.tsx +622 -0
- package/src/zone/components/ZoneInheritedContext.tsx +70 -0
- package/src/zone/components/ZoneLevelSelect.tsx +86 -0
- package/src/zone/components/ZoneMetadataFields.tsx +89 -0
- package/src/zone/components/ZoneMethodSelect.tsx +90 -0
- package/src/zone/components/ZoneModeSelect.tsx +98 -0
- package/src/zone/components/ZoneRangeInput.tsx +129 -0
- package/src/zone/components/ZoneReachabilityFields.tsx +120 -0
- package/src/zone/components/ZoneSubHeader.tsx +188 -0
- package/src/zone/components/ZoneVisibility.tsx +94 -0
- package/src/zone/hooks/useStudioReachabilityStart.ts +79 -0
- package/src/zone/hooks/useStudioZonesBrowsed.ts +32 -0
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Alert,
|
|
3
|
+
Button,
|
|
4
|
+
Group,
|
|
5
|
+
Skeleton,
|
|
6
|
+
Stack,
|
|
7
|
+
Text,
|
|
8
|
+
Tooltip,
|
|
9
|
+
VisuallyHidden,
|
|
10
|
+
} from "@mantine/core";
|
|
11
|
+
import {
|
|
12
|
+
type ReactNode,
|
|
13
|
+
useCallback,
|
|
14
|
+
useEffect,
|
|
15
|
+
useRef,
|
|
16
|
+
useState,
|
|
17
|
+
useSyncExternalStore,
|
|
18
|
+
} from "react";
|
|
19
|
+
|
|
20
|
+
import {
|
|
21
|
+
type ShareLinkActions,
|
|
22
|
+
type ShareLinkScope,
|
|
23
|
+
type ShareLinkTarget,
|
|
24
|
+
type StudioToolContext,
|
|
25
|
+
shareLinkActions,
|
|
26
|
+
type ToolResult,
|
|
27
|
+
} from "@mountaya/studio";
|
|
28
|
+
import {
|
|
29
|
+
type ShareLinkConfig,
|
|
30
|
+
type ShareLinkDispatch,
|
|
31
|
+
ShareLinkEngine,
|
|
32
|
+
type ShareLinkFailure,
|
|
33
|
+
type ShareLinkSnapshot,
|
|
34
|
+
} from "@mountaya/studio/engines";
|
|
35
|
+
import { readShareLink } from "@mountaya/studio/handlers";
|
|
36
|
+
import type { StudioStrings } from "@mountaya/studio/strings";
|
|
37
|
+
import { mapToolError } from "@mountaya/studio/strings";
|
|
38
|
+
|
|
39
|
+
import { useStudioDispatch } from "../../headless/hooks/useStudioDispatch.js";
|
|
40
|
+
import { useStudioNotify } from "../../headless/providers/notify.js";
|
|
41
|
+
import { useStudioToolContext } from "../../headless/providers/studio.js";
|
|
42
|
+
import { useStudioScopedStrings } from "../../headless/providers/studioStrings.js";
|
|
43
|
+
import { Glyph } from "../../internal/components/Glyph.js";
|
|
44
|
+
import { AppModal } from "../../modals/components/AppModal.js";
|
|
45
|
+
import { ModalFooter } from "../../modals/components/ModalFooter.js";
|
|
46
|
+
import { DisabledReason } from "../../primitives/components/DisabledReason.js";
|
|
47
|
+
import { ErrorAlert } from "../../primitives/components/ErrorAlert.js";
|
|
48
|
+
import { menuActionIcons } from "../../rules/menuActions.js";
|
|
49
|
+
import { iconSizes } from "../../rules/sizing.js";
|
|
50
|
+
import { ShareSheet } from "./ShareSheet.js";
|
|
51
|
+
|
|
52
|
+
/** The sections these words come from: this module's own, and the parts it mounts. */
|
|
53
|
+
const SECTIONS = ["actions", "formError", "share"] as const;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* ShareLinkIcon is the share-a-link glyph, read from the registry the menu items that open this
|
|
57
|
+
* dialog read, so a trigger and the header it raises cannot drift apart.
|
|
58
|
+
*/
|
|
59
|
+
const ShareLinkIcon = menuActionIcons.shareLink;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* SKELETON_HEIGHT is the placeholder's height in pixels while the first read is in flight, set
|
|
63
|
+
* to what `ShareSheet.Link` occupies so the footer does not move down when the token lands. The
|
|
64
|
+
* body that offers to create a link where none is set keeps the same height, for the same reason.
|
|
65
|
+
* Measured in a real browser at the `lg` dialog's 588px content box: a labeled TextInput beside
|
|
66
|
+
* its copy button (65.6px), the Stack's `xxs` gap (4px), and the two-line dimmed note (33.6px),
|
|
67
|
+
* which is 103.2px, identical for the itinerary and the collection note, since both wrap to two
|
|
68
|
+
* lines.
|
|
69
|
+
*/
|
|
70
|
+
const SKELETON_HEIGHT = 103;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* heldBackBy is what the two controls offer: `offered`, with an action that reads `"ready"`
|
|
74
|
+
* waiting wherever the engine would not run it.
|
|
75
|
+
*
|
|
76
|
+
* `offered` is decided from a render's own props, so a capability or a scope that just changed
|
|
77
|
+
* gates the controls at once. `engine` is the engine's own answer for the same target, or null
|
|
78
|
+
* while it answers for another: it holds both actions back while one of them is in flight, its
|
|
79
|
+
* confirmation being asked included, and a press it would not run is a press nobody can make.
|
|
80
|
+
*/
|
|
81
|
+
const heldBackBy = (
|
|
82
|
+
offered: ShareLinkActions,
|
|
83
|
+
engine: ShareLinkActions | null,
|
|
84
|
+
): ShareLinkActions => ({
|
|
85
|
+
disable: offered.disable === "ready" && engine?.disable !== "ready" ? "waiting" : offered.disable,
|
|
86
|
+
rotate: offered.rotate === "ready" && engine?.rotate !== "ready" ? "waiting" : offered.rotate,
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* ShareLinkManageProps carry what differs between the resources that can be handed out as a
|
|
91
|
+
* link. The shell owns the token's lifecycle (reading it on open, creating it when the reader
|
|
92
|
+
* asks, resetting it, disabling it) and the caller owns what the token means: the dialog's title,
|
|
93
|
+
* the header's second line, the note stating what the link exposes, the copyable URL built from
|
|
94
|
+
* the token, and any extra body content describing the thing being shared.
|
|
95
|
+
*
|
|
96
|
+
* `token` and `onToken` lift the token to the caller, because the link and the extras are both
|
|
97
|
+
* derived from it. `onToken` receives the link's token after each read that finds one, each
|
|
98
|
+
* create and each reset that succeeds, whether or not it is the one the caller holds, and is
|
|
99
|
+
* never handed null. `token` is the one the caller holds: the body shows `link` once it is not
|
|
100
|
+
* null and the shell holds a token for `target`. A token the caller already holds when the dialog
|
|
101
|
+
* mounts shows at once, and the read on open confirms it, hands over the one that replaced it, or
|
|
102
|
+
* finds the link was disabled and offers to create one.
|
|
103
|
+
*
|
|
104
|
+
* A callback that throws is the caller's own fault, and the dialog never waits on it. The fault
|
|
105
|
+
* reaches the program as an uncaught error on a microtask, which is how `ShareLinkEngine`
|
|
106
|
+
* surfaces a listener that throws. An `onError` that throws leaves the refusal under the shell's
|
|
107
|
+
* own line. An `onToken` that throws before the caller holds the token leaves that line where
|
|
108
|
+
* the link would be, with no retry: the link was answered, so there is nothing to ask again.
|
|
109
|
+
*
|
|
110
|
+
* `canManage` is required rather than defaulted. It is the edit grant on the resource, which
|
|
111
|
+
* reading, creating, resetting and disabling its link all take: a write role in the organization
|
|
112
|
+
* that owns it, or the authorship of a personal one. A shell that assumed it would read for a
|
|
113
|
+
* viewer the API answers 403 and present two live destructive buttons beside the refusal. Making
|
|
114
|
+
* the caller state it means a third resource adopting this shell has to answer the question
|
|
115
|
+
* rather than inherit a permissive default. On an organization's resource a viewer without it is
|
|
116
|
+
* sent no read: the body states the rule (`refusalNote` replaces it) and both controls are
|
|
117
|
+
* refused.
|
|
118
|
+
*
|
|
119
|
+
* `onError` is the failure seam of the read and the create, and it resolves rather than
|
|
120
|
+
* observes: it takes the structured failure and returns the one sentence the body shows for it.
|
|
121
|
+
* It is called once for each refused read and each refused create, when the refusal lands and
|
|
122
|
+
* never while rendering, so a caller that also reports the failure reports it once. The copy is
|
|
123
|
+
* resource-specific (`formError.collection.*` reads differently from `formError.itinerary.*`) and
|
|
124
|
+
* this shell is resource-agnostic, so returning the sentence keeps one signal on screen and puts
|
|
125
|
+
* its wording where the resource is known, as `note` and `title` are. It is required for the
|
|
126
|
+
* same reason `canManage` is.
|
|
127
|
+
*
|
|
128
|
+
* `scope` says whether the resource can hold a link at all (`ShareLinkScope` in
|
|
129
|
+
* `@mountaya/studio`), because a share link belongs to an organization. `"organization"` is the
|
|
130
|
+
* lifecycle above, and the default, so a caller that never answers keeps it. `"personal"` is a
|
|
131
|
+
* resource owned by no organization, for which the API creates and resets nothing: the shell
|
|
132
|
+
* reads and creates nothing, drops Reset and states the rule in place of the link. It keeps
|
|
133
|
+
* Disable, because a link made before that rule stays stored until its owner clears it.
|
|
134
|
+
* `"pending"` is the record that answers still loading, and it holds the read rather than sending
|
|
135
|
+
* one the API may refuse. `canManage` keeps its meaning in every scope: it decides whether a read
|
|
136
|
+
* is sent and whether the controls that remain are live.
|
|
137
|
+
*
|
|
138
|
+
* `refusalNote` is what the body says in place of the link where `canManage` is false on an
|
|
139
|
+
* organization's resource. Omitted, the shell states the rule (the edit grant in the
|
|
140
|
+
* organization that owns it). A caller that answered false because its record failed to load
|
|
141
|
+
* passes what happened instead, since the rule may not be why.
|
|
142
|
+
*
|
|
143
|
+
* `target` is the resource the link is for. A target that differs by kind or id is another
|
|
144
|
+
* link: the shell reads it, and shows the pending state rather than anything of the previous
|
|
145
|
+
* target's until it answers.
|
|
146
|
+
*
|
|
147
|
+
* `onClose` is called after a disable only while the dialog is mounted and still shows the link
|
|
148
|
+
* the disable was pressed for. A disable that settles later reports its outcome through the
|
|
149
|
+
* notify seam and closes nothing.
|
|
150
|
+
*/
|
|
151
|
+
export interface ShareLinkManageProps {
|
|
152
|
+
canManage: boolean;
|
|
153
|
+
children?: ReactNode;
|
|
154
|
+
description: ReactNode;
|
|
155
|
+
link: string;
|
|
156
|
+
note: ReactNode;
|
|
157
|
+
onClose: () => void;
|
|
158
|
+
onError: (result: Extract<ToolResult, { ok: false }>) => string;
|
|
159
|
+
/**
|
|
160
|
+
* Called with the link's token after each read that finds one, each create and each reset that
|
|
161
|
+
* succeeds, so the caller can build `link` from it and hand it back as `token`. A read that
|
|
162
|
+
* finds none, a disable and a change of `target` hand over nothing.
|
|
163
|
+
*/
|
|
164
|
+
onToken: (token: string) => void;
|
|
165
|
+
/**
|
|
166
|
+
* What the body says in place of the link where the viewer is not granted it, `canManage`
|
|
167
|
+
* being false on an organization's resource. Omitted, the shell states the edit-grant rule.
|
|
168
|
+
*/
|
|
169
|
+
refusalNote?: ReactNode | undefined;
|
|
170
|
+
scope?: ShareLinkScope | undefined;
|
|
171
|
+
target: ShareLinkTarget;
|
|
172
|
+
title: string;
|
|
173
|
+
token: string | null;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** ShareLinkBinding is what {@link useShareLinkBinding} hands the dialog. */
|
|
177
|
+
interface ShareLinkBinding {
|
|
178
|
+
/** The engine, for the dialog's commands. */
|
|
179
|
+
readonly engine: ShareLinkEngine;
|
|
180
|
+
/** The token the caller's `onToken` faults on, or null once the caller takes one. */
|
|
181
|
+
readonly refusedToken: string | null;
|
|
182
|
+
/** The caller's sentence for each refused read and create, by the failure the engine holds. */
|
|
183
|
+
readonly sentences: WeakMap<ShareLinkFailure, string>;
|
|
184
|
+
/** The engine's answer, which the dialog renders from. */
|
|
185
|
+
readonly snapshot: ShareLinkSnapshot;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* useShareLinkBinding does what React must around a `ShareLinkEngine`: hold one for the dialog's
|
|
190
|
+
* life, hand it the props after every render, re-render when its answer changes, and tell the
|
|
191
|
+
* caller of each answer through `onToken` and `onError`.
|
|
192
|
+
*/
|
|
193
|
+
const useShareLinkBinding = (
|
|
194
|
+
config: ShareLinkConfig,
|
|
195
|
+
{ onError, onToken, token }: Pick<ShareLinkManageProps, "onError" | "onToken" | "token">,
|
|
196
|
+
): ShareLinkBinding => {
|
|
197
|
+
// Constructing one has no side effect, so React is free to discard this render.
|
|
198
|
+
const [engine] = useState(() => new ShareLinkEngine({ ...config, token }));
|
|
199
|
+
|
|
200
|
+
// The caller's sentence for each refused read and create, by the failure the engine holds for
|
|
201
|
+
// it. It is written when the refusal lands, so the render that shows the refusal finds it there.
|
|
202
|
+
const [sentences] = useState(() => new WeakMap<ShareLinkFailure, string>());
|
|
203
|
+
// The token the caller's `onToken` faults on, or null. Written when the answer lands, as the
|
|
204
|
+
// sentences are, and cleared by the next hand-over the caller takes.
|
|
205
|
+
const [handover] = useState<{ refused: string | null }>(() => ({ refused: null }));
|
|
206
|
+
const latestOnToken = useRef(onToken);
|
|
207
|
+
const latestOnError = useRef(onError);
|
|
208
|
+
|
|
209
|
+
// Both callbacks are stable for the engine's life. `useSyncExternalStore` subscribes to the
|
|
210
|
+
// function it is handed, so a fresh closure per render would park and resume on every one,
|
|
211
|
+
// and the subscription is the engine's lifecycle. A server render reads the same snapshot.
|
|
212
|
+
//
|
|
213
|
+
// The caller is told of an answer before React is: `onToken` takes the token a read, a create
|
|
214
|
+
// or a reset answered with and `onError` words a refused read or create, so both land in the
|
|
215
|
+
// update that renders the answer, and each is called once per answer however often the dialog
|
|
216
|
+
// renders.
|
|
217
|
+
const subscribe = useCallback(
|
|
218
|
+
(listener: () => void) => {
|
|
219
|
+
// What the engine answered when this subscription last heard from it.
|
|
220
|
+
let heard = engine.getSnapshot();
|
|
221
|
+
|
|
222
|
+
return engine.subscribe(() => {
|
|
223
|
+
const answer = engine.getSnapshot();
|
|
224
|
+
const previous = heard;
|
|
225
|
+
heard = answer;
|
|
226
|
+
|
|
227
|
+
try {
|
|
228
|
+
// A read, a create or a reset answered when the latest change is one of theirs and it,
|
|
229
|
+
// or the token, differs from what was last heard. Comparing the token alone would hand
|
|
230
|
+
// a caller nothing when a read confirms the token it holds, or one it dropped since.
|
|
231
|
+
const issued =
|
|
232
|
+
answer.change === "minted" || answer.change === "read" || answer.change === "rotated";
|
|
233
|
+
const differs = answer.token !== previous.token || answer.change !== previous.change;
|
|
234
|
+
if (issued && differs && answer.token !== null) {
|
|
235
|
+
handover.refused = answer.token;
|
|
236
|
+
latestOnToken.current(answer.token);
|
|
237
|
+
handover.refused = null;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
for (const refused of [answer.readFailure, answer.mintFailure]) {
|
|
241
|
+
if (refused !== null && refused.failure !== null && !sentences.has(refused)) {
|
|
242
|
+
sentences.set(refused, latestOnError.current(refused.failure));
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
} finally {
|
|
246
|
+
// React hears every answer, whatever a caller's callback did with it. What the
|
|
247
|
+
// callback threw goes on to the engine, which surfaces a listener's fault.
|
|
248
|
+
listener();
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
},
|
|
252
|
+
[engine, handover, sentences],
|
|
253
|
+
);
|
|
254
|
+
const getSnapshot = useCallback(() => engine.getSnapshot(), [engine]);
|
|
255
|
+
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
256
|
+
|
|
257
|
+
// After every render, with no dependency list: the engine is what knows which change is
|
|
258
|
+
// another question, and an unchanged configuration costs it a comparison.
|
|
259
|
+
useEffect(() => {
|
|
260
|
+
latestOnToken.current = onToken;
|
|
261
|
+
latestOnError.current = onError;
|
|
262
|
+
engine.configure(config);
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
return { engine, refusedToken: handover.refused, sentences, snapshot };
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* useLifecycleFailureToast returns what raises the one toast a refused lifecycle action gets,
|
|
270
|
+
* resolving copy most specific first: the server's own already-localized sentence, then the
|
|
271
|
+
* classified code's shared line, then the action's own copy, which is where a failure
|
|
272
|
+
* carrying no code at all lands (a missing persistence seam).
|
|
273
|
+
*
|
|
274
|
+
* A withheld confirmation never reaches it: the engine reports that one as `"withheld"`, with
|
|
275
|
+
* no failure to show, so a reader who pressed Cancel is told nothing.
|
|
276
|
+
*/
|
|
277
|
+
const useLifecycleFailureToast = () => {
|
|
278
|
+
const notify = useStudioNotify();
|
|
279
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
280
|
+
|
|
281
|
+
return useCallback(
|
|
282
|
+
(
|
|
283
|
+
failure: Extract<ToolResult, { ok: false }>,
|
|
284
|
+
action: Extract<keyof StudioStrings["share"], "disableError" | "rotateError">,
|
|
285
|
+
) => {
|
|
286
|
+
// A coded failure resolves through the shared mapper rather than indexing
|
|
287
|
+
// `words.formError` here: the bank carries a nested object per resource as well as a
|
|
288
|
+
// message per code, and it does not name every code the bus can return, so a direct
|
|
289
|
+
// lookup is both untyped and able to hand a notification an object.
|
|
290
|
+
//
|
|
291
|
+
// It names no resource: a resource's own entries speak of its name (a `conflict` is a
|
|
292
|
+
// name already taken), and a link is neither resource's name.
|
|
293
|
+
//
|
|
294
|
+
// An uncoded failure keeps naming the action instead, which is the one case where that
|
|
295
|
+
// is all the copy can do. It cannot go through the mapper: with no code the mapper
|
|
296
|
+
// falls to the result's own error string, and a handler's seam-missing text is not a
|
|
297
|
+
// sentence to show a reader.
|
|
298
|
+
notify.error(
|
|
299
|
+
failure.detail ||
|
|
300
|
+
(failure.code === undefined
|
|
301
|
+
? words.share[action]
|
|
302
|
+
: mapToolError(failure, { copy: words.formError })),
|
|
303
|
+
);
|
|
304
|
+
},
|
|
305
|
+
[words, notify],
|
|
306
|
+
);
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
/** ShareLinkControlsProps are what the footer's pair is drawn from. */
|
|
310
|
+
interface ShareLinkControlsProps {
|
|
311
|
+
/** What each control is worth offering. */
|
|
312
|
+
readonly actions: ShareLinkActions;
|
|
313
|
+
/** The action whose request is running, which spins its control. */
|
|
314
|
+
readonly busy: ShareLinkSnapshot["busy"];
|
|
315
|
+
/** What each control runs when it is pressed, by the action it is. */
|
|
316
|
+
readonly commands: Readonly<Record<"disable" | "rotate", () => void>>;
|
|
317
|
+
/**
|
|
318
|
+
* The sentence a refused reader is told: the write role an organization's link asks for, or
|
|
319
|
+
* the creator a personal resource's link answers to.
|
|
320
|
+
*/
|
|
321
|
+
readonly deniedReason: string;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* ShareLinkControls is the dialog's whole action row: Reset and Disable, in the footer's
|
|
326
|
+
* secondary slot.
|
|
327
|
+
*
|
|
328
|
+
* Both are rendered always: "waiting" and "denied" draw the same disabled pair, so the row's
|
|
329
|
+
* layout is settled from the first frame and does not move as the read of the link and the
|
|
330
|
+
* membership reads land. A Group bubbles pointer events, so the tooltip reaches the hover surface without the
|
|
331
|
+
* span shim a bare disabled Button would need.
|
|
332
|
+
*/
|
|
333
|
+
const ShareLinkControls = ({ actions, busy, commands, deniedReason }: ShareLinkControlsProps) => {
|
|
334
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
335
|
+
|
|
336
|
+
// The reason rides inside each control as well as on the pair. A disabled Button is dropped
|
|
337
|
+
// from the tab order and Mantine hangs the tooltip's aria-describedby on the Group, so the
|
|
338
|
+
// tooltip reaches a pointer and nobody else. A disabled button still sits in the
|
|
339
|
+
// accessibility tree, so a reader browsing the footer hears each verb and its reason
|
|
340
|
+
// together. It is withheld while the actions wait for a link: "not yet" is no refusal, and
|
|
341
|
+
// announcing the write-role rule then would state a rule that may not apply.
|
|
342
|
+
const denied = actions.disable === "denied";
|
|
343
|
+
const reason = denied ? <DisabledReason>{deniedReason}</DisabledReason> : null;
|
|
344
|
+
|
|
345
|
+
return (
|
|
346
|
+
<Tooltip disabled={!denied} label={deniedReason} position="bottom">
|
|
347
|
+
<Group gap="xs">
|
|
348
|
+
{actions.rotate === "unavailable" ? null : (
|
|
349
|
+
<Button
|
|
350
|
+
disabled={actions.rotate !== "ready"}
|
|
351
|
+
leftSection={<Glyph name="action-rotate-link" size={iconSizes.sm} />}
|
|
352
|
+
loading={busy === "rotate"}
|
|
353
|
+
onClick={commands.rotate}
|
|
354
|
+
variant="default"
|
|
355
|
+
>
|
|
356
|
+
{words.share.rotate}
|
|
357
|
+
{reason}
|
|
358
|
+
</Button>
|
|
359
|
+
)}
|
|
360
|
+
<Button
|
|
361
|
+
color="red"
|
|
362
|
+
disabled={actions.disable !== "ready"}
|
|
363
|
+
leftSection={<Glyph name="action-disable-link" size={iconSizes.sm} />}
|
|
364
|
+
loading={busy === "disable"}
|
|
365
|
+
onClick={commands.disable}
|
|
366
|
+
variant="light"
|
|
367
|
+
>
|
|
368
|
+
{words.share.disable}
|
|
369
|
+
{reason}
|
|
370
|
+
</Button>
|
|
371
|
+
</Group>
|
|
372
|
+
</Tooltip>
|
|
373
|
+
);
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* ShareLinkManage is the owner's share-link dialog for any resource that has one. On open it
|
|
378
|
+
* READS the target's share link, which sets nothing, so opening the dialog hands no link out.
|
|
379
|
+
* The body shows a skeleton while that read is in flight, the reason when it is refused, the
|
|
380
|
+
* offer to create a link where none is set, and, once there is one, the copyable read-only link
|
|
381
|
+
* followed by whatever the caller describes the target with. Two destructive management actions
|
|
382
|
+
* ride the footer's secondary slot: Reset link retires the token (the previous URL stops working)
|
|
383
|
+
* and Disable link revokes it entirely.
|
|
384
|
+
*
|
|
385
|
+
* The machine is `ShareLinkEngine` in `@mountaya/studio/engines`, reading through
|
|
386
|
+
* `readShareLink` of `@mountaya/studio/handlers`. It reads the link once somebody watches,
|
|
387
|
+
* creates one when the reader presses Create, keeps a refusal with whether a retry is worth
|
|
388
|
+
* offering (`isRetryableShareLinkFailure`), runs Reset and Disable through the tool bus, and
|
|
389
|
+
* reports a withheld confirmation as no failure at all. Each write's answer is the link as it now
|
|
390
|
+
* stands, so nothing is read again after one. This component does what React must: hold the
|
|
391
|
+
* engine for the dialog's life, hand it the props, re-render when its answer changes, and word
|
|
392
|
+
* what it reports.
|
|
393
|
+
*
|
|
394
|
+
* A refused read or create offers a retry only when a retry could succeed. A refusal the caller
|
|
395
|
+
* would meet again (a grant the shell was told of and the API does not see, a resource that is
|
|
396
|
+
* gone) is an answer, and "Try again" under that reason is a loop with no exit, so a timeout still
|
|
397
|
+
* retries and a refusal states itself once. A viewer the caller already knows holds no grant is
|
|
398
|
+
* sent no read at all, and reads the rule in its place.
|
|
399
|
+
*
|
|
400
|
+
* Every one of the three verbs is a bus dispatch (`studio.shareLink.mint`, `.rotate` and
|
|
401
|
+
* `.disable`), as is the close. The bus raises the confirm for the two destructive ones from
|
|
402
|
+
* each tool's own declared policy and tone, so this dialog renders no confirm of its own. A
|
|
403
|
+
* control spins once its confirmation is approved, never while it is asked, and Create spins
|
|
404
|
+
* while its request runs.
|
|
405
|
+
*
|
|
406
|
+
* The two management actions are always in the footer, and disabled until there is a link and a
|
|
407
|
+
* viewer who may invalidate one (`shareLinkActions`). A Manage footer's geometry is settled by
|
|
408
|
+
* whether its secondary slot is occupied, and both inputs that would fill it here resolve
|
|
409
|
+
* asynchronously (the read, and the membership reads behind `canManage`, which answer false
|
|
410
|
+
* while loading), so withholding the pair would move the whole action row a beat after the
|
|
411
|
+
* dialog opens. Rendering it disabled keeps the dialog the shape of its full-capability form
|
|
412
|
+
* from the first frame. One tooltip over the pair says why, and a DisabledReason inside each
|
|
413
|
+
* control carries the same sentence into its accessible name, so a viewer learns the rule with
|
|
414
|
+
* a pointer or without one.
|
|
415
|
+
*
|
|
416
|
+
* A personal resource has no link to show. A share link belongs to an organization, and the API
|
|
417
|
+
* refuses to create or reset one for a resource owned by none, so the body states that rule, the
|
|
418
|
+
* footer carries Disable alone, and nothing is read or created. Disable stays for a link made
|
|
419
|
+
* before the rule, and an answer that none was active is the outcome the reader asked for,
|
|
420
|
+
* reported as such rather than as a failure.
|
|
421
|
+
*
|
|
422
|
+
* One shell rather than one per resource, because the difference between sharing an itinerary
|
|
423
|
+
* and sharing a collection is entirely in what is being described: the lifecycle, the confirms
|
|
424
|
+
* and the chrome are the same dialog.
|
|
425
|
+
*/
|
|
426
|
+
export const ShareLinkManage = ({
|
|
427
|
+
canManage,
|
|
428
|
+
children,
|
|
429
|
+
description,
|
|
430
|
+
link,
|
|
431
|
+
note,
|
|
432
|
+
onClose,
|
|
433
|
+
onError,
|
|
434
|
+
onToken,
|
|
435
|
+
refusalNote,
|
|
436
|
+
scope = "organization",
|
|
437
|
+
target,
|
|
438
|
+
title,
|
|
439
|
+
token,
|
|
440
|
+
}: ShareLinkManageProps) => {
|
|
441
|
+
const notify = useStudioNotify();
|
|
442
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
443
|
+
const { dispatch } = useStudioDispatch();
|
|
444
|
+
const context = useStudioToolContext<StudioToolContext>();
|
|
445
|
+
|
|
446
|
+
// The engine runs each tool in the context it hands over: the studio's own for a create, which
|
|
447
|
+
// is the one the studio's dispatch reads by itself, and a layer carrying the engine's confirm
|
|
448
|
+
// gate for a reset and a disable.
|
|
449
|
+
const run = useCallback<ShareLinkDispatch>(
|
|
450
|
+
(running, name, input) =>
|
|
451
|
+
running === context ? dispatch(name, input) : dispatch(name, input, { context: running }),
|
|
452
|
+
[context, dispatch],
|
|
453
|
+
);
|
|
454
|
+
const config: ShareLinkConfig = {
|
|
455
|
+
canManage,
|
|
456
|
+
context,
|
|
457
|
+
dispatch: run,
|
|
458
|
+
read: readShareLink,
|
|
459
|
+
scope,
|
|
460
|
+
target,
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
const { engine, refusedToken, sentences, snapshot } = useShareLinkBinding(config, {
|
|
464
|
+
onError,
|
|
465
|
+
onToken,
|
|
466
|
+
token,
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
// Whether the dialog is mounted. A disable in flight when the dialog goes away is a write that
|
|
470
|
+
// happened, so its answer still lands here, and the close it asks for is this dialog's alone.
|
|
471
|
+
const mounted = useRef(false);
|
|
472
|
+
useEffect(() => {
|
|
473
|
+
mounted.current = true;
|
|
474
|
+
|
|
475
|
+
return () => {
|
|
476
|
+
mounted.current = false;
|
|
477
|
+
};
|
|
478
|
+
}, []);
|
|
479
|
+
|
|
480
|
+
// The target the dialog shows, as the latest render states it. A disable keeps the target it
|
|
481
|
+
// was pressed for and compares the two once it settles.
|
|
482
|
+
const shown = useRef(target);
|
|
483
|
+
useEffect(() => {
|
|
484
|
+
shown.current = target;
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
// The engine answers for the target it was last configured with, and it is configured after
|
|
488
|
+
// the render. So a render that carries another target reads nothing of the previous one's:
|
|
489
|
+
// no refusal, no spinner and nothing to announce, which is the new target's pending state.
|
|
490
|
+
const answered = snapshot.target.kind === target.kind && snapshot.target.id === target.id;
|
|
491
|
+
const readFailure = answered ? snapshot.readFailure : null;
|
|
492
|
+
const mintFailure = answered ? snapshot.mintFailure : null;
|
|
493
|
+
const busy = answered ? snapshot.busy : null;
|
|
494
|
+
const change = answered ? snapshot.change : null;
|
|
495
|
+
// The resource holds no link, and the engine knows it: the body offers to create one.
|
|
496
|
+
const unset = answered && snapshot.known && snapshot.token === null;
|
|
497
|
+
const minting = answered && snapshot.minting;
|
|
498
|
+
|
|
499
|
+
// The link on screen is the caller's, since `link` is built from the token it holds, once the
|
|
500
|
+
// engine holds a token for this target. A caller that has just named another target still
|
|
501
|
+
// holds the previous one's token, and a link built from the two opens nothing, so it waits for
|
|
502
|
+
// the new target's read. A disable keeps the link up for the moment the dialog takes to close,
|
|
503
|
+
// with nothing left to manage: `managed` is the token Reset and Disable are decided from.
|
|
504
|
+
const linked = answered && snapshot.token !== null;
|
|
505
|
+
const held = linked || change === "disabled" ? token : null;
|
|
506
|
+
const managed = linked ? token : null;
|
|
507
|
+
|
|
508
|
+
// The engine holds a link the caller's `onToken` faults on, and the caller holds none of it.
|
|
509
|
+
// No answer is on its way, so the body states the shell's own line where the link would be.
|
|
510
|
+
const undelivered = linked && token === null && snapshot.token === refusedToken;
|
|
511
|
+
|
|
512
|
+
// What the polite live region below announces. A refusal already announces itself, since
|
|
513
|
+
// Mantine's Alert carries an implicit role="alert", but every success here is a silent swap:
|
|
514
|
+
// the placeholder becomes a link or the offer to create one, the offer becomes a link, or the
|
|
515
|
+
// link's text becomes a different link. Each is the whole outcome the user is waiting on, so
|
|
516
|
+
// each has its own sentence: two identical strings would leave a reset unannounced, since a
|
|
517
|
+
// live region only speaks when its content changes.
|
|
518
|
+
const announced =
|
|
519
|
+
change === "rotated"
|
|
520
|
+
? words.share.rotated
|
|
521
|
+
: linked && (change === "minted" || change === "read")
|
|
522
|
+
? words.share.linkReady
|
|
523
|
+
: unset && change === "read"
|
|
524
|
+
? words.share.empty
|
|
525
|
+
: "";
|
|
526
|
+
const status = undelivered ? "" : announced;
|
|
527
|
+
|
|
528
|
+
const personal = scope === "personal";
|
|
529
|
+
// An organization's link the viewer is not granted: no read is sent, so there is no link to
|
|
530
|
+
// show, and the body says why in its place.
|
|
531
|
+
const refused = scope === "organization" && !canManage;
|
|
532
|
+
|
|
533
|
+
const notifyFailure = useLifecycleFailureToast();
|
|
534
|
+
|
|
535
|
+
const onRetry = useCallback(() => {
|
|
536
|
+
void engine.read();
|
|
537
|
+
}, [engine]);
|
|
538
|
+
|
|
539
|
+
const onCreate = useCallback(() => {
|
|
540
|
+
void engine.mint();
|
|
541
|
+
}, [engine]);
|
|
542
|
+
|
|
543
|
+
const onRotate = useCallback(async () => {
|
|
544
|
+
const outcome = await engine.rotate();
|
|
545
|
+
|
|
546
|
+
if (outcome.status === "refused") {
|
|
547
|
+
notifyFailure(outcome.failure, "rotateError");
|
|
548
|
+
} else if (outcome.status === "settled") {
|
|
549
|
+
notify.success(words.share.rotated);
|
|
550
|
+
}
|
|
551
|
+
}, [engine, words, notify, notifyFailure]);
|
|
552
|
+
|
|
553
|
+
const onDisable = useCallback(async () => {
|
|
554
|
+
const pressedFor = shown.current;
|
|
555
|
+
const outcome = await engine.disable();
|
|
556
|
+
|
|
557
|
+
if (outcome.status === "refused") {
|
|
558
|
+
notifyFailure(outcome.failure, "disableError");
|
|
559
|
+
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
if (outcome.status !== "settled") {
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
// A personal resource's Disable is offered without knowing a link exists, so a disable that
|
|
568
|
+
// found none is the state the reader asked for. It has its own sentence: the code's shared
|
|
569
|
+
// copy says the item itself is gone, which would misreport it.
|
|
570
|
+
notify.success(outcome.linkWasActive ? words.share.disabled : words.share.noActiveLink);
|
|
571
|
+
|
|
572
|
+
// The close is asked of the dialog the disable was pressed in: one still mounted, and still
|
|
573
|
+
// on that link. A caller that has named another target since shows another link, which this
|
|
574
|
+
// disable does not close.
|
|
575
|
+
const latest = shown.current;
|
|
576
|
+
if (mounted.current && latest.kind === pressedFor.kind && latest.id === pressedFor.id) {
|
|
577
|
+
onClose();
|
|
578
|
+
}
|
|
579
|
+
}, [engine, words, notify, notifyFailure, onClose]);
|
|
580
|
+
|
|
581
|
+
// A personal resource's body is the rule that keeps it from holding a link, in the gray
|
|
582
|
+
// treatment the embed wizard gives the same refusal: nothing failed, and nothing the reader
|
|
583
|
+
// does here changes it. An organization's link the viewer is not granted reads the same way,
|
|
584
|
+
// with the edit-grant rule or the caller's own note in its place.
|
|
585
|
+
//
|
|
586
|
+
// Any other resource has five bodies, in the order they can be reached: the link once there
|
|
587
|
+
// is one, the read's refusal (with a retry only where one could land), the shell's own line
|
|
588
|
+
// for a link the caller did not take, the offer to create a link where none is set, and
|
|
589
|
+
// otherwise the placeholder. The retry carries no spinner of its own, because pressing it
|
|
590
|
+
// clears the failure while the link is read again, which is the last branch: the placeholder
|
|
591
|
+
// is the pending affordance, and the button is gone. Create spins while its request runs, and
|
|
592
|
+
// a refused create states its reason above it, keeping it only where pressing again could
|
|
593
|
+
// land.
|
|
594
|
+
let body: ReactNode;
|
|
595
|
+
if (personal) {
|
|
596
|
+
body = <Alert color="gray">{words.share.personalNote}</Alert>;
|
|
597
|
+
} else if (refused) {
|
|
598
|
+
body = refusalNote ?? <Alert color="gray">{words.share.manageDenied}</Alert>;
|
|
599
|
+
} else if (held !== null) {
|
|
600
|
+
body = (
|
|
601
|
+
<Stack gap="md">
|
|
602
|
+
<ShareSheet.Link link={link} note={note} />
|
|
603
|
+
{children}
|
|
604
|
+
</Stack>
|
|
605
|
+
);
|
|
606
|
+
} else if (readFailure !== null) {
|
|
607
|
+
body = (
|
|
608
|
+
<Stack gap="sm">
|
|
609
|
+
{/* A refusal is worded by the caller, who knows the resource, when it lands. A read
|
|
610
|
+
that gave nothing to word (a read that threw, or a caller whose wording threw)
|
|
611
|
+
takes the shell's own line. */}
|
|
612
|
+
<ErrorAlert>{sentences.get(readFailure) ?? words.share.readError}</ErrorAlert>
|
|
613
|
+
{readFailure.retryable ? (
|
|
614
|
+
<Group justify="flex-end">
|
|
615
|
+
<Button onClick={onRetry} variant="default">
|
|
616
|
+
{words.share.retry}
|
|
617
|
+
</Button>
|
|
618
|
+
</Group>
|
|
619
|
+
) : null}
|
|
620
|
+
</Stack>
|
|
621
|
+
);
|
|
622
|
+
} else if (undelivered) {
|
|
623
|
+
body = <ErrorAlert>{change === "read" ? words.share.readError : words.share.error}</ErrorAlert>;
|
|
624
|
+
} else if (unset) {
|
|
625
|
+
body = (
|
|
626
|
+
<Stack gap="sm" justify="space-between" mih={SKELETON_HEIGHT}>
|
|
627
|
+
{mintFailure === null ? (
|
|
628
|
+
<Text c="dimmed" size="sm">
|
|
629
|
+
{words.share.empty}
|
|
630
|
+
</Text>
|
|
631
|
+
) : (
|
|
632
|
+
// Worded by the caller as the read's refusal is, with the shell's own line for a
|
|
633
|
+
// create that gave nothing to word.
|
|
634
|
+
<ErrorAlert>{sentences.get(mintFailure) ?? words.share.error}</ErrorAlert>
|
|
635
|
+
)}
|
|
636
|
+
{mintFailure === null || mintFailure.retryable ? (
|
|
637
|
+
<Group justify="flex-end">
|
|
638
|
+
<Button
|
|
639
|
+
leftSection={<ShareLinkIcon size={iconSizes.sm} />}
|
|
640
|
+
loading={minting}
|
|
641
|
+
onClick={onCreate}
|
|
642
|
+
>
|
|
643
|
+
{words.share.create}
|
|
644
|
+
</Button>
|
|
645
|
+
</Group>
|
|
646
|
+
) : null}
|
|
647
|
+
</Stack>
|
|
648
|
+
);
|
|
649
|
+
} else {
|
|
650
|
+
body = <Skeleton height={SKELETON_HEIGHT} />;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
// Decided from this render's own props, so a capability or a scope that just changed gates
|
|
654
|
+
// the controls at once, from the link the shell holds for the target, and from what the
|
|
655
|
+
// engine offers, so a control is live only when the engine runs it: both wait while a reset
|
|
656
|
+
// or a disable is in flight. A personal resource keeps Disable alone and has no token to
|
|
657
|
+
// wait on.
|
|
658
|
+
const actions = heldBackBy(
|
|
659
|
+
shareLinkActions({ canManage, scope, token: managed }),
|
|
660
|
+
answered ? snapshot.actions : null,
|
|
661
|
+
);
|
|
662
|
+
|
|
663
|
+
return (
|
|
664
|
+
<AppModal
|
|
665
|
+
closeLabel={words.actions.close}
|
|
666
|
+
description={description}
|
|
667
|
+
footer={
|
|
668
|
+
// The link-lifecycle controls (Reset and Disable) are this dialog's whole action row,
|
|
669
|
+
// one control per thing that can happen: the corner X is the way out, so no button
|
|
670
|
+
// beside them only closes. `mt` opens a clear gap between the body and the action bar
|
|
671
|
+
// so the two rows of controls read as distinct.
|
|
672
|
+
<ModalFooter
|
|
673
|
+
mt="sm"
|
|
674
|
+
secondary={
|
|
675
|
+
<ShareLinkControls
|
|
676
|
+
actions={actions}
|
|
677
|
+
busy={busy}
|
|
678
|
+
commands={{ disable: () => void onDisable(), rotate: () => void onRotate() }}
|
|
679
|
+
// Who may act differs by owner: an organization's link answers to a write role in
|
|
680
|
+
// it, whoever made the resource, and a personal resource's to its creator.
|
|
681
|
+
deniedReason={personal ? words.share.manageDeniedPersonal : words.share.manageDenied}
|
|
682
|
+
/>
|
|
683
|
+
}
|
|
684
|
+
/>
|
|
685
|
+
}
|
|
686
|
+
icon={<ShareLinkIcon size={iconSizes.md} />}
|
|
687
|
+
onClose={onClose}
|
|
688
|
+
opened
|
|
689
|
+
size="lg"
|
|
690
|
+
title={title}
|
|
691
|
+
>
|
|
692
|
+
{/* Mounted from the first frame and empty until there is something to say: a live
|
|
693
|
+
region added at the moment of the news is not read out, because assistive
|
|
694
|
+
technology announces a change to a region it was already observing. */}
|
|
695
|
+
<VisuallyHidden aria-live="polite">{status}</VisuallyHidden>
|
|
696
|
+
{body}
|
|
697
|
+
</AppModal>
|
|
698
|
+
);
|
|
699
|
+
};
|