@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,126 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
|
|
3
|
+
import type { PeerNameResolver } from "@mountaya/elements/collab";
|
|
4
|
+
import type { MapClient, PeerDraftEntity } from "@mountaya/elements/editor";
|
|
5
|
+
import { useLatestRef } from "@mountaya/elements-react";
|
|
6
|
+
import {
|
|
7
|
+
type CollabPeerDraft,
|
|
8
|
+
peerDraftGhosts,
|
|
9
|
+
selectCollabPeerDrafts,
|
|
10
|
+
selectCollabPeers,
|
|
11
|
+
} from "@mountaya/studio";
|
|
12
|
+
|
|
13
|
+
import { useActiveCollabResources } from "../../headless/hooks/useCollabResources.js";
|
|
14
|
+
import { useUiStore } from "../../headless/hooks/useUiStore.js";
|
|
15
|
+
import { useUiStoreShallow } from "../../headless/hooks/useUiStoreShallow.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* useStudioPeerDrafts paints each collaborator's in-flight edit on the local map as a
|
|
19
|
+
* read-only ghost, and clears it when the edit ends or the hook unmounts.
|
|
20
|
+
*
|
|
21
|
+
* `peerDraftGhosts` in `@mountaya/studio` decides which drafts are ghosts and what each one
|
|
22
|
+
* shows: a segment's routed line or a zone's polygon, in its author's color, labeled with
|
|
23
|
+
* their name, and none for the entity the local user is editing. This hook reconciles the
|
|
24
|
+
* map against that answer: a ghost in it is painted with `setPeerDraft`, and one painted
|
|
25
|
+
* before that is no longer in it is cleared with `clearPeerDraft`. It reads the slice the
|
|
26
|
+
* collaboration tools mirror into the store and drives the map client, and writes no store.
|
|
27
|
+
*
|
|
28
|
+
* What the binding adds to the rule:
|
|
29
|
+
*
|
|
30
|
+
* - **It folds every open editor resource**, an open itinerary's segment drafts and an open
|
|
31
|
+
* zone's zone draft, so no resource is a special case and a draft on a resource that is not
|
|
32
|
+
* open is never read.
|
|
33
|
+
* - **It subscribes narrowly.** The drafts are selected by value and the present peers as
|
|
34
|
+
* their ids alone, so a peer's selection frame changes neither and runs no reconcile.
|
|
35
|
+
* - **It resolves the color.** The rule answers a palette name, and the map needs a concrete
|
|
36
|
+
* value, read once per color scheme off the live theme.
|
|
37
|
+
*
|
|
38
|
+
* @param client The map to paint on, or null while none is mounted.
|
|
39
|
+
* @param resolveName Resolves a peer's display name, as the roster and the lock badges do.
|
|
40
|
+
* Without one, or until it answers for a peer, the ghost carries the peer's initials.
|
|
41
|
+
*/
|
|
42
|
+
export const useStudioPeerDrafts = (
|
|
43
|
+
client: MapClient | null,
|
|
44
|
+
resolveName?: PeerNameResolver,
|
|
45
|
+
): void => {
|
|
46
|
+
const resources = useActiveCollabResources();
|
|
47
|
+
|
|
48
|
+
// Every open resource's peer drafts merged into one map, under one subscription: a
|
|
49
|
+
// subscription per resource would change the number of hooks with the open set. Each
|
|
50
|
+
// resource's map is the same object until a mutation replaces it, and the shallow comparison
|
|
51
|
+
// answers the same merged reference until a draft's value changes.
|
|
52
|
+
const drafts = useUiStoreShallow((state) => {
|
|
53
|
+
const merged: Record<string, CollabPeerDraft> = {};
|
|
54
|
+
for (const resource of resources) {
|
|
55
|
+
Object.assign(merged, selectCollabPeerDrafts(resource)(state));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return merged;
|
|
59
|
+
});
|
|
60
|
+
// The present peers' ids across every open resource. A selection frame replaces a resource's
|
|
61
|
+
// peers object and never its key set, so the ids are what is compared.
|
|
62
|
+
const peerIds = useUiStoreShallow((state) => {
|
|
63
|
+
const ids: string[] = [];
|
|
64
|
+
for (const resource of resources) {
|
|
65
|
+
ids.push(...Object.keys(selectCollabPeers(resource)(state)));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return ids;
|
|
69
|
+
});
|
|
70
|
+
const localSegmentEditId = useUiStore((state) => state.segmentEditSession?.segmentId ?? null);
|
|
71
|
+
const localZoneEditId = useUiStore((state) => state.zoneEditSession?.zoneId ?? null);
|
|
72
|
+
|
|
73
|
+
// The ghosts on the map, by draft key, so a reconcile clears the ones that dropped out.
|
|
74
|
+
const paintedRef = useRef<Map<string, PeerDraftEntity>>(new Map());
|
|
75
|
+
|
|
76
|
+
// The map the ghosts are on, for the unmount below to read.
|
|
77
|
+
const clientRef = useLatestRef(client);
|
|
78
|
+
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (!client) {
|
|
81
|
+
// The map is gone and its ghosts with it: the next client is painted from nothing.
|
|
82
|
+
paintedRef.current = new Map();
|
|
83
|
+
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const ghosts = peerDraftGhosts({
|
|
88
|
+
drafts,
|
|
89
|
+
localSegmentEditId,
|
|
90
|
+
localZoneEditId,
|
|
91
|
+
presentPeerIds: peerIds,
|
|
92
|
+
resolveName,
|
|
93
|
+
});
|
|
94
|
+
const wanted = new Map(ghosts.map((ghost) => [ghost.key, ghost.entity]));
|
|
95
|
+
|
|
96
|
+
for (const [key, entity] of paintedRef.current) {
|
|
97
|
+
if (!wanted.has(key)) {
|
|
98
|
+
client.clearPeerDraft(entity);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
for (const ghost of ghosts) {
|
|
103
|
+
client.setPeerDraft(ghost.entity, ghost.geometry, ghost.color, ghost.label);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
paintedRef.current = wanted;
|
|
107
|
+
}, [client, drafts, peerIds, localSegmentEditId, localZoneEditId, resolveName]);
|
|
108
|
+
|
|
109
|
+
// A map may outlive the component that holds this hook, and a ghost left on it would show an
|
|
110
|
+
// edit nothing follows any more. So unmounting clears every ghost painted, from the map they
|
|
111
|
+
// are on. Declared after the reconcile, so a set-up that follows a teardown paints from
|
|
112
|
+
// nothing.
|
|
113
|
+
useEffect(
|
|
114
|
+
() => () => {
|
|
115
|
+
const mounted = clientRef.current;
|
|
116
|
+
if (mounted) {
|
|
117
|
+
for (const entity of paintedRef.current.values()) {
|
|
118
|
+
mounted.clearPeerDraft(entity);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
paintedRef.current = new Map();
|
|
123
|
+
},
|
|
124
|
+
[clientRef],
|
|
125
|
+
);
|
|
126
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
|
|
3
|
+
import type { Layers } from "@mountaya/elements";
|
|
4
|
+
import type { MapClient } from "@mountaya/elements/editor";
|
|
5
|
+
import { useMountayaLayersManifest } from "@mountaya/elements-react";
|
|
6
|
+
import {
|
|
7
|
+
POIS_OVERLAY_SLUG,
|
|
8
|
+
permittedEnrichmentOverlays,
|
|
9
|
+
poiLayerVisibility,
|
|
10
|
+
} from "@mountaya/studio";
|
|
11
|
+
|
|
12
|
+
import { useStudioViewer } from "../../headless/hooks/useStudioViewer.js";
|
|
13
|
+
import { useStudioViewerEntitlement } from "../../headless/hooks/useStudioViewerEntitlement.js";
|
|
14
|
+
import { useUiStore } from "../../headless/hooks/useUiStore.js";
|
|
15
|
+
import { useStudioOverlaysEntitled } from "./useStudioOverlaysEntitled.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The drawing of the overlay a record of written values belongs to: the client it was written to,
|
|
19
|
+
* the manifest the overlay was drawn from, and whether it is on the map at all.
|
|
20
|
+
*/
|
|
21
|
+
interface PoiDrawing {
|
|
22
|
+
readonly client: MapClient;
|
|
23
|
+
readonly drawn: boolean;
|
|
24
|
+
readonly layers: Layers;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* useStudioPoiLayers shows and hides the render layers of the points-of-interest overlay to
|
|
29
|
+
* match the store's active groups.
|
|
30
|
+
*
|
|
31
|
+
* `poiLayerVisibility` in `@mountaya/studio` answers each layer's visibility: a layer shows
|
|
32
|
+
* when the group that owns its key is active, and a layer no group owns shows always. This
|
|
33
|
+
* hook writes that answer with `client.setTileLayerVisibility`.
|
|
34
|
+
*
|
|
35
|
+
* It owns the layers' visibility and nothing else. Whether the overlay's tile source is on
|
|
36
|
+
* the map is `useStudioEnrichment`'s, and the store keeps the active groups and the active
|
|
37
|
+
* enrichments in step. The client records a layer's visibility before its source is added and
|
|
38
|
+
* replays it across style reloads, so a first drawing takes the values whichever hook runs
|
|
39
|
+
* first. Mount it after `useStudioEnrichment`, as `useStudioMapBindings` does, for the drawings
|
|
40
|
+
* that follow (below).
|
|
41
|
+
*
|
|
42
|
+
* **It writes only what changed.** The effect depends on the whole manifest, so a refetch that
|
|
43
|
+
* answers an identical document runs it again, and one toggle runs it for every layer of
|
|
44
|
+
* every group. Each write reaches the renderer's layout, which marks the style dirty and
|
|
45
|
+
* schedules a repaint whether or not the value moved, so an unconditional pass turns one
|
|
46
|
+
* checkbox into a repaint of dozens of layers. The last value written per layer is kept and
|
|
47
|
+
* compared first.
|
|
48
|
+
*
|
|
49
|
+
* **What it kept belongs to one drawing of the overlay.** A client forgets the visibility of
|
|
50
|
+
* every layer it takes off the map, so the overlay drawn again comes back with every layer
|
|
51
|
+
* shown. It is drawn again whenever `useStudioEnrichment` removes it and adds it back: from
|
|
52
|
+
* another scope's manifest, after the last group was switched off and one back on, and for a
|
|
53
|
+
* viewer who holds `map-pois` again.
|
|
54
|
+
* Each of those ends the record, and every layer is written again. The client writes a value
|
|
55
|
+
* after a removal queued before it, so with this hook mounted after `useStudioEnrichment` the
|
|
56
|
+
* removal cannot forget what it writes.
|
|
57
|
+
*
|
|
58
|
+
* @param client The map whose layers are toggled, or null while none is mounted.
|
|
59
|
+
*/
|
|
60
|
+
export const useStudioPoiLayers = (client: MapClient | null): void => {
|
|
61
|
+
const { manifest: layers } = useMountayaLayersManifest();
|
|
62
|
+
const activePoiGroups = useUiStore((state) => state.activePoiGroups);
|
|
63
|
+
// Whether the overlay is on the map, read through the gate `useStudioEnrichment` draws it by, so
|
|
64
|
+
// the two hooks agree on every drawing. The slug alone is read from the store, so a toggle of
|
|
65
|
+
// another enrichment renders nothing here.
|
|
66
|
+
const poisActive = useUiStore((state) => state.activeEnrichments.includes(POIS_OVERLAY_SLUG));
|
|
67
|
+
const overlaysEntitled = useStudioOverlaysEntitled();
|
|
68
|
+
const poisEntitled = useStudioViewerEntitlement(useStudioViewer(), "map-pois");
|
|
69
|
+
|
|
70
|
+
// What was last written, and for which drawing. A visibility record lives on the client and
|
|
71
|
+
// lasts as long as the overlay holding the layer, so a second client, another manifest and
|
|
72
|
+
// an overlay drawn again each know nothing, and every layer is written again.
|
|
73
|
+
const written = useRef<{ drawing: PoiDrawing | null; visibility: Map<string, boolean> }>({
|
|
74
|
+
drawing: null,
|
|
75
|
+
visibility: new Map(),
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (!client || !layers) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const wanted = poiLayerVisibility(layers, activePoiGroups);
|
|
84
|
+
if (wanted.length === 0) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const drawn =
|
|
89
|
+
permittedEnrichmentOverlays(
|
|
90
|
+
layers,
|
|
91
|
+
poisActive ? [POIS_OVERLAY_SLUG] : [],
|
|
92
|
+
overlaysEntitled,
|
|
93
|
+
poisEntitled,
|
|
94
|
+
).length > 0;
|
|
95
|
+
const held = written.current.drawing;
|
|
96
|
+
if (held === null || held.client !== client || held.layers !== layers || held.drawn !== drawn) {
|
|
97
|
+
written.current = { drawing: { client, drawn, layers }, visibility: new Map() };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const { visibility } = written.current;
|
|
101
|
+
for (const { layerId, visible } of wanted) {
|
|
102
|
+
if (visibility.get(layerId) === visible) {
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
visibility.set(layerId, visible);
|
|
107
|
+
client.setTileLayerVisibility(layerId, visible);
|
|
108
|
+
}
|
|
109
|
+
}, [client, activePoiGroups, layers, overlaysEntitled, poisActive, poisEntitled]);
|
|
110
|
+
};
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
|
|
3
|
+
import type { ItineraryWithDetails } from "@mountaya/client";
|
|
4
|
+
import type { MapClient } from "@mountaya/elements/editor";
|
|
5
|
+
import { boundsOf } from "@mountaya/elements/geo";
|
|
6
|
+
import type {
|
|
7
|
+
ItineraryDraft,
|
|
8
|
+
PreviewGlyphs,
|
|
9
|
+
SuggestionCandidate,
|
|
10
|
+
SuggestionPreviewInputs,
|
|
11
|
+
SuggestRouteType,
|
|
12
|
+
ZonePreview,
|
|
13
|
+
} from "@mountaya/studio";
|
|
14
|
+
import {
|
|
15
|
+
draftGeometries,
|
|
16
|
+
previewProjection,
|
|
17
|
+
selectActiveDraftSession,
|
|
18
|
+
selectSuggestionSession,
|
|
19
|
+
} from "@mountaya/studio";
|
|
20
|
+
|
|
21
|
+
import { useUiStoreShallow } from "../../headless/hooks/useUiStoreShallow.js";
|
|
22
|
+
import { useStudioMapEditSeams } from "./useStudioMapEditSeams.js";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* PreviewState is every store value the preview paint reads, in one shallow-compared snapshot:
|
|
26
|
+
* the active draft, the ids of the entities under a live geometry edit, the open suggest
|
|
27
|
+
* session's candidates and endpoints, the zone panel's reachability preview, and the open
|
|
28
|
+
* itinerary.
|
|
29
|
+
*
|
|
30
|
+
* One selector hands the whole set back, so the one effect runs again on any change that
|
|
31
|
+
* matters and computes the one preview again. The suggest session is read as flat fields, since
|
|
32
|
+
* a shallow comparison holds a session object built per read to be new every time.
|
|
33
|
+
*/
|
|
34
|
+
interface PreviewState {
|
|
35
|
+
/** The itinerary the editor has open, painted only by a studio whose writes reach no tiles. */
|
|
36
|
+
activeItinerary: ItineraryWithDetails | null;
|
|
37
|
+
candidates: SuggestionCandidate[];
|
|
38
|
+
draft: ItineraryDraft | null;
|
|
39
|
+
/** The working copy `draft` is, kept across its edits, or null with no draft answering. */
|
|
40
|
+
draftId: number | null;
|
|
41
|
+
editSegmentId: string | null;
|
|
42
|
+
editWaypointId: string | null;
|
|
43
|
+
end: [number, number] | null;
|
|
44
|
+
hasSession: boolean;
|
|
45
|
+
routeType: SuggestRouteType;
|
|
46
|
+
selectedSeed: number | null;
|
|
47
|
+
start: [number, number] | null;
|
|
48
|
+
zonePreview: ZonePreview | null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The stable empty list the selector answers for a closed suggest session.
|
|
53
|
+
*
|
|
54
|
+
* The selector is compared shallowly, so it has to hand back the same array on every read with
|
|
55
|
+
* no session: a fresh `[]` each time is a new reference, which reads as a changed snapshot and
|
|
56
|
+
* re-renders without end.
|
|
57
|
+
*/
|
|
58
|
+
const EMPTY_CANDIDATES: SuggestionCandidate[] = [];
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* useStudioPreviewSync paints the map's preview overlay from the studio's store. It is the
|
|
62
|
+
* only writer of `setItineraryPreview` and of `setItineraryExclusions` in this package.
|
|
63
|
+
*
|
|
64
|
+
* A persisted itinerary is drawn by its tiles. A draft, a suggested candidate and a zone's
|
|
65
|
+
* reachability bands have none, so each is painted as a read-only overlay through the map
|
|
66
|
+
* client. `previewProjection` in `@mountaya/studio` decides which of them owns the overlay and
|
|
67
|
+
* what it paints, and this hook applies the answer in one effect, so the overlay has one writer
|
|
68
|
+
* and no source's change clears another's paint.
|
|
69
|
+
*
|
|
70
|
+
* What the binding adds to the rule:
|
|
71
|
+
*
|
|
72
|
+
* - **The paint is a direct client call**, a reflection of store state, as `useStudioMapSync`
|
|
73
|
+
* applies the base terrain. `client.setItineraryPreview` replaces what it holds, waits for
|
|
74
|
+
* the style to load and replays after a base-map switch, so applying the same answer again
|
|
75
|
+
* is safe and nothing here waits on the style.
|
|
76
|
+
* - **A draft is framed once**, through the `studio.map.fitBounds` tool, so an import a reader
|
|
77
|
+
* made and one an agent issued frame through one path. The guard is the working copy the
|
|
78
|
+
* session names (`draftId`): an edit of the draft (a speed, a removed segment, a rename)
|
|
79
|
+
* repaints and leaves the camera where the reader put it, and a draft staged in its place
|
|
80
|
+
* frames again.
|
|
81
|
+
* - **A suggestion is painted while its session stands.** A session ends as its surface leaves
|
|
82
|
+
* the screen, so a session that stands is the surface's that shows or the co-pilot's, which
|
|
83
|
+
* takes no surface and paints from the start. A staged draft takes the overlay over it.
|
|
84
|
+
* - **Whether the store paints the open itinerary** is read off the persistence seam on the
|
|
85
|
+
* tool context (`persistence.tiled`), never guessed from the shape of a client. A context
|
|
86
|
+
* with no `api` persists nothing, so there is no local write to paint.
|
|
87
|
+
* - **The overlay is cleared** when the answer moves on and when the hook unmounts, with the
|
|
88
|
+
* tile exclusions it set, so no source or layer outlives what it showed.
|
|
89
|
+
*
|
|
90
|
+
* @param client The map to paint on, or null while none is mounted.
|
|
91
|
+
* @param glyphs The marker vocabulary the previews are drawn with.
|
|
92
|
+
*/
|
|
93
|
+
export const useStudioPreviewSync = (client: MapClient | null, glyphs: PreviewGlyphs): void => {
|
|
94
|
+
const { bus, context } = useStudioMapEditSeams();
|
|
95
|
+
const {
|
|
96
|
+
activeItinerary,
|
|
97
|
+
candidates,
|
|
98
|
+
draft,
|
|
99
|
+
draftId,
|
|
100
|
+
editSegmentId,
|
|
101
|
+
editWaypointId,
|
|
102
|
+
end,
|
|
103
|
+
hasSession,
|
|
104
|
+
routeType,
|
|
105
|
+
selectedSeed,
|
|
106
|
+
start,
|
|
107
|
+
zonePreview,
|
|
108
|
+
} = useUiStoreShallow((state): PreviewState => {
|
|
109
|
+
const session = selectSuggestionSession(state);
|
|
110
|
+
const drafting = selectActiveDraftSession(state);
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
activeItinerary: state.activeItinerary,
|
|
114
|
+
candidates: session?.candidates ?? EMPTY_CANDIDATES,
|
|
115
|
+
draft: drafting?.draft ?? null,
|
|
116
|
+
draftId: drafting?.draftId ?? null,
|
|
117
|
+
editSegmentId: state.segmentEditSession?.segmentId ?? null,
|
|
118
|
+
editWaypointId: state.waypointEditSession?.waypointId ?? null,
|
|
119
|
+
end: session?.end ?? null,
|
|
120
|
+
hasSession: session !== null,
|
|
121
|
+
routeType: session?.routeType ?? "loop",
|
|
122
|
+
selectedSeed: session?.selectedSeed ?? null,
|
|
123
|
+
start: session?.start ?? null,
|
|
124
|
+
zonePreview: state.zonePreview,
|
|
125
|
+
};
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// The working copy framed last. Every write of a draft puts a new object in the session, so
|
|
129
|
+
// the object tells nothing: `draftId` is kept across the edits of one working copy and minted
|
|
130
|
+
// for a draft staged in its place.
|
|
131
|
+
const framedDraftIdRef = useRef<number | null>(null);
|
|
132
|
+
|
|
133
|
+
const tiled = context.api?.persistence.tiled !== false;
|
|
134
|
+
|
|
135
|
+
useEffect(() => {
|
|
136
|
+
const suggestion: SuggestionPreviewInputs | null = hasSession
|
|
137
|
+
? { candidates, end, routeType, selectedSeed, start }
|
|
138
|
+
: null;
|
|
139
|
+
|
|
140
|
+
if (!client) {
|
|
141
|
+
framedDraftIdRef.current = null;
|
|
142
|
+
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const projection = previewProjection(glyphs, {
|
|
147
|
+
activeItinerary,
|
|
148
|
+
draft,
|
|
149
|
+
editSegmentId,
|
|
150
|
+
editWaypointId,
|
|
151
|
+
suggestion,
|
|
152
|
+
tiled,
|
|
153
|
+
zonePreview,
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
// The tile copy steps aside before its replacement is painted: both on the map at once is
|
|
157
|
+
// two versions of one itinerary.
|
|
158
|
+
if (projection.exclusions) {
|
|
159
|
+
client.setItineraryExclusions(projection.exclusions);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
client.setItineraryPreview(projection.render);
|
|
163
|
+
|
|
164
|
+
if (projection.draft === null) {
|
|
165
|
+
framedDraftIdRef.current = null;
|
|
166
|
+
} else if (framedDraftIdRef.current !== draftId) {
|
|
167
|
+
framedDraftIdRef.current = draftId;
|
|
168
|
+
|
|
169
|
+
const bounds = boundsOf(draftGeometries(projection.draft));
|
|
170
|
+
if (bounds) {
|
|
171
|
+
void bus.dispatch(context, "studio.map.fitBounds", { bounds });
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (projection.render === null) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return () => {
|
|
180
|
+
if (projection.exclusions) {
|
|
181
|
+
client.setItineraryExclusions({ segmentIds: [], waypointIds: [] });
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
client.setItineraryPreview(null);
|
|
185
|
+
};
|
|
186
|
+
}, [
|
|
187
|
+
activeItinerary,
|
|
188
|
+
bus,
|
|
189
|
+
candidates,
|
|
190
|
+
client,
|
|
191
|
+
context,
|
|
192
|
+
draft,
|
|
193
|
+
draftId,
|
|
194
|
+
editSegmentId,
|
|
195
|
+
editWaypointId,
|
|
196
|
+
end,
|
|
197
|
+
glyphs,
|
|
198
|
+
hasSession,
|
|
199
|
+
routeType,
|
|
200
|
+
selectedSeed,
|
|
201
|
+
start,
|
|
202
|
+
tiled,
|
|
203
|
+
zonePreview,
|
|
204
|
+
]);
|
|
205
|
+
};
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
|
|
3
|
+
import { EDIT_CROSS_CURSOR } from "@mountaya/elements";
|
|
4
|
+
import { LIVE_SEGMENT_THROTTLE_MS } from "@mountaya/elements/collab";
|
|
5
|
+
import type { MapClient } from "@mountaya/elements/editor";
|
|
6
|
+
import { DIRECTIONS_VIA_MAX } from "@mountaya/elements/geo";
|
|
7
|
+
import {
|
|
8
|
+
buildSegmentEditCommitInput,
|
|
9
|
+
type SegmentEditTooltipContent,
|
|
10
|
+
type SegmentEditTooltipTexts,
|
|
11
|
+
segmentEditTooltipContent,
|
|
12
|
+
selectBaseMapLocked,
|
|
13
|
+
} from "@mountaya/studio";
|
|
14
|
+
import { SegmentDraftEngine } from "@mountaya/studio/engines";
|
|
15
|
+
|
|
16
|
+
import { useUiStore } from "../../headless/hooks/useUiStore.js";
|
|
17
|
+
import { useStudioScopedStrings } from "../../headless/providers/studioStrings.js";
|
|
18
|
+
import { useStudioEditCommitReporter } from "./useStudioEditCommitReporter.js";
|
|
19
|
+
import { type EditEngineConfig, useStudioEditEngine } from "./useStudioEditEngine.js";
|
|
20
|
+
import { type PeerDraftSink, useStudioMapEditSeams } from "./useStudioMapEditSeams.js";
|
|
21
|
+
|
|
22
|
+
/** The sections these words come from: this module's own, and the parts it mounts. */
|
|
23
|
+
const SECTIONS = ["editing"] as const;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The window a segment edit's live segment is paced to, IMPORTED rather than declared, and
|
|
27
|
+
* republished so a consumer of this hook can read it without naming a second package.
|
|
28
|
+
*
|
|
29
|
+
* It is the default `throttleMs` of the `SegmentDraftEngine` this hook drives, and the rate a
|
|
30
|
+
* `CollabEngine` sends the same live segment to a peer at: one decision seen from either end of
|
|
31
|
+
* the wire, which a peer's preview advances as smoothly as the local profile only while both keep.
|
|
32
|
+
*/
|
|
33
|
+
export { LIVE_SEGMENT_THROTTLE_MS };
|
|
34
|
+
|
|
35
|
+
/** inertListener is the listener the hook's own subscription holds the engine's lifecycle with. */
|
|
36
|
+
const inertListener = (): void => {};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* useStudioSegmentEditing owns the live interaction layer of a segment geometry edit, active
|
|
40
|
+
* only while an edit session is open. It is the human and agent shared editing surface seen from
|
|
41
|
+
* the app: every effect it runs is keyed off the store's edit session (which the editBegin,
|
|
42
|
+
* editCommit and editCancel tools open and close), and every action it issues (the commit,
|
|
43
|
+
* cancel, undo and redo keys) dispatches through the bus, so a human dragging vertices and the
|
|
44
|
+
* agent editing the same segment drive one mutation surface.
|
|
45
|
+
*
|
|
46
|
+
* The machine is `SegmentDraftEngine` in `@mountaya/studio/engines`. It arms the map's segment
|
|
47
|
+
* editor for the open session, decides what each draft does (dropped while the co-pilot drives,
|
|
48
|
+
* previewed when programmatic, recorded otherwise, one undo step per gesture), paces the routed
|
|
49
|
+
* profile onto the live segment the elevation panel reads, hands the same segment to
|
|
50
|
+
* `collabEngine`, falls back when no route resolves, raises the via ceiling's warning and asks
|
|
51
|
+
* once about a route's hazards. It never ends an edit: the tool path that commits or cancels
|
|
52
|
+
* one owns the disposal. This binding does only what React must: hold the engine for the
|
|
53
|
+
* component's life, hand it the render's inputs after every render, and keep it subscribed while
|
|
54
|
+
* mounted.
|
|
55
|
+
*
|
|
56
|
+
* What stays here is the component's own surface, run by the shared `useStudioEditEngine`
|
|
57
|
+
* driver while a session is open: the editing cross as the base cursor, the two-line tooltip
|
|
58
|
+
* whose primary line and tone follow the engine's via count, the Enter-to-save hint the count
|
|
59
|
+
* drops once a routed draft nears the router's ceiling, and the editing keyboard, whose commit
|
|
60
|
+
* reads the draft off the map (`getSegmentDraft`) and reports a refusal the way the sidenav's Save
|
|
61
|
+
* does.
|
|
62
|
+
*
|
|
63
|
+
* Nothing is disposed on unmount: unsubscribing parks the engine, which stops reading drafts,
|
|
64
|
+
* drops a pending route and clears the live segment, and which survives StrictMode tearing an
|
|
65
|
+
* effect down and setting it up again with the same object.
|
|
66
|
+
*
|
|
67
|
+
* @param client The map the edit runs on, or null while none is mounted.
|
|
68
|
+
* @param collabEngine The collaboration session the live segment is forwarded to, or null
|
|
69
|
+
* when the studio has none.
|
|
70
|
+
*/
|
|
71
|
+
export const useStudioSegmentEditing = (
|
|
72
|
+
client: MapClient | null,
|
|
73
|
+
collabEngine: PeerDraftSink | null,
|
|
74
|
+
): void => {
|
|
75
|
+
const { bus, context } = useStudioMapEditSeams();
|
|
76
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
77
|
+
const reportCommit = useStudioEditCommitReporter(words.editing.segmentSaveFailed);
|
|
78
|
+
|
|
79
|
+
const [engine] = useState(
|
|
80
|
+
() => new SegmentDraftEngine({ bus, client, collab: collabEngine, context, strings: words }),
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
// After every render, with no dependency list: the engine is what knows which change arms
|
|
84
|
+
// again, and an unchanged configuration costs it a comparison. Declared before the lifecycle
|
|
85
|
+
// and the driver below, so a replaced client is armed before the cursor is locked on it.
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
engine.configure({ bus, client, collab: collabEngine, context, strings: words });
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// The engine's lifecycle is this subscription: the first one starts it and unsubscribing on
|
|
91
|
+
// unmount parks it.
|
|
92
|
+
useEffect(() => engine.subscribe(inertListener), [engine]);
|
|
93
|
+
|
|
94
|
+
// Narrow selectors: the editing surface mounts and tears down on the locked-ness flip and on
|
|
95
|
+
// the edited segment, its mode or the owning itinerary changing, never on a draft push within
|
|
96
|
+
// the session. The colour and the draft name are read for the commit input the keyboard builds.
|
|
97
|
+
const editActive = useUiStore(selectBaseMapLocked);
|
|
98
|
+
const segmentId = useUiStore((state) => state.segmentEditSession?.segmentId ?? null);
|
|
99
|
+
const mode = useUiStore((state) => state.segmentEditSession?.mode ?? null);
|
|
100
|
+
const itineraryId = useUiStore((state) => state.activeItinerary?.id ?? null);
|
|
101
|
+
const editColor = useUiStore((state) => state.segmentEditSession?.draftColor ?? null);
|
|
102
|
+
// The draft name is set only for a from-scratch segment; it routes the commit to a create
|
|
103
|
+
// rather than an update of an existing segment, the same way the Save cluster does.
|
|
104
|
+
const draftName = useUiStore((state) => state.segmentEditSession?.draftName ?? null);
|
|
105
|
+
|
|
106
|
+
// The tooltip's words, in a ref so the controller reads the current language per frame
|
|
107
|
+
// without re-attaching.
|
|
108
|
+
const textsRef = useRef<SegmentEditTooltipTexts>({
|
|
109
|
+
addPoint: "",
|
|
110
|
+
finishHint: "",
|
|
111
|
+
reshape: "",
|
|
112
|
+
viaCapCounter: () => "",
|
|
113
|
+
viaCapReached: "",
|
|
114
|
+
});
|
|
115
|
+
// The controller's setHintText seam, driven by the locale effect and by the engine's count so
|
|
116
|
+
// the open tooltip relabels without remounting.
|
|
117
|
+
const tooltipSetHintRef = useRef<((text: string | null) => void) | null>(null);
|
|
118
|
+
|
|
119
|
+
// What the tooltip shows for the engine's current count, read per frame rather than rendered:
|
|
120
|
+
// the count moves with the draft, and a render per handle added is not a cost worth paying for
|
|
121
|
+
// a line of text.
|
|
122
|
+
const tooltipContent = useCallback((): SegmentEditTooltipContent => {
|
|
123
|
+
const { mode: armedMode, viaCount } = engine.getSnapshot();
|
|
124
|
+
|
|
125
|
+
return segmentEditTooltipContent(textsRef.current, viaCount, armedMode ?? "directions");
|
|
126
|
+
}, [engine]);
|
|
127
|
+
|
|
128
|
+
// Drops or restores the hint as a routed draft crosses into or out of the counter register:
|
|
129
|
+
// above the threshold the tooltip is one glanceable readout, below it the Enter and Escape
|
|
130
|
+
// reminder comes back.
|
|
131
|
+
const syncTooltipHint = useCallback(() => {
|
|
132
|
+
tooltipSetHintRef.current?.(tooltipContent().hint);
|
|
133
|
+
}, [tooltipContent]);
|
|
134
|
+
|
|
135
|
+
// Keeps the captured words current as the language changes, and relabels an open tooltip's
|
|
136
|
+
// hint, without re-running the driver.
|
|
137
|
+
useEffect(() => {
|
|
138
|
+
// The counter's count changes with the draft, so it cannot be captured as a finished string
|
|
139
|
+
// like the rest. It is captured as a formatter memoized on the last count instead, which
|
|
140
|
+
// keeps the tooltip's per-frame path off the i18n runtime but for the frames where the count
|
|
141
|
+
// actually changed.
|
|
142
|
+
let lastCount = -1;
|
|
143
|
+
let lastCounterText = "";
|
|
144
|
+
const viaCapCounter = (count: number): string => {
|
|
145
|
+
if (count !== lastCount) {
|
|
146
|
+
lastCount = count;
|
|
147
|
+
lastCounterText = words.editing.segmentViaCapCounter(count, DIRECTIONS_VIA_MAX);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return lastCounterText;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
textsRef.current = {
|
|
154
|
+
addPoint: words.editing.segmentAddPoint,
|
|
155
|
+
finishHint: words.editing.segmentFinishHint,
|
|
156
|
+
reshape: words.editing.segmentReshape,
|
|
157
|
+
viaCapCounter,
|
|
158
|
+
viaCapReached: words.editing.segmentViaCapReached(DIRECTIONS_VIA_MAX),
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
syncTooltipHint();
|
|
162
|
+
}, [words, syncTooltipHint]);
|
|
163
|
+
|
|
164
|
+
// The segment family's config for the shared driver. Rebuilt each render from the narrow
|
|
165
|
+
// selectors above; the driver reads it through a ref and re-runs only on the `deps` below.
|
|
166
|
+
const config = useMemo<EditEngineConfig>(
|
|
167
|
+
() => ({
|
|
168
|
+
// Reads the current draft off the map and shapes the commit input through the shared
|
|
169
|
+
// builder: a from-scratch segment (a draft name is set) commits as a create, an existing
|
|
170
|
+
// one as an update, the shape the on-map Save cluster builds, so a key press and a click
|
|
171
|
+
// cannot diverge.
|
|
172
|
+
buildCommitInput: () => {
|
|
173
|
+
// A handle is a longitude and a latitude. A position that states fewer is none, and is
|
|
174
|
+
// left out where an assertion would hand the bus an undefined.
|
|
175
|
+
const coordinates: [number, number][] = [];
|
|
176
|
+
for (const [lng, lat] of client?.getSegmentDraft() ?? []) {
|
|
177
|
+
if (lng !== undefined && lat !== undefined) {
|
|
178
|
+
coordinates.push([lng, lat]);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (!mode || !segmentId) {
|
|
182
|
+
return {};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return buildSegmentEditCommitInput({
|
|
186
|
+
coordinates,
|
|
187
|
+
draftColor: editColor,
|
|
188
|
+
draftName,
|
|
189
|
+
itineraryId,
|
|
190
|
+
mode,
|
|
191
|
+
segmentId,
|
|
192
|
+
});
|
|
193
|
+
},
|
|
194
|
+
bus,
|
|
195
|
+
ctx: context,
|
|
196
|
+
cursor: EDIT_CROSS_CURSOR,
|
|
197
|
+
family: "segment",
|
|
198
|
+
// Enter-to-save reports its refusal exactly as the sidenav's Save button does, and a save
|
|
199
|
+
// that left the edit open as its footer does, so the two commit paths stay
|
|
200
|
+
// indistinguishable to the user.
|
|
201
|
+
onCommitResult: reportCommit,
|
|
202
|
+
// The map's drafts are the engine's, read from the moment it arms the session. What the
|
|
203
|
+
// tooltip follows is the engine's count, for as long as the tooltip is up.
|
|
204
|
+
subscribeDraft: () => engine.subscribe(syncTooltipHint),
|
|
205
|
+
tooltipHint: () => textsRef.current.finishHint,
|
|
206
|
+
tooltipHintRef: tooltipSetHintRef,
|
|
207
|
+
tooltipPrimaryText: () => tooltipContent().primary,
|
|
208
|
+
tooltipTone: () => tooltipContent().tone,
|
|
209
|
+
}),
|
|
210
|
+
[
|
|
211
|
+
bus,
|
|
212
|
+
context,
|
|
213
|
+
client,
|
|
214
|
+
draftName,
|
|
215
|
+
editColor,
|
|
216
|
+
engine,
|
|
217
|
+
itineraryId,
|
|
218
|
+
mode,
|
|
219
|
+
reportCommit,
|
|
220
|
+
segmentId,
|
|
221
|
+
syncTooltipHint,
|
|
222
|
+
tooltipContent,
|
|
223
|
+
],
|
|
224
|
+
);
|
|
225
|
+
|
|
226
|
+
// The shared driver runs the cursor, tooltip, draft-follow and keyboard lifecycle and its
|
|
227
|
+
// exact inverse. It never touches the map's editor: the engine arms it and the tool path
|
|
228
|
+
// disposes it. It is enabled only while the map is live and a complete session is open,
|
|
229
|
+
// re-running on the session selectors.
|
|
230
|
+
const enabled = client !== null && editActive && segmentId !== null && mode !== null;
|
|
231
|
+
useStudioEditEngine(client, enabled, config, [
|
|
232
|
+
editActive,
|
|
233
|
+
segmentId,
|
|
234
|
+
mode,
|
|
235
|
+
itineraryId,
|
|
236
|
+
bus,
|
|
237
|
+
context,
|
|
238
|
+
]);
|
|
239
|
+
};
|