@mountaya/studio 0.0.0-stage → 0.2.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 +69 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +917 -2
- package/dist/agent/index.cjs +2600 -0
- package/dist/agent/index.cjs.map +1 -0
- package/dist/agent/index.d.cts +1237 -0
- package/dist/agent/index.d.ts +1237 -0
- package/dist/agent/index.js +2581 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/chunk-3Oi_Zrtm.js +9 -0
- package/dist/chunk-3Oi_Zrtm.js.map +1 -0
- package/dist/chunk-B18OPIu_.js +6 -0
- package/dist/chunk-B18OPIu_.js.map +1 -0
- package/dist/chunk-B5Uz3Qct.cjs +15 -0
- package/dist/chunk-B5Uz3Qct.cjs.map +1 -0
- package/dist/chunk-BBEJwkd3.d.cts +839 -0
- package/dist/chunk-BIEc_SkR.cjs +29 -0
- package/dist/chunk-BIEc_SkR.cjs.map +1 -0
- package/dist/chunk-BKMFOe-N.js +171 -0
- package/dist/chunk-BKMFOe-N.js.map +1 -0
- package/dist/chunk-BP4uy7E1.d.ts +11583 -0
- package/dist/chunk-BSHTsFiB.js +1403 -0
- package/dist/chunk-BSHTsFiB.js.map +1 -0
- package/dist/chunk-BTUUABGI.js +17 -0
- package/dist/chunk-BTUUABGI.js.map +1 -0
- package/dist/chunk-BaPiaz5X.cjs +115 -0
- package/dist/chunk-BaPiaz5X.cjs.map +1 -0
- package/dist/chunk-BeCVpkYr.cjs +542 -0
- package/dist/chunk-BeCVpkYr.cjs.map +1 -0
- package/dist/chunk-BgngsvK8.cjs +6202 -0
- package/dist/chunk-BgngsvK8.cjs.map +1 -0
- package/dist/chunk-BhInd7CJ.d.cts +253 -0
- package/dist/chunk-Bn6ZbxkS.cjs +27 -0
- package/dist/chunk-By9ZnkVI.js +60 -0
- package/dist/chunk-By9ZnkVI.js.map +1 -0
- package/dist/chunk-BzqPhxsz.cjs +367 -0
- package/dist/chunk-BzqPhxsz.cjs.map +1 -0
- package/dist/chunk-C2mMX81q.d.ts +443 -0
- package/dist/chunk-C2rr9Q0V.cjs +1402 -0
- package/dist/chunk-C2rr9Q0V.cjs.map +1 -0
- package/dist/chunk-CDJCbwIQ.d.cts +78 -0
- package/dist/chunk-CLGvBOVH.d.cts +1654 -0
- package/dist/chunk-COdw1dc6.d.ts +525 -0
- package/dist/chunk-CQCJnT2i.d.ts +511 -0
- package/dist/chunk-CSyHY67q.cjs +353 -0
- package/dist/chunk-CSyHY67q.cjs.map +1 -0
- package/dist/chunk-CiK1Iqrv.js +950 -0
- package/dist/chunk-CiK1Iqrv.js.map +1 -0
- package/dist/chunk-CmJBgSwZ.cjs +24 -0
- package/dist/chunk-CmJBgSwZ.cjs.map +1 -0
- package/dist/chunk-CnrsRK2u.cjs +83 -0
- package/dist/chunk-CnrsRK2u.cjs.map +1 -0
- package/dist/chunk-Co782_9r.js +326 -0
- package/dist/chunk-Co782_9r.js.map +1 -0
- package/dist/chunk-Csr3KDpZ.cjs +32 -0
- package/dist/chunk-Csr3KDpZ.cjs.map +1 -0
- package/dist/chunk-CwkmccXv.js +89 -0
- package/dist/chunk-CwkmccXv.js.map +1 -0
- package/dist/chunk-D0Q4iL9B.cjs +255 -0
- package/dist/chunk-D0Q4iL9B.cjs.map +1 -0
- package/dist/chunk-DFwiSzUS.cjs +72 -0
- package/dist/chunk-DFwiSzUS.cjs.map +1 -0
- package/dist/chunk-DIFayl2P.d.cts +443 -0
- package/dist/chunk-DIGF58ux.d.cts +525 -0
- package/dist/chunk-DKuuuld5.js +101 -0
- package/dist/chunk-DKuuuld5.js.map +1 -0
- package/dist/chunk-DMePkFEo.js +5054 -0
- package/dist/chunk-DMePkFEo.js.map +1 -0
- package/dist/chunk-DO5SIBgu.js +305 -0
- package/dist/chunk-DO5SIBgu.js.map +1 -0
- package/dist/chunk-DOQ_7eE5.d.ts +6662 -0
- package/dist/chunk-DThaaNeb.d.cts +15 -0
- package/dist/chunk-DThaaNeb.d.ts +15 -0
- package/dist/chunk-DUQzjUJy.d.ts +78 -0
- package/dist/chunk-DX37IPhV.cjs +1903 -0
- package/dist/chunk-DX37IPhV.cjs.map +1 -0
- package/dist/chunk-Damps5Tk.cjs +155 -0
- package/dist/chunk-Damps5Tk.cjs.map +1 -0
- package/dist/chunk-DbK5PhpJ.d.ts +1654 -0
- package/dist/chunk-De0vAASv.d.ts +253 -0
- package/dist/chunk-DhSZ7YZt.d.cts +6662 -0
- package/dist/chunk-DjEvqvPA.cjs +43 -0
- package/dist/chunk-DjEvqvPA.cjs.map +1 -0
- package/dist/chunk-DkwDzwvu.d.cts +121 -0
- package/dist/chunk-DkwDzwvu.d.ts +121 -0
- package/dist/chunk-Dmszv9If.js +71 -0
- package/dist/chunk-Dmszv9If.js.map +1 -0
- package/dist/chunk-Dp_ftNWY.d.cts +511 -0
- package/dist/chunk-DsHQySz0.js +31 -0
- package/dist/chunk-DsHQySz0.js.map +1 -0
- package/dist/chunk-DwoUyHHh.js +281 -0
- package/dist/chunk-DwoUyHHh.js.map +1 -0
- package/dist/chunk-IaIDQflj.d.cts +2315 -0
- package/dist/chunk-IaIDQflj.d.ts +2315 -0
- package/dist/chunk-cVXLsZfL.d.ts +839 -0
- package/dist/chunk-mIaCX9EJ.d.cts +11583 -0
- package/dist/chunk-nJQxbOwQ.cjs +8962 -0
- package/dist/chunk-nJQxbOwQ.cjs.map +1 -0
- package/dist/chunk-o9jaxhCO.js +8852 -0
- package/dist/chunk-o9jaxhCO.js.map +1 -0
- package/dist/chunk-p-Tt_Lwz.js +14 -0
- package/dist/chunk-p-Tt_Lwz.js.map +1 -0
- package/dist/engines/index.cjs +2091 -0
- package/dist/engines/index.cjs.map +1 -0
- package/dist/engines/index.d.cts +2176 -0
- package/dist/engines/index.d.ts +2176 -0
- package/dist/engines/index.js +2075 -0
- package/dist/engines/index.js.map +1 -0
- package/dist/handlers/index.cjs +53 -0
- package/dist/handlers/index.cjs.map +1 -0
- package/dist/handlers/index.d.cts +403 -0
- package/dist/handlers/index.d.ts +403 -0
- package/dist/handlers/index.js +33 -0
- package/dist/handlers/index.js.map +1 -0
- package/dist/index.cjs +3511 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +3033 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins/index.cjs +510 -0
- package/dist/plugins/index.cjs.map +1 -0
- package/dist/plugins/index.d.cts +296 -0
- package/dist/plugins/index.d.ts +296 -0
- package/dist/plugins/index.js +489 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/seams/index.cjs +89 -0
- package/dist/seams/index.cjs.map +1 -0
- package/dist/seams/index.d.cts +452 -0
- package/dist/seams/index.d.ts +452 -0
- package/dist/seams/index.js +49 -0
- package/dist/seams/index.js.map +1 -0
- package/dist/strings/fr/index.cjs +2135 -0
- package/dist/strings/fr/index.cjs.map +1 -0
- package/dist/strings/fr/index.d.cts +17 -0
- package/dist/strings/fr/index.d.ts +17 -0
- package/dist/strings/fr/index.js +2130 -0
- package/dist/strings/fr/index.js.map +1 -0
- package/dist/strings/index.cjs +2384 -0
- package/dist/strings/index.cjs.map +1 -0
- package/dist/strings/index.d.cts +3 -0
- package/dist/strings/index.d.ts +3 -0
- package/dist/strings/index.js +2353 -0
- package/dist/strings/index.js.map +1 -0
- package/dist/testing/index.cjs +230 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +246 -0
- package/dist/testing/index.d.ts +246 -0
- package/dist/testing/index.js +219 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/time/index.cjs +28 -0
- package/dist/time/index.cjs.map +1 -0
- package/dist/time/index.d.cts +41 -0
- package/dist/time/index.d.ts +41 -0
- package/dist/time/index.js +23 -0
- package/dist/time/index.js.map +1 -0
- package/package.json +224 -4
- package/src/agent/engines/agentThreads.ts +1601 -0
- package/src/agent/engines/directorChat.ts +500 -0
- package/src/agent/index.ts +67 -0
- package/src/agent/rules/agentEditLock.ts +115 -0
- package/src/agent/rules/agentErrorCopy.ts +44 -0
- package/src/agent/rules/copilotOrganization.ts +36 -0
- package/src/agent/rules/playbook.gen.ts +444 -0
- package/src/agent/rules/router.ts +518 -0
- package/src/agent/rules/stateDelta.ts +29 -0
- package/src/agent/rules/studioRouter.ts +123 -0
- package/src/agent/rules/surfaces.gen.ts +633 -0
- package/src/agent/rules/threadsUrl.ts +48 -0
- package/src/agent/rules/transcriptObserver.ts +90 -0
- package/src/agent/stores/agentThreads.ts +451 -0
- package/src/bus/contracts/noData.ts +18 -0
- package/src/bus/contracts/shared.ts +172 -0
- package/src/bus/contracts/studioTools.ts +224 -0
- package/src/bus/rules/bus.ts +857 -0
- package/src/bus/rules/confirmation.ts +22 -0
- package/src/bus/rules/defineRegistry.ts +24 -0
- package/src/bus/rules/errors.ts +401 -0
- package/src/bus/rules/handlerErrors.ts +103 -0
- package/src/bus/rules/handlerRegistry.ts +627 -0
- package/src/bus/rules/inputSchema.ts +232 -0
- package/src/bus/rules/invalidInput.ts +441 -0
- package/src/bus/rules/lateBoundTools.ts +100 -0
- package/src/bus/rules/studioRegistry.ts +324 -0
- package/src/bus/rules/studioToolBus.ts +73 -0
- package/src/bus/rules/types.ts +804 -0
- package/src/chrome/contracts/alert.ts +42 -0
- package/src/chrome/contracts/itinerary.ts +26 -0
- package/src/chrome/contracts/map.ts +23 -0
- package/src/chrome/contracts/overlay.ts +46 -0
- package/src/chrome/contracts/panel.ts +29 -0
- package/src/chrome/contracts/question.ts +52 -0
- package/src/chrome/contracts/selection.ts +26 -0
- package/src/chrome/contracts/sidenav.ts +23 -0
- package/src/chrome/contracts/snapshot.ts +319 -0
- package/src/chrome/contracts/state.ts +22 -0
- package/src/chrome/contracts/tabs.ts +56 -0
- package/src/chrome/handlers/alert.ts +91 -0
- package/src/chrome/handlers/introspection.ts +180 -0
- package/src/chrome/handlers/panels.ts +42 -0
- package/src/chrome/handlers/question.ts +24 -0
- package/src/chrome/handlers/sidenav.ts +116 -0
- package/src/chrome/handlers/snapshot.ts +451 -0
- package/src/chrome/handlers/stateDelta.ts +125 -0
- package/src/chrome/handlers/tabs.ts +143 -0
- package/src/chrome/handlers/timestamp.ts +19 -0
- package/src/chrome/rules/agentSelectors.ts +210 -0
- package/src/chrome/rules/mapAlert.ts +13 -0
- package/src/chrome/rules/question.ts +25 -0
- package/src/chrome/rules/tabs.ts +13 -0
- package/src/chrome/stores/activeDraftSession.ts +134 -0
- package/src/chrome/stores/chrome.ts +527 -0
- package/src/chrome/stores/uiStore.ts +575 -0
- package/src/collab/contracts/collab.ts +261 -0
- package/src/collab/handlers/collab.ts +468 -0
- package/src/collab/rules/toolNames.ts +33 -0
- package/src/collab/stores/collab.ts +899 -0
- package/src/collections/contracts/collection.ts +182 -0
- package/src/collections/handlers/collectionAttach.ts +141 -0
- package/src/collections/handlers/collections.ts +499 -0
- package/src/collections/handlers/heldCollection.ts +42 -0
- package/src/collections/handlers/restCollections.ts +386 -0
- package/src/collections/rules/collections.ts +138 -0
- package/src/collections/rules/entityCollections.ts +53 -0
- package/src/collections/stores/collections.ts +133 -0
- package/src/data/contracts/data.ts +233 -0
- package/src/data/contracts/itinerary.ts +71 -0
- package/src/data/handlers/activityResolve.ts +76 -0
- package/src/data/handlers/data.ts +200 -0
- package/src/data/handlers/graphql.ts +26 -0
- package/src/data/handlers/mutationSink.ts +1577 -0
- package/src/data/handlers/profile.ts +83 -0
- package/src/data/handlers/writeThrough.ts +417 -0
- package/src/data/rules/cache.ts +181 -0
- package/src/data/rules/dataTypes.ts +40 -0
- package/src/data/rules/keys.ts +106 -0
- package/src/data/rules/persistence.ts +1058 -0
- package/src/data/rules/requestBody.ts +43 -0
- package/src/data/rules/restErrors.ts +354 -0
- package/src/data/rules/sessionSurface.ts +156 -0
- package/src/data/rules/toolResultData.ts +73 -0
- package/src/data/rules/uuid.ts +24 -0
- package/src/edit/contracts/edit.ts +37 -0
- package/src/edit/contracts/itinerary.ts +57 -0
- package/src/edit/handlers/draftCommit.ts +257 -0
- package/src/edit/handlers/editDiscard.ts +34 -0
- package/src/edit/handlers/editLock.ts +949 -0
- package/src/edit/handlers/editor.ts +203 -0
- package/src/edit/handlers/formUnsaved.ts +24 -0
- package/src/edit/rules/draftMetadata.ts +117 -0
- package/src/edit/rules/editKeyboard.ts +222 -0
- package/src/edit/rules/editShortcuts.ts +102 -0
- package/src/edit/rules/editTooltip.ts +174 -0
- package/src/edit/rules/editorTaken.ts +49 -0
- package/src/edit/rules/history.ts +26 -0
- package/src/edit/rules/unsavedWork.ts +60 -0
- package/src/edit/stores/editorReservation.ts +70 -0
- package/src/edit/stores/formsUnsaved.ts +54 -0
- package/src/embed/contracts/embed.ts +48 -0
- package/src/embed/engines/embedFraming.ts +1329 -0
- package/src/embed/engines/embedReady.ts +353 -0
- package/src/embed/engines/framingPageSession.ts +169 -0
- package/src/embed/handlers/embed.ts +130 -0
- package/src/embed/rules/allowedDomains.ts +71 -0
- package/src/embed/rules/bridgeMessages.ts +224 -0
- package/src/embed/rules/defaults.ts +173 -0
- package/src/embed/rules/displaySeed.ts +115 -0
- package/src/embed/rules/embedAllowlist.ts +146 -0
- package/src/embed/rules/embedConstraints.ts +215 -0
- package/src/embed/rules/embedElements.ts +277 -0
- package/src/embed/rules/embedSectionFields.ts +126 -0
- package/src/embed/rules/embedSecurity.ts +116 -0
- package/src/embed/rules/fieldDependencies.ts +89 -0
- package/src/embed/rules/fieldOptions.ts +138 -0
- package/src/embed/rules/layerOptions.ts +161 -0
- package/src/embed/rules/readyProtocol.ts +66 -0
- package/src/embed/rules/safetyRules.ts +215 -0
- package/src/embed/rules/snippet.ts +531 -0
- package/src/embed/rules/tableCode.ts +270 -0
- package/src/embed/stores/embed.ts +60 -0
- package/src/embed/stores/embedContent.ts +77 -0
- package/src/engines/index.ts +81 -0
- package/src/handlers/index.ts +66 -0
- package/src/index.ts +1065 -0
- package/src/itinerary/contracts/itinerary.ts +705 -0
- package/src/itinerary/engines/itineraryPace.ts +612 -0
- package/src/itinerary/engines/profileMarker.ts +238 -0
- package/src/itinerary/handlers/importStaging.ts +352 -0
- package/src/itinerary/handlers/itinerary.ts +572 -0
- package/src/itinerary/handlers/itineraryDuplicate.ts +177 -0
- package/src/itinerary/handlers/itineraryExport.ts +117 -0
- package/src/itinerary/handlers/itineraryImport.ts +783 -0
- package/src/itinerary/handlers/itineraryPublish.ts +118 -0
- package/src/itinerary/handlers/itinerarySelection.ts +354 -0
- package/src/itinerary/handlers/itinerarySuggest.ts +1186 -0
- package/src/itinerary/handlers/itineraryUnpublish.ts +101 -0
- package/src/itinerary/handlers/publicationScope.ts +118 -0
- package/src/itinerary/handlers/restItineraries.ts +752 -0
- package/src/itinerary/handlers/restItineraryExport.ts +70 -0
- package/src/itinerary/handlers/restItineraryImport.ts +311 -0
- package/src/itinerary/handlers/restItineraryPace.ts +87 -0
- package/src/itinerary/handlers/restItineraryRecord.ts +36 -0
- package/src/itinerary/handlers/suggestParams.ts +379 -0
- package/src/itinerary/handlers/suggestStaging.ts +363 -0
- package/src/itinerary/handlers/surfaceOpen.ts +389 -0
- package/src/itinerary/rules/activity.ts +139 -0
- package/src/itinerary/rules/analysis.ts +42 -0
- package/src/itinerary/rules/ceiling.ts +49 -0
- package/src/itinerary/rules/createFlow.ts +107 -0
- package/src/itinerary/rules/densify.ts +440 -0
- package/src/itinerary/rules/draftSurface.ts +219 -0
- package/src/itinerary/rules/editorView.ts +83 -0
- package/src/itinerary/rules/export.ts +159 -0
- package/src/itinerary/rules/friendlyName.ts +77 -0
- package/src/itinerary/rules/import.ts +1050 -0
- package/src/itinerary/rules/importFiles.ts +140 -0
- package/src/itinerary/rules/importTotals.ts +77 -0
- package/src/itinerary/rules/liveSegment.ts +712 -0
- package/src/itinerary/rules/lngLat.ts +17 -0
- package/src/itinerary/rules/mapSync.ts +100 -0
- package/src/itinerary/rules/previewRender.ts +416 -0
- package/src/itinerary/rules/profileReadout.ts +216 -0
- package/src/itinerary/rules/routing.ts +707 -0
- package/src/itinerary/rules/suggest.ts +522 -0
- package/src/itinerary/rules/suggestionPreview.ts +119 -0
- package/src/itinerary/rules/view.ts +61 -0
- package/src/itinerary/stores/importSession.ts +319 -0
- package/src/itinerary/stores/itinerary.ts +331 -0
- package/src/itinerary/stores/itineraryDuplicate.ts +76 -0
- package/src/itinerary/stores/sessionIdentity.ts +43 -0
- package/src/itinerary/stores/suggestSession.ts +418 -0
- package/src/layers/contracts/itinerary.ts +46 -0
- package/src/layers/contracts/overlay.ts +132 -0
- package/src/layers/handlers/enrichment.ts +36 -0
- package/src/layers/handlers/overlay.ts +406 -0
- package/src/layers/handlers/restLayers.ts +94 -0
- package/src/layers/handlers/tiles.ts +25 -0
- package/src/layers/rules/layers.ts +212 -0
- package/src/layers/rules/overlayInstant.ts +12 -0
- package/src/layers/rules/reachabilityIcon.ts +18 -0
- package/src/layers/rules/readout.ts +102 -0
- package/src/layers/stores/layers.ts +262 -0
- package/src/map/contracts/contextmenu.ts +33 -0
- package/src/map/contracts/geolocate.ts +37 -0
- package/src/map/contracts/map.ts +146 -0
- package/src/map/contracts/streetview.ts +53 -0
- package/src/map/contracts/terrain.ts +152 -0
- package/src/map/handlers/contextMenu.ts +135 -0
- package/src/map/handlers/geolocate.ts +52 -0
- package/src/map/handlers/map.ts +391 -0
- package/src/map/handlers/streetview.ts +94 -0
- package/src/map/handlers/terrain.ts +663 -0
- package/src/map/rules/baseTerrain.ts +75 -0
- package/src/map/rules/clickTargets.ts +464 -0
- package/src/map/rules/constraints.ts +32 -0
- package/src/map/rules/contextMenuReadout.ts +67 -0
- package/src/map/rules/coordinates.ts +71 -0
- package/src/map/rules/itineraryFit.ts +8 -0
- package/src/map/rules/mapEvents.ts +64 -0
- package/src/map/rules/mapProjection.ts +476 -0
- package/src/map/rules/terrainReading.ts +62 -0
- package/src/plugins/contracts/ids.ts +66 -0
- package/src/plugins/contracts/plugin.ts +202 -0
- package/src/plugins/contracts/slots.ts +137 -0
- package/src/plugins/engines/studioPlugin.ts +1365 -0
- package/src/plugins/index.ts +111 -0
- package/src/plugins/rules/contributions.ts +152 -0
- package/src/plugins/rules/errors.ts +60 -0
- package/src/plugins/rules/ids.ts +42 -0
- package/src/plugins/rules/validation.ts +249 -0
- package/src/rules/listeners.ts +57 -0
- package/src/rules/origin.ts +13 -0
- package/src/rules/storeWrite.ts +37 -0
- package/src/rules/types.ts +136 -0
- package/src/seams/index.ts +79 -0
- package/src/seams/rules/clock.ts +28 -0
- package/src/seams/rules/formatters.ts +211 -0
- package/src/seams/rules/ids.ts +102 -0
- package/src/seams/rules/links.ts +66 -0
- package/src/seams/rules/navigation.ts +222 -0
- package/src/seams/rules/notify.ts +49 -0
- package/src/seams/rules/persistenceDrawer.ts +220 -0
- package/src/seams/rules/saveFile.ts +101 -0
- package/src/seams/rules/seams.ts +156 -0
- package/src/seams/rules/storage.ts +116 -0
- package/src/search/contracts/overlay.ts +74 -0
- package/src/search/contracts/search.ts +197 -0
- package/src/search/handlers/pois.ts +57 -0
- package/src/search/handlers/search.ts +280 -0
- package/src/search/rules/params.ts +925 -0
- package/src/search/rules/poiGroups.ts +138 -0
- package/src/search/rules/searchFetch.ts +139 -0
- package/src/search/rules/timeWindow.ts +30 -0
- package/src/search/stores/search.ts +51 -0
- package/src/segments/contracts/itinerary.ts +433 -0
- package/src/segments/contracts/segment.ts +35 -0
- package/src/segments/engines/segmentDraft.ts +926 -0
- package/src/segments/handlers/chainGuards.ts +67 -0
- package/src/segments/handlers/directions.ts +44 -0
- package/src/segments/handlers/itineraryEcho.ts +45 -0
- package/src/segments/handlers/roadAccessDialog.ts +34 -0
- package/src/segments/handlers/segment.ts +111 -0
- package/src/segments/handlers/segmentEdit.ts +1341 -0
- package/src/segments/handlers/segmentGroups.ts +347 -0
- package/src/segments/handlers/segmentStructure.ts +1144 -0
- package/src/segments/rules/chain.ts +196 -0
- package/src/segments/rules/chainModel.ts +217 -0
- package/src/segments/rules/colors.ts +11 -0
- package/src/segments/rules/commit.ts +76 -0
- package/src/segments/rules/draft.ts +90 -0
- package/src/segments/rules/draftDisposition.ts +43 -0
- package/src/segments/rules/draftSegmentEdit.ts +129 -0
- package/src/segments/rules/engine.ts +222 -0
- package/src/segments/rules/groupSave.ts +234 -0
- package/src/segments/rules/hazardPrompt.ts +60 -0
- package/src/segments/rules/itineraryEcho.ts +40 -0
- package/src/segments/rules/liveSegmentProjection.ts +55 -0
- package/src/segments/rules/merge.ts +51 -0
- package/src/segments/rules/metrics.ts +456 -0
- package/src/segments/rules/naming.ts +168 -0
- package/src/segments/rules/segmentArming.ts +144 -0
- package/src/segments/rules/splitPick.ts +84 -0
- package/src/segments/rules/viaSimplify.ts +230 -0
- package/src/segments/stores/directions.ts +77 -0
- package/src/segments/stores/roadAccessDialog.ts +58 -0
- package/src/segments/stores/segmentEdit.ts +922 -0
- package/src/segments/stores/segmentGroupEdit.ts +84 -0
- package/src/segments/stores/segmentSplit.ts +77 -0
- package/src/share/contracts/share.ts +39 -0
- package/src/share/contracts/shareLink.ts +63 -0
- package/src/share/engines/shareLink.ts +1053 -0
- package/src/share/handlers/share.ts +47 -0
- package/src/share/handlers/shareLink.ts +231 -0
- package/src/share/handlers/shareScope.ts +54 -0
- package/src/share/rules/link.ts +89 -0
- package/src/share/rules/shareLink.ts +218 -0
- package/src/share/rules/targets.ts +92 -0
- package/src/share/rules/viewConfig.ts +95 -0
- package/src/share/stores/share.ts +58 -0
- package/src/strings/fr/index.ts +18 -0
- package/src/strings/fr/rules/fr.ts +2368 -0
- package/src/strings/index.ts +98 -0
- package/src/strings/rules/confirmCopy.ts +156 -0
- package/src/strings/rules/draftToolNames.ts +94 -0
- package/src/strings/rules/en.ts +2519 -0
- package/src/strings/rules/failureAlert.ts +115 -0
- package/src/strings/rules/formError.ts +400 -0
- package/src/strings/rules/maneuvers.ts +107 -0
- package/src/strings/rules/outputOptions.ts +126 -0
- package/src/strings/rules/publicationState.ts +100 -0
- package/src/strings/rules/routeHazardCopy.ts +62 -0
- package/src/strings/rules/searchLabels.ts +50 -0
- package/src/strings/rules/segmentChainVerbs.ts +62 -0
- package/src/strings/rules/studioCopy.ts +130 -0
- package/src/strings/rules/unitOptions.ts +119 -0
- package/src/testing/checkedBus.ts +226 -0
- package/src/testing/index.ts +30 -0
- package/src/testing/plugins.ts +106 -0
- package/src/testing/studio.ts +267 -0
- package/src/testing/urlSeam.ts +153 -0
- package/src/time/index.ts +12 -0
- package/src/time/rules/sun.ts +78 -0
- package/src/video/contracts/cameraSchemas.ts +266 -0
- package/src/video/contracts/profileSchemas.ts +37 -0
- package/src/video/contracts/video.ts +601 -0
- package/src/video/handlers/video.ts +1638 -0
- package/src/video/handlers/videoDirector.ts +114 -0
- package/src/video/rules/previewRefresh.ts +76 -0
- package/src/video/rules/profileSource.ts +51 -0
- package/src/video/rules/routeSpans.ts +79 -0
- package/src/video/rules/shotDefaults.ts +28 -0
- package/src/video/rules/stepOrder.ts +17 -0
- package/src/video/rules/videoSnapshot.ts +136 -0
- package/src/video/stores/directorThreads.ts +167 -0
- package/src/video/stores/videoExport.ts +290 -0
- package/src/viewer/contracts/preferences.ts +40 -0
- package/src/viewer/handlers/preferences.ts +91 -0
- package/src/viewer/rules/capabilities.ts +42 -0
- package/src/viewer/rules/config.ts +266 -0
- package/src/viewer/rules/context.ts +375 -0
- package/src/viewer/rules/ownership.ts +134 -0
- package/src/viewer/rules/platformViewer.ts +199 -0
- package/src/viewer/rules/scope.ts +197 -0
- package/src/viewer/rules/url.ts +145 -0
- package/src/viewer/rules/viewer.ts +307 -0
- package/src/viewer/rules/viewerSeam.ts +49 -0
- package/src/viewer/rules/viewerUnits.ts +34 -0
- package/src/waypoints/contracts/itinerary.ts +417 -0
- package/src/waypoints/handlers/poiWaypointStyle.ts +32 -0
- package/src/waypoints/handlers/waypointDetailsDialog.ts +38 -0
- package/src/waypoints/handlers/waypointEdit.ts +1073 -0
- package/src/waypoints/rules/amenities.ts +30 -0
- package/src/waypoints/rules/defaults.ts +31 -0
- package/src/waypoints/rules/details.ts +213 -0
- package/src/waypoints/rules/detailsDraft.ts +312 -0
- package/src/waypoints/rules/detailsPreview.ts +76 -0
- package/src/waypoints/rules/detailsSave.ts +356 -0
- package/src/waypoints/rules/draftDirty.ts +45 -0
- package/src/waypoints/rules/icons.ts +32 -0
- package/src/waypoints/rules/liveWaypoint.ts +63 -0
- package/src/waypoints/rules/naming.ts +185 -0
- package/src/waypoints/rules/sections.ts +77 -0
- package/src/waypoints/rules/waypointDraft.ts +62 -0
- package/src/waypoints/stores/waypointDetails.ts +62 -0
- package/src/waypoints/stores/waypointEdit.ts +566 -0
- package/src/zones/contracts/collection.ts +37 -0
- package/src/zones/contracts/zone.ts +528 -0
- package/src/zones/engines/zoneForm.ts +1773 -0
- package/src/zones/handlers/restZones.ts +287 -0
- package/src/zones/handlers/zonePublish.ts +206 -0
- package/src/zones/handlers/zoneUnpublish.ts +56 -0
- package/src/zones/handlers/zones.ts +2254 -0
- package/src/zones/rules/geometry.ts +946 -0
- package/src/zones/rules/zoneDefaults.ts +34 -0
- package/src/zones/rules/zoneDraft.ts +54 -0
- package/src/zones/rules/zoneForm.ts +563 -0
- package/src/zones/rules/zoneMetadata.ts +29 -0
- package/src/zones/rules/zoneSource.ts +87 -0
- package/src/zones/rules/zoneSourceRefusal.ts +104 -0
- package/src/zones/stores/zoneEdit.ts +998 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["z","MountayaElementsError","z","studioPluginIdPattern","RESERVED_PLUGIN_NAMESPACES","studioContributionIdPattern","surfaceFault","MountayaElementsError"],"sources":["../../src/plugins/contracts/slots.ts","../../src/plugins/rules/contributions.ts","../../src/plugins/rules/errors.ts","../../src/plugins/rules/ids.ts","../../src/plugins/rules/validation.ts","../../src/plugins/engines/studioPlugin.ts"],"mappings":";;;;;;;;;;;AAsBA,MAAa,yBAAyBA,IAAE,KAAK;CAC3C;CACA;CACA;CACA;CACA;CACA;CACA;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CACxF;CAgBA,MAAc,UAAkB,WAAiD;EAC/E,MAAM,sBAAM,IAAI,IAAY;EAC5B,MAAM,wBAAQ,IAAI,IAAY;EAC9B,MAAM,OAAO,KAAK,SAAS,KAAA,IAAY,KAAA,IAAY,KAAK,WAAW,IAAI,KAAK,IAAI;EAChF,MAAM,SAAS,KAAK,MAAM,WAAW,KAAK,CAAC;EAC3C,MAAM,eAAe,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC,KAAK,MAAM,IAAI,CAAC,CAAC;EAEpE,KAAK,MAAM,CAAC,MAAM,SAAS,QAAQ,CAAC,GAClC,IAAI,KAAK,aAAa,YAAY,YAAY,MAAM,aAAa,IAAI,IAAI,CAAC,GACxE,IAAI,IAAI,IAAI;EAIhB,KAAK,MAAM,CAAC,MAAM,UAAU,KAAK,WAC/B,IAAI,aAAa,UAAU,UACzB,IAAI,IAAI,IAAI;OAEZ,MAAM,IAAI,IAAI;EAIlB,KAAK,MAAM,QAAQ,QACjB,IAAI,CAAC,IAAI,IAAI,KAAK,IAAI,GACpB,MAAM,IAAI,KAAK,IAAI;EAIvB,MAAM,YAAY,IAAI,IAAI,KAAK,QAAQ,KAAK,CAAC;EAC7C,IAAI,WACF,UAAU,OAAO,QAAQ;EAG3B,OAAO;GAAE;GAAW;EAAM;CAC5B;CAUA,SAAuB;EACrB,KAAK,YAAY;EAEjB,kBAAA,gBAAgB,KAAK,SAAS;CAChC;CAGA,KAAa,OAAmC;EAC9C,kBAAA,gBAAgB,KAAK,WAAW,KAAK;CACvC;AACF"}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { C as StudioPluginWaypointMenuTarget, S as StudioPluginTarget, T as studioPluginSlotSchema, _ as StudioPluginMapControlsTarget, a as StudioPluginRunEvent, b as StudioPluginSlot, c as StudioPlugin, d as StudioPluginGate, f as StudioPluginSubject, g as StudioPluginMapContextMenuTarget, h as StudioPluginItineraryMenuTarget, i as StudioPluginRefusalReporter, l as StudioPluginContribution, m as StudioSlotEntry, n as StudioPluginEngineOptions, o as StudioPluginRunOutcome, p as StudioSlotContribution, r as StudioPluginObserver, s as StudioPluginToolSink, t as StudioPluginEngine, u as StudioPluginEntry, v as StudioPluginProfileTarget, w as StudioPluginZoneMenuTarget, x as StudioPluginSlotTargets, y as StudioPluginSegmentMenuTarget } from "../chunk-BBEJwkd3.cjs";
|
|
2
|
+
import { a as StudioToolContext } from "../chunk-mIaCX9EJ.cjs";
|
|
3
|
+
import * as z$1 from "zod";
|
|
4
|
+
import { MountayaElementsError } from "@mountaya/elements/errors";
|
|
5
|
+
/**
|
|
6
|
+
* The grammar a plugin id and a contribution id are held to.
|
|
7
|
+
*
|
|
8
|
+
* A plugin's tools land on the SAME bus the studio's own verbs are registered on, and its
|
|
9
|
+
* contributions land in the SAME menus. Both are namespaces a third party is writing into, so
|
|
10
|
+
* the only thing standing between "acme adds an export verb" and "acme shadows
|
|
11
|
+
* `studio.itinerary.export`" is a rule about names.
|
|
12
|
+
*
|
|
13
|
+
* It is a rule rather than a list, deliberately. A list of reserved tool names is right the day
|
|
14
|
+
* it is written and wrong the day the next tool ships, and nobody would notice: the new studio
|
|
15
|
+
* verb would collide with a plugin that had been installed for a year. Three rules do the whole
|
|
16
|
+
* job instead (a plugin id is vendor-namespaced, the first segment may not be ours, and a
|
|
17
|
+
* plugin's tools are prefixed with its own id), and none of them goes stale.
|
|
18
|
+
*
|
|
19
|
+
* **It is a collision discipline, not a sandbox.** A plugin runs in the host's own realm with the
|
|
20
|
+
* host's own tool context: it can dispatch every verb and write every store, whatever these
|
|
21
|
+
* patterns say about names. What they buy is that two vendors and the package itself can never
|
|
22
|
+
* mean the same name by accident. What decides whether a plugin may do any of it is the host's
|
|
23
|
+
* decision to install it.
|
|
24
|
+
*
|
|
25
|
+
* What stops a plugin REMOVING one of the studio's verbs is a different mechanism, one directory
|
|
26
|
+
* over, and it is worth knowing which does which: `ctx.bus` carries `ToolBus.dispatcher` (two
|
|
27
|
+
* methods and nothing else on the object), so a plugin's `run` cannot reach `unregister` in
|
|
28
|
+
* TypeScript or out of it. {@link RESERVED_PLUGIN_NAMESPACES} is read a second time behind that,
|
|
29
|
+
* as the bus's own `reserved`, which covers whoever holds a concrete bus. Names are what these
|
|
30
|
+
* patterns are for; reachability is what that pair is for.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* studioPluginIdPattern is the shape of a plugin id: two or more dot-joined lowercase slugs.
|
|
34
|
+
*
|
|
35
|
+
* The first segment is the VENDOR (`acme.avalanche`, `alpine-club.huts`), which is what makes a
|
|
36
|
+
* collision between two organizations' plugins something neither has to think about. A single
|
|
37
|
+
* segment is refused precisely because it is the shape a collision arrives in: `avalanche` is a
|
|
38
|
+
* name two vendors both reach for, and `acme.avalanche` is not.
|
|
39
|
+
*
|
|
40
|
+
* Lowercase and hyphen-separated inside a segment, so an id reads the same in a URL, a log line
|
|
41
|
+
* and a settings file. A digit is allowed after the first character, which is what lets a vendor
|
|
42
|
+
* version a plugin in its own id (`acme.avalanche2`) without a second vocabulary for it.
|
|
43
|
+
*/
|
|
44
|
+
export declare const studioPluginIdPattern: RegExp;
|
|
45
|
+
/**
|
|
46
|
+
* studioContributionIdPattern is the same grammar with one segment allowed.
|
|
47
|
+
*
|
|
48
|
+
* A contribution id is LOCAL to its plugin (the registry qualifies it with the plugin's id
|
|
49
|
+
* before anything else sees it), so `send-to-strava` is unambiguous where a bare plugin id would
|
|
50
|
+
* not be. Dots are still allowed, so a plugin contributing to several surfaces can group its own
|
|
51
|
+
* ids (`export.strava`, `export.garmin`) rather than flattening them.
|
|
52
|
+
*/
|
|
53
|
+
export declare const studioContributionIdPattern: RegExp;
|
|
54
|
+
/**
|
|
55
|
+
* RESERVED_PLUGIN_NAMESPACES are the first segments a plugin may not claim.
|
|
56
|
+
*
|
|
57
|
+
* `mountaya` and `studio` are the two this package's own names are built from (every shipped
|
|
58
|
+
* tool is `studio.<surface>.<verb>`), so a plugin holding either as its vendor segment could
|
|
59
|
+
* produce a prefixed tool name indistinguishable from one of ours. Reserving them is what makes
|
|
60
|
+
* {@link studioPluginIdPattern} plus the tool prefix a complete answer rather than a
|
|
61
|
+
* convention that happens to hold.
|
|
62
|
+
*
|
|
63
|
+
* `as const` rather than `readonly string[]`, so the two names are in the TYPE as well as in the
|
|
64
|
+
* value. A port generating its own vocabulary from this list, or a host narrowing a vendor
|
|
65
|
+
* segment against it, reads them off the declaration instead of restating them.
|
|
66
|
+
*/
|
|
67
|
+
export declare const RESERVED_PLUGIN_NAMESPACES: readonly ["mountaya", "studio"];
|
|
68
|
+
/**
|
|
69
|
+
* Whether a contribution shows, and in what order: the two render-time questions.
|
|
70
|
+
*
|
|
71
|
+
* Both are here rather than on the registry, and that split is the registry's whole snapshot
|
|
72
|
+
* contract: `at(slot)` is a STORE, stable between mutations, and a gate reads the tool context,
|
|
73
|
+
* which changes underneath it. A gated snapshot could not be stable by construction, so the
|
|
74
|
+
* registry hands back everything installed and the surface filters at render.
|
|
75
|
+
*/
|
|
76
|
+
/**
|
|
77
|
+
* StudioGatedContribution is the shape gating needs, which both a declaration and a resolved
|
|
78
|
+
* registry entry satisfy.
|
|
79
|
+
*
|
|
80
|
+
* Exported because it appears in an exported signature. An unexported local surfaces in the
|
|
81
|
+
* emitted `.d.ts` as a type a consumer can read and cannot NAME, so a host writing their own
|
|
82
|
+
* helper over the same rule, or a port author writing the constraint down, has nothing to import.
|
|
83
|
+
*/
|
|
84
|
+
interface StudioGatedContribution {
|
|
85
|
+
readonly gate?: StudioPluginGate | undefined;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* StudioOrderedContribution is the shape sorting needs: a declared `order` and an install-order
|
|
89
|
+
* tiebreak.
|
|
90
|
+
*
|
|
91
|
+
* `sequence` is optional and absent means 0, which is what lets a host sort DECLARATIONS: a
|
|
92
|
+
* `StudioPluginContribution` has no sequence, because the number is assigned when the registry
|
|
93
|
+
* adopts one. Exported for the reason {@link StudioGatedContribution} is.
|
|
94
|
+
*/
|
|
95
|
+
interface StudioOrderedContribution {
|
|
96
|
+
readonly order?: number | undefined;
|
|
97
|
+
readonly sequence?: number | undefined;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* isStudioContributionAvailable answers whether a contribution's gate passes right now.
|
|
101
|
+
*
|
|
102
|
+
* STRUCTURAL in its first argument (it asks for a `gate` and nothing else), so it applies
|
|
103
|
+
* unchanged to a declaration a host is validating and to an entry the registry already holds. A
|
|
104
|
+
* signature naming either concrete type would need a second copy for the other.
|
|
105
|
+
*
|
|
106
|
+
* The three clauses are ANDed and each ABSENT one is no constraint, so a contribution with no
|
|
107
|
+
* gate is always available. A `when` that THROWS resolves to unavailable: a predicate that
|
|
108
|
+
* cannot answer has not said yes, and this runs inside somebody else's render, so letting the
|
|
109
|
+
* throw out would take the whole menu down over one plugin's bad guard. The fault still reaches
|
|
110
|
+
* the program's uncaught-error handling on a microtask, once per gate however often the gate is
|
|
111
|
+
* asked, so the author of an item that never shows has a signal. A `when` that answers anything
|
|
112
|
+
* but `true` is unavailable for the same reason, and is no fault.
|
|
113
|
+
*/
|
|
114
|
+
export declare const isStudioContributionAvailable: (contribution: StudioGatedContribution, ctx: StudioToolContext) => boolean;
|
|
115
|
+
/**
|
|
116
|
+
* availableStudioContributions filters a list to the contributions whose gates pass.
|
|
117
|
+
*
|
|
118
|
+
* **It returns its INPUT by reference when nothing was dropped**, and that is the property the
|
|
119
|
+
* whole thing exists for rather than an optimisation. Its caller is a `useMemo` feeding a list
|
|
120
|
+
* that re-renders per segment row; a fresh array on every render would churn every consumer of
|
|
121
|
+
* it, and the common case by far is that every gate passes.
|
|
122
|
+
*/
|
|
123
|
+
export declare const availableStudioContributions: <TContribution extends StudioGatedContribution>(contributions: readonly TContribution[], ctx: StudioToolContext) => readonly TContribution[];
|
|
124
|
+
/**
|
|
125
|
+
* sortStudioContributions returns a new list in render order: `order` ascending, ties on install
|
|
126
|
+
* order.
|
|
127
|
+
*
|
|
128
|
+
* The tiebreak is what makes the result TOTAL. `order` is an uncoordinated number a plugin
|
|
129
|
+
* author picks alone, so two plugins choosing `100` is the normal case rather than the edge one,
|
|
130
|
+
* and `sequence` resolves it the same way on every render and every reload.
|
|
131
|
+
*/
|
|
132
|
+
export declare const sortStudioContributions: <TContribution extends StudioOrderedContribution>(contributions: readonly TContribution[]) => TContribution[];
|
|
133
|
+
/**
|
|
134
|
+
* studioPluginDefectCodeSchema is every way a plugin declaration can be refused, closed.
|
|
135
|
+
*
|
|
136
|
+
* CODES rather than sentences, for the reason every other vocabulary in this package is one:
|
|
137
|
+
* this package renders nothing and translates nothing, so a defect carrying an English string
|
|
138
|
+
* would put English in a host's French settings screen. A host that surfaces install failures
|
|
139
|
+
* maps these to their own copy; a host that only logs them reads the code.
|
|
140
|
+
*
|
|
141
|
+
* What each one means:
|
|
142
|
+
*
|
|
143
|
+
* - `contribution_empty`: neither `label` + `run` nor `view`, so there is nothing to draw. A
|
|
144
|
+
* `view` of `null` and a `label` of `""` count as absent: both draw nothing, which is the thing
|
|
145
|
+
* being refused rather than a spelling of it.
|
|
146
|
+
* - `contribution_id_duplicate`: two contributions in ONE plugin share an id.
|
|
147
|
+
* - `contribution_id_invalid`: the id is not {@link studioContributionIdPattern}.
|
|
148
|
+
* - `plugin_id_invalid`: the id is not {@link studioPluginIdPattern}; usually a missing
|
|
149
|
+
* vendor segment.
|
|
150
|
+
* - `plugin_id_reserved`: the vendor segment is one of {@link RESERVED_PLUGIN_NAMESPACES}.
|
|
151
|
+
* - `plugin_id_taken`: a plugin with this id is already installed.
|
|
152
|
+
* - `slot_unknown`: the slot names no region this studio has.
|
|
153
|
+
* - `tool_key_mismatch`: the record key is not the tool's own `name`, which would make the
|
|
154
|
+
* declaration read one way and register another.
|
|
155
|
+
* - `tool_name_empty`: the tool name is the plugin's prefix and nothing more, so the tool has no
|
|
156
|
+
* name of its own. The name carries the id, which is why this is a code of its own and no case
|
|
157
|
+
* of `tool_name_not_namespaced`.
|
|
158
|
+
* - `tool_name_not_namespaced`: the tool name is not prefixed with the plugin's id.
|
|
159
|
+
* - `tool_name_taken`: the bus already holds this name, the studio's own verbs included.
|
|
160
|
+
*/
|
|
161
|
+
export declare const studioPluginDefectCodeSchema: z$1.ZodEnum<{
|
|
162
|
+
contribution_empty: "contribution_empty";
|
|
163
|
+
contribution_id_duplicate: "contribution_id_duplicate";
|
|
164
|
+
contribution_id_invalid: "contribution_id_invalid";
|
|
165
|
+
plugin_id_invalid: "plugin_id_invalid";
|
|
166
|
+
plugin_id_reserved: "plugin_id_reserved";
|
|
167
|
+
plugin_id_taken: "plugin_id_taken";
|
|
168
|
+
slot_unknown: "slot_unknown";
|
|
169
|
+
tool_key_mismatch: "tool_key_mismatch";
|
|
170
|
+
tool_name_empty: "tool_name_empty";
|
|
171
|
+
tool_name_not_namespaced: "tool_name_not_namespaced";
|
|
172
|
+
tool_name_taken: "tool_name_taken";
|
|
173
|
+
}>;
|
|
174
|
+
/** One way a plugin declaration is refused, derived from {@link studioPluginDefectCodeSchema}. */
|
|
175
|
+
type StudioPluginDefectCode = z$1.infer<typeof studioPluginDefectCodeSchema>;
|
|
176
|
+
/**
|
|
177
|
+
* StudioPluginDefect is one refusal: what was wrong, whose plugin it was, and which part of it.
|
|
178
|
+
*
|
|
179
|
+
* `subject` is the contribution id, tool name or slot the code is about, and it is absent for
|
|
180
|
+
* the three codes that are about the plugin id itself, where `pluginId` already names the
|
|
181
|
+
* subject and repeating it would read as two different things being wrong.
|
|
182
|
+
*/
|
|
183
|
+
interface StudioPluginDefect {
|
|
184
|
+
readonly code: StudioPluginDefectCode;
|
|
185
|
+
readonly pluginId: string;
|
|
186
|
+
readonly subject?: string | undefined;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* StudioPluginValidationScope is what the rest of the world already holds, passed IN.
|
|
190
|
+
*
|
|
191
|
+
* Passed and never read, which keeps the validation pure and portable: `plugin_id_taken` and
|
|
192
|
+
* `tool_name_taken` are about collisions, and a collision is a question about a live registry and
|
|
193
|
+
* a live bus, neither of which a rule may reach for. A port reimplements the validation against
|
|
194
|
+
* its own two sets and gets the same answers.
|
|
195
|
+
*/
|
|
196
|
+
interface StudioPluginValidationScope {
|
|
197
|
+
/** The plugin ids already installed. */
|
|
198
|
+
readonly installed: ReadonlySet<string>;
|
|
199
|
+
/** Every tool name already on the bus, the studio's own verbs included. */
|
|
200
|
+
readonly tools: ReadonlySet<string>;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* validateStudioPlugin returns every defect in a declaration, or an empty list.
|
|
204
|
+
*
|
|
205
|
+
* **Every defect, never the first.** An install is refused as a whole, so stopping early would
|
|
206
|
+
* teach an author one fix per attempt: three malformed contribution ids costing three
|
|
207
|
+
* reinstalls to discover. The list is the report.
|
|
208
|
+
*
|
|
209
|
+
* It reports rather than throws for the same reason: the caller decides what a refusal IS. The
|
|
210
|
+
* registry's `install` throws a {@link StudioPluginError} carrying this list, because an install
|
|
211
|
+
* a host asked for and did not get has to be loud; a host validating a plugin they are about to
|
|
212
|
+
* offer in a settings screen wants the list and no exception.
|
|
213
|
+
*
|
|
214
|
+
* It is total over what a wire can hold. A manifest read from storage has no type behind it, so
|
|
215
|
+
* every member is read as it stands: an id that is no string is `plugin_id_invalid` under an
|
|
216
|
+
* empty `pluginId`, a contribution whose label is no text or whose `run` is no function has
|
|
217
|
+
* nothing to draw, contributions that are no list are read as one malformed contribution, and a
|
|
218
|
+
* tool that holds no name is a `tool_key_mismatch` under its key, as tools that are no record
|
|
219
|
+
* are one under what stands there.
|
|
220
|
+
*
|
|
221
|
+
* @param plugin - The declaration to judge, typed or read off a wire.
|
|
222
|
+
* @param scope - The plugin ids and tool names already taken, for the collision codes.
|
|
223
|
+
* @returns Every defect found, in declaration order; empty for a declaration that installs.
|
|
224
|
+
*/
|
|
225
|
+
export declare const validateStudioPlugin: <TView>(plugin: StudioPlugin<TView>, scope: StudioPluginValidationScope) => readonly StudioPluginDefect[];
|
|
226
|
+
/**
|
|
227
|
+
* StudioPluginError is what a refused install throws, carrying every defect that refused it.
|
|
228
|
+
*
|
|
229
|
+
* Every defect rather than the first, which is why the list is on the error rather than folded
|
|
230
|
+
* into the message: a plugin with three malformed contribution ids should report three, once,
|
|
231
|
+
* rather than teaching its author one fix per reinstall. The `message` is a readable join of the
|
|
232
|
+
* codes for a log line; `defects` is the part a host's own surface renders.
|
|
233
|
+
*
|
|
234
|
+
* It extends the ELEMENTS' error family rather than starting a studio family of its own, which
|
|
235
|
+
* is the rule `boundary.test.ts` holds this package to: a consumer narrows on ONE family across
|
|
236
|
+
* the whole stack, and a second hierarchy would mean two.
|
|
237
|
+
*/
|
|
238
|
+
export declare class StudioPluginError extends MountayaElementsError {
|
|
239
|
+
readonly name: string;
|
|
240
|
+
readonly defects: readonly StudioPluginDefect[];
|
|
241
|
+
constructor(defects: readonly StudioPluginDefect[], options?: ErrorOptions);
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* isStudioPluginError recognises a refused install STRUCTURALLY, with no `instanceof`.
|
|
245
|
+
*
|
|
246
|
+
* The reason generalizes past this package and is written out in `data/rules/restErrors.ts`:
|
|
247
|
+
* `instanceof` asks whether a value came from one constructor IDENTITY, which is a stronger
|
|
248
|
+
* question than any caller here is asking. A second copy of this module in a consumer's graph, a
|
|
249
|
+
* structured clone across a worker boundary, a bundler that duplicated the chunk: each breaks
|
|
250
|
+
* the check while leaving the value perfectly intact, and none of them fails loudly.
|
|
251
|
+
*
|
|
252
|
+
* It checks the DEFECT LIST as well as the name, because the name alone is a predicate anything
|
|
253
|
+
* can satisfy, and everything downstream of this narrowing reads `.defects` as a non-optional
|
|
254
|
+
* array. A structured clone carries the list; `{ name: "StudioPluginError" }` does not, and is
|
|
255
|
+
* exactly the shape that would otherwise pass here and throw at the first `.map`.
|
|
256
|
+
*/
|
|
257
|
+
export declare const isStudioPluginError: (error: unknown) => error is StudioPluginError;
|
|
258
|
+
/**
|
|
259
|
+
* How a plugin's names are kept out of everybody else's.
|
|
260
|
+
*
|
|
261
|
+
* Three rules, and they only work together: plugin ids are unique and vendor-namespaced, the
|
|
262
|
+
* reserved namespaces are refused, and every tool a plugin registers carries its plugin's id as
|
|
263
|
+
* a prefix. That composition is what protects the studio's `studio.*` verbs without a list of
|
|
264
|
+
* reserved tool names, a list that would be complete the day it is written and silently wrong
|
|
265
|
+
* the day the next studio tool ships.
|
|
266
|
+
*/
|
|
267
|
+
/**
|
|
268
|
+
* studioPluginToolPrefix is what every tool a plugin registers must start with.
|
|
269
|
+
*
|
|
270
|
+
* `${pluginId}.`: a DOT, because a tool name is already a dotted path
|
|
271
|
+
* (`studio.itinerary.export`) and a plugin's verbs should read as one: `acme.avalanche.refresh`
|
|
272
|
+
* is a tool name a model can be shown beside the studio's own without explanation.
|
|
273
|
+
*/
|
|
274
|
+
export declare const studioPluginToolPrefix: (pluginId: string) => string;
|
|
275
|
+
/**
|
|
276
|
+
* isStudioPluginToolName answers whether a tool name belongs to a given plugin.
|
|
277
|
+
*
|
|
278
|
+
* The prefix and not merely a `startsWith` on the bare id: `acme.avalanche` must not be read as
|
|
279
|
+
* owning `acme.avalanche-pro.refresh`, which is a different plugin from a vendor who picked an
|
|
280
|
+
* adjacent name.
|
|
281
|
+
*
|
|
282
|
+
* It reads the prefix and nothing after it, so `acme.avalanche.` belongs to `acme.avalanche`
|
|
283
|
+
* while naming no tool. `validateStudioPlugin` refuses that name under `tool_name_empty`.
|
|
284
|
+
*/
|
|
285
|
+
export declare const isStudioPluginToolName: (pluginId: string, name: string) => boolean;
|
|
286
|
+
/**
|
|
287
|
+
* qualifyStudioContributionId makes a plugin-local contribution id globally unique.
|
|
288
|
+
*
|
|
289
|
+
* A COLON separates the two halves, and the choice is load-bearing rather than cosmetic: a dot
|
|
290
|
+
* already separates a tool's namespaces and a slot's regions, so `acme.avalanche.risk` would be
|
|
291
|
+
* ambiguous about where the plugin ends. `acme.avalanche:risk` cannot be misread, and it splits
|
|
292
|
+
* back apart with no grammar.
|
|
293
|
+
*/
|
|
294
|
+
export declare const qualifyStudioContributionId: (pluginId: string, contributionId: string) => string;
|
|
295
|
+
export { type StudioGatedContribution, type StudioOrderedContribution, type StudioPlugin, type StudioPluginContribution, type StudioPluginDefect, type StudioPluginDefectCode, StudioPluginEngine, type StudioPluginEngineOptions, type StudioPluginEntry, type StudioPluginGate, type StudioPluginItineraryMenuTarget, type StudioPluginMapContextMenuTarget, type StudioPluginMapControlsTarget, type StudioPluginObserver, type StudioPluginProfileTarget, type StudioPluginRefusalReporter, type StudioPluginRunEvent, type StudioPluginRunOutcome, type StudioPluginSegmentMenuTarget, type StudioPluginSlot, type StudioPluginSlotTargets, type StudioPluginSubject, type StudioPluginTarget, type StudioPluginToolSink, type StudioPluginValidationScope, type StudioPluginWaypointMenuTarget, type StudioPluginZoneMenuTarget, type StudioSlotContribution, type StudioSlotEntry, studioPluginSlotSchema };
|
|
296
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { C as StudioPluginWaypointMenuTarget, S as StudioPluginTarget, T as studioPluginSlotSchema, _ as StudioPluginMapControlsTarget, a as StudioPluginRunEvent, b as StudioPluginSlot, c as StudioPlugin, d as StudioPluginGate, f as StudioPluginSubject, g as StudioPluginMapContextMenuTarget, h as StudioPluginItineraryMenuTarget, i as StudioPluginRefusalReporter, l as StudioPluginContribution, m as StudioSlotEntry, n as StudioPluginEngineOptions, o as StudioPluginRunOutcome, p as StudioSlotContribution, r as StudioPluginObserver, s as StudioPluginToolSink, t as StudioPluginEngine, u as StudioPluginEntry, v as StudioPluginProfileTarget, w as StudioPluginZoneMenuTarget, x as StudioPluginSlotTargets, y as StudioPluginSegmentMenuTarget } from "../chunk-cVXLsZfL.js";
|
|
2
|
+
import { a as StudioToolContext } from "../chunk-BP4uy7E1.js";
|
|
3
|
+
import * as z$1 from "zod";
|
|
4
|
+
import { MountayaElementsError } from "@mountaya/elements/errors";
|
|
5
|
+
/**
|
|
6
|
+
* The grammar a plugin id and a contribution id are held to.
|
|
7
|
+
*
|
|
8
|
+
* A plugin's tools land on the SAME bus the studio's own verbs are registered on, and its
|
|
9
|
+
* contributions land in the SAME menus. Both are namespaces a third party is writing into, so
|
|
10
|
+
* the only thing standing between "acme adds an export verb" and "acme shadows
|
|
11
|
+
* `studio.itinerary.export`" is a rule about names.
|
|
12
|
+
*
|
|
13
|
+
* It is a rule rather than a list, deliberately. A list of reserved tool names is right the day
|
|
14
|
+
* it is written and wrong the day the next tool ships, and nobody would notice: the new studio
|
|
15
|
+
* verb would collide with a plugin that had been installed for a year. Three rules do the whole
|
|
16
|
+
* job instead (a plugin id is vendor-namespaced, the first segment may not be ours, and a
|
|
17
|
+
* plugin's tools are prefixed with its own id), and none of them goes stale.
|
|
18
|
+
*
|
|
19
|
+
* **It is a collision discipline, not a sandbox.** A plugin runs in the host's own realm with the
|
|
20
|
+
* host's own tool context: it can dispatch every verb and write every store, whatever these
|
|
21
|
+
* patterns say about names. What they buy is that two vendors and the package itself can never
|
|
22
|
+
* mean the same name by accident. What decides whether a plugin may do any of it is the host's
|
|
23
|
+
* decision to install it.
|
|
24
|
+
*
|
|
25
|
+
* What stops a plugin REMOVING one of the studio's verbs is a different mechanism, one directory
|
|
26
|
+
* over, and it is worth knowing which does which: `ctx.bus` carries `ToolBus.dispatcher` (two
|
|
27
|
+
* methods and nothing else on the object), so a plugin's `run` cannot reach `unregister` in
|
|
28
|
+
* TypeScript or out of it. {@link RESERVED_PLUGIN_NAMESPACES} is read a second time behind that,
|
|
29
|
+
* as the bus's own `reserved`, which covers whoever holds a concrete bus. Names are what these
|
|
30
|
+
* patterns are for; reachability is what that pair is for.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* studioPluginIdPattern is the shape of a plugin id: two or more dot-joined lowercase slugs.
|
|
34
|
+
*
|
|
35
|
+
* The first segment is the VENDOR (`acme.avalanche`, `alpine-club.huts`), which is what makes a
|
|
36
|
+
* collision between two organizations' plugins something neither has to think about. A single
|
|
37
|
+
* segment is refused precisely because it is the shape a collision arrives in: `avalanche` is a
|
|
38
|
+
* name two vendors both reach for, and `acme.avalanche` is not.
|
|
39
|
+
*
|
|
40
|
+
* Lowercase and hyphen-separated inside a segment, so an id reads the same in a URL, a log line
|
|
41
|
+
* and a settings file. A digit is allowed after the first character, which is what lets a vendor
|
|
42
|
+
* version a plugin in its own id (`acme.avalanche2`) without a second vocabulary for it.
|
|
43
|
+
*/
|
|
44
|
+
export declare const studioPluginIdPattern: RegExp;
|
|
45
|
+
/**
|
|
46
|
+
* studioContributionIdPattern is the same grammar with one segment allowed.
|
|
47
|
+
*
|
|
48
|
+
* A contribution id is LOCAL to its plugin (the registry qualifies it with the plugin's id
|
|
49
|
+
* before anything else sees it), so `send-to-strava` is unambiguous where a bare plugin id would
|
|
50
|
+
* not be. Dots are still allowed, so a plugin contributing to several surfaces can group its own
|
|
51
|
+
* ids (`export.strava`, `export.garmin`) rather than flattening them.
|
|
52
|
+
*/
|
|
53
|
+
export declare const studioContributionIdPattern: RegExp;
|
|
54
|
+
/**
|
|
55
|
+
* RESERVED_PLUGIN_NAMESPACES are the first segments a plugin may not claim.
|
|
56
|
+
*
|
|
57
|
+
* `mountaya` and `studio` are the two this package's own names are built from (every shipped
|
|
58
|
+
* tool is `studio.<surface>.<verb>`), so a plugin holding either as its vendor segment could
|
|
59
|
+
* produce a prefixed tool name indistinguishable from one of ours. Reserving them is what makes
|
|
60
|
+
* {@link studioPluginIdPattern} plus the tool prefix a complete answer rather than a
|
|
61
|
+
* convention that happens to hold.
|
|
62
|
+
*
|
|
63
|
+
* `as const` rather than `readonly string[]`, so the two names are in the TYPE as well as in the
|
|
64
|
+
* value. A port generating its own vocabulary from this list, or a host narrowing a vendor
|
|
65
|
+
* segment against it, reads them off the declaration instead of restating them.
|
|
66
|
+
*/
|
|
67
|
+
export declare const RESERVED_PLUGIN_NAMESPACES: readonly ["mountaya", "studio"];
|
|
68
|
+
/**
|
|
69
|
+
* Whether a contribution shows, and in what order: the two render-time questions.
|
|
70
|
+
*
|
|
71
|
+
* Both are here rather than on the registry, and that split is the registry's whole snapshot
|
|
72
|
+
* contract: `at(slot)` is a STORE, stable between mutations, and a gate reads the tool context,
|
|
73
|
+
* which changes underneath it. A gated snapshot could not be stable by construction, so the
|
|
74
|
+
* registry hands back everything installed and the surface filters at render.
|
|
75
|
+
*/
|
|
76
|
+
/**
|
|
77
|
+
* StudioGatedContribution is the shape gating needs, which both a declaration and a resolved
|
|
78
|
+
* registry entry satisfy.
|
|
79
|
+
*
|
|
80
|
+
* Exported because it appears in an exported signature. An unexported local surfaces in the
|
|
81
|
+
* emitted `.d.ts` as a type a consumer can read and cannot NAME, so a host writing their own
|
|
82
|
+
* helper over the same rule, or a port author writing the constraint down, has nothing to import.
|
|
83
|
+
*/
|
|
84
|
+
interface StudioGatedContribution {
|
|
85
|
+
readonly gate?: StudioPluginGate | undefined;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* StudioOrderedContribution is the shape sorting needs: a declared `order` and an install-order
|
|
89
|
+
* tiebreak.
|
|
90
|
+
*
|
|
91
|
+
* `sequence` is optional and absent means 0, which is what lets a host sort DECLARATIONS: a
|
|
92
|
+
* `StudioPluginContribution` has no sequence, because the number is assigned when the registry
|
|
93
|
+
* adopts one. Exported for the reason {@link StudioGatedContribution} is.
|
|
94
|
+
*/
|
|
95
|
+
interface StudioOrderedContribution {
|
|
96
|
+
readonly order?: number | undefined;
|
|
97
|
+
readonly sequence?: number | undefined;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* isStudioContributionAvailable answers whether a contribution's gate passes right now.
|
|
101
|
+
*
|
|
102
|
+
* STRUCTURAL in its first argument (it asks for a `gate` and nothing else), so it applies
|
|
103
|
+
* unchanged to a declaration a host is validating and to an entry the registry already holds. A
|
|
104
|
+
* signature naming either concrete type would need a second copy for the other.
|
|
105
|
+
*
|
|
106
|
+
* The three clauses are ANDed and each ABSENT one is no constraint, so a contribution with no
|
|
107
|
+
* gate is always available. A `when` that THROWS resolves to unavailable: a predicate that
|
|
108
|
+
* cannot answer has not said yes, and this runs inside somebody else's render, so letting the
|
|
109
|
+
* throw out would take the whole menu down over one plugin's bad guard. The fault still reaches
|
|
110
|
+
* the program's uncaught-error handling on a microtask, once per gate however often the gate is
|
|
111
|
+
* asked, so the author of an item that never shows has a signal. A `when` that answers anything
|
|
112
|
+
* but `true` is unavailable for the same reason, and is no fault.
|
|
113
|
+
*/
|
|
114
|
+
export declare const isStudioContributionAvailable: (contribution: StudioGatedContribution, ctx: StudioToolContext) => boolean;
|
|
115
|
+
/**
|
|
116
|
+
* availableStudioContributions filters a list to the contributions whose gates pass.
|
|
117
|
+
*
|
|
118
|
+
* **It returns its INPUT by reference when nothing was dropped**, and that is the property the
|
|
119
|
+
* whole thing exists for rather than an optimisation. Its caller is a `useMemo` feeding a list
|
|
120
|
+
* that re-renders per segment row; a fresh array on every render would churn every consumer of
|
|
121
|
+
* it, and the common case by far is that every gate passes.
|
|
122
|
+
*/
|
|
123
|
+
export declare const availableStudioContributions: <TContribution extends StudioGatedContribution>(contributions: readonly TContribution[], ctx: StudioToolContext) => readonly TContribution[];
|
|
124
|
+
/**
|
|
125
|
+
* sortStudioContributions returns a new list in render order: `order` ascending, ties on install
|
|
126
|
+
* order.
|
|
127
|
+
*
|
|
128
|
+
* The tiebreak is what makes the result TOTAL. `order` is an uncoordinated number a plugin
|
|
129
|
+
* author picks alone, so two plugins choosing `100` is the normal case rather than the edge one,
|
|
130
|
+
* and `sequence` resolves it the same way on every render and every reload.
|
|
131
|
+
*/
|
|
132
|
+
export declare const sortStudioContributions: <TContribution extends StudioOrderedContribution>(contributions: readonly TContribution[]) => TContribution[];
|
|
133
|
+
/**
|
|
134
|
+
* studioPluginDefectCodeSchema is every way a plugin declaration can be refused, closed.
|
|
135
|
+
*
|
|
136
|
+
* CODES rather than sentences, for the reason every other vocabulary in this package is one:
|
|
137
|
+
* this package renders nothing and translates nothing, so a defect carrying an English string
|
|
138
|
+
* would put English in a host's French settings screen. A host that surfaces install failures
|
|
139
|
+
* maps these to their own copy; a host that only logs them reads the code.
|
|
140
|
+
*
|
|
141
|
+
* What each one means:
|
|
142
|
+
*
|
|
143
|
+
* - `contribution_empty`: neither `label` + `run` nor `view`, so there is nothing to draw. A
|
|
144
|
+
* `view` of `null` and a `label` of `""` count as absent: both draw nothing, which is the thing
|
|
145
|
+
* being refused rather than a spelling of it.
|
|
146
|
+
* - `contribution_id_duplicate`: two contributions in ONE plugin share an id.
|
|
147
|
+
* - `contribution_id_invalid`: the id is not {@link studioContributionIdPattern}.
|
|
148
|
+
* - `plugin_id_invalid`: the id is not {@link studioPluginIdPattern}; usually a missing
|
|
149
|
+
* vendor segment.
|
|
150
|
+
* - `plugin_id_reserved`: the vendor segment is one of {@link RESERVED_PLUGIN_NAMESPACES}.
|
|
151
|
+
* - `plugin_id_taken`: a plugin with this id is already installed.
|
|
152
|
+
* - `slot_unknown`: the slot names no region this studio has.
|
|
153
|
+
* - `tool_key_mismatch`: the record key is not the tool's own `name`, which would make the
|
|
154
|
+
* declaration read one way and register another.
|
|
155
|
+
* - `tool_name_empty`: the tool name is the plugin's prefix and nothing more, so the tool has no
|
|
156
|
+
* name of its own. The name carries the id, which is why this is a code of its own and no case
|
|
157
|
+
* of `tool_name_not_namespaced`.
|
|
158
|
+
* - `tool_name_not_namespaced`: the tool name is not prefixed with the plugin's id.
|
|
159
|
+
* - `tool_name_taken`: the bus already holds this name, the studio's own verbs included.
|
|
160
|
+
*/
|
|
161
|
+
export declare const studioPluginDefectCodeSchema: z$1.ZodEnum<{
|
|
162
|
+
contribution_empty: "contribution_empty";
|
|
163
|
+
contribution_id_duplicate: "contribution_id_duplicate";
|
|
164
|
+
contribution_id_invalid: "contribution_id_invalid";
|
|
165
|
+
plugin_id_invalid: "plugin_id_invalid";
|
|
166
|
+
plugin_id_reserved: "plugin_id_reserved";
|
|
167
|
+
plugin_id_taken: "plugin_id_taken";
|
|
168
|
+
slot_unknown: "slot_unknown";
|
|
169
|
+
tool_key_mismatch: "tool_key_mismatch";
|
|
170
|
+
tool_name_empty: "tool_name_empty";
|
|
171
|
+
tool_name_not_namespaced: "tool_name_not_namespaced";
|
|
172
|
+
tool_name_taken: "tool_name_taken";
|
|
173
|
+
}>;
|
|
174
|
+
/** One way a plugin declaration is refused, derived from {@link studioPluginDefectCodeSchema}. */
|
|
175
|
+
type StudioPluginDefectCode = z$1.infer<typeof studioPluginDefectCodeSchema>;
|
|
176
|
+
/**
|
|
177
|
+
* StudioPluginDefect is one refusal: what was wrong, whose plugin it was, and which part of it.
|
|
178
|
+
*
|
|
179
|
+
* `subject` is the contribution id, tool name or slot the code is about, and it is absent for
|
|
180
|
+
* the three codes that are about the plugin id itself, where `pluginId` already names the
|
|
181
|
+
* subject and repeating it would read as two different things being wrong.
|
|
182
|
+
*/
|
|
183
|
+
interface StudioPluginDefect {
|
|
184
|
+
readonly code: StudioPluginDefectCode;
|
|
185
|
+
readonly pluginId: string;
|
|
186
|
+
readonly subject?: string | undefined;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* StudioPluginValidationScope is what the rest of the world already holds, passed IN.
|
|
190
|
+
*
|
|
191
|
+
* Passed and never read, which keeps the validation pure and portable: `plugin_id_taken` and
|
|
192
|
+
* `tool_name_taken` are about collisions, and a collision is a question about a live registry and
|
|
193
|
+
* a live bus, neither of which a rule may reach for. A port reimplements the validation against
|
|
194
|
+
* its own two sets and gets the same answers.
|
|
195
|
+
*/
|
|
196
|
+
interface StudioPluginValidationScope {
|
|
197
|
+
/** The plugin ids already installed. */
|
|
198
|
+
readonly installed: ReadonlySet<string>;
|
|
199
|
+
/** Every tool name already on the bus, the studio's own verbs included. */
|
|
200
|
+
readonly tools: ReadonlySet<string>;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* validateStudioPlugin returns every defect in a declaration, or an empty list.
|
|
204
|
+
*
|
|
205
|
+
* **Every defect, never the first.** An install is refused as a whole, so stopping early would
|
|
206
|
+
* teach an author one fix per attempt: three malformed contribution ids costing three
|
|
207
|
+
* reinstalls to discover. The list is the report.
|
|
208
|
+
*
|
|
209
|
+
* It reports rather than throws for the same reason: the caller decides what a refusal IS. The
|
|
210
|
+
* registry's `install` throws a {@link StudioPluginError} carrying this list, because an install
|
|
211
|
+
* a host asked for and did not get has to be loud; a host validating a plugin they are about to
|
|
212
|
+
* offer in a settings screen wants the list and no exception.
|
|
213
|
+
*
|
|
214
|
+
* It is total over what a wire can hold. A manifest read from storage has no type behind it, so
|
|
215
|
+
* every member is read as it stands: an id that is no string is `plugin_id_invalid` under an
|
|
216
|
+
* empty `pluginId`, a contribution whose label is no text or whose `run` is no function has
|
|
217
|
+
* nothing to draw, contributions that are no list are read as one malformed contribution, and a
|
|
218
|
+
* tool that holds no name is a `tool_key_mismatch` under its key, as tools that are no record
|
|
219
|
+
* are one under what stands there.
|
|
220
|
+
*
|
|
221
|
+
* @param plugin - The declaration to judge, typed or read off a wire.
|
|
222
|
+
* @param scope - The plugin ids and tool names already taken, for the collision codes.
|
|
223
|
+
* @returns Every defect found, in declaration order; empty for a declaration that installs.
|
|
224
|
+
*/
|
|
225
|
+
export declare const validateStudioPlugin: <TView>(plugin: StudioPlugin<TView>, scope: StudioPluginValidationScope) => readonly StudioPluginDefect[];
|
|
226
|
+
/**
|
|
227
|
+
* StudioPluginError is what a refused install throws, carrying every defect that refused it.
|
|
228
|
+
*
|
|
229
|
+
* Every defect rather than the first, which is why the list is on the error rather than folded
|
|
230
|
+
* into the message: a plugin with three malformed contribution ids should report three, once,
|
|
231
|
+
* rather than teaching its author one fix per reinstall. The `message` is a readable join of the
|
|
232
|
+
* codes for a log line; `defects` is the part a host's own surface renders.
|
|
233
|
+
*
|
|
234
|
+
* It extends the ELEMENTS' error family rather than starting a studio family of its own, which
|
|
235
|
+
* is the rule `boundary.test.ts` holds this package to: a consumer narrows on ONE family across
|
|
236
|
+
* the whole stack, and a second hierarchy would mean two.
|
|
237
|
+
*/
|
|
238
|
+
export declare class StudioPluginError extends MountayaElementsError {
|
|
239
|
+
readonly name: string;
|
|
240
|
+
readonly defects: readonly StudioPluginDefect[];
|
|
241
|
+
constructor(defects: readonly StudioPluginDefect[], options?: ErrorOptions);
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* isStudioPluginError recognises a refused install STRUCTURALLY, with no `instanceof`.
|
|
245
|
+
*
|
|
246
|
+
* The reason generalizes past this package and is written out in `data/rules/restErrors.ts`:
|
|
247
|
+
* `instanceof` asks whether a value came from one constructor IDENTITY, which is a stronger
|
|
248
|
+
* question than any caller here is asking. A second copy of this module in a consumer's graph, a
|
|
249
|
+
* structured clone across a worker boundary, a bundler that duplicated the chunk: each breaks
|
|
250
|
+
* the check while leaving the value perfectly intact, and none of them fails loudly.
|
|
251
|
+
*
|
|
252
|
+
* It checks the DEFECT LIST as well as the name, because the name alone is a predicate anything
|
|
253
|
+
* can satisfy, and everything downstream of this narrowing reads `.defects` as a non-optional
|
|
254
|
+
* array. A structured clone carries the list; `{ name: "StudioPluginError" }` does not, and is
|
|
255
|
+
* exactly the shape that would otherwise pass here and throw at the first `.map`.
|
|
256
|
+
*/
|
|
257
|
+
export declare const isStudioPluginError: (error: unknown) => error is StudioPluginError;
|
|
258
|
+
/**
|
|
259
|
+
* How a plugin's names are kept out of everybody else's.
|
|
260
|
+
*
|
|
261
|
+
* Three rules, and they only work together: plugin ids are unique and vendor-namespaced, the
|
|
262
|
+
* reserved namespaces are refused, and every tool a plugin registers carries its plugin's id as
|
|
263
|
+
* a prefix. That composition is what protects the studio's `studio.*` verbs without a list of
|
|
264
|
+
* reserved tool names, a list that would be complete the day it is written and silently wrong
|
|
265
|
+
* the day the next studio tool ships.
|
|
266
|
+
*/
|
|
267
|
+
/**
|
|
268
|
+
* studioPluginToolPrefix is what every tool a plugin registers must start with.
|
|
269
|
+
*
|
|
270
|
+
* `${pluginId}.`: a DOT, because a tool name is already a dotted path
|
|
271
|
+
* (`studio.itinerary.export`) and a plugin's verbs should read as one: `acme.avalanche.refresh`
|
|
272
|
+
* is a tool name a model can be shown beside the studio's own without explanation.
|
|
273
|
+
*/
|
|
274
|
+
export declare const studioPluginToolPrefix: (pluginId: string) => string;
|
|
275
|
+
/**
|
|
276
|
+
* isStudioPluginToolName answers whether a tool name belongs to a given plugin.
|
|
277
|
+
*
|
|
278
|
+
* The prefix and not merely a `startsWith` on the bare id: `acme.avalanche` must not be read as
|
|
279
|
+
* owning `acme.avalanche-pro.refresh`, which is a different plugin from a vendor who picked an
|
|
280
|
+
* adjacent name.
|
|
281
|
+
*
|
|
282
|
+
* It reads the prefix and nothing after it, so `acme.avalanche.` belongs to `acme.avalanche`
|
|
283
|
+
* while naming no tool. `validateStudioPlugin` refuses that name under `tool_name_empty`.
|
|
284
|
+
*/
|
|
285
|
+
export declare const isStudioPluginToolName: (pluginId: string, name: string) => boolean;
|
|
286
|
+
/**
|
|
287
|
+
* qualifyStudioContributionId makes a plugin-local contribution id globally unique.
|
|
288
|
+
*
|
|
289
|
+
* A COLON separates the two halves, and the choice is load-bearing rather than cosmetic: a dot
|
|
290
|
+
* already separates a tool's namespaces and a slot's regions, so `acme.avalanche.risk` would be
|
|
291
|
+
* ambiguous about where the plugin ends. `acme.avalanche:risk` cannot be misread, and it splits
|
|
292
|
+
* back apart with no grammar.
|
|
293
|
+
*/
|
|
294
|
+
export declare const qualifyStudioContributionId: (pluginId: string, contributionId: string) => string;
|
|
295
|
+
export { type StudioGatedContribution, type StudioOrderedContribution, type StudioPlugin, type StudioPluginContribution, type StudioPluginDefect, type StudioPluginDefectCode, StudioPluginEngine, type StudioPluginEngineOptions, type StudioPluginEntry, type StudioPluginGate, type StudioPluginItineraryMenuTarget, type StudioPluginMapContextMenuTarget, type StudioPluginMapControlsTarget, type StudioPluginObserver, type StudioPluginProfileTarget, type StudioPluginRefusalReporter, type StudioPluginRunEvent, type StudioPluginRunOutcome, type StudioPluginSegmentMenuTarget, type StudioPluginSlot, type StudioPluginSlotTargets, type StudioPluginSubject, type StudioPluginTarget, type StudioPluginToolSink, type StudioPluginValidationScope, type StudioPluginWaypointMenuTarget, type StudioPluginZoneMenuTarget, type StudioSlotContribution, type StudioSlotEntry, studioPluginSlotSchema };
|
|
296
|
+
//# sourceMappingURL=index.d.ts.map
|