@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.
package/dist/internal.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { TextStyle, Application, Container, Graphics, Text, FillGradient, CanvasTextMetrics } from 'pixi.js';
2
2
  import { forwardRef, useRef, useState, useEffect, useImperativeHandle, useCallback, createContext, useMemo, useContext } from 'react';
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
  // ../shared/src/time/timeframeRegistry.ts
7
7
  function isCalendarTimeframe(key) {
@@ -21292,60 +21292,64 @@ function ChartContextMenu({
21292
21292
  onClearIndicators,
21293
21293
  onResetView
21294
21294
  }) {
21295
- return /* @__PURE__ */ jsxs(Fragment, { children: [
21296
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-backdrop", onClick: onClose, onContextMenu: (e) => {
21297
- e.preventDefault();
21298
- onClose();
21299
- } }),
21300
- /* @__PURE__ */ jsxs("div", { className: "chart-ctx-menu", style: { left: x, top: y }, children: [
21301
- /* @__PURE__ */ jsx(
21302
- "button",
21303
- {
21304
- className: "chart-ctx-item",
21305
- onClick: () => {
21306
- onSettings();
21307
- onClose();
21308
- },
21309
- children: "Settings\u2026"
21310
- }
21311
- ),
21312
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21313
- /* @__PURE__ */ jsx(
21314
- "button",
21315
- {
21316
- className: "chart-ctx-item",
21317
- onClick: () => {
21318
- onResetView();
21319
- onClose();
21320
- },
21321
- children: "Reset Chart View"
21322
- }
21323
- ),
21324
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21325
- /* @__PURE__ */ jsx(
21326
- "button",
21327
- {
21328
- className: "chart-ctx-item chart-ctx-item--danger",
21329
- onClick: () => {
21330
- onClearIndicators();
21331
- onClose();
21332
- },
21333
- children: "Clear Indicators"
21334
- }
21335
- ),
21336
- /* @__PURE__ */ jsx(
21337
- "button",
21338
- {
21339
- className: "chart-ctx-item chart-ctx-item--danger",
21340
- onClick: () => {
21341
- onClearDrawings();
21342
- onClose();
21343
- },
21344
- children: "Clear Drawings"
21345
- }
21346
- )
21347
- ] })
21348
- ] });
21295
+ if (typeof document === "undefined") return null;
21296
+ return createPortal(
21297
+ /* @__PURE__ */ jsxs(Fragment, { children: [
21298
+ /* @__PURE__ */ jsx("div", { className: "chart-ctx-backdrop", onClick: onClose, onContextMenu: (e) => {
21299
+ e.preventDefault();
21300
+ onClose();
21301
+ } }),
21302
+ /* @__PURE__ */ jsxs("div", { className: "chart-ctx-menu", style: { left: x, top: y }, children: [
21303
+ /* @__PURE__ */ jsx(
21304
+ "button",
21305
+ {
21306
+ className: "chart-ctx-item",
21307
+ onClick: () => {
21308
+ onSettings();
21309
+ onClose();
21310
+ },
21311
+ children: "Settings\u2026"
21312
+ }
21313
+ ),
21314
+ /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21315
+ /* @__PURE__ */ jsx(
21316
+ "button",
21317
+ {
21318
+ className: "chart-ctx-item",
21319
+ onClick: () => {
21320
+ onResetView();
21321
+ onClose();
21322
+ },
21323
+ children: "Reset Chart View"
21324
+ }
21325
+ ),
21326
+ /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21327
+ /* @__PURE__ */ jsx(
21328
+ "button",
21329
+ {
21330
+ className: "chart-ctx-item chart-ctx-item--danger",
21331
+ onClick: () => {
21332
+ onClearIndicators();
21333
+ onClose();
21334
+ },
21335
+ children: "Clear Indicators"
21336
+ }
21337
+ ),
21338
+ /* @__PURE__ */ jsx(
21339
+ "button",
21340
+ {
21341
+ className: "chart-ctx-item chart-ctx-item--danger",
21342
+ onClick: () => {
21343
+ onClearDrawings();
21344
+ onClose();
21345
+ },
21346
+ children: "Clear Drawings"
21347
+ }
21348
+ )
21349
+ ] })
21350
+ ] }),
21351
+ document.body
21352
+ );
21349
21353
  }
21350
21354
  var SECTIONS = [
21351
21355
  { id: "symbol", label: "Symbol", icon: "\u{1D446}" },
@@ -25523,7 +25527,7 @@ var demonstrationTool = {
25523
25527
  };
25524
25528
 
25525
25529
  // src/version.ts
25526
- var FORGECHARTS_VERSION = "1.5.47" ;
25530
+ var FORGECHARTS_VERSION = "1.5.48" ;
25527
25531
 
25528
25532
  // src/compatibility.ts
25529
25533
  var MIN_KIT_API = 1;