@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/index.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) {
@@ -21282,60 +21282,64 @@ function ChartContextMenu({
21282
21282
  onClearIndicators,
21283
21283
  onResetView
21284
21284
  }) {
21285
- return /* @__PURE__ */ jsxs(Fragment, { children: [
21286
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-backdrop", onClick: onClose, onContextMenu: (e) => {
21287
- e.preventDefault();
21288
- onClose();
21289
- } }),
21290
- /* @__PURE__ */ jsxs("div", { className: "chart-ctx-menu", style: { left: x, top: y }, children: [
21291
- /* @__PURE__ */ jsx(
21292
- "button",
21293
- {
21294
- className: "chart-ctx-item",
21295
- onClick: () => {
21296
- onSettings();
21297
- onClose();
21298
- },
21299
- children: "Settings\u2026"
21300
- }
21301
- ),
21302
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21303
- /* @__PURE__ */ jsx(
21304
- "button",
21305
- {
21306
- className: "chart-ctx-item",
21307
- onClick: () => {
21308
- onResetView();
21309
- onClose();
21310
- },
21311
- children: "Reset Chart View"
21312
- }
21313
- ),
21314
- /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21315
- /* @__PURE__ */ jsx(
21316
- "button",
21317
- {
21318
- className: "chart-ctx-item chart-ctx-item--danger",
21319
- onClick: () => {
21320
- onClearIndicators();
21321
- onClose();
21322
- },
21323
- children: "Clear Indicators"
21324
- }
21325
- ),
21326
- /* @__PURE__ */ jsx(
21327
- "button",
21328
- {
21329
- className: "chart-ctx-item chart-ctx-item--danger",
21330
- onClick: () => {
21331
- onClearDrawings();
21332
- onClose();
21333
- },
21334
- children: "Clear Drawings"
21335
- }
21336
- )
21337
- ] })
21338
- ] });
21285
+ if (typeof document === "undefined") return null;
21286
+ return createPortal(
21287
+ /* @__PURE__ */ jsxs(Fragment, { children: [
21288
+ /* @__PURE__ */ jsx("div", { className: "chart-ctx-backdrop", onClick: onClose, onContextMenu: (e) => {
21289
+ e.preventDefault();
21290
+ onClose();
21291
+ } }),
21292
+ /* @__PURE__ */ jsxs("div", { className: "chart-ctx-menu", style: { left: x, top: y }, children: [
21293
+ /* @__PURE__ */ jsx(
21294
+ "button",
21295
+ {
21296
+ className: "chart-ctx-item",
21297
+ onClick: () => {
21298
+ onSettings();
21299
+ onClose();
21300
+ },
21301
+ children: "Settings\u2026"
21302
+ }
21303
+ ),
21304
+ /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21305
+ /* @__PURE__ */ jsx(
21306
+ "button",
21307
+ {
21308
+ className: "chart-ctx-item",
21309
+ onClick: () => {
21310
+ onResetView();
21311
+ onClose();
21312
+ },
21313
+ children: "Reset Chart View"
21314
+ }
21315
+ ),
21316
+ /* @__PURE__ */ jsx("div", { className: "chart-ctx-divider" }),
21317
+ /* @__PURE__ */ jsx(
21318
+ "button",
21319
+ {
21320
+ className: "chart-ctx-item chart-ctx-item--danger",
21321
+ onClick: () => {
21322
+ onClearIndicators();
21323
+ onClose();
21324
+ },
21325
+ children: "Clear Indicators"
21326
+ }
21327
+ ),
21328
+ /* @__PURE__ */ jsx(
21329
+ "button",
21330
+ {
21331
+ className: "chart-ctx-item chart-ctx-item--danger",
21332
+ onClick: () => {
21333
+ onClearDrawings();
21334
+ onClose();
21335
+ },
21336
+ children: "Clear Drawings"
21337
+ }
21338
+ )
21339
+ ] })
21340
+ ] }),
21341
+ document.body
21342
+ );
21339
21343
  }
21340
21344
  var SECTIONS = [
21341
21345
  { id: "symbol", label: "Symbol", icon: "\u{1D446}" },
@@ -25513,7 +25517,7 @@ var demonstrationTool = {
25513
25517
  };
25514
25518
 
25515
25519
  // src/version.ts
25516
- var FORGECHARTS_VERSION = "1.5.47" ;
25520
+ var FORGECHARTS_VERSION = "1.5.48" ;
25517
25521
 
25518
25522
  // src/compatibility.ts
25519
25523
  var MIN_KIT_API = 1;