@forgecharts/sdk 1.5.47 → 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
 
@@ -18254,7 +18254,7 @@ var DEMONSTRATION_STROKE = "rgba(255, 200, 50, 0.7)";
18254
18254
  var DEMONSTRATION_COLOR = "var(--crosshair-overlay, rgba(255,255,255,0.75))";
18255
18255
 
18256
18256
  // src/version.ts
18257
- var FORGECHARTS_VERSION = "1.5.47" ;
18257
+ var FORGECHARTS_VERSION = "1.5.48" ;
18258
18258
  function applyRuntimeConfig(caps, config) {
18259
18259
  if (!config) return caps;
18260
18260
  const orderEntry = config.enableOrderEntry === false ? false : caps.orderEntry;
@@ -21228,60 +21228,64 @@ function ChartContextMenu({
21228
21228
  onClearIndicators,
21229
21229
  onResetView
21230
21230
  }) {
21231
- return /* @__PURE__ */ jsxs(Fragment, { children: [
21232
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-backdrop", onClick: onClose, onContextMenu: (e) => {
21233
- e.preventDefault();
21234
- onClose();
21235
- } }),
21236
- /* @__PURE__ */ jsxs("div", { className: "chart-ctx-menu", style: { left: x, top: y }, children: [
21237
- /* @__PURE__ */ jsx(
21238
- "button",
21239
- {
21240
- className: "chart-ctx-item",
21241
- onClick: () => {
21242
- onSettings();
21243
- onClose();
21244
- },
21245
- children: "Settings\u2026"
21246
- }
21247
- ),
21248
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21249
- /* @__PURE__ */ jsx(
21250
- "button",
21251
- {
21252
- className: "chart-ctx-item",
21253
- onClick: () => {
21254
- onResetView();
21255
- onClose();
21256
- },
21257
- children: "Reset Chart View"
21258
- }
21259
- ),
21260
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21261
- /* @__PURE__ */ jsx(
21262
- "button",
21263
- {
21264
- className: "chart-ctx-item chart-ctx-item--danger",
21265
- onClick: () => {
21266
- onClearIndicators();
21267
- onClose();
21268
- },
21269
- children: "Clear Indicators"
21270
- }
21271
- ),
21272
- /* @__PURE__ */ jsx(
21273
- "button",
21274
- {
21275
- className: "chart-ctx-item chart-ctx-item--danger",
21276
- onClick: () => {
21277
- onClearDrawings();
21278
- onClose();
21279
- },
21280
- children: "Clear Drawings"
21281
- }
21282
- )
21283
- ] })
21284
- ] });
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
+ );
21285
21289
  }
21286
21290
  var SECTIONS = [
21287
21291
  { id: "symbol", label: "Symbol", icon: "\u{1D446}" },