@trdrs/quickcharts 5.1.1 → 5.3.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 (60) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +65 -17
  3. package/dist/{ar-TG26ZCCE.js → ar-BBRV6CC4.js} +5 -1
  4. package/dist/{ar-TG26ZCCE.js.map → ar-BBRV6CC4.js.map} +1 -1
  5. package/dist/{assets-DF3nozNV.d.ts → assets-B_JlJaHF.d.ts} +4 -0
  6. package/dist/{ca_ES-WJWH5BXU.js → ca_ES-OF2NGA3A.js} +5 -1
  7. package/dist/{ca_ES-WJWH5BXU.js.map → ca_ES-OF2NGA3A.js.map} +1 -1
  8. package/dist/{chunk-Q3DCXQDW.js → chunk-FRZFOTMO.js} +42 -39
  9. package/dist/chunk-FRZFOTMO.js.map +1 -0
  10. package/dist/{chunk-GFQQSY47.js → chunk-U4W26DXU.js} +2 -2
  11. package/dist/{chunk-GFQQSY47.js.map → chunk-U4W26DXU.js.map} +1 -1
  12. package/dist/{de-SUDTTPQ3.js → de-D5WWQLT5.js} +5 -1
  13. package/dist/{de-SUDTTPQ3.js.map → de-D5WWQLT5.js.map} +1 -1
  14. package/dist/drawings.d.ts +2 -2
  15. package/dist/drawings.js +1 -1
  16. package/dist/{es-FOBXUK2X.js → es-6TM3Z6CQ.js} +5 -1
  17. package/dist/{es-FOBXUK2X.js.map → es-6TM3Z6CQ.js.map} +1 -1
  18. package/dist/feature-manifest.json +6 -1
  19. package/dist/{fr-7KQC4IJH.js → fr-L5EPUMNA.js} +5 -1
  20. package/dist/{fr-7KQC4IJH.js.map → fr-L5EPUMNA.js.map} +1 -1
  21. package/dist/{he_IL-2T6XBA6D.js → he_IL-PXH4KNDC.js} +5 -1
  22. package/dist/{he_IL-2T6XBA6D.js.map → he_IL-PXH4KNDC.js.map} +1 -1
  23. package/dist/{id_ID-SI25N57C.js → id_ID-MMY4EQSL.js} +5 -1
  24. package/dist/{id_ID-SI25N57C.js.map → id_ID-MMY4EQSL.js.map} +1 -1
  25. package/dist/index.d.ts +29 -6
  26. package/dist/index.js +229 -119
  27. package/dist/index.js.map +1 -1
  28. package/dist/{it-PMSTWZDL.js → it-TUILRXJ5.js} +5 -1
  29. package/dist/{it-PMSTWZDL.js.map → it-TUILRXJ5.js.map} +1 -1
  30. package/dist/{ja-PABDRAXV.js → ja-7QY2FLXF.js} +5 -1
  31. package/dist/{ja-PABDRAXV.js.map → ja-7QY2FLXF.js.map} +1 -1
  32. package/dist/{ko-JHRYYFCV.js → ko-RWI5JOO2.js} +5 -1
  33. package/dist/{ko-JHRYYFCV.js.map → ko-RWI5JOO2.js.map} +1 -1
  34. package/dist/{ms_MY-U4EE5Q4V.js → ms_MY-ABJSZCPH.js} +5 -1
  35. package/dist/{ms_MY-U4EE5Q4V.js.map → ms_MY-ABJSZCPH.js.map} +1 -1
  36. package/dist/{pl-4HCG3T3J.js → pl-XLOQLQVW.js} +5 -1
  37. package/dist/{pl-4HCG3T3J.js.map → pl-XLOQLQVW.js.map} +1 -1
  38. package/dist/{pt-6LTNN653.js → pt-TZWQOZ5P.js} +5 -1
  39. package/dist/{pt-6LTNN653.js.map → pt-TZWQOZ5P.js.map} +1 -1
  40. package/dist/quickcharts.css +369 -372
  41. package/dist/{ru-LFHCSDBV.js → ru-2KVG2H7U.js} +5 -1
  42. package/dist/{ru-LFHCSDBV.js.map → ru-2KVG2H7U.js.map} +1 -1
  43. package/dist/{sv-4XVUXYK6.js → sv-3JTSBHQN.js} +5 -1
  44. package/dist/{sv-4XVUXYK6.js.map → sv-3JTSBHQN.js.map} +1 -1
  45. package/dist/{symbols-CHJGWrf-.d.ts → symbols-CCYUK8MU.d.ts} +5 -1
  46. package/dist/symbols.d.ts +1 -1
  47. package/dist/symbols.js +1 -1
  48. package/dist/{th-WM2PVA24.js → th-O3CHCMEU.js} +5 -1
  49. package/dist/{th-WM2PVA24.js.map → th-O3CHCMEU.js.map} +1 -1
  50. package/dist/theme-manifest.json +51 -40
  51. package/dist/{tr-HMAZXSJM.js → tr-RWKHFLUS.js} +5 -1
  52. package/dist/{tr-HMAZXSJM.js.map → tr-RWKHFLUS.js.map} +1 -1
  53. package/dist/{vi-ITFBV5B7.js → vi-D2CXSN5R.js} +5 -1
  54. package/dist/{vi-ITFBV5B7.js.map → vi-D2CXSN5R.js.map} +1 -1
  55. package/dist/{zh-ZGU2RI7K.js → zh-KBHIBNWP.js} +5 -1
  56. package/dist/{zh-ZGU2RI7K.js.map → zh-KBHIBNWP.js.map} +1 -1
  57. package/dist/{zh_TW-PNINSQ6F.js → zh_TW-474AC5C4.js} +5 -1
  58. package/dist/{zh_TW-PNINSQ6F.js.map → zh_TW-474AC5C4.js.map} +1 -1
  59. package/package.json +1 -1
  60. package/dist/chunk-Q3DCXQDW.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.3.0
6
+
7
+ The built-in palettes carry a deeper dark end of the grey ramp: the dark chrome and canvas are `#000000`, dialogs and menus `#131313`, the hover fill `#1a1a1a`, the pressed fill `#2b2b2b`, menu rules `#464646` and the quiet edges `#555555`, and the light inks that stood at `#0f0f0f` are `#000000`. The light secondary ink, the ink of search rows, lists and toolbar labels, is `#000000`, and the light tooltip is `#1a1a1a`.
8
+
9
+ Every dialog rounds its corners on the new `chrome.radiusDialog` role, `12px` in both built-in palettes, the symbol search and the chart settings among them. Menus and panels keep `chrome.radiusLarge`.
10
+
11
+ A press outside the chart settings dialog closes it as Cancel does, putting back what the session previewed; the dialog still stands over the chart without dimming it.
12
+
13
+ A switch of theme mode hands the colors a viewer chose that follow the mode (the canvas background, the grid, the watermark and the scale text and lines) back to the new mode's look, and keeps every other leaf the viewer chose. Saved chart content states the mode those colors were chosen in as `settingsMode`, so a chart opened in the other mode takes that mode's look for them; content without it keeps its colors in either mode.
14
+
15
+ The indicator picker opens on the symbol search's field with no title band. Under the field, a host that declares `IndicatorPickerSource.kinds` gets a row of filters (All, Indicators, then its kinds), and `IndicatorPickerItem.kind` places a row in one. The rail is a 230px column of sections, Favorites under Personal and the shipped definitions as Technicals under Built-in, each collection a 40px row with a 28px mark. The list's headings scroll with its 32px rows of star, name, author, count and actions; the shipped catalog shows the star, the name and the actions, a row adds without a plus of its own, and an unstarred row shows its star under the pointer. The catalog gains `picker.technicals`, `picker.kindFilter`, `picker.allKinds` and `picker.indicators` in every built-in language.
16
+
17
+ ## 5.2.0
18
+
19
+ The chart's right-click menu ends on Settings…, which opens the chart settings dialog, wherever the chart draws its settings door in the top bar.
20
+
21
+ The symbol search and compare dialogs open on their field with no title band, in a box rounded 20px. Every row is one 56px layout in each mode: a 36px mark, the ticker at 16px over its description at 12px with the market's kind as a small tag after it, and the source as a 24px mark at the row's end that names it in its tooltip. The pointer and the keyboard's row wear one rounded plate.
22
+
23
+ `SymbolRow.ticker` is the ticker a viewer reads a row's market by, where the feed writes one apart from its symbol; `symbolNames` and the search rows read it, and a row without it reads the symbol's own ticker.
24
+
5
25
  ## 5.1.1
6
26
 
7
27
  Range presets reconcile overlapping history pages with streamed bars and preserve a newer navigation while a page is pending.
package/README.md CHANGED
@@ -337,6 +337,16 @@ symbolNames({ symbol: 'NASDAQ:AAPL', name: 'Apple Inc', exchange: 'NASDAQ', type
337
337
  symbolNames('HYPERLIQUID:ETH').mark // 'ETH', before the symbol resolves
338
338
  ```
339
339
 
340
+ One exchange prefix comes off a symbol on its own. Where your feed writes a symbol that says more,
341
+ give the row the `ticker` a viewer reads it by, as `SymbolInfo.ticker` states it for the charted
342
+ symbol; the row keeps its `symbol` as the market's identity:
343
+
344
+ ```ts
345
+ import { symbolNames } from '@trdrs/quickcharts'
346
+
347
+ symbolNames({ symbol: 'EXCH:BOOK:NVDA', ticker: 'NVDA', name: 'NVIDIA Corp', exchange: 'EXCH', type: 'stock' }).mark // 'NVDA'
348
+ ```
349
+
340
350
  `@trdrs/quickcharts/symbols` carries the same rule on its own, `symbolNames` and `bareTicker`, with
341
351
  nothing that names a window, a document or a DOM type, so a view of your own with no DOM, a native
342
352
  search list among them, names a market exactly as the chart does. `bareTicker` is the ticker inside
@@ -1595,13 +1605,18 @@ part in each through `contributeCapture` (see Extensions).
1595
1605
  The Indicators button and `commands.execute('chart.indicators.open')` open the same picker.
1596
1606
  Pass `{ collection: 'saved' }` as the command argument to open a declared host collection directly.
1597
1607
  An unknown collection falls back to the shipped catalog. Reopening an already open picker keeps its current selection and query.
1598
- It lists the 23 shipped definitions, with search and Favorites. Add creates a new instance on the
1599
- currently active chart and keeps the picker open. Favorites use your `ChartStorage` port.
1608
+ The picker opens on the same search field as the symbol search. Beside its list stands a rail of
1609
+ collections: Favorites under Personal, and the 23 shipped definitions as Technicals under Built-in.
1610
+ Pressing a definition's row adds a new instance to the currently active chart and keeps the picker
1611
+ open. Favorites use your `ChartStorage` port. The list reads as a table of each row's star, name,
1612
+ author, favorite count and actions; the shipped catalog shows the star, the name and the actions.
1613
+ Escape and a press outside the box close the picker.
1600
1614
 
1601
1615
  Supply `ChartWidgetOptions.indicatorPicker` to include additional localized collections and rows
1602
1616
  in that picker. You supply data and opaque actions, not DOM, indicator definitions, or a renderer.
1603
1617
  Built-in annotations can add favorite state, counts and actions; they cannot replace a definition,
1604
- its name, or Add. Without a source, the picker has only shipped built-ins and Favorites.
1618
+ its name, or Add, and their counts show wherever the list is a table (Favorites, and your table
1619
+ collections). Without a source, the picker has only shipped built-ins and Favorites.
1605
1620
 
1606
1621
  ```ts
1607
1622
  import type { IndicatorPickerSource } from '@trdrs/quickcharts'
@@ -1633,9 +1648,36 @@ service limits; the picker lists what it answers.
1633
1648
  Collection ids `builtin` and `favorites`, and action ids `add` and `favorite`, are reserved.
1634
1649
  Item ids cannot collide with shipped definition ids or these reserved ids. Duplicate ids,
1635
1650
  malformed rows and missing primary actions refuse the response; the shipped catalog remains usable.
1636
- An item has up to two actions; a built-in annotation has at most one beside Add. Collections can
1637
- name a localized navigation group and use `layout: 'list'` for name/secondary-action rows.
1638
- An absent count stays blank. Omit `favorite` to omit that action on a contributed item.
1651
+ An item has up to two actions; a built-in annotation has at most one. Collections can name a
1652
+ localized navigation group and use `layout: 'list'` for name/secondary-action rows. The rail lists
1653
+ your collections after Favorites, in your order: each run of one group stands under that group's
1654
+ heading, a collection without a group stays in the section above it, and a group labelled as the
1655
+ chart's own Personal joins Favorites in its section. An absent count stays blank. Omit `favorite`
1656
+ to omit that action on a contributed item.
1657
+
1658
+ Declare `kinds` when your rows come in kinds beside indicators. The picker then shows a row of
1659
+ filters under its field: All, the chart's own Indicators, and each of your kinds in order. An item
1660
+ names its kind with `kind`; an item that names none, and every shipped definition, is an
1661
+ indicator. The kind id `indicator` is reserved, and an item of a kind you did not declare refuses
1662
+ the response.
1663
+
1664
+ ```ts
1665
+ import type { IndicatorPickerSource } from '@trdrs/quickcharts'
1666
+
1667
+ const withTemplates: IndicatorPickerSource = {
1668
+ collections: [{ id: 'saved', label: 'Saved', group: 'Personal', layout: 'list' }],
1669
+ kinds: [{ id: 'template', label: 'Templates' }],
1670
+ async list({ collection }) {
1671
+ return {
1672
+ kind: 'ok',
1673
+ items: collection === 'saved'
1674
+ ? [{ id: 'ribbon', title: 'Ribbon', kind: 'template', primaryAction: 'apply', actions: [{ id: 'apply', label: 'Apply' }] }]
1675
+ : [],
1676
+ }
1677
+ },
1678
+ async act() { return { kind: 'ok', close: true } },
1679
+ }
1680
+ ```
1639
1681
 
1640
1682
  A favorite action receives the requested next boolean. Successful actions refresh the current
1641
1683
  collection unless they return `close: true`. Refusals and exceptions keep the picker open with
@@ -2123,20 +2165,21 @@ among the others `THEME_ROLES` lists:
2123
2165
 
2124
2166
  | Role | Light | Dark | What it paints |
2125
2167
  |---|---|---|---|
2126
- | `overlay.surface` | `#ffffff` | `#1f1f1f` | The ground of a dialog, menu or popover. |
2127
- | `overlay.separator` | `#ebebeb` | `#4a4a4a` | The rule under a dialog header and over its footer, and between menu groups. |
2168
+ | `overlay.surface` | `#ffffff` | `#131313` | The ground of a dialog, menu or popover. |
2169
+ | `chrome.radiusDialog` | `12px` | `12px` | The corners of a dialog. A menu or panel rounds on `chrome.radiusLarge`, `6px`. |
2170
+ | `overlay.separator` | `#ebebeb` | `#464646` | The rule under a dialog header and over its footer, and between menu groups. |
2128
2171
  | `overlay.scrim` | `rgba(156, 156, 156, 0.5)` | `rgba(0, 0, 0, 0.5)` | The veil behind a modal dialog. |
2129
- | `text.primary` | `#0f0f0f` | `#dbdbdb` | The ink of rows, labels and values. |
2172
+ | `text.primary` | `#000000` | `#dbdbdb` | The ink of rows, labels and values. |
2130
2173
  | `text.muted` | `#6a6a6a` | `#9b9b9b` | A section title, a hint, a placeholder. |
2131
2174
  | `chrome.caret` | `#707070` | `#8c8c8c` | The chevron of a select and the arrow that opens a flyout. |
2132
2175
  | `text.link` | `#2962ff` | `#5b9cf6` | A text link. |
2133
- | `state.hover` | `#f2f2f2` | `#2e2e2e` | The fill under the pointer. |
2134
- | `state.pressed` | `#ebebeb` | `#3d3d3d` | The fill while the pointer is down. |
2135
- | `control.outline` | `#2e2e2e` | `#ffffff` | The edge and the words of an outlined button at rest, such as a dialog's Cancel. |
2176
+ | `state.hover` | `#f2f2f2` | `#1a1a1a` | The fill under the pointer. |
2177
+ | `state.pressed` | `#ebebeb` | `#2b2b2b` | The fill while the pointer is down. |
2178
+ | `control.outline` | `#1a1a1a` | `#ffffff` | The edge and the words of an outlined button at rest, such as a dialog's Cancel. |
2136
2179
  | `control.onInk` | `#ffffff` | `#000000` | A mark cut from the emphasis fill: a chosen thickness, line style or line end. |
2137
- | `control.neutral` | `#f2f2f2` | `#2e2e2e` | The quiet fill: a dialog's shortcut chip, the band over a calendar's columns, a chosen month or year. |
2138
- | `control.neutralHover` | `#ebebeb` | `#3d3d3d` | The quiet fill under the pointer. |
2139
- | `control.neutralPressed` | `#dbdbdb` | `#4a4a4a` | The quiet fill while the pointer is down. |
2180
+ | `control.neutral` | `#f2f2f2` | `#1a1a1a` | The quiet fill: a dialog's shortcut chip, the band over a calendar's columns, a chosen month or year. |
2181
+ | `control.neutralHover` | `#ebebeb` | `#2b2b2b` | The quiet fill under the pointer. |
2182
+ | `control.neutralPressed` | `#dbdbdb` | `#464646` | The quiet fill while the pointer is down. |
2140
2183
  | `control.neutralInk` | `#000000` | `#ffffff` | The words on the quiet fill, and what a quiet control's words and mark brighten to under the pointer, such as a calendar's day. |
2141
2184
  | `status.positive` | `#078671` | `#089981` | A gain or a success. |
2142
2185
  | `status.negative` | `#df323f` | `#f34452` | A loss or a failure. |
@@ -2158,11 +2201,11 @@ is one box: 34px tall, a 1px edge with an 8px corner around a clear ground, and
2158
2201
 
2159
2202
  | Role | Light | Dark | What it paints |
2160
2203
  |---|---|---|---|
2161
- | `control.fieldEdge` | `#dbdbdb` | `#575757` | The edge of a field at rest. |
2204
+ | `control.fieldEdge` | `#dbdbdb` | `#555555` | The edge of a field at rest. |
2162
2205
  | `control.fieldEdgeHover` | `#a8a8a8` | `#707070` | The edge of a field under the pointer. |
2163
2206
  | `control.selectEdgeHover` | `#a8a8a8` | `#808080` | The edge of a list button under the pointer, such as a select on a drawing's settings page. |
2164
2207
  | `control.fieldInvalid` | `#f23645` | `#f23645` | The edge and the focus ring of a field holding a value it refuses. |
2165
- | `control.fieldFill` | `#f2f2f2` | `#2e2e2e` | The ground of a field that is read-only or disabled. |
2208
+ | `control.fieldFill` | `#f2f2f2` | `#1a1a1a` | The ground of a field that is read-only or disabled. |
2166
2209
 
2167
2210
  Focus draws a 2px ring over the edge, the edge itself and the pixel inside it, so the ring follows
2168
2211
  the corner and a dialog that scrolls never clips it. Only a value the chart refuses turns the edge
@@ -2317,6 +2360,11 @@ A saved chart carries the settings a viewer chose and no others, so a chart nobo
2317
2360
  whatever theme the host gives it on the next load, and one whose owner picked candle colors opens in
2318
2361
  those colors on any theme.
2319
2362
 
2363
+ The colors whose factory value differs between light and dark (the canvas background, the grid, the
2364
+ watermark and the scale text and lines) follow the mode. A switch of mode hands the viewer's choices
2365
+ of them back to the new mode's look, and keeps every other leaf. A saved chart states the mode they
2366
+ were chosen in (`settingsMode`), so a chart opened in the other mode takes that mode's look for them.
2367
+
2320
2368
  ## Chart settings
2321
2369
 
2322
2370
  `chart.settings()` answers the effective tree; `chart.applySettings(partial)` layers a partial over
@@ -1135,7 +1135,11 @@ var picker = {
1135
1135
  "picker.collections": "\u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0627\u0644\u0645\u0624\u0634\u0631\u0627\u062A",
1136
1136
  "picker.personal": "\u0634\u062E\u0635\u064A\u0629",
1137
1137
  "picker.builtin": "\u0645\u0636\u0645\u0651\u0646\u0629",
1138
+ "picker.technicals": "\u0627\u0644\u0645\u0624\u0634\u0631\u0627\u062A \u0627\u0644\u0641\u0646\u064A\u0629",
1138
1139
  "picker.favorites": "\u0627\u0644\u0645\u0641\u0636\u0644\u0629",
1140
+ "picker.kindFilter": "\u0627\u0644\u0646\u0648\u0639",
1141
+ "picker.allKinds": "\u0627\u0644\u0643\u0644",
1142
+ "picker.indicators": "\u0627\u0644\u0645\u0624\u0634\u0631\u0627\u062A",
1139
1143
  "picker.thousands": " K",
1140
1144
  "picker.name": "\u0627\u0644\u0627\u0633\u0645",
1141
1145
  "picker.author": "\u0627\u0644\u0645\u0624\u0644\u0641",
@@ -1319,4 +1323,4 @@ var ar_default = dict;
1319
1323
  export {
1320
1324
  ar_default as default
1321
1325
  };
1322
- //# sourceMappingURL=ar-TG26ZCCE.js.map
1326
+ //# sourceMappingURL=ar-BBRV6CC4.js.map