@eightyfourthousand/data-access 2026.3.1 → 2026.4.1

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 (341) hide show
  1. package/{src/index.ts → index.d.ts} +1 -2
  2. package/index.js +18 -0
  3. package/index.js.map +1 -0
  4. package/lib/auth.d.ts +59 -0
  5. package/lib/auth.js +135 -0
  6. package/lib/auth.js.map +1 -0
  7. package/lib/bibliography.d.ts +9 -0
  8. package/lib/bibliography.js +31 -0
  9. package/lib/bibliography.js.map +1 -0
  10. package/lib/client-browser.d.ts +1 -0
  11. package/lib/client-browser.js +10 -0
  12. package/lib/client-browser.js.map +1 -0
  13. package/lib/client-server.d.ts +4 -0
  14. package/lib/client-server.js +19 -0
  15. package/lib/client-server.js.map +1 -0
  16. package/lib/client-ssr.d.ts +1 -0
  17. package/lib/client-ssr.js +24 -0
  18. package/lib/client-ssr.js.map +1 -0
  19. package/lib/client-token.d.ts +7 -0
  20. package/lib/client-token.js +21 -0
  21. package/lib/client-token.js.map +1 -0
  22. package/lib/feedback.d.ts +6 -0
  23. package/lib/feedback.js +50 -0
  24. package/lib/feedback.js.map +1 -0
  25. package/lib/folio.d.ts +11 -0
  26. package/lib/folio.js +32 -0
  27. package/lib/folio.js.map +1 -0
  28. package/lib/glossary/batch.d.ts +5 -0
  29. package/lib/glossary/batch.js +24 -0
  30. package/lib/glossary/batch.js.map +1 -0
  31. package/lib/glossary/index.d.ts +4 -0
  32. package/lib/glossary/index.js +5 -0
  33. package/lib/glossary/index.js.map +1 -0
  34. package/lib/glossary/instance.d.ts +10 -0
  35. package/lib/glossary/instance.js +29 -0
  36. package/lib/glossary/instance.js.map +1 -0
  37. package/lib/glossary/landing.d.ts +5 -0
  38. package/lib/glossary/landing.js +33 -0
  39. package/lib/glossary/landing.js.map +1 -0
  40. package/lib/glossary/pagination.d.ts +55 -0
  41. package/lib/glossary/pagination.js +255 -0
  42. package/lib/glossary/pagination.js.map +1 -0
  43. package/lib/imprint.d.ts +10 -0
  44. package/lib/imprint.js +24 -0
  45. package/lib/imprint.js.map +1 -0
  46. package/lib/library.d.ts +58 -0
  47. package/lib/library.js +119 -0
  48. package/lib/library.js.map +1 -0
  49. package/lib/local-storage.d.ts +10 -0
  50. package/lib/local-storage.js +25 -0
  51. package/lib/local-storage.js.map +1 -0
  52. package/lib/lookup-entity.d.ts +7 -0
  53. package/lib/lookup-entity.js +94 -0
  54. package/lib/lookup-entity.js.map +1 -0
  55. package/lib/panel-url.d.ts +10 -0
  56. package/lib/panel-url.js +23 -0
  57. package/lib/panel-url.js.map +1 -0
  58. package/lib/passage/batch.d.ts +17 -0
  59. package/lib/passage/batch.js +159 -0
  60. package/lib/passage/batch.js.map +1 -0
  61. package/lib/passage/index.d.ts +5 -0
  62. package/lib/passage/index.js +6 -0
  63. package/lib/passage/index.js.map +1 -0
  64. package/lib/passage/pagination.d.ts +43 -0
  65. package/lib/passage/pagination.js +170 -0
  66. package/lib/passage/pagination.js.map +1 -0
  67. package/lib/passage/read.d.ts +15 -0
  68. package/lib/passage/read.js +61 -0
  69. package/lib/passage/read.js.map +1 -0
  70. package/lib/passage/replace-persistence.d.ts +46 -0
  71. package/lib/passage/replace-persistence.js +94 -0
  72. package/lib/passage/replace-persistence.js.map +1 -0
  73. package/lib/passage/save.d.ts +16 -0
  74. package/lib/passage/save.js +231 -0
  75. package/lib/passage/save.js.map +1 -0
  76. package/lib/proxy.d.ts +7 -0
  77. package/lib/proxy.js +48 -0
  78. package/lib/proxy.js.map +1 -0
  79. package/lib/publications.d.ts +86 -0
  80. package/lib/publications.js +226 -0
  81. package/lib/publications.js.map +1 -0
  82. package/lib/replace.d.ts +31 -0
  83. package/lib/replace.js +134 -0
  84. package/lib/replace.js.map +1 -0
  85. package/lib/storage.d.ts +7 -0
  86. package/lib/storage.js +11 -0
  87. package/lib/storage.js.map +1 -0
  88. package/lib/types/alignment.d.ts +18 -0
  89. package/lib/types/alignment.js +13 -0
  90. package/lib/types/alignment.js.map +1 -0
  91. package/lib/types/annotation/abbreviation.d.ts +3 -0
  92. package/lib/types/annotation/abbreviation.js +20 -0
  93. package/lib/types/annotation/abbreviation.js.map +1 -0
  94. package/lib/types/annotation/annotation-type.d.ts +31 -0
  95. package/lib/types/annotation/annotation-type.js +81 -0
  96. package/lib/types/annotation/annotation-type.js.map +1 -0
  97. package/lib/types/annotation/annotation.d.ts +142 -0
  98. package/lib/types/annotation/annotation.js +23 -0
  99. package/lib/types/annotation/annotation.js.map +1 -0
  100. package/lib/types/annotation/audio.d.ts +3 -0
  101. package/lib/types/annotation/audio.js +24 -0
  102. package/lib/types/annotation/audio.js.map +1 -0
  103. package/lib/types/annotation/blockquote.d.ts +3 -0
  104. package/lib/types/annotation/blockquote.js +8 -0
  105. package/lib/types/annotation/blockquote.js.map +1 -0
  106. package/lib/types/annotation/code.d.ts +3 -0
  107. package/lib/types/annotation/code.js +8 -0
  108. package/lib/types/annotation/code.js.map +1 -0
  109. package/lib/types/annotation/deprecated.d.ts +3 -0
  110. package/lib/types/annotation/deprecated.js +8 -0
  111. package/lib/types/annotation/deprecated.js.map +1 -0
  112. package/lib/types/annotation/end-note-link.d.ts +3 -0
  113. package/lib/types/annotation/end-note-link.js +23 -0
  114. package/lib/types/annotation/end-note-link.js.map +1 -0
  115. package/lib/types/annotation/export.d.ts +3 -0
  116. package/{src/lib/types/annotation/export.ts → lib/types/annotation/export.js} +34 -36
  117. package/lib/types/annotation/export.js.map +1 -0
  118. package/lib/types/annotation/glossary-instance.d.ts +3 -0
  119. package/lib/types/annotation/glossary-instance.js +23 -0
  120. package/lib/types/annotation/glossary-instance.js.map +1 -0
  121. package/lib/types/annotation/has-abbreviation.d.ts +3 -0
  122. package/lib/types/annotation/has-abbreviation.js +20 -0
  123. package/lib/types/annotation/has-abbreviation.js.map +1 -0
  124. package/lib/types/annotation/heading.d.ts +3 -0
  125. package/lib/types/annotation/heading.js +23 -0
  126. package/lib/types/annotation/heading.js.map +1 -0
  127. package/lib/types/annotation/image.d.ts +3 -0
  128. package/lib/types/annotation/image.js +20 -0
  129. package/lib/types/annotation/image.js.map +1 -0
  130. package/lib/types/annotation/indent.d.ts +3 -0
  131. package/lib/types/annotation/indent.js +8 -0
  132. package/lib/types/annotation/indent.js.map +1 -0
  133. package/lib/types/annotation/index.js +5 -0
  134. package/lib/types/annotation/index.js.map +1 -0
  135. package/lib/types/annotation/inline-title.d.ts +3 -0
  136. package/lib/types/annotation/inline-title.js +21 -0
  137. package/lib/types/annotation/inline-title.js.map +1 -0
  138. package/lib/types/annotation/internal-link.d.ts +3 -0
  139. package/lib/types/annotation/internal-link.js +62 -0
  140. package/lib/types/annotation/internal-link.js.map +1 -0
  141. package/lib/types/annotation/leading-space.d.ts +3 -0
  142. package/lib/types/annotation/leading-space.js +8 -0
  143. package/lib/types/annotation/leading-space.js.map +1 -0
  144. package/lib/types/annotation/line-group.d.ts +3 -0
  145. package/lib/types/annotation/line-group.js +8 -0
  146. package/lib/types/annotation/line-group.js.map +1 -0
  147. package/lib/types/annotation/line.d.ts +3 -0
  148. package/lib/types/annotation/line.js +8 -0
  149. package/lib/types/annotation/line.js.map +1 -0
  150. package/lib/types/annotation/link.d.ts +3 -0
  151. package/lib/types/annotation/link.js +27 -0
  152. package/lib/types/annotation/link.js.map +1 -0
  153. package/lib/types/annotation/list-item.d.ts +3 -0
  154. package/lib/types/annotation/list-item.js +8 -0
  155. package/lib/types/annotation/list-item.js.map +1 -0
  156. package/lib/types/annotation/list.d.ts +3 -0
  157. package/lib/types/annotation/list.js +31 -0
  158. package/lib/types/annotation/list.js.map +1 -0
  159. package/lib/types/annotation/mantra.d.ts +3 -0
  160. package/lib/types/annotation/mantra.js +21 -0
  161. package/lib/types/annotation/mantra.js.map +1 -0
  162. package/lib/types/annotation/mention.d.ts +3 -0
  163. package/lib/types/annotation/mention.js +50 -0
  164. package/lib/types/annotation/mention.js.map +1 -0
  165. package/lib/types/annotation/paragraph.d.ts +3 -0
  166. package/lib/types/annotation/paragraph.js +8 -0
  167. package/lib/types/annotation/paragraph.js.map +1 -0
  168. package/lib/types/annotation/quote.d.ts +3 -0
  169. package/lib/types/annotation/quote.js +21 -0
  170. package/lib/types/annotation/quote.js.map +1 -0
  171. package/lib/types/annotation/quoted.d.ts +3 -0
  172. package/lib/types/annotation/quoted.js +21 -0
  173. package/lib/types/annotation/quoted.js.map +1 -0
  174. package/lib/types/annotation/reference.d.ts +3 -0
  175. package/lib/types/annotation/reference.js +8 -0
  176. package/lib/types/annotation/reference.js.map +1 -0
  177. package/lib/types/annotation/span.d.ts +3 -0
  178. package/lib/types/annotation/span.js +29 -0
  179. package/lib/types/annotation/span.js.map +1 -0
  180. package/lib/types/annotation/table-body-data.d.ts +3 -0
  181. package/lib/types/annotation/table-body-data.js +8 -0
  182. package/lib/types/annotation/table-body-data.js.map +1 -0
  183. package/lib/types/annotation/table-body-header.d.ts +3 -0
  184. package/lib/types/annotation/table-body-header.js +8 -0
  185. package/lib/types/annotation/table-body-header.js.map +1 -0
  186. package/lib/types/annotation/table-body-row.d.ts +3 -0
  187. package/lib/types/annotation/table-body-row.js +8 -0
  188. package/lib/types/annotation/table-body-row.js.map +1 -0
  189. package/lib/types/annotation/table.d.ts +3 -0
  190. package/lib/types/annotation/table.js +8 -0
  191. package/lib/types/annotation/table.js.map +1 -0
  192. package/lib/types/annotation/trailer.d.ts +3 -0
  193. package/lib/types/annotation/trailer.js +8 -0
  194. package/lib/types/annotation/trailer.js.map +1 -0
  195. package/lib/types/annotation/transform.d.ts +6 -0
  196. package/lib/types/annotation/transform.js +108 -0
  197. package/lib/types/annotation/transform.js.map +1 -0
  198. package/lib/types/annotation/unknown.d.ts +3 -0
  199. package/lib/types/annotation/unknown.js +8 -0
  200. package/lib/types/annotation/unknown.js.map +1 -0
  201. package/lib/types/bibliography.d.ts +41 -0
  202. package/lib/types/bibliography.js +30 -0
  203. package/lib/types/bibliography.js.map +1 -0
  204. package/{src/lib/types/client.ts → lib/types/client.d.ts} +0 -1
  205. package/lib/types/client.js +2 -0
  206. package/lib/types/client.js.map +1 -0
  207. package/{src/lib/types/editor-content.ts → lib/types/editor-content.d.ts} +7 -11
  208. package/lib/types/editor-content.js +2 -0
  209. package/lib/types/editor-content.js.map +1 -0
  210. package/lib/types/folio.d.ts +17 -0
  211. package/lib/types/folio.js +11 -0
  212. package/lib/types/folio.js.map +1 -0
  213. package/lib/types/glossary-page.d.ts +48 -0
  214. package/lib/types/glossary-page.js +21 -0
  215. package/lib/types/glossary-page.js.map +1 -0
  216. package/lib/types/glossary.d.ts +76 -0
  217. package/lib/types/glossary.js +32 -0
  218. package/lib/types/glossary.js.map +1 -0
  219. package/lib/types/imprint.d.ts +78 -0
  220. package/lib/types/imprint.js +71 -0
  221. package/lib/types/imprint.js.map +1 -0
  222. package/{src/lib/types/index.ts → lib/types/index.d.ts} +0 -3
  223. package/lib/types/index.js +20 -0
  224. package/lib/types/index.js.map +1 -0
  225. package/lib/types/language.d.ts +9 -0
  226. package/lib/types/language.js +41 -0
  227. package/lib/types/language.js.map +1 -0
  228. package/lib/types/layout.d.ts +5 -0
  229. package/lib/types/layout.js +23 -0
  230. package/lib/types/layout.js.map +1 -0
  231. package/lib/types/library.d.ts +19 -0
  232. package/lib/types/library.js +8 -0
  233. package/lib/types/library.js.map +1 -0
  234. package/lib/types/passage.d.ts +73 -0
  235. package/lib/types/passage.js +120 -0
  236. package/lib/types/passage.js.map +1 -0
  237. package/lib/types/semver.js +2 -0
  238. package/lib/types/semver.js.map +1 -0
  239. package/lib/types/title.d.ts +21 -0
  240. package/lib/types/title.js +22 -0
  241. package/lib/types/title.js.map +1 -0
  242. package/lib/types/toh.js +2 -0
  243. package/lib/types/toh.js.map +1 -0
  244. package/{src/lib/types/translation.ts → lib/types/translation.d.ts} +5 -7
  245. package/lib/types/translation.js +2 -0
  246. package/lib/types/translation.js.map +1 -0
  247. package/{src/lib/types/user.ts → lib/types/user.d.ts} +2 -11
  248. package/lib/types/user.js +9 -0
  249. package/lib/types/user.js.map +1 -0
  250. package/lib/types/work.d.ts +37 -0
  251. package/lib/types/work.js +15 -0
  252. package/lib/types/work.js.map +1 -0
  253. package/lib/use-bookmark.d.ts +10 -0
  254. package/lib/use-bookmark.js +31 -0
  255. package/lib/use-bookmark.js.map +1 -0
  256. package/package.json +25 -3
  257. package/ssr.js +6 -0
  258. package/ssr.js.map +1 -0
  259. package/.babelrc +0 -12
  260. package/.eslintrc.json +0 -18
  261. package/README.md +0 -9
  262. package/jest.config.ts +0 -10
  263. package/project.json +0 -21
  264. package/src/lib/auth.ts +0 -203
  265. package/src/lib/bibliography.ts +0 -57
  266. package/src/lib/canon.ts +0 -111
  267. package/src/lib/client-browser.ts +0 -12
  268. package/src/lib/client-server.ts +0 -30
  269. package/src/lib/client-ssr.ts +0 -24
  270. package/src/lib/client-token.ts +0 -24
  271. package/src/lib/feedback.ts +0 -71
  272. package/src/lib/folio.ts +0 -43
  273. package/src/lib/glossary.ts +0 -147
  274. package/src/lib/imprint.ts +0 -42
  275. package/src/lib/library.ts +0 -209
  276. package/src/lib/local-storage.ts +0 -33
  277. package/src/lib/lookup-entity.ts +0 -122
  278. package/src/lib/panel-url.ts +0 -43
  279. package/src/lib/passage.ts +0 -122
  280. package/src/lib/projects.ts +0 -107
  281. package/src/lib/proxy.ts +0 -68
  282. package/src/lib/publications.ts +0 -213
  283. package/src/lib/storage.ts +0 -23
  284. package/src/lib/types/alignment.ts +0 -32
  285. package/src/lib/types/annotation/abbreviation.ts +0 -30
  286. package/src/lib/types/annotation/annotation-type.ts +0 -219
  287. package/src/lib/types/annotation/annotation.ts +0 -244
  288. package/src/lib/types/annotation/audio.ts +0 -33
  289. package/src/lib/types/annotation/blockquote.ts +0 -18
  290. package/src/lib/types/annotation/code.ts +0 -16
  291. package/src/lib/types/annotation/deprecated.ts +0 -18
  292. package/src/lib/types/annotation/end-note-link.ts +0 -35
  293. package/src/lib/types/annotation/glossary-instance.ts +0 -34
  294. package/src/lib/types/annotation/has-abbreviation.ts +0 -30
  295. package/src/lib/types/annotation/heading.ts +0 -37
  296. package/src/lib/types/annotation/image.ts +0 -29
  297. package/src/lib/types/annotation/indent.ts +0 -16
  298. package/src/lib/types/annotation/inline-title.ts +0 -34
  299. package/src/lib/types/annotation/internal-link.ts +0 -86
  300. package/src/lib/types/annotation/leading-space.ts +0 -18
  301. package/src/lib/types/annotation/line-group.ts +0 -18
  302. package/src/lib/types/annotation/line.ts +0 -16
  303. package/src/lib/types/annotation/link.ts +0 -38
  304. package/src/lib/types/annotation/list-item.ts +0 -16
  305. package/src/lib/types/annotation/list.ts +0 -43
  306. package/src/lib/types/annotation/mantra.ts +0 -31
  307. package/src/lib/types/annotation/mention.ts +0 -64
  308. package/src/lib/types/annotation/paragraph.ts +0 -18
  309. package/src/lib/types/annotation/quote.ts +0 -30
  310. package/src/lib/types/annotation/quoted.ts +0 -30
  311. package/src/lib/types/annotation/reference.ts +0 -18
  312. package/src/lib/types/annotation/span.ts +0 -39
  313. package/src/lib/types/annotation/table-body-data.ts +0 -18
  314. package/src/lib/types/annotation/table-body-header.ts +0 -18
  315. package/src/lib/types/annotation/table-body-row.ts +0 -18
  316. package/src/lib/types/annotation/table.ts +0 -16
  317. package/src/lib/types/annotation/trailer.ts +0 -16
  318. package/src/lib/types/annotation/transform.ts +0 -140
  319. package/src/lib/types/annotation/unknown.ts +0 -16
  320. package/src/lib/types/bibliography.ts +0 -86
  321. package/src/lib/types/canon.ts +0 -148
  322. package/src/lib/types/contributor.ts +0 -84
  323. package/src/lib/types/folio.ts +0 -28
  324. package/src/lib/types/glossary-page.ts +0 -204
  325. package/src/lib/types/glossary.ts +0 -114
  326. package/src/lib/types/imprint.ts +0 -159
  327. package/src/lib/types/language.ts +0 -64
  328. package/src/lib/types/layout.ts +0 -37
  329. package/src/lib/types/library.ts +0 -29
  330. package/src/lib/types/passage.ts +0 -220
  331. package/src/lib/types/project.ts +0 -200
  332. package/src/lib/types/title.ts +0 -47
  333. package/src/lib/types/work.ts +0 -38
  334. package/src/lib/use-bookmark.ts +0 -45
  335. package/tsconfig.json +0 -20
  336. package/tsconfig.lib.json +0 -26
  337. package/tsconfig.spec.json +0 -22
  338. /package/{src/lib/types/annotation/index.ts → lib/types/annotation/index.d.ts} +0 -0
  339. /package/{src/lib/types/semver.ts → lib/types/semver.d.ts} +0 -0
  340. /package/{src/lib/types/toh.ts → lib/types/toh.d.ts} +0 -0
  341. /package/{src/ssr.ts → ssr.d.ts} +0 -0
@@ -0,0 +1,62 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ const internalLink = baseAnnotationFromDTO(dto);
4
+ dto.content.forEach((content) => {
5
+ if (content.href) {
6
+ internalLink.href = content.href;
7
+ }
8
+ if (content['link-type']) {
9
+ internalLink.isPending = true;
10
+ }
11
+ if (content.type) {
12
+ internalLink.linkType = content['type'];
13
+ }
14
+ if (content.label) {
15
+ internalLink.label = content.label;
16
+ }
17
+ if (content.uuid) {
18
+ internalLink.entity = content.uuid;
19
+ }
20
+ if (content.same_work !== undefined) {
21
+ internalLink.isSameWork = !!content.same_work;
22
+ }
23
+ if (content.subtype) {
24
+ internalLink.subtype = content.subtype;
25
+ }
26
+ if (content.toh) {
27
+ internalLink.linkToh = content.toh;
28
+ }
29
+ });
30
+ return internalLink;
31
+ };
32
+ export const exporter = (annotation) => {
33
+ const { entity, linkType, href, label, isPending } = annotation;
34
+ const dto = baseAnnotationToDto(annotation);
35
+ dto.content = [
36
+ {
37
+ href,
38
+ },
39
+ ];
40
+ if (isPending) {
41
+ dto.content.push({
42
+ 'link-type': 'pending',
43
+ });
44
+ }
45
+ if (label) {
46
+ dto.content.push({
47
+ label,
48
+ });
49
+ }
50
+ if (entity) {
51
+ dto.content.push({
52
+ uuid: entity,
53
+ });
54
+ }
55
+ if (linkType) {
56
+ dto.content.push({
57
+ type: linkType,
58
+ });
59
+ }
60
+ return dto;
61
+ };
62
+ //# sourceMappingURL=internal-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-link.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/internal-link.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAChD,GAAG,EACqB,EAAE;IAC1B,MAAM,YAAY,GAAG,qBAAqB,CAAC,GAAG,CAA2B,CAAC;IAC1E,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,YAAY,CAAC,IAAI,GAAG,OAAO,CAAC,IAAc,CAAC;QAC7C,CAAC;QAED,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;YACzB,YAAY,CAAC,SAAS,GAAG,IAAI,CAAC;QAChC,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,YAAY,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAW,CAAC;QACpD,CAAC;QAED,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,YAAY,CAAC,KAAK,GAAG,OAAO,CAAC,KAAe,CAAC;QAC/C,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,YAAY,CAAC,MAAM,GAAG,OAAO,CAAC,IAAc,CAAC;QAC/C,CAAC;QAED,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YACpC,YAAY,CAAC,UAAU,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAChD,CAAC;QAED,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC,OAAiB,CAAC;QACnD,CAAC;QAED,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;YAChB,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC,GAAa,CAAC;QAC/C,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,GAChD,UAAoC,CAAC;IACvC,MAAM,GAAG,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC5C,GAAG,CAAC,OAAO,GAAG;QACZ;YACE,IAAI;SACL;KACF,CAAC;IAEF,IAAI,SAAS,EAAE,CAAC;QACd,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,WAAW,EAAE,SAAS;SACvB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,IAAI,MAAM,EAAE,CAAC;QACX,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;IACL,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=leading-space.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leading-space.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/leading-space.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAChD,GAAG,EACqB,EAAE;IAC1B,OAAO,qBAAqB,CAAC,GAAG,CAA2B,CAAC;AAC9D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=line-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-group.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/line-group.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAChD,GAAG,EACkB,EAAE;IACvB,OAAO,qBAAqB,CAAC,GAAG,CAAwB,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=line.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/line.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,GAAG,EAAkB,EAAE;IACxE,OAAO,qBAAqB,CAAC,GAAG,CAAmB,CAAC;AACtD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,27 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ const linkAnnotation = baseAnnotationFromDTO(dto);
4
+ dto.content.forEach((content) => {
5
+ if (content.title) {
6
+ linkAnnotation.text = content.title;
7
+ }
8
+ if (content.href) {
9
+ linkAnnotation.href = content.href;
10
+ }
11
+ });
12
+ return linkAnnotation;
13
+ };
14
+ export const exporter = (annotation) => {
15
+ const { href, text } = annotation;
16
+ const dto = baseAnnotationToDto(annotation);
17
+ dto.content.push({
18
+ href,
19
+ });
20
+ if (text) {
21
+ dto.content.push({
22
+ title: text,
23
+ });
24
+ }
25
+ return dto;
26
+ };
27
+ //# sourceMappingURL=link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/link.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,GAAG,EAAkB,EAAE;IACxE,MAAM,cAAc,GAAG,qBAAqB,CAAC,GAAG,CAAmB,CAAC;IACpE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,cAAc,CAAC,IAAI,GAAG,OAAO,CAAC,KAAe,CAAC;QAChD,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,cAAc,CAAC,IAAI,GAAG,OAAO,CAAC,IAAc,CAAC;QAC/C,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,UAA4B,CAAC;IACpD,MAAM,GAAG,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC5C,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;QACf,IAAI;KACL,CAAC,CAAC;IAEH,IAAI,IAAI,EAAE,CAAC;QACT,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=list-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-item.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/list-item.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,GAAG,EAAsB,EAAE;IAC5E,OAAO,qBAAqB,CAAC,GAAG,CAAuB,CAAC;AAC1D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,31 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ const listAnnotation = baseAnnotationFromDTO(dto);
4
+ dto.content.forEach((content) => {
5
+ if (content['list-spacing']) {
6
+ listAnnotation.spacing = content['list-spacing'];
7
+ }
8
+ if (content['list-item-style']) {
9
+ listAnnotation.itemStyle = content['list-item-style'];
10
+ }
11
+ if (content.nesting) {
12
+ listAnnotation.nesting = Number.parseInt(content.nesting);
13
+ }
14
+ });
15
+ return listAnnotation;
16
+ };
17
+ export const exporter = (annotation) => {
18
+ const { spacing, nesting, itemStyle } = annotation;
19
+ const dto = baseAnnotationToDto(annotation);
20
+ if (spacing) {
21
+ dto.content.push({ 'list-spacing': spacing });
22
+ }
23
+ if (nesting) {
24
+ dto.content.push({ nesting });
25
+ }
26
+ if (itemStyle) {
27
+ dto.content.push({ 'list-item-style': itemStyle });
28
+ }
29
+ return dto;
30
+ };
31
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/list.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,GAAG,EAAkB,EAAE;IACxE,MAAM,cAAc,GAAG,qBAAqB,CAAC,GAAG,CAAmB,CAAC;IACpE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,IAAI,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;YAC5B,cAAc,CAAC,OAAO,GAAG,OAAO,CAAC,cAAc,CAAW,CAAC;QAC7D,CAAC;QAED,IAAI,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;YAC/B,cAAc,CAAC,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAW,CAAC;QAClE,CAAC;QAED,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,cAAc,CAAC,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAiB,CAAC,CAAC;QACtE,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,UAA4B,CAAC;IACrE,MAAM,GAAG,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,OAAO,EAAE,CAAC;QACZ,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,OAAO,EAAE,CAAC;QACZ,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAChC,CAAC;IACD,IAAI,SAAS,EAAE,CAAC;QACd,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,21 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ const mantraAnnotation = baseAnnotationFromDTO(dto);
4
+ dto.content.forEach((content) => {
5
+ if (content.lang) {
6
+ mantraAnnotation.lang = content.lang;
7
+ }
8
+ });
9
+ return mantraAnnotation;
10
+ };
11
+ export const exporter = (annotation) => {
12
+ const { lang } = annotation;
13
+ const dto = baseAnnotationToDto(annotation);
14
+ if (lang) {
15
+ dto.content.push({
16
+ lang,
17
+ });
18
+ }
19
+ return dto;
20
+ };
21
+ //# sourceMappingURL=mantra.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mantra.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/mantra.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAGtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,GAAG,EAAoB,EAAE;IAC1E,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,GAAG,CAAqB,CAAC;IACxE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,gBAAgB,CAAC,IAAI,GAAG,OAAO,CAAC,IAAmC,CAAC;QACtE,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,MAAM,EAAE,IAAI,EAAE,GAAG,UAA8B,CAAC;IAChD,MAAM,GAAG,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAE5C,IAAI,IAAI,EAAE,CAAC;QACT,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,50 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ const mention = baseAnnotationFromDTO(dto);
4
+ dto.content.forEach((content) => {
5
+ if (content.uuid) {
6
+ mention.entity = content.uuid;
7
+ }
8
+ if (content.type) {
9
+ mention.linkType = content.type;
10
+ }
11
+ if (content.text) {
12
+ mention.text = content.text;
13
+ }
14
+ if (content.same_work !== undefined) {
15
+ mention.isSameWork = !!content.same_work;
16
+ }
17
+ if (content.subtype) {
18
+ mention.subtype = content.subtype;
19
+ }
20
+ if (content.toh) {
21
+ mention.linkToh = content.toh;
22
+ }
23
+ });
24
+ return mention;
25
+ };
26
+ export const exporter = (annotation) => {
27
+ const { entity, linkType, text, isSameWork, subtype, linkToh } = annotation;
28
+ const dto = baseAnnotationToDto(annotation);
29
+ if (entity) {
30
+ dto.content.push({ uuid: entity });
31
+ }
32
+ if (linkType) {
33
+ dto.content.push({ type: linkType });
34
+ }
35
+ // Persist custom override text, but NEVER persist displayText
36
+ if (text) {
37
+ dto.content.push({ text });
38
+ }
39
+ if (isSameWork !== undefined) {
40
+ dto.content.push({ same_work: isSameWork });
41
+ }
42
+ if (subtype) {
43
+ dto.content.push({ subtype });
44
+ }
45
+ if (linkToh) {
46
+ dto.content.push({ toh: linkToh });
47
+ }
48
+ return dto;
49
+ };
50
+ //# sourceMappingURL=mention.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mention.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/mention.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAChD,GAAG,EACgB,EAAE;IACrB,MAAM,OAAO,GAAG,qBAAqB,CAAC,GAAG,CAAsB,CAAC;IAChE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,IAAc,CAAC;QAC1C,CAAC;QACD,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAc,CAAC;QAC5C,CAAC;QACD,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAc,CAAC;QACxC,CAAC;QACD,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YACpC,OAAO,CAAC,UAAU,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC3C,CAAC;QACD,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAiB,CAAC;QAC9C,CAAC;QACD,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;YAChB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,GAAa,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,GAC5D,UAA+B,CAAC;IAClC,MAAM,GAAG,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAE5C,IAAI,MAAM,EAAE,CAAC;QACX,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACrC,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACb,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,8DAA8D;IAC9D,IAAI,IAAI,EAAE,CAAC;QACT,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,OAAO,EAAE,CAAC;QACZ,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAChC,CAAC;IACD,IAAI,OAAO,EAAE,CAAC;QACZ,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=paragraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraph.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/paragraph.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAChD,GAAG,EACkB,EAAE;IACvB,OAAO,qBAAqB,CAAC,GAAG,CAAwB,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,21 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ const quoteAnnotation = baseAnnotationFromDTO(dto);
4
+ dto.content.forEach((content) => {
5
+ if (content.uuid) {
6
+ quoteAnnotation.quote = content.uuid;
7
+ }
8
+ });
9
+ return quoteAnnotation;
10
+ };
11
+ export const exporter = (annotation) => {
12
+ const { quote } = annotation;
13
+ const dto = baseAnnotationToDto(annotation);
14
+ if (quote) {
15
+ dto.content.push({
16
+ uuid: quote,
17
+ });
18
+ }
19
+ return dto;
20
+ };
21
+ //# sourceMappingURL=quote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quote.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/quote.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,GAAG,EAAmB,EAAE;IACzE,MAAM,eAAe,GAAG,qBAAqB,CAAC,GAAG,CAAoB,CAAC;IACtE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,eAAe,CAAC,KAAK,GAAG,OAAO,CAAC,IAAc,CAAC;QACjD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,MAAM,EAAE,KAAK,EAAE,GAAG,UAA6B,CAAC;IAChD,MAAM,GAAG,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,KAAK,EAAE,CAAC;QACV,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,KAAK;SACZ,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,21 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ const quotedAnnotation = baseAnnotationFromDTO(dto);
4
+ dto.content.forEach((content) => {
5
+ if (content.uuid) {
6
+ quotedAnnotation.quote = content.uuid;
7
+ }
8
+ });
9
+ return quotedAnnotation;
10
+ };
11
+ export const exporter = (annotation) => {
12
+ const { quote } = annotation;
13
+ const dto = baseAnnotationToDto(annotation);
14
+ if (quote) {
15
+ dto.content.push({
16
+ uuid: quote,
17
+ });
18
+ }
19
+ return dto;
20
+ };
21
+ //# sourceMappingURL=quoted.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quoted.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/quoted.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,GAAG,EAAoB,EAAE;IAC1E,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,GAAG,CAAqB,CAAC;IACxE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,gBAAgB,CAAC,KAAK,GAAG,OAAO,CAAC,IAAc,CAAC;QAClD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,MAAM,EAAE,KAAK,EAAE,GAAG,UAA8B,CAAC;IACjD,MAAM,GAAG,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,KAAK,EAAE,CAAC;QACV,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,KAAK;SACZ,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/reference.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAChD,GAAG,EACkB,EAAE;IACvB,OAAO,qBAAqB,CAAC,GAAG,CAAwB,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,29 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ const spanAnnotation = baseAnnotationFromDTO(dto);
4
+ dto.content.forEach((content) => {
5
+ if (content['text-style']) {
6
+ spanAnnotation.textStyle = content['text-style'];
7
+ }
8
+ if (content.lang) {
9
+ spanAnnotation.lang = content.lang;
10
+ }
11
+ });
12
+ return spanAnnotation;
13
+ };
14
+ export const exporter = (annotation) => {
15
+ const { textStyle, lang } = annotation;
16
+ const dto = baseAnnotationToDto(annotation);
17
+ if (textStyle) {
18
+ dto.content.push({
19
+ 'text-style': textStyle,
20
+ });
21
+ }
22
+ if (lang) {
23
+ dto.content.push({
24
+ lang,
25
+ });
26
+ }
27
+ return dto;
28
+ };
29
+ //# sourceMappingURL=span.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"span.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/span.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAGtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,GAAG,EAAkB,EAAE;IACxE,MAAM,cAAc,GAAG,qBAAqB,CAAC,GAAG,CAAmB,CAAC;IACpE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,IAAI,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;YAC1B,cAAc,CAAC,SAAS,GAAG,OAAO,CAAC,YAAY,CAAW,CAAC;QAC7D,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,cAAc,CAAC,IAAI,GAAG,OAAO,CAAC,IAAmC,CAAC;QACpE,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,UAA4B,CAAC;IACzD,MAAM,GAAG,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,SAAS,EAAE,CAAC;QACd,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,YAAY,EAAE,SAAS;SACxB,CAAC,CAAC;IACL,CAAC;IACD,IAAI,IAAI,EAAE,CAAC;QACT,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACf,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=table-body-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-body-data.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/table-body-data.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAChD,GAAG,EACsB,EAAE;IAC3B,OAAO,qBAAqB,CAAC,GAAG,CAA4B,CAAC;AAC/D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=table-body-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-body-header.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/table-body-header.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAChD,GAAG,EACwB,EAAE;IAC7B,OAAO,qBAAqB,CAAC,GAAG,CAA8B,CAAC;AACjE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=table-body-row.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-body-row.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/table-body-row.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAChD,GAAG,EACqB,EAAE;IAC1B,OAAO,qBAAqB,CAAC,GAAG,CAA2B,CAAC;AAC9D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/table.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,GAAG,EAAmB,EAAE;IACzE,OAAO,qBAAqB,CAAC,GAAG,CAAoB,CAAC;AACvD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type AnnotationExporter, type AnnotationTransformer } from './annotation';
2
+ export declare const transformer: AnnotationTransformer;
3
+ export declare const exporter: AnnotationExporter;
@@ -0,0 +1,8 @@
1
+ import { baseAnnotationFromDTO, baseAnnotationToDto, } from './annotation';
2
+ export const transformer = (dto) => {
3
+ return baseAnnotationFromDTO(dto);
4
+ };
5
+ export const exporter = (annotation) => {
6
+ return baseAnnotationToDto(annotation);
7
+ };
8
+ //# sourceMappingURL=trailer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trailer.js","sourceRoot":"","sources":["../../../../../../libs/data-access/src/lib/types/annotation/trailer.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,GAAG,EAAqB,EAAE;IAC3E,OAAO,qBAAqB,CAAC,GAAG,CAAsB,CAAC;AACzD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAuB,CAAC,UAAU,EAAiB,EAAE;IACxE,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Annotation, type Annotations } from './annotation';
2
+ import type { AnnotationDTO, AnnotationsDTO } from './annotation-type';
3
+ export declare const annotationFromDTO: (dto: AnnotationDTO, passageLength: number) => Annotation;
4
+ export declare const annotationsFromDTO: (dto?: AnnotationsDTO, passageLength?: number) => Annotations;
5
+ export declare const annotationToDTO: (annotation: Annotation) => AnnotationDTO | undefined;
6
+ export declare const annotationsToDTO: (annotations: Annotations) => AnnotationsDTO;