@tradecanvas/chart 2.5.0 → 2.7.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.
- package/README.md +2 -2
- package/dist/Chart.d.ts +6 -0
- package/dist/Chart.d.ts.map +1 -1
- package/dist/{LayoutSession-CE8S2GCG.js → LayoutSession-CO51QKwZ.js} +10 -3
- package/dist/LayoutSession-CO51QKwZ.js.map +1 -0
- package/dist/LayoutSession-DIPjmNVe.cjs +2 -0
- package/dist/LayoutSession-DIPjmNVe.cjs.map +1 -0
- package/dist/{WidgetCommandPalette-B1jLC9oE.js → WidgetCommandPalette-CSIKnTca.js} +2 -2
- package/dist/{WidgetCommandPalette-B1jLC9oE.js.map → WidgetCommandPalette-CSIKnTca.js.map} +1 -1
- package/dist/{WidgetCommandPalette-Cx-UQ9ft.cjs → WidgetCommandPalette-CZ3GhE1O.cjs} +2 -2
- package/dist/{WidgetCommandPalette-Cx-UQ9ft.cjs.map → WidgetCommandPalette-CZ3GhE1O.cjs.map} +1 -1
- package/dist/{WidgetDrawingSettings-ezbzlGqD.js → WidgetDrawingSettings-Cc8PeqEZ.js} +2 -2
- package/dist/{WidgetDrawingSettings-ezbzlGqD.js.map → WidgetDrawingSettings-Cc8PeqEZ.js.map} +1 -1
- package/dist/{WidgetDrawingSettings-BjPR5Wyq.cjs → WidgetDrawingSettings-DutEdVyV.cjs} +2 -2
- package/dist/{WidgetDrawingSettings-BjPR5Wyq.cjs.map → WidgetDrawingSettings-DutEdVyV.cjs.map} +1 -1
- package/dist/{WidgetGoToDate-DJyCaP4H.js → WidgetGoToDate-DnQxxvf1.js} +2 -2
- package/dist/{WidgetGoToDate-DJyCaP4H.js.map → WidgetGoToDate-DnQxxvf1.js.map} +1 -1
- package/dist/{WidgetGoToDate-Vfaztduf.cjs → WidgetGoToDate-hNVxz-Zb.cjs} +2 -2
- package/dist/{WidgetGoToDate-Vfaztduf.cjs.map → WidgetGoToDate-hNVxz-Zb.cjs.map} +1 -1
- package/dist/{WidgetIndicatorPicker-Cw7pFl_l.js → WidgetIndicatorPicker-DNjcuBp6.js} +3 -3
- package/dist/{WidgetIndicatorPicker-Cw7pFl_l.js.map → WidgetIndicatorPicker-DNjcuBp6.js.map} +1 -1
- package/dist/{WidgetIndicatorPicker-Nc-1Rbm_.cjs → WidgetIndicatorPicker-GCesxFMn.cjs} +2 -2
- package/dist/{WidgetIndicatorPicker-Nc-1Rbm_.cjs.map → WidgetIndicatorPicker-GCesxFMn.cjs.map} +1 -1
- package/dist/{WidgetIndicatorSettings-Da_T6bmX.cjs → WidgetIndicatorSettings-CBHWj5z5.cjs} +2 -2
- package/dist/{WidgetIndicatorSettings-Da_T6bmX.cjs.map → WidgetIndicatorSettings-CBHWj5z5.cjs.map} +1 -1
- package/dist/{WidgetIndicatorSettings-DR8Z9RfF.js → WidgetIndicatorSettings-XhHlqyvn.js} +3 -3
- package/dist/{WidgetIndicatorSettings-DR8Z9RfF.js.map → WidgetIndicatorSettings-XhHlqyvn.js.map} +1 -1
- package/dist/{WidgetSettings-DCGCymVY.js → WidgetSettings-B1ay0W6I.js} +3 -3
- package/dist/{WidgetSettings-DCGCymVY.js.map → WidgetSettings-B1ay0W6I.js.map} +1 -1
- package/dist/{WidgetSettings-COljE3G_.cjs → WidgetSettings-CBf6hUSV.cjs} +2 -2
- package/dist/{WidgetSettings-COljE3G_.cjs.map → WidgetSettings-CBf6hUSV.cjs.map} +1 -1
- package/dist/{WidgetSymbolSearch-B8iDwVy8.js → WidgetSymbolSearch-BlQWH3Md.js} +3 -3
- package/dist/{WidgetSymbolSearch-B8iDwVy8.js.map → WidgetSymbolSearch-BlQWH3Md.js.map} +1 -1
- package/dist/{WidgetSymbolSearch-DVIRTJuT.cjs → WidgetSymbolSearch-CxeLjy63.cjs} +2 -2
- package/dist/{WidgetSymbolSearch-DVIRTJuT.cjs.map → WidgetSymbolSearch-CxeLjy63.cjs.map} +1 -1
- package/dist/i18n-BFGknfTa.cjs +2 -0
- package/dist/i18n-BFGknfTa.cjs.map +1 -0
- package/dist/{i18n-DWLKoOBG.js → i18n-BZdkj80c.js} +7 -1
- package/dist/i18n-BZdkj80c.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{indicatorInputWords-VWMPRfzM.js → indicatorInputWords-B8lf8reQ.js} +2 -2
- package/dist/{indicatorInputWords-VWMPRfzM.js.map → indicatorInputWords-B8lf8reQ.js.map} +1 -1
- package/dist/{indicatorInputWords-C4Mefhve.cjs → indicatorInputWords-_kxwKob4.cjs} +2 -2
- package/dist/{indicatorInputWords-C4Mefhve.cjs.map → indicatorInputWords-_kxwKob4.cjs.map} +1 -1
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/WidgetDrawingEdit.d.ts +13 -0
- package/dist/widget/WidgetDrawingEdit.d.ts.map +1 -1
- package/dist/widget/WidgetMenus.d.ts +2 -0
- package/dist/widget/WidgetMenus.d.ts.map +1 -1
- package/dist/widget/WidgetObjectTree.d.ts.map +1 -1
- package/dist/widget/WidgetSelectionToolbar.d.ts +4 -0
- package/dist/widget/WidgetSelectionToolbar.d.ts.map +1 -1
- package/dist/widget/drawingMenu.d.ts +3 -1
- package/dist/widget/drawingMenu.d.ts.map +1 -1
- package/dist/widget/index.cjs +4 -3
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.js +179 -118
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/locales/ar.d.ts.map +1 -1
- package/dist/widget/locales/cs.d.ts.map +1 -1
- package/dist/widget/locales/da.d.ts.map +1 -1
- package/dist/widget/locales/de.d.ts.map +1 -1
- package/dist/widget/locales/el.d.ts.map +1 -1
- package/dist/widget/locales/en.d.ts +3 -0
- package/dist/widget/locales/en.d.ts.map +1 -1
- package/dist/widget/locales/es.d.ts.map +1 -1
- package/dist/widget/locales/et.d.ts.map +1 -1
- package/dist/widget/locales/fa.d.ts.map +1 -1
- package/dist/widget/locales/fr.d.ts.map +1 -1
- package/dist/widget/locales/he.d.ts.map +1 -1
- package/dist/widget/locales/hu.d.ts.map +1 -1
- package/dist/widget/locales/id.d.ts.map +1 -1
- package/dist/widget/locales/index.cjs +1 -1
- package/dist/widget/locales/index.cjs.map +1 -1
- package/dist/widget/locales/index.js +85 -1
- package/dist/widget/locales/index.js.map +1 -1
- package/dist/widget/locales/it.d.ts.map +1 -1
- package/dist/widget/locales/ja.d.ts.map +1 -1
- package/dist/widget/locales/ko.d.ts.map +1 -1
- package/dist/widget/locales/ms.d.ts.map +1 -1
- package/dist/widget/locales/nb.d.ts.map +1 -1
- package/dist/widget/locales/nl.d.ts.map +1 -1
- package/dist/widget/locales/pl.d.ts.map +1 -1
- package/dist/widget/locales/pt.d.ts.map +1 -1
- package/dist/widget/locales/ro.d.ts.map +1 -1
- package/dist/widget/locales/ru.d.ts.map +1 -1
- package/dist/widget/locales/sk.d.ts.map +1 -1
- package/dist/widget/locales/sv.d.ts.map +1 -1
- package/dist/widget/locales/th.d.ts.map +1 -1
- package/dist/widget/locales/tr.d.ts.map +1 -1
- package/dist/widget/locales/vi.d.ts.map +1 -1
- package/dist/widget/locales/zh.d.ts.map +1 -1
- package/dist/widget/locales/zhHant.d.ts.map +1 -1
- package/dist/widget/widgetConfig.d.ts.map +1 -1
- package/dist/widget/widgetFeatures.d.ts.map +1 -1
- package/dist/{widgetFeatures-B-el8UA3.cjs → widgetFeatures-DpBWfQ8D.cjs} +2 -2
- package/dist/widgetFeatures-DpBWfQ8D.cjs.map +1 -0
- package/dist/{widgetFeatures-DsbSG6Pq.js → widgetFeatures-sU-9JOSB.js} +2 -1
- package/dist/widgetFeatures-sU-9JOSB.js.map +1 -0
- package/dist/widgetLocales-BdRQu8wS.cjs +2 -0
- package/dist/widgetLocales-BdRQu8wS.cjs.map +1 -0
- package/dist/{widgetLocales-BX7VRdl5.js → widgetLocales-Bgm5-BB5.js} +13 -1
- package/dist/widgetLocales-Bgm5-BB5.js.map +1 -0
- package/package.json +3 -3
- package/dist/LayoutSession-C9bQsnH2.cjs +0 -2
- package/dist/LayoutSession-C9bQsnH2.cjs.map +0 -1
- package/dist/LayoutSession-CE8S2GCG.js.map +0 -1
- package/dist/i18n-DWLKoOBG.js.map +0 -1
- package/dist/i18n-fgAwciRT.cjs +0 -2
- package/dist/i18n-fgAwciRT.cjs.map +0 -1
- package/dist/widgetFeatures-B-el8UA3.cjs.map +0 -1
- package/dist/widgetFeatures-DsbSG6Pq.js.map +0 -1
- package/dist/widgetLocales-BX7VRdl5.js.map +0 -1
- package/dist/widgetLocales-C_XTkni5.cjs +0 -2
- package/dist/widgetLocales-C_XTkni5.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/it.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAe;AACf,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/it.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAe;AACf,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/ja.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU;AACV,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/ja.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU;AACV,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ko.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/ko.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU;AACV,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"ko.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/ko.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU;AACV,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ms.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/ms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,oBAAoB;AACpB,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"ms.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/ms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,oBAAoB;AACpB,eAAO,MAAM,WAAW,EAAE,cA68BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nb.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/nb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,mBAAmB;AACnB,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"nb.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/nb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,mBAAmB;AACnB,eAAO,MAAM,WAAW,EAAE,cA68BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/nl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,iBAAiB;AACjB,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/nl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,iBAAiB;AACjB,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/pl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,aAAa;AACb,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/pl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,aAAa;AACb,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/pt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,yBAAyB;AACzB,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/pt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,yBAAyB;AACzB,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/ro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,aAAa;AACb,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/ro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,aAAa;AACb,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/ru.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,cAAc;AACd,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/ru.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,cAAc;AACd,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sk.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/sk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,iBAAiB;AACjB,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"sk.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/sk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,iBAAiB;AACjB,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sv.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/sv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,cAAc;AACd,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"sv.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/sv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,cAAc;AACd,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"th.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/th.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,cAAc;AACd,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"th.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/th.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,cAAc;AACd,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/tr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,aAAa;AACb,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/tr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,aAAa;AACb,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vi.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/vi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,kBAAkB;AAClB,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"vi.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/vi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,kBAAkB;AAClB,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/zh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,WAAW;AACX,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/zh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,WAAW;AACX,eAAO,MAAM,WAAW,EAAE,cA+7BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zhHant.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/zhHant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,WAAW;AACX,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"zhHant.d.ts","sourceRoot":"","sources":["../../../src/widget/locales/zhHant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,WAAW;AACX,eAAO,MAAM,gBAAgB,EAAE,cA+7B9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetConfig.d.ts","sourceRoot":"","sources":["../../src/widget/widgetConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE1E,eAAO,MAAM,WAAW,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,EAmB5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"widgetConfig.d.ts","sourceRoot":"","sources":["../../src/widget/widgetConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE1E,eAAO,MAAM,WAAW,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,EAmB5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,EAiHpD,CAAC;AAEF,eAAO,MAAM,eAAe,UAE3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,kBAkC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetFeatures.d.ts","sourceRoot":"","sources":["../../src/widget/widgetFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,2/EA0ClB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7D,8DAA8D;AAC9D,MAA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AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CA4BvG;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,MAAM,EACjD,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,aAAa,EAAE,CAAC,CAAC,EAC1D,KAAK,EAAE,kBAAkB,GACxB,gBAAgB,EAAE,CAepB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var e=`toolbar,sidebar,statusBar,dock,alerts,objectTree,symbolInfo,symbolSearch,settings,indicatorSettings,drawingSettings,dataWindow,commandPalette,hotkeySheet,goToDate,replay,screenshot,copyImage,shareView,autoFib,themeToggle,fullscreen,accountPanel,orderTicket,bracketOrders,depthLadder,layouts,indicatorTemplates,compare,indicatorLegend,navigation,customTimeframes,marks,intervalTyping,symbolTyping,dragDropImport,hotkeys,toasts,toolbar.symbol,toolbar.symbolInfo,toolbar.timeframes,toolbar.timeframeMenu,toolbar.chartType,toolbar.indicators,toolbar.layouts,toolbar.replay,toolbar.bracketOrders,toolbar.depthLadder,toolbar.accountPanel,toolbar.objectTree,toolbar.alerts,toolbar.screenshot,toolbar.settings,toolbar.themeToggle,toolbar.fullscreen,toolbar.compare,toolbar.undo,toolbar.redo,toolbar.trade,sidebar.cursor,sidebar.favorites,sidebar.lines,sidebar.fibonacci,sidebar.patterns,sidebar.forecasting,sidebar.annotation,sidebar.style,sidebar.magnet,sidebar.eraser,sidebar.zoomArea,sidebar.stayInDrawing,sidebar.undo,sidebar.redo,sidebar.clear,sidebar.lockAll,sidebar.hideAll,dock.watchlist,dock.alerts,dock.objectTree,dock.dataWindow,dock.symbolInfo,dock.depthLadder,statusBar.range,statusBar.goToDate,statusBar.market,statusBar.connection,statusBar.symbol,statusBar.clock,statusBar.scale,statusBar.rangeTimeframe,indicatorLegend.values,indicatorLegend.visibility,indicatorLegend.settings,indicatorLegend.remove,indicatorLegend.more,pane.move,pane.collapse,pane.maximize,navigation.zoom,navigation.scroll,navigation.reset,menu.chart,menu.chart.alert,menu.chart.order,menu.chart.orderTicket,menu.chart.horizontalLine,menu.chart.resetView,menu.chart.drawings,menu.chart.exportData,menu.chart.settings,menu.chart.scale,menu.chart.goToDate,menu.chart.paneScale,menu.priceAxisAdd,menu.chart.indicators,menu.chart.timezone,menu.drawing,menu.drawing.settings,menu.drawing.alert,menu.drawing.order,menu.drawing.group,menu.drawing.lock,menu.drawing.hide,menu.drawing.duplicate,menu.drawing.delete,selectionToolbar,hotkeys.commandPalette,hotkeys.symbolSearch,hotkeys.save,hotkeys.tools,hotkeys.invertScale,hotkeys.goToDate,hotkeys.help,hotkeys.resetView`.split(`,`),t=new Set(e),n={toolbar:[`toolbar`],drawingTools:[`sidebar`,`drawingSettings`,`hotkeys.tools`,`menu.chart.horizontalLine`],settings:[`settings`],statusBar:[`statusBar`,`goToDate`],rangeBar:[`statusBar.range`,`statusBar.rangeTimeframe`,`goToDate`],indicatorLegend:[`indicatorLegend`],fullscreen:[`fullscreen`],alerts:[`alerts`],objectTree:[`objectTree`],accountPanel:[`accountPanel`,`orderTicket`],indicatorTemplates:[`indicatorTemplates`],intervalTyping:[`intervalTyping`],symbolInfo:[`symbolInfo`],navigation:[`navigation`],dragDropImport:[`dragDropImport`],customTimeframes:[`customTimeframes`]},r={alert:[`alerts`,`menu.chart.alert`],buyLimit:[`menu.chart.order`],buyStop:[`menu.chart.order`],sellLimit:[`menu.chart.order`],sellStop:[`menu.chart.order`],orderTicket:[`orderTicket`,`menu.chart.orderTicket`],horizontalLine:[`menu.chart.horizontalLine`],resetView:[`menu.chart.resetView`],paste:[`menu.chart.drawings`],hideDrawings:[`menu.chart.drawings`],showDrawings:[`menu.chart.drawings`],removeDrawings:[`menu.chart.drawings`],removeIndicators:[`menu.chart.indicators`],settings:[`settings`,`menu.chart.settings`],exportData:[`menu.chart.exportData`],resetPriceScale:[`menu.chart.scale`],autoScale:[`menu.chart.scale`],invertScale:[`menu.chart.scale`],leftScale:[`menu.chart.scale`],regularScale:[`menu.chart.scale`],logScale:[`menu.chart.scale`],percentScale:[`menu.chart.scale`],indexedScale:[`menu.chart.scale`],labels:[`menu.chart.scale`],indicatorValueLabels:[`menu.chart.scale`],alignAxisLabels:[`menu.chart.scale`],barCountdown:[`menu.chart.scale`],lines:[`menu.chart.scale`],highLowLines:[`menu.chart.scale`],lastPriceLine:[`menu.chart.scale`],goToDate:[`goToDate`,`menu.chart.goToDate`],timezone:[`menu.chart.timezone`],paneLog:[`menu.chart.paneScale`],paneInvert:[`menu.chart.paneScale`],panePercent:[`menu.chart.paneScale`]},i={settings:[`drawingSettings`,`menu.drawing.settings`],alert:[`alerts`,`menu.drawing.alert`],front:[`menu.drawing.order`],forward:[`menu.drawing.order`],backward:[`menu.drawing.order`],back:[`menu.drawing.order`],group:[`menu.drawing.group`],ungroup:[`menu.drawing.group`],lock:[`menu.drawing.lock`],unlock:[`menu.drawing.lock`],hide:[`menu.drawing.hide`],duplicate:[`menu.drawing.duplicate`],delete:[`menu.drawing.delete`]},a={symbolSearch:`symbolSearch`,compare:`compare`,goToDate:`goToDate`,saveLayout:`layouts`,alerts:`alerts`,objectTree:`objectTree`,hotkeys:`hotkeySheet`,screenshot:`screenshot`,copyImage:`copyImage`,toggleTheme:`themeToggle`,settings:`settings`,shareView:`shareView`,autoFib:`autoFib`,dataWindow:`dataWindow`,symbolInfo:`symbolInfo`};function o(e){if(typeof e!=`object`||!e||Array.isArray(e))return{};let n={},r=[];for(let[i,a]of Object.entries(e))t.has(i)&&typeof a==`boolean`?n[i]=a:r.push(i);return r.length>0&&console.warn(`[ChartWidget] Unknown or non-boolean feature switches left out: ${r.join(`, `)}.`),n}function s(t){let r=Object.fromEntries(e.map(e=>[e,!0]));for(let[e,i]of Object.entries(n))if(t[e]===!1)for(let e of i)r[e]=!1;return{...r,...o(t.features)}}function c(t){return e.filter(e=>!t[e]).join(` `)}var l=`tcw-divider-off`,u=[{names:[`navigation.zoom`,`navigation.scroll`,`navigation.reset`],selector:`.tcw-nav`},{names:[`pane.move`,`pane.collapse`,`pane.maximize`],selector:`.tcw-pane-controls`},{names:[`indicatorLegend.visibility`,`indicatorLegend.settings`,`indicatorLegend.more`,`indicatorLegend.remove`],selector:`.tcw-ind-legend-actions`}];function d(){return[...e.map(e=>`.tcw-root[data-tcw-off~="${e}"] [data-tcw-part~="${e}"]{display:none!important}`),...u.map(({names:e,selector:t})=>`.tcw-root${e.map(e=>`[data-tcw-off~="${e}"]`).join(``)} ${t}{display:none!important}`),`.${l}{display:none!important}`].join(`
|
|
1
|
+
var e=`toolbar,sidebar,statusBar,dock,alerts,objectTree,symbolInfo,symbolSearch,settings,indicatorSettings,drawingSettings,dataWindow,commandPalette,hotkeySheet,goToDate,replay,screenshot,copyImage,shareView,autoFib,themeToggle,fullscreen,accountPanel,orderTicket,bracketOrders,depthLadder,layouts,indicatorTemplates,compare,indicatorLegend,navigation,customTimeframes,marks,intervalTyping,symbolTyping,dragDropImport,hotkeys,toasts,toolbar.symbol,toolbar.symbolInfo,toolbar.timeframes,toolbar.timeframeMenu,toolbar.chartType,toolbar.indicators,toolbar.layouts,toolbar.replay,toolbar.bracketOrders,toolbar.depthLadder,toolbar.accountPanel,toolbar.objectTree,toolbar.alerts,toolbar.screenshot,toolbar.settings,toolbar.themeToggle,toolbar.fullscreen,toolbar.compare,toolbar.undo,toolbar.redo,toolbar.trade,sidebar.cursor,sidebar.favorites,sidebar.lines,sidebar.fibonacci,sidebar.patterns,sidebar.forecasting,sidebar.annotation,sidebar.style,sidebar.magnet,sidebar.eraser,sidebar.zoomArea,sidebar.stayInDrawing,sidebar.undo,sidebar.redo,sidebar.clear,sidebar.lockAll,sidebar.hideAll,dock.watchlist,dock.alerts,dock.objectTree,dock.dataWindow,dock.symbolInfo,dock.depthLadder,statusBar.range,statusBar.goToDate,statusBar.market,statusBar.connection,statusBar.symbol,statusBar.clock,statusBar.scale,statusBar.rangeTimeframe,indicatorLegend.values,indicatorLegend.visibility,indicatorLegend.settings,indicatorLegend.remove,indicatorLegend.more,pane.move,pane.collapse,pane.maximize,navigation.zoom,navigation.scroll,navigation.reset,menu.chart,menu.chart.alert,menu.chart.order,menu.chart.orderTicket,menu.chart.horizontalLine,menu.chart.resetView,menu.chart.drawings,menu.chart.exportData,menu.chart.settings,menu.chart.scale,menu.chart.goToDate,menu.chart.paneScale,menu.priceAxisAdd,menu.chart.indicators,menu.chart.timezone,menu.drawing,menu.drawing.settings,menu.drawing.alert,menu.drawing.order,menu.drawing.group,menu.drawing.lock,menu.drawing.hide,menu.drawing.duplicate,menu.drawing.delete,selectionToolbar,hotkeys.commandPalette,hotkeys.symbolSearch,hotkeys.save,hotkeys.tools,hotkeys.invertScale,hotkeys.goToDate,hotkeys.help,hotkeys.resetView`.split(`,`),t=new Set(e),n={toolbar:[`toolbar`],drawingTools:[`sidebar`,`drawingSettings`,`hotkeys.tools`,`menu.chart.horizontalLine`],settings:[`settings`],statusBar:[`statusBar`,`goToDate`],rangeBar:[`statusBar.range`,`statusBar.rangeTimeframe`,`goToDate`],indicatorLegend:[`indicatorLegend`],fullscreen:[`fullscreen`],alerts:[`alerts`],objectTree:[`objectTree`],accountPanel:[`accountPanel`,`orderTicket`],indicatorTemplates:[`indicatorTemplates`],intervalTyping:[`intervalTyping`],symbolInfo:[`symbolInfo`],navigation:[`navigation`],dragDropImport:[`dragDropImport`],customTimeframes:[`customTimeframes`]},r={alert:[`alerts`,`menu.chart.alert`],buyLimit:[`menu.chart.order`],buyStop:[`menu.chart.order`],sellLimit:[`menu.chart.order`],sellStop:[`menu.chart.order`],orderTicket:[`orderTicket`,`menu.chart.orderTicket`],horizontalLine:[`menu.chart.horizontalLine`],resetView:[`menu.chart.resetView`],paste:[`menu.chart.drawings`],hideDrawings:[`menu.chart.drawings`],showDrawings:[`menu.chart.drawings`],removeDrawings:[`menu.chart.drawings`],removeIndicators:[`menu.chart.indicators`],settings:[`settings`,`menu.chart.settings`],exportData:[`menu.chart.exportData`],resetPriceScale:[`menu.chart.scale`],autoScale:[`menu.chart.scale`],invertScale:[`menu.chart.scale`],leftScale:[`menu.chart.scale`],regularScale:[`menu.chart.scale`],logScale:[`menu.chart.scale`],percentScale:[`menu.chart.scale`],indexedScale:[`menu.chart.scale`],labels:[`menu.chart.scale`],indicatorValueLabels:[`menu.chart.scale`],alignAxisLabels:[`menu.chart.scale`],barCountdown:[`menu.chart.scale`],lines:[`menu.chart.scale`],highLowLines:[`menu.chart.scale`],lastPriceLine:[`menu.chart.scale`],goToDate:[`goToDate`,`menu.chart.goToDate`],timezone:[`menu.chart.timezone`],paneLog:[`menu.chart.paneScale`],paneInvert:[`menu.chart.paneScale`],panePercent:[`menu.chart.paneScale`]},i={settings:[`drawingSettings`,`menu.drawing.settings`],text:[`menu.drawing.settings`],alert:[`alerts`,`menu.drawing.alert`],front:[`menu.drawing.order`],forward:[`menu.drawing.order`],backward:[`menu.drawing.order`],back:[`menu.drawing.order`],group:[`menu.drawing.group`],ungroup:[`menu.drawing.group`],lock:[`menu.drawing.lock`],unlock:[`menu.drawing.lock`],hide:[`menu.drawing.hide`],duplicate:[`menu.drawing.duplicate`],delete:[`menu.drawing.delete`]},a={symbolSearch:`symbolSearch`,compare:`compare`,goToDate:`goToDate`,saveLayout:`layouts`,alerts:`alerts`,objectTree:`objectTree`,hotkeys:`hotkeySheet`,screenshot:`screenshot`,copyImage:`copyImage`,toggleTheme:`themeToggle`,settings:`settings`,shareView:`shareView`,autoFib:`autoFib`,dataWindow:`dataWindow`,symbolInfo:`symbolInfo`};function o(e){if(typeof e!=`object`||!e||Array.isArray(e))return{};let n={},r=[];for(let[i,a]of Object.entries(e))t.has(i)&&typeof a==`boolean`?n[i]=a:r.push(i);return r.length>0&&console.warn(`[ChartWidget] Unknown or non-boolean feature switches left out: ${r.join(`, `)}.`),n}function s(t){let r=Object.fromEntries(e.map(e=>[e,!0]));for(let[e,i]of Object.entries(n))if(t[e]===!1)for(let e of i)r[e]=!1;return{...r,...o(t.features)}}function c(t){return e.filter(e=>!t[e]).join(` `)}var l=`tcw-divider-off`,u=[{names:[`navigation.zoom`,`navigation.scroll`,`navigation.reset`],selector:`.tcw-nav`},{names:[`pane.move`,`pane.collapse`,`pane.maximize`],selector:`.tcw-pane-controls`},{names:[`indicatorLegend.visibility`,`indicatorLegend.settings`,`indicatorLegend.more`,`indicatorLegend.remove`],selector:`.tcw-ind-legend-actions`}];function d(){return[...e.map(e=>`.tcw-root[data-tcw-off~="${e}"] [data-tcw-part~="${e}"]{display:none!important}`),...u.map(({names:e,selector:t})=>`.tcw-root${e.map(e=>`[data-tcw-off~="${e}"]`).join(``)} ${t}{display:none!important}`),`.${l}{display:none!important}`].join(`
|
|
2
2
|
`)}function f(e,...t){e.dataset.tcwPart=t.join(` `)}function p(...e){return`data-tcw-part="${e.join(` `)}"`}function m(e){return Object.prototype.hasOwnProperty.call(a,e)?a[e]:void 0}function h(e,t,n){let r=[...e.children],i=e=>e.classList.contains(t);for(let e of r)i(e)&&e.classList.remove(l);let a=e=>!e.hidden&&getComputedStyle(e).display!==`none`,o=e=>a(e)&&(e instanceof HTMLButtonElement||e.childElementCount>0||e.textContent!==``),s=!1,c=null;for(let e of r)if(n!==void 0&&e.classList.contains(n))c?.classList.add(l),c=null,s=!1;else if(i(e)){if(!a(e))continue;s?(c=e,s=!1):e.classList.add(l)}else o(e)&&(s=!0,c=null);c?.classList.add(l)}function g(e,t,n){let r=e.flatMap(e=>{if(e===`separator`)return[e];if(!(t[e.id]??[]).every(e=>n[e]))return[];if(!e.submenu)return[e];let r=g(e.submenu,t,n);return r.length>0?[{...e,submenu:r}]:[]});return r.filter((e,t)=>{if(e!==`separator`)return!0;let n=r.slice(0,t).some(e=>e!==`separator`),i=r[t+1];return n&&i!==void 0&&i!==`separator`})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return s}});
|
|
3
|
-
//# sourceMappingURL=widgetFeatures-
|
|
3
|
+
//# sourceMappingURL=widgetFeatures-DpBWfQ8D.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetFeatures-DpBWfQ8D.cjs","names":[],"sources":["../src/widget/widgetFeatures.ts"],"sourcesContent":["import type { ContextMenuEntry } from './WidgetContextMenu.js';\nimport type { ChartMenuAction } from './chartMenu.js';\nimport type { DrawingMenuAction } from './drawingMenu.js';\n\n/**\n * The widget's switches, by name; every one is on until turned off. A name\n * without a dot is a whole capability, off wherever it shows (its button,\n * its menu entries, its command, its keys); a dotted name is one place.\n * A switch hides; it never adds a part that is off until its option asks\n * for it (`depthLadder: true`, `watchlist: true`).\n * The names are a contract: new ones are added, none is renamed.\n */\nexport const WIDGET_FEATURES = [\n // The bars.\n 'toolbar', 'sidebar', 'statusBar', 'dock',\n // Capabilities, wherever they show.\n 'alerts', 'objectTree', 'symbolInfo', 'symbolSearch', 'settings', 'indicatorSettings', 'drawingSettings',\n 'dataWindow', 'commandPalette', 'hotkeySheet', 'goToDate', 'replay', 'screenshot', 'copyImage', 'shareView',\n 'autoFib', 'themeToggle', 'fullscreen', 'accountPanel', 'orderTicket', 'bracketOrders', 'depthLadder',\n 'layouts', 'indicatorTemplates', 'compare', 'indicatorLegend', 'navigation', 'customTimeframes', 'marks',\n 'intervalTyping', 'symbolTyping', 'dragDropImport', 'hotkeys', 'toasts',\n // The toolbar's buttons.\n 'toolbar.symbol', 'toolbar.symbolInfo', 'toolbar.timeframes', 'toolbar.timeframeMenu', 'toolbar.chartType',\n 'toolbar.indicators', 'toolbar.layouts', 'toolbar.replay', 'toolbar.bracketOrders', 'toolbar.depthLadder',\n 'toolbar.accountPanel', 'toolbar.objectTree', 'toolbar.alerts', 'toolbar.screenshot', 'toolbar.settings',\n 'toolbar.themeToggle', 'toolbar.fullscreen', 'toolbar.compare', 'toolbar.undo', 'toolbar.redo', 'toolbar.trade',\n // The drawing sidebar: its tools by section, then its buttons.\n 'sidebar.cursor', 'sidebar.favorites', 'sidebar.lines', 'sidebar.fibonacci', 'sidebar.patterns',\n 'sidebar.forecasting', 'sidebar.annotation', 'sidebar.style', 'sidebar.magnet', 'sidebar.eraser',\n 'sidebar.zoomArea', 'sidebar.stayInDrawing', 'sidebar.undo', 'sidebar.redo', 'sidebar.clear',\n 'sidebar.lockAll', 'sidebar.hideAll',\n // The dock's rail: a button for each panel.\n 'dock.watchlist', 'dock.alerts', 'dock.objectTree', 'dock.dataWindow', 'dock.symbolInfo', 'dock.depthLadder',\n // The status bar.\n 'statusBar.range', 'statusBar.goToDate', 'statusBar.market', 'statusBar.connection', 'statusBar.symbol',\n 'statusBar.clock', 'statusBar.scale',\n // A long range on the range bar switches to weeks or months, a short one back.\n 'statusBar.rangeTimeframe',\n // On the chart: the indicators' rows, the panes' buttons, the navigation.\n 'indicatorLegend.values', 'indicatorLegend.visibility', 'indicatorLegend.settings', 'indicatorLegend.remove',\n 'indicatorLegend.more', 'pane.move', 'pane.collapse', 'pane.maximize',\n 'navigation.zoom', 'navigation.scroll', 'navigation.reset',\n // Menus: a right-click on the chart (and the \"+\" by the price axis), and on a drawing.\n 'menu.chart', 'menu.chart.alert', 'menu.chart.order', 'menu.chart.orderTicket', 'menu.chart.horizontalLine',\n 'menu.chart.resetView', 'menu.chart.drawings', 'menu.chart.exportData', 'menu.chart.settings',\n 'menu.chart.scale', 'menu.chart.goToDate', 'menu.chart.paneScale', 'menu.priceAxisAdd',\n 'menu.chart.indicators', 'menu.chart.timezone',\n 'menu.drawing', 'menu.drawing.settings', 'menu.drawing.alert', 'menu.drawing.order', 'menu.drawing.group',\n 'menu.drawing.lock', 'menu.drawing.hide', 'menu.drawing.duplicate', 'menu.drawing.delete',\n // The toolbar that appears over a selected drawing.\n 'selectionToolbar',\n // Keys.\n 'hotkeys.commandPalette', 'hotkeys.symbolSearch', 'hotkeys.save', 'hotkeys.tools', 'hotkeys.invertScale',\n 'hotkeys.goToDate', 'hotkeys.help', 'hotkeys.resetView',\n] as const;\n\nexport type WidgetFeature = (typeof WIDGET_FEATURES)[number];\n/** Switches to turn on (`true`) or off (`false`), by name. */\nexport type WidgetFeatures = Partial<Record<WidgetFeature, boolean>>;\n/** Every switch, on or off. */\nexport type WidgetFeatureState = Readonly<Record<WidgetFeature, boolean>>;\n\nconst KNOWN: ReadonlySet<string> = new Set(WIDGET_FEATURES);\n\n/** The widget's older on/off options, each the switches it stands for. */\nexport const LEGACY_FEATURE_OPTIONS = {\n toolbar: ['toolbar'],\n drawingTools: ['sidebar', 'drawingSettings', 'hotkeys.tools', 'menu.chart.horizontalLine'],\n settings: ['settings'],\n statusBar: ['statusBar', 'goToDate'],\n rangeBar: ['statusBar.range', 'statusBar.rangeTimeframe', 'goToDate'],\n indicatorLegend: ['indicatorLegend'],\n fullscreen: ['fullscreen'],\n alerts: ['alerts'],\n objectTree: ['objectTree'],\n accountPanel: ['accountPanel', 'orderTicket'],\n indicatorTemplates: ['indicatorTemplates'],\n intervalTyping: ['intervalTyping'],\n symbolInfo: ['symbolInfo'],\n navigation: ['navigation'],\n dragDropImport: ['dragDropImport'],\n customTimeframes: ['customTimeframes'],\n} as const satisfies Record<string, readonly WidgetFeature[]>;\n\ntype LegacyOptions = { readonly [K in keyof typeof LEGACY_FEATURE_OPTIONS]?: unknown };\n\n/** The switches each chart menu entry needs on (the right-click menu and the \"+\" by the price axis). */\nexport const CHART_MENU_FEATURES: Readonly<Record<ChartMenuAction, readonly WidgetFeature[]>> = {\n alert: ['alerts', 'menu.chart.alert'],\n buyLimit: ['menu.chart.order'],\n buyStop: ['menu.chart.order'],\n sellLimit: ['menu.chart.order'],\n sellStop: ['menu.chart.order'],\n orderTicket: ['orderTicket', 'menu.chart.orderTicket'],\n horizontalLine: ['menu.chart.horizontalLine'],\n resetView: ['menu.chart.resetView'],\n paste: ['menu.chart.drawings'],\n hideDrawings: ['menu.chart.drawings'],\n showDrawings: ['menu.chart.drawings'],\n removeDrawings: ['menu.chart.drawings'],\n removeIndicators: ['menu.chart.indicators'],\n settings: ['settings', 'menu.chart.settings'],\n exportData: ['menu.chart.exportData'],\n resetPriceScale: ['menu.chart.scale'],\n autoScale: ['menu.chart.scale'],\n invertScale: ['menu.chart.scale'],\n leftScale: ['menu.chart.scale'],\n regularScale: ['menu.chart.scale'],\n logScale: ['menu.chart.scale'],\n percentScale: ['menu.chart.scale'],\n indexedScale: ['menu.chart.scale'],\n labels: ['menu.chart.scale'],\n indicatorValueLabels: ['menu.chart.scale'],\n alignAxisLabels: ['menu.chart.scale'],\n barCountdown: ['menu.chart.scale'],\n lines: ['menu.chart.scale'],\n highLowLines: ['menu.chart.scale'],\n lastPriceLine: ['menu.chart.scale'],\n goToDate: ['goToDate', 'menu.chart.goToDate'],\n timezone: ['menu.chart.timezone'],\n paneLog: ['menu.chart.paneScale'],\n paneInvert: ['menu.chart.paneScale'],\n panePercent: ['menu.chart.paneScale'],\n};\n\n/** The switches each entry of a drawing's menu needs on. */\nexport const DRAWING_MENU_FEATURES: Readonly<Record<DrawingMenuAction, readonly WidgetFeature[]>> = {\n settings: ['drawingSettings', 'menu.drawing.settings'],\n // Its words are part of what its settings set: one switch for both.\n text: ['menu.drawing.settings'],\n alert: ['alerts', 'menu.drawing.alert'],\n front: ['menu.drawing.order'],\n forward: ['menu.drawing.order'],\n backward: ['menu.drawing.order'],\n back: ['menu.drawing.order'],\n group: ['menu.drawing.group'],\n ungroup: ['menu.drawing.group'],\n lock: ['menu.drawing.lock'],\n unlock: ['menu.drawing.lock'],\n hide: ['menu.drawing.hide'],\n duplicate: ['menu.drawing.duplicate'],\n delete: ['menu.drawing.delete'],\n};\n\n/** The switch each command of the command palette needs on (by its action id). */\nexport const COMMAND_FEATURES: Readonly<Record<string, WidgetFeature>> = {\n symbolSearch: 'symbolSearch',\n compare: 'compare',\n goToDate: 'goToDate',\n saveLayout: 'layouts',\n alerts: 'alerts',\n objectTree: 'objectTree',\n hotkeys: 'hotkeySheet',\n screenshot: 'screenshot',\n copyImage: 'copyImage',\n toggleTheme: 'themeToggle',\n settings: 'settings',\n shareView: 'shareView',\n autoFib: 'autoFib',\n dataWindow: 'dataWindow',\n symbolInfo: 'symbolInfo',\n};\n\n/**\n * Switches as given (an option, a `setFeatures` call): known names set to\n * `true` or `false`. Anything else is dropped, with a warning.\n */\nexport function readWidgetFeatures(value: unknown): WidgetFeatures {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) return {};\n const out: WidgetFeatures = {};\n const dropped: string[] = [];\n for (const [name, on] of Object.entries(value)) {\n if (KNOWN.has(name) && typeof on === 'boolean') out[name as WidgetFeature] = on;\n else dropped.push(name);\n }\n if (dropped.length > 0) {\n console.warn(`[ChartWidget] Unknown or non-boolean feature switches left out: ${dropped.join(', ')}.`);\n }\n return out;\n}\n\n/** Every switch at the start: on, then off where an older option says `false`, then as `features` says. */\nexport function resolveWidgetFeatures(options: LegacyOptions & { readonly features?: unknown }): WidgetFeatureState {\n const state = Object.fromEntries(WIDGET_FEATURES.map((name) => [name, true])) as Record<WidgetFeature, boolean>;\n for (const [option, names] of Object.entries(LEGACY_FEATURE_OPTIONS)) {\n if (options[option as keyof LegacyOptions] !== false) continue;\n for (const name of names) state[name] = false;\n }\n return { ...state, ...readWidgetFeatures(options.features) };\n}\n\n/** The switches that are off, space apart (the root's `data-tcw-off`). */\nexport function offFeatures(state: WidgetFeatureState): string {\n return WIDGET_FEATURES.filter((name) => !state[name]).join(' ');\n}\n\n/** A divider with nothing shown on one side of it. */\nconst DIVIDER_OFF = 'tcw-divider-off';\n\n/** Holders whose every part can be switched off: they go too, rather than show empty. */\nconst GROUPED_PARTS: readonly { names: readonly WidgetFeature[]; selector: string }[] = [\n { names: ['navigation.zoom', 'navigation.scroll', 'navigation.reset'], selector: '.tcw-nav' },\n { names: ['pane.move', 'pane.collapse', 'pane.maximize'], selector: '.tcw-pane-controls' },\n {\n names: ['indicatorLegend.visibility', 'indicatorLegend.settings', 'indicatorLegend.more', 'indicatorLegend.remove'],\n selector: '.tcw-ind-legend-actions',\n },\n];\n\n/** Hides every part (`data-tcw-part`) whose switch is off on its widget, and the dividers left with nothing to divide. */\nexport function widgetFeatureCss(): string {\n return [\n ...WIDGET_FEATURES.map((name) => `.tcw-root[data-tcw-off~=\"${name}\"] [data-tcw-part~=\"${name}\"]{display:none!important}`),\n ...GROUPED_PARTS.map(({ names, selector }) =>\n `.tcw-root${names.map((name) => `[data-tcw-off~=\"${name}\"]`).join('')} ${selector}{display:none!important}`),\n `.${DIVIDER_OFF}{display:none!important}`,\n ].join('\\n');\n}\n\n/** Marks an element as a part of the switches named: it is hidden while any of them is off. */\nexport function markPart(el: HTMLElement, ...names: WidgetFeature[]): void {\n el.dataset.tcwPart = names.join(' ');\n}\n\n/** The same mark as an attribute, for markup built as text. */\nexport function partAttr(...names: WidgetFeature[]): string {\n return `data-tcw-part=\"${names.join(' ')}\"`;\n}\n\n/** The switch a command of the command palette needs on, if it has one. */\nexport function commandFeature(id: string): WidgetFeature | undefined {\n return Object.prototype.hasOwnProperty.call(COMMAND_FEATURES, id) ? COMMAND_FEATURES[id] : undefined;\n}\n\n/**\n * Hides each divider among `container`'s children with nothing shown between\n * it and the edge, a boundary (a spacer) or the divider before it.\n */\nexport function tidyDividers(container: HTMLElement, dividerClass: string, boundaryClass?: string): void {\n const children = [...container.children] as HTMLElement[];\n const isDivider = (el: HTMLElement) => el.classList.contains(dividerClass);\n for (const el of children) if (isDivider(el)) el.classList.remove(DIVIDER_OFF);\n const shown = (el: HTMLElement) => !el.hidden && getComputedStyle(el).display !== 'none';\n // An empty holder (for a host's buttons, say) shows nothing.\n const isItem = (el: HTMLElement) => shown(el) && (el instanceof HTMLButtonElement || el.childElementCount > 0 || el.textContent !== '');\n let itemSince = false;\n let pending: HTMLElement | null = null;\n for (const el of children) {\n if (boundaryClass !== undefined && el.classList.contains(boundaryClass)) {\n pending?.classList.add(DIVIDER_OFF);\n pending = null;\n itemSince = false;\n } else if (isDivider(el)) {\n if (!shown(el)) continue;\n if (!itemSince) {\n el.classList.add(DIVIDER_OFF);\n } else {\n pending = el;\n itemSince = false;\n }\n } else if (isItem(el)) {\n itemSince = true;\n pending = null;\n }\n }\n pending?.classList.add(DIVIDER_OFF);\n}\n\n/**\n * A menu's entries with those whose switches are off left out, in its\n * submenus too (a submenu with nothing left goes), and no separator at\n * either end or next to another.\n */\nexport function filterMenuEntries<Id extends string>(\n entries: readonly ContextMenuEntry[],\n featuresOf: Readonly<Record<Id, readonly WidgetFeature[]>>,\n state: WidgetFeatureState,\n): ContextMenuEntry[] {\n const kept = entries.flatMap((entry): ContextMenuEntry[] => {\n if (entry === 'separator') return [entry];\n const names = (featuresOf as Readonly<Record<string, readonly WidgetFeature[]>>)[entry.id] ?? [];\n if (!names.every((name) => state[name])) return [];\n if (!entry.submenu) return [entry];\n const submenu = filterMenuEntries(entry.submenu, featuresOf, state);\n return submenu.length > 0 ? [{ ...entry, submenu }] : [];\n });\n return kept.filter((entry, i) => {\n if (entry !== 'separator') return true;\n const before = kept.slice(0, i).some((e) => e !== 'separator');\n const next = kept[i + 1];\n return before && next !== undefined && next !== 'separator';\n });\n}\n"],"mappings":"AAYA,IAAa,EAAkB,0mEA0C9B,CAQK,EAA6B,IAAI,I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,EAAK,EAAI,GACtB,OAAO,GAAU,IAAS,IAAA,IAAa,IAAS,aAChD"}
|
|
@@ -63,6 +63,7 @@ var e = /* @__PURE__ */ "toolbar,sidebar,statusBar,dock,alerts,objectTree,symbol
|
|
|
63
63
|
panePercent: ["menu.chart.paneScale"]
|
|
64
64
|
}, i = {
|
|
65
65
|
settings: ["drawingSettings", "menu.drawing.settings"],
|
|
66
|
+
text: ["menu.drawing.settings"],
|
|
66
67
|
alert: ["alerts", "menu.drawing.alert"],
|
|
67
68
|
front: ["menu.drawing.order"],
|
|
68
69
|
forward: ["menu.drawing.order"],
|
|
@@ -183,4 +184,4 @@ function g(e, t, n) {
|
|
|
183
184
|
//#endregion
|
|
184
185
|
export { g as a, p as c, h as d, d as f, m as i, o as l, i as n, f as o, e as r, c as s, r as t, s as u };
|
|
185
186
|
|
|
186
|
-
//# sourceMappingURL=widgetFeatures-
|
|
187
|
+
//# sourceMappingURL=widgetFeatures-sU-9JOSB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetFeatures-sU-9JOSB.js","names":[],"sources":["../src/widget/widgetFeatures.ts"],"sourcesContent":["import type { ContextMenuEntry } from './WidgetContextMenu.js';\nimport type { ChartMenuAction } from './chartMenu.js';\nimport type { DrawingMenuAction } from './drawingMenu.js';\n\n/**\n * The widget's switches, by name; every one is on until turned off. A name\n * without a dot is a whole capability, off wherever it shows (its button,\n * its menu entries, its command, its keys); a dotted name is one place.\n * A switch hides; it never adds a part that is off until its option asks\n * for it (`depthLadder: true`, `watchlist: true`).\n * The names are a contract: new ones are added, none is renamed.\n */\nexport const WIDGET_FEATURES = [\n // The bars.\n 'toolbar', 'sidebar', 'statusBar', 'dock',\n // Capabilities, wherever they show.\n 'alerts', 'objectTree', 'symbolInfo', 'symbolSearch', 'settings', 'indicatorSettings', 'drawingSettings',\n 'dataWindow', 'commandPalette', 'hotkeySheet', 'goToDate', 'replay', 'screenshot', 'copyImage', 'shareView',\n 'autoFib', 'themeToggle', 'fullscreen', 'accountPanel', 'orderTicket', 'bracketOrders', 'depthLadder',\n 'layouts', 'indicatorTemplates', 'compare', 'indicatorLegend', 'navigation', 'customTimeframes', 'marks',\n 'intervalTyping', 'symbolTyping', 'dragDropImport', 'hotkeys', 'toasts',\n // The toolbar's buttons.\n 'toolbar.symbol', 'toolbar.symbolInfo', 'toolbar.timeframes', 'toolbar.timeframeMenu', 'toolbar.chartType',\n 'toolbar.indicators', 'toolbar.layouts', 'toolbar.replay', 'toolbar.bracketOrders', 'toolbar.depthLadder',\n 'toolbar.accountPanel', 'toolbar.objectTree', 'toolbar.alerts', 'toolbar.screenshot', 'toolbar.settings',\n 'toolbar.themeToggle', 'toolbar.fullscreen', 'toolbar.compare', 'toolbar.undo', 'toolbar.redo', 'toolbar.trade',\n // The drawing sidebar: its tools by section, then its buttons.\n 'sidebar.cursor', 'sidebar.favorites', 'sidebar.lines', 'sidebar.fibonacci', 'sidebar.patterns',\n 'sidebar.forecasting', 'sidebar.annotation', 'sidebar.style', 'sidebar.magnet', 'sidebar.eraser',\n 'sidebar.zoomArea', 'sidebar.stayInDrawing', 'sidebar.undo', 'sidebar.redo', 'sidebar.clear',\n 'sidebar.lockAll', 'sidebar.hideAll',\n // The dock's rail: a button for each panel.\n 'dock.watchlist', 'dock.alerts', 'dock.objectTree', 'dock.dataWindow', 'dock.symbolInfo', 'dock.depthLadder',\n // The status bar.\n 'statusBar.range', 'statusBar.goToDate', 'statusBar.market', 'statusBar.connection', 'statusBar.symbol',\n 'statusBar.clock', 'statusBar.scale',\n // A long range on the range bar switches to weeks or months, a short one back.\n 'statusBar.rangeTimeframe',\n // On the chart: the indicators' rows, the panes' buttons, the navigation.\n 'indicatorLegend.values', 'indicatorLegend.visibility', 'indicatorLegend.settings', 'indicatorLegend.remove',\n 'indicatorLegend.more', 'pane.move', 'pane.collapse', 'pane.maximize',\n 'navigation.zoom', 'navigation.scroll', 'navigation.reset',\n // Menus: a right-click on the chart (and the \"+\" by the price axis), and on a drawing.\n 'menu.chart', 'menu.chart.alert', 'menu.chart.order', 'menu.chart.orderTicket', 'menu.chart.horizontalLine',\n 'menu.chart.resetView', 'menu.chart.drawings', 'menu.chart.exportData', 'menu.chart.settings',\n 'menu.chart.scale', 'menu.chart.goToDate', 'menu.chart.paneScale', 'menu.priceAxisAdd',\n 'menu.chart.indicators', 'menu.chart.timezone',\n 'menu.drawing', 'menu.drawing.settings', 'menu.drawing.alert', 'menu.drawing.order', 'menu.drawing.group',\n 'menu.drawing.lock', 'menu.drawing.hide', 'menu.drawing.duplicate', 'menu.drawing.delete',\n // The toolbar that appears over a selected drawing.\n 'selectionToolbar',\n // Keys.\n 'hotkeys.commandPalette', 'hotkeys.symbolSearch', 'hotkeys.save', 'hotkeys.tools', 'hotkeys.invertScale',\n 'hotkeys.goToDate', 'hotkeys.help', 'hotkeys.resetView',\n] as const;\n\nexport type WidgetFeature = (typeof WIDGET_FEATURES)[number];\n/** Switches to turn on (`true`) or off (`false`), by name. */\nexport type WidgetFeatures = Partial<Record<WidgetFeature, boolean>>;\n/** Every switch, on or off. */\nexport type WidgetFeatureState = Readonly<Record<WidgetFeature, boolean>>;\n\nconst KNOWN: ReadonlySet<string> = new Set(WIDGET_FEATURES);\n\n/** The widget's older on/off options, each the switches it stands for. */\nexport const LEGACY_FEATURE_OPTIONS = {\n toolbar: ['toolbar'],\n drawingTools: ['sidebar', 'drawingSettings', 'hotkeys.tools', 'menu.chart.horizontalLine'],\n settings: ['settings'],\n statusBar: ['statusBar', 'goToDate'],\n rangeBar: ['statusBar.range', 'statusBar.rangeTimeframe', 'goToDate'],\n indicatorLegend: ['indicatorLegend'],\n fullscreen: ['fullscreen'],\n alerts: ['alerts'],\n objectTree: ['objectTree'],\n accountPanel: ['accountPanel', 'orderTicket'],\n indicatorTemplates: ['indicatorTemplates'],\n intervalTyping: ['intervalTyping'],\n symbolInfo: ['symbolInfo'],\n navigation: ['navigation'],\n dragDropImport: ['dragDropImport'],\n customTimeframes: ['customTimeframes'],\n} as const satisfies Record<string, readonly WidgetFeature[]>;\n\ntype LegacyOptions = { readonly [K in keyof typeof LEGACY_FEATURE_OPTIONS]?: unknown };\n\n/** The switches each chart menu entry needs on (the right-click menu and the \"+\" by the price axis). */\nexport const CHART_MENU_FEATURES: Readonly<Record<ChartMenuAction, readonly WidgetFeature[]>> = {\n alert: ['alerts', 'menu.chart.alert'],\n buyLimit: ['menu.chart.order'],\n buyStop: ['menu.chart.order'],\n sellLimit: ['menu.chart.order'],\n sellStop: ['menu.chart.order'],\n orderTicket: ['orderTicket', 'menu.chart.orderTicket'],\n horizontalLine: ['menu.chart.horizontalLine'],\n resetView: ['menu.chart.resetView'],\n paste: ['menu.chart.drawings'],\n hideDrawings: ['menu.chart.drawings'],\n showDrawings: ['menu.chart.drawings'],\n removeDrawings: ['menu.chart.drawings'],\n removeIndicators: ['menu.chart.indicators'],\n settings: ['settings', 'menu.chart.settings'],\n exportData: ['menu.chart.exportData'],\n resetPriceScale: ['menu.chart.scale'],\n autoScale: ['menu.chart.scale'],\n invertScale: ['menu.chart.scale'],\n leftScale: ['menu.chart.scale'],\n regularScale: ['menu.chart.scale'],\n logScale: ['menu.chart.scale'],\n percentScale: ['menu.chart.scale'],\n indexedScale: ['menu.chart.scale'],\n labels: ['menu.chart.scale'],\n indicatorValueLabels: ['menu.chart.scale'],\n alignAxisLabels: ['menu.chart.scale'],\n barCountdown: ['menu.chart.scale'],\n lines: ['menu.chart.scale'],\n highLowLines: ['menu.chart.scale'],\n lastPriceLine: ['menu.chart.scale'],\n goToDate: ['goToDate', 'menu.chart.goToDate'],\n timezone: ['menu.chart.timezone'],\n paneLog: ['menu.chart.paneScale'],\n paneInvert: ['menu.chart.paneScale'],\n panePercent: ['menu.chart.paneScale'],\n};\n\n/** The switches each entry of a drawing's menu needs on. */\nexport const DRAWING_MENU_FEATURES: Readonly<Record<DrawingMenuAction, readonly WidgetFeature[]>> = {\n settings: ['drawingSettings', 'menu.drawing.settings'],\n // Its words are part of what its settings set: one switch for both.\n text: ['menu.drawing.settings'],\n alert: ['alerts', 'menu.drawing.alert'],\n front: ['menu.drawing.order'],\n forward: ['menu.drawing.order'],\n backward: ['menu.drawing.order'],\n back: ['menu.drawing.order'],\n group: ['menu.drawing.group'],\n ungroup: ['menu.drawing.group'],\n lock: ['menu.drawing.lock'],\n unlock: ['menu.drawing.lock'],\n hide: ['menu.drawing.hide'],\n duplicate: ['menu.drawing.duplicate'],\n delete: ['menu.drawing.delete'],\n};\n\n/** The switch each command of the command palette needs on (by its action id). */\nexport const COMMAND_FEATURES: Readonly<Record<string, WidgetFeature>> = {\n symbolSearch: 'symbolSearch',\n compare: 'compare',\n goToDate: 'goToDate',\n saveLayout: 'layouts',\n alerts: 'alerts',\n objectTree: 'objectTree',\n hotkeys: 'hotkeySheet',\n screenshot: 'screenshot',\n copyImage: 'copyImage',\n toggleTheme: 'themeToggle',\n settings: 'settings',\n shareView: 'shareView',\n autoFib: 'autoFib',\n dataWindow: 'dataWindow',\n symbolInfo: 'symbolInfo',\n};\n\n/**\n * Switches as given (an option, a `setFeatures` call): known names set to\n * `true` or `false`. Anything else is dropped, with a warning.\n */\nexport function readWidgetFeatures(value: unknown): WidgetFeatures {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) return {};\n const out: WidgetFeatures = {};\n const dropped: string[] = [];\n for (const [name, on] of Object.entries(value)) {\n if (KNOWN.has(name) && typeof on === 'boolean') out[name as WidgetFeature] = on;\n else dropped.push(name);\n }\n if (dropped.length > 0) {\n console.warn(`[ChartWidget] Unknown or non-boolean feature switches left out: ${dropped.join(', ')}.`);\n }\n return out;\n}\n\n/** Every switch at the start: on, then off where an older option says `false`, then as `features` says. */\nexport function resolveWidgetFeatures(options: LegacyOptions & { readonly features?: unknown }): WidgetFeatureState {\n const state = Object.fromEntries(WIDGET_FEATURES.map((name) => [name, true])) as Record<WidgetFeature, boolean>;\n for (const [option, names] of Object.entries(LEGACY_FEATURE_OPTIONS)) {\n if (options[option as keyof LegacyOptions] !== false) continue;\n for (const name of names) state[name] = false;\n }\n return { ...state, ...readWidgetFeatures(options.features) };\n}\n\n/** The switches that are off, space apart (the root's `data-tcw-off`). */\nexport function offFeatures(state: WidgetFeatureState): string {\n return WIDGET_FEATURES.filter((name) => !state[name]).join(' ');\n}\n\n/** A divider with nothing shown on one side of it. */\nconst DIVIDER_OFF = 'tcw-divider-off';\n\n/** Holders whose every part can be switched off: they go too, rather than show empty. */\nconst GROUPED_PARTS: readonly { names: readonly WidgetFeature[]; selector: string }[] = [\n { names: ['navigation.zoom', 'navigation.scroll', 'navigation.reset'], selector: '.tcw-nav' },\n { names: ['pane.move', 'pane.collapse', 'pane.maximize'], selector: '.tcw-pane-controls' },\n {\n names: ['indicatorLegend.visibility', 'indicatorLegend.settings', 'indicatorLegend.more', 'indicatorLegend.remove'],\n selector: '.tcw-ind-legend-actions',\n },\n];\n\n/** Hides every part (`data-tcw-part`) whose switch is off on its widget, and the dividers left with nothing to divide. */\nexport function widgetFeatureCss(): string {\n return [\n ...WIDGET_FEATURES.map((name) => `.tcw-root[data-tcw-off~=\"${name}\"] [data-tcw-part~=\"${name}\"]{display:none!important}`),\n ...GROUPED_PARTS.map(({ names, selector }) =>\n `.tcw-root${names.map((name) => `[data-tcw-off~=\"${name}\"]`).join('')} ${selector}{display:none!important}`),\n `.${DIVIDER_OFF}{display:none!important}`,\n ].join('\\n');\n}\n\n/** Marks an element as a part of the switches named: it is hidden while any of them is off. */\nexport function markPart(el: HTMLElement, ...names: WidgetFeature[]): void {\n el.dataset.tcwPart = names.join(' ');\n}\n\n/** The same mark as an attribute, for markup built as text. */\nexport function partAttr(...names: WidgetFeature[]): string {\n return `data-tcw-part=\"${names.join(' ')}\"`;\n}\n\n/** The switch a command of the command palette needs on, if it has one. */\nexport function commandFeature(id: string): WidgetFeature | undefined {\n return Object.prototype.hasOwnProperty.call(COMMAND_FEATURES, id) ? COMMAND_FEATURES[id] : undefined;\n}\n\n/**\n * Hides each divider among `container`'s children with nothing shown between\n * it and the edge, a boundary (a spacer) or the divider before it.\n */\nexport function tidyDividers(container: HTMLElement, dividerClass: string, boundaryClass?: string): void {\n const children = [...container.children] as HTMLElement[];\n const isDivider = (el: HTMLElement) => el.classList.contains(dividerClass);\n for (const el of children) if (isDivider(el)) el.classList.remove(DIVIDER_OFF);\n const shown = (el: HTMLElement) => !el.hidden && getComputedStyle(el).display !== 'none';\n // An empty holder (for a host's buttons, say) shows nothing.\n const isItem = (el: HTMLElement) => shown(el) && (el instanceof HTMLButtonElement || el.childElementCount > 0 || el.textContent !== '');\n let itemSince = false;\n let pending: HTMLElement | null = null;\n for (const el of children) {\n if (boundaryClass !== undefined && el.classList.contains(boundaryClass)) {\n pending?.classList.add(DIVIDER_OFF);\n pending = null;\n itemSince = false;\n } else if (isDivider(el)) {\n if (!shown(el)) continue;\n if (!itemSince) {\n el.classList.add(DIVIDER_OFF);\n } else {\n pending = el;\n itemSince = false;\n }\n } else if (isItem(el)) {\n itemSince = true;\n pending = null;\n }\n }\n pending?.classList.add(DIVIDER_OFF);\n}\n\n/**\n * A menu's entries with those whose switches are off left out, in its\n * submenus too (a submenu with nothing left goes), and no separator at\n * either end or next to another.\n */\nexport function filterMenuEntries<Id extends string>(\n entries: readonly ContextMenuEntry[],\n featuresOf: Readonly<Record<Id, readonly WidgetFeature[]>>,\n state: WidgetFeatureState,\n): ContextMenuEntry[] {\n const kept = entries.flatMap((entry): ContextMenuEntry[] => {\n if (entry === 'separator') return [entry];\n const names = (featuresOf as Readonly<Record<string, readonly WidgetFeature[]>>)[entry.id] ?? [];\n if (!names.every((name) => state[name])) return [];\n if (!entry.submenu) return [entry];\n const submenu = filterMenuEntries(entry.submenu, featuresOf, state);\n return submenu.length > 0 ? [{ ...entry, submenu }] : [];\n });\n return kept.filter((entry, i) => {\n if (entry !== 'separator') return true;\n const before = kept.slice(0, i).some((e) => e !== 'separator');\n const next = kept[i + 1];\n return before && next !== undefined && next !== 'separator';\n });\n}\n"],"mappings":";AA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M,IAAS,EAAK,MAAM,GAAG,EAAE,CAAC,MAAM,MAAM,MAAM,YAAY,EACxD,IAAO,EAAK,IAAI;AACtB,SAAO,KAAU,MAAS,KAAA,KAAa,MAAS;GAChD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e=require(`@tradecanvas/commons`);var t=[{zone:`Pacific/Honolulu`,city:`Honolulu`},{zone:`America/Los_Angeles`,city:`Los Angeles`},{zone:`America/Denver`,city:`Denver`},{zone:`America/Chicago`,city:`Chicago`},{zone:`America/New_York`,city:`New York`},{zone:`America/Toronto`,city:`Toronto`},{zone:`America/Sao_Paulo`,city:`São Paulo`},{zone:`UTC`,city:`UTC`},{zone:`Europe/London`,city:`London`},{zone:`Europe/Berlin`,city:`Frankfurt`},{zone:`Europe/Paris`,city:`Paris`},{zone:`Europe/Zurich`,city:`Zurich`},{zone:`Africa/Johannesburg`,city:`Johannesburg`},{zone:`Europe/Istanbul`,city:`Istanbul`},{zone:`Europe/Moscow`,city:`Moscow`},{zone:`Asia/Dubai`,city:`Dubai`},{zone:`Asia/Kolkata`,city:`Mumbai`},{zone:`Asia/Bangkok`,city:`Bangkok`},{zone:`Asia/Ho_Chi_Minh`,city:`Ho Chi Minh City`},{zone:`Asia/Jakarta`,city:`Jakarta`},{zone:`Asia/Singapore`,city:`Singapore`},{zone:`Asia/Hong_Kong`,city:`Hong Kong`},{zone:`Asia/Shanghai`,city:`Shanghai`},{zone:`Asia/Taipei`,city:`Taipei`},{zone:`Asia/Seoul`,city:`Seoul`},{zone:`Asia/Tokyo`,city:`Tokyo`},{zone:`Australia/Sydney`,city:`Sydney`},{zone:`Pacific/Auckland`,city:`Auckland`}],n=/^-?\d+$/,r=840;function i(e){if(!n.test(e))return null;let t=Number(e);return Math.abs(t)<=r?t:null}function a(t){return!t||t===`local`?null:t===`exchange`?`exchange`:n.test(t)?i(t):(0,e.isValidTimeZone)(t)?t:null}function o(e){return e===null?`local`:String(e)}function s(n,r,i,o){let s=(0,e.offsetAt)(null,r),c=t.filter(({zone:t})=>(0,e.isValidTimeZone)(t)).map(({zone:t,city:n})=>{let i=(0,e.offsetAt)(t,r);return{value:t,label:t===`UTC`?`UTC`:`(${(0,e.tzLabel)(i)}) ${n}`,offset:i}}),l=a(n);typeof l==`number`&&c.push({value:n,label:(0,e.tzLabel)(l),offset:l}),c.sort((e,t)=>e.offset-t.offset);let u=[{value:`local`,label:`${i} (${(0,e.tzLabel)(s)})`,offset:s}];if(o){let t=(0,e.offsetAt)(o.zone&&(0,e.isValidTimeZone)(o.zone)?o.zone:`UTC`,r);u.push({value:`exchange`,label:`${o.label} (${(0,e.tzLabel)(t)})`,offset:t})}return[...u,...c]}var c=[{label:`Candlestick`,value:`candlestick`},{label:`Line`,value:`line`},{label:`Area`,value:`area`},{label:`Bar`,value:`bar`},{label:`Heikin-Ashi`,value:`heikinAshi`},{label:`Hollow Candle`,value:`hollowCandle`},{label:`Baseline`,value:`baseline`},{label:`Volume Candles`,value:`volumeCandles`},{label:`Equivolume`,value:`equivolume`},{label:`HLC Area`,value:`hlcArea`},{label:`Step Line`,value:`stepLine`},{label:`Line + Markers`,value:`lineWithMarkers`},{label:`High-Low`,value:`hiLo`},{label:`Renko`,value:`renko`},{label:`Line Break`,value:`lineBreak`},{label:`Kagi`,value:`kagi`},{label:`Point & Figure`,value:`pointAndFigure`},{label:`Range Bars`,value:`rangeBars`}],l=[{label:`Lines`,section:`lines`,tools:[{label:`Trend Line`,value:`trendLine`,heading:`Lines`},{label:`Ray`,value:`ray`},{label:`Extended Line`,value:`extendedLine`},{label:`Info Line`,value:`infoLine`},{label:`Trend Angle`,value:`trendAngle`},{label:`Horizontal Line`,value:`horizontalLine`,heading:`Horizontal/Vertical`},{label:`Horizontal Ray`,value:`horizontalRay`},{label:`Vertical Line`,value:`verticalLine`},{label:`Cross Line`,value:`crossLine`},{label:`Parallel Channel`,value:`parallelChannel`,heading:`Channels`},{label:`Regression Channel`,value:`regressionChannel`},{label:`Disjoint Channel`,value:`disjointChannel`},{label:`Flat Top/Bottom`,value:`flatTopBottom`}]},{label:`Fibonacci`,section:`fibonacci`,tools:[{label:`Fib Retracement`,value:`fibRetracement`,heading:`Fibonacci`},{label:`Fib Extension`,value:`fibExtension`},{label:`Fib Channel`,value:`fibChannel`},{label:`Fib Time Zones`,value:`fibTimeZones`},{label:`Fib Speed Resistance Fan`,value:`fibSpeedResistanceFan`},{label:`Fib Speed Resistance Arcs`,value:`fibArcs`},{label:`Fib Circles`,value:`fibCircles`},{label:`Fib Spiral`,value:`fibSpiral`},{label:`Fib Wedge`,value:`fibWedge`},{label:`Pitchfork`,value:`pitchfork`,heading:`Gann & Pitchforks`},{label:`Schiff Pitchfork`,value:`schiffPitchfork`},{label:`Modified Schiff Pitchfork`,value:`modifiedSchiffPitchfork`},{label:`Gann Fan`,value:`gannFan`},{label:`Gann Box`,value:`gannBox`},{label:`Gann Square`,value:`gannSquare`},{label:`Pitchfan`,value:`pitchfan`},{label:`Cyclic Lines`,value:`cyclicLines`,heading:`Cycles`},{label:`Time Cycles`,value:`timeCycles`},{label:`Sine Line`,value:`sineLine`}]},{label:`Patterns`,section:`patterns`,tools:[{label:`XABCD Pattern`,value:`xabcdPattern`,heading:`Patterns`},{label:`ABCD Pattern`,value:`abcdPattern`},{label:`Head and Shoulders`,value:`headAndShoulders`},{label:`Cypher Pattern`,value:`cypherPattern`},{label:`Three Drives Pattern`,value:`threeDrives`},{label:`Elliott Wave`,value:`elliottWave`,heading:`Elliott Waves`},{label:`Elliott Impulse Wave`,value:`elliottImpulse`},{label:`Elliott Correction Wave`,value:`elliottCorrection`},{label:`Elliott Triangle Wave`,value:`elliottTriangle`},{label:`Elliott Double Combo Wave`,value:`elliottDoubleCombo`},{label:`Elliott Triple Combo Wave`,value:`elliottTripleCombo`}]},{label:`Forecasting`,section:`forecasting`,tools:[{label:`Long/Short Position`,value:`riskReward`,heading:`Forecasting`},{label:`Anchored VWAP`,value:`anchoredVWAP`},{label:`Fixed Range Volume Profile`,value:`volumeProfileRange`},{label:`Forecast`,value:`forecast`},{label:`Projection`,value:`projection`},{label:`Bars Pattern`,value:`barsPattern`},{label:`Price Range`,value:`priceRange`,heading:`Measure`},{label:`Date Range`,value:`dateRange`},{label:`Date and Price Range`,value:`dateAndPriceRange`},{label:`Measure`,value:`measure`}]},{label:`Shapes`,section:`annotation`,tools:[{label:`Rectangle`,value:`rectangle`,heading:`Shapes`},{label:`Rotated Rectangle`,value:`rotatedRectangle`},{label:`Circle`,value:`circle`},{label:`Ellipse`,value:`ellipse`},{label:`Triangle`,value:`triangle`},{label:`Polyline`,value:`polyline`},{label:`Curve`,value:`curve`},{label:`Arc`,value:`arc`},{label:`Brush`,value:`brush`,heading:`Brushes`},{label:`Highlighter`,value:`highlighter`},{label:`Path`,value:`path`}]},{label:`Annotation`,section:`annotation`,tools:[{label:`Text`,value:`text`},{label:`Price Label`,value:`priceLabel`},{label:`Arrow`,value:`arrow`},{label:`Note`,value:`note`},{label:`Callout`,value:`callout`},{label:`Flag Mark`,value:`flag`},{label:`Arrow Mark`,value:`arrowMark`},{label:`Icon`,value:`icon`},{label:`Signpost`,value:`signpost`},{label:`Balloon`,value:`balloon`},{label:`Anchored Text`,value:`anchoredText`},{label:`Anchored Note`,value:`anchoredNote`}]}],u=[`BTCUSDT`,`ETHUSDT`,`SOLUSDT`,`BNBUSDT`],d={gridVisible:!0,volumeVisible:!0,volumeProfileVisible:!1,marketProfileVisible:!1,marketProfileSplit:!1,marketProfileLetters:!1,marketProfileBuckets:48,marketProfileOpacity:.32,depthHeatmapVisible:!1,depthHeatmapOpacity:.7,sessionShadingVisible:!1,pivotMarkersVisible:!1,pivotStrength:5,pivotStructureLabels:!1,periodLevelsVisible:!1,periodLevelsPeriod:`day`,legendVisible:!0,barCountdown:!0,indicatorValueLabels:!1,alignAxisLabels:!0,logScale:!1,scaleMode:`regular`,autoScale:!0,invertScale:!1,leftPriceScale:!1,crosshairMode:`magnet`,crosshairCursor:`cross`,numberLocale:`en-US`,timezone:`local`,highLowLines:!1,mainSeriesVisible:!0,extendedHours:!0,chartTypeOptions:{}},f=(e,...t)=>({label:e,keys:t}),p=(e,t,n={})=>({label:e,keys:[t],auto:n}),m=e=>({hint:e}),h={from:`panes.titleColor`},g={title:`settings.section.lastPrice`,rows:[f(`settings.priceLine`,`lastPrice.visible`),f(`settings.up`,`lastPrice.upColor`),f(`settings.down`,`lastPrice.downColor`),f(`drawingSettings.lineStyle`,`lastPrice.style`),f(`drawingSettings.lineWidth`,`lastPrice.width`)]},_={title:`settings.volume`,rows:[f(`settings.up`,`volume.upColor`),f(`settings.down`,`volume.downColor`)]},v={title:`settings.highLowLines`,rows:[p(`drawingSettings.color`,`highLow.color`,h)]},y=[g,_,v],b=[f(`settings.legendText`,`legend.textColor`),f(`settings.legendLabels`,`legend.labelColor`)],x=[...b,f(`settings.paneTitles`,`panes.titleColor`)],S=[f(`drawingSettings.text`,`axis.price.textColor`,`axis.time.textColor`),f(`settings.scaleLines`,`axis.price.lineColor`,`axis.time.lineColor`)],C=[{title:`settings.section.background`,rows:[f(`settings.background`,`background.color`),f(`settings.paneBackground`,`panes.background`),f(`settings.paneSeparator`,`panes.separatorColor`),p(`settings.watermark`,`watermark.color`,h)]},{title:`settings.gridLines`,rows:[f(`settings.horizontal`,`grid.horizontal.visible`),f(`settings.vertical`,`grid.vertical.visible`),f(`drawingSettings.color`,`grid.horizontal.color`,`grid.vertical.color`),f(`drawingSettings.lineStyle`,`grid.horizontal.style`,`grid.vertical.style`),f(`drawingSettings.lineWidth`,`grid.horizontal.width`,`grid.vertical.width`)]},{title:`settings.crosshairMode`,rows:[f(`settings.horizontal`,`crosshair.horizontal.visible`),f(`settings.vertical`,`crosshair.vertical.visible`),f(`drawingSettings.color`,`crosshair.horizontal.color`,`crosshair.vertical.color`),f(`drawingSettings.lineStyle`,`crosshair.horizontal.style`,`crosshair.vertical.style`),f(`drawingSettings.lineWidth`,`crosshair.horizontal.width`,`crosshair.vertical.width`),f(`settings.labelBackground`,`crosshair.labelBackground`),f(`settings.labelText`,`crosshair.labelTextColor`)]},{title:`settings.sessionBreaks`,rows:[p(`drawingSettings.color`,`sessionBreaks.color`,{from:`axis.price.lineColor`}),p(`drawingSettings.lineStyle`,`sessionBreaks.style`),p(`drawingSettings.lineWidth`,`sessionBreaks.width`)]},{title:`objects.drawings`,rows:[p(`settings.handles`,`drawings.handleColor`,m(`#ffffff`))]}],w=[{title:`settings.section.orders`,trading:!0,rows:[p(`ticket.buy`,`trading.buyColor`,m(e.DEFAULT_TRADING_CONFIG.orderColors?.buy)),p(`ticket.sell`,`trading.sellColor`,m(e.DEFAULT_TRADING_CONFIG.orderColors?.sell)),p(`settings.profit`,`trading.profitColor`,m(e.DEFAULT_TRADING_CONFIG.positionColors?.profit)),p(`settings.loss`,`trading.lossColor`,m(e.DEFAULT_TRADING_CONFIG.positionColors?.loss)),p(`account.entry`,`trading.entryColor`,m(e.DEFAULT_TRADING_CONFIG.positionColors?.entry))]},{title:`settings.section.signals`,rows:[p(`account.long`,`markers.longColor`,m(e.DEFAULT_SIGNAL_STYLE.longColor)),p(`account.short`,`markers.shortColor`,m(e.DEFAULT_SIGNAL_STYLE.shortColor)),p(`markers.neutral`,`markers.neutralColor`,m(e.DEFAULT_SIGNAL_STYLE.neutralColor))]},{title:`settings.section.tradeZones`,rows:[p(`settings.profit`,`tradeZones.profitColor`,m(e.DEFAULT_TRADE_ZONE_STYLE.profitColor)),p(`settings.loss`,`tradeZones.lossColor`,m(e.DEFAULT_TRADE_ZONE_STYLE.lossColor)),p(`settings.openTrade`,`tradeZones.activeColor`,m(e.DEFAULT_TRADE_ZONE_STYLE.activeColor))]}],T={upColor:`settings.up`,downColor:`settings.down`,wickUpColor:`settings.upWick`,wickDownColor:`settings.downWick`,color:`drawingSettings.color`,lineColor:`drawingSettings.color`,lineWidth:`drawingSettings.lineWidth`,topColor:`settings.areaTop`,bottomColor:`settings.areaBottom`},E=new Set([`candlestick`,`heikinAshi`,`volumeCandles`,`equivolume`]);function D(t){let n=`series.${t}.`;return Object.keys(e.CHART_STYLE_KEYS).filter(e=>e.startsWith(n)).map(e=>{let r=e.slice(n.length),i=T[r]??`drawingSettings.color`;return E.has(t)&&r===`upColor`&&(i=`settings.upBody`),E.has(t)&&r===`downColor`&&(i=`settings.downBody`),t===`baseline`&&r===`upColor`&&(i=`settings.aboveBase`),t===`baseline`&&r===`downColor`&&(i=`settings.belowBase`),f(i,e)})}var O=[...new Set([...Object.keys(e.CHART_STYLE_KEYS).filter(e=>e.startsWith(`series.`)),...[...y,...C,...w].flatMap(e=>e.rows.flatMap(e=>e.keys)),...[...x,...S].flatMap(e=>e.keys)])],k=[`en-US`,`en-GB`,`en-IN`,`de-DE`,`fr-FR`,`es-ES`,`it-IT`,`pt-BR`,`ru-RU`,`tr-TR`,`vi-VN`,`id-ID`,`th-TH`,`zh-CN`,`zh-TW`,`ja-JP`,`ko-KR`],A=65234;function j(e){return(e&&!k.includes(e)?[e,...k]:k).map(e=>{let t;try{t=new Intl.NumberFormat(e,{minimumFractionDigits:2,maximumFractionDigits:2}).format(A)}catch{t=``}return{value:e,label:t?`${e} (${t})`:e}})}var M={Lines:`toolGroup.lines`,"Horizontal/Vertical":`toolGroup.horizontalVertical`,Channels:`toolGroup.channels`,Fibonacci:`toolGroup.fibonacci`,Shapes:`toolGroup.shapes`,"Gann & Pitchforks":`toolGroup.gannPitchforks`,Patterns:`toolGroup.patterns`,Measure:`toolGroup.measure`,Annotation:`toolGroup.annotation`,Forecasting:`toolGroup.forecasting`,Brushes:`toolGroup.brushes`,Cycles:`toolGroup.cycles`,"Elliott Waves":`toolGroup.elliott`};function N(e,t){let n=`chartType.${e.value}`,r=t(n);return r===n?e.label:r}function P(e,t){return e.map(e=>({...e,label:M[e.label]?t(M[e.label]):e.label,tools:e.tools.map(e=>{let n=`tool.${e.value}`,r=t(n),i=e.heading!==void 0&&M[e.heading]?t(M[e.heading]):e.heading;return{...e,label:r===n?e.label:r,...i===void 0?{}:{heading:i}}})}))}Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return s}});
|
|
2
|
+
//# sourceMappingURL=widgetLocales-BdRQu8wS.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetLocales-BdRQu8wS.cjs","names":[],"sources":["../src/widget/widgetTimezones.ts","../src/widget/widgetConfig.ts","../src/widget/widgetSettingsLook.ts","../src/widget/widgetLocales.ts"],"sourcesContent":["import type { TimeZoneSetting } from '@tradecanvas/commons';\nimport { isValidTimeZone, offsetAt, tzLabel } from '@tradecanvas/commons';\n\n/** The zones the settings offer besides the browser's own, by city. */\nexport const WIDGET_TIMEZONES: readonly { zone: string; city: string }[] = [\n { zone: 'Pacific/Honolulu', city: 'Honolulu' },\n { zone: 'America/Los_Angeles', city: 'Los Angeles' },\n { zone: 'America/Denver', city: 'Denver' },\n { zone: 'America/Chicago', city: 'Chicago' },\n { zone: 'America/New_York', city: 'New York' },\n { zone: 'America/Toronto', city: 'Toronto' },\n { zone: 'America/Sao_Paulo', city: 'São Paulo' },\n { zone: 'UTC', city: 'UTC' },\n { zone: 'Europe/London', city: 'London' },\n { zone: 'Europe/Berlin', city: 'Frankfurt' },\n { zone: 'Europe/Paris', city: 'Paris' },\n { zone: 'Europe/Zurich', city: 'Zurich' },\n { zone: 'Africa/Johannesburg', city: 'Johannesburg' },\n { zone: 'Europe/Istanbul', city: 'Istanbul' },\n { zone: 'Europe/Moscow', city: 'Moscow' },\n { zone: 'Asia/Dubai', city: 'Dubai' },\n { zone: 'Asia/Kolkata', city: 'Mumbai' },\n { zone: 'Asia/Bangkok', city: 'Bangkok' },\n { zone: 'Asia/Ho_Chi_Minh', city: 'Ho Chi Minh City' },\n { zone: 'Asia/Jakarta', city: 'Jakarta' },\n { zone: 'Asia/Singapore', city: 'Singapore' },\n { zone: 'Asia/Hong_Kong', city: 'Hong Kong' },\n { zone: 'Asia/Shanghai', city: 'Shanghai' },\n { zone: 'Asia/Taipei', city: 'Taipei' },\n { zone: 'Asia/Seoul', city: 'Seoul' },\n { zone: 'Asia/Tokyo', city: 'Tokyo' },\n { zone: 'Australia/Sydney', city: 'Sydney' },\n { zone: 'Pacific/Auckland', city: 'Auckland' },\n];\n\n/** A fixed offset as the settings write one: a whole number of minutes. */\nconst OFFSET_SETTING = /^-?\\d+$/;\n/**\n * No zone is further from UTC than 14 hours (Kiribati is UTC+14, the\n * furthest west UTC-12), so minutes past that are not an offset but a\n * broken value, and so many digits can even read as Infinity.\n */\nconst MAX_OFFSET_MINUTES = 14 * 60;\n\n/** The fixed offset a settings value names, in minutes east of UTC; null when it names none a zone could have. */\nexport function offsetSettingMinutes(value: string): number | null {\n if (!OFFSET_SETTING.test(value)) return null;\n const minutes = Number(value);\n return Math.abs(minutes) <= MAX_OFFSET_MINUTES ? minutes : null;\n}\n\n/**\n * The settings' timezone value as a display timezone: `'local'` is the\n * browser's, a number of minutes a fixed offset (older saved settings), and\n * anything else an IANA zone — the browser's own when it doesn't know it or\n * the offset is past any zone's.\n */\nexport function settingToTimezone(value: string): TimeZoneSetting {\n if (!value || value === 'local') return null;\n if (value === 'exchange') return 'exchange';\n if (OFFSET_SETTING.test(value)) return offsetSettingMinutes(value);\n return isValidTimeZone(value) ? value : null;\n}\n\n/** A display timezone as the settings' value: the inverse of `settingToTimezone`. */\nexport function timezoneToSetting(tz: TimeZoneSetting): string {\n if (tz === null) return 'local';\n return String(tz);\n}\n\nexport interface TimezoneOption {\n value: string;\n label: string;\n /** Minutes east of UTC at the time the list was made. */\n offset: number;\n}\n\n/**\n * The timezone menu at `atMs`: the browser's zone first, then the zones by\n * the offset in force then (\"(UTC-4) New York\"). An older fixed-offset\n * setting that isn't one of them stays on the list.\n */\nexport function timezoneOptions(\n current: string,\n atMs: number,\n localLabel: string,\n /** Offer the symbol's exchange zone ('exchange'); `zone` is null while unknown (UTC). */\n exchange?: { label: string; zone: string | null },\n): TimezoneOption[] {\n const local = offsetAt(null, atMs);\n const zones = WIDGET_TIMEZONES\n .filter(({ zone }) => isValidTimeZone(zone))\n .map(({ zone, city }) => {\n const offset = offsetAt(zone, atMs);\n return { value: zone, label: zone === 'UTC' ? 'UTC' : `(${tzLabel(offset)}) ${city}`, offset };\n });\n const fixed = settingToTimezone(current);\n if (typeof fixed === 'number') zones.push({ value: current, label: tzLabel(fixed), offset: fixed });\n zones.sort((a, b) => a.offset - b.offset);\n const first: TimezoneOption[] = [{ value: 'local', label: `${localLabel} (${tzLabel(local)})`, offset: local }];\n if (exchange) {\n const zone = exchange.zone && isValidTimeZone(exchange.zone) ? exchange.zone : 'UTC';\n const offset = offsetAt(zone, atMs);\n first.push({ value: 'exchange', label: `${exchange.label} (${tzLabel(offset)})`, offset });\n }\n return [...first, ...zones];\n}\n","import type { ChartType, DrawingToolType } from '@tradecanvas/commons';\nimport type { DrawingToolGroupDef, ChartSettingsState } from './types.js';\n\nexport const CHART_TYPES: { label: string; value: ChartType }[] = [\n { label: 'Candlestick', value: 'candlestick' },\n { label: 'Line', value: 'line' },\n { label: 'Area', value: 'area' },\n { label: 'Bar', value: 'bar' },\n { label: 'Heikin-Ashi', value: 'heikinAshi' },\n { label: 'Hollow Candle', value: 'hollowCandle' },\n { label: 'Baseline', value: 'baseline' },\n { label: 'Volume Candles', value: 'volumeCandles' },\n { label: 'Equivolume', value: 'equivolume' },\n { label: 'HLC Area', value: 'hlcArea' },\n { label: 'Step Line', value: 'stepLine' },\n { label: 'Line + Markers', value: 'lineWithMarkers' },\n { label: 'High-Low', value: 'hiLo' },\n { label: 'Renko', value: 'renko' },\n { label: 'Line Break', value: 'lineBreak' },\n { label: 'Kagi', value: 'kagi' },\n { label: 'Point & Figure', value: 'pointAndFigure' },\n { label: 'Range Bars', value: 'rangeBars' },\n];\n\n/**\n * The drawing tools, a button for each kind: lines, Fibonacci and Gann,\n * patterns, forecasting and measuring, shapes and brushes, and notes. A\n * button's menu lists its tools under headings (the kinds it gathers), so the\n * column holds few buttons, each big enough to read and hit at a glance.\n */\nexport const DRAWING_TOOL_GROUPS: DrawingToolGroupDef[] = [\n {\n label: 'Lines',\n section: 'lines',\n tools: [\n { label: 'Trend Line', value: 'trendLine' as DrawingToolType, heading: 'Lines' },\n { label: 'Ray', value: 'ray' as DrawingToolType },\n { label: 'Extended Line', value: 'extendedLine' as DrawingToolType },\n { label: 'Info Line', value: 'infoLine' as DrawingToolType },\n { label: 'Trend Angle', value: 'trendAngle' as DrawingToolType },\n { label: 'Horizontal Line', value: 'horizontalLine' as DrawingToolType, heading: 'Horizontal/Vertical' },\n { label: 'Horizontal Ray', value: 'horizontalRay' as DrawingToolType },\n { label: 'Vertical Line', value: 'verticalLine' as DrawingToolType },\n { label: 'Cross Line', value: 'crossLine' as DrawingToolType },\n { label: 'Parallel Channel', value: 'parallelChannel' as DrawingToolType, heading: 'Channels' },\n { label: 'Regression Channel', value: 'regressionChannel' as DrawingToolType },\n { label: 'Disjoint Channel', value: 'disjointChannel' as DrawingToolType },\n { label: 'Flat Top/Bottom', value: 'flatTopBottom' as DrawingToolType },\n ],\n },\n {\n label: 'Fibonacci',\n section: 'fibonacci',\n tools: [\n { label: 'Fib Retracement', value: 'fibRetracement' as DrawingToolType, heading: 'Fibonacci' },\n { label: 'Fib Extension', value: 'fibExtension' as DrawingToolType },\n { label: 'Fib Channel', value: 'fibChannel' as DrawingToolType },\n { label: 'Fib Time Zones', value: 'fibTimeZones' as DrawingToolType },\n { label: 'Fib Speed Resistance Fan', value: 'fibSpeedResistanceFan' as DrawingToolType },\n { label: 'Fib Speed Resistance Arcs', value: 'fibArcs' as DrawingToolType },\n { label: 'Fib Circles', value: 'fibCircles' as DrawingToolType },\n { label: 'Fib Spiral', value: 'fibSpiral' as DrawingToolType },\n { label: 'Fib Wedge', value: 'fibWedge' as DrawingToolType },\n { label: 'Pitchfork', value: 'pitchfork' as DrawingToolType, heading: 'Gann & Pitchforks' },\n { label: 'Schiff Pitchfork', value: 'schiffPitchfork' as DrawingToolType },\n { label: 'Modified Schiff Pitchfork', value: 'modifiedSchiffPitchfork' as DrawingToolType },\n { label: 'Gann Fan', value: 'gannFan' as DrawingToolType },\n { label: 'Gann Box', value: 'gannBox' as DrawingToolType },\n { label: 'Gann Square', value: 'gannSquare' as DrawingToolType },\n { label: 'Pitchfan', value: 'pitchfan' as DrawingToolType },\n { label: 'Cyclic Lines', value: 'cyclicLines' as DrawingToolType, heading: 'Cycles' },\n { label: 'Time Cycles', value: 'timeCycles' as DrawingToolType },\n { label: 'Sine Line', value: 'sineLine' as DrawingToolType },\n ],\n },\n {\n label: 'Patterns',\n section: 'patterns',\n tools: [\n { label: 'XABCD Pattern', value: 'xabcdPattern' as DrawingToolType, heading: 'Patterns' },\n { label: 'ABCD Pattern', value: 'abcdPattern' as DrawingToolType },\n { label: 'Head and Shoulders', value: 'headAndShoulders' as DrawingToolType },\n { label: 'Cypher Pattern', value: 'cypherPattern' as DrawingToolType },\n { label: 'Three Drives Pattern', value: 'threeDrives' as DrawingToolType },\n { label: 'Elliott Wave', value: 'elliottWave' as DrawingToolType, heading: 'Elliott Waves' },\n { label: 'Elliott Impulse Wave', value: 'elliottImpulse' as DrawingToolType },\n { label: 'Elliott Correction Wave', value: 'elliottCorrection' as DrawingToolType },\n { label: 'Elliott Triangle Wave', value: 'elliottTriangle' as DrawingToolType },\n { label: 'Elliott Double Combo Wave', value: 'elliottDoubleCombo' as DrawingToolType },\n { label: 'Elliott Triple Combo Wave', value: 'elliottTripleCombo' as DrawingToolType },\n ],\n },\n {\n label: 'Forecasting',\n section: 'forecasting',\n tools: [\n { label: 'Long/Short Position', value: 'riskReward' as DrawingToolType, heading: 'Forecasting' },\n { label: 'Anchored VWAP', value: 'anchoredVWAP' as DrawingToolType },\n { label: 'Fixed Range Volume Profile', value: 'volumeProfileRange' as DrawingToolType },\n { label: 'Forecast', value: 'forecast' as DrawingToolType },\n { label: 'Projection', value: 'projection' as DrawingToolType },\n { label: 'Bars Pattern', value: 'barsPattern' as DrawingToolType },\n { label: 'Price Range', value: 'priceRange' as DrawingToolType, heading: 'Measure' },\n { label: 'Date Range', value: 'dateRange' as DrawingToolType },\n { label: 'Date and Price Range', value: 'dateAndPriceRange' as DrawingToolType },\n { label: 'Measure', value: 'measure' as DrawingToolType },\n ],\n },\n {\n label: 'Shapes',\n section: 'annotation',\n tools: [\n { label: 'Rectangle', value: 'rectangle' as DrawingToolType, heading: 'Shapes' },\n { label: 'Rotated Rectangle', value: 'rotatedRectangle' as DrawingToolType },\n { label: 'Circle', value: 'circle' as DrawingToolType },\n { label: 'Ellipse', value: 'ellipse' as DrawingToolType },\n { label: 'Triangle', value: 'triangle' as DrawingToolType },\n { label: 'Polyline', value: 'polyline' as DrawingToolType },\n { label: 'Curve', value: 'curve' as DrawingToolType },\n { label: 'Arc', value: 'arc' as DrawingToolType },\n { label: 'Brush', value: 'brush' as DrawingToolType, heading: 'Brushes' },\n { label: 'Highlighter', value: 'highlighter' as DrawingToolType },\n { label: 'Path', value: 'path' as DrawingToolType },\n ],\n },\n {\n label: 'Annotation',\n section: 'annotation',\n tools: [\n { label: 'Text', value: 'text' as DrawingToolType },\n { label: 'Price Label', value: 'priceLabel' as DrawingToolType },\n { label: 'Arrow', value: 'arrow' as DrawingToolType },\n { label: 'Note', value: 'note' as DrawingToolType },\n { label: 'Callout', value: 'callout' as DrawingToolType },\n { label: 'Flag Mark', value: 'flag' as DrawingToolType },\n { label: 'Arrow Mark', value: 'arrowMark' as DrawingToolType },\n { label: 'Icon', value: 'icon' as DrawingToolType },\n { label: 'Signpost', value: 'signpost' as DrawingToolType },\n { label: 'Balloon', value: 'balloon' as DrawingToolType },\n { label: 'Anchored Text', value: 'anchoredText' as DrawingToolType },\n { label: 'Anchored Note', value: 'anchoredNote' as DrawingToolType },\n ],\n },\n];\n\nexport const DEFAULT_SYMBOLS = [\n 'BTCUSDT', 'ETHUSDT', 'SOLUSDT', 'BNBUSDT',\n];\n\nexport const DEFAULT_SETTINGS: ChartSettingsState = {\n gridVisible: true,\n volumeVisible: true,\n volumeProfileVisible: false,\n marketProfileVisible: false,\n marketProfileSplit: false,\n marketProfileLetters: false,\n marketProfileBuckets: 48,\n marketProfileOpacity: 0.32,\n depthHeatmapVisible: false,\n depthHeatmapOpacity: 0.7,\n sessionShadingVisible: false,\n pivotMarkersVisible: false,\n pivotStrength: 5,\n pivotStructureLabels: false,\n periodLevelsVisible: false,\n periodLevelsPeriod: 'day',\n legendVisible: true,\n barCountdown: true,\n indicatorValueLabels: false,\n alignAxisLabels: true,\n logScale: false,\n scaleMode: 'regular',\n autoScale: true,\n invertScale: false,\n leftPriceScale: false,\n crosshairMode: 'magnet',\n crosshairCursor: 'cross',\n numberLocale: 'en-US',\n timezone: 'local',\n highLowLines: false,\n mainSeriesVisible: true,\n extendedHours: true,\n chartTypeOptions: {},\n};\n","import {\n CHART_STYLE_KEYS,\n DEFAULT_SIGNAL_STYLE,\n DEFAULT_TRADE_ZONE_STYLE,\n DEFAULT_TRADING_CONFIG,\n type ChartStyleKey,\n type ChartType,\n} from '@tradecanvas/commons';\nimport type { MessageKey } from './i18n.js';\n\n/** A row of the settings' look: the style keys it sets together (it shows the first) and its name. */\nexport interface LookRow {\n label: MessageKey;\n keys: readonly ChartStyleKey[];\n /**\n * A key the chart leaves to the part itself until set (it reads back null):\n * the row offers Auto, and a colour picker starts from `hint` (the part's\n * colour as the library sets it; a host may have set its own) or from the\n * colour another key reads back (`from`).\n */\n auto?: { hint?: string; from?: ChartStyleKey };\n}\n\nexport interface LookSection {\n title: MessageKey;\n rows: readonly LookRow[];\n /** Shown only on a chart that trades. */\n trading?: boolean;\n}\n\nconst row = (label: MessageKey, ...keys: ChartStyleKey[]): LookRow => ({ label, keys });\nconst autoRow = (label: MessageKey, key: ChartStyleKey, start: { hint?: string; from?: ChartStyleKey } = {}): LookRow =>\n ({ label, keys: [key], auto: start });\nconst hint = (colour: string | undefined) => ({ hint: colour });\n/** The theme's quieter text, which the watermark and the high and low lines take. */\nconst QUIET_TEXT = { from: 'panes.titleColor' } as const;\n\n/** The Symbol tab's sections after the chart type's own: the last price, the volume, the high and low. */\nexport const LAST_PRICE_SECTION: LookSection = {\n title: 'settings.section.lastPrice',\n rows: [\n row('settings.priceLine', 'lastPrice.visible'),\n row('settings.up', 'lastPrice.upColor'),\n row('settings.down', 'lastPrice.downColor'),\n row('drawingSettings.lineStyle', 'lastPrice.style'),\n row('drawingSettings.lineWidth', 'lastPrice.width'),\n ],\n};\nexport const VOLUME_SECTION: LookSection = {\n title: 'settings.volume',\n rows: [row('settings.up', 'volume.upColor'), row('settings.down', 'volume.downColor')],\n};\nexport const HIGH_LOW_SECTION: LookSection = {\n title: 'settings.highLowLines',\n rows: [autoRow('drawingSettings.color', 'highLow.color', QUIET_TEXT)],\n};\n\nexport const SYMBOL_SECTIONS: readonly LookSection[] = [LAST_PRICE_SECTION, VOLUME_SECTION, HIGH_LOW_SECTION];\n\n/** The Status line tab's colours of the legend, offered where the chart has one. */\nexport const LEGEND_ROWS: readonly LookRow[] = [\n row('settings.legendText', 'legend.textColor'),\n row('settings.legendLabels', 'legend.labelColor'),\n];\n/** The Status line tab's colours: the legend's text and the panes' titles, which are drawn without it. */\nexport const STATUS_LINE_ROWS: readonly LookRow[] = [...LEGEND_ROWS, row('settings.paneTitles', 'panes.titleColor')];\n\n/** The Scales tab's colours: the axes' text and lines. */\nexport const SCALE_ROWS: readonly LookRow[] = [\n row('drawingSettings.text', 'axis.price.textColor', 'axis.time.textColor'),\n row('settings.scaleLines', 'axis.price.lineColor', 'axis.time.lineColor'),\n];\n\n/** The Appearance tab: the background, the grid, the crosshair, the session breaks, the drawings' handles. */\nexport const APPEARANCE_SECTIONS: readonly LookSection[] = [\n {\n title: 'settings.section.background',\n rows: [\n row('settings.background', 'background.color'),\n row('settings.paneBackground', 'panes.background'),\n row('settings.paneSeparator', 'panes.separatorColor'),\n autoRow('settings.watermark', 'watermark.color', QUIET_TEXT),\n ],\n },\n {\n title: 'settings.gridLines',\n rows: [\n row('settings.horizontal', 'grid.horizontal.visible'),\n row('settings.vertical', 'grid.vertical.visible'),\n row('drawingSettings.color', 'grid.horizontal.color', 'grid.vertical.color'),\n row('drawingSettings.lineStyle', 'grid.horizontal.style', 'grid.vertical.style'),\n row('drawingSettings.lineWidth', 'grid.horizontal.width', 'grid.vertical.width'),\n ],\n },\n {\n title: 'settings.crosshairMode',\n rows: [\n row('settings.horizontal', 'crosshair.horizontal.visible'),\n row('settings.vertical', 'crosshair.vertical.visible'),\n row('drawingSettings.color', 'crosshair.horizontal.color', 'crosshair.vertical.color'),\n row('drawingSettings.lineStyle', 'crosshair.horizontal.style', 'crosshair.vertical.style'),\n row('drawingSettings.lineWidth', 'crosshair.horizontal.width', 'crosshair.vertical.width'),\n row('settings.labelBackground', 'crosshair.labelBackground'),\n row('settings.labelText', 'crosshair.labelTextColor'),\n ],\n },\n {\n title: 'settings.sessionBreaks',\n rows: [\n autoRow('drawingSettings.color', 'sessionBreaks.color', { from: 'axis.price.lineColor' }),\n autoRow('drawingSettings.lineStyle', 'sessionBreaks.style'),\n autoRow('drawingSettings.lineWidth', 'sessionBreaks.width'),\n ],\n },\n {\n title: 'objects.drawings',\n rows: [autoRow('settings.handles', 'drawings.handleColor', hint('#ffffff'))],\n },\n];\n\n/** The Trading tab: the colours of what the host puts on the chart, its own until set. */\nexport const TRADING_SECTIONS: readonly LookSection[] = [\n {\n title: 'settings.section.orders',\n trading: true,\n rows: [\n autoRow('ticket.buy', 'trading.buyColor', hint(DEFAULT_TRADING_CONFIG.orderColors?.buy)),\n autoRow('ticket.sell', 'trading.sellColor', hint(DEFAULT_TRADING_CONFIG.orderColors?.sell)),\n autoRow('settings.profit', 'trading.profitColor', hint(DEFAULT_TRADING_CONFIG.positionColors?.profit)),\n autoRow('settings.loss', 'trading.lossColor', hint(DEFAULT_TRADING_CONFIG.positionColors?.loss)),\n autoRow('account.entry', 'trading.entryColor', hint(DEFAULT_TRADING_CONFIG.positionColors?.entry)),\n ],\n },\n {\n title: 'settings.section.signals',\n rows: [\n autoRow('account.long', 'markers.longColor', hint(DEFAULT_SIGNAL_STYLE.longColor)),\n autoRow('account.short', 'markers.shortColor', hint(DEFAULT_SIGNAL_STYLE.shortColor)),\n autoRow('markers.neutral', 'markers.neutralColor', hint(DEFAULT_SIGNAL_STYLE.neutralColor)),\n ],\n },\n {\n title: 'settings.section.tradeZones',\n rows: [\n autoRow('settings.profit', 'tradeZones.profitColor', hint(DEFAULT_TRADE_ZONE_STYLE.profitColor)),\n autoRow('settings.loss', 'tradeZones.lossColor', hint(DEFAULT_TRADE_ZONE_STYLE.lossColor)),\n autoRow('settings.openTrade', 'tradeZones.activeColor', hint(DEFAULT_TRADE_ZONE_STYLE.activeColor)),\n ],\n },\n];\n\n/** The name of each of a chart type's keys, by the key's last part. */\nconst SERIES_LABELS: Readonly<Record<string, MessageKey>> = {\n upColor: 'settings.up',\n downColor: 'settings.down',\n wickUpColor: 'settings.upWick',\n wickDownColor: 'settings.downWick',\n color: 'drawingSettings.color',\n lineColor: 'drawingSettings.color',\n lineWidth: 'drawingSettings.lineWidth',\n topColor: 'settings.areaTop',\n bottomColor: 'settings.areaBottom',\n};\n\n/** Types whose up and down are bodies with wicks. */\nconst BODIES: ReadonlySet<ChartType> = new Set<ChartType>(['candlestick', 'heikinAshi', 'volumeCandles', 'equivolume']);\n\n/** The rows of a chart type's own colours and widths, in the key table's order. */\nexport function seriesRows(type: ChartType): LookRow[] {\n const prefix = `series.${type}.`;\n return (Object.keys(CHART_STYLE_KEYS) as ChartStyleKey[])\n .filter((key) => key.startsWith(prefix))\n .map((key) => {\n const prop = key.slice(prefix.length);\n let label = SERIES_LABELS[prop] ?? 'drawingSettings.color';\n if (BODIES.has(type) && prop === 'upColor') label = 'settings.upBody';\n if (BODIES.has(type) && prop === 'downColor') label = 'settings.downBody';\n if (type === 'baseline' && prop === 'upColor') label = 'settings.aboveBase';\n if (type === 'baseline' && prop === 'downColor') label = 'settings.belowBase';\n return row(label, key);\n });\n}\n\n/**\n * Every key the settings set, every chart type's included: what Reset takes\n * away and an undo puts back.\n */\nexport const SETTINGS_LOOK_KEYS: readonly ChartStyleKey[] = [\n ...new Set<ChartStyleKey>([\n ...(Object.keys(CHART_STYLE_KEYS) as ChartStyleKey[]).filter((key) => key.startsWith('series.')),\n ...[...SYMBOL_SECTIONS, ...APPEARANCE_SECTIONS, ...TRADING_SECTIONS].flatMap((section) => section.rows.flatMap((r) => r.keys)),\n ...[...STATUS_LINE_ROWS, ...SCALE_ROWS].flatMap((r) => r.keys),\n ]),\n];\n","import type { DrawingToolGroupDef } from './types.js';\nimport type { MessageKey, Translator } from './i18n.js';\n\n/** Number formats the settings offer, by locale tag. */\nexport const NUMBER_LOCALES: readonly string[] = [\n 'en-US', 'en-GB', 'en-IN', 'de-DE', 'fr-FR', 'es-ES', 'it-IT', 'pt-BR', 'ru-RU', 'tr-TR',\n 'vi-VN', 'id-ID', 'th-TH', 'zh-CN', 'zh-TW', 'ja-JP', 'ko-KR',\n];\n\nconst SAMPLE = 65234;\n\n/** \"de-DE (65.234,00)\": each format with a sample number; the current one stays listed. */\nexport function numberLocaleOptions(current: string): { value: string; label: string }[] {\n const codes = current && !NUMBER_LOCALES.includes(current) ? [current, ...NUMBER_LOCALES] : NUMBER_LOCALES;\n return codes.map((code) => {\n let sample: string;\n try {\n sample = new Intl.NumberFormat(code, { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(SAMPLE);\n } catch {\n sample = '';\n }\n return { value: code, label: sample ? `${code} (${sample})` : code };\n });\n}\n\n/** Message key of each built-in drawing-tool group, by its English name. */\nconst TOOL_GROUP_KEYS: Readonly<Record<string, MessageKey>> = {\n Lines: 'toolGroup.lines',\n 'Horizontal/Vertical': 'toolGroup.horizontalVertical',\n Channels: 'toolGroup.channels',\n Fibonacci: 'toolGroup.fibonacci',\n Shapes: 'toolGroup.shapes',\n 'Gann & Pitchforks': 'toolGroup.gannPitchforks',\n Patterns: 'toolGroup.patterns',\n Measure: 'toolGroup.measure',\n Annotation: 'toolGroup.annotation',\n Forecasting: 'toolGroup.forecasting',\n Brushes: 'toolGroup.brushes',\n Cycles: 'toolGroup.cycles',\n 'Elliott Waves': 'toolGroup.elliott',\n};\n\n/** A chart type's name in the widget's language (an unknown type keeps its own). */\nexport function chartTypeLabel(ct: { value: string; label: string }, t: Translator): string {\n const key = `chartType.${ct.value}` as MessageKey;\n const translated = t(key);\n return translated === key ? ct.label : translated;\n}\n\n/** The drawing-tool groups with names in the widget's language (unknown tools keep theirs). */\nexport function localizeToolGroups(groups: readonly DrawingToolGroupDef[], t: Translator): DrawingToolGroupDef[] {\n return groups.map((group) => ({\n ...group,\n label: TOOL_GROUP_KEYS[group.label] ? t(TOOL_GROUP_KEYS[group.label]) : group.label,\n tools: group.tools.map((tool) => {\n const key = `tool.${tool.value}` as MessageKey;\n const label = t(key);\n // A heading is a former group's name, translated as one.\n const heading = tool.heading !== undefined && TOOL_GROUP_KEYS[tool.heading] ? t(TOOL_GROUP_KEYS[tool.heading]) : tool.heading;\n return { ...tool, label: label === key ? tool.label : label, ...(heading !== undefined ? { heading } : {}) };\n }),\n }));\n}\n"],"mappings":"sCAIA,IAAa,EAA8D,CACzE,CAAE,KAAM,mBAAoB,KAAM,WAAY,CAC9C,CAAE,KAAM,sBAAuB,KAAM,cAAe,CACpD,CAAE,KAAM,iBAAkB,KAAM,SAAU,CAC1C,CAAE,KAAM,kBAAmB,KAAM,UAAW,CAC5C,CAAE,KAAM,mBAAoB,KAAM,WAAY,CAC9C,CAAE,KAAM,kBAAmB,KAAM,UAAW,CAC5C,CAAE,KAAM,oBAAqB,KAAM,YAAa,CAChD,CAAE,KAAM,MAAO,KAAM,MAAO,CAC5B,CAAE,KAAM,gBAAiB,KAAM,SAAU,CACzC,CAAE,KAAM,gBAAiB,KAAM,YAAa,CAC5C,CAAE,KAAM,eAAgB,KAAM,QAAS,CACvC,CAAE,KAAM,gBAAiB,KAAM,SAAU,CACzC,CAAE,KAAM,sBAAuB,KAAM,eAAgB,CACrD,CAAE,KAAM,kBAAmB,KAAM,WAAY,CAC7C,CAAE,KAAM,gBAAiB,KAAM,SAAU,CACzC,CAAE,KAAM,aAAc,KAAM,QAAS,CACrC,CAAE,KAAM,eAAgB,KAAM,SAAU,CACxC,CAAE,KAAM,eAAgB,KAAM,UAAW,CACzC,CAAE,KAAM,mBAAoB,KAAM,mBAAoB,CACtD,CAAE,KAAM,eAAgB,KAAM,UAAW,CACzC,CAAE,KAAM,iBAAkB,KAAM,YAAa,CAC7C,CAAE,KAAM,iBAAkB,KAAM,YAAa,CAC7C,CAAE,KAAM,gBAAiB,KAAM,WAAY,CAC3C,CAAE,KAAM,cAAe,KAAM,SAAU,CACvC,CAAE,KAAM,aAAc,KAAM,QAAS,CACrC,CAAE,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 @@ var m = [
|
|
|
280
280
|
{
|
|
281
281
|
label: "Regression Channel",
|
|
282
282
|
value: "regressionChannel"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
label: "Disjoint Channel",
|
|
286
|
+
value: "disjointChannel"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
label: "Flat Top/Bottom",
|
|
290
|
+
value: "flatTopBottom"
|
|
283
291
|
}
|
|
284
292
|
]
|
|
285
293
|
},
|
|
@@ -477,6 +485,10 @@ var m = [
|
|
|
477
485
|
value: "rectangle",
|
|
478
486
|
heading: "Shapes"
|
|
479
487
|
},
|
|
488
|
+
{
|
|
489
|
+
label: "Rotated Rectangle",
|
|
490
|
+
value: "rotatedRectangle"
|
|
491
|
+
},
|
|
480
492
|
{
|
|
481
493
|
label: "Circle",
|
|
482
494
|
value: "circle"
|
|
@@ -810,4 +822,4 @@ function B(e, t) {
|
|
|
810
822
|
//#endregion
|
|
811
823
|
export { h as _, w as a, f as b, O as c, A as d, C as f, g, _ as h, k as i, P as l, m, B as n, S as o, N as p, L as r, E as s, z as t, D as u, d as v, p as y };
|
|
812
824
|
|
|
813
|
-
//# sourceMappingURL=widgetLocales-
|
|
825
|
+
//# sourceMappingURL=widgetLocales-Bgm5-BB5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetLocales-Bgm5-BB5.js","names":[],"sources":["../src/widget/widgetTimezones.ts","../src/widget/widgetConfig.ts","../src/widget/widgetSettingsLook.ts","../src/widget/widgetLocales.ts"],"sourcesContent":["import type { TimeZoneSetting } from '@tradecanvas/commons';\nimport { isValidTimeZone, offsetAt, tzLabel } from '@tradecanvas/commons';\n\n/** The zones the settings offer besides the browser's own, by city. */\nexport const WIDGET_TIMEZONES: readonly { zone: string; city: string }[] = [\n { zone: 'Pacific/Honolulu', city: 'Honolulu' },\n { zone: 'America/Los_Angeles', city: 'Los Angeles' },\n { zone: 'America/Denver', city: 'Denver' },\n { zone: 'America/Chicago', city: 'Chicago' },\n { zone: 'America/New_York', city: 'New York' },\n { zone: 'America/Toronto', city: 'Toronto' },\n { zone: 'America/Sao_Paulo', city: 'São Paulo' },\n { zone: 'UTC', city: 'UTC' },\n { zone: 'Europe/London', city: 'London' },\n { zone: 'Europe/Berlin', city: 'Frankfurt' },\n { zone: 'Europe/Paris', city: 'Paris' },\n { zone: 'Europe/Zurich', city: 'Zurich' },\n { zone: 'Africa/Johannesburg', city: 'Johannesburg' },\n { zone: 'Europe/Istanbul', city: 'Istanbul' },\n { zone: 'Europe/Moscow', city: 'Moscow' },\n { zone: 'Asia/Dubai', city: 'Dubai' },\n { zone: 'Asia/Kolkata', city: 'Mumbai' },\n { zone: 'Asia/Bangkok', city: 'Bangkok' },\n { zone: 'Asia/Ho_Chi_Minh', city: 'Ho Chi Minh City' },\n { zone: 'Asia/Jakarta', city: 'Jakarta' },\n { zone: 'Asia/Singapore', city: 'Singapore' },\n { zone: 'Asia/Hong_Kong', city: 'Hong Kong' },\n { zone: 'Asia/Shanghai', city: 'Shanghai' },\n { zone: 'Asia/Taipei', city: 'Taipei' },\n { zone: 'Asia/Seoul', city: 'Seoul' },\n { zone: 'Asia/Tokyo', city: 'Tokyo' },\n { zone: 'Australia/Sydney', city: 'Sydney' },\n { zone: 'Pacific/Auckland', city: 'Auckland' },\n];\n\n/** A fixed offset as the settings write one: a whole number of minutes. */\nconst OFFSET_SETTING = /^-?\\d+$/;\n/**\n * No zone is further from UTC than 14 hours (Kiribati is UTC+14, the\n * furthest west UTC-12), so minutes past that are not an offset but a\n * broken value, and so many digits can even read as Infinity.\n */\nconst MAX_OFFSET_MINUTES = 14 * 60;\n\n/** The fixed offset a settings value names, in minutes east of UTC; null when it names none a zone could have. */\nexport function offsetSettingMinutes(value: string): number | null {\n if (!OFFSET_SETTING.test(value)) return null;\n const minutes = Number(value);\n return Math.abs(minutes) <= MAX_OFFSET_MINUTES ? minutes : null;\n}\n\n/**\n * The settings' timezone value as a display timezone: `'local'` is the\n * browser's, a number of minutes a fixed offset (older saved settings), and\n * anything else an IANA zone — the browser's own when it doesn't know it or\n * the offset is past any zone's.\n */\nexport function settingToTimezone(value: string): TimeZoneSetting {\n if (!value || value === 'local') return null;\n if (value === 'exchange') return 'exchange';\n if (OFFSET_SETTING.test(value)) return offsetSettingMinutes(value);\n return isValidTimeZone(value) ? value : null;\n}\n\n/** A display timezone as the settings' value: the inverse of `settingToTimezone`. */\nexport function timezoneToSetting(tz: TimeZoneSetting): string {\n if (tz === null) return 'local';\n return String(tz);\n}\n\nexport interface TimezoneOption {\n value: string;\n label: string;\n /** Minutes east of UTC at the time the list was made. */\n offset: number;\n}\n\n/**\n * The timezone menu at `atMs`: the browser's zone first, then the zones by\n * the offset in force then (\"(UTC-4) New York\"). An older fixed-offset\n * setting that isn't one of them stays on the list.\n */\nexport function timezoneOptions(\n current: string,\n atMs: number,\n localLabel: string,\n /** Offer the symbol's exchange zone ('exchange'); `zone` is null while unknown (UTC). */\n exchange?: { label: string; zone: string | null },\n): TimezoneOption[] {\n const local = offsetAt(null, atMs);\n const zones = WIDGET_TIMEZONES\n .filter(({ zone }) => isValidTimeZone(zone))\n .map(({ zone, city }) => {\n const offset = offsetAt(zone, atMs);\n return { value: zone, label: zone === 'UTC' ? 'UTC' : `(${tzLabel(offset)}) ${city}`, offset };\n });\n const fixed = settingToTimezone(current);\n if (typeof fixed === 'number') zones.push({ value: current, label: tzLabel(fixed), offset: fixed });\n zones.sort((a, b) => a.offset - b.offset);\n const first: TimezoneOption[] = [{ value: 'local', label: `${localLabel} (${tzLabel(local)})`, offset: local }];\n if (exchange) {\n const zone = exchange.zone && isValidTimeZone(exchange.zone) ? exchange.zone : 'UTC';\n const offset = offsetAt(zone, atMs);\n first.push({ value: 'exchange', label: `${exchange.label} (${tzLabel(offset)})`, offset });\n }\n return [...first, ...zones];\n}\n","import type { ChartType, DrawingToolType } from '@tradecanvas/commons';\nimport type { DrawingToolGroupDef, ChartSettingsState } from './types.js';\n\nexport const CHART_TYPES: { label: string; value: ChartType }[] = [\n { label: 'Candlestick', value: 'candlestick' },\n { label: 'Line', value: 'line' },\n { label: 'Area', value: 'area' },\n { label: 'Bar', value: 'bar' },\n { label: 'Heikin-Ashi', value: 'heikinAshi' },\n { label: 'Hollow Candle', value: 'hollowCandle' },\n { label: 'Baseline', value: 'baseline' },\n { label: 'Volume Candles', value: 'volumeCandles' },\n { label: 'Equivolume', value: 'equivolume' },\n { label: 'HLC Area', value: 'hlcArea' },\n { label: 'Step Line', value: 'stepLine' },\n { label: 'Line + Markers', value: 'lineWithMarkers' },\n { label: 'High-Low', value: 'hiLo' },\n { label: 'Renko', value: 'renko' },\n { label: 'Line Break', value: 'lineBreak' },\n { label: 'Kagi', value: 'kagi' },\n { label: 'Point & Figure', value: 'pointAndFigure' },\n { label: 'Range Bars', value: 'rangeBars' },\n];\n\n/**\n * The drawing tools, a button for each kind: lines, Fibonacci and Gann,\n * patterns, forecasting and measuring, shapes and brushes, and notes. A\n * button's menu lists its tools under headings (the kinds it gathers), so the\n * column holds few buttons, each big enough to read and hit at a glance.\n */\nexport const DRAWING_TOOL_GROUPS: DrawingToolGroupDef[] = [\n {\n label: 'Lines',\n section: 'lines',\n tools: [\n { label: 'Trend Line', value: 'trendLine' as DrawingToolType, heading: 'Lines' },\n { label: 'Ray', value: 'ray' as DrawingToolType },\n { label: 'Extended Line', value: 'extendedLine' as DrawingToolType },\n { label: 'Info Line', value: 'infoLine' as DrawingToolType },\n { label: 'Trend Angle', value: 'trendAngle' as DrawingToolType },\n { label: 'Horizontal Line', value: 'horizontalLine' as DrawingToolType, heading: 'Horizontal/Vertical' },\n { label: 'Horizontal Ray', value: 'horizontalRay' as DrawingToolType },\n { label: 'Vertical Line', value: 'verticalLine' as DrawingToolType },\n { label: 'Cross Line', value: 'crossLine' as DrawingToolType },\n { label: 'Parallel Channel', value: 'parallelChannel' as DrawingToolType, heading: 'Channels' },\n { label: 'Regression Channel', value: 'regressionChannel' as DrawingToolType },\n { label: 'Disjoint Channel', value: 'disjointChannel' as DrawingToolType },\n { label: 'Flat Top/Bottom', value: 'flatTopBottom' as DrawingToolType },\n ],\n },\n {\n label: 'Fibonacci',\n section: 'fibonacci',\n tools: [\n { label: 'Fib Retracement', value: 'fibRetracement' as DrawingToolType, heading: 'Fibonacci' },\n { label: 'Fib Extension', value: 'fibExtension' as DrawingToolType },\n { label: 'Fib Channel', value: 'fibChannel' as DrawingToolType },\n { label: 'Fib Time Zones', value: 'fibTimeZones' as DrawingToolType },\n { label: 'Fib Speed Resistance Fan', value: 'fibSpeedResistanceFan' as DrawingToolType },\n { label: 'Fib Speed Resistance Arcs', value: 'fibArcs' as DrawingToolType },\n { label: 'Fib Circles', value: 'fibCircles' as DrawingToolType },\n { label: 'Fib Spiral', value: 'fibSpiral' as DrawingToolType },\n { label: 'Fib Wedge', value: 'fibWedge' as DrawingToolType },\n { label: 'Pitchfork', value: 'pitchfork' as DrawingToolType, heading: 'Gann & Pitchforks' },\n { label: 'Schiff Pitchfork', value: 'schiffPitchfork' as DrawingToolType },\n { label: 'Modified Schiff Pitchfork', value: 'modifiedSchiffPitchfork' as DrawingToolType },\n { label: 'Gann Fan', value: 'gannFan' as DrawingToolType },\n { label: 'Gann Box', value: 'gannBox' as DrawingToolType },\n { label: 'Gann Square', value: 'gannSquare' as DrawingToolType },\n { label: 'Pitchfan', value: 'pitchfan' as DrawingToolType },\n { label: 'Cyclic Lines', value: 'cyclicLines' as DrawingToolType, heading: 'Cycles' },\n { label: 'Time Cycles', value: 'timeCycles' as DrawingToolType },\n { label: 'Sine Line', value: 'sineLine' as DrawingToolType },\n ],\n },\n {\n label: 'Patterns',\n section: 'patterns',\n tools: [\n { label: 'XABCD Pattern', value: 'xabcdPattern' as DrawingToolType, heading: 'Patterns' },\n { label: 'ABCD Pattern', value: 'abcdPattern' as DrawingToolType },\n { label: 'Head and Shoulders', value: 'headAndShoulders' as DrawingToolType },\n { label: 'Cypher Pattern', value: 'cypherPattern' as DrawingToolType },\n { label: 'Three Drives Pattern', value: 'threeDrives' as DrawingToolType },\n { label: 'Elliott Wave', value: 'elliottWave' as DrawingToolType, heading: 'Elliott Waves' },\n { label: 'Elliott Impulse Wave', value: 'elliottImpulse' as DrawingToolType },\n { label: 'Elliott Correction Wave', value: 'elliottCorrection' as DrawingToolType },\n { label: 'Elliott Triangle Wave', value: 'elliottTriangle' as DrawingToolType },\n { label: 'Elliott Double Combo Wave', value: 'elliottDoubleCombo' as DrawingToolType },\n { label: 'Elliott Triple Combo Wave', value: 'elliottTripleCombo' as DrawingToolType },\n ],\n },\n {\n label: 'Forecasting',\n section: 'forecasting',\n tools: [\n { label: 'Long/Short Position', value: 'riskReward' as DrawingToolType, heading: 'Forecasting' },\n { label: 'Anchored VWAP', value: 'anchoredVWAP' as DrawingToolType },\n { label: 'Fixed Range Volume Profile', value: 'volumeProfileRange' as DrawingToolType },\n { label: 'Forecast', value: 'forecast' as DrawingToolType },\n { label: 'Projection', value: 'projection' as DrawingToolType },\n { label: 'Bars Pattern', value: 'barsPattern' as DrawingToolType },\n { label: 'Price Range', value: 'priceRange' as DrawingToolType, heading: 'Measure' },\n { label: 'Date Range', value: 'dateRange' as DrawingToolType },\n { label: 'Date and Price Range', value: 'dateAndPriceRange' as DrawingToolType },\n { label: 'Measure', value: 'measure' as DrawingToolType },\n ],\n },\n {\n label: 'Shapes',\n section: 'annotation',\n tools: [\n { label: 'Rectangle', value: 'rectangle' as DrawingToolType, heading: 'Shapes' },\n { label: 'Rotated Rectangle', value: 'rotatedRectangle' as DrawingToolType },\n { label: 'Circle', value: 'circle' as DrawingToolType },\n { label: 'Ellipse', value: 'ellipse' as DrawingToolType },\n { label: 'Triangle', value: 'triangle' as DrawingToolType },\n { label: 'Polyline', value: 'polyline' as DrawingToolType },\n { label: 'Curve', value: 'curve' as DrawingToolType },\n { label: 'Arc', value: 'arc' as DrawingToolType },\n { label: 'Brush', value: 'brush' as DrawingToolType, heading: 'Brushes' },\n { label: 'Highlighter', value: 'highlighter' as DrawingToolType },\n { label: 'Path', value: 'path' as DrawingToolType },\n ],\n },\n {\n label: 'Annotation',\n section: 'annotation',\n tools: [\n { label: 'Text', value: 'text' as DrawingToolType },\n { label: 'Price Label', value: 'priceLabel' as DrawingToolType },\n { label: 'Arrow', value: 'arrow' as DrawingToolType },\n { label: 'Note', value: 'note' as DrawingToolType },\n { label: 'Callout', value: 'callout' as DrawingToolType },\n { label: 'Flag Mark', value: 'flag' as DrawingToolType },\n { label: 'Arrow Mark', value: 'arrowMark' as DrawingToolType },\n { label: 'Icon', value: 'icon' as DrawingToolType },\n { label: 'Signpost', value: 'signpost' as DrawingToolType },\n { label: 'Balloon', value: 'balloon' as DrawingToolType },\n { label: 'Anchored Text', value: 'anchoredText' as DrawingToolType },\n { label: 'Anchored Note', value: 'anchoredNote' as DrawingToolType },\n ],\n },\n];\n\nexport const DEFAULT_SYMBOLS = [\n 'BTCUSDT', 'ETHUSDT', 'SOLUSDT', 'BNBUSDT',\n];\n\nexport const DEFAULT_SETTINGS: ChartSettingsState = {\n gridVisible: true,\n volumeVisible: true,\n volumeProfileVisible: false,\n marketProfileVisible: false,\n marketProfileSplit: false,\n marketProfileLetters: false,\n marketProfileBuckets: 48,\n marketProfileOpacity: 0.32,\n depthHeatmapVisible: false,\n depthHeatmapOpacity: 0.7,\n sessionShadingVisible: false,\n pivotMarkersVisible: false,\n pivotStrength: 5,\n pivotStructureLabels: false,\n periodLevelsVisible: false,\n periodLevelsPeriod: 'day',\n legendVisible: true,\n barCountdown: true,\n indicatorValueLabels: false,\n alignAxisLabels: true,\n logScale: false,\n scaleMode: 'regular',\n autoScale: true,\n invertScale: false,\n leftPriceScale: false,\n crosshairMode: 'magnet',\n crosshairCursor: 'cross',\n numberLocale: 'en-US',\n timezone: 'local',\n highLowLines: false,\n mainSeriesVisible: true,\n extendedHours: true,\n chartTypeOptions: {},\n};\n","import {\n CHART_STYLE_KEYS,\n DEFAULT_SIGNAL_STYLE,\n DEFAULT_TRADE_ZONE_STYLE,\n DEFAULT_TRADING_CONFIG,\n type ChartStyleKey,\n type ChartType,\n} from '@tradecanvas/commons';\nimport type { MessageKey } from './i18n.js';\n\n/** A row of the settings' look: the style keys it sets together (it shows the first) and its name. */\nexport interface LookRow {\n label: MessageKey;\n keys: readonly ChartStyleKey[];\n /**\n * A key the chart leaves to the part itself until set (it reads back null):\n * the row offers Auto, and a colour picker starts from `hint` (the part's\n * colour as the library sets it; a host may have set its own) or from the\n * colour another key reads back (`from`).\n */\n auto?: { hint?: string; from?: ChartStyleKey };\n}\n\nexport interface LookSection {\n title: MessageKey;\n rows: readonly LookRow[];\n /** Shown only on a chart that trades. */\n trading?: boolean;\n}\n\nconst row = (label: MessageKey, ...keys: ChartStyleKey[]): LookRow => ({ label, keys });\nconst autoRow = (label: MessageKey, key: ChartStyleKey, start: { hint?: string; from?: ChartStyleKey } = {}): LookRow =>\n ({ label, keys: [key], auto: start });\nconst hint = (colour: string | undefined) => ({ hint: colour });\n/** The theme's quieter text, which the watermark and the high and low lines take. */\nconst QUIET_TEXT = { from: 'panes.titleColor' } as const;\n\n/** The Symbol tab's sections after the chart type's own: the last price, the volume, the high and low. */\nexport const LAST_PRICE_SECTION: LookSection = {\n title: 'settings.section.lastPrice',\n rows: [\n row('settings.priceLine', 'lastPrice.visible'),\n row('settings.up', 'lastPrice.upColor'),\n row('settings.down', 'lastPrice.downColor'),\n row('drawingSettings.lineStyle', 'lastPrice.style'),\n row('drawingSettings.lineWidth', 'lastPrice.width'),\n ],\n};\nexport const VOLUME_SECTION: LookSection = {\n title: 'settings.volume',\n rows: [row('settings.up', 'volume.upColor'), row('settings.down', 'volume.downColor')],\n};\nexport const HIGH_LOW_SECTION: LookSection = {\n title: 'settings.highLowLines',\n rows: [autoRow('drawingSettings.color', 'highLow.color', QUIET_TEXT)],\n};\n\nexport const SYMBOL_SECTIONS: readonly LookSection[] = [LAST_PRICE_SECTION, VOLUME_SECTION, HIGH_LOW_SECTION];\n\n/** The Status line tab's colours of the legend, offered where the chart has one. */\nexport const LEGEND_ROWS: readonly LookRow[] = [\n row('settings.legendText', 'legend.textColor'),\n row('settings.legendLabels', 'legend.labelColor'),\n];\n/** The Status line tab's colours: the legend's text and the panes' titles, which are drawn without it. */\nexport const STATUS_LINE_ROWS: readonly LookRow[] = [...LEGEND_ROWS, row('settings.paneTitles', 'panes.titleColor')];\n\n/** The Scales tab's colours: the axes' text and lines. */\nexport const SCALE_ROWS: readonly LookRow[] = [\n row('drawingSettings.text', 'axis.price.textColor', 'axis.time.textColor'),\n row('settings.scaleLines', 'axis.price.lineColor', 'axis.time.lineColor'),\n];\n\n/** The Appearance tab: the background, the grid, the crosshair, the session breaks, the drawings' handles. */\nexport const APPEARANCE_SECTIONS: readonly LookSection[] = [\n {\n title: 'settings.section.background',\n rows: [\n row('settings.background', 'background.color'),\n row('settings.paneBackground', 'panes.background'),\n row('settings.paneSeparator', 'panes.separatorColor'),\n autoRow('settings.watermark', 'watermark.color', QUIET_TEXT),\n ],\n },\n {\n title: 'settings.gridLines',\n rows: [\n row('settings.horizontal', 'grid.horizontal.visible'),\n row('settings.vertical', 'grid.vertical.visible'),\n row('drawingSettings.color', 'grid.horizontal.color', 'grid.vertical.color'),\n row('drawingSettings.lineStyle', 'grid.horizontal.style', 'grid.vertical.style'),\n row('drawingSettings.lineWidth', 'grid.horizontal.width', 'grid.vertical.width'),\n ],\n },\n {\n title: 'settings.crosshairMode',\n rows: [\n row('settings.horizontal', 'crosshair.horizontal.visible'),\n row('settings.vertical', 'crosshair.vertical.visible'),\n row('drawingSettings.color', 'crosshair.horizontal.color', 'crosshair.vertical.color'),\n row('drawingSettings.lineStyle', 'crosshair.horizontal.style', 'crosshair.vertical.style'),\n row('drawingSettings.lineWidth', 'crosshair.horizontal.width', 'crosshair.vertical.width'),\n row('settings.labelBackground', 'crosshair.labelBackground'),\n row('settings.labelText', 'crosshair.labelTextColor'),\n ],\n },\n {\n title: 'settings.sessionBreaks',\n rows: [\n autoRow('drawingSettings.color', 'sessionBreaks.color', { from: 'axis.price.lineColor' }),\n autoRow('drawingSettings.lineStyle', 'sessionBreaks.style'),\n autoRow('drawingSettings.lineWidth', 'sessionBreaks.width'),\n ],\n },\n {\n title: 'objects.drawings',\n rows: [autoRow('settings.handles', 'drawings.handleColor', hint('#ffffff'))],\n },\n];\n\n/** The Trading tab: the colours of what the host puts on the chart, its own until set. */\nexport const TRADING_SECTIONS: readonly LookSection[] = [\n {\n title: 'settings.section.orders',\n trading: true,\n rows: [\n autoRow('ticket.buy', 'trading.buyColor', hint(DEFAULT_TRADING_CONFIG.orderColors?.buy)),\n autoRow('ticket.sell', 'trading.sellColor', hint(DEFAULT_TRADING_CONFIG.orderColors?.sell)),\n autoRow('settings.profit', 'trading.profitColor', hint(DEFAULT_TRADING_CONFIG.positionColors?.profit)),\n autoRow('settings.loss', 'trading.lossColor', hint(DEFAULT_TRADING_CONFIG.positionColors?.loss)),\n autoRow('account.entry', 'trading.entryColor', hint(DEFAULT_TRADING_CONFIG.positionColors?.entry)),\n ],\n },\n {\n title: 'settings.section.signals',\n rows: [\n autoRow('account.long', 'markers.longColor', hint(DEFAULT_SIGNAL_STYLE.longColor)),\n autoRow('account.short', 'markers.shortColor', hint(DEFAULT_SIGNAL_STYLE.shortColor)),\n autoRow('markers.neutral', 'markers.neutralColor', hint(DEFAULT_SIGNAL_STYLE.neutralColor)),\n ],\n },\n {\n title: 'settings.section.tradeZones',\n rows: [\n autoRow('settings.profit', 'tradeZones.profitColor', hint(DEFAULT_TRADE_ZONE_STYLE.profitColor)),\n autoRow('settings.loss', 'tradeZones.lossColor', hint(DEFAULT_TRADE_ZONE_STYLE.lossColor)),\n autoRow('settings.openTrade', 'tradeZones.activeColor', hint(DEFAULT_TRADE_ZONE_STYLE.activeColor)),\n ],\n },\n];\n\n/** The name of each of a chart type's keys, by the key's last part. */\nconst SERIES_LABELS: Readonly<Record<string, MessageKey>> = {\n upColor: 'settings.up',\n downColor: 'settings.down',\n wickUpColor: 'settings.upWick',\n wickDownColor: 'settings.downWick',\n color: 'drawingSettings.color',\n lineColor: 'drawingSettings.color',\n lineWidth: 'drawingSettings.lineWidth',\n topColor: 'settings.areaTop',\n bottomColor: 'settings.areaBottom',\n};\n\n/** Types whose up and down are bodies with wicks. */\nconst BODIES: ReadonlySet<ChartType> = new Set<ChartType>(['candlestick', 'heikinAshi', 'volumeCandles', 'equivolume']);\n\n/** The rows of a chart type's own colours and widths, in the key table's order. */\nexport function seriesRows(type: ChartType): LookRow[] {\n const prefix = `series.${type}.`;\n return (Object.keys(CHART_STYLE_KEYS) as ChartStyleKey[])\n .filter((key) => key.startsWith(prefix))\n .map((key) => {\n const prop = key.slice(prefix.length);\n let label = SERIES_LABELS[prop] ?? 'drawingSettings.color';\n if (BODIES.has(type) && prop === 'upColor') label = 'settings.upBody';\n if (BODIES.has(type) && prop === 'downColor') label = 'settings.downBody';\n if (type === 'baseline' && prop === 'upColor') label = 'settings.aboveBase';\n if (type === 'baseline' && prop === 'downColor') label = 'settings.belowBase';\n return row(label, key);\n });\n}\n\n/**\n * Every key the settings set, every chart type's included: what Reset takes\n * away and an undo puts back.\n */\nexport const SETTINGS_LOOK_KEYS: readonly ChartStyleKey[] = [\n ...new Set<ChartStyleKey>([\n ...(Object.keys(CHART_STYLE_KEYS) as ChartStyleKey[]).filter((key) => key.startsWith('series.')),\n ...[...SYMBOL_SECTIONS, ...APPEARANCE_SECTIONS, ...TRADING_SECTIONS].flatMap((section) => section.rows.flatMap((r) => r.keys)),\n ...[...STATUS_LINE_ROWS, ...SCALE_ROWS].flatMap((r) => r.keys),\n ]),\n];\n","import type { DrawingToolGroupDef } from './types.js';\nimport type { MessageKey, Translator } from './i18n.js';\n\n/** Number formats the settings offer, by locale tag. */\nexport const NUMBER_LOCALES: readonly string[] = [\n 'en-US', 'en-GB', 'en-IN', 'de-DE', 'fr-FR', 'es-ES', 'it-IT', 'pt-BR', 'ru-RU', 'tr-TR',\n 'vi-VN', 'id-ID', 'th-TH', 'zh-CN', 'zh-TW', 'ja-JP', 'ko-KR',\n];\n\nconst SAMPLE = 65234;\n\n/** \"de-DE (65.234,00)\": each format with a sample number; the current one stays listed. */\nexport function numberLocaleOptions(current: string): { value: string; label: string }[] {\n const codes = current && !NUMBER_LOCALES.includes(current) ? [current, ...NUMBER_LOCALES] : NUMBER_LOCALES;\n return codes.map((code) => {\n let sample: string;\n try {\n sample = new Intl.NumberFormat(code, { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(SAMPLE);\n } catch {\n sample = '';\n }\n return { value: code, label: sample ? `${code} (${sample})` : code };\n });\n}\n\n/** Message key of each built-in drawing-tool group, by its English name. */\nconst TOOL_GROUP_KEYS: Readonly<Record<string, MessageKey>> = {\n Lines: 'toolGroup.lines',\n 'Horizontal/Vertical': 'toolGroup.horizontalVertical',\n Channels: 'toolGroup.channels',\n Fibonacci: 'toolGroup.fibonacci',\n Shapes: 'toolGroup.shapes',\n 'Gann & Pitchforks': 'toolGroup.gannPitchforks',\n Patterns: 'toolGroup.patterns',\n Measure: 'toolGroup.measure',\n Annotation: 'toolGroup.annotation',\n Forecasting: 'toolGroup.forecasting',\n Brushes: 'toolGroup.brushes',\n Cycles: 'toolGroup.cycles',\n 'Elliott Waves': 'toolGroup.elliott',\n};\n\n/** A chart type's name in the widget's language (an unknown type keeps its own). */\nexport function chartTypeLabel(ct: { value: string; label: string }, t: Translator): string {\n const key = `chartType.${ct.value}` as MessageKey;\n const translated = t(key);\n return translated === key ? ct.label : translated;\n}\n\n/** The drawing-tool groups with names in the widget's language (unknown tools keep theirs). */\nexport function localizeToolGroups(groups: readonly DrawingToolGroupDef[], t: Translator): DrawingToolGroupDef[] {\n return groups.map((group) => ({\n ...group,\n label: TOOL_GROUP_KEYS[group.label] ? t(TOOL_GROUP_KEYS[group.label]) : group.label,\n tools: group.tools.map((tool) => {\n const key = `tool.${tool.value}` as MessageKey;\n const label = t(key);\n // A heading is a former group's name, translated as one.\n const heading = tool.heading !== undefined && TOOL_GROUP_KEYS[tool.heading] ? t(TOOL_GROUP_KEYS[tool.heading]) : tool.heading;\n return { ...tool, label: label === key ? tool.label : label, ...(heading !== undefined ? { heading } : {}) };\n }),\n }));\n}\n"],"mappings":";;AAIA,IAAa,IAA8D;CACzE;EAAE,MAAM;EAAoB,MAAM;EAAY;CAC9C;EAAE,MAAM;EAAuB,MAAM;EAAe;CACpD;EAAE,MAAM;EAAkB,MAAM;EAAU;CAC1C;EAAE,MAAM;EAAmB,MAAM;EAAW;CAC5C;EAAE,MAAM;EAAoB,MAAM;EAAY;CAC9C;EAAE,MAAM;EAAmB,MAAM;EAAW;CAC5C;EAAE,MAAM;EAAqB,MAAM;EAAa;CAChD;EAAE,MAAM;EAAO,MAAM;EAAO;CAC5B;EAAE,MAAM;EAAiB,MAAM;EAAU;CACzC;EAAE,MAAM;EAAiB,MAAM;EAAa;CAC5C;EAAE,MAAM;EAAgB,MAAM;EAAS;CACvC;EAAE,MAAM;EAAiB,MAAM;EAAU;CACzC;EAAE,MAAM;EAAuB,MAAM;EAAgB;CACrD;EAAE,MAAM;EAAmB,MAAM;EAAY;CAC7C;EAAE,MAAM;EAAiB,MAAM;EAAU;CACzC;EAAE,MAAM;EAAc,MAAM;EAAS;CACrC;EAAE,MAAM;EAAgB,MAAM;EAAU;CACxC;EAAE,MAAM;EAAgB,MAAM;EAAW;CACzC;EAAE,MAAM;EAAoB,MAAM;EAAoB;CACtD;EAAE,MAAM;EAAgB,MAAM;EAAW;CACzC;EAAE,MAAM;EAAkB,MAAM;EAAa;CAC7C;EAAE,MAAM;EAAkB,MAAM;EAAa;CAC7C;EAAE,MAAM;EAAiB,MAAM;EAAY;CAC3C;EAAE,MAAM;EAAe,MAAM;EAAU;CACvC;EAAE,MAAM;EAAc,MAAM;EAAS;CACrC;EAAE,MAAM;EAAc,MAAM;EAAS;CACrC;EAAE,MAAM;EAAoB,MAAM;EAAU;CAC5C;EAAE,MAAM;EAAoB,MAAM;EAAY;CAC/C,EAGK,IAAiB,WAMjB,IAAq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wD;CAC5D,OAAO;CACP,uBAAuB;CACvB,UAAU;CACV,WAAW;CACX,QAAQ;CACR,qBAAqB;CACrB,UAAU;CACV,SAAS;CACT,YAAY;CACZ,aAAa;CACb,SAAS;CACT,QAAQ;CACR,iBAAiB;CAClB;AAGD,SAAgB,EAAe,GAAsC,GAAuB;CAC1F,IAAM,IAAM,aAAa,EAAG,SACtB,IAAa,EAAE,EAAI;AACzB,QAAO,MAAe,IAAM,EAAG,QAAQ;;AAIzC,SAAgB,EAAmB,GAAwC,GAAsC;AAC/G,QAAO,EAAO,KAAK,OAAW;EAC5B,GAAG;EACH,OAAO,EAAgB,EAAM,SAAS,EAAE,EAAgB,EAAM,OAAO,GAAG,EAAM;EAC9E,OAAO,EAAM,MAAM,KAAK,MAAS;GAC/B,IAAM,IAAM,QAAQ,EAAK,SACnB,IAAQ,EAAE,EAAI,EAEd,IAAU,EAAK,YAAY,KAAA,KAAa,EAAgB,EAAK,WAAW,EAAE,EAAgB,EAAK,SAAS,GAAG,EAAK;AACtH,UAAO;IAAE,GAAG;IAAM,OAAO,MAAU,IAAM,EAAK,QAAQ;IAAO,GAAI,MAAY,KAAA,IAA0B,EAAE,GAAhB,EAAE,YAAS;IAAQ;IAC5G;EACH,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tradecanvas/chart",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Open-source trading chart library for the web: candlestick to Renko charts, technical indicators, drawing tools, live exchange feeds, orders on the chart, bar replay. Canvas 2D or WebGL, TypeScript, no dependencies.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"README.md"
|
|
74
74
|
],
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@tradecanvas/commons": "2.
|
|
77
|
-
"@tradecanvas/core": "2.
|
|
76
|
+
"@tradecanvas/commons": "2.7.0",
|
|
77
|
+
"@tradecanvas/core": "2.7.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"jsdom": "^25.0.1",
|