@canonical/react-ds-app-launchpad 0.9.0-experimental.2 → 0.9.0-experimental.20

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 (457) hide show
  1. package/dist/esm/ui/DiffChangeMarker/DiffChangeMarker.js +47 -0
  2. package/dist/esm/ui/DiffChangeMarker/DiffChangeMarker.js.map +1 -0
  3. package/dist/esm/ui/DiffChangeMarker/common/DetailedChangeMarker/DetailedChangeMarker.js +8 -0
  4. package/dist/esm/ui/DiffChangeMarker/common/DetailedChangeMarker/DetailedChangeMarker.js.map +1 -0
  5. package/dist/esm/ui/DiffChangeMarker/common/DetailedChangeMarker/index.js +4 -0
  6. package/dist/esm/ui/DiffChangeMarker/common/DetailedChangeMarker/index.js.map +1 -0
  7. package/dist/esm/ui/DiffChangeMarker/common/DetailedChangeMarker/styles.css +21 -0
  8. package/dist/esm/ui/DiffChangeMarker/common/DetailedChangeMarker/types.js.map +1 -0
  9. package/dist/esm/ui/DiffChangeMarker/common/SimpleChangeMarker/SimpleChangeMarker.js +11 -0
  10. package/dist/esm/ui/DiffChangeMarker/common/SimpleChangeMarker/SimpleChangeMarker.js.map +1 -0
  11. package/dist/esm/ui/DiffChangeMarker/common/SimpleChangeMarker/index.js +4 -0
  12. package/dist/esm/ui/DiffChangeMarker/common/SimpleChangeMarker/index.js.map +1 -0
  13. package/dist/esm/ui/DiffChangeMarker/common/SimpleChangeMarker/styles.css +29 -0
  14. package/dist/esm/ui/DiffChangeMarker/common/SimpleChangeMarker/types.js.map +1 -0
  15. package/dist/esm/ui/DiffChangeMarker/common/index.js +3 -0
  16. package/dist/esm/ui/DiffChangeMarker/common/index.js.map +1 -0
  17. package/dist/esm/ui/DiffChangeMarker/icons.js +5 -0
  18. package/dist/esm/ui/DiffChangeMarker/icons.js.map +1 -0
  19. package/dist/esm/ui/DiffChangeMarker/index.js +4 -0
  20. package/dist/esm/ui/DiffChangeMarker/index.js.map +1 -0
  21. package/dist/esm/ui/DiffChangeMarker/styles.css +30 -0
  22. package/dist/esm/ui/DiffChangeMarker/types.js +2 -0
  23. package/dist/esm/ui/DiffChangeMarker/types.js.map +1 -0
  24. package/dist/esm/ui/EditableBlock/Context.js +4 -0
  25. package/dist/esm/ui/EditableBlock/Context.js.map +1 -0
  26. package/dist/esm/ui/EditableBlock/EditableBlock.js +35 -0
  27. package/dist/esm/ui/EditableBlock/EditableBlock.js.map +1 -0
  28. package/dist/esm/ui/EditableBlock/hooks/index.js +2 -0
  29. package/dist/esm/ui/EditableBlock/hooks/index.js.map +1 -0
  30. package/dist/esm/ui/EditableBlock/hooks/useEditableBlock.js +11 -0
  31. package/dist/esm/ui/EditableBlock/hooks/useEditableBlock.js.map +1 -0
  32. package/dist/esm/ui/EditableBlock/index.js +3 -0
  33. package/dist/esm/ui/EditableBlock/index.js.map +1 -0
  34. package/dist/esm/ui/EditableBlock/styles.css +38 -0
  35. package/dist/esm/ui/EditableBlock/types.js +2 -0
  36. package/dist/esm/ui/EditableBlock/types.js.map +1 -0
  37. package/dist/esm/ui/FileTree/Context.js +4 -0
  38. package/dist/esm/ui/FileTree/Context.js.map +1 -0
  39. package/dist/esm/ui/FileTree/Provider.js +74 -0
  40. package/dist/esm/ui/FileTree/Provider.js.map +1 -0
  41. package/dist/esm/ui/FileTree/common/File/File.js +12 -0
  42. package/dist/esm/ui/FileTree/common/File/File.js.map +1 -0
  43. package/dist/esm/ui/FileTree/common/File/index.js +4 -0
  44. package/dist/esm/ui/FileTree/common/File/index.js.map +1 -0
  45. package/dist/esm/ui/FileTree/common/File/styles.css +4 -0
  46. package/dist/esm/ui/FileTree/common/File/types.js +2 -0
  47. package/dist/esm/ui/FileTree/common/File/types.js.map +1 -0
  48. package/dist/esm/ui/FileTree/common/Folder/Folder.js +12 -0
  49. package/dist/esm/ui/FileTree/common/Folder/Folder.js.map +1 -0
  50. package/dist/esm/ui/FileTree/common/Folder/index.js +4 -0
  51. package/dist/esm/ui/FileTree/common/Folder/index.js.map +1 -0
  52. package/dist/esm/ui/FileTree/common/Folder/styles.css +4 -0
  53. package/dist/esm/ui/FileTree/common/Folder/types.js +2 -0
  54. package/dist/esm/ui/FileTree/common/Folder/types.js.map +1 -0
  55. package/dist/esm/ui/FileTree/common/IndentationBlock/IndentationBlock.js +16 -0
  56. package/dist/esm/ui/FileTree/common/IndentationBlock/IndentationBlock.js.map +1 -0
  57. package/dist/esm/ui/FileTree/common/IndentationBlock/index.js +4 -0
  58. package/dist/esm/ui/FileTree/common/IndentationBlock/index.js.map +1 -0
  59. package/dist/esm/ui/FileTree/common/IndentationBlock/styles.css +32 -0
  60. package/dist/esm/ui/FileTree/common/IndentationBlock/types.js +2 -0
  61. package/dist/esm/ui/FileTree/common/IndentationBlock/types.js.map +1 -0
  62. package/dist/esm/ui/FileTree/common/Node/Context.js +10 -0
  63. package/dist/esm/ui/FileTree/common/Node/Context.js.map +1 -0
  64. package/dist/esm/ui/FileTree/common/Node/Provider.js +165 -0
  65. package/dist/esm/ui/FileTree/common/Node/Provider.js.map +1 -0
  66. package/dist/esm/ui/FileTree/common/Node/hooks/index.js +2 -0
  67. package/dist/esm/ui/FileTree/common/Node/hooks/index.js.map +1 -0
  68. package/dist/esm/ui/FileTree/common/Node/hooks/useNode.js +12 -0
  69. package/dist/esm/ui/FileTree/common/Node/hooks/useNode.js.map +1 -0
  70. package/dist/esm/ui/FileTree/common/Node/index.js +4 -0
  71. package/dist/esm/ui/FileTree/common/Node/index.js.map +1 -0
  72. package/dist/esm/ui/FileTree/common/Node/styles.css +56 -0
  73. package/dist/esm/ui/FileTree/common/Node/types.js +2 -0
  74. package/dist/esm/ui/FileTree/common/Node/types.js.map +1 -0
  75. package/dist/esm/ui/FileTree/common/SearchBox/SearchBox.js +31 -0
  76. package/dist/esm/ui/FileTree/common/SearchBox/SearchBox.js.map +1 -0
  77. package/dist/esm/ui/FileTree/common/SearchBox/index.js +4 -0
  78. package/dist/esm/ui/FileTree/common/SearchBox/index.js.map +1 -0
  79. package/dist/esm/ui/FileTree/common/SearchBox/styles.css +61 -0
  80. package/dist/esm/ui/FileTree/common/SearchBox/types.js +2 -0
  81. package/dist/esm/ui/FileTree/common/SearchBox/types.js.map +1 -0
  82. package/dist/esm/ui/FileTree/common/TreeView/TreeView.js +60 -0
  83. package/dist/esm/ui/FileTree/common/TreeView/TreeView.js.map +1 -0
  84. package/dist/esm/ui/FileTree/common/TreeView/index.js +4 -0
  85. package/dist/esm/ui/FileTree/common/TreeView/index.js.map +1 -0
  86. package/dist/esm/ui/FileTree/common/TreeView/types.js +2 -0
  87. package/dist/esm/ui/FileTree/common/TreeView/types.js.map +1 -0
  88. package/dist/esm/ui/FileTree/common/index.js +5 -0
  89. package/dist/esm/ui/FileTree/common/index.js.map +1 -0
  90. package/dist/esm/ui/FileTree/hooks/index.js +2 -0
  91. package/dist/esm/ui/FileTree/hooks/index.js.map +1 -0
  92. package/dist/esm/ui/FileTree/hooks/useFileTree.js +11 -0
  93. package/dist/esm/ui/FileTree/hooks/useFileTree.js.map +1 -0
  94. package/dist/esm/ui/FileTree/index.js +10 -0
  95. package/dist/esm/ui/FileTree/index.js.map +1 -0
  96. package/dist/esm/ui/FileTree/styles.css +59 -0
  97. package/dist/esm/ui/FileTree/types.js +2 -0
  98. package/dist/esm/ui/{Button → FileTree}/types.js.map +1 -1
  99. package/dist/esm/ui/FileTree/utils/hashNodeName.js +11 -0
  100. package/dist/esm/ui/FileTree/utils/hashNodeName.js.map +1 -0
  101. package/dist/esm/ui/FileTree/utils/index.js +2 -0
  102. package/dist/esm/ui/FileTree/utils/index.js.map +1 -0
  103. package/dist/esm/ui/GitDiffViewer/Context.js +4 -0
  104. package/dist/esm/ui/GitDiffViewer/Context.js.map +1 -0
  105. package/dist/esm/ui/GitDiffViewer/Provider.js +25 -0
  106. package/dist/esm/ui/GitDiffViewer/Provider.js.map +1 -0
  107. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.js +73 -0
  108. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.js.map +1 -0
  109. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/HighlighTheme.css +171 -0
  110. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/AnnotatedDiffLine.js +38 -0
  111. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/AnnotatedDiffLine.js.map +1 -0
  112. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/index.js +4 -0
  113. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/index.js.map +1 -0
  114. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/styles.css +15 -0
  115. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/types.js +3 -0
  116. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/types.js.map +1 -0
  117. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.js +36 -0
  118. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.js.map +1 -0
  119. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.js +4 -0
  120. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.js.map +1 -0
  121. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/styles.css +122 -0
  122. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.js +2 -0
  123. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.js.map +1 -0
  124. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/index.js +2 -0
  125. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/index.js.map +1 -0
  126. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/constants.js +2 -0
  127. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/constants.js.map +1 -0
  128. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/index.js +5 -0
  129. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/index.js.map +1 -0
  130. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/styles.css +26 -0
  131. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/types.js +2 -0
  132. package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/types.js.map +1 -0
  133. package/dist/esm/ui/GitDiffViewer/common/FileHeader/FileHeader.js +36 -0
  134. package/dist/esm/ui/GitDiffViewer/common/FileHeader/FileHeader.js.map +1 -0
  135. package/dist/esm/ui/GitDiffViewer/common/FileHeader/index.js +4 -0
  136. package/dist/esm/ui/GitDiffViewer/common/FileHeader/index.js.map +1 -0
  137. package/dist/esm/ui/GitDiffViewer/common/FileHeader/styles.css +56 -0
  138. package/dist/esm/ui/GitDiffViewer/common/FileHeader/types.js +2 -0
  139. package/dist/esm/ui/GitDiffViewer/common/FileHeader/types.js.map +1 -0
  140. package/dist/esm/ui/GitDiffViewer/common/index.js +3 -0
  141. package/dist/esm/ui/GitDiffViewer/common/index.js.map +1 -0
  142. package/dist/esm/ui/GitDiffViewer/hooks/index.js +2 -0
  143. package/dist/esm/ui/GitDiffViewer/hooks/index.js.map +1 -0
  144. package/dist/esm/ui/GitDiffViewer/hooks/useGitDiffViewer.js +11 -0
  145. package/dist/esm/ui/GitDiffViewer/hooks/useGitDiffViewer.js.map +1 -0
  146. package/dist/esm/ui/GitDiffViewer/index.js +9 -0
  147. package/dist/esm/ui/GitDiffViewer/index.js.map +1 -0
  148. package/dist/esm/ui/GitDiffViewer/styles.css +26 -0
  149. package/dist/esm/ui/GitDiffViewer/types.js +2 -0
  150. package/dist/esm/ui/GitDiffViewer/types.js.map +1 -0
  151. package/dist/esm/ui/GitDiffViewer/utils/highlightDiffHunkLines.js +38 -0
  152. package/dist/esm/ui/GitDiffViewer/utils/highlightDiffHunkLines.js.map +1 -0
  153. package/dist/esm/ui/GitDiffViewer/utils/index.js +3 -0
  154. package/dist/esm/ui/GitDiffViewer/utils/index.js.map +1 -0
  155. package/dist/esm/ui/GitDiffViewer/utils/parseGitDiff.js +96 -0
  156. package/dist/esm/ui/GitDiffViewer/utils/parseGitDiff.js.map +1 -0
  157. package/dist/esm/ui/MarkdownEditor/MarkdownEditor.js +75 -0
  158. package/dist/esm/ui/MarkdownEditor/MarkdownEditor.js.map +1 -0
  159. package/dist/esm/ui/MarkdownEditor/common/Toolbar/Toolbar.js +52 -0
  160. package/dist/esm/ui/MarkdownEditor/common/Toolbar/Toolbar.js.map +1 -0
  161. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Button/Button.js +19 -0
  162. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Button/Button.js.map +1 -0
  163. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Button/index.js +4 -0
  164. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Button/index.js.map +1 -0
  165. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Button/styles.css +17 -0
  166. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Button/types.js +2 -0
  167. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Button/types.js.map +1 -0
  168. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Group/Group.js +13 -0
  169. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Group/Group.js.map +1 -0
  170. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Group/index.js +4 -0
  171. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Group/index.js.map +1 -0
  172. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Group/styles.css +7 -0
  173. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Group/types.js +2 -0
  174. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Group/types.js.map +1 -0
  175. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Separator/Separator.js +13 -0
  176. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Separator/Separator.js.map +1 -0
  177. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Separator/index.js +4 -0
  178. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Separator/index.js.map +1 -0
  179. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Separator/styles.css +7 -0
  180. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Separator/types.js +2 -0
  181. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/Separator/types.js.map +1 -0
  182. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/index.js +4 -0
  183. package/dist/esm/ui/MarkdownEditor/common/Toolbar/common/index.js.map +1 -0
  184. package/dist/esm/ui/MarkdownEditor/common/Toolbar/index.js +9 -0
  185. package/dist/esm/ui/MarkdownEditor/common/Toolbar/index.js.map +1 -0
  186. package/dist/esm/ui/MarkdownEditor/common/Toolbar/styles.css +16 -0
  187. package/dist/esm/ui/MarkdownEditor/common/Toolbar/types.js +2 -0
  188. package/dist/esm/ui/MarkdownEditor/common/Toolbar/types.js.map +1 -0
  189. package/dist/esm/ui/MarkdownEditor/common/ViewModeTabs/ViewModeTabs.js +34 -0
  190. package/dist/esm/ui/MarkdownEditor/common/ViewModeTabs/ViewModeTabs.js.map +1 -0
  191. package/dist/esm/ui/MarkdownEditor/common/ViewModeTabs/index.js +4 -0
  192. package/dist/esm/ui/MarkdownEditor/common/ViewModeTabs/index.js.map +1 -0
  193. package/dist/esm/ui/MarkdownEditor/common/ViewModeTabs/styles.css +42 -0
  194. package/dist/esm/ui/MarkdownEditor/common/ViewModeTabs/types.js +2 -0
  195. package/dist/esm/ui/MarkdownEditor/common/ViewModeTabs/types.js.map +1 -0
  196. package/dist/esm/ui/MarkdownEditor/common/icons.js +10 -0
  197. package/dist/esm/ui/MarkdownEditor/common/icons.js.map +1 -0
  198. package/dist/esm/ui/MarkdownEditor/common/index.js +4 -0
  199. package/dist/esm/ui/MarkdownEditor/common/index.js.map +1 -0
  200. package/dist/esm/ui/MarkdownEditor/hooks/index.js +2 -0
  201. package/dist/esm/ui/MarkdownEditor/hooks/index.js.map +1 -0
  202. package/dist/esm/ui/MarkdownEditor/hooks/useEditor.js +274 -0
  203. package/dist/esm/ui/MarkdownEditor/hooks/useEditor.js.map +1 -0
  204. package/dist/esm/ui/MarkdownEditor/index.js +4 -0
  205. package/dist/esm/ui/MarkdownEditor/index.js.map +1 -0
  206. package/dist/esm/ui/MarkdownEditor/styles.css +83 -0
  207. package/dist/esm/ui/MarkdownEditor/types.js +2 -0
  208. package/dist/esm/ui/MarkdownEditor/types.js.map +1 -0
  209. package/dist/esm/ui/RelativeTime/RelativeTime.js +66 -0
  210. package/dist/esm/ui/RelativeTime/RelativeTime.js.map +1 -0
  211. package/dist/esm/ui/RelativeTime/index.js +4 -0
  212. package/dist/esm/ui/RelativeTime/index.js.map +1 -0
  213. package/dist/esm/ui/RelativeTime/types.js +2 -0
  214. package/dist/esm/ui/{Chip → RelativeTime}/types.js.map +1 -1
  215. package/dist/esm/ui/RelativeTime/utils/constants.js +6 -0
  216. package/dist/esm/ui/RelativeTime/utils/constants.js.map +1 -0
  217. package/dist/esm/ui/RelativeTime/utils/formatHumanTime.js +43 -0
  218. package/dist/esm/ui/RelativeTime/utils/formatHumanTime.js.map +1 -0
  219. package/dist/esm/ui/RelativeTime/utils/getOptimalUpdateInterval.js +24 -0
  220. package/dist/esm/ui/RelativeTime/utils/getOptimalUpdateInterval.js.map +1 -0
  221. package/dist/esm/ui/RelativeTime/utils/index.js +4 -0
  222. package/dist/esm/ui/RelativeTime/utils/index.js.map +1 -0
  223. package/dist/esm/ui/RelativeTime/utils/parseInstant.js +22 -0
  224. package/dist/esm/ui/RelativeTime/utils/parseInstant.js.map +1 -0
  225. package/dist/esm/ui/index.js +6 -1
  226. package/dist/esm/ui/index.js.map +1 -1
  227. package/dist/types/ui/DiffChangeMarker/DiffChangeMarker.d.ts +11 -0
  228. package/dist/types/ui/DiffChangeMarker/DiffChangeMarker.d.ts.map +1 -0
  229. package/dist/types/ui/DiffChangeMarker/common/DetailedChangeMarker/DetailedChangeMarker.d.ts +6 -0
  230. package/dist/types/ui/DiffChangeMarker/common/DetailedChangeMarker/DetailedChangeMarker.d.ts.map +1 -0
  231. package/dist/types/ui/DiffChangeMarker/common/DetailedChangeMarker/index.d.ts +3 -0
  232. package/dist/types/ui/DiffChangeMarker/common/DetailedChangeMarker/index.d.ts.map +1 -0
  233. package/dist/types/ui/DiffChangeMarker/common/DetailedChangeMarker/types.d.ts +10 -0
  234. package/dist/types/ui/DiffChangeMarker/common/DetailedChangeMarker/types.d.ts.map +1 -0
  235. package/dist/types/ui/DiffChangeMarker/common/SimpleChangeMarker/SimpleChangeMarker.d.ts +6 -0
  236. package/dist/types/ui/DiffChangeMarker/common/SimpleChangeMarker/SimpleChangeMarker.d.ts.map +1 -0
  237. package/dist/types/ui/DiffChangeMarker/common/SimpleChangeMarker/index.d.ts +3 -0
  238. package/dist/types/ui/DiffChangeMarker/common/SimpleChangeMarker/index.d.ts.map +1 -0
  239. package/dist/types/ui/DiffChangeMarker/common/SimpleChangeMarker/types.d.ts +9 -0
  240. package/dist/types/ui/DiffChangeMarker/common/SimpleChangeMarker/types.d.ts.map +1 -0
  241. package/dist/types/ui/DiffChangeMarker/common/index.d.ts +3 -0
  242. package/dist/types/ui/DiffChangeMarker/common/index.d.ts.map +1 -0
  243. package/dist/types/ui/DiffChangeMarker/icons.d.ts +4 -0
  244. package/dist/types/ui/DiffChangeMarker/icons.d.ts.map +1 -0
  245. package/dist/types/ui/DiffChangeMarker/index.d.ts +3 -0
  246. package/dist/types/ui/DiffChangeMarker/index.d.ts.map +1 -0
  247. package/dist/types/ui/DiffChangeMarker/types.d.ts +18 -0
  248. package/dist/types/ui/DiffChangeMarker/types.d.ts.map +1 -0
  249. package/dist/types/ui/EditableBlock/Context.d.ts +4 -0
  250. package/dist/types/ui/EditableBlock/Context.d.ts.map +1 -0
  251. package/dist/types/ui/EditableBlock/EditableBlock.d.ts +10 -0
  252. package/dist/types/ui/EditableBlock/EditableBlock.d.ts.map +1 -0
  253. package/dist/types/ui/EditableBlock/hooks/index.d.ts +2 -0
  254. package/dist/types/ui/EditableBlock/hooks/index.d.ts.map +1 -0
  255. package/dist/types/ui/EditableBlock/hooks/useEditableBlock.d.ts +4 -0
  256. package/dist/types/ui/EditableBlock/hooks/useEditableBlock.d.ts.map +1 -0
  257. package/dist/types/ui/EditableBlock/index.d.ts +3 -0
  258. package/dist/types/ui/EditableBlock/index.d.ts.map +1 -0
  259. package/dist/types/ui/EditableBlock/types.d.ts +26 -0
  260. package/dist/types/ui/EditableBlock/types.d.ts.map +1 -0
  261. package/dist/types/ui/FileTree/Context.d.ts +4 -0
  262. package/dist/types/ui/FileTree/Context.d.ts.map +1 -0
  263. package/dist/types/ui/FileTree/Provider.d.ts +7 -0
  264. package/dist/types/ui/FileTree/Provider.d.ts.map +1 -0
  265. package/dist/types/ui/FileTree/common/File/File.d.ts +10 -0
  266. package/dist/types/ui/FileTree/common/File/File.d.ts.map +1 -0
  267. package/dist/types/ui/FileTree/common/File/index.d.ts +3 -0
  268. package/dist/types/ui/FileTree/common/File/index.d.ts.map +1 -0
  269. package/dist/types/ui/FileTree/common/File/types.d.ts +16 -0
  270. package/dist/types/ui/FileTree/common/File/types.d.ts.map +1 -0
  271. package/dist/types/ui/FileTree/common/Folder/Folder.d.ts +10 -0
  272. package/dist/types/ui/FileTree/common/Folder/Folder.d.ts.map +1 -0
  273. package/dist/types/ui/FileTree/common/Folder/index.d.ts +3 -0
  274. package/dist/types/ui/FileTree/common/Folder/index.d.ts.map +1 -0
  275. package/dist/types/ui/FileTree/common/Folder/types.d.ts +16 -0
  276. package/dist/types/ui/FileTree/common/Folder/types.d.ts.map +1 -0
  277. package/dist/types/ui/FileTree/common/IndentationBlock/IndentationBlock.d.ts +10 -0
  278. package/dist/types/ui/FileTree/common/IndentationBlock/IndentationBlock.d.ts.map +1 -0
  279. package/dist/types/ui/FileTree/common/IndentationBlock/index.d.ts +3 -0
  280. package/dist/types/ui/FileTree/common/IndentationBlock/index.d.ts.map +1 -0
  281. package/dist/types/ui/FileTree/common/IndentationBlock/types.d.ts +12 -0
  282. package/dist/types/ui/FileTree/common/IndentationBlock/types.d.ts.map +1 -0
  283. package/dist/types/ui/FileTree/common/Node/Context.d.ts +5 -0
  284. package/dist/types/ui/FileTree/common/Node/Context.d.ts.map +1 -0
  285. package/dist/types/ui/FileTree/common/Node/Provider.d.ts +6 -0
  286. package/dist/types/ui/FileTree/common/Node/Provider.d.ts.map +1 -0
  287. package/dist/types/ui/FileTree/common/Node/hooks/index.d.ts +2 -0
  288. package/dist/types/ui/FileTree/common/Node/hooks/index.d.ts.map +1 -0
  289. package/dist/types/ui/FileTree/common/Node/hooks/useNode.d.ts +3 -0
  290. package/dist/types/ui/FileTree/common/Node/hooks/useNode.d.ts.map +1 -0
  291. package/dist/types/ui/FileTree/common/Node/index.d.ts +5 -0
  292. package/dist/types/ui/FileTree/common/Node/index.d.ts.map +1 -0
  293. package/dist/types/ui/FileTree/common/Node/types.d.ts +28 -0
  294. package/dist/types/ui/FileTree/common/Node/types.d.ts.map +1 -0
  295. package/dist/types/ui/FileTree/common/SearchBox/SearchBox.d.ts +10 -0
  296. package/dist/types/ui/FileTree/common/SearchBox/SearchBox.d.ts.map +1 -0
  297. package/dist/types/ui/FileTree/common/SearchBox/index.d.ts +3 -0
  298. package/dist/types/ui/FileTree/common/SearchBox/index.d.ts.map +1 -0
  299. package/dist/types/ui/FileTree/common/SearchBox/types.d.ts +10 -0
  300. package/dist/types/ui/FileTree/common/SearchBox/types.d.ts.map +1 -0
  301. package/dist/types/ui/FileTree/common/TreeView/TreeView.d.ts +16 -0
  302. package/dist/types/ui/FileTree/common/TreeView/TreeView.d.ts.map +1 -0
  303. package/dist/types/ui/FileTree/common/TreeView/index.d.ts +3 -0
  304. package/dist/types/ui/FileTree/common/TreeView/index.d.ts.map +1 -0
  305. package/dist/types/ui/FileTree/common/TreeView/types.d.ts +20 -0
  306. package/dist/types/ui/FileTree/common/TreeView/types.d.ts.map +1 -0
  307. package/dist/types/ui/FileTree/common/index.d.ts +5 -0
  308. package/dist/types/ui/FileTree/common/index.d.ts.map +1 -0
  309. package/dist/types/ui/FileTree/hooks/index.d.ts +2 -0
  310. package/dist/types/ui/FileTree/hooks/index.d.ts.map +1 -0
  311. package/dist/types/ui/FileTree/hooks/useFileTree.d.ts +3 -0
  312. package/dist/types/ui/FileTree/hooks/useFileTree.d.ts.map +1 -0
  313. package/dist/types/ui/FileTree/index.d.ts +5 -0
  314. package/dist/types/ui/FileTree/index.d.ts.map +1 -0
  315. package/dist/types/ui/FileTree/types.d.ts +73 -0
  316. package/dist/types/ui/FileTree/types.d.ts.map +1 -0
  317. package/dist/types/ui/FileTree/utils/hashNodeName.d.ts +3 -0
  318. package/dist/types/ui/FileTree/utils/hashNodeName.d.ts.map +1 -0
  319. package/dist/types/ui/FileTree/utils/index.d.ts +2 -0
  320. package/dist/types/ui/FileTree/utils/index.d.ts.map +1 -0
  321. package/dist/types/ui/GitDiffViewer/Context.d.ts +4 -0
  322. package/dist/types/ui/GitDiffViewer/Context.d.ts.map +1 -0
  323. package/dist/types/ui/GitDiffViewer/Provider.d.ts +5 -0
  324. package/dist/types/ui/GitDiffViewer/Provider.d.ts.map +1 -0
  325. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.d.ts +7 -0
  326. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.d.ts.map +1 -0
  327. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/AnnotatedDiffLine.d.ts +10 -0
  328. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/AnnotatedDiffLine.d.ts.map +1 -0
  329. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/index.d.ts +3 -0
  330. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/index.d.ts.map +1 -0
  331. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/types.d.ts +21 -0
  332. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/AnnotatedDiffLine/types.d.ts.map +1 -0
  333. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.d.ts +11 -0
  334. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.d.ts.map +1 -0
  335. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.d.ts +3 -0
  336. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.d.ts.map +1 -0
  337. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.d.ts +34 -0
  338. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.d.ts.map +1 -0
  339. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/index.d.ts +2 -0
  340. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/index.d.ts.map +1 -0
  341. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/constants.d.ts +2 -0
  342. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/constants.d.ts.map +1 -0
  343. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/index.d.ts +4 -0
  344. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/index.d.ts.map +1 -0
  345. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/types.d.ts +34 -0
  346. package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/types.d.ts.map +1 -0
  347. package/dist/types/ui/GitDiffViewer/common/FileHeader/FileHeader.d.ts +15 -0
  348. package/dist/types/ui/GitDiffViewer/common/FileHeader/FileHeader.d.ts.map +1 -0
  349. package/dist/types/ui/GitDiffViewer/common/FileHeader/index.d.ts +3 -0
  350. package/dist/types/ui/GitDiffViewer/common/FileHeader/index.d.ts.map +1 -0
  351. package/dist/types/ui/GitDiffViewer/common/FileHeader/types.d.ts +17 -0
  352. package/dist/types/ui/GitDiffViewer/common/FileHeader/types.d.ts.map +1 -0
  353. package/dist/types/ui/GitDiffViewer/common/index.d.ts +3 -0
  354. package/dist/types/ui/GitDiffViewer/common/index.d.ts.map +1 -0
  355. package/dist/types/ui/GitDiffViewer/hooks/index.d.ts +2 -0
  356. package/dist/types/ui/GitDiffViewer/hooks/index.d.ts.map +1 -0
  357. package/dist/types/ui/GitDiffViewer/hooks/useGitDiffViewer.d.ts +3 -0
  358. package/dist/types/ui/GitDiffViewer/hooks/useGitDiffViewer.d.ts.map +1 -0
  359. package/dist/types/ui/GitDiffViewer/index.d.ts +6 -0
  360. package/dist/types/ui/GitDiffViewer/index.d.ts.map +1 -0
  361. package/dist/types/ui/GitDiffViewer/types.d.ts +80 -0
  362. package/dist/types/ui/GitDiffViewer/types.d.ts.map +1 -0
  363. package/dist/types/ui/GitDiffViewer/utils/highlightDiffHunkLines.d.ts +4 -0
  364. package/dist/types/ui/GitDiffViewer/utils/highlightDiffHunkLines.d.ts.map +1 -0
  365. package/dist/types/ui/GitDiffViewer/utils/index.d.ts +3 -0
  366. package/dist/types/ui/GitDiffViewer/utils/index.d.ts.map +1 -0
  367. package/dist/types/ui/GitDiffViewer/utils/parseGitDiff.d.ts +4 -0
  368. package/dist/types/ui/GitDiffViewer/utils/parseGitDiff.d.ts.map +1 -0
  369. package/dist/types/ui/MarkdownEditor/MarkdownEditor.d.ts +10 -0
  370. package/dist/types/ui/MarkdownEditor/MarkdownEditor.d.ts.map +1 -0
  371. package/dist/types/ui/MarkdownEditor/common/Toolbar/Toolbar.d.ts +8 -0
  372. package/dist/types/ui/MarkdownEditor/common/Toolbar/Toolbar.d.ts.map +1 -0
  373. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Button/Button.d.ts +9 -0
  374. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Button/Button.d.ts.map +1 -0
  375. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Button/index.d.ts +3 -0
  376. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Button/index.d.ts.map +1 -0
  377. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Button/types.d.ts +14 -0
  378. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Button/types.d.ts.map +1 -0
  379. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Group/Group.d.ts +9 -0
  380. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Group/Group.d.ts.map +1 -0
  381. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Group/index.d.ts +3 -0
  382. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Group/index.d.ts.map +1 -0
  383. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Group/types.d.ts +14 -0
  384. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Group/types.d.ts.map +1 -0
  385. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Separator/Separator.d.ts +9 -0
  386. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Separator/Separator.d.ts.map +1 -0
  387. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Separator/index.d.ts +3 -0
  388. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Separator/index.d.ts.map +1 -0
  389. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Separator/types.d.ts +10 -0
  390. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/Separator/types.d.ts.map +1 -0
  391. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/index.d.ts +4 -0
  392. package/dist/types/ui/MarkdownEditor/common/Toolbar/common/index.d.ts.map +1 -0
  393. package/dist/types/ui/MarkdownEditor/common/Toolbar/index.d.ts +4 -0
  394. package/dist/types/ui/MarkdownEditor/common/Toolbar/index.d.ts.map +1 -0
  395. package/dist/types/ui/MarkdownEditor/common/Toolbar/types.d.ts +20 -0
  396. package/dist/types/ui/MarkdownEditor/common/Toolbar/types.d.ts.map +1 -0
  397. package/dist/types/ui/MarkdownEditor/common/ViewModeTabs/ViewModeTabs.d.ts +9 -0
  398. package/dist/types/ui/MarkdownEditor/common/ViewModeTabs/ViewModeTabs.d.ts.map +1 -0
  399. package/dist/types/ui/MarkdownEditor/common/ViewModeTabs/index.d.ts +3 -0
  400. package/dist/types/ui/MarkdownEditor/common/ViewModeTabs/index.d.ts.map +1 -0
  401. package/dist/types/ui/MarkdownEditor/common/ViewModeTabs/types.d.ts +14 -0
  402. package/dist/types/ui/MarkdownEditor/common/ViewModeTabs/types.d.ts.map +1 -0
  403. package/dist/types/ui/MarkdownEditor/common/icons.d.ts +9 -0
  404. package/dist/types/ui/MarkdownEditor/common/icons.d.ts.map +1 -0
  405. package/dist/types/ui/MarkdownEditor/common/index.d.ts +4 -0
  406. package/dist/types/ui/MarkdownEditor/common/index.d.ts.map +1 -0
  407. package/dist/types/ui/MarkdownEditor/hooks/index.d.ts +2 -0
  408. package/dist/types/ui/MarkdownEditor/hooks/index.d.ts.map +1 -0
  409. package/dist/types/ui/MarkdownEditor/hooks/useEditor.d.ts +40 -0
  410. package/dist/types/ui/MarkdownEditor/hooks/useEditor.d.ts.map +1 -0
  411. package/dist/types/ui/MarkdownEditor/index.d.ts +3 -0
  412. package/dist/types/ui/MarkdownEditor/index.d.ts.map +1 -0
  413. package/dist/types/ui/MarkdownEditor/types.d.ts +47 -0
  414. package/dist/types/ui/MarkdownEditor/types.d.ts.map +1 -0
  415. package/dist/types/ui/RelativeTime/RelativeTime.d.ts +11 -0
  416. package/dist/types/ui/RelativeTime/RelativeTime.d.ts.map +1 -0
  417. package/dist/types/ui/RelativeTime/index.d.ts +3 -0
  418. package/dist/types/ui/RelativeTime/index.d.ts.map +1 -0
  419. package/dist/types/ui/RelativeTime/types.d.ts +36 -0
  420. package/dist/types/ui/RelativeTime/types.d.ts.map +1 -0
  421. package/dist/types/ui/RelativeTime/utils/constants.d.ts +6 -0
  422. package/dist/types/ui/RelativeTime/utils/constants.d.ts.map +1 -0
  423. package/dist/types/ui/RelativeTime/utils/formatHumanTime.d.ts +21 -0
  424. package/dist/types/ui/RelativeTime/utils/formatHumanTime.d.ts.map +1 -0
  425. package/dist/types/ui/RelativeTime/utils/getOptimalUpdateInterval.d.ts +8 -0
  426. package/dist/types/ui/RelativeTime/utils/getOptimalUpdateInterval.d.ts.map +1 -0
  427. package/dist/types/ui/RelativeTime/utils/index.d.ts +4 -0
  428. package/dist/types/ui/RelativeTime/utils/index.d.ts.map +1 -0
  429. package/dist/types/ui/RelativeTime/utils/parseInstant.d.ts +9 -0
  430. package/dist/types/ui/RelativeTime/utils/parseInstant.d.ts.map +1 -0
  431. package/dist/types/ui/index.d.ts +6 -1
  432. package/dist/types/ui/index.d.ts.map +1 -1
  433. package/package.json +20 -13
  434. package/dist/esm/ui/Button/Button.js +0 -10
  435. package/dist/esm/ui/Button/Button.js.map +0 -1
  436. package/dist/esm/ui/Button/index.js +0 -2
  437. package/dist/esm/ui/Button/index.js.map +0 -1
  438. package/dist/esm/ui/Button/styles.css +0 -63
  439. package/dist/esm/ui/Chip/Chip.css +0 -79
  440. package/dist/esm/ui/Chip/Chip.js +0 -15
  441. package/dist/esm/ui/Chip/Chip.js.map +0 -1
  442. package/dist/esm/ui/Chip/index.js +0 -4
  443. package/dist/esm/ui/Chip/index.js.map +0 -1
  444. package/dist/types/ui/Button/Button.d.ts +0 -6
  445. package/dist/types/ui/Button/Button.d.ts.map +0 -1
  446. package/dist/types/ui/Button/index.d.ts +0 -3
  447. package/dist/types/ui/Button/index.d.ts.map +0 -1
  448. package/dist/types/ui/Button/types.d.ts +0 -15
  449. package/dist/types/ui/Button/types.d.ts.map +0 -1
  450. package/dist/types/ui/Chip/Chip.d.ts +0 -10
  451. package/dist/types/ui/Chip/Chip.d.ts.map +0 -1
  452. package/dist/types/ui/Chip/index.d.ts +0 -3
  453. package/dist/types/ui/Chip/index.d.ts.map +0 -1
  454. package/dist/types/ui/Chip/types.d.ts +0 -27
  455. package/dist/types/ui/Chip/types.d.ts.map +0 -1
  456. /package/dist/esm/ui/{Button → DiffChangeMarker/common/DetailedChangeMarker}/types.js +0 -0
  457. /package/dist/esm/ui/{Chip → DiffChangeMarker/common/SimpleChangeMarker}/types.js +0 -0
@@ -0,0 +1,66 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
3
+ import { formatHumanTime, getOptimalUpdateInterval, parseInstant, } from "./utils/index.js";
4
+ const componentCssClassName = "ds relative-time";
5
+ /**
6
+ * The RelativeTime component displays timestamps in a human-readable relative format (like "2 hours ago" or "in 3 days").
7
+ *
8
+ * It features automatic live updates with interval optimization based on time distance, configurable "now" threshold,
9
+ * and renders as proper semantic HTML using the <time> element. The component leverages the Temporal API for calculations and Intl.RelativeTimeFormat for localization.
10
+ */
11
+ const RelativeTime = ({ id, className, style, time, relativeTimeFormat, nowThreshold = 10, disableLiveUpdate = false, nowKeyword = "now", invalidDateKeyword = "invalid date", }) => {
12
+ const [relativeTime, setRelativeTime] = useState("");
13
+ const [localeTimeString, setLocaleTimeString] = useState("");
14
+ const [stringTime, setStringTime] = useState("");
15
+ const intervalRef = useRef(null);
16
+ const instantTime = useMemo(() => {
17
+ try {
18
+ return parseInstant(time);
19
+ }
20
+ catch (error) {
21
+ console.error(error);
22
+ return null;
23
+ }
24
+ }, [time]);
25
+ const updateRelativeTime = useCallback(() => {
26
+ if (instantTime === null) {
27
+ setRelativeTime(invalidDateKeyword);
28
+ setLocaleTimeString("");
29
+ setStringTime("");
30
+ return null;
31
+ }
32
+ const timeFormatter = relativeTimeFormat ||
33
+ new Intl.RelativeTimeFormat(undefined, { numeric: "auto" });
34
+ setRelativeTime(formatHumanTime(instantTime, {
35
+ nowThreshold,
36
+ nowKeyword,
37
+ relativeTimeFormat: timeFormatter,
38
+ }));
39
+ setLocaleTimeString(instantTime.toLocaleString());
40
+ setStringTime(instantTime.toString());
41
+ }, [
42
+ instantTime,
43
+ relativeTimeFormat,
44
+ nowThreshold,
45
+ nowKeyword,
46
+ invalidDateKeyword,
47
+ ]);
48
+ useEffect(() => {
49
+ // initial calculation
50
+ updateRelativeTime();
51
+ if (disableLiveUpdate || instantTime === null)
52
+ return;
53
+ const updateInterval = getOptimalUpdateInterval(instantTime);
54
+ // SSR check
55
+ if (typeof window === "undefined")
56
+ return;
57
+ intervalRef.current = window.setInterval(updateRelativeTime, updateInterval);
58
+ return () => {
59
+ if (intervalRef.current)
60
+ window.clearInterval(intervalRef.current);
61
+ };
62
+ }, [instantTime, disableLiveUpdate, updateRelativeTime]);
63
+ return (_jsx("time", { id: id, style: style, className: [componentCssClassName, className].filter(Boolean).join(" "), title: localeTimeString, dateTime: stringTime, children: relativeTime }));
64
+ };
65
+ export default RelativeTime;
66
+ //# sourceMappingURL=RelativeTime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RelativeTime.js","sourceRoot":"","sources":["../../../../src/ui/RelativeTime/RelativeTime.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,YAAY,GAAG,CAAC,EACpB,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,EACJ,kBAAkB,EAClB,YAAY,GAAG,EAAE,EACjB,iBAAiB,GAAG,KAAK,EACzB,UAAU,GAAG,KAAK,EAClB,kBAAkB,GAAG,cAAc,GACjB,EAAsB,EAAE;IAC1C,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEjD,MAAM,WAAW,GAAG,MAAM,CAAS,IAAI,CAAC,CAAC;IACzC,MAAM,WAAW,GAA4B,OAAO,CAAC,GAAG,EAAE;QACxD,IAAI,CAAC;YACH,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,MAAM,kBAAkB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC1C,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;YACzB,eAAe,CAAC,kBAAkB,CAAC,CAAC;YACpC,mBAAmB,CAAC,EAAE,CAAC,CAAC;YACxB,aAAa,CAAC,EAAE,CAAC,CAAC;YAClB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,aAAa,GACjB,kBAAkB;YAClB,IAAI,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC9D,eAAe,CACb,eAAe,CAAC,WAAW,EAAE;YAC3B,YAAY;YACZ,UAAU;YACV,kBAAkB,EAAE,aAAa;SAClC,CAAC,CACH,CAAC;QACF,mBAAmB,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;QAClD,aAAa,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxC,CAAC,EAAE;QACD,WAAW;QACX,kBAAkB;QAClB,YAAY;QACZ,UAAU;QACV,kBAAkB;KACnB,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,sBAAsB;QACtB,kBAAkB,EAAE,CAAC;QAErB,IAAI,iBAAiB,IAAI,WAAW,KAAK,IAAI;YAAE,OAAO;QAEtD,MAAM,cAAc,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;QAE7D,YAAY;QACZ,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO;QAE1C,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CACtC,kBAAkB,EAClB,cAAc,CACf,CAAC;QAEF,OAAO,GAAG,EAAE;YACV,IAAI,WAAW,CAAC,OAAO;gBAAE,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACrE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAEzD,OAAO,CACL,eACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACvE,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,UAAU,YAEnB,YAAY,GACR,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ /* @canonical/generator-ds 0.9.0-experimental.4 */
2
+ export { default as RelativeTime } from "./RelativeTime.js";
3
+ export * from "./types.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/RelativeTime/index.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5D,cAAc,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/Chip/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/RelativeTime/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export const MINUTE_IN_SECONDS = 60;
2
+ export const HOUR_IN_SECONDS = MINUTE_IN_SECONDS * 60;
3
+ export const DAY_IN_SECONDS = HOUR_IN_SECONDS * 24;
4
+ export const MONTH_IN_SECONDS = DAY_IN_SECONDS * 30;
5
+ export const YEAR_IN_SECONDS = DAY_IN_SECONDS * 365;
6
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/ui/RelativeTime/utils/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AACpC,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,GAAG,EAAE,CAAC;AACtD,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,GAAG,EAAE,CAAC;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,GAAG,EAAE,CAAC;AACpD,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,GAAG,GAAG,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ /**
3
+ * Formats a given instant as a human-readable time relative to the current time.
4
+ * @param instant The instant to format.
5
+ * @param options The options to use for formatting.
6
+ * @returns A human-readable relative time string
7
+ */
8
+ function formatHumanTime(instant, options) {
9
+ const now = Temporal.Now.instant();
10
+ const deltaSeconds = instant.epochSeconds - now.epochSeconds;
11
+ const absDeltaSeconds = Math.abs(deltaSeconds);
12
+ if (absDeltaSeconds < options.nowThreshold) {
13
+ return options.nowKeyword;
14
+ }
15
+ const timeZone = Temporal.Now.timeZoneId() || "UTC";
16
+ const instantZDT = instant.toZonedDateTimeISO(timeZone);
17
+ const nowZDT = now.toZonedDateTimeISO(timeZone);
18
+ const diff = instantZDT.since(nowZDT, { largestUnit: "years" });
19
+ const units = [
20
+ "years",
21
+ "months",
22
+ "days",
23
+ "hours",
24
+ "minutes",
25
+ "seconds",
26
+ ];
27
+ let rtfUnit = "seconds";
28
+ let rtfValue = 0;
29
+ for (const unit of units) {
30
+ const value = diff[unit];
31
+ if (value !== 0) {
32
+ rtfUnit = unit;
33
+ rtfValue = value;
34
+ break;
35
+ }
36
+ }
37
+ if (rtfValue === 0) {
38
+ return options.nowKeyword;
39
+ }
40
+ return options.relativeTimeFormat.format(rtfValue, rtfUnit);
41
+ }
42
+ export default formatHumanTime;
43
+ //# sourceMappingURL=formatHumanTime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatHumanTime.js","sourceRoot":"","sources":["../../../../../src/ui/RelativeTime/utils/formatHumanTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAgBjD;;;;;GAKG;AACH,SAAS,eAAe,CACtB,OAAyB,EACzB,OAAyB;IAEzB,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACnC,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC7D,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAE/C,IAAI,eAAe,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QAC3C,OAAO,OAAO,CAAC,UAAU,CAAC;IAC5B,CAAC;IAED,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,KAAK,CAAC;IACpD,MAAM,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACxD,MAAM,MAAM,GAAG,GAAG,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;IAEhE,MAAM,KAAK,GAAG;QACZ,OAAO;QACP,QAAQ;QACR,MAAM;QACN,OAAO;QACP,SAAS;QACT,SAAS;KAC8B,CAAC;IAE1C,IAAI,OAAO,GAAgC,SAAS,CAAC;IACrD,IAAI,QAAQ,GAAG,CAAC,CAAC;IAEjB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,OAAO,GAAG,IAAI,CAAC;YACf,QAAQ,GAAG,KAAK,CAAC;YACjB,MAAM;QACR,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,OAAO,CAAC,UAAU,CAAC;IAC5B,CAAC;IAED,OAAO,OAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ import * as constants from "./constants.js";
3
+ /**
4
+ * Calcualte the optimal update interval for a given instant based on the time distance from now.
5
+ * @returns The optimal update interval in milliseconds.
6
+ */
7
+ function getOptimalUpdateInterval(instant) {
8
+ const now = Temporal.Now.instant();
9
+ const deltaSeconds = instant.epochSeconds - now.epochSeconds;
10
+ const absDeltaSeconds = Math.abs(deltaSeconds);
11
+ if (absDeltaSeconds < constants.MINUTE_IN_SECONDS) {
12
+ return 1000;
13
+ }
14
+ if (absDeltaSeconds < constants.HOUR_IN_SECONDS) {
15
+ return constants.MINUTE_IN_SECONDS * 1000;
16
+ }
17
+ if (absDeltaSeconds < constants.DAY_IN_SECONDS) {
18
+ return constants.HOUR_IN_SECONDS * 1000;
19
+ }
20
+ // for any other time distance, update once a day
21
+ return constants.DAY_IN_SECONDS * 1000;
22
+ }
23
+ export default getOptimalUpdateInterval;
24
+ //# sourceMappingURL=getOptimalUpdateInterval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOptimalUpdateInterval.js","sourceRoot":"","sources":["../../../../../src/ui/RelativeTime/utils/getOptimalUpdateInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAE5C;;;GAGG;AACH,SAAS,wBAAwB,CAAC,OAAyB;IACzD,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACnC,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC7D,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAE/C,IAAI,eAAe,GAAG,SAAS,CAAC,iBAAiB,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC;QAChD,OAAO,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAC5C,CAAC;IAED,IAAI,eAAe,GAAG,SAAS,CAAC,cAAc,EAAE,CAAC;QAC/C,OAAO,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC;IAC1C,CAAC;IACD,iDAAiD;IACjD,OAAO,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC;AACzC,CAAC;AAED,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as formatHumanTime } from "./formatHumanTime.js";
2
+ export { default as getOptimalUpdateInterval } from "./getOptimalUpdateInterval.js";
3
+ export { default as parseInstant } from "./parseInstant.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/RelativeTime/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ /**
3
+ * Parser for Temporal.Instant.
4
+ * @param time - instance, date or string to parse
5
+ * @throws Error if time is invalid
6
+ */
7
+ function parseInstant(time) {
8
+ if (time instanceof Temporal.Instant) {
9
+ return time;
10
+ }
11
+ if (time instanceof Date) {
12
+ return Temporal.Instant.fromEpochMilliseconds(time.getTime());
13
+ }
14
+ try {
15
+ return Temporal.Instant.from(time);
16
+ }
17
+ catch (e) {
18
+ throw new Error(`Invalid time string (ISO string or Date object expected): ${time}`);
19
+ }
20
+ }
21
+ export default parseInstant;
22
+ //# sourceMappingURL=parseInstant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseInstant.js","sourceRoot":"","sources":["../../../../../src/ui/RelativeTime/utils/parseInstant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD;;;;GAIG;AACH,SAAS,YAAY,CAAC,IAAsC;IAC1D,IAAI,IAAI,YAAY,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,IAAI,YAAY,IAAI,EAAE,CAAC;QACzB,OAAO,QAAQ,CAAC,OAAO,CAAC,qBAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,6DAA6D,IAAI,EAAE,CACpE,CAAC;IACJ,CAAC;AACH,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -1,2 +1,7 @@
1
- export { Button } from "./Button/index.js";
1
+ export * from "./DiffChangeMarker/index.js";
2
+ export * from "./EditableBlock/index.js";
3
+ export * from "./FileTree/index.js";
4
+ export * from "./GitDiffViewer/index.js";
5
+ export * from "./MarkdownEditor/index.js";
6
+ export * from "./RelativeTime/index.js";
2
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAoB,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type React from "react";
2
+ import "./styles.css";
3
+ import type { DiffChangeMarkerProps } from "./types.js";
4
+ /**
5
+ * Displays a visual indicator for file changes in a diff (added, modified, deleted)
6
+ * Can be displayed in detailed or simple style
7
+ * @returns {React.ReactElement} - Rendered DiffChangeMarker
8
+ */
9
+ declare const DiffChangeMarker: ({ id, className, style, markerStyle, ...markerOptions }: DiffChangeMarkerProps) => React.ReactElement;
10
+ export default DiffChangeMarker;
11
+ //# sourceMappingURL=DiffChangeMarker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiffChangeMarker.d.ts","sourceRoot":"","sources":["../../../../src/ui/DiffChangeMarker/DiffChangeMarker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,qBAAqB,EAAkB,MAAM,YAAY,CAAC;AAIxE;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,GAAI,yDAMvB,qBAAqB,KAAG,KAAK,CAAC,YAgEhC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type React from "react";
2
+ import type { DetailedChangeMarkerProps } from "./types.js";
3
+ import "./styles.css";
4
+ declare const DetailedChangeMarker: ({ id, className, style, added, deleted, modified, }: DetailedChangeMarkerProps) => React.ReactElement;
5
+ export default DetailedChangeMarker;
6
+ //# sourceMappingURL=DetailedChangeMarker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailedChangeMarker.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/DiffChangeMarker/common/DetailedChangeMarker/DetailedChangeMarker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,cAAc,CAAC;AAItB,QAAA,MAAM,oBAAoB,GAAI,qDAO3B,yBAAyB,KAAG,KAAK,CAAC,YAYpC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as DetailedChangeMarker } from "./DetailedChangeMarker.js";
2
+ export * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/DiffChangeMarker/common/DetailedChangeMarker/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC5E,cAAc,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type React from "react";
2
+ export interface DetailedChangeMarkerProps {
3
+ id?: string;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ added?: string;
7
+ deleted?: string;
8
+ modified?: string;
9
+ }
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/DiffChangeMarker/common/DetailedChangeMarker/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,yBAAyB;IAExC,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,6 @@
1
+ import type React from "react";
2
+ import "./styles.css";
3
+ import type { SimpleChangeMarkerProps } from "./types.js";
4
+ declare const SimpleChangeMarker: ({ id, className, style, changeType, }: SimpleChangeMarkerProps) => React.ReactElement;
5
+ export default SimpleChangeMarker;
6
+ //# sourceMappingURL=SimpleChangeMarker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleChangeMarker.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/DiffChangeMarker/common/SimpleChangeMarker/SimpleChangeMarker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAI1D,QAAA,MAAM,kBAAkB,GAAI,uCAKzB,uBAAuB,KAAG,KAAK,CAAC,YAclC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as SimpleChangeMarker } from "./SimpleChangeMarker.js";
2
+ export * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/DiffChangeMarker/common/SimpleChangeMarker/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACxE,cAAc,YAAY,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type React from "react";
2
+ import type { DiffChangeType } from "ui/DiffChangeMarker/types.js";
3
+ export interface SimpleChangeMarkerProps {
4
+ id?: string;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ changeType: DiffChangeType;
8
+ }
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/DiffChangeMarker/common/SimpleChangeMarker/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,MAAM,WAAW,uBAAuB;IAEtC,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ export * from "./DetailedChangeMarker/index.js";
2
+ export * from "./SimpleChangeMarker/index.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/DiffChangeMarker/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const DeleteIcon: import("react/jsx-runtime").JSX.Element;
2
+ export declare const AddIcon: import("react/jsx-runtime").JSX.Element;
3
+ export declare const ModifyIcon: import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../src/ui/DiffChangeMarker/icons.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,yCAWtB,CAAC;AAEF,eAAO,MAAM,OAAO,yCAcnB,CAAC;AAEF,eAAO,MAAM,UAAU,yCAWtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as DiffChangeMarker } from "./DiffChangeMarker.js";
2
+ export * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/DiffChangeMarker/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,cAAc,YAAY,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type React from "react";
2
+ export type DiffChangeAutoOptions = {
3
+ deletions: number;
4
+ additions: number;
5
+ };
6
+ export type DiffChangeType = "added" | "deleted" | "modified";
7
+ export type DiffChangeManualOptions = {
8
+ type: DiffChangeType;
9
+ };
10
+ export type MarkerOptions = {
11
+ markerStyle: "detailed" | "simple";
12
+ };
13
+ export type DiffChangeMarkerProps = {
14
+ id?: string;
15
+ className?: string;
16
+ style?: React.CSSProperties;
17
+ } & MarkerOptions & (DiffChangeAutoOptions | DiffChangeManualOptions);
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/DiffChangeMarker/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,UAAU,GAAG,QAAQ,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAElC,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,GAAG,aAAa,GACf,CAAC,qBAAqB,GAAG,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { EditingContextType } from "./types.js";
2
+ declare const EditingContext: import("react").Context<EditingContextType | undefined>;
3
+ export default EditingContext;
4
+ //# sourceMappingURL=Context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/ui/EditableBlock/Context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,QAAA,MAAM,cAAc,yDAA2D,CAAC;AAEhF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type React from "react";
2
+ import type { EditElementProps, EditableBlockProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * Component that renders toggling edit mode block
6
+ * @returns {React.ReactElement} - Rendered EditableBlock
7
+ */
8
+ declare const EditableBlock: <T extends EditElementProps>({ id, EditComponent, className: userClassName, style, title, tag: TitleTag, isReadOnly, }: EditableBlockProps<T>) => React.ReactElement;
9
+ export default EditableBlock;
10
+ //# sourceMappingURL=EditableBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditableBlock.d.ts","sourceRoot":"","sources":["../../../../src/ui/EditableBlock/EditableBlock.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEvE,OAAO,cAAc,CAAC;AAEtB;;;GAGG;AAEH,QAAA,MAAM,aAAa,GAAI,CAAC,SAAS,gBAAgB,EAAE,2FAQhD,kBAAkB,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,YA8DhC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./useEditableBlock.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/EditableBlock/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { EditingContextType } from "../types.js";
2
+ export declare const useEditableBlock: () => EditingContextType;
3
+ export default useEditableBlock;
4
+ //# sourceMappingURL=useEditableBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEditableBlock.d.ts","sourceRoot":"","sources":["../../../../../src/ui/EditableBlock/hooks/useEditableBlock.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,eAAO,MAAM,gBAAgB,QAAO,kBAMnC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as EditableBlock } from "./EditableBlock.js";
2
+ export type { default as EditableBlockProps } from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/EditableBlock/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9D,YAAY,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type React from "react";
2
+ import type { JSX } from "react";
3
+ export interface EditingContextType {
4
+ isEditing: boolean;
5
+ toggleEditing: () => void;
6
+ }
7
+ export type EditElementProps = EditingContextType;
8
+ export type EditElement<T extends EditElementProps> = (props: T) => React.ReactNode;
9
+ export interface EditableBlockProps<T extends EditElementProps> {
10
+ /** Unique identifier for the editable block */
11
+ id?: string;
12
+ /** Component to render when in edit mode, must implement EditElement interface */
13
+ EditComponent: EditElement<T>;
14
+ /** CSS class name for additional styling */
15
+ className?: string;
16
+ /** Inline CSS styles to apply to the component */
17
+ style?: React.CSSProperties;
18
+ /** Title text for the editable block */
19
+ title?: string;
20
+ /** HTML element type to render as the title component (e.g., 'div', 'section') */
21
+ tag?: keyof JSX.IntrinsicElements;
22
+ /** Whether the block is read-only */
23
+ isReadOnly?: boolean;
24
+ }
25
+ export default EditableBlockProps;
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/EditableBlock/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAElD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,gBAAgB,IAAI,CACpD,KAAK,EAAE,CAAC,KACL,KAAK,CAAC,SAAS,CAAC;AAErB,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,gBAAgB;IAC5D,+CAA+C;IAC/C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kFAAkF;IAClF,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAC9B,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAC;IAElC,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ContextOptions } from "./types.js";
2
+ declare const Context: import("react").Context<ContextOptions | null>;
3
+ export default Context;
4
+ //# sourceMappingURL=Context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/ui/FileTree/Context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,QAAA,MAAM,OAAO,gDAA6C,CAAC;AAE3D,eAAe,OAAO,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type React from "react";
2
+ import "./styles.css";
3
+ import type { ProviderOptions } from "./types.js";
4
+ export declare const dataPathHash = "data-path-hash";
5
+ declare const Provider: ({ id, className, style, children, header, ...contextOptions }: ProviderOptions) => React.ReactElement;
6
+ export default Provider;
7
+ //# sourceMappingURL=Provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/ui/FileTree/Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAyB,eAAe,EAAE,MAAM,YAAY,CAAC;AAGzE,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAE7C,QAAA,MAAM,QAAQ,GAAI,+DAOf,eAAe,KAAG,KAAK,CAAC,YA+G1B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type React from "react";
2
+ import "./styles.css";
3
+ import type { FileProps } from "./types.js";
4
+ /**
5
+ * description of the File component
6
+ * @returns {React.ReactElement} - Rendered File
7
+ */
8
+ declare const File: ({ id, className, style, name, marker, }: FileProps) => React.ReactElement;
9
+ export default File;
10
+ //# sourceMappingURL=File.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/FileTree/common/File/File.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;GAGG;AACH,QAAA,MAAM,IAAI,GAAI,yCAMX,SAAS,KAAG,KAAK,CAAC,YAWpB,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as File } from "./File.js";
2
+ export * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/FileTree/common/File/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,cAAc,YAAY,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type React from "react";
2
+ export interface FileProps {
3
+ /** A unique identifier for the File */
4
+ id?: string;
5
+ /** Additional CSS classes */
6
+ className?: string;
7
+ /** Inline styles */
8
+ style?: React.CSSProperties;
9
+ /** File name */
10
+ name: string;
11
+ /**
12
+ * Shows a marker to the right of the file name.
13
+ */
14
+ marker?: React.ReactNode;
15
+ }
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/FileTree/common/File/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,SAAS;IACxB,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B"}
@@ -0,0 +1,10 @@
1
+ import type React from "react";
2
+ import "./styles.css";
3
+ import type { FolderProps } from "./types.js";
4
+ /**
5
+ * description of the Folder component
6
+ * @returns {React.ReactElement} - Rendered Folder
7
+ */
8
+ declare const Folder: ({ id, children, className, style, name, defaultOpen, }: FolderProps) => React.ReactElement;
9
+ export default Folder;
10
+ //# sourceMappingURL=Folder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Folder.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/FileTree/common/Folder/Folder.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;GAGG;AACH,QAAA,MAAM,MAAM,GAAI,wDAOb,WAAW,KAAG,KAAK,CAAC,YAatB,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as Folder } from "./Folder.js";
2
+ export * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/FileTree/common/Folder/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,cAAc,YAAY,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type React from "react";
2
+ export interface FolderProps {
3
+ /** A unique identifier for the Folder */
4
+ id?: string;
5
+ /** Additional CSS classes */
6
+ className?: string;
7
+ /** Child elements */
8
+ children?: React.ReactNode;
9
+ /** Inline styles */
10
+ style?: React.CSSProperties;
11
+ /** Folder name */
12
+ name: string;
13
+ /** Whether the folder is expanded by default */
14
+ defaultOpen?: boolean;
15
+ }
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/FileTree/common/Folder/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,oBAAoB;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IAEb,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
@@ -0,0 +1,10 @@
1
+ import type React from "react";
2
+ import "./styles.css";
3
+ import type { IndentationBlockProps } from "./types.js";
4
+ /**
5
+ * description of the IndentationBlock component
6
+ * @returns {React.ReactElement} - Rendered IndentationBlock
7
+ */
8
+ declare const IndentationBlock: ({ id, className, style, depth, }: IndentationBlockProps) => React.ReactElement | null;
9
+ export default IndentationBlock;
10
+ //# sourceMappingURL=IndentationBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndentationBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/FileTree/common/IndentationBlock/IndentationBlock.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAIxD;;;GAGG;AACH,QAAA,MAAM,gBAAgB,GAAI,kCAKvB,qBAAqB,KAAG,KAAK,CAAC,YAAY,GAAG,IAkB/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as IndentationBlock } from "./IndentationBlock.js";
2
+ export * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/FileTree/common/IndentationBlock/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,cAAc,YAAY,CAAC"}