@jbrowse/core 5.0.0-beta.1 → 5.0.0-beta.3
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 +112 -43
- package/esm/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +2 -3
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.d.ts +4 -0
- package/esm/BaseFeatureWidget/BaseFeatureDetail/ParentFeatureLine.js +17 -0
- package/esm/BaseFeatureWidget/BaseFeatureDetail/index.js +4 -3
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +2 -2
- package/esm/BaseFeatureWidget/SequenceFeatureDetails/test_data/NCDN.d.ts +2 -2
- package/esm/BaseFeatureWidget/index.d.ts +1 -1
- package/esm/BaseFeatureWidget/stateModelFactory.d.ts +8 -1
- package/esm/BaseFeatureWidget/stateModelFactory.js +6 -0
- package/esm/BaseFeatureWidget/types.d.ts +10 -2
- package/esm/PluginLoader.d.ts +1 -0
- package/esm/PluginLoader.js +52 -8
- package/esm/PluginManager.d.ts +99 -17
- package/esm/PluginManager.js +194 -26
- package/esm/ReExports/BaseFeatureDetails.js +1 -1
- package/esm/ReExports/MuiDataGridReExports.d.ts +1 -0
- package/esm/ReExports/MuiDataGridReExports.js +2 -2
- package/esm/ReExports/barrelOnlyNames.d.ts +5 -0
- package/esm/ReExports/barrelOnlyNames.js +63 -0
- package/esm/ReExports/modules.js +31 -109
- package/esm/ReExports/publicTracks.d.ts +1 -0
- package/esm/ReExports/publicTracks.js +14 -0
- package/esm/ReExports/publicUi.d.ts +4 -0
- package/esm/ReExports/publicUi.js +33 -0
- package/esm/ReExports/publicUtil.d.ts +1 -1
- package/esm/ReExports/publicUtil.js +8 -4
- package/esm/ReExports/sharedModules.d.ts +96 -0
- package/esm/ReExports/sharedModules.js +66 -0
- package/esm/ReExports/uiStub.d.ts +2 -0
- package/esm/ReExports/uiStub.js +11 -0
- package/esm/ReExports/workerModules.d.ts +2 -0
- package/esm/ReExports/workerModules.js +15 -0
- package/esm/ReExports/workerNamespaceNames.d.ts +11 -0
- package/esm/ReExports/workerNamespaceNames.js +281 -0
- package/esm/configuration/configurationSchema.d.ts +5 -38
- package/esm/configuration/configurationSchema.js +64 -40
- package/esm/configuration/index.d.ts +2 -2
- package/esm/configuration/index.js +1 -1
- package/esm/configuration/promotableDefaults.d.ts +54 -19
- package/esm/configuration/promotableDefaults.js +117 -48
- package/esm/configuration/promotablePin.d.ts +50 -40
- package/esm/configuration/promotableResolve.d.ts +1 -1
- package/esm/configuration/promotableResolve.js +1 -1
- package/esm/configuration/tabixIndexFields.d.ts +2 -2
- package/esm/configuration/tabixIndexFields.js +2 -2
- package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +12 -0
- package/esm/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +35 -4
- package/esm/data_adapters/BaseAdapter/featureDensity.d.ts +41 -0
- package/esm/data_adapters/BaseAdapter/featureDensity.js +32 -0
- package/esm/data_adapters/BaseAdapter/index.d.ts +2 -1
- package/esm/data_adapters/BaseAdapter/index.js +1 -0
- package/esm/data_adapters/BaseAdapter/stats.d.ts +33 -1
- package/esm/data_adapters/BaseAdapter/stats.js +52 -13
- package/esm/data_adapters/BaseAdapter/types.d.ts +3 -8
- package/esm/pluggableElementTypes/AdapterType.d.ts +2 -1
- package/esm/pluggableElementTypes/AdapterType.js +1 -1
- package/esm/pluggableElementTypes/DisplayType.d.ts +4 -12
- package/esm/pluggableElementTypes/DisplayType.js +3 -10
- package/esm/pluggableElementTypes/LazyStateModelElement.d.ts +27 -0
- package/esm/pluggableElementTypes/LazyStateModelElement.js +71 -0
- package/esm/pluggableElementTypes/ViewType.d.ts +20 -4
- package/esm/pluggableElementTypes/ViewType.js +32 -4
- package/esm/pluggableElementTypes/extendElementType.d.ts +1 -2
- package/esm/pluggableElementTypes/extendElementType.js +9 -5
- package/esm/pluggableElementTypes/models/BaseDisplayModel.d.ts +44 -3
- package/esm/pluggableElementTypes/models/BaseDisplayModel.js +75 -2
- package/esm/pluggableElementTypes/models/BaseTrackModel.d.ts +21 -0
- package/esm/pluggableElementTypes/models/BaseTrackModel.js +34 -2
- package/esm/pluggableElementTypes/models/BaseViewModel.d.ts +49 -0
- package/esm/pluggableElementTypes/models/BaseViewModel.js +28 -0
- package/esm/pluggableElementTypes/models/assertDisplayContract.d.ts +14 -10
- package/esm/pluggableElementTypes/models/assertDisplayContract.js +25 -32
- package/esm/pluggableElementTypes/models/baseTrackConfig.js +7 -1
- package/esm/rpc/RpcRegistry.d.ts +10 -0
- package/esm/rpc/byteBudget.d.ts +9 -0
- package/esm/rpc/coreRpcMethods.d.ts +1 -0
- package/esm/rpc/coreRpcMethods.js +1 -0
- package/esm/rpc/methods/CoreGetFeatureDensity.d.ts +11 -0
- package/esm/rpc/methods/CoreGetFeatureDensity.js +22 -0
- package/esm/svg/svgReady.d.ts +1 -0
- package/esm/ui/BaseExportSvgDialog.d.ts +1 -1
- package/esm/ui/CascadingMenu.js +30 -8
- package/esm/ui/ErrorMessageStackTraceDialog.js +5 -6
- package/esm/ui/ExportSvgDialog.d.ts +1 -1
- package/esm/ui/LoadingOverlay.d.ts +14 -0
- package/esm/ui/LoadingOverlay.js +1 -1
- package/esm/ui/MenuTypes.d.ts +14 -5
- package/esm/ui/MenuTypes.js +3 -0
- package/esm/ui/PaletteContext.d.ts +11 -4
- package/esm/ui/PaletteContext.js +34 -5
- package/esm/ui/PinAdornment.js +31 -43
- package/esm/ui/ScrollChrome.d.ts +16 -0
- package/esm/ui/ScrollChrome.js +12 -0
- package/esm/ui/ScrollZoomToggle.d.ts +4 -3
- package/esm/ui/ScrollZoomToggle.js +4 -3
- package/esm/ui/SizeSliderRow.js +1 -1
- package/esm/ui/index.d.ts +3 -3
- package/esm/ui/index.js +4 -4
- package/esm/ui/launchViewMenu.js +7 -1
- package/esm/ui/legendMenuItem.d.ts +10 -16
- package/esm/ui/legendMenuItem.js +9 -20
- package/esm/ui/makeSizeMenu.js +1 -1
- package/esm/ui/menuItemAdornment.d.ts +2 -3
- package/esm/ui/menuItemAdornment.js +2 -3
- package/esm/ui/menuItems.d.ts +2 -3
- package/esm/ui/menuItems.js +1 -2
- package/esm/ui/palette.d.ts +11 -11
- package/esm/ui/palette.js +11 -11
- package/esm/ui/promotablePinCoverage.d.ts +16 -2
- package/esm/ui/promotablePinCoverage.js +40 -3
- package/esm/ui/theme.js +5 -0
- package/esm/ui/toggleMenuItems.d.ts +14 -9
- package/esm/ui/toggleMenuItems.js +32 -15
- package/esm/util/Base1DUtils.d.ts +4 -2
- package/esm/util/Base1DUtils.js +12 -4
- package/esm/util/SvgCanvas.js +4 -3
- package/esm/util/adapterConfigKey.d.ts +12 -0
- package/esm/util/adapterConfigKey.js +14 -0
- package/esm/util/adapterMetadata.js +2 -1
- package/esm/util/addAndShowTrack.d.ts +1 -1
- package/esm/util/addAndShowTrack.js +5 -1
- package/esm/util/addTrackFromWidget.js +2 -2
- package/esm/util/analytics.js +4 -5
- package/esm/util/cacheBudgets.d.ts +22 -19
- package/esm/util/cacheBudgets.js +22 -19
- package/esm/util/clampToContig.d.ts +17 -0
- package/esm/util/clampToContig.js +19 -0
- package/esm/util/colorBits.d.ts +2 -1
- package/esm/util/colorBits.js +2 -5
- package/esm/util/createStopTokenRotation.d.ts +9 -7
- package/esm/util/createStopTokenRotation.js +7 -27
- package/esm/util/featureTypes.d.ts +24 -0
- package/esm/util/featureTypes.js +35 -0
- package/esm/util/fetchContext.d.ts +2 -2
- package/esm/util/fetchContext.js +2 -2
- package/esm/util/fetchPhases.d.ts +10 -10
- package/esm/util/hooks.d.ts +8 -0
- package/esm/util/hooks.js +27 -0
- package/esm/util/index.d.ts +6 -5
- package/esm/util/index.js +5 -4
- package/esm/util/installFetch.d.ts +71 -34
- package/esm/util/installFetch.js +57 -29
- package/esm/util/installInitAutorun.d.ts +14 -13
- package/esm/util/installInitAutorun.js +17 -17
- package/esm/util/installPrerequisiteFetch.d.ts +86 -0
- package/esm/util/installPrerequisiteFetch.js +73 -0
- package/esm/util/lazyAfterAttach.d.ts +13 -0
- package/esm/util/lazyAfterAttach.js +31 -0
- package/esm/util/legendCandidates.d.ts +50 -0
- package/esm/util/legendCandidates.js +87 -0
- package/esm/util/mstUtils.d.ts +12 -1
- package/esm/util/mstUtils.js +20 -2
- package/esm/util/openFeatureWidget.d.ts +5 -0
- package/esm/util/openFeatureWidget.js +1 -0
- package/esm/util/openViews.d.ts +16 -0
- package/esm/util/openViews.js +22 -0
- package/esm/util/parentWalk.d.ts +1 -1
- package/esm/util/parentWalk.js +1 -1
- package/esm/util/pluginStore.d.ts +1 -0
- package/esm/util/pluginStore.js +8 -1
- package/esm/util/range.d.ts +13 -9
- package/esm/util/range.js +17 -8
- package/esm/util/renderToStaticMarkup.js +10 -0
- package/esm/util/rxjs.d.ts +16 -0
- package/esm/util/rxjs.js +49 -0
- package/esm/util/scheduleDetachedDestroy.d.ts +18 -0
- package/esm/util/scheduleDetachedDestroy.js +24 -0
- package/esm/util/scrollLatch.d.ts +1 -0
- package/esm/util/scrollLatch.js +8 -0
- package/esm/util/stopToken.d.ts +6 -5
- package/esm/util/tabix.d.ts +10 -4
- package/esm/util/tabix.js +11 -5
- package/esm/util/trackConfigDelta.d.ts +6 -6
- package/esm/util/trackConfigDelta.js +3 -3
- package/esm/util/tracks.d.ts +48 -0
- package/esm/util/tracks.js +192 -66
- package/esm/util/types/index.d.ts +58 -10
- package/esm/util/types/index.js +3 -0
- package/esm/util/unknownSnapshotKeys.d.ts +36 -0
- package/esm/util/unknownSnapshotKeys.js +69 -0
- package/esm/util/usePanelVirtualScroll.d.ts +6 -2
- package/esm/util/usePanelVirtualScroll.js +6 -2
- package/esm/util/useRowVirtualScroll.d.ts +1 -1
- package/esm/util/useRowVirtualScroll.js +1 -1
- package/esm/util/useVirtualScrollWheel.js +11 -1
- package/esm/util/viewStatus.d.ts +23 -0
- package/esm/util/viewStatus.js +17 -0
- package/esm/util/wheelZoom.d.ts +3 -1
- package/esm/util/wheelZoom.js +39 -14
- package/esm/util/whenViewSettled.d.ts +17 -4
- package/esm/util/whenViewSettled.js +19 -6
- package/esm/util/withLaunchInput.d.ts +168 -0
- package/esm/util/withLaunchInput.js +273 -0
- package/package.json +19 -11
- package/esm/ui/promotableMenuItems.d.ts +0 -19
- package/esm/ui/promotableMenuItems.js +0 -89
- package/esm/util/applyInitSettings.d.ts +0 -79
- package/esm/util/applyInitSettings.js +0 -91
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { DATA_GRID_NAMES } from './MuiDataGridReExports.js';
|
|
2
|
+
import { MUI_COMPONENT_NAMES } from './muiComponentNames.js';
|
|
3
|
+
// Own-key names of each namespace-shaped UI module the RPC worker stubs.
|
|
4
|
+
// workerModules.test.ts pins them to modules.ts; agent-docs/reference/EAGER_BUNDLE.md
|
|
5
|
+
export const REACT_DOM_NAMES = [
|
|
6
|
+
'__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE',
|
|
7
|
+
'createPortal',
|
|
8
|
+
'default',
|
|
9
|
+
'flushSync',
|
|
10
|
+
'preconnect',
|
|
11
|
+
'prefetchDNS',
|
|
12
|
+
'preinit',
|
|
13
|
+
'preinitModule',
|
|
14
|
+
'preload',
|
|
15
|
+
'preloadModule',
|
|
16
|
+
'requestFormReset',
|
|
17
|
+
'unstable_batchedUpdates',
|
|
18
|
+
'useFormState',
|
|
19
|
+
'useFormStatus',
|
|
20
|
+
'version',
|
|
21
|
+
];
|
|
22
|
+
export const REACT_DOM_CLIENT_NAMES = [
|
|
23
|
+
'createRoot',
|
|
24
|
+
'default',
|
|
25
|
+
'hydrateRoot',
|
|
26
|
+
'version',
|
|
27
|
+
];
|
|
28
|
+
export const MOBX_REACT_NAMES = [
|
|
29
|
+
'Observer',
|
|
30
|
+
'_observerFinalizationRegistry',
|
|
31
|
+
'clearTimers',
|
|
32
|
+
'enableStaticRendering',
|
|
33
|
+
'isUsingStaticRendering',
|
|
34
|
+
'observer',
|
|
35
|
+
'useLocalObservable',
|
|
36
|
+
];
|
|
37
|
+
export const MUI_UTILS_NAMES = [
|
|
38
|
+
'capitalize',
|
|
39
|
+
'createChainedFunction',
|
|
40
|
+
'createSvgIcon',
|
|
41
|
+
'debounce',
|
|
42
|
+
'deprecatedPropType',
|
|
43
|
+
'getActiveElement',
|
|
44
|
+
'isMuiElement',
|
|
45
|
+
'mergeSlotProps',
|
|
46
|
+
'ownerDocument',
|
|
47
|
+
'ownerWindow',
|
|
48
|
+
'requirePropFactory',
|
|
49
|
+
'setRef',
|
|
50
|
+
'unstable_ClassNameGenerator',
|
|
51
|
+
'unstable_memoTheme',
|
|
52
|
+
'unstable_useEnhancedEffect',
|
|
53
|
+
'unstable_useId',
|
|
54
|
+
'unsupportedProp',
|
|
55
|
+
'useControlled',
|
|
56
|
+
'useEventCallback',
|
|
57
|
+
'useForkRef',
|
|
58
|
+
];
|
|
59
|
+
export const MUI_STYLES_NAMES = [
|
|
60
|
+
'CssVarsProvider',
|
|
61
|
+
'Experimental_CssVarsProvider',
|
|
62
|
+
'StyledEngineProvider',
|
|
63
|
+
'THEME_ID',
|
|
64
|
+
'ThemeProvider',
|
|
65
|
+
'adaptV4Theme',
|
|
66
|
+
'alpha',
|
|
67
|
+
'createColorScheme',
|
|
68
|
+
'createStyles',
|
|
69
|
+
'createTheme',
|
|
70
|
+
'css',
|
|
71
|
+
'darken',
|
|
72
|
+
'decomposeColor',
|
|
73
|
+
'duration',
|
|
74
|
+
'easing',
|
|
75
|
+
'emphasize',
|
|
76
|
+
'enhanceHighContrast',
|
|
77
|
+
'experimental_sx',
|
|
78
|
+
'extendTheme',
|
|
79
|
+
'getContrastRatio',
|
|
80
|
+
'getInitColorSchemeScript',
|
|
81
|
+
'getLuminance',
|
|
82
|
+
'getOverlayAlpha',
|
|
83
|
+
'hexToRgb',
|
|
84
|
+
'hslToRgb',
|
|
85
|
+
'keyframes',
|
|
86
|
+
'makeStyles',
|
|
87
|
+
'private_createTypography',
|
|
88
|
+
'private_excludeVariablesFromRoot',
|
|
89
|
+
'recomposeColor',
|
|
90
|
+
'responsiveFontSizes',
|
|
91
|
+
'rgbToHex',
|
|
92
|
+
'shouldSkipGeneratingVar',
|
|
93
|
+
'styled',
|
|
94
|
+
'unstable_createBreakpoints',
|
|
95
|
+
'unstable_createMuiStrictModeTheme',
|
|
96
|
+
'unstable_getUnit',
|
|
97
|
+
'unstable_toUnitless',
|
|
98
|
+
'useColorScheme',
|
|
99
|
+
'useTheme',
|
|
100
|
+
'useThemeProps',
|
|
101
|
+
'withStyles',
|
|
102
|
+
'withTheme',
|
|
103
|
+
];
|
|
104
|
+
export const TSS_REACT_NAMES = ['cx', 'keyframes', 'makeStyles'];
|
|
105
|
+
export const MATERIAL_UI_LAB_NAMES = [
|
|
106
|
+
'Alert',
|
|
107
|
+
'Autocomplete',
|
|
108
|
+
'ToggleButton',
|
|
109
|
+
'ToggleButtonGroup',
|
|
110
|
+
];
|
|
111
|
+
export const MUI_MATERIAL_NAMES = [
|
|
112
|
+
...MUI_COMPONENT_NAMES,
|
|
113
|
+
'alpha',
|
|
114
|
+
'createTheme',
|
|
115
|
+
'useTheme',
|
|
116
|
+
];
|
|
117
|
+
export const MATERIAL_UI_CORE_NAMES = [
|
|
118
|
+
...MUI_COMPONENT_NAMES,
|
|
119
|
+
'alpha',
|
|
120
|
+
'makeStyles',
|
|
121
|
+
'useTheme',
|
|
122
|
+
];
|
|
123
|
+
export const CORE_UI_NAMES = [
|
|
124
|
+
'ActionLink',
|
|
125
|
+
'AssemblySelector',
|
|
126
|
+
'BaseExportSvgDialog',
|
|
127
|
+
'BaseTooltip',
|
|
128
|
+
'CONTEXT_MENU_Z_INDEX',
|
|
129
|
+
'CascadingMenu',
|
|
130
|
+
'CascadingMenuButton',
|
|
131
|
+
'ConfirmDialog',
|
|
132
|
+
'ContextMenu',
|
|
133
|
+
'CopyToClipboardButton',
|
|
134
|
+
'Crosshairs',
|
|
135
|
+
'Dialog',
|
|
136
|
+
'EditableTypography',
|
|
137
|
+
'ErrorBanner',
|
|
138
|
+
'ErrorBar',
|
|
139
|
+
'ErrorMessage',
|
|
140
|
+
'ErrorOverlay',
|
|
141
|
+
'ExportSvgDialog',
|
|
142
|
+
'ExternalLink',
|
|
143
|
+
'FatalErrorDialog',
|
|
144
|
+
'FileDropZone',
|
|
145
|
+
'FileSelector',
|
|
146
|
+
'GRADIENT_LEGEND_HEIGHT',
|
|
147
|
+
'GRADIENT_LEGEND_SVG_AREA_WIDTH',
|
|
148
|
+
'GRADIENT_LEGEND_WIDTH',
|
|
149
|
+
'GpuFallbackButton',
|
|
150
|
+
'INLINE_MENU_ROW_WIDTH',
|
|
151
|
+
'InfoDialog',
|
|
152
|
+
'JexlFilterDialog',
|
|
153
|
+
'LAUNCH_LABEL',
|
|
154
|
+
'LEGEND_ROW_HEIGHT',
|
|
155
|
+
'LEGEND_SWATCH',
|
|
156
|
+
'LabeledCheckbox',
|
|
157
|
+
'LegendSwatchGlyph',
|
|
158
|
+
'LoadingEllipses',
|
|
159
|
+
'LoadingOverlay',
|
|
160
|
+
'LoadingProgress',
|
|
161
|
+
'LogoFull',
|
|
162
|
+
'Logomark',
|
|
163
|
+
'MAX_LEGEND_ITEMS',
|
|
164
|
+
'Menu',
|
|
165
|
+
'MonospaceTextField',
|
|
166
|
+
'NumberTextField',
|
|
167
|
+
'PinAdornment',
|
|
168
|
+
'PluggableComponent',
|
|
169
|
+
'PluggableComponents',
|
|
170
|
+
'PluggableElements',
|
|
171
|
+
'PrerenderedCanvas',
|
|
172
|
+
'ProgressChip',
|
|
173
|
+
'RefNameAutocomplete',
|
|
174
|
+
'RefNameAutocompleteEndAdornment',
|
|
175
|
+
'ReplaceCurrentViewButton',
|
|
176
|
+
'ResetToDefaultButton',
|
|
177
|
+
'ResizeHandle',
|
|
178
|
+
'SanitizedHTML',
|
|
179
|
+
'ScrollChrome',
|
|
180
|
+
'ScrollEdgeShadow',
|
|
181
|
+
'SettingsChangesTable',
|
|
182
|
+
'ShareLinkField',
|
|
183
|
+
'SingleSlider',
|
|
184
|
+
'SliderTooltip',
|
|
185
|
+
'StatusProgressBar',
|
|
186
|
+
'SubmitDialog',
|
|
187
|
+
'SubmitForm',
|
|
188
|
+
'SvgColorLegend',
|
|
189
|
+
'SvgGradientLegend',
|
|
190
|
+
'TOOLTIP_Z_INDEX',
|
|
191
|
+
'TagTextField',
|
|
192
|
+
'VIEW_HEADER_HEIGHT',
|
|
193
|
+
'VerticalScrollbar',
|
|
194
|
+
'ViewLoadingScreen',
|
|
195
|
+
'addExtensionElement',
|
|
196
|
+
'adornmentReservePx',
|
|
197
|
+
'checkboxItem',
|
|
198
|
+
'colorFwdStrand',
|
|
199
|
+
'colorInterchrom',
|
|
200
|
+
'colorLongInsert',
|
|
201
|
+
'colorLongreadInv',
|
|
202
|
+
'colorNeutralRead',
|
|
203
|
+
'colorPairLL',
|
|
204
|
+
'colorPairLR',
|
|
205
|
+
'colorPairLRDark',
|
|
206
|
+
'colorPairRL',
|
|
207
|
+
'colorPairRR',
|
|
208
|
+
'colorRevStrand',
|
|
209
|
+
'colorShortInsert',
|
|
210
|
+
'colorSplitReadInversion',
|
|
211
|
+
'colorSupplementary',
|
|
212
|
+
'colorUnmappedMate',
|
|
213
|
+
'colorUnmappedMateDark',
|
|
214
|
+
'createJBrowseBaseTheme',
|
|
215
|
+
'createJBrowseTheme',
|
|
216
|
+
'createJBrowseThemeFromArgs',
|
|
217
|
+
'defaultThemes',
|
|
218
|
+
'displayTypesWithPromotableSlots',
|
|
219
|
+
'getInputWidth',
|
|
220
|
+
'hoverBoxStyle',
|
|
221
|
+
'launchTargetsMenuItem',
|
|
222
|
+
'legendEntries',
|
|
223
|
+
'legendIsReadable',
|
|
224
|
+
'legendSwatches',
|
|
225
|
+
'makePromotableSizeMenu',
|
|
226
|
+
'makeSizeMenu',
|
|
227
|
+
'makeSizeSubMenu',
|
|
228
|
+
'matchesTrackSelector',
|
|
229
|
+
'measureLegendText',
|
|
230
|
+
'methylated5hmC',
|
|
231
|
+
'methylated5mC',
|
|
232
|
+
'misKindedPins',
|
|
233
|
+
'nonEmptyLegendSections',
|
|
234
|
+
'promotableSlotsWithoutPin',
|
|
235
|
+
'pushIntoSubMenu',
|
|
236
|
+
'pushLaunchViewMenuItem',
|
|
237
|
+
'radioItems',
|
|
238
|
+
'replaceViewAction',
|
|
239
|
+
'resolveSubMenu',
|
|
240
|
+
'sliderScale',
|
|
241
|
+
'staysOpenOnClick',
|
|
242
|
+
'tagColorPalette',
|
|
243
|
+
'unmethylated5mC',
|
|
244
|
+
'useAssemblySelection',
|
|
245
|
+
'useCopyToClipboard',
|
|
246
|
+
'useExportSvgPreference',
|
|
247
|
+
'useMouseState',
|
|
248
|
+
'useMouseTracking',
|
|
249
|
+
'useRecentLocations',
|
|
250
|
+
'wrapComponent',
|
|
251
|
+
];
|
|
252
|
+
const BASE_FEATURE_DETAIL_NAMES = [
|
|
253
|
+
'Attributes',
|
|
254
|
+
'BaseAttributes',
|
|
255
|
+
'BaseCard',
|
|
256
|
+
'BaseCoreDetails',
|
|
257
|
+
'FeatureDetails',
|
|
258
|
+
'FeatureWash',
|
|
259
|
+
];
|
|
260
|
+
export const WORKER_NAMESPACE_NAMES = {
|
|
261
|
+
'react-dom': REACT_DOM_NAMES,
|
|
262
|
+
'react-dom/client': REACT_DOM_CLIENT_NAMES,
|
|
263
|
+
'mobx-react': MOBX_REACT_NAMES,
|
|
264
|
+
'@mui/material/utils': MUI_UTILS_NAMES,
|
|
265
|
+
'@material-ui/core/utils': MUI_UTILS_NAMES,
|
|
266
|
+
'tss-react': TSS_REACT_NAMES,
|
|
267
|
+
'tss-react/mui': TSS_REACT_NAMES,
|
|
268
|
+
'@mui/material': MUI_MATERIAL_NAMES,
|
|
269
|
+
'@material-ui/core': MATERIAL_UI_CORE_NAMES,
|
|
270
|
+
'@mui/material/styles': MUI_STYLES_NAMES,
|
|
271
|
+
'@material-ui/core/styles': MUI_STYLES_NAMES,
|
|
272
|
+
'@material-ui/lab': MATERIAL_UI_LAB_NAMES,
|
|
273
|
+
'@mui/x-data-grid': DATA_GRID_NAMES,
|
|
274
|
+
'@jbrowse/core/ui': CORE_UI_NAMES,
|
|
275
|
+
// @mui/icons-material is NOT re-exported, so a plugin that wants an icon
|
|
276
|
+
// bundles icons-material, which reads `createSvgIcon` off this module. The
|
|
277
|
+
// main thread serves it (modules.ts) and the worker has to as well, or the
|
|
278
|
+
// plugin throws at module scope building its icons.
|
|
279
|
+
'@mui/material/SvgIcon': ['createSvgIcon'],
|
|
280
|
+
'@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail': BASE_FEATURE_DETAIL_NAMES,
|
|
281
|
+
};
|
|
@@ -85,46 +85,13 @@ export declare function ConfigurationSchema<const DEFINITION extends Configurati
|
|
|
85
85
|
* it as the plain object it is.
|
|
86
86
|
*
|
|
87
87
|
* Shares `TrackConfigurationReference`'s per-PluginManager cache, so hydrating
|
|
88
|
-
* the same entry twice returns the same node and
|
|
89
|
-
*
|
|
88
|
+
* the same entry twice returns the same node — and in admin/embedded sessions a
|
|
89
|
+
* track opened later resolves to that same node. A non-admin's open track does
|
|
90
|
+
* not: it resolves to the session's private working copy (ADR-032) and this is
|
|
91
|
+
* the pristine mirror beside it. The two agree in content, which is what the
|
|
92
|
+
* caller needs; `CopyConfigEntryPoints.test.ts` pins both halves.
|
|
90
93
|
*/
|
|
91
94
|
export declare function hydrateTrackConfig(pluginManager: PluginManager, config: Record<string, unknown>): AnyConfigurationModel | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* Reference to a track configuration. Snapshot output is the trackId string.
|
|
94
|
-
*
|
|
95
|
-
* One load-bearing complication: **`types.union(trackRef, schemaType)` accepts a
|
|
96
|
-
* string id OR a full config.** A view that synthesizes a track nobody else can
|
|
97
|
-
* draw — a read-vs-ref synteny band, an SV inspector row, a circular view's
|
|
98
|
-
* added track — writes the config here rather than registering it in
|
|
99
|
-
* `session.tracks`, and it then lives and dies with the track that holds it.
|
|
100
|
-
* `ReadVsRef.test.tsx` and `SVInspector.test.tsx` are the canaries.
|
|
101
|
-
*
|
|
102
|
-
* NOTE: don't add `as SCHEMATYPE` to the return value. It narrows SnapshotIn
|
|
103
|
-
* to just the object branch, forcing callers to wrap string ids in
|
|
104
|
-
* `@ts-expect-error`. The inferred union SnapshotIn is `string | SnapshotIn<schema>`.
|
|
105
|
-
*/
|
|
106
|
-
export declare function TrackConfigurationReference(schemaType: IAnyType): import("@jbrowse/mobx-state-tree").ITypeUnion<any, any, any>;
|
|
107
|
-
/**
|
|
108
|
-
* Reference to a display configuration. Looked up inside the containing track
|
|
109
|
-
* config's `displays` array. Snapshot output is the displayId string.
|
|
110
|
-
*
|
|
111
|
-
* Resolution order:
|
|
112
|
-
* 1. by displayId
|
|
113
|
-
* 2. by `parent.type` — handles old sessions where the saved displayId
|
|
114
|
-
* no longer matches but a display of the same type exists on the track
|
|
115
|
-
*
|
|
116
|
-
* Step 2 is the safety net because `baseTrackConfig.preProcessSnapshot`
|
|
117
|
-
* already injects a stub display for every registered displayType on the
|
|
118
|
-
* track, so a same-type lookup always succeeds at runtime for properly
|
|
119
|
-
* loaded tracks. An older third step auto-created a *detached* config when
|
|
120
|
-
* neither matched — that produced an orphaned MST node whose edits silently
|
|
121
|
-
* didn't persist. Removed in favor of a clear throw, since
|
|
122
|
-
* preProcessSnapshot's injection makes the path effectively dead.
|
|
123
|
-
*
|
|
124
|
-
* Union-with-schemaType branch is for the same reason as `TrackConfigurationReference`:
|
|
125
|
-
* `CircularView.addTrackConf` passes inline display configs as MST instances.
|
|
126
|
-
*/
|
|
127
|
-
export declare function DisplayConfigurationReference(schemaType: IAnyType): import("@jbrowse/mobx-state-tree").ITypeUnion<any, any, any>;
|
|
128
95
|
type ConfigReferenceInstance<SCHEMA extends AnyConfigurationSchemaType> = (SCHEMA extends ConfigurationSchemaType<infer D, any> ? IsAny<D> extends true ? any : SCHEMA['Type'] : SCHEMA['Type']) & {
|
|
129
96
|
[K in GetInheritedIdentifier<SCHEMA>]: string;
|
|
130
97
|
};
|
|
@@ -198,6 +198,17 @@ function makeConfigurationSchemaModel(modelName, schemaDefinition, options) {
|
|
|
198
198
|
.sort()
|
|
199
199
|
.join(', ')}`);
|
|
200
200
|
}
|
|
201
|
+
// MST skips its own type check in a production build, and a value the
|
|
202
|
+
// slot's union cannot take is then dropped with no throw: the write
|
|
203
|
+
// reported success and the slot kept its old value. `is` still runs
|
|
204
|
+
// there, so the guard holds in both builds.
|
|
205
|
+
if (!modelDefinition[slotName].is(value)) {
|
|
206
|
+
const declared = schemaDefinition[slotName];
|
|
207
|
+
const slotType = isSlotDefinitionEntry(declared)
|
|
208
|
+
? declared.type
|
|
209
|
+
: 'value';
|
|
210
|
+
throw new Error(`${modelName}.${slotName} is a ${slotType} slot and cannot take ${JSON.stringify(value)}`);
|
|
211
|
+
}
|
|
201
212
|
self[slotName] = value;
|
|
202
213
|
},
|
|
203
214
|
}));
|
|
@@ -239,34 +250,14 @@ export function ConfigurationSchema(modelName, inputSchemaDefinition, inputOptio
|
|
|
239
250
|
const { schemaDefinition, options } = preprocessConfigurationSchemaArguments(modelName, inputSchemaDefinition, inputOptions);
|
|
240
251
|
return makeConfigurationSchemaModel(modelName, schemaDefinition, options);
|
|
241
252
|
}
|
|
242
|
-
// The hydration cache lives on the PluginManager instance (see
|
|
243
|
-
// trackConfigHydrationCache's doc comment there and ADR-031), not as a
|
|
244
|
-
// module-level singleton: it must never hand a track resolved on one
|
|
245
|
-
// PluginManager instance a node built with another instance's env, and
|
|
246
|
-
// scoping it to the instance rules that out structurally rather than by
|
|
247
|
-
// convention. Nested a second level by schemaType, since one PluginManager
|
|
248
|
-
// registers a distinct schemaType per track type.
|
|
249
|
-
function frozenTrackHydrationCache(pluginManager, schemaType) {
|
|
250
|
-
const byType = pluginManager.trackConfigHydrationCache;
|
|
251
|
-
let cache = byType.get(schemaType);
|
|
252
|
-
if (!cache) {
|
|
253
|
-
cache = new WeakMap();
|
|
254
|
-
byType.set(schemaType, cache);
|
|
255
|
-
}
|
|
256
|
-
return cache;
|
|
257
|
-
}
|
|
258
253
|
// The frozen -> live half of TrackConfigurationReference's `get`, shared with
|
|
259
|
-
// hydrateTrackConfig below so there is one hydration
|
|
260
|
-
//
|
|
254
|
+
// hydrateTrackConfig below so there is one hydration rather than two that can
|
|
255
|
+
// drift on which env they build with. The memo it goes through belongs to the
|
|
256
|
+
// PluginManager instance (ADR-031): a node built with one instance's env must
|
|
257
|
+
// never be handed to another, and `pluginManager.hydratedTrackConfig` scopes
|
|
258
|
+
// that structurally rather than by convention.
|
|
261
259
|
function hydrateInto(pluginManager, schemaType, frozen) {
|
|
262
|
-
|
|
263
|
-
const cached = cache.get(frozen);
|
|
264
|
-
if (cached) {
|
|
265
|
-
return cached;
|
|
266
|
-
}
|
|
267
|
-
const model = schemaType.create(frozen, { pluginManager });
|
|
268
|
-
cache.set(frozen, model);
|
|
269
|
-
return model;
|
|
260
|
+
return pluginManager.hydratedTrackConfig(schemaType, frozen, () => schemaType.create(frozen, { pluginManager }));
|
|
270
261
|
}
|
|
271
262
|
/**
|
|
272
263
|
* #api core/configuration
|
|
@@ -290,8 +281,11 @@ function hydrateInto(pluginManager, schemaType, frozen) {
|
|
|
290
281
|
* it as the plain object it is.
|
|
291
282
|
*
|
|
292
283
|
* Shares `TrackConfigurationReference`'s per-PluginManager cache, so hydrating
|
|
293
|
-
* the same entry twice returns the same node and
|
|
294
|
-
*
|
|
284
|
+
* the same entry twice returns the same node — and in admin/embedded sessions a
|
|
285
|
+
* track opened later resolves to that same node. A non-admin's open track does
|
|
286
|
+
* not: it resolves to the session's private working copy (ADR-032) and this is
|
|
287
|
+
* the pristine mirror beside it. The two agree in content, which is what the
|
|
288
|
+
* caller needs; `CopyConfigEntryPoints.test.ts` pins both halves.
|
|
295
289
|
*/
|
|
296
290
|
export function hydrateTrackConfig(pluginManager, config) {
|
|
297
291
|
const type = config.type;
|
|
@@ -315,7 +309,18 @@ export function hydrateTrackConfig(pluginManager, config) {
|
|
|
315
309
|
// config snapshot (held as a standalone schema instance). Both reference kinds
|
|
316
310
|
// resolve to `schemaType` instances, so MST can't auto-dispatch on the instance
|
|
317
311
|
// side — the explicit snapshot dispatcher (string → ref, object → schema)
|
|
318
|
-
// disambiguates. Shared by TrackConfigurationReference/DisplayConfigurationReference
|
|
312
|
+
// disambiguates. Shared by TrackConfigurationReference/DisplayConfigurationReference,
|
|
313
|
+
// and by neither accident nor oversight NOT by the plain branch — see the note
|
|
314
|
+
// on it in `ConfigurationReference`.
|
|
315
|
+
//
|
|
316
|
+
// One consequence, because both refs' `set` callbacks read as if it were not
|
|
317
|
+
// true: assigning a config **node** here does not store a reference to it. The
|
|
318
|
+
// dispatcher sees a non-string and picks `schemaType`, so MST tries to adopt the
|
|
319
|
+
// node as an inline child — which throws if it already has a parent. `set` is
|
|
320
|
+
// therefore unreachable on both refs (checked by making it throw: 231 suites
|
|
321
|
+
// stayed green), and exists only because MST rejects a custom reference
|
|
322
|
+
// declaring `get` without it. The plain branch, with no dispatcher, does the
|
|
323
|
+
// opposite and stores the reference.
|
|
319
324
|
function idOrSnapshotUnion(ref, schemaType) {
|
|
320
325
|
return types.union({
|
|
321
326
|
dispatcher: snapshot => (typeof snapshot === 'string' ? ref : schemaType),
|
|
@@ -335,7 +340,7 @@ function idOrSnapshotUnion(ref, schemaType) {
|
|
|
335
340
|
* to just the object branch, forcing callers to wrap string ids in
|
|
336
341
|
* `@ts-expect-error`. The inferred union SnapshotIn is `string | SnapshotIn<schema>`.
|
|
337
342
|
*/
|
|
338
|
-
|
|
343
|
+
function TrackConfigurationReference(schemaType) {
|
|
339
344
|
const trackRef = types.reference(schemaType, {
|
|
340
345
|
get(id, parent) {
|
|
341
346
|
const session = getSession(parent);
|
|
@@ -381,15 +386,26 @@ export function TrackConfigurationReference(schemaType) {
|
|
|
381
386
|
* Step 2 is the safety net because `baseTrackConfig.preProcessSnapshot`
|
|
382
387
|
* already injects a stub display for every registered displayType on the
|
|
383
388
|
* track, so a same-type lookup always succeeds at runtime for properly
|
|
384
|
-
* loaded tracks.
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
389
|
+
* loaded tracks. It is what carries a **renamed display type** across for a
|
|
390
|
+
* catalog track: the injected stub is named for the new type, the display
|
|
391
|
+
* model's own `preProcessSnapshot` rewrites the state model's, and the saved
|
|
392
|
+
* `configuration` id still spells the old name, so only the type match
|
|
393
|
+
* reconnects them. Not every pre-rename session reaches it — a track config
|
|
394
|
+
* that itself declares the old display entry keeps that entry's `displayId`
|
|
395
|
+
* through the alias rewrite (`{ ...d, type: canonical }`) and wins the
|
|
396
|
+
* first-wins dedupe, so its session resolves by id. An older third step
|
|
397
|
+
* auto-created a *detached* config when neither matched — that produced an
|
|
398
|
+
* orphaned MST node whose edits silently didn't persist. Removed in favor of a
|
|
399
|
+
* clear throw.
|
|
388
400
|
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
401
|
+
* The union's schemaType branch is symmetry with `TrackConfigurationReference`
|
|
402
|
+
* rather than a path anything in tree takes: the two production writers,
|
|
403
|
+
* `showTrackGeneric` and `BaseTrackModel.replaceDisplay`, both write a
|
|
404
|
+
* displayId string, because a display config belongs in its track config's
|
|
405
|
+
* `displays` array. It stays because it costs nothing and because dropping it
|
|
406
|
+
* narrows `SnapshotIn` for every caller.
|
|
391
407
|
*/
|
|
392
|
-
|
|
408
|
+
function DisplayConfigurationReference(schemaType) {
|
|
393
409
|
const displayRef = types.reference(schemaType, {
|
|
394
410
|
get(id, parent) {
|
|
395
411
|
// track.configuration is a hydrated MST node (hydrated lazily via
|
|
@@ -443,9 +459,17 @@ export function ConfigurationReference(schemaType) {
|
|
|
443
459
|
? TrackConfigurationReference(schemaType)
|
|
444
460
|
: id === 'displayId'
|
|
445
461
|
? DisplayConfigurationReference(schemaType)
|
|
446
|
-
: // Plain (non-track/display) ref
|
|
447
|
-
//
|
|
448
|
-
//
|
|
462
|
+
: // Plain (non-track/display) ref — internet accounts, connections —
|
|
463
|
+
// resolved by MST's own identifier lookup rather than through the
|
|
464
|
+
// session. **Deliberately not `idOrSnapshotUnion`**, even though it is
|
|
465
|
+
// the same two members: this branch is also handed a *live, in-tree*
|
|
466
|
+
// config node (`initializeInternetAccount` pushes
|
|
467
|
+
// `jbrowse.internetAccounts[i]` straight through), and an undispatched
|
|
468
|
+
// union sends that to the reference member because
|
|
469
|
+
// `BaseReferenceType.isAssignableFrom` defers to its target type. A
|
|
470
|
+
// `typeof snapshot === 'string'` dispatcher sends it to the schema
|
|
471
|
+
// member instead, and MST refuses to adopt a node that already has a
|
|
472
|
+
// parent. `InternetAccounts.test.ts` is the canary.
|
|
449
473
|
types.union(types.reference(schemaType), schemaType);
|
|
450
474
|
return ref;
|
|
451
475
|
}
|
|
@@ -15,5 +15,5 @@ export { toCallbackValue, toFixedValue } from './configurationSlot.ts';
|
|
|
15
15
|
export { getSlotDefinition, isConfigurationSlot, makeSlotFacade, preProcessSlotValues, slotChoices, } from './slotFacade.ts';
|
|
16
16
|
export type { SlotFacade } from './slotFacade.ts';
|
|
17
17
|
export type { ResolvableDisplay } from './promotableResolve.ts';
|
|
18
|
-
export { clearPromotedDefaults, getDisplayTypeDefaultChanges, isSlotCustomized, makePin, getConfigSnapshotWithPromotables, getTrackConfigWithPromotables, } from './promotableDefaults.ts';
|
|
19
|
-
export type { Pin, ResolvedConfigSnapshot, TrackConfigWithPromotables, } from './promotableDefaults.ts';
|
|
18
|
+
export { clearPromotedDefaults, getDisplayTypeDefaultChanges, isSlotCustomized, makePin, makeTogglePin, getConfigSnapshotWithPromotables, getTrackConfigWithPromotables, } from './promotableDefaults.ts';
|
|
19
|
+
export type { Pin, ResolvedConfigSnapshot, TogglePin, TrackConfigWithPromotables, ValuePin, } from './promotableDefaults.ts';
|
|
@@ -16,4 +16,4 @@ export { tabixIndexFields } from './tabixIndexFields.js';
|
|
|
16
16
|
export { evaluateJexl, isCallbackValue } from './slotValueUtils.js';
|
|
17
17
|
export { toCallbackValue, toFixedValue } from './configurationSlot.js';
|
|
18
18
|
export { getSlotDefinition, isConfigurationSlot, makeSlotFacade, preProcessSlotValues, slotChoices, } from './slotFacade.js';
|
|
19
|
-
export { clearPromotedDefaults, getDisplayTypeDefaultChanges, isSlotCustomized, makePin, getConfigSnapshotWithPromotables, getTrackConfigWithPromotables, } from './promotableDefaults.js';
|
|
19
|
+
export { clearPromotedDefaults, getDisplayTypeDefaultChanges, isSlotCustomized, makePin, makeTogglePin, getConfigSnapshotWithPromotables, getTrackConfigWithPromotables, } from './promotableDefaults.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TrackConfigChange } from '../util/trackConfigDelta.ts';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TogglePin, ValuePin } from './promotablePin.ts';
|
|
3
3
|
import type { PromotedDefaultStore, ResolvableDisplay } from './promotableResolve.ts';
|
|
4
4
|
import type { AnyConfigurationModel, ConfigurationSchemaForModel, ConfigurationSlotName, ConfigurationSlotValueResolved } from './types.ts';
|
|
5
|
-
export type { Pin } from './promotablePin.ts';
|
|
5
|
+
export type { Pin, TogglePin, ValuePin } from './promotablePin.ts';
|
|
6
6
|
/**
|
|
7
7
|
* #api core/configuration
|
|
8
8
|
* Whether this track has customized the slot (holds a non-default value of its
|
|
@@ -11,10 +11,10 @@ export type { Pin } from './promotablePin.ts';
|
|
|
11
11
|
* base instead reads as at-default for a track merely *following* a non-base
|
|
12
12
|
* promoted default, so the reset control lights up on a no-op.
|
|
13
13
|
*
|
|
14
|
-
* `SLOT` is constrained the way `getConf`'s is
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* `SLOT` is constrained the way `getConf`'s is, and a widened `self` switches
|
|
15
|
+
* the check off (`HostChecksSlotNames`). A slot name the schema does not
|
|
16
|
+
* declare throws at the first read (`getSlotDefinition`), and a declared but
|
|
17
|
+
* non-promotable one throws in `resolveSlotIn`.
|
|
18
18
|
*/
|
|
19
19
|
export declare function isSlotCustomized<CONFMODEL extends AnyConfigurationModel, SLOT extends ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>>>(self: ResolvableDisplay<CONFMODEL>, slot: SLOT): boolean;
|
|
20
20
|
declare const promotablesResolved: unique symbol;
|
|
@@ -149,20 +149,22 @@ export declare function isPromotableDefault(self: ResolvableDisplay, slot: strin
|
|
|
149
149
|
export declare function applySlotToOpenTracks(displays: ResolvableDisplay[], slot: string, value: unknown): void;
|
|
150
150
|
/**
|
|
151
151
|
* #api core/configuration
|
|
152
|
-
* The pin
|
|
153
|
-
* display type", and — via the snackbar it raises — "keep it as the
|
|
154
|
-
* the ones opened later".
|
|
152
|
+
* The pin on a radio or slider row: "apply this value to every open track of
|
|
153
|
+
* this display type", and — via the snackbar it raises — "keep it as the
|
|
154
|
+
* default for the ones opened later".
|
|
155
155
|
*
|
|
156
156
|
* `value` chooses between the subsystem's two meanings, which are otherwise
|
|
157
157
|
* identical:
|
|
158
158
|
*
|
|
159
|
-
* - **Give it** for a per-value pin — "make *
|
|
160
|
-
* what the track currently shows. Use on an always-visible pin
|
|
161
|
-
* promote a meaningless value, and so two rows sharing one
|
|
162
|
-
*
|
|
159
|
+
* - **Give it** for a per-value pin — "make *compact* the default" —
|
|
160
|
+
* independent of what the track currently shows. Use on an always-visible pin
|
|
161
|
+
* so it can never promote a meaningless value, and so two rows sharing one
|
|
162
|
+
* slot (sashimi `'down'` vs `'auto'`) stay independent.
|
|
163
163
|
* - **Omit it** for "whatever I'm showing", resolved through the cascade. Use for
|
|
164
|
-
* a
|
|
165
|
-
*
|
|
164
|
+
* a continuous setting where no fixed on-value makes sense (wiggle point size,
|
|
165
|
+
* arc line width).
|
|
166
|
+
*
|
|
167
|
+
* A checkbox row takes neither: {@link makeTogglePin}.
|
|
166
168
|
*
|
|
167
169
|
* One function with an optional argument, rather than the two exported builders
|
|
168
170
|
* it replaces — a per-value one and a `…CurrentValue…` one, the second of which
|
|
@@ -172,7 +174,40 @@ export declare function applySlotToOpenTracks(displays: ResolvableDisplay[], slo
|
|
|
172
174
|
*/
|
|
173
175
|
export declare function makePin<CONFMODEL extends AnyConfigurationModel, SLOT extends ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>>>(self: ResolvableDisplay<CONFMODEL>, slot: SLOT, ...value: [] | [
|
|
174
176
|
ConfigurationSlotValueResolved<ConfigurationSchemaForModel<CONFMODEL>, SLOT>
|
|
175
|
-
]):
|
|
177
|
+
]): ValuePin;
|
|
178
|
+
/**
|
|
179
|
+
* The two states a checkbox row moves a slot between. Omitted for a
|
|
180
|
+
* `maybeBoolean` slot, where they are `true` and `false`; required for a
|
|
181
|
+
* two-member enum (`linkedReads`: "View as pairs" toggles `'normal'`/`'off'`).
|
|
182
|
+
* A slot with three or more members is a radio group, not a checkbox per
|
|
183
|
+
* member — `readConnections` was two checkboxes over one slot, and the
|
|
184
|
+
* unticked one's pin wrote the whole slot under a label naming only itself.
|
|
185
|
+
*/
|
|
186
|
+
export interface ToggleStates<T> {
|
|
187
|
+
on: T;
|
|
188
|
+
off: T;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* #api core/configuration
|
|
192
|
+
* The pin on a checkbox row: the row's own checkbox, acting on every open track
|
|
193
|
+
* of the display type. `active` mirrors the row, so the pin draws filled
|
|
194
|
+
* exactly when the box is ticked; a click flips the row's state on every open
|
|
195
|
+
* track and offers the new state as the display type's default. It never
|
|
196
|
+
* clears a default the way {@link makePin}'s filled pin does — flipping back
|
|
197
|
+
* and taking the offer promotes the other value, and promoting the base value
|
|
198
|
+
* clears the default (`applyAndOfferDefault`).
|
|
199
|
+
*
|
|
200
|
+
* Replaces a symmetric `makePin(self, slot)` on these rows, which carried the
|
|
201
|
+
* row's current state: beside an unchecked box that applied *off* everywhere
|
|
202
|
+
* and visibly did nothing. It also replaces the per-value `makePin` a checkbox
|
|
203
|
+
* row over a shared enum slot used to carry, which gave two checkbox rows in
|
|
204
|
+
* one submenu two different pins: one filled when its value was promoted and
|
|
205
|
+
* clearing on a second click, the other filled when the box was ticked and
|
|
206
|
+
* flipping. With `states`, a checkbox row is always the toggle kind.
|
|
207
|
+
*/
|
|
208
|
+
export declare function makeTogglePin<CONFMODEL extends AnyConfigurationModel, SLOT extends ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>>>(self: ResolvableDisplay<CONFMODEL>, slot: SLOT, ...states: ConfigurationSlotValueResolved<ConfigurationSchemaForModel<CONFMODEL>, SLOT> extends boolean ? [] | [ToggleStates<boolean>] : [
|
|
209
|
+
ToggleStates<ConfigurationSlotValueResolved<ConfigurationSchemaForModel<CONFMODEL>, SLOT>>
|
|
210
|
+
]): TogglePin;
|
|
176
211
|
/**
|
|
177
212
|
* #api core/configuration
|
|
178
213
|
* Effective differences a track following the default inherits from session-wide
|
|
@@ -189,9 +224,9 @@ export declare function getDisplayTypeDefaultChanges(self: ResolvableDisplay): T
|
|
|
189
224
|
*
|
|
190
225
|
* **`slots` is required, and an all-slots default is not the convenience it
|
|
191
226
|
* looks like.** It reaches further than any list a dialog can have shown: a
|
|
192
|
-
* promoted default the track *customized* over
|
|
193
|
-
*
|
|
194
|
-
*
|
|
227
|
+
* promoted default the track *customized* over is `inherited: false` and so
|
|
228
|
+
* appears in no row, yet still governs sibling tracks — so clearing it from a
|
|
229
|
+
* dialog that never showed
|
|
195
230
|
* it moves tracks other than the one whose badge was clicked. Clearing every
|
|
196
231
|
* promoted default at once is a preferences-scope action, and Preferences →
|
|
197
232
|
* "Reset to defaults" is where it lives (`clearPreferenceOverrides`).
|