@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,692 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Checkbox,
|
|
4
|
+
Group,
|
|
5
|
+
Skeleton,
|
|
6
|
+
Stack,
|
|
7
|
+
Text,
|
|
8
|
+
Textarea,
|
|
9
|
+
TextInput,
|
|
10
|
+
Tooltip,
|
|
11
|
+
} from "@mantine/core";
|
|
12
|
+
import { type FormEvent, memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
type CollectionFormValues,
|
|
16
|
+
type CollectionsTarget,
|
|
17
|
+
canEditCollection,
|
|
18
|
+
collectionCreateScope,
|
|
19
|
+
collectionFormSchema,
|
|
20
|
+
DESCRIPTION_MAX_LENGTH,
|
|
21
|
+
type EntityCollection,
|
|
22
|
+
} from "@mountaya/studio";
|
|
23
|
+
import { mapToolError } from "@mountaya/studio/strings";
|
|
24
|
+
|
|
25
|
+
import { useUnsavedEditsGuard } from "../../guards/hooks/useUnsavedEditsGuard.js";
|
|
26
|
+
import { useStudioDispatch } from "../../headless/hooks/useStudioDispatch.js";
|
|
27
|
+
import { useUiStore } from "../../headless/hooks/useUiStore.js";
|
|
28
|
+
import { useStudioNotify } from "../../headless/providers/notify.js";
|
|
29
|
+
import { useStudioOrganizations } from "../../headless/providers/organizations.js";
|
|
30
|
+
import { useStudioScopedStrings } from "../../headless/providers/studioStrings.js";
|
|
31
|
+
import { Glyph } from "../../internal/components/Glyph.js";
|
|
32
|
+
import { useItinerarySubjectById } from "../../itinerary/hooks/useItinerarySubject.js";
|
|
33
|
+
import { AppModal } from "../../modals/components/AppModal.js";
|
|
34
|
+
import { ModalFooter } from "../../modals/components/ModalFooter.js";
|
|
35
|
+
import { DialogSubject } from "../../primitives/components/DialogSubject.js";
|
|
36
|
+
import { DisabledReason } from "../../primitives/components/DisabledReason.js";
|
|
37
|
+
import { FormErrorAlert } from "../../primitives/components/FormErrorAlert.js";
|
|
38
|
+
import { PrivacyControl } from "../../primitives/components/PrivacyControl.js";
|
|
39
|
+
import { menuActionIcons } from "../../rules/menuActions.js";
|
|
40
|
+
import { iconSizes } from "../../rules/sizing.js";
|
|
41
|
+
import { useEntityCollections } from "../hooks/useEntityCollections.js";
|
|
42
|
+
|
|
43
|
+
/** The sections these words come from: this module's own, and the parts it mounts. */
|
|
44
|
+
const SECTIONS = ["actions", "editor", "formError", "manageCollections", "privacy"] as const;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* ManageCollectionsIcon is the collection glyph, read from the registry the menu item
|
|
48
|
+
* that opens this dialog reads, so the trigger and the header cannot drift apart.
|
|
49
|
+
*/
|
|
50
|
+
const ManageCollectionsIcon = menuActionIcons.manageCollections;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* CollectionCheckboxBase is one editable collection in the picker. Toggling it
|
|
54
|
+
* dispatches the family's add or remove tool for the target entity. The checked
|
|
55
|
+
* state comes from the server membership flag and refreshes through cache
|
|
56
|
+
* invalidation, so the box is controlled by the query, not local state.
|
|
57
|
+
*
|
|
58
|
+
* That last property is exactly why a refusal has to be SAID. The box is the query's value, so
|
|
59
|
+
* a rejected write leaves it snapping back to where it was: a 403, a conflict and a limit of the
|
|
60
|
+
* agreement are one indistinguishable flicker. The row is not a form and has no field to pin a
|
|
61
|
+
* message to, so the reason goes to a notification, the same affordance the in-form picker uses
|
|
62
|
+
* for its own out-of-band failures.
|
|
63
|
+
*
|
|
64
|
+
* The in-flight write does NOT disable the box. A disabled input leaves the tab order,
|
|
65
|
+
* so toggling with Space would drop focus to the document body, and the round trip awaits
|
|
66
|
+
* three cache evictions including their active refetches, so that would be every file, on
|
|
67
|
+
* every row. The re-entry guard lives in the handler instead, where it refuses a second
|
|
68
|
+
* dispatch without moving the control, and `aria-busy` says the row is working so the wait
|
|
69
|
+
* is announced rather than silent.
|
|
70
|
+
*/
|
|
71
|
+
const CollectionCheckboxBase = ({
|
|
72
|
+
collection,
|
|
73
|
+
target,
|
|
74
|
+
}: {
|
|
75
|
+
collection: EntityCollection;
|
|
76
|
+
target: CollectionsTarget;
|
|
77
|
+
}) => {
|
|
78
|
+
const notify = useStudioNotify();
|
|
79
|
+
const { dispatch } = useStudioDispatch();
|
|
80
|
+
|
|
81
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
82
|
+
const [pending, setPending] = useState(false);
|
|
83
|
+
// The guard the handler reads, held in a ref rather than in `pending`: the state
|
|
84
|
+
// drives a render and the ref answers the very next event, before React has had a
|
|
85
|
+
// chance to re-render, which is exactly the window a double press falls in.
|
|
86
|
+
const dispatching = useRef(false);
|
|
87
|
+
|
|
88
|
+
const toggle = useCallback(async () => {
|
|
89
|
+
if (dispatching.current) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
dispatching.current = true;
|
|
94
|
+
setPending(true);
|
|
95
|
+
try {
|
|
96
|
+
// Branch the tool by entity family: a zone toggles studio.collection.addZone /
|
|
97
|
+
// removeZone, an itinerary the addItinerary / removeItinerary pair. Both take
|
|
98
|
+
// the same { collectionId, <entity>Id } shape, keyed by the target's id.
|
|
99
|
+
const result =
|
|
100
|
+
target.entity === "zone"
|
|
101
|
+
? await dispatch(
|
|
102
|
+
collection.has ? "studio.collection.removeZone" : "studio.collection.addZone",
|
|
103
|
+
{ collectionId: collection.id, zoneId: target.entityId },
|
|
104
|
+
)
|
|
105
|
+
: await dispatch(
|
|
106
|
+
collection.has
|
|
107
|
+
? "studio.collection.removeItinerary"
|
|
108
|
+
: "studio.collection.addItinerary",
|
|
109
|
+
{ collectionId: collection.id, itineraryId: target.entityId },
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
if (!result.ok) {
|
|
113
|
+
notify.error(mapToolError(result, { copy: words.formError, resource: "collection" }));
|
|
114
|
+
}
|
|
115
|
+
} finally {
|
|
116
|
+
dispatching.current = false;
|
|
117
|
+
setPending(false);
|
|
118
|
+
}
|
|
119
|
+
}, [dispatch, collection.has, collection.id, words, notify, target]);
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
<Checkbox
|
|
123
|
+
aria-busy={pending}
|
|
124
|
+
checked={collection.has}
|
|
125
|
+
label={collection.name}
|
|
126
|
+
onChange={() => void toggle()}
|
|
127
|
+
/>
|
|
128
|
+
);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
// One row per collection, and the list re-renders on every checkbox
|
|
132
|
+
// press: without the boundary, ticking one collection rebuilds every other row in the modal.
|
|
133
|
+
const CollectionCheckbox = memo(CollectionCheckboxBase);
|
|
134
|
+
|
|
135
|
+
/** NewCollectionFiling is what the inline create is made for. */
|
|
136
|
+
interface NewCollectionFiling {
|
|
137
|
+
/** The target's own organization, or null for a personal resource. */
|
|
138
|
+
readonly organizationId: string | null;
|
|
139
|
+
/** The resource the new collection is created to hold. */
|
|
140
|
+
readonly target: CollectionsTarget;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* useFileNewCollection answers the writes behind the inline create: the collection is created in
|
|
145
|
+
* the target's scope and the target is filed in it.
|
|
146
|
+
*
|
|
147
|
+
* @returns A function that takes the form's parsed values and answers null once the target is
|
|
148
|
+
* filed, or the sentence the form's alert shows where a write was refused.
|
|
149
|
+
*/
|
|
150
|
+
const useFileNewCollection = ({ organizationId, target }: NewCollectionFiling) => {
|
|
151
|
+
const { isPersonalScope } = useStudioOrganizations();
|
|
152
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
153
|
+
const { dispatch } = useStudioDispatch();
|
|
154
|
+
|
|
155
|
+
return useCallback(
|
|
156
|
+
async (values: CollectionFormValues): Promise<string | null> => {
|
|
157
|
+
// An itinerary target creates + adds atomically (the create tool's
|
|
158
|
+
// itineraryId path); a zone target creates the bare collection (no
|
|
159
|
+
// itineraryId) and is added in the follow-up dispatch below. Either way the
|
|
160
|
+
// new collection is created in the target's own organization, so the add
|
|
161
|
+
// that follows is never a cross-organization one.
|
|
162
|
+
//
|
|
163
|
+
// The personal scope has ONE spelling on the wire (the absent key), and this
|
|
164
|
+
// scope comes off the resource record, which carries the root organization's
|
|
165
|
+
// real id for personal content. Naming it would send the same scope under a
|
|
166
|
+
// second name, which is the spelling the listing endpoints refuse and the one
|
|
167
|
+
// every other create in the studio already drops.
|
|
168
|
+
const result = await dispatch("studio.collection.create", {
|
|
169
|
+
description: values.description,
|
|
170
|
+
isPrivate: values.isPrivate,
|
|
171
|
+
itineraryId: target.entity === "itinerary" ? target.entityId : undefined,
|
|
172
|
+
name: values.name,
|
|
173
|
+
organizationId: collectionCreateScope(organizationId, isPersonalScope),
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
if (!result.ok) {
|
|
177
|
+
// Every failure (a duplicate name, the structured `conflict` code, and any
|
|
178
|
+
// other code) resolves through the shared mapper into the inline alert.
|
|
179
|
+
return mapToolError(result, { copy: words.formError, resource: "collection" });
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// The create tool returns the new collection id in data; a zone target
|
|
183
|
+
// adds itself into it now (the create's atomic add is itinerary-only).
|
|
184
|
+
//
|
|
185
|
+
// The add is checked, not fired and forgotten. It is a second call that can
|
|
186
|
+
// fail on its own, and the collection already exists by then, so reporting
|
|
187
|
+
// success would leave the user looking at a collection their zone is not in,
|
|
188
|
+
// with nothing said. The form stays open on the failure so the alert has
|
|
189
|
+
// somewhere to render; the collection is kept rather than rolled back,
|
|
190
|
+
// because it is a legitimate empty collection the user asked for.
|
|
191
|
+
if (target.entity === "zone") {
|
|
192
|
+
// The id is the typed answer's own member, read with no parsing reader.
|
|
193
|
+
const { collectionId } = result.data;
|
|
194
|
+
// An answer naming no collection is the same outcome as a failed add: the collection
|
|
195
|
+
// exists, the zone is not in it, and no id is left to retry with. It takes the
|
|
196
|
+
// same alert, so the form never reports a filing that did not happen.
|
|
197
|
+
if (collectionId === "") {
|
|
198
|
+
return words.manageCollections.create.incomplete;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const added = await dispatch("studio.collection.addZone", {
|
|
202
|
+
collectionId,
|
|
203
|
+
zoneId: target.entityId,
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
if (!added.ok) {
|
|
207
|
+
return mapToolError(added, { copy: words.formError, resource: "collection" });
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return null;
|
|
212
|
+
},
|
|
213
|
+
[dispatch, isPersonalScope, organizationId, target, words],
|
|
214
|
+
);
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* useCreateCollectionDraft holds the inline create's fields.
|
|
219
|
+
*
|
|
220
|
+
* The dialog holds them rather than the form, because the dialog is what a dismissal reaches:
|
|
221
|
+
* its close button, Escape and the overlay ask before dropping a name the reader typed, and
|
|
222
|
+
* can only ask about a draft they can read.
|
|
223
|
+
*/
|
|
224
|
+
const useCreateCollectionDraft = () => {
|
|
225
|
+
const [name, setName] = useState("");
|
|
226
|
+
const [description, setDescription] = useState("");
|
|
227
|
+
const [isPrivate, setIsPrivate] = useState(true);
|
|
228
|
+
|
|
229
|
+
const reset = useCallback(() => {
|
|
230
|
+
setName("");
|
|
231
|
+
setDescription("");
|
|
232
|
+
setIsPrivate(true);
|
|
233
|
+
}, []);
|
|
234
|
+
|
|
235
|
+
return {
|
|
236
|
+
/** Whether the draft differs from the empty, private form it opens on. */
|
|
237
|
+
changed: name !== "" || description !== "" || !isPrivate,
|
|
238
|
+
description,
|
|
239
|
+
isPrivate,
|
|
240
|
+
name,
|
|
241
|
+
reset,
|
|
242
|
+
setDescription,
|
|
243
|
+
setIsPrivate,
|
|
244
|
+
setName,
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
/** CreateCollectionDraft is the inline create's fields, their setters and whether they moved. */
|
|
249
|
+
type CreateCollectionDraft = ReturnType<typeof useCreateCollectionDraft>;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* CreateCollectionForm is the inline "create a collection in the process" form. It
|
|
253
|
+
* dispatches studio.collection.create in the TARGET's organization, passing the
|
|
254
|
+
* itinerary id for an itinerary target so the new collection is created and the
|
|
255
|
+
* itinerary added in one action; for a zone target it creates the collection, then
|
|
256
|
+
* dispatches studio.collection.addZone (the create tool's atomic add is
|
|
257
|
+
* itinerary-only). The organization is what makes either add possible: a collection
|
|
258
|
+
* only ever holds resources from its own organization, so filing an organization's
|
|
259
|
+
* itinerary into a collection created in the caller's personal scope is refused. On
|
|
260
|
+
* success the picker's cache is invalidated by the tool(s), so the new collection
|
|
261
|
+
* appears already checked, and it notifies the host through onCreated; the shared
|
|
262
|
+
* ModalFooter pairs that submit with a Cancel that calls onCancel, and both collapse
|
|
263
|
+
* the form back to the list. The form validates against the shared
|
|
264
|
+
* collectionFormSchema (each breach on its field), and routes every submit-time
|
|
265
|
+
* failure (a duplicate-name conflict and any other code) through the shared
|
|
266
|
+
* mapToolError into the inline alert above the footer, the same field/alert split the
|
|
267
|
+
* studio form panels use.
|
|
268
|
+
*/
|
|
269
|
+
const CreateCollectionForm = ({
|
|
270
|
+
draft,
|
|
271
|
+
onCancel,
|
|
272
|
+
onCreated,
|
|
273
|
+
organizationId,
|
|
274
|
+
target,
|
|
275
|
+
}: {
|
|
276
|
+
draft: CreateCollectionDraft;
|
|
277
|
+
onCancel: () => void;
|
|
278
|
+
onCreated: () => void;
|
|
279
|
+
organizationId: string | null;
|
|
280
|
+
target: CollectionsTarget;
|
|
281
|
+
}) => {
|
|
282
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
283
|
+
const fileNewCollection = useFileNewCollection({ organizationId, target });
|
|
284
|
+
|
|
285
|
+
const { description, isPrivate, name, setDescription, setIsPrivate, setName } = draft;
|
|
286
|
+
|
|
287
|
+
// The form takes the place of the button that opened it, which held the focus and is gone:
|
|
288
|
+
// the name takes it, as a dialog's first field does on opening. The dialog's own focus trap
|
|
289
|
+
// only places the focus once, when the dialog opens on its list.
|
|
290
|
+
const nameRef = useRef<HTMLInputElement>(null);
|
|
291
|
+
useEffect(() => {
|
|
292
|
+
nameRef.current?.focus();
|
|
293
|
+
}, []);
|
|
294
|
+
|
|
295
|
+
const [nameError, setNameError] = useState<string | null>(null);
|
|
296
|
+
const [descriptionError, setDescriptionError] = useState<string | null>(null);
|
|
297
|
+
const [submitting, setSubmitting] = useState(false);
|
|
298
|
+
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
|
299
|
+
|
|
300
|
+
const submit = useCallback(
|
|
301
|
+
async (event: FormEvent<HTMLFormElement>) => {
|
|
302
|
+
event.preventDefault();
|
|
303
|
+
setNameError(null);
|
|
304
|
+
setDescriptionError(null);
|
|
305
|
+
setErrorMessage(null);
|
|
306
|
+
|
|
307
|
+
// Validate against the shared schema (the same bounds the API enforces)
|
|
308
|
+
// and surface each breach on its field so the bus is only reached with a
|
|
309
|
+
// valid payload. The schema trims, so the dispatched values are the parsed
|
|
310
|
+
// (trimmed) ones.
|
|
311
|
+
const parsed = collectionFormSchema.safeParse({ description, isPrivate, name });
|
|
312
|
+
if (!parsed.success) {
|
|
313
|
+
for (const issue of parsed.error.issues) {
|
|
314
|
+
if (issue.path[0] === "name") {
|
|
315
|
+
setNameError(words.manageCollections.create.nameLength);
|
|
316
|
+
} else if (issue.path[0] === "description") {
|
|
317
|
+
setDescriptionError(words.manageCollections.create.descriptionMax);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// `submitting` is held across BOTH writes, not just the create. Clearing it at
|
|
325
|
+
// the create's boundary would re-arm the button while the chained add was still in
|
|
326
|
+
// flight, so a second press would create a duplicate collection with the same name,
|
|
327
|
+
// which the second create would then reject as a conflict, on top of the collection
|
|
328
|
+
// that did land.
|
|
329
|
+
setSubmitting(true);
|
|
330
|
+
try {
|
|
331
|
+
const refusal = await fileNewCollection(parsed.data);
|
|
332
|
+
if (refusal !== null) {
|
|
333
|
+
setErrorMessage(refusal);
|
|
334
|
+
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
onCreated();
|
|
339
|
+
} finally {
|
|
340
|
+
setSubmitting(false);
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
[words, description, fileNewCollection, isPrivate, name, onCreated],
|
|
344
|
+
);
|
|
345
|
+
|
|
346
|
+
return (
|
|
347
|
+
<form onSubmit={(event) => void submit(event)}>
|
|
348
|
+
<Stack gap="md">
|
|
349
|
+
<TextInput
|
|
350
|
+
error={nameError}
|
|
351
|
+
label={words.manageCollections.create.nameLabel}
|
|
352
|
+
mb={0}
|
|
353
|
+
mt={0}
|
|
354
|
+
onChange={(event) => setName(event.currentTarget.value)}
|
|
355
|
+
ref={nameRef}
|
|
356
|
+
required
|
|
357
|
+
value={name}
|
|
358
|
+
/>
|
|
359
|
+
<Textarea
|
|
360
|
+
autosize
|
|
361
|
+
error={descriptionError}
|
|
362
|
+
label={words.manageCollections.create.descriptionLabel}
|
|
363
|
+
maxLength={DESCRIPTION_MAX_LENGTH}
|
|
364
|
+
maxRows={4}
|
|
365
|
+
mb={0}
|
|
366
|
+
minRows={2}
|
|
367
|
+
mt={0}
|
|
368
|
+
onChange={(event) => setDescription(event.currentTarget.value)}
|
|
369
|
+
value={description}
|
|
370
|
+
/>
|
|
371
|
+
<PrivacyControl onChange={setIsPrivate} resource="collection" value={isPrivate} />
|
|
372
|
+
<FormErrorAlert message={errorMessage} />
|
|
373
|
+
<ModalFooter
|
|
374
|
+
cancelLabel={words.actions.cancel}
|
|
375
|
+
confirmLabel={words.manageCollections.create.submit(
|
|
376
|
+
words.manageCollections.resource[target.entity],
|
|
377
|
+
)}
|
|
378
|
+
onCancel={onCancel}
|
|
379
|
+
pending={submitting}
|
|
380
|
+
/>
|
|
381
|
+
</Stack>
|
|
382
|
+
</form>
|
|
383
|
+
);
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
/** CreateCollectionActionProps carry the inline create's entry, and why it is withheld. */
|
|
387
|
+
interface CreateCollectionActionProps {
|
|
388
|
+
/** Why the create is withheld, or null where it is offered. */
|
|
389
|
+
readonly disabledReason: string | null;
|
|
390
|
+
/** Opens the inline create form. */
|
|
391
|
+
readonly onOpen: () => void;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* CreateCollectionAction is the footer's "Create a new collection" button: live once the
|
|
396
|
+
* target's scope resolved, and disabled with its reason said until then.
|
|
397
|
+
*/
|
|
398
|
+
const CreateCollectionAction = ({ disabledReason, onOpen }: CreateCollectionActionProps) => {
|
|
399
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
400
|
+
|
|
401
|
+
// Disabled until the target's own scope resolves, and never silently:
|
|
402
|
+
// the Tooltip carries the reason to a pointer and DisabledReason carries
|
|
403
|
+
// the same sentence into the button's accessible name, because a disabled
|
|
404
|
+
// button is out of the tab order but still in the accessibility tree. The
|
|
405
|
+
// span shim is what lets the Tooltip fire at all: a disabled Button
|
|
406
|
+
// swallows the pointer events its parent would otherwise receive.
|
|
407
|
+
return disabledReason === null ? (
|
|
408
|
+
<Button
|
|
409
|
+
leftSection={<Glyph name="action-add" size={iconSizes.sm} />}
|
|
410
|
+
onClick={onOpen}
|
|
411
|
+
variant="default"
|
|
412
|
+
>
|
|
413
|
+
{words.manageCollections.create.action}
|
|
414
|
+
</Button>
|
|
415
|
+
) : (
|
|
416
|
+
<Tooltip label={disabledReason} position="bottom">
|
|
417
|
+
<span>
|
|
418
|
+
<Button
|
|
419
|
+
disabled
|
|
420
|
+
leftSection={<Glyph name="action-add" size={iconSizes.sm} />}
|
|
421
|
+
variant="default"
|
|
422
|
+
>
|
|
423
|
+
{words.manageCollections.create.action}
|
|
424
|
+
<DisabledReason>{disabledReason}</DisabledReason>
|
|
425
|
+
</Button>
|
|
426
|
+
</span>
|
|
427
|
+
</Tooltip>
|
|
428
|
+
);
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
/** CollectionMembershipListProps carry the listing the dialog opens on. */
|
|
432
|
+
interface CollectionMembershipListProps {
|
|
433
|
+
/** Every collection the reader can access, or undefined until the listing answers. */
|
|
434
|
+
readonly collections: EntityCollection[] | undefined;
|
|
435
|
+
/** Whether the inline create is offered, which decides whether the empty state points at it. */
|
|
436
|
+
readonly createOffered: boolean;
|
|
437
|
+
/** Whether the listing failed. */
|
|
438
|
+
readonly isError: boolean;
|
|
439
|
+
/** Whether the listing is still loading. */
|
|
440
|
+
readonly isPending: boolean;
|
|
441
|
+
/** Reads the listing again. */
|
|
442
|
+
readonly onRetry: () => void;
|
|
443
|
+
/** The resource whose membership each row toggles. */
|
|
444
|
+
readonly target: CollectionsTarget;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* CollectionMembershipList is the dialog's default body: one checkbox per collection the reader
|
|
449
|
+
* may file into, and in their place a skeleton while the listing loads, the alert with its retry
|
|
450
|
+
* where it failed, or the sentence for whichever emptiness this is.
|
|
451
|
+
*/
|
|
452
|
+
const CollectionMembershipList = ({
|
|
453
|
+
collections,
|
|
454
|
+
createOffered,
|
|
455
|
+
isError,
|
|
456
|
+
isPending,
|
|
457
|
+
onRetry,
|
|
458
|
+
target,
|
|
459
|
+
}: CollectionMembershipListProps) => {
|
|
460
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
461
|
+
|
|
462
|
+
const editable = useMemo(
|
|
463
|
+
() => (collections ?? []).filter((collection) => canEditCollection(collection.role)),
|
|
464
|
+
[collections],
|
|
465
|
+
);
|
|
466
|
+
|
|
467
|
+
// The empty state answers whichever emptiness this is. A listing with rows in it that
|
|
468
|
+
// are all read-only is not "no collections yet" (it is a viewer looking at an
|
|
469
|
+
// organization's collections), and telling that reader to create the first one names an
|
|
470
|
+
// action their role does not have. The hint pointing at the create button is likewise
|
|
471
|
+
// withheld whenever that button is not usable.
|
|
472
|
+
let emptyMessage: string;
|
|
473
|
+
if ((collections ?? []).length > 0) {
|
|
474
|
+
emptyMessage = words.manageCollections.emptyNoWritable;
|
|
475
|
+
} else if (createOffered) {
|
|
476
|
+
emptyMessage = `${words.manageCollections.empty} ${words.manageCollections.emptyHint}`;
|
|
477
|
+
} else {
|
|
478
|
+
emptyMessage = words.manageCollections.empty;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
return (
|
|
482
|
+
<>
|
|
483
|
+
{isPending ? <Skeleton height={80} /> : null}
|
|
484
|
+
{isError ? (
|
|
485
|
+
// A failed listing gets a way out of itself. The refetch is a read, so it
|
|
486
|
+
// goes straight to the query cache rather than through the bus, and the
|
|
487
|
+
// dialog stays open on the same target rather than asking the user to close
|
|
488
|
+
// and reopen it to try again.
|
|
489
|
+
//
|
|
490
|
+
// The same alert the create form below uses. One dialog says "this failed"
|
|
491
|
+
// with one glyph: the create form's is fixed by the convention every form in
|
|
492
|
+
// the studio follows, so this is the one that reads it. The sentence names what
|
|
493
|
+
// failed, which is all a generic title above it would add.
|
|
494
|
+
<Stack gap="sm">
|
|
495
|
+
<FormErrorAlert message={words.manageCollections.error} />
|
|
496
|
+
<Group justify="flex-end">
|
|
497
|
+
<Button onClick={onRetry} variant="default">
|
|
498
|
+
{words.manageCollections.retry}
|
|
499
|
+
</Button>
|
|
500
|
+
</Group>
|
|
501
|
+
</Stack>
|
|
502
|
+
) : null}
|
|
503
|
+
{!isPending && !isError && editable.length === 0 ? (
|
|
504
|
+
<Text c="dimmed">{emptyMessage}</Text>
|
|
505
|
+
) : null}
|
|
506
|
+
{editable.length > 0 ? (
|
|
507
|
+
<Stack gap="xs">
|
|
508
|
+
{editable.map((collection) => (
|
|
509
|
+
<CollectionCheckbox collection={collection} key={collection.id} target={target} />
|
|
510
|
+
))}
|
|
511
|
+
</Stack>
|
|
512
|
+
) : null}
|
|
513
|
+
</>
|
|
514
|
+
);
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* ManageCollectionsModalBody is the open manage-collections dialog for a known
|
|
519
|
+
* entity (an itinerary or a zone). It loads every collection the user can access
|
|
520
|
+
* (with a membership flag) and renders the editable ones (those the user may add
|
|
521
|
+
* to or remove from) as checkboxes pre-checked by current membership. Read-only
|
|
522
|
+
* collections are filtered out because membership cannot be changed there. The
|
|
523
|
+
* footer carries one "Create a new collection" action; activating it swaps the body
|
|
524
|
+
* for the inline create form and drops the footer, so the form's own Cancel + Create
|
|
525
|
+
* are the only actions while creating. Cancelling or a successful create returns to
|
|
526
|
+
* the membership list, where a newly created collection appears already checked.
|
|
527
|
+
* Opening on the list (the common task) keeps creation one click away in the footer
|
|
528
|
+
* rather than crowding the body. Split from the mount guard so a fresh target
|
|
529
|
+
* remounts it cleanly.
|
|
530
|
+
*/
|
|
531
|
+
const ManageCollectionsModalBody = ({ target }: { target: CollectionsTarget }) => {
|
|
532
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
533
|
+
const { dispatch } = useStudioDispatch();
|
|
534
|
+
// organizationId is the target's OWN organization: the scope the inline create files
|
|
535
|
+
// a new collection into, so the collection lands where the entity being filed actually
|
|
536
|
+
// lives. Its own pending/error state is separate from the listing's: the two reads
|
|
537
|
+
// resolve independently, and the create is gated on the scope while the list is not.
|
|
538
|
+
const {
|
|
539
|
+
data,
|
|
540
|
+
isPending,
|
|
541
|
+
isError,
|
|
542
|
+
organizationError,
|
|
543
|
+
organizationId,
|
|
544
|
+
organizationPending,
|
|
545
|
+
refetch,
|
|
546
|
+
} = useEntityCollections(target);
|
|
547
|
+
|
|
548
|
+
// The create form is tucked behind a toggle so the dialog opens on the
|
|
549
|
+
// membership list (the common task); expanding it reveals the new-collection
|
|
550
|
+
// form, and a successful create collapses it again.
|
|
551
|
+
const [createOpen, setCreateOpen] = useState(false);
|
|
552
|
+
|
|
553
|
+
// Why the inline create is withheld, said rather than left to a dimmed button.
|
|
554
|
+
// organizationId decides which scope the new collection is created in; dispatching
|
|
555
|
+
// with it still unresolved omits the field, the API falls back to the caller's auth
|
|
556
|
+
// organization (the personal scope for a viewer signed in as themselves), and an
|
|
557
|
+
// organization-owned entity ends up with a personal collection it can never be added to, a
|
|
558
|
+
// cross-organization add the API then refuses. "Not yet" and "not at all" are different
|
|
559
|
+
// sentences because they ask for different things from the reader: one is a wait, the
|
|
560
|
+
// other a reload.
|
|
561
|
+
const createDisabledReason = organizationError
|
|
562
|
+
? words.manageCollections.create.scopeError
|
|
563
|
+
: organizationPending
|
|
564
|
+
? words.manageCollections.create.scopePending
|
|
565
|
+
: null;
|
|
566
|
+
|
|
567
|
+
const close = useCallback(() => {
|
|
568
|
+
void dispatch("studio.collection.manage.close", {});
|
|
569
|
+
}, [dispatch]);
|
|
570
|
+
|
|
571
|
+
// The inline create's fields, and the way back from it: the list, with the draft cleared so
|
|
572
|
+
// the next opening of the form starts empty.
|
|
573
|
+
const draft = useCreateCollectionDraft();
|
|
574
|
+
const { reset: resetDraft } = draft;
|
|
575
|
+
const collapse = useCallback(() => {
|
|
576
|
+
resetDraft();
|
|
577
|
+
setCreateOpen(false);
|
|
578
|
+
}, [resetDraft]);
|
|
579
|
+
|
|
580
|
+
// Two ways lead out of a draft, and both drop it: the dialog's own dismissal (the close
|
|
581
|
+
// button, Escape, the overlay) and the form's Cancel, which goes back to the list. They share
|
|
582
|
+
// one question, and the answer that discards takes the exit that was asked for. The exit is
|
|
583
|
+
// recorded only while no question stands: the dialog hears the Escape that answers one too.
|
|
584
|
+
const exitRef = useRef(close);
|
|
585
|
+
const guard = useUnsavedEditsGuard({
|
|
586
|
+
changed: createOpen && draft.changed,
|
|
587
|
+
onClose: () => exitRef.current(),
|
|
588
|
+
});
|
|
589
|
+
const { dismiss, question } = guard;
|
|
590
|
+
const leaveBy = (exit: () => void) => (): void => {
|
|
591
|
+
if (question === null) {
|
|
592
|
+
exitRef.current = exit;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
dismiss();
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
// The one dialog that holds no record of its own: its target is a bare
|
|
599
|
+
// { entity, entityId } tool input. The read rides the shared per-itinerary cache entry
|
|
600
|
+
// every other surface writes to, so it is a hit whenever the itinerary has been touched
|
|
601
|
+
// this session. A zone target reads nothing at all.
|
|
602
|
+
const subject = useItinerarySubjectById(
|
|
603
|
+
target.entity === "itinerary" ? target.entityId : undefined,
|
|
604
|
+
);
|
|
605
|
+
|
|
606
|
+
return (
|
|
607
|
+
// The membership list is the default surface: each checkbox dispatches its own
|
|
608
|
+
// add/remove on click, so the footer carries only the "Create a new collection"
|
|
609
|
+
// action. Activating create swaps the body for the inline form and drops the footer,
|
|
610
|
+
// so that form's own Cancel + Create are the only actions; the header close button and
|
|
611
|
+
// escape dismiss the dialog either way.
|
|
612
|
+
<>
|
|
613
|
+
<AppModal
|
|
614
|
+
closeLabel={words.actions.close}
|
|
615
|
+
// WHAT is being filed. A zone has no name of its own (the schema carries only a
|
|
616
|
+
// description), so it is not a "named resource" and keeps its sentence; an
|
|
617
|
+
// itinerary is named, so the header names it.
|
|
618
|
+
description={
|
|
619
|
+
target.entity === "zone" || subject === null ? (
|
|
620
|
+
target.entity === "zone" ? (
|
|
621
|
+
words.manageCollections.descriptionZone
|
|
622
|
+
) : (
|
|
623
|
+
words.manageCollections.description
|
|
624
|
+
)
|
|
625
|
+
) : (
|
|
626
|
+
<DialogSubject {...subject} />
|
|
627
|
+
)
|
|
628
|
+
}
|
|
629
|
+
footer={
|
|
630
|
+
createOpen ? undefined : (
|
|
631
|
+
// The row carries the one action this dialog offers, and no "Done" confirm beside
|
|
632
|
+
// it: that is the corner X spelled a second time, and the X is the single way out.
|
|
633
|
+
// `mt` opens a clear gap between the collection list and the
|
|
634
|
+
// action bar so the list and the button row read as distinct.
|
|
635
|
+
<ModalFooter
|
|
636
|
+
mt="sm"
|
|
637
|
+
secondary={
|
|
638
|
+
<CreateCollectionAction
|
|
639
|
+
disabledReason={createDisabledReason}
|
|
640
|
+
onOpen={() => setCreateOpen(true)}
|
|
641
|
+
/>
|
|
642
|
+
}
|
|
643
|
+
/>
|
|
644
|
+
)
|
|
645
|
+
}
|
|
646
|
+
icon={<ManageCollectionsIcon size={iconSizes.md} />}
|
|
647
|
+
onClose={leaveBy(close)}
|
|
648
|
+
opened
|
|
649
|
+
title={words.manageCollections.title}
|
|
650
|
+
>
|
|
651
|
+
{createOpen ? (
|
|
652
|
+
<CreateCollectionForm
|
|
653
|
+
draft={draft}
|
|
654
|
+
onCancel={leaveBy(collapse)}
|
|
655
|
+
onCreated={collapse}
|
|
656
|
+
// The form opens once the record has answered, so no answer is left to wait for
|
|
657
|
+
// here: a personal resource and an unresolved one both name no organization.
|
|
658
|
+
organizationId={organizationId ?? null}
|
|
659
|
+
target={target}
|
|
660
|
+
/>
|
|
661
|
+
) : (
|
|
662
|
+
<CollectionMembershipList
|
|
663
|
+
collections={data}
|
|
664
|
+
createOffered={createDisabledReason === null}
|
|
665
|
+
isError={isError}
|
|
666
|
+
isPending={isPending}
|
|
667
|
+
onRetry={refetch}
|
|
668
|
+
target={target}
|
|
669
|
+
/>
|
|
670
|
+
)}
|
|
671
|
+
</AppModal>
|
|
672
|
+
{question}
|
|
673
|
+
</>
|
|
674
|
+
);
|
|
675
|
+
};
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* ManageCollectionsModal mounts the manage-collections dialog at the studio level
|
|
679
|
+
* whenever the UI store holds a collections target: an entity-typed
|
|
680
|
+
* { entity, entityId } pair, so the one modal serves both itinerary and zone
|
|
681
|
+
* membership. Reading the target with a narrow selector keeps the rest of the studio
|
|
682
|
+
* from re-rendering as it opens and closes; keying the body on the entity id loads the
|
|
683
|
+
* right membership for each fresh target.
|
|
684
|
+
*/
|
|
685
|
+
export const ManageCollectionsModal = () => {
|
|
686
|
+
const target = useUiStore((state) => state.collectionsTarget);
|
|
687
|
+
if (!target) {
|
|
688
|
+
return null;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
return <ManageCollectionsModalBody key={target.entityId} target={target} />;
|
|
692
|
+
};
|