@dxos/plugin-sheet 0.6.12-staging.e11e696 → 0.6.13-main.548ca8d

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.
Files changed (180) hide show
  1. package/dist/lib/browser/SheetContainer-NDNIS44E.mjs +265 -0
  2. package/dist/lib/browser/SheetContainer-NDNIS44E.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-AQSGDA4X.mjs +1614 -0
  4. package/dist/lib/browser/chunk-AQSGDA4X.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-QILRZNE5.mjs → chunk-D3QTX46O.mjs} +4 -5
  6. package/dist/lib/browser/chunk-D3QTX46O.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-WZMOZKQZ.mjs → chunk-GKI67SEF.mjs} +19 -25
  8. package/dist/lib/browser/chunk-GKI67SEF.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +14 -19
  10. package/dist/lib/browser/index.mjs.map +4 -4
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/meta.mjs +1 -1
  13. package/dist/lib/browser/types.mjs +4 -8
  14. package/dist/lib/node/SheetContainer-YSQGJD7K.cjs +276 -0
  15. package/dist/lib/node/SheetContainer-YSQGJD7K.cjs.map +7 -0
  16. package/dist/lib/node/chunk-6F43RV45.cjs +1610 -0
  17. package/dist/lib/node/chunk-6F43RV45.cjs.map +7 -0
  18. package/dist/lib/node/{chunk-AOP42UAA.cjs → chunk-ER3PM7GD.cjs} +25 -33
  19. package/dist/lib/node/chunk-ER3PM7GD.cjs.map +7 -0
  20. package/dist/lib/node/{chunk-BNARJ5GM.cjs → chunk-QIFIGEKV.cjs} +6 -7
  21. package/dist/lib/node/chunk-QIFIGEKV.cjs.map +7 -0
  22. package/dist/lib/node/index.cjs +36 -40
  23. package/dist/lib/node/index.cjs.map +4 -4
  24. package/dist/lib/node/meta.cjs +3 -3
  25. package/dist/lib/node/meta.cjs.map +1 -1
  26. package/dist/lib/node/meta.json +1 -1
  27. package/dist/lib/node/types.cjs +8 -12
  28. package/dist/lib/node/types.cjs.map +2 -2
  29. package/dist/lib/node-esm/SheetContainer-M7WRMZDU.mjs +266 -0
  30. package/dist/lib/node-esm/SheetContainer-M7WRMZDU.mjs.map +7 -0
  31. package/dist/lib/node-esm/chunk-ELTFPX5B.mjs +1615 -0
  32. package/dist/lib/node-esm/chunk-ELTFPX5B.mjs.map +7 -0
  33. package/dist/lib/node-esm/{chunk-IU2L277A.mjs → chunk-VCYJWE3O.mjs} +4 -5
  34. package/dist/lib/node-esm/chunk-VCYJWE3O.mjs.map +7 -0
  35. package/dist/lib/node-esm/{chunk-RR2AO4SM.mjs → chunk-ZVLLQ2PJ.mjs} +19 -25
  36. package/dist/lib/node-esm/chunk-ZVLLQ2PJ.mjs.map +7 -0
  37. package/dist/lib/node-esm/index.mjs +14 -19
  38. package/dist/lib/node-esm/index.mjs.map +4 -4
  39. package/dist/lib/node-esm/meta.json +1 -1
  40. package/dist/lib/node-esm/meta.mjs +1 -1
  41. package/dist/lib/node-esm/types.mjs +4 -8
  42. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  43. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts +3 -0
  44. package/dist/types/src/components/FunctionEditor/FunctionEditor.d.ts.map +1 -0
  45. package/dist/types/src/components/FunctionEditor/index.d.ts +2 -0
  46. package/dist/types/src/components/FunctionEditor/index.d.ts.map +1 -0
  47. package/dist/types/src/components/GridSheet/GridSheet.d.ts +1 -8
  48. package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
  49. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +1 -1
  50. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -1
  51. package/dist/types/src/components/{CellEditor/CellEditor.stories.d.ts → GridSheet/SheetCellEditor.stories.d.ts} +2 -2
  52. package/dist/types/src/components/GridSheet/SheetCellEditor.stories.d.ts.map +1 -0
  53. package/dist/types/src/components/GridSheet/index.d.ts +2 -0
  54. package/dist/types/src/components/GridSheet/index.d.ts.map +1 -0
  55. package/dist/types/src/components/GridSheet/util.d.ts +11 -2
  56. package/dist/types/src/components/GridSheet/util.d.ts.map +1 -1
  57. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts +6 -0
  58. package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -0
  59. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +11 -0
  60. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -0
  61. package/dist/types/src/components/SheetContainer/index.d.ts +3 -0
  62. package/dist/types/src/components/SheetContainer/index.d.ts.map +1 -0
  63. package/dist/types/src/components/SheetContext/SheetContext.d.ts +27 -0
  64. package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +1 -0
  65. package/dist/types/src/components/SheetContext/index.d.ts +2 -0
  66. package/dist/types/src/components/SheetContext/index.d.ts.map +1 -0
  67. package/dist/types/src/components/Toolbar/Toolbar.d.ts +31 -17
  68. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  69. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +1 -1
  70. package/dist/types/src/components/index.d.ts +3 -2
  71. package/dist/types/src/components/index.d.ts.map +1 -1
  72. package/dist/types/src/extensions/editor/extension.d.ts.map +1 -0
  73. package/dist/types/src/extensions/editor/extension.test.d.ts.map +1 -0
  74. package/dist/types/src/extensions/editor/index.d.ts +2 -0
  75. package/dist/types/src/extensions/editor/index.d.ts.map +1 -0
  76. package/dist/types/src/extensions/index.d.ts +1 -0
  77. package/dist/types/src/extensions/index.d.ts.map +1 -1
  78. package/dist/types/src/hooks/index.d.ts +1 -0
  79. package/dist/types/src/hooks/index.d.ts.map +1 -1
  80. package/dist/types/src/hooks/threads.d.ts +8 -0
  81. package/dist/types/src/hooks/threads.d.ts.map +1 -0
  82. package/dist/types/src/meta.d.ts +3 -6
  83. package/dist/types/src/meta.d.ts.map +1 -1
  84. package/dist/types/src/{components/Sheet → model}/decorations.d.ts +1 -0
  85. package/dist/types/src/model/decorations.d.ts.map +1 -0
  86. package/dist/types/src/model/formatting-model.d.ts +3 -0
  87. package/dist/types/src/model/formatting-model.d.ts.map +1 -1
  88. package/dist/types/src/model/index.d.ts +1 -0
  89. package/dist/types/src/model/index.d.ts.map +1 -1
  90. package/dist/types/src/model/sheet-model.d.ts +3 -2
  91. package/dist/types/src/model/sheet-model.d.ts.map +1 -1
  92. package/dist/types/src/types.d.ts +13 -28
  93. package/dist/types/src/types.d.ts.map +1 -1
  94. package/package.json +36 -39
  95. package/src/SheetPlugin.tsx +3 -2
  96. package/src/components/FunctionEditor/FunctionEditor.tsx +45 -0
  97. package/src/components/FunctionEditor/index.ts +5 -0
  98. package/src/components/GridSheet/GridSheet.stories.tsx +7 -2
  99. package/src/components/GridSheet/GridSheet.tsx +77 -69
  100. package/src/components/{CellEditor/CellEditor.stories.tsx → GridSheet/SheetCellEditor.stories.tsx} +2 -2
  101. package/src/components/{Sheet → GridSheet}/index.ts +1 -1
  102. package/src/components/GridSheet/util.ts +63 -27
  103. package/src/components/SheetContainer/SheetContainer.stories.tsx +40 -0
  104. package/src/components/SheetContainer/SheetContainer.tsx +52 -0
  105. package/src/components/SheetContainer/index.ts +7 -0
  106. package/src/components/{Sheet/sheet-context.tsx → SheetContext/SheetContext.tsx} +47 -27
  107. package/src/components/SheetContext/index.ts +5 -0
  108. package/src/components/Toolbar/Toolbar.tsx +127 -86
  109. package/src/components/index.ts +2 -1
  110. package/src/defs/util.ts +1 -1
  111. package/src/extensions/compute.stories.tsx +4 -4
  112. package/src/{components/CellEditor → extensions/editor}/index.ts +0 -1
  113. package/src/extensions/index.ts +1 -0
  114. package/src/hooks/index.ts +1 -0
  115. package/src/{components/Sheet/threads.tsx → hooks/threads.ts} +26 -84
  116. package/src/{meta.tsx → meta.ts} +3 -3
  117. package/src/{components/Sheet → model}/decorations.ts +2 -0
  118. package/src/model/formatting-model.ts +12 -9
  119. package/src/model/index.ts +1 -0
  120. package/src/model/sheet-model.test.ts +1 -3
  121. package/src/model/sheet-model.ts +13 -11
  122. package/src/types.ts +9 -35
  123. package/dist/lib/browser/SheetContainer-LG77O4RM.mjs +0 -262
  124. package/dist/lib/browser/SheetContainer-LG77O4RM.mjs.map +0 -7
  125. package/dist/lib/browser/chunk-CHQAW4F4.mjs +0 -2705
  126. package/dist/lib/browser/chunk-CHQAW4F4.mjs.map +0 -7
  127. package/dist/lib/browser/chunk-QILRZNE5.mjs.map +0 -7
  128. package/dist/lib/browser/chunk-WZMOZKQZ.mjs.map +0 -7
  129. package/dist/lib/node/SheetContainer-OZ7DHH4L.cjs +0 -280
  130. package/dist/lib/node/SheetContainer-OZ7DHH4L.cjs.map +0 -7
  131. package/dist/lib/node/chunk-5FTFZL5W.cjs +0 -2690
  132. package/dist/lib/node/chunk-5FTFZL5W.cjs.map +0 -7
  133. package/dist/lib/node/chunk-AOP42UAA.cjs.map +0 -7
  134. package/dist/lib/node/chunk-BNARJ5GM.cjs.map +0 -7
  135. package/dist/lib/node-esm/SheetContainer-4XS2G25Z.mjs +0 -263
  136. package/dist/lib/node-esm/SheetContainer-4XS2G25Z.mjs.map +0 -7
  137. package/dist/lib/node-esm/chunk-IU2L277A.mjs.map +0 -7
  138. package/dist/lib/node-esm/chunk-KK3XL37M.mjs +0 -2706
  139. package/dist/lib/node-esm/chunk-KK3XL37M.mjs.map +0 -7
  140. package/dist/lib/node-esm/chunk-RR2AO4SM.mjs.map +0 -7
  141. package/dist/types/src/components/CellEditor/CellEditor.d.ts +0 -34
  142. package/dist/types/src/components/CellEditor/CellEditor.d.ts.map +0 -1
  143. package/dist/types/src/components/CellEditor/CellEditor.stories.d.ts.map +0 -1
  144. package/dist/types/src/components/CellEditor/extension.d.ts.map +0 -1
  145. package/dist/types/src/components/CellEditor/extension.test.d.ts.map +0 -1
  146. package/dist/types/src/components/CellEditor/index.d.ts +0 -3
  147. package/dist/types/src/components/CellEditor/index.d.ts.map +0 -1
  148. package/dist/types/src/components/Sheet/Sheet.d.ts +0 -55
  149. package/dist/types/src/components/Sheet/Sheet.d.ts.map +0 -1
  150. package/dist/types/src/components/Sheet/Sheet.stories.d.ts +0 -53
  151. package/dist/types/src/components/Sheet/Sheet.stories.d.ts.map +0 -1
  152. package/dist/types/src/components/Sheet/decorations.d.ts.map +0 -1
  153. package/dist/types/src/components/Sheet/grid.d.ts +0 -52
  154. package/dist/types/src/components/Sheet/grid.d.ts.map +0 -1
  155. package/dist/types/src/components/Sheet/index.d.ts +0 -2
  156. package/dist/types/src/components/Sheet/index.d.ts.map +0 -1
  157. package/dist/types/src/components/Sheet/nav.d.ts +0 -29
  158. package/dist/types/src/components/Sheet/nav.d.ts.map +0 -1
  159. package/dist/types/src/components/Sheet/sheet-context.d.ts +0 -26
  160. package/dist/types/src/components/Sheet/sheet-context.d.ts.map +0 -1
  161. package/dist/types/src/components/Sheet/threads.d.ts +0 -2
  162. package/dist/types/src/components/Sheet/threads.d.ts.map +0 -1
  163. package/dist/types/src/components/Sheet/util.d.ts +0 -18
  164. package/dist/types/src/components/Sheet/util.d.ts.map +0 -1
  165. package/dist/types/src/components/SheetContainer.d.ts +0 -8
  166. package/dist/types/src/components/SheetContainer.d.ts.map +0 -1
  167. package/dist/types/src/components/Toolbar/common.d.ts +0 -20
  168. package/dist/types/src/components/Toolbar/common.d.ts.map +0 -1
  169. package/src/components/CellEditor/CellEditor.tsx +0 -163
  170. package/src/components/Sheet/Sheet.stories.tsx +0 -251
  171. package/src/components/Sheet/Sheet.tsx +0 -1215
  172. package/src/components/Sheet/grid.ts +0 -191
  173. package/src/components/Sheet/nav.ts +0 -157
  174. package/src/components/Sheet/util.ts +0 -56
  175. package/src/components/SheetContainer.tsx +0 -86
  176. package/src/components/Toolbar/common.tsx +0 -72
  177. /package/dist/types/src/{components/CellEditor → extensions/editor}/extension.d.ts +0 -0
  178. /package/dist/types/src/{components/CellEditor → extensions/editor}/extension.test.d.ts +0 -0
  179. /package/src/{components/CellEditor → extensions/editor}/extension.test.ts +0 -0
  180. /package/src/{components/CellEditor → extensions/editor}/extension.ts +0 -0
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: {
6
- Root: ({ children, onAction, classNames }: import("./Toolbar").ToolbarProps) => React.JSX.Element;
6
+ Root: ({ children, onAction, role, classNames }: import("./Toolbar").ToolbarProps) => React.JSX.Element;
7
7
  Separator: () => React.JSX.Element;
8
8
  Alignment: () => React.JSX.Element;
9
9
  Format: () => React.JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  export * from './ComputeGraph';
3
- export * from './Sheet';
4
- export declare const SheetContainer: React.LazyExoticComponent<({ graph, sheet, role }: import("./Sheet").SheetRootProps & {
3
+ export * from './GridSheet';
4
+ export * from './SheetContext';
5
+ export declare const SheetContainer: React.LazyExoticComponent<({ graph, sheet, role }: import("./SheetContext").SheetProviderProps & {
5
6
  role?: string;
6
7
  }) => React.JSX.Element>;
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AAGxB,eAAO,MAAM,cAAc;QAC0b,CAAC;wBAD5Y,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAG/B,eAAO,MAAM,cAAc;QAC6I,CAAC;wBAD/F,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/editor/extension.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AASnD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAyCtD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAClC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,kBAAwB,qBAAqB,KAAG,SAwH1E,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAIxD;;GAEG;AACH,eAAO,MAAM,cAAc,WAAY,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,KAAG,SA8D9E,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension.test.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/editor/extension.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './extension';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/editor/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './compute';
2
+ export * from './editor';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './useComputeGraph';
2
2
  export * from './useFormattingModel';
3
3
  export * from './useSheetModel';
4
+ export * from './threads';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type MutableRefObject } from 'react';
2
+ import { type DxGridElement } from '@dxos/react-ui-grid';
3
+ import { type CellAddress } from '../defs';
4
+ import { type SheetModel, type Decorations } from '../model';
5
+ export declare const useUpdateFocusedCellOnThreadSelection: (model: SheetModel, grid: MutableRefObject<DxGridElement | null>) => void;
6
+ export declare const useSelectThreadOnCellFocus: (model: SheetModel, cursor?: CellAddress) => void;
7
+ export declare const useThreadDecorations: (model: SheetModel, decorations: Decorations) => void;
8
+ //# sourceMappingURL=threads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../../../src/hooks/threads.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gBAAgB,EAAmC,MAAM,OAAO,CAAC;AAK/E,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAoC,KAAK,WAAW,EAAW,MAAM,SAAS,CAAC;AAEtF,OAAO,EAAE,KAAK,UAAU,EAAmB,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE9E,eAAO,MAAM,qCAAqC,UACzC,UAAU,QACX,gBAAgB,CAAC,aAAa,GAAG,IAAI,CAAC,SAoB7C,CAAC;AAEF,eAAO,MAAM,0BAA0B,UAAW,UAAU,WAAW,WAAW,SAuDjF,CAAC;AAUF,eAAO,MAAM,oBAAoB,UAAW,UAAU,eAAe,WAAW,SAyC/E,CAAC"}
@@ -1,12 +1,9 @@
1
1
  export declare const SHEET_PLUGIN = "dxos.org/plugin/sheet";
2
2
  declare const _default: {
3
3
  id: string;
4
- shortId?: string;
5
- name?: string;
6
- description?: string;
7
- homePage?: string;
8
- tags?: string[];
9
- icon?: string;
4
+ name: string;
5
+ description: string;
6
+ icon: string;
10
7
  };
11
8
  export default _default;
12
9
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,0BAA0B,CAAC;;;;;;;;;;AAEpD,wBAKG"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,0BAA0B,CAAC;;;;;;;AAEpD,wBAKuB"}
@@ -21,4 +21,5 @@ export declare const createDecorations: () => {
21
21
  readonly getDecorationsForCell: (cellIndex: string) => Decoration[] | undefined;
22
22
  readonly getAllDecorations: () => Decoration[];
23
23
  };
24
+ export type Decorations = ReturnType<typeof createDecorations>;
24
25
  //# sourceMappingURL=decorations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorations.d.ts","sourceRoot":"","sources":["../../../../src/model/decorations.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,iBAAiB;wCAMM,MAAM,aAAa,UAAU;2CAI1B,MAAM,SAAS,MAAM;gDAShB,MAAM,KAAG,UAAU,EAAE,GAAG,SAAS;sCAI7C,UAAU,EAAE;CAgB3C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -5,6 +5,9 @@ export type CellFormat = {
5
5
  value?: string;
6
6
  classNames?: ClassNameValue;
7
7
  };
8
+ /**
9
+ * @deprecated See react-ui-data.
10
+ */
8
11
  export declare class FormattingModel {
9
12
  private readonly _model;
10
13
  constructor(_model: SheetModel);
@@ -1 +1 @@
1
- {"version":3,"file":"formatting-model.d.ts","sourceRoot":"","sources":["../../../../src/model/formatting-model.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,KAAK,WAAW,EAAW,MAAM,SAAS,CAAC;AAIpD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEF,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAE/C;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU;CA0F7C"}
1
+ {"version":3,"file":"formatting-model.d.ts","sourceRoot":"","sources":["../../../../src/model/formatting-model.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,KAAK,WAAW,EAAW,MAAM,SAAS,CAAC;AAGpD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAE/C;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU;CA0F7C"}
@@ -1,3 +1,4 @@
1
+ export * from './decorations';
1
2
  export * from './formatting-model';
2
3
  export * from './sheet-model';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/model/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/model/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { type SimpleDate, type SimpleDateTime } from 'hyperformula/typings/DateTimeHelper';
2
2
  import { Event } from '@dxos/async';
3
3
  import { Resource } from '@dxos/context';
4
+ import { FieldValueType } from '@dxos/schema';
4
5
  import { type CellAddress, type CellRange } from '../defs';
5
6
  import { type ComputeGraph, type ComputeNodeEvent } from '../graph';
6
- import { type CellScalarValue, type CellValue, type SheetType, ValueTypeEnum } from '../types';
7
+ import { type CellScalarValue, type CellValue, type SheetType } from '../types';
7
8
  export type SheetModelOptions = {
8
9
  readonly?: boolean;
9
10
  };
@@ -74,7 +75,7 @@ export declare class SheetModel extends Resource {
74
75
  /**
75
76
  * Get value type.
76
77
  */
77
- getValueType(cell: CellAddress): ValueTypeEnum;
78
+ getValueType(cell: CellAddress): FieldValueType;
78
79
  /**
79
80
  * Sets the value, updating the sheet and engine.
80
81
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sheet-model.d.ts","sourceRoot":"","sources":["../../../../src/model/sheet-model.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE3F,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa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S;IAalD;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,eAAe,EAAE,EAAE;IAIpD;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe;IAW5C;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,cAAc;IAO/C;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe;IAwClD;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;IAM3C;;OAEG;IACH,OAAO,CAAC,UAAU;IAqBlB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,YAAY;IAQpB;;OAEG;IACH,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAOhD;;OAEG;IACH,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAWhD;;;;OAIG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK9B,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc;IAKvC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU;IAK/B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU;CAIhC"}
@@ -4,6 +4,7 @@ import { type SchemaProvides } from '@dxos/plugin-client';
4
4
  import { type MarkdownExtensionProvides } from '@dxos/plugin-markdown';
5
5
  import { type SpaceInitProvides } from '@dxos/plugin-space';
6
6
  import { type StackProvides } from '@dxos/plugin-stack';
7
+ import { FieldValueType } from '@dxos/schema';
7
8
  export declare enum SheetAction {
8
9
  CREATE = "dxos.org/plugin/sheet/action/create"
9
10
  }
@@ -19,25 +20,9 @@ export declare const CellValue: S.Struct<{
19
20
  value: typeof S.Any;
20
21
  }>;
21
22
  export type CellValue = S.Schema.Type<typeof CellValue>;
22
- /**
23
- * https://www.tutorialsteacher.com/typescript/typescript-number
24
- */
25
- export declare enum ValueTypeEnum {
26
- Null = 0,
27
- Number = 1,
28
- Boolean = 2,
29
- String = 3,
30
- Percent = 10,
31
- Currency = 11,
32
- DateTime = 20,
33
- Date = 21,
34
- Time = 22,
35
- URL = 30,
36
- DID = 31
37
- }
38
- export declare const ValueType: S.Enums<typeof ValueTypeEnum>;
39
23
  export declare const Formatting: S.Struct<{
40
- type: S.optional<S.Enums<typeof ValueTypeEnum>>;
24
+ range: typeof S.String;
25
+ type: S.optional<S.Enums<typeof FieldValueType>>;
41
26
  format: S.optional<typeof S.String>;
42
27
  precision: S.optional<typeof S.Number>;
43
28
  classNames: S.optional<S.Array$<typeof S.String>>;
@@ -66,13 +51,12 @@ declare const SheetType_base: import("@dxos/echo-schema").AbstractTypedObject<{
66
51
  };
67
52
  };
68
53
  formatting: {
69
- [x: string]: {
70
- type?: ValueTypeEnum | undefined;
71
- format?: string | undefined;
72
- precision?: number | undefined;
73
- classNames?: readonly string[] | undefined;
74
- };
75
- };
54
+ readonly range: string;
55
+ readonly type?: FieldValueType | undefined;
56
+ readonly format?: string | undefined;
57
+ readonly precision?: number | undefined;
58
+ readonly classNames?: readonly string[] | undefined;
59
+ }[];
76
60
  threads?: import("@dxos/echo-schema").Ref<{
77
61
  name?: string | undefined;
78
62
  anchor?: string | undefined;
@@ -121,12 +105,13 @@ declare const SheetType_base: import("@dxos/echo-schema").AbstractTypedObject<{
121
105
  columnMeta: S.mutable<S.Record$<typeof S.String, S.mutable<S.Struct<{
122
106
  size: S.optional<typeof S.Number>;
123
107
  }>>>>;
124
- formatting: S.mutable<S.Record$<typeof S.String, S.mutable<S.Struct<{
125
- type: S.optional<S.Enums<typeof ValueTypeEnum>>;
108
+ formatting: S.mutable<S.Array$<S.Struct<{
109
+ range: typeof S.String;
110
+ type: S.optional<S.Enums<typeof FieldValueType>>;
126
111
  format: S.optional<typeof S.String>;
127
112
  precision: S.optional<typeof S.Number>;
128
113
  classNames: S.optional<S.Array$<typeof S.String>>;
129
- }>>>>;
114
+ }>>>;
130
115
  threads: S.optional<S.mutable<S.Array$<ref<{
131
116
  name?: string | undefined;
132
117
  anchor?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxD,oBAAY,WAAW;IACrB,MAAM,wCAA2B;CAClC;AAKD,KAAK,cAAc,CAAC,CAAC,IAAI;IACvB,MAAM,EAAE;QACN,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC;QAClC,UAAU,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,CAAC;KAC9F,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAC/C,sBAAsB,GACtB,oBAAoB,GACpB,yBAAyB,GACzB,uBAAuB,GACvB,oBAAoB,GACpB,cAAc,GACd,iBAAiB,GACjB,aAAa,GACb,cAAc,CAAC,SAAS,CAAC,CAAC;AAE5B,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAE/D,eAAO,MAAM,SAAS;;EAMpB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC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;;EAMrB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAG1D,eAAO,MAAM,aAAa;;EAExB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCuC,CAAC;;oBAA8D,CAAC;uBAAyC,CAAC;wBAAwD,CAAC;;;;;;;;2BAAsP,CAAC;qBAAuC,CAAC;;iBAA8C,CAAC;sBAA4E,CAAC;;;mBAAwE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAvoB,CAAC;;oBAA8D,CAAC;uBAAyC,CAAC;wBAAwD,CAAC;;;;;;;;2BAAsP,CAAC;qBAAuC,CAAC;;iBAA8C,CAAC;sBAA4E,CAAC;;;mBAAwE,CAAC;;;;;;;;AAnCjrB,qBAAa,SAAU,SAAQ,cAwB7B;CAAG;AAEL,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnC,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-sheet",
3
- "version": "0.6.12-staging.e11e696",
3
+ "version": "0.6.13-main.548ca8d",
4
4
  "description": "Braneframe sketch plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -44,9 +44,6 @@
44
44
  "meta": [
45
45
  "dist/types/src/meta.d.ts"
46
46
  ],
47
- "testing": [
48
- "dist/types/src/testing.d.ts"
49
- ],
50
47
  "types": [
51
48
  "dist/types/src/types.d.ts"
52
49
  ]
@@ -65,7 +62,7 @@
65
62
  "@dnd-kit/modifiers": "^6.0.0",
66
63
  "@dnd-kit/sortable": "^7.0.1",
67
64
  "@dnd-kit/utilities": "^3.2.0",
68
- "@effect/schema": "^0.67.16",
65
+ "@effect/schema": "^0.75.1",
69
66
  "@lezer/common": "^1.2.2",
70
67
  "@lezer/highlight": "^1.2.1",
71
68
  "@lezer/lezer": "^1.1.2",
@@ -74,38 +71,39 @@
74
71
  "@radix-ui/react-context": "^1.0.0",
75
72
  "@tanstack/react-virtual": "^3.9.0",
76
73
  "codemirror-lang-spreadsheet": "^1.3.0",
74
+ "date-fns": "^3.3.1",
77
75
  "hyperformula": "^2.7.1",
78
76
  "lodash.defaultsdeep": "^4.6.1",
79
77
  "re-resizable": "^6.9.17",
80
78
  "react-markdown": "^8.0.5",
81
79
  "react-resize-detector": "^11.0.1",
82
- "@dxos/app-framework": "0.6.12-staging.e11e696",
83
- "@dxos/async": "0.6.12-staging.e11e696",
84
- "@dxos/client": "0.6.12-staging.e11e696",
85
- "@dxos/context": "0.6.12-staging.e11e696",
86
- "@dxos/debug": "0.6.12-staging.e11e696",
87
- "@dxos/echo-schema": "0.6.12-staging.e11e696",
88
- "@dxos/invariant": "0.6.12-staging.e11e696",
89
- "@dxos/crypto": "0.6.12-staging.e11e696",
90
- "@dxos/keys": "0.6.12-staging.e11e696",
91
- "@dxos/log": "0.6.12-staging.e11e696",
92
- "@dxos/plugin-client": "0.6.12-staging.e11e696",
93
- "@dxos/plugin-attention": "0.6.12-staging.e11e696",
94
- "@dxos/plugin-markdown": "0.6.12-staging.e11e696",
95
- "@dxos/plugin-graph": "0.6.12-staging.e11e696",
96
- "@dxos/plugin-script": "0.6.12-staging.e11e696",
97
- "@dxos/plugin-stack": "0.6.12-staging.e11e696",
98
- "@dxos/plugin-space": "0.6.12-staging.e11e696",
99
- "@dxos/react-client": "0.6.12-staging.e11e696",
100
- "@dxos/react-hooks": "0.6.12-staging.e11e696",
101
- "@dxos/react-ui-editor": "0.6.12-staging.e11e696",
102
- "@dxos/react-ui-grid": "0.6.12-staging.e11e696",
103
- "@dxos/react-ui-attention": "0.6.12-staging.e11e696",
104
- "@dxos/util": "0.6.12-staging.e11e696"
80
+ "@dxos/app-framework": "0.6.13-main.548ca8d",
81
+ "@dxos/async": "0.6.13-main.548ca8d",
82
+ "@dxos/context": "0.6.13-main.548ca8d",
83
+ "@dxos/client": "0.6.13-main.548ca8d",
84
+ "@dxos/crypto": "0.6.13-main.548ca8d",
85
+ "@dxos/debug": "0.6.13-main.548ca8d",
86
+ "@dxos/invariant": "0.6.13-main.548ca8d",
87
+ "@dxos/keys": "0.6.13-main.548ca8d",
88
+ "@dxos/echo-schema": "0.6.13-main.548ca8d",
89
+ "@dxos/log": "0.6.13-main.548ca8d",
90
+ "@dxos/plugin-client": "0.6.13-main.548ca8d",
91
+ "@dxos/plugin-attention": "0.6.13-main.548ca8d",
92
+ "@dxos/plugin-graph": "0.6.13-main.548ca8d",
93
+ "@dxos/plugin-markdown": "0.6.13-main.548ca8d",
94
+ "@dxos/plugin-space": "0.6.13-main.548ca8d",
95
+ "@dxos/plugin-script": "0.6.13-main.548ca8d",
96
+ "@dxos/plugin-stack": "0.6.13-main.548ca8d",
97
+ "@dxos/react-client": "0.6.13-main.548ca8d",
98
+ "@dxos/react-hooks": "0.6.13-main.548ca8d",
99
+ "@dxos/react-ui-attention": "0.6.13-main.548ca8d",
100
+ "@dxos/react-ui-editor": "0.6.13-main.548ca8d",
101
+ "@dxos/react-ui-grid": "0.6.13-main.548ca8d",
102
+ "@dxos/schema": "0.6.13-main.548ca8d",
103
+ "@dxos/util": "0.6.13-main.548ca8d"
105
104
  },
106
105
  "devDependencies": {
107
106
  "@lezer/generator": "^1.7.1",
108
- "@phosphor-icons/react": "^2.1.5",
109
107
  "@tldraw/indices": "^2.0.0-alpha.14",
110
108
  "@types/lodash.defaultsdeep": "^4.6.6",
111
109
  "@types/react": "~18.2.0",
@@ -114,20 +112,19 @@
114
112
  "react": "~18.2.0",
115
113
  "react-dom": "~18.2.0",
116
114
  "vite": "5.4.7",
117
- "@dxos/echo-generator": "0.6.12-staging.e11e696",
118
- "@dxos/random": "0.6.12-staging.e11e696",
119
- "@dxos/react-ui": "0.6.12-staging.e11e696",
120
- "@dxos/react-ui-theme": "0.6.12-staging.e11e696",
121
- "@dxos/react-ui-syntax-highlighter": "0.6.12-staging.e11e696",
122
- "@dxos/storybook-utils": "0.6.12-staging.e11e696",
123
- "@dxos/react-ui-types": "0.6.12-staging.e11e696"
115
+ "@dxos/echo-generator": "0.6.13-main.548ca8d",
116
+ "@dxos/random": "0.6.13-main.548ca8d",
117
+ "@dxos/react-ui": "0.6.13-main.548ca8d",
118
+ "@dxos/react-ui-theme": "0.6.13-main.548ca8d",
119
+ "@dxos/react-ui-types": "0.6.13-main.548ca8d",
120
+ "@dxos/storybook-utils": "0.6.13-main.548ca8d",
121
+ "@dxos/react-ui-syntax-highlighter": "0.6.13-main.548ca8d"
124
122
  },
125
123
  "peerDependencies": {
126
- "@phosphor-icons/react": "^2.1.5",
127
124
  "react": "~18.2.0",
128
125
  "react-dom": "~18.2.0",
129
- "@dxos/react-ui": "0.6.12-staging.e11e696",
130
- "@dxos/react-ui-theme": "0.6.12-staging.e11e696"
126
+ "@dxos/react-ui": "0.6.13-main.548ca8d",
127
+ "@dxos/react-ui-theme": "0.6.13-main.548ca8d"
131
128
  },
132
129
  "publishConfig": {
133
130
  "access": "public"
@@ -2,7 +2,6 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { GridNine } from '@phosphor-icons/react';
6
5
  import React from 'react';
7
6
 
8
7
  import { NavigationAction, parseIntentPlugin, resolvePlugin, type PluginDefinition } from '@dxos/app-framework';
@@ -12,6 +11,7 @@ import { createExtension, isActionGroup, type ActionGroup } from '@dxos/plugin-g
12
11
  import { FunctionType } from '@dxos/plugin-script/types';
13
12
  import { SpaceAction } from '@dxos/plugin-space';
14
13
  import { getSpace, isEchoObject } from '@dxos/react-client/echo';
14
+ import { Icon } from '@dxos/react-ui';
15
15
 
16
16
  import { ComputeGraphContextProvider, SheetContainer } from './components';
17
17
  import { compareIndexPositions, createSheet } from './defs';
@@ -126,7 +126,8 @@ export const SheetPlugin = (): PluginDefinition<SheetPluginProvides> => {
126
126
  testId: 'sheetPlugin.createSection',
127
127
  type: ['plugin name', { ns: SHEET_PLUGIN }],
128
128
  label: ['create sheet section label', { ns: SHEET_PLUGIN }],
129
- icon: (props: any) => <GridNine {...props} />,
129
+ // TODO(thure): Refactor to use strings
130
+ icon: (props: any) => <Icon icon='ph--grid-nine--regular' {...props} />,
130
131
  intent: {
131
132
  plugin: SHEET_PLUGIN,
132
133
  action: SheetAction.CREATE,
@@ -0,0 +1,45 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Icon } from '@dxos/react-ui';
8
+ import { mx } from '@dxos/react-ui-theme';
9
+
10
+ import { addressToA1Notation, rangeToA1Notation } from '../../defs';
11
+ import { useSheetContext } from '../SheetContext';
12
+
13
+ export const FunctionEditor = () => {
14
+ const { model, cursor, range } = useSheetContext();
15
+
16
+ let value;
17
+ let isFormula = false;
18
+ if (cursor) {
19
+ value = model.getCellValue(cursor);
20
+ if (typeof value === 'string' && value.charAt(0) === '=') {
21
+ value = model.graph.mapFunctionBindingFromId(model.mapFormulaIndicesToRefs(value));
22
+ isFormula = true;
23
+ } else if (value != null) {
24
+ value = String(value);
25
+ }
26
+ }
27
+
28
+ return (
29
+ <div
30
+ className={mx(
31
+ 'flex shrink-0 justify-between items-center px-4 py-1 text-sm border-bs !border-separator attention-surface',
32
+ )}
33
+ >
34
+ <div className='flex gap-4 items-center'>
35
+ <div className='flex w-16 items-center font-mono'>
36
+ {(range && rangeToA1Notation(range)) || (cursor && addressToA1Notation(cursor))}
37
+ </div>
38
+ <div className='flex gap-2 items-center'>
39
+ <Icon icon='ph--function--regular' classNames={['text-greenText', isFormula ? 'visible' : 'invisible']} />
40
+ <span className='font-mono'>{value}</span>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ );
45
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './FunctionEditor';
@@ -12,6 +12,7 @@ import { GridSheet } from './GridSheet';
12
12
  import { useComputeGraph } from '../../hooks';
13
13
  import { useTestSheet, withComputeGraphDecorator } from '../../testing';
14
14
  import { SheetType } from '../../types';
15
+ import { SheetProvider } from '../SheetContext';
15
16
 
16
17
  export default {
17
18
  title: 'plugin-sheet/GridSheet',
@@ -28,9 +29,13 @@ export const Basic = () => {
28
29
  const space = useSpace();
29
30
  const graph = useComputeGraph(space);
30
31
  const sheet = useTestSheet(space, graph);
31
- if (!sheet || !space) {
32
+ if (!sheet || !graph) {
32
33
  return null;
33
34
  }
34
35
 
35
- return <GridSheet graph={graph} sheet={sheet} />;
36
+ return (
37
+ <SheetProvider graph={graph} sheet={sheet}>
38
+ <GridSheet />
39
+ </SheetProvider>
40
+ );
36
41
  };