@fileverse-dev/dsheet 2.1.2-dropIn-1 → 2.1.2-dropIn-3

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.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as s, a as t, b as o, S as r, d as l, i as n, T as S, e as d, f as i, g as c, h, j as m, k as C, l as u, n as p, o as E, p as F, q as g, r as x, s as R, t as f, u as A, v as I, w as L, x as w, z as T, A as b, B as v, D, E as M, F as k, G as V, H as z, I as P, J as U, K as X } from "./index-5D_WjAlq.js";
1
+ import { C as s, a as t, b as o, S as r, d as l, i as n, T as S, e as d, f as i, g as c, h, j as m, k as C, l as u, n as p, o as E, p as F, q as g, r as x, s as R, t as f, u as A, v as I, w as L, x as w, z as T, A as b, B as v, D, E as M, F as k, G as V, H as z, I as P, J as U, K as X } from "./index-kyh4PUpv.js";
2
2
  import { bQ as y, bR as B, bS as G, ar as H, bh as O, e as j, f as q, h as J, a as K, cf as N, aq as Q, cm as Y } from "./executeStringFunction-CGbxAbbw.js";
3
3
  import { FLVURL as W } from "@fileverse-dev/formulajs";
4
4
  import { E as ee, S as ae } from "./constants-yStXQJiK.js";
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { Context } from '../../../core';
3
+ import { default as WorkbookContext } from '../../context';
4
+
5
+ export type SidebarPortalTargets = Record<string, HTMLElement | undefined>;
6
+ export type SidebarPortalRegistryHandle = {
7
+ getTargets: () => SidebarPortalTargets;
8
+ subscribe: (onStoreChange: () => void) => () => void;
9
+ };
10
+ export type SidebarPortalRenderer = (workbook: React.ContextType<typeof WorkbookContext>) => React.ReactNode;
11
+ interface SidebarPanelPortalsProps {
12
+ activePanel: string | null;
13
+ portalRegistry?: SidebarPortalRegistryHandle | null;
14
+ extraPortals?: Record<string, SidebarPortalRenderer>;
15
+ }
16
+ export declare function SidebarPanelPortals({ activePanel, portalRegistry, extraPortals, }: Readonly<SidebarPanelPortalsProps>): React.ReactPortal | null;
17
+ export type { Context };
@@ -3,10 +3,14 @@ import { default as React } from 'react';
3
3
  import { getCryptoPrice } from '../../utils/cryptoApi';
4
4
  import { SetContextOptions } from '../../context';
5
5
  import { generateAPIs } from './api';
6
+ import { SidebarPortalRegistryHandle, SidebarPortalRenderer } from '../SidebarPanelPortals';
6
7
 
7
8
  export type WorkbookInstance = ReturnType<typeof generateAPIs>;
8
9
  type AdditionalProps = {
9
10
  onOp?: (op: Op[]) => void;
11
+ sidebarActivePanel?: string | null;
12
+ sidebarPortalRegistry?: SidebarPortalRegistryHandle | null;
13
+ sidebarPortalRenderers?: Record<string, SidebarPortalRenderer>;
10
14
  };
11
15
  declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalProps & React.RefAttributes<{
12
16
  applyOp: (ops: Op[]) => void;
@@ -3,5 +3,6 @@ import { default as Workbook } from './Workbook';
3
3
  export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, } from '@fileverse-dev/formulajs/crypto-constants';
4
4
  export { Workbook };
5
5
  export type { WorkbookInstance } from './Workbook';
6
+ export type { SidebarPortalRenderer, SidebarPortalRegistryHandle, SidebarPortalTargets, } from './SidebarPanelPortals';
6
7
  export type { Cell, Sheet, LiveQueryData } from '../../core';
7
8
  export { markCellChanged as animateChangedCell } from '../../core';