react-cheminfo 0.31.0 → 0.32.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.
Files changed (59) hide show
  1. package/README.md +1 -0
  2. package/lib/core.d.ts +1 -0
  3. package/lib/core.d.ts.map +1 -1
  4. package/lib/core.js +1 -0
  5. package/lib/core.js.map +1 -1
  6. package/lib/i18n/core/chromeCatalog.d.ts +1 -1
  7. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
  8. package/lib/locales/de.json +3 -1
  9. package/lib/locales/en.json +3 -1
  10. package/lib/locales/es.json +3 -1
  11. package/lib/locales/fr.json +3 -1
  12. package/lib/number/core/index.d.ts +2 -0
  13. package/lib/number/core/index.d.ts.map +1 -0
  14. package/lib/number/core/index.js +2 -0
  15. package/lib/number/core/index.js.map +1 -0
  16. package/lib/number/core/numberText.d.ts +46 -0
  17. package/lib/number/core/numberText.d.ts.map +1 -0
  18. package/lib/number/core/numberText.js +88 -0
  19. package/lib/number/core/numberText.js.map +1 -0
  20. package/lib/number/ui/NumberInput.d.ts +113 -0
  21. package/lib/number/ui/NumberInput.d.ts.map +1 -0
  22. package/lib/number/ui/NumberInput.js +100 -0
  23. package/lib/number/ui/NumberInput.js.map +1 -0
  24. package/lib/number/ui/index.d.ts +3 -0
  25. package/lib/number/ui/index.d.ts.map +1 -0
  26. package/lib/number/ui/index.js +2 -0
  27. package/lib/number/ui/index.js.map +1 -0
  28. package/lib/periodic/ui/ElementCell.d.ts +10 -0
  29. package/lib/periodic/ui/ElementCell.d.ts.map +1 -1
  30. package/lib/periodic/ui/ElementCell.js +124 -14
  31. package/lib/periodic/ui/ElementCell.js.map +1 -1
  32. package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
  33. package/lib/periodic/ui/PeriodicTable.js +46 -19
  34. package/lib/periodic/ui/PeriodicTable.js.map +1 -1
  35. package/lib/periodic/ui/PeriodicTableChrome.js +2 -2
  36. package/lib/periodic/ui/PeriodicTableChrome.js.map +1 -1
  37. package/lib/spectra/ui/NumberField.d.ts +2 -5
  38. package/lib/spectra/ui/NumberField.d.ts.map +1 -1
  39. package/lib/spectra/ui/NumberField.js +4 -54
  40. package/lib/spectra/ui/NumberField.js.map +1 -1
  41. package/lib/ui.d.ts +1 -0
  42. package/lib/ui.d.ts.map +1 -1
  43. package/lib/ui.js +1 -0
  44. package/lib/ui.js.map +1 -1
  45. package/package.json +1 -1
  46. package/src/core.ts +1 -0
  47. package/src/locales/de.json +3 -1
  48. package/src/locales/en.json +3 -1
  49. package/src/locales/es.json +3 -1
  50. package/src/locales/fr.json +3 -1
  51. package/src/number/core/index.ts +6 -0
  52. package/src/number/core/numberText.ts +91 -0
  53. package/src/number/ui/NumberInput.tsx +300 -0
  54. package/src/number/ui/index.ts +7 -0
  55. package/src/periodic/ui/ElementCell.tsx +153 -14
  56. package/src/periodic/ui/PeriodicTable.tsx +51 -22
  57. package/src/periodic/ui/PeriodicTableChrome.tsx +2 -2
  58. package/src/spectra/ui/NumberField.tsx +11 -58
  59. package/src/ui.ts +1 -0
package/README.md CHANGED
@@ -97,6 +97,7 @@ through a wildcard subpath exactly as `react-science` serves its own.
97
97
  | **Pedagogy** | `parseGlossaryMarkers`, `localStorageProgressStore`, `progressSummary`, `finishValidation` | `GlossaryText`, `SyntaxTooltip`, `HintLadder`, `ExerciseActions`, `ExerciseProgressHeader`, `TutorialStepStrip`, `ReferenceGrid`, `TestCaseList` |
98
98
  | **Clipboard & files** | `writeToClipboard`, `downloadBlob`, `downloadText`, `sanitizeFileName`, `toDelimited`, `readDelimited`, `downloadFigure`, `figureSvg`, `figurePng`, `figureSize` | `ClickToCopy`, `CopyButton`, `CopyableValue`, `CodeBlock`, `DelimitedTextDialog`, `FigureDownload` |
99
99
  | **Formatting & colour** | `formatInteger`, `formatDecimal`, `formatBytes`, `pluralize`, `readableInk`, `contrastRatio`, `COLOR_SCALES`, `resolveColorScale`, `formatColorScale`, `colorAt`, `swatchAt`, `sampleScale`, `colorScaleGradient`, `rgbToHsv` | `ColorScaleLegend`, `ColorScaleSelect`, `ColorScaleEditor`, `ColorScaleBar` |
100
+ | **Number entry** | `readNumber`, `numberText`, `isPartialNumber`, `stepNumber` | `NumberInput` |
100
101
  | **Widgets** | `CREDITS`, `credits` | `ErrorBoundary`, `CollapsibleSection`, `CapsuleFilter`, `HelpTooltip`, `CreditsList` |
101
102
  | **Hooks & state** | `createWorkerChannel`, `persistBucket`, `persistSignalBucket` | `useDebouncedValue`, `useContainerSize`, `useListKeyboardNavigation`, `useDisclosure` |
102
103
  | **Chemistry** | `atomicOrbitalsOf`, `configurationOf`, `classifyMolfile`, `readStructure`, `toMolfileExport` | `AtomicOrbitalViewer` (`/orbital`), `StructureEditor`, `Structure` (`/structure`) |
package/lib/core.d.ts CHANGED
@@ -12,6 +12,7 @@ export * from './error/core/index.ts';
12
12
  export * from './format/core/index.ts';
13
13
  export * from './i18n/core/index.ts';
14
14
  export * from './language/core/index.ts';
15
+ export * from './number/core/index.ts';
15
16
  export * from './orbital/core/index.ts';
16
17
  export * from './overlay/core/index.ts';
17
18
  export * from './panel/core/index.ts';
package/lib/core.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACx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uB,CAAC;AAGtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
package/lib/core.js CHANGED
@@ -12,6 +12,7 @@ export * from "./error/core/index.js";
12
12
  export * from "./format/core/index.js";
13
13
  export * from "./i18n/core/index.js";
14
14
  export * from "./language/core/index.js";
15
+ export * from "./number/core/index.js";
15
16
  export * from "./orbital/core/index.js";
16
17
  export * from "./overlay/core/index.js";
17
18
  export * from "./panel/core/index.js";
package/lib/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,+EAA+E;AAC/E,2EAA2E;AAC3E,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,0EAA0E;AAC1E,8EAA8E;AAC9E,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,+EAA+E;AAC/E,2EAA2E;AAC3E,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,0EAA0E;AAC1E,8EAA8E;AAC9E,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
@@ -17,5 +17,5 @@ export type ChromeKey = keyof typeof en;
17
17
  * missing message falls back to; the other three arrive as a chunk of their
18
18
  * own, so a site read only in English downloads none of them.
19
19
  */
20
- export declare const CHROME_CATALOG: MessageCatalog<"language.label" | "chrome.pages" | "account.signIn" | "account.signOut" | "account.signedInAs" | "ecosystem.tools" | "ecosystem.menuHeading" | "ecosystem.otherTools" | "ecosystem.youAreHere" | "ecosystem.group.basics.label" | "ecosystem.group.basics.blurb" | "ecosystem.group.practice.label" | "ecosystem.group.practice.blurb" | "ecosystem.group.structures.label" | "ecosystem.group.structures.blurb" | "ecosystem.group.spectra.label" | "ecosystem.group.spectra.blurb" | "ecosystem.group.research.label" | "ecosystem.group.research.blurb" | "ecosystem.group.computing.label" | "ecosystem.group.computing.blurb" | "site.learn.tagline" | "site.inchi.tagline" | "site.vcl.tagline" | "site.smiles.tagline" | "site.openbabel.tagline" | "site.chemcalc.tagline" | "site.dbe.tagline" | "site.nmrium.tagline" | "site.metabo.tagline" | "site.derepflow.tagline" | "site.surge.tagline" | "site.tex.tagline" | "site.lcao.tagline" | "site.regexp.tagline" | "site.pdb.tagline" | "site.elucidation.tagline" | "site.equilibrium.tagline" | "site.polycarp.tagline" | "site.3d.tagline" | "site.periodic-table.tagline" | "site.database.tagline" | "site.symmetry.tagline" | "site.osiris.tagline" | "site.atoms.tagline" | "site.moles.tagline" | "site.inorganic.tagline" | "share.button" | "share.buttonTitle" | "share.dialogTitle" | "share.lead" | "share.layout" | "share.embed" | "share.embedHint" | "share.showOnPage" | "share.custom" | "share.link" | "share.copyLink" | "share.openInNewTab" | "share.iframe" | "share.copyIframe" | "share.done" | "cite.button" | "cite.copyReferenceAs" | "cite.pleaseCiteBoth" | "cite.pleaseCiteEvery" | "cite.copyBothAs" | "cite.copyEveryAs" | "cite.importIntoManager" | "cite.openArticle" | "cite.copyThisAs" | "cite.importThis" | "cite.copied" | "cite.copyFailed" | "cite.format.doi" | "cite.download.ris" | "cite.download.bibtex" | "clipboard.copied" | "clipboard.failed" | "clipboard.copy" | "clipboard.copyThe" | "clipboard.copyValue" | "clipboard.copyToClipboard" | "about.providedBy" | "about.whatYouCanDo" | "about.builtOn" | "about.howToCite" | "about.licenceAndSource" | "about.licence" | "about.foundAProblem" | "about.reportIt" | "about.citeWork" | "about.built" | "about.builtFromCommit" | "about.nameList" | "credits.openbabel.description" | "credits.openchemlib.description" | "credits.openchemlib-utils.description" | "credits.osiris-property-explorer.description" | "credits.react-ocl.description" | "credits.react-mf.description" | "credits.mass-tools.description" | "credits.chem-equilibrium.description" | "credits.ml-matrix.description" | "credits.ml-xsadd.description" | "credits.cif-to-json.description" | "credits.ml-spectra-processing.description" | "credits.occ.description" | "credits.xtb-wasm.description" | "credits.molstar.description" | "credits.blueprint.description" | "credits.react-science.description" | "credits.react-cheminfo.description" | "credits.cheminfo-font.description" | "credits.nivo.description" | "credits.mathjax.description" | "credits.lexical.description" | "credits.katex.description" | "credits.dnd-kit.description" | "credits.react-roi.description" | "credits.file-collection.description" | "credits.zip-js.description" | "credits.preact-signals.description" | "credits.fastify.description" | "credits.sqlite.description" | "credits.sqlite-wasm.description" | "credits.pouchdb.description" | "credits.chemexper.description" | "credits.react.description" | "credits.vite.description" | "help.label" | "help.learnMore" | "help.on" | "confirm.delete" | "confirm.cancel" | "error.title" | "error.tryAgain" | "error.noMessage" | "capsule.filter" | "color.scales" | "color.done" | "color.custom" | "color.customEllipsis" | "color.inUse" | "color.colourScale" | "color.legendLabel" | "color.scaleBeingEdited" | "color.anchorColour" | "color.anchorPosition" | "color.removeAnchor" | "color.addColour" | "color.path" | "color.interpolation.rgb" | "color.interpolation.hsv" | "color.interpolation.hsv-long" | "color.kind.sequential" | "color.kind.diverging" | "color.kind.cyclic" | "color.scale.viridis.label" | "color.scale.viridis.description" | "color.scale.plasma.label" | "color.scale.plasma.description" | "color.scale.magma.label" | "color.scale.magma.description" | "color.scale.inferno.label" | "color.scale.inferno.description" | "color.scale.cividis.label" | "color.scale.cividis.description" | "color.scale.turbo.label" | "color.scale.turbo.description" | "color.scale.greys.label" | "color.scale.greys.description" | "color.scale.cool-warm.label" | "color.scale.cool-warm.description" | "color.scale.blue-red.label" | "color.scale.blue-red.description" | "color.scale.rainbow.label" | "color.scale.rainbow.description" | "download.save" | "download.saveFigure" | "download.saveThisFigure" | "download.format" | "download.formatHelp" | "download.resolution" | "download.resolutionHelp" | "download.resolutionExample" | "download.noFigure" | "download.hintRasterSvg" | "download.hintSvg" | "download.hintPng" | "download.size" | "download.sizeHelp" | "download.sizeScreen" | "download.sizeColumn" | "download.sizeCustom" | "download.customSize" | "download.width" | "download.height" | "pedagogy.check" | "pedagogy.revealHint" | "pedagogy.revealHintCount" | "pedagogy.revealHintLadder" | "pedagogy.hideSolution" | "pedagogy.revealSolution" | "pedagogy.reset" | "pedagogy.hints" | "pedagogy.solvedCount" | "pedagogy.clearAll" | "pedagogy.keepAnswers" | "pedagogy.clearEverything" | "pedagogy.clearWarning" | "pedagogy.filterTerms" | "pedagogy.noTermDefined" | "pedagogy.noTermMatches" | "pedagogy.example" | "pedagogy.input" | "pedagogy.previous" | "pedagogy.next" | "pedagogy.stepOf" | "slides.exit" | "slides.previousSlide" | "slides.nextSlide" | "slides.toggleFullscreen" | "slides.backToSlides" | "slides.backToSlide" | "slides.noAddress" | "slides.liveDemos" | "slides.noTalkYet" | "overlay.options" | "overlay.whatAmILookingAt" | "overlay.reset" | "overlay.hoverAName" | "overlay.dismiss" | "delimited.copyTable" | "delimited.close" | "delimited.separator" | "delimited.save" | "delimited.copy" | "delimited.tableAsText" | "chart.measurement" | "chart.measurements" | "delimited.descriptionOne" | "delimited.descriptionMany" | "structure.guide.atom.title" | "structure.guide.atom.element" | "structure.guide.atom.group" | "structure.guide.atom.applyOrForget" | "structure.guide.atom.chain" | "structure.guide.atom.charge" | "structure.guide.atom.radical" | "structure.guide.atom.spin" | "structure.guide.atom.attachment" | "structure.guide.atom.query" | "structure.guide.atom.halogen" | "structure.guide.atom.delete" | "structure.guide.atom.note" | "structure.guide.bond.title" | "structure.guide.bond.order" | "structure.guide.bond.zeroOrder" | "structure.guide.bond.stereo" | "structure.guide.bond.unknownGeometry" | "structure.guide.bond.threeRing" | "structure.guide.bond.ring" | "structure.guide.bond.benzene" | "structure.guide.bond.query" | "structure.guide.bond.delete" | "structure.guide.anywhere.title" | "structure.guide.anywhere.undo" | "structure.guide.anywhere.copy" | "structure.guide.anywhere.paste" | "structure.guide.anywhere.deleteSelection" | "structure.guide.anywhere.flip" | "structure.guide.anywhere.help" | "structure.guide.anywhere.note" | "structure.guide.selecting.title" | "structure.guide.selecting.lasso" | "structure.guide.selecting.rectangle" | "structure.guide.selecting.add" | "structure.guide.selecting.move" | "structure.guide.selecting.duplicate" | "structure.guide.selecting.queryFeatures" | "structure.guide.selecting.note" | "structure.guide.stereochemistry.title" | "structure.guide.stereochemistry.note" | "structure.input.type" | "structure.input.or" | "structure.input.drag" | "structure.input.plusDrag" | "structure.input.dragSelection" | "structure.input.plusDragSelection" | "structure.input.doubleClick" | "structure.docs.toolsAndKeys" | "structure.docs.atomProperties" | "structure.docs.stereochemistry" | "structure.help.hoverToolbar" | "structure.help.learnMore" | "structure.mouseAndKeyboard" | "structure.tool.clear.name" | "structure.tool.clear.description" | "structure.tool.cleanUp.name" | "structure.tool.cleanUp.description" | "structure.tool.select.name" | "structure.tool.select.description" | "structure.tool.unknownConfiguration.name" | "structure.tool.unknownConfiguration.description" | "structure.tool.delete.name" | "structure.tool.delete.description" | "structure.tool.singleBond.name" | "structure.tool.singleBond.description" | "structure.tool.upBond.name" | "structure.tool.upBond.description" | "structure.tool.positiveCharge.name" | "structure.tool.positiveCharge.description" | "structure.tool.undo.name" | "structure.tool.undo.description" | "structure.tool.zoomAndRotate.name" | "structure.tool.zoomAndRotate.description" | "structure.tool.atomMapping.name" | "structure.tool.atomMapping.description" | "structure.tool.enhancedStereo.name" | "structure.tool.enhancedStereo.description" | "structure.tool.text.name" | "structure.tool.text.description" | "structure.tool.chain.name" | "structure.tool.chain.description" | "structure.tool.downBond.name" | "structure.tool.downBond.description" | "structure.tool.negativeCharge.name" | "structure.tool.negativeCharge.description" | "structure.tool.anyAtom.name" | "structure.tool.anyAtom.description" | "structure.tool.ring3.name" | "structure.tool.ring3.description" | "structure.tool.ring5.name" | "structure.tool.ring5.description" | "structure.tool.ring7.name" | "structure.tool.ring7.description" | "structure.tool.ring4.name" | "structure.tool.ring4.description" | "structure.tool.ring6.name" | "structure.tool.ring6.description" | "structure.tool.benzene.name" | "structure.tool.benzene.description" | "structure.tool.carbon.name" | "structure.tool.carbon.description" | "structure.tool.nitrogen.name" | "structure.tool.nitrogen.description" | "structure.tool.oxygen.name" | "structure.tool.oxygen.description" | "structure.tool.fluorine.name" | "structure.tool.fluorine.description" | "structure.tool.bromine.name" | "structure.tool.bromine.description" | "structure.tool.hydrogen.name" | "structure.tool.hydrogen.description" | "structure.tool.silicon.name" | "structure.tool.silicon.description" | "structure.tool.phosphorus.name" | "structure.tool.phosphorus.description" | "structure.tool.sulfur.name" | "structure.tool.sulfur.description" | "structure.tool.chlorine.name" | "structure.tool.chlorine.description" | "structure.tool.iodine.name" | "structure.tool.iodine.description" | "structure.tool.reactionOnly" | "structure.tool.unavailable" | "structure.loadingEditor" | "periodic.table" | "periodic.group" | "periodic.period" | "periodic.cellLabel" | "periodic.category.alkali-metal" | "periodic.category.alkaline-earth-metal" | "periodic.category.transition-metal" | "periodic.category.post-transition-metal" | "periodic.category.metalloid" | "periodic.category.nonmetal" | "periodic.category.halogen" | "periodic.category.noble-gas" | "periodic.category.lanthanoid" | "periodic.category.actinoid" | "molecule3d.view" | "molecule3d.resetView" | "molecule3d.spin" | "molecule3d.surface" | "molecule3d.molecularSurface" | "molecule3d.displayOptions" | "molecule3d.exportImage" | "molecule3d.measure" | "molecule3d.clearMeasurements" | "molecule3d.measurement.distance" | "molecule3d.measurement.angle" | "molecule3d.measurement.dihedral" | "molecule3d.measurementTooltip" | "molecule3d.representation.ball-and-stick" | "molecule3d.representation.spacefill" | "molecule3d.representation.stick" | "molecule3d.size" | "molecule3d.surfaceOpacity" | "molecule3d.solventProbe" | "molecule3d.solventProbeHelp" | "molecule3d.surfaceColour" | "molecule3d.colour" | "molecule3d.coloring.uniform" | "molecule3d.coloring.element" | "molecule3d.coloring.polarity" | "molecule3d.neutral" | "molecule3d.tpsaHelp" | "molecule3d.loadingViewer" | "molecule3d.couldNotDraw" | "molecule3d.gesture.rotate" | "molecule3d.gesture.rollDrag" | "molecule3d.gesture.rollKeys" | "molecule3d.gesture.moveDrag" | "molecule3d.gesture.moveCtrl" | "molecule3d.gesture.zoom" | "molecule3d.gesture.clip" | "molecule3d.gesture.centreAtom" | "molecule3d.gesture.centreMolecule" | "molecule3d.input.drag" | "molecule3d.input.plus" | "molecule3d.input.plusDrag" | "molecule3d.input.plusScroll" | "molecule3d.input.or" | "molecule3d.input.rightDrag" | "molecule3d.input.scroll" | "molecule3d.input.clickAtom" | "molecule3d.input.clickBackground" | "molecule3d.helpNote" | "orbital.couldNotDraw" | "orbital.sampling" | "orbital.showAxes" | "orbital.axesTitle" | "orbital.axesBody" | "orbital.axesExample" | "orbital.resetTitle" | "orbital.resetBody" | "viewer.capability.noWindow" | "viewer.capability.noContext" | "viewer.capability.noFloatTextures" | "viewer.capability.ready" | "conformers.strategy.adaptive-random" | "conformers.strategy.likely-random" | "conformers.strategy.pure-random" | "conformers.strategy.likely-systematic" | "conformers.strategyDetail.adaptive-random" | "conformers.strategyDetail.likely-random" | "conformers.strategyDetail.pure-random" | "conformers.strategyDetail.likely-systematic" | "conformers.minimisation.none">;
20
+ export declare const CHROME_CATALOG: MessageCatalog<"language.label" | "chrome.pages" | "account.signIn" | "account.signOut" | "account.signedInAs" | "ecosystem.tools" | "ecosystem.menuHeading" | "ecosystem.otherTools" | "ecosystem.youAreHere" | "ecosystem.group.basics.label" | "ecosystem.group.basics.blurb" | "ecosystem.group.practice.label" | "ecosystem.group.practice.blurb" | "ecosystem.group.structures.label" | "ecosystem.group.structures.blurb" | "ecosystem.group.spectra.label" | "ecosystem.group.spectra.blurb" | "ecosystem.group.research.label" | "ecosystem.group.research.blurb" | "ecosystem.group.computing.label" | "ecosystem.group.computing.blurb" | "site.learn.tagline" | "site.inchi.tagline" | "site.vcl.tagline" | "site.smiles.tagline" | "site.openbabel.tagline" | "site.chemcalc.tagline" | "site.dbe.tagline" | "site.nmrium.tagline" | "site.metabo.tagline" | "site.derepflow.tagline" | "site.surge.tagline" | "site.tex.tagline" | "site.lcao.tagline" | "site.regexp.tagline" | "site.pdb.tagline" | "site.elucidation.tagline" | "site.equilibrium.tagline" | "site.polycarp.tagline" | "site.3d.tagline" | "site.periodic-table.tagline" | "site.database.tagline" | "site.symmetry.tagline" | "site.osiris.tagline" | "site.atoms.tagline" | "site.moles.tagline" | "site.inorganic.tagline" | "share.button" | "share.buttonTitle" | "share.dialogTitle" | "share.lead" | "share.layout" | "share.embed" | "share.embedHint" | "share.showOnPage" | "share.custom" | "share.link" | "share.copyLink" | "share.openInNewTab" | "share.iframe" | "share.copyIframe" | "share.done" | "cite.button" | "cite.copyReferenceAs" | "cite.pleaseCiteBoth" | "cite.pleaseCiteEvery" | "cite.copyBothAs" | "cite.copyEveryAs" | "cite.importIntoManager" | "cite.openArticle" | "cite.copyThisAs" | "cite.importThis" | "cite.copied" | "cite.copyFailed" | "cite.format.doi" | "cite.download.ris" | "cite.download.bibtex" | "clipboard.copied" | "clipboard.failed" | "clipboard.copy" | "clipboard.copyThe" | "clipboard.copyValue" | "clipboard.copyToClipboard" | "about.providedBy" | "about.whatYouCanDo" | "about.builtOn" | "about.howToCite" | "about.licenceAndSource" | "about.licence" | "about.foundAProblem" | "about.reportIt" | "about.citeWork" | "about.built" | "about.builtFromCommit" | "about.nameList" | "credits.openbabel.description" | "credits.openchemlib.description" | "credits.openchemlib-utils.description" | "credits.osiris-property-explorer.description" | "credits.react-ocl.description" | "credits.react-mf.description" | "credits.mass-tools.description" | "credits.chem-equilibrium.description" | "credits.ml-matrix.description" | "credits.ml-xsadd.description" | "credits.cif-to-json.description" | "credits.ml-spectra-processing.description" | "credits.occ.description" | "credits.xtb-wasm.description" | "credits.molstar.description" | "credits.blueprint.description" | "credits.react-science.description" | "credits.react-cheminfo.description" | "credits.cheminfo-font.description" | "credits.nivo.description" | "credits.mathjax.description" | "credits.lexical.description" | "credits.katex.description" | "credits.dnd-kit.description" | "credits.react-roi.description" | "credits.file-collection.description" | "credits.zip-js.description" | "credits.preact-signals.description" | "credits.fastify.description" | "credits.sqlite.description" | "credits.sqlite-wasm.description" | "credits.pouchdb.description" | "credits.chemexper.description" | "credits.react.description" | "credits.vite.description" | "help.label" | "help.learnMore" | "help.on" | "confirm.delete" | "confirm.cancel" | "error.title" | "error.tryAgain" | "error.noMessage" | "capsule.filter" | "color.scales" | "color.done" | "color.custom" | "color.customEllipsis" | "color.inUse" | "color.colourScale" | "color.legendLabel" | "color.scaleBeingEdited" | "color.anchorColour" | "color.anchorPosition" | "color.removeAnchor" | "color.addColour" | "color.path" | "color.interpolation.rgb" | "color.interpolation.hsv" | "color.interpolation.hsv-long" | "color.kind.sequential" | "color.kind.diverging" | "color.kind.cyclic" | "color.scale.viridis.label" | "color.scale.viridis.description" | "color.scale.plasma.label" | "color.scale.plasma.description" | "color.scale.magma.label" | "color.scale.magma.description" | "color.scale.inferno.label" | "color.scale.inferno.description" | "color.scale.cividis.label" | "color.scale.cividis.description" | "color.scale.turbo.label" | "color.scale.turbo.description" | "color.scale.greys.label" | "color.scale.greys.description" | "color.scale.cool-warm.label" | "color.scale.cool-warm.description" | "color.scale.blue-red.label" | "color.scale.blue-red.description" | "color.scale.rainbow.label" | "color.scale.rainbow.description" | "download.save" | "download.saveFigure" | "download.saveThisFigure" | "download.format" | "download.formatHelp" | "download.resolution" | "download.resolutionHelp" | "download.resolutionExample" | "download.noFigure" | "download.hintRasterSvg" | "download.hintSvg" | "download.hintPng" | "download.size" | "download.sizeHelp" | "download.sizeScreen" | "download.sizeColumn" | "download.sizeCustom" | "download.customSize" | "download.width" | "download.height" | "pedagogy.check" | "pedagogy.revealHint" | "pedagogy.revealHintCount" | "pedagogy.revealHintLadder" | "pedagogy.hideSolution" | "pedagogy.revealSolution" | "pedagogy.reset" | "pedagogy.hints" | "pedagogy.solvedCount" | "pedagogy.clearAll" | "pedagogy.keepAnswers" | "pedagogy.clearEverything" | "pedagogy.clearWarning" | "pedagogy.filterTerms" | "pedagogy.noTermDefined" | "pedagogy.noTermMatches" | "pedagogy.example" | "pedagogy.input" | "pedagogy.previous" | "pedagogy.next" | "pedagogy.stepOf" | "slides.exit" | "slides.previousSlide" | "slides.nextSlide" | "slides.toggleFullscreen" | "slides.backToSlides" | "slides.backToSlide" | "slides.noAddress" | "slides.liveDemos" | "slides.noTalkYet" | "overlay.options" | "overlay.whatAmILookingAt" | "overlay.reset" | "overlay.hoverAName" | "overlay.dismiss" | "delimited.copyTable" | "delimited.close" | "delimited.separator" | "delimited.save" | "delimited.copy" | "delimited.tableAsText" | "chart.measurement" | "chart.measurements" | "delimited.descriptionOne" | "delimited.descriptionMany" | "structure.guide.atom.title" | "structure.guide.atom.element" | "structure.guide.atom.group" | "structure.guide.atom.applyOrForget" | "structure.guide.atom.chain" | "structure.guide.atom.charge" | "structure.guide.atom.radical" | "structure.guide.atom.spin" | "structure.guide.atom.attachment" | "structure.guide.atom.query" | "structure.guide.atom.halogen" | "structure.guide.atom.delete" | "structure.guide.atom.note" | "structure.guide.bond.title" | "structure.guide.bond.order" | "structure.guide.bond.zeroOrder" | "structure.guide.bond.stereo" | "structure.guide.bond.unknownGeometry" | "structure.guide.bond.threeRing" | "structure.guide.bond.ring" | "structure.guide.bond.benzene" | "structure.guide.bond.query" | "structure.guide.bond.delete" | "structure.guide.anywhere.title" | "structure.guide.anywhere.undo" | "structure.guide.anywhere.copy" | "structure.guide.anywhere.paste" | "structure.guide.anywhere.deleteSelection" | "structure.guide.anywhere.flip" | "structure.guide.anywhere.help" | "structure.guide.anywhere.note" | "structure.guide.selecting.title" | "structure.guide.selecting.lasso" | "structure.guide.selecting.rectangle" | "structure.guide.selecting.add" | "structure.guide.selecting.move" | "structure.guide.selecting.duplicate" | "structure.guide.selecting.queryFeatures" | "structure.guide.selecting.note" | "structure.guide.stereochemistry.title" | "structure.guide.stereochemistry.note" | "structure.input.type" | "structure.input.or" | "structure.input.drag" | "structure.input.plusDrag" | "structure.input.dragSelection" | "structure.input.plusDragSelection" | "structure.input.doubleClick" | "structure.docs.toolsAndKeys" | "structure.docs.atomProperties" | "structure.docs.stereochemistry" | "structure.help.hoverToolbar" | "structure.help.learnMore" | "structure.mouseAndKeyboard" | "structure.tool.clear.name" | "structure.tool.clear.description" | "structure.tool.cleanUp.name" | "structure.tool.cleanUp.description" | "structure.tool.select.name" | "structure.tool.select.description" | "structure.tool.unknownConfiguration.name" | "structure.tool.unknownConfiguration.description" | "structure.tool.delete.name" | "structure.tool.delete.description" | "structure.tool.singleBond.name" | "structure.tool.singleBond.description" | "structure.tool.upBond.name" | "structure.tool.upBond.description" | "structure.tool.positiveCharge.name" | "structure.tool.positiveCharge.description" | "structure.tool.undo.name" | "structure.tool.undo.description" | "structure.tool.zoomAndRotate.name" | "structure.tool.zoomAndRotate.description" | "structure.tool.atomMapping.name" | "structure.tool.atomMapping.description" | "structure.tool.enhancedStereo.name" | "structure.tool.enhancedStereo.description" | "structure.tool.text.name" | "structure.tool.text.description" | "structure.tool.chain.name" | "structure.tool.chain.description" | "structure.tool.downBond.name" | "structure.tool.downBond.description" | "structure.tool.negativeCharge.name" | "structure.tool.negativeCharge.description" | "structure.tool.anyAtom.name" | "structure.tool.anyAtom.description" | "structure.tool.ring3.name" | "structure.tool.ring3.description" | "structure.tool.ring5.name" | "structure.tool.ring5.description" | "structure.tool.ring7.name" | "structure.tool.ring7.description" | "structure.tool.ring4.name" | "structure.tool.ring4.description" | "structure.tool.ring6.name" | "structure.tool.ring6.description" | "structure.tool.benzene.name" | "structure.tool.benzene.description" | "structure.tool.carbon.name" | "structure.tool.carbon.description" | "structure.tool.nitrogen.name" | "structure.tool.nitrogen.description" | "structure.tool.oxygen.name" | "structure.tool.oxygen.description" | "structure.tool.fluorine.name" | "structure.tool.fluorine.description" | "structure.tool.bromine.name" | "structure.tool.bromine.description" | "structure.tool.hydrogen.name" | "structure.tool.hydrogen.description" | "structure.tool.silicon.name" | "structure.tool.silicon.description" | "structure.tool.phosphorus.name" | "structure.tool.phosphorus.description" | "structure.tool.sulfur.name" | "structure.tool.sulfur.description" | "structure.tool.chlorine.name" | "structure.tool.chlorine.description" | "structure.tool.iodine.name" | "structure.tool.iodine.description" | "structure.tool.reactionOnly" | "structure.tool.unavailable" | "structure.loadingEditor" | "periodic.table" | "periodic.group" | "periodic.period" | "periodic.cellLabel" | "periodic.category.alkali-metal" | "periodic.category.alkaline-earth-metal" | "periodic.category.transition-metal" | "periodic.category.post-transition-metal" | "periodic.category.metalloid" | "periodic.category.nonmetal" | "periodic.category.halogen" | "periodic.category.noble-gas" | "periodic.category.lanthanoid" | "periodic.category.actinoid" | "molecule3d.view" | "molecule3d.resetView" | "molecule3d.spin" | "molecule3d.surface" | "molecule3d.molecularSurface" | "molecule3d.displayOptions" | "molecule3d.exportImage" | "molecule3d.measure" | "molecule3d.clearMeasurements" | "molecule3d.measurement.distance" | "molecule3d.measurement.angle" | "molecule3d.measurement.dihedral" | "molecule3d.measurementTooltip" | "molecule3d.representation.ball-and-stick" | "molecule3d.representation.spacefill" | "molecule3d.representation.stick" | "molecule3d.size" | "molecule3d.surfaceOpacity" | "molecule3d.solventProbe" | "molecule3d.solventProbeHelp" | "molecule3d.surfaceColour" | "molecule3d.colour" | "molecule3d.coloring.uniform" | "molecule3d.coloring.element" | "molecule3d.coloring.polarity" | "molecule3d.neutral" | "molecule3d.tpsaHelp" | "molecule3d.loadingViewer" | "molecule3d.couldNotDraw" | "molecule3d.gesture.rotate" | "molecule3d.gesture.rollDrag" | "molecule3d.gesture.rollKeys" | "molecule3d.gesture.moveDrag" | "molecule3d.gesture.moveCtrl" | "molecule3d.gesture.zoom" | "molecule3d.gesture.clip" | "molecule3d.gesture.centreAtom" | "molecule3d.gesture.centreMolecule" | "molecule3d.input.drag" | "molecule3d.input.plus" | "molecule3d.input.plusDrag" | "molecule3d.input.plusScroll" | "molecule3d.input.or" | "molecule3d.input.rightDrag" | "molecule3d.input.scroll" | "molecule3d.input.clickAtom" | "molecule3d.input.clickBackground" | "molecule3d.helpNote" | "orbital.couldNotDraw" | "orbital.sampling" | "orbital.showAxes" | "orbital.axesTitle" | "orbital.axesBody" | "orbital.axesExample" | "orbital.resetTitle" | "orbital.resetBody" | "viewer.capability.noWindow" | "viewer.capability.noContext" | "viewer.capability.noFloatTextures" | "viewer.capability.ready" | "conformers.strategy.adaptive-random" | "conformers.strategy.likely-random" | "conformers.strategy.pure-random" | "conformers.strategy.likely-systematic" | "conformers.strategyDetail.adaptive-random" | "conformers.strategyDetail.likely-random" | "conformers.strategyDetail.pure-random" | "conformers.strategyDetail.likely-systematic" | "conformers.minimisation.none" | "number.increment" | "number.decrement">;
21
21
  //# sourceMappingURL=chromeCatalog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chromeCatalog.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/chromeCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,uBAAuB,CAAuB;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD,qCAAqC;AACrC,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,cAAc,g1ZAUzB,CAAC"}
1
+ {"version":3,"file":"chromeCatalog.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/chromeCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,uBAAuB,CAAuB;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD,qCAAqC;AACrC,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,cAAc,03ZAUzB,CAAC"}
@@ -449,5 +449,7 @@
449
449
  "molecule3d.input.scroll": "Scrollen",
450
450
  "molecule3d.input.clickAtom": "Ein Atom anklicken",
451
451
  "molecule3d.input.clickBackground": "Den Hintergrund anklicken",
452
- "molecule3d.helpNote": "Die Tasten wirken, solange der Zeiger über dem Molekül ist. Auf dem Mac ist Ctrl die Control-Taste, nicht ⌘. Bei eingeschaltetem Messwerkzeug wählt ein Klick ein Atom."
452
+ "molecule3d.helpNote": "Die Tasten wirken, solange der Zeiger über dem Molekül ist. Auf dem Mac ist Ctrl die Control-Taste, nicht ⌘. Bei eingeschaltetem Messwerkzeug wählt ein Klick ein Atom.",
453
+ "number.increment": "Erhöhen",
454
+ "number.decrement": "Verringern"
453
455
  }
@@ -449,5 +449,7 @@
449
449
  "conformers.strategyDetail.likely-random": "Draws torsions at random from the torsion database, weighted by how often each angle is seen in crystal structures.",
450
450
  "conformers.strategyDetail.pure-random": "Draws every torsion uniformly at random, ignoring how likely the angle is — the widest spread and the least realistic set.",
451
451
  "conformers.strategyDetail.likely-systematic": "Walks the torsion combinations in decreasing likelihood, so the first conformers are the most probable ones and the set is reproducible.",
452
- "conformers.minimisation.none": "None (no energies)"
452
+ "conformers.minimisation.none": "None (no energies)",
453
+ "number.increment": "Increase",
454
+ "number.decrement": "Decrease"
453
455
  }
@@ -449,5 +449,7 @@
449
449
  "molecule3d.input.scroll": "Rueda",
450
450
  "molecule3d.input.clickAtom": "Hacer clic en un átomo",
451
451
  "molecule3d.input.clickBackground": "Hacer clic en el fondo",
452
- "molecule3d.helpNote": "Las teclas actúan mientras el puntero está sobre la molécula. En un Mac, Ctrl es la tecla Control, no ⌘. Con una herramienta de medida activa, un clic elige un átomo."
452
+ "molecule3d.helpNote": "Las teclas actúan mientras el puntero está sobre la molécula. En un Mac, Ctrl es la tecla Control, no ⌘. Con una herramienta de medida activa, un clic elige un átomo.",
453
+ "number.increment": "Aumentar",
454
+ "number.decrement": "Disminuir"
453
455
  }
@@ -449,5 +449,7 @@
449
449
  "molecule3d.input.scroll": "Molette",
450
450
  "molecule3d.input.clickAtom": "Cliquer un atome",
451
451
  "molecule3d.input.clickBackground": "Cliquer le fond",
452
- "molecule3d.helpNote": "Les touches agissent tant que le pointeur est sur la molécule. Sur un Mac, Ctrl est la touche Contrôle, pas ⌘. Avec un outil de mesure actif, un clic choisit un atome."
452
+ "molecule3d.helpNote": "Les touches agissent tant que le pointeur est sur la molécule. Sur un Mac, Ctrl est la touche Contrôle, pas ⌘. Avec un outil de mesure actif, un clic choisit un atome.",
453
+ "number.increment": "Augmenter",
454
+ "number.decrement": "Diminuer"
453
455
  }
@@ -0,0 +1,2 @@
1
+ export { isPartialNumber, numberText, readNumber, stepNumber, } from './numberText.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/number/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { isPartialNumber, numberText, readNumber, stepNumber, } from "./numberText.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/number/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * The number a box of text reads as, and the text a number is shown with.
3
+ *
4
+ * A box that hands its text straight to `Number` is a box nobody can type a
5
+ * decimal into: `0.` reads as `0`, and a control rendered from that number
6
+ * writes `0` back over the dot before the next keystroke arrives. So the text
7
+ * and the number are two values here, and the text is the one the reader owns.
8
+ */
9
+ /**
10
+ * The number some text reads as.
11
+ *
12
+ * A decimal comma is read as a decimal point, because a keyboard laid out for
13
+ * French or German puts a comma where the number pad's decimal key is and a
14
+ * reader typing `0,2` means two tenths.
15
+ * @param text - What is in the box.
16
+ * @param integer - Whether only whole numbers are wanted. Defaults to `false`.
17
+ * @returns The number, or undefined while the text does not read as one.
18
+ */
19
+ export declare function readNumber(text: string, integer?: boolean): number | undefined;
20
+ /**
21
+ * Whether the text can still become a number as more is typed.
22
+ *
23
+ * `0.`, `-` and `1e-` are all on the way to a number and must not be reported
24
+ * as mistakes; `0.2x` is not, and a box may say so while it is being typed.
25
+ * @param text - What is in the box.
26
+ * @returns Whether anything typed so far rules a number out.
27
+ */
28
+ export declare function isPartialNumber(text: string): boolean;
29
+ /**
30
+ * The text a number is shown with.
31
+ * @param value - The number, or nothing when the box is empty.
32
+ * @returns Its text, empty when there is no number.
33
+ */
34
+ export declare function numberText(value: number | undefined): string;
35
+ /**
36
+ * A number moved by one press of an arrow key or a stepper button.
37
+ *
38
+ * The result is rounded to the decimals the two operands carry, so stepping
39
+ * `0.1` up by `0.2` lands on `0.3` rather than on `0.30000000000000004` — a
40
+ * value that is then shown, shared in a link and stored in full.
41
+ * @param value - Where the box is now.
42
+ * @param delta - What the press adds; negative going down.
43
+ * @returns The number the box moves to.
44
+ */
45
+ export declare function stepNumber(value: number, delta: number): number;
46
+ //# sourceMappingURL=numberText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numberText.d.ts","sourceRoot":"","sources":["../../../src/number/core/numberText.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAcH;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,UAAQ,GAAG,MAAM,GAAG,SAAS,CAO5E;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGrD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM/D"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * The number a box of text reads as, and the text a number is shown with.
3
+ *
4
+ * A box that hands its text straight to `Number` is a box nobody can type a
5
+ * decimal into: `0.` reads as `0`, and a control rendered from that number
6
+ * writes `0` back over the dot before the next keystroke arrives. So the text
7
+ * and the number are two values here, and the text is the one the reader owns.
8
+ */
9
+ /** Text that reads as a finite number, comma or dot. */
10
+ const NUMBER = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i;
11
+ /** Text a reader is partway through: `-`, `0.`, `1e`, `1e-`, or empty. */
12
+ const PARTIAL = /^[+-]?(?:\d+(?:\.\d*)?|\.\d*)(?:e[+-]?\d*)?$/i;
13
+ /** A sign on its own, which is where typing a negative number starts. */
14
+ const SIGN = /^[+-]?$/;
15
+ /** Decimals `roundTo` can keep, and the most a step is rounded to. */
16
+ const MAXIMUM_DECIMALS = 15;
17
+ /**
18
+ * The number some text reads as.
19
+ *
20
+ * A decimal comma is read as a decimal point, because a keyboard laid out for
21
+ * French or German puts a comma where the number pad's decimal key is and a
22
+ * reader typing `0,2` means two tenths.
23
+ * @param text - What is in the box.
24
+ * @param integer - Whether only whole numbers are wanted. Defaults to `false`.
25
+ * @returns The number, or undefined while the text does not read as one.
26
+ */
27
+ export function readNumber(text, integer = false) {
28
+ const trimmed = text.trim().replace(',', '.');
29
+ if (!NUMBER.test(trimmed))
30
+ return undefined;
31
+ const parsed = Number(trimmed);
32
+ if (!Number.isFinite(parsed))
33
+ return undefined;
34
+ if (integer && !Number.isInteger(parsed))
35
+ return undefined;
36
+ return parsed;
37
+ }
38
+ /**
39
+ * Whether the text can still become a number as more is typed.
40
+ *
41
+ * `0.`, `-` and `1e-` are all on the way to a number and must not be reported
42
+ * as mistakes; `0.2x` is not, and a box may say so while it is being typed.
43
+ * @param text - What is in the box.
44
+ * @returns Whether anything typed so far rules a number out.
45
+ */
46
+ export function isPartialNumber(text) {
47
+ const trimmed = text.trim().replace(',', '.');
48
+ return SIGN.test(trimmed) || PARTIAL.test(trimmed);
49
+ }
50
+ /**
51
+ * The text a number is shown with.
52
+ * @param value - The number, or nothing when the box is empty.
53
+ * @returns Its text, empty when there is no number.
54
+ */
55
+ export function numberText(value) {
56
+ return value === undefined || !Number.isFinite(value) ? '' : String(value);
57
+ }
58
+ /**
59
+ * A number moved by one press of an arrow key or a stepper button.
60
+ *
61
+ * The result is rounded to the decimals the two operands carry, so stepping
62
+ * `0.1` up by `0.2` lands on `0.3` rather than on `0.30000000000000004` — a
63
+ * value that is then shown, shared in a link and stored in full.
64
+ * @param value - Where the box is now.
65
+ * @param delta - What the press adds; negative going down.
66
+ * @returns The number the box moves to.
67
+ */
68
+ export function stepNumber(value, delta) {
69
+ const decimals = Math.max(decimalsOf(value), decimalsOf(delta));
70
+ const moved = value + delta;
71
+ if (decimals === 0)
72
+ return moved;
73
+ const factor = 10 ** decimals;
74
+ return Math.round(moved * factor) / factor;
75
+ }
76
+ /**
77
+ * How many decimals a number is written with.
78
+ * @param value - The number.
79
+ * @returns Its count of decimals, `0` for anything written in exponent form.
80
+ */
81
+ function decimalsOf(value) {
82
+ const text = String(Math.abs(value));
83
+ const dot = text.indexOf('.');
84
+ if (dot === -1 || text.includes('e'))
85
+ return 0;
86
+ return Math.min(text.length - dot - 1, MAXIMUM_DECIMALS);
87
+ }
88
+ //# sourceMappingURL=numberText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numberText.js","sourceRoot":"","sources":["../../../src/number/core/numberText.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,wDAAwD;AACxD,MAAM,MAAM,GAAG,+CAA+C,CAAC;AAE/D,0EAA0E;AAC1E,MAAM,OAAO,GAAG,+CAA+C,CAAC;AAEhE,yEAAyE;AACzE,MAAM,IAAI,GAAG,SAAS,CAAC;AAEvB,sEAAsE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AK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC5B,IAAI,QAAQ,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACjC,MAAM,MAAM,GAAG,EAAE,IAAI,QAAQ,CAAC;IAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC;AAC7C,CAAC;AAED;;;;GAIG;AACH,SAAS,UAAU,CAAC,KAAa;IAC/B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IAC/C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,GAAG,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,113 @@
1
+ import type { CSSProperties, ReactElement } from 'react';
2
+ /** What every number box takes, whether or not it can be left empty. */
3
+ export interface NumberInputBaseProps {
4
+ /**
5
+ * Smallest accepted value, applied when the box is left rather than while it
6
+ * is typed in.
7
+ * @default undefined — unbounded below
8
+ */
9
+ min?: number;
10
+ /**
11
+ * Largest accepted value, applied when the box is left.
12
+ * @default undefined — unbounded above
13
+ */
14
+ max?: number;
15
+ /**
16
+ * What one press of an arrow key or a stepper button adds; Shift multiplies
17
+ * it by ten and Alt divides it by ten.
18
+ * @default 1
19
+ */
20
+ step?: number;
21
+ /**
22
+ * Whether only whole numbers are wanted. A typed decimal is rounded when the
23
+ * box is left.
24
+ * @default false
25
+ */
26
+ integer?: boolean;
27
+ /**
28
+ * Whether the up and down buttons are drawn beside the box.
29
+ * @default true
30
+ */
31
+ buttons?: boolean;
32
+ /**
33
+ * Grey text shown while the box is empty.
34
+ * @default undefined — the box carries no placeholder
35
+ */
36
+ placeholder?: string;
37
+ /** @default false */
38
+ disabled?: boolean;
39
+ /**
40
+ * Whether the control takes the whole width it is given.
41
+ * @default false
42
+ */
43
+ fill?: boolean;
44
+ /** @default 'medium' */
45
+ size?: 'small' | 'medium' | 'large';
46
+ /**
47
+ * Accessible name, for a box no `<label>` points at.
48
+ * @default undefined — the box is named by its label
49
+ */
50
+ ariaLabel?: string;
51
+ /**
52
+ * The box's id, for a `<label htmlFor>` elsewhere in the form.
53
+ * @default undefined
54
+ */
55
+ id?: string;
56
+ /**
57
+ * A name a test finds the box by, written as `data-testid`.
58
+ * @default undefined
59
+ */
60
+ testId?: string;
61
+ /**
62
+ * Drawn inside the box at its left — a unit, a prefix such as `10⁻`.
63
+ * @default undefined
64
+ */
65
+ leftElement?: ReactElement;
66
+ /**
67
+ * Drawn inside the box at its right — a unit, a small button.
68
+ * @default undefined
69
+ */
70
+ rightElement?: ReactElement;
71
+ /** @default undefined */
72
+ className?: string;
73
+ /** @default undefined */
74
+ style?: CSSProperties;
75
+ }
76
+ /** A box that always holds a number. */
77
+ export interface RequiredNumberInputProps extends NumberInputBaseProps {
78
+ /** The number the box shows. */
79
+ value: number;
80
+ /**
81
+ * Whether an emptied box hands up nothing. A required box keeps the number
82
+ * it had and shows it again when the box is left.
83
+ * @default false
84
+ */
85
+ allowEmpty?: false;
86
+ /** Called with the new number, never while the text is half-typed. */
87
+ onChange: (value: number) => void;
88
+ }
89
+ /** A box that may be left empty, which hands up `undefined`. */
90
+ export interface OptionalNumberInputProps extends NumberInputBaseProps {
91
+ /** The number the box shows, or nothing when it is empty. */
92
+ value: number | undefined;
93
+ allowEmpty: true;
94
+ /** Called with the new number, or with `undefined` when the box is emptied. */
95
+ onChange: (value: number | undefined) => void;
96
+ }
97
+ /** See {@link NumberInput}. */
98
+ export type NumberInputProps = RequiredNumberInputProps | OptionalNumberInputProps;
99
+ /**
100
+ * A number typed into a box.
101
+ *
102
+ * The box keeps what was typed rather than what parsed. A reader halfway
103
+ * through `0.2` has typed `0.`, which reads as zero, and a box rendered from
104
+ * that number would write `0` back over the dot before the `2` arrives —
105
+ * which is why Blueprint's `NumericInput` cannot be given a number to show and
106
+ * is never used directly on our sites. Nothing is handed up until the text
107
+ * reads as a number, so a calculation never sees a half-typed value, and the
108
+ * bounds are applied when the box is left rather than under the caret.
109
+ * @param props - See {@link NumberInputProps}.
110
+ * @returns The box, with its stepper buttons unless they are turned off.
111
+ */
112
+ export declare function NumberInput(props: NumberInputProps): ReactElement;
113
+ //# sourceMappingURL=NumberInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/number/ui/NumberInput.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAYxE,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wBAAwB;IACxB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wCAAwC;AACxC,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,sEAAsE;IACtE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,gEAAgE;AAChE,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,6DAA6D;IAC7D,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,UAAU,EAAE,IAAI,CAAC;IACjB,+EAA+E;IAC/E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAC/C;AAED,+BAA+B;AAC/B,MAAM,MAAM,gBAAgB,GAC1B,wBAAwB,GAAG,wBAAwB,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CA8IjE"}
@@ -0,0 +1,100 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, ButtonGroup, Classes, ControlGroup, InputGroup, } from '@blueprintjs/core';
3
+ import { useState } from 'react';
4
+ import { clamp } from "../../format/core/clamp.js";
5
+ import { useChromeT } from "../../i18n/ui/useT.js";
6
+ import { isPartialNumber, numberText, readNumber, stepNumber, } from "../core/numberText.js";
7
+ /**
8
+ * A number typed into a box.
9
+ *
10
+ * The box keeps what was typed rather than what parsed. A reader halfway
11
+ * through `0.2` has typed `0.`, which reads as zero, and a box rendered from
12
+ * that number would write `0` back over the dot before the `2` arrives —
13
+ * which is why Blueprint's `NumericInput` cannot be given a number to show and
14
+ * is never used directly on our sites. Nothing is handed up until the text
15
+ * reads as a number, so a calculation never sees a half-typed value, and the
16
+ * bounds are applied when the box is left rather than under the caret.
17
+ * @param props - See {@link NumberInputProps}.
18
+ * @returns The box, with its stepper buttons unless they are turned off.
19
+ */
20
+ export function NumberInput(props) {
21
+ const { value, min, max, step = 1, integer = false, allowEmpty = false, buttons = true, placeholder, disabled = false, fill = false, size = 'medium', ariaLabel, id, testId, leftElement, rightElement, className, style, } = props;
22
+ const t = useChromeT();
23
+ const onChange = props.onChange;
24
+ const [draft, setDraft] = useState(() => ({
25
+ text: numberText(value),
26
+ held: value,
27
+ }));
28
+ // The number changed elsewhere — a preset, a reset, a link — so the box has
29
+ // to follow. `held` is what this box last handed up, not the prop it was
30
+ // rendered with: comparing against the prop would make the box's own edit
31
+ // look external and rewrite `-0.` as `0` under the caret.
32
+ if (draft.held !== value)
33
+ setDraft({ text: numberText(value), held: value });
34
+ function hold(text, held) {
35
+ setDraft({ text, held });
36
+ }
37
+ function commit(next) {
38
+ hold(numberText(next), next);
39
+ onChange(next);
40
+ }
41
+ function type(text) {
42
+ const emptied = text.trim() === '';
43
+ const parsed = readNumber(text, integer);
44
+ hold(text, emptied && allowEmpty ? undefined : (parsed ?? value));
45
+ if (emptied) {
46
+ if (allowEmpty)
47
+ onChange(undefined);
48
+ }
49
+ else if (parsed !== undefined) {
50
+ onChange(parsed);
51
+ }
52
+ }
53
+ function leave() {
54
+ if (draft.text.trim() === '') {
55
+ if (!allowEmpty)
56
+ hold(numberText(value), value);
57
+ return;
58
+ }
59
+ const parsed = readNumber(draft.text);
60
+ if (parsed === undefined) {
61
+ hold(numberText(value), value);
62
+ return;
63
+ }
64
+ const settled = settle(parsed, integer, min, max);
65
+ if (settled !== parsed || !Object.is(settled, value))
66
+ commit(settled);
67
+ }
68
+ function press(event) {
69
+ const direction = event.key === 'ArrowUp' ? 1 : event.key === 'ArrowDown' ? -1 : 0;
70
+ if (direction === 0 || disabled)
71
+ return;
72
+ event.preventDefault();
73
+ const scale = event.shiftKey ? 10 : event.altKey ? 0.1 : 1;
74
+ move(direction * scale);
75
+ }
76
+ function move(scale) {
77
+ const from = readNumber(draft.text) ?? value ?? 0;
78
+ commit(settle(stepNumber(from, step * scale), integer, min, max));
79
+ }
80
+ const box = (_jsx(InputGroup, { id: id, size: size, fill: fill, disabled: disabled, placeholder: placeholder, value: draft.text, intent: isPartialNumber(draft.text) ? 'none' : 'danger', inputMode: integer ? 'numeric' : 'decimal', spellCheck: false, autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", "aria-label": ariaLabel, "data-testid": testId, leftElement: leftElement, rightElement: rightElement, className: buttons ? undefined : className, style: buttons ? undefined : style, onValueChange: type, onKeyDown: press, onBlur: leave }));
81
+ if (!buttons)
82
+ return box;
83
+ const shown = readNumber(draft.text) ?? value;
84
+ return (_jsxs(ControlGroup, { fill: fill, style: style, className: [Classes.NUMERIC_INPUT, className].filter(Boolean).join(' '), children: [box, _jsxs(ButtonGroup, { className: Classes.FIXED, vertical: true, children: [_jsx(Button, { icon: "chevron-up", size: size, "aria-label": t('number.increment'), disabled: disabled ||
85
+ (max !== undefined && shown !== undefined && shown >= max), onClick: () => move(1) }), _jsx(Button, { icon: "chevron-down", size: size, "aria-label": t('number.decrement'), disabled: disabled ||
86
+ (min !== undefined && shown !== undefined && shown <= min), onClick: () => move(-1) })] })] }));
87
+ }
88
+ /**
89
+ * The number a box settles on once it is left or stepped.
90
+ * @param value - What the text read as.
91
+ * @param integer - Whether only whole numbers are wanted.
92
+ * @param min - Smallest accepted value, when there is one.
93
+ * @param max - Largest accepted value, when there is one.
94
+ * @returns The rounded, bounded number.
95
+ */
96
+ function settle(value, integer, min, max) {
97
+ const rounded = integer ? Math.round(value) : value;
98
+ return clamp(rounded, min ?? Number.NEGATIVE_INFINITY, max ?? Number.POSITIVE_INFINITY, rounded);
99
+ }
100
+ //# sourceMappingURL=NumberInput.js.map
@@ -0,0 +1 @@
1
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,EAAC,cAAc,EACnB,IAAI,EAAE,IAAI,gBACE,CAAC,CAAC,kBAAkB,CAAC,EACjC,QAAQ,EACN,QAAQ;4BACR,CAAC,GAAG,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,IAAI,GAAG,CAAC,EAE5D,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GACvB,IACU,IACD,CAChB,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,MAAM,CACb,KAAa,EACb,OAAgB,EAChB,GAAuB,EACvB,GAAuB;IAEvB,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACpD,OAAO,KAAK,CACV,OAAO,EACP,GAAG,IAAI,MAAM,CAAC,iBAAiB,EAC/B,GAAG,IAAI,MAAM,CAAC,iBAAiB,EAC/B,OAAO,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { NumberInputBaseProps, NumberInputProps, OptionalNumberInputProps, RequiredNumberInputProps, } from './NumberInput.tsx';
2
+ export { NumberInput } from './NumberInput.tsx';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/number/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,gBAAgB,EAChB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { NumberInput } from "./NumberInput.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/number/ui/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAC"}
@@ -4,6 +4,10 @@
4
4
  *
5
5
  * A cell is a real `<button>`, so Tab reaches it, Enter and Space activate it,
6
6
  * and a screen reader reads the element's name rather than its symbol.
7
+ *
8
+ * Everything written in it is sized in container-query units, so a cell shows
9
+ * the same proportions at 280px beside a chart and across a lecture-hall
10
+ * screen — the table a class reads is the same drawing, larger.
7
11
  */
8
12
  import type { ReactElement } from 'react';
9
13
  import type { Swatch } from '../../color/core/interpolate.ts';
@@ -28,6 +32,12 @@ export interface ElementCellProps {
28
32
  * @default '' — nothing is written
29
33
  */
30
34
  detail?: string;
35
+ /**
36
+ * Whether the table this cell belongs to writes a third line at all. A table
37
+ * that writes none gives the room to the symbol, and its rows are shorter.
38
+ * @default whether this cell has one
39
+ */
40
+ writesDetail?: boolean;
31
41
  /**
32
42
  * Whether the cell is the one the tools are pointed at.
33
43
  * @default false
@@ -1 +1 @@
1
- {"version":3,"file":"ElementCell.d.ts","sourceRoot":"","sources":["../../../src/periodic/ui/ElementCell.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAG9D,0DAA0D;AAC1D,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,CAAC,EA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