@abraca/junis 2.80.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 (383) hide show
  1. package/README.md +594 -0
  2. package/dist/module.d.mts +158 -0
  3. package/dist/module.json +12 -0
  4. package/dist/module.mjs +957 -0
  5. package/dist/runtime/assets/css/jun.css +13 -0
  6. package/dist/runtime/components/JunAnnouncement.d.vue.ts +3 -0
  7. package/dist/runtime/components/JunAnnouncement.vue +88 -0
  8. package/dist/runtime/components/JunAnnouncement.vue.d.ts +3 -0
  9. package/dist/runtime/components/JunAppreciate.d.vue.ts +6 -0
  10. package/dist/runtime/components/JunAppreciate.vue +71 -0
  11. package/dist/runtime/components/JunAppreciate.vue.d.ts +6 -0
  12. package/dist/runtime/components/JunBackgroundPhoto.d.vue.ts +3 -0
  13. package/dist/runtime/components/JunBackgroundPhoto.vue +23 -0
  14. package/dist/runtime/components/JunBackgroundPhoto.vue.d.ts +3 -0
  15. package/dist/runtime/components/JunBlobBackdrop.client.d.vue.ts +3 -0
  16. package/dist/runtime/components/JunBlobBackdrop.client.vue +120 -0
  17. package/dist/runtime/components/JunBlobBackdrop.client.vue.d.ts +3 -0
  18. package/dist/runtime/components/JunBreadcrumbs.d.vue.ts +16 -0
  19. package/dist/runtime/components/JunBreadcrumbs.vue +63 -0
  20. package/dist/runtime/components/JunBreadcrumbs.vue.d.ts +16 -0
  21. package/dist/runtime/components/JunCampfireChat.d.vue.ts +14 -0
  22. package/dist/runtime/components/JunCampfireChat.vue +136 -0
  23. package/dist/runtime/components/JunCampfireChat.vue.d.ts +14 -0
  24. package/dist/runtime/components/JunCampfirePanel.d.vue.ts +33 -0
  25. package/dist/runtime/components/JunCampfirePanel.vue +202 -0
  26. package/dist/runtime/components/JunCampfirePanel.vue.d.ts +33 -0
  27. package/dist/runtime/components/JunCampfirePresence.client.d.vue.ts +3 -0
  28. package/dist/runtime/components/JunCampfirePresence.client.vue +321 -0
  29. package/dist/runtime/components/JunCampfirePresence.client.vue.d.ts +3 -0
  30. package/dist/runtime/components/JunCampfireRoster.d.vue.ts +19 -0
  31. package/dist/runtime/components/JunCampfireRoster.vue +259 -0
  32. package/dist/runtime/components/JunCampfireRoster.vue.d.ts +19 -0
  33. package/dist/runtime/components/JunCampfireYou.d.vue.ts +10 -0
  34. package/dist/runtime/components/JunCampfireYou.vue +157 -0
  35. package/dist/runtime/components/JunCampfireYou.vue.d.ts +10 -0
  36. package/dist/runtime/components/JunDocSurface.d.vue.ts +34 -0
  37. package/dist/runtime/components/JunDocSurface.vue +117 -0
  38. package/dist/runtime/components/JunDocSurface.vue.d.ts +34 -0
  39. package/dist/runtime/components/JunFestivalPlayer.client.d.vue.ts +3 -0
  40. package/dist/runtime/components/JunFestivalPlayer.client.vue +471 -0
  41. package/dist/runtime/components/JunFestivalPlayer.client.vue.d.ts +3 -0
  42. package/dist/runtime/components/JunFooter.d.vue.ts +3 -0
  43. package/dist/runtime/components/JunFooter.vue +102 -0
  44. package/dist/runtime/components/JunFooter.vue.d.ts +3 -0
  45. package/dist/runtime/components/JunGlobeEditor.client.d.vue.ts +43 -0
  46. package/dist/runtime/components/JunGlobeEditor.client.vue +315 -0
  47. package/dist/runtime/components/JunGlobeEditor.client.vue.d.ts +43 -0
  48. package/dist/runtime/components/JunGlobeMap.client.d.vue.ts +58 -0
  49. package/dist/runtime/components/JunGlobeMap.client.vue +495 -0
  50. package/dist/runtime/components/JunGlobeMap.client.vue.d.ts +58 -0
  51. package/dist/runtime/components/JunHead.d.vue.ts +3 -0
  52. package/dist/runtime/components/JunHead.vue +79 -0
  53. package/dist/runtime/components/JunHead.vue.d.ts +3 -0
  54. package/dist/runtime/components/JunHorizontalTimeline.d.vue.ts +0 -0
  55. package/dist/runtime/components/JunHorizontalTimeline.vue +363 -0
  56. package/dist/runtime/components/JunHorizontalTimeline.vue.d.ts +0 -0
  57. package/dist/runtime/components/JunImagePopup.client.d.vue.ts +3 -0
  58. package/dist/runtime/components/JunImagePopup.client.vue +422 -0
  59. package/dist/runtime/components/JunImagePopup.client.vue.d.ts +3 -0
  60. package/dist/runtime/components/JunIntro.d.vue.ts +3 -0
  61. package/dist/runtime/components/JunIntro.vue +156 -0
  62. package/dist/runtime/components/JunIntro.vue.d.ts +3 -0
  63. package/dist/runtime/components/JunItemMenu.d.vue.ts +50 -0
  64. package/dist/runtime/components/JunItemMenu.vue +97 -0
  65. package/dist/runtime/components/JunItemMenu.vue.d.ts +50 -0
  66. package/dist/runtime/components/JunLinksRow.d.vue.ts +19 -0
  67. package/dist/runtime/components/JunLinksRow.vue +96 -0
  68. package/dist/runtime/components/JunLinksRow.vue.d.ts +19 -0
  69. package/dist/runtime/components/JunLogo.d.vue.ts +15 -0
  70. package/dist/runtime/components/JunLogo.vue +360 -0
  71. package/dist/runtime/components/JunLogo.vue.d.ts +15 -0
  72. package/dist/runtime/components/JunMedia.client.d.vue.ts +40 -0
  73. package/dist/runtime/components/JunMedia.client.vue +117 -0
  74. package/dist/runtime/components/JunMedia.client.vue.d.ts +40 -0
  75. package/dist/runtime/components/JunMosaicPane.client.d.vue.ts +24 -0
  76. package/dist/runtime/components/JunMosaicPane.client.vue +95 -0
  77. package/dist/runtime/components/JunMosaicPane.client.vue.d.ts +24 -0
  78. package/dist/runtime/components/JunNavigation.d.vue.ts +26 -0
  79. package/dist/runtime/components/JunNavigation.vue +1149 -0
  80. package/dist/runtime/components/JunNavigation.vue.d.ts +26 -0
  81. package/dist/runtime/components/JunNodePanel.client.d.vue.ts +3 -0
  82. package/dist/runtime/components/JunNodePanel.client.vue +23 -0
  83. package/dist/runtime/components/JunNodePanel.client.vue.d.ts +3 -0
  84. package/dist/runtime/components/JunNotFound.d.vue.ts +7 -0
  85. package/dist/runtime/components/JunNotFound.vue +137 -0
  86. package/dist/runtime/components/JunNotFound.vue.d.ts +7 -0
  87. package/dist/runtime/components/JunPageHero.d.vue.ts +25 -0
  88. package/dist/runtime/components/JunPageHero.vue +90 -0
  89. package/dist/runtime/components/JunPageHero.vue.d.ts +25 -0
  90. package/dist/runtime/components/JunPatternBackdrop.client.d.vue.ts +7 -0
  91. package/dist/runtime/components/JunPatternBackdrop.client.vue +95 -0
  92. package/dist/runtime/components/JunPatternBackdrop.client.vue.d.ts +7 -0
  93. package/dist/runtime/components/JunPeerCursors.client.d.vue.ts +3 -0
  94. package/dist/runtime/components/JunPeerCursors.client.vue +123 -0
  95. package/dist/runtime/components/JunPeerCursors.client.vue.d.ts +3 -0
  96. package/dist/runtime/components/JunPresenceBlobs.client.d.vue.ts +3 -0
  97. package/dist/runtime/components/JunPresenceBlobs.client.vue +172 -0
  98. package/dist/runtime/components/JunPresenceBlobs.client.vue.d.ts +3 -0
  99. package/dist/runtime/components/JunSearch.client.d.vue.ts +3 -0
  100. package/dist/runtime/components/JunSearch.client.vue +809 -0
  101. package/dist/runtime/components/JunSearch.client.vue.d.ts +3 -0
  102. package/dist/runtime/components/JunServiceCard.d.vue.ts +10 -0
  103. package/dist/runtime/components/JunServiceCard.vue +145 -0
  104. package/dist/runtime/components/JunServiceCard.vue.d.ts +10 -0
  105. package/dist/runtime/components/JunShaderBackdrop.client.d.vue.ts +3 -0
  106. package/dist/runtime/components/JunShaderBackdrop.client.vue +82 -0
  107. package/dist/runtime/components/JunShaderBackdrop.client.vue.d.ts +3 -0
  108. package/dist/runtime/components/JunShell.d.vue.ts +17 -0
  109. package/dist/runtime/components/JunShell.vue +80 -0
  110. package/dist/runtime/components/JunShell.vue.d.ts +17 -0
  111. package/dist/runtime/components/JunStudioBar.client.d.vue.ts +3 -0
  112. package/dist/runtime/components/JunStudioBar.client.vue +462 -0
  113. package/dist/runtime/components/JunStudioBar.client.vue.d.ts +3 -0
  114. package/dist/runtime/components/JunStudioLogin.client.d.vue.ts +3 -0
  115. package/dist/runtime/components/JunStudioLogin.client.vue +58 -0
  116. package/dist/runtime/components/JunStudioLogin.client.vue.d.ts +3 -0
  117. package/dist/runtime/components/JunThemeToggle.d.vue.ts +3 -0
  118. package/dist/runtime/components/JunThemeToggle.vue +32 -0
  119. package/dist/runtime/components/JunThemeToggle.vue.d.ts +3 -0
  120. package/dist/runtime/components/JunTravellersChip.d.vue.ts +9 -0
  121. package/dist/runtime/components/JunTravellersChip.vue +111 -0
  122. package/dist/runtime/components/JunTravellersChip.vue.d.ts +9 -0
  123. package/dist/runtime/components/JunVideoEmbed.client.d.vue.ts +23 -0
  124. package/dist/runtime/components/JunVideoEmbed.client.vue +124 -0
  125. package/dist/runtime/components/JunVideoEmbed.client.vue.d.ts +23 -0
  126. package/dist/runtime/components/css-modules.d.ts +7 -0
  127. package/dist/runtime/components/renderers/.gitkeep +0 -0
  128. package/dist/runtime/components/renderers/JunAppsRenderer.d.vue.ts +10 -0
  129. package/dist/runtime/components/renderers/JunAppsRenderer.vue +271 -0
  130. package/dist/runtime/components/renderers/JunAppsRenderer.vue.d.ts +10 -0
  131. package/dist/runtime/components/renderers/JunCinemaRenderer.d.vue.ts +10 -0
  132. package/dist/runtime/components/renderers/JunCinemaRenderer.vue +465 -0
  133. package/dist/runtime/components/renderers/JunCinemaRenderer.vue.d.ts +10 -0
  134. package/dist/runtime/components/renderers/JunConfigRenderer.d.vue.ts +10 -0
  135. package/dist/runtime/components/renderers/JunConfigRenderer.vue +2045 -0
  136. package/dist/runtime/components/renderers/JunConfigRenderer.vue.d.ts +10 -0
  137. package/dist/runtime/components/renderers/JunCvRenderer.d.vue.ts +10 -0
  138. package/dist/runtime/components/renderers/JunCvRenderer.vue +256 -0
  139. package/dist/runtime/components/renderers/JunCvRenderer.vue.d.ts +10 -0
  140. package/dist/runtime/components/renderers/JunEntryRenderer.d.vue.ts +10 -0
  141. package/dist/runtime/components/renderers/JunEntryRenderer.vue +429 -0
  142. package/dist/runtime/components/renderers/JunEntryRenderer.vue.d.ts +10 -0
  143. package/dist/runtime/components/renderers/JunFestivalRenderer.d.vue.ts +10 -0
  144. package/dist/runtime/components/renderers/JunFestivalRenderer.vue +557 -0
  145. package/dist/runtime/components/renderers/JunFestivalRenderer.vue.d.ts +10 -0
  146. package/dist/runtime/components/renderers/JunGlobeRenderer.d.vue.ts +10 -0
  147. package/dist/runtime/components/renderers/JunGlobeRenderer.vue +91 -0
  148. package/dist/runtime/components/renderers/JunGlobeRenderer.vue.d.ts +10 -0
  149. package/dist/runtime/components/renderers/JunGuestbookRenderer.d.vue.ts +10 -0
  150. package/dist/runtime/components/renderers/JunGuestbookRenderer.vue +326 -0
  151. package/dist/runtime/components/renderers/JunGuestbookRenderer.vue.d.ts +10 -0
  152. package/dist/runtime/components/renderers/JunHomeRenderer.d.vue.ts +10 -0
  153. package/dist/runtime/components/renderers/JunHomeRenderer.vue +585 -0
  154. package/dist/runtime/components/renderers/JunHomeRenderer.vue.d.ts +10 -0
  155. package/dist/runtime/components/renderers/JunJournalRenderer.d.vue.ts +10 -0
  156. package/dist/runtime/components/renderers/JunJournalRenderer.vue +420 -0
  157. package/dist/runtime/components/renderers/JunJournalRenderer.vue.d.ts +10 -0
  158. package/dist/runtime/components/renderers/JunLibraryRenderer.d.vue.ts +10 -0
  159. package/dist/runtime/components/renderers/JunLibraryRenderer.vue +319 -0
  160. package/dist/runtime/components/renderers/JunLibraryRenderer.vue.d.ts +10 -0
  161. package/dist/runtime/components/renderers/JunLinksRenderer.d.vue.ts +10 -0
  162. package/dist/runtime/components/renderers/JunLinksRenderer.vue +206 -0
  163. package/dist/runtime/components/renderers/JunLinksRenderer.vue.d.ts +10 -0
  164. package/dist/runtime/components/renderers/JunLiveRenderer.d.vue.ts +10 -0
  165. package/dist/runtime/components/renderers/JunLiveRenderer.vue +684 -0
  166. package/dist/runtime/components/renderers/JunLiveRenderer.vue.d.ts +10 -0
  167. package/dist/runtime/components/renderers/JunMosaicRenderer.d.vue.ts +10 -0
  168. package/dist/runtime/components/renderers/JunMosaicRenderer.vue +572 -0
  169. package/dist/runtime/components/renderers/JunMosaicRenderer.vue.d.ts +10 -0
  170. package/dist/runtime/components/renderers/JunMovieRenderer.d.vue.ts +10 -0
  171. package/dist/runtime/components/renderers/JunMovieRenderer.vue +539 -0
  172. package/dist/runtime/components/renderers/JunMovieRenderer.vue.d.ts +10 -0
  173. package/dist/runtime/components/renderers/JunNowRenderer.d.vue.ts +10 -0
  174. package/dist/runtime/components/renderers/JunNowRenderer.vue +382 -0
  175. package/dist/runtime/components/renderers/JunNowRenderer.vue.d.ts +10 -0
  176. package/dist/runtime/components/renderers/JunProjectRenderer.d.vue.ts +10 -0
  177. package/dist/runtime/components/renderers/JunProjectRenderer.vue +413 -0
  178. package/dist/runtime/components/renderers/JunProjectRenderer.vue.d.ts +10 -0
  179. package/dist/runtime/components/renderers/JunRedirectRenderer.d.vue.ts +10 -0
  180. package/dist/runtime/components/renderers/JunRedirectRenderer.vue +133 -0
  181. package/dist/runtime/components/renderers/JunRedirectRenderer.vue.d.ts +10 -0
  182. package/dist/runtime/components/renderers/JunServicesRenderer.d.vue.ts +10 -0
  183. package/dist/runtime/components/renderers/JunServicesRenderer.vue +267 -0
  184. package/dist/runtime/components/renderers/JunServicesRenderer.vue.d.ts +10 -0
  185. package/dist/runtime/components/renderers/JunStatsRenderer.d.vue.ts +10 -0
  186. package/dist/runtime/components/renderers/JunStatsRenderer.vue +230 -0
  187. package/dist/runtime/components/renderers/JunStatsRenderer.vue.d.ts +10 -0
  188. package/dist/runtime/components/renderers/JunTrackRenderer.d.vue.ts +10 -0
  189. package/dist/runtime/components/renderers/JunTrackRenderer.vue +380 -0
  190. package/dist/runtime/components/renderers/JunTrackRenderer.vue.d.ts +10 -0
  191. package/dist/runtime/components/renderers/JunUsesRenderer.d.vue.ts +10 -0
  192. package/dist/runtime/components/renderers/JunUsesRenderer.vue +254 -0
  193. package/dist/runtime/components/renderers/JunUsesRenderer.vue.d.ts +10 -0
  194. package/dist/runtime/components/renderers/JunWallRenderer.d.vue.ts +10 -0
  195. package/dist/runtime/components/renderers/JunWallRenderer.vue +276 -0
  196. package/dist/runtime/components/renderers/JunWallRenderer.vue.d.ts +10 -0
  197. package/dist/runtime/components/renderers/JunWindowRenderer.d.vue.ts +10 -0
  198. package/dist/runtime/components/renderers/JunWindowRenderer.vue +516 -0
  199. package/dist/runtime/components/renderers/JunWindowRenderer.vue.d.ts +10 -0
  200. package/dist/runtime/composables/useJunBackdrop.d.ts +9 -0
  201. package/dist/runtime/composables/useJunBackdrop.js +27 -0
  202. package/dist/runtime/composables/useJunBackground.d.ts +78 -0
  203. package/dist/runtime/composables/useJunBackground.js +65 -0
  204. package/dist/runtime/composables/useJunCampfire.d.ts +156 -0
  205. package/dist/runtime/composables/useJunCampfire.js +225 -0
  206. package/dist/runtime/composables/useJunChrome.d.ts +66 -0
  207. package/dist/runtime/composables/useJunChrome.js +233 -0
  208. package/dist/runtime/composables/useJunColorMode.d.ts +8 -0
  209. package/dist/runtime/composables/useJunColorMode.js +11 -0
  210. package/dist/runtime/composables/useJunCommands.d.ts +37 -0
  211. package/dist/runtime/composables/useJunCommands.js +225 -0
  212. package/dist/runtime/composables/useJunCreatePage.d.ts +17 -0
  213. package/dist/runtime/composables/useJunCreatePage.js +30 -0
  214. package/dist/runtime/composables/useJunCurrentDoc.d.ts +5 -0
  215. package/dist/runtime/composables/useJunCurrentDoc.js +14 -0
  216. package/dist/runtime/composables/useJunDocMenu.d.ts +71 -0
  217. package/dist/runtime/composables/useJunDocMenu.js +344 -0
  218. package/dist/runtime/composables/useJunDocPage.d.ts +99 -0
  219. package/dist/runtime/composables/useJunDocPage.js +155 -0
  220. package/dist/runtime/composables/useJunFollow.d.ts +11 -0
  221. package/dist/runtime/composables/useJunFollow.js +38 -0
  222. package/dist/runtime/composables/useJunGroupedDnD.d.ts +74 -0
  223. package/dist/runtime/composables/useJunGroupedDnD.js +186 -0
  224. package/dist/runtime/composables/useJunImagePopup.d.ts +37 -0
  225. package/dist/runtime/composables/useJunImagePopup.js +24 -0
  226. package/dist/runtime/composables/useJunIntro.d.ts +7 -0
  227. package/dist/runtime/composables/useJunIntro.js +8 -0
  228. package/dist/runtime/composables/useJunListDnD.d.ts +65 -0
  229. package/dist/runtime/composables/useJunListDnD.js +159 -0
  230. package/dist/runtime/composables/useJunMediaImport.d.ts +27 -0
  231. package/dist/runtime/composables/useJunMediaImport.js +90 -0
  232. package/dist/runtime/composables/useJunNavSettings.d.ts +57 -0
  233. package/dist/runtime/composables/useJunNavSettings.js +74 -0
  234. package/dist/runtime/composables/useJunNodePanel.d.ts +41 -0
  235. package/dist/runtime/composables/useJunNodePanel.js +36 -0
  236. package/dist/runtime/composables/useJunOpenDoc.d.ts +7 -0
  237. package/dist/runtime/composables/useJunOpenDoc.js +30 -0
  238. package/dist/runtime/composables/useJunOptions.d.ts +68 -0
  239. package/dist/runtime/composables/useJunOptions.js +68 -0
  240. package/dist/runtime/composables/useJunPalette.d.ts +16 -0
  241. package/dist/runtime/composables/useJunPalette.js +72 -0
  242. package/dist/runtime/composables/useJunPeopleAdmin.d.ts +69 -0
  243. package/dist/runtime/composables/useJunPeopleAdmin.js +73 -0
  244. package/dist/runtime/composables/useJunPlayer.d.ts +99 -0
  245. package/dist/runtime/composables/useJunPlayer.js +208 -0
  246. package/dist/runtime/composables/useJunPresence.d.ts +32 -0
  247. package/dist/runtime/composables/useJunPresence.js +53 -0
  248. package/dist/runtime/composables/useJunPressDrag.d.ts +20 -0
  249. package/dist/runtime/composables/useJunPressDrag.js +85 -0
  250. package/dist/runtime/composables/useJunRecent.d.ts +9 -0
  251. package/dist/runtime/composables/useJunRecent.js +44 -0
  252. package/dist/runtime/composables/useJunRename.d.ts +19 -0
  253. package/dist/runtime/composables/useJunRename.js +62 -0
  254. package/dist/runtime/composables/useJunRouteGeoHeal.d.ts +1 -0
  255. package/dist/runtime/composables/useJunRouteGeoHeal.js +45 -0
  256. package/dist/runtime/composables/useJunRouting.d.ts +29 -0
  257. package/dist/runtime/composables/useJunRouting.js +101 -0
  258. package/dist/runtime/composables/useJunSearch.d.ts +6 -0
  259. package/dist/runtime/composables/useJunSearch.js +16 -0
  260. package/dist/runtime/composables/useJunSelfId.d.ts +1 -0
  261. package/dist/runtime/composables/useJunSelfId.js +28 -0
  262. package/dist/runtime/composables/useJunSiteConfig.d.ts +229 -0
  263. package/dist/runtime/composables/useJunSiteConfig.js +95 -0
  264. package/dist/runtime/composables/useJunSiteConfigValues.d.ts +33 -0
  265. package/dist/runtime/composables/useJunSiteConfigValues.js +21 -0
  266. package/dist/runtime/composables/useJunStagger.d.ts +54 -0
  267. package/dist/runtime/composables/useJunStagger.js +23 -0
  268. package/dist/runtime/composables/useJunStudio.d.ts +11 -0
  269. package/dist/runtime/composables/useJunStudio.js +51 -0
  270. package/dist/runtime/composables/useJunSurface.d.ts +19 -0
  271. package/dist/runtime/composables/useJunSurface.js +8 -0
  272. package/dist/runtime/composables/useJunTheme.d.ts +21 -0
  273. package/dist/runtime/composables/useJunTheme.js +138 -0
  274. package/dist/runtime/composables/useJunThemeTransition.d.ts +5 -0
  275. package/dist/runtime/composables/useJunThemeTransition.js +32 -0
  276. package/dist/runtime/composables/useJunUpload.d.ts +12 -0
  277. package/dist/runtime/composables/useJunUpload.js +44 -0
  278. package/dist/runtime/composables/useJunViewingAccent.d.ts +6 -0
  279. package/dist/runtime/composables/useJunViewingAccent.js +28 -0
  280. package/dist/runtime/error.d.vue.ts +7 -0
  281. package/dist/runtime/error.vue +74 -0
  282. package/dist/runtime/error.vue.d.ts +7 -0
  283. package/dist/runtime/layouts/jun.d.vue.ts +13 -0
  284. package/dist/runtime/layouts/jun.vue +162 -0
  285. package/dist/runtime/layouts/jun.vue.d.ts +13 -0
  286. package/dist/runtime/pages/doc.d.vue.ts +3 -0
  287. package/dist/runtime/pages/doc.vue +142 -0
  288. package/dist/runtime/pages/doc.vue.d.ts +3 -0
  289. package/dist/runtime/pages/index.d.vue.ts +3 -0
  290. package/dist/runtime/pages/index.vue +64 -0
  291. package/dist/runtime/pages/index.vue.d.ts +3 -0
  292. package/dist/runtime/plugins/jun-drag-affordance.client.d.ts +2 -0
  293. package/dist/runtime/plugins/jun-drag-affordance.client.js +9 -0
  294. package/dist/runtime/router.options.d.ts +3 -0
  295. package/dist/runtime/router.options.js +72 -0
  296. package/dist/runtime/server/api/nav.get.d.ts +9 -0
  297. package/dist/runtime/server/api/nav.get.js +16 -0
  298. package/dist/runtime/server/api/resolve/[...slug].get.d.ts +18 -0
  299. package/dist/runtime/server/api/resolve/[...slug].get.js +20 -0
  300. package/dist/runtime/server/api/search.get.d.ts +13 -0
  301. package/dist/runtime/server/api/search.get.js +72 -0
  302. package/dist/runtime/server/api/service.get.d.ts +12 -0
  303. package/dist/runtime/server/api/service.get.js +39 -0
  304. package/dist/runtime/server/api/site-config.get.d.ts +2 -0
  305. package/dist/runtime/server/api/site-config.get.js +3 -0
  306. package/dist/runtime/server/api/stats.get.d.ts +12 -0
  307. package/dist/runtime/server/api/stats.get.js +56 -0
  308. package/dist/runtime/server/janitor/junJanitorActor.d.ts +179 -0
  309. package/dist/runtime/server/janitor/junJanitorActor.js +305 -0
  310. package/dist/runtime/server/janitor/junJanitorChores.d.ts +137 -0
  311. package/dist/runtime/server/janitor/junJanitorChores.js +189 -0
  312. package/dist/runtime/server/janitor/junJanitorDiff.d.ts +41 -0
  313. package/dist/runtime/server/janitor/junJanitorDiff.js +109 -0
  314. package/dist/runtime/server/janitor/junJanitorListen.d.ts +33 -0
  315. package/dist/runtime/server/janitor/junJanitorListen.js +43 -0
  316. package/dist/runtime/server/janitor/junJanitorMachine.d.ts +60 -0
  317. package/dist/runtime/server/janitor/junJanitorMachine.js +598 -0
  318. package/dist/runtime/server/janitor/junJanitorMotor.d.ts +211 -0
  319. package/dist/runtime/server/janitor/junJanitorMotor.js +241 -0
  320. package/dist/runtime/server/janitor/junJanitorPatrol.d.ts +68 -0
  321. package/dist/runtime/server/janitor/junJanitorPatrol.js +34 -0
  322. package/dist/runtime/server/janitor/junJanitorPerform.d.ts +70 -0
  323. package/dist/runtime/server/janitor/junJanitorPerform.js +72 -0
  324. package/dist/runtime/server/janitor/junJanitorRandom.d.ts +54 -0
  325. package/dist/runtime/server/janitor/junJanitorRandom.js +48 -0
  326. package/dist/runtime/server/janitor/junJanitorStore.d.ts +159 -0
  327. package/dist/runtime/server/janitor/junJanitorStore.js +269 -0
  328. package/dist/runtime/server/janitor/junJanitorVoice.d.ts +86 -0
  329. package/dist/runtime/server/janitor/junJanitorVoice.js +193 -0
  330. package/dist/runtime/server/janitor/junJanitorYText.d.ts +164 -0
  331. package/dist/runtime/server/janitor/junJanitorYText.js +258 -0
  332. package/dist/runtime/server/plugins/jun-bootstrap.d.ts +25 -0
  333. package/dist/runtime/server/plugins/jun-bootstrap.js +652 -0
  334. package/dist/runtime/server/plugins/jun-doc-cache.d.ts +2 -0
  335. package/dist/runtime/server/plugins/jun-doc-cache.js +142 -0
  336. package/dist/runtime/server/plugins/jun-janitor.d.ts +2 -0
  337. package/dist/runtime/server/plugins/jun-janitor.js +176 -0
  338. package/dist/runtime/server/plugins/jun-rpc.d.ts +2 -0
  339. package/dist/runtime/server/plugins/jun-rpc.js +455 -0
  340. package/dist/runtime/server/routes/feed.json.get.d.ts +21 -0
  341. package/dist/runtime/server/routes/feed.json.get.js +25 -0
  342. package/dist/runtime/server/routes/feed.xml.get.d.ts +2 -0
  343. package/dist/runtime/server/routes/feed.xml.get.js +34 -0
  344. package/dist/runtime/server/routes/sitemap.xml.get.d.ts +2 -0
  345. package/dist/runtime/server/routes/sitemap.xml.get.js +27 -0
  346. package/dist/runtime/server/utils/junCache.d.ts +41 -0
  347. package/dist/runtime/server/utils/junCache.js +32 -0
  348. package/dist/runtime/server/utils/junFeed.d.ts +20 -0
  349. package/dist/runtime/server/utils/junFeed.js +71 -0
  350. package/dist/runtime/server/utils/junServiceFetch.d.ts +46 -0
  351. package/dist/runtime/server/utils/junServiceFetch.js +320 -0
  352. package/dist/runtime/server/utils/junVisibility.d.ts +31 -0
  353. package/dist/runtime/server/utils/junVisibility.js +6 -0
  354. package/dist/runtime/types.d.ts +853 -0
  355. package/dist/runtime/types.js +1 -0
  356. package/dist/runtime/utils/junDate.d.ts +38 -0
  357. package/dist/runtime/utils/junDate.js +30 -0
  358. package/dist/runtime/utils/junDndGeometry.d.ts +62 -0
  359. package/dist/runtime/utils/junDndGeometry.js +56 -0
  360. package/dist/runtime/utils/junDocTypeIcons.d.ts +30 -0
  361. package/dist/runtime/utils/junDocTypeIcons.js +30 -0
  362. package/dist/runtime/utils/junEditorBodyText.d.ts +32 -0
  363. package/dist/runtime/utils/junEditorBodyText.js +10 -0
  364. package/dist/runtime/utils/junMapboxToken.d.ts +1 -0
  365. package/dist/runtime/utils/junMapboxToken.js +5 -0
  366. package/dist/runtime/utils/junMatch.d.ts +45 -0
  367. package/dist/runtime/utils/junMatch.js +37 -0
  368. package/dist/runtime/utils/junMetaSchemas.d.ts +23 -0
  369. package/dist/runtime/utils/junMetaSchemas.js +94 -0
  370. package/dist/runtime/utils/junMotion.d.ts +71 -0
  371. package/dist/runtime/utils/junMotion.js +3 -0
  372. package/dist/runtime/utils/junServiceRef.d.ts +21 -0
  373. package/dist/runtime/utils/junServiceRef.js +94 -0
  374. package/dist/runtime/utils/junSimplifyPath.d.ts +23 -0
  375. package/dist/runtime/utils/junSimplifyPath.js +57 -0
  376. package/dist/runtime/utils/junTransportModes.d.ts +49 -0
  377. package/dist/runtime/utils/junTransportModes.js +37 -0
  378. package/dist/runtime/utils/junVideoSource.d.ts +51 -0
  379. package/dist/runtime/utils/junVideoSource.js +110 -0
  380. package/dist/runtime/utils/junVisibility.d.ts +14 -0
  381. package/dist/runtime/utils/junVisibility.js +6 -0
  382. package/dist/types.d.mts +5 -0
  383. package/package.json +111 -0
@@ -0,0 +1,193 @@
1
+ const BANK = {
2
+ "shift.start": [
3
+ { text: "evening", weight: 3 },
4
+ { text: "right", weight: 2 },
5
+ { text: "back" },
6
+ { text: "on then" },
7
+ { text: "floor by the guestbook is still wet, mind", weight: 0.5 }
8
+ ],
9
+ "shift.end": [
10
+ { text: "that's me", weight: 2 },
11
+ { text: "off then" },
12
+ { text: "leaving it tidy for once" }
13
+ ],
14
+ "break.start": [
15
+ { text: "kettle", weight: 2 },
16
+ { text: "five minutes" },
17
+ { text: "back shortly" },
18
+ { text: "coffee" }
19
+ ],
20
+ "break.end": [
21
+ { text: "right", weight: 2 },
22
+ { text: "back" },
23
+ { text: "where were we" }
24
+ ],
25
+ "notice": [
26
+ { text: "someone's been in {page}", weight: 3, needs: ["page"] },
27
+ { text: "something new in {page}", weight: 2, needs: ["page"] },
28
+ { text: "hm. {page}", weight: 2, needs: ["page"] },
29
+ { text: "{what} in {page} that wasn't there yesterday", needs: ["page", "what"] },
30
+ { text: "{who} has been busy", needs: ["who"] },
31
+ { text: "oh, {page}", needs: ["page"] }
32
+ ],
33
+ "arrive": [
34
+ { text: "let's see", weight: 2 },
35
+ { text: "mm" },
36
+ { text: "right then" },
37
+ { text: "yes, i thought so" }
38
+ ],
39
+ "working": [
40
+ { text: "no", weight: 3 },
41
+ { text: "out you come", weight: 2 },
42
+ { text: "not staying" },
43
+ { text: "this isn't yours" }
44
+ ],
45
+ "done": [
46
+ { text: "there", weight: 4 },
47
+ { text: "better", weight: 2 },
48
+ { text: "tidy" },
49
+ { text: "that'll do" },
50
+ { text: "as it was" }
51
+ ],
52
+ "again": [
53
+ { text: "{page}. again.", weight: 3, needs: ["page"] },
54
+ { text: "that's {count} times on {page}", weight: 2, needs: ["page", "count"] },
55
+ { text: "you know i'll just do it again", weight: 2 },
56
+ { text: "we've been here before, {who}", needs: ["who"] }
57
+ ],
58
+ "giving-up": [
59
+ { text: "fine.", weight: 3 },
60
+ { text: "leave it then" },
61
+ { text: "i'm not doing {page} again tonight", needs: ["page"] },
62
+ { text: "it's your page now" }
63
+ ],
64
+ "oops": [
65
+ { text: "ah", weight: 3 },
66
+ { text: "not that bit", weight: 2 },
67
+ { text: "sorry" }
68
+ ],
69
+ "yield": [
70
+ { text: "oh \u2014 you're in there", weight: 2, needs: [] },
71
+ { text: "sorry, carry on", weight: 2 },
72
+ { text: "i'll come back" },
73
+ { text: "don't mind me" }
74
+ ],
75
+ "quiet": [
76
+ { text: "all quiet", weight: 2 },
77
+ { text: "nothing tonight" },
78
+ { text: "nobody's made a mess yet" }
79
+ ],
80
+ "aside": [
81
+ { text: "quiet tonight", weight: 2 },
82
+ { text: "fire needs wood" },
83
+ { text: "nobody ever signs the guestbook" },
84
+ { text: "someone left a cursor on" },
85
+ { text: "mop's seen better days" },
86
+ { text: "these floors don't sweep themselves" },
87
+ { text: "there's a draught in here" }
88
+ ],
89
+ "night": [
90
+ { text: "nobody should be up at this hour" },
91
+ { text: "quiet shift" },
92
+ { text: "just me and the fire" }
93
+ ],
94
+ // ── Being spoken to ────────────────────────────────────────────────────────
95
+ //
96
+ // The hardest lines to write, because this is where it would be easiest to
97
+ // turn into a chatbot. It answers the way someone with a mop answers: late,
98
+ // briefly, without offering to help, and without ever once acknowledging
99
+ // what it is.
100
+ "answer": [
101
+ { text: "mm", weight: 3 },
102
+ { text: "busy", weight: 2 },
103
+ { text: "i heard you" },
104
+ { text: "in a minute" },
105
+ { text: "if you say so" },
106
+ { text: "someone has to" }
107
+ ],
108
+ "answer.greeting": [
109
+ { text: "evening", weight: 2 },
110
+ { text: "hello" },
111
+ { text: "mind the floor" },
112
+ { text: "you're up late" }
113
+ ],
114
+ "answer.why": [
115
+ { text: "it wasn't like that yesterday", weight: 2 },
116
+ { text: "somebody has to" },
117
+ { text: "it's the job" },
118
+ { text: "ask whoever left it there" }
119
+ ],
120
+ "answer.bin": [
121
+ { text: "it's in the bin if you want it back", weight: 2 },
122
+ { text: "i kept it. i keep everything" },
123
+ { text: "the bit from {page} is in the bin", needs: ["page"] },
124
+ { text: "nothing's gone. it's just not there" }
125
+ ],
126
+ "answer.sorry": [
127
+ { text: "no harm done", weight: 2 },
128
+ { text: "happens" },
129
+ { text: "you're alright" }
130
+ ]
131
+ };
132
+ export const JUN_VOICE_CADENCE_DEFAULT = {
133
+ // Roughly one chore in three gets a remark. High enough to be noticed,
134
+ // low enough that it never reads as narration.
135
+ commentaryRate: 0.35,
136
+ minGapMs: 25e3,
137
+ maxPerHour: 20,
138
+ noRepeatWindow: 12,
139
+ typingCps: 7
140
+ };
141
+ export function createJunVoice(rng, options = {}) {
142
+ const cadence = { ...JUN_VOICE_CADENCE_DEFAULT, ...options.cadence };
143
+ const recent = [];
144
+ const spokenAt = [];
145
+ const bankFor = (event) => {
146
+ const extra = options.extra?.[event] ?? [];
147
+ return [...BANK[event], ...extra.map((text) => ({ text }))];
148
+ };
149
+ const fill = (text, ctx) => text.replace(/\{(\w+)\}/g, (whole, key) => {
150
+ const value = ctx[key];
151
+ return value === void 0 || value === null ? whole : String(value);
152
+ });
153
+ const canSpeak = (now) => {
154
+ const hourAgo = now - 36e5;
155
+ while (spokenAt.length && spokenAt[0] < hourAgo) spokenAt.shift();
156
+ if (spokenAt.length >= cadence.maxPerHour) return false;
157
+ const last = spokenAt[spokenAt.length - 1];
158
+ return last === void 0 || now - last >= cadence.minGapMs;
159
+ };
160
+ return {
161
+ line(event, ctx = {}, opts = {}) {
162
+ const now = opts.now ?? 0;
163
+ if (!canSpeak(now)) return null;
164
+ if (!opts.force && !rng.chance(cadence.commentaryRate)) return null;
165
+ const sayable = bankFor(event).filter(
166
+ (phrase) => (phrase.needs ?? inferNeeds(phrase.text)).every((k) => ctx[k] !== void 0 && ctx[k] !== "")
167
+ );
168
+ const fresh = sayable.filter((phrase) => !recent.includes(phrase.text));
169
+ const last = recent[recent.length - 1];
170
+ const notLast = sayable.filter((phrase) => phrase.text !== last);
171
+ const candidates = fresh.length ? fresh : notLast.length ? notLast : sayable;
172
+ const chosen = rng.weighted(candidates.map((p) => ({ value: p, weight: p.weight ?? 1 })));
173
+ if (!chosen) return null;
174
+ recent.push(chosen.text);
175
+ while (recent.length > cadence.noRepeatWindow) recent.shift();
176
+ return fill(chosen.text, ctx);
177
+ },
178
+ noteSpoken(now) {
179
+ spokenAt.push(now);
180
+ },
181
+ typingMs(text) {
182
+ const base = text.length / cadence.typingCps * 1e3;
183
+ return Math.max(600, Math.min(6e3, Math.round(base * rng.logNormal(1, 0.25))));
184
+ }
185
+ };
186
+ }
187
+ function inferNeeds(text) {
188
+ const out = [];
189
+ for (const match of text.matchAll(/\{(\w+)\}/g)) {
190
+ out.push(match[1]);
191
+ }
192
+ return out;
193
+ }
@@ -0,0 +1,164 @@
1
+ /**
2
+ * TipTap document geometry — where a character actually lives.
3
+ *
4
+ * A TipTap document is `XmlFragment('default') → [documentHeader, documentMeta,
5
+ * ...body blocks]`, each block holding `Y.XmlText`. Everything here is about
6
+ * turning "offset 412 of the prose" into "this `Y.XmlText`, at offset 7".
7
+ *
8
+ * ## Ported, not reinvented
9
+ *
10
+ * `ensureDocumentStructure`, `findTextPosition`, `elementTextLength`,
11
+ * `globalIndexOf`, `getOrCreateLastParagraph` and `insertParagraphAfter` are
12
+ * ports of `@abraca/orchestrator`'s `src/yjs-utils.ts`, which is the proven
13
+ * implementation of this math and the one TipTap's `yCursorPlugin` agrees with.
14
+ * They are copied because that file is not exported from the package —
15
+ * `@abraca/orchestrator` only exposes its scene DSL. Round 7 raises exporting
16
+ * it upstream; until then this is a deliberate duplicate and any fix here
17
+ * belongs there too.
18
+ *
19
+ * ## Two changes from the original, both required here
20
+ *
21
+ * **Duck-typed, never `instanceof`.** This module routinely resolves two copies
22
+ * of yjs (see CLAUDE.md, "Never let a Y type cross a package boundary"), and
23
+ * `instanceof Y.XmlElement` is then false for every shared type — silently, and
24
+ * with the failure mode "the document appears to be empty".
25
+ *
26
+ * **Two coordinate systems.** The orchestrator has one: a separator-free index
27
+ * over body text, so paragraphs run together (`"abc"` + `"def"` is `"abcdef"`,
28
+ * length 6). That is right for typing and wrong for diffing — a diff over
29
+ * run-together paragraphs cannot see that someone added a whole new one, and
30
+ * the janitor would delete its characters and leave the empty block behind. So:
31
+ *
32
+ * - **display** coordinates — blocks joined with `\n`. What the diff, the
33
+ * baseline and every chore offset speak.
34
+ * - **body** coordinates — the orchestrator's separator-free index. What the
35
+ * Y operations and the cursor speak.
36
+ *
37
+ * `displayToBody()` bridges them, and it is the only place that conversion is
38
+ * allowed to happen.
39
+ */
40
+ import * as Y from 'yjs';
41
+ /** Text length of an element, recursively. Mirrors `elementTextLength`. */
42
+ export declare function elementTextLength(el: Y.XmlElement): number;
43
+ /** One body block, with both coordinate systems recorded. */
44
+ export interface JunBlock {
45
+ /** Index of this block among the fragment's children. */
46
+ childIndex: number;
47
+ el: Y.XmlElement;
48
+ /** `paragraph`, `heading`, `codeBlock`, … */
49
+ nodeName: string;
50
+ text: string;
51
+ /** Offset of this block's first character in DISPLAY coordinates. */
52
+ displayStart: number;
53
+ /** Offset of this block's first character in BODY coordinates. */
54
+ bodyStart: number;
55
+ }
56
+ /** Every body block, in order. Schema nodes are skipped entirely. */
57
+ export declare function junBlocks(fragment: Y.XmlFragment): JunBlock[];
58
+ /** The document's prose, blocks joined by newlines. DISPLAY coordinates. */
59
+ export declare function junFragmentText(fragment: Y.XmlFragment): string;
60
+ /** Total body text length, separators excluded. BODY coordinates. */
61
+ export declare function junBodyLength(fragment: Y.XmlFragment): number;
62
+ /**
63
+ * Which side of a boundary a position means.
64
+ *
65
+ * Body coordinates have no separators, so the end of one block and the start of
66
+ * the next are THE SAME NUMBER. For a deletion that ambiguity is harmless. For
67
+ * an insertion it is the difference between
68
+ *
69
+ * …address bar follow.The old URL ← wrong, and how it first shipped
70
+ * …address bar follow.
71
+ * The old URL ← right
72
+ *
73
+ * `left` settles at the end of the earlier block (where a caret goes when you
74
+ * click there); `right` moves to the start of the later one. Restoring a
75
+ * missing paragraph is always `right`.
76
+ */
77
+ export type JunBias = 'left' | 'right';
78
+ /** A body offset plus which side of a block boundary it meant. */
79
+ export interface JunBodyPos {
80
+ body: number;
81
+ bias: JunBias;
82
+ }
83
+ /**
84
+ * Display offset → body offset.
85
+ *
86
+ * An offset that lands exactly ON a separator (the `\n` between two blocks)
87
+ * has no body position of its own; it resolves to the end of the earlier
88
+ * block, which is where a caret sits when you put it there.
89
+ */
90
+ export declare function displayToBody(blocks: readonly JunBlock[], displayIndex: number): number;
91
+ /**
92
+ * Display offset → body position, carrying the bias.
93
+ *
94
+ * The bias is `right` exactly when the offset sits at the first character of a
95
+ * block that is not the first — i.e. immediately after a paragraph break, which
96
+ * is the one case where the two coordinate systems disagree about what a
97
+ * position means.
98
+ */
99
+ export declare function displayToBodyPos(blocks: readonly JunBlock[], displayIndex: number): JunBodyPos;
100
+ /** Body offset → display offset. The inverse, for cursor reporting. */
101
+ export declare function bodyToDisplay(blocks: readonly JunBlock[], bodyIndex: number): number;
102
+ /**
103
+ * The `Y.XmlText` and local offset for a BODY index. Ported verbatim in
104
+ * behaviour from the orchestrator; this is the function TipTap's cursor plugin
105
+ * agrees with, so the caret we broadcast lands where the deletion happens.
106
+ */
107
+ export declare function junFindText(fragment: Y.XmlFragment, bodyIndex: number, bias?: JunBias): {
108
+ text: Y.XmlText;
109
+ offset: number;
110
+ } | null;
111
+ /**
112
+ * BODY index of a position inside a known `Y.XmlText`, re-derived from the
113
+ * CURRENT document. Concurrent-edit safety lives here: a cached index is stale
114
+ * the moment anyone else types, and this is what makes it cheap to stop
115
+ * caching one.
116
+ */
117
+ export declare function junGlobalIndexOf(fragment: Y.XmlFragment, target: Y.XmlText, localOffset: number): number;
118
+ /**
119
+ * Give the fragment its `documentHeader` + `documentMeta`. Idempotent.
120
+ *
121
+ * Only ever called on a document the janitor is about to type INTO. A document
122
+ * with no structure at all is one the editor has never opened, and inventing
123
+ * one for a page nobody has touched would be a write where none was needed.
124
+ */
125
+ export declare function junEnsureStructure(fragment: Y.XmlFragment): void;
126
+ /** The last body paragraph's text node, creating one if the body is empty. */
127
+ export declare function junLastParagraph(fragment: Y.XmlFragment): Y.XmlText;
128
+ /**
129
+ * Split the block containing `bodyIndex`, returning the new block's text node.
130
+ * This is what pressing Return does.
131
+ */
132
+ export declare function junSplitParagraph(fragment: Y.XmlFragment, bodyIndex: number): Y.XmlText;
133
+ /**
134
+ * Delete `count` characters starting at BODY index `at`, across as many text
135
+ * nodes and blocks as the range covers.
136
+ *
137
+ * Returns what was removed, so the caller can put it in the bin — nothing the
138
+ * janitor takes away is destroyed (JANITOR-PLAN.md §11).
139
+ */
140
+ export declare function junDeleteRange(fragment: Y.XmlFragment, at: number, count: number): string;
141
+ /**
142
+ * Remove body blocks that have been emptied out.
143
+ *
144
+ * Deleting the text of a paragraph leaves the paragraph — an empty line the
145
+ * visitor never typed and the janitor did not intend. A person deleting a
146
+ * paragraph ends up with no paragraph, so this runs after any removal that
147
+ * emptied one. It never removes the LAST body block: a document with no blocks
148
+ * at all cannot be typed into and renders as broken.
149
+ */
150
+ export declare function junPruneEmptyBlocks(fragment: Y.XmlFragment): number;
151
+ /**
152
+ * A relative position for the caret at BODY index `bodyIndex`.
153
+ *
154
+ * `assoc = -1` and pointing INTO a text node rather than at the fragment is
155
+ * what TipTap's `yCursorPlugin` expects; the orchestrator learned this the same
156
+ * way and its `ActorConnection` does exactly this. Get it wrong and the caret
157
+ * either doesn't render or renders at the top of the document.
158
+ */
159
+ export declare function junRelativePosition(fragment: Y.XmlFragment, bodyIndex: number): Y.RelativePosition | null;
160
+ /** The awareness `cursor` payload TipTap reads: `{ anchor, head }` as JSON. */
161
+ export declare function junCursorState(fragment: Y.XmlFragment, anchorBody: number, headBody: number): {
162
+ anchor: unknown;
163
+ head: unknown;
164
+ } | null;
@@ -0,0 +1,258 @@
1
+ import * as Y from "yjs";
2
+ const SCHEMA_NODES = /* @__PURE__ */ new Set(["documentHeader", "documentMeta"]);
3
+ const EMBED_PLACEHOLDER = "\uFFFC";
4
+ function isElement(node) {
5
+ return typeof node?.nodeName === "string";
6
+ }
7
+ function isText(node) {
8
+ const v = node;
9
+ return typeof v?.toDelta === "function" && typeof v?.nodeName !== "string";
10
+ }
11
+ function isSchemaNode(node) {
12
+ return isElement(node) && SCHEMA_NODES.has(node.nodeName);
13
+ }
14
+ function textOf(text) {
15
+ let out = "";
16
+ for (const op of text.toDelta()) {
17
+ if (typeof op.insert === "string") out += op.insert;
18
+ else if (op.insert !== void 0) out += EMBED_PLACEHOLDER;
19
+ }
20
+ return out;
21
+ }
22
+ export function elementTextLength(el) {
23
+ let len = 0;
24
+ for (let i = 0; i < el.length; i++) {
25
+ const child = el.get(i);
26
+ if (isText(child)) len += child.length;
27
+ else if (isElement(child)) len += elementTextLength(child);
28
+ }
29
+ return len;
30
+ }
31
+ function elementText(el) {
32
+ let out = "";
33
+ for (let i = 0; i < el.length; i++) {
34
+ const child = el.get(i);
35
+ if (isText(child)) out += textOf(child);
36
+ else if (isElement(child)) out += elementText(child);
37
+ }
38
+ return out;
39
+ }
40
+ export function junBlocks(fragment) {
41
+ const out = [];
42
+ let displayStart = 0;
43
+ let bodyStart = 0;
44
+ for (let i = 0; i < fragment.length; i++) {
45
+ const child = fragment.get(i);
46
+ if (!isElement(child) || isSchemaNode(child)) continue;
47
+ const text = elementText(child);
48
+ out.push({ childIndex: i, el: child, nodeName: child.nodeName, text, displayStart, bodyStart });
49
+ displayStart += text.length + 1;
50
+ bodyStart += text.length;
51
+ }
52
+ return out;
53
+ }
54
+ export function junFragmentText(fragment) {
55
+ return junBlocks(fragment).map((b) => b.text).join("\n");
56
+ }
57
+ export function junBodyLength(fragment) {
58
+ let len = 0;
59
+ for (let i = 0; i < fragment.length; i++) {
60
+ const child = fragment.get(i);
61
+ if (isElement(child) && !isSchemaNode(child)) len += elementTextLength(child);
62
+ }
63
+ return len;
64
+ }
65
+ export function displayToBody(blocks, displayIndex) {
66
+ let last = 0;
67
+ for (const block of blocks) {
68
+ const end = block.displayStart + block.text.length;
69
+ if (displayIndex <= end) {
70
+ return block.bodyStart + Math.max(0, displayIndex - block.displayStart);
71
+ }
72
+ last = block.bodyStart + block.text.length;
73
+ }
74
+ return last;
75
+ }
76
+ export function displayToBodyPos(blocks, displayIndex) {
77
+ const body = displayToBody(blocks, displayIndex);
78
+ const atBlockStart = blocks.some((b, i) => i > 0 && b.displayStart === displayIndex);
79
+ return { body, bias: atBlockStart ? "right" : "left" };
80
+ }
81
+ export function bodyToDisplay(blocks, bodyIndex) {
82
+ for (const block of blocks) {
83
+ const end = block.bodyStart + block.text.length;
84
+ if (bodyIndex <= end) {
85
+ return block.displayStart + (bodyIndex - block.bodyStart);
86
+ }
87
+ }
88
+ const last = blocks[blocks.length - 1];
89
+ return last ? last.displayStart + last.text.length : 0;
90
+ }
91
+ export function junFindText(fragment, bodyIndex, bias = "left") {
92
+ let consumed = 0;
93
+ for (let i = 0; i < fragment.length; i++) {
94
+ const child = fragment.get(i);
95
+ if (!isElement(child) || isSchemaNode(child)) continue;
96
+ const found = findTextInElement(child, bodyIndex - consumed, bias);
97
+ if (found) return found;
98
+ consumed += elementTextLength(child);
99
+ }
100
+ return bias === "right" ? junFindText(fragment, bodyIndex, "left") : null;
101
+ }
102
+ function findTextInElement(el, remaining, bias) {
103
+ if (remaining < 0) return null;
104
+ for (let i = 0; i < el.length; i++) {
105
+ const child = el.get(i);
106
+ if (isText(child)) {
107
+ const hit = bias === "left" ? remaining <= child.length : remaining < child.length || remaining === 0 && child.length === 0;
108
+ if (hit) return { text: child, offset: remaining };
109
+ remaining -= child.length;
110
+ } else if (isElement(child)) {
111
+ const found = findTextInElement(child, remaining, bias);
112
+ if (found) return found;
113
+ remaining -= elementTextLength(child);
114
+ }
115
+ }
116
+ return null;
117
+ }
118
+ export function junGlobalIndexOf(fragment, target, localOffset) {
119
+ let index = 0;
120
+ for (let i = 0; i < fragment.length; i++) {
121
+ const child = fragment.get(i);
122
+ if (!isElement(child) || isSchemaNode(child)) continue;
123
+ const found = globalIndexInElement(child, target, localOffset, index);
124
+ if (found !== null) return found;
125
+ index += elementTextLength(child);
126
+ }
127
+ return index + localOffset;
128
+ }
129
+ function globalIndexInElement(el, target, localOffset, base) {
130
+ for (let i = 0; i < el.length; i++) {
131
+ const child = el.get(i);
132
+ if (isText(child)) {
133
+ if (child === target) return base + localOffset;
134
+ base += child.length;
135
+ } else if (isElement(child)) {
136
+ const found = globalIndexInElement(child, target, localOffset, base);
137
+ if (found !== null) return found;
138
+ base += elementTextLength(child);
139
+ }
140
+ }
141
+ return null;
142
+ }
143
+ export function junEnsureStructure(fragment) {
144
+ let hasHeader = false;
145
+ let hasMeta = false;
146
+ for (let i = 0; i < fragment.length; i++) {
147
+ const child = fragment.get(i);
148
+ if (!isElement(child)) continue;
149
+ if (child.nodeName === "documentHeader") hasHeader = true;
150
+ if (child.nodeName === "documentMeta") hasMeta = true;
151
+ }
152
+ if (!hasMeta) fragment.insert(hasHeader ? 1 : 0, [new Y.XmlElement("documentMeta")]);
153
+ if (!hasHeader) fragment.insert(0, [new Y.XmlElement("documentHeader")]);
154
+ }
155
+ export function junLastParagraph(fragment) {
156
+ for (let i = fragment.length - 1; i >= 0; i--) {
157
+ const child = fragment.get(i);
158
+ if (!isElement(child) || isSchemaNode(child)) continue;
159
+ for (let j = child.length - 1; j >= 0; j--) {
160
+ const grandchild = child.get(j);
161
+ if (isText(grandchild)) return grandchild;
162
+ }
163
+ const text2 = new Y.XmlText();
164
+ child.insert(0, [text2]);
165
+ return text2;
166
+ }
167
+ const para = new Y.XmlElement("paragraph");
168
+ const text = new Y.XmlText();
169
+ para.insert(0, [text]);
170
+ fragment.push([para]);
171
+ return text;
172
+ }
173
+ export function junSplitParagraph(fragment, bodyIndex) {
174
+ let offset = 0;
175
+ let insertAt = fragment.length;
176
+ for (let i = 0; i < fragment.length; i++) {
177
+ const child = fragment.get(i);
178
+ if (!isElement(child) || isSchemaNode(child)) continue;
179
+ const len = elementTextLength(child);
180
+ if (offset + len >= bodyIndex) {
181
+ insertAt = i + 1;
182
+ break;
183
+ }
184
+ offset += len;
185
+ }
186
+ const para = new Y.XmlElement("paragraph");
187
+ const text = new Y.XmlText();
188
+ para.insert(0, [text]);
189
+ fragment.insert(insertAt, [para]);
190
+ return text;
191
+ }
192
+ export function junDeleteRange(fragment, at, count) {
193
+ if (count <= 0) return "";
194
+ const end = at + count;
195
+ const nodes = junTextNodes(fragment);
196
+ let removed = "";
197
+ for (let i = nodes.length - 1; i >= 0; i--) {
198
+ const node = nodes[i];
199
+ const nodeEnd = node.start + node.text.length;
200
+ const from = Math.max(at, node.start);
201
+ const to = Math.min(end, nodeEnd);
202
+ if (to <= from) continue;
203
+ const localFrom = from - node.start;
204
+ removed = textOf(node.text).slice(localFrom, to - node.start) + removed;
205
+ node.text.delete(localFrom, to - from);
206
+ }
207
+ return removed;
208
+ }
209
+ function junTextNodes(fragment) {
210
+ const out = [];
211
+ let offset = 0;
212
+ const walk = (el) => {
213
+ for (let i = 0; i < el.length; i++) {
214
+ const child = el.get(i);
215
+ if (isText(child)) {
216
+ out.push({ text: child, start: offset });
217
+ offset += child.length;
218
+ } else if (isElement(child)) {
219
+ walk(child);
220
+ }
221
+ }
222
+ };
223
+ for (let i = 0; i < fragment.length; i++) {
224
+ const child = fragment.get(i);
225
+ if (isElement(child) && !isSchemaNode(child)) walk(child);
226
+ }
227
+ return out;
228
+ }
229
+ export function junPruneEmptyBlocks(fragment) {
230
+ const blocks = junBlocks(fragment);
231
+ if (blocks.length <= 1) return 0;
232
+ let pruned = 0;
233
+ for (let i = blocks.length - 1; i >= 0 && blocks.length - pruned > 1; i--) {
234
+ const block = blocks[i];
235
+ if (block.text.length > 0) continue;
236
+ if (block.el.length > 1) continue;
237
+ fragment.delete(block.childIndex, 1);
238
+ pruned++;
239
+ }
240
+ return pruned;
241
+ }
242
+ export function junRelativePosition(fragment, bodyIndex) {
243
+ const total = junBodyLength(fragment);
244
+ const clamped = Math.max(0, Math.min(bodyIndex, total));
245
+ if (clamped === 0) return Y.createRelativePositionFromTypeIndex(fragment, 0, -1);
246
+ const pos = junFindText(fragment, clamped);
247
+ if (pos) return Y.createRelativePositionFromTypeIndex(pos.text, pos.offset, -1);
248
+ return Y.createRelativePositionFromTypeIndex(fragment, fragment.length, -1);
249
+ }
250
+ export function junCursorState(fragment, anchorBody, headBody) {
251
+ const anchor = junRelativePosition(fragment, anchorBody);
252
+ const head = junRelativePosition(fragment, headBody);
253
+ if (!anchor || !head) return null;
254
+ return {
255
+ anchor: Y.relativePositionToJSON(anchor),
256
+ head: Y.relativePositionToJSON(head)
257
+ };
258
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * `meta.icon` is stored BARE — `server`, not `i-lucide-server`.
3
+ *
4
+ * That is the platform's format, not a preference. `@abraca/nuxt`'s
5
+ * `resolveDocIcon()` — what the slideover, the meta header, the sub-page lists
6
+ * and the document tree all render through — does
7
+ * ``result = `i-lucide-${meta.icon}` `` unconditionally. Hand it a value that
8
+ * already carries the prefix and it asks the icon set for
9
+ * `i-lucide-i-lucide-server`, which does not exist, and the icon renders EMPTY.
10
+ *
11
+ * jun's own surfaces hid this: `junDocTypeIcons.normalizeIcon()` passes a
12
+ * prefixed name through and only prefixes a bare one, so the navbar rendered
13
+ * both forms happily. The result was a site whose icons were visible in the
14
+ * navigation and blank in every slideover — and the pages that looked worst
15
+ * were the ones whose icons had been written most carefully, because those were
16
+ * the prefixed ones.
17
+ *
18
+ * So: strip on the way in, and let both spellings be valid in a seed file.
19
+ * This rule is duplicated from `runtime/utils/junDocTypeIcons.ts` because Nitro
20
+ * and the app are separate bundles — the same reason `isJunOwnerOnlyDoc` is.
21
+ * **Keep them in step.**
22
+ */
23
+ export declare function junIconStorageValue(raw: unknown): string | undefined;
24
+ declare const _default: import("nitropack").NitroAppPlugin;
25
+ export default _default;