@dxos/plugin-sheet 0.8.4-main.abd8ff62ef → 0.8.4-main.bc2380dfbc

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 (195) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs +46 -0
  3. package/dist/lib/neutral/RangeList-HYB5S6KQ.mjs.map +7 -0
  4. package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs +33 -0
  5. package/dist/lib/neutral/SheetArticle-5AJRM3V3.mjs.map +7 -0
  6. package/dist/lib/neutral/SheetPlugin.mjs +48 -0
  7. package/dist/lib/neutral/SheetPlugin.mjs.map +7 -0
  8. package/dist/lib/neutral/SheetPlugin.node.mjs +27 -0
  9. package/dist/lib/neutral/SheetPlugin.node.mjs.map +7 -0
  10. package/dist/lib/neutral/SheetPlugin.workerd.mjs +21 -0
  11. package/dist/lib/neutral/SheetPlugin.workerd.mjs.map +7 -0
  12. package/dist/lib/neutral/anchor-sort-TTCKGX7V.mjs +22 -0
  13. package/dist/lib/neutral/anchor-sort-TTCKGX7V.mjs.map +7 -0
  14. package/dist/lib/neutral/capabilities/index.mjs +25 -0
  15. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-4SBAIU6F.mjs +234 -0
  17. package/dist/lib/neutral/chunk-4SBAIU6F.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-CGWDLWFZ.mjs +8 -0
  19. package/dist/lib/neutral/chunk-CGWDLWFZ.mjs.map +7 -0
  20. package/dist/lib/{browser/chunk-SVGX3MWY.mjs → neutral/chunk-KC2SMDNF.mjs} +160 -49
  21. package/dist/lib/neutral/chunk-KC2SMDNF.mjs.map +7 -0
  22. package/dist/lib/neutral/chunk-YFY6U524.mjs +83 -0
  23. package/dist/lib/neutral/chunk-YFY6U524.mjs.map +7 -0
  24. package/dist/lib/{browser/index.mjs → neutral/chunk-ZWOQCLH7.mjs} +1 -13
  25. package/dist/lib/neutral/chunk-ZWOQCLH7.mjs.map +7 -0
  26. package/dist/lib/neutral/comment-config-ZBWNCJMZ.mjs +20 -0
  27. package/dist/lib/neutral/comment-config-ZBWNCJMZ.mjs.map +7 -0
  28. package/dist/lib/neutral/components/index.mjs +1551 -0
  29. package/dist/lib/neutral/components/index.mjs.map +7 -0
  30. package/dist/lib/neutral/compute-graph-registry-IEQBF5XZ.mjs +20 -0
  31. package/dist/lib/neutral/compute-graph-registry-IEQBF5XZ.mjs.map +7 -0
  32. package/dist/lib/neutral/containers/index.mjs +11 -0
  33. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  34. package/dist/lib/neutral/create-object-OKQAXJCW.mjs +27 -0
  35. package/dist/lib/neutral/create-object-OKQAXJCW.mjs.map +7 -0
  36. package/dist/lib/{browser/drop-axis-ZLERPPPH.mjs → neutral/drop-axis-G6UOXG54.mjs} +4 -4
  37. package/dist/lib/neutral/drop-axis-G6UOXG54.mjs.map +7 -0
  38. package/dist/lib/{node-esm/types → neutral}/index.mjs +14 -5
  39. package/dist/lib/{browser/insert-axis-WTRA3HE7.mjs → neutral/insert-axis-ZFFNG22G.mjs} +4 -4
  40. package/dist/lib/neutral/insert-axis-ZFFNG22G.mjs.map +7 -0
  41. package/dist/lib/neutral/markdown-I2AKJYPF.mjs +28 -0
  42. package/dist/lib/neutral/markdown-I2AKJYPF.mjs.map +7 -0
  43. package/dist/lib/neutral/meta.json +1 -0
  44. package/dist/lib/neutral/meta.mjs +8 -0
  45. package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs +13 -0
  46. package/dist/lib/neutral/operation-handler-TB6LFV2H.mjs.map +7 -0
  47. package/dist/lib/neutral/operations/index.mjs +8 -0
  48. package/dist/lib/neutral/plugin.mjs +16 -0
  49. package/dist/lib/neutral/plugin.mjs.map +7 -0
  50. package/dist/lib/neutral/react-surface-VSTQNVPT.mjs +44 -0
  51. package/dist/lib/neutral/react-surface-VSTQNVPT.mjs.map +7 -0
  52. package/dist/lib/{browser/restore-axis-PYGPW2TB.mjs → neutral/restore-axis-44DM6N54.mjs} +4 -4
  53. package/dist/lib/neutral/restore-axis-44DM6N54.mjs.map +7 -0
  54. package/dist/lib/neutral/scroll-to-anchor-QPOGMAQG.mjs +33 -0
  55. package/dist/lib/neutral/scroll-to-anchor-QPOGMAQG.mjs.map +7 -0
  56. package/dist/lib/neutral/state-HPA27MX2.mjs +29 -0
  57. package/dist/lib/neutral/state-HPA27MX2.mjs.map +7 -0
  58. package/dist/lib/neutral/testing/index.mjs +103 -0
  59. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  60. package/dist/lib/{browser → neutral}/types/index.mjs +5 -3
  61. package/dist/lib/neutral/types/index.mjs.map +7 -0
  62. package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs +31 -0
  63. package/dist/lib/neutral/undo-mappings-3FQLSTCZ.mjs.map +7 -0
  64. package/dist/types/src/SheetPlugin.d.ts.map +1 -1
  65. package/dist/types/src/SheetPlugin.node.d.ts.map +1 -1
  66. package/dist/types/src/SheetPlugin.workerd.d.ts +4 -0
  67. package/dist/types/src/SheetPlugin.workerd.d.ts.map +1 -0
  68. package/dist/types/src/capabilities/comment-config.d.ts +12 -0
  69. package/dist/types/src/capabilities/comment-config.d.ts.map +1 -0
  70. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  71. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  72. package/dist/types/src/capabilities/index.d.ts +16 -2
  73. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  74. package/dist/types/src/capabilities/markdown.d.ts +1 -1
  75. package/dist/types/src/capabilities/state.d.ts +2 -2
  76. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  77. package/dist/types/src/components/ComputeGraph/compute-graph.stories.d.ts.map +1 -1
  78. package/dist/types/src/containers/RangeList/RangeList.d.ts +1 -1
  79. package/dist/types/src/containers/RangeList/RangeList.d.ts.map +1 -1
  80. package/dist/types/src/containers/{SheetContainer/SheetContainer.d.ts → SheetArticle/SheetArticle.d.ts} +3 -3
  81. package/dist/types/src/containers/SheetArticle/SheetArticle.d.ts.map +1 -0
  82. package/dist/types/src/containers/{SheetContainer/SheetContainer.stories.d.ts → SheetArticle/SheetArticle.stories.d.ts} +2 -2
  83. package/dist/types/src/containers/SheetArticle/SheetArticle.stories.d.ts.map +1 -0
  84. package/dist/types/src/containers/SheetArticle/index.d.ts +2 -0
  85. package/dist/types/src/containers/SheetArticle/index.d.ts.map +1 -0
  86. package/dist/types/src/containers/index.d.ts +1 -1
  87. package/dist/types/src/containers/index.d.ts.map +1 -1
  88. package/dist/types/src/index.d.ts +2 -3
  89. package/dist/types/src/index.d.ts.map +1 -1
  90. package/dist/types/src/operations/drop-axis.d.ts +2 -2
  91. package/dist/types/src/operations/drop-axis.d.ts.map +1 -1
  92. package/dist/types/src/operations/index.d.ts +0 -1
  93. package/dist/types/src/operations/index.d.ts.map +1 -1
  94. package/dist/types/src/operations/insert-axis.d.ts +2 -2
  95. package/dist/types/src/operations/insert-axis.d.ts.map +1 -1
  96. package/dist/types/src/operations/restore-axis.d.ts +2 -2
  97. package/dist/types/src/operations/restore-axis.d.ts.map +1 -1
  98. package/dist/types/src/operations/scroll-to-anchor.d.ts +2 -2
  99. package/dist/types/src/operations/scroll-to-anchor.d.ts.map +1 -1
  100. package/dist/types/src/plugin.d.ts +4 -0
  101. package/dist/types/src/plugin.d.ts.map +1 -0
  102. package/dist/types/src/serializer.d.ts +1 -1
  103. package/dist/types/src/serializer.d.ts.map +1 -1
  104. package/dist/types/src/types/{capabilities.d.ts → SheetCapabilities.d.ts} +5 -7
  105. package/dist/types/src/types/SheetCapabilities.d.ts.map +1 -0
  106. package/dist/types/src/{operations/definitions.d.ts → types/SheetOperation.d.ts} +1 -1
  107. package/dist/types/src/types/SheetOperation.d.ts.map +1 -0
  108. package/dist/types/src/types/index.d.ts +3 -2
  109. package/dist/types/src/types/index.d.ts.map +1 -1
  110. package/dist/types/tsconfig.tsbuildinfo +1 -1
  111. package/package.json +107 -81
  112. package/src/SheetPlugin.node.ts +3 -18
  113. package/src/SheetPlugin.test.ts +2 -2
  114. package/src/SheetPlugin.tsx +7 -36
  115. package/src/SheetPlugin.workerd.ts +18 -0
  116. package/src/capabilities/comment-config.ts +24 -0
  117. package/src/capabilities/compute-graph-registry.ts +1 -1
  118. package/src/capabilities/create-object.ts +30 -0
  119. package/src/capabilities/index.ts +4 -0
  120. package/src/capabilities/markdown.ts +1 -1
  121. package/src/capabilities/react-surface.tsx +3 -3
  122. package/src/capabilities/state.ts +3 -3
  123. package/src/capabilities/undo-mappings.ts +1 -1
  124. package/src/components/ComputeGraph/compute-graph.stories.tsx +8 -3
  125. package/src/components/SheetContent/SheetContent.stories.tsx +1 -1
  126. package/src/components/SheetContent/SheetContent.tsx +1 -1
  127. package/src/containers/RangeList/RangeList.tsx +6 -5
  128. package/src/containers/{SheetContainer/SheetContainer.stories.tsx → SheetArticle/SheetArticle.stories.tsx} +11 -10
  129. package/src/containers/{SheetContainer/SheetContainer.tsx → SheetArticle/SheetArticle.tsx} +5 -5
  130. package/src/containers/SheetArticle/index.ts +5 -0
  131. package/src/containers/index.ts +1 -1
  132. package/src/index.ts +2 -8
  133. package/src/integrations/thread-ranges.ts +3 -3
  134. package/src/operations/drop-axis.ts +4 -4
  135. package/src/operations/index.ts +0 -2
  136. package/src/operations/insert-axis.ts +4 -4
  137. package/src/operations/restore-axis.ts +4 -4
  138. package/src/operations/scroll-to-anchor.ts +2 -3
  139. package/src/playwright/sheet.spec.ts +1 -1
  140. package/src/plugin.ts +11 -0
  141. package/src/sanity.test.ts +5 -1
  142. package/src/serializer.ts +1 -1
  143. package/src/types/{capabilities.ts → SheetCapabilities.ts} +8 -8
  144. package/src/{operations/definitions.ts → types/SheetOperation.ts} +2 -0
  145. package/src/types/index.ts +4 -2
  146. package/dist/lib/browser/SheetPlugin-W4PFP6WG.mjs +0 -92
  147. package/dist/lib/browser/SheetPlugin-W4PFP6WG.mjs.map +0 -7
  148. package/dist/lib/browser/chunk-5TXOUIGZ.mjs +0 -118
  149. package/dist/lib/browser/chunk-5TXOUIGZ.mjs.map +0 -7
  150. package/dist/lib/browser/chunk-SVGX3MWY.mjs.map +0 -7
  151. package/dist/lib/browser/drop-axis-ZLERPPPH.mjs.map +0 -7
  152. package/dist/lib/browser/index.mjs.map +0 -7
  153. package/dist/lib/browser/insert-axis-WTRA3HE7.mjs.map +0 -7
  154. package/dist/lib/browser/meta.json +0 -1
  155. package/dist/lib/browser/operations/index.mjs +0 -13
  156. package/dist/lib/browser/operations/index.mjs.map +0 -7
  157. package/dist/lib/browser/restore-axis-PYGPW2TB.mjs.map +0 -7
  158. package/dist/lib/browser/scroll-to-anchor-6I4DNKBW.mjs +0 -65
  159. package/dist/lib/browser/scroll-to-anchor-6I4DNKBW.mjs.map +0 -7
  160. package/dist/lib/node-esm/SheetPlugin-ZJRSEYHB.mjs +0 -93
  161. package/dist/lib/node-esm/SheetPlugin-ZJRSEYHB.mjs.map +0 -7
  162. package/dist/lib/node-esm/chunk-4A2KAXTF.mjs +0 -263
  163. package/dist/lib/node-esm/chunk-4A2KAXTF.mjs.map +0 -7
  164. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  165. package/dist/lib/node-esm/chunk-MCZFRYOP.mjs +0 -119
  166. package/dist/lib/node-esm/chunk-MCZFRYOP.mjs.map +0 -7
  167. package/dist/lib/node-esm/drop-axis-FV2GXSZP.mjs +0 -24
  168. package/dist/lib/node-esm/drop-axis-FV2GXSZP.mjs.map +0 -7
  169. package/dist/lib/node-esm/index.mjs +0 -34
  170. package/dist/lib/node-esm/index.mjs.map +0 -7
  171. package/dist/lib/node-esm/insert-axis-THXK6DCC.mjs +0 -17
  172. package/dist/lib/node-esm/insert-axis-THXK6DCC.mjs.map +0 -7
  173. package/dist/lib/node-esm/meta.json +0 -1
  174. package/dist/lib/node-esm/operations/index.mjs +0 -14
  175. package/dist/lib/node-esm/operations/index.mjs.map +0 -7
  176. package/dist/lib/node-esm/restore-axis-JIFT3Q7Z.mjs +0 -17
  177. package/dist/lib/node-esm/restore-axis-JIFT3Q7Z.mjs.map +0 -7
  178. package/dist/lib/node-esm/scroll-to-anchor-JRDC5KK2.mjs +0 -66
  179. package/dist/lib/node-esm/scroll-to-anchor-JRDC5KK2.mjs.map +0 -7
  180. package/dist/lib/node-esm/translations.mjs +0 -56
  181. package/dist/lib/node-esm/translations.mjs.map +0 -7
  182. package/dist/types/src/containers/SheetContainer/SheetContainer.d.ts.map +0 -1
  183. package/dist/types/src/containers/SheetContainer/SheetContainer.stories.d.ts.map +0 -1
  184. package/dist/types/src/containers/SheetContainer/index.d.ts +0 -2
  185. package/dist/types/src/containers/SheetContainer/index.d.ts.map +0 -1
  186. package/dist/types/src/operations/definitions.d.ts.map +0 -1
  187. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  188. package/src/containers/SheetContainer/index.ts +0 -5
  189. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  190. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
  191. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  192. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
  193. /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
  194. /package/dist/lib/{browser → neutral}/translations.mjs +0 -0
  195. /package/dist/lib/{browser → neutral}/translations.mjs.map +0 -0
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
@@ -0,0 +1,46 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/containers/RangeList/RangeList.tsx
4
+ import * as Schema from "effect/Schema";
5
+ import React, { useCallback } from "react";
6
+ import { rangeToA1Notation } from "@dxos/compute-hyperformula";
7
+ import { useObject } from "@dxos/echo-react";
8
+ import { Input, Message, useTranslation } from "@dxos/react-ui";
9
+ import { List } from "@dxos/react-ui-list";
10
+ import { meta } from "#meta";
11
+ import { rangeFromIndex } from "#types";
12
+ import { Sheet } from "#types";
13
+ var RangeList = ({ sheet: sheetProp }) => {
14
+ const { t } = useTranslation(meta.id);
15
+ const [sheet, updateSheet] = useObject(sheetProp);
16
+ const handleSelectRange = (range) => {
17
+ };
18
+ const handleDeleteRange = useCallback((range) => {
19
+ const index = sheet.ranges.findIndex((sheetRange) => sheetRange === range);
20
+ updateSheet((sheet2) => {
21
+ sheet2.ranges.splice(index, 1);
22
+ });
23
+ }, [
24
+ sheet,
25
+ updateSheet
26
+ ]);
27
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Label, null, t("range-list.heading"))), sheet.ranges.length < 1 ? /* @__PURE__ */ React.createElement(Message.Root, null, /* @__PURE__ */ React.createElement(Message.Title, null, t("no-ranges.message"))) : /* @__PURE__ */ React.createElement(List.Root, {
28
+ items: sheet.ranges,
29
+ isItem: Schema.is(Sheet.Range)
30
+ }, ({ items: ranges }) => ranges.map((range, i) => /* @__PURE__ */ React.createElement(List.Item, {
31
+ key: i,
32
+ item: range
33
+ }, /* @__PURE__ */ React.createElement(List.ItemDragHandle, null), /* @__PURE__ */ React.createElement(List.ItemTitle, {
34
+ onClick: () => handleSelectRange(range)
35
+ }, t("range.title", {
36
+ position: rangeToA1Notation(rangeFromIndex(sheetProp, range.range)),
37
+ key: t(`range-key.${range.key}.label`),
38
+ value: t(`range-value.${range.value}.label`)
39
+ })), /* @__PURE__ */ React.createElement(List.ItemDeleteButton, {
40
+ onClick: () => handleDeleteRange(range)
41
+ })))));
42
+ };
43
+ export {
44
+ RangeList as default
45
+ };
46
+ //# sourceMappingURL=RangeList-HYB5S6KQ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/RangeList/RangeList.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback } from 'react';\n\nimport { rangeToA1Notation } from '@dxos/compute-hyperformula';\nimport { useObject } from '@dxos/echo-react';\nimport { Input, Message, useTranslation } from '@dxos/react-ui';\nimport { List } from '@dxos/react-ui-list';\n\nimport { meta } from '#meta';\nimport { rangeFromIndex } from '#types';\nimport { Sheet } from '#types';\n\nexport type RangeListProps = {\n sheet: Sheet.Sheet;\n};\n\nexport const RangeList = ({ sheet: sheetProp }: RangeListProps) => {\n const { t } = useTranslation(meta.id);\n const [sheet, updateSheet] = useObject(sheetProp);\n // TODO(thure): Implement similar to comments, #8121\n const handleSelectRange = (range: Sheet.Range) => {};\n const handleDeleteRange = useCallback(\n (range: Sheet.Range) => {\n const index = sheet.ranges.findIndex((sheetRange) => sheetRange === range);\n updateSheet((sheet) => {\n sheet.ranges.splice(index, 1);\n });\n },\n [sheet, updateSheet],\n );\n return (\n <>\n <Input.Root>\n <Input.Label>{t('range-list.heading')}</Input.Label>\n </Input.Root>\n {sheet.ranges.length < 1 ? (\n <Message.Root>\n <Message.Title>{t('no-ranges.message')}</Message.Title>\n </Message.Root>\n ) : (\n <List.Root<Sheet.Range> items={sheet.ranges} isItem={Schema.is(Sheet.Range)}>\n {({ items: ranges }) =>\n ranges.map((range, i) => (\n <List.Item key={i} item={range}>\n <List.ItemDragHandle />\n <List.ItemTitle onClick={() => handleSelectRange(range)}>\n {t('range.title', {\n position: rangeToA1Notation(rangeFromIndex(sheetProp, range.range)),\n key: t(`range-key.${range.key}.label`),\n value: t(`range-value.${range.value}.label`),\n })}\n </List.ItemTitle>\n <List.ItemDeleteButton onClick={() => handleDeleteRange(range)} />\n </List.Item>\n ))\n }\n </List.Root>\n )}\n </>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AACxB,OAAOC,SAASC,mBAAmB;AAEnC,SAASC,yBAAyB;AAClC,SAASC,iBAAiB;AAC1B,SAASC,OAAOC,SAASC,sBAAsB;AAC/C,SAASC,YAAY;AAErB,SAASC,YAAY;AACrB,SAASC,sBAAsB;AAC/B,SAASC,aAAa;AAMf,IAAMC,YAAY,CAAC,EAAEC,OAAOC,UAAS,MAAkB;AAC5D,QAAM,EAAEC,EAAC,IAAKR,eAAeE,KAAKO,EAAE;AACpC,QAAM,CAACH,OAAOI,WAAAA,IAAeb,UAAUU,SAAAA;AAEvC,QAAMI,oBAAoB,CAACC,UAAAA;EAAwB;AACnD,QAAMC,oBAAoBlB,YACxB,CAACiB,UAAAA;AACC,UAAME,QAAQR,MAAMS,OAAOC,UAAU,CAACC,eAAeA,eAAeL,KAAAA;AACpEF,gBAAY,CAACJ,WAAAA;AACXA,MAAAA,OAAMS,OAAOG,OAAOJ,OAAO,CAAA;IAC7B,CAAA;EACF,GACA;IAACR;IAAOI;GAAY;AAEtB,SACE,sBAAA,cAAA,MAAA,UAAA,MACE,sBAAA,cAACZ,MAAMqB,MAAI,MACT,sBAAA,cAACrB,MAAMsB,OAAK,MAAEZ,EAAE,oBAAA,CAAA,CAAA,GAEjBF,MAAMS,OAAOM,SAAS,IACrB,sBAAA,cAACtB,QAAQoB,MAAI,MACX,sBAAA,cAACpB,QAAQuB,OAAK,MAAEd,EAAE,mBAAA,CAAA,CAAA,IAGpB,sBAAA,cAACP,KAAKkB,MAAI;IAAcI,OAAOjB,MAAMS;IAAQS,QAAeC,UAAGrB,MAAMsB,KAAK;KACvE,CAAC,EAAEH,OAAOR,OAAM,MACfA,OAAOY,IAAI,CAACf,OAAOgB,MACjB,sBAAA,cAAC3B,KAAK4B,MAAI;IAACC,KAAKF;IAAGG,MAAMnB;KACvB,sBAAA,cAACX,KAAK+B,gBAAc,IAAA,GACpB,sBAAA,cAAC/B,KAAKgC,WAAS;IAACC,SAAS,MAAMvB,kBAAkBC,KAAAA;KAC9CJ,EAAE,eAAe;IAChB2B,UAAUvC,kBAAkBO,eAAeI,WAAWK,MAAMA,KAAK,CAAA;IACjEkB,KAAKtB,EAAE,aAAaI,MAAMkB,GAAG,QAAQ;IACrCM,OAAO5B,EAAE,eAAeI,MAAMwB,KAAK,QAAQ;EAC7C,CAAA,CAAA,GAEF,sBAAA,cAACnC,KAAKoC,kBAAgB;IAACH,SAAS,MAAMrB,kBAAkBD,KAAAA;;AAQxE;",
6
+ "names": ["Schema", "React", "useCallback", "rangeToA1Notation", "useObject", "Input", "Message", "useTranslation", "List", "meta", "rangeFromIndex", "Sheet", "RangeList", "sheet", "sheetProp", "t", "id", "updateSheet", "handleSelectRange", "range", "handleDeleteRange", "index", "ranges", "findIndex", "sheetRange", "splice", "Root", "Label", "length", "Title", "items", "isItem", "is", "Range", "map", "i", "Item", "key", "item", "ItemDragHandle", "ItemTitle", "onClick", "position", "value", "ItemDeleteButton"]
7
+ }
@@ -0,0 +1,33 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/containers/SheetArticle/SheetArticle.tsx
4
+ import React from "react";
5
+ import { Panel } from "@dxos/react-ui";
6
+ import { ComputeGraphContextProvider, Sheet, useComputeGraph } from "#components";
7
+ var SheetArticle = ({ registry, ...props }) => /* @__PURE__ */ React.createElement(ComputeGraphContextProvider, {
8
+ registry
9
+ }, /* @__PURE__ */ React.createElement(SheetArticleInner, props));
10
+ var SheetArticleInner = ({ role, subject: sheet, attendableId, space, ignoreAttention }) => {
11
+ const graph = useComputeGraph(space);
12
+ if (!graph) {
13
+ return null;
14
+ }
15
+ return /* @__PURE__ */ React.createElement(Sheet.Root, {
16
+ graph,
17
+ sheet,
18
+ attendableId,
19
+ ignoreAttention
20
+ }, /* @__PURE__ */ React.createElement(Panel.Root, {
21
+ classNames: role === "section" && "aspect-aquare"
22
+ }, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
23
+ asChild: true
24
+ }, /* @__PURE__ */ React.createElement(Sheet.Toolbar, null)), /* @__PURE__ */ React.createElement(Panel.Content, {
25
+ asChild: true
26
+ }, /* @__PURE__ */ React.createElement(Sheet.Content, null)), /* @__PURE__ */ React.createElement(Panel.Statusbar, {
27
+ asChild: true
28
+ }, /* @__PURE__ */ React.createElement(Sheet.Statusbar, null))));
29
+ };
30
+ export {
31
+ SheetArticle as default
32
+ };
33
+ //# sourceMappingURL=SheetArticle-5AJRM3V3.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/SheetArticle/SheetArticle.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { type ComputeGraphRegistry } from '@dxos/compute-hyperformula';\nimport { type Space } from '@dxos/react-client/echo';\nimport { Panel } from '@dxos/react-ui';\n\nimport { ComputeGraphContextProvider, Sheet, useComputeGraph } from '#components';\nimport { type Sheet as SheetType } from '#types';\n\nexport type SheetArticleProps = AppSurface.ObjectArticleProps<\n SheetType.Sheet,\n {\n space: Space;\n registry: ComputeGraphRegistry;\n ignoreAttention?: boolean;\n }\n>;\n\nexport const SheetArticle = ({ registry, ...props }: SheetArticleProps) => (\n <ComputeGraphContextProvider registry={registry}>\n <SheetArticleInner {...props} />\n </ComputeGraphContextProvider>\n);\n\nconst SheetArticleInner = ({\n role,\n subject: sheet,\n attendableId,\n space,\n ignoreAttention,\n}: Omit<SheetArticleProps, 'registry'>) => {\n const graph = useComputeGraph(space);\n if (!graph) {\n return null;\n }\n\n return (\n <Sheet.Root graph={graph} sheet={sheet} attendableId={attendableId!} ignoreAttention={ignoreAttention}>\n <Panel.Root classNames={role === 'section' && 'aspect-aquare'}>\n <Panel.Toolbar asChild>\n <Sheet.Toolbar />\n </Panel.Toolbar>\n <Panel.Content asChild>\n <Sheet.Content />\n </Panel.Content>\n <Panel.Statusbar asChild>\n <Sheet.Statusbar />\n </Panel.Statusbar>\n </Panel.Root>\n </Sheet.Root>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,WAAW;AAKlB,SAASC,aAAa;AAEtB,SAASC,6BAA6BC,OAAOC,uBAAuB;AAY7D,IAAMC,eAAe,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAC1C,sBAAA,cAACL,6BAAAA;EAA4BI;GAC3B,sBAAA,cAACE,mBAAsBD,KAAAA,CAAAA;AAI3B,IAAMC,oBAAoB,CAAC,EACzBC,MACAC,SAASC,OACTC,cACAC,OACAC,gBAAe,MACqB;AACpC,QAAMC,QAAQX,gBAAgBS,KAAAA;AAC9B,MAAI,CAACE,OAAO;AACV,WAAO;EACT;AAEA,SACE,sBAAA,cAACZ,MAAMa,MAAI;IAACD;IAAcJ;IAAcC;IAA6BE;KACnE,sBAAA,cAACb,MAAMe,MAAI;IAACC,YAAYR,SAAS,aAAa;KAC5C,sBAAA,cAACR,MAAMiB,SAAO;IAACC,SAAAA;KACb,sBAAA,cAAChB,MAAMe,SAAO,IAAA,CAAA,GAEhB,sBAAA,cAACjB,MAAMmB,SAAO;IAACD,SAAAA;KACb,sBAAA,cAAChB,MAAMiB,SAAO,IAAA,CAAA,GAEhB,sBAAA,cAACnB,MAAMoB,WAAS;IAACF,SAAAA;KACf,sBAAA,cAAChB,MAAMkB,WAAS,IAAA,CAAA,CAAA,CAAA;AAK1B;",
6
+ "names": ["React", "Panel", "ComputeGraphContextProvider", "Sheet", "useComputeGraph", "SheetArticle", "registry", "props", "SheetArticleInner", "role", "subject", "sheet", "attendableId", "space", "ignoreAttention", "graph", "Root", "classNames", "Toolbar", "asChild", "Content", "Statusbar"]
7
+ }
@@ -0,0 +1,48 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/SheetPlugin.tsx
4
+ import { ActivationEvent, Plugin } from "@dxos/app-framework";
5
+ import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
6
+ import { AutomationEvents } from "@dxos/plugin-automation";
7
+ import { ClientEvents } from "@dxos/plugin-client";
8
+ import { MarkdownEvents } from "@dxos/plugin-markdown";
9
+ import { AnchorSort, CommentConfig, ComputeGraphRegistry, CreateObject, Markdown, OperationHandler, UndoMappings, ReactSurface, SheetState } from "#capabilities";
10
+ import { meta } from "#meta";
11
+ import { translations } from "#translations";
12
+ import { Sheet } from "#types";
13
+ var SheetPlugin = Plugin.define(meta).pipe(AppPlugin.addCommentConfigModule({
14
+ activate: CommentConfig
15
+ }), AppPlugin.addCreateObjectModule({
16
+ activate: CreateObject
17
+ }), AppPlugin.addOperationHandlerModule({
18
+ activate: OperationHandler
19
+ }), AppPlugin.addUndoMappingsModule({
20
+ activate: UndoMappings
21
+ }), AppPlugin.addSchemaModule({
22
+ schema: [
23
+ Sheet.Sheet
24
+ ]
25
+ }), AppPlugin.addSurfaceModule({
26
+ activate: ReactSurface
27
+ }), AppPlugin.addTranslationsModule({
28
+ translations
29
+ }), Plugin.addModule({
30
+ activatesOn: AppActivationEvents.SetupSettings,
31
+ activate: SheetState
32
+ }), Plugin.addModule({
33
+ activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),
34
+ activate: ComputeGraphRegistry
35
+ }), Plugin.addModule({
36
+ activatesOn: MarkdownEvents.SetupExtensions,
37
+ activate: Markdown
38
+ }), Plugin.addModule({
39
+ // TODO(wittjosiah): More relevant event?
40
+ activatesOn: AppActivationEvents.AppGraphReady,
41
+ activate: AnchorSort
42
+ }), Plugin.make);
43
+ var SheetPlugin_default = SheetPlugin;
44
+ export {
45
+ SheetPlugin,
46
+ SheetPlugin_default as default
47
+ };
48
+ //# sourceMappingURL=SheetPlugin.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/SheetPlugin.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { ActivationEvent, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { AutomationEvents } from '@dxos/plugin-automation';\nimport { ClientEvents } from '@dxos/plugin-client';\nimport { MarkdownEvents } from '@dxos/plugin-markdown';\n\nimport {\n AnchorSort,\n CommentConfig,\n ComputeGraphRegistry,\n CreateObject,\n Markdown,\n OperationHandler,\n UndoMappings,\n ReactSurface,\n SheetState,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Sheet } from '#types';\n\nexport const SheetPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCommentConfigModule({ activate: CommentConfig }),\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),\n AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n activatesOn: AppActivationEvents.SetupSettings,\n activate: SheetState,\n }),\n Plugin.addModule({\n activatesOn: ActivationEvent.allOf(ClientEvents.ClientReady, AutomationEvents.ComputeRuntimeReady),\n activate: ComputeGraphRegistry,\n }),\n Plugin.addModule({\n activatesOn: MarkdownEvents.SetupExtensions,\n activate: Markdown,\n }),\n Plugin.addModule({\n // TODO(wittjosiah): More relevant event?\n activatesOn: AppActivationEvents.AppGraphReady,\n activate: AnchorSort,\n }),\n Plugin.make,\n);\n\nexport default SheetPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,iBAAiBC,cAAc;AACxC,SAASC,qBAAqBC,iBAAiB;AAC/C,SAASC,wBAAwB;AACjC,SAASC,oBAAoB;AAC7B,SAASC,sBAAsB;AAE/B,SACEC,YACAC,eACAC,sBACAC,cACAC,UACAC,kBACAC,cACAC,cACAC,kBACK;AACP,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,aAAa;AAEf,IAAMC,cAAclB,OAAOmB,OAAOJ,IAAAA,EAAMK,KAC7ClB,UAAUmB,uBAAuB;EAAEC,UAAUf;AAAc,CAAA,GAC3DL,UAAUqB,sBAAsB;EAAED,UAAUb;AAAa,CAAA,GACzDP,UAAUsB,0BAA0B;EAAEF,UAAUX;AAAiB,CAAA,GACjET,UAAUuB,sBAAsB;EAAEH,UAAUV;AAAa,CAAA,GACzDV,UAAUwB,gBAAgB;EAAEC,QAAQ;IAACV,MAAMA;;AAAO,CAAA,GAClDf,UAAU0B,iBAAiB;EAAEN,UAAUT;AAAa,CAAA,GACpDX,UAAU2B,sBAAsB;EAAEb;AAAa,CAAA,GAC/ChB,OAAO8B,UAAU;EACfC,aAAa9B,oBAAoB+B;EACjCV,UAAUR;AACZ,CAAA,GACAd,OAAO8B,UAAU;EACfC,aAAahC,gBAAgBkC,MAAM7B,aAAa8B,aAAa/B,iBAAiBgC,mBAAmB;EACjGb,UAAUd;AACZ,CAAA,GACAR,OAAO8B,UAAU;EACfC,aAAa1B,eAAe+B;EAC5Bd,UAAUZ;AACZ,CAAA,GACAV,OAAO8B,UAAU;;EAEfC,aAAa9B,oBAAoBoC;EACjCf,UAAUhB;AACZ,CAAA,GACAN,OAAOsC,IAAI;AAGb,IAAA,sBAAepB;",
6
+ "names": ["ActivationEvent", "Plugin", "AppActivationEvents", "AppPlugin", "AutomationEvents", "ClientEvents", "MarkdownEvents", "AnchorSort", "CommentConfig", "ComputeGraphRegistry", "CreateObject", "Markdown", "OperationHandler", "UndoMappings", "ReactSurface", "SheetState", "meta", "translations", "Sheet", "SheetPlugin", "define", "pipe", "addCommentConfigModule", "activate", "addCreateObjectModule", "addOperationHandlerModule", "addUndoMappingsModule", "addSchemaModule", "schema", "addSurfaceModule", "addTranslationsModule", "addModule", "activatesOn", "SetupSettings", "allOf", "ClientReady", "ComputeRuntimeReady", "SetupExtensions", "AppGraphReady", "make"]
7
+ }
@@ -0,0 +1,27 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/SheetPlugin.node.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+ import { AppPlugin } from "@dxos/app-toolkit";
6
+ import { CommentConfig, CreateObject, OperationHandler, UndoMappings } from "#capabilities";
7
+ import { meta } from "#meta";
8
+ import { Sheet } from "#types";
9
+ var SheetPlugin = Plugin.define(meta).pipe(AppPlugin.addCommentConfigModule({
10
+ activate: CommentConfig
11
+ }), AppPlugin.addCreateObjectModule({
12
+ activate: CreateObject
13
+ }), AppPlugin.addOperationHandlerModule({
14
+ activate: OperationHandler
15
+ }), AppPlugin.addUndoMappingsModule({
16
+ activate: UndoMappings
17
+ }), AppPlugin.addSchemaModule({
18
+ schema: [
19
+ Sheet.Sheet
20
+ ]
21
+ }), Plugin.make);
22
+ var SheetPlugin_node_default = SheetPlugin;
23
+ export {
24
+ SheetPlugin,
25
+ SheetPlugin_node_default as default
26
+ };
27
+ //# sourceMappingURL=SheetPlugin.node.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/SheetPlugin.node.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { CommentConfig, CreateObject, OperationHandler, UndoMappings } from '#capabilities';\nimport { meta } from '#meta';\nimport { Sheet } from '#types';\n\nexport const SheetPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCommentConfigModule({ activate: CommentConfig }),\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addUndoMappingsModule({ activate: UndoMappings }),\n AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),\n Plugin.make,\n);\n\nexport default SheetPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,eAAeC,cAAcC,kBAAkBC,oBAAoB;AAC5E,SAASC,YAAY;AACrB,SAASC,aAAa;AAEf,IAAMC,cAAcR,OAAOS,OAAOH,IAAAA,EAAMI,KAC7CT,UAAUU,uBAAuB;EAAEC,UAAUV;AAAc,CAAA,GAC3DD,UAAUY,sBAAsB;EAAED,UAAUT;AAAa,CAAA,GACzDF,UAAUa,0BAA0B;EAAEF,UAAUR;AAAiB,CAAA,GACjEH,UAAUc,sBAAsB;EAAEH,UAAUP;AAAa,CAAA,GACzDJ,UAAUe,gBAAgB;EAAEC,QAAQ;IAACV,MAAMA;;AAAO,CAAA,GAClDP,OAAOkB,IAAI;AAGb,IAAA,2BAAeV;",
6
+ "names": ["Plugin", "AppPlugin", "CommentConfig", "CreateObject", "OperationHandler", "UndoMappings", "meta", "Sheet", "SheetPlugin", "define", "pipe", "addCommentConfigModule", "activate", "addCreateObjectModule", "addOperationHandlerModule", "addUndoMappingsModule", "addSchemaModule", "schema", "make"]
7
+ }
@@ -0,0 +1,21 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/SheetPlugin.workerd.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+ import { AppPlugin } from "@dxos/app-toolkit";
6
+ import { OperationHandler } from "#capabilities";
7
+ import { meta } from "#meta";
8
+ import { Sheet } from "#types";
9
+ var SheetPlugin = Plugin.define(meta).pipe(AppPlugin.addOperationHandlerModule({
10
+ activate: OperationHandler
11
+ }), AppPlugin.addSchemaModule({
12
+ schema: [
13
+ Sheet.Sheet
14
+ ]
15
+ }), Plugin.make);
16
+ var SheetPlugin_workerd_default = SheetPlugin;
17
+ export {
18
+ SheetPlugin,
19
+ SheetPlugin_workerd_default as default
20
+ };
21
+ //# sourceMappingURL=SheetPlugin.workerd.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/SheetPlugin.workerd.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { OperationHandler } from '#capabilities';\nimport { meta } from '#meta';\nimport { Sheet } from '#types';\n\nexport const SheetPlugin = Plugin.define(meta).pipe(\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Sheet.Sheet] }),\n Plugin.make,\n);\n\nexport default SheetPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,wBAAwB;AACjC,SAASC,YAAY;AACrB,SAASC,aAAa;AAEf,IAAMC,cAAcL,OAAOM,OAAOH,IAAAA,EAAMI,KAC7CN,UAAUO,0BAA0B;EAAEC,UAAUP;AAAiB,CAAA,GACjED,UAAUS,gBAAgB;EAAEC,QAAQ;IAACP,MAAMA;;AAAO,CAAA,GAClDJ,OAAOY,IAAI;AAGb,IAAA,8BAAeP;",
6
+ "names": ["Plugin", "AppPlugin", "OperationHandler", "meta", "Sheet", "SheetPlugin", "define", "pipe", "addOperationHandlerModule", "activate", "addSchemaModule", "schema", "make"]
7
+ }
@@ -0,0 +1,22 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/anchor-sort.ts
4
+ import * as Effect from "effect/Effect";
5
+ import { Capability } from "@dxos/app-framework";
6
+ import { AppCapabilities } from "@dxos/app-toolkit";
7
+ import { Relation } from "@dxos/echo";
8
+ import { Sheet, compareIndexPositions } from "#types";
9
+ var anchor_sort_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(AppCapabilities.AnchorSort, {
10
+ key: Sheet.Sheet.typename,
11
+ sort: (anchorA, anchorB) => {
12
+ const sheet = Relation.getTarget(anchorA);
13
+ if (sheet !== Relation.getTarget(anchorB)) {
14
+ return 0;
15
+ }
16
+ return !anchorA.anchor || !anchorB.anchor ? 0 : compareIndexPositions(sheet, anchorA.anchor, anchorB.anchor);
17
+ }
18
+ })));
19
+ export {
20
+ anchor_sort_default as default
21
+ };
22
+ //# sourceMappingURL=anchor-sort-TTCKGX7V.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/anchor-sort.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { Relation } from '@dxos/echo';\n\nimport { Sheet, compareIndexPositions } from '#types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(AppCapabilities.AnchorSort, {\n key: Sheet.Sheet.typename,\n sort: (anchorA, anchorB) => {\n const sheet = Relation.getTarget(anchorA) as Sheet.Sheet;\n if (sheet !== Relation.getTarget(anchorB)) {\n return 0;\n }\n\n return !anchorA.anchor || !anchorB.anchor ? 0 : compareIndexPositions(sheet, anchorA.anchor, anchorB.anchor);\n },\n }),\n ),\n);\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,gBAAgB;AAEzB,SAASC,OAAOC,6BAA6B;AAE7C,IAAA,sBAAeJ,WAAWK,WAAW,MAC5BC,eACLN,WAAWO,YAAYN,gBAAgBO,YAAY;EACjDC,KAAKN,MAAMA,MAAMO;EACjBC,MAAM,CAACC,SAASC,YAAAA;AACd,UAAMC,QAAQZ,SAASa,UAAUH,OAAAA;AACjC,QAAIE,UAAUZ,SAASa,UAAUF,OAAAA,GAAU;AACzC,aAAO;IACT;AAEA,WAAO,CAACD,QAAQI,UAAU,CAACH,QAAQG,SAAS,IAAIZ,sBAAsBU,OAAOF,QAAQI,QAAQH,QAAQG,MAAM;EAC7G;AACF,CAAA,CAAA,CAAA;",
6
+ "names": ["Effect", "Capability", "AppCapabilities", "Relation", "Sheet", "compareIndexPositions", "makeModule", "succeed", "contributes", "AnchorSort", "key", "typename", "sort", "anchorA", "anchorB", "sheet", "getTarget", "anchor"]
7
+ }
@@ -0,0 +1,25 @@
1
+ import "../chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/index.ts
4
+ import { Capability } from "@dxos/app-framework";
5
+ var AnchorSort = Capability.lazy("AnchorSort", () => import("../anchor-sort-TTCKGX7V.mjs"));
6
+ var CommentConfig = Capability.lazy("CommentConfig", () => import("../comment-config-ZBWNCJMZ.mjs"));
7
+ var ComputeGraphRegistry = Capability.lazy("ComputeGraphRegistry", () => import("../compute-graph-registry-IEQBF5XZ.mjs"));
8
+ var CreateObject = Capability.lazy("CreateObject", () => import("../create-object-OKQAXJCW.mjs"));
9
+ var Markdown = Capability.lazy("Markdown", () => import("../markdown-I2AKJYPF.mjs"));
10
+ var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-TB6LFV2H.mjs"));
11
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-VSTQNVPT.mjs"));
12
+ var SheetState = Capability.lazy("SheetState", () => import("../state-HPA27MX2.mjs"));
13
+ var UndoMappings = Capability.lazy("UndoMappings", () => import("../undo-mappings-3FQLSTCZ.mjs"));
14
+ export {
15
+ AnchorSort,
16
+ CommentConfig,
17
+ ComputeGraphRegistry,
18
+ CreateObject,
19
+ Markdown,
20
+ OperationHandler,
21
+ ReactSurface,
22
+ SheetState,
23
+ UndoMappings
24
+ };
25
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/capabilities/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport type { Operation } from '@dxos/compute';\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const AnchorSort = Capability.lazy('AnchorSort', () => import('./anchor-sort'));\nexport const CommentConfig = Capability.lazy('CommentConfig', () => import('./comment-config'));\nexport const ComputeGraphRegistry = Capability.lazy('ComputeGraphRegistry', () => import('./compute-graph-registry'));\nexport const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));\nexport const Markdown = Capability.lazy('Markdown', () => import('./markdown'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const SheetState = Capability.lazy('SheetState', () => import('./state'));\nexport const UndoMappings = Capability.lazy('UndoMappings', () => import('./undo-mappings'));\n"],
5
+ "mappings": ";;;AAIA,SAASA,kBAAkB;AAKpB,IAAMC,aAAaD,WAAWE,KAAK,cAAc,MAAM,OAAO,6BAAA,CAAA;AAC9D,IAAMC,gBAAgBH,WAAWE,KAAK,iBAAiB,MAAM,OAAO,gCAAA,CAAA;AACpE,IAAME,uBAAuBJ,WAAWE,KAAK,wBAAwB,MAAM,OAAO,wCAAA,CAAA;AAClF,IAAMG,eAAeL,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMI,WAAWN,WAAWE,KAAK,YAAY,MAAM,OAAO,0BAAA,CAAA;AAC1D,IAAMK,mBAAmBP,WAAWE,KACzC,oBACA,MAAM,OAAO,mCAAA,CAAA;AAER,IAAMM,eAAeR,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMO,aAAaT,WAAWE,KAAK,cAAc,MAAM,OAAO,uBAAA,CAAA;AAC9D,IAAMQ,eAAeV,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;",
6
+ "names": ["Capability", "AnchorSort", "lazy", "CommentConfig", "ComputeGraphRegistry", "CreateObject", "Markdown", "OperationHandler", "ReactSurface", "SheetState", "UndoMappings"]
7
+ }