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,64 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { AttemptStore } from '../core/attempts.ts';
|
|
3
|
+
import type { Answers, SeriesTool } from '../core/series.ts';
|
|
4
|
+
/** What a tool's own answer input is handed. */
|
|
5
|
+
export interface AnswerInputProps<Question> {
|
|
6
|
+
/** The question being answered. */
|
|
7
|
+
question: Question;
|
|
8
|
+
/** What is typed so far, field by field. */
|
|
9
|
+
answers: Answers;
|
|
10
|
+
/** Change one field. */
|
|
11
|
+
onChange: (key: string, value: string) => void;
|
|
12
|
+
/** Check the answer, as Enter does in a box. */
|
|
13
|
+
onSubmit: () => void;
|
|
14
|
+
}
|
|
15
|
+
/** How one tool draws the parts of a question the card does not know. */
|
|
16
|
+
export interface QuestionRendering<Question> {
|
|
17
|
+
/** The statement of the question. */
|
|
18
|
+
prompt: (question: Question) => ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* An input of the tool's own — a drawing canvas, a reaction to balance — in
|
|
21
|
+
* place of the typed boxes.
|
|
22
|
+
* @default undefined — one box per field of the tool
|
|
23
|
+
*/
|
|
24
|
+
answer?: (props: AnswerInputProps<Question>) => ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* What the solution shows beyond its text, such as a drawn structure.
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
solution?: (question: Question) => ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/** What {@link QuestionCard} needs. */
|
|
32
|
+
export interface QuestionCardProps<Question> extends QuestionRendering<Question> {
|
|
33
|
+
/** The tool the question belongs to. */
|
|
34
|
+
tool: SeriesTool<Question>;
|
|
35
|
+
/** The question on the card. */
|
|
36
|
+
question: Question;
|
|
37
|
+
/** Where the attempts are kept. */
|
|
38
|
+
store: AttemptStore;
|
|
39
|
+
/** The key this question's attempt is kept under, from `attemptKey`. */
|
|
40
|
+
storageKey: string;
|
|
41
|
+
/** Its position in the series, counted from 1. */
|
|
42
|
+
number: number;
|
|
43
|
+
/** How many questions the series holds. */
|
|
44
|
+
total: number;
|
|
45
|
+
/**
|
|
46
|
+
* Open the next question; left out on the last one.
|
|
47
|
+
* @default undefined
|
|
48
|
+
*/
|
|
49
|
+
onNext?: () => void;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* One question: its statement, the answer, the four actions, and — once
|
|
53
|
+
* checked — the verdict case by case, the hints taken and the solution.
|
|
54
|
+
*
|
|
55
|
+
* The answer is graded on every change, but the verdict is shown only for the
|
|
56
|
+
* answer as it was checked: a numeric answer that turned green as it was typed
|
|
57
|
+
* could be found by trying numbers. A link that hides the `solutions` part
|
|
58
|
+
* takes the solution button away.
|
|
59
|
+
* @param props - The tool, the question, where its attempt is kept, and how to
|
|
60
|
+
* draw it.
|
|
61
|
+
* @returns The card.
|
|
62
|
+
*/
|
|
63
|
+
export declare function QuestionCard<Question>(props: QuestionCardProps<Question>): ReactElement;
|
|
64
|
+
//# sourceMappingURL=QuestionCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuestionCard.d.ts","sourceRoot":"","sources":["../../../src/pedagogy/ui/QuestionCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,OAAO,EAAa,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAUxE,gDAAgD;AAChD,MAAM,WAAW,gBAAgB,CAAC,QAAQ;IACxC,mCAAmC;IACnC,QAAQ,EAAE,QAAQ,CAAC;IACnB,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,wBAAwB;IACxB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,gDAAgD;IAChD,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,yEAAyE;AACzE,MAAM,WAAW,iBAAiB,CAAC,QAAQ;IACzC,qCAAqC;IACrC,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,SAAS,CAAC;IAC1C;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,QAAQ,CAAC,KAAK,SAAS,CAAC;IAC1D;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,SAAS,CAAC;CAC9C;AAED,uCAAuC;AACvC,MAAM,WAAW,iBAAiB,CAChC,QAAQ,CACR,SAAQ,iBAAiB,CAAC,QAAQ,CAAC;IACnC,wCAAwC;IACxC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC3B,gCAAgC;IAChC,QAAQ,EAAE,QAAQ,CAAC;IACnB,mCAAmC;IACnC,KAAK,EAAE,YAAY,CAAC;IACpB,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EACnC,KAAK,EAAE,iBAAiB,CAAC,QAAQ,CAAC,GACjC,YAAY,CA2Id"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Callout, Tag } from '@blueprintjs/core';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { useChromeT } from "../../i18n/ui/useT.js";
|
|
5
|
+
import { useIsHidden } from "../../share/ui/hiddenParts.js";
|
|
6
|
+
import { emptyAttempt } from "../core/attempts.js";
|
|
7
|
+
import { AnswerFields } from "./AnswerFields.js";
|
|
8
|
+
import { ExerciseActions } from "./ExerciseActions.js";
|
|
9
|
+
import { GlossaryText } from "./GlossaryText.js";
|
|
10
|
+
import { HintLadder } from "./HintLadder.js";
|
|
11
|
+
import { TestCaseList } from "./TestCaseList.js";
|
|
12
|
+
import { LEVEL_INTENT } from "./exerciseMeta.js";
|
|
13
|
+
import { useAttemptRecords } from "./useAttemptRecords.js";
|
|
14
|
+
/**
|
|
15
|
+
* One question: its statement, the answer, the four actions, and — once
|
|
16
|
+
* checked — the verdict case by case, the hints taken and the solution.
|
|
17
|
+
*
|
|
18
|
+
* The answer is graded on every change, but the verdict is shown only for the
|
|
19
|
+
* answer as it was checked: a numeric answer that turned green as it was typed
|
|
20
|
+
* could be found by trying numbers. A link that hides the `solutions` part
|
|
21
|
+
* takes the solution button away.
|
|
22
|
+
* @param props - The tool, the question, where its attempt is kept, and how to
|
|
23
|
+
* draw it.
|
|
24
|
+
* @returns The card.
|
|
25
|
+
*/
|
|
26
|
+
export function QuestionCard(props) {
|
|
27
|
+
const { tool, question, store, storageKey, number, total, onNext, prompt, answer, solution, } = props;
|
|
28
|
+
const t = useChromeT();
|
|
29
|
+
const isHidden = useIsHidden();
|
|
30
|
+
const records = useAttemptRecords(store);
|
|
31
|
+
const { answers, checked: checkedAnswers, hintsRevealed, showSolution, } = records[storageKey] ?? emptyAttempt();
|
|
32
|
+
const check = useMemo(() => tool.grade(question, answers), [tool, question, answers]);
|
|
33
|
+
const hints = useMemo(() => tool.hints(question), [tool, question]);
|
|
34
|
+
const snapshot = JSON.stringify(answers);
|
|
35
|
+
const checked = checkedAnswers === snapshot;
|
|
36
|
+
const solutionsHidden = isHidden('solutions');
|
|
37
|
+
const level = tool.level?.(question);
|
|
38
|
+
function setAnswer(key, value) {
|
|
39
|
+
store.updateAttempt(storageKey, { answers: { ...answers, [key]: value } });
|
|
40
|
+
}
|
|
41
|
+
function commit() {
|
|
42
|
+
store.updateAttempt(storageKey, {
|
|
43
|
+
status: check.passed ? 'solved' : 'attempted',
|
|
44
|
+
checked: snapshot,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return (_jsxs("article", { className: "series-question", "aria-label": t('pedagogy.questionNumber', { number }), children: [_jsxs("div", { className: "series-question__meta", children: [_jsx("span", { children: t('pedagogy.questionOf', { number, total }) }), level === undefined ? null : (_jsx(Tag, { minimal: true, intent: LEVEL_INTENT[level], children: level }))] }), _jsx("div", { className: "series-question__prompt", children: prompt(question) }), answer ? (answer({ question, answers, onChange: setAnswer, onSubmit: commit })) : (_jsx(AnswerFields, { fields: tool.fields(question), answers: answers, onChange: setAnswer, onSubmit: commit })), _jsx(ExerciseActions, { onCheck: commit, checkDisabled: isBlank(answers), onRevealHint: () => {
|
|
48
|
+
store.updateAttempt(storageKey, {
|
|
49
|
+
hintsRevealed: Math.min(hintsRevealed + 1, hints.length),
|
|
50
|
+
});
|
|
51
|
+
}, hintsRevealed: hintsRevealed, hintCount: hints.length, onToggleSolution: solutionsHidden
|
|
52
|
+
? undefined
|
|
53
|
+
: () => {
|
|
54
|
+
store.updateAttempt(storageKey, {
|
|
55
|
+
showSolution: !showSolution,
|
|
56
|
+
});
|
|
57
|
+
}, showSolution: showSolution, onReset: () => {
|
|
58
|
+
store.updateAttempt(storageKey, emptyAttempt());
|
|
59
|
+
} }), checked ? (_jsx(TestCaseList, { results: check.cases, label: (verdict) => verdict.label })) : null, checked && check.passed ? (_jsxs(Callout, { intent: "success", icon: "tick-circle", title: t('pedagogy.solved'), children: [hintsRevealed > 0
|
|
60
|
+
? t('pedagogy.solvedWithHintsOf', {
|
|
61
|
+
revealed: hintsRevealed,
|
|
62
|
+
total: hints.length,
|
|
63
|
+
})
|
|
64
|
+
: t('pedagogy.solvedWithoutHint'), onNext ? (_jsx(Button, { className: "series-question__next", intent: "success", endIcon: "arrow-right", text: t('pedagogy.nextQuestion'), onClick: onNext })) : null] })) : null, hintsRevealed > 0 ? (_jsx(HintLadder, { hints: hints, revealed: hintsRevealed })) : null, showSolution && !solutionsHidden ? (_jsxs(Callout, { intent: "warning", icon: "key", title: t('pedagogy.solution'), children: [_jsx("p", { className: "series-question__solution", children: _jsx(GlossaryText, { text: tool.solution(question) }) }), solution?.(question)] })) : null] }));
|
|
65
|
+
}
|
|
66
|
+
function isBlank(answers) {
|
|
67
|
+
for (const value of Object.values(answers)) {
|
|
68
|
+
if (value.trim() !== '')
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=QuestionCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuestionCard.js","sourceRoot":"","sources":["../../../src/pedagogy/ui/QuestionCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAsD3D;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAkC;IAElC,MAAM,EACJ,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,UAAU,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IACvB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,iBAAiB,CAAC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AAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAI,GAC7C,EACH,QAAQ,EAAE,CAAC,QAAQ,CAAC,IACb,CACX,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,OAAgB;IAC/B,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3C,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;YAAE,OAAO,KAAK,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -32,4 +32,14 @@ export type { TutorialStepStripProps, TutorialStripStep, } from './TutorialStepS
|
|
|
32
32
|
export { TutorialStepStrip } from './TutorialStepStrip.tsx';
|
|
33
33
|
export type { TutorialLevelColours } from './tutorialLevels.ts';
|
|
34
34
|
export { TUTORIAL_LEVEL_COLOURS } from './tutorialLevels.ts';
|
|
35
|
+
export type { AnswerFieldsProps } from './AnswerFields.tsx';
|
|
36
|
+
export { AnswerFields } from './AnswerFields.tsx';
|
|
37
|
+
export type { ExerciseListEntry, ExerciseListProgress, ExerciseListProps, } from './ExerciseList.tsx';
|
|
38
|
+
export { ExerciseList } from './ExerciseList.tsx';
|
|
39
|
+
export type { ExerciseSeriesProps } from './ExerciseSeries.tsx';
|
|
40
|
+
export { ExerciseSeries } from './ExerciseSeries.tsx';
|
|
41
|
+
export type { AnswerInputProps, QuestionCardProps, QuestionRendering, } from './QuestionCard.tsx';
|
|
42
|
+
export { QuestionCard } from './QuestionCard.tsx';
|
|
43
|
+
export { SERIES_COUNTS } from './seriesCounts.ts';
|
|
44
|
+
export { useAttemptRecords } from './useAttemptRecords.ts';
|
|
35
45
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pedagogy/ui/index.ts"],"names":[],"mappings":"AAAA,YAA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AsB,EACtB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/lib/pedagogy/ui/index.js
CHANGED
|
@@ -15,4 +15,10 @@ export { SyntaxTooltip } from "./SyntaxTooltip.js";
|
|
|
15
15
|
export { TestCaseList } from "./TestCaseList.js";
|
|
16
16
|
export { TutorialStepStrip } from "./TutorialStepStrip.js";
|
|
17
17
|
export { TUTORIAL_LEVEL_COLOURS } from "./tutorialLevels.js";
|
|
18
|
+
export { AnswerFields } from "./AnswerFields.js";
|
|
19
|
+
export { ExerciseList } from "./ExerciseList.js";
|
|
20
|
+
export { ExerciseSeries } from "./ExerciseSeries.js";
|
|
21
|
+
export { QuestionCard } from "./QuestionCard.js";
|
|
22
|
+
export { SERIES_COUNTS } from "./seriesCounts.js";
|
|
23
|
+
export { useAttemptRecords } from "./useAttemptRecords.js";
|
|
18
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pedagogy/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA8B,CAAC;AAKtE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mBAAoB,CAAC;AAC1E,OAAO,EACL,YAAY,EACZ,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAA0B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAwB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAMpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA6B,CAAC;AAMpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAC;AAKlD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAyB,CAAC;AAE5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pedagogy/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAA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
1
|
+
import type { ChromeKey } from '../../i18n/core/chromeCatalog.ts';
|
|
2
|
+
import type { Translate } from '../../i18n/core/translate.ts';
|
|
3
|
+
/** The series lengths offered when a page names none. */
|
|
4
|
+
export declare const SERIES_COUNTS: readonly number[];
|
|
5
|
+
/**
|
|
6
|
+
* The series lengths a pool can fill, and the whole pool last, so a pool
|
|
7
|
+
* smaller than the longest length is offered whole rather than overpromised.
|
|
8
|
+
* @param poolSize - How many questions the pool holds.
|
|
9
|
+
* @param counts - The lengths offered, or the family's when none.
|
|
10
|
+
* @param t - The chrome's formatter.
|
|
11
|
+
* @returns The options of the picker.
|
|
12
|
+
*/
|
|
13
|
+
export declare function seriesCountOptions(poolSize: number, counts: readonly number[] | undefined, t: Translate<ChromeKey>): Array<{
|
|
14
|
+
value: number;
|
|
15
|
+
label: string;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=seriesCounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seriesCounts.d.ts","sourceRoot":"","sources":["../../../src/pedagogy/ui/seriesCounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,yDAAyD;AACzD,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAAoB,CAAC;AAEhE;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EACrC,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GACtB,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAezC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** The series lengths offered when a page names none. */
|
|
2
|
+
export const SERIES_COUNTS = [5, 10, 15, 20];
|
|
3
|
+
/**
|
|
4
|
+
* The series lengths a pool can fill, and the whole pool last, so a pool
|
|
5
|
+
* smaller than the longest length is offered whole rather than overpromised.
|
|
6
|
+
* @param poolSize - How many questions the pool holds.
|
|
7
|
+
* @param counts - The lengths offered, or the family's when none.
|
|
8
|
+
* @param t - The chrome's formatter.
|
|
9
|
+
* @returns The options of the picker.
|
|
10
|
+
*/
|
|
11
|
+
export function seriesCountOptions(poolSize, counts, t) {
|
|
12
|
+
const options = [];
|
|
13
|
+
for (const count of counts ?? SERIES_COUNTS) {
|
|
14
|
+
if (count < poolSize) {
|
|
15
|
+
options.push({
|
|
16
|
+
value: count,
|
|
17
|
+
label: t('pedagogy.questionCount', { count }),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
options.push({
|
|
22
|
+
value: poolSize,
|
|
23
|
+
label: t('pedagogy.allQuestions', { count: poolSize }),
|
|
24
|
+
});
|
|
25
|
+
return options;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=seriesCounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seriesCounts.js","sourceRoot":"","sources":["../../../src/pedagogy/ui/seriesCounts.ts"],"names":[],"mappings":"AAGA,yDAAyD;AACzD,MAAM,CAAC,MAAM,aAAa,GAAsB,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,QAAgB,EAChB,MAAqC,EACrC,CAAuB;IAEvB,MAAM,OAAO,GAA4C,EAAE,CAAC;IAC5D,KAAK,MAAM,KAAK,IAAI,MAAM,IAAI,aAAa,EAAE,CAAC;QAC5C,IAAI,KAAK,GAAG,QAAQ,EAAE,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,CAAC,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,CAAC;aAC9C,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,CAAC,IAAI,CAAC;QACX,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,CAAC,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;KACvD,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two pieces of `ExerciseSeries` that are only layout: the heading row
|
|
3
|
+
* with the length picker and the new-series button, and the numbered list of
|
|
4
|
+
* questions.
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactElement, ReactNode, RefObject } from 'react';
|
|
7
|
+
import type { Attempt } from '../core/attempts.ts';
|
|
8
|
+
import type { ProgressRecords } from '../core/progress.ts';
|
|
9
|
+
/** What {@link SeriesHead} needs. */
|
|
10
|
+
export interface SeriesHeadProps {
|
|
11
|
+
/** The heading, or the chrome's word for it. */
|
|
12
|
+
title: ReactNode | undefined;
|
|
13
|
+
/** Id of the heading. */
|
|
14
|
+
headingId: string;
|
|
15
|
+
/** The length on screen. */
|
|
16
|
+
count: number;
|
|
17
|
+
/** The largest length the tool serves. */
|
|
18
|
+
poolSize: number;
|
|
19
|
+
/** The lengths offered beside the whole pool. */
|
|
20
|
+
counts: readonly number[] | undefined;
|
|
21
|
+
/** Change the length. */
|
|
22
|
+
onCount: (count: number) => void;
|
|
23
|
+
/** Draw another series. */
|
|
24
|
+
onNewSeries: () => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The heading row of a series.
|
|
28
|
+
* @param props - See {@link SeriesHeadProps}.
|
|
29
|
+
* @returns The row.
|
|
30
|
+
*/
|
|
31
|
+
export declare function SeriesHead(props: SeriesHeadProps): ReactElement;
|
|
32
|
+
/** What {@link SeriesQuestionList} needs. */
|
|
33
|
+
export interface SeriesQuestionListProps<Question> {
|
|
34
|
+
/** The questions of the series, in order. */
|
|
35
|
+
series: readonly Question[];
|
|
36
|
+
/** The attempt key of each, in the same order. */
|
|
37
|
+
keys: readonly string[];
|
|
38
|
+
/** Every attempt kept. */
|
|
39
|
+
records: ProgressRecords<Attempt>;
|
|
40
|
+
/** The open one. */
|
|
41
|
+
index: number;
|
|
42
|
+
/** Open one. */
|
|
43
|
+
onOpen: (index: number) => void;
|
|
44
|
+
/** How a question is named. */
|
|
45
|
+
label: (question: Question) => ReactNode;
|
|
46
|
+
/** The ref the arrow keys scroll inside. */
|
|
47
|
+
listRef: RefObject<HTMLElement | null>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The numbered list of a series, each question with its status.
|
|
51
|
+
* @param props - See {@link SeriesQuestionListProps}.
|
|
52
|
+
* @returns The list.
|
|
53
|
+
*/
|
|
54
|
+
export declare function SeriesQuestionList<Question>(props: SeriesQuestionListProps<Question>): ReactElement;
|
|
55
|
+
//# sourceMappingURL=seriesParts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seriesParts.d.ts","sourceRoot":"","sources":["../../../src/pedagogy/ui/seriesParts.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,qCAAqC;AACrC,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACtC,yBAAyB;IACzB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,2BAA2B;IAC3B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CA2B/D;AAED,6CAA6C;AAC7C,MAAM,WAAW,uBAAuB,CAAC,QAAQ;IAC/C,6CAA6C;IAC7C,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC5B,kDAAkD;IAClD,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,0BAA0B;IAC1B,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAClC,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,+BAA+B;IAC/B,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,SAAS,CAAC;IACzC,4CAA4C;IAC5C,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EACzC,KAAK,EAAE,uBAAuB,CAAC,QAAQ,CAAC,GACvC,YAAY,CAiCd"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The two pieces of `ExerciseSeries` that are only layout: the heading row
|
|
4
|
+
* with the length picker and the new-series button, and the numbered list of
|
|
5
|
+
* questions.
|
|
6
|
+
*/
|
|
7
|
+
import { Button, HTMLSelect } from '@blueprintjs/core';
|
|
8
|
+
import { useChromeT } from "../../i18n/ui/useT.js";
|
|
9
|
+
import { ExerciseStatusIcon } from "./ExerciseTags.js";
|
|
10
|
+
import { seriesCountOptions } from "./seriesCounts.js";
|
|
11
|
+
/**
|
|
12
|
+
* The heading row of a series.
|
|
13
|
+
* @param props - See {@link SeriesHeadProps}.
|
|
14
|
+
* @returns The row.
|
|
15
|
+
*/
|
|
16
|
+
export function SeriesHead(props) {
|
|
17
|
+
const { title, headingId, count, poolSize, counts, onCount, onNewSeries } = props;
|
|
18
|
+
const t = useChromeT();
|
|
19
|
+
return (_jsxs("div", { className: "exercise-series__head", children: [_jsx("h2", { className: "exercise-series__title", id: headingId, children: title ?? t('pedagogy.questions') }), _jsxs("div", { className: "exercise-series__controls", children: [_jsx(HTMLSelect, { "aria-label": t('pedagogy.questionsInSeries'), value: count, onChange: (event) => {
|
|
20
|
+
onCount(Number(event.currentTarget.value));
|
|
21
|
+
}, options: seriesCountOptions(poolSize, counts, t) }), _jsx(Button, { icon: "refresh", text: t('pedagogy.newSeries'), title: t('pedagogy.newSeriesTitle'), onClick: onNewSeries })] })] }));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The numbered list of a series, each question with its status.
|
|
25
|
+
* @param props - See {@link SeriesQuestionListProps}.
|
|
26
|
+
* @returns The list.
|
|
27
|
+
*/
|
|
28
|
+
export function SeriesQuestionList(props) {
|
|
29
|
+
const { series, keys, records, index, onOpen, label, listRef } = props;
|
|
30
|
+
const t = useChromeT();
|
|
31
|
+
return (_jsx("nav", { ref: listRef, className: "exercise-series__list", "aria-label": t('pedagogy.seriesQuestions'), children: series.map((entry, position) => {
|
|
32
|
+
const key = keys[position] ?? '';
|
|
33
|
+
return (_jsxs(Button, { variant: "minimal", alignText: "start", fill: true, active: position === index, "data-selected": position === index ? 'true' : undefined, icon: _jsx(ExerciseStatusIcon, { status: records[key]?.status ?? 'idle' }), onClick: () => {
|
|
34
|
+
onOpen(position);
|
|
35
|
+
}, children: [_jsxs("span", { className: "exercise-series__number", children: [position + 1, "."] }), ' ', label(entry)] }, key));
|
|
36
|
+
}) }));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=seriesParts.js.map
|
|
@@ -0,0 +1 @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H,MAAM,UAAU,kBAAkB,CAChC,KAAwC;IAExC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACvE,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IACvB,OAAO,CACL,cACE,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,uBAAuB,gBACrB,CAAC,CAAC,0BAA0B,CAAC,YAExC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACjC,OAAO,CACL,MAAC,MAAM,IAEL,OAAO,EAAC,SAAS,EACjB,SAAS,EAAC,OAAO,EACjB,IAAI,QACJ,MAAM,EAAE,QAAQ,KAAK,KAAK,mBACX,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EACtD,IAAI,EACF,KAAC,kBAAkB,IAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,IAAI,MAAM,GAAI,EAEhE,OAAO,EAAE,GAAG,EAAE;oBACZ,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACnB,CAAC,aAED,gBAAM,SAAS,EAAC,yBAAyB,aAAE,QAAQ,GAAG,CAAC,SAAS,EAAC,GAAG,EACnE,KAAK,CAAC,KAAK,CAAC,KAdR,GAAG,CAeD,CACV,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Attempt, AttemptStore } from '../core/attempts.ts';
|
|
2
|
+
import type { ProgressRecords } from '../core/progress.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Every attempt a store holds, re-rendering the component whenever one
|
|
5
|
+
* changes.
|
|
6
|
+
* @param store - The site's attempt store.
|
|
7
|
+
* @returns The records, keyed by attempt key.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useAttemptRecords(store: AttemptStore): ProgressRecords<Attempt>;
|
|
10
|
+
//# sourceMappingURL=useAttemptRecords.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttemptRecords.d.ts","sourceRoot":"","sources":["../../../src/pedagogy/ui/useAttemptRecords.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,YAAY,GAClB,eAAe,CAAC,OAAO,CAAC,CAE1B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useSyncExternalStore } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Every attempt a store holds, re-rendering the component whenever one
|
|
4
|
+
* changes.
|
|
5
|
+
* @param store - The site's attempt store.
|
|
6
|
+
* @returns The records, keyed by attempt key.
|
|
7
|
+
*/
|
|
8
|
+
export function useAttemptRecords(store) {
|
|
9
|
+
return useSyncExternalStore(store.subscribe, store.records, store.records);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=useAttemptRecords.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttemptRecords.js","sourceRoot":"","sources":["../../../src/pedagogy/ui/useAttemptRecords.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAK7C;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAmB;IAEnB,OAAO,oBAAoB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PeriodicTable.d.ts","sourceRoot":"","sources":["../../../src/periodic/ui/PeriodicTable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAwBzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAIlE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"PeriodicTable.d.ts","sourceRoot":"","sources":["../../../src/periodic/ui/PeriodicTable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAwBzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAIlE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAiIrE"}
|
|
@@ -29,11 +29,14 @@ export function PeriodicTable(props) {
|
|
|
29
29
|
// otherwise re-render all 118 cells per frame, and the engine recomputes
|
|
30
30
|
// every length from the custom property on its own. A width of zero is a
|
|
31
31
|
// table in a tab nobody has opened; the last measurement stands until it is
|
|
32
|
-
// shown, and the observer fires again then.
|
|
32
|
+
// shown, and the observer fires again then. `data-measured` says the cells
|
|
33
|
+
// now follow a measured width rather than the `1cqw` fallback.
|
|
33
34
|
useResizeObserver(rootRef, ({ width }) => {
|
|
34
|
-
|
|
35
|
+
const root = rootRef.current;
|
|
36
|
+
if (width === 0 || root === null)
|
|
35
37
|
return;
|
|
36
|
-
|
|
38
|
+
root.style.setProperty(UNIT_PROPERTY, unitValue(width));
|
|
39
|
+
root.dataset.measured = '';
|
|
37
40
|
});
|
|
38
41
|
useEffect(() => {
|
|
39
42
|
if (!cameFromKeyRef.current)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PeriodicTable.js","sourceRoot":"","sources":["../../../src/periodic/ui/PeriodicTable.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,sBAAsB,GACvB,MAAM,0BAA2B,CAAC;AACnC,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAIrD;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,GAAG,eAAe,EAC1B,QAAQ,EACR,MAAM,GAAG,aAAa,EACtB,QAAQ,EACR,UAAU,EACV,KAAK,EACL,OAAO,GAAG,KAAK,EACf,aAAa,EACb,WAAW,EACX,MAAM,GAAG,KAAK,EACd,OAAO,GAAG,IAAI,EACd,QAAQ,GAAG,IAAI,EACf,OAAO,EACP,SAAS,GACV,GAAG,KAAK,CAAC;IAEV,MAAM,CAAC,GAAG,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EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAC3B,UAAU,EAAE,IAAI,EAChB,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAC3B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,EACzB,UAAU,EAAE,OAAO,CAAC,MAAM,KAAK,QAAQ,EACvC,UAAU,EAAE,UAAU,EAAE,CAAC,OAAO,CAAC,EACjC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM,EAC5B,GAAG,EAAE,IAAI,CAAC,GAAG,GAAG,MAAM,EACtB,QAAQ,EAAE,QAAQ,IAAI,IAAI,EAC1B,OAAO,EAAE,OAAO,IAdX,OAAO,CAAC,MAAM,CAenB,CACH,CAAC,IACE,EACL,MAAM,CAAC,CAAC,CAAC,KAAC,cAAc,KAAG,CAAC,CAAC,CAAC,IAAI,IAC/B,CACP,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,OAAwB;IAC/C,OAAO,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,aAAa,CAAC,OAAwB;IAC7C,OAAO,OAAO,CAAC,IAAI,CAAC;AACtB,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,GAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAEpD,SAAS,IAAI;IACX,wEAAwE;IACxE,0DAA0D;AAC5D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a click on a value of a property table copies.
|
|
3
|
+
*/
|
|
4
|
+
/** What a cell shows when there is no value for it. */
|
|
5
|
+
export declare const NOT_AVAILABLE = "\u2014";
|
|
6
|
+
/**
|
|
7
|
+
* The text a reader pastes for a value the page shows, or `null` when there is
|
|
8
|
+
* nothing to take: a value the data does not hold, or one drawn from elements
|
|
9
|
+
* rather than written as text, which names its own copy text instead.
|
|
10
|
+
* @param value - What is on screen.
|
|
11
|
+
* @returns The clipboard text, or null.
|
|
12
|
+
*/
|
|
13
|
+
export declare function copyableText(value: unknown): string | null;
|
|
14
|
+
//# sourceMappingURL=copyableText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyableText.d.ts","sourceRoot":"","sources":["../../../src/property/core/copyableText.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,uDAAuD;AACvD,eAAO,MAAM,aAAa,WAAM,CAAC;AAEjC;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAK1D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a click on a value of a property table copies.
|
|
3
|
+
*/
|
|
4
|
+
/** What a cell shows when there is no value for it. */
|
|
5
|
+
export const NOT_AVAILABLE = '—';
|
|
6
|
+
/**
|
|
7
|
+
* The text a reader pastes for a value the page shows, or `null` when there is
|
|
8
|
+
* nothing to take: a value the data does not hold, or one drawn from elements
|
|
9
|
+
* rather than written as text, which names its own copy text instead.
|
|
10
|
+
* @param value - What is on screen.
|
|
11
|
+
* @returns The clipboard text, or null.
|
|
12
|
+
*/
|
|
13
|
+
export function copyableText(value) {
|
|
14
|
+
if (typeof value === 'number')
|
|
15
|
+
return String(value);
|
|
16
|
+
if (typeof value !== 'string')
|
|
17
|
+
return null;
|
|
18
|
+
const text = value.trim();
|
|
19
|
+
return text === '' || text === NOT_AVAILABLE ? null : text;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=copyableText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyableText.js","sourceRoot":"","sources":["../../../src/property/core/copyableText.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,uDAAuD;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACpD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC1B,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/property/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/property/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
/** One row of a {@link PropertyTable}. */
|
|
3
|
+
export interface PropertyRow {
|
|
4
|
+
/** What the row is called. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** The value, already formatted: text, a number, or a drawn element. */
|
|
7
|
+
value: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* What the number means, when the name alone does not say.
|
|
10
|
+
* @default undefined
|
|
11
|
+
*/
|
|
12
|
+
note?: string;
|
|
13
|
+
/**
|
|
14
|
+
* What a click on the value copies, when the value is drawn rather than
|
|
15
|
+
* written: a formula drawn by `<MF>` copies its plain string.
|
|
16
|
+
* @default the value itself when it is text or a number, nothing otherwise
|
|
17
|
+
*/
|
|
18
|
+
copy?: string;
|
|
19
|
+
}
|
|
20
|
+
/** What {@link PropertyTable} needs. */
|
|
21
|
+
export interface PropertyTableProps {
|
|
22
|
+
/**
|
|
23
|
+
* The heading over the group.
|
|
24
|
+
* @default undefined — no heading
|
|
25
|
+
*/
|
|
26
|
+
title?: string;
|
|
27
|
+
/** The rows, in the order they are read. */
|
|
28
|
+
rows: readonly PropertyRow[];
|
|
29
|
+
/**
|
|
30
|
+
* Class the group carries, in addition to `properties`.
|
|
31
|
+
* @default undefined
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* One group of properties as a two-column table, each value its own copy
|
|
37
|
+
* target: a mass, a formula or an identifier is taken away with one click, and
|
|
38
|
+
* a row with no value is drawn as a plain cell.
|
|
39
|
+
* @param props - The heading and the rows.
|
|
40
|
+
* @returns The group.
|
|
41
|
+
*/
|
|
42
|
+
export declare function PropertyTable(props: PropertyTableProps): ReactElement;
|
|
43
|
+
//# sourceMappingURL=PropertyTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyTable.d.ts","sourceRoot":"","sources":["../../../src/property/ui/PropertyTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMrD,0CAA0C;AAC1C,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAkCrE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ClickToCopy } from "../../clipboard/ui/ClickToCopy.js";
|
|
3
|
+
import { joinClassNames } from "../../shared/ui/joinClassNames.js";
|
|
4
|
+
import { copyableText } from "../core/copyableText.js";
|
|
5
|
+
/**
|
|
6
|
+
* One group of properties as a two-column table, each value its own copy
|
|
7
|
+
* target: a mass, a formula or an identifier is taken away with one click, and
|
|
8
|
+
* a row with no value is drawn as a plain cell.
|
|
9
|
+
* @param props - The heading and the rows.
|
|
10
|
+
* @returns The group.
|
|
11
|
+
*/
|
|
12
|
+
export function PropertyTable(props) {
|
|
13
|
+
const { title, rows, className } = props;
|
|
14
|
+
return (_jsxs("section", { className: joinClassNames('properties', className), children: [title === undefined ? null : (_jsx("h3", { className: "properties__title", children: title })), _jsx("table", { className: "properties__table", children: _jsx("tbody", { children: rows.map((row) => {
|
|
15
|
+
const copy = row.copy ?? copyableText(row.value);
|
|
16
|
+
return (_jsxs("tr", { children: [_jsxs("th", { scope: "row", children: [row.label, row.note === undefined ? null : (_jsx("span", { className: "properties__note", children: row.note }))] }), _jsx(ClickToCopy, { as: "td", value: copy ?? '', label: row.label, disabled: copy === null, children: row.value })] }, row.label));
|
|
17
|
+
}) }) })] }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=PropertyTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyTable.js","sourceRoot":"","sources":["../../../src/property/ui/PropertyTable.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAoC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAqCvD;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACzC,OAAO,CACL,mBAAS,SAAS,EAAE,cAAc,CAAC,YAAY,EAAE,SAAS,CAAC,aACxD,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC5B,aAAI,SAAS,EAAC,mBAAmB,YAAE,KAAK,GAAM,CAC/C,EACD,gBAAO,SAAS,EAAC,mBAAmB,YAClC,0BACG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;wBAChB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;wBACjD,OAAO,CACL,yBACE,cAAI,KAAK,EAAC,KAAK,aACZ,GAAG,CAAC,KAAK,EACT,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC/B,eAAM,SAAS,EAAC,kBAAkB,YAAE,GAAG,CAAC,IAAI,GAAQ,CACrD,IACE,EACL,KAAC,WAAW,IACV,EAAE,EAAC,IAAI,EACP,KAAK,EAAE,IAAI,IAAI,EAAE,EACjB,KAAK,EAAE,GAAG,CAAC,KAAK,EAChB,QAAQ,EAAE,IAAI,KAAK,IAAI,YAEtB,GAAG,CAAC,KAAK,GACE,KAdP,GAAG,CAAC,KAAK,CAeb,CACN,CAAC;oBACJ,CAAC,CAAC,GACI,GACF,IACA,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/property/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/property/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC"}
|