react-cheminfo 0.64.0 → 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/molecule3d/core/highlight.d.ts.map +1 -1
- package/lib/molecule3d/core/highlight.js +2 -8
- package/lib/molecule3d/core/highlight.js.map +1 -1
- package/lib/molecule3d/core/index.d.ts +1 -1
- package/lib/molecule3d/core/index.d.ts.map +1 -1
- package/lib/molecule3d/core/index.js +1 -1
- package/lib/molecule3d/core/index.js.map +1 -1
- package/lib/molecule3d/core/measurement.d.ts +17 -0
- package/lib/molecule3d/core/measurement.d.ts.map +1 -1
- package/lib/molecule3d/core/measurement.js +43 -0
- package/lib/molecule3d/core/measurement.js.map +1 -1
- package/lib/molecule3d/ui/drawScene.d.ts +4 -2
- package/lib/molecule3d/ui/drawScene.d.ts.map +1 -1
- package/lib/molecule3d/ui/drawScene.js +1 -1
- package/lib/molecule3d/ui/drawScene.js.map +1 -1
- package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts +3 -1
- package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts.map +1 -1
- package/lib/molecule3d/ui/sceneDrawer.d.ts +47 -0
- package/lib/molecule3d/ui/sceneDrawer.d.ts.map +1 -0
- package/lib/molecule3d/ui/sceneDrawer.js +103 -0
- package/lib/molecule3d/ui/sceneDrawer.js.map +1 -0
- package/lib/molecule3d/ui/useMoleculeScene.d.ts +2 -1
- package/lib/molecule3d/ui/useMoleculeScene.d.ts.map +1 -1
- package/lib/molecule3d/ui/useMoleculeScene.js +13 -22
- package/lib/molecule3d/ui/useMoleculeScene.js.map +1 -1
- package/lib/molecule3d/ui/useSharedCamera.d.ts +1 -3
- package/lib/molecule3d/ui/useSharedCamera.d.ts.map +1 -1
- package/lib/molecule3d/ui/useSharedCamera.js.map +1 -1
- 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/molecule3d/core/highlight.ts +2 -8
- package/src/molecule3d/core/index.ts +1 -0
- package/src/molecule3d/core/measurement.ts +47 -0
- package/src/molecule3d/ui/drawScene.ts +13 -2
- package/src/molecule3d/ui/moleculeViewer3DProps.ts +3 -1
- package/src/molecule3d/ui/sceneDrawer.ts +132 -0
- package/src/molecule3d/ui/useMoleculeScene.ts +16 -26
- package/src/molecule3d/ui/useSharedCamera.ts +1 -3
- 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,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Room in the frame for a panel a card opens over itself.
|
|
3
|
+
*
|
|
4
|
+
* A chat sizes the frame of a card from the card's own height, and a popover
|
|
5
|
+
* or a dialog opened from the card — the panel that copies or saves a figure,
|
|
6
|
+
* the notations of a structure — is drawn over the card inside that frame.
|
|
7
|
+
* Taller than the card, it would be cut off at the frame's edge, its Copy
|
|
8
|
+
* button with it. So while one is open the card is made as tall as the panel
|
|
9
|
+
* needs, which grows the frame with it.
|
|
10
|
+
*/
|
|
11
|
+
/** What one open panel needs of the frame. */
|
|
12
|
+
export interface OpenPanel {
|
|
13
|
+
/**
|
|
14
|
+
* `dialog`: centred in the frame; `popover`: hung beside or under the
|
|
15
|
+
* control that opened it.
|
|
16
|
+
*/
|
|
17
|
+
kind: 'dialog' | 'popover';
|
|
18
|
+
/**
|
|
19
|
+
* Its height with nothing scrolled away, in pixels: a dialog's body scrolls
|
|
20
|
+
* past 70 % of the frame, which is no height at all in a frame of 260. A
|
|
21
|
+
* dialog's margins are counted in.
|
|
22
|
+
*/
|
|
23
|
+
height: number;
|
|
24
|
+
/**
|
|
25
|
+
* Where a popover ends as it is placed, in pixels from the top of the card:
|
|
26
|
+
* one opened at the pointer, or from a control outside the card, hangs lower
|
|
27
|
+
* than the control it is reckoned from.
|
|
28
|
+
* @default undefined - reckoned from the control alone
|
|
29
|
+
*/
|
|
30
|
+
bottom?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* How tall the card must be for every open panel to fit in its frame.
|
|
34
|
+
* @param panels - The panels on screen.
|
|
35
|
+
* @param anchor - Where the lowest control whose popover is open ends, in
|
|
36
|
+
* pixels from the top of the card; a popover hangs from it.
|
|
37
|
+
* @returns The least height of the card, or 0 when no panel is open.
|
|
38
|
+
*/
|
|
39
|
+
export declare function roomForPanels(panels: readonly OpenPanel[], anchor: number): number;
|
|
40
|
+
//# sourceMappingURL=panelRoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelRoom.d.ts","sourceRoot":"","sources":["../../../src/card/core/panelRoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,8CAA8C;AAC9C,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAWD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,MAAM,EAAE,MAAM,GACb,MAAM,CAaR"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Room in the frame for a panel a card opens over itself.
|
|
3
|
+
*
|
|
4
|
+
* A chat sizes the frame of a card from the card's own height, and a popover
|
|
5
|
+
* or a dialog opened from the card — the panel that copies or saves a figure,
|
|
6
|
+
* the notations of a structure — is drawn over the card inside that frame.
|
|
7
|
+
* Taller than the card, it would be cut off at the frame's edge, its Copy
|
|
8
|
+
* button with it. So while one is open the card is made as tall as the panel
|
|
9
|
+
* needs, which grows the frame with it.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Between a popover and its control, arrow included, and under the popover:
|
|
13
|
+
* enough for one hung under its control, and a margin for one beside it.
|
|
14
|
+
*/
|
|
15
|
+
const POPOVER_SPACE = 24;
|
|
16
|
+
/** Under a popover placed where it is, so that its shadow is not cut. */
|
|
17
|
+
const POPOVER_GAP = 8;
|
|
18
|
+
/**
|
|
19
|
+
* How tall the card must be for every open panel to fit in its frame.
|
|
20
|
+
* @param panels - The panels on screen.
|
|
21
|
+
* @param anchor - Where the lowest control whose popover is open ends, in
|
|
22
|
+
* pixels from the top of the card; a popover hangs from it.
|
|
23
|
+
* @returns The least height of the card, or 0 when no panel is open.
|
|
24
|
+
*/
|
|
25
|
+
export function roomForPanels(panels, anchor) {
|
|
26
|
+
let room = 0;
|
|
27
|
+
for (const panel of panels) {
|
|
28
|
+
let needed = panel.height;
|
|
29
|
+
if (panel.kind === 'popover') {
|
|
30
|
+
needed = anchor + panel.height + POPOVER_SPACE;
|
|
31
|
+
if (panel.bottom !== undefined && panel.bottom + POPOVER_GAP > needed) {
|
|
32
|
+
needed = panel.bottom + POPOVER_GAP;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (needed > room)
|
|
36
|
+
room = needed;
|
|
37
|
+
}
|
|
38
|
+
return Math.ceil(room);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=panelRoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelRoom.js","sourceRoot":"","sources":["../../../src/card/core/panelRoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAwBH;;;GAGG;AACH,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,yEAAyE;AACzE,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC3B,MAA4B,EAC5B,MAAc;IAEd,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC1B,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,aAAa,CAAC;YAC/C,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,GAAG,WAAW,GAAG,MAAM,EAAE,CAAC;gBACtE,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,WAAW,CAAC;YACtC,CAAC;QACH,CAAC;QACD,IAAI,MAAM,GAAG,IAAI;YAAE,IAAI,GAAG,MAAM,CAAC;IACnC,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { SitePageOptions } from '../core/cardAddress.ts';
|
|
3
|
+
/** What {@link CardDetailsButton} opens. */
|
|
4
|
+
export interface CardDetailsButtonProps {
|
|
5
|
+
/**
|
|
6
|
+
* Writes the address of the page the button opens, when it is pressed.
|
|
7
|
+
* @default the card's own address without `card`, `embed`, `hide` and
|
|
8
|
+
* what `address` says only the card reads — `sitePageUrl` over the page's
|
|
9
|
+
* address, the one a sealed link holds in memory included
|
|
10
|
+
*/
|
|
11
|
+
page?: () => string;
|
|
12
|
+
/**
|
|
13
|
+
* How the default page is read off the card's address.
|
|
14
|
+
* @default {} - `card`, `embed` and `hide` are left out, and nothing else
|
|
15
|
+
*/
|
|
16
|
+
address?: SitePageOptions;
|
|
17
|
+
/**
|
|
18
|
+
* What the tooltip says the button does.
|
|
19
|
+
* @default the chrome's own line, `Open in a new tab`
|
|
20
|
+
*/
|
|
21
|
+
tooltip?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Value of the `data-testid` attribute of the button.
|
|
24
|
+
* @default 'card-details'
|
|
25
|
+
*/
|
|
26
|
+
testId?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The way from a card to the site's own page it stands for, with its chrome,
|
|
30
|
+
* at the end of the card: a chat keeps the card's top right corner for its own
|
|
31
|
+
* control. Framed by a chat, the page opens in a new tab, so the conversation
|
|
32
|
+
* keeps its place; opened on its own, the card becomes the page. It never
|
|
33
|
+
* prints.
|
|
34
|
+
* @param props - See {@link CardDetailsButtonProps}.
|
|
35
|
+
* @returns The button, with the tooltip saying where the page opens.
|
|
36
|
+
*/
|
|
37
|
+
export declare function CardDetailsButton(props: CardDetailsButtonProps): ReactElement;
|
|
38
|
+
//# sourceMappingURL=CardDetailsButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardDetailsButton.d.ts","sourceRoot":"","sources":["../../../src/card/ui/CardDetailsButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAMzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAU9D,4CAA4C;AAC5C,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAoC7E"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Tooltip } from '@blueprintjs/core';
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useChromeT } from "../../i18n/ui/useT.js";
|
|
5
|
+
import { pageLocation } from "../../router/core/pageAddress.js";
|
|
6
|
+
import { useActionTooltip } from "../../shared/ui/useActionTooltip.js";
|
|
7
|
+
import { sitePageUrl } from "../core/cardAddress.js";
|
|
8
|
+
import { CARD_TOOLTIP_CLASS, CARD_TOOLTIP_DELAY, CARD_TOOLTIP_MODIFIERS, } from "./cardTooltip.js";
|
|
9
|
+
import { loadEmbed, loadedEmbed } from "./embed.js";
|
|
10
|
+
/**
|
|
11
|
+
* The way from a card to the site's own page it stands for, with its chrome,
|
|
12
|
+
* at the end of the card: a chat keeps the card's top right corner for its own
|
|
13
|
+
* control. Framed by a chat, the page opens in a new tab, so the conversation
|
|
14
|
+
* keeps its place; opened on its own, the card becomes the page. It never
|
|
15
|
+
* prints.
|
|
16
|
+
* @param props - See {@link CardDetailsButtonProps}.
|
|
17
|
+
* @returns The button, with the tooltip saying where the page opens.
|
|
18
|
+
*/
|
|
19
|
+
export function CardDetailsButton(props) {
|
|
20
|
+
const { page, address, tooltip, testId = 'card-details' } = props;
|
|
21
|
+
const t = useChromeT();
|
|
22
|
+
const { isOpen, target } = useActionTooltip(false, CARD_TOOLTIP_DELAY);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
loadEmbed().catch(() => undefined);
|
|
25
|
+
}, []);
|
|
26
|
+
return (_jsx(Tooltip, { content: tooltip ?? t('card.detailsTitle'), placement: "top-end", modifiers: CARD_TOOLTIP_MODIFIERS, popoverClassName: CARD_TOOLTIP_CLASS, isOpen: isOpen, children: _jsx("span", { className: "no-print", style: WRAP_STYLE, ...target, children: _jsx(Button, { variant: "minimal", size: "small", icon: "share", text: t('card.details'), "aria-label": t('card.detailsLabel'), "data-testid": testId, onClick: () => {
|
|
27
|
+
const url = page === undefined ? cardSitePage(address) : page();
|
|
28
|
+
const embed = loadedEmbed();
|
|
29
|
+
if (embed === undefined) {
|
|
30
|
+
void loadEmbed().then((module) => module.openSitePage(url));
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
embed.openSitePage(url);
|
|
34
|
+
}
|
|
35
|
+
} }) }) }));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The site's page behind the card on screen, read when the button is
|
|
39
|
+
* pressed: the page's own address — held in memory under a sealed link — on
|
|
40
|
+
* the origin the card is served from.
|
|
41
|
+
* @param address - What only the card reads.
|
|
42
|
+
* @returns The page's absolute address.
|
|
43
|
+
*/
|
|
44
|
+
function cardSitePage(address) {
|
|
45
|
+
const { origin } = globalThis.location;
|
|
46
|
+
const { pathname, search } = pageLocation() ?? globalThis.location;
|
|
47
|
+
return sitePageUrl({ origin, pathname, search }, address);
|
|
48
|
+
}
|
|
49
|
+
const WRAP_STYLE = { display: 'inline-flex' };
|
|
50
|
+
//# sourceMappingURL=CardDetailsButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardDetailsButton.js","sourceRoot":"","sources":["../../../src/card/ui/CardDetailsButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA4BpD;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,EAAE,GAAG,KAAK,CAAC;IAClE,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;IACvE,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,CACL,KAAC,OAAO,IACN,OAAO,EAAE,OAAO,IAAI,CAAC,CAAC,mBAAmB,CAAC,EAC1C,SAAS,EAAC,SAAS,EACnB,SAAS,EAAE,sBAAsB,EACjC,gBAAgB,EAAE,kBAAkB,EACpC,MAAM,EAAE,MAAM,YAEd,eAAM,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,UAAU,KAAM,MAAM,YACtD,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,OAAO,EACZ,IAAI,EAAE,CAAC,CAAC,cAAc,CAAC,gBACX,CAAC,CAAC,mBAAmB,CAAC,iBACrB,MAAM,EACnB,OAAO,EAAE,GAAG,EAAE;oBACZ,MAAM,GAAG,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;oBAChE,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;oBAC5B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;wBACxB,KAAK,SAAS,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;oBAC9D,CAAC;yBAAM,CAAC;wBACN,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;oBAC1B,CAAC;gBACH,CAAC,GACD,GACG,GACC,CACX,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAS,YAAY,CAAC,OAAoC;IACxD,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC;IACvC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,IAAI,UAAU,CAAC,QAAQ,CAAC;IACnE,OAAO,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,GAAG,EAAE,OAAO,EAAE,aAAa,EAAmC,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
/** What {@link CardFigure} draws and takes away. */
|
|
3
|
+
export interface CardFigureProps {
|
|
4
|
+
/** The drawing: a chart, a structure, a grid of them. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** What a saved file is called, without its extension. */
|
|
7
|
+
fileName: string;
|
|
8
|
+
/**
|
|
9
|
+
* Glyphs drawn above the one copying the picture: the copy of the data the
|
|
10
|
+
* figure is drawn from, the notations of its structure
|
|
11
|
+
* (`StructureExportButton` of `react-cheminfo/structure`).
|
|
12
|
+
* @default undefined - the picture's glyph alone
|
|
13
|
+
*/
|
|
14
|
+
tools?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Class of the box the drawing is in, which is what the picture holds.
|
|
17
|
+
* @default undefined
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Take the whole width the card gives, as a grid of structures does.
|
|
22
|
+
* @default false - as wide as the drawing
|
|
23
|
+
*/
|
|
24
|
+
fill?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The drawing is HTML rather than one SVG or canvas — a grid of cells — and
|
|
27
|
+
* the picture saved is painted from it as it is seen.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
html?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* What the picture's glyph is called, for the pointer and a screen reader.
|
|
33
|
+
* @default the chrome's own line, `Copy or save the picture`
|
|
34
|
+
*/
|
|
35
|
+
label?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A figure of a card with the glyphs that take it away: the picture copied as
|
|
39
|
+
* a PNG or saved as a PNG or an SVG, as the chat offers it for its own
|
|
40
|
+
* figures, and whatever else the figure carries.
|
|
41
|
+
*
|
|
42
|
+
* The glyphs stand in a column beside the figure's top right corner rather
|
|
43
|
+
* than over it, so they hide no part of a curve or an atom, and they fade
|
|
44
|
+
* until the figure is pointed at or one of them holds the focus: a card shown
|
|
45
|
+
* in a chat is read far more often than it is copied. `styles/card.css` draws
|
|
46
|
+
* the column.
|
|
47
|
+
* @param props - See {@link CardFigureProps}.
|
|
48
|
+
* @returns The figure, with its column of glyphs.
|
|
49
|
+
*/
|
|
50
|
+
export declare function CardFigure(props: CardFigureProps): ReactElement;
|
|
51
|
+
//# sourceMappingURL=CardFigure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardFigure.d.ts","sourceRoot":"","sources":["../../../src/card/ui/CardFigure.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQrD,oDAAoD;AACpD,MAAM,WAAW,eAAe;IAC9B,yDAAyD;IACzD,QAAQ,EAAE,SAAS,CAAC;IACpB,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CA4B/D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import { FigureDownload } from "../../download/ui/FigureDownload.js";
|
|
4
|
+
import { useChromeT } from "../../i18n/ui/useT.js";
|
|
5
|
+
import { OverlayLayer } from "../../overlay/ui/OverlayLayer.js";
|
|
6
|
+
import { joinClassNames } from "../../shared/ui/joinClassNames.js";
|
|
7
|
+
/**
|
|
8
|
+
* A figure of a card with the glyphs that take it away: the picture copied as
|
|
9
|
+
* a PNG or saved as a PNG or an SVG, as the chat offers it for its own
|
|
10
|
+
* figures, and whatever else the figure carries.
|
|
11
|
+
*
|
|
12
|
+
* The glyphs stand in a column beside the figure's top right corner rather
|
|
13
|
+
* than over it, so they hide no part of a curve or an atom, and they fade
|
|
14
|
+
* until the figure is pointed at or one of them holds the focus: a card shown
|
|
15
|
+
* in a chat is read far more often than it is copied. `styles/card.css` draws
|
|
16
|
+
* the column.
|
|
17
|
+
* @param props - See {@link CardFigureProps}.
|
|
18
|
+
* @returns The figure, with its column of glyphs.
|
|
19
|
+
*/
|
|
20
|
+
export function CardFigure(props) {
|
|
21
|
+
const { children, fileName, tools, className, label } = props;
|
|
22
|
+
const { fill = false, html = false } = props;
|
|
23
|
+
const t = useChromeT();
|
|
24
|
+
const id = useId();
|
|
25
|
+
return (_jsxs("div", { className: joinClassNames('card-figure', fill && 'card-figure--fill'), children: [_jsx("div", { id: id, className: joinClassNames('card-figure__drawing', className), "data-figure": html ? 'html' : undefined, children: children }), _jsx(OverlayLayer, { density: "compact", awake: true, children: _jsxs("div", { className: "card-figure__tools", "data-testid": "figure-tools", children: [tools, _jsx(FigureDownload, { targetId: id, fileName: fileName, label: label ?? t('card.copyPicture'), testId: "card-save-figure" })] }) })] }));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=CardFigure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardFigure.js","sourceRoot":"","sources":["../../../src/card/ui/CardFigure.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAsC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAmC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAsCnE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAC9D,MAAM,EAAE,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IACvB,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,OAAO,CACL,eAAK,SAAS,EAAE,cAAc,CAAC,aAAa,EAAE,IAAI,IAAI,mBAAmB,CAAC,aACxE,cACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,cAAc,CAAC,sBAAsB,EAAE,SAAS,CAAC,iBAC/C,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YAErC,QAAQ,GACL,EAEN,KAAC,YAAY,IAAC,OAAO,EAAC,SAAS,EAAC,KAAK,kBACnC,eAAK,SAAS,EAAC,oBAAoB,iBAAa,cAAc,aAC3D,KAAK,EACN,KAAC,cAAc,IACb,QAAQ,EAAE,EAAE,EACZ,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,kBAAkB,CAAC,EACrC,MAAM,EAAC,kBAAkB,GACzB,IACE,GACO,IACX,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
/** What {@link CardFrame} holds. */
|
|
3
|
+
export interface CardFrameProps {
|
|
4
|
+
/** The card: the answer alone, compactly. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* Class beside `card`, so a site can reach the card from its stylesheet.
|
|
8
|
+
* @default undefined
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Value of the `data-testid` attribute.
|
|
13
|
+
* @default 'card'
|
|
14
|
+
*/
|
|
15
|
+
testId?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The page a chat frames inline for one answer: the card, with no header, no
|
|
19
|
+
* footer and no form, as tall as what it shows. Framed, it reports its height
|
|
20
|
+
* so the chat fits the frame to it, and grows while a panel it opened is open
|
|
21
|
+
* so the frame holds that too; opened on its own, it is a page like any other.
|
|
22
|
+
*
|
|
23
|
+
* `react-cheminfo/styles/card.css` draws it: no margin on the page around it,
|
|
24
|
+
* the chat's corner left free by `card__header`, and the row of actions at its
|
|
25
|
+
* end, `card__end`.
|
|
26
|
+
* @param props - See {@link CardFrameProps}.
|
|
27
|
+
* @returns The card's root element.
|
|
28
|
+
*/
|
|
29
|
+
export declare function CardFrame(props: CardFrameProps): ReactElement;
|
|
30
|
+
//# sourceMappingURL=CardFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardFrame.d.ts","sourceRoot":"","sources":["../../../src/card/ui/CardFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMrD,oCAAoC;AACpC,MAAM,WAAW,cAAc;IAC7B,6CAA6C;IAC7C,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CAW7D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { joinClassNames } from "../../shared/ui/joinClassNames.js";
|
|
3
|
+
import { fitCardToFrame } from "./fitCardToFrame.js";
|
|
4
|
+
/**
|
|
5
|
+
* The page a chat frames inline for one answer: the card, with no header, no
|
|
6
|
+
* footer and no form, as tall as what it shows. Framed, it reports its height
|
|
7
|
+
* so the chat fits the frame to it, and grows while a panel it opened is open
|
|
8
|
+
* so the frame holds that too; opened on its own, it is a page like any other.
|
|
9
|
+
*
|
|
10
|
+
* `react-cheminfo/styles/card.css` draws it: no margin on the page around it,
|
|
11
|
+
* the chat's corner left free by `card__header`, and the row of actions at its
|
|
12
|
+
* end, `card__end`.
|
|
13
|
+
* @param props - See {@link CardFrameProps}.
|
|
14
|
+
* @returns The card's root element.
|
|
15
|
+
*/
|
|
16
|
+
export function CardFrame(props) {
|
|
17
|
+
const { children, className, testId = 'card' } = props;
|
|
18
|
+
return (_jsx("div", { ref: fitCardToFrame, className: joinClassNames('card', className), "data-testid": testId, children: children }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=CardFrame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardFrame.js","sourceRoot":"","sources":["../../../src/card/ui/CardFrame.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAkBrD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;IACvD,OAAO,CACL,cACE,GAAG,EAAE,cAAc,EACnB,SAAS,EAAE,cAAc,CAAC,MAAM,EAAE,SAAS,CAAC,iBAC/B,MAAM,YAElB,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
/** What {@link CopyTableButton} copies. */
|
|
3
|
+
export interface CopyTableButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Writes the table, tab-separated and header first, when the button is
|
|
6
|
+
* pressed: a card holding a long table writes nothing until it is asked.
|
|
7
|
+
*/
|
|
8
|
+
table: () => string;
|
|
9
|
+
/**
|
|
10
|
+
* What the tooltip says the button copies, e.g. `Copy the conformers as a
|
|
11
|
+
* table, to paste into a spreadsheet`.
|
|
12
|
+
* @default the chrome's own line, `Copy the table, to paste into a
|
|
13
|
+
* spreadsheet`
|
|
14
|
+
*/
|
|
15
|
+
tooltip?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Show the glyph alone, which is what a heading of a few letters has room
|
|
18
|
+
* for. The label is still the button's accessible name.
|
|
19
|
+
* @default false - the label shows, and gives way to the glyph on a frame
|
|
20
|
+
* narrower than 30rem
|
|
21
|
+
*/
|
|
22
|
+
glyphOnly?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Value of the `data-testid` attribute of the button's box.
|
|
25
|
+
* @default 'card-copy-table'
|
|
26
|
+
*/
|
|
27
|
+
testId?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A card's "Copy as table" action: the table, tab-separated and header first,
|
|
31
|
+
* which a spreadsheet pastes into its cells. A tick says the clipboard took
|
|
32
|
+
* it, a cross that the browser refused. It never prints.
|
|
33
|
+
* @param props - See {@link CopyTableButtonProps}.
|
|
34
|
+
* @returns The button, with the tooltip saying what it copies.
|
|
35
|
+
*/
|
|
36
|
+
export declare function CopyTableButton(props: CopyTableButtonProps): ReactElement;
|
|
37
|
+
//# sourceMappingURL=CopyTableButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyTableButton.d.ts","sourceRoot":"","sources":["../../../src/card/ui/CopyTableButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAY1C,2CAA2C;AAC3C,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,EAAE,MAAM,MAAM,CAAC;IACpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAgCzE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from '@blueprintjs/core';
|
|
3
|
+
import { CopyButton } from "../../clipboard/ui/CopyButton.js";
|
|
4
|
+
import { useChromeT } from "../../i18n/ui/useT.js";
|
|
5
|
+
import { joinClassNames } from "../../shared/ui/joinClassNames.js";
|
|
6
|
+
import { CARD_TOOLTIP_CLASS, CARD_TOOLTIP_DELAY, CARD_TOOLTIP_MODIFIERS, } from "./cardTooltip.js";
|
|
7
|
+
/**
|
|
8
|
+
* A card's "Copy as table" action: the table, tab-separated and header first,
|
|
9
|
+
* which a spreadsheet pastes into its cells. A tick says the clipboard took
|
|
10
|
+
* it, a cross that the browser refused. It never prints.
|
|
11
|
+
* @param props - See {@link CopyTableButtonProps}.
|
|
12
|
+
* @returns The button, with the tooltip saying what it copies.
|
|
13
|
+
*/
|
|
14
|
+
export function CopyTableButton(props) {
|
|
15
|
+
const { table, tooltip, glyphOnly = false, testId = 'card-copy-table', } = props;
|
|
16
|
+
const t = useChromeT();
|
|
17
|
+
return (_jsx(Tooltip, { content: tooltip ?? t('card.copyTableTitle'), placement: "top-end", modifiers: CARD_TOOLTIP_MODIFIERS, popoverClassName: CARD_TOOLTIP_CLASS, hoverOpenDelay: CARD_TOOLTIP_DELAY, children: _jsx("span", { "data-testid": testId, children: _jsx(CopyButton, { content: table, label: t('card.copyTable'), title: "", icon: "th", minimal: true, small: true, className: joinClassNames('card__copy-table', glyphOnly && 'card__copy-table--glyph') }) }) }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=CopyTableButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyTableButton.js","sourceRoot":"","sources":["../../../src/card/ui/CopyTableButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAmC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AA8B1B;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EACJ,KAAK,EACL,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,MAAM,GAAG,iBAAiB,GAC3B,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IACvB,OAAO,CACL,KAAC,OAAO,IACN,OAAO,EAAE,OAAO,IAAI,CAAC,CAAC,qBAAqB,CAAC,EAC5C,SAAS,EAAC,SAAS,EACnB,SAAS,EAAE,sBAAsB,EACjC,gBAAgB,EAAE,kBAAkB,EACpC,cAAc,EAAE,kBAAkB,YAElC,8BAAmB,MAAM,YACvB,KAAC,UAAU,IACT,OAAO,EAAE,KAAK,EACd,KAAK,EAAE,CAAC,CAAC,gBAAgB,CAAC,EAC1B,KAAK,EAAC,EAAE,EACR,IAAI,EAAC,IAAI,EACT,OAAO,QACP,KAAK,QACL,SAAS,EAAE,cAAc,CACvB,kBAAkB,EAClB,SAAS,IAAI,yBAAyB,CACvC,GACD,GACG,GACC,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PopoverProps } from '@blueprintjs/core';
|
|
2
|
+
/**
|
|
3
|
+
* The family's help card, at the width of the few words a card's action
|
|
4
|
+
* says: `styles/card.css` lets `card-tooltip` shrink to its text.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CARD_TOOLTIP_CLASS = "help-tooltip card-tooltip";
|
|
7
|
+
/**
|
|
8
|
+
* Where a card's tooltip goes when the frame has no room above its control:
|
|
9
|
+
* beside it, rather than cut by the frame's edge.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CARD_TOOLTIP_MODIFIERS: PopoverProps['modifiers'];
|
|
12
|
+
/** How long the pointer rests on an action of a card before it is named. */
|
|
13
|
+
export declare const CARD_TOOLTIP_DELAY = 300;
|
|
14
|
+
//# sourceMappingURL=cardTooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardTooltip.d.ts","sourceRoot":"","sources":["../../../src/card/ui/cardTooltip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,WAAW,CAE5D,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,MAAM,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The family's help card, at the width of the few words a card's action
|
|
3
|
+
* says: `styles/card.css` lets `card-tooltip` shrink to its text.
|
|
4
|
+
*/
|
|
5
|
+
export const CARD_TOOLTIP_CLASS = 'help-tooltip card-tooltip';
|
|
6
|
+
/**
|
|
7
|
+
* Where a card's tooltip goes when the frame has no room above its control:
|
|
8
|
+
* beside it, rather than cut by the frame's edge.
|
|
9
|
+
*/
|
|
10
|
+
export const CARD_TOOLTIP_MODIFIERS = {
|
|
11
|
+
flip: { options: { fallbackPlacements: ['left'] } },
|
|
12
|
+
};
|
|
13
|
+
/** How long the pointer rests on an action of a card before it is named. */
|
|
14
|
+
export const CARD_TOOLTIP_DELAY = 300;
|
|
15
|
+
//# sourceMappingURL=cardTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cardTooltip.js","sourceRoot":"","sources":["../../../src/card/ui/cardTooltip.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAA8B;IAC/D,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,kBAAkB,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;CACpD,CAAC;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type * as Embed from 'cheminfo-mcp-server/embed';
|
|
2
|
+
/**
|
|
3
|
+
* Load `cheminfo-mcp-server/embed` once, on first use. It is an optional
|
|
4
|
+
* peer, so `react-cheminfo/card` must import without it; a site that lacks it
|
|
5
|
+
* gets a card that never talks to a frame.
|
|
6
|
+
* @returns The module, once loaded.
|
|
7
|
+
*/
|
|
8
|
+
export declare function loadEmbed(): Promise<typeof Embed>;
|
|
9
|
+
/**
|
|
10
|
+
* The module {@link loadEmbed} loaded, read synchronously — a click must open
|
|
11
|
+
* its page in the same task, or the browser blocks the new tab.
|
|
12
|
+
* @returns The module, or undefined while it is still loading.
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadedEmbed(): typeof Embed | undefined;
|
|
15
|
+
//# sourceMappingURL=embed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../../src/card/ui/embed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,2BAA2B,CAAC;AAKxD;;;;;GAKG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAAC,OAAO,KAAK,CAAC,CAMjD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,OAAO,KAAK,GAAG,SAAS,CAEtD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
let loading;
|
|
2
|
+
let loaded;
|
|
3
|
+
/**
|
|
4
|
+
* Load `cheminfo-mcp-server/embed` once, on first use. It is an optional
|
|
5
|
+
* peer, so `react-cheminfo/card` must import without it; a site that lacks it
|
|
6
|
+
* gets a card that never talks to a frame.
|
|
7
|
+
* @returns The module, once loaded.
|
|
8
|
+
*/
|
|
9
|
+
export function loadEmbed() {
|
|
10
|
+
loading ??= import('cheminfo-mcp-server/embed').then((module) => {
|
|
11
|
+
loaded = module;
|
|
12
|
+
return module;
|
|
13
|
+
});
|
|
14
|
+
return loading;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The module {@link loadEmbed} loaded, read synchronously — a click must open
|
|
18
|
+
* its page in the same task, or the browser blocks the new tab.
|
|
19
|
+
* @returns The module, or undefined while it is still loading.
|
|
20
|
+
*/
|
|
21
|
+
export function loadedEmbed() {
|
|
22
|
+
return loaded;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=embed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed.js","sourceRoot":"","sources":["../../../src/card/ui/embed.ts"],"names":[],"mappings":"AAEA,IAAI,OAA0C,CAAC;AAC/C,IAAI,MAAgC,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,KAAK,MAAM,CAAC,2BAA2B,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QAC9D,MAAM,GAAG,MAAM,CAAC;QAChB,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Fit the frame a chat shows a card in to the card: report the card's height
|
|
4
|
+
* to the view framing it, now and on every change, so nothing scrolls twice,
|
|
5
|
+
* and grow the card while a panel it opened is open, so the frame holds the
|
|
6
|
+
* panel too. A card opened on its own is the page: there is no frame to tell
|
|
7
|
+
* and none to grow, and nothing is done.
|
|
8
|
+
*
|
|
9
|
+
* Its shape is a React 19 ref callback's — `ref={fitCardToFrame}` — so it
|
|
10
|
+
* starts once the card is mounted and stops when it is removed. The first
|
|
11
|
+
* card waits for `cheminfo-mcp-server/embed` to load; a site without it gets
|
|
12
|
+
* a card that never reports.
|
|
13
|
+
* @param card - The element holding the whole card; none reports nothing.
|
|
14
|
+
* @returns A function that stops both, or undefined when nothing started.
|
|
15
|
+
*/
|
|
16
|
+
export declare function fitCardToFrame(card: HTMLElement | null): (() => void) | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* {@link fitCardToFrame} for a card held in a ref, from its first render to
|
|
19
|
+
* its last.
|
|
20
|
+
* @param card - The ref of the element holding the whole card.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useFitCardToFrame(card: RefObject<HTMLElement | null>): void;
|
|
23
|
+
/**
|
|
24
|
+
* Keep a card at least as tall as the dialogs and popovers opened over it,
|
|
25
|
+
* framed or not: {@link holdRoomForPanels} for a card held in a ref. A card
|
|
26
|
+
* whose height is reported elsewhere uses this; one that only needs its frame
|
|
27
|
+
* fitted uses {@link useFitCardToFrame}, which does both.
|
|
28
|
+
* @param card - The ref of the element holding the whole card.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useOverlayRoom(card: RefObject<HTMLElement | null>): void;
|
|
31
|
+
//# sourceMappingURL=fitCardToFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fitCardToFrame.d.ts","sourceRoot":"","sources":["../../../src/card/ui/fitCardToFrame.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,WAAW,GAAG,IAAI,GACvB,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAgB1B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CAE3E;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CAKxE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { loadEmbed, loadedEmbed } from "./embed.js";
|
|
3
|
+
import { holdRoomForPanels } from "./holdRoomForPanels.js";
|
|
4
|
+
/**
|
|
5
|
+
* Fit the frame a chat shows a card in to the card: report the card's height
|
|
6
|
+
* to the view framing it, now and on every change, so nothing scrolls twice,
|
|
7
|
+
* and grow the card while a panel it opened is open, so the frame holds the
|
|
8
|
+
* panel too. A card opened on its own is the page: there is no frame to tell
|
|
9
|
+
* and none to grow, and nothing is done.
|
|
10
|
+
*
|
|
11
|
+
* Its shape is a React 19 ref callback's — `ref={fitCardToFrame}` — so it
|
|
12
|
+
* starts once the card is mounted and stops when it is removed. The first
|
|
13
|
+
* card waits for `cheminfo-mcp-server/embed` to load; a site without it gets
|
|
14
|
+
* a card that never reports.
|
|
15
|
+
* @param card - The element holding the whole card; none reports nothing.
|
|
16
|
+
* @returns A function that stops both, or undefined when nothing started.
|
|
17
|
+
*/
|
|
18
|
+
export function fitCardToFrame(card) {
|
|
19
|
+
if (card === null)
|
|
20
|
+
return undefined;
|
|
21
|
+
const embed = loadedEmbed();
|
|
22
|
+
if (embed !== undefined)
|
|
23
|
+
return fitLoaded(embed, card);
|
|
24
|
+
let stop;
|
|
25
|
+
let stopped = false;
|
|
26
|
+
loadEmbed().then((module) => {
|
|
27
|
+
if (!stopped)
|
|
28
|
+
stop = fitLoaded(module, card);
|
|
29
|
+
}, () => undefined);
|
|
30
|
+
return () => {
|
|
31
|
+
stopped = true;
|
|
32
|
+
stop?.();
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* {@link fitCardToFrame} for a card held in a ref, from its first render to
|
|
37
|
+
* its last.
|
|
38
|
+
* @param card - The ref of the element holding the whole card.
|
|
39
|
+
*/
|
|
40
|
+
export function useFitCardToFrame(card) {
|
|
41
|
+
useEffect(() => fitCardToFrame(card.current), [card]);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Keep a card at least as tall as the dialogs and popovers opened over it,
|
|
45
|
+
* framed or not: {@link holdRoomForPanels} for a card held in a ref. A card
|
|
46
|
+
* whose height is reported elsewhere uses this; one that only needs its frame
|
|
47
|
+
* fitted uses {@link useFitCardToFrame}, which does both.
|
|
48
|
+
* @param card - The ref of the element holding the whole card.
|
|
49
|
+
*/
|
|
50
|
+
export function useOverlayRoom(card) {
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
const element = card.current;
|
|
53
|
+
return element === null ? undefined : holdRoomForPanels(element);
|
|
54
|
+
}, [card]);
|
|
55
|
+
}
|
|
56
|
+
function fitLoaded(embed, card) {
|
|
57
|
+
if (!embed.isFramed())
|
|
58
|
+
return undefined;
|
|
59
|
+
const stopRoom = holdRoomForPanels(card);
|
|
60
|
+
const stopReport = embed.reportEmbedHeight(card);
|
|
61
|
+
return () => {
|
|
62
|
+
stopReport();
|
|
63
|
+
stopRoom();
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=fitCardToFrame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fitCardToFrame.js","sourceRoot":"","sources":["../../../src/card/ui/fitCardToFrame.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc,CAC5B,IAAwB;IAExB,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACpC,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACvD,IAAI,IAA8B,CAAC;IACnC,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,SAAS,EAAE,CAAC,IAAI,CACd,CAAC,MAAM,EAAE,EAAE;QACT,IAAI,CAAC,OAAO;YAAE,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC,EACD,GAAG,EAAE,CAAC,SAAS,CAChB,CAAC;IACF,OAAO,GAAG,EAAE;QACV,OAAO,GAAG,IAAI,CAAC;QACf,IAAI,EAAE,EAAE,CAAC;IACX,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAmC;IACnE,SAAS,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,IAAmC;IAChE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,OAAO,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACnE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AACb,CAAC;AAED,SAAS,SAAS,CAChB,KAAmB,EACnB,IAAiB;IAEjB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;QAAE,OAAO,SAAS,CAAC;IACxC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO,GAAG,EAAE;QACV,UAAU,EAAE,CAAC;QACb,QAAQ,EAAE,CAAC;IACb,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep a card as tall as the dialogs and popovers open over it need, until
|
|
3
|
+
* the returned function is called; the card gives the height back as each
|
|
4
|
+
* closes. A chat frames a card exactly as tall as the card reports, so a
|
|
5
|
+
* panel taller than the card would otherwise be cut at the frame's edge.
|
|
6
|
+
*
|
|
7
|
+
* The room is measured once per animation frame, whenever the document
|
|
8
|
+
* changes — a panel opening, closing or moving changes the tree or a class —
|
|
9
|
+
* and whenever an open panel changes size, which one whose content arrives
|
|
10
|
+
* after it opens does without touching the tree. A card whose view fills the
|
|
11
|
+
* screen holds no room: its frame is not what is on screen then.
|
|
12
|
+
* @param card - The element whose height the frame follows.
|
|
13
|
+
* @returns A function that stops watching and gives the card its height back.
|
|
14
|
+
*/
|
|
15
|
+
export declare function holdRoomForPanels(card: HTMLElement): () => void;
|
|
16
|
+
//# sourceMappingURL=holdRoomForPanels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"holdRoomForPanels.d.ts","sourceRoot":"","sources":["../../../src/card/ui/holdRoomForPanels.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,IAAI,CAuC/D"}
|