@ndla/ui 56.0.122-alpha.0 → 56.0.124-alpha.0

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 (314) hide show
  1. package/README.md +1 -1
  2. package/es/Article/Article.js +127 -0
  3. package/es/Article/Article.js.map +1 -0
  4. package/es/Article/ArticleByline.js +133 -0
  5. package/es/Article/ArticleByline.js.map +1 -0
  6. package/es/Article/ArticleFootNotes.js +40 -0
  7. package/es/Article/ArticleFootNotes.js.map +1 -0
  8. package/es/AudioPlayer/AudioPlayer.js +157 -0
  9. package/es/AudioPlayer/AudioPlayer.js.map +1 -0
  10. package/es/AudioPlayer/Controls.js +254 -0
  11. package/es/AudioPlayer/Controls.js.map +1 -0
  12. package/es/AudioPlayer/SpeechControl.js +40 -0
  13. package/es/AudioPlayer/SpeechControl.js.map +1 -0
  14. package/es/AudioPlayer/index.js +8 -0
  15. package/es/AudioPlayer/index.js.map +1 -0
  16. package/es/Breadcrumb/Breadcrumb.js +44 -0
  17. package/es/Breadcrumb/Breadcrumb.js.map +1 -0
  18. package/es/Breadcrumb/BreadcrumbItem.js +36 -0
  19. package/es/Breadcrumb/BreadcrumbItem.js.map +1 -0
  20. package/es/Breadcrumb/HomeBreadcrumb.js +44 -0
  21. package/es/Breadcrumb/HomeBreadcrumb.js.map +1 -0
  22. package/es/Breadcrumb/index.js +9 -0
  23. package/es/Breadcrumb/index.js.map +1 -0
  24. package/es/CampaignBlock/CampaignBlock.js +131 -0
  25. package/es/CampaignBlock/CampaignBlock.js.map +1 -0
  26. package/es/CodeBlock/CodeBlock.js +25 -0
  27. package/es/CodeBlock/CodeBlock.js.map +1 -0
  28. package/es/CodeBlock/codeLanguageOptions.js +114 -0
  29. package/es/CodeBlock/codeLanguageOptions.js.map +1 -0
  30. package/es/Concept/Concept.js +50 -0
  31. package/es/Concept/Concept.js.map +1 -0
  32. package/es/ContactBlock/ContactBlock.js +145 -0
  33. package/es/ContactBlock/ContactBlock.js.map +1 -0
  34. package/es/ContentTypeBadge/ContentTypeBadge.js +41 -0
  35. package/es/ContentTypeBadge/ContentTypeBadge.js.map +1 -0
  36. package/es/ContentTypeBlockQuote/ContentTypeBlockQuote.js +25 -0
  37. package/es/ContentTypeBlockQuote/ContentTypeBlockQuote.js.map +1 -0
  38. package/es/ContentTypeFramedContent/ContentTypeFramedContent.js +25 -0
  39. package/es/ContentTypeFramedContent/ContentTypeFramedContent.js.map +1 -0
  40. package/es/ContentTypeHero/ContentTypeHero.js +39 -0
  41. package/es/ContentTypeHero/ContentTypeHero.js.map +1 -0
  42. package/es/CopyParagraphButton/CopyParagraphButton.js +62 -0
  43. package/es/CopyParagraphButton/CopyParagraphButton.js.map +1 -0
  44. package/es/CopyParagraphButton/index.js +8 -0
  45. package/es/CopyParagraphButton/index.js.map +1 -0
  46. package/es/Embed/AudioEmbed.js +52 -0
  47. package/es/Embed/AudioEmbed.js.map +1 -0
  48. package/es/Embed/BrightcoveEmbed.js +96 -0
  49. package/es/Embed/BrightcoveEmbed.js.map +1 -0
  50. package/es/Embed/CodeEmbed.js +61 -0
  51. package/es/Embed/CodeEmbed.js.map +1 -0
  52. package/es/Embed/ConceptEmbed.js +78 -0
  53. package/es/Embed/ConceptEmbed.js.map +1 -0
  54. package/es/Embed/ConceptInlineTriggerButton.js +40 -0
  55. package/es/Embed/ConceptInlineTriggerButton.js.map +1 -0
  56. package/es/Embed/ContentLinkEmbed.js +31 -0
  57. package/es/Embed/ContentLinkEmbed.js.map +1 -0
  58. package/es/Embed/CopyrightEmbed.js +23 -0
  59. package/es/Embed/CopyrightEmbed.js.map +1 -0
  60. package/es/Embed/EmbedErrorPlaceholder.js +43 -0
  61. package/es/Embed/EmbedErrorPlaceholder.js.map +1 -0
  62. package/es/Embed/EmbedWrapper.js +26 -0
  63. package/es/Embed/EmbedWrapper.js.map +1 -0
  64. package/es/Embed/ExternalEmbed.js +54 -0
  65. package/es/Embed/ExternalEmbed.js.map +1 -0
  66. package/es/Embed/FootnoteEmbed.js +27 -0
  67. package/es/Embed/FootnoteEmbed.js.map +1 -0
  68. package/es/Embed/GlossEmbed.js +52 -0
  69. package/es/Embed/GlossEmbed.js.map +1 -0
  70. package/es/Embed/H5pEmbed.js +38 -0
  71. package/es/Embed/H5pEmbed.js.map +1 -0
  72. package/es/Embed/IframeEmbed.js +69 -0
  73. package/es/Embed/IframeEmbed.js.map +1 -0
  74. package/es/Embed/ImageEmbed.js +180 -0
  75. package/es/Embed/ImageEmbed.js.map +1 -0
  76. package/es/Embed/InlineTriggerButton.js +25 -0
  77. package/es/Embed/InlineTriggerButton.js.map +1 -0
  78. package/es/Embed/RelatedContentEmbed.js +38 -0
  79. package/es/Embed/RelatedContentEmbed.js.map +1 -0
  80. package/es/Embed/UnknownEmbed.js +20 -0
  81. package/es/Embed/UnknownEmbed.js.map +1 -0
  82. package/es/Embed/UuDisclaimerEmbed.js +54 -0
  83. package/es/Embed/UuDisclaimerEmbed.js.map +1 -0
  84. package/es/ErrorMessage/ErrorMessage.js +54 -0
  85. package/es/ErrorMessage/ErrorMessage.js.map +1 -0
  86. package/es/ErrorMessage/index.js +8 -0
  87. package/es/ErrorMessage/index.js.map +1 -0
  88. package/es/FactBox/FactBox.js +121 -0
  89. package/es/FactBox/FactBox.js.map +1 -0
  90. package/es/FactBox/index.js +8 -0
  91. package/es/FactBox/index.js.map +1 -0
  92. package/es/FileList/File.js +76 -0
  93. package/es/FileList/File.js.map +1 -0
  94. package/es/FileList/FileList.js +32 -0
  95. package/es/FileList/FileList.js.map +1 -0
  96. package/es/FileList/PdfFile.js +28 -0
  97. package/es/FileList/PdfFile.js.map +1 -0
  98. package/es/Gloss/Gloss.js +142 -0
  99. package/es/Gloss/Gloss.js.map +1 -0
  100. package/es/Gloss/GlossExample.js +46 -0
  101. package/es/Gloss/GlossExample.js.map +1 -0
  102. package/es/Grid/Grid.js +66 -0
  103. package/es/Grid/Grid.js.map +1 -0
  104. package/es/Grid/GridParallaxItem.js +21 -0
  105. package/es/Grid/GridParallaxItem.js.map +1 -0
  106. package/es/KeyFigure/KeyFigure.js +46 -0
  107. package/es/KeyFigure/KeyFigure.js.map +1 -0
  108. package/es/LicenseByline/EmbedByline.js +132 -0
  109. package/es/LicenseByline/EmbedByline.js.map +1 -0
  110. package/es/LicenseByline/LicenseLink.js +31 -0
  111. package/es/LicenseByline/LicenseLink.js.map +1 -0
  112. package/es/LinkBlock/LinkBlock.js +74 -0
  113. package/es/LinkBlock/LinkBlock.js.map +1 -0
  114. package/es/LinkBlock/LinkBlockSection.js +23 -0
  115. package/es/LinkBlock/LinkBlockSection.js.map +1 -0
  116. package/es/Pitch/Pitch.js +62 -0
  117. package/es/Pitch/Pitch.js.map +1 -0
  118. package/es/RelatedArticleList/RelatedArticleList.js +97 -0
  119. package/es/RelatedArticleList/RelatedArticleList.js.map +1 -0
  120. package/es/RelatedArticleList/index.js +8 -0
  121. package/es/RelatedArticleList/index.js.map +1 -0
  122. package/es/ResourceBox/ResourceBox.js +74 -0
  123. package/es/ResourceBox/ResourceBox.js.map +1 -0
  124. package/es/TagSelector/TagSelector.js +100 -0
  125. package/es/TagSelector/TagSelector.js.map +1 -0
  126. package/es/ZendeskButton/ZendeskButton.js +41 -0
  127. package/es/ZendeskButton/ZendeskButton.js.map +1 -0
  128. package/es/_virtual/rolldown_runtime.js +11 -0
  129. package/es/i18n/formatNestedMessages.js +17 -0
  130. package/es/i18n/formatNestedMessages.js.map +1 -0
  131. package/es/i18n/i18n.js +29 -0
  132. package/es/i18n/i18n.js.map +1 -0
  133. package/es/i18n/useComponentTranslations.js +155 -0
  134. package/es/i18n/useComponentTranslations.js.map +1 -0
  135. package/es/index.js +65 -0
  136. package/es/locale/messages-en.js +438 -0
  137. package/es/locale/messages-en.js.map +1 -0
  138. package/es/locale/messages-nb.js +438 -0
  139. package/es/locale/messages-nb.js.map +1 -0
  140. package/es/locale/messages-nn.js +438 -0
  141. package/es/locale/messages-nn.js.map +1 -0
  142. package/es/locale/messages-se.js +438 -0
  143. package/es/locale/messages-se.js.map +1 -0
  144. package/es/model/ContentType.js +72 -0
  145. package/es/model/ContentType.js.map +1 -0
  146. package/es/model/SubjectCategories.js +25 -0
  147. package/es/model/SubjectCategories.js.map +1 -0
  148. package/es/model/SubjectTypes.js +23 -0
  149. package/es/model/SubjectTypes.js.map +1 -0
  150. package/es/model/WordClass.js +53 -0
  151. package/es/model/WordClass.js.map +1 -0
  152. package/es/model/index.js +19 -0
  153. package/es/model/index.js.map +1 -0
  154. package/es/utils/licenseAttributes.js +16 -0
  155. package/es/utils/licenseAttributes.js.map +1 -0
  156. package/es/utils/relativeUrl.js +26 -0
  157. package/es/utils/relativeUrl.js.map +1 -0
  158. package/lib/Article/Article.js +134 -0
  159. package/lib/Article/Article.js.map +1 -0
  160. package/lib/Article/ArticleByline.js +135 -0
  161. package/lib/Article/ArticleByline.js.map +1 -0
  162. package/lib/Article/ArticleFootNotes.js +41 -0
  163. package/lib/Article/ArticleFootNotes.js.map +1 -0
  164. package/lib/AudioPlayer/AudioPlayer.js +158 -0
  165. package/lib/AudioPlayer/AudioPlayer.js.map +1 -0
  166. package/lib/AudioPlayer/Controls.js +255 -0
  167. package/lib/AudioPlayer/Controls.js.map +1 -0
  168. package/lib/AudioPlayer/SpeechControl.js +41 -0
  169. package/lib/AudioPlayer/SpeechControl.js.map +1 -0
  170. package/lib/AudioPlayer/index.js +8 -0
  171. package/lib/AudioPlayer/index.js.map +1 -0
  172. package/lib/Breadcrumb/Breadcrumb.js +45 -0
  173. package/lib/Breadcrumb/Breadcrumb.js.map +1 -0
  174. package/lib/Breadcrumb/BreadcrumbItem.js +37 -0
  175. package/lib/Breadcrumb/BreadcrumbItem.js.map +1 -0
  176. package/lib/Breadcrumb/HomeBreadcrumb.js +45 -0
  177. package/lib/Breadcrumb/HomeBreadcrumb.js.map +1 -0
  178. package/lib/Breadcrumb/index.js +9 -0
  179. package/lib/Breadcrumb/index.js.map +1 -0
  180. package/lib/CampaignBlock/CampaignBlock.js +132 -0
  181. package/lib/CampaignBlock/CampaignBlock.js.map +1 -0
  182. package/lib/CodeBlock/CodeBlock.js +26 -0
  183. package/lib/CodeBlock/CodeBlock.js.map +1 -0
  184. package/lib/CodeBlock/codeLanguageOptions.js +115 -0
  185. package/lib/CodeBlock/codeLanguageOptions.js.map +1 -0
  186. package/lib/Concept/Concept.js +51 -0
  187. package/lib/Concept/Concept.js.map +1 -0
  188. package/lib/ContactBlock/ContactBlock.js +147 -0
  189. package/lib/ContactBlock/ContactBlock.js.map +1 -0
  190. package/lib/ContentTypeBadge/ContentTypeBadge.js +43 -0
  191. package/lib/ContentTypeBadge/ContentTypeBadge.js.map +1 -0
  192. package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.js +26 -0
  193. package/lib/ContentTypeBlockQuote/ContentTypeBlockQuote.js.map +1 -0
  194. package/lib/ContentTypeFramedContent/ContentTypeFramedContent.js +26 -0
  195. package/lib/ContentTypeFramedContent/ContentTypeFramedContent.js.map +1 -0
  196. package/lib/ContentTypeHero/ContentTypeHero.js +40 -0
  197. package/lib/ContentTypeHero/ContentTypeHero.js.map +1 -0
  198. package/lib/CopyParagraphButton/CopyParagraphButton.js +63 -0
  199. package/lib/CopyParagraphButton/CopyParagraphButton.js.map +1 -0
  200. package/lib/CopyParagraphButton/index.js +8 -0
  201. package/lib/CopyParagraphButton/index.js.map +1 -0
  202. package/lib/Embed/AudioEmbed.js +53 -0
  203. package/lib/Embed/AudioEmbed.js.map +1 -0
  204. package/lib/Embed/BrightcoveEmbed.js +97 -0
  205. package/lib/Embed/BrightcoveEmbed.js.map +1 -0
  206. package/lib/Embed/CodeEmbed.js +62 -0
  207. package/lib/Embed/CodeEmbed.js.map +1 -0
  208. package/lib/Embed/ConceptEmbed.js +81 -0
  209. package/lib/Embed/ConceptEmbed.js.map +1 -0
  210. package/lib/Embed/ConceptInlineTriggerButton.js +41 -0
  211. package/lib/Embed/ConceptInlineTriggerButton.js.map +1 -0
  212. package/lib/Embed/ContentLinkEmbed.js +32 -0
  213. package/lib/Embed/ContentLinkEmbed.js.map +1 -0
  214. package/lib/Embed/CopyrightEmbed.js +24 -0
  215. package/lib/Embed/CopyrightEmbed.js.map +1 -0
  216. package/lib/Embed/EmbedErrorPlaceholder.js +44 -0
  217. package/lib/Embed/EmbedErrorPlaceholder.js.map +1 -0
  218. package/lib/Embed/EmbedWrapper.js +27 -0
  219. package/lib/Embed/EmbedWrapper.js.map +1 -0
  220. package/lib/Embed/ExternalEmbed.js +55 -0
  221. package/lib/Embed/ExternalEmbed.js.map +1 -0
  222. package/lib/Embed/FootnoteEmbed.js +28 -0
  223. package/lib/Embed/FootnoteEmbed.js.map +1 -0
  224. package/lib/Embed/GlossEmbed.js +53 -0
  225. package/lib/Embed/GlossEmbed.js.map +1 -0
  226. package/lib/Embed/H5pEmbed.js +39 -0
  227. package/lib/Embed/H5pEmbed.js.map +1 -0
  228. package/lib/Embed/IframeEmbed.js +70 -0
  229. package/lib/Embed/IframeEmbed.js.map +1 -0
  230. package/lib/Embed/ImageEmbed.js +183 -0
  231. package/lib/Embed/ImageEmbed.js.map +1 -0
  232. package/lib/Embed/InlineTriggerButton.js +26 -0
  233. package/lib/Embed/InlineTriggerButton.js.map +1 -0
  234. package/lib/Embed/RelatedContentEmbed.js +39 -0
  235. package/lib/Embed/RelatedContentEmbed.js.map +1 -0
  236. package/lib/Embed/UnknownEmbed.js +21 -0
  237. package/lib/Embed/UnknownEmbed.js.map +1 -0
  238. package/lib/Embed/UuDisclaimerEmbed.js +55 -0
  239. package/lib/Embed/UuDisclaimerEmbed.js.map +1 -0
  240. package/lib/ErrorMessage/ErrorMessage.js +55 -0
  241. package/lib/ErrorMessage/ErrorMessage.js.map +1 -0
  242. package/lib/ErrorMessage/index.js +8 -0
  243. package/lib/ErrorMessage/index.js.map +1 -0
  244. package/lib/FactBox/FactBox.js +122 -0
  245. package/lib/FactBox/FactBox.js.map +1 -0
  246. package/lib/FactBox/index.js +8 -0
  247. package/lib/FactBox/index.js.map +1 -0
  248. package/lib/FileList/File.js +78 -0
  249. package/lib/FileList/File.js.map +1 -0
  250. package/lib/FileList/FileList.js +35 -0
  251. package/lib/FileList/FileList.js.map +1 -0
  252. package/lib/FileList/PdfFile.js +29 -0
  253. package/lib/FileList/PdfFile.js.map +1 -0
  254. package/lib/Gloss/Gloss.js +143 -0
  255. package/lib/Gloss/Gloss.js.map +1 -0
  256. package/lib/Gloss/GlossExample.js +47 -0
  257. package/lib/Gloss/GlossExample.js.map +1 -0
  258. package/lib/Grid/Grid.js +67 -0
  259. package/lib/Grid/Grid.js.map +1 -0
  260. package/lib/Grid/GridParallaxItem.js +22 -0
  261. package/lib/Grid/GridParallaxItem.js.map +1 -0
  262. package/lib/KeyFigure/KeyFigure.js +47 -0
  263. package/lib/KeyFigure/KeyFigure.js.map +1 -0
  264. package/lib/LicenseByline/EmbedByline.js +134 -0
  265. package/lib/LicenseByline/EmbedByline.js.map +1 -0
  266. package/lib/LicenseByline/LicenseLink.js +32 -0
  267. package/lib/LicenseByline/LicenseLink.js.map +1 -0
  268. package/lib/LinkBlock/LinkBlock.js +75 -0
  269. package/lib/LinkBlock/LinkBlock.js.map +1 -0
  270. package/lib/LinkBlock/LinkBlockSection.js +24 -0
  271. package/lib/LinkBlock/LinkBlockSection.js.map +1 -0
  272. package/lib/Pitch/Pitch.js +63 -0
  273. package/lib/Pitch/Pitch.js.map +1 -0
  274. package/lib/RelatedArticleList/RelatedArticleList.js +99 -0
  275. package/lib/RelatedArticleList/RelatedArticleList.js.map +1 -0
  276. package/lib/RelatedArticleList/index.js +8 -0
  277. package/lib/RelatedArticleList/index.js.map +1 -0
  278. package/lib/ResourceBox/ResourceBox.js +75 -0
  279. package/lib/ResourceBox/ResourceBox.js.map +1 -0
  280. package/lib/TagSelector/TagSelector.js +108 -0
  281. package/lib/TagSelector/TagSelector.js.map +1 -0
  282. package/lib/ZendeskButton/ZendeskButton.js +42 -0
  283. package/lib/ZendeskButton/ZendeskButton.js.map +1 -0
  284. package/lib/_virtual/rolldown_runtime.js +42 -0
  285. package/lib/i18n/formatNestedMessages.js +18 -0
  286. package/lib/i18n/formatNestedMessages.js.map +1 -0
  287. package/lib/i18n/i18n.js +31 -0
  288. package/lib/i18n/i18n.js.map +1 -0
  289. package/lib/i18n/useComponentTranslations.js +163 -0
  290. package/lib/i18n/useComponentTranslations.js.map +1 -0
  291. package/lib/index.js +157 -0
  292. package/lib/locale/messages-en.js +439 -0
  293. package/lib/locale/messages-en.js.map +1 -0
  294. package/lib/locale/messages-nb.js +439 -0
  295. package/lib/locale/messages-nb.js.map +1 -0
  296. package/lib/locale/messages-nn.js +439 -0
  297. package/lib/locale/messages-nn.js.map +1 -0
  298. package/lib/locale/messages-se.js +439 -0
  299. package/lib/locale/messages-se.js.map +1 -0
  300. package/lib/model/ContentType.js +94 -0
  301. package/lib/model/ContentType.js.map +1 -0
  302. package/lib/model/SubjectCategories.js +30 -0
  303. package/lib/model/SubjectCategories.js.map +1 -0
  304. package/lib/model/SubjectTypes.js +28 -0
  305. package/lib/model/SubjectTypes.js.map +1 -0
  306. package/lib/model/WordClass.js +58 -0
  307. package/lib/model/WordClass.js.map +1 -0
  308. package/lib/model/index.js +19 -0
  309. package/lib/model/index.js.map +1 -0
  310. package/lib/utils/licenseAttributes.js +17 -0
  311. package/lib/utils/licenseAttributes.js.map +1 -0
  312. package/lib/utils/relativeUrl.js +26 -0
  313. package/lib/utils/relativeUrl.js.map +1 -0
  314. package/package.json +12 -11
@@ -0,0 +1,58 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
2
+
3
+ //#region src/model/WordClass.ts
4
+ var WordClass_exports = {};
5
+ require_rolldown_runtime.__export(WordClass_exports, { wordClass: () => wordClass });
6
+ /**
7
+ * Copyright (c) 2023-present, NDLA.
8
+ *
9
+ * This source code is licensed under the GPLv3 license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ *
12
+ */
13
+ const wordClass = {
14
+ adjective: "adjective",
15
+ adverb: "adverb",
16
+ properNoun: "proper-noun",
17
+ auxiliary: "auxiliary",
18
+ complement: "complement",
19
+ conjunction: "conjunction",
20
+ coverb: "coverb",
21
+ determiner: "determiner",
22
+ interjection: "interjection",
23
+ quantifier: "quantifier",
24
+ marker: "marker",
25
+ modalVerb: "modal-verb",
26
+ measureWord: "measure-word",
27
+ noun: "noun",
28
+ "noun-zh": "noun-zh",
29
+ nounPhrase: "noun-phrase",
30
+ onomatopoeia: "onomatopoeia",
31
+ particle: "particle",
32
+ demonstrative: "demonstrative",
33
+ personalPronoun: "personal-pronoun",
34
+ preposition: "preposition",
35
+ pronoun: "pronoun",
36
+ questionWord: "question-word",
37
+ locationWord: "location-word",
38
+ suffix: "suffix",
39
+ numeral: "numeral",
40
+ timeWord: "time word",
41
+ timeExpression: "time-expression",
42
+ stativeVerb: "stative-verb",
43
+ subordinatingConjunction: "subordinating-conjunction",
44
+ exclamationWord: "exclamation-word",
45
+ expression: "expression",
46
+ verb: "verb",
47
+ verbComplement: "verb-complement",
48
+ verbObject: "verb-object"
49
+ };
50
+
51
+ //#endregion
52
+ Object.defineProperty(exports, 'WordClass_exports', {
53
+ enumerable: true,
54
+ get: function () {
55
+ return WordClass_exports;
56
+ }
57
+ });
58
+ //# sourceMappingURL=WordClass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WordClass.js","names":[],"sources":["../../src/model/WordClass.ts"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nexport const wordClass = {\n adjective: \"adjective\",\n adverb: \"adverb\",\n properNoun: \"proper-noun\",\n auxiliary: \"auxiliary\",\n complement: \"complement\",\n conjunction: \"conjunction\",\n coverb: \"coverb\",\n determiner: \"determiner\",\n interjection: \"interjection\",\n quantifier: \"quantifier\",\n marker: \"marker\",\n modalVerb: \"modal-verb\",\n measureWord: \"measure-word\",\n noun: \"noun\",\n \"noun-zh\": \"noun-zh\",\n nounPhrase: \"noun-phrase\",\n onomatopoeia: \"onomatopoeia\",\n particle: \"particle\",\n demonstrative: \"demonstrative\",\n personalPronoun: \"personal-pronoun\",\n preposition: \"preposition\",\n pronoun: \"pronoun\",\n questionWord: \"question-word\",\n locationWord: \"location-word\",\n suffix: \"suffix\",\n numeral: \"numeral\",\n timeWord: \"time word\",\n timeExpression: \"time-expression\",\n stativeVerb: \"stative-verb\",\n subordinatingConjunction: \"subordinating-conjunction\",\n exclamationWord: \"exclamation-word\",\n expression: \"expression\",\n verb: \"verb\",\n verbComplement: \"verb-complement\",\n verbObject: \"verb-object\",\n};\n"],"mappings":";;;;;;;;;;;;AAQA,MAAa,YAAY;CACvB,WAAW;CACX,QAAQ;CACR,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,aAAa;CACb,QAAQ;CACR,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,QAAQ;CACR,WAAW;CACX,aAAa;CACb,MAAM;CACN,WAAW;CACX,YAAY;CACZ,cAAc;CACd,UAAU;CACV,eAAe;CACf,iBAAiB;CACjB,aAAa;CACb,SAAS;CACT,cAAc;CACd,cAAc;CACd,QAAQ;CACR,SAAS;CACT,UAAU;CACV,gBAAgB;CAChB,aAAa;CACb,0BAA0B;CAC1B,iBAAiB;CACjB,YAAY;CACZ,MAAM;CACN,gBAAgB;CAChB,YAAY;AACb"}
@@ -0,0 +1,19 @@
1
+ const require_ContentType = require('./ContentType.js');
2
+ const require_SubjectCategories = require('./SubjectCategories.js');
3
+ const require_SubjectTypes = require('./SubjectTypes.js');
4
+ const require_WordClass = require('./WordClass.js');
5
+
6
+ //#region src/model/index.ts
7
+ const model = {
8
+ contentTypes: require_ContentType.contentTypes,
9
+ subjectCategories: require_SubjectCategories.SubjectCategories_exports,
10
+ subjectTypes: require_SubjectTypes.SubjectTypes_exports,
11
+ contentTypeMapping: require_ContentType.contentTypeMapping,
12
+ resourceEmbedTypeMapping: require_ContentType.resourceEmbedTypeMapping,
13
+ wordClass: require_WordClass.WordClass_exports
14
+ };
15
+ var model_default = model;
16
+
17
+ //#endregion
18
+ exports.model_default = model_default;
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/model/index.ts"],"sourcesContent":["/**\n * Copyright (c) 2017-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { contentTypes, contentTypeMapping, resourceEmbedTypeMapping } from \"./ContentType\";\nimport * as subjectCategories from \"./SubjectCategories\";\nimport * as subjectTypes from \"./SubjectTypes\";\nimport * as wordClass from \"./WordClass\";\n\nconst model = {\n contentTypes,\n subjectCategories,\n subjectTypes,\n contentTypeMapping,\n resourceEmbedTypeMapping,\n wordClass,\n};\n\nexport default model;\n"],"mappings":";;;;;;AAaA,MAAM,QAAQ;CACZ;CACA;CACA;CACA;CACA;CACA;AACD;AAED,oBAAe"}
@@ -0,0 +1,17 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
2
+ const __ndla_licenses = require_rolldown_runtime.__toESM(require("@ndla/licenses"));
3
+
4
+ //#region src/utils/licenseAttributes.ts
5
+ const licenseAttributes = (license, lang, url) => {
6
+ const licenseAbbr = (0, __ndla_licenses.getLicenseByAbbreviation)(license ? license : "", lang);
7
+ const licenseProps = (0, __ndla_licenses.isCreativeCommonsLicense)(licenseAbbr.rights) ? {
8
+ "xmlns:cc": "https://creativecommons.org/ns#",
9
+ "xmlns:dct": "http://purl.org/dc/terms/",
10
+ about: url ?? void 0
11
+ } : {};
12
+ return licenseProps;
13
+ };
14
+
15
+ //#endregion
16
+ exports.licenseAttributes = licenseAttributes;
17
+ //# sourceMappingURL=licenseAttributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"licenseAttributes.js","names":["license: string | undefined","lang: string | undefined","url: string | undefined"],"sources":["../../src/utils/licenseAttributes.ts"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { getLicenseByAbbreviation, isCreativeCommonsLicense } from \"@ndla/licenses\";\n\nexport const licenseAttributes = (license: string | undefined, lang: string | undefined, url: string | undefined) => {\n const licenseAbbr = getLicenseByAbbreviation(license ? license : \"\", lang);\n\n const licenseProps = isCreativeCommonsLicense(licenseAbbr.rights)\n ? {\n \"xmlns:cc\": \"https://creativecommons.org/ns#\",\n \"xmlns:dct\": \"http://purl.org/dc/terms/\",\n about: url ?? undefined,\n }\n : {};\n\n return licenseProps;\n};\n"],"mappings":";;;;AAUA,MAAa,oBAAoB,CAACA,SAA6BC,MAA0BC,QAA4B;CACnH,MAAM,cAAc,8CAAyB,UAAU,UAAU,IAAI,KAAK;CAE1E,MAAM,eAAe,8CAAyB,YAAY,OAAO,GAC7D;EACE,YAAY;EACZ,aAAa;EACb,OAAO;CACR,IACD,CAAE;AAEN,QAAO;AACR"}
@@ -0,0 +1,26 @@
1
+ const require_i18n = require('../i18n/i18n.js');
2
+
3
+ //#region src/utils/relativeUrl.ts
4
+ const ENV_REGEX = /(staging|test)\.?/;
5
+ const LANGUAGE_REGEX = new RegExp(`^\\/((?:${require_i18n.supportedTranslationLanguages.join("|")})(?:$|\\/))`, "");
6
+ const NDLA_URL = /(.*\.)?ndla.no.*/;
7
+ const REPLACE_WWW = /^www\./;
8
+ const getPossiblyRelativeUrl = (url, path) => {
9
+ if (!path) return url;
10
+ if (url.startsWith("mailto:")) return url;
11
+ if (!NDLA_URL.test(url) || !NDLA_URL.test(path)) return url;
12
+ const urlObj = new URL(url.replace(ENV_REGEX, ""));
13
+ const pathObj = new URL(path.replace(ENV_REGEX, ""));
14
+ if (urlObj.hostname.replace(REPLACE_WWW, "") === pathObj.hostname.replace(REPLACE_WWW, "")) {
15
+ const search = urlObj.search;
16
+ const urlMatch = urlObj.pathname.match(LANGUAGE_REGEX);
17
+ const pathMatch = pathObj.pathname.match(LANGUAGE_REGEX);
18
+ if (urlMatch?.[1] && urlMatch?.[1] !== pathMatch?.[1]) return `${urlObj.pathname.replace(urlMatch[1], pathMatch?.[1] || "")}${search}`;
19
+ return `${urlObj.pathname}${search}`;
20
+ }
21
+ return url;
22
+ };
23
+
24
+ //#endregion
25
+ exports.getPossiblyRelativeUrl = getPossiblyRelativeUrl;
26
+ //# sourceMappingURL=relativeUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relativeUrl.js","names":["url: string","path?: string"],"sources":["../../src/utils/relativeUrl.ts"],"sourcesContent":["/**\n * Copyright (c) 2023-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { supportedTranslationLanguages } from \"../i18n/i18n\";\n\nconst ENV_REGEX = /(staging|test)\\.?/;\nconst LANGUAGE_REGEX = new RegExp(`^\\\\/((?:${supportedTranslationLanguages.join(\"|\")})(?:$|\\\\/))`, \"\");\n\nconst NDLA_URL = /(.*\\.)?ndla.no.*/;\nconst REPLACE_WWW = /^www\\./;\n\nexport const getPossiblyRelativeUrl = (url: string, path?: string) => {\n if (!path) return url;\n // If url is a mailto link, return url as is.\n if (url.startsWith(\"mailto:\")) return url;\n // If not on NDLA, or if url is not a NDLA url, return url as is\n if (!NDLA_URL.test(url) || !NDLA_URL.test(path)) return url;\n //Remove environment info\n const urlObj = new URL(url.replace(ENV_REGEX, \"\"));\n const pathObj = new URL(path.replace(ENV_REGEX, \"\"));\n // If the host is the same, return the relative path\n if (urlObj.hostname.replace(REPLACE_WWW, \"\") === pathObj.hostname.replace(REPLACE_WWW, \"\")) {\n // Replace the language part of the url with the language part of the path\n // Keep the search params if they exist\n const search = urlObj.search;\n // If the path language part does not exist, remove it.\n const urlMatch = urlObj.pathname.match(LANGUAGE_REGEX);\n const pathMatch = pathObj.pathname.match(LANGUAGE_REGEX);\n if (urlMatch?.[1] && urlMatch?.[1] !== pathMatch?.[1]) {\n return `${urlObj.pathname.replace(urlMatch[1], pathMatch?.[1] || \"\")}${search}`;\n }\n\n return `${urlObj.pathname}${search}`;\n }\n return url;\n};\n"],"mappings":";;;AAUA,MAAM,YAAY;AAClB,MAAM,iBAAiB,IAAI,QAAQ,UAAU,2CAA8B,KAAK,IAAI,CAAC,cAAc;AAEnG,MAAM,WAAW;AACjB,MAAM,cAAc;AAEpB,MAAa,yBAAyB,CAACA,KAAaC,SAAkB;AACpE,MAAK,KAAM,QAAO;AAElB,KAAI,IAAI,WAAW,UAAU,CAAE,QAAO;AAEtC,MAAK,SAAS,KAAK,IAAI,KAAK,SAAS,KAAK,KAAK,CAAE,QAAO;CAExD,MAAM,SAAS,IAAI,IAAI,IAAI,QAAQ,WAAW,GAAG;CACjD,MAAM,UAAU,IAAI,IAAI,KAAK,QAAQ,WAAW,GAAG;AAEnD,KAAI,OAAO,SAAS,QAAQ,aAAa,GAAG,KAAK,QAAQ,SAAS,QAAQ,aAAa,GAAG,EAAE;EAG1F,MAAM,SAAS,OAAO;EAEtB,MAAM,WAAW,OAAO,SAAS,MAAM,eAAe;EACtD,MAAM,YAAY,QAAQ,SAAS,MAAM,eAAe;AACxD,MAAI,WAAW,MAAM,WAAW,OAAO,YAAY,GACjD,SAAQ,EAAE,OAAO,SAAS,QAAQ,SAAS,IAAI,YAAY,MAAM,GAAG,CAAC,EAAE,OAAO;AAGhF,UAAQ,EAAE,OAAO,SAAS,EAAE,OAAO;CACpC;AACD,QAAO;AACR"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "56.0.122-alpha.0",
3
+ "version": "56.0.124-alpha.0",
4
4
  "description": "UI component library for NDLA",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -8,7 +8,8 @@
8
8
  "types": "lib/index.d.ts",
9
9
  "sideEffects": false,
10
10
  "scripts": {
11
- "build": "node ../../scripts/build.js package",
11
+ "build": "tsdown",
12
+ "dev": "tsdown --watch ./src",
12
13
  "build:types": "tsc -p tsconfig.build.json",
13
14
  "prepublish": "concurrently 'yarn build:types' 'yarn build:panda'",
14
15
  "build:panda": "mkdir -p dist && concurrently 'panda cssgen --minimal --outfile dist/styles.css' 'panda ship --outfile dist/panda.buildinfo.json'"
@@ -33,13 +34,13 @@
33
34
  ],
34
35
  "dependencies": {
35
36
  "@ark-ui/react": "^5.9.0",
36
- "@ndla/core": "^6.0.0-alpha.0",
37
- "@ndla/icons": "^8.0.58-alpha.0",
38
- "@ndla/licenses": "^9.0.1",
39
- "@ndla/primitives": "^1.0.88-alpha.0",
40
- "@ndla/safelink": "^7.0.90-alpha.0",
41
- "@ndla/styled-system": "^0.0.34",
42
- "@ndla/util": "^5.0.8-alpha.0",
37
+ "@ndla/core": "^6.0.1-alpha.0",
38
+ "@ndla/icons": "^8.0.59-alpha.0",
39
+ "@ndla/licenses": "^9.0.2",
40
+ "@ndla/primitives": "^1.0.90-alpha.0",
41
+ "@ndla/safelink": "^7.0.92-alpha.0",
42
+ "@ndla/styled-system": "^0.0.35",
43
+ "@ndla/util": "^5.0.9-alpha.0",
43
44
  "html-react-parser": "^5.1.19"
44
45
  },
45
46
  "peerDependencies": {
@@ -50,7 +51,7 @@
50
51
  "react-router-dom": ">= 6.0.0"
51
52
  },
52
53
  "devDependencies": {
53
- "@ndla/preset-panda": "^0.0.54",
54
+ "@ndla/preset-panda": "^0.0.55",
54
55
  "@ndla/types-backend": "^1.0.40",
55
56
  "@ndla/types-embed": "^5.0.14-alpha.0",
56
57
  "@pandacss/dev": "^0.53.6"
@@ -58,5 +59,5 @@
58
59
  "publishConfig": {
59
60
  "access": "public"
60
61
  },
61
- "gitHead": "52adafa4348c1c02ebc4da28317aa5270cbe2a80"
62
+ "gitHead": "70b2b4e3d374545b5245a63ea7644c3b9356c74f"
62
63
  }