@factorialco/f0-react 1.275.0 → 1.276.1

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.
@@ -5770,8 +5770,8 @@ declare module "@tiptap/core" {
5770
5770
 
5771
5771
  declare module "@tiptap/core" {
5772
5772
  interface Commands<ReturnType> {
5773
- liveCompanion: {
5774
- insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
5773
+ transcript: {
5774
+ insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
5775
5775
  };
5776
5776
  }
5777
5777
  }
@@ -5779,18 +5779,34 @@ declare module "@tiptap/core" {
5779
5779
 
5780
5780
  declare module "@tiptap/core" {
5781
5781
  interface Commands<ReturnType> {
5782
- transcript: {
5783
- insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
5782
+ liveCompanion: {
5783
+ insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
5784
5784
  };
5785
5785
  }
5786
5786
  }
5787
5787
 
5788
5788
 
5789
- declare module "@tiptap/core" {
5790
- interface Commands<ReturnType> {
5791
- moodTracker: {
5792
- insertMoodTracker: (data: MoodTrackerData, config?: MoodTrackerConfig) => ReturnType;
5793
- };
5789
+ declare module "gridstack" {
5790
+ interface GridStackWidget {
5791
+ id?: string;
5792
+ allowedSizes?: Array<{
5793
+ w: number;
5794
+ h: number;
5795
+ }>;
5796
+ renderFn?: () => React.ReactElement | null;
5797
+ meta?: Record<string, unknown>;
5798
+ }
5799
+ interface GridStackNode {
5800
+ id?: string;
5801
+ w?: number;
5802
+ h?: number;
5803
+ x?: number;
5804
+ y?: number;
5805
+ allowedSizes?: Array<{
5806
+ w: number;
5807
+ h: number;
5808
+ }>;
5809
+ renderFn?: () => React.ReactElement | null;
5794
5810
  }
5795
5811
  }
5796
5812
 
@@ -5798,3 +5814,12 @@ declare module "@tiptap/core" {
5798
5814
  declare namespace Calendar {
5799
5815
  var displayName: string;
5800
5816
  }
5817
+
5818
+
5819
+ declare module "@tiptap/core" {
5820
+ interface Commands<ReturnType> {
5821
+ moodTracker: {
5822
+ insertMoodTracker: (data: MoodTrackerData, config?: MoodTrackerConfig) => ReturnType;
5823
+ };
5824
+ }
5825
+ }
@@ -1,5 +1,5 @@
1
- import { bD as _p, bE as td, bF as U_, bG as G_, bH as Sp, ad as p8, bI as zo, aq as Df, bJ as Vi, bK as Rf, bL as hr, bM as wl, av as On, bN as ks, bO as Lp, bP as K_, bQ as Vs, bR as Va, bS as Ep, bT as Z_, bU as J_, bV as Mp, bW as xl, bX as Np, bY as Ap, bZ as Y_, b_ as Ff, aE as m8, b$ as Tp, c0 as X_, c1 as g8, c2 as y8, c3 as V3, c4 as Cl, c5 as Q_, c6 as eS, c7 as tS, c8 as Y1, c9 as nS, ca as iS, cb as rS, cc as te, cd as v8, ce as oS, f as ls, cf as ja, j as nd, cg as k8, h as Jl, ch as sS, L as X1, ci as aS, A as lS, i as Yl, c as cS, l as dS, G as fS, g as j3, cj as uS, k as W3, o as hS, ck as b8, cl as w8, cm as pS, cn as js, ai as mS, aw as he, ap as Ce, Q as T, co as _l, O as Op, cp as Ip, P as sn, cq as Sl, cr as Ws, cs as id, ct as en, bz as qs, cu as _h, ab as Be, cv as $o, cw as Je, cx as gS, b3 as ir, au as ct, a$ as Pf, ac as x8, cy as Dp, cz as yS, cA as vS, cB as kS, ar as C8, as as _8, cC as S8, cD as L8, cE as ro, cF as bS, cG as q3, cH as wS, cI as xS, cJ as CS, cK as xt, al as bn, cL as X, cM as Bf, cN as Rn, a7 as Wn, a8 as _S, cO as E8, cP as Rp, cQ as bs, cR as Sh, cS as M8, cT as N8, cU as A8, cV as T8, cW as O8, a5 as vt, cX as I8, cY as SS, cZ as LS, c_ as ES, c$ as MS, d0 as NS, d1 as AS, d2 as TS, d3 as OS, ak as IS, be as DS, d4 as qn, ao as So, d5 as mn, am as Fp, at as Lh, d6 as U3, d7 as rd, d8 as RS, a9 as Us, d9 as Lo, da as D8, db as gn, s as FS, w as PS, x as BS, z as zS, J as G3, K as K3, M as $S, N as HS, dc as VS, dd as jS, de as R8, aY as wi, df as WS, dg as qS, dh as Gs, di as Pp, a_ as Eo, dj as US, dk as F8, dl as P8, dm as GS, dn as KS, a3 as Bp, a4 as zp, a6 as $p, R as Gn, dp as B8, dq as ZS, dr as JS, ds as YS, dt as z8, aA as XS, du as Eh, dv as $8, aV as od, dw as QS, dx as eL, dy as tL, dz as nL, dA as iL, bA as zf, aS as Mh, bC as rL, bB as oL, dB as H8, an as $r, dC as sL, dD as aL, b8 as $f, aW as Hp, aP as Ll, dE as Vp, dF as V8, aZ as lL, aR as j8, aN as W8, dG as cL, dH as q8, dI as dL, aQ as Ks, aT as U8, aC as fL, dJ as uL, bg as hL, bh as pL, bo as Hf, bm as jp, ay as Vf, dK as jf, dL as Wf, az as qf, dM as Wp, bn as G8, b0 as qp, dN as mL, bt as gL, dO as Nh, dP as yL, dQ as sd, dR as vL, bi as ad, bu as kL, dS as bL, bs as K8, dT as wL, br as xL, bq as CL, dU as _L, b1 as Ah, dV as Z8, dW as SL, af as Up, dX as LL, dY as EL, ag as ML, ah as NL, dZ as AL, d_ as TL, d$ as OL, e0 as IL, e1 as J8, b4 as DL, bl as RL, e2 as FL, e3 as PL, e4 as BL, aU as zL, e5 as El, e6 as Gp, e7 as Kp, e8 as Ml, e9 as $L, ea as Y8, eb as Z3, ec as HL, bv as X8, ed as Q8, b5 as ey, ee as VL, ef as jL, eg as WL, aB as qL, _ as UL, T as GL, V as KL, W as ZL, Z as JL, U as YL, eh as J3, ei as XL, ej as QL, m as eE, ek as ty, el as tE } from "./hooks-BaU58qvY.js";
2
- import { aD as zfe, em as $fe, ep as Hfe, eq as Vfe, eo as jfe, aX as Wfe, b2 as qfe, en as Ufe } from "./hooks-BaU58qvY.js";
1
+ import { bD as _p, bE as td, bF as U_, bG as G_, bH as Sp, ad as p8, bI as zo, aq as Df, bJ as Vi, bK as Rf, bL as hr, bM as wl, av as On, bN as ks, bO as Lp, bP as K_, bQ as Vs, bR as Va, bS as Ep, bT as Z_, bU as J_, bV as Mp, bW as xl, bX as Np, bY as Ap, bZ as Y_, b_ as Ff, aE as m8, b$ as Tp, c0 as X_, c1 as g8, c2 as y8, c3 as V3, c4 as Cl, c5 as Q_, c6 as eS, c7 as tS, c8 as Y1, c9 as nS, ca as iS, cb as rS, cc as te, cd as v8, ce as oS, f as ls, cf as ja, j as nd, cg as k8, h as Jl, ch as sS, L as X1, ci as aS, A as lS, i as Yl, c as cS, l as dS, G as fS, g as j3, cj as uS, k as W3, o as hS, ck as b8, cl as w8, cm as pS, cn as js, ai as mS, aw as he, ap as Ce, Q as T, co as _l, O as Op, cp as Ip, P as sn, cq as Sl, cr as Ws, cs as id, ct as en, bz as qs, cu as _h, ab as Be, cv as $o, cw as Je, cx as gS, b3 as ir, au as ct, a$ as Pf, ac as x8, cy as Dp, cz as yS, cA as vS, cB as kS, ar as C8, as as _8, cC as S8, cD as L8, cE as ro, cF as bS, cG as q3, cH as wS, cI as xS, cJ as CS, cK as xt, al as bn, cL as X, cM as Bf, cN as Rn, a7 as Wn, a8 as _S, cO as E8, cP as Rp, cQ as bs, cR as Sh, cS as M8, cT as N8, cU as A8, cV as T8, cW as O8, a5 as vt, cX as I8, cY as SS, cZ as LS, c_ as ES, c$ as MS, d0 as NS, d1 as AS, d2 as TS, d3 as OS, ak as IS, bf as DS, d4 as qn, ao as So, d5 as mn, am as Fp, at as Lh, d6 as U3, d7 as rd, d8 as RS, a9 as Us, d9 as Lo, da as D8, db as gn, s as FS, w as PS, x as BS, z as zS, J as G3, K as K3, M as $S, N as HS, dc as VS, dd as jS, de as R8, aY as wi, df as WS, dg as qS, dh as Gs, di as Pp, a_ as Eo, dj as US, dk as F8, dl as P8, dm as GS, dn as KS, a3 as Bp, a4 as zp, a6 as $p, R as Gn, dp as B8, dq as ZS, dr as JS, ds as YS, dt as z8, aA as XS, du as Eh, dv as $8, aV as od, dw as QS, dx as eL, dy as tL, dz as nL, dA as iL, bA as zf, aS as Mh, bC as rL, bB as oL, dB as H8, an as $r, dC as sL, dD as aL, b8 as $f, aW as Hp, aP as Ll, dE as Vp, dF as V8, aZ as lL, aR as j8, aN as W8, dG as cL, dH as q8, dI as dL, aQ as Ks, aT as U8, aC as fL, dJ as uL, bh as hL, bi as pL, bp as Hf, bn as jp, ay as Vf, dK as jf, dL as Wf, az as qf, dM as Wp, bo as G8, b0 as qp, dN as mL, bt as gL, dO as Nh, dP as yL, dQ as sd, dR as vL, bj as ad, bu as kL, dS as bL, bs as K8, dT as wL, br as xL, bq as CL, dU as _L, b1 as Ah, dV as Z8, dW as SL, af as Up, dX as LL, dY as EL, ag as ML, ah as NL, dZ as AL, d_ as TL, d$ as OL, e0 as IL, e1 as J8, b4 as DL, bm as RL, e2 as FL, e3 as PL, e4 as BL, aU as zL, e5 as El, e6 as Gp, e7 as Kp, e8 as Ml, e9 as $L, ea as Y8, eb as Z3, ec as HL, bv as X8, ed as Q8, b5 as ey, ee as VL, ef as jL, eg as WL, aB as qL, _ as UL, T as GL, V as KL, W as ZL, Z as JL, U as YL, eh as J3, ei as XL, ej as QL, m as eE, ek as ty, el as tE } from "./hooks-F3Tg9iwj.js";
2
+ import { aD as zfe, em as $fe, ep as Hfe, eq as Vfe, eo as jfe, aX as Wfe, b2 as qfe, en as Ufe } from "./hooks-F3Tg9iwj.js";
3
3
  import { jsxs as k, jsx as d, Fragment as De } from "react/jsx-runtime";
4
4
  import { useCopilotChatInternal as Uf, useCopilotContext as nE, useCopilotAction as Y3, CopilotKit as iE } from "@copilotkit/react-core";
5
5
  import { Markdown as rE, useChatContext as oE, CopilotSidebar as sE } from "@copilotkit/react-ui";
package/dist/f0.css ADDED
@@ -0,0 +1 @@
1
+ .grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;left:0;width:var(--gs-column-width);height:var(--gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--gs-item-margin-top);right:var(--gs-item-margin-right);bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;touch-action:none}.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle,.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--gs-item-margin-top);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--gs-item-margin-top);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing,.grid-stack-animate .grid-stack-item.grid-stack-placeholder{transition:left 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack>.grid-stack-item[gs-x="0"]{left:0%}
package/dist/f0.d.ts CHANGED
@@ -24,6 +24,8 @@ import { DateFilterOptions } from './DateFilter/DateFilter';
24
24
  import { default as default_2 } from 'react';
25
25
  import { DotTagCellValue } from '../../value-display/types/dotTag';
26
26
  import { DotTagCellValue as DotTagCellValue_2 } from './types/dotTag.tsx';
27
+ import { F0GridStackProps as F0GridStackProps_2 } from './F0GridStack';
28
+ import { F0GridStackRef as F0GridStackRef_2 } from './F0GridStack';
27
29
  import { F0IconProps as F0IconProps_2 } from './F0Icon';
28
30
  import { f1Colors } from '@factorialco/f0-core';
29
31
  import { FileCellValue } from '../../value-display/types/file';
@@ -32,6 +34,8 @@ import { FolderCellValue } from '../../value-display/types/folder';
32
34
  import { FolderCellValue as FolderCellValue_2 } from './types/folder.tsx';
33
35
  import { ForwardedRef } from 'react';
34
36
  import { ForwardRefExoticComponent } from 'react';
37
+ import { GridStackOptions } from 'gridstack';
38
+ import { GridStackWidget } from 'gridstack';
35
39
  import { HTMLAttributeAnchorTarget } from 'react';
36
40
  import { HTMLAttributes } from 'react';
37
41
  import { IconCellValue } from './types/icon.tsx';
@@ -2055,6 +2059,55 @@ export declare type F0DropdownButtonProps<T = string> = {
2055
2059
 
2056
2060
  export declare function F0EventCatcherProvider({ children, onEvent, enabled, catchEvents, }: EventCatcherProviderProps): JSX.Element;
2057
2061
 
2062
+ export declare const F0GridStack: ForwardRefExoticComponent<F0GridStackProps_2 & RefAttributes<F0GridStackRef_2>>;
2063
+
2064
+ export declare interface F0GridStackProps {
2065
+ options: GridStackReactOptions;
2066
+ widgets: GridStackReactWidget[];
2067
+ onChange?: (layout: GridStackWidgetPosition[]) => void;
2068
+ }
2069
+
2070
+ /**
2071
+ * Methods exposed via ref to control the grid programmatically.
2072
+ * @example
2073
+ * ```tsx
2074
+ * const gridRef = useRef<F0GridStackRef>(null)
2075
+ *
2076
+ * // Add a widget
2077
+ * gridRef.current?.addWidget({
2078
+ * id: 'new-widget',
2079
+ * w: 2,
2080
+ * h: 2,
2081
+ * renderFn: () => <div>Content</div>
2082
+ * meta: {
2083
+ * // Your metadata associated with the widget
2084
+ * }
2085
+ * })
2086
+ *
2087
+ * // Remove a widget
2088
+ * gridRef.current?.removeWidget('widget-id')
2089
+ *
2090
+ * // Remove all widgets
2091
+ * gridRef.current?.removeAll()
2092
+ *
2093
+ * // Save current layout
2094
+ * const layout = gridRef.current?.saveOptions()
2095
+ * ```
2096
+ */
2097
+ export declare interface F0GridStackRef {
2098
+ addWidget: (widget: GridStackReactWidget) => void;
2099
+ removeWidget: (id: string) => void;
2100
+ addSubGrid: (subGrid: GridStackReactWidget & {
2101
+ id: Required<GridStackWidget>["id"];
2102
+ subGridOpts: Required<GridStackWidget>["subGridOpts"] & {
2103
+ children: Array<GridStackWidget & {
2104
+ id: Required<GridStackWidget>["id"];
2105
+ }>;
2106
+ };
2107
+ }) => void;
2108
+ removeAll: () => void;
2109
+ }
2110
+
2058
2111
  export declare const F0Icon: ForwardRefExoticComponent<Omit<Omit<F0IconProps_2, "ref"> & RefAttributes<SVGSVGElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
2059
2112
 
2060
2113
  export declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<typeof iconVariants> {
@@ -2284,6 +2337,31 @@ declare type GranularityDefinitionKey = keyof typeof granularityDefinitions;
2284
2337
 
2285
2338
  declare const granularityDefinitions: Record<string, GranularityDefinition>;
2286
2339
 
2340
+ export declare type GridStackReactOptions = Omit<GridStackOptions, "children">;
2341
+
2342
+ export declare type GridStackReactSize = {
2343
+ w: number;
2344
+ h: number;
2345
+ };
2346
+
2347
+ export declare interface GridStackReactWidget extends GridStackWidget {
2348
+ id: Required<GridStackWidget>["id"];
2349
+ allowedSizes?: GridStackReactSize[];
2350
+ renderFn?: () => React.ReactElement;
2351
+ }
2352
+
2353
+ /**
2354
+ * Represents a node in the grid layout.
2355
+ */
2356
+ export declare interface GridStackWidgetPosition {
2357
+ id: string;
2358
+ w: number;
2359
+ h: number;
2360
+ x: number;
2361
+ y: number;
2362
+ meta?: Record<string, unknown>;
2363
+ }
2364
+
2287
2365
  /**
2288
2366
  * Symbol used to identify the groupId in the data
2289
2367
  */
@@ -3985,8 +4063,8 @@ declare module "@tiptap/core" {
3985
4063
 
3986
4064
  declare module "@tiptap/core" {
3987
4065
  interface Commands<ReturnType> {
3988
- liveCompanion: {
3989
- insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
4066
+ transcript: {
4067
+ insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
3990
4068
  };
3991
4069
  }
3992
4070
  }
@@ -3994,18 +4072,34 @@ declare module "@tiptap/core" {
3994
4072
 
3995
4073
  declare module "@tiptap/core" {
3996
4074
  interface Commands<ReturnType> {
3997
- transcript: {
3998
- insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
4075
+ liveCompanion: {
4076
+ insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
3999
4077
  };
4000
4078
  }
4001
4079
  }
4002
4080
 
4003
4081
 
4004
- declare module "@tiptap/core" {
4005
- interface Commands<ReturnType> {
4006
- moodTracker: {
4007
- insertMoodTracker: (data: MoodTrackerData, config?: MoodTrackerConfig) => ReturnType;
4008
- };
4082
+ declare module "gridstack" {
4083
+ interface GridStackWidget {
4084
+ id?: string;
4085
+ allowedSizes?: Array<{
4086
+ w: number;
4087
+ h: number;
4088
+ }>;
4089
+ renderFn?: () => React.ReactElement | null;
4090
+ meta?: Record<string, unknown>;
4091
+ }
4092
+ interface GridStackNode {
4093
+ id?: string;
4094
+ w?: number;
4095
+ h?: number;
4096
+ x?: number;
4097
+ y?: number;
4098
+ allowedSizes?: Array<{
4099
+ w: number;
4100
+ h: number;
4101
+ }>;
4102
+ renderFn?: () => React.ReactElement | null;
4009
4103
  }
4010
4104
  }
4011
4105
 
@@ -4013,3 +4107,12 @@ declare module "@tiptap/core" {
4013
4107
  declare namespace Calendar {
4014
4108
  var displayName: string;
4015
4109
  }
4110
+
4111
+
4112
+ declare module "@tiptap/core" {
4113
+ interface Commands<ReturnType> {
4114
+ moodTracker: {
4115
+ insertMoodTracker: (data: MoodTrackerData, config?: MoodTrackerConfig) => ReturnType;
4116
+ };
4117
+ }
4118
+ }