react-cheminfo 0.64.1 → 0.65.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/README.md +282 -0
- package/lib/card/core/cardAddress.d.ts +70 -0
- package/lib/card/core/cardAddress.d.ts.map +1 -0
- package/lib/card/core/cardAddress.js +59 -0
- package/lib/card/core/cardAddress.js.map +1 -0
- package/lib/card/core/cardPageUrl.d.ts +49 -0
- package/lib/card/core/cardPageUrl.d.ts.map +1 -0
- package/lib/card/core/cardPageUrl.js +59 -0
- package/lib/card/core/cardPageUrl.js.map +1 -0
- package/lib/card/core/index.d.ts +7 -0
- package/lib/card/core/index.d.ts.map +1 -0
- package/lib/card/core/index.js +4 -0
- package/lib/card/core/index.js.map +1 -0
- package/lib/card/core/panelRoom.d.ts +40 -0
- package/lib/card/core/panelRoom.d.ts.map +1 -0
- package/lib/card/core/panelRoom.js +40 -0
- package/lib/card/core/panelRoom.js.map +1 -0
- package/lib/card/ui/CardDetailsButton.d.ts +38 -0
- package/lib/card/ui/CardDetailsButton.d.ts.map +1 -0
- package/lib/card/ui/CardDetailsButton.js +50 -0
- package/lib/card/ui/CardDetailsButton.js.map +1 -0
- package/lib/card/ui/CardFigure.d.ts +51 -0
- package/lib/card/ui/CardFigure.d.ts.map +1 -0
- package/lib/card/ui/CardFigure.js +27 -0
- package/lib/card/ui/CardFigure.js.map +1 -0
- package/lib/card/ui/CardFrame.d.ts +30 -0
- package/lib/card/ui/CardFrame.d.ts.map +1 -0
- package/lib/card/ui/CardFrame.js +20 -0
- package/lib/card/ui/CardFrame.js.map +1 -0
- package/lib/card/ui/CopyTableButton.d.ts +37 -0
- package/lib/card/ui/CopyTableButton.d.ts.map +1 -0
- package/lib/card/ui/CopyTableButton.js +19 -0
- package/lib/card/ui/CopyTableButton.js.map +1 -0
- package/lib/card/ui/cardTooltip.d.ts +14 -0
- package/lib/card/ui/cardTooltip.d.ts.map +1 -0
- package/lib/card/ui/cardTooltip.js +15 -0
- package/lib/card/ui/cardTooltip.js.map +1 -0
- package/lib/card/ui/embed.d.ts +15 -0
- package/lib/card/ui/embed.d.ts.map +1 -0
- package/lib/card/ui/embed.js +24 -0
- package/lib/card/ui/embed.js.map +1 -0
- package/lib/card/ui/fitCardToFrame.d.ts +31 -0
- package/lib/card/ui/fitCardToFrame.d.ts.map +1 -0
- package/lib/card/ui/fitCardToFrame.js +66 -0
- package/lib/card/ui/fitCardToFrame.js.map +1 -0
- package/lib/card/ui/holdRoomForPanels.d.ts +16 -0
- package/lib/card/ui/holdRoomForPanels.d.ts.map +1 -0
- package/lib/card/ui/holdRoomForPanels.js +76 -0
- package/lib/card/ui/holdRoomForPanels.js.map +1 -0
- package/lib/card/ui/index.d.ts +11 -0
- package/lib/card/ui/index.d.ts.map +1 -0
- package/lib/card/ui/index.js +7 -0
- package/lib/card/ui/index.js.map +1 -0
- package/lib/card/ui/openPanels.d.ts +25 -0
- package/lib/card/ui/openPanels.d.ts.map +1 -0
- package/lib/card/ui/openPanels.js +85 -0
- package/lib/card/ui/openPanels.js.map +1 -0
- package/lib/card.d.ts +13 -0
- package/lib/card.d.ts.map +1 -0
- package/lib/card.js +13 -0
- package/lib/card.js.map +1 -0
- package/lib/conformers.d.ts +1 -0
- package/lib/conformers.d.ts.map +1 -1
- package/lib/conformers.js +1 -0
- package/lib/conformers.js.map +1 -1
- package/lib/core.d.ts +4 -0
- package/lib/core.d.ts.map +1 -1
- package/lib/core.js +5 -0
- package/lib/core.js.map +1 -1
- package/lib/fetch/core/apiError.d.ts +56 -0
- package/lib/fetch/core/apiError.d.ts.map +1 -0
- package/lib/fetch/core/apiError.js +43 -0
- package/lib/fetch/core/apiError.js.map +1 -0
- package/lib/fetch/core/fetchJson.d.ts +47 -0
- package/lib/fetch/core/fetchJson.d.ts.map +1 -0
- package/lib/fetch/core/fetchJson.js +109 -0
- package/lib/fetch/core/fetchJson.js.map +1 -0
- package/lib/fetch/core/index.d.ts +5 -0
- package/lib/fetch/core/index.d.ts.map +1 -0
- package/lib/fetch/core/index.js +3 -0
- package/lib/fetch/core/index.js.map +1 -0
- package/lib/formula/core/formulaText.d.ts +46 -0
- package/lib/formula/core/formulaText.d.ts.map +1 -0
- package/lib/formula/core/formulaText.js +74 -0
- package/lib/formula/core/formulaText.js.map +1 -0
- package/lib/formula/core/index.d.ts +6 -0
- package/lib/formula/core/index.d.ts.map +1 -0
- package/lib/formula/core/index.js +4 -0
- package/lib/formula/core/index.js.map +1 -0
- package/lib/formula/core/normalizeFormula.d.ts +22 -0
- package/lib/formula/core/normalizeFormula.d.ts.map +1 -0
- package/lib/formula/core/normalizeFormula.js +46 -0
- package/lib/formula/core/normalizeFormula.js.map +1 -0
- package/lib/formula/core/readFormula.d.ts +73 -0
- package/lib/formula/core/readFormula.d.ts.map +1 -0
- package/lib/formula/core/readFormula.js +132 -0
- package/lib/formula/core/readFormula.js.map +1 -0
- package/lib/formula/ui/CopyableFormula.d.ts +31 -0
- package/lib/formula/ui/CopyableFormula.d.ts.map +1 -0
- package/lib/formula/ui/CopyableFormula.js +19 -0
- package/lib/formula/ui/CopyableFormula.js.map +1 -0
- package/lib/formula/ui/FormulaInput.d.ts +29 -0
- package/lib/formula/ui/FormulaInput.d.ts.map +1 -0
- package/lib/formula/ui/FormulaInput.js +16 -0
- package/lib/formula/ui/FormulaInput.js.map +1 -0
- package/lib/formula/ui/QuestionFormula.d.ts +14 -0
- package/lib/formula/ui/QuestionFormula.d.ts.map +1 -0
- package/lib/formula/ui/QuestionFormula.js +13 -0
- package/lib/formula/ui/QuestionFormula.js.map +1 -0
- package/lib/formula/ui/index.d.ts +7 -0
- package/lib/formula/ui/index.d.ts.map +1 -0
- package/lib/formula/ui/index.js +4 -0
- package/lib/formula/ui/index.js.map +1 -0
- package/lib/formula.d.ts +11 -0
- package/lib/formula.d.ts.map +1 -0
- package/lib/formula.js +11 -0
- package/lib/formula.js.map +1 -0
- package/lib/hooks/ui/index.d.ts +1 -0
- package/lib/hooks/ui/index.d.ts.map +1 -1
- package/lib/hooks/ui/index.js.map +1 -1
- package/lib/hooks/ui/keyTargets.d.ts +4 -2
- package/lib/hooks/ui/keyTargets.d.ts.map +1 -1
- package/lib/hooks/ui/keyTargets.js +5 -3
- package/lib/hooks/ui/keyTargets.js.map +1 -1
- package/lib/hooks/ui/useAsync.d.ts +20 -5
- package/lib/hooks/ui/useAsync.d.ts.map +1 -1
- package/lib/hooks/ui/useAsync.js +29 -14
- package/lib/hooks/ui/useAsync.js.map +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
- package/lib/locales/de.json +37 -0
- package/lib/locales/en.json +37 -0
- package/lib/locales/es.json +37 -0
- package/lib/locales/fr.json +37 -0
- package/lib/locales/it.json +37 -0
- package/lib/moleculesClient/core/index.d.ts +5 -0
- package/lib/moleculesClient/core/index.d.ts.map +1 -0
- package/lib/moleculesClient/core/index.js +3 -0
- package/lib/moleculesClient/core/index.js.map +1 -0
- package/lib/moleculesClient/core/moleculesClient.d.ts +12 -0
- package/lib/moleculesClient/core/moleculesClient.d.ts.map +1 -0
- package/lib/moleculesClient/core/moleculesClient.js +105 -0
- package/lib/moleculesClient/core/moleculesClient.js.map +1 -0
- package/lib/moleculesClient/core/moleculesClientApi.d.ts +100 -0
- package/lib/moleculesClient/core/moleculesClientApi.d.ts.map +1 -0
- package/lib/moleculesClient/core/moleculesClientApi.js +20 -0
- package/lib/moleculesClient/core/moleculesClientApi.js.map +1 -0
- package/lib/moleculesClient/core/moleculesTypes.d.ts +154 -0
- package/lib/moleculesClient/core/moleculesTypes.d.ts.map +1 -0
- package/lib/moleculesClient/core/moleculesTypes.js +2 -0
- package/lib/moleculesClient/core/moleculesTypes.js.map +1 -0
- package/lib/moleculesClient/core/requestRetry.d.ts +50 -0
- package/lib/moleculesClient/core/requestRetry.d.ts.map +1 -0
- package/lib/moleculesClient/core/requestRetry.js +108 -0
- package/lib/moleculesClient/core/requestRetry.js.map +1 -0
- package/lib/molstar/core/camera.d.ts +2 -1
- package/lib/molstar/core/camera.d.ts.map +1 -1
- package/lib/molstar/core/camera.js +3 -2
- package/lib/molstar/core/camera.js.map +1 -1
- package/lib/molstar/core/framing.d.ts +102 -0
- package/lib/molstar/core/framing.d.ts.map +1 -0
- package/lib/molstar/core/framing.js +120 -0
- package/lib/molstar/core/framing.js.map +1 -0
- package/lib/molstar/core/hover.d.ts +16 -0
- package/lib/molstar/core/hover.d.ts.map +1 -1
- package/lib/molstar/core/hover.js +14 -0
- package/lib/molstar/core/hover.js.map +1 -1
- package/lib/molstar/core/index.d.ts +4 -1
- package/lib/molstar/core/index.d.ts.map +1 -1
- package/lib/molstar/core/index.js +2 -1
- package/lib/molstar/core/index.js.map +1 -1
- package/lib/pedagogy/core/answers.d.ts +46 -0
- package/lib/pedagogy/core/answers.d.ts.map +1 -0
- package/lib/pedagogy/core/answers.js +77 -0
- package/lib/pedagogy/core/answers.js.map +1 -0
- package/lib/pedagogy/core/attempts.d.ts +86 -0
- package/lib/pedagogy/core/attempts.d.ts.map +1 -0
- package/lib/pedagogy/core/attempts.js +117 -0
- package/lib/pedagogy/core/attempts.js.map +1 -0
- package/lib/pedagogy/core/index.d.ts +8 -0
- package/lib/pedagogy/core/index.d.ts.map +1 -1
- package/lib/pedagogy/core/index.js +4 -0
- package/lib/pedagogy/core/index.js.map +1 -1
- package/lib/pedagogy/core/progressController.d.ts +64 -0
- package/lib/pedagogy/core/progressController.d.ts.map +1 -0
- package/lib/pedagogy/core/progressController.js +56 -0
- package/lib/pedagogy/core/progressController.js.map +1 -0
- package/lib/pedagogy/core/seed.d.ts +96 -0
- package/lib/pedagogy/core/seed.d.ts.map +1 -0
- package/lib/pedagogy/core/seed.js +128 -0
- package/lib/pedagogy/core/seed.js.map +1 -0
- package/lib/pedagogy/core/series.d.ts +77 -0
- package/lib/pedagogy/core/series.d.ts.map +1 -0
- package/lib/pedagogy/core/series.js +10 -0
- package/lib/pedagogy/core/series.js.map +1 -0
- package/lib/pedagogy/ui/AnswerFields.d.ts +21 -0
- package/lib/pedagogy/ui/AnswerFields.d.ts.map +1 -0
- package/lib/pedagogy/ui/AnswerFields.js +24 -0
- package/lib/pedagogy/ui/AnswerFields.js.map +1 -0
- package/lib/pedagogy/ui/ExerciseList.d.ts +82 -0
- package/lib/pedagogy/ui/ExerciseList.d.ts.map +1 -0
- package/lib/pedagogy/ui/ExerciseList.js +53 -0
- package/lib/pedagogy/ui/ExerciseList.js.map +1 -0
- package/lib/pedagogy/ui/ExerciseSeries.d.ts +95 -0
- package/lib/pedagogy/ui/ExerciseSeries.d.ts.map +1 -0
- package/lib/pedagogy/ui/ExerciseSeries.js +74 -0
- package/lib/pedagogy/ui/ExerciseSeries.js.map +1 -0
- package/lib/pedagogy/ui/QuestionCard.d.ts +64 -0
- package/lib/pedagogy/ui/QuestionCard.d.ts.map +1 -0
- package/lib/pedagogy/ui/QuestionCard.js +73 -0
- package/lib/pedagogy/ui/QuestionCard.js.map +1 -0
- package/lib/pedagogy/ui/index.d.ts +10 -0
- package/lib/pedagogy/ui/index.d.ts.map +1 -1
- package/lib/pedagogy/ui/index.js +6 -0
- package/lib/pedagogy/ui/index.js.map +1 -1
- package/lib/pedagogy/ui/seriesCounts.d.ts +17 -0
- package/lib/pedagogy/ui/seriesCounts.d.ts.map +1 -0
- package/lib/pedagogy/ui/seriesCounts.js +27 -0
- package/lib/pedagogy/ui/seriesCounts.js.map +1 -0
- package/lib/pedagogy/ui/seriesParts.d.ts +55 -0
- package/lib/pedagogy/ui/seriesParts.d.ts.map +1 -0
- package/lib/pedagogy/ui/seriesParts.js +38 -0
- package/lib/pedagogy/ui/seriesParts.js.map +1 -0
- package/lib/pedagogy/ui/useAttemptRecords.d.ts +10 -0
- package/lib/pedagogy/ui/useAttemptRecords.d.ts.map +1 -0
- package/lib/pedagogy/ui/useAttemptRecords.js +11 -0
- package/lib/pedagogy/ui/useAttemptRecords.js.map +1 -0
- package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
- package/lib/periodic/ui/PeriodicTable.js +6 -3
- package/lib/periodic/ui/PeriodicTable.js.map +1 -1
- package/lib/property/core/copyableText.d.ts +14 -0
- package/lib/property/core/copyableText.d.ts.map +1 -0
- package/lib/property/core/copyableText.js +21 -0
- package/lib/property/core/copyableText.js.map +1 -0
- package/lib/property/core/index.d.ts +2 -0
- package/lib/property/core/index.d.ts.map +1 -0
- package/lib/property/core/index.js +2 -0
- package/lib/property/core/index.js.map +1 -0
- package/lib/property/ui/PropertyTable.d.ts +43 -0
- package/lib/property/ui/PropertyTable.d.ts.map +1 -0
- package/lib/property/ui/PropertyTable.js +19 -0
- package/lib/property/ui/PropertyTable.js.map +1 -0
- package/lib/property/ui/index.d.ts +3 -0
- package/lib/property/ui/index.d.ts.map +1 -0
- package/lib/property/ui/index.js +2 -0
- package/lib/property/ui/index.js.map +1 -0
- package/lib/router/core/history.d.ts +24 -3
- package/lib/router/core/history.d.ts.map +1 -1
- package/lib/router/core/history.js +55 -7
- package/lib/router/core/history.js.map +1 -1
- package/lib/router/core/index.d.ts +3 -3
- package/lib/router/core/index.d.ts.map +1 -1
- package/lib/router/core/index.js +2 -2
- package/lib/router/core/index.js.map +1 -1
- package/lib/router/core/languageRoute.d.ts +61 -0
- package/lib/router/core/languageRoute.d.ts.map +1 -0
- package/lib/router/core/languageRoute.js +96 -0
- package/lib/router/core/languageRoute.js.map +1 -0
- package/lib/router/core/siteAddresses.d.ts +23 -0
- package/lib/router/core/siteAddresses.d.ts.map +1 -1
- package/lib/router/core/siteAddresses.js +26 -0
- package/lib/router/core/siteAddresses.js.map +1 -1
- package/lib/router/core/tabRouter.d.ts +2 -108
- package/lib/router/core/tabRouter.d.ts.map +1 -1
- package/lib/router/core/tabRouter.js +38 -5
- package/lib/router/core/tabRouter.js.map +1 -1
- package/lib/router/core/tabRouterTypes.d.ts +154 -0
- package/lib/router/core/tabRouterTypes.d.ts.map +1 -0
- package/lib/router/core/tabRouterTypes.js +2 -0
- package/lib/router/core/tabRouterTypes.js.map +1 -0
- package/lib/seo/core/fitDescription.d.ts +40 -0
- package/lib/seo/core/fitDescription.d.ts.map +1 -0
- package/lib/seo/core/fitDescription.js +45 -0
- package/lib/seo/core/fitDescription.js.map +1 -0
- package/lib/seo/core/index.d.ts +7 -0
- package/lib/seo/core/index.d.ts.map +1 -1
- package/lib/seo/core/index.js +4 -0
- package/lib/seo/core/index.js.map +1 -1
- package/lib/seo/core/limits.d.ts +24 -0
- package/lib/seo/core/limits.d.ts.map +1 -0
- package/lib/seo/core/limits.js +24 -0
- package/lib/seo/core/limits.js.map +1 -0
- package/lib/seo/core/pageContent.d.ts +25 -0
- package/lib/seo/core/pageContent.d.ts.map +1 -0
- package/lib/seo/core/pageContent.js +25 -0
- package/lib/seo/core/pageContent.js.map +1 -0
- package/lib/seo/core/plainDescription.d.ts.map +1 -1
- package/lib/seo/core/plainDescription.js +3 -2
- package/lib/seo/core/plainDescription.js.map +1 -1
- package/lib/seo/core/routeProblems.d.ts.map +1 -1
- package/lib/seo/core/routeProblems.js +1 -6
- package/lib/seo/core/routeProblems.js.map +1 -1
- package/lib/seo/core/routeTable.d.ts +31 -0
- package/lib/seo/core/routeTable.d.ts.map +1 -0
- package/lib/seo/core/routeTable.js +96 -0
- package/lib/seo/core/routeTable.js.map +1 -0
- package/lib/seo/vite/index.d.ts +2 -0
- package/lib/seo/vite/index.d.ts.map +1 -1
- package/lib/seo/vite/index.js +1 -0
- package/lib/seo/vite/index.js.map +1 -1
- package/lib/seo/vite/prerender.d.ts +10 -0
- package/lib/seo/vite/prerender.d.ts.map +1 -1
- package/lib/seo/vite/prerender.js +12 -1
- package/lib/seo/vite/prerender.js.map +1 -1
- package/lib/seo/vite/routeTable.d.ts +40 -0
- package/lib/seo/vite/routeTable.d.ts.map +1 -0
- package/lib/seo/vite/routeTable.js +44 -0
- package/lib/seo/vite/routeTable.js.map +1 -0
- package/lib/server/answerAddresses.d.ts +51 -0
- package/lib/server/answerAddresses.d.ts.map +1 -0
- package/lib/server/answerAddresses.js +72 -0
- package/lib/server/answerAddresses.js.map +1 -0
- package/lib/server/cardMeta.d.ts +57 -0
- package/lib/server/cardMeta.d.ts.map +1 -0
- package/lib/server/cardMeta.js +52 -0
- package/lib/server/cardMeta.js.map +1 -0
- package/lib/server/config.d.ts +72 -0
- package/lib/server/config.d.ts.map +1 -0
- package/lib/server/config.js +67 -0
- package/lib/server/config.js.map +1 -0
- package/lib/server/envNumber.d.ts +35 -0
- package/lib/server/envNumber.d.ts.map +1 -0
- package/lib/server/envNumber.js +42 -0
- package/lib/server/envNumber.js.map +1 -0
- package/lib/server/healthRoute.d.ts +26 -0
- package/lib/server/healthRoute.d.ts.map +1 -0
- package/lib/server/healthRoute.js +22 -0
- package/lib/server/healthRoute.js.map +1 -0
- package/lib/server/listenSite.d.ts +38 -0
- package/lib/server/listenSite.d.ts.map +1 -0
- package/lib/server/listenSite.js +60 -0
- package/lib/server/listenSite.js.map +1 -0
- package/lib/server/mcpServer.d.ts +8 -0
- package/lib/server/mcpServer.d.ts.map +1 -0
- package/lib/server/mcpServer.js +11 -0
- package/lib/server/mcpServer.js.map +1 -0
- package/lib/server/repositoryVersion.d.ts +16 -0
- package/lib/server/repositoryVersion.d.ts.map +1 -0
- package/lib/server/repositoryVersion.js +33 -0
- package/lib/server/repositoryVersion.js.map +1 -0
- package/lib/server/routeOptions.d.ts +23 -0
- package/lib/server/routeOptions.d.ts.map +1 -0
- package/lib/server/routeOptions.js +20 -0
- package/lib/server/routeOptions.js.map +1 -0
- package/lib/server/routeTable.d.ts +14 -0
- package/lib/server/routeTable.d.ts.map +1 -0
- package/lib/server/routeTable.js +32 -0
- package/lib/server/routeTable.js.map +1 -0
- package/lib/server/siteView.d.ts +29 -0
- package/lib/server/siteView.d.ts.map +1 -0
- package/lib/server/siteView.js +21 -0
- package/lib/server/siteView.js.map +1 -0
- package/lib/server/spaPages.d.ts +32 -0
- package/lib/server/spaPages.d.ts.map +1 -0
- package/lib/server/spaPages.js +126 -0
- package/lib/server/spaPages.js.map +1 -0
- package/lib/server/spaSite.d.ts +30 -0
- package/lib/server/spaSite.d.ts.map +1 -0
- package/lib/server/spaSite.js +170 -0
- package/lib/server/spaSite.js.map +1 -0
- package/lib/server/spaSiteOptions.d.ts +126 -0
- package/lib/server/spaSiteOptions.d.ts.map +1 -0
- package/lib/server/spaSiteOptions.js +2 -0
- package/lib/server/spaSiteOptions.js.map +1 -0
- package/lib/server/staticSite.d.ts +9 -0
- package/lib/server/staticSite.d.ts.map +1 -1
- package/lib/server/staticSite.js +41 -19
- package/lib/server/staticSite.js.map +1 -1
- package/lib/server/toolSiteServer.d.ts +77 -0
- package/lib/server/toolSiteServer.d.ts.map +1 -0
- package/lib/server/toolSiteServer.js +58 -0
- package/lib/server/toolSiteServer.js.map +1 -0
- package/lib/server/trustProxy.d.ts +20 -0
- package/lib/server/trustProxy.d.ts.map +1 -0
- package/lib/server/trustProxy.js +32 -0
- package/lib/server/trustProxy.js.map +1 -0
- package/lib/server/types.d.ts +13 -0
- package/lib/server/types.d.ts.map +1 -0
- package/lib/server/types.js +2 -0
- package/lib/server/types.js.map +1 -0
- package/lib/server.d.ts +22 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +12 -0
- package/lib/server.js.map +1 -1
- package/lib/share/core/config.d.ts +18 -0
- package/lib/share/core/config.d.ts.map +1 -1
- package/lib/share/core/config.js +33 -2
- package/lib/share/core/config.js.map +1 -1
- package/lib/share/core/index.d.ts +3 -1
- package/lib/share/core/index.d.ts.map +1 -1
- package/lib/share/core/index.js +2 -1
- package/lib/share/core/index.js.map +1 -1
- package/lib/share/core/keySetParam.d.ts +40 -0
- package/lib/share/core/keySetParam.d.ts.map +1 -0
- package/lib/share/core/keySetParam.js +60 -0
- package/lib/share/core/keySetParam.js.map +1 -0
- package/lib/share/core/vocabulary.d.ts +8 -0
- package/lib/share/core/vocabulary.d.ts.map +1 -1
- package/lib/shell/ui/ShareControl.d.ts +75 -0
- package/lib/shell/ui/ShareControl.d.ts.map +1 -0
- package/lib/shell/ui/ShareControl.js +40 -0
- package/lib/shell/ui/ShareControl.js.map +1 -0
- package/lib/shell/ui/ShellFrame.d.ts +14 -0
- package/lib/shell/ui/ShellFrame.d.ts.map +1 -0
- package/lib/shell/ui/ShellFrame.js +45 -0
- package/lib/shell/ui/ShellFrame.js.map +1 -0
- package/lib/shell/ui/SiteShell.d.ts +251 -0
- package/lib/shell/ui/SiteShell.d.ts.map +1 -0
- package/lib/shell/ui/SiteShell.js +39 -0
- package/lib/shell/ui/SiteShell.js.map +1 -0
- package/lib/shell/ui/index.d.ts +5 -0
- package/lib/shell/ui/index.d.ts.map +1 -0
- package/lib/shell/ui/index.js +3 -0
- package/lib/shell/ui/index.js.map +1 -0
- package/lib/state/core/index.d.ts +1 -0
- package/lib/state/core/index.d.ts.map +1 -1
- package/lib/state/core/index.js.map +1 -1
- package/lib/state/core/legacyEntries.d.ts +30 -0
- package/lib/state/core/legacyEntries.d.ts.map +1 -0
- package/lib/state/core/legacyEntries.js +51 -0
- package/lib/state/core/legacyEntries.js.map +1 -0
- package/lib/state/core/persistBucket.d.ts +26 -2
- package/lib/state/core/persistBucket.d.ts.map +1 -1
- package/lib/state/core/persistBucket.js +26 -9
- package/lib/state/core/persistBucket.js.map +1 -1
- package/lib/state/core/persistSignalBucket.d.ts +26 -0
- package/lib/state/core/persistSignalBucket.d.ts.map +1 -1
- package/lib/state/core/persistSignalBucket.js +31 -0
- package/lib/state/core/persistSignalBucket.js.map +1 -1
- package/lib/state/core/storageEntry.d.ts +15 -0
- package/lib/state/core/storageEntry.d.ts.map +1 -1
- package/lib/state/core/storageEntry.js +33 -0
- package/lib/state/core/storageEntry.js.map +1 -1
- package/lib/structure/ui/StructureExportButton.d.ts +27 -0
- package/lib/structure/ui/StructureExportButton.d.ts.map +1 -0
- package/lib/structure/ui/StructureExportButton.js +21 -0
- package/lib/structure/ui/StructureExportButton.js.map +1 -0
- package/lib/structure/ui/index.d.ts +4 -0
- package/lib/structure/ui/index.d.ts.map +1 -1
- package/lib/structure/ui/index.js +2 -0
- package/lib/structure/ui/index.js.map +1 -1
- package/lib/structure/ui/useStructureDraft.d.ts +32 -0
- package/lib/structure/ui/useStructureDraft.d.ts.map +1 -0
- package/lib/structure/ui/useStructureDraft.js +20 -0
- package/lib/structure/ui/useStructureDraft.js.map +1 -0
- package/lib/ui.d.ts +2 -0
- package/lib/ui.d.ts.map +1 -1
- package/lib/ui.js +2 -0
- package/lib/ui.js.map +1 -1
- package/lib/worker/core/index.d.ts +1 -1
- package/lib/worker/core/index.d.ts.map +1 -1
- package/lib/worker/core/messages.d.ts +4 -2
- package/lib/worker/core/messages.d.ts.map +1 -1
- package/lib/worker/core/messages.js.map +1 -1
- package/lib/worker/core/oclResourcesUrl.d.ts +16 -0
- package/lib/worker/core/oclResourcesUrl.d.ts.map +1 -0
- package/lib/worker/core/oclResourcesUrl.js +19 -0
- package/lib/worker/core/oclResourcesUrl.js.map +1 -0
- package/lib/worker/core/serveWorkerRequests.d.ts +8 -0
- package/lib/worker/core/serveWorkerRequests.d.ts.map +1 -1
- package/lib/worker/core/serveWorkerRequests.js +15 -2
- package/lib/worker/core/serveWorkerRequests.js.map +1 -1
- package/lib/worker/core/workerChannel.d.ts +3 -4
- package/lib/worker/core/workerChannel.d.ts.map +1 -1
- package/lib/worker/core/workerChannel.js +72 -67
- package/lib/worker/core/workerChannel.js.map +1 -1
- package/lib/worker/core/workerChannelParts.d.ts +17 -6
- package/lib/worker/core/workerChannelParts.d.ts.map +1 -1
- package/lib/worker/core/workerChannelParts.js +20 -4
- package/lib/worker/core/workerChannelParts.js.map +1 -1
- package/lib/worker/core/workerChannelTypes.d.ts +46 -2
- package/lib/worker/core/workerChannelTypes.d.ts.map +1 -1
- package/lib/worker/core/workerSlot.d.ts +66 -0
- package/lib/worker/core/workerSlot.d.ts.map +1 -0
- package/lib/worker/core/workerSlot.js +107 -0
- package/lib/worker/core/workerSlot.js.map +1 -0
- package/package.json +16 -1
- package/src/card/core/cardAddress.ts +100 -0
- package/src/card/core/cardPageUrl.ts +97 -0
- package/src/card/core/index.ts +6 -0
- package/src/card/core/panelRoom.ts +66 -0
- package/src/card/ui/CardDetailsButton.tsx +104 -0
- package/src/card/ui/CardFigure.tsx +86 -0
- package/src/card/ui/CardFrame.tsx +46 -0
- package/src/card/ui/CopyTableButton.tsx +81 -0
- package/src/card/ui/cardTooltip.ts +18 -0
- package/src/card/ui/embed.ts +27 -0
- package/src/card/ui/fitCardToFrame.ts +76 -0
- package/src/card/ui/holdRoomForPanels.ts +83 -0
- package/src/card/ui/index.ts +14 -0
- package/src/card/ui/openPanels.ts +106 -0
- package/src/card.ts +13 -0
- package/src/conformers.ts +4 -0
- package/src/core.ts +5 -0
- package/src/fetch/core/apiError.ts +65 -0
- package/src/fetch/core/fetchJson.ts +129 -0
- package/src/fetch/core/index.ts +4 -0
- package/src/formula/core/formulaText.ts +96 -0
- package/src/formula/core/index.ts +20 -0
- package/src/formula/core/normalizeFormula.ts +50 -0
- package/src/formula/core/readFormula.ts +211 -0
- package/src/formula/ui/CopyableFormula.tsx +51 -0
- package/src/formula/ui/FormulaInput.tsx +50 -0
- package/src/formula/ui/QuestionFormula.tsx +20 -0
- package/src/formula/ui/index.ts +6 -0
- package/src/formula.ts +11 -0
- package/src/hooks/ui/index.ts +1 -0
- package/src/hooks/ui/keyTargets.ts +5 -3
- package/src/hooks/ui/useAsync.ts +50 -14
- package/src/locales/de.json +37 -0
- package/src/locales/en.json +37 -0
- package/src/locales/es.json +37 -0
- package/src/locales/fr.json +37 -0
- package/src/locales/it.json +37 -0
- package/src/moleculesClient/core/index.ts +19 -0
- package/src/moleculesClient/core/moleculesClient.ts +175 -0
- package/src/moleculesClient/core/moleculesClientApi.ts +120 -0
- package/src/moleculesClient/core/moleculesTypes.ts +163 -0
- package/src/moleculesClient/core/requestRetry.ts +118 -0
- package/src/molstar/core/camera.ts +3 -2
- package/src/molstar/core/framing.ts +200 -0
- package/src/molstar/core/hover.ts +26 -0
- package/src/molstar/core/index.ts +21 -1
- package/src/pedagogy/core/answers.ts +94 -0
- package/src/pedagogy/core/attempts.ts +205 -0
- package/src/pedagogy/core/index.ts +36 -0
- package/src/pedagogy/core/progressController.ts +116 -0
- package/src/pedagogy/core/seed.ts +177 -0
- package/src/pedagogy/core/series.ts +82 -0
- package/src/pedagogy/ui/AnswerFields.tsx +63 -0
- package/src/pedagogy/ui/ExerciseList.tsx +202 -0
- package/src/pedagogy/ui/ExerciseSeries.tsx +250 -0
- package/src/pedagogy/ui/QuestionCard.tsx +231 -0
- package/src/pedagogy/ui/index.ts +18 -0
- package/src/pedagogy/ui/seriesCounts.ts +34 -0
- package/src/pedagogy/ui/seriesParts.tsx +127 -0
- package/src/pedagogy/ui/useAttemptRecords.ts +16 -0
- package/src/periodic/ui/PeriodicTable.tsx +6 -3
- package/src/property/core/copyableText.ts +20 -0
- package/src/property/core/index.ts +1 -0
- package/src/property/ui/PropertyTable.tsx +83 -0
- package/src/property/ui/index.ts +2 -0
- package/src/router/core/history.ts +61 -7
- package/src/router/core/index.ts +3 -2
- package/src/router/core/languageRoute.ts +136 -0
- package/src/router/core/siteAddresses.ts +38 -0
- package/src/router/core/tabRouter.ts +59 -117
- package/src/router/core/tabRouterTypes.ts +158 -0
- package/src/seo/core/fitDescription.ts +74 -0
- package/src/seo/core/index.ts +17 -0
- package/src/seo/core/limits.ts +27 -0
- package/src/seo/core/pageContent.ts +42 -0
- package/src/seo/core/plainDescription.ts +4 -2
- package/src/seo/core/routeProblems.ts +1 -7
- package/src/seo/core/routeTable.ts +103 -0
- package/src/seo/vite/index.ts +2 -0
- package/src/seo/vite/prerender.ts +26 -1
- package/src/seo/vite/routeTable.ts +79 -0
- package/src/server/answerAddresses.ts +92 -0
- package/src/server/cardMeta.ts +88 -0
- package/src/server/config.ts +125 -0
- package/src/server/envNumber.ts +65 -0
- package/src/server/healthRoute.ts +42 -0
- package/src/server/listenSite.ts +90 -0
- package/src/server/mcpServer.ts +14 -0
- package/src/server/repositoryVersion.ts +33 -0
- package/src/server/routeOptions.ts +26 -0
- package/src/server/routeTable.ts +35 -0
- package/src/server/siteView.ts +42 -0
- package/src/server/spaPages.ts +179 -0
- package/src/server/spaSite.ts +216 -0
- package/src/server/spaSiteOptions.ts +133 -0
- package/src/server/staticSite.ts +65 -35
- package/src/server/toolSiteServer.ts +127 -0
- package/src/server/trustProxy.ts +32 -0
- package/src/server/types.ts +25 -0
- package/src/server.ts +40 -0
- package/src/share/core/config.ts +45 -2
- package/src/share/core/index.ts +4 -0
- package/src/share/core/keySetParam.ts +92 -0
- package/src/share/core/vocabulary.ts +8 -0
- package/src/shell/ui/ShareControl.tsx +150 -0
- package/src/shell/ui/ShellFrame.tsx +180 -0
- package/src/shell/ui/SiteShell.tsx +297 -0
- package/src/shell/ui/index.ts +9 -0
- package/src/state/core/index.ts +1 -0
- package/src/state/core/legacyEntries.ts +76 -0
- package/src/state/core/persistBucket.ts +50 -10
- package/src/state/core/persistSignalBucket.ts +52 -0
- package/src/state/core/storageEntry.ts +32 -0
- package/src/structure/ui/StructureExportButton.tsx +57 -0
- package/src/structure/ui/index.ts +4 -0
- package/src/structure/ui/useStructureDraft.ts +47 -0
- package/src/ui.ts +2 -0
- package/src/worker/core/index.ts +1 -0
- package/src/worker/core/messages.ts +4 -3
- package/src/worker/core/oclResourcesUrl.ts +21 -0
- package/src/worker/core/serveWorkerRequests.ts +30 -2
- package/src/worker/core/workerChannel.ts +74 -74
- package/src/worker/core/workerChannelParts.ts +33 -13
- package/src/worker/core/workerChannelTypes.ts +47 -2
- package/src/worker/core/workerSlot.ts +181 -0
- package/styles/card.css +145 -0
- package/styles/chrome.css +248 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A set of keys a link switches on — the layers a figure draws,
|
|
3
|
+
* `?flags=breakdown,working` — written comma separated, in the order the keys
|
|
4
|
+
* are listed, so one selection always produces one link.
|
|
5
|
+
*
|
|
6
|
+
* A key the tool does not list is dropped rather than refused, so a link
|
|
7
|
+
* written before a key was renamed still opens; the word for nothing, `none`
|
|
8
|
+
* by default, reads as the empty set, and an absent or empty parameter as the
|
|
9
|
+
* default.
|
|
10
|
+
* @param keys - Every key the tool understands, in the order links write them.
|
|
11
|
+
* @param options - The word for nothing, and the default set.
|
|
12
|
+
* @returns The codec.
|
|
13
|
+
*/
|
|
14
|
+
export function keySetParam(keys, options = {}) {
|
|
15
|
+
const none = options.none ?? 'none';
|
|
16
|
+
const fallback = options.default === undefined || options.default === null
|
|
17
|
+
? null
|
|
18
|
+
: orderKeys(new Set(options.default), keys);
|
|
19
|
+
const omitted = options.omitted === undefined
|
|
20
|
+
? fallback
|
|
21
|
+
: orderKeys(new Set(options.omitted), keys);
|
|
22
|
+
const omittedText = omitted === null ? null : writeKeys(omitted, keys);
|
|
23
|
+
return {
|
|
24
|
+
parse(raw) {
|
|
25
|
+
if (raw === null || raw.trim() === '')
|
|
26
|
+
return fallback;
|
|
27
|
+
if (raw.trim() === none)
|
|
28
|
+
return new Set();
|
|
29
|
+
const asked = new Set();
|
|
30
|
+
for (const name of raw.split(','))
|
|
31
|
+
asked.add(name.trim());
|
|
32
|
+
return orderKeys(asked, keys);
|
|
33
|
+
},
|
|
34
|
+
serialize(value) {
|
|
35
|
+
if (value === null)
|
|
36
|
+
return null;
|
|
37
|
+
const text = writeKeys(value, keys);
|
|
38
|
+
if (text === omittedText)
|
|
39
|
+
return null;
|
|
40
|
+
return text === '' ? none : text;
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function orderKeys(asked, keys) {
|
|
45
|
+
const ordered = new Set();
|
|
46
|
+
for (const key of keys) {
|
|
47
|
+
if (asked.has(key))
|
|
48
|
+
ordered.add(key);
|
|
49
|
+
}
|
|
50
|
+
return ordered;
|
|
51
|
+
}
|
|
52
|
+
function writeKeys(value, keys) {
|
|
53
|
+
const on = [];
|
|
54
|
+
for (const key of keys) {
|
|
55
|
+
if (value.has(key))
|
|
56
|
+
on.push(key);
|
|
57
|
+
}
|
|
58
|
+
return on.join(',');
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=keySetParam.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keySetParam.js","sourceRoot":"","sources":["../../../src/share/core/keySetParam.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,WAAW,CACzB,IAAoB,EACpB,UAAmC,EAAE;IAErC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC;IACpC,MAAM,QAAQ,GACZ,OAAO,CAAC,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI;QACvD,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,SAAS,CAAC,IAAI,GAAG,CAAS,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;IACxD,MAAM,OAAO,GACX,OAAO,CAAC,OAAO,KAAK,SAAS;QAC3B,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,SAAS,CAAC,IAAI,GAAG,CAAS,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;IACxD,MAAM,WAAW,GAAG,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACvE,OAAO;QACL,KAAK,CAAC,GAAG;YACP,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;gBAAE,OAAO,QAAQ,CAAC;YACvD,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,IAAI;gBAAE,OAAO,IAAI,GAAG,EAAO,CAAC;YAC/C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;YAChC,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC;gBAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YAC1D,OAAO,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAChC,CAAC;QACD,SAAS,CAAC,KAAK;YACb,IAAI,KAAK,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAC;YAChC,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACpC,IAAI,IAAI,KAAK,WAAW;gBAAE,OAAO,IAAI,CAAC;YACtC,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAChB,KAA0B,EAC1B,IAAoB;IAEpB,MAAM,OAAO,GAAG,IAAI,GAAG,EAAO,CAAC;IAC/B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,SAAS,CAChB,KAAuB,EACvB,IAAoB;IAEpB,MAAM,EAAE,GAAa,EAAE,CAAC;IACxB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -55,5 +55,13 @@ export interface ShareVocabulary<Codecs extends ShareParamCodecs = Record<string
|
|
|
55
55
|
* @default {}
|
|
56
56
|
*/
|
|
57
57
|
params?: Codecs;
|
|
58
|
+
/**
|
|
59
|
+
* The `?hide=` keys older links dropped the chrome with, before the site
|
|
60
|
+
* spoke `?embed` — `header`, `menu`. A link naming one still opens framed,
|
|
61
|
+
* because course pages built then must keep opening bare; the key is no part
|
|
62
|
+
* of the page, so it is never offered and never written back.
|
|
63
|
+
* @default []
|
|
64
|
+
*/
|
|
65
|
+
legacyEmbedParts?: readonly string[];
|
|
58
66
|
}
|
|
59
67
|
//# sourceMappingURL=vocabulary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../../src/share/core/vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAC;IACZ,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CACrC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CACzC,CAAC;AAEF,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,CAAC,MAAM,SAAS,gBAAgB,IAAI;KAC7D,GAAG,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,eAAe,CAAC,MAAM,KAAK,CAAC,GACnE,KAAK,GACL,KAAK;CACV,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,eAAe,CAC9B,MAAM,SAAS,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;IAEvD;;;OAGG;IACH,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../../src/share/core/vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAC;IACZ,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CACrC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CACzC,CAAC;AAEF,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,CAAC,MAAM,SAAS,gBAAgB,IAAI;KAC7D,GAAG,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,eAAe,CAAC,MAAM,KAAK,CAAC,GACnE,KAAK,GACL,KAAK;CACV,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,eAAe,CAC9B,MAAM,SAAS,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;IAEvD;;;OAGG;IACH,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { SiteId } from '../../ecosystem/core/sites.ts';
|
|
3
|
+
import type { ShareParamCodecs } from '../../share/core/index.ts';
|
|
4
|
+
import type { ShareButtonVariant } from '../../share/ui/ShareButton.tsx';
|
|
5
|
+
import type { ShareDialogProps } from '../../share/ui/ShareDialog.tsx';
|
|
6
|
+
/** What {@link ShareControl} needs: the dialog's props, and the button's. */
|
|
7
|
+
export interface ShareControlProps<Codecs extends ShareParamCodecs = Record<string, never>> extends Omit<ShareDialogProps<Codecs>, 'isOpen' | 'onClose' | 'search' | 'frameTitle'> {
|
|
8
|
+
/**
|
|
9
|
+
* The site the page belongs to, which names the frame `<host> — <title>`.
|
|
10
|
+
* @default undefined — the frame is named by the title alone
|
|
11
|
+
*/
|
|
12
|
+
siteId?: SiteId;
|
|
13
|
+
/**
|
|
14
|
+
* What a screen reader announces the frame as.
|
|
15
|
+
* @default `<host> — <title>` with a `siteId`, the title without one
|
|
16
|
+
*/
|
|
17
|
+
frameTitle?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The address as it stands, so the tool's inputs travel with the link. A
|
|
20
|
+
* function is called only while the dialog is open, so a value that is costly
|
|
21
|
+
* to write — a pinned preference, a list of molecules — is written when a
|
|
22
|
+
* link is asked for and not on every render of the header.
|
|
23
|
+
* @default the query string of the page
|
|
24
|
+
*/
|
|
25
|
+
search?: string | (() => string | undefined);
|
|
26
|
+
/**
|
|
27
|
+
* Whether the button keeps only its icon, in a bar that has run out of room.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
compact?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Text of the button.
|
|
33
|
+
* @default the chrome's own word for it, in the language of the page
|
|
34
|
+
*/
|
|
35
|
+
buttonLabel?: string;
|
|
36
|
+
/**
|
|
37
|
+
* What the pointer is told over the button.
|
|
38
|
+
* @default the chrome's own line, in the language of the page
|
|
39
|
+
*/
|
|
40
|
+
buttonTitle?: string;
|
|
41
|
+
/**
|
|
42
|
+
* A plain bar entry, or a Blueprint button for a toolbar made of them.
|
|
43
|
+
* @default 'nav-link'
|
|
44
|
+
*/
|
|
45
|
+
variant?: ShareButtonVariant;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the dialog is open, for a page that has to know — to compute what
|
|
48
|
+
* the dialog shows only while it is. Pass it with `onOpenChange`.
|
|
49
|
+
* @default undefined — the control keeps the state itself
|
|
50
|
+
*/
|
|
51
|
+
open?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Called when the dialog opens or closes.
|
|
54
|
+
* @default undefined
|
|
55
|
+
*/
|
|
56
|
+
onOpenChange?: (open: boolean) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Called as the button is pressed, before the dialog opens — to write the
|
|
59
|
+
* page's state into the address the link is read from.
|
|
60
|
+
* @default undefined
|
|
61
|
+
*/
|
|
62
|
+
onOpen?: () => void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The Share entry of a header and the dialog it opens: the page handed out as a
|
|
66
|
+
* link, or as the iframe that frames it in somebody else's site.
|
|
67
|
+
*
|
|
68
|
+
* It is what a header's `share` prop takes, so the entry lands after Contact on
|
|
69
|
+
* every site. Everything the dialog can be told is passed straight through; the
|
|
70
|
+
* control adds the open state, and the frame's name read off the site.
|
|
71
|
+
* @param props - The dialog's props, and how the button is dressed.
|
|
72
|
+
* @returns The button, and the dialog while it is open.
|
|
73
|
+
*/
|
|
74
|
+
export declare function ShareControl<Codecs extends ShareParamCodecs = Record<string, never>>(props: ShareControlProps<Codecs>): ReactElement;
|
|
75
|
+
//# sourceMappingURL=ShareControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShareControl.d.ts","sourceRoot":"","sources":["../../../src/shell/ui/ShareControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGvE,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB,CAChC,MAAM,SAAS,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CACvD,SAAQ,IAAI,CACZ,gBAAgB,CAAC,MAAM,CAAC,EACxB,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAC/C;IACC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,MAAM,SAAS,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACvD,KAAK,EAAE,iBAAiB,CAAC,MAAM,CAAC,GAAG,YAAY,CAuDhD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { siteById } from "../../ecosystem/core/lookup.js";
|
|
4
|
+
import { useChromeT } from "../../i18n/ui/useT.js";
|
|
5
|
+
import { ShareButton } from "../../share/ui/ShareButton.js";
|
|
6
|
+
import { ShareDialog } from "../../share/ui/ShareDialog.js";
|
|
7
|
+
/**
|
|
8
|
+
* The Share entry of a header and the dialog it opens: the page handed out as a
|
|
9
|
+
* link, or as the iframe that frames it in somebody else's site.
|
|
10
|
+
*
|
|
11
|
+
* It is what a header's `share` prop takes, so the entry lands after Contact on
|
|
12
|
+
* every site. Everything the dialog can be told is passed straight through; the
|
|
13
|
+
* control adds the open state, and the frame's name read off the site.
|
|
14
|
+
* @param props - The dialog's props, and how the button is dressed.
|
|
15
|
+
* @returns The button, and the dialog while it is open.
|
|
16
|
+
*/
|
|
17
|
+
export function ShareControl(props) {
|
|
18
|
+
const { siteId, frameTitle, search, compact = false, buttonLabel, buttonTitle, variant, open, onOpenChange, onOpen, title, ...dialog } = props;
|
|
19
|
+
const t = useChromeT();
|
|
20
|
+
const [ownOpen, setOwnOpen] = useState(false);
|
|
21
|
+
const isOpen = open ?? ownOpen;
|
|
22
|
+
function setOpen(next) {
|
|
23
|
+
if (open === undefined)
|
|
24
|
+
setOwnOpen(next);
|
|
25
|
+
onOpenChange?.(next);
|
|
26
|
+
}
|
|
27
|
+
const host = siteId === undefined ? undefined : siteById(siteId).host;
|
|
28
|
+
const named = frameTitle ??
|
|
29
|
+
(host === undefined ? title : t('share.frameTitle', { site: host, title }));
|
|
30
|
+
return (_jsxs(_Fragment, { children: [_jsx(ShareButton, { compact: compact, label: buttonLabel, title: buttonTitle, variant: variant, onClick: () => {
|
|
31
|
+
onOpen?.();
|
|
32
|
+
setOpen(true);
|
|
33
|
+
} }), _jsx(ShareDialog, { ...dialog, title: title, frameTitle: named, search: isOpen && typeof search === 'function' ? search() : searchText(search), isOpen: isOpen, onClose: () => {
|
|
34
|
+
setOpen(false);
|
|
35
|
+
} })] }));
|
|
36
|
+
}
|
|
37
|
+
function searchText(search) {
|
|
38
|
+
return typeof search === 'string' ? search : undefined;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=ShareControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShareControl.js","sourceRoot":"","sources":["../../../src/shell/ui/ShareControl.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAAgC,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAAgC,CAAC;AAkE7D;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAE1B,KAAgC;IAChC,MAAM,EACJ,MAAM,EACN,UAAU,EACV,MAAM,EACN,OAAO,GAAG,KAAK,EACf,WAAW,EACX,WAAW,EACX,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,GAAG,MAAM,EACV,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IACvB,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,MAAM,GAAG,IAAI,IAAI,OAAO,CAAC;IAE/B,SAAS,OAAO,CAAC,IAAa;QAC5B,IAAI,IAAI,KAAK,SAAS;YAAE,UAAU,CAAC,IAAI,CAAC,CAAC;QACzC,YAAY,EAAE,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;IACtE,MAAM,KAAK,GACT,UAAU;QACV,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAE9E,OAAO,CACL,8BACE,KAAC,WAAW,IACV,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,GAAG,EAAE;oBACZ,MAAM,EAAE,EAAE,CAAC;oBACX,OAAO,CAAC,IAAI,CAAC,CAAC;gBAChB,CAAC,GACD,EACF,KAAC,WAAW,OACN,MAAM,EACV,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,KAAK,EACjB,MAAM,EACJ,MAAM,IAAI,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,EAExE,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE;oBACZ,OAAO,CAAC,KAAK,CAAC,CAAC;gBACjB,CAAC,GACD,IACD,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CACjB,MAAuD;IAEvD,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The body of `SiteShell`, once the route has been read: the theme, the bar,
|
|
3
|
+
* the page and the footer.
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactElement } from 'react';
|
|
6
|
+
import type { ShareParamCodecs } from '../../share/core/index.ts';
|
|
7
|
+
import type { SiteShellProps } from './SiteShell.tsx';
|
|
8
|
+
/**
|
|
9
|
+
* Draw the shell.
|
|
10
|
+
* @param props - The shell's props, the route already read.
|
|
11
|
+
* @returns The page in its chrome.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ShellFrame<Codecs extends ShareParamCodecs, Tab extends string>(props: SiteShellProps<Codecs, Tab>): ReactElement;
|
|
14
|
+
//# sourceMappingURL=ShellFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShellFrame.d.ts","sourceRoot":"","sources":["../../../src/shell/ui/ShellFrame.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AAWrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAKlE,OAAO,KAAK,EAAa,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjE;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,SAAS,gBAAgB,EAAE,GAAG,SAAS,MAAM,EAC5E,KAAK,EAAE,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,GACjC,YAAY,CA0Fd"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { isValidElement } from 'react';
|
|
3
|
+
import { AboutPage } from "../../about/ui/AboutPage.js";
|
|
4
|
+
import { AboutButton } from "../../chrome/ui/AboutButton.js";
|
|
5
|
+
import { SiteFooter } from "../../chrome/ui/SiteFooter.js";
|
|
6
|
+
import { SiteHeader } from "../../chrome/ui/SiteHeader.js";
|
|
7
|
+
import { useCompactHeader } from "../../chrome/ui/useCompactHeader.js";
|
|
8
|
+
import { CiteButton } from "../../citation/ui/CiteButton.js";
|
|
9
|
+
import { EcosystemButton } from "../../ecosystem/ui/EcosystemButton.js";
|
|
10
|
+
import { SiteTheme } from "../../ecosystem/ui/SiteTheme.js";
|
|
11
|
+
import { HiddenPartsProvider } from "../../share/ui/HiddenPartsProvider.js";
|
|
12
|
+
import { joinClassNames } from "../../shared/ui/joinClassNames.js";
|
|
13
|
+
import { ShareControl } from "./ShareControl.js";
|
|
14
|
+
/**
|
|
15
|
+
* Draw the shell.
|
|
16
|
+
* @param props - The shell's props, the route already read.
|
|
17
|
+
* @returns The page in its chrome.
|
|
18
|
+
*/
|
|
19
|
+
export function ShellFrame(props) {
|
|
20
|
+
const { siteId, site, mark, markSize, nav, activeId, homeHref, onHome, renderNavItem, navPart = 'tabs', width = 'page', embedded = false, hidden, about = false, contact, belowHeader, mainClassName, mainTestId, footer = {}, account, children, } = props;
|
|
21
|
+
const compact = useCompactHeader();
|
|
22
|
+
const footerSiteId = footer === false ? undefined : (footer.siteId ?? siteId);
|
|
23
|
+
const aboutOnShow = about !== false && about.active === true;
|
|
24
|
+
const page = (_jsxs(_Fragment, { children: [siteId === undefined ? (_jsx(SiteTheme, { site: site })) : (_jsx(SiteTheme, { siteId: siteId })), _jsxs("div", { className: "site-shell", children: [_jsx(SiteHeader, { siteId: siteId, site: site, mark: mark, markSize: markSize, embedded: embedded, width: width, nav: hidden?.includes(navPart) ? [] : nav, activeId: aboutOnShow ? (about.id ?? 'about') : activeId, homeHref: homeHref, onHome: onHome, renderNavItem: renderNavItem, contact: contact, actions: _jsx(ShellActions, { ...props, compact: compact }), share: _jsx(ShellShare, { ...props, compact: compact }), account: account }), embedded ? null : belowHeader, _jsx("main", { className: joinClassNames('site-shell__main', width === 'full' ? 'site-shell__main--full' : undefined, embedded ? 'site-shell__main--embedded' : undefined, mainClassName), "data-testid": mainTestId, children: aboutOnShow
|
|
25
|
+
? (about.page ?? _jsx(AboutPage, { content: about.content }))
|
|
26
|
+
: children })] }), footer === false || footerSiteId === undefined ? null : (_jsxs(SiteFooter, { siteId: footerSiteId, embedded: embedded, width: width, heading: footer.heading, layout: footer.layout, children: [footer.note === undefined ? null : (_jsx("p", { className: "app-footer__note", children: footer.note })), footer.children] }))] }));
|
|
27
|
+
return hidden === undefined ? (page) : (_jsx(HiddenPartsProvider, { hidden: hidden, children: page }));
|
|
28
|
+
}
|
|
29
|
+
function ShellActions(props) {
|
|
30
|
+
const { siteId, about = false, cite, ecosystem = true, actionsAfterAbout, actionsAfterCite, actions, language, compact, } = props;
|
|
31
|
+
const works = cite ?? (about === false ? [] : (about.content.cite ?? []));
|
|
32
|
+
return (_jsxs(_Fragment, { children: [about === false ? null : (_jsx(AboutButton, { id: about.id, href: about.href ?? '/about', active: about.active, onSelect: about.onSelect, label: about.label, title: about.title })), fill(actionsAfterAbout, compact), works === false || works.length === 0 ? null : (_jsx(CiteButton, { works: works, compact: compact })), fill(actionsAfterCite, compact), ecosystem ? (_jsx(EcosystemButton, { currentSiteId: siteId, compact: compact })) : null, fill(actions, compact), fill(language, compact)] }));
|
|
33
|
+
}
|
|
34
|
+
function ShellShare(props) {
|
|
35
|
+
const { share, siteId, compact } = props;
|
|
36
|
+
if (share === undefined)
|
|
37
|
+
return null;
|
|
38
|
+
if (isValidElement(share))
|
|
39
|
+
return share;
|
|
40
|
+
return _jsx(ShareControl, { siteId: siteId, compact: compact, ...share });
|
|
41
|
+
}
|
|
42
|
+
function fill(slot, compact) {
|
|
43
|
+
return typeof slot === 'function' ? slot(compact) : slot;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=ShellFrame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShellFrame.js","sourceRoot":"","sources":["../../../src/shell/ui/ShellFrame.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA8B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAiC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAAgC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAAgC,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAkC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAwC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAkC,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,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S,CAAC,CAAC,CAAC,CACX,KAAC,eAAe,IAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAI,CAC7D,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,EACtB,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,IACvB,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CACjB,KAA+B;IAE/B,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACzC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACrC,IAAI,cAAc,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,OAAO,KAAC,YAAY,IAAS,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAM,KAAK,GAAI,CAAC;AAC/E,CAAC;AAED,SAAS,IAAI,CAAC,IAAe,EAAE,OAAgB;IAC7C,OAAO,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { AboutContent } from '../../about/core/about.ts';
|
|
3
|
+
import type { NavItem } from '../../chrome/ui/navItem.ts';
|
|
4
|
+
import type { CitedWork } from '../../citation/core/works.ts';
|
|
5
|
+
import type { SiteId, SiteRecord } from '../../ecosystem/core/sites.ts';
|
|
6
|
+
import type { TabRouter } from '../../router/core/tabRouter.ts';
|
|
7
|
+
import type { ShareParamCodecs } from '../../share/core/index.ts';
|
|
8
|
+
import type { ShareControlProps } from './ShareControl.tsx';
|
|
9
|
+
/**
|
|
10
|
+
* A slot of the bar: an element, or a function handed whether the bar has run
|
|
11
|
+
* out of room, so a site's own entries fold with the shared ones.
|
|
12
|
+
*/
|
|
13
|
+
export type ShellSlot = ReactNode | ((compact: boolean) => ReactNode);
|
|
14
|
+
/** The site's About: the record, and where it is served. */
|
|
15
|
+
export interface ShellAbout {
|
|
16
|
+
/** What the site says about itself; its works also feed the Cite button. */
|
|
17
|
+
content: AboutContent;
|
|
18
|
+
/**
|
|
19
|
+
* The About address.
|
|
20
|
+
* @default the router's address of the About tab, or `/about` without one
|
|
21
|
+
*/
|
|
22
|
+
href?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the About is the page on show, in which case it is what the main
|
|
25
|
+
* area draws.
|
|
26
|
+
* @default whether the router's tab is the About tab, `false` without one
|
|
27
|
+
*/
|
|
28
|
+
active?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* What the site does when the entry is picked, for a page that routes in
|
|
31
|
+
* place.
|
|
32
|
+
* @default a move to the About tab with a router, the plain link without
|
|
33
|
+
*/
|
|
34
|
+
onSelect?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* What the active entry is named by.
|
|
37
|
+
* @default 'about'
|
|
38
|
+
*/
|
|
39
|
+
id?: string;
|
|
40
|
+
/**
|
|
41
|
+
* What the entry reads.
|
|
42
|
+
* @default the chrome's own word for it
|
|
43
|
+
*/
|
|
44
|
+
label?: string;
|
|
45
|
+
/**
|
|
46
|
+
* What the pointer is told.
|
|
47
|
+
* @default the chrome's own sentence
|
|
48
|
+
*/
|
|
49
|
+
title?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The page itself, for a site whose About carries more than its record — a
|
|
52
|
+
* section of its own, a sign-in, a mark.
|
|
53
|
+
* @default `<AboutPage content={content} />`
|
|
54
|
+
*/
|
|
55
|
+
page?: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
/** The strip under the page. */
|
|
58
|
+
export interface ShellFooter {
|
|
59
|
+
/**
|
|
60
|
+
* The site the footer sits on, for a shell given a `site` record rather
|
|
61
|
+
* than a `siteId`.
|
|
62
|
+
* @default the shell's `siteId`, and no footer without one
|
|
63
|
+
*/
|
|
64
|
+
siteId?: SiteId;
|
|
65
|
+
/**
|
|
66
|
+
* What introduces the family.
|
|
67
|
+
* @default undefined
|
|
68
|
+
*/
|
|
69
|
+
heading?: string;
|
|
70
|
+
/**
|
|
71
|
+
* How much of each sibling is written.
|
|
72
|
+
* @default 'grid'
|
|
73
|
+
*/
|
|
74
|
+
layout?: 'grid' | 'row';
|
|
75
|
+
/**
|
|
76
|
+
* One line under the family, set as the footer's note.
|
|
77
|
+
* @default undefined
|
|
78
|
+
*/
|
|
79
|
+
note?: ReactNode;
|
|
80
|
+
/**
|
|
81
|
+
* Anything else under the family.
|
|
82
|
+
* @default undefined
|
|
83
|
+
*/
|
|
84
|
+
children?: ReactNode;
|
|
85
|
+
}
|
|
86
|
+
/** What {@link SiteShell} needs. */
|
|
87
|
+
export interface SiteShellProps<Codecs extends ShareParamCodecs = Record<string, never>, Tab extends string = string> {
|
|
88
|
+
/**
|
|
89
|
+
* The site, named. One of `site` and `siteId` is required.
|
|
90
|
+
* @default undefined
|
|
91
|
+
*/
|
|
92
|
+
siteId?: SiteId;
|
|
93
|
+
/**
|
|
94
|
+
* The site, passed rather than named, for one outside the family's registry.
|
|
95
|
+
* @default undefined
|
|
96
|
+
*/
|
|
97
|
+
site?: SiteRecord;
|
|
98
|
+
/**
|
|
99
|
+
* The site's own mark, for a site the shared glyphs do not hold.
|
|
100
|
+
* @default the family's mark for the site
|
|
101
|
+
*/
|
|
102
|
+
mark?: ReactNode;
|
|
103
|
+
/**
|
|
104
|
+
* Edge of the mark, in pixels.
|
|
105
|
+
* @default 28
|
|
106
|
+
*/
|
|
107
|
+
markSize?: number;
|
|
108
|
+
/**
|
|
109
|
+
* The site's router. With it the shell follows the address itself: the
|
|
110
|
+
* page on show is the tab it names, and the About tab is served as the About
|
|
111
|
+
* page.
|
|
112
|
+
* @default undefined — the page says which entry is active
|
|
113
|
+
*/
|
|
114
|
+
router?: TabRouter<Tab>;
|
|
115
|
+
/**
|
|
116
|
+
* The tab the About is served at.
|
|
117
|
+
* @default 'about'
|
|
118
|
+
*/
|
|
119
|
+
aboutTab?: Tab;
|
|
120
|
+
/** The pages, in the order the bar lists them; About is not one of them. */
|
|
121
|
+
nav: readonly NavItem[];
|
|
122
|
+
/**
|
|
123
|
+
* Which of the pages is on show.
|
|
124
|
+
* @default the router's tab, or none without a router
|
|
125
|
+
*/
|
|
126
|
+
activeId?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Where the brand leads.
|
|
129
|
+
* @default '/'
|
|
130
|
+
*/
|
|
131
|
+
homeHref?: string;
|
|
132
|
+
/**
|
|
133
|
+
* What the site does when the brand is picked.
|
|
134
|
+
* @default undefined
|
|
135
|
+
*/
|
|
136
|
+
onHome?: () => void;
|
|
137
|
+
/**
|
|
138
|
+
* Draws one page the site's own way.
|
|
139
|
+
* @default undefined
|
|
140
|
+
*/
|
|
141
|
+
renderNavItem?: (item: NavItem, isActive: boolean) => ReactNode;
|
|
142
|
+
/**
|
|
143
|
+
* The part a link hides the pages with; the bar then lists none.
|
|
144
|
+
* @default 'tabs'
|
|
145
|
+
*/
|
|
146
|
+
navPart?: string;
|
|
147
|
+
/**
|
|
148
|
+
* How wide the bar, the page and the footer run, all three alike.
|
|
149
|
+
* @default 'page'
|
|
150
|
+
*/
|
|
151
|
+
width?: 'page' | 'full';
|
|
152
|
+
/**
|
|
153
|
+
* Whether the page is framed in another site: no bar, no footer, and the
|
|
154
|
+
* frame as the margin.
|
|
155
|
+
* @default false
|
|
156
|
+
*/
|
|
157
|
+
embedded?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* The parts the link switches off, provided to every `PagePart` below.
|
|
160
|
+
* @default undefined — no provider; the page brings its own
|
|
161
|
+
*/
|
|
162
|
+
hidden?: readonly string[];
|
|
163
|
+
/**
|
|
164
|
+
* The About entry and page; `false` leaves both out.
|
|
165
|
+
* @default false
|
|
166
|
+
*/
|
|
167
|
+
about?: ShellAbout | false;
|
|
168
|
+
/**
|
|
169
|
+
* The works the Cite button offers; `false` leaves it out.
|
|
170
|
+
* @default the About's works, and no button when it has none
|
|
171
|
+
*/
|
|
172
|
+
cite?: readonly CitedWork[] | false;
|
|
173
|
+
/**
|
|
174
|
+
* Whether the Tools menu of the family is in the bar.
|
|
175
|
+
* @default true
|
|
176
|
+
*/
|
|
177
|
+
ecosystem?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Entries between About and Cite — an API link, a version.
|
|
180
|
+
* @default undefined
|
|
181
|
+
*/
|
|
182
|
+
actionsAfterAbout?: ShellSlot;
|
|
183
|
+
/**
|
|
184
|
+
* Entries between Cite and Tools — a feedback form, a specification.
|
|
185
|
+
* @default undefined
|
|
186
|
+
*/
|
|
187
|
+
actionsAfterCite?: ShellSlot;
|
|
188
|
+
/**
|
|
189
|
+
* Entries after Tools — a unit picker, an admin action.
|
|
190
|
+
* @default undefined
|
|
191
|
+
*/
|
|
192
|
+
actions?: ShellSlot;
|
|
193
|
+
/**
|
|
194
|
+
* The language switcher, after the site's own entries.
|
|
195
|
+
* @default undefined
|
|
196
|
+
*/
|
|
197
|
+
language?: ShellSlot;
|
|
198
|
+
/**
|
|
199
|
+
* Who is signed in, at the right end.
|
|
200
|
+
* @default undefined
|
|
201
|
+
*/
|
|
202
|
+
account?: ReactNode;
|
|
203
|
+
/**
|
|
204
|
+
* The Share entry: what `ShareControl` is given, the shell passing it the
|
|
205
|
+
* site and the compact state, or a control of the site's own.
|
|
206
|
+
* @default undefined — no Share entry
|
|
207
|
+
*/
|
|
208
|
+
share?: ShareControlProps<Codecs> | ReactElement;
|
|
209
|
+
/**
|
|
210
|
+
* The contact form of the Contact entry, or `false` to leave it out.
|
|
211
|
+
* @default the family's form
|
|
212
|
+
*/
|
|
213
|
+
contact?: string | false;
|
|
214
|
+
/**
|
|
215
|
+
* What sits between the bar and the page — a tagline, a banner — dropped
|
|
216
|
+
* with the bar when the page is framed.
|
|
217
|
+
* @default undefined
|
|
218
|
+
*/
|
|
219
|
+
belowHeader?: ReactNode;
|
|
220
|
+
/**
|
|
221
|
+
* Classes the main area carries beside the shell's own.
|
|
222
|
+
* @default undefined
|
|
223
|
+
*/
|
|
224
|
+
mainClassName?: string;
|
|
225
|
+
/**
|
|
226
|
+
* `data-testid` of the main area.
|
|
227
|
+
* @default undefined
|
|
228
|
+
*/
|
|
229
|
+
mainTestId?: string;
|
|
230
|
+
/**
|
|
231
|
+
* The strip under the page, or `false` for none on this page.
|
|
232
|
+
* @default the family's links alone
|
|
233
|
+
*/
|
|
234
|
+
footer?: ShellFooter | false;
|
|
235
|
+
/** The page the address names. */
|
|
236
|
+
children: ReactNode;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* The chrome every site of the family carries, around its page: the theme,
|
|
240
|
+
* the bar with About · Cite · Tools · Contact · Share at its right, the page,
|
|
241
|
+
* and the footer linking every sibling. A framed page gets the page alone.
|
|
242
|
+
*
|
|
243
|
+
* Everything the bar holds is the shared components, in the family's order; a
|
|
244
|
+
* site fills the slots between them and never re-orders them. With a router,
|
|
245
|
+
* the shell also follows the address: it marks the tab on show and serves the
|
|
246
|
+
* About tab as the shared About page.
|
|
247
|
+
* @param props - See {@link SiteShellProps}.
|
|
248
|
+
* @returns The page in its chrome.
|
|
249
|
+
*/
|
|
250
|
+
export declare function SiteShell<Codecs extends ShareParamCodecs = Record<string, never>, Tab extends string = string>(props: SiteShellProps<Codecs, Tab>): ReactElement;
|
|
251
|
+
//# sourceMappingURL=SiteShell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteShell.d.ts","sourceRoot":"","sources":["../../../src/shell/ui/SiteShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,C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;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC;IACjD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC;IAC7B,kCAAkC;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CACvB,MAAM,SAAS,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACvD,GAAG,SAAS,MAAM,GAAG,MAAM,EAC3B,KAAK,EAAE,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,YAAY,CAIlD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { writeRoute } from "../../router/core/history.js";
|
|
3
|
+
import { useTabRoute } from "../../router/ui/useTabRoute.js";
|
|
4
|
+
import { ShellFrame } from "./ShellFrame.js";
|
|
5
|
+
/**
|
|
6
|
+
* The chrome every site of the family carries, around its page: the theme,
|
|
7
|
+
* the bar with About · Cite · Tools · Contact · Share at its right, the page,
|
|
8
|
+
* and the footer linking every sibling. A framed page gets the page alone.
|
|
9
|
+
*
|
|
10
|
+
* Everything the bar holds is the shared components, in the family's order; a
|
|
11
|
+
* site fills the slots between them and never re-orders them. With a router,
|
|
12
|
+
* the shell also follows the address: it marks the tab on show and serves the
|
|
13
|
+
* About tab as the shared About page.
|
|
14
|
+
* @param props - See {@link SiteShellProps}.
|
|
15
|
+
* @returns The page in its chrome.
|
|
16
|
+
*/
|
|
17
|
+
export function SiteShell(props) {
|
|
18
|
+
const { router } = props;
|
|
19
|
+
if (router === undefined)
|
|
20
|
+
return _jsx(ShellFrame, { ...props });
|
|
21
|
+
return _jsx(RoutedShell, { ...props, router: router });
|
|
22
|
+
}
|
|
23
|
+
function RoutedShell(props) {
|
|
24
|
+
const { router, aboutTab = 'about', about, activeId } = props;
|
|
25
|
+
const route = useTabRoute(router);
|
|
26
|
+
const routedAbout = about === undefined || about === false
|
|
27
|
+
? false
|
|
28
|
+
: {
|
|
29
|
+
...about,
|
|
30
|
+
href: about.href ?? router.format({ tab: aboutTab }),
|
|
31
|
+
active: about.active ?? route.tab === aboutTab,
|
|
32
|
+
onSelect: about.onSelect ??
|
|
33
|
+
(() => {
|
|
34
|
+
writeRoute(router, { tab: aboutTab });
|
|
35
|
+
}),
|
|
36
|
+
};
|
|
37
|
+
return (_jsx(ShellFrame, { ...props, about: routedAbout, activeId: activeId ?? route.tab }));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=SiteShell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteShell.js","sourceRoot":"","sources":["../../../src/shell/ui/SiteShell.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAI7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AA8O9C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,SAAS,CAGvB,KAAkC;IAClC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,KAAC,UAAU,OAAK,KAAK,GAAI,CAAC;IAC3D,OAAO,KAAC,WAAW,OAAK,KAAK,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;AACpD,CAAC;AAED,SAAS,WAAW,CAClB,KAA+D;IAE/D,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACrE,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,WAAW,GACf,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,KAAK;QACpC,CAAC,CAAC,KAAK;QACP,CAAC,CAAC;YACE,GAAG,KAAK;YACR,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;YACpD,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ;YAC9C,QAAQ,EACN,KAAK,CAAC,QAAQ;gBACd,CAAC,GAAG,EAAE;oBACJ,UAAU,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;gBACxC,CAAC,CAAC;SACL,CAAC;IACR,OAAO,CACL,KAAC,UAAU,OACL,KAAK,EACT,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,QAAQ,IAAI,KAAK,CAAC,GAAG,GAC/B,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { ShareControlProps } from './ShareControl.tsx';
|
|
2
|
+
export { ShareControl } from './ShareControl.tsx';
|
|
3
|
+
export type { ShellAbout, ShellFooter, ShellSlot, SiteShellProps, } from './SiteShell.tsx';
|
|
4
|
+
export { SiteShell } from './SiteShell.tsx';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shell/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shell/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAOlD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { LegacyStorageKey } from './legacyEntries.ts';
|
|
1
2
|
export type { BucketRead, PersistBucketOptions, PersistedBucket, } from './persistBucket.ts';
|
|
2
3
|
export { persistBucket } from './persistBucket.ts';
|
|
3
4
|
export type { PersistSignalBucketOptions, SignalEffect, } from './persistSignalBucket.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/state/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,oBAAoB,EACpB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EACV,0BAA0B,EAC1B,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/state/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EACV,UAAU,EACV,oBAAoB,EACpB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EACV,0BAA0B,EAC1B,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/state/core/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/state/core/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
|