@dxos/plugin-sheet 0.7.2-main.f1adc9f → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/lib/browser/{SheetContainer-DBDIZU6U.mjs → SheetContainer-YAMIOFC6.mjs} +3 -4
  2. package/dist/lib/browser/{SheetContainer-DBDIZU6U.mjs.map → SheetContainer-YAMIOFC6.mjs.map} +3 -3
  3. package/dist/lib/browser/{chunk-IXA5HC36.mjs → chunk-QHQFM7LV.mjs} +22 -48
  4. package/dist/lib/browser/{chunk-IXA5HC36.mjs.map → chunk-QHQFM7LV.mjs.map} +4 -4
  5. package/dist/lib/browser/index.mjs +13 -8
  6. package/dist/lib/browser/index.mjs.map +3 -3
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/node/{SheetContainer-3373SORI.cjs → SheetContainer-BSDHHYXE.cjs} +15 -16
  9. package/dist/lib/node/{SheetContainer-3373SORI.cjs.map → SheetContainer-BSDHHYXE.cjs.map} +3 -3
  10. package/dist/lib/node/{chunk-TS6IBEPZ.cjs → chunk-J5ZFWMOD.cjs} +10 -34
  11. package/dist/lib/node/{chunk-TS6IBEPZ.cjs.map → chunk-J5ZFWMOD.cjs.map} +4 -4
  12. package/dist/lib/node/index.cjs +15 -10
  13. package/dist/lib/node/index.cjs.map +3 -3
  14. package/dist/lib/node/meta.json +1 -1
  15. package/dist/lib/node-esm/{SheetContainer-CH2RYBXJ.mjs → SheetContainer-T47T2NYJ.mjs} +3 -4
  16. package/dist/lib/node-esm/{SheetContainer-CH2RYBXJ.mjs.map → SheetContainer-T47T2NYJ.mjs.map} +3 -3
  17. package/dist/lib/node-esm/{chunk-7F3BRKP7.mjs → chunk-6GSTEN7N.mjs} +22 -48
  18. package/dist/lib/node-esm/{chunk-7F3BRKP7.mjs.map → chunk-6GSTEN7N.mjs.map} +4 -4
  19. package/dist/lib/node-esm/index.mjs +13 -8
  20. package/dist/lib/node-esm/index.mjs.map +3 -3
  21. package/dist/lib/node-esm/meta.json +1 -1
  22. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  23. package/dist/types/src/components/GridSheet/GridSheet.d.ts.map +1 -1
  24. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts +0 -1
  25. package/dist/types/src/components/GridSheet/GridSheet.stories.d.ts.map +1 -1
  26. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts +0 -2
  27. package/dist/types/src/components/SheetContainer/SheetContainer.stories.d.ts.map +1 -1
  28. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  29. package/dist/types/src/components/index.d.ts +0 -1
  30. package/dist/types/src/components/index.d.ts.map +1 -1
  31. package/dist/types/src/integrations/thread-ranges.d.ts.map +1 -1
  32. package/package.json +37 -39
  33. package/src/SheetPlugin.tsx +13 -5
  34. package/src/components/GridSheet/GridSheet.stories.tsx +0 -2
  35. package/src/components/GridSheet/GridSheet.tsx +3 -12
  36. package/src/components/SheetContainer/SheetContainer.stories.tsx +2 -44
  37. package/src/components/Toolbar/Toolbar.tsx +1 -7
  38. package/src/components/index.ts +0 -1
  39. package/src/integrations/thread-ranges.ts +0 -2
  40. package/dist/types/src/components/SheetObjectSettings.d.ts +0 -7
  41. package/dist/types/src/components/SheetObjectSettings.d.ts.map +0 -1
  42. package/dist/types/src/testing/playwright/playwright.config.d.ts +0 -3
  43. package/dist/types/src/testing/playwright/playwright.config.d.ts.map +0 -1
  44. package/dist/types/src/testing/playwright/sheet-manager.d.ts +0 -24
  45. package/dist/types/src/testing/playwright/sheet-manager.d.ts.map +0 -1
  46. package/dist/types/src/testing/playwright/sheet.spec.d.ts +0 -2
  47. package/dist/types/src/testing/playwright/sheet.spec.d.ts.map +0 -1
  48. package/src/components/SheetObjectSettings.tsx +0 -38
  49. package/src/testing/playwright/playwright.config.ts +0 -18
  50. package/src/testing/playwright/sheet-manager.ts +0 -91
  51. package/src/testing/playwright/sheet.spec.ts +0 -78
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/SheetPlugin.tsx", "../../../src/serializer.ts", "../../../src/translations.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { NavigationAction, parseIntentPlugin, resolvePlugin, type PluginDefinition } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { parseClientPlugin } from '@dxos/plugin-client';\nimport { createExtension, isActionGroup, type ActionGroup } from '@dxos/plugin-graph';\nimport { FunctionType } from '@dxos/plugin-script/types';\nimport { SpaceAction } from '@dxos/plugin-space';\nimport { getSpace, isEchoObject } from '@dxos/react-client/echo';\nimport { Icon } from '@dxos/react-ui';\n\nimport { ComputeGraphContextProvider, SheetContainer, SheetObjectSettings } from './components';\nimport { type ComputeGraphRegistry } from './compute-graph';\nimport { compareIndexPositions, createSheet } from './defs';\nimport { computeGraphFacet } from './extensions';\nimport meta, { SHEET_PLUGIN } from './meta';\nimport { serializer } from './serializer';\nimport translations from './translations';\nimport { SheetAction, SheetType, type SheetPluginProvides } from './types';\n\nexport const SheetPlugin = (): PluginDefinition<SheetPluginProvides> => {\n let computeGraphRegistry: ComputeGraphRegistry | undefined;\n\n return {\n meta,\n ready: async (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n invariant(client);\n let remoteFunctionUrl: string | undefined;\n if (client.config.values.runtime?.services?.edge?.url) {\n const url = new URL('/functions', client.config.values.runtime?.services?.edge?.url);\n url.protocol = 'https';\n remoteFunctionUrl = url.toString();\n }\n\n // Async import removes direct dependency on hyperformula.\n const { defaultPlugins, ComputeGraphRegistry } = await import('./compute-graph');\n computeGraphRegistry = new ComputeGraphRegistry({ plugins: defaultPlugins, remoteFunctionUrl });\n },\n provides: {\n context: ({ children }) => {\n invariant(computeGraphRegistry);\n return <ComputeGraphContextProvider registry={computeGraphRegistry}>{children}</ComputeGraphContextProvider>;\n },\n metadata: {\n records: {\n [SheetType.typename]: {\n label: (object: any) => (object instanceof SheetType ? object.name : undefined),\n placeholder: ['sheet title placeholder', { ns: SHEET_PLUGIN }],\n icon: 'ph--grid-nine--regular',\n serializer,\n },\n },\n },\n translations,\n echo: {\n // TODO(wittjosiah): Factor out to common package/plugin.\n // FunctionType is currently registered here in case script plugin isn't enabled.\n schema: [SheetType, FunctionType],\n },\n space: {\n onSpaceCreate: {\n label: ['create sheet label', { ns: SHEET_PLUGIN }],\n action: SheetAction.CREATE,\n },\n },\n graph: {\n builder: (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;\n if (!client || !dispatch) {\n return [];\n }\n\n return createExtension({\n id: SheetAction.CREATE,\n filter: (node): node is ActionGroup => isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),\n actions: ({ node }) => {\n const id = node.id.split('/').at(-1);\n const [spaceId, objectId] = id?.split(':') ?? [];\n const space = client.spaces.get().find((space) => space.id === spaceId);\n const object = objectId && space?.db.getObjectById(objectId);\n const target = objectId ? object : space;\n if (!target) {\n return;\n }\n\n return [\n {\n id: `${SHEET_PLUGIN}/create/${node.id}`,\n data: async () => {\n await dispatch([\n { plugin: SHEET_PLUGIN, action: SheetAction.CREATE, data: { space } },\n { action: SpaceAction.ADD_OBJECT, data: { target } },\n { action: NavigationAction.OPEN },\n ]);\n },\n properties: {\n label: ['create sheet label', { ns: SHEET_PLUGIN }],\n icon: 'ph--grid-nine--regular',\n testId: 'sheetPlugin.createObject',\n },\n },\n ];\n },\n });\n },\n },\n markdown: {\n extensions: ({ document: doc }) => {\n invariant(computeGraphRegistry);\n const space = getSpace(doc);\n if (space) {\n const computeGraph = computeGraphRegistry.getOrCreateGraph(space);\n return computeGraphFacet.of(computeGraph);\n }\n },\n },\n stack: {\n creators: [\n {\n id: 'create-stack-section-sheet',\n testId: 'sheetPlugin.createSection',\n type: ['plugin name', { ns: SHEET_PLUGIN }],\n label: ['create sheet section label', { ns: SHEET_PLUGIN }],\n // TODO(thure): Refactor to use strings\n icon: (props: any) => <Icon icon='ph--grid-nine--regular' {...props} />,\n intent: {\n plugin: SHEET_PLUGIN,\n action: SheetAction.CREATE,\n },\n },\n ],\n },\n thread: {\n predicate: (data) => data instanceof SheetType,\n createSort: (sheet) => (indexA, indexB) =>\n !indexA || !indexB ? 0 : compareIndexPositions(sheet, indexA, indexB),\n },\n surface: {\n component: ({ data, role }) => {\n const space = isEchoObject(data.object) ? getSpace(data.object) : undefined;\n switch (role) {\n case 'article':\n case 'section':\n if (space && data.object instanceof SheetType) {\n return <SheetContainer space={space} sheet={data.object} role={role} />;\n }\n break;\n case 'complementary--settings':\n if (data.subject instanceof SheetType) {\n return <SheetObjectSettings sheet={data.subject} />;\n }\n break;\n }\n\n return null;\n },\n },\n intent: {\n resolver: async (intent) => {\n switch (intent.action) {\n case SheetAction.CREATE: {\n return { data: createSheet() };\n }\n case SheetAction.INSERT_AXIS: {\n const { model, axis, index, count } = intent.data as SheetAction.InsertAxis;\n const _indices = model[axis === 'col' ? 'insertColumns' : 'insertRows'](index, count);\n return;\n }\n case SheetAction.DROP_AXIS: {\n if (!intent.undo) {\n const { model, axis, axisIndex } = intent.data as SheetAction.DropAxis;\n const undoData = model[axis === 'col' ? 'dropColumn' : 'dropRow'](axisIndex);\n return {\n undoable: {\n message: translations[0]['en-US'][SHEET_PLUGIN][`${axis} dropped label`],\n data: { ...undoData, model },\n },\n };\n } else {\n const { model, ...undoData } = intent.data as SheetAction.DropAxisRestore;\n model[undoData.axis === 'col' ? 'restoreColumn' : 'restoreRow'](undoData);\n }\n }\n }\n },\n },\n },\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type TypedObjectSerializer } from '@dxos/plugin-space/types';\nimport { create, getObjectCore } from '@dxos/react-client/echo';\n\nimport { SheetType } from './types';\n\nexport const serializer: TypedObjectSerializer<SheetType> = {\n serialize: async ({ object }): Promise<string> => {\n const { threads: _threads, ...sheet } = object;\n return JSON.stringify(sheet, null, 2);\n },\n\n deserialize: async ({ content, newId }) => {\n const { id, ...parsed } = JSON.parse(content);\n const sheet = create(SheetType, parsed);\n\n if (!newId) {\n const core = getObjectCore(sheet);\n core.id = id;\n }\n\n return sheet;\n },\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SHEET_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [SHEET_PLUGIN]: {\n 'plugin name': 'Sheets',\n 'sheet title placeholder': 'New sheet',\n 'create sheet label': 'Create sheet',\n 'create sheet section label': 'Create sheet',\n 'cell placeholder': 'Cell value...',\n 'range key alignment label': 'Align',\n 'range key style label': 'Style',\n 'range value start label': 'Align left',\n 'range value center label': 'Align center',\n 'range value end label': 'Align right',\n 'range value softwrap label': 'Wrap text',\n 'range value highlight label': 'Highlight',\n 'toolbar action label': '{{value}}',\n 'selection overlaps existing comment label': 'Selected cell already has a comment',\n 'comment label': 'Add comment',\n 'comment ranges not supported label': 'Commenting on ranges is not yet supported',\n 'no cursor label': 'Select a cell to comment',\n 'open comment for sheet cell': 'View comments for cell',\n 'add col before label': 'Add column before',\n 'add col after label': 'Add column after',\n 'delete col label': 'Delete column',\n 'add row before label': 'Add row before',\n 'add row after label': 'Add row after',\n 'delete row label': 'Delete row',\n 'range list heading': 'Ranges',\n 'range title': '{{position}} — {{value}}',\n 'col dropped label': 'Deleted a column',\n 'row dropped label': 'Deleted a row',\n },\n },\n },\n] as const;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SheetPlugin } from './SheetPlugin';\n\nexport * from './SheetPlugin';\n\nexport default SheetPlugin;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAA0F;AAC1F,uBAA0B;AAC1B,2BAAkC;AAClC,0BAAiE;AACjE,mBAA6B;AAC7B,0BAA4B;AAC5B,kBAAuC;AACvC,sBAAqB;ACRrB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AAKhE,kCAAYkE,WAAW;AAC1B,kBAAI,CAAC5D,OAAO6D,MAAM;AAChB,sBAAM,EAAEN,OAAOC,MAAMM,UAAS,IAAK9D,OAAOmB;AAC1C,sBAAM4C,WAAWR,MAAMC,SAAS,QAAQ,eAAe,SAAA,EAAWM,SAAAA;AAClE,uBAAO;kBACLE,UAAU;oBACRC,SAAS9E,qBAAa,CAAA,EAAG,OAAA,EAASrC,kCAAAA,EAAc,GAAG0G,IAAAA,gBAAoB;oBACvErC,MAAM;sBAAE,GAAG4C;sBAAUR;oBAAM;kBAC7B;gBACF;cACF,OAAO;AACL,sBAAM,EAAEA,OAAO,GAAGQ,SAAAA,IAAa/D,OAAOmB;AACtCoC,sBAAMQ,SAASP,SAAS,QAAQ,kBAAkB,YAAA,EAAcO,QAAAA;cAClE;YACF;UACF;QACF;MACF;IACF;EACF;AACF;AG1LA,IAAA,cAAehH;",
6
- "names": ["import_echo", "serializer", "serialize", "object", "threads", "_threads", "sheet", "JSON", "stringify", "deserialize", "content", "newId", "id", "parsed", "parse", "create", "SheetType", "core", "getObjectCore", "SHEET_PLUGIN", "SheetPlugin", "computeGraphRegistry", "meta", "ready", "plugins", "client", "resolvePlugin", "parseClientPlugin", "provides", "invariant", "remoteFunctionUrl", "config", "values", "runtime", "services", "edge", "url", "URL", "protocol", "toString", "defaultPlugins", "ComputeGraphRegistry", "context", "children", "React", "ComputeGraphContextProvider", "registry", "metadata", "records", "typename", "label", "name", "undefined", "placeholder", "ns", "icon", "translations", "echo", "schema", "FunctionType", "space", "onSpaceCreate", "action", "SheetAction", "CREATE", "graph", "builder", "dispatch", "parseIntentPlugin", "intent", "createExtension", "filter", "node", "isActionGroup", "startsWith", "SpaceAction", "ADD_OBJECT", "actions", "split", "at", "spaceId", "objectId", "spaces", "get", "find", "db", "getObjectById", "target", "data", "plugin", "NavigationAction", "OPEN", "properties", "testId", "markdown", "extensions", "document", "doc", "getSpace", "computeGraph", "getOrCreateGraph", "computeGraphFacet", "of", "stack", "creators", "type", "props", "Icon", "thread", "predicate", "createSort", "indexA", "indexB", "compareIndexPositions", "surface", "component", "role", "isEchoObject", "SheetContainer", "subject", "SheetObjectSettings", "resolver", "createSheet", "INSERT_AXIS", "model", "axis", "index", "count", "_indices", "DROP_AXIS", "undo", "axisIndex", "undoData", "undoable", "message"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { NavigationAction, parseIntentPlugin, resolvePlugin, type PluginDefinition } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { parseClientPlugin } from '@dxos/plugin-client';\nimport { createExtension, isActionGroup, type ActionGroup } from '@dxos/plugin-graph';\nimport { FunctionType } from '@dxos/plugin-script/types';\nimport { SpaceAction } from '@dxos/plugin-space';\nimport { getSpace, isEchoObject } from '@dxos/react-client/echo';\nimport { Icon } from '@dxos/react-ui';\n\nimport { ComputeGraphContextProvider, RangeList, SheetContainer } from './components';\nimport { type ComputeGraphRegistry } from './compute-graph';\nimport { compareIndexPositions, createSheet } from './defs';\nimport { computeGraphFacet } from './extensions';\nimport meta, { SHEET_PLUGIN } from './meta';\nimport { serializer } from './serializer';\nimport translations from './translations';\nimport { SheetAction, SheetType, type SheetPluginProvides } from './types';\n\nexport const SheetPlugin = (): PluginDefinition<SheetPluginProvides> => {\n let computeGraphRegistry: ComputeGraphRegistry | undefined;\n\n return {\n meta,\n ready: async (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n invariant(client);\n let remoteFunctionUrl: string | undefined;\n if (client.config.values.runtime?.services?.edge?.url) {\n const url = new URL('/functions', client.config.values.runtime?.services?.edge?.url);\n url.protocol = 'https';\n remoteFunctionUrl = url.toString();\n }\n\n // Async import removes direct dependency on hyperformula.\n const { defaultPlugins, ComputeGraphRegistry } = await import('./compute-graph');\n computeGraphRegistry = new ComputeGraphRegistry({ plugins: defaultPlugins, remoteFunctionUrl });\n },\n provides: {\n context: ({ children }) => {\n invariant(computeGraphRegistry);\n return <ComputeGraphContextProvider registry={computeGraphRegistry}>{children}</ComputeGraphContextProvider>;\n },\n metadata: {\n records: {\n [SheetType.typename]: {\n label: (object: any) => (object instanceof SheetType ? object.name : undefined),\n placeholder: ['sheet title placeholder', { ns: SHEET_PLUGIN }],\n icon: 'ph--grid-nine--regular',\n serializer,\n },\n },\n },\n translations,\n echo: {\n // TODO(wittjosiah): Factor out to common package/plugin.\n // FunctionType is currently registered here in case script plugin isn't enabled.\n schema: [SheetType, FunctionType],\n },\n space: {\n onSpaceCreate: {\n label: ['create sheet label', { ns: SHEET_PLUGIN }],\n action: SheetAction.CREATE,\n },\n },\n graph: {\n builder: (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;\n if (!client || !dispatch) {\n return [];\n }\n\n return createExtension({\n id: SheetAction.CREATE,\n filter: (node): node is ActionGroup => isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),\n actions: ({ node }) => {\n const id = node.id.split('/').at(-1);\n const [spaceId, objectId] = id?.split(':') ?? [];\n const space = client.spaces.get().find((space) => space.id === spaceId);\n const object = objectId && space?.db.getObjectById(objectId);\n const target = objectId ? object : space;\n if (!target) {\n return;\n }\n\n return [\n {\n id: `${SHEET_PLUGIN}/create/${node.id}`,\n data: async () => {\n await dispatch([\n { plugin: SHEET_PLUGIN, action: SheetAction.CREATE, data: { space } },\n { action: SpaceAction.ADD_OBJECT, data: { target } },\n { action: NavigationAction.OPEN },\n ]);\n },\n properties: {\n label: ['create sheet label', { ns: SHEET_PLUGIN }],\n icon: 'ph--grid-nine--regular',\n testId: 'sheetPlugin.createObject',\n },\n },\n ];\n },\n });\n },\n },\n markdown: {\n extensions: ({ document: doc }) => {\n invariant(computeGraphRegistry);\n const space = getSpace(doc);\n if (space) {\n const computeGraph = computeGraphRegistry.getOrCreateGraph(space);\n return computeGraphFacet.of(computeGraph);\n }\n },\n },\n stack: {\n creators: [\n {\n id: 'create-stack-section-sheet',\n testId: 'sheetPlugin.createSection',\n type: ['plugin name', { ns: SHEET_PLUGIN }],\n label: ['create sheet section label', { ns: SHEET_PLUGIN }],\n // TODO(thure): Refactor to use strings\n icon: (props: any) => <Icon icon='ph--grid-nine--regular' {...props} />,\n intent: {\n plugin: SHEET_PLUGIN,\n action: SheetAction.CREATE,\n },\n },\n ],\n },\n thread: {\n predicate: (data) => data instanceof SheetType,\n createSort: (sheet) => (indexA, indexB) =>\n !indexA || !indexB ? 0 : compareIndexPositions(sheet, indexA, indexB),\n },\n surface: {\n component: ({ data, role }) => {\n const space = isEchoObject(data.object) ? getSpace(data.object) : undefined;\n if (!space) {\n return null;\n }\n\n switch (role) {\n case 'article':\n case 'section':\n if (data.object instanceof SheetType) {\n return <SheetContainer space={space} sheet={data.object} role={role} />;\n }\n\n return null;\n case 'complementary--settings':\n if (data.subject instanceof SheetType) {\n return {\n node: <RangeList sheet={data.subject} />,\n };\n }\n\n return null;\n }\n\n return null;\n },\n },\n intent: {\n resolver: async (intent) => {\n switch (intent.action) {\n case SheetAction.CREATE: {\n return { data: createSheet() };\n }\n case SheetAction.INSERT_AXIS: {\n const { model, axis, index, count } = intent.data as SheetAction.InsertAxis;\n const _indices = model[axis === 'col' ? 'insertColumns' : 'insertRows'](index, count);\n return;\n }\n case SheetAction.DROP_AXIS: {\n if (!intent.undo) {\n const { model, axis, axisIndex } = intent.data as SheetAction.DropAxis;\n const undoData = model[axis === 'col' ? 'dropColumn' : 'dropRow'](axisIndex);\n return {\n undoable: {\n message: translations[0]['en-US'][SHEET_PLUGIN][`${axis} dropped label`],\n data: { ...undoData, model },\n },\n };\n } else {\n const { model, ...undoData } = intent.data as SheetAction.DropAxisRestore;\n model[undoData.axis === 'col' ? 'restoreColumn' : 'restoreRow'](undoData);\n }\n }\n }\n },\n },\n },\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type TypedObjectSerializer } from '@dxos/plugin-space/types';\nimport { create, getObjectCore } from '@dxos/react-client/echo';\n\nimport { SheetType } from './types';\n\nexport const serializer: TypedObjectSerializer<SheetType> = {\n serialize: async ({ object }): Promise<string> => {\n const { threads: _threads, ...sheet } = object;\n return JSON.stringify(sheet, null, 2);\n },\n\n deserialize: async ({ content, newId }) => {\n const { id, ...parsed } = JSON.parse(content);\n const sheet = create(SheetType, parsed);\n\n if (!newId) {\n const core = getObjectCore(sheet);\n core.id = id;\n }\n\n return sheet;\n },\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SHEET_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [SHEET_PLUGIN]: {\n 'plugin name': 'Sheets',\n 'sheet title placeholder': 'New sheet',\n 'create sheet label': 'Create sheet',\n 'create sheet section label': 'Create sheet',\n 'cell placeholder': 'Cell value...',\n 'range key alignment label': 'Align',\n 'range key style label': 'Style',\n 'range value start label': 'Align left',\n 'range value center label': 'Align center',\n 'range value end label': 'Align right',\n 'range value softwrap label': 'Wrap text',\n 'range value highlight label': 'Highlight',\n 'toolbar action label': '{{value}}',\n 'selection overlaps existing comment label': 'Selected cell already has a comment',\n 'comment label': 'Add comment',\n 'comment ranges not supported label': 'Commenting on ranges is not yet supported',\n 'no cursor label': 'Select a cell to comment',\n 'open comment for sheet cell': 'View comments for cell',\n 'add col before label': 'Add column before',\n 'add col after label': 'Add column after',\n 'delete col label': 'Delete column',\n 'add row before label': 'Add row before',\n 'add row after label': 'Add row after',\n 'delete row label': 'Delete row',\n 'range list heading': 'Ranges',\n 'range title': '{{position}} — {{value}}',\n 'col dropped label': 'Deleted a column',\n 'row dropped label': 'Deleted a row',\n },\n },\n },\n] as const;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SheetPlugin } from './SheetPlugin';\n\nexport * from './SheetPlugin';\n\nexport default SheetPlugin;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAA0F;A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AY4D,aAAa;AAC5B,oBAAM,EAAEC,OAAOC,MAAMC,OAAOC,MAAK,IAAK1D,OAAOmB;AAC7C,oBAAMwC,WAAWJ,MAAMC,SAAS,QAAQ,kBAAkB,YAAA,EAAcC,OAAOC,KAAAA;AAC/E;YACF;YACA,KAAKhE,kCAAYkE,WAAW;AAC1B,kBAAI,CAAC5D,OAAO6D,MAAM;AAChB,sBAAM,EAAEN,OAAOC,MAAMM,UAAS,IAAK9D,OAAOmB;AAC1C,sBAAM4C,WAAWR,MAAMC,SAAS,QAAQ,eAAe,SAAA,EAAWM,SAAAA;AAClE,uBAAO;kBACLE,UAAU;oBACRC,SAAS9E,qBAAa,CAAA,EAAG,OAAA,EAASrC,kCAAAA,EAAc,GAAG0G,IAAAA,gBAAoB;oBACvErC,MAAM;sBAAE,GAAG4C;sBAAUR;oBAAM;kBAC7B;gBACF;cACF,OAAO;AACL,sBAAM,EAAEA,OAAO,GAAGQ,SAAAA,IAAa/D,OAAOmB;AACtCoC,sBAAMQ,SAASP,SAAS,QAAQ,kBAAkB,YAAA,EAAcO,QAAAA;cAClE;YACF;UACF;QACF;MACF;IACF;EACF;AACF;AGlMA,IAAA,cAAehH;",
6
+ "names": ["import_echo", "serializer", "serialize", "object", "threads", "_threads", "sheet", "JSON", "stringify", "deserialize", "content", "newId", "id", "parsed", "parse", "create", "SheetType", "core", "getObjectCore", "SHEET_PLUGIN", "SheetPlugin", "computeGraphRegistry", "meta", "ready", "plugins", "client", "resolvePlugin", "parseClientPlugin", "provides", "invariant", "remoteFunctionUrl", "config", "values", "runtime", "services", "edge", "url", "URL", "protocol", "toString", "defaultPlugins", "ComputeGraphRegistry", "context", "children", "React", "ComputeGraphContextProvider", "registry", "metadata", "records", "typename", "label", "name", "undefined", "placeholder", "ns", "icon", "translations", "echo", "schema", "FunctionType", "space", "onSpaceCreate", "action", "SheetAction", "CREATE", "graph", "builder", "dispatch", "parseIntentPlugin", "intent", "createExtension", "filter", "node", "isActionGroup", "startsWith", "SpaceAction", "ADD_OBJECT", "actions", "split", "at", "spaceId", "objectId", "spaces", "get", "find", "db", "getObjectById", "target", "data", "plugin", "NavigationAction", "OPEN", "properties", "testId", "markdown", "extensions", "document", "doc", "getSpace", "computeGraph", "getOrCreateGraph", "computeGraphFacet", "of", "stack", "creators", "type", "props", "Icon", "thread", "predicate", "createSort", "indexA", "indexB", "compareIndexPositions", "surface", "component", "role", "isEchoObject", "SheetContainer", "subject", "RangeList", "resolver", "createSheet", "INSERT_AXIS", "model", "axis", "index", "count", "_indices", "DROP_AXIS", "undo", "axisIndex", "undoData", "undoable", "message"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx":{"bytes":4118,"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}],"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/sheet-range-types.ts":{"bytes":3812,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/defs/types.ts":{"bytes":9728,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/meta.ts":{"bytes":1402,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/types.ts":{"bytes":10371,"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":13423,"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":692,"imports":[{"path":"packages/plugins/plugin-sheet/src/defs/sheet-range-types.ts","kind":"import-statement","original":"./sheet-range-types"},{"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/integrations/thread-ranges.ts":{"bytes":12469,"imports":[{"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/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/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-sheet/src/integrations/index.ts":{"bytes":527,"imports":[{"path":"packages/plugins/plugin-sheet/src/integrations/thread-ranges.ts","kind":"import-statement","original":"./thread-ranges"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/GridSheet/util.ts":{"bytes":22197,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","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"},{"path":"packages/plugins/plugin-sheet/src/integrations/index.ts","kind":"import-statement","original":"../../integrations"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/compute-node.ts":{"bytes":5958,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","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"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/functions/async-function.ts":{"bytes":19212,"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/compute-graph/functions/edge-function.ts":{"bytes":14333,"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/compute-graph/functions/async-function.ts","kind":"import-statement","original":"./async-function"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/functions/function-defs.ts":{"bytes":204669,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/functions/index.ts":{"bytes":749,"imports":[{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/async-function.ts","kind":"import-statement","original":"./async-function"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/edge-function.ts","kind":"import-statement","original":"./edge-function"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/function-defs.ts","kind":"import-statement","original":"./function-defs"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/compute-graph.ts":{"bytes":29202,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","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/compute-graph/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/compute-graph-registry.ts":{"bytes":9451,"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/compute-graph/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/index.ts":{"bytes":847,"imports":[{"path":"packages/plugins/plugin-sheet/src/compute-graph/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/compute-graph-registry.ts","kind":"import-statement","original":"./compute-graph-registry"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/compute.ts":{"bytes":18005,"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","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/compute-graph/index.ts","kind":"import-statement","original":"../compute-graph"}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/editor/extension.ts":{"bytes":28505,"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","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/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/model/sheet-model.ts":{"bytes":59722,"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":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/compute-graph/index.ts","kind":"import-statement","original":"../compute-graph"},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../defs"}],"format":"esm"},"packages/plugins/plugin-sheet/src/model/useSheetModel.ts":{"bytes":3105,"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/model/index.ts":{"bytes":619,"imports":[{"path":"packages/plugins/plugin-sheet/src/model/sheet-model.ts","kind":"import-statement","original":"./sheet-model"},{"path":"packages/plugins/plugin-sheet/src/model/useSheetModel.ts","kind":"import-statement","original":"./useSheetModel"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetContext/SheetContext.tsx":{"bytes":10656,"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/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":45559,"imports":[{"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/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/integrations/index.ts","kind":"import-statement","original":"../../integrations"},{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/plugin-sheet/src/types.ts","kind":"import-statement","original":"../../types"},{"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/RangeList/RangeList.tsx":{"bytes":6853,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","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/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/plugin-sheet/src/types.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/RangeList/index.ts":{"bytes":523,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/RangeList/RangeList.tsx","kind":"import-statement","original":"./RangeList"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetObjectSettings.tsx":{"bytes":3631,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/meta","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/components/RangeList/index.ts","kind":"import-statement","original":"./RangeList"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx":{"bytes":4952,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","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":33000,"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/integrations/index.ts","kind":"import-statement","original":"../../integrations"},{"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":4440,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","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/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":1303,"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/RangeList/index.ts","kind":"import-statement","original":"./RangeList"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts","kind":"import-statement","original":"./SheetContext"},{"path":"packages/plugins/plugin-sheet/src/components/SheetObjectSettings.tsx","kind":"import-statement","original":"./SheetObjectSettings"},{"path":"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts","kind":"dynamic-import","original":"./SheetContainer"}],"format":"esm"},"packages/plugins/plugin-sheet/src/serializer.ts":{"bytes":2746,"imports":[{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-sheet/src/translations.ts":{"bytes":5078,"imports":[{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-sheet/src/SheetPlugin.tsx":{"bytes":31112,"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/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-sheet/src/serializer.ts","kind":"import-statement","original":"./serializer"},{"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/compute-graph/index.ts","kind":"dynamic-import","original":"./compute-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/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17297},"packages/plugins/plugin-sheet/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-TS6IBEPZ.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","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":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/dist/lib/node/compute-graph-KGWA2QLE.cjs","kind":"dynamic-import"}],"exports":["SheetPlugin","default"],"entryPoint":"packages/plugins/plugin-sheet/src/index.ts","inputs":{"packages/plugins/plugin-sheet/src/SheetPlugin.tsx":{"bytesInOutput":8461},"packages/plugins/plugin-sheet/src/serializer.ts":{"bytesInOutput":474},"packages/plugins/plugin-sheet/src/translations.ts":{"bytesInOutput":1526},"packages/plugins/plugin-sheet/src/index.ts":{"bytesInOutput":31}},"bytes":11189},"packages/plugins/plugin-sheet/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","kind":"import-statement"}],"exports":["SHEET_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-sheet/src/meta.ts","inputs":{},"bytes":159},"packages/plugins/plugin-sheet/dist/lib/node/types.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/node/types.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","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/node/compute-graph-KGWA2QLE.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/node/compute-graph-KGWA2QLE.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","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/compute-graph/index.ts","inputs":{},"bytes":766},"packages/plugins/plugin-sheet/dist/lib/node/SheetContainer-3373SORI.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21987},"packages/plugins/plugin-sheet/dist/lib/node/SheetContainer-3373SORI.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-TS6IBEPZ.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","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":919},"packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx":{"bytesInOutput":1259},"packages/plugins/plugin-sheet/src/components/FunctionEditor/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/Toolbar/Toolbar.tsx":{"bytesInOutput":7574},"packages/plugins/plugin-sheet/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts":{"bytesInOutput":45}},"bytes":10682},"packages/plugins/plugin-sheet/dist/lib/node/chunk-TS6IBEPZ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":104166},"packages/plugins/plugin-sheet/dist/lib/node/chunk-TS6IBEPZ.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","kind":"import-statement"},{"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":"@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","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","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","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":"@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":"#hyperformula","kind":"import-statement","external":true},{"path":"react","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/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-form","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/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":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/meta","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/dist/lib/node/SheetContainer-3373SORI.cjs","kind":"dynamic-import"}],"exports":["ComputeGraphContextProvider","GridSheet","SheetContainer","SheetObjectSettings","SheetProvider","completeCellRangeToThreadCursor","computeGraphFacet","useComputeGraph","useSheetContext"],"inputs":{"packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx":{"bytesInOutput":775},"packages/plugins/plugin-sheet/src/components/ComputeGraph/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/extensions/compute.ts":{"bytesInOutput":460},"packages/plugins/plugin-sheet/src/extensions/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/extensions/editor/extension.ts":{"bytesInOutput":5970},"packages/plugins/plugin-sheet/src/extensions/editor/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/SheetContext/SheetContext.tsx":{"bytesInOutput":2321},"packages/plugins/plugin-sheet/src/model/sheet-model.ts":{"bytesInOutput":14689},"packages/plugins/plugin-sheet/src/model/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/model/useSheetModel.ts":{"bytesInOutput":543},"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/GridSheet/GridSheet.tsx":{"bytesInOutput":11057},"packages/plugins/plugin-sheet/src/components/GridSheet/util.ts":{"bytesInOutput":5286},"packages/plugins/plugin-sheet/src/integrations/thread-ranges.ts":{"bytesInOutput":2849},"packages/plugins/plugin-sheet/src/components/index.ts":{"bytesInOutput":104},"packages/plugins/plugin-sheet/src/components/GridSheet/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/RangeList/RangeList.tsx":{"bytesInOutput":1515},"packages/plugins/plugin-sheet/src/components/RangeList/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/SheetObjectSettings.tsx":{"bytesInOutput":839},"packages/plugins/plugin-sheet/src/integrations/index.ts":{"bytesInOutput":0}},"bytes":48321},"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":144432},"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","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":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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","DEFAULT_COLUMNS","DEFAULT_ROWS","EDGE_FUNCTION_NAME","EdgeFunctionPlugin","EdgeFunctionPluginTranslations","FunctionContext","MAX_COLUMNS","MAX_ROWS","RANGE_NOTATION","ReadonlyException","addressFromA1Notation","addressFromIndex","addressToA1Notation","addressToIndex","alignKey","cellClassNameForRange","compareIndexPositions","createSheet","createSheetName","defaultFunctionContextOptions","defaultFunctions","defaultOptions","defaultPlugins","inRange","initialize","insertIndices","isFormula","parseSheetName","rangeFromIndex","rangeToA1Notation","rangeToIndex","styleKey"],"inputs":{"packages/plugins/plugin-sheet/src/compute-graph/compute-graph.ts":{"bytesInOutput":6625},"packages/plugins/plugin-sheet/src/compute-graph/compute-node.ts":{"bytesInOutput":993},"packages/plugins/plugin-sheet/src/defs/sheet-range-types.ts":{"bytesInOutput":709},"packages/plugins/plugin-sheet/src/defs/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/defs/types.ts":{"bytesInOutput":2045},"packages/plugins/plugin-sheet/src/defs/util.ts":{"bytesInOutput":2468},"packages/plugins/plugin-sheet/src/compute-graph/functions/async-function.ts":{"bytesInOutput":4094},"packages/plugins/plugin-sheet/src/compute-graph/functions/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/compute-graph/functions/edge-function.ts":{"bytesInOutput":3599},"packages/plugins/plugin-sheet/src/compute-graph/functions/function-defs.ts":{"bytesInOutput":68677},"packages/plugins/plugin-sheet/src/compute-graph/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/compute-graph/compute-graph-registry.ts":{"bytesInOutput":1918}},"bytes":92680},"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5747},"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","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":1811}},"bytes":2036},"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":672},"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs":{"imports":[],"exports":["SHEET_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-sheet/src/meta.ts":{"bytesInOutput":267}},"bytes":400}}}
1
+ {"inputs":{"packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx":{"bytes":4118,"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}],"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/sheet-range-types.ts":{"bytes":3812,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/defs/types.ts":{"bytes":9728,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-sheet/src/meta.ts":{"bytes":1402,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/types.ts":{"bytes":10371,"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":13423,"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":692,"imports":[{"path":"packages/plugins/plugin-sheet/src/defs/sheet-range-types.ts","kind":"import-statement","original":"./sheet-range-types"},{"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/integrations/thread-ranges.ts":{"bytes":12290,"imports":[{"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/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/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-sheet/src/integrations/index.ts":{"bytes":527,"imports":[{"path":"packages/plugins/plugin-sheet/src/integrations/thread-ranges.ts","kind":"import-statement","original":"./thread-ranges"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/GridSheet/util.ts":{"bytes":22197,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","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"},{"path":"packages/plugins/plugin-sheet/src/integrations/index.ts","kind":"import-statement","original":"../../integrations"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/compute-node.ts":{"bytes":5958,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","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"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/functions/async-function.ts":{"bytes":19212,"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/compute-graph/functions/edge-function.ts":{"bytes":14333,"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/compute-graph/functions/async-function.ts","kind":"import-statement","original":"./async-function"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/functions/function-defs.ts":{"bytes":204669,"imports":[],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/functions/index.ts":{"bytes":749,"imports":[{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/async-function.ts","kind":"import-statement","original":"./async-function"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/edge-function.ts","kind":"import-statement","original":"./edge-function"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/function-defs.ts","kind":"import-statement","original":"./function-defs"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/compute-graph.ts":{"bytes":29202,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","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/compute-graph/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/compute-graph-registry.ts":{"bytes":9451,"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/compute-graph/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/compute-graph/index.ts":{"bytes":847,"imports":[{"path":"packages/plugins/plugin-sheet/src/compute-graph/compute-graph.ts","kind":"import-statement","original":"./compute-graph"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/compute-graph-registry.ts","kind":"import-statement","original":"./compute-graph-registry"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/compute-node.ts","kind":"import-statement","original":"./compute-node"},{"path":"packages/plugins/plugin-sheet/src/compute-graph/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/compute.ts":{"bytes":18005,"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","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/compute-graph/index.ts","kind":"import-statement","original":"../compute-graph"}],"format":"esm"},"packages/plugins/plugin-sheet/src/extensions/editor/extension.ts":{"bytes":28505,"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","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/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/model/sheet-model.ts":{"bytes":59722,"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":"#hyperformula","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/compute-graph/index.ts","kind":"import-statement","original":"../compute-graph"},{"path":"packages/plugins/plugin-sheet/src/defs/index.ts","kind":"import-statement","original":"../defs"}],"format":"esm"},"packages/plugins/plugin-sheet/src/model/useSheetModel.ts":{"bytes":3105,"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/model/index.ts":{"bytes":619,"imports":[{"path":"packages/plugins/plugin-sheet/src/model/sheet-model.ts","kind":"import-statement","original":"./sheet-model"},{"path":"packages/plugins/plugin-sheet/src/model/useSheetModel.ts","kind":"import-statement","original":"./useSheetModel"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/SheetContext/SheetContext.tsx":{"bytes":10656,"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/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":44781,"imports":[{"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/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/integrations/index.ts","kind":"import-statement","original":"../../integrations"},{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/plugin-sheet/src/types.ts","kind":"import-statement","original":"../../types"},{"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/RangeList/RangeList.tsx":{"bytes":6853,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","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/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/plugin-sheet/src/types.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/RangeList/index.ts":{"bytes":523,"imports":[{"path":"packages/plugins/plugin-sheet/src/components/RangeList/RangeList.tsx","kind":"import-statement","original":"./RangeList"}],"format":"esm"},"packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx":{"bytes":4952,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","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":32708,"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/integrations/index.ts","kind":"import-statement","original":"../../integrations"},{"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":4440,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","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/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":1188,"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/RangeList/index.ts","kind":"import-statement","original":"./RangeList"},{"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/serializer.ts":{"bytes":2746,"imports":[{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-sheet/src/translations.ts":{"bytes":5078,"imports":[{"path":"packages/plugins/plugin-sheet/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-sheet/src/SheetPlugin.tsx":{"bytes":31482,"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/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-sheet/src/serializer.ts","kind":"import-statement","original":"./serializer"},{"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/compute-graph/index.ts","kind":"dynamic-import","original":"./compute-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/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17446},"packages/plugins/plugin-sheet/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-J5ZFWMOD.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","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":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/dist/lib/node/compute-graph-KGWA2QLE.cjs","kind":"dynamic-import"}],"exports":["SheetPlugin","default"],"entryPoint":"packages/plugins/plugin-sheet/src/index.ts","inputs":{"packages/plugins/plugin-sheet/src/SheetPlugin.tsx":{"bytesInOutput":8563},"packages/plugins/plugin-sheet/src/serializer.ts":{"bytesInOutput":474},"packages/plugins/plugin-sheet/src/translations.ts":{"bytesInOutput":1526},"packages/plugins/plugin-sheet/src/index.ts":{"bytesInOutput":31}},"bytes":11281},"packages/plugins/plugin-sheet/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","kind":"import-statement"}],"exports":["SHEET_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-sheet/src/meta.ts","inputs":{},"bytes":159},"packages/plugins/plugin-sheet/dist/lib/node/types.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/node/types.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","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/node/compute-graph-KGWA2QLE.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-sheet/dist/lib/node/compute-graph-KGWA2QLE.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","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/compute-graph/index.ts","inputs":{},"bytes":766},"packages/plugins/plugin-sheet/dist/lib/node/SheetContainer-BSDHHYXE.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21834},"packages/plugins/plugin-sheet/dist/lib/node/SheetContainer-BSDHHYXE.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-J5ZFWMOD.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","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":919},"packages/plugins/plugin-sheet/src/components/FunctionEditor/FunctionEditor.tsx":{"bytesInOutput":1259},"packages/plugins/plugin-sheet/src/components/FunctionEditor/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/Toolbar/Toolbar.tsx":{"bytesInOutput":7517},"packages/plugins/plugin-sheet/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/SheetContainer/index.ts":{"bytesInOutput":45}},"bytes":10625},"packages/plugins/plugin-sheet/dist/lib/node/chunk-J5ZFWMOD.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":101841},"packages/plugins/plugin-sheet/dist/lib/node/chunk-J5ZFWMOD.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","kind":"import-statement"},{"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":"@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","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","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","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":"@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":"#hyperformula","kind":"import-statement","external":true},{"path":"react","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/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-form","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/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":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-sheet/dist/lib/node/SheetContainer-BSDHHYXE.cjs","kind":"dynamic-import"}],"exports":["ComputeGraphContextProvider","GridSheet","RangeList","SheetContainer","SheetProvider","completeCellRangeToThreadCursor","computeGraphFacet","useComputeGraph","useSheetContext"],"inputs":{"packages/plugins/plugin-sheet/src/components/ComputeGraph/ComputeGraphContextProvider.tsx":{"bytesInOutput":775},"packages/plugins/plugin-sheet/src/components/ComputeGraph/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/extensions/compute.ts":{"bytesInOutput":460},"packages/plugins/plugin-sheet/src/extensions/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/extensions/editor/extension.ts":{"bytesInOutput":5970},"packages/plugins/plugin-sheet/src/extensions/editor/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/SheetContext/SheetContext.tsx":{"bytesInOutput":2321},"packages/plugins/plugin-sheet/src/model/sheet-model.ts":{"bytesInOutput":14689},"packages/plugins/plugin-sheet/src/model/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/model/useSheetModel.ts":{"bytesInOutput":543},"packages/plugins/plugin-sheet/src/components/SheetContext/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/GridSheet/GridSheet.tsx":{"bytesInOutput":10887},"packages/plugins/plugin-sheet/src/components/GridSheet/util.ts":{"bytesInOutput":5286},"packages/plugins/plugin-sheet/src/integrations/thread-ranges.ts":{"bytesInOutput":2800},"packages/plugins/plugin-sheet/src/components/index.ts":{"bytesInOutput":104},"packages/plugins/plugin-sheet/src/components/GridSheet/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/components/RangeList/RangeList.tsx":{"bytesInOutput":1515},"packages/plugins/plugin-sheet/src/components/RangeList/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/integrations/index.ts":{"bytesInOutput":0}},"bytes":47180},"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":144432},"packages/plugins/plugin-sheet/dist/lib/node/chunk-O7XR4R7Y.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs","kind":"import-statement"},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","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":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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","DEFAULT_COLUMNS","DEFAULT_ROWS","EDGE_FUNCTION_NAME","EdgeFunctionPlugin","EdgeFunctionPluginTranslations","FunctionContext","MAX_COLUMNS","MAX_ROWS","RANGE_NOTATION","ReadonlyException","addressFromA1Notation","addressFromIndex","addressToA1Notation","addressToIndex","alignKey","cellClassNameForRange","compareIndexPositions","createSheet","createSheetName","defaultFunctionContextOptions","defaultFunctions","defaultOptions","defaultPlugins","inRange","initialize","insertIndices","isFormula","parseSheetName","rangeFromIndex","rangeToA1Notation","rangeToIndex","styleKey"],"inputs":{"packages/plugins/plugin-sheet/src/compute-graph/compute-graph.ts":{"bytesInOutput":6625},"packages/plugins/plugin-sheet/src/compute-graph/compute-node.ts":{"bytesInOutput":993},"packages/plugins/plugin-sheet/src/defs/sheet-range-types.ts":{"bytesInOutput":709},"packages/plugins/plugin-sheet/src/defs/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/defs/types.ts":{"bytesInOutput":2045},"packages/plugins/plugin-sheet/src/defs/util.ts":{"bytesInOutput":2468},"packages/plugins/plugin-sheet/src/compute-graph/functions/async-function.ts":{"bytesInOutput":4094},"packages/plugins/plugin-sheet/src/compute-graph/functions/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/compute-graph/functions/edge-function.ts":{"bytesInOutput":3599},"packages/plugins/plugin-sheet/src/compute-graph/functions/function-defs.ts":{"bytesInOutput":68677},"packages/plugins/plugin-sheet/src/compute-graph/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-sheet/src/compute-graph/compute-graph-registry.ts":{"bytesInOutput":1918}},"bytes":92680},"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5747},"packages/plugins/plugin-sheet/dist/lib/node/chunk-AWKOWDMI.cjs":{"imports":[{"path":"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs","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":1811}},"bytes":2036},"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":672},"packages/plugins/plugin-sheet/dist/lib/node/chunk-2ZVZI2KJ.cjs":{"imports":[],"exports":["SHEET_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-sheet/src/meta.ts":{"bytesInOutput":267}},"bytes":400}}}
@@ -5,7 +5,7 @@ import {
5
5
  completeCellRangeToThreadCursor,
6
6
  useComputeGraph,
7
7
  useSheetContext
8
- } from "./chunk-7F3BRKP7.mjs";
8
+ } from "./chunk-6GSTEN7N.mjs";
9
9
  import {
10
10
  addressToA1Notation,
11
11
  alignKey,
@@ -191,8 +191,7 @@ var Alignment = () => {
191
191
  itemType: "toggleGroupItem",
192
192
  key: value2,
193
193
  value: value2,
194
- icon,
195
- "data-testid": `grid.toolbar.${alignKey}.${value2}`
194
+ icon
196
195
  }, t("toolbar action label", {
197
196
  key: t(`range key ${alignKey} label`),
198
197
  value: t(`range value ${value2} label`)
@@ -293,4 +292,4 @@ var SheetContainer_default = SheetContainer;
293
292
  export {
294
293
  SheetContainer_default as default
295
294
  };
296
- //# sourceMappingURL=SheetContainer-CH2RYBXJ.mjs.map
295
+ //# sourceMappingURL=SheetContainer-T47T2NYJ.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/SheetContainer/SheetContainer.tsx", "../../../src/components/FunctionEditor/FunctionEditor.tsx", "../../../src/components/Toolbar/Toolbar.tsx", "../../../src/components/SheetContainer/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { type SheetType } from '../../types';\nimport { useComputeGraph } from '../ComputeGraph';\nimport { FunctionEditor } from '../FunctionEditor';\nimport { GridSheet } from '../GridSheet';\nimport { SheetProvider } from '../SheetContext';\nimport { Toolbar } from '../Toolbar';\n\nexport const SheetContainer = ({\n space,\n sheet,\n role,\n ignoreAttention,\n}: {\n space: Space;\n sheet: SheetType;\n role?: string;\n ignoreAttention?: boolean;\n}) => {\n const graph = useComputeGraph(space);\n\n return graph ? (\n <SheetProvider sheet={sheet} graph={graph} ignoreAttention={ignoreAttention}>\n <StackItem.Content toolbar statusbar {...(role === 'section' && { classNames: 'aspect-video' })}>\n <Toolbar.Root role={role}>\n <Toolbar.Styles />\n <Toolbar.Alignment />\n <Toolbar.Separator />\n <Toolbar.Actions />\n </Toolbar.Root>\n <GridSheet />\n <FunctionEditor />\n </StackItem.Content>\n </SheetProvider>\n ) : null;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\n\nimport { addressToA1Notation, isFormula, rangeToA1Notation } from '../../defs';\nimport { useSheetContext } from '../SheetContext';\n\nexport const FunctionEditor = () => {\n const { model, cursor, range } = useSheetContext();\n\n let value;\n let formula = false;\n if (cursor) {\n value = model.getCellValue(cursor);\n if (isFormula(value)) {\n value = model.graph.mapFunctionBindingFromId(model.mapFormulaIndicesToRefs(value));\n formula = true;\n } else if (value != null) {\n value = String(value);\n }\n }\n\n return (\n <div className='flex shrink-0 justify-between items-center px-4 py-1 text-sm attention-surface border-bs !border-separator'>\n <div className='flex gap-4 items-center'>\n <div className='flex w-16 items-center font-mono'>\n {(range && rangeToA1Notation(range)) || (cursor && addressToA1Notation(cursor))}\n </div>\n <div className='flex gap-2 items-center'>\n <Icon icon='ph--function--regular' classNames={['text-greenText', formula ? 'visible' : 'invisible']} />\n <span className='font-mono'>{value}</span>\n </div>\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type PropsWithChildren, useCallback } from 'react';\n\nimport { useIntentDispatcher } from '@dxos/app-framework';\nimport {\n Icon,\n type ThemedClassName,\n Toolbar as NaturalToolbar,\n type ToolbarButtonProps as NaturalToolbarButtonProps,\n type ToolbarToggleGroupItemProps as NaturalToolbarToggleGroupItemProps,\n type ToolbarToggleProps as NaturalToolbarToggleProps,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\nimport { useAttention } from '@dxos/react-ui-attention';\nimport { nonNullable } from '@dxos/util';\n\nimport {\n alignKey,\n type AlignKey,\n type AlignValue,\n type CommentKey,\n type CommentValue,\n inRange,\n rangeFromIndex,\n rangeToIndex,\n styleKey,\n type StyleKey,\n type StyleValue,\n} from '../../defs';\nimport { completeCellRangeToThreadCursor } from '../../integrations';\nimport { SHEET_PLUGIN } from '../../meta';\nimport { type SheetType } from '../../types';\nimport { useSheetContext } from '../SheetContext';\n\n//\n// Buttons\n//\n\nconst buttonStyles = 'min-bs-0 p-2';\nconst tooltipProps = { side: 'bottom' as const, classNames: 'z-10' };\n\nconst ToolbarSeparator = () => <div role='separator' className='grow' />;\n\n//\n// ToolbarItem\n//\n\ntype ToolbarItemProps =\n | (NaturalToolbarButtonProps & { itemType: 'button'; icon: string })\n | (NaturalToolbarToggleGroupItemProps & { itemType: 'toggleGroupItem'; icon: string })\n | (NaturalToolbarToggleProps & { itemType: 'toggle'; icon: string });\n\nexport const ToolbarItem = ({ itemType, icon, children, ...props }: ToolbarItemProps) => {\n const Invoker =\n itemType === 'toggleGroupItem'\n ? NaturalToolbar.ToggleGroupItem\n : itemType === 'toggle'\n ? NaturalToolbar.Toggle\n : NaturalToolbar.Button;\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n {/* TODO(thure): type the props spread better. */}\n <Invoker variant='ghost' {...(props as any)} classNames={buttonStyles}>\n <Icon icon={icon} size={5} />\n <span className='sr-only'>{children}</span>\n </Invoker>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content {...tooltipProps}>\n {children}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\n//\n// Root\n//\n\ntype AlignAction = { key: AlignKey; value: AlignValue };\ntype CommentAction = { key: CommentKey; value: CommentValue; cellContent?: string };\ntype StyleAction = { key: StyleKey; value: StyleValue };\n\nexport type ToolbarAction = StyleAction | AlignAction | CommentAction;\nexport type ToolbarActionAnnotated = ToolbarAction & { unset?: boolean };\n\nexport type ToolbarActionType = ToolbarAction['key'];\n\nexport type ToolbarActionHandler = (action: ToolbarActionAnnotated) => void;\n\nexport type ToolbarProps = ThemedClassName<\n PropsWithChildren<{\n role?: string;\n }>\n>;\n\nconst [ToolbarContextProvider, useToolbarContext] = createContext<{\n onAction: (action: ToolbarActionAnnotated) => void;\n}>('Toolbar');\n\ntype Range = SheetType['ranges'][number];\n\nconst ToolbarRoot = ({ children, role, classNames }: ToolbarProps) => {\n const { id, model, cursorFallbackRange, cursor } = useSheetContext();\n const { hasAttention } = useAttention(id);\n const dispatch = useIntentDispatcher();\n\n // TODO(Zan): Externalize the toolbar action handler. E.g., Toolbar/keys should both fire events.\n const handleAction = useCallback(\n (action: ToolbarActionAnnotated) => {\n switch (action.key) {\n case 'alignment':\n if (cursorFallbackRange) {\n const index =\n model.sheet.ranges?.findIndex(\n (range) =>\n range.key === action.key &&\n inRange(rangeFromIndex(model.sheet, range.range), cursorFallbackRange.from),\n ) ?? -1;\n const nextRangeEntity = {\n range: rangeToIndex(model.sheet, cursorFallbackRange),\n key: action.key,\n value: action.value,\n };\n if (index < 0) {\n model.sheet.ranges?.push(nextRangeEntity);\n } else if (model.sheet.ranges![index].value === action.value) {\n model.sheet.ranges?.splice(index, 1);\n } else {\n model.sheet.ranges?.splice(index, 1, nextRangeEntity);\n }\n }\n break;\n case 'style':\n if (action.unset) {\n const index = model.sheet.ranges?.findIndex(\n (range) =>\n range.key === action.key &&\n cursorFallbackRange &&\n inRange(rangeFromIndex(model.sheet, range.range), cursorFallbackRange.from),\n );\n if (index >= 0) {\n model.sheet.ranges?.splice(index, 1);\n }\n } else if (cursorFallbackRange) {\n model.sheet.ranges?.push({\n range: rangeToIndex(model.sheet, cursorFallbackRange),\n key: action.key,\n value: action.value,\n });\n }\n break;\n case 'comment': {\n // TODO(Zan): We shouldn't hardcode the action ID.\n if (cursorFallbackRange) {\n void dispatch({\n action: 'dxos.org/plugin/thread/action/create',\n data: {\n cursor: completeCellRangeToThreadCursor(cursorFallbackRange),\n name: action.cellContent,\n subject: model.sheet,\n },\n });\n }\n }\n }\n },\n [model.sheet, cursorFallbackRange, cursor, dispatch],\n );\n\n return (\n <ToolbarContextProvider onAction={handleAction}>\n <NaturalToolbar.Root classNames={['pli-0.5 attention-surface', !hasAttention && 'opacity-20', classNames]}>\n {children}\n </NaturalToolbar.Root>\n </ToolbarContextProvider>\n );\n};\n\n// TODO(burdon): Generalize.\n// TODO(burdon): Detect and display current state.\ntype ButtonProps<T> = {\n value: T;\n icon: string;\n disabled?: (state: Range) => boolean;\n};\n\n//\n// Alignment\n//\n\nconst alignmentOptions: ButtonProps<AlignValue>[] = [\n { value: 'start', icon: 'ph--text-align-left--regular' },\n { value: 'center', icon: 'ph--text-align-center--regular' },\n { value: 'end', icon: 'ph--text-align-right--regular' },\n];\n\nconst Alignment = () => {\n const { cursor, model } = useSheetContext();\n const { onAction } = useToolbarContext('Alignment');\n const { t } = useTranslation(SHEET_PLUGIN);\n\n // TODO(thure): Can this O(n) call be memoized?\n const value = cursor\n ? model.sheet.ranges?.findLast(\n ({ range, key }) => key === alignKey && inRange(rangeFromIndex(model.sheet, range), cursor),\n )?.value\n : undefined;\n\n return (\n <NaturalToolbar.ToggleGroup\n type='single'\n value={\n // TODO(thure): providing `undefined` leaves the last item active which was active rather than showing none.\n value ?? 'never'\n }\n onValueChange={(value: AlignValue) => onAction?.({ key: alignKey, value })}\n >\n {alignmentOptions.map(({ value, icon }) => (\n <ToolbarItem\n itemType='toggleGroupItem'\n key={value}\n value={value}\n icon={icon}\n data-testid={`grid.toolbar.${alignKey}.${value}`}\n >\n {t('toolbar action label', {\n key: t(`range key ${alignKey} label`),\n value: t(`range value ${value} label`),\n })}\n </ToolbarItem>\n ))}\n </NaturalToolbar.ToggleGroup>\n );\n};\n\nconst styleOptions: ButtonProps<StyleValue>[] = [\n { value: 'highlight', icon: 'ph--highlighter--regular' },\n { value: 'softwrap', icon: 'ph--paragraph--regular' },\n];\n\nconst Styles = () => {\n const { cursorFallbackRange, model } = useSheetContext();\n const { onAction } = useToolbarContext('Styles');\n const { t } = useTranslation(SHEET_PLUGIN);\n\n // TODO(thure): Can this O(n) call be memoized?\n const activeValues = cursorFallbackRange\n ? model.sheet.ranges\n ?.filter(\n ({ range, key }) => key === 'style' && inRange(rangeFromIndex(model.sheet, range), cursorFallbackRange.from),\n )\n .reduce((acc, { value }) => {\n acc.add(value);\n return acc;\n }, new Set())\n : undefined;\n\n return (\n <>\n {styleOptions.map(({ value, icon }) => (\n <ToolbarItem\n itemType='toggle'\n key={value}\n pressed={activeValues?.has(value)}\n onPressedChange={(nextPressed: boolean) => {\n onAction?.({ key: 'style', value, unset: !nextPressed });\n }}\n icon={icon}\n >\n {t('toolbar action label', {\n key: t(`range key ${styleKey} label`),\n value: t(`range value ${value} label`),\n })}\n </ToolbarItem>\n ))}\n </>\n );\n};\n\n//\n// Actions\n//\n\nconst Actions = () => {\n const { onAction } = useToolbarContext('Actions');\n const { cursorFallbackRange, cursor, model } = useSheetContext();\n const { t } = useTranslation(SHEET_PLUGIN);\n\n // TODO(thure): Can this O(n) call be memoized?\n const overlapsCommentAnchor = (model.sheet.threads ?? [])\n .filter(nonNullable)\n .filter((thread) => thread.status !== 'resolved')\n .some((thread) => {\n if (!cursorFallbackRange) {\n return false;\n }\n return rangeToIndex(model.sheet, cursorFallbackRange) === thread.anchor;\n });\n\n const tooltipLabelKey = !cursor\n ? 'no cursor label'\n : overlapsCommentAnchor\n ? 'selection overlaps existing comment label'\n : 'comment label';\n\n return (\n <ToolbarItem\n itemType='button'\n value='comment'\n icon='ph--chat-text--regular'\n data-testid='editor.toolbar.comment'\n onClick={() => {\n if (!cursorFallbackRange) {\n return;\n }\n return onAction?.({\n key: 'comment',\n value: rangeToIndex(model.sheet, cursorFallbackRange),\n cellContent: model.getCellText(cursorFallbackRange.from),\n });\n }}\n disabled={!cursorFallbackRange || overlapsCommentAnchor}\n >\n {t(tooltipLabelKey)}\n </ToolbarItem>\n );\n};\n\nexport const Toolbar = {\n Root: ToolbarRoot,\n Separator: ToolbarSeparator,\n Alignment,\n Styles,\n Actions,\n};\n\nexport { useToolbarContext };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { SheetContainer } from './SheetContainer';\n\nexport default SheetContainer;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,OAAOA,YAAW;AAGlB,SAASC,iBAAiB;;;ACH1B,OAAOC,WAAW;AAElB,SAASC,YAAY;AAKd,IAAMC,iBAAiB,MAAA;AAC5B,QAAM,EAAEC,OAAOC,QAAQC,MAAK,IAAKC,gBAAAA;AAEjC,MAAIC;AACJ,MAAIC,UAAU;AACd,MAAIJ,QAAQ;AACVG,YAAQJ,MAAMM,aAAaL,MAAAA;AAC3B,QAAIM,UAAUH,KAAAA,GAAQ;AACpBA,cAAQJ,MAAMQ,MAAMC,yBAAyBT,MAAMU,wBAAwBN,KAAAA,CAAAA;AAC3EC,gBAAU;IACZ,WAAWD,SAAS,MAAM;AACxBA,cAAQO,OAAOP,KAAAA;IACjB;EACF;AAEA,SACE,sBAAA,cAACQ,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACD,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACD,OAAAA;IAAIC,WAAU;KACXX,SAASY,kBAAkBZ,KAAAA,KAAYD,UAAUc,oBAAoBd,MAAAA,CAAAA,GAEzE,sBAAA,cAACW,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACG,MAAAA;IAAKC,MAAK;IAAwBC,YAAY;MAAC;MAAkBb,UAAU,YAAY;;MACxF,sBAAA,cAACc,QAAAA;IAAKN,WAAU;KAAaT,KAAAA,CAAAA,CAAAA,CAAAA;AAKvC;;;ACnCA,SAASgB,qBAAqB;AAC9B,OAAOC,UAAiCC,mBAAmB;AAE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QAAQI,WAAS,IAAA,GAClB,gBAAAX,OAAA,cAACO,QAAQK,SAAO,IAAA,CAAA,GAElB,gBAAAZ,OAAA,cAACa,WAAAA,IAAAA,GACD,gBAAAb,OAAA,cAACc,gBAAAA,IAAAA,CAAAA,CAAAA,IAGH;AACN;;;AGrCA,IAAA,yBAAeC;",
6
- "names": ["React", "StackItem", "React", "Icon", "FunctionEditor", "model", "cursor", "range", "useSheetContext", "value", "formula", "getCellValue", "isFormula", "graph", "mapFunctionBindingFromId", "mapFormulaIndicesToRefs", "String", "div", "className", "rangeToA1Notation", "addressToA1Notation", "Icon", "icon", "classNames", "span", "createContext", "React", "useCallback", "useIntentDispatcher", "Icon", "Toolbar", "NaturalToolbar", "Tooltip", "useTranslation", "useAttention", "nonNullable", "buttonStyles", "tooltipProps", "side", "classNames", "ToolbarSeparator", "React", "div", "role", "className", "ToolbarItem", "itemType", "icon", "children", "props", "Invoker", "NaturalToolbar", "ToggleGroupItem", "Toggle", "Button", "Tooltip", "Root", "Trigger", "asChild", "variant", "Icon", "size", "span", "Portal", "Content", "Arrow", "ToolbarContextProvider", "useToolbarContext", "createContext", "ToolbarRoot", "id", "model", "cursorFallbackRange", "cursor", "useSheetContext", "hasAttention", "useAttention", "dispatch", "useIntentDispatcher", "handleAction", "useCallback", "action", "key", "index", "sheet", "ranges", "findIndex", "range", "inRange", "rangeFromIndex", "from", "nextRangeEntity", "rangeToIndex", "value", "push", "splice", "unset", "data", "completeCellRangeToThreadCursor", "name", "cellContent", "subject", "onAction", "alignmentOptions", "Alignment", "t", "useTranslation", "SHEET_PLUGIN", "findLast", "alignKey", "undefined", "ToggleGroup", "type", "onValueChange", "map", "data-testid", "styleOptions", "Styles", "activeValues", "filter", "reduce", "acc", "add", "Set", "pressed", "has", "onPressedChange", "nextPressed", "styleKey", "Actions", "overlapsCommentAnchor", "threads", "nonNullable", "thread", "status", "some", "anchor", "tooltipLabelKey", "onClick", "getCellText", "disabled", "Toolbar", "Separator", "SheetContainer", "space", "sheet", "role", "ignoreAttention", "graph", "useComputeGraph", "React", "SheetProvider", "StackItem", "Content", "toolbar", "statusbar", "classNames", "Toolbar", "Root", "Styles", "Alignment", "Separator", "Actions", "GridSheet", "FunctionEditor", "SheetContainer"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Space } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { type SheetType } from '../../types';\nimport { useComputeGraph } from '../ComputeGraph';\nimport { FunctionEditor } from '../FunctionEditor';\nimport { GridSheet } from '../GridSheet';\nimport { SheetProvider } from '../SheetContext';\nimport { Toolbar } from '../Toolbar';\n\nexport const SheetContainer = ({\n space,\n sheet,\n role,\n ignoreAttention,\n}: {\n space: Space;\n sheet: SheetType;\n role?: string;\n ignoreAttention?: boolean;\n}) => {\n const graph = useComputeGraph(space);\n\n return graph ? (\n <SheetProvider sheet={sheet} graph={graph} ignoreAttention={ignoreAttention}>\n <StackItem.Content toolbar statusbar {...(role === 'section' && { classNames: 'aspect-video' })}>\n <Toolbar.Root role={role}>\n <Toolbar.Styles />\n <Toolbar.Alignment />\n <Toolbar.Separator />\n <Toolbar.Actions />\n </Toolbar.Root>\n <GridSheet />\n <FunctionEditor />\n </StackItem.Content>\n </SheetProvider>\n ) : null;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\n\nimport { addressToA1Notation, isFormula, rangeToA1Notation } from '../../defs';\nimport { useSheetContext } from '../SheetContext';\n\nexport const FunctionEditor = () => {\n const { model, cursor, range } = useSheetContext();\n\n let value;\n let formula = false;\n if (cursor) {\n value = model.getCellValue(cursor);\n if (isFormula(value)) {\n value = model.graph.mapFunctionBindingFromId(model.mapFormulaIndicesToRefs(value));\n formula = true;\n } else if (value != null) {\n value = String(value);\n }\n }\n\n return (\n <div className='flex shrink-0 justify-between items-center px-4 py-1 text-sm attention-surface border-bs !border-separator'>\n <div className='flex gap-4 items-center'>\n <div className='flex w-16 items-center font-mono'>\n {(range && rangeToA1Notation(range)) || (cursor && addressToA1Notation(cursor))}\n </div>\n <div className='flex gap-2 items-center'>\n <Icon icon='ph--function--regular' classNames={['text-greenText', formula ? 'visible' : 'invisible']} />\n <span className='font-mono'>{value}</span>\n </div>\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type PropsWithChildren, useCallback } from 'react';\n\nimport { useIntentDispatcher } from '@dxos/app-framework';\nimport {\n Icon,\n type ThemedClassName,\n Toolbar as NaturalToolbar,\n type ToolbarButtonProps as NaturalToolbarButtonProps,\n type ToolbarToggleGroupItemProps as NaturalToolbarToggleGroupItemProps,\n type ToolbarToggleProps as NaturalToolbarToggleProps,\n Tooltip,\n useTranslation,\n} from '@dxos/react-ui';\nimport { useAttention } from '@dxos/react-ui-attention';\nimport { nonNullable } from '@dxos/util';\n\nimport {\n alignKey,\n type AlignKey,\n type AlignValue,\n type CommentKey,\n type CommentValue,\n inRange,\n rangeFromIndex,\n rangeToIndex,\n styleKey,\n type StyleKey,\n type StyleValue,\n} from '../../defs';\nimport { completeCellRangeToThreadCursor } from '../../integrations';\nimport { SHEET_PLUGIN } from '../../meta';\nimport { type SheetType } from '../../types';\nimport { useSheetContext } from '../SheetContext';\n\n//\n// Buttons\n//\n\nconst buttonStyles = 'min-bs-0 p-2';\nconst tooltipProps = { side: 'bottom' as const, classNames: 'z-10' };\n\nconst ToolbarSeparator = () => <div role='separator' className='grow' />;\n\n//\n// ToolbarItem\n//\n\ntype ToolbarItemProps =\n | (NaturalToolbarButtonProps & { itemType: 'button'; icon: string })\n | (NaturalToolbarToggleGroupItemProps & { itemType: 'toggleGroupItem'; icon: string })\n | (NaturalToolbarToggleProps & { itemType: 'toggle'; icon: string });\n\nexport const ToolbarItem = ({ itemType, icon, children, ...props }: ToolbarItemProps) => {\n const Invoker =\n itemType === 'toggleGroupItem'\n ? NaturalToolbar.ToggleGroupItem\n : itemType === 'toggle'\n ? NaturalToolbar.Toggle\n : NaturalToolbar.Button;\n return (\n <Tooltip.Root>\n <Tooltip.Trigger asChild>\n {/* TODO(thure): type the props spread better. */}\n <Invoker variant='ghost' {...(props as any)} classNames={buttonStyles}>\n <Icon icon={icon} size={5} />\n <span className='sr-only'>{children}</span>\n </Invoker>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Content {...tooltipProps}>\n {children}\n <Tooltip.Arrow />\n </Tooltip.Content>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n};\n\n//\n// Root\n//\n\ntype AlignAction = { key: AlignKey; value: AlignValue };\ntype CommentAction = { key: CommentKey; value: CommentValue; cellContent?: string };\ntype StyleAction = { key: StyleKey; value: StyleValue };\n\nexport type ToolbarAction = StyleAction | AlignAction | CommentAction;\nexport type ToolbarActionAnnotated = ToolbarAction & { unset?: boolean };\n\nexport type ToolbarActionType = ToolbarAction['key'];\n\nexport type ToolbarActionHandler = (action: ToolbarActionAnnotated) => void;\n\nexport type ToolbarProps = ThemedClassName<\n PropsWithChildren<{\n role?: string;\n }>\n>;\n\nconst [ToolbarContextProvider, useToolbarContext] = createContext<{\n onAction: (action: ToolbarActionAnnotated) => void;\n}>('Toolbar');\n\ntype Range = SheetType['ranges'][number];\n\nconst ToolbarRoot = ({ children, role, classNames }: ToolbarProps) => {\n const { id, model, cursorFallbackRange, cursor } = useSheetContext();\n const { hasAttention } = useAttention(id);\n const dispatch = useIntentDispatcher();\n\n // TODO(Zan): Externalize the toolbar action handler. E.g., Toolbar/keys should both fire events.\n const handleAction = useCallback(\n (action: ToolbarActionAnnotated) => {\n switch (action.key) {\n case 'alignment':\n if (cursorFallbackRange) {\n const index =\n model.sheet.ranges?.findIndex(\n (range) =>\n range.key === action.key &&\n inRange(rangeFromIndex(model.sheet, range.range), cursorFallbackRange.from),\n ) ?? -1;\n const nextRangeEntity = {\n range: rangeToIndex(model.sheet, cursorFallbackRange),\n key: action.key,\n value: action.value,\n };\n if (index < 0) {\n model.sheet.ranges?.push(nextRangeEntity);\n } else if (model.sheet.ranges![index].value === action.value) {\n model.sheet.ranges?.splice(index, 1);\n } else {\n model.sheet.ranges?.splice(index, 1, nextRangeEntity);\n }\n }\n break;\n case 'style':\n if (action.unset) {\n const index = model.sheet.ranges?.findIndex(\n (range) =>\n range.key === action.key &&\n cursorFallbackRange &&\n inRange(rangeFromIndex(model.sheet, range.range), cursorFallbackRange.from),\n );\n if (index >= 0) {\n model.sheet.ranges?.splice(index, 1);\n }\n } else if (cursorFallbackRange) {\n model.sheet.ranges?.push({\n range: rangeToIndex(model.sheet, cursorFallbackRange),\n key: action.key,\n value: action.value,\n });\n }\n break;\n case 'comment': {\n // TODO(Zan): We shouldn't hardcode the action ID.\n if (cursorFallbackRange) {\n void dispatch({\n action: 'dxos.org/plugin/thread/action/create',\n data: {\n cursor: completeCellRangeToThreadCursor(cursorFallbackRange),\n name: action.cellContent,\n subject: model.sheet,\n },\n });\n }\n }\n }\n },\n [model.sheet, cursorFallbackRange, cursor, dispatch],\n );\n\n return (\n <ToolbarContextProvider onAction={handleAction}>\n <NaturalToolbar.Root classNames={['pli-0.5 attention-surface', !hasAttention && 'opacity-20', classNames]}>\n {children}\n </NaturalToolbar.Root>\n </ToolbarContextProvider>\n );\n};\n\n// TODO(burdon): Generalize.\n// TODO(burdon): Detect and display current state.\ntype ButtonProps<T> = {\n value: T;\n icon: string;\n disabled?: (state: Range) => boolean;\n};\n\n//\n// Alignment\n//\n\nconst alignmentOptions: ButtonProps<AlignValue>[] = [\n { value: 'start', icon: 'ph--text-align-left--regular' },\n { value: 'center', icon: 'ph--text-align-center--regular' },\n { value: 'end', icon: 'ph--text-align-right--regular' },\n];\n\nconst Alignment = () => {\n const { cursor, model } = useSheetContext();\n const { onAction } = useToolbarContext('Alignment');\n const { t } = useTranslation(SHEET_PLUGIN);\n\n // TODO(thure): Can this O(n) call be memoized?\n const value = cursor\n ? model.sheet.ranges?.findLast(\n ({ range, key }) => key === alignKey && inRange(rangeFromIndex(model.sheet, range), cursor),\n )?.value\n : undefined;\n\n return (\n <NaturalToolbar.ToggleGroup\n type='single'\n value={\n // TODO(thure): providing `undefined` leaves the last item active which was active rather than showing none.\n value ?? 'never'\n }\n onValueChange={(value: AlignValue) => onAction?.({ key: alignKey, value })}\n >\n {alignmentOptions.map(({ value, icon }) => (\n <ToolbarItem itemType='toggleGroupItem' key={value} value={value} icon={icon}>\n {t('toolbar action label', {\n key: t(`range key ${alignKey} label`),\n value: t(`range value ${value} label`),\n })}\n </ToolbarItem>\n ))}\n </NaturalToolbar.ToggleGroup>\n );\n};\n\nconst styleOptions: ButtonProps<StyleValue>[] = [\n { value: 'highlight', icon: 'ph--highlighter--regular' },\n { value: 'softwrap', icon: 'ph--paragraph--regular' },\n];\n\nconst Styles = () => {\n const { cursorFallbackRange, model } = useSheetContext();\n const { onAction } = useToolbarContext('Styles');\n const { t } = useTranslation(SHEET_PLUGIN);\n\n // TODO(thure): Can this O(n) call be memoized?\n const activeValues = cursorFallbackRange\n ? model.sheet.ranges\n ?.filter(\n ({ range, key }) => key === 'style' && inRange(rangeFromIndex(model.sheet, range), cursorFallbackRange.from),\n )\n .reduce((acc, { value }) => {\n acc.add(value);\n return acc;\n }, new Set())\n : undefined;\n\n return (\n <>\n {styleOptions.map(({ value, icon }) => (\n <ToolbarItem\n itemType='toggle'\n key={value}\n pressed={activeValues?.has(value)}\n onPressedChange={(nextPressed: boolean) => {\n onAction?.({ key: 'style', value, unset: !nextPressed });\n }}\n icon={icon}\n >\n {t('toolbar action label', {\n key: t(`range key ${styleKey} label`),\n value: t(`range value ${value} label`),\n })}\n </ToolbarItem>\n ))}\n </>\n );\n};\n\n//\n// Actions\n//\n\nconst Actions = () => {\n const { onAction } = useToolbarContext('Actions');\n const { cursorFallbackRange, cursor, model } = useSheetContext();\n const { t } = useTranslation(SHEET_PLUGIN);\n\n // TODO(thure): Can this O(n) call be memoized?\n const overlapsCommentAnchor = (model.sheet.threads ?? [])\n .filter(nonNullable)\n .filter((thread) => thread.status !== 'resolved')\n .some((thread) => {\n if (!cursorFallbackRange) {\n return false;\n }\n return rangeToIndex(model.sheet, cursorFallbackRange) === thread.anchor;\n });\n\n const tooltipLabelKey = !cursor\n ? 'no cursor label'\n : overlapsCommentAnchor\n ? 'selection overlaps existing comment label'\n : 'comment label';\n\n return (\n <ToolbarItem\n itemType='button'\n value='comment'\n icon='ph--chat-text--regular'\n data-testid='editor.toolbar.comment'\n onClick={() => {\n if (!cursorFallbackRange) {\n return;\n }\n return onAction?.({\n key: 'comment',\n value: rangeToIndex(model.sheet, cursorFallbackRange),\n cellContent: model.getCellText(cursorFallbackRange.from),\n });\n }}\n disabled={!cursorFallbackRange || overlapsCommentAnchor}\n >\n {t(tooltipLabelKey)}\n </ToolbarItem>\n );\n};\n\nexport const Toolbar = {\n Root: ToolbarRoot,\n Separator: ToolbarSeparator,\n Alignment,\n Styles,\n Actions,\n};\n\nexport { useToolbarContext };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { SheetContainer } from './SheetContainer';\n\nexport default SheetContainer;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,OAAOA,YAAW;AAGlB,SAASC,iBAAiB;;;ACH1B,OAAOC,WAAW;AAElB,SAASC,YAAY;AAKd,IAAMC,iBAAiB,MAAA;AAC5B,QAAM,EAAEC,OAAOC,QAAQC,MAAK,IAAKC,gBAAAA;AAEjC,MAAIC;AACJ,MAAIC,UAAU;AACd,MAAIJ,QAAQ;AACVG,YAAQJ,MAAMM,aAAaL,MAAAA;AAC3B,QAAIM,UAAUH,KAAAA,GAAQ;AACpBA,cAAQJ,MAAMQ,MAAMC,yBAAyBT,MAAMU,wBAAwBN,KAAAA,CAAAA;AAC3EC,gBAAU;IACZ,WAAWD,SAAS,MAAM;AACxBA,cAAQO,OAAOP,KAAAA;IACjB;EACF;AAEA,SACE,sBAAA,cAACQ,OAAAA;IAAI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AACC,QAAMC,QAAQC,gBAAgBL,KAAAA;AAE9B,SAAOI,QACL,gBAAAE,OAAA,cAACC,eAAAA;IAAcN;IAAcG;IAAcD;KACzC,gBAAAG,OAAA,cAACE,UAAUC,SAAO;IAACC,SAAAA;IAAQC,WAAAA;IAAW,GAAIT,SAAS,aAAa;MAAEU,YAAY;IAAe;KAC3F,gBAAAN,OAAA,cAACO,QAAQC,MAAI;IAACZ;KACZ,gBAAAI,OAAA,cAACO,QAAQE,QAAM,IAAA,GACf,gBAAAT,OAAA,cAACO,QAAQG,WAAS,IAAA,GAClB,gBAAAV,OAAA,cAACO,QAAQI,WAAS,IAAA,GAClB,gBAAAX,OAAA,cAACO,QAAQK,SAAO,IAAA,CAAA,GAElB,gBAAAZ,OAAA,cAACa,WAAAA,IAAAA,GACD,gBAAAb,OAAA,cAACc,gBAAAA,IAAAA,CAAAA,CAAAA,IAGH;AACN;;;AGrCA,IAAA,yBAAeC;",
6
+ "names": ["React", "StackItem", "React", "Icon", "FunctionEditor", "model", "cursor", "range", "useSheetContext", "value", "formula", "getCellValue", "isFormula", "graph", "mapFunctionBindingFromId", "mapFormulaIndicesToRefs", "String", "div", "className", "rangeToA1Notation", "addressToA1Notation", "Icon", "icon", "classNames", "span", "createContext", "React", "useCallback", "useIntentDispatcher", "Icon", "Toolbar", "NaturalToolbar", "Tooltip", "useTranslation", "useAttention", "nonNullable", "buttonStyles", "tooltipProps", "side", "classNames", "ToolbarSeparator", "React", "div", "role", "className", "ToolbarItem", "itemType", "icon", "children", "props", "Invoker", "NaturalToolbar", "ToggleGroupItem", "Toggle", "Button", "Tooltip", "Root", "Trigger", "asChild", "variant", "Icon", "size", "span", "Portal", "Content", "Arrow", "ToolbarContextProvider", "useToolbarContext", "createContext", "ToolbarRoot", "id", "model", "cursorFallbackRange", "cursor", "useSheetContext", "hasAttention", "useAttention", "dispatch", "useIntentDispatcher", "handleAction", "useCallback", "action", "key", "index", "sheet", "ranges", "findIndex", "range", "inRange", "rangeFromIndex", "from", "nextRangeEntity", "rangeToIndex", "value", "push", "splice", "unset", "data", "completeCellRangeToThreadCursor", "name", "cellContent", "subject", "onAction", "alignmentOptions", "Alignment", "t", "useTranslation", "SHEET_PLUGIN", "findLast", "alignKey", "undefined", "ToggleGroup", "type", "onValueChange", "map", "styleOptions", "Styles", "activeValues", "filter", "reduce", "acc", "add", "Set", "pressed", "has", "onPressedChange", "nextPressed", "styleKey", "Actions", "overlapsCommentAnchor", "threads", "nonNullable", "thread", "status", "some", "anchor", "tooltipLabelKey", "data-testid", "onClick", "getCellText", "disabled", "Toolbar", "Separator", "SheetContainer", "space", "sheet", "role", "ignoreAttention", "graph", "useComputeGraph", "React", "SheetProvider", "StackItem", "Content", "toolbar", "statusbar", "classNames", "Toolbar", "Root", "Styles", "Alignment", "Separator", "Actions", "GridSheet", "FunctionEditor", "SheetContainer"]
7
7
  }