@difizen/libro-core 0.1.1 → 0.1.3

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 (302) hide show
  1. package/es/add-cell/index.less +1 -1
  2. package/es/add-cell/libro-add-cell-slot-contribution.d.ts +1 -2
  3. package/es/add-cell/libro-add-cell-slot-contribution.d.ts.map +1 -1
  4. package/es/add-cell/libro-add-cell-slot-contribution.js +12 -6
  5. package/es/add-cell/libro-add-cell-view.d.ts +4 -4
  6. package/es/add-cell/libro-add-cell-view.d.ts.map +1 -1
  7. package/es/add-cell/libro-add-cell-view.js +4 -6
  8. package/es/cell/libro-cell-contribution.d.ts +1 -2
  9. package/es/cell/libro-cell-contribution.d.ts.map +1 -1
  10. package/es/cell/libro-cell-contribution.js +14 -8
  11. package/es/cell/libro-cell-model.d.ts +9 -0
  12. package/es/cell/libro-cell-model.d.ts.map +1 -1
  13. package/es/cell/libro-cell-model.js +53 -11
  14. package/es/cell/libro-cell-protocol.d.ts +2 -0
  15. package/es/cell/libro-cell-protocol.d.ts.map +1 -1
  16. package/es/cell/libro-cell-view.d.ts +6 -2
  17. package/es/cell/libro-cell-view.d.ts.map +1 -1
  18. package/es/cell/libro-cell-view.js +54 -24
  19. package/es/cell/libro-edit-cell-view.d.ts +6 -12
  20. package/es/cell/libro-edit-cell-view.d.ts.map +1 -1
  21. package/es/cell/libro-edit-cell-view.js +9 -4
  22. package/es/cell/libro-executable-cell-view.d.ts +2 -0
  23. package/es/cell/libro-executable-cell-view.d.ts.map +1 -1
  24. package/es/cell/libro-executable-cell-view.js +4 -1
  25. package/es/collapse-service.d.ts +1 -1
  26. package/es/collapse-service.d.ts.map +1 -1
  27. package/es/collapse-service.js +1 -1
  28. package/es/command/document-commands.d.ts +1 -2
  29. package/es/command/document-commands.d.ts.map +1 -1
  30. package/es/command/document-commands.js +3 -2
  31. package/es/command/kernel-command.d.ts.map +1 -1
  32. package/es/command/kernel-command.js +3 -0
  33. package/es/command/libro-command-contribution.d.ts +0 -1
  34. package/es/command/libro-command-contribution.d.ts.map +1 -1
  35. package/es/command/libro-command-contribution.js +179 -129
  36. package/es/command/libro-command-register.d.ts +0 -1
  37. package/es/command/libro-command-register.d.ts.map +1 -1
  38. package/es/command/libro-command-register.js +13 -7
  39. package/es/command/notebook-commands.d.ts.map +1 -1
  40. package/es/command/notebook-commands.js +17 -4
  41. package/es/components/cell-protocol.d.ts +5 -5
  42. package/es/components/cell-protocol.d.ts.map +1 -1
  43. package/es/components/dnd-cell-item-render.d.ts +6 -2
  44. package/es/components/dnd-cell-item-render.d.ts.map +1 -1
  45. package/es/components/dnd-cell-item-render.js +194 -89
  46. package/es/components/dnd-component/custom-drag-layer.d.ts +1 -1
  47. package/es/components/dnd-component/custom-drag-layer.d.ts.map +1 -1
  48. package/es/components/dnd-component/custom-drag-layer.js +3 -4
  49. package/es/components/dnd-component/default-dnd-content.d.ts +2 -1
  50. package/es/components/dnd-component/default-dnd-content.d.ts.map +1 -1
  51. package/es/components/dnd-component/default-dnd-content.js +100 -44
  52. package/es/components/dnd-component/dnd-context.js +1 -1
  53. package/es/components/dnd-component/dnd-list.d.ts +9 -5
  54. package/es/components/dnd-component/dnd-list.d.ts.map +1 -1
  55. package/es/components/dnd-component/dnd-list.js +93 -26
  56. package/es/components/dnd-component/index.d.ts +1 -1
  57. package/es/components/dnd-component/index.d.ts.map +1 -1
  58. package/es/components/dnd-component/index.js +2 -2
  59. package/es/components/dnd-component/index.less +8 -0
  60. package/es/components/dnd-component/overscanIndices-getter.d.ts +22 -0
  61. package/es/components/dnd-component/overscanIndices-getter.d.ts.map +1 -0
  62. package/es/components/dnd-component/overscanIndices-getter.js +58 -0
  63. package/es/components/dnd-component/virtualized-manager.d.ts +19 -0
  64. package/es/components/dnd-component/virtualized-manager.d.ts.map +1 -0
  65. package/es/components/dnd-component/virtualized-manager.js +60 -0
  66. package/es/components/index.d.ts +2 -2
  67. package/es/components/index.d.ts.map +1 -1
  68. package/es/components/index.js +2 -2
  69. package/es/components/libro-virtualized-render.d.ts +15 -0
  70. package/es/components/libro-virtualized-render.d.ts.map +1 -0
  71. package/es/components/libro-virtualized-render.js +174 -0
  72. package/es/content/index.d.ts +1 -0
  73. package/es/content/index.d.ts.map +1 -1
  74. package/es/content/index.js +2 -1
  75. package/es/content/libro-content-contribution.d.ts +2 -2
  76. package/es/content/libro-content-contribution.d.ts.map +1 -1
  77. package/es/content/libro-content-contribution.js +2 -3
  78. package/es/content/libro-content-module.d.ts.map +1 -1
  79. package/es/content/libro-content-module.js +3 -2
  80. package/es/content/libro-content-protocol.d.ts +5 -0
  81. package/es/content/libro-content-protocol.d.ts.map +1 -1
  82. package/es/content/libro-content-protocol.js +2 -1
  83. package/es/content/libro-content-service.d.ts +5 -3
  84. package/es/content/libro-content-service.d.ts.map +1 -1
  85. package/es/content/libro-content-service.js +36 -8
  86. package/es/content/libro-save-content-contribution.d.ts +6 -0
  87. package/es/content/libro-save-content-contribution.d.ts.map +1 -0
  88. package/es/content/libro-save-content-contribution.js +27 -0
  89. package/es/formatter/index.d.ts +6 -0
  90. package/es/formatter/index.d.ts.map +1 -0
  91. package/es/formatter/index.js +5 -0
  92. package/es/formatter/libro-formatter-json-contribution.d.ts +18 -0
  93. package/es/formatter/libro-formatter-json-contribution.d.ts.map +1 -0
  94. package/es/formatter/libro-formatter-json-contribution.js +41 -0
  95. package/es/formatter/libro-formatter-manager.d.ts +16 -0
  96. package/es/formatter/libro-formatter-manager.d.ts.map +1 -0
  97. package/es/formatter/libro-formatter-manager.js +86 -0
  98. package/es/formatter/libro-formatter-module.d.ts +3 -0
  99. package/es/formatter/libro-formatter-module.d.ts.map +1 -0
  100. package/es/formatter/libro-formatter-module.js +7 -0
  101. package/es/formatter/libro-formatter-protocol.d.ts +37 -0
  102. package/es/formatter/libro-formatter-protocol.d.ts.map +1 -0
  103. package/es/formatter/libro-formatter-protocol.js +18 -0
  104. package/es/formatter/libro-formatter-string-contribution.d.ts +18 -0
  105. package/es/formatter/libro-formatter-string-contribution.d.ts.map +1 -0
  106. package/es/formatter/libro-formatter-string-contribution.js +41 -0
  107. package/es/formatter/libro-formatter-trans-default-contribution.d.ts +7 -0
  108. package/es/formatter/libro-formatter-trans-default-contribution.d.ts.map +1 -0
  109. package/es/formatter/libro-formatter-trans-default-contribution.js +19 -0
  110. package/es/index.d.ts +5 -1
  111. package/es/index.d.ts.map +1 -1
  112. package/es/index.js +6 -2
  113. package/es/index.less +135 -58
  114. package/es/libro-context-key.d.ts.map +1 -1
  115. package/es/libro-model.d.ts +13 -2
  116. package/es/libro-model.d.ts.map +1 -1
  117. package/es/libro-model.js +149 -70
  118. package/es/libro-protocol.d.ts +44 -2
  119. package/es/libro-protocol.d.ts.map +1 -1
  120. package/es/libro-protocol.js +16 -3
  121. package/es/libro-service.d.ts +1 -1
  122. package/es/libro-service.d.ts.map +1 -1
  123. package/es/libro-service.js +29 -20
  124. package/es/{configuration/libro-configuration-contribution.d.ts → libro-setting-contribution.d.ts} +2 -2
  125. package/es/libro-setting-contribution.d.ts.map +1 -0
  126. package/es/{configuration/libro-configuration-contribution.js → libro-setting-contribution.js} +8 -9
  127. package/es/{configuration/libro-configuration.d.ts → libro-setting.d.ts} +3 -2
  128. package/es/libro-setting.d.ts.map +1 -0
  129. package/es/{configuration/libro-configuration.js → libro-setting.js} +17 -7
  130. package/es/libro-view.d.ts +21 -8
  131. package/es/libro-view.d.ts.map +1 -1
  132. package/es/libro-view.js +477 -338
  133. package/es/material-from-designer.d.ts +3 -0
  134. package/es/material-from-designer.d.ts.map +1 -1
  135. package/es/material-from-designer.js +112 -1
  136. package/es/module.d.ts.map +1 -1
  137. package/es/module.js +20 -5
  138. package/es/output/output-area.d.ts +3 -4
  139. package/es/output/output-area.d.ts.map +1 -1
  140. package/es/output/output-area.js +23 -16
  141. package/es/output/output-contribution.d.ts +0 -1
  142. package/es/output/output-contribution.d.ts.map +1 -1
  143. package/es/output/output-contribution.js +14 -9
  144. package/es/output/output-model.d.ts +2 -2
  145. package/es/output/output-model.d.ts.map +1 -1
  146. package/es/output/output-model.js +2 -2
  147. package/es/output/output-protocol.d.ts.map +1 -1
  148. package/es/output/output-protocol.js +0 -2
  149. package/es/settings/index.d.ts +5 -0
  150. package/es/settings/index.d.ts.map +1 -0
  151. package/es/settings/index.js +4 -0
  152. package/es/settings/index.less +3 -0
  153. package/es/settings/module.d.ts +3 -0
  154. package/es/settings/module.d.ts.map +1 -0
  155. package/es/settings/module.js +4 -0
  156. package/es/settings/setting-editor/configuration-panel-view.d.ts +13 -0
  157. package/es/settings/setting-editor/configuration-panel-view.d.ts.map +1 -0
  158. package/es/settings/setting-editor/configuration-panel-view.js +115 -0
  159. package/es/settings/setting-editor/configuration-render-contribution.d.ts +6 -0
  160. package/es/settings/setting-editor/configuration-render-contribution.d.ts.map +1 -0
  161. package/es/settings/setting-editor/configuration-render-contribution.js +77 -0
  162. package/es/settings/setting-editor/default-node-render.d.ts +9 -0
  163. package/es/settings/setting-editor/default-node-render.d.ts.map +1 -0
  164. package/es/settings/setting-editor/default-node-render.js +79 -0
  165. package/es/settings/setting-editor/index.d.ts +7 -0
  166. package/es/settings/setting-editor/index.d.ts.map +1 -0
  167. package/es/settings/setting-editor/index.js +6 -0
  168. package/es/settings/setting-editor/index.less +12 -0
  169. package/es/settings/setting-editor/module.d.ts +3 -0
  170. package/es/settings/setting-editor/module.d.ts.map +1 -0
  171. package/es/settings/setting-editor/module.js +7 -0
  172. package/es/settings/setting-editor/setting-editor-view.d.ts +15 -0
  173. package/es/settings/setting-editor/setting-editor-view.d.ts.map +1 -0
  174. package/es/settings/setting-editor/setting-editor-view.js +169 -0
  175. package/es/settings/setting-editor/setting-tree-service.d.ts +9 -0
  176. package/es/settings/setting-editor/setting-tree-service.d.ts.map +1 -0
  177. package/es/settings/setting-editor/setting-tree-service.js +118 -0
  178. package/es/settings/setting-editor/setting-tree-view.d.ts +19 -0
  179. package/es/settings/setting-editor/setting-tree-view.d.ts.map +1 -0
  180. package/es/settings/setting-editor/setting-tree-view.js +88 -0
  181. package/es/settings/settings-contribution.d.ts +7 -0
  182. package/es/settings/settings-contribution.d.ts.map +1 -0
  183. package/es/settings/settings-contribution.js +36 -0
  184. package/es/settings/settings-modal.d.ts +5 -0
  185. package/es/settings/settings-modal.d.ts.map +1 -0
  186. package/es/settings/settings-modal.js +53 -0
  187. package/es/settings/settings-modal.less +3 -0
  188. package/es/settings/settings-protocol.d.ts +4 -0
  189. package/es/settings/settings-protocol.d.ts.map +1 -0
  190. package/es/settings/settings-protocol.js +5 -0
  191. package/es/slot/libro-slot-manager.d.ts +2 -2
  192. package/es/slot/libro-slot-manager.d.ts.map +1 -1
  193. package/es/slot/libro-slot-manager.js +14 -8
  194. package/es/slot/libro-slot-view.d.ts +3 -3
  195. package/es/slot/libro-slot-view.d.ts.map +1 -1
  196. package/es/slot/libro-slot-view.js +2 -2
  197. package/es/theme/libro-color-registry.d.ts.map +1 -1
  198. package/es/theme/libro-color-registry.js +7 -0
  199. package/es/toolbar/all-outputs-scroll-icon.d.ts +3 -0
  200. package/es/toolbar/all-outputs-scroll-icon.d.ts.map +1 -0
  201. package/es/toolbar/all-outputs-scroll-icon.js +10 -0
  202. package/es/toolbar/libro-toolbar.d.ts +2 -1
  203. package/es/toolbar/libro-toolbar.d.ts.map +1 -1
  204. package/es/toolbar/libro-toolbar.js +44 -8
  205. package/es/toolbar/restart-clear-outputs-modal.d.ts +1 -2
  206. package/es/toolbar/restart-clear-outputs-modal.d.ts.map +1 -1
  207. package/es/toolbar/restart-clear-outputs-modal.js +2 -2
  208. package/es/toolbar/shutdown-modal.d.ts +1 -2
  209. package/es/toolbar/shutdown-modal.d.ts.map +1 -1
  210. package/es/toolbar/shutdown-modal.js +2 -2
  211. package/es/toolbar/side-toolar-more-select.d.ts.map +1 -1
  212. package/es/toolbar/side-toolar-more-select.js +2 -2
  213. package/es/virtualized-manager-helper.d.ts +11 -0
  214. package/es/virtualized-manager-helper.d.ts.map +1 -0
  215. package/es/virtualized-manager-helper.js +51 -0
  216. package/es/virtualized-manager.d.ts +19 -0
  217. package/es/virtualized-manager.d.ts.map +1 -0
  218. package/es/virtualized-manager.js +61 -0
  219. package/package.json +9 -6
  220. package/src/add-cell/index.less +1 -1
  221. package/src/add-cell/libro-add-cell-slot-contribution.ts +1 -4
  222. package/src/add-cell/libro-add-cell-view.tsx +13 -6
  223. package/src/cell/libro-cell-contribution.ts +2 -6
  224. package/src/cell/libro-cell-model.ts +57 -4
  225. package/src/cell/libro-cell-protocol.ts +2 -0
  226. package/src/cell/libro-cell-view.tsx +21 -9
  227. package/src/cell/libro-edit-cell-view.tsx +10 -9
  228. package/src/cell/libro-executable-cell-view.ts +6 -1
  229. package/src/collapse-service.ts +1 -1
  230. package/src/command/document-commands.ts +3 -5
  231. package/src/command/kernel-command.ts +3 -0
  232. package/src/command/libro-command-contribution.ts +107 -91
  233. package/src/command/libro-command-register.ts +1 -4
  234. package/src/command/notebook-commands.ts +16 -3
  235. package/src/components/cell-protocol.ts +5 -5
  236. package/src/components/dnd-cell-item-render.tsx +239 -92
  237. package/src/components/dnd-component/custom-drag-layer.tsx +5 -6
  238. package/src/components/dnd-component/default-dnd-content.tsx +113 -42
  239. package/src/components/dnd-component/dnd-context.tsx +1 -1
  240. package/src/components/dnd-component/dnd-list.tsx +135 -43
  241. package/src/components/dnd-component/index.less +8 -0
  242. package/src/components/dnd-component/index.tsx +1 -1
  243. package/src/components/dnd-component/overscanIndices-getter.ts +92 -0
  244. package/src/components/dnd-component/virtualized-manager.ts +34 -0
  245. package/src/components/index.ts +2 -2
  246. package/src/components/libro-virtualized-render.tsx +178 -0
  247. package/src/content/index.ts +1 -0
  248. package/src/content/libro-content-contribution.ts +2 -3
  249. package/src/content/libro-content-module.ts +11 -3
  250. package/src/content/libro-content-protocol.ts +6 -0
  251. package/src/content/libro-content-service.ts +26 -8
  252. package/src/content/libro-save-content-contribution.ts +12 -0
  253. package/src/formatter/index.ts +5 -0
  254. package/src/formatter/libro-formatter-json-contribution.ts +42 -0
  255. package/src/formatter/libro-formatter-manager.ts +85 -0
  256. package/src/formatter/libro-formatter-module.ts +19 -0
  257. package/src/formatter/libro-formatter-protocol.ts +63 -0
  258. package/src/formatter/libro-formatter-string-contribution.ts +41 -0
  259. package/src/formatter/libro-formatter-trans-default-contribution.ts +15 -0
  260. package/src/index.less +135 -58
  261. package/src/index.tsx +6 -1
  262. package/src/libro-context-key.ts +3 -3
  263. package/src/libro-model.ts +87 -23
  264. package/src/libro-protocol.ts +81 -4
  265. package/src/libro-service.ts +4 -13
  266. package/src/{configuration/libro-configuration-contribution.ts → libro-setting-contribution.ts} +7 -8
  267. package/src/{configuration/libro-configuration.ts → libro-setting.ts} +18 -7
  268. package/src/libro-view.tsx +273 -141
  269. package/src/material-from-designer.tsx +93 -1
  270. package/src/module.ts +29 -7
  271. package/src/output/output-area.tsx +18 -12
  272. package/src/output/output-contribution.ts +2 -6
  273. package/src/output/output-model.tsx +3 -3
  274. package/src/output/output-protocol.ts +0 -1
  275. package/src/settings/index.less +3 -0
  276. package/src/settings/index.ts +4 -0
  277. package/src/settings/module.ts +8 -0
  278. package/src/settings/setting-editor/configuration-panel-view.tsx +89 -0
  279. package/src/settings/setting-editor/configuration-render-contribution.ts +81 -0
  280. package/src/settings/setting-editor/default-node-render.tsx +65 -0
  281. package/src/settings/setting-editor/index.less +12 -0
  282. package/src/settings/setting-editor/index.ts +6 -0
  283. package/src/settings/setting-editor/module.ts +17 -0
  284. package/src/settings/setting-editor/setting-editor-view.tsx +93 -0
  285. package/src/settings/setting-editor/setting-tree-service.ts +82 -0
  286. package/src/settings/setting-editor/setting-tree-view.tsx +95 -0
  287. package/src/settings/settings-contribution.tsx +24 -0
  288. package/src/settings/settings-modal.less +3 -0
  289. package/src/settings/settings-modal.tsx +50 -0
  290. package/src/settings/settings-protocol.ts +7 -0
  291. package/src/slot/libro-slot-manager.ts +1 -3
  292. package/src/slot/libro-slot-view.tsx +2 -5
  293. package/src/theme/libro-color-registry.ts +6 -0
  294. package/src/toolbar/all-outputs-scroll-icon.tsx +19 -0
  295. package/src/toolbar/libro-toolbar.tsx +30 -5
  296. package/src/toolbar/restart-clear-outputs-modal.tsx +3 -3
  297. package/src/toolbar/shutdown-modal.tsx +3 -3
  298. package/src/toolbar/side-toolar-more-select.tsx +2 -1
  299. package/src/virtualized-manager-helper.ts +29 -0
  300. package/src/virtualized-manager.ts +34 -0
  301. package/es/configuration/libro-configuration-contribution.d.ts.map +0 -1
  302. package/es/configuration/libro-configuration.d.ts.map +0 -1
@@ -0,0 +1,60 @@
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
4
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
5
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
6
+ 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 }); }
7
+ 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); } }
8
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
9
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
+ 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; }
13
+ 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.'); }
14
+ import { prop, singleton } from '@difizen/mana-app';
15
+ export var VirtualizedManager = (_dec = singleton(), _dec2 = prop(), _dec(_class = (_class2 = /*#__PURE__*/_createClass(function VirtualizedManager() {
16
+ var _this = this;
17
+ _classCallCheck(this, VirtualizedManager);
18
+ /**
19
+ * 因为进行isVirtualized判断过后才会渲染list
20
+ * 所以它用于滚动到某个cell的判断依据是没有问题的。
21
+ */
22
+ _initializerDefineProperty(this, "isVirtualized", _descriptor, this);
23
+ /**
24
+ *
25
+ * @param length cell个数
26
+ * @param size undefined 或者 单位 为B
27
+ * @returns 是否使用虚拟滚动
28
+ */
29
+ this.openVirtualized = /*#__PURE__*/function () {
30
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(length, size) {
31
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
32
+ while (1) switch (_context.prev = _context.next) {
33
+ case 0:
34
+ if (!(length > 100 || size && size > 4)) {
35
+ _context.next = 5;
36
+ break;
37
+ }
38
+ _this.isVirtualized = true;
39
+ return _context.abrupt("return", true);
40
+ case 5:
41
+ _this.isVirtualized = false;
42
+ return _context.abrupt("return", false);
43
+ case 7:
44
+ case "end":
45
+ return _context.stop();
46
+ }
47
+ }, _callee);
48
+ }));
49
+ return function (_x, _x2) {
50
+ return _ref.apply(this, arguments);
51
+ };
52
+ }();
53
+ }), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "isVirtualized", [_dec2], {
54
+ configurable: true,
55
+ enumerable: true,
56
+ writable: true,
57
+ initializer: function initializer() {
58
+ return false;
59
+ }
60
+ })), _class2)) || _class);
@@ -1,6 +1,6 @@
1
- export * from './libro-component.js';
2
- export * from './dnd-component/index.js';
3
1
  export * from './cell-protocol.js';
4
2
  export * from './dnd-cell-item-render.js';
3
+ export * from './dnd-component/index.js';
4
+ export * from './libro-component.js';
5
5
  export * from './libro-side-toolbar-menu.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC"}
@@ -1,5 +1,5 @@
1
- export * from "./libro-component.js";
2
- export * from "./dnd-component/index.js";
3
1
  export * from "./cell-protocol.js";
4
2
  export * from "./dnd-cell-item-render.js";
3
+ export * from "./dnd-component/index.js";
4
+ export * from "./libro-component.js";
5
5
  export * from "./libro-side-toolbar-menu.js";
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { CellView } from '../libro-protocol.js';
3
+ import type { LibroView } from '../libro-view.js';
4
+ interface LibroVirtualizedRowProps {
5
+ style: Record<string, string>;
6
+ cell: CellView;
7
+ }
8
+ export declare const LibroVirtualizedRow: React.FC<LibroVirtualizedRowProps>;
9
+ export declare const LibroCellsOutputRender: React.FC<{
10
+ cells: CellView[];
11
+ libroView: LibroView;
12
+ addCellButtons: ReactNode;
13
+ }>;
14
+ export {};
15
+ //# sourceMappingURL=libro-virtualized-render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libro-virtualized-render.d.ts","sourceRoot":"","sources":["../../src/components/libro-virtualized-render.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD,UAAU,wBAAwB;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAkBlE,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC5C,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,cAAc,EAAE,SAAS,CAAC;CAC3B,CAwIA,CAAC"}
@@ -0,0 +1,174 @@
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
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ 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); }
5
+ 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; }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
+ /* eslint-disable react-hooks/exhaustive-deps */
14
+ import { AutoSizer, List } from '@difizen/libro-virtualized';
15
+ import { memo, useEffect, useMemo, useRef, useState } from 'react';
16
+ import { EditorCellView } from "../cell/index.js";
17
+ import { DndCellRender } from "./dnd-component/index.js";
18
+ import { Fragment as _Fragment } from "react/jsx-runtime";
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { jsxs as _jsxs } from "react/jsx-runtime";
21
+ export var LibroVirtualizedRow = /*#__PURE__*/memo(function LibroVirtualizedRow(_ref) {
22
+ var style = _ref.style,
23
+ cell = _ref.cell;
24
+ var itemRef = useRef(null);
25
+
26
+ // MarkDown Cell 需要隐藏其在虚拟滚动部分的占位div
27
+ var isHidden = cell.hasInputHidden;
28
+ return /*#__PURE__*/_jsx("div", {
29
+ ref: itemRef,
30
+ style: _objectSpread(_objectSpread({}, style), {}, {
31
+ visibility: 'hidden'
32
+ }),
33
+ children: isHidden || !cell.renderEditorIntoVirtualized || !EditorCellView.is(cell) ? /*#__PURE__*/_jsx(_Fragment, {}) :
34
+ // cell.editorView && <ViewRender view={cell.editorView} />
35
+ cell.renderEditor && cell.renderEditor()
36
+ });
37
+ });
38
+
39
+ // 已经在上层判断是否为虚拟滚动
40
+ export var LibroCellsOutputRender = function LibroCellsOutputRender(_ref2) {
41
+ var cells = _ref2.cells,
42
+ libroView = _ref2.libroView,
43
+ addCellButtons = _ref2.addCellButtons;
44
+ var parentRef = useRef(null);
45
+ var listRef = useRef(null);
46
+ var noEditorAreaRef = useRef(null);
47
+ var _useState = useState([]),
48
+ _useState2 = _slicedToArray(_useState, 2),
49
+ editorsOffset = _useState2[0],
50
+ setEditorsOffset = _useState2[1];
51
+ var editorAreaHeight = useMemo(function () {
52
+ var inputHeight = cells.map(function (cell) {
53
+ if (cell.editorAreaHeight) {
54
+ return cell.editorAreaHeight;
55
+ } else {
56
+ return 0;
57
+ }
58
+ });
59
+ return inputHeight;
60
+ }, [cells]);
61
+ var noEditorAreaHeight = useMemo(function () {
62
+ // 如果只有一个Cell,则它的最小高度是200,防止右侧边栏被隐藏。
63
+ var lastCellHeight = Math.max(cells[cells.length - 1].noEditorAreaHeight || 0, 120);
64
+ var outputHeight = cells.map(function (cell, idx) {
65
+ if (idx === cells.length - 1) {
66
+ return lastCellHeight;
67
+ }
68
+ if (cell.noEditorAreaHeight) {
69
+ return cell.noEditorAreaHeight;
70
+ } else {
71
+ return 0;
72
+ }
73
+ });
74
+ if (addCellButtons) {
75
+ outputHeight.push(90);
76
+ } //
77
+
78
+ return outputHeight;
79
+ }, [cells, addCellButtons]);
80
+ var totalSize = useMemo(function () {
81
+ return noEditorAreaHeight.reduce(function (pre, cur) {
82
+ return pre + cur;
83
+ });
84
+ }, [noEditorAreaHeight]);
85
+ useEffect(function () {
86
+ if (!listRef || !listRef.current || !libroView.model) {
87
+ return;
88
+ }
89
+ libroView.model.onScrollToCellView(function (params) {
90
+ // listRef.current!.scrollToRow(index);
91
+ listRef.current.scrollToLine(params.cellIndex, params.lineIndex || 1);
92
+ });
93
+ return function () {
94
+ libroView.model.disposeScrollToCellViewEmitter();
95
+ };
96
+ }, [listRef, libroView]);
97
+
98
+ // 在Cell的高度变化时,触发重新计算所有Cell的高度偏移值
99
+ useEffect(function () {
100
+ if (!noEditorAreaRef.current) {
101
+ return;
102
+ }
103
+ var newCellOffsets = [];
104
+ var childNum = noEditorAreaRef.current.childNodes.length || 0;
105
+ noEditorAreaRef.current.childNodes.forEach(function (child, index) {
106
+ // 最后一个child元素是 addCellButtons
107
+ if (index === childNum - 1) {
108
+ return;
109
+ }
110
+ var offsetTop = child.offsetTop;
111
+ var offset = 0;
112
+ if (cells[index].calcEditorOffset) {
113
+ offset += cells[index].calcEditorOffset();
114
+ }
115
+ newCellOffsets[index] = offsetTop + offset;
116
+ });
117
+ setEditorsOffset(newCellOffsets);
118
+ }, [noEditorAreaRef.current, cells]);
119
+
120
+ // 绘制所有的非编辑器区域
121
+ var noEditorArea = useMemo(function () {
122
+ return /*#__PURE__*/_jsxs("div", {
123
+ style: {
124
+ position: 'absolute',
125
+ visibility: 'visible',
126
+ width: '100%',
127
+ height: '100%'
128
+ },
129
+ ref: noEditorAreaRef,
130
+ children: [cells.filter(function (cell) {
131
+ return cell.collapsedHidden === false;
132
+ }).map(function (cell, index) {
133
+ return /*#__PURE__*/_jsx(DndCellRender, {
134
+ cell: cell,
135
+ index: index
136
+ }, cell.id);
137
+ }), addCellButtons]
138
+ });
139
+ }, [cells, addCellButtons]);
140
+ return /*#__PURE__*/_jsx(AutoSizer, {
141
+ style: {
142
+ height: '100%',
143
+ width: '100%'
144
+ },
145
+ ref: parentRef,
146
+ children: function children(_ref3) {
147
+ var width = _ref3.width,
148
+ height = _ref3.height;
149
+ return /*#__PURE__*/_jsx(List, {
150
+ ref: listRef,
151
+ width: width,
152
+ height: height,
153
+ rowCount: cells.length,
154
+ rowHeight: 50
155
+ // rowHeight={getOrCreateCache(libroView.id).rowHeight}
156
+ ,
157
+ rowRenderer: function rowRenderer(_ref4) {
158
+ var key = _ref4.key,
159
+ index = _ref4.index,
160
+ style = _ref4.style;
161
+ return /*#__PURE__*/_jsx(LibroVirtualizedRow, {
162
+ style: style,
163
+ cell: cells[index]
164
+ }, key);
165
+ },
166
+ cellsHeight: noEditorAreaHeight,
167
+ totalSize: totalSize,
168
+ editorAreaHeight: editorAreaHeight,
169
+ noEditorArea: noEditorArea,
170
+ editorsOffset: editorsOffset
171
+ });
172
+ }
173
+ });
174
+ };
@@ -2,4 +2,5 @@ export * from './libro-content-contribution.js';
2
2
  export * from './libro-content-protocol.js';
3
3
  export * from './libro-content-service.js';
4
4
  export * from './libro-content-module.js';
5
+ export * from './libro-save-content-contribution.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sCAAsC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from "./libro-content-contribution.js";
2
2
  export * from "./libro-content-protocol.js";
3
3
  export * from "./libro-content-service.js";
4
- export * from "./libro-content-module.js";
4
+ export * from "./libro-content-module.js";
5
+ export * from "./libro-save-content-contribution.js";
@@ -1,7 +1,7 @@
1
1
  import { ContentContribution } from './libro-content-protocol.js';
2
2
  export declare class DefaultContentContribution implements ContentContribution {
3
- canHandle: (_options: Record<string, any>, _model: any) => number;
4
- loadContent(_options: Record<string, any>, _model: any): Promise<{
3
+ canHandle: (options: Record<string, any>, model: any) => number;
4
+ loadContent(options: Record<string, any>, model: any): Promise<{
5
5
  metadata: {};
6
6
  cells: never[];
7
7
  nbformat: number;
@@ -1 +1 @@
1
- {"version":3,"file":"libro-content-contribution.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-contribution.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,qBACa,0BAA2B,YAAW,mBAAmB;IACpE,SAAS,aAAc,OAAO,MAAM,EAAE,GAAG,CAAC,UAAU,GAAG,YAAO;IAC9D,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG;;;;;;CAQvD"}
1
+ {"version":3,"file":"libro-content-contribution.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-contribution.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,qBACa,0BAA2B,YAAW,mBAAmB;IACpE,SAAS,YAAa,OAAO,MAAM,EAAE,GAAG,CAAC,SAAS,GAAG,YAAO;IAC5D,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG;;;;;;CAQrD"}
@@ -5,7 +5,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
5
5
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- /* eslint-disable @typescript-eslint/no-unused-vars */
9
8
  import { singleton } from '@difizen/mana-app';
10
9
  import { ContentContribution } from "./libro-content-protocol.js";
11
10
  export var DefaultContentContribution = (_dec = singleton({
@@ -13,13 +12,13 @@ export var DefaultContentContribution = (_dec = singleton({
13
12
  }), _dec(_class = /*#__PURE__*/function () {
14
13
  function DefaultContentContribution() {
15
14
  _classCallCheck(this, DefaultContentContribution);
16
- this.canHandle = function (_options, _model) {
15
+ this.canHandle = function (options, model) {
17
16
  return 1;
18
17
  };
19
18
  }
20
19
  _createClass(DefaultContentContribution, [{
21
20
  key: "loadContent",
22
- value: function loadContent(_options, _model) {
21
+ value: function loadContent(options, model) {
23
22
  return Promise.resolve({
24
23
  metadata: {},
25
24
  cells: [],
@@ -1 +1 @@
1
- {"version":3,"file":"libro-content-module.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAM/C,eAAO,MAAM,kBAAkB,YAE6B,CAAC"}
1
+ {"version":3,"file":"libro-content-module.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAU/C,eAAO,MAAM,kBAAkB,YAM5B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { ManaModule } from '@difizen/mana-app';
2
2
  import { DefaultContentContribution } from "./libro-content-contribution.js";
3
- import { ContentContribution } from "./libro-content-protocol.js";
3
+ import { ContentContribution, ContentSaveContribution } from "./libro-content-protocol.js";
4
4
  import { LibroContentService } from "./libro-content-service.js";
5
- export var LibroContentModule = ManaModule.create().contribution(ContentContribution).register(DefaultContentContribution, LibroContentService);
5
+ import { DefaultSaveContentContribution } from "./libro-save-content-contribution.js";
6
+ export var LibroContentModule = ManaModule.create().contribution(ContentContribution, ContentSaveContribution).register(DefaultContentContribution, LibroContentService, DefaultSaveContentContribution);
@@ -5,4 +5,9 @@ export interface ContentContribution {
5
5
  canHandle: (options: Record<string, any>, model: any) => number;
6
6
  loadContent: (options: Record<string, any>, model: any) => Promise<INotebookContent>;
7
7
  }
8
+ export declare const ContentSaveContribution: Syringe.DefinedToken;
9
+ export interface ContentSaveContribution {
10
+ canHandle: (options: Record<string, any>, model: any) => number;
11
+ saveContent: (options: Record<string, any>, model: any) => Promise<void>;
12
+ }
8
13
  //# sourceMappingURL=libro-content-protocol.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"libro-content-protocol.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,mBAAmB,sBAA6C,CAAC;AAC9E,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;IAChE,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACtF"}
1
+ {"version":3,"file":"libro-content-protocol.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,mBAAmB,sBAA6C,CAAC;AAC9E,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;IAChE,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACtF;AAED,eAAO,MAAM,uBAAuB,sBAAiD,CAAC;AACtF,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;IAChE,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E"}
@@ -1,2 +1,3 @@
1
1
  import { Syringe } from '@difizen/mana-app';
2
- export var ContentContribution = Syringe.defineToken('ContentContribution');
2
+ export var ContentContribution = Syringe.defineToken('ContentContribution');
3
+ export var ContentSaveContribution = Syringe.defineToken('ContentSaveContribution');
@@ -1,9 +1,11 @@
1
1
  import type { Contribution } from '@difizen/mana-app';
2
- import { ContentContribution } from './libro-content-protocol.js';
2
+ import { ContentContribution, ContentSaveContribution } from './libro-content-protocol.js';
3
3
  export declare class LibroContentService {
4
- protected contentProvider: Contribution.Provider<ContentContribution>;
5
- constructor(contentProvider: Contribution.Provider<ContentContribution>);
4
+ contentProvider: Contribution.Provider<ContentContribution>;
5
+ contentSaveProvider: Contribution.Provider<ContentSaveContribution>;
6
6
  protected findProvider(options: Record<string, any>, model: any): ContentContribution;
7
7
  loadLibroContent(options: Record<string, any>, model: any): Promise<import("@difizen/libro-common").INotebookContent>;
8
+ protected findSaveProvider(options: Record<string, any>, model: any): ContentSaveContribution;
9
+ saveLibroContent(options: Record<string, any>, model: any): Promise<void>;
8
10
  }
9
11
  //# sourceMappingURL=libro-content-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"libro-content-service.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,qBACa,mBAAmB;IAC9B,SAAS,CAAC,eAAe,EAAE,YAAY,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;gBAGpE,eAAe,EAAE,YAAY,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAI7D,SAAS,CAAC,YAAY,CACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,KAAK,EAAE,GAAG,GACT,mBAAmB;IAStB,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG;CAG1D"}
1
+ {"version":3,"file":"libro-content-service.d.ts","sourceRoot":"","sources":["../../src/content/libro-content-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AAErC,qBACa,mBAAmB;IAE9B,eAAe,EAAE,YAAY,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAG5D,mBAAmB,EAAE,YAAY,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IAEpE,SAAS,CAAC,YAAY,CACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,KAAK,EAAE,GAAG,GACT,mBAAmB;IAStB,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG;IAIzD,SAAS,CAAC,gBAAgB,CACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,KAAK,EAAE,GAAG,GACT,uBAAuB;IAS1B,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG;CAG1D"}
@@ -1,19 +1,21 @@
1
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, _class;
2
+ var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
3
+ 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 }); }
3
4
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
5
  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); } }
5
6
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
+ 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; }
10
+ 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.'); }
8
11
  import { contrib, Priority, singleton } from '@difizen/mana-app';
9
- import { ContentContribution } from "./libro-content-protocol.js";
10
- export var LibroContentService = (_dec = singleton(), _dec(_class = /*#__PURE__*/function () {
11
- function LibroContentService(contentProvider) {
12
+ import { ContentContribution, ContentSaveContribution } from "./libro-content-protocol.js";
13
+ export var LibroContentService = (_dec = singleton(), _dec2 = contrib(ContentContribution), _dec3 = contrib(ContentSaveContribution), _dec(_class = (_class2 = /*#__PURE__*/function () {
14
+ function LibroContentService() {
12
15
  _classCallCheck(this, LibroContentService);
13
- this.contentProvider = void 0;
14
- this.contentProvider = contentProvider;
16
+ _initializerDefineProperty(this, "contentProvider", _descriptor, this);
17
+ _initializerDefineProperty(this, "contentSaveProvider", _descriptor2, this);
15
18
  }
16
- LibroContentService = contrib(ContentContribution)(LibroContentService, undefined, 0) || LibroContentService;
17
19
  _createClass(LibroContentService, [{
18
20
  key: "findProvider",
19
21
  value: function findProvider(options, model) {
@@ -30,6 +32,32 @@ export var LibroContentService = (_dec = singleton(), _dec(_class = /*#__PURE__*
30
32
  value: function loadLibroContent(options, model) {
31
33
  return this.findProvider(options, model).loadContent(options, model);
32
34
  }
35
+ }, {
36
+ key: "findSaveProvider",
37
+ value: function findSaveProvider(options, model) {
38
+ var prioritized = Priority.sortSync(this.contentSaveProvider.getContributions(), function (contribution) {
39
+ return contribution.canHandle(options, model);
40
+ });
41
+ var sorted = prioritized.map(function (c) {
42
+ return c.value;
43
+ });
44
+ return sorted[0];
45
+ }
46
+ }, {
47
+ key: "saveLibroContent",
48
+ value: function saveLibroContent(options, model) {
49
+ return this.findSaveProvider(options, model).saveContent(options, model);
50
+ }
33
51
  }]);
34
52
  return LibroContentService;
35
- }()) || _class);
53
+ }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "contentProvider", [_dec2], {
54
+ configurable: true,
55
+ enumerable: true,
56
+ writable: true,
57
+ initializer: null
58
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "contentSaveProvider", [_dec3], {
59
+ configurable: true,
60
+ enumerable: true,
61
+ writable: true,
62
+ initializer: null
63
+ })), _class2)) || _class);
@@ -0,0 +1,6 @@
1
+ import { ContentSaveContribution } from './libro-content-protocol.js';
2
+ export declare class DefaultSaveContentContribution implements ContentSaveContribution {
3
+ canHandle: (options: Record<string, any>, model: any) => number;
4
+ saveContent(options: Record<string, any>, model: any): Promise<void>;
5
+ }
6
+ //# sourceMappingURL=libro-save-content-contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libro-save-content-contribution.d.ts","sourceRoot":"","sources":["../../src/content/libro-save-content-contribution.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,qBACa,8BAA+B,YAAW,uBAAuB;IAC5E,SAAS,YAAa,OAAO,MAAM,EAAE,GAAG,CAAC,SAAS,GAAG,YAAO;IAC5D,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG;CAGrD"}
@@ -0,0 +1,27 @@
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, _class;
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
+ 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); } }
5
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ /* eslint-disable @typescript-eslint/no-unused-vars */
9
+ import { singleton } from '@difizen/mana-app';
10
+ import { ContentSaveContribution } from "./libro-content-protocol.js";
11
+ export var DefaultSaveContentContribution = (_dec = singleton({
12
+ contrib: ContentSaveContribution
13
+ }), _dec(_class = /*#__PURE__*/function () {
14
+ function DefaultSaveContentContribution() {
15
+ _classCallCheck(this, DefaultSaveContentContribution);
16
+ this.canHandle = function (options, model) {
17
+ return 1;
18
+ };
19
+ }
20
+ _createClass(DefaultSaveContentContribution, [{
21
+ key: "saveContent",
22
+ value: function saveContent(options, model) {
23
+ return Promise.resolve();
24
+ }
25
+ }]);
26
+ return DefaultSaveContentContribution;
27
+ }()) || _class);
@@ -0,0 +1,6 @@
1
+ export * from './libro-formatter-manager.js';
2
+ export * from './libro-formatter-module.js';
3
+ export * from './libro-formatter-protocol.js';
4
+ export * from './libro-formatter-string-contribution.js';
5
+ export * from './libro-formatter-trans-default-contribution.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/formatter/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,iDAAiD,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./libro-formatter-manager.js";
2
+ export * from "./libro-formatter-module.js";
3
+ export * from "./libro-formatter-protocol.js";
4
+ export * from "./libro-formatter-string-contribution.js";
5
+ export * from "./libro-formatter-trans-default-contribution.js";
@@ -0,0 +1,18 @@
1
+ import { DefaultDecodedFormatter, FormatterContribution } from './libro-formatter-protocol.js';
2
+ import type { DefaultEncodedFormatter } from './libro-formatter-protocol.js';
3
+ export declare class FormatterJsonContribution implements FormatterContribution<DefaultDecodedFormatter> {
4
+ formatter: string;
5
+ formatterOptions?: object;
6
+ canHandle: (libroFormatter: string) => 100 | 1;
7
+ encode: (source: DefaultDecodedFormatter) => {
8
+ source: string;
9
+ metadata: {
10
+ libroFormatter: string;
11
+ };
12
+ };
13
+ decode: (formatterValue: DefaultEncodedFormatter) => {
14
+ value: string;
15
+ };
16
+ validate: (source: DefaultDecodedFormatter) => source is DefaultDecodedFormatter;
17
+ }
18
+ //# sourceMappingURL=libro-formatter-json-contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libro-formatter-json-contribution.d.ts","sourceRoot":"","sources":["../../src/formatter/libro-formatter-json-contribution.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAE7E,qBACa,yBACX,YAAW,qBAAqB,CAAC,uBAAuB,CAAC;IAEzD,SAAS,SAAoB;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,mBAAoB,MAAM,aAKjC;IAEF,MAAM,WAAY,uBAAuB;;;;;MAOvC;IAEF,MAAM,mBAAoB,uBAAuB;;MAI/C;IAEF,QAAQ,WAAY,uBAAuB,uCAEzC;CACH"}