@trdrs/quickcharts 5.10.0 → 5.11.1
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/CHANGELOG.md +8 -0
- package/README.md +10 -4
- package/dist/{chunk-U4W26DXU.js → chunk-HXTXZZW2.js} +3 -2
- package/dist/chunk-HXTXZZW2.js.map +1 -0
- package/dist/feature-manifest.json +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/{symbols-BxtRs6Uu.d.ts → symbols-BNiSiVlq.d.ts} +4 -2
- package/dist/symbols.d.ts +1 -1
- package/dist/symbols.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-U4W26DXU.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@ A pane's own buttons at its top right are where a pane is moved, collapsed and m
|
|
|
6
6
|
|
|
7
7
|
The indicator settings dialog stands in the drawing dialog's frame, with its fields: Inputs, Style and Visibility pages, then a Defaults menu, Cancel and Ok. Every edit previews on the chart at once, and Ok commits the session as one `chart.indicators.update`, so it is one step of the chart's history; Cancel, Escape, the corner close and a press outside put the indicator back. The dialog lays out any definition from its manifest. `ManifestInput` gains `title`, the words it is labelled with, `group`, the heading it stands under with the inputs beside it that name the same group, `step`, `enabledWhen`, the values of another input under which it applies (it stands disabled under the others), and the kind `bool`, a switch held as 1 or 0. `ManifestPlot`, `ManifestLevel` and `ManifestFill` gain `title`. The Style page shows every plot, level and fill behind the checkbox that shows it, with its color and its line, a level with its value and a plot drawn in two colors with a row for each, then the values the indicator writes on the price scale and in the status line. The Visibility page holds the drawing dialog's timeframe ranges, and `IndicatorOverrides.visibility` keeps an indicator off the timeframes it leaves out while its legend row stays. The Defaults menu resets the indicator to its definition's own settings, or keeps its inputs and look, in the chart's storage, as the ones the definition's next instance opens with when it is added with no inputs and no overrides of its own. The built-ins title and group their inputs as their settings show them, hold a switch where they held a No and Yes list, and read their sources as Close, Open, High, Low, (H + L)/2, (H + L + C)/3 and (O + H + L + C)/4. The legend's input readout leaves out a switch and an input that does not apply, and the inputs-only editor holds the dialog's Inputs page. The catalog gains `settings.growing`, `settings.falling`, `settings.outputValues`, `settings.inputValues`, `settings.valuesInStatusLine`, `settings.inputsInStatusLine`, `settings.defaults`, `settings.resetSettings`, `settings.saveAsDefault` and `settings.indicatorPinnedNote`.
|
|
8
8
|
|
|
9
|
+
## 5.11.1
|
|
10
|
+
|
|
11
|
+
A symbol whose ticker is a slash pair after its exchange prefix (`KRAKEN:BTC/USD`) reads as its pair, before it resolves and after: `BTCUSD` as its mark and `BTC / USD` as its title and description, where it read `KRAKEN:BTC/USD` and `KRAKEN:BTC/ / USD`. A slash pair states both sides, so its quote is the one it writes rather than the feed currency taken off its end. `bareTicker` sheds that prefix (`BTC/USD`); a ratio whose divisor is a number (`NYSE:F/2`) and a spread keep their whole expression.
|
|
12
|
+
|
|
13
|
+
## 5.11.0
|
|
14
|
+
|
|
15
|
+
`SymbolSearchOptions.scope`: the symbol search a page opens on its own, `openSymbolSearch` and `mountSymbolSearch`, offers a search scope as a chart's `search.scope` does, a toggle chip at the far edge of the class strip that limits the search to the scope's `search` and lists its `recents`. It is read once as the picker opens, and null offers none.
|
|
16
|
+
|
|
9
17
|
## 5.10.0
|
|
10
18
|
|
|
11
19
|
The legend's market status, its popup, the session shading and the trading-hours choice read each market from its own session facts. A `24x7` symbol is always open, offers no choice and shades nothing. A symbol with no subsessions has one weekly session: it offers no choice and shades nothing, and its status is open or closed with a countdown. An electronic day, a `regular` subsession that differs from the symbol's `session`, which then states the whole electronic trading day (`SessionModel.electronic`), classifies every stretch outside regular hours as `extended` and reads the whole day as open in the status, the timeline and the countdown; it offers Electronic trading hours and Regular trading hours, and shades every stretch outside regular hours in the one color of `symbol.electronicColor`. A split day states its regular hours as `session` with pre-market and post-market around them, and offers Regular, Extended and, for a symbol that declares the new `overnight` subsession (`SubsessionId`, read from a UDF feed too), 24 hours, which is `symbol.session` of `allHours` and shades the overnight stretch in the night color. A closed trading day the symbol lists in `sessionHolidays` with no correction is a holiday (`MarketStatus.holiday`).
|
package/README.md
CHANGED
|
@@ -335,6 +335,7 @@ perp.description // 'ETH / USDC'
|
|
|
335
335
|
symbolNames({ symbol: 'NASDAQ:AAPL', name: 'Apple Inc', exchange: 'NASDAQ', type: 'stock', currencyCode: 'USD' }).mark // 'AAPL'
|
|
336
336
|
symbolNames({ symbol: 'NASDAQ:AAPL', name: 'Apple Inc', exchange: 'NASDAQ', type: 'stock', currencyCode: 'USD' }).description // 'Apple Inc'
|
|
337
337
|
symbolNames('HYPERLIQUID:ETH').mark // 'ETH', before the symbol resolves
|
|
338
|
+
symbolNames('KRAKEN:BTC/USD').title // 'BTC / USD': a slash pair states both sides
|
|
338
339
|
```
|
|
339
340
|
|
|
340
341
|
One exchange prefix comes off a symbol on its own. Where your feed writes a symbol that says more,
|
|
@@ -357,6 +358,8 @@ import { bareTicker, symbolNames } from '@trdrs/quickcharts/symbols'
|
|
|
357
358
|
|
|
358
359
|
symbolNames({ symbol: 'HYPERLIQUID:BTC', name: 'Bitcoin perpetual', exchange: 'Hyperliquid', type: 'crypto', currencyCode: 'USDC' }).title // 'BTC / USDC'
|
|
359
360
|
bareTicker('CME:ES1!') // 'ES1!'
|
|
361
|
+
bareTicker('KRAKEN:BTC/USD') // 'BTC/USD'
|
|
362
|
+
bareTicker('NYSE:F/2') // 'NYSE:F/2': a ratio keeps its whole expression
|
|
360
363
|
```
|
|
361
364
|
|
|
362
365
|
Symbology is display truth: how the chart writes a market's prices. Execution facts, such as lot
|
|
@@ -2950,7 +2953,8 @@ the dialog searches your datafeed and leads with the chart's recents.
|
|
|
2950
2953
|
Pressing the chip asks the other source the query and classes the dialog holds, and an answer that
|
|
2951
2954
|
arrives for the state the viewer left is dropped. A pick is recorded in `search.recents` either way,
|
|
2952
2955
|
and in the scope's `recents` too while the chip is on. The compare dialog, adding a comparison or
|
|
2953
|
-
changing one, offers no scope and searches your datafeed.
|
|
2956
|
+
changing one, offers no scope and searches your datafeed. `openSymbolSearch` and `mountSymbolSearch`
|
|
2957
|
+
take the same `scope`, read once as the picker opens.
|
|
2954
2958
|
|
|
2955
2959
|
| Field | What it is |
|
|
2956
2960
|
|---|---|
|
|
@@ -3058,17 +3062,18 @@ A page that picks a market where no chart is mounted opens the same dialog the c
|
|
|
3058
3062
|
opens, over the same controller, grammar, recents rule and symbol names. `openSymbolSearch` stands
|
|
3059
3063
|
it over the page; `mountSymbolSearch` builds it bare into a box you own and position. Both take what
|
|
3060
3064
|
you already give a chart: the feed, the mode, the language, the classes and their names, the marks,
|
|
3061
|
-
|
|
3062
|
-
to set.
|
|
3065
|
+
where recents are kept, and a search scope. Picking hands the symbol back and closes, because there
|
|
3066
|
+
is no chart here to set.
|
|
3063
3067
|
|
|
3064
3068
|
`createSymbolSearchCache` keeps one feed's catalog warm between opens, so the next picker a page
|
|
3065
3069
|
opens stands on pages the viewer already saw rather than on a loading line.
|
|
3066
3070
|
|
|
3067
3071
|
```ts
|
|
3068
|
-
import { createSymbolSearchCache, createUdfDatafeed, mountSymbolSearch, openSymbolSearch } from '@trdrs/quickcharts'
|
|
3072
|
+
import { createSymbolSearchCache, createUdfDatafeed, mountSymbolSearch, openSymbolSearch, type SearchScope } from '@trdrs/quickcharts'
|
|
3069
3073
|
|
|
3070
3074
|
declare const pickerBox: HTMLElement
|
|
3071
3075
|
declare const form: { setInstrument(symbol: string): void }
|
|
3076
|
+
declare const selectedWatchlist: () => SearchScope | null
|
|
3072
3077
|
|
|
3073
3078
|
const searchFeed = createUdfDatafeed({ baseUrl: 'https://feed.example.com/udf' })
|
|
3074
3079
|
const catalog = createSymbolSearchCache({ datafeed: searchFeed, pageSize: 50 })
|
|
@@ -3081,6 +3086,7 @@ const picker = openSymbolSearch({
|
|
|
3081
3086
|
classes: ['future', 'crypto'],
|
|
3082
3087
|
classNames: { future: 'Futures', crypto: 'Crypto' },
|
|
3083
3088
|
query: 'ES', // opens holding it, selected
|
|
3089
|
+
scope: selectedWatchlist, // a chip that limits the search to the watchlist, read as the picker opens
|
|
3084
3090
|
onPick: (symbol) => form.setInstrument(symbol),
|
|
3085
3091
|
})
|
|
3086
3092
|
picker.close() // or the viewer closes it: the X, the scrim, Escape
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/symbolLabel.ts
|
|
2
2
|
function bareTicker(symbol) {
|
|
3
|
-
return /^[A-Za-z][A-Za-z0-9._-]*:([A-Za-z0-9][A-Za-z0-9._!]*)$/.exec(symbol)?.[1] ?? symbol;
|
|
3
|
+
return /^[A-Za-z][A-Za-z0-9._-]*:([A-Za-z0-9][A-Za-z0-9._!]*|[A-Za-z][A-Za-z0-9.]*\/[A-Za-z][A-Za-z0-9.]*)$/.exec(symbol)?.[1] ?? symbol;
|
|
4
4
|
}
|
|
5
5
|
var SLASH_PAIR = /^[A-Za-z][A-Za-z0-9.]*\/[A-Za-z][A-Za-z0-9.]*$/;
|
|
6
6
|
function symbolLabel(symbol) {
|
|
@@ -12,6 +12,7 @@ function pairLabel(ticker, type, currencyCode) {
|
|
|
12
12
|
const quote = currencyCode?.trim();
|
|
13
13
|
if (!quote || !PAIR_MARKETS.has(type.toLowerCase())) return null;
|
|
14
14
|
const bare = bareTicker(ticker);
|
|
15
|
+
if (SLASH_PAIR.test(bare)) return bare.replace("/", " / ");
|
|
15
16
|
const base = bare.length > quote.length && bare.toUpperCase().endsWith(quote.toUpperCase()) ? bare.slice(0, -quote.length) : bare;
|
|
16
17
|
return base && base.toUpperCase() !== quote.toUpperCase() ? `${base} / ${quote}` : null;
|
|
17
18
|
}
|
|
@@ -38,4 +39,4 @@ export {
|
|
|
38
39
|
bareTicker,
|
|
39
40
|
symbolNames
|
|
40
41
|
};
|
|
41
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-HXTXZZW2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/symbolLabel.ts"],"sourcesContent":["// How a symbol is WRITTEN on screen: one rule, three faces, kept in one file so they cannot drift.\n// The toolbar pill wears the compact mark, the legend wears the title, and a search row wears the\n// mark beside the description. Every face drops the venue prefix, which is feed identity rather\n// than anything a viewer reads, and every surface that names a market, in this package or over it,\n// reads the same faces from `symbolNames`.\nimport type { SymbolRow } from './datafeed'\nimport type { SymbolInfo } from './symbology'\n\n/** The ticker inside a feed symbol. Only a well-formed `VENUE:TICKER` sheds its prefix, a ticker\n * written as a slash pair included (`KRAKEN:BTC/USD` reads `BTC/USD`); a spread expression, a ratio\n * such as `NYSE:F/2`, or anything else the pattern does not admit, is its own label and passes\n * through. */\nexport function bareTicker(symbol: string): string {\n return /^[A-Za-z][A-Za-z0-9._-]*:([A-Za-z0-9][A-Za-z0-9._!]*|[A-Za-z][A-Za-z0-9.]*\\/[A-Za-z][A-Za-z0-9.]*)$/.exec(symbol)?.[1] ?? symbol\n}\n\n/** A ticker written as a slash pair (`BTC/USD`): catalog identity that already says what it is\n * priced in. A reciprocal expression (`1/ES`) starts with a digit and is not one. */\nconst SLASH_PAIR = /^[A-Za-z][A-Za-z0-9.]*\\/[A-Za-z][A-Za-z0-9.]*$/\n\n/** Compact presentation of one symbol. Feed identity and spread expressions stay untouched. */\nexport function symbolLabel(symbol: string): string {\n const ticker = bareTicker(symbol)\n return SLASH_PAIR.test(ticker) ? ticker.replace('/', '') : ticker\n}\n\n/** The markets whose symbols ARE a pair: one thing priced in another, where the ticker alone says\n * what is being bought but not what it is priced in. Those read as `BASE / QUOTE`.\n *\n * Every other market is deliberately absent. Nearly every symbol carries a `currencyCode`, so the\n * gate cannot be \"has a currency\": a share quoted in dollars is not a pair, and `AAPL / USD` would\n * claim one that does not exist. */\nconst PAIR_MARKETS = new Set(['crypto', 'forex'])\n\n/** `BASE / QUOTE` for a pair market, or null for anything that is not one.\n *\n * A ticker written as a slash pair (`BTC/USD`) states both sides itself and reads as written. Any\n * other takes its quote from the feed's own currency; a ticker that already carries it as a suffix\n * (`BTCUSDT`, `EURUSD`) sheds it rather than repeating it, and the base is whatever the ticker\n * states, so an inverted quotation reads the way it is written. */\nexport function pairLabel(ticker: string, type: string, currencyCode: string | undefined): string | null {\n const quote = currencyCode?.trim()\n if (!quote || !PAIR_MARKETS.has(type.toLowerCase())) return null\n const bare = bareTicker(ticker)\n if (SLASH_PAIR.test(bare)) return bare.replace('/', ' / ')\n const base = bare.length > quote.length && bare.toUpperCase().endsWith(quote.toUpperCase()) ? bare.slice(0, -quote.length) : bare\n return base && base.toUpperCase() !== quote.toUpperCase() ? `${base} / ${quote}` : null\n}\n\n/** The three ways one market is written, from one rule. */\nexport interface SymbolNames {\n /** The compact mark a label wears at a glance: a pair closed up (`BTCUSDC`, `EURUSD`), otherwise\n * the bare ticker (`ES1!`, `AAPL`). A spread expression is its own mark, operators and all. */\n mark: string\n /** The title a reading wears: a pair spaced (`BTC / USDC`), otherwise the feed's short name where\n * it stated one apart from the description, otherwise the bare ticker. */\n title: string\n /** The description beside a mark: a pair spaced, otherwise the feed's long description, otherwise\n * the bare ticker, so a market never repeats its own mark for want of a name. */\n description: string\n}\n\n/** The facts the rule reads, in one shape whatever the surface holds. */\ninterface Facts {\n ticker: string\n type: string\n shortName: string\n longName: string\n currencyCode: string | undefined\n}\n\nfunction factsOf(symbol: SymbolInfo | SymbolRow | string): Facts {\n if (typeof symbol === 'string') return { ticker: symbol, type: '', shortName: '', longName: '', currencyCode: undefined }\n // A search row states one name, the long one; a resolved symbol states a short name beside its\n // description, and a short name that merely repeats the description has not been given.\n if ('symbol' in symbol) return { ticker: symbol.ticker?.trim() || symbol.symbol, type: symbol.type, shortName: '', longName: symbol.name.trim(), currencyCode: symbol.currencyCode }\n const name = symbol.name.trim()\n const description = symbol.description.trim()\n return { ticker: symbol.ticker, type: symbol.type, shortName: name !== description ? name : '', longName: description, currencyCode: symbol.currencyCode }\n}\n\n/** How a market is named, from a resolved `SymbolInfo`, a search row, or the feed symbol alone\n * before either has landed.\n *\n * A pair market reads as `BTC / USDC` or `EUR / USD`, both sides in the codes the market itself\n * trades in, never a spelled-out currency name. The quote comes from `currencyCode`, and a ticker\n * written as a slash pair (`BTC/USD`) needs no currency to say so. Before a symbol resolves there\n * is no pair to write, so the bare ticker stands on its own rather than guessing at a quote. A\n * market that is not a pair keeps the feed's own words: the short name as its title, the long\n * description beside its mark. */\nexport function symbolNames(symbol: SymbolInfo | SymbolRow | string): SymbolNames {\n const facts = factsOf(symbol)\n if (facts.type.toLowerCase() === 'spread') return { mark: facts.ticker, title: facts.ticker, description: facts.ticker }\n const bare = bareTicker(facts.ticker)\n const pair = pairLabel(facts.ticker, facts.type, facts.currencyCode) ?? (SLASH_PAIR.test(bare) ? bare.replace('/', ' / ') : null)\n return {\n mark: pair ? pair.replace(' / ', '') : symbolLabel(facts.ticker),\n title: pair ?? (facts.shortName || bare),\n description: pair ?? (facts.longName || bare),\n }\n}\n"],"mappings":";AAYO,SAAS,WAAW,QAAwB;AACjD,SAAO,sGAAsG,KAAK,MAAM,IAAI,CAAC,KAAK;AACpI;AAIA,IAAM,aAAa;AAGZ,SAAS,YAAY,QAAwB;AAClD,QAAM,SAAS,WAAW,MAAM;AAChC,SAAO,WAAW,KAAK,MAAM,IAAI,OAAO,QAAQ,KAAK,EAAE,IAAI;AAC7D;AAQA,IAAM,eAAe,oBAAI,IAAI,CAAC,UAAU,OAAO,CAAC;AAQzC,SAAS,UAAU,QAAgB,MAAc,cAAiD;AACvG,QAAM,QAAQ,cAAc,KAAK;AACjC,MAAI,CAAC,SAAS,CAAC,aAAa,IAAI,KAAK,YAAY,CAAC,EAAG,QAAO;AAC5D,QAAM,OAAO,WAAW,MAAM;AAC9B,MAAI,WAAW,KAAK,IAAI,EAAG,QAAO,KAAK,QAAQ,KAAK,KAAK;AACzD,QAAM,OAAO,KAAK,SAAS,MAAM,UAAU,KAAK,YAAY,EAAE,SAAS,MAAM,YAAY,CAAC,IAAI,KAAK,MAAM,GAAG,CAAC,MAAM,MAAM,IAAI;AAC7H,SAAO,QAAQ,KAAK,YAAY,MAAM,MAAM,YAAY,IAAI,GAAG,IAAI,MAAM,KAAK,KAAK;AACrF;AAwBA,SAAS,QAAQ,QAAgD;AAC/D,MAAI,OAAO,WAAW,SAAU,QAAO,EAAE,QAAQ,QAAQ,MAAM,IAAI,WAAW,IAAI,UAAU,IAAI,cAAc,OAAU;AAGxH,MAAI,YAAY,OAAQ,QAAO,EAAE,QAAQ,OAAO,QAAQ,KAAK,KAAK,OAAO,QAAQ,MAAM,OAAO,MAAM,WAAW,IAAI,UAAU,OAAO,KAAK,KAAK,GAAG,cAAc,OAAO,aAAa;AACnL,QAAM,OAAO,OAAO,KAAK,KAAK;AAC9B,QAAM,cAAc,OAAO,YAAY,KAAK;AAC5C,SAAO,EAAE,QAAQ,OAAO,QAAQ,MAAM,OAAO,MAAM,WAAW,SAAS,cAAc,OAAO,IAAI,UAAU,aAAa,cAAc,OAAO,aAAa;AAC3J;AAWO,SAAS,YAAY,QAAsD;AAChF,QAAM,QAAQ,QAAQ,MAAM;AAC5B,MAAI,MAAM,KAAK,YAAY,MAAM,SAAU,QAAO,EAAE,MAAM,MAAM,QAAQ,OAAO,MAAM,QAAQ,aAAa,MAAM,OAAO;AACvH,QAAM,OAAO,WAAW,MAAM,MAAM;AACpC,QAAM,OAAO,UAAU,MAAM,QAAQ,MAAM,MAAM,MAAM,YAAY,MAAM,WAAW,KAAK,IAAI,IAAI,KAAK,QAAQ,KAAK,KAAK,IAAI;AAC5H,SAAO;AAAA,IACL,MAAM,OAAO,KAAK,QAAQ,OAAO,EAAE,IAAI,YAAY,MAAM,MAAM;AAAA,IAC/D,OAAO,SAAS,MAAM,aAAa;AAAA,IACnC,aAAa,SAAS,MAAM,YAAY;AAAA,EAC1C;AACF;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChartDatafeed, M as MarkIconId, F as FeedBar, S as SymbolRow, D as DatafeedSearchOptions, a as SearchPage, b as SearchClassNode } from './symbols-
|
|
2
|
-
export { B as BarMark, c as BarsEvent, d as DatafeedConfig, e as FeedUnavailableError, H as HistoryPage, f as MarkColor, g as MarkColorPair, h as MarkColorRole, i as MarkLine, j as MarkLineStyle, k as MarkPlacement, l as MarkShape, O as OlderPageVerdict, P as PricesHandlers, m as SubscribeHandlers, n as SymbolNames, o as SymbolPrices, T as TimescaleMark, p as olderPageVerdict, s as symbolNames } from './symbols-
|
|
1
|
+
import { C as ChartDatafeed, M as MarkIconId, F as FeedBar, S as SymbolRow, D as DatafeedSearchOptions, a as SearchPage, b as SearchClassNode } from './symbols-BNiSiVlq.js';
|
|
2
|
+
export { B as BarMark, c as BarsEvent, d as DatafeedConfig, e as FeedUnavailableError, H as HistoryPage, f as MarkColor, g as MarkColorPair, h as MarkColorRole, i as MarkLine, j as MarkLineStyle, k as MarkPlacement, l as MarkShape, O as OlderPageVerdict, P as PricesHandlers, m as SubscribeHandlers, n as SymbolNames, o as SymbolPrices, T as TimescaleMark, p as olderPageVerdict, s as symbolNames } from './symbols-BNiSiVlq.js';
|
|
3
3
|
import { ao as en, C as ChartMessageKey, W as TimeframeVisibility, G as GlyphSourcePort, M as MagnetMode, d as CursorMode, Q as TextEditFrame, N as TextDraft, L as LineStyle, I as IDrawing, m as DrawingCounts, D as DrawingStyle, $ as VisibilityPreset, X as ToolPreset, Y as ToolTemplate, S as SerializedDrawing, o as DrawingPreferences, l as DrawingAssetPort } from './assets-_zQbuobs.js';
|
|
4
4
|
import { b as ResourceRef, C as ChartSaveLoadAdapter, q as ChartMeta, t as ChartBody, h as DrawingResourceContext, R as ResourceStore, u as DrawingsMeta, j as DrawingsBody, T as TemplateMeta, a as TemplateBody, v as LayoutMeta, w as LayoutBody, e as DrawingContextKind } from './resources-XglhzzW0.js';
|
|
5
5
|
export { c as ChartLocalDrawingContext, D as DRAWING_CONTEXT_VERSION, d as DRAWING_DOCUMENT_VERSION, f as DrawingEntry, g as DrawingGroup, i as DrawingTombstone, L as LayoutSharedDrawingContext, M as MemoryResourcesOptions, x as ResourceAbortError, S as SymbolGlobalDrawingContext, y as TemplateKind, W as WriteOutcome, k as drawingContextKey, l as emptyDrawingDocument, m as liveDrawingEntries, n as liveDrawingGroups, z as memorySaveLoadAdapter, o as mergeDrawingDocuments, p as parseDrawingDocument, r as reviseDrawingDocument, s as sameDrawingContext } from './resources-XglhzzW0.js';
|
|
@@ -6873,6 +6873,10 @@ interface SymbolSearchOptions extends MarkPainterHooks, SearchDisplayOptions {
|
|
|
6873
6873
|
classes?: readonly (string | SearchClassNode)[] | null;
|
|
6874
6874
|
/** Display names for those classes. A class without one wears its token. */
|
|
6875
6875
|
classNames?: Readonly<Record<string, string>>;
|
|
6876
|
+
/** A part of the catalog the viewer can limit the search to, offered as a toggle chip at the far
|
|
6877
|
+
* edge of the class strip, as a chart's `search.scope` is. Read once as the search opens; null
|
|
6878
|
+
* offers none. */
|
|
6879
|
+
scope?: () => SearchScope | null;
|
|
6876
6880
|
/** The query the field opens holding, selected so that typing replaces it. */
|
|
6877
6881
|
query?: string;
|
|
6878
6882
|
/** Called once the dialog is gone, however it went. */
|
package/dist/index.js
CHANGED
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
} from "./chunk-QYGSDD2Q.js";
|
|
146
146
|
import {
|
|
147
147
|
symbolNames
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-HXTXZZW2.js";
|
|
149
149
|
|
|
150
150
|
// src/datafeed.ts
|
|
151
151
|
function olderPageVerdict(page, askedTo, alreadyHopped) {
|
|
@@ -32261,6 +32261,7 @@ function openSymbolSearch(options2) {
|
|
|
32261
32261
|
classes: () => options2.classes ?? null,
|
|
32262
32262
|
...options2.classNames ? { classNames: options2.classNames } : {},
|
|
32263
32263
|
display: searchDisplay(options2),
|
|
32264
|
+
...options2.scope ? { scope: options2.scope } : {},
|
|
32264
32265
|
painters: resolveMarkPainters(options2),
|
|
32265
32266
|
request: {
|
|
32266
32267
|
mode: "pick",
|
|
@@ -32296,6 +32297,7 @@ function mountSymbolSearch(options2) {
|
|
|
32296
32297
|
classes: () => options2.classes ?? null,
|
|
32297
32298
|
...options2.classNames ? { classNames: options2.classNames } : {},
|
|
32298
32299
|
display: searchDisplay(options2),
|
|
32300
|
+
...options2.scope ? { scope: options2.scope } : {},
|
|
32299
32301
|
painters: resolveMarkPainters(options2),
|
|
32300
32302
|
request: {
|
|
32301
32303
|
mode: "pick",
|