@macrostrat/column-components
Version:
React rendering primitives for stratigraphic columns
1 lines • 930 B
Source Map (JSON)
{"version":3,"file":"settings.cjs","sources":["../../src/context/settings.ts"],"sourcesContent":["import { createSettingsContext } from \"@macrostrat/ui-components\";\n// This will eventually help us move to \"@macrostrat/ui-components\" for settings provision\n\nconst [SettingsProvider, useSettings, useSettingsUpdater] =\n createSettingsContext<object>({});\n\n// Deprecated: this is kind of confusing\nconst updateSettings = function (func) {\n // Update settings using `immutability-helper` semantics\n const updater: any = useSettingsUpdater();\n return function () {\n return updater(func(...arguments));\n };\n};\n\nexport { SettingsProvider, useSettings, updateSettings };\n"],"names":["createSettingsContext"],"mappings":";;;AAGA,MAAM,CAAC,kBAAkB,aAAa,kBAAkB,IACtDA,aAAAA,sBAA8B,CAAA,CAAE;AAGlC,MAAM,iBAAiB,SAAU,MAAM;AAErC,QAAM,UAAe,mBAAA;AACrB,SAAO,WAAY;AACjB,WAAO,QAAQ,KAAK,GAAG,SAAS,CAAC;AAAA,EACnC;AACF;;;;"}