@forgecharts/sdk 1.5.46 → 1.5.48

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.
@@ -1,7 +1,7 @@
1
1
  import React11, { createContext, forwardRef, useRef, useState, useEffect, useImperativeHandle, useCallback, useMemo, useContext, useReducer } from 'react';
2
2
  import { TextStyle, Application, Container, Graphics, Text, FillGradient, CanvasTextMetrics } from 'pixi.js';
3
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
- import ReactDOM from 'react-dom';
4
+ import ReactDOM, { createPortal } from 'react-dom';
5
5
 
6
6
  // src/react/canvas/ChartCanvas.tsx
7
7
 
@@ -18252,6 +18252,9 @@ var DEMONSTRATION_RADIUS = 44;
18252
18252
  var DEMONSTRATION_FILL = "rgba(255, 200, 50, 0.18)";
18253
18253
  var DEMONSTRATION_STROKE = "rgba(255, 200, 50, 0.7)";
18254
18254
  var DEMONSTRATION_COLOR = "var(--crosshair-overlay, rgba(255,255,255,0.75))";
18255
+
18256
+ // src/version.ts
18257
+ var FORGECHARTS_VERSION = "1.5.48" ;
18255
18258
  function applyRuntimeConfig(caps, config) {
18256
18259
  if (!config) return caps;
18257
18260
  const orderEntry = config.enableOrderEntry === false ? false : caps.orderEntry;
@@ -21225,60 +21228,64 @@ function ChartContextMenu({
21225
21228
  onClearIndicators,
21226
21229
  onResetView
21227
21230
  }) {
21228
- return /* @__PURE__ */ jsxs(Fragment, { children: [
21229
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-backdrop", onClick: onClose, onContextMenu: (e) => {
21230
- e.preventDefault();
21231
- onClose();
21232
- } }),
21233
- /* @__PURE__ */ jsxs("div", { className: "chart-ctx-menu", style: { left: x, top: y }, children: [
21234
- /* @__PURE__ */ jsx(
21235
- "button",
21236
- {
21237
- className: "chart-ctx-item",
21238
- onClick: () => {
21239
- onSettings();
21240
- onClose();
21241
- },
21242
- children: "Settings\u2026"
21243
- }
21244
- ),
21245
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21246
- /* @__PURE__ */ jsx(
21247
- "button",
21248
- {
21249
- className: "chart-ctx-item",
21250
- onClick: () => {
21251
- onResetView();
21252
- onClose();
21253
- },
21254
- children: "Reset Chart View"
21255
- }
21256
- ),
21257
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21258
- /* @__PURE__ */ jsx(
21259
- "button",
21260
- {
21261
- className: "chart-ctx-item chart-ctx-item--danger",
21262
- onClick: () => {
21263
- onClearIndicators();
21264
- onClose();
21265
- },
21266
- children: "Clear Indicators"
21267
- }
21268
- ),
21269
- /* @__PURE__ */ jsx(
21270
- "button",
21271
- {
21272
- className: "chart-ctx-item chart-ctx-item--danger",
21273
- onClick: () => {
21274
- onClearDrawings();
21275
- onClose();
21276
- },
21277
- children: "Clear Drawings"
21278
- }
21279
- )
21280
- ] })
21281
- ] });
21231
+ if (typeof document === "undefined") return null;
21232
+ return createPortal(
21233
+ /* @__PURE__ */ jsxs(Fragment, { children: [
21234
+ /* @__PURE__ */ jsx("div", { className: "chart-ctx-backdrop", onClick: onClose, onContextMenu: (e) => {
21235
+ e.preventDefault();
21236
+ onClose();
21237
+ } }),
21238
+ /* @__PURE__ */ jsxs("div", { className: "chart-ctx-menu", style: { left: x, top: y }, children: [
21239
+ /* @__PURE__ */ jsx(
21240
+ "button",
21241
+ {
21242
+ className: "chart-ctx-item",
21243
+ onClick: () => {
21244
+ onSettings();
21245
+ onClose();
21246
+ },
21247
+ children: "Settings\u2026"
21248
+ }
21249
+ ),
21250
+ /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21251
+ /* @__PURE__ */ jsx(
21252
+ "button",
21253
+ {
21254
+ className: "chart-ctx-item",
21255
+ onClick: () => {
21256
+ onResetView();
21257
+ onClose();
21258
+ },
21259
+ children: "Reset Chart View"
21260
+ }
21261
+ ),
21262
+ /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21263
+ /* @__PURE__ */ jsx(
21264
+ "button",
21265
+ {
21266
+ className: "chart-ctx-item chart-ctx-item--danger",
21267
+ onClick: () => {
21268
+ onClearIndicators();
21269
+ onClose();
21270
+ },
21271
+ children: "Clear Indicators"
21272
+ }
21273
+ ),
21274
+ /* @__PURE__ */ jsx(
21275
+ "button",
21276
+ {
21277
+ className: "chart-ctx-item chart-ctx-item--danger",
21278
+ onClick: () => {
21279
+ onClearDrawings();
21280
+ onClose();
21281
+ },
21282
+ children: "Clear Drawings"
21283
+ }
21284
+ )
21285
+ ] })
21286
+ ] }),
21287
+ document.body
21288
+ );
21282
21289
  }
21283
21290
  var SECTIONS = [
21284
21291
  { id: "symbol", label: "Symbol", icon: "\u{1D446}" },
@@ -26939,9 +26946,6 @@ function _guessFrontMonth(product, months) {
26939
26946
  }
26940
26947
  return `${product}${months[0]}${currentYear + 1}`;
26941
26948
  }
26942
-
26943
- // src/version.ts
26944
- var FORGECHARTS_VERSION = "1.5.46" ;
26945
26949
  var TIMEZONE_OPTIONS = [
26946
26950
  { label: "UTC", value: "UTC" },
26947
26951
  { label: "Exchange", value: "exchange" },