@dxos/plugin-sheet 0.6.13-main.09887cd → 0.6.13-main.ed424a1
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/lib/browser/{SheetContainer-NDNIS44E.mjs → SheetContainer-RVRACGCZ.mjs} +107 -82
- package/dist/lib/browser/SheetContainer-RVRACGCZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GKI67SEF.mjs → chunk-BWN5DZWZ.mjs} +16 -11
- package/dist/lib/browser/chunk-BWN5DZWZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-AQSGDA4X.mjs → chunk-HOG37RYS.mjs} +92 -178
- package/dist/lib/browser/chunk-HOG37RYS.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types.mjs +3 -3
- package/dist/lib/node/{SheetContainer-YSQGJD7K.cjs → SheetContainer-J7XROAMN.cjs} +113 -89
- package/dist/lib/node/SheetContainer-J7XROAMN.cjs.map +7 -0
- package/dist/lib/node/{chunk-6F43RV45.cjs → chunk-AXQZA2YS.cjs} +103 -186
- package/dist/lib/node/chunk-AXQZA2YS.cjs.map +7 -0
- package/dist/lib/node/{chunk-ER3PM7GD.cjs → chunk-NZARD7UP.cjs} +20 -15
- package/dist/lib/node/chunk-NZARD7UP.cjs.map +7 -0
- package/dist/lib/node/index.cjs +18 -18
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types.cjs +7 -7
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/lib/node-esm/{SheetContainer-M7WRMZDU.mjs → SheetContainer-YWQVKHQB.mjs} +107 -82
- package/dist/lib/node-esm/SheetContainer-YWQVKHQB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ELTFPX5B.mjs → chunk-BPXXIAOQ.mjs} +92 -178
- package/dist/lib/node-esm/chunk-BPXXIAOQ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ZVLLQ2PJ.mjs → chunk-WFDTY3IC.mjs} +16 -11
- package/dist/lib/node-esm/chunk-WFDTY3IC.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/types.mjs +3 -3
- package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
- package/dist/types/src/components/GridSheet/util.d.ts +2 -2
- package/dist/types/src/components/GridSheet/util.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.d.ts.map +1 -1
- package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SheetContext/SheetContext.d.ts +1 -2
- package/dist/types/src/components/SheetContext/SheetContext.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +11 -17
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +1 -2
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/defs/index.d.ts +1 -0
- package/dist/types/src/defs/index.d.ts.map +1 -1
- package/dist/types/src/defs/sheet-range-types.d.ts +13 -0
- package/dist/types/src/defs/sheet-range-types.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +0 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/model/index.d.ts +0 -1
- package/dist/types/src/model/index.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +39 -20
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +35 -34
- package/src/components/GridSheet/GridSheet.stories.tsx +2 -2
- package/src/components/GridSheet/GridSheet.tsx +5 -3
- package/src/components/GridSheet/util.ts +24 -10
- package/src/components/SheetContainer/SheetContainer.stories.tsx +2 -2
- package/src/components/SheetContainer/SheetContainer.tsx +3 -28
- package/src/components/SheetContext/SheetContext.tsx +5 -9
- package/src/components/Toolbar/Toolbar.tsx +116 -68
- package/src/defs/index.ts +1 -0
- package/src/defs/sheet-range-types.ts +46 -0
- package/src/defs/util.ts +1 -1
- package/src/hooks/index.ts +0 -1
- package/src/model/index.ts +0 -1
- package/src/types.ts +5 -11
- package/dist/lib/browser/SheetContainer-NDNIS44E.mjs.map +0 -7
- package/dist/lib/browser/chunk-AQSGDA4X.mjs.map +0 -7
- package/dist/lib/browser/chunk-GKI67SEF.mjs.map +0 -7
- package/dist/lib/node/SheetContainer-YSQGJD7K.cjs.map +0 -7
- package/dist/lib/node/chunk-6F43RV45.cjs.map +0 -7
- package/dist/lib/node/chunk-ER3PM7GD.cjs.map +0 -7
- package/dist/lib/node-esm/SheetContainer-M7WRMZDU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ELTFPX5B.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZVLLQ2PJ.mjs.map +0 -7
- package/dist/types/src/hooks/useFormattingModel.d.ts +0 -3
- package/dist/types/src/hooks/useFormattingModel.d.ts.map +0 -1
- package/dist/types/src/model/formatting-model.d.ts +0 -19
- package/dist/types/src/model/formatting-model.d.ts.map +0 -1
- package/src/hooks/useFormattingModel.ts +0 -11
- package/src/model/formatting-model.ts +0 -116
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/ComputeGraph/ComputeGraphContextProvider.tsx", "../../../src/defs/util.ts", "../../../src/defs/types.ts", "../../../src/defs/sheet-range-types.ts", "../../../src/extensions/compute.ts", "../../../src/extensions/editor/extension.ts", "../../../src/hooks/useComputeGraph.ts", "../../../src/components/index.ts", "../../../src/components/GridSheet/GridSheet.tsx", "../../../src/components/GridSheet/util.ts", "../../../src/hooks/useSheetModel.ts", "../../../src/model/decorations.ts", "../../../src/model/sheet-model.ts", "../../../src/hooks/threads.ts", "../../../src/components/SheetContext/SheetContext.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { createContext, type PropsWithChildren } from 'react';\n\nimport { type ComputeGraphRegistry } from '../../graph';\n\nexport type ComputeGraphContextType = {\n registry: ComputeGraphRegistry;\n};\n\n/**\n * The compute graph context manages a ComputeGraph for each space.\n */\nexport const ComputeGraphContext = createContext<ComputeGraphContextType | undefined>(undefined);\n\nexport const ComputeGraphContextProvider = ({ registry, children }: PropsWithChildren<ComputeGraphContextType>) => {\n return <ComputeGraphContext.Provider value={{ registry }}>{children}</ComputeGraphContext.Provider>;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { randomBytes } from '@dxos/crypto';\nimport { create } from '@dxos/echo-schema';\n\nimport {\n addressFromA1Notation,\n type CellAddress,\n type CellRange,\n DEFAULT_COLUMNS,\n DEFAULT_ROWS,\n MAX_COLUMNS,\n MAX_ROWS,\n} from './types';\nimport { type CreateSheetOptions, type SheetSize, SheetType } from '../types';\n\n// TODO(burdon): Factor out from dxos/protocols to new common package.\nexport class ApiError extends Error {}\n\nexport class ReadonlyException extends ApiError {}\n\nexport class RangeException extends ApiError {\n constructor(n: number) {\n super();\n }\n}\n\n/**\n * With a string length of 8, the chance of a collision is 0.02% for a sheet with 10,000 strings.\n */\nexport const createIndex = (length = 8): string => {\n const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const charactersLength = characters.length;\n const randomBuffer = randomBytes(length);\n return Array.from(randomBuffer, (byte) => characters[byte % charactersLength]).join('');\n};\n\nexport const createIndices = (length: number): string[] => Array.from({ length }).map(() => createIndex());\n\nexport const insertIndices = (indices: string[], i: number, n: number, max: number) => {\n if (i + n > max) {\n throw new RangeException(i + n);\n }\n\n const idx = createIndices(n);\n indices.splice(i, 0, ...idx);\n};\n\nexport const initialize = (\n sheet: SheetType,\n { rows = DEFAULT_ROWS, columns = DEFAULT_COLUMNS }: Partial<SheetSize> = {},\n) => {\n if (!sheet.rows.length) {\n insertIndices(sheet.rows, 0, rows, MAX_ROWS);\n }\n if (!sheet.columns.length) {\n insertIndices(sheet.columns, 0, columns, MAX_COLUMNS);\n }\n};\n\nexport const createSheet = ({ name, cells, ...size }: CreateSheetOptions = {}): SheetType => {\n const sheet = create(SheetType, {\n name,\n cells: {},\n rows: [],\n columns: [],\n rowMeta: {},\n columnMeta: {},\n ranges: [],\n });\n\n initialize(sheet, size);\n\n if (cells) {\n Object.entries(cells).forEach(([key, { value }]) => {\n const idx = addressToIndex(sheet, addressFromA1Notation(key));\n sheet.cells[idx] = { value };\n });\n }\n\n return sheet;\n};\n\n/**\n * E.g., \"A1\" => \"CA2@CB3\".\n */\nexport const addressToIndex = (sheet: SheetType, cell: CellAddress): string => {\n return `${sheet.columns[cell.col]}@${sheet.rows[cell.row]}`;\n};\n\n/**\n * E.g., \"CA2@CB3\" => \"A1\".\n */\nexport const addressFromIndex = (sheet: SheetType, idx: string): CellAddress => {\n const [column, row] = idx.split('@');\n return {\n col: sheet.columns.indexOf(column),\n row: sheet.rows.indexOf(row),\n };\n};\n\n/**\n * E.g., \"A1:B2\" => \"CA2@CB3:CC4@CD5\".\n */\nexport const rangeToIndex = (sheet: SheetType, range: CellRange): string => {\n return [range.from, range.to ?? range.from].map((cell) => addressToIndex(sheet, cell)).join(':');\n};\n\n/**\n * E.g., \"CA2@CB3:CC4@CD5\" => \"A1:B2\".\n */\nexport const rangeFromIndex = (sheet: SheetType, idx: string): CellRange => {\n const [from, to] = idx.split(':').map((index) => addressFromIndex(sheet, index));\n return { from, to };\n};\n\n/**\n * Find closest cell to cursor.\n */\nexport const closest = (cursor: CellAddress, cells: CellAddress[]): CellAddress | undefined => {\n let closestCell: CellAddress | undefined;\n let closestDistance = Number.MAX_SAFE_INTEGER;\n\n for (const cell of cells) {\n const distance = Math.abs(cell.row - cursor.row) + Math.abs(cell.col - cursor.col);\n if (distance < closestDistance) {\n closestCell = cell;\n closestDistance = distance;\n }\n }\n\n return closestCell;\n};\n\n/**\n * Compares the positions of two cell indexes in a sheet.\n * Sorts primarily by row, then by column if rows are equal.\n */\nexport const compareIndexPositions = (sheet: SheetType, indexA: string, indexB: string): number => {\n const { row: rowA, col: columnA } = addressFromIndex(sheet, indexA);\n const { row: rowB, col: columnB } = addressFromIndex(sheet, indexB);\n\n // Sort by row first, then by column.\n if (rowA !== rowB) {\n return rowA - rowB;\n } else {\n return columnA - columnB;\n }\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { invariant } from '@dxos/invariant';\n\nexport const DEFAULT_ROWS = 50;\nexport const DEFAULT_COLUMNS = 26;\n\nexport const MAX_ROWS = 500;\nexport const MAX_COLUMNS = 26 * 2;\n\nexport type CellAddress = { col: number; row: number };\n\nexport type CellRange = { from: CellAddress; to?: CellAddress };\n\nexport type CellIndex = string;\n\nexport type CellContentValue = number | string | boolean | null;\n\nexport const posEquals = (a: CellAddress | undefined, b: CellAddress | undefined) => {\n return a?.col === b?.col && a?.row === b?.row;\n};\n\nexport const columnLetter = (col: number): string => {\n invariant(col < MAX_COLUMNS, `Invalid column: ${col}`);\n return (\n (col >= 26 ? String.fromCharCode('A'.charCodeAt(0) + Math.floor(col / 26) - 1) : '') +\n String.fromCharCode('A'.charCodeAt(0) + (col % 26))\n );\n};\n\nexport const addressToA1Notation = ({ col, row }: CellAddress): string => {\n return `${columnLetter(col)}${row + 1}`;\n};\n\n// TODO(burdon): See simpleCellAddressFromString\nexport const addressFromA1Notation = (ref: string): CellAddress => {\n const match = ref.match(/([A-Z]+)(\\d+)/);\n invariant(match, `Invalid notation: ${ref}`);\n return {\n row: parseInt(match[2], 10) - 1,\n col: match[1].split('').reduce((acc, c) => acc * 26 + c.charCodeAt(0) - 'A'.charCodeAt(0) + 1, 0) - 1,\n };\n};\n\nexport const rangeToA1Notation = (range: CellRange) => {\n return [range?.from && addressToA1Notation(range?.from), range?.to && addressToA1Notation(range?.to)]\n .filter(Boolean)\n .join(':');\n};\n\nexport const rangeFromA1Notation = (ref: string): CellRange => {\n const [from, to] = ref.split(':').map(addressFromA1Notation);\n return { from, to };\n};\n\nexport const inRange = (range: CellRange | undefined, cell: CellAddress): boolean => {\n if (!range) {\n return false;\n }\n\n const { from, to } = range;\n if ((from && posEquals(from, cell)) || (to && posEquals(to, cell))) {\n return true;\n }\n\n if (!from || !to) {\n return false;\n }\n\n const { col: c1, row: r1 } = from;\n const { col: c2, row: r2 } = to;\n const cMin = Math.min(c1, c2);\n const cMax = Math.max(c1, c2);\n const rMin = Math.min(r1, r2);\n const rMax = Math.max(r1, r2);\n\n const { col, row } = cell;\n return col >= cMin && col <= cMax && row >= rMin && row <= rMax;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type ClassNameValue } from '@dxos/react-ui';\n\nimport { type SheetType } from '../types';\n\nexport const alignKey = 'align';\nexport type AlignKey = typeof alignKey;\nexport type AlignValue = 'start' | 'center' | 'end' | 'unset';\n\nexport const commentKey = 'comment';\nexport type CommentKey = typeof commentKey;\nexport type CommentValue = string;\n\nexport const styleKey = 'style';\nexport type StyleKey = typeof styleKey;\nexport type StyleValue = 'highlight' | 'unset';\n\nexport const cellClassNameForRange = ({ key, value }: SheetType['ranges'][number]): ClassNameValue => {\n switch (key) {\n case 'align':\n switch (value) {\n case 'start':\n return 'text-start';\n case 'center':\n return 'text-center';\n case 'end':\n return 'text-end';\n default:\n return undefined;\n }\n case 'comment':\n return 'bg-gridComment';\n case 'style':\n switch (value) {\n case 'highlight':\n return 'bg-gridHighlight';\n default:\n return undefined;\n }\n default:\n return undefined;\n }\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { syntaxTree } from '@codemirror/language';\nimport {\n type EditorState,\n type Extension,\n type RangeSet,\n RangeSetBuilder,\n StateEffect,\n StateField,\n type Transaction,\n} from '@codemirror/state';\nimport { Decoration, EditorView, ViewPlugin, WidgetType } from '@codemirror/view';\n\nimport { type UnsubscribeCallback, debounce } from '@dxos/async';\nimport { invariant } from '@dxos/invariant';\nimport { documentId, singleValueFacet } from '@dxos/react-ui-editor/state';\n\nimport { type CellAddress } from '../defs';\nimport { type ComputeGraph, type ComputeNode, createSheetName } from '../graph';\nimport { type CellScalarValue } from '../types';\n\nconst LANGUAGE_TAG = 'dx';\n\n// TODO(burdon): Create marker just for our decorator?\nconst updateAllDecorations = StateEffect.define<void>();\n\nexport const computeGraphFacet = singleValueFacet<ComputeGraph>();\n\nexport type ComputeOptions = {};\n\nexport const compute = (options: ComputeOptions = {}): Extension => {\n let computeNode: ComputeNode | undefined;\n\n const update = (state: EditorState, current?: RangeSet<Decoration>) => {\n const builder = new RangeSetBuilder<Decoration>();\n if (computeNode) {\n computeNode.clear();\n syntaxTree(state).iterate({\n enter: (node) => {\n switch (node.name) {\n case 'FencedCode': {\n const cursor = state.selection.main.head;\n if (state.readOnly || cursor < node.from || cursor > node.to) {\n const info = node.node.getChild('CodeInfo');\n if (info) {\n const type = state.sliceDoc(info.from, info.to);\n const text = node.node.getChild('CodeText');\n if (type === LANGUAGE_TAG && text) {\n const formula = state.sliceDoc(text.from, text.to);\n\n const iter = current?.iter(node.node.from);\n if (iter?.value && iter?.value.spec.formula === formula) {\n // Add existing widget.\n builder.add(node.from, node.to, iter.value);\n } else {\n // TODO(burdon): Create ordered list of cells on each decoration run.\n const cell: CellAddress = { col: node.node.from, row: 0 };\n invariant(computeNode);\n // NOTE: This triggers re-render (below).\n computeNode.setValue(cell, formula);\n const value = computeNode.getValue(cell);\n builder.add(\n node.from,\n node.to,\n Decoration.replace({\n widget: new ComputeWidget(formula, value),\n formula,\n }),\n );\n }\n }\n }\n }\n\n break;\n }\n }\n },\n });\n }\n\n return builder.finish();\n };\n\n return [\n ViewPlugin.fromClass(\n class {\n // Graph subscription.\n private _subscription?: UnsubscribeCallback;\n constructor(view: EditorView) {\n const id = view.state.facet(documentId);\n const computeGraph = view.state.facet(computeGraphFacet);\n if (id && computeGraph) {\n queueMicrotask(async () => {\n computeNode = computeGraph.getOrCreateNode(createSheetName({ type: '', id }));\n await computeNode.open();\n\n // Trigger re-render if values updated.\n // TODO(burdon): Trigger only if formula value updated (currently triggered during render).\n this._subscription = computeNode.update.on(\n debounce(({ type, ...rest }) => {\n if (type === 'valuesUpdated') {\n view.dispatch({\n effects: updateAllDecorations.of(),\n });\n }\n }, 250),\n );\n });\n }\n }\n\n destroy() {\n this._subscription?.();\n void computeNode?.close();\n computeNode = undefined;\n }\n },\n ),\n\n StateField.define<RangeSet<Decoration>>({\n create: (state) => update(state),\n update: (rangeSet: RangeSet<Decoration>, tr: Transaction) => update(tr.state, rangeSet),\n provide: (field) => EditorView.decorations.from(field),\n }),\n ];\n};\n\n// TODO(burdon): Click to edit.\nclass ComputeWidget extends WidgetType {\n constructor(\n private readonly formula: string,\n private readonly value: CellScalarValue,\n ) {\n super();\n }\n\n override toDOM(_view: EditorView) {\n const div = document.createElement('div');\n div.setAttribute('title', this.formula);\n div.innerText = String(this.value);\n return div;\n }\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n type Completion,\n type CompletionContext,\n type CompletionResult,\n acceptCompletion,\n autocompletion,\n completionStatus,\n startCompletion,\n} from '@codemirror/autocomplete';\nimport { HighlightStyle, type Language, syntaxHighlighting } from '@codemirror/language';\nimport { type Extension } from '@codemirror/state';\nimport { type EditorView, ViewPlugin, type ViewUpdate, keymap } from '@codemirror/view';\nimport { type SyntaxNode } from '@lezer/common';\nimport { tags } from '@lezer/highlight';\nimport { spreadsheet } from 'codemirror-lang-spreadsheet';\n\nimport { singleValueFacet } from '@dxos/react-ui-editor/state';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { type FunctionDefinition } from '../../graph';\n\n/**\n * https://codemirror.net/examples/styling\n * https://lezer.codemirror.net/docs/ref/#highlight\n * https://github.com/luizzappa/codemirror-lang-spreadsheet/blob/main/src/index.ts#L28 (mapping)\n */\n// TODO(burdon): Define light/dark.\nconst highlightStyles = HighlightStyle.define([\n // Function.\n {\n tag: tags.name,\n class: 'text-accentText',\n },\n // Range.\n {\n tag: tags.tagName,\n class: 'text-pinkText',\n },\n // Values.\n {\n tag: tags.number,\n class: 'text-tealText',\n },\n {\n tag: tags.bool,\n class: 'text-tealText',\n },\n {\n tag: tags.string,\n class: 'text-tealText',\n },\n // Error.\n {\n tag: tags.invalid,\n class: 'text-unAccent',\n },\n]);\n\nconst languageFacet = singleValueFacet<Language>();\n\nexport type SheetExtensionOptions = {\n functions?: FunctionDefinition[];\n};\n\n/**\n * Spreadsheet formula extension and parser.\n * https://github.com/luizzappa/codemirror-lang-spreadsheet\n * https://github.com/luizzappa/codemirror-app-spreadsheet/blob/master/src/editor.ts\n * https://github.com/codemirror/lang-example\n * https://hyperformula.handsontable.com/guide/key-concepts.html#grammar\n */\nexport const sheetExtension = ({ functions = [] }: SheetExtensionOptions): Extension => {\n const { extension, language } = spreadsheet({ idiom: 'en-US', decimalSeparator: '.' });\n\n const createCompletion = (name: string) => {\n const { section = 'Custom', description, syntax } = functions.find((value) => value.name === name) ?? {};\n\n return {\n section,\n label: name,\n info: () => {\n if (!description && !syntax) {\n return null;\n }\n\n // TODO(burdon): Standardize color styles.\n const root = document.createElement('div');\n root.className = 'flex flex-col gap-2 text-sm';\n\n const title = document.createElement('h2');\n title.innerText = name;\n title.className = 'text-lg font-mono text-accentText';\n root.appendChild(title);\n\n if (description) {\n const info = document.createElement('p');\n info.innerText = description;\n info.className = 'text-subdued';\n root.appendChild(info);\n }\n\n if (syntax) {\n const detail = document.createElement('pre');\n detail.innerText = syntax;\n detail.className = 'whitespace-pre-wrap text-greenText';\n root.appendChild(detail);\n }\n\n return root;\n },\n apply: (view, completion, from, to) => {\n const insertParens = to === view.state.doc.toString().length;\n view.dispatch(\n view.state.update({\n changes: {\n from,\n to,\n insert: completion.label + (insertParens ? '()' : ''),\n },\n selection: {\n anchor: from + completion.label.length + 1,\n },\n }),\n );\n },\n } satisfies Completion;\n };\n\n return [\n extension,\n languageFacet.of(language),\n language.data.of({\n autocomplete: (context: CompletionContext): CompletionResult | null => {\n if (context.state.doc.toString()[0] !== '=') {\n return null;\n }\n const match = context.matchBefore(/\\w*/);\n if (!match || match.from === match.to) {\n return null;\n }\n\n const text = match.text.toUpperCase();\n if (!context.explicit && match.text.length < 2) {\n return null;\n }\n\n return {\n from: match.from,\n options:\n functions?.filter(({ name }) => name.startsWith(text)).map(({ name }) => createCompletion(name)) ?? [],\n };\n },\n }),\n\n syntaxHighlighting(highlightStyles),\n autocompletion({\n aboveCursor: false,\n defaultKeymap: true,\n activateOnTyping: true,\n // NOTE: Useful for debugging.\n closeOnBlur: false,\n icons: false,\n tooltipClass: () =>\n mx(\n '!-left-[1px] !top-[33px] !-m-0 border !border-t-0 [&>ul]:!min-w-[198px]',\n '[&>ul>li[aria-selected]]:!bg-accentSurface',\n 'border-separator',\n ),\n }),\n keymap.of([\n {\n key: 'Tab',\n run: (view) => {\n return completionStatus(view.state) === 'active' ? acceptCompletion(view) : startCompletion(view);\n },\n },\n ]),\n\n // Parsing.\n // StateField.define({\n // create: (state) => {},\n // update: (value, tr) => {\n // log.info('update');\n // syntaxTree(tr.state).iterate({\n // enter: ({ type, from, to }) => {\n // log.info('node', { type: type.name, from, to });\n // },\n // });\n // },\n // }),\n ];\n};\n\nexport type CellRangeNotifier = (range: string) => void;\n\ntype Range = { from: number; to: number };\n\n/**\n * Tracks the currently active cell within a formula and provides a callback to modify it.\n */\nexport const rangeExtension = (onInit: (notifier: CellRangeNotifier) => void): Extension => {\n let view: EditorView;\n let activeRange: Range | undefined;\n const provider: CellRangeNotifier = (range: string) => {\n if (activeRange) {\n view.dispatch(\n view.state.update({\n changes: { ...activeRange, insert: range.toString() },\n selection: { anchor: activeRange.from + range.length },\n }),\n );\n }\n\n view.focus();\n };\n\n return ViewPlugin.fromClass(\n class {\n constructor(_view: EditorView) {\n view = _view;\n onInit(provider);\n }\n\n update(view: ViewUpdate) {\n const { anchor } = view.state.selection.ranges[0];\n\n // Find first Range or cell at cursor.\n activeRange = undefined;\n const language = view.state.facet(languageFacet);\n const { topNode } = language.parser.parse(view.state.doc.toString());\n visitTree(topNode, ({ type, from, to }) => {\n if (from <= anchor && to >= anchor) {\n switch (type.name) {\n case 'Function': {\n // Mark but keep looking.\n activeRange = { from: to, to };\n break;\n }\n\n case 'CloseParen': {\n // Mark but keep looking.\n activeRange = { from, to: from };\n break;\n }\n\n case 'RangeToken':\n case 'CellToken':\n activeRange = { from, to };\n return true;\n }\n }\n\n return false;\n });\n\n // Allow start of formula.\n if (!activeRange && view.state.doc.toString()[0] === '=') {\n activeRange = { from: 1, to: view.state.doc.toString().length };\n }\n }\n },\n );\n};\n\n/**\n * Lezer parse result visitor.\n */\nconst visitTree = (node: SyntaxNode, callback: (node: SyntaxNode) => boolean): boolean => {\n if (callback(node)) {\n return true;\n }\n\n for (let child = node.firstChild; child !== null; child = child.nextSibling) {\n if (visitTree(child, callback)) {\n return true;\n }\n }\n\n return false;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\nimport { type Space } from '@dxos/react-client/echo';\nimport { useAsyncState } from '@dxos/react-hooks';\n\nimport { ComputeGraphContext } from '../components';\nimport { type ComputeGraph } from '../graph';\n\n/**\n * Get existing or create new compute graph for the given space.\n */\nexport const useComputeGraph = (space?: Space): ComputeGraph | undefined => {\n const { registry } = useContext(ComputeGraphContext) ?? raise(new Error('Missing ComputeGraphContext'));\n const [graph] = useAsyncState(async () => {\n if (space) {\n const graph = registry.getOrCreateGraph(space);\n await graph.open();\n return graph;\n }\n }, [space, registry]);\n\n return graph;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nexport * from './ComputeGraph';\nexport * from './GridSheet';\nexport * from './SheetContext';\n\n// Lazily load components for content surfaces.\nexport const SheetContainer = React.lazy(() => import('./SheetContainer'));\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback, useMemo, useRef, type FocusEvent, type WheelEvent } from 'react';\n\nimport { useAttention } from '@dxos/react-ui-attention';\nimport {\n type DxGridElement,\n Grid,\n type GridContentProps,\n editorKeys,\n type EditorKeysProps,\n GridCellEditor,\n closestCell,\n} from '@dxos/react-ui-grid';\n\nimport { colLabelCell, dxGridCellIndexToSheetCellAddress, rowLabelCell, useSheetModelDxGridProps } from './util';\nimport { rangeToA1Notation, type CellRange, DEFAULT_COLUMNS, DEFAULT_ROWS } from '../../defs';\nimport { rangeExtension, sheetExtension, type CellRangeNotifier } from '../../extensions';\nimport { useUpdateFocusedCellOnThreadSelection } from '../../hooks';\nimport { useSheetContext } from '../SheetContext';\n\nconst initialCells = {\n grid: {},\n frozenColsStart: [...Array(64)].reduce((acc, _, i) => {\n acc[`0,${i}`] = rowLabelCell(i);\n return acc;\n }, {}),\n frozenRowsStart: [...Array(12)].reduce((acc, _, i) => {\n acc[`${i},0`] = colLabelCell(i);\n return acc;\n }, {}),\n};\n\nconst frozen = {\n frozenColsStart: 1,\n frozenRowsStart: 1,\n};\n\nconst sheetRowDefault = { grid: { size: 32, resizeable: true } };\nconst sheetColDefault = { frozenColsStart: { size: 48 }, grid: { size: 180, resizeable: true } };\n\nexport const GridSheet = () => {\n const { id, model, editing, setEditing, setCursor, setRange } = useSheetContext();\n const dxGrid = useRef<DxGridElement | null>(null);\n const rangeNotifier = useRef<CellRangeNotifier>();\n const { hasAttention } = useAttention(id);\n\n const handleFocus = useCallback(\n (event: FocusEvent) => {\n if (!editing) {\n const cell = closestCell(event.target);\n if (cell && cell.plane === 'grid') {\n setCursor({ col: cell.col, row: cell.row });\n }\n }\n },\n [editing],\n );\n\n // TODO(burdon): Validate formula before closing: hf.validateFormula();\n const handleClose = useCallback<NonNullable<EditorKeysProps['onClose']> | NonNullable<EditorKeysProps['onNav']>>(\n (value, { key, shift }) => {\n if (value !== undefined) {\n model.setValue(dxGridCellIndexToSheetCellAddress(editing!.index), value);\n }\n setEditing(null);\n const axis = ['Enter', 'ArrowUp', 'ArrowDown'].includes(key)\n ? 'row'\n : ['Tab', 'ArrowLeft', 'ArrowRight'].includes(key)\n ? 'col'\n : undefined;\n const delta = key.startsWith('Arrow') ? (['ArrowUp', 'ArrowLeft'].includes(key) ? -1 : 1) : shift ? -1 : 1;\n dxGrid.current?.refocus(axis, delta);\n },\n [model, editing, setEditing],\n );\n\n const handleAxisResize = useCallback<NonNullable<GridContentProps['onAxisResize']>>(\n ({ axis, size, index: numericIndex }) => {\n if (axis === 'row') {\n const rowId = model.sheet.rows[parseInt(numericIndex)];\n model.sheet.rowMeta[rowId] ??= {};\n model.sheet.rowMeta[rowId].size = size;\n } else {\n const columnId = model.sheet.columns[parseInt(numericIndex)];\n model.sheet.columnMeta[columnId] ??= {};\n model.sheet.columnMeta[columnId].size = size;\n }\n },\n [model],\n );\n\n const handleSelect = useCallback<NonNullable<GridContentProps['onSelect']>>(\n ({ minCol, maxCol, minRow, maxRow }) => {\n const range: CellRange = { from: { col: minCol, row: minRow } };\n if (minCol !== maxCol || minRow !== maxRow) {\n range.to = { col: maxCol, row: maxRow };\n }\n if (editing) {\n // Update range selection in formula.\n rangeNotifier.current?.(rangeToA1Notation(range));\n } else {\n // Setting range while editing causes focus to move to null, avoid doing so.\n setRange(range.to ? range : undefined);\n }\n },\n [editing],\n );\n\n const handleWheel = useCallback(\n (event: WheelEvent) => {\n if (!hasAttention) {\n event.stopPropagation();\n }\n },\n [hasAttention],\n );\n\n const { columns, rows } = useSheetModelDxGridProps(dxGrid, model);\n\n const extension = useMemo(\n () => [\n editorKeys({ onClose: handleClose, ...(editing?.initialContent && { onNav: handleClose }) }),\n sheetExtension({ functions: model.graph.getFunctions() }),\n rangeExtension((fn) => (rangeNotifier.current = fn)),\n ],\n [model, handleClose, editing],\n );\n\n const getCellContent = useCallback(\n (index: string) => {\n const cell = dxGridCellIndexToSheetCellAddress(index);\n return model.getCellText(cell);\n },\n [model],\n );\n\n useUpdateFocusedCellOnThreadSelection(model, dxGrid);\n\n return (\n <>\n <GridCellEditor getCellContent={getCellContent} extension={extension} />\n <Grid.Content\n initialCells={initialCells}\n limitColumns={DEFAULT_COLUMNS}\n limitRows={DEFAULT_ROWS}\n columns={columns}\n rows={rows}\n onAxisResize={handleAxisResize}\n onSelect={handleSelect}\n rowDefault={sheetRowDefault}\n columnDefault={sheetColDefault}\n frozen={frozen}\n onFocus={handleFocus}\n onWheelCapture={handleWheel}\n className='[--dx-grid-base:var(--surface-bg)]'\n ref={dxGrid}\n />\n </>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type MutableRefObject, useEffect, useLayoutEffect, useState } from 'react';\n\nimport { createDocAccessor } from '@dxos/react-client/echo';\nimport { parseValue, cellClassesForFieldType } from '@dxos/react-ui-data';\nimport {\n type GridContentProps,\n type DxGridElement,\n type DxGridAxisMeta,\n type DxGridPlane,\n type DxGridPlaneRange,\n type DxGridPlaneCells,\n type DxGridCellValue,\n colToA1Notation,\n rowToA1Notation,\n} from '@dxos/react-ui-grid';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { type CellAddress, inRange, cellClassNameForRange } from '../../defs';\nimport { type SheetModel } from '../../model';\n\nexport const dxGridCellIndexToSheetCellAddress = (index: string): CellAddress => {\n const [colStr, rowStr] = index.split(',');\n return {\n col: parseInt(colStr),\n row: parseInt(rowStr),\n };\n};\n\nconst createDxGridColumns = (model: SheetModel): DxGridAxisMeta => {\n return model.sheet.columns.reduce(\n (acc: DxGridAxisMeta, columnId, numericIndex) => {\n if (model.sheet.columnMeta[columnId] && model.sheet.columnMeta[columnId].size) {\n acc.grid[numericIndex] = { size: model.sheet.columnMeta[columnId].size, resizeable: true };\n }\n return acc;\n },\n { grid: {} },\n );\n};\n\nconst createDxGridRows = (model: SheetModel): DxGridAxisMeta => {\n return model.sheet.rows.reduce(\n (acc: DxGridAxisMeta, rowId, numericIndex) => {\n if (model.sheet.rowMeta[rowId] && model.sheet.rowMeta[rowId].size) {\n acc.grid[numericIndex] = { size: model.sheet.rowMeta[rowId].size, resizeable: true };\n }\n return acc;\n },\n { grid: {} },\n );\n};\n\nconst projectCellProps = (model: SheetModel, col: number, row: number): DxGridCellValue => {\n const address = { col, row };\n const rawValue = model.getValue(address);\n if (rawValue === undefined || rawValue === null) {\n return { value: '' };\n }\n const ranges = model.sheet.ranges?.filter(({ range }) => inRange(range, address));\n const type = model.getValueType(address);\n const classNames = ranges?.map(cellClassNameForRange).reverse();\n\n return { value: parseValue(type, rawValue), className: mx(cellClassesForFieldType(type), classNames) };\n};\n\nconst gridCellGetter = (model: SheetModel) => {\n // TODO(thure): Actually use the cache.\n const cachedGridCells: DxGridPlaneCells = {};\n return (nextBounds: DxGridPlaneRange): DxGridPlaneCells => {\n [...Array(nextBounds.end.col - nextBounds.start.col)].forEach((_, c0) => {\n return [...Array(nextBounds.end.row - nextBounds.start.row)].forEach((_, r0) => {\n const col = nextBounds.start.col + c0;\n const row = nextBounds.start.row + r0;\n const cell = projectCellProps(model, col, row);\n if (cell.value) {\n cachedGridCells;\n cachedGridCells[`${col},${row}`] = cell;\n }\n });\n });\n return cachedGridCells;\n };\n};\n\nexport const rowLabelCell = (row: number) => ({\n value: rowToA1Notation(row),\n className: 'text-end !pie-1',\n resizeHandle: 'row',\n});\n\nexport const colLabelCell = (col: number) => ({ value: colToA1Notation(col), resizeHandle: 'col' });\n\nconst cellGetter = (model: SheetModel) => {\n const getGridCells = gridCellGetter(model);\n return (nextBounds: DxGridPlaneRange, plane: DxGridPlane): DxGridPlaneCells => {\n switch (plane) {\n case 'grid':\n return getGridCells(nextBounds);\n case 'frozenColsStart':\n return [...Array(nextBounds.end.row - nextBounds.start.row)].reduce((acc, _, r0) => {\n const r = nextBounds.start.row + r0;\n acc[`0,${r}`] = rowLabelCell(r);\n return acc;\n }, {});\n case 'frozenRowsStart':\n return [...Array(nextBounds.end.col - nextBounds.start.col)].reduce((acc, _, c0) => {\n const c = nextBounds.start.col + c0;\n acc[`${c},0`] = colLabelCell(c);\n return acc;\n }, {});\n default:\n return {};\n }\n };\n};\n\nexport const useSheetModelDxGridProps = (\n dxGridRef: MutableRefObject<DxGridElement | null>,\n model: SheetModel,\n): Pick<GridContentProps, 'columns' | 'rows'> => {\n const [columns, setColumns] = useState<DxGridAxisMeta>(createDxGridColumns(model));\n const [rows, setRows] = useState<DxGridAxisMeta>(createDxGridColumns(model));\n\n useLayoutEffect(() => {\n const cellsAccessor = createDocAccessor(model.sheet, ['cells']);\n if (dxGridRef.current) {\n dxGridRef.current.getCells = cellGetter(model);\n }\n const handleCellsUpdate = () => {\n dxGridRef.current?.requestUpdate('initialCells');\n };\n cellsAccessor.handle.addListener('change', handleCellsUpdate);\n return () => cellsAccessor.handle.removeListener('change', handleCellsUpdate);\n }, [model]);\n\n useEffect(() => {\n const columnMetaAccessor = createDocAccessor(model.sheet, ['columnMeta']);\n const rowMetaAccessor = createDocAccessor(model.sheet, ['rowMeta']);\n const handleColumnMetaUpdate = () => {\n setColumns(createDxGridColumns(model));\n };\n const handleRowMetaUpdate = () => {\n setRows(createDxGridRows(model));\n };\n columnMetaAccessor.handle.addListener('change', handleColumnMetaUpdate);\n rowMetaAccessor.handle.addListener('change', handleRowMetaUpdate);\n return () => {\n columnMetaAccessor.handle.removeListener('change', handleColumnMetaUpdate);\n rowMetaAccessor.handle.removeListener('change', handleRowMetaUpdate);\n };\n }, [model]);\n\n return { columns, rows };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { type ComputeGraph } from '../graph';\nimport { SheetModel } from '../model';\nimport { type SheetType } from '../types';\n\nexport type UseSheetModelOptions = {\n readonly?: boolean;\n};\n\nexport const useSheetModel = (\n graph?: ComputeGraph,\n sheet?: SheetType,\n { readonly }: UseSheetModelOptions = {},\n): SheetModel | undefined => {\n const [model, setModel] = useState<SheetModel>();\n useEffect(() => {\n if (!graph || !sheet) {\n return;\n }\n\n let model: SheetModel | undefined;\n const t = setTimeout(async () => {\n model = new SheetModel(graph, sheet, { readonly });\n await model.open();\n setModel(model);\n });\n\n return () => {\n clearTimeout(t);\n void model?.close();\n };\n }, [graph, sheet, readonly]);\n\n return model;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { create } from '@dxos/echo-schema';\n\nexport type Decoration = {\n type: string;\n /**\n * A wrapping render function to encapsulate cell content. This function is applied between\n * the cell's border and its padding/layout/content, allowing for custom rendering or\n * additional elements to be inserted around the cell's main content.\n */\n decorate?: (props: { children: React.ReactNode }) => React.ReactNode;\n /**\n * An array of CSS class names to be applied to the content of the SheetCell.\n * These classes can be used to style the cell's content independently of its structure.\n */\n classNames?: string[];\n cellIndex: string;\n};\n\nexport const createDecorations = () => {\n // Reactive object to hold decorations\n // TODO(Zan): Use CELL ID's to key the decoration map.\n // TODO(Zan): Consider maintaining an index of decorations by type.\n const { decorations } = create<{ decorations: Record<string, Decoration[]> }>({ decorations: {} });\n\n const addDecoration = (cellIndex: string, decorator: Decoration) => {\n decorations[cellIndex] = [...(decorations[cellIndex] || []), decorator];\n };\n\n const removeDecoration = (cellIndex: string, type?: string) => {\n if (type) {\n decorations[cellIndex] = (decorations[cellIndex] || []).filter((d) => d.type !== type);\n } else {\n delete decorations[cellIndex];\n }\n };\n\n // TODO(Zan): I should check if returning the a value from a map in a deep signal is a reactive slice.\n const getDecorationsForCell = (cellIndex: string): Decoration[] | undefined => {\n return decorations[cellIndex];\n };\n\n const getAllDecorations = (): Decoration[] => {\n const result: Decoration[] = [];\n for (const decoratorArray of Object.values(decorations)) {\n for (const decorator of decoratorArray) {\n result.push(decorator);\n }\n }\n return result;\n };\n\n return {\n addDecoration,\n removeDecoration,\n getDecorationsForCell,\n getAllDecorations,\n } as const;\n};\n\nexport type Decorations = ReturnType<typeof createDecorations>;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type SimpleCellRange } from 'hyperformula/typings/AbsoluteCellRange';\nimport { type SimpleCellAddress } from 'hyperformula/typings/Cell';\nimport { type SimpleDate, type SimpleDateTime } from 'hyperformula/typings/DateTimeHelper';\n\nimport { Event } from '@dxos/async';\nimport { Resource } from '@dxos/context';\nimport { getTypename } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { PublicKey } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { FieldValueType } from '@dxos/schema';\n\nimport { DetailedCellError, ExportedCellChange } from '#hyperformula';\nimport {\n addressFromA1Notation,\n addressToA1Notation,\n type CellAddress,\n type CellRange,\n MAX_COLUMNS,\n MAX_ROWS,\n} from '../defs';\nimport { addressFromIndex, addressToIndex, initialize, insertIndices, ReadonlyException } from '../defs';\nimport { type ComputeNode, type ComputeGraph, createSheetName, type ComputeNodeEvent } from '../graph';\nimport { type CellScalarValue, type CellValue, type SheetType } from '../types';\n\n// Map sheet types to system types.\nconst typeMap: Record<string, FieldValueType> = {\n BOOLEAN: FieldValueType.Boolean,\n NUMBER_RAW: FieldValueType.Number,\n NUMBER_PERCENT: FieldValueType.Percent,\n NUMBER_CURRENCY: FieldValueType.Currency,\n NUMBER_DATETIME: FieldValueType.DateTime,\n NUMBER_DATE: FieldValueType.Date,\n NUMBER_TIME: FieldValueType.Time,\n};\n\nconst getTopLeft = (range: CellRange): CellAddress => {\n const to = range.to ?? range.from;\n return { row: Math.min(range.from.row, to.row), col: Math.min(range.from.col, to.col) };\n};\n\nconst toSimpleCellAddress = (sheet: number, cell: CellAddress): SimpleCellAddress => ({\n sheet,\n row: cell.row,\n col: cell.col,\n});\n\nconst toModelRange = (sheet: number, range: CellRange): SimpleCellRange => ({\n start: toSimpleCellAddress(sheet, range.from),\n end: toSimpleCellAddress(sheet, range.to ?? range.from),\n});\n\nexport type SheetModelOptions = {\n readonly?: boolean;\n};\n\n/**\n * Spreadsheet data model.\n *\n * [ComputeGraphContext] > [SheetContext]:[SheetModel] > [Sheet.Root]\n */\n// TODO(burdon): Factor out commonality with ComputeNode. Factor out HF.\nexport class SheetModel extends Resource {\n public readonly id = `model-${PublicKey.random().truncate()}`;\n\n // Wraps compute node.\n public readonly update = new Event<ComputeNodeEvent>();\n\n private _node?: ComputeNode;\n\n constructor(\n private readonly _graph: ComputeGraph,\n private readonly _sheet: SheetType,\n private readonly _options: SheetModelOptions = {},\n ) {\n super();\n }\n\n get graph() {\n return this._graph;\n }\n\n get sheet() {\n return this._sheet;\n }\n\n get readonly() {\n return this._options.readonly;\n }\n\n get bounds() {\n return {\n rows: this._sheet.rows.length,\n columns: this._sheet.columns.length,\n };\n }\n\n /**\n * Initialize sheet and engine.\n */\n protected override async _open() {\n log('initialize', { id: this.id });\n initialize(this._sheet);\n\n // TODO(burdon): SheetModel should extend ComputeNode and be constructed via the graph.\n this._node = this._graph.getOrCreateNode(createSheetName({ type: getTypename(this._sheet)!, id: this._sheet.id }));\n await this._node.open();\n\n // Listen for model updates (e.g., async calculations).\n const unsubscribe = this._node.update.on((event) => this.update.emit(event));\n this._ctx.onDispose(unsubscribe);\n\n this.reset();\n }\n\n /**\n * Update engine.\n * NOTE: This resets the undo history.\n * @deprecated\n */\n reset() {\n invariant(this._node);\n this._node.graph.hf.clearSheet(this._node.sheetId);\n Object.entries(this._sheet.cells).forEach(([key, { value }]) => {\n invariant(this._node);\n const { col, row } = addressFromIndex(this._sheet, key);\n if (typeof value === 'string' && value.charAt(0) === '=') {\n value = this._graph.mapFormulaToNative(\n this._graph.mapFunctionBindingFromId(this.mapFormulaIndicesToRefs(value)),\n );\n }\n\n this._node.graph.hf.setCellContents({ sheet: this._node.sheetId, row, col }, value);\n });\n }\n\n /**\n * Recalculate formulas.\n * NOTE: This resets the undo history.\n * https://hyperformula.handsontable.com/guide/volatile-functions.html#volatile-actions\n * @deprecated\n */\n // TODO(burdon): Remove.\n recalculate() {\n this._node?.graph.hf.rebuildAndRecalculate();\n }\n\n insertRows(i: number, n = 1) {\n insertIndices(this._sheet.rows, i, n, MAX_ROWS);\n this.reset();\n }\n\n insertColumns(i: number, n = 1) {\n insertIndices(this._sheet.columns, i, n, MAX_COLUMNS);\n this.reset();\n }\n\n //\n // Undoable actions.\n // TODO(burdon): Group undoable methods; consistently update hf/sheet.\n //\n\n /**\n * Clear range of values.\n */\n clear(range: CellRange) {\n invariant(this._node);\n const topLeft = getTopLeft(range);\n const values = this._iterRange(range, () => null);\n this._node.graph.hf.setCellContents(toSimpleCellAddress(this._node.sheetId, topLeft), values);\n this._iterRange(range, (cell) => {\n const idx = addressToIndex(this._sheet, cell);\n delete this._sheet.cells[idx];\n });\n }\n\n cut(range: CellRange) {\n invariant(this._node);\n this._node.graph.hf.cut(toModelRange(this._node.sheetId, range));\n this._iterRange(range, (cell) => {\n const idx = addressToIndex(this._sheet, cell);\n delete this._sheet.cells[idx];\n });\n }\n\n copy(range: CellRange) {\n invariant(this._node);\n this._node.graph.hf.copy(toModelRange(this._node.sheetId, range));\n }\n\n paste(cell: CellAddress) {\n invariant(this._node);\n if (!this._node.graph.hf.isClipboardEmpty()) {\n const changes = this._node.graph.hf.paste(toSimpleCellAddress(this._node.sheetId, cell));\n for (const change of changes) {\n if (change instanceof ExportedCellChange) {\n const { address, newValue } = change;\n const idx = addressToIndex(this._sheet, { row: address.row, col: address.col });\n this._sheet.cells[idx] = { value: newValue };\n }\n }\n }\n }\n\n // TODO(burdon): Display undo/redo state.\n undo() {\n invariant(this._node);\n if (this._node.graph.hf.isThereSomethingToUndo()) {\n this._node.graph.hf.undo();\n // this.update.emit();\n }\n }\n\n redo() {\n invariant(this._node);\n if (this._node.graph.hf.isThereSomethingToRedo()) {\n this._node.graph.hf.redo();\n // this.update.emit();\n }\n }\n\n /**\n * Get value from sheet.\n */\n getCellValue(cell: CellAddress): CellScalarValue {\n const idx = addressToIndex(this._sheet, cell);\n return this._sheet.cells[idx]?.value ?? null;\n }\n\n /**\n * Get value as a string for editing.\n */\n getCellText(cell: CellAddress): string | undefined {\n const value = this.getCellValue(cell);\n if (value == null) {\n return undefined;\n }\n\n if (typeof value === 'string' && value.charAt(0) === '=') {\n return this._graph.mapFunctionBindingFromId(this.mapFormulaIndicesToRefs(value));\n } else {\n return String(value);\n }\n }\n\n /**\n * Get array of raw values from sheet.\n */\n getCellValues(range: CellRange): CellScalarValue[][] {\n return this._iterRange(range, (cell) => this.getCellValue(cell));\n }\n\n /**\n * Gets the regular or computed value from the engine.\n */\n getValue(cell: CellAddress): CellScalarValue {\n // Applies rounding and post-processing.\n invariant(this._node);\n const value = this._node.graph.hf.getCellValue(toSimpleCellAddress(this._node.sheetId, cell));\n if (value instanceof DetailedCellError) {\n return value.toString();\n }\n\n return value;\n }\n\n /**\n * Get value type.\n */\n getValueType(cell: CellAddress): FieldValueType {\n invariant(this._node);\n const addr = toSimpleCellAddress(this._node.sheetId, cell);\n const type = this._node.graph.hf.getCellValueDetailedType(addr);\n return typeMap[type];\n }\n\n /**\n * Sets the value, updating the sheet and engine.\n */\n setValue(cell: CellAddress, value: CellScalarValue) {\n invariant(this._node);\n if (this._options.readonly) {\n throw new ReadonlyException();\n }\n\n // Reallocate if > current bounds.\n let refresh = false;\n if (cell.row >= this._sheet.rows.length) {\n insertIndices(this._sheet.rows, cell.row, 1, MAX_ROWS);\n refresh = true;\n }\n if (cell.col >= this._sheet.columns.length) {\n insertIndices(this._sheet.columns, cell.col, 1, MAX_COLUMNS);\n refresh = true;\n }\n\n if (refresh) {\n // TODO(burdon): Remove.\n this.reset();\n }\n\n // Insert into engine.\n this._node.graph.hf.setCellContents({ sheet: this._node.sheetId, row: cell.row, col: cell.col }, [\n [typeof value === 'string' && value.charAt(0) === '=' ? this._graph.mapFormulaToNative(value) : value],\n ]);\n\n // Insert into sheet.\n const idx = addressToIndex(this._sheet, cell);\n if (value === undefined || value === null) {\n delete this._sheet.cells[idx];\n } else {\n if (typeof value === 'string' && value.charAt(0) === '=') {\n value = this._graph.mapFunctionBindingToId(this.mapFormulaRefsToIndices(value));\n }\n\n this._sheet.cells[idx] = { value };\n }\n }\n\n /**\n * Sets values from a simple map.\n */\n setValues(values: Record<string, CellValue>) {\n Object.entries(values).forEach(([key, { value }]) => {\n this.setValue(addressFromA1Notation(key), value);\n });\n }\n\n /**\n * Iterate range.\n */\n private _iterRange(range: CellRange, cb: (cell: CellAddress) => CellScalarValue | void): CellScalarValue[][] {\n const to = range.to ?? range.from;\n const rowRange = [Math.min(range.from.row, to.row), Math.max(range.from.row, to.row)];\n const columnRange = [Math.min(range.from.col, to.col), Math.max(range.from.col, to.col)];\n const rows: CellScalarValue[][] = [];\n for (let row = rowRange[0]; row <= rowRange[1]; row++) {\n const rowCells: CellScalarValue[] = [];\n for (let column = columnRange[0]; column <= columnRange[1]; column++) {\n const value = cb({ row, col: column });\n if (value !== undefined) {\n rowCells.push(value);\n }\n }\n\n rows.push(rowCells);\n }\n\n return rows;\n }\n\n // TODO(burdon): Delete index.\n private _deleteIndices(indices: string[], i: number, n: number) {\n throw new Error('Not implemented');\n }\n\n // TODO(burdon): Move. Cannot use fractional without changing. Switch back to using unique IDs?\n private _moveIndices(indices: string[], i: number, j: number, n: number) {\n throw new Error('Not implemented');\n }\n\n //\n // Indices.\n //\n\n /**\n * Map from A1 notation to indices.\n */\n mapFormulaRefsToIndices(formula: string): string {\n invariant(formula.charAt(0) === '=');\n return formula.replace(/([a-zA-Z]+)([0-9]+)/g, (match) => {\n return addressToIndex(this._sheet, addressFromA1Notation(match));\n });\n }\n\n /**\n * Map from indices to A1 notation.\n */\n mapFormulaIndicesToRefs(formula: string): string {\n invariant(formula.charAt(0) === '=');\n return formula.replace(/([a-zA-Z0-9]+)@([a-zA-Z0-9]+)/g, (idx) => {\n return addressToA1Notation(addressFromIndex(this._sheet, idx));\n });\n }\n\n //\n // Values\n //\n\n /**\n * https://hyperformula.handsontable.com/guide/date-and-time-handling.html#example\n * https://hyperformula.handsontable.com/api/interfaces/configparams.html#nulldate\n * NOTE: TODAY() is number of FULL days since nullDate. It will typically be -1 days from NOW().\n */\n toLocalDate(num: number): Date {\n const { year, month, day, hours, minutes, seconds } = this.toDateTime(num);\n return new Date(year, month - 1, day, hours, minutes, seconds);\n }\n\n toDateTime(num: number): SimpleDateTime {\n invariant(this._node);\n return this._node.graph.hf.numberToDateTime(num) as SimpleDateTime;\n }\n\n toDate(num: number): SimpleDate {\n invariant(this._node);\n return this._node.graph.hf.numberToDate(num) as SimpleDate;\n }\n\n toTime(num: number): SimpleDate {\n invariant(this._node);\n return this._node.graph.hf.numberToTime(num) as SimpleDate;\n }\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { effect } from '@preact/signals-core';\nimport { type MutableRefObject, useCallback, useEffect, useMemo } from 'react';\n\nimport { type IntentResolver, LayoutAction, useIntentDispatcher, useIntentResolver } from '@dxos/app-framework';\nimport { debounce } from '@dxos/async';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\nimport { type DxGridElement, type DxGridPosition } from '@dxos/react-ui-grid';\n\nimport { addressFromIndex, addressToIndex, type CellAddress, closest } from '../defs';\nimport { SHEET_PLUGIN } from '../meta';\nimport { type SheetModel, type Decoration, type Decorations } from '../model';\n\nexport const useUpdateFocusedCellOnThreadSelection = (\n model: SheetModel,\n grid: MutableRefObject<DxGridElement | null>,\n) => {\n const handleScrollIntoView: IntentResolver = useCallback(\n ({ action, data }) => {\n switch (action) {\n case LayoutAction.SCROLL_INTO_VIEW: {\n if (!data?.id || data?.cursor === undefined || data?.id !== fullyQualifiedId(model.sheet)) {\n return;\n }\n\n // TODO(Zan): Everywhere we refer to the cursor in a thread context should change to `anchor`.\n const cellAddress = addressFromIndex(model.sheet, data.cursor);\n grid.current?.setFocus({ ...cellAddress, plane: 'grid' }, true);\n }\n }\n },\n [model.sheet],\n );\n\n useIntentResolver(SHEET_PLUGIN, handleScrollIntoView);\n};\n\nexport const useSelectThreadOnCellFocus = (model: SheetModel, cursor?: CellAddress) => {\n const dispatch = useIntentDispatcher();\n\n const activeThreads = useMemo(\n () =>\n model.sheet.threads?.filter(\n (thread): thread is NonNullable<typeof thread> => !!thread && thread.status === 'active',\n ) ?? [],\n [\n // TODO(thure): Surely we can find a better dependency for this…\n JSON.stringify(model.sheet.threads),\n ],\n );\n\n const activeThreadAddresses = useMemo(\n () =>\n activeThreads\n .map((thread) => thread.anchor)\n .filter((anchor): anchor is NonNullable<typeof anchor> => anchor !== undefined)\n .map((anchor) => addressFromIndex(model.sheet, anchor)),\n [activeThreads, model.sheet],\n );\n\n const selectClosestThread = useCallback(\n (cellAddress: CellAddress) => {\n if (!cellAddress || !activeThreads) {\n return;\n }\n\n const closestThreadAnchor = closest(cellAddress, activeThreadAddresses);\n if (closestThreadAnchor) {\n const closestThread = activeThreads.find(\n (thread) => thread && thread.anchor === addressToIndex(model.sheet, closestThreadAnchor),\n );\n\n if (closestThread) {\n void dispatch([\n { action: 'dxos.org/plugin/thread/action/select', data: { current: fullyQualifiedId(closestThread) } },\n ]);\n }\n }\n },\n [dispatch, activeThreads, activeThreadAddresses, model.sheet],\n );\n\n const debounced = useMemo(() => {\n return debounce((cellCoords: DxGridPosition) => requestAnimationFrame(() => selectClosestThread(cellCoords)), 50);\n }, [selectClosestThread]);\n\n useEffect(() => {\n if (!cursor) {\n return;\n }\n debounced(cursor);\n }, [cursor, selectClosestThread]);\n};\n\nconst createThreadDecoration = (cellIndex: string, threadId: string, sheetId: string): Decoration => {\n return {\n type: 'comment',\n classNames: ['bg-greenFill'],\n cellIndex,\n };\n};\n\nexport const useThreadDecorations = (model: SheetModel, decorations: Decorations) => {\n const sheet = useMemo(() => model.sheet, [model.sheet]);\n const sheetId = useMemo(() => fullyQualifiedId(sheet), [sheet]);\n\n useEffect(() => {\n const unsubscribe = effect(() => {\n const activeThreadAnchors = new Set<string>();\n if (!sheet.threads) {\n return;\n }\n\n // Process active threads\n for (const thread of sheet.threads) {\n if (!thread || thread.anchor === undefined || thread.status === 'resolved') {\n continue;\n }\n\n activeThreadAnchors.add(thread.anchor);\n const index = thread.anchor;\n\n // Add decoration only if it doesn't already exist\n const existingDecorations = decorations.getDecorationsForCell(index);\n if (!existingDecorations || !existingDecorations.some((d) => d.type === 'comment')) {\n decorations.addDecoration(index, createThreadDecoration(index, thread.id, sheetId));\n }\n }\n\n // Remove decorations for resolved or deleted threads\n for (const decoration of decorations.getAllDecorations()) {\n if (decoration.type !== 'comment') {\n continue;\n }\n\n if (!activeThreadAnchors.has(decoration.cellIndex)) {\n decorations.removeDecoration(decoration.cellIndex, 'comment');\n }\n }\n });\n\n return () => unsubscribe();\n });\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type PropsWithChildren, createContext, useContext, useMemo, useState } from 'react';\n\nimport { invariant } from '@dxos/invariant';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\nimport { Grid, useGridContext, type GridScopedProps, type GridEditing } from '@dxos/react-ui-grid';\n\nimport { type CellAddress, type CellRange } from '../../defs';\nimport { type ComputeGraph } from '../../graph';\nimport { useSheetModel, useSelectThreadOnCellFocus, useThreadDecorations } from '../../hooks';\nimport { type SheetModel, createDecorations } from '../../model';\nimport { type SheetType } from '../../types';\n\nexport type SheetContextValue = {\n id: string;\n\n model: SheetModel;\n\n // Cursor state.\n // TODO(burdon): Cursor and range should use indices.\n cursor?: CellAddress;\n setCursor: (cell: CellAddress | undefined) => void;\n range?: CellRange;\n setRange: (range: CellRange | undefined) => void;\n\n // Editing state (undefined if not editing).\n editing: GridEditing;\n setEditing: (editing: GridEditing) => void;\n\n // Events.\n // TODO(burdon): Generalize.\n onInfo?: () => void;\n\n // Decorations.\n decorations: ReturnType<typeof createDecorations>;\n};\n\nconst SheetContext = createContext<SheetContextValue | null>(null);\n\nexport const useSheetContext = (): SheetContextValue => {\n const context = useContext(SheetContext);\n invariant(context);\n return context;\n};\n\nconst SheetProviderImpl = ({\n model,\n onInfo,\n children,\n __gridScope,\n}: GridScopedProps<PropsWithChildren<Pick<SheetContextValue, 'onInfo' | 'model'>>>) => {\n const { id, editing, setEditing } = useGridContext('SheetProvider', __gridScope);\n\n // TODO(Zan): Impl. set range and set cursor that scrolls to that cell or range if it is not visible.\n const decorations = useMemo(() => createDecorations(), []);\n\n // TODO(thure): Reconnect these.\n const [cursor, setCursor] = useState<CellAddress>();\n const [range, setRange] = useState<CellRange>();\n\n useSelectThreadOnCellFocus(model, cursor);\n useThreadDecorations(model, decorations);\n\n return (\n <SheetContext.Provider\n value={{\n id,\n model,\n editing,\n setEditing,\n cursor,\n setCursor,\n range,\n setRange,\n // TODO(burdon): Change to event.\n onInfo,\n decorations,\n }}\n >\n {children}\n </SheetContext.Provider>\n );\n};\n\nexport type SheetProviderProps = {\n graph: ComputeGraph;\n sheet: SheetType;\n readonly?: boolean;\n} & Pick<SheetContextValue, 'onInfo'>;\n\nexport const SheetProvider = ({ children, graph, sheet, readonly, onInfo }: PropsWithChildren<SheetProviderProps>) => {\n const model = useSheetModel(graph, sheet, { readonly });\n\n return !model ? null : (\n <Grid.Root id={fullyQualifiedId(sheet)}>\n <SheetProviderImpl model={model} onInfo={onInfo}>\n {children}\n </SheetProviderImpl>\n </Grid.Root>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAIA,OAAOA,SAASC,qBAA6C;AAWtD,IAAMC,sBAAsBC,8BAAmDC,MAAAA;AAE/E,IAAMC,8BAA8B,CAAC,EAAEC,UAAUC,SAAQ,MAA8C;AAC5G,SAAO,sBAAA,cAACL,oBAAoBM,UAAQ;IAACC,OAAO;MAAEH;IAAS;KAAIC,QAAAA;AAC7D;;;ACfA,SAASG,mBAAmB;AAC5B,SAASC,cAAc;;;ACDvB,SAASC,iBAAiB;;AAEnB,IAAMC,eAAe;AACrB,IAAMC,kBAAkB;AAExB,IAAMC,WAAW;AACjB,IAAMC,cAAc,KAAK;AAUzB,IAAMC,YAAY,CAACC,GAA4BC,MAAAA;AACpD,SAAOD,GAAGE,QAAQD,GAAGC,OAAOF,GAAGG,QAAQF,GAAGE;AAC5C;AAEO,IAAMC,eAAe,CAACF,QAAAA;AAC3BR,YAAUQ,MAAMJ,aAAa,mBAAmBI,GAAAA,IAAK;;;;;;;;;AACrD,UACGA,OAAO,KAAKG,OAAOC,aAAa,IAAIC,WAAW,CAAA,IAAKC,KAAKC,MAAMP,MAAM,EAAA,IAAM,CAAA,IAAK,MACjFG,OAAOC,aAAa,IAAIC,WAAW,CAA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TsE,wCAAsCtE,OAAOM,MAAAA;AAE7C,SACE,gBAAAiE,OAAA,cAAAA,OAAA,UAAA,MACE,gBAAAA,OAAA,cAACC,gBAAAA;IAAeJ;IAAgCZ;MAChD,gBAAAe,OAAA,cAACE,MAAKC,SAAO;IACX5F;IACA6F,cAAcC;IACdC,WAAWC;IACXpC;IACAJ;IACAyC,cAAc7C;IACd8C,UAAUpC;IACVqC,YAAYvF;IACZwF,eAAerF;IACfJ;IACA0F,SAASxE;IACTyE,gBAAgB/B;IAChBgC,WAAU;IACVC,KAAKhF;;AAIb;;;ADvJO,IAAMiF,iBAAiBC,OAAMC,KAAK,MAAM,OAAO,+BAAA,CAAA;;;ADK/C,IAAMC,kBAAkB,CAACC,UAAAA;AAC9B,QAAM,EAAEC,SAAQ,IAAKC,YAAWC,mBAAAA,KAAwBC,MAAM,IAAIC,MAAM,6BAAA,CAAA;AACxE,QAAM,CAACC,KAAAA,IAASC,cAAc,YAAA;AAC5B,QAAIP,OAAO;AACT,YAAMM,SAAQL,SAASO,iBAAiBR,KAAAA;AACxC,YAAMM,OAAMG,KAAI;AAChB,aAAOH;IACT;EACF,GAAG;IAACN;IAAOC;GAAS;AAEpB,SAAOK;AACT;",
|
|
6
|
+
"names": ["React", "createContext", "ComputeGraphContext", "createContext", "undefined", "ComputeGraphContextProvider", "registry", "children", "Provider", "value", "randomBytes", "create", "invariant", "DEFAULT_ROWS", "DEFAULT_COLUMNS", "MAX_ROWS", "MAX_COLUMNS", "posEquals", "a", "b", "col", "row", "columnLetter", "String", "fromCharCode", "charCodeAt", "Math", "floor", "addressToA1Notation", "addressFromA1Notation", "ref", "match", "parseInt", "split", "reduce", "acc", "c", "rangeToA1Notation", "range", "from", "to", "filter", "Boolean", "join", "inRange", "range", "cell", "from", "to", "posEquals", "col", "c1", "row", "r1", "c2", "r2", "cMin", "Math", "min", "cMax", "max", "rMin", "rMax", "ApiError", "Error", "ReadonlyException", "RangeException", "constructor", "n", "createIndex", "length", "characters", "charactersLength", "randomBuffer", "randomBytes", "Array", "from", "byte", "join", "createIndices", "map", "insertIndices", "indices", "i", "max", "idx", "splice", "initialize", "sheet", "rows", "DEFAULT_ROWS", "columns", "DEFAULT_COLUMNS", "MAX_ROWS", "MAX_COLUMNS", "createSheet", "name", "cells", "size", "create", "SheetType", "rowMeta", "columnMeta", "ranges", "Object", "entries", "forEach", "key", "value", "addressToIndex", "addressFromA1Notation", "cell", "col", "row", "addressFromIndex", "column", "split", "indexOf", "closest", "cursor", "cells", "closestCell", "closestDistance", "Number", "MAX_SAFE_INTEGER", "cell", "distance", "Math", "abs", "row", "col", "compareIndexPositions", "sheet", "indexA", "indexB", "rowA", "columnA", "addressFromIndex", "rowB", "columnB", "cellClassNameForRange", "key", "value", "undefined", "syntaxTree", "RangeSetBuilder", "StateEffect", "StateField", "Decoration", "EditorView", "ViewPlugin", "WidgetType", "debounce", "invariant", "documentId", "singleValueFacet", "updateAllDecorations", "StateEffect", "define", "computeGraphFacet", "singleValueFacet", "acceptCompletion", "autocompletion", "completionStatus", "startCompletion", "HighlightStyle", "syntaxHighlighting", "ViewPlugin", "keymap", "tags", "spreadsheet", "singleValueFacet", "mx", "highlightStyles", "HighlightStyle", "define", "tag", "tags", "name", "class", "tagName", "number", "bool", "string", "invalid", "languageFacet", "singleValueFacet", "sheetExtension", "functions", "extension", "language", "spreadsheet", "idiom", "decimalSeparator", "createCompletion", "section", "description", "syntax", "find", "value", "label", "info", "root", "document", "createElement", "className", "title", "innerText", "appendChild", "detail", "apply", "view", "completion", "from", "to", "insertParens", "state", "doc", "toString", "length", "dispatch", "update", "changes", "insert", "selection", "anchor", "of", "data", "autocomplete", "context", "match", "matchBefore", "text", "toUpperCase", "explicit", "options", "filter", "startsWith", "map", "syntaxHighlighting", "autocompletion", "aboveCursor", "defaultKeymap", "activateOnTyping", "closeOnBlur", "icons", "tooltipClass", "mx", "keymap", "key", "run", "completionStatus", "acceptCompletion", "startCompletion", "rangeExtension", "onInit", "activeRange", "provider", "range", "focus", "ViewPlugin", "fromClass", "constructor", "_view", "ranges", "undefined", "facet", "topNode", "parser", "parse", "visitTree", "type", "node", "callback", "child", "firstChild", "nextSibling", "useContext", "raise", "useAsyncState", "React", "React", "useCallback", "useMemo", "useRef", "useAttention", "Grid", "editorKeys", "GridCellEditor", "closestCell", "useEffect", "useLayoutEffect", "useState", "createDocAccessor", "parseValue", "cellClassesForFieldType", "colToA1Notation", "rowToA1Notation", "mx", "dxGridCellIndexToSheetCellAddress", "index", "colStr", "rowStr", "split", "col", "parseInt", "row", "createDxGridColumns", "model", "sheet", "columns", "reduce", "acc", "columnId", "numericIndex", "columnMeta", "size", "grid", "resizeable", "createDxGridRows", "rows", "rowId", "rowMeta", "projectCellProps", "address", "rawValue", "getValue", "undefined", "value", "ranges", "filter", "range", "inRange", "type", "getValueType", "classNames", "map", "cellClassNameForRange", "reverse", "parseValue", "className", "mx", "cellClassesForFieldType", "gridCellGetter", "cachedGridCells", "nextBounds", "Array", "end", "start", "forEach", "_", "c0", "r0", "cell", "rowLabelCell", "rowToA1Notation", "resizeHandle", "colLabelCell", "colToA1Notation", "cellGetter", "getGridCells", "plane", "r", "c", "useSheetModelDxGridProps", "dxGridRef", "setColumns", "useState", "setRows", "useLayoutEffect", "cellsAccessor", "createDocAccessor", "current", "getCells", "handleCellsUpdate", "requestUpdate", "handle", "addListener", "removeListener", "useEffect", "columnMetaAccessor", "rowMetaAccessor", "handleColumnMetaUpdate", "handleRowMetaUpdate", "useEffect", "useState", "create", "createDecorations", "decorations", "create", "addDecoration", "cellIndex", "decorator", "removeDecoration", "type", "filter", "d", "getDecorationsForCell", "getAllDecorations", "result", "decoratorArray", "Object", "values", "push", "Event", "Resource", "getTypename", "invariant", "PublicKey", "log", "FieldValueType", "DetailedCellError", "ExportedCellChange", "typeMap", "BOOLEAN", "FieldValueType", "Boolean", "NUMBER_RAW", "Number", "NUMBER_PERCENT", "Percent", "NUMBER_CURRENCY", "Currency", "NUMBER_DATETIME", "DateTime", "NUMBER_DATE", "Date", "NUMBER_TIME", "Time", "getTopLeft", "range", "to", "from", "row", "Math", "min", "col", "toSimpleCellAddress", "sheet", "cell", "toModelRange", "start", "end", "SheetModel", "Resource", "constructor", "_graph", "_sheet", "_options", "id", "PublicKey", "random", "truncate", "update", "Event", "graph", "readonly", "bounds", "rows", "length", "columns", "_open", "log", "initialize", "_node", "getOrCreateNode", "createSheetName", "type", "getTypename", "open", "unsubscribe", "on", "event", "emit", "_ctx", "onDispose", "reset", "invariant", "hf", "clearSheet", "sheetId", "Object", "entries", "cells", "forEach", "key", "value", "addressFromIndex", "charAt", "mapFormulaToNative", "mapFunctionBindingFromId", "mapFormulaIndicesToRefs", "setCellContents", "recalculate", "rebuildAndRecalculate", "insertRows", "i", "n", "insertIndices", "MAX_ROWS", "insertColumns", "MAX_COLUMNS", "clear", "topLeft", "values", "_iterRange", "idx", "addressToIndex", "cut", "copy", "paste", "isClipboardEmpty", "changes", "change", "ExportedCellChange", "address", "newValue", "undo", "isThereSomethingToUndo", "redo", "isThereSomethingToRedo", "getCellValue", "getCellText", "undefined", "String", "getCellValues", "getValue", "DetailedCellError", "toString", "getValueType", "addr", "getCellValueDetailedType", "setValue", "ReadonlyException", "refresh", "mapFunctionBindingToId", "mapFormulaRefsToIndices", "setValues", "addressFromA1Notation", "cb", "rowRange", "max", "columnRange", "rowCells", "column", "push", "_deleteIndices", "indices", "Error", "_moveIndices", "j", "formula", "replace", "match", "addressToA1Notation", "toLocalDate", "num", "year", "month", "day", "hours", "minutes", "seconds", "toDateTime", "numberToDateTime", "toDate", "numberToDate", "toTime", "numberToTime", "useSheetModel", "graph", "sheet", "readonly", "model", "setModel", "useState", "useEffect", "t", "setTimeout", "SheetModel", "open", "clearTimeout", "close", "effect", "useCallback", "useEffect", "useMemo", "LayoutAction", "useIntentDispatcher", "useIntentResolver", "debounce", "fullyQualifiedId", "useUpdateFocusedCellOnThreadSelection", "model", "grid", "handleScrollIntoView", "useCallback", "action", "data", "LayoutAction", "SCROLL_INTO_VIEW", "id", "cursor", "undefined", "fullyQualifiedId", "sheet", "cellAddress", "addressFromIndex", "current", "setFocus", "plane", "useIntentResolver", "SHEET_PLUGIN", "useSelectThreadOnCellFocus", "dispatch", "useIntentDispatcher", "activeThreads", "useMemo", "threads", "filter", "thread", "status", "JSON", "stringify", "activeThreadAddresses", "map", "anchor", "selectClosestThread", "closestThreadAnchor", "closest", "closestThread", "find", "addressToIndex", "debounced", "debounce", "cellCoords", "requestAnimationFrame", "useEffect", "createThreadDecoration", "cellIndex", "threadId", "sheetId", "type", "classNames", "useThreadDecorations", "decorations", "unsubscribe", "effect", "activeThreadAnchors", "Set", "add", "index", "existingDecorations", "getDecorationsForCell", "some", "d", "addDecoration", "decoration", "getAllDecorations", "has", "removeDecoration", "React", "createContext", "useContext", "useMemo", "useState", "invariant", "fullyQualifiedId", "Grid", "useGridContext", "SheetContext", "createContext", "useSheetContext", "context", "useContext", "invariant", "SheetProviderImpl", "model", "onInfo", "children", "__gridScope", "id", "editing", "setEditing", "useGridContext", "decorations", "useMemo", "createDecorations", "cursor", "setCursor", "useState", "range", "setRange", "useSelectThreadOnCellFocus", "useThreadDecorations", "React", "Provider", "value", "SheetProvider", "graph", "sheet", "readonly", "useSheetModel", "Grid", "Root", "fullyQualifiedId", "initialCells", "grid", "frozenColsStart", "Array", "reduce", "acc", "_", "i", "rowLabelCell", "frozenRowsStart", "colLabelCell", "frozen", "sheetRowDefault", "size", "resizeable", "sheetColDefault", "GridSheet", "id", "model", "editing", "setEditing", "setCursor", "setRange", "useSheetContext", "dxGrid", "useRef", "rangeNotifier", "hasAttention", "useAttention", "handleFocus", "useCallback", "event", "cell", "closestCell", "target", "plane", "col", "row", "handleClose", "value", "key", "shift", "undefined", "setValue", "dxGridCellIndexToSheetCellAddress", "index", "axis", "includes", "delta", "startsWith", "current", "refocus", "handleAxisResize", "numericIndex", "rowId", "sheet", "rows", "parseInt", "rowMeta", "columnId", "columns", "columnMeta", "handleSelect", "minCol", "maxCol", "minRow", "maxRow", "range", "from", "to", "rangeToA1Notation", "handleWheel", "stopPropagation", "useSheetModelDxGridProps", "extension", "useMemo", "editorKeys", "onClose", "initialContent", "onNav", "sheetExtension", "functions", "graph", "getFunctions", "rangeExtension", "fn", "getCellContent", "getCellText", "useUpdateFocusedCellOnThreadSelection", "React", "GridCellEditor", "Grid", "Content", "limitColumns", "DEFAULT_COLUMNS", "limitRows", "DEFAULT_ROWS", "onAxisResize", "onSelect", "rowDefault", "columnDefault", "onFocus", "onWheelCapture", "className", "ref", "SheetContainer", "React", "lazy", "useComputeGraph", "space", "registry", "useContext", "ComputeGraphContext", "raise", "Error", "graph", "useAsyncState", "getOrCreateGraph", "open"]
|
|
7
|
+
}
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
computeGraphFacet,
|
|
6
6
|
createSheet,
|
|
7
7
|
useComputeGraph
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HOG37RYS.mjs";
|
|
9
9
|
import {
|
|
10
10
|
SheetAction,
|
|
11
11
|
SheetType
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BWN5DZWZ.mjs";
|
|
13
13
|
import {
|
|
14
14
|
SHEET_PLUGIN,
|
|
15
15
|
meta_default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx":{"bytes":2198,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/ComputeGraph/index.ts":{"bytes":572,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx","kind":"import-statement","original":"./ComputeGraphContextProvider"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/GridSheet/util.ts":{"bytes":18311,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/defs/types.ts":{"bytes":9014,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/meta.ts":{"bytes":1178,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/types.ts":{"bytes":9967,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-sheet/src/defs/util.ts":{"bytes":14952,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-sheet/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-sheet/src/defs/index.ts":{"bytes":579,"imports":[{"path":"packages/plugins/plugin-sheet/src/defs/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-sheet/src/defs/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/compute-node.ts":{"bytes":5989,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/functions/async-function.ts":{"bytes":18956,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/functions/edge-function.ts":{"bytes":13852,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/edge","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/graph/functions/async-function.ts","kind":"import-statement","original":"./async-function"}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/functions/function-defs.ts":{"bytes":204661,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/functions/index.ts":{"bytes":741,"imports":[{"path":"packages/plugins/plugin-sheet/src/graph/functions/async-function.ts","kind":"import-statement","original":"./async-function"},{"path":"packages/plugins/plugin-sheet/src/graph/functions/edge-function.ts","kind":"import-statement","original":"./edge-function"},{"path":"packages/plugins/plugin-sheet/src/graph/functions/function-defs.ts","kind":"import-statement","original":"./function-defs"}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/compute-graph.ts":{"bytes":27682,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/graph/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"packages/plugins/plugin-sheet/src/graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/compute-graph-registry.ts":{"bytes":9443,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/graph/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"packages/plugins/plugin-sheet/src/graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/index.ts":{"bytes":839,"imports":[{"path":"packages/plugins/plugin-sheet/src/graph/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"packages/plugins/plugin-sheet/src/graph/compute-graph-registry.ts","kind":"import-statement","original":"./compute-graph-registry"},{"path":"packages/plugins/plugin-sheet/src/graph/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"packages/plugins/plugin-sheet/src/graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/compute.ts":{"bytes":17995,"imports":[{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor/state","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/graph/index.ts","kind":"import-statement","original":"../graph"}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/editor/extension.ts":{"bytes":26619,"imports":[{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"codemirror-lang-spreadsheet","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor/state","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/editor/index.ts":{"bytes":520,"imports":[{"path":"packages/plugins/plugin-sheet/src/extensions/editor/extension.ts","kind":"import-statement","original":"./extension"}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/index.ts":{"bytes":593,"imports":[{"path":"packages/plugins/plugin-sheet/src/extensions/compute.ts","kind":"import-statement","original":"./compute"},{"path":"packages/plugins/plugin-sheet/src/extensions/editor/index.ts","kind":"import-statement","original":"./editor"}],"format":"esm"},"packages/plugins/plugin-sheet/src/hooks/useComputeGraph.ts":{"bytes":2875,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"packages/plugins/plugin-sheet/src/model/decorations.ts":{"bytes":5951,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/model/formatting-model.ts":{"bytes":13257,"imports":[{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../defs"},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../defs"}],"format":"esm"},"packages/plugins/plugin-sheet/src/model/sheet-model.ts":{"bytes":48085,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../defs"},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../defs"},{"path":"packages/plugins/plugin-sheet/src/graph/index.ts","kind":"import-statement","original":"../graph"}],"format":"esm"},"packages/plugins/plugin-sheet/src/model/index.ts":{"bytes":725,"imports":[{"path":"packages/plugins/plugin-sheet/src/model/decorations.ts","kind":"import-statement","original":"./decorations"},{"path":"packages/plugins/plugin-sheet/src/model/formatting-model.ts","kind":"import-statement","original":"./formatting-model"},{"path":"packages/plugins/plugin-sheet/src/model/sheet-model.ts","kind":"import-statement","original":"./sheet-model"}],"format":"esm"},"packages/plugins/plugin-sheet/src/hooks/useFormattingModel.ts":{"bytes":1313,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/model/index.ts","kind":"import-statement","original":"../model"}],"format":"esm"},"packages/plugins/plugin-sheet/src/hooks/useSheetModel.ts":{"bytes":3097,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/model/index.ts","kind":"import-statement","original":"../model"}],"format":"esm"},"packages/plugins/plugin-sheet/src/hooks/threads.ts":{"bytes":17036,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../defs"},{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-sheet/src/hooks/index.ts":{"bytes":832,"imports":[{"path":"packages/plugins/plugin-sheet/src/hooks/useComputeGraph.ts","kind":"import-statement","original":"./useComputeGraph"},{"path":"packages/plugins/plugin-sheet/src/hooks/useFormattingModel.ts","kind":"import-statement","original":"./useFormattingModel"},{"path":"packages/plugins/plugin-sheet/src/hooks/useSheetModel.ts","kind":"import-statement","original":"./useSheetModel"},{"path":"packages/plugins/plugin-sheet/src/hooks/threads.ts","kind":"import-statement","original":"./threads"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetContext/SheetContext.tsx":{"bytes":9194,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"packages/plugins/plugin-sheet/src/model/index.ts","kind":"import-statement","original":"../../model"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts":{"bytes":537,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/SheetContext.tsx","kind":"import-statement","original":"./SheetContext"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/GridSheet/GridSheet.tsx":{"bytes":19564,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/GridSheet/util.ts","kind":"import-statement","original":"./util"},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../../defs"},{"path":"packages/plugins/plugin-sheet/src/extensions/index.ts","kind":"import-statement","original":"../../extensions"},{"path":"packages/plugins/plugin-sheet/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"../SheetContext"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/GridSheet/index.ts":{"bytes":523,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/GridSheet/GridSheet.tsx","kind":"import-statement","original":"./GridSheet"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx":{"bytes":5266,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../../defs"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"../SheetContext"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/FunctionEditor/index.ts":{"bytes":545,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx","kind":"import-statement","original":"./FunctionEditor"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/Toolbar/Toolbar.tsx":{"bytes":24740,"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../../defs"},{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"../SheetContext"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/Toolbar/index.ts":{"bytes":519,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/Toolbar/Toolbar.tsx","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetContainer/SheetContainer.tsx":{"bytes":6004,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/FunctionEditor/index.ts","kind":"import-statement","original":"../FunctionEditor"},{"path":"packages/plugins/plugin-sheet/src/components/GridSheet/index.ts","kind":"import-statement","original":"../GridSheet"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"../SheetContext"},{"path":"packages/plugins/plugin-sheet/src/components/Toolbar/index.ts","kind":"import-statement","original":"../Toolbar"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts":{"bytes":721,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/SheetContainer/SheetContainer.tsx","kind":"import-statement","original":"./SheetContainer"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/index.ts":{"bytes":1254,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/ComputeGraph/index.ts","kind":"import-statement","original":"./ComputeGraph"},{"path":"packages/plugins/plugin-sheet/src/components/GridSheet/index.ts","kind":"import-statement","original":"./GridSheet"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"./SheetContext"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts","kind":"dynamic-import","original":"./SheetContainer"}],"format":"esm"},"packages/plugins/plugin-sheet/src/translations.ts":{"bytes":2948,"imports":[{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-sheet/src/SheetPlugin.tsx":{"bytes":26166,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"./defs"},{"path":"packages/plugins/plugin-sheet/src/extensions/index.ts","kind":"import-statement","original":"./extensions"},{"path":"packages/plugins/plugin-sheet/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-sheet/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-sheet/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-sheet/src/graph/index.ts","kind":"dynamic-import","original":"./graph"}],"format":"esm"},"packages/plugins/plugin-sheet/src/index.ts":{"bytes":769,"imports":[{"path":"packages/plugins/plugin-sheet/src/SheetPlugin.tsx","kind":"import-statement","original":"./SheetPlugin"},{"path":"packages/plugins/plugin-sheet/src/SheetPlugin.tsx","kind":"import-statement","original":"./SheetPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-sheet/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12835},"packages/plugins/plugin-sheet/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-AQSGDA4X.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GKI67SEF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/graph-M4IQ76QX.mjs","kind":"dynamic-import"}],"exports":["SheetPlugin","default"],"entryPoint":"packages/plugins/plugin-sheet/src/index.ts","inputs":{"packages/plugins/plugin-sheet/src/SheetPlugin.tsx":{"bytesInOutput":7156},"packages/plugins/plugin-sheet/src/translations.ts":{"bytesInOutput":797},"packages/plugins/plugin-sheet/src/index.ts":{"bytesInOutput":31}},"bytes":8617},"packages/plugins/plugin-sheet/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"}],"exports":["SHEET_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-sheet/src/meta.ts","inputs":{},"bytes":159},"packages/plugins/plugin-sheet/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GKI67SEF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"}],"exports":["CellValue","Formatting","RowColumnMeta","SheetAction","SheetType"],"entryPoint":"packages/plugins/plugin-sheet/src/types.ts","inputs":{},"bytes":260},"packages/plugins/plugin-sheet/dist/lib/browser/graph-M4IQ76QX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/browser/graph-M4IQ76QX.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs","kind":"import-statement"}],"exports":["AsyncFunctionPlugin","ComputeGraph","ComputeGraphRegistry","ComputeNode","EDGE_FUNCTION_NAME","EdgeFunctionPlugin","EdgeFunctionPluginTranslations","FunctionContext","createSheetName","defaultFunctionContextOptions","defaultFunctions","defaultOptions","defaultPlugins","parseSheetName"],"entryPoint":"packages/plugins/plugin-sheet/src/graph/index.ts","inputs":{},"bytes":696},"packages/plugins/plugin-sheet/dist/lib/browser/SheetContainer-NDNIS44E.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18811},"packages/plugins/plugin-sheet/dist/lib/browser/SheetContainer-NDNIS44E.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-AQSGDA4X.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GKI67SEF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts","inputs":{"packages/plugins/plugin-sheet/src/components/SheetContainer/SheetContainer.tsx":{"bytesInOutput":1341},"packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx":{"bytesInOutput":1348},"packages/plugins/plugin-sheet/src/components/FunctionEditor/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/Toolbar/Toolbar.tsx":{"bytesInOutput":5822},"packages/plugins/plugin-sheet/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts":{"bytesInOutput":45}},"bytes":9315},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-AQSGDA4X.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":100534},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-AQSGDA4X.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GKI67SEF.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor/state","kind":"import-statement","external":true},{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"codemirror-lang-spreadsheet","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor/state","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/SheetContainer-NDNIS44E.mjs","kind":"dynamic-import"}],"exports":["ComputeGraphContextProvider","GridSheet","SheetContainer","SheetProvider","addressToA1Notation","addressToIndex","compareIndexPositions","computeGraphFacet","createSheet","rangeToA1Notation","useComputeGraph","useSheetContext"],"inputs":{"packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx":{"bytesInOutput":305},"packages/plugins/plugin-sheet/src/defs/util.ts":{"bytesInOutput":2644},"packages/plugins/plugin-sheet/src/defs/types.ts":{"bytesInOutput":1909},"packages/plugins/plugin-sheet/src/defs/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/extensions/compute.ts":{"bytesInOutput":480},"packages/plugins/plugin-sheet/src/extensions/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/extensions/editor/extension.ts":{"bytesInOutput":5710},"packages/plugins/plugin-sheet/src/extensions/editor/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/hooks/useComputeGraph.ts":{"bytesInOutput":510},"packages/plugins/plugin-sheet/src/components/index.ts":{"bytesInOutput":109},"packages/plugins/plugin-sheet/src/components/ComputeGraph/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/GridSheet/GridSheet.tsx":{"bytesInOutput":4207},"packages/plugins/plugin-sheet/src/components/GridSheet/util.ts":{"bytesInOutput":4343},"packages/plugins/plugin-sheet/src/hooks/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/hooks/useFormattingModel.ts":{"bytesInOutput":152},"packages/plugins/plugin-sheet/src/model/decorations.ts":{"bytesInOutput":958},"packages/plugins/plugin-sheet/src/model/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/model/formatting-model.ts":{"bytesInOutput":2886},"packages/plugins/plugin-sheet/src/model/sheet-model.ts":{"bytesInOutput":12219},"packages/plugins/plugin-sheet/src/hooks/useSheetModel.ts":{"bytesInOutput":572},"packages/plugins/plugin-sheet/src/hooks/threads.ts":{"bytesInOutput":3929},"packages/plugins/plugin-sheet/src/components/SheetContext/SheetContext.tsx":{"bytesInOutput":1874},"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/GridSheet/index.ts":{"bytesInOutput":0}},"bytes":44609},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GKI67SEF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5408},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GKI67SEF.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["CellValue","Formatting","RowColumnMeta","SheetAction","SheetType"],"inputs":{"packages/plugins/plugin-sheet/src/types.ts":{"bytesInOutput":1853}},"bytes":2083},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":568},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs":{"imports":[],"exports":["SHEET_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-sheet/src/meta.ts":{"bytesInOutput":185}},"bytes":318},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":129730},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs":{"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/edge","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true}],"exports":["AsyncFunctionPlugin","ComputeGraph","ComputeGraphRegistry","ComputeNode","EDGE_FUNCTION_NAME","EdgeFunctionPlugin","EdgeFunctionPluginTranslations","FunctionContext","createSheetName","defaultFunctionContextOptions","defaultFunctions","defaultOptions","defaultPlugins","parseSheetName"],"inputs":{"packages/plugins/plugin-sheet/src/graph/compute-graph.ts":{"bytesInOutput":6205},"packages/plugins/plugin-sheet/src/graph/compute-node.ts":{"bytesInOutput":1029},"packages/plugins/plugin-sheet/src/graph/functions/async-function.ts":{"bytesInOutput":3955},"packages/plugins/plugin-sheet/src/graph/functions/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/graph/functions/edge-function.ts":{"bytesInOutput":3406},"packages/plugins/plugin-sheet/src/graph/functions/function-defs.ts":{"bytesInOutput":68677},"packages/plugins/plugin-sheet/src/graph/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/graph/compute-graph-registry.ts":{"bytesInOutput":1910}},"bytes":86004}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx":{"bytes":2198,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/ComputeGraph/index.ts":{"bytes":572,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx","kind":"import-statement","original":"./ComputeGraphContextProvider"}],"format":"esm"},"packages/plugins/plugin-sheet/src/defs/types.ts":{"bytes":9014,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/meta.ts":{"bytes":1178,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/types.ts":{"bytes":9617,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-sheet/src/defs/util.ts":{"bytes":14936,"imports":[{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-sheet/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-sheet/src/defs/sheet-range-types.ts":{"bytes":3456,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/defs/index.ts":{"bytes":692,"imports":[{"path":"packages/plugins/plugin-sheet/src/defs/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-sheet/src/defs/util.ts","kind":"import-statement","original":"./util"},{"path":"packages/plugins/plugin-sheet/src/defs/sheet-range-types.ts","kind":"import-statement","original":"./sheet-range-types"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/GridSheet/util.ts":{"bytes":20225,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-data","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../../defs"}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/compute-node.ts":{"bytes":5989,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/functions/async-function.ts":{"bytes":18956,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/functions/edge-function.ts":{"bytes":13852,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/edge","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/graph/functions/async-function.ts","kind":"import-statement","original":"./async-function"}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/functions/function-defs.ts":{"bytes":204661,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/functions/index.ts":{"bytes":741,"imports":[{"path":"packages/plugins/plugin-sheet/src/graph/functions/async-function.ts","kind":"import-statement","original":"./async-function"},{"path":"packages/plugins/plugin-sheet/src/graph/functions/edge-function.ts","kind":"import-statement","original":"./edge-function"},{"path":"packages/plugins/plugin-sheet/src/graph/functions/function-defs.ts","kind":"import-statement","original":"./function-defs"}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/compute-graph.ts":{"bytes":27682,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/graph/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"packages/plugins/plugin-sheet/src/graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/compute-graph-registry.ts":{"bytes":9443,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/graph/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"packages/plugins/plugin-sheet/src/graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/graph/index.ts":{"bytes":839,"imports":[{"path":"packages/plugins/plugin-sheet/src/graph/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"packages/plugins/plugin-sheet/src/graph/compute-graph-registry.ts","kind":"import-statement","original":"./compute-graph-registry"},{"path":"packages/plugins/plugin-sheet/src/graph/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"packages/plugins/plugin-sheet/src/graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/compute.ts":{"bytes":17995,"imports":[{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor/state","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/graph/index.ts","kind":"import-statement","original":"../graph"}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/editor/extension.ts":{"bytes":26619,"imports":[{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"codemirror-lang-spreadsheet","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor/state","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/editor/index.ts":{"bytes":520,"imports":[{"path":"packages/plugins/plugin-sheet/src/extensions/editor/extension.ts","kind":"import-statement","original":"./extension"}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/index.ts":{"bytes":593,"imports":[{"path":"packages/plugins/plugin-sheet/src/extensions/compute.ts","kind":"import-statement","original":"./compute"},{"path":"packages/plugins/plugin-sheet/src/extensions/editor/index.ts","kind":"import-statement","original":"./editor"}],"format":"esm"},"packages/plugins/plugin-sheet/src/hooks/useComputeGraph.ts":{"bytes":2875,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"packages/plugins/plugin-sheet/src/model/decorations.ts":{"bytes":5951,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/model/sheet-model.ts":{"bytes":48085,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../defs"},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../defs"},{"path":"packages/plugins/plugin-sheet/src/graph/index.ts","kind":"import-statement","original":"../graph"}],"format":"esm"},"packages/plugins/plugin-sheet/src/model/index.ts":{"bytes":617,"imports":[{"path":"packages/plugins/plugin-sheet/src/model/decorations.ts","kind":"import-statement","original":"./decorations"},{"path":"packages/plugins/plugin-sheet/src/model/sheet-model.ts","kind":"import-statement","original":"./sheet-model"}],"format":"esm"},"packages/plugins/plugin-sheet/src/hooks/useSheetModel.ts":{"bytes":3097,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/model/index.ts","kind":"import-statement","original":"../model"}],"format":"esm"},"packages/plugins/plugin-sheet/src/hooks/threads.ts":{"bytes":17036,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../defs"},{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-sheet/src/hooks/index.ts":{"bytes":718,"imports":[{"path":"packages/plugins/plugin-sheet/src/hooks/useComputeGraph.ts","kind":"import-statement","original":"./useComputeGraph"},{"path":"packages/plugins/plugin-sheet/src/hooks/useSheetModel.ts","kind":"import-statement","original":"./useSheetModel"},{"path":"packages/plugins/plugin-sheet/src/hooks/threads.ts","kind":"import-statement","original":"./threads"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetContext/SheetContext.tsx":{"bytes":8601,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"packages/plugins/plugin-sheet/src/model/index.ts","kind":"import-statement","original":"../../model"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts":{"bytes":537,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/SheetContext.tsx","kind":"import-statement","original":"./SheetContext"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/GridSheet/GridSheet.tsx":{"bytes":19539,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/GridSheet/util.ts","kind":"import-statement","original":"./util"},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../../defs"},{"path":"packages/plugins/plugin-sheet/src/extensions/index.ts","kind":"import-statement","original":"../../extensions"},{"path":"packages/plugins/plugin-sheet/src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"../SheetContext"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/GridSheet/index.ts":{"bytes":523,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/GridSheet/GridSheet.tsx","kind":"import-statement","original":"./GridSheet"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx":{"bytes":5266,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../../defs"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"../SheetContext"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/FunctionEditor/index.ts":{"bytes":545,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx","kind":"import-statement","original":"./FunctionEditor"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/Toolbar/Toolbar.tsx":{"bytes":31113,"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../../defs"},{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"../SheetContext"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/Toolbar/index.ts":{"bytes":519,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/Toolbar/Toolbar.tsx","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetContainer/SheetContainer.tsx":{"bytes":3329,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/FunctionEditor/index.ts","kind":"import-statement","original":"../FunctionEditor"},{"path":"packages/plugins/plugin-sheet/src/components/GridSheet/index.ts","kind":"import-statement","original":"../GridSheet"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"../SheetContext"},{"path":"packages/plugins/plugin-sheet/src/components/Toolbar/index.ts","kind":"import-statement","original":"../Toolbar"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts":{"bytes":721,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/SheetContainer/SheetContainer.tsx","kind":"import-statement","original":"./SheetContainer"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/index.ts":{"bytes":1254,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/ComputeGraph/index.ts","kind":"import-statement","original":"./ComputeGraph"},{"path":"packages/plugins/plugin-sheet/src/components/GridSheet/index.ts","kind":"import-statement","original":"./GridSheet"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"./SheetContext"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts","kind":"dynamic-import","original":"./SheetContainer"}],"format":"esm"},"packages/plugins/plugin-sheet/src/translations.ts":{"bytes":2948,"imports":[{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-sheet/src/SheetPlugin.tsx":{"bytes":26166,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"./defs"},{"path":"packages/plugins/plugin-sheet/src/extensions/index.ts","kind":"import-statement","original":"./extensions"},{"path":"packages/plugins/plugin-sheet/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-sheet/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-sheet/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-sheet/src/graph/index.ts","kind":"dynamic-import","original":"./graph"}],"format":"esm"},"packages/plugins/plugin-sheet/src/index.ts":{"bytes":769,"imports":[{"path":"packages/plugins/plugin-sheet/src/SheetPlugin.tsx","kind":"import-statement","original":"./SheetPlugin"},{"path":"packages/plugins/plugin-sheet/src/SheetPlugin.tsx","kind":"import-statement","original":"./SheetPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-sheet/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12835},"packages/plugins/plugin-sheet/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-HOG37RYS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-BWN5DZWZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/graph-M4IQ76QX.mjs","kind":"dynamic-import"}],"exports":["SheetPlugin","default"],"entryPoint":"packages/plugins/plugin-sheet/src/index.ts","inputs":{"packages/plugins/plugin-sheet/src/SheetPlugin.tsx":{"bytesInOutput":7156},"packages/plugins/plugin-sheet/src/translations.ts":{"bytesInOutput":797},"packages/plugins/plugin-sheet/src/index.ts":{"bytesInOutput":31}},"bytes":8617},"packages/plugins/plugin-sheet/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"}],"exports":["SHEET_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-sheet/src/meta.ts","inputs":{},"bytes":159},"packages/plugins/plugin-sheet/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-BWN5DZWZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"}],"exports":["CellValue","Range","RowColumnMeta","SheetAction","SheetType"],"entryPoint":"packages/plugins/plugin-sheet/src/types.ts","inputs":{},"bytes":250},"packages/plugins/plugin-sheet/dist/lib/browser/graph-M4IQ76QX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/browser/graph-M4IQ76QX.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs","kind":"import-statement"}],"exports":["AsyncFunctionPlugin","ComputeGraph","ComputeGraphRegistry","ComputeNode","EDGE_FUNCTION_NAME","EdgeFunctionPlugin","EdgeFunctionPluginTranslations","FunctionContext","createSheetName","defaultFunctionContextOptions","defaultFunctions","defaultOptions","defaultPlugins","parseSheetName"],"entryPoint":"packages/plugins/plugin-sheet/src/graph/index.ts","inputs":{},"bytes":696},"packages/plugins/plugin-sheet/dist/lib/browser/SheetContainer-RVRACGCZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20527},"packages/plugins/plugin-sheet/dist/lib/browser/SheetContainer-RVRACGCZ.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-HOG37RYS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-BWN5DZWZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts","inputs":{"packages/plugins/plugin-sheet/src/components/SheetContainer/SheetContainer.tsx":{"bytesInOutput":760},"packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx":{"bytesInOutput":1348},"packages/plugins/plugin-sheet/src/components/FunctionEditor/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/Toolbar/Toolbar.tsx":{"bytesInOutput":7317},"packages/plugins/plugin-sheet/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts":{"bytesInOutput":45}},"bytes":10240},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-HOG37RYS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":96276},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-HOG37RYS.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-BWN5DZWZ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor/state","kind":"import-statement","external":true},{"path":"@codemirror/autocomplete","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@lezer/highlight","kind":"import-statement","external":true},{"path":"codemirror-lang-spreadsheet","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor/state","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-data","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-grid","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/dist/lib/browser/SheetContainer-RVRACGCZ.mjs","kind":"dynamic-import"}],"exports":["ComputeGraphContextProvider","GridSheet","SheetContainer","SheetProvider","addressToA1Notation","addressToIndex","compareIndexPositions","computeGraphFacet","createSheet","inRange","rangeToA1Notation","useComputeGraph","useSheetContext"],"inputs":{"packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx":{"bytesInOutput":305},"packages/plugins/plugin-sheet/src/defs/util.ts":{"bytesInOutput":2481},"packages/plugins/plugin-sheet/src/defs/types.ts":{"bytesInOutput":1909},"packages/plugins/plugin-sheet/src/defs/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/defs/sheet-range-types.ts":{"bytesInOutput":561},"packages/plugins/plugin-sheet/src/extensions/compute.ts":{"bytesInOutput":480},"packages/plugins/plugin-sheet/src/extensions/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/extensions/editor/extension.ts":{"bytesInOutput":5710},"packages/plugins/plugin-sheet/src/extensions/editor/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/hooks/useComputeGraph.ts":{"bytesInOutput":510},"packages/plugins/plugin-sheet/src/components/index.ts":{"bytesInOutput":109},"packages/plugins/plugin-sheet/src/components/ComputeGraph/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/GridSheet/GridSheet.tsx":{"bytesInOutput":4201},"packages/plugins/plugin-sheet/src/components/GridSheet/util.ts":{"bytesInOutput":4763},"packages/plugins/plugin-sheet/src/hooks/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/hooks/useSheetModel.ts":{"bytesInOutput":572},"packages/plugins/plugin-sheet/src/model/decorations.ts":{"bytesInOutput":958},"packages/plugins/plugin-sheet/src/model/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/model/sheet-model.ts":{"bytesInOutput":12193},"packages/plugins/plugin-sheet/src/hooks/threads.ts":{"bytesInOutput":3912},"packages/plugins/plugin-sheet/src/components/SheetContext/SheetContext.tsx":{"bytesInOutput":1765},"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/GridSheet/index.ts":{"bytesInOutput":0}},"bytes":42171},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-BWN5DZWZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5149},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-BWN5DZWZ.mjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["CellValue","Range","RowColumnMeta","SheetAction","SheetType"],"inputs":{"packages/plugins/plugin-sheet/src/types.ts":{"bytesInOutput":1779}},"bytes":2004},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":568},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-D3QTX46O.mjs":{"imports":[],"exports":["SHEET_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-sheet/src/meta.ts":{"bytesInOutput":185}},"bytes":318},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":129730},"packages/plugins/plugin-sheet/dist/lib/browser/chunk-GSV5QNLD.mjs":{"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/edge","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"#hyperformula","kind":"import-statement","external":true}],"exports":["AsyncFunctionPlugin","ComputeGraph","ComputeGraphRegistry","ComputeNode","EDGE_FUNCTION_NAME","EdgeFunctionPlugin","EdgeFunctionPluginTranslations","FunctionContext","createSheetName","defaultFunctionContextOptions","defaultFunctions","defaultOptions","defaultPlugins","parseSheetName"],"inputs":{"packages/plugins/plugin-sheet/src/graph/compute-graph.ts":{"bytesInOutput":6205},"packages/plugins/plugin-sheet/src/graph/compute-node.ts":{"bytesInOutput":1029},"packages/plugins/plugin-sheet/src/graph/functions/async-function.ts":{"bytesInOutput":3955},"packages/plugins/plugin-sheet/src/graph/functions/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/graph/functions/edge-function.ts":{"bytesInOutput":3406},"packages/plugins/plugin-sheet/src/graph/functions/function-defs.ts":{"bytesInOutput":68677},"packages/plugins/plugin-sheet/src/graph/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/graph/compute-graph-registry.ts":{"bytesInOutput":1910}},"bytes":86004}}}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CellValue,
|
|
3
|
-
|
|
3
|
+
Range,
|
|
4
4
|
RowColumnMeta,
|
|
5
5
|
SheetAction,
|
|
6
6
|
SheetType
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BWN5DZWZ.mjs";
|
|
8
8
|
import "./chunk-D3QTX46O.mjs";
|
|
9
9
|
export {
|
|
10
10
|
CellValue,
|
|
11
|
-
|
|
11
|
+
Range,
|
|
12
12
|
RowColumnMeta,
|
|
13
13
|
SheetAction,
|
|
14
14
|
SheetType
|