@difizen/libro-core 0.0.0-snapshot-20241017072317

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 (433) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +280 -0
  3. package/es/add-cell/index.d.ts +4 -0
  4. package/es/add-cell/index.d.ts.map +1 -0
  5. package/es/add-cell/index.js +3 -0
  6. package/es/add-cell/index.less +38 -0
  7. package/es/add-cell/libro-add-cell-module.d.ts +3 -0
  8. package/es/add-cell/libro-add-cell-module.d.ts.map +1 -0
  9. package/es/add-cell/libro-add-cell-module.js +4 -0
  10. package/es/add-cell/libro-add-cell-slot-contribution.d.ts +11 -0
  11. package/es/add-cell/libro-add-cell-slot-contribution.d.ts.map +1 -0
  12. package/es/add-cell/libro-add-cell-slot-contribution.js +59 -0
  13. package/es/add-cell/libro-add-cell-view.d.ts +21 -0
  14. package/es/add-cell/libro-add-cell-view.d.ts.map +1 -0
  15. package/es/add-cell/libro-add-cell-view.js +121 -0
  16. package/es/cell/index.d.ts +10 -0
  17. package/es/cell/index.d.ts.map +1 -0
  18. package/es/cell/index.js +9 -0
  19. package/es/cell/libro-cell-contribution.d.ts +12 -0
  20. package/es/cell/libro-cell-contribution.d.ts.map +1 -0
  21. package/es/cell/libro-cell-contribution.js +47 -0
  22. package/es/cell/libro-cell-model.d.ts +29 -0
  23. package/es/cell/libro-cell-model.d.ts.map +1 -0
  24. package/es/cell/libro-cell-model.js +130 -0
  25. package/es/cell/libro-cell-module.d.ts +10 -0
  26. package/es/cell/libro-cell-module.d.ts.map +1 -0
  27. package/es/cell/libro-cell-module.js +30 -0
  28. package/es/cell/libro-cell-protocol.d.ts +44 -0
  29. package/es/cell/libro-cell-protocol.d.ts.map +1 -0
  30. package/es/cell/libro-cell-protocol.js +11 -0
  31. package/es/cell/libro-cell-service.d.ts +28 -0
  32. package/es/cell/libro-cell-service.d.ts.map +1 -0
  33. package/es/cell/libro-cell-service.js +245 -0
  34. package/es/cell/libro-cell-view.d.ts +74 -0
  35. package/es/cell/libro-cell-view.d.ts.map +1 -0
  36. package/es/cell/libro-cell-view.js +239 -0
  37. package/es/cell/libro-edit-cell-view.d.ts +44 -0
  38. package/es/cell/libro-edit-cell-view.d.ts.map +1 -0
  39. package/es/cell/libro-edit-cell-view.js +256 -0
  40. package/es/cell/libro-executable-cell-model.d.ts +14 -0
  41. package/es/cell/libro-executable-cell-model.d.ts.map +1 -0
  42. package/es/cell/libro-executable-cell-model.js +7 -0
  43. package/es/cell/libro-executable-cell-view.d.ts +34 -0
  44. package/es/cell/libro-executable-cell-view.d.ts.map +1 -0
  45. package/es/cell/libro-executable-cell-view.js +74 -0
  46. package/es/cell/libro-markdown-cell-model.d.ts +9 -0
  47. package/es/cell/libro-markdown-cell-model.d.ts.map +1 -0
  48. package/es/cell/libro-markdown-cell-model.js +7 -0
  49. package/es/collapse-service.d.ts +36 -0
  50. package/es/collapse-service.d.ts.map +1 -0
  51. package/es/collapse-service.js +55 -0
  52. package/es/command/document-commands.d.ts +5 -0
  53. package/es/command/document-commands.d.ts.map +1 -0
  54. package/es/command/document-commands.js +21 -0
  55. package/es/command/index.d.ts +7 -0
  56. package/es/command/index.d.ts.map +1 -0
  57. package/es/command/index.js +6 -0
  58. package/es/command/kernel-command.d.ts +5 -0
  59. package/es/command/kernel-command.d.ts.map +1 -0
  60. package/es/command/kernel-command.js +40 -0
  61. package/es/command/libro-command-contribution.d.ts +13 -0
  62. package/es/command/libro-command-contribution.d.ts.map +1 -0
  63. package/es/command/libro-command-contribution.js +1842 -0
  64. package/es/command/libro-command-register.d.ts +21 -0
  65. package/es/command/libro-command-register.d.ts.map +1 -0
  66. package/es/command/libro-command-register.js +111 -0
  67. package/es/command/module.d.ts +3 -0
  68. package/es/command/module.d.ts.map +1 -0
  69. package/es/command/module.js +4 -0
  70. package/es/command/notebook-commands.d.ts +6 -0
  71. package/es/command/notebook-commands.d.ts.map +1 -0
  72. package/es/command/notebook-commands.js +472 -0
  73. package/es/components/cell-protocol.d.ts +20 -0
  74. package/es/components/cell-protocol.d.ts.map +1 -0
  75. package/es/components/cell-protocol.js +4 -0
  76. package/es/components/dnd-cell-item-render.d.ts +16 -0
  77. package/es/components/dnd-cell-item-render.d.ts.map +1 -0
  78. package/es/components/dnd-cell-item-render.js +364 -0
  79. package/es/components/dnd-component/custom-drag-layer.d.ts +9 -0
  80. package/es/components/dnd-component/custom-drag-layer.d.ts.map +1 -0
  81. package/es/components/dnd-component/custom-drag-layer.js +140 -0
  82. package/es/components/dnd-component/default-dnd-content.d.ts +11 -0
  83. package/es/components/dnd-component/default-dnd-content.d.ts.map +1 -0
  84. package/es/components/dnd-component/default-dnd-content.js +292 -0
  85. package/es/components/dnd-component/dnd-context.d.ts +3 -0
  86. package/es/components/dnd-component/dnd-context.d.ts.map +1 -0
  87. package/es/components/dnd-component/dnd-context.js +20 -0
  88. package/es/components/dnd-component/dnd-list.d.ts +14 -0
  89. package/es/components/dnd-component/dnd-list.d.ts.map +1 -0
  90. package/es/components/dnd-component/dnd-list.js +182 -0
  91. package/es/components/dnd-component/index.d.ts +5 -0
  92. package/es/components/dnd-component/index.d.ts.map +1 -0
  93. package/es/components/dnd-component/index.js +4 -0
  94. package/es/components/dnd-component/index.less +8 -0
  95. package/es/components/dnd-component/overscanIndices-getter.d.ts +22 -0
  96. package/es/components/dnd-component/overscanIndices-getter.d.ts.map +1 -0
  97. package/es/components/dnd-component/overscanIndices-getter.js +58 -0
  98. package/es/components/dnd-component/virtualized-manager.d.ts +19 -0
  99. package/es/components/dnd-component/virtualized-manager.d.ts.map +1 -0
  100. package/es/components/dnd-component/virtualized-manager.js +60 -0
  101. package/es/components/index.d.ts +6 -0
  102. package/es/components/index.d.ts.map +1 -0
  103. package/es/components/index.js +5 -0
  104. package/es/components/libro-component.d.ts +5 -0
  105. package/es/components/libro-component.d.ts.map +1 -0
  106. package/es/components/libro-component.js +35 -0
  107. package/es/components/libro-side-toolbar-menu.d.ts +21 -0
  108. package/es/components/libro-side-toolbar-menu.d.ts.map +1 -0
  109. package/es/components/libro-side-toolbar-menu.js +58 -0
  110. package/es/components/libro-view-header.d.ts +3 -0
  111. package/es/components/libro-view-header.d.ts.map +1 -0
  112. package/es/components/libro-view-header.js +37 -0
  113. package/es/components/libro-virtualized-render.d.ts +15 -0
  114. package/es/components/libro-virtualized-render.d.ts.map +1 -0
  115. package/es/components/libro-virtualized-render.js +174 -0
  116. package/es/content/index.d.ts +6 -0
  117. package/es/content/index.d.ts.map +1 -0
  118. package/es/content/index.js +5 -0
  119. package/es/content/libro-content-contribution.d.ts +11 -0
  120. package/es/content/libro-content-contribution.d.ts.map +1 -0
  121. package/es/content/libro-content-contribution.js +31 -0
  122. package/es/content/libro-content-module.d.ts +3 -0
  123. package/es/content/libro-content-module.d.ts.map +1 -0
  124. package/es/content/libro-content-module.js +6 -0
  125. package/es/content/libro-content-protocol.d.ts +13 -0
  126. package/es/content/libro-content-protocol.d.ts.map +1 -0
  127. package/es/content/libro-content-protocol.js +3 -0
  128. package/es/content/libro-content-service.d.ts +11 -0
  129. package/es/content/libro-content-service.d.ts.map +1 -0
  130. package/es/content/libro-content-service.js +63 -0
  131. package/es/content/libro-save-content-contribution.d.ts +6 -0
  132. package/es/content/libro-save-content-contribution.d.ts.map +1 -0
  133. package/es/content/libro-save-content-contribution.js +27 -0
  134. package/es/formatter/index.d.ts +6 -0
  135. package/es/formatter/index.d.ts.map +1 -0
  136. package/es/formatter/index.js +5 -0
  137. package/es/formatter/libro-formatter-json-contribution.d.ts +18 -0
  138. package/es/formatter/libro-formatter-json-contribution.d.ts.map +1 -0
  139. package/es/formatter/libro-formatter-json-contribution.js +41 -0
  140. package/es/formatter/libro-formatter-manager.d.ts +16 -0
  141. package/es/formatter/libro-formatter-manager.d.ts.map +1 -0
  142. package/es/formatter/libro-formatter-manager.js +86 -0
  143. package/es/formatter/libro-formatter-module.d.ts +3 -0
  144. package/es/formatter/libro-formatter-module.d.ts.map +1 -0
  145. package/es/formatter/libro-formatter-module.js +7 -0
  146. package/es/formatter/libro-formatter-protocol.d.ts +37 -0
  147. package/es/formatter/libro-formatter-protocol.d.ts.map +1 -0
  148. package/es/formatter/libro-formatter-protocol.js +18 -0
  149. package/es/formatter/libro-formatter-string-contribution.d.ts +18 -0
  150. package/es/formatter/libro-formatter-string-contribution.d.ts.map +1 -0
  151. package/es/formatter/libro-formatter-string-contribution.js +41 -0
  152. package/es/formatter/libro-formatter-trans-default-contribution.d.ts +7 -0
  153. package/es/formatter/libro-formatter-trans-default-contribution.d.ts.map +1 -0
  154. package/es/formatter/libro-formatter-trans-default-contribution.js +19 -0
  155. package/es/index.d.ts +26 -0
  156. package/es/index.d.ts.map +1 -0
  157. package/es/index.js +25 -0
  158. package/es/index.less +781 -0
  159. package/es/libro-context-key.d.ts +26 -0
  160. package/es/libro-context-key.d.ts.map +1 -0
  161. package/es/libro-context-key.js +84 -0
  162. package/es/libro-keybind-registry.d.ts +5 -0
  163. package/es/libro-keybind-registry.d.ts.map +1 -0
  164. package/es/libro-keybind-registry.js +68 -0
  165. package/es/libro-model.d.ts +145 -0
  166. package/es/libro-model.d.ts.map +1 -0
  167. package/es/libro-model.js +921 -0
  168. package/es/libro-protocol.d.ts +315 -0
  169. package/es/libro-protocol.d.ts.map +1 -0
  170. package/es/libro-protocol.js +47 -0
  171. package/es/libro-service.d.ts +69 -0
  172. package/es/libro-service.d.ts.map +1 -0
  173. package/es/libro-service.js +303 -0
  174. package/es/libro-setting-contribution.d.ts +5 -0
  175. package/es/libro-setting-contribution.d.ts.map +1 -0
  176. package/es/libro-setting-contribution.js +23 -0
  177. package/es/libro-setting.d.ts +12 -0
  178. package/es/libro-setting.d.ts.map +1 -0
  179. package/es/libro-setting.js +101 -0
  180. package/es/libro-view-tracker.d.ts +6 -0
  181. package/es/libro-view-tracker.d.ts.map +1 -0
  182. package/es/libro-view-tracker.js +13 -0
  183. package/es/libro-view.d.ts +170 -0
  184. package/es/libro-view.d.ts.map +1 -0
  185. package/es/libro-view.js +2077 -0
  186. package/es/libro-workspace-service.d.ts +17 -0
  187. package/es/libro-workspace-service.d.ts.map +1 -0
  188. package/es/libro-workspace-service.js +36 -0
  189. package/es/material-from-designer.d.ts +31 -0
  190. package/es/material-from-designer.d.ts.map +1 -0
  191. package/es/material-from-designer.js +697 -0
  192. package/es/module.d.ts +3 -0
  193. package/es/module.d.ts.map +1 -0
  194. package/es/module.js +71 -0
  195. package/es/output/index.d.ts +6 -0
  196. package/es/output/index.d.ts.map +1 -0
  197. package/es/output/index.js +5 -0
  198. package/es/output/output-area.d.ts +51 -0
  199. package/es/output/output-area.d.ts.map +1 -0
  200. package/es/output/output-area.js +399 -0
  201. package/es/output/output-contribution.d.ts +10 -0
  202. package/es/output/output-contribution.d.ts.map +1 -0
  203. package/es/output/output-contribution.js +36 -0
  204. package/es/output/output-model.d.ts +28 -0
  205. package/es/output/output-model.d.ts.map +1 -0
  206. package/es/output/output-model.js +105 -0
  207. package/es/output/output-module.d.ts +3 -0
  208. package/es/output/output-module.d.ts.map +1 -0
  209. package/es/output/output-module.js +6 -0
  210. package/es/output/output-protocol.d.ts +134 -0
  211. package/es/output/output-protocol.d.ts.map +1 -0
  212. package/es/output/output-protocol.js +16 -0
  213. package/es/settings/index.d.ts +5 -0
  214. package/es/settings/index.d.ts.map +1 -0
  215. package/es/settings/index.js +4 -0
  216. package/es/settings/index.less +3 -0
  217. package/es/settings/module.d.ts +3 -0
  218. package/es/settings/module.d.ts.map +1 -0
  219. package/es/settings/module.js +4 -0
  220. package/es/settings/setting-editor/configuration-panel-view.d.ts +13 -0
  221. package/es/settings/setting-editor/configuration-panel-view.d.ts.map +1 -0
  222. package/es/settings/setting-editor/configuration-panel-view.js +115 -0
  223. package/es/settings/setting-editor/configuration-render-contribution.d.ts +6 -0
  224. package/es/settings/setting-editor/configuration-render-contribution.d.ts.map +1 -0
  225. package/es/settings/setting-editor/configuration-render-contribution.js +77 -0
  226. package/es/settings/setting-editor/default-node-render.d.ts +9 -0
  227. package/es/settings/setting-editor/default-node-render.d.ts.map +1 -0
  228. package/es/settings/setting-editor/default-node-render.js +79 -0
  229. package/es/settings/setting-editor/index.d.ts +7 -0
  230. package/es/settings/setting-editor/index.d.ts.map +1 -0
  231. package/es/settings/setting-editor/index.js +6 -0
  232. package/es/settings/setting-editor/index.less +12 -0
  233. package/es/settings/setting-editor/module.d.ts +3 -0
  234. package/es/settings/setting-editor/module.d.ts.map +1 -0
  235. package/es/settings/setting-editor/module.js +11 -0
  236. package/es/settings/setting-editor/setting-editor-view.d.ts +15 -0
  237. package/es/settings/setting-editor/setting-editor-view.d.ts.map +1 -0
  238. package/es/settings/setting-editor/setting-editor-view.js +169 -0
  239. package/es/settings/setting-editor/setting-tree-service.d.ts +9 -0
  240. package/es/settings/setting-editor/setting-tree-service.d.ts.map +1 -0
  241. package/es/settings/setting-editor/setting-tree-service.js +118 -0
  242. package/es/settings/setting-editor/setting-tree-view.d.ts +19 -0
  243. package/es/settings/setting-editor/setting-tree-view.d.ts.map +1 -0
  244. package/es/settings/setting-editor/setting-tree-view.js +87 -0
  245. package/es/settings/settings-contribution.d.ts +7 -0
  246. package/es/settings/settings-contribution.d.ts.map +1 -0
  247. package/es/settings/settings-contribution.js +36 -0
  248. package/es/settings/settings-modal.d.ts +5 -0
  249. package/es/settings/settings-modal.d.ts.map +1 -0
  250. package/es/settings/settings-modal.js +53 -0
  251. package/es/settings/settings-modal.less +3 -0
  252. package/es/settings/settings-protocol.d.ts +4 -0
  253. package/es/settings/settings-protocol.d.ts.map +1 -0
  254. package/es/settings/settings-protocol.js +5 -0
  255. package/es/slot/index.d.ts +5 -0
  256. package/es/slot/index.d.ts.map +1 -0
  257. package/es/slot/index.js +4 -0
  258. package/es/slot/libro-slot-manager.d.ts +13 -0
  259. package/es/slot/libro-slot-manager.d.ts.map +1 -0
  260. package/es/slot/libro-slot-manager.js +66 -0
  261. package/es/slot/libro-slot-protocol.d.ts +19 -0
  262. package/es/slot/libro-slot-protocol.d.ts.map +1 -0
  263. package/es/slot/libro-slot-protocol.js +5 -0
  264. package/es/slot/libro-slot-view.d.ts +9 -0
  265. package/es/slot/libro-slot-view.d.ts.map +1 -0
  266. package/es/slot/libro-slot-view.js +81 -0
  267. package/es/slot/module.d.ts +3 -0
  268. package/es/slot/module.d.ts.map +1 -0
  269. package/es/slot/module.js +5 -0
  270. package/es/theme/libro-color-registry.d.ts +6 -0
  271. package/es/theme/libro-color-registry.d.ts.map +1 -0
  272. package/es/theme/libro-color-registry.js +515 -0
  273. package/es/toolbar/all-outputs-scroll-icon.d.ts +3 -0
  274. package/es/toolbar/all-outputs-scroll-icon.d.ts.map +1 -0
  275. package/es/toolbar/all-outputs-scroll-icon.js +10 -0
  276. package/es/toolbar/change-cell-to-selector.d.ts +5 -0
  277. package/es/toolbar/change-cell-to-selector.d.ts.map +1 -0
  278. package/es/toolbar/change-cell-to-selector.js +51 -0
  279. package/es/toolbar/hide-all-selector.d.ts +5 -0
  280. package/es/toolbar/hide-all-selector.d.ts.map +1 -0
  281. package/es/toolbar/hide-all-selector.js +99 -0
  282. package/es/toolbar/index.d.ts +4 -0
  283. package/es/toolbar/index.d.ts.map +1 -0
  284. package/es/toolbar/index.js +3 -0
  285. package/es/toolbar/index.less +59 -0
  286. package/es/toolbar/libro-toolbar-protocol.d.ts +4 -0
  287. package/es/toolbar/libro-toolbar-protocol.d.ts.map +1 -0
  288. package/es/toolbar/libro-toolbar-protocol.js +1 -0
  289. package/es/toolbar/libro-toolbar.d.ts +9 -0
  290. package/es/toolbar/libro-toolbar.d.ts.map +1 -0
  291. package/es/toolbar/libro-toolbar.js +275 -0
  292. package/es/toolbar/module.d.ts +3 -0
  293. package/es/toolbar/module.d.ts.map +1 -0
  294. package/es/toolbar/module.js +5 -0
  295. package/es/toolbar/restart-clear-outputs-contribution.d.ts +5 -0
  296. package/es/toolbar/restart-clear-outputs-contribution.d.ts.map +1 -0
  297. package/es/toolbar/restart-clear-outputs-contribution.js +23 -0
  298. package/es/toolbar/restart-clear-outputs-modal.d.ts +5 -0
  299. package/es/toolbar/restart-clear-outputs-modal.d.ts.map +1 -0
  300. package/es/toolbar/restart-clear-outputs-modal.js +30 -0
  301. package/es/toolbar/save-icon.d.ts +3 -0
  302. package/es/toolbar/save-icon.d.ts.map +1 -0
  303. package/es/toolbar/save-icon.js +54 -0
  304. package/es/toolbar/shutdown-contribution.d.ts +5 -0
  305. package/es/toolbar/shutdown-contribution.d.ts.map +1 -0
  306. package/es/toolbar/shutdown-contribution.js +23 -0
  307. package/es/toolbar/shutdown-modal.d.ts +5 -0
  308. package/es/toolbar/shutdown-modal.d.ts.map +1 -0
  309. package/es/toolbar/shutdown-modal.js +30 -0
  310. package/es/toolbar/side-toolar-more-select.d.ts +4 -0
  311. package/es/toolbar/side-toolar-more-select.d.ts.map +1 -0
  312. package/es/toolbar/side-toolar-more-select.js +161 -0
  313. package/es/typings/index.d.ts +1 -0
  314. package/es/virtualized-manager-helper.d.ts +11 -0
  315. package/es/virtualized-manager-helper.d.ts.map +1 -0
  316. package/es/virtualized-manager-helper.js +51 -0
  317. package/es/virtualized-manager.d.ts +23 -0
  318. package/es/virtualized-manager.d.ts.map +1 -0
  319. package/es/virtualized-manager.js +65 -0
  320. package/package.json +73 -0
  321. package/src/add-cell/index.less +38 -0
  322. package/src/add-cell/index.ts +3 -0
  323. package/src/add-cell/libro-add-cell-module.ts +9 -0
  324. package/src/add-cell/libro-add-cell-slot-contribution.ts +28 -0
  325. package/src/add-cell/libro-add-cell-view.tsx +99 -0
  326. package/src/cell/README.md +14 -0
  327. package/src/cell/index.ts +9 -0
  328. package/src/cell/libro-cell-contribution.ts +34 -0
  329. package/src/cell/libro-cell-model.ts +119 -0
  330. package/src/cell/libro-cell-module.ts +40 -0
  331. package/src/cell/libro-cell-protocol.ts +55 -0
  332. package/src/cell/libro-cell-service.ts +158 -0
  333. package/src/cell/libro-cell-view.tsx +156 -0
  334. package/src/cell/libro-edit-cell-view.tsx +205 -0
  335. package/src/cell/libro-executable-cell-model.ts +32 -0
  336. package/src/cell/libro-executable-cell-view.ts +86 -0
  337. package/src/cell/libro-markdown-cell-model.ts +20 -0
  338. package/src/collapse-service.ts +69 -0
  339. package/src/command/document-commands.ts +24 -0
  340. package/src/command/index.ts +6 -0
  341. package/src/command/kernel-command.ts +42 -0
  342. package/src/command/libro-command-contribution.ts +1346 -0
  343. package/src/command/libro-command-register.ts +168 -0
  344. package/src/command/module.ts +9 -0
  345. package/src/command/notebook-commands.ts +502 -0
  346. package/src/components/cell-protocol.ts +26 -0
  347. package/src/components/dnd-cell-item-render.tsx +465 -0
  348. package/src/components/dnd-component/custom-drag-layer.tsx +144 -0
  349. package/src/components/dnd-component/default-dnd-content.tsx +330 -0
  350. package/src/components/dnd-component/dnd-context.tsx +28 -0
  351. package/src/components/dnd-component/dnd-list.tsx +211 -0
  352. package/src/components/dnd-component/index.less +12 -0
  353. package/src/components/dnd-component/index.tsx +4 -0
  354. package/src/components/dnd-component/overscanIndices-getter.ts +92 -0
  355. package/src/components/dnd-component/virtualized-manager.ts +34 -0
  356. package/src/components/index.ts +5 -0
  357. package/src/components/libro-component.tsx +30 -0
  358. package/src/components/libro-side-toolbar-menu.tsx +82 -0
  359. package/src/components/libro-view-header.tsx +33 -0
  360. package/src/components/libro-virtualized-render.tsx +178 -0
  361. package/src/content/index.ts +5 -0
  362. package/src/content/libro-content-contribution.ts +16 -0
  363. package/src/content/libro-content-module.ts +17 -0
  364. package/src/content/libro-content-protocol.ts +14 -0
  365. package/src/content/libro-content-service.ts +48 -0
  366. package/src/content/libro-save-content-contribution.ts +12 -0
  367. package/src/formatter/index.ts +5 -0
  368. package/src/formatter/libro-formatter-json-contribution.ts +42 -0
  369. package/src/formatter/libro-formatter-manager.ts +85 -0
  370. package/src/formatter/libro-formatter-module.ts +19 -0
  371. package/src/formatter/libro-formatter-protocol.ts +63 -0
  372. package/src/formatter/libro-formatter-string-contribution.ts +41 -0
  373. package/src/formatter/libro-formatter-trans-default-contribution.ts +15 -0
  374. package/src/index.less +789 -0
  375. package/src/index.spec.ts +12 -0
  376. package/src/index.tsx +25 -0
  377. package/src/libro-context-key.ts +84 -0
  378. package/src/libro-keybind-registry.ts +43 -0
  379. package/src/libro-model.ts +710 -0
  380. package/src/libro-protocol.ts +435 -0
  381. package/src/libro-service.ts +234 -0
  382. package/src/libro-setting-contribution.ts +28 -0
  383. package/src/libro-setting.ts +110 -0
  384. package/src/libro-view-tracker.ts +9 -0
  385. package/src/libro-view.tsx +1532 -0
  386. package/src/libro-workspace-service.ts +28 -0
  387. package/src/material-from-designer.tsx +579 -0
  388. package/src/module.ts +121 -0
  389. package/src/output/index.ts +5 -0
  390. package/src/output/output-area.tsx +286 -0
  391. package/src/output/output-contribution.ts +14 -0
  392. package/src/output/output-model.tsx +70 -0
  393. package/src/output/output-module.ts +10 -0
  394. package/src/output/output-protocol.ts +168 -0
  395. package/src/settings/index.less +3 -0
  396. package/src/settings/index.ts +4 -0
  397. package/src/settings/module.ts +8 -0
  398. package/src/settings/setting-editor/configuration-panel-view.tsx +89 -0
  399. package/src/settings/setting-editor/configuration-render-contribution.ts +81 -0
  400. package/src/settings/setting-editor/default-node-render.tsx +65 -0
  401. package/src/settings/setting-editor/index.less +12 -0
  402. package/src/settings/setting-editor/index.ts +6 -0
  403. package/src/settings/setting-editor/module.ts +17 -0
  404. package/src/settings/setting-editor/setting-editor-view.tsx +93 -0
  405. package/src/settings/setting-editor/setting-tree-service.ts +82 -0
  406. package/src/settings/setting-editor/setting-tree-view.tsx +95 -0
  407. package/src/settings/settings-contribution.tsx +24 -0
  408. package/src/settings/settings-modal.less +3 -0
  409. package/src/settings/settings-modal.tsx +51 -0
  410. package/src/settings/settings-protocol.ts +7 -0
  411. package/src/slot/index.ts +4 -0
  412. package/src/slot/libro-slot-manager.ts +38 -0
  413. package/src/slot/libro-slot-protocol.ts +28 -0
  414. package/src/slot/libro-slot-view.tsx +48 -0
  415. package/src/slot/module.ts +9 -0
  416. package/src/theme/libro-color-registry.ts +386 -0
  417. package/src/toolbar/all-outputs-scroll-icon.tsx +19 -0
  418. package/src/toolbar/change-cell-to-selector.tsx +67 -0
  419. package/src/toolbar/hide-all-selector.tsx +126 -0
  420. package/src/toolbar/index.less +59 -0
  421. package/src/toolbar/index.ts +3 -0
  422. package/src/toolbar/libro-toolbar-protocol.ts +4 -0
  423. package/src/toolbar/libro-toolbar.tsx +231 -0
  424. package/src/toolbar/module.ts +11 -0
  425. package/src/toolbar/restart-clear-outputs-contribution.tsx +10 -0
  426. package/src/toolbar/restart-clear-outputs-modal.tsx +37 -0
  427. package/src/toolbar/save-icon.tsx +47 -0
  428. package/src/toolbar/shutdown-contribution.tsx +10 -0
  429. package/src/toolbar/shutdown-modal.tsx +37 -0
  430. package/src/toolbar/side-toolar-more-select.tsx +177 -0
  431. package/src/typings/index.d.ts +1 -0
  432. package/src/virtualized-manager-helper.ts +29 -0
  433. package/src/virtualized-manager.ts +47 -0
@@ -0,0 +1,21 @@
1
+ import type { Command, CommandHandler, CommandRegistry, KeybindingRegistry } from '@difizen/mana-app';
2
+ import type { CellView, NotebookView } from '../libro-protocol.js';
3
+ import { LibroService } from '../libro-service.js';
4
+ export interface GeneralLibroCommandHandler extends CommandHandler {
5
+ execute: (cell?: CellView, libro?: NotebookView, position?: string, options?: any) => void;
6
+ isVisible?: (cell?: CellView, libro?: NotebookView, position?: string, options?: any) => boolean;
7
+ isEnabled?: (cell?: CellView, libro?: NotebookView, position?: string, options?: any) => boolean;
8
+ isActive?: (cell?: CellView, libro?: NotebookView, position?: string, options?: any) => boolean;
9
+ }
10
+ export declare class LibroCommandRegister {
11
+ protected readonly libroService: LibroService;
12
+ registerKeybinds(keybindings: KeybindingRegistry, commands: Record<string, Command & {
13
+ keybind?: string | string[];
14
+ when?: string;
15
+ preventDefault?: boolean;
16
+ stopPropagation?: boolean;
17
+ }>, needActive?: boolean, needFocus?: boolean): void;
18
+ toGeneralCommandArgs: (ctx: LibroCommandRegister, cell?: CellView, libro?: NotebookView, position?: string, options?: any) => [CellView | undefined, NotebookView | undefined, string | undefined, any];
19
+ registerLibroCommand(registry: CommandRegistry, command: Command, handler: GeneralLibroCommandHandler): void;
20
+ }
21
+ //# sourceMappingURL=libro-command-register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libro-command-register.d.ts","sourceRoot":"","sources":["../../src/command/libro-command-register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EAEd,eAAe,EACf,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,WAAW,0BAA2B,SAAQ,cAAc;IAChE,OAAO,EAAE,CACP,IAAI,CAAC,EAAE,QAAQ,EACf,KAAK,CAAC,EAAE,YAAY,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,GAAG,KACV,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,CACV,IAAI,CAAC,EAAE,QAAQ,EACf,KAAK,CAAC,EAAE,YAAY,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,GAAG,KACV,OAAO,CAAC;IACb,SAAS,CAAC,EAAE,CACV,IAAI,CAAC,EAAE,QAAQ,EACf,KAAK,CAAC,EAAE,YAAY,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,GAAG,KACV,OAAO,CAAC;IACb,QAAQ,CAAC,EAAE,CACT,IAAI,CAAC,EAAE,QAAQ,EACf,KAAK,CAAC,EAAE,YAAY,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,GAAG,KACV,OAAO,CAAC;CACd;AAED,qBACa,oBAAoB;IACT,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpE,gBAAgB,CACd,WAAW,EAAE,kBAAkB,EAC/B,QAAQ,EAAE,MAAM,CACd,MAAM,EACN,OAAO,GAAG;QACR,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CACF,EACD,UAAU,UAAO,EACjB,SAAS,UAAO;IAiClB,oBAAoB,QACb,oBAAoB,SAClB,QAAQ,UACP,YAAY,aACT,MAAM,YACP,GAAG,KACZ,CAAC,QAAQ,GAAG,SAAS,EAAE,YAAY,GAAG,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,CAAC,CAI1E;IACF,oBAAoB,CAClB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,0BAA0B;CAiEtC"}
@@ -0,0 +1,111 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _dec, _dec2, _class, _class2, _descriptor;
3
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
7
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
10
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
12
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
+ function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
16
+ function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
17
+ import { inject, singleton } from '@difizen/mana-app';
18
+ import { LibroContextKeys } from "../libro-protocol.js";
19
+ import { LibroService } from "../libro-service.js";
20
+ export var LibroCommandRegister = (_dec = singleton(), _dec2 = inject(LibroService), _dec(_class = (_class2 = /*#__PURE__*/function () {
21
+ function LibroCommandRegister() {
22
+ _classCallCheck(this, LibroCommandRegister);
23
+ _initializerDefineProperty(this, "libroService", _descriptor, this);
24
+ this.toGeneralCommandArgs = function (ctx, cell, libro, position, options) {
25
+ var _libroView$model;
26
+ var libroView = libro || ctx.libroService.active;
27
+ var cellView = cell || (libroView === null || libroView === void 0 || (_libroView$model = libroView.model) === null || _libroView$model === void 0 ? void 0 : _libroView$model.active);
28
+ return [cellView, libroView, position, options];
29
+ };
30
+ }
31
+ _createClass(LibroCommandRegister, [{
32
+ key: "registerKeybinds",
33
+ value: function registerKeybinds(keybindings, commands) {
34
+ var needActive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
35
+ var needFocus = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
36
+ var keys = Object.keys(commands);
37
+ var _loop = function _loop() {
38
+ var key = _keys[_i];
39
+ var command = commands[key];
40
+ if (command.keybind) {
41
+ var needFocusStr = needFocus ? LibroContextKeys.focus : '';
42
+ var needActiveStr = needActive ? LibroContextKeys.active : '';
43
+ var when = [needFocusStr, needActiveStr, command.when].filter(Boolean).join(' && ');
44
+ if (command.keybind instanceof Array) {
45
+ command.keybind.forEach(function (keybind) {
46
+ keybindings.registerKeybinding({
47
+ command: command.id,
48
+ keybinding: keybind,
49
+ when: when,
50
+ preventDefault: command.preventDefault,
51
+ stopPropagation: command.stopPropagation
52
+ });
53
+ });
54
+ } else {
55
+ keybindings.registerKeybinding({
56
+ command: command.id,
57
+ keybinding: command.keybind,
58
+ when: when,
59
+ preventDefault: command.preventDefault,
60
+ stopPropagation: command.stopPropagation
61
+ });
62
+ }
63
+ }
64
+ };
65
+ for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {
66
+ _loop();
67
+ }
68
+ }
69
+ }, {
70
+ key: "registerLibroCommand",
71
+ value: function registerLibroCommand(registry, command, handler) {
72
+ var _this = this;
73
+ var commandHandler = {
74
+ execute: function execute(ctx, cell, libro, position, options) {
75
+ return handler.execute.apply(handler, _toConsumableArray(_this.toGeneralCommandArgs(ctx, cell, libro, position, options)));
76
+ }
77
+ };
78
+ if (handler.isEnabled) {
79
+ commandHandler.isEnabled = function (ctx, cell, libro, position, options) {
80
+ if (!handler.isEnabled) {
81
+ return true;
82
+ }
83
+ return handler.isEnabled.apply(handler, _toConsumableArray(_this.toGeneralCommandArgs(ctx, cell, libro, position, options)));
84
+ };
85
+ }
86
+ if (handler.isVisible) {
87
+ commandHandler.isVisible = function (ctx, cell, libro, position, options) {
88
+ if (!handler.isVisible) {
89
+ return true;
90
+ }
91
+ return handler.isVisible.apply(handler, _toConsumableArray(_this.toGeneralCommandArgs(ctx, cell, libro, position, options)));
92
+ };
93
+ }
94
+ if (handler.isActive) {
95
+ commandHandler.isActive = function (ctx, cell, libro, position, options) {
96
+ if (!handler.isActive) {
97
+ return false;
98
+ }
99
+ return handler.isActive.apply(handler, _toConsumableArray(_this.toGeneralCommandArgs(ctx, cell, libro, position, options)));
100
+ };
101
+ }
102
+ registry.registerCommandWithContext(command, this, commandHandler);
103
+ }
104
+ }]);
105
+ return LibroCommandRegister;
106
+ }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "libroService", [_dec2], {
107
+ configurable: true,
108
+ enumerable: true,
109
+ writable: true,
110
+ initializer: null
111
+ })), _class2)) || _class);
@@ -0,0 +1,3 @@
1
+ import { ManaModule } from '@difizen/mana-app';
2
+ export declare const LibroCommandModule: ManaModule;
3
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/command/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,eAAO,MAAM,kBAAkB,YAG9B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ManaModule } from '@difizen/mana-app';
2
+ import { LibroCommandContribution } from "./libro-command-contribution.js";
3
+ import { LibroCommandRegister } from "./libro-command-register.js";
4
+ export var LibroCommandModule = ManaModule.create().register(LibroCommandContribution, LibroCommandRegister);
@@ -0,0 +1,6 @@
1
+ import type { Command } from '@difizen/mana-app';
2
+ export declare const NotebookCommands: Record<string, Command & {
3
+ keybind?: string | string[] | undefined;
4
+ when?: string | undefined;
5
+ }>;
6
+ //# sourceMappingURL=notebook-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notebook-commands.d.ts","sourceRoot":"","sources":["../../src/command/notebook-commands.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAejD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CACnC,MAAM,EACN,OAAO,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAydjF,CAAC"}
@@ -0,0 +1,472 @@
1
+ import { PlusOutlined, PlayCircleOutlined, CopyOutlined, ScissorOutlined, SnippetsOutlined, EyeOutlined, EyeInvisibleOutlined,
2
+ // ReloadOutlined,
3
+ PoweroffOutlined } from '@ant-design/icons';
4
+ import { l10n } from '@difizen/mana-l10n';
5
+ import { Undo, Redo, Reload, ClearOutlined, MoveUpOutlined, MoveDownOutlined, DeleteOutlined, MoreOutlined, PauseCircleOutlined } from "../material-from-designer.js";
6
+ export var NotebookCommands = {
7
+ //#region libro command
8
+ ChangeCellTo: {
9
+ id: 'notebook:change-cell-to'
10
+ },
11
+ Interrupt: {
12
+ id: 'notebook:interrupt',
13
+ label: "Interrupt",
14
+ icon: PauseCircleOutlined
15
+ },
16
+ //#endregion
17
+
18
+ //#region jupyterlab command
19
+ ChangeCellToCode: {
20
+ id: 'notebook:change-cell-to-code',
21
+ label: "Change to Code Cell Type",
22
+ keybind: 'Y',
23
+ when: 'commandMode'
24
+ },
25
+ ChangeCellToHeading1: {
26
+ id: 'notebook:change-cell-to-heading-1',
27
+ label: "Change to Heading 1",
28
+ keybind: '1',
29
+ when: 'commandMode'
30
+ },
31
+ ChangeCellToHeading2: {
32
+ id: 'notebook:change-cell-to-heading-2',
33
+ label: "Change to Heading 1",
34
+ keybind: '2',
35
+ when: 'commandMode'
36
+ },
37
+ ChangeCellToHeading3: {
38
+ id: 'notebook:change-cell-to-heading-3',
39
+ label: "Change to Heading 1",
40
+ keybind: '3',
41
+ when: 'commandMode'
42
+ },
43
+ ChangeCellToHeading4: {
44
+ id: 'notebook:change-cell-to-heading-4',
45
+ label: "Change to Heading 1",
46
+ keybind: '4',
47
+ when: 'commandMode'
48
+ },
49
+ ChangeCellToHeading5: {
50
+ id: 'notebook:change-cell-to-heading-5',
51
+ label: "Change to Heading 1",
52
+ keybind: '5',
53
+ when: 'commandMode'
54
+ },
55
+ ChangeCellToHeading6: {
56
+ id: 'notebook:change-cell-to-heading-6',
57
+ label: "Change to Heading 1",
58
+ keybind: '6',
59
+ when: 'commandMode'
60
+ },
61
+ ChangeCellToMarkdown: {
62
+ id: 'notebook:change-cell-to-markdown',
63
+ label: "Change to Markdown Cell Type",
64
+ keybind: 'M',
65
+ when: 'commandMode'
66
+ },
67
+ ChangeCellToRaw: {
68
+ id: 'notebook:change-cell-to-raw',
69
+ label: "Change to Raw Cell Type",
70
+ keybind: 'R',
71
+ when: 'commandMode'
72
+ },
73
+ ClearAllCellOutput: {
74
+ id: 'notebook:clear-all-cell-outputs',
75
+ label: "Clear Outputs of All Cells",
76
+ icon: ClearOutlined
77
+ },
78
+ ClearCellOutput: {
79
+ id: 'notebook:clear-cell-outputs',
80
+ label: "Clear Cell Output"
81
+ },
82
+ CloseAndShutdown: {
83
+ id: 'notebook:close-and-shutdown',
84
+ label: "Close Editor and Shut Down Kernel",
85
+ icon: PoweroffOutlined
86
+ },
87
+ // TODO: 确定命令含义
88
+ CollapseAllHeadings: {
89
+ id: 'notebook:collapse-all-headings',
90
+ label: "Collapse All Headings",
91
+ keybind: 'ctrlcmd+shift+left'
92
+ },
93
+ CopyCell: {
94
+ id: 'notebook:copy-cell',
95
+ label: "Copy Cells",
96
+ keybind: 'C',
97
+ icon: CopyOutlined,
98
+ when: 'commandMode'
99
+ },
100
+ // TODO: 确定命令含义
101
+ CopyToClipboard: {
102
+ id: 'notebook:copy-to-clipboard',
103
+ label: "Copy Output to Clipboard"
104
+ },
105
+ // TODO: 确定命令含义
106
+ CreateOutputView: {
107
+ id: 'notebook:create-output-view',
108
+ label: "Create New View for Cell Output"
109
+ },
110
+ CutCell: {
111
+ id: 'notebook:cut-cell',
112
+ label: "Cut Cells",
113
+ keybind: 'x',
114
+ icon: ScissorOutlined,
115
+ when: 'commandMode'
116
+ },
117
+ DeleteCell: {
118
+ id: 'notebook:delete-cell',
119
+ label: "Delete Cells",
120
+ icon: DeleteOutlined,
121
+ keybind: 'D D',
122
+ when: 'commandMode'
123
+ },
124
+ DeselectAll: {
125
+ id: 'notebook:deselect-all',
126
+ label: "Deselect All Cells"
127
+ },
128
+ DisableOutputScrolling: {
129
+ id: 'notebook:disable-output-scrolling',
130
+ label: "Disable Scrolling for Outputs"
131
+ },
132
+ DuplicateBelow: {
133
+ id: 'notebook:duplicate-below',
134
+ label: "Duplicate Cells Below"
135
+ },
136
+ EnableOutputScrolling: {
137
+ id: 'notebook:enable-output-scrolling',
138
+ label: "Enable Scrolling for Outputs"
139
+ },
140
+ EnableOrDisableAllOutputScrolling: {
141
+ id: 'notebook:enable-or-disable-all-output-scrolling',
142
+ label: "Enable Or Disable Scrolling for all Outputs"
143
+ },
144
+ EnterCommandMode: {
145
+ id: 'notebook:enter-command-mode',
146
+ label: "Enter Command Mode",
147
+ keybind: 'esc'
148
+ },
149
+ EnterEditMode: {
150
+ id: 'notebook:enter-edit-mode',
151
+ label: "Enter Edit Mode",
152
+ keybind: 'enter',
153
+ when: 'commandMode'
154
+ },
155
+ ExpandAllHeadings: {
156
+ id: 'notebook:expand-all-headings',
157
+ label: "Expand All Headings",
158
+ keybind: 'ctrlcmd+shift+right',
159
+ when: 'commandMode'
160
+ },
161
+ ExportToFormat: {
162
+ id: 'notebook:export-to-format',
163
+ label: "Save and Export Notebook to the given format"
164
+ },
165
+ ExtendMarkedCellsAbove: {
166
+ id: 'notebook:extend-marked-cells-above',
167
+ label: "Extend Selection Above",
168
+ keybind: ['shift+up', 'shift+K'],
169
+ when: 'commandMode'
170
+ },
171
+ ExtendMarkedCellsBelow: {
172
+ id: 'notebook:extend-marked-cells-below',
173
+ label: "Extend Selection Below",
174
+ keybind: ['shift+down', 'shift+J'],
175
+ when: 'commandMode'
176
+ },
177
+ //TODO:
178
+ ExtendMarkedCellsBottom: {
179
+ id: 'notebook:extend-marked-cells-bottom',
180
+ label: "Extend Selection to Bottom",
181
+ keybind: 'shift+end',
182
+ when: 'commandMode'
183
+ },
184
+ //TODO:
185
+ ExtendMarkedCellsTop: {
186
+ id: 'notebook:extend-marked-cells-top',
187
+ label: "Extend Selection to Top",
188
+ keybind: 'shift+home',
189
+ when: 'commandMode'
190
+ },
191
+ HideAllCell: {
192
+ id: 'notebook:hide-all-cell'
193
+ },
194
+ HideAllCellCode: {
195
+ id: 'notebook:hide-all-cell-code',
196
+ label: "Collapse All Code"
197
+ },
198
+ HideAllCellOutput: {
199
+ id: 'notebook:hide-all-cell-output',
200
+ label: "Collapse All Outputs"
201
+ },
202
+ HideCellCode: {
203
+ id: 'notebook:hide-cell-code',
204
+ label: "Collapse Selected Code"
205
+ },
206
+ HideOrShowCellCode: {
207
+ id: 'notebook:hide-or-show-cell-code',
208
+ label: "Hide or show Selected Code",
209
+ keybind: "ctrlcmd+'"
210
+ },
211
+ HideCellOutputs: {
212
+ id: 'notebook:hide-cell-outputs',
213
+ label: "Collapse Selected Outputs",
214
+ icon: EyeInvisibleOutlined
215
+ },
216
+ HideOrShowOutputs: {
217
+ id: 'notebook:hide-or-show-outputs',
218
+ label: "Hide or show Selected outputs",
219
+ keybind: 'ctrlcmd+o'
220
+ },
221
+ InsertCellAbove: {
222
+ id: 'notebook:insert-cell-above',
223
+ label: "Insert Cell Above",
224
+ keybind: 'A',
225
+ when: 'commandMode'
226
+ },
227
+ InsertCellBelow: {
228
+ id: 'notebook:insert-cell-below',
229
+ label: "Insert Cell Below",
230
+ keybind: 'B',
231
+ icon: PlusOutlined,
232
+ when: 'commandMode'
233
+ },
234
+ InsertHeadingAbove: {
235
+ id: 'notebook:insert-heading-above',
236
+ label: "Insert Heading Above Current Heading",
237
+ keybind: 'shift+A',
238
+ when: 'commandMode'
239
+ },
240
+ InsertHeadingBelow: {
241
+ id: 'notebook:insert-heading-below',
242
+ label: "Insert Heading Below Current Heading",
243
+ keybind: 'shift+B',
244
+ when: 'commandMode'
245
+ },
246
+ MergeCellAbove: {
247
+ id: 'notebook:merge-cell-above',
248
+ label: "Merge Cell Above",
249
+ keybind: 'ctrlcmd+backspace',
250
+ when: 'commandMode'
251
+ },
252
+ MergeCellBelow: {
253
+ id: 'notebook:merge-cell-below',
254
+ label: "Merge Cell Below",
255
+ keybind: 'ctrlcmd+shift+M',
256
+ when: 'commandMode'
257
+ },
258
+ MergeCells: {
259
+ id: 'notebook:merge-cells',
260
+ label: "Merge Selected Cells",
261
+ keybind: 'shift+M',
262
+ when: 'commandMode'
263
+ },
264
+ MoveCellDown: {
265
+ id: 'notebook:move-cell-down',
266
+ label: "Move Cells Down",
267
+ keybind: 'ctrlcmd+shift+down',
268
+ icon: MoveDownOutlined,
269
+ when: 'commandMode'
270
+ },
271
+ MoveCellUp: {
272
+ id: 'notebook:move-cell-up',
273
+ label: "Move Cells Up",
274
+ keybind: 'ctrlcmd+shift+up',
275
+ icon: MoveUpOutlined,
276
+ when: 'commandMode'
277
+ },
278
+ MoveCursorDown: {
279
+ id: 'notebook:move-cursor-down',
280
+ label: "Select Cell Below",
281
+ keybind: ['down', 'J'],
282
+ when: 'commandMode'
283
+ },
284
+ MoveCursorUp: {
285
+ id: 'notebook:move-cursor-up',
286
+ label: "Select Cell Above",
287
+ keybind: ['up', 'K'],
288
+ when: 'commandMode'
289
+ },
290
+ MoveCursorHeadingAboveOrCollapse: {
291
+ id: 'notebook:move-cursor-heading-above-or-collapse',
292
+ label: "Select Heading Above or Collapse Heading",
293
+ keybind: 'left',
294
+ when: 'commandMode'
295
+ },
296
+ MoveCursorHeadingBelowOrExpand: {
297
+ id: 'notebook:move-cursor-heading-below-or-expand',
298
+ label: "Select Heading Below or Expand Heading",
299
+ keybind: 'right',
300
+ when: 'commandMode'
301
+ },
302
+ PasteAndReplaceCell: {
303
+ id: 'notebook:paste-and-replace-cell',
304
+ label: "Paste Cells and Replace"
305
+ },
306
+ PasteCellAbove: {
307
+ id: 'notebook:paste-cell-above',
308
+ label: "Paste Cells Above"
309
+ },
310
+ PasteCellBelow: {
311
+ id: 'notebook:paste-cell-below',
312
+ label: "Paste Cells Below",
313
+ keybind: 'V',
314
+ icon: SnippetsOutlined,
315
+ when: 'commandMode'
316
+ },
317
+ Redo: {
318
+ id: 'notebook:redo',
319
+ label: "Redo"
320
+ },
321
+ RedoCellAction: {
322
+ id: 'notebook:redo-cell-action',
323
+ label: "Redo Cell Operation",
324
+ icon: Redo,
325
+ keybind: 'shift+Z',
326
+ when: 'commandMode'
327
+ },
328
+ RenderAllMarkdown: {
329
+ id: 'notebook:render-all-markdown',
330
+ label: "Render All Markdown Cells"
331
+ },
332
+ ReplaceSelection: {
333
+ id: 'notebook:replace-selection',
334
+ label: "Replace Selection in Notebook Cell"
335
+ },
336
+ RestartAndRunToSelected: {
337
+ id: 'notebook:restart-and-run-to-selected',
338
+ label: l10n.t('Restart and Run up to Selected Cell…')
339
+ },
340
+ RestartClearOutput: {
341
+ id: 'notebook:restart-clear-output',
342
+ label: l10n.t('Restart and Clear Outputs of All Cells…'),
343
+ icon: Reload
344
+ },
345
+ RestartRunAll: {
346
+ id: 'notebook:restart-run-all',
347
+ label: l10n.t('Restart and Run All Cells…')
348
+ },
349
+ RunAllAbove: {
350
+ id: 'notebook:run-all-above',
351
+ label: "Run All Above Selected Cell"
352
+ },
353
+ RunAllBelow: {
354
+ id: 'notebook:run-all-below',
355
+ label: "Run All Below Selected Cell"
356
+ },
357
+ RunAllCells: {
358
+ id: 'notebook:run-all-cells',
359
+ label: "Run All Cells"
360
+ },
361
+ RunCell: {
362
+ id: 'notebook:run-cell',
363
+ icon: PlayCircleOutlined,
364
+ // label: `Run Selected Cells and Don't Advance`,
365
+ keybind: 'ctrlcmd+enter'
366
+ },
367
+ TopToolbarRunSelect: {
368
+ id: 'notebook:top-toolbar-run-select'
369
+ },
370
+ SideToolbarRunSelect: {
371
+ id: 'notebook:side-toolbar-run-select'
372
+ },
373
+ RunCellAndInsertBelow: {
374
+ id: 'notebook:run-cell-and-insert-below',
375
+ label: "Run Selected Cells and Insert Below",
376
+ keybind: 'alt+enter'
377
+ },
378
+ RunCellAndSelectNext: {
379
+ id: 'notebook:run-cell-and-select-next',
380
+ label: "Run Selected Cells and Select Below",
381
+ keybind: 'shift+enter'
382
+ },
383
+ // TODO: 确认是否保留
384
+ RunInConsole: {
385
+ id: 'notebook:run-in-console',
386
+ label: "Run Selected Text or Current Line in Console"
387
+ },
388
+ // TODO:
389
+ SelectAll: {
390
+ id: 'notebook:select-all',
391
+ label: "Select All Cells",
392
+ keybind: 'ctrlcmd+A',
393
+ when: 'commandMode'
394
+ },
395
+ SelectLastRunCell: {
396
+ id: 'notebook:select-last-run-cell',
397
+ label: "Select current running or last run cell"
398
+ },
399
+ // TODO: 确认命令含义
400
+ SetSideBySideRatio: {
401
+ id: 'notebook:set-side-by-side-ratio',
402
+ label: "Set Side by Side Ratio"
403
+ },
404
+ ShowAllCell: {
405
+ id: 'notebook:show-all-cell',
406
+ label: "Expand All Cell"
407
+ },
408
+ ShowAllCellCode: {
409
+ id: 'notebook:show-all-cell-code',
410
+ label: "Expand All Code"
411
+ },
412
+ ShowAllCellOutputs: {
413
+ id: 'notebook:show-all-cell-outputs',
414
+ label: "Expand All Outputs",
415
+ icon: EyeOutlined
416
+ },
417
+ ShowCellCode: {
418
+ id: 'notebook:show-cell-code',
419
+ label: "Expand Selected Code"
420
+ },
421
+ ShowCellOutputs: {
422
+ id: 'notebook:show-cell-outputs',
423
+ label: "Expand Selected Outputs"
424
+ },
425
+ SplitCellAntCursor: {
426
+ id: 'notebook:split-cell-at-cursor',
427
+ label: "Split Cell",
428
+ keybind: 'ctrlcmd+shift+-'
429
+ },
430
+ ToggleAllCellLineNumbers: {
431
+ id: 'notebook:toggle-all-cell-line-numbers',
432
+ label: "Show Line Numbers",
433
+ keybind: 'shift+L'
434
+ },
435
+ ToggleAutoclosingBrackets: {
436
+ id: 'notebook:toggle-autoclosing-brackets',
437
+ label: "Auto Close Brackets for All Notebook Cell Types"
438
+ },
439
+ ToggleHeadingCollapse: {
440
+ id: 'notebook:toggle-heading-collapse',
441
+ label: "Toggle Collapse Notebook Heading"
442
+ },
443
+ ToggleRenderSideBySideCurrent: {
444
+ id: 'notebook:toggle-render-side-by-side-current',
445
+ label: "Render Side-by-Side",
446
+ keybind: 'shift+R',
447
+ when: 'commandMode'
448
+ },
449
+ Trust: {
450
+ id: 'notebook:trust',
451
+ label: "Trust Notebook"
452
+ },
453
+ Undo: {
454
+ id: 'notebook:undo',
455
+ label: "Undo"
456
+ },
457
+ UndoCellAction: {
458
+ id: 'notebook:undo-cell-action',
459
+ label: "Undo Cell Operation",
460
+ keybind: 'Z',
461
+ icon: Undo,
462
+ when: 'commandMode'
463
+ },
464
+ More: {
465
+ id: 'notebook:more',
466
+ icon: MoreOutlined
467
+ },
468
+ InsertCellBottom: {
469
+ id: 'notebook:insert-cell-bottom'
470
+ }
471
+ //#endregion
472
+ };
@@ -0,0 +1,20 @@
1
+ import type { FC } from 'react';
2
+ import type { CellOptions, CellView } from '../libro-protocol.js';
3
+ export type CellExecutionTimeProvider = FC<{
4
+ cell: CellView;
5
+ }>;
6
+ export declare const CellExecutionTimeProvider: unique symbol;
7
+ export type CellInputBottonBlankProvider = FC<{
8
+ cell: CellView;
9
+ }>;
10
+ export declare const CellInputBottonBlankProvider: unique symbol;
11
+ export type CellOutputVisulizationProvider = FC<{
12
+ cell: CellView;
13
+ }>;
14
+ export declare const CellOutputVisulizationProvider: unique symbol;
15
+ export type BetweenCellProvider = FC<{
16
+ index: number;
17
+ addCell: (option: CellOptions, position?: number | undefined) => Promise<void>;
18
+ }>;
19
+ export declare const BetweenCellProvider: unique symbol;
20
+ //# sourceMappingURL=cell-protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-protocol.d.ts","sourceRoot":"","sources":["../../src/components/cell-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAElE,MAAM,MAAM,yBAAyB,GAAG,EAAE,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC;AAE/D,eAAO,MAAM,yBAAyB,eAAsC,CAAC;AAE7E,MAAM,MAAM,4BAA4B,GAAG,EAAE,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC;AAElE,eAAO,MAAM,4BAA4B,eAAyC,CAAC;AAEnF,MAAM,MAAM,8BAA8B,GAAG,EAAE,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC;AAEpE,eAAO,MAAM,8BAA8B,eAA2C,CAAC;AAEvF,MAAM,MAAM,mBAAmB,GAAG,EAAE,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChF,CAAC,CAAC;AAEH,eAAO,MAAM,mBAAmB,eAAgC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export var CellExecutionTimeProvider = Symbol('CellExecutionTimeProvider');
2
+ export var CellInputBottonBlankProvider = Symbol('CellInputBottonBlankProvider');
3
+ export var CellOutputVisulizationProvider = Symbol('CellOutputVisulizationProvider');
4
+ export var BetweenCellProvider = Symbol('BetweenCellProvider');