@owlmeans/web-panel 0.1.18-rc.9 → 0.1.18

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 (669) hide show
  1. package/README.md +510 -143
  2. package/THIRD-PARTY-NOTICES.txt +24 -0
  3. package/agent-meta/manifest.json +163 -4
  4. package/agent-meta/skills/web-panel/SKILL.md +136 -83
  5. package/agent-meta/skills/web-panel/parts/consent.md +114 -0
  6. package/agent-meta/skills/web-panel/parts/editor.md +47 -0
  7. package/agent-meta/skills/web-panel/parts/forms.md +85 -0
  8. package/agent-meta/skills/web-panel/parts/navigation.md +203 -0
  9. package/agent-meta/skills/web-panel/parts/picker.md +164 -0
  10. package/agent-meta/skills/web-panel/parts/reload.md +46 -0
  11. package/agent-meta/skills/web-panel/parts/sign-in.md +65 -0
  12. package/agent-meta/skills/web-panel/parts/theme.md +74 -0
  13. package/build/@/components/ui/alert-dialog.d.ts +15 -0
  14. package/build/@/components/ui/alert-dialog.d.ts.map +1 -0
  15. package/build/@/components/ui/alert-dialog.js +39 -0
  16. package/build/@/components/ui/alert-dialog.js.map +1 -0
  17. package/build/@/components/ui/alert.js +1 -1
  18. package/build/@/components/ui/alert.js.map +1 -1
  19. package/build/@/components/ui/button.js +1 -1
  20. package/build/@/components/ui/button.js.map +1 -1
  21. package/build/@/components/ui/card.js +1 -1
  22. package/build/@/components/ui/card.js.map +1 -1
  23. package/build/@/components/ui/input.js +1 -1
  24. package/build/@/components/ui/input.js.map +1 -1
  25. package/build/@/components/ui/label.js +1 -1
  26. package/build/@/components/ui/label.js.map +1 -1
  27. package/build/@/components/ui/navigation-menu.js +1 -1
  28. package/build/@/components/ui/navigation-menu.js.map +1 -1
  29. package/build/@/components/ui/popover.d.ts +8 -0
  30. package/build/@/components/ui/popover.d.ts.map +1 -0
  31. package/build/@/components/ui/popover.js +17 -0
  32. package/build/@/components/ui/popover.js.map +1 -0
  33. package/build/@/components/ui/progress.js +1 -1
  34. package/build/@/components/ui/progress.js.map +1 -1
  35. package/build/@/components/ui/separator.js +1 -1
  36. package/build/@/components/ui/separator.js.map +1 -1
  37. package/build/@/components/ui/sheet.d.ts +15 -0
  38. package/build/@/components/ui/sheet.d.ts.map +1 -0
  39. package/build/@/components/ui/sheet.js +40 -0
  40. package/build/@/components/ui/sheet.js.map +1 -0
  41. package/build/auth/context.d.ts.map +1 -1
  42. package/build/auth/context.js +0 -1
  43. package/build/auth/context.js.map +1 -1
  44. package/build/auth/entrypoints.d.ts +10 -0
  45. package/build/auth/entrypoints.d.ts.map +1 -0
  46. package/build/auth/entrypoints.js +4 -0
  47. package/build/auth/entrypoints.js.map +1 -0
  48. package/build/auth/exports.d.ts +4 -4
  49. package/build/auth/exports.d.ts.map +1 -1
  50. package/build/auth/exports.js +3 -3
  51. package/build/auth/exports.js.map +1 -1
  52. package/build/auth/modules.d.ts +1 -1
  53. package/build/auth/modules.d.ts.map +1 -1
  54. package/build/auth/plugins/basic-ed25519.js +4 -4
  55. package/build/auth/plugins/basic-ed25519.js.map +1 -1
  56. package/build/auth/plugins/re-captcha.js +3 -3
  57. package/build/auth/plugins/re-captcha.js.map +1 -1
  58. package/build/auth/plugins/tunnel-consumer.js +1 -1
  59. package/build/auth/plugins/tunnel-consumer.js.map +1 -1
  60. package/build/components/block.js +2 -2
  61. package/build/components/block.js.map +1 -1
  62. package/build/components/consts.local.d.ts +14 -0
  63. package/build/components/consts.local.d.ts.map +1 -0
  64. package/build/components/consts.local.js +26 -0
  65. package/build/components/consts.local.js.map +1 -0
  66. package/build/components/footer/component.d.ts +19 -1
  67. package/build/components/footer/component.d.ts.map +1 -1
  68. package/build/components/footer/component.js +38 -11
  69. package/build/components/footer/component.js.map +1 -1
  70. package/build/components/footer/credit.d.ts +27 -0
  71. package/build/components/footer/credit.d.ts.map +1 -0
  72. package/build/components/footer/credit.js +42 -0
  73. package/build/components/footer/credit.js.map +1 -0
  74. package/build/components/footer/index.d.ts +1 -0
  75. package/build/components/footer/index.d.ts.map +1 -1
  76. package/build/components/footer/index.js +1 -0
  77. package/build/components/footer/index.js.map +1 -1
  78. package/build/components/footer/types.d.ts +22 -1
  79. package/build/components/footer/types.d.ts.map +1 -1
  80. package/build/components/form/button/component.d.ts.map +1 -1
  81. package/build/components/form/button/component.js +5 -3
  82. package/build/components/form/button/component.js.map +1 -1
  83. package/build/components/form/component.js +2 -2
  84. package/build/components/form/component.js.map +1 -1
  85. package/build/components/form/text/component.js +2 -2
  86. package/build/components/form/text/component.js.map +1 -1
  87. package/build/components/helper.d.ts.map +1 -1
  88. package/build/components/helper.js +1 -12
  89. package/build/components/helper.js.map +1 -1
  90. package/build/components/index.d.ts +4 -0
  91. package/build/components/index.d.ts.map +1 -1
  92. package/build/components/index.js +4 -0
  93. package/build/components/index.js.map +1 -1
  94. package/build/components/link.js +3 -3
  95. package/build/components/link.js.map +1 -1
  96. package/build/components/login/append.d.ts +15 -0
  97. package/build/components/login/append.d.ts.map +1 -0
  98. package/build/components/login/append.js +26 -0
  99. package/build/components/login/append.js.map +1 -0
  100. package/build/components/login/consts.d.ts +3 -0
  101. package/build/components/login/consts.d.ts.map +1 -0
  102. package/build/components/login/consts.js +3 -0
  103. package/build/components/login/consts.js.map +1 -0
  104. package/build/components/login/consts.local.d.ts +4 -0
  105. package/build/components/login/consts.local.d.ts.map +1 -0
  106. package/build/components/login/consts.local.js +8 -0
  107. package/build/components/login/consts.local.js.map +1 -0
  108. package/build/components/login/credit.d.ts +12 -0
  109. package/build/components/login/credit.d.ts.map +1 -0
  110. package/build/components/login/credit.js +18 -0
  111. package/build/components/login/credit.js.map +1 -0
  112. package/build/components/login/i18n/be.json +10 -0
  113. package/build/components/login/i18n/de.json +10 -0
  114. package/build/components/login/i18n/en.json +10 -0
  115. package/build/components/login/i18n/es.json +10 -0
  116. package/build/components/login/i18n/fr.json +10 -0
  117. package/build/components/login/i18n/pl.json +10 -0
  118. package/build/components/login/i18n/ru.json +10 -0
  119. package/build/components/login/i18n/uk.json +10 -0
  120. package/build/components/login/i18n.d.ts +2 -0
  121. package/build/components/login/i18n.d.ts.map +1 -0
  122. package/build/components/login/i18n.js +28 -0
  123. package/build/components/login/i18n.js.map +1 -0
  124. package/build/components/login/icons.d.ts +14 -0
  125. package/build/components/login/icons.d.ts.map +1 -0
  126. package/build/components/login/icons.js +29 -0
  127. package/build/components/login/icons.js.map +1 -0
  128. package/build/components/login/index.d.ts +11 -0
  129. package/build/components/login/index.d.ts.map +1 -0
  130. package/build/components/login/index.js +10 -0
  131. package/build/components/login/index.js.map +1 -0
  132. package/build/components/login/notify.d.ts +18 -0
  133. package/build/components/login/notify.d.ts.map +1 -0
  134. package/build/components/login/notify.js +41 -0
  135. package/build/components/login/notify.js.map +1 -0
  136. package/build/components/login/provider.d.ts +20 -0
  137. package/build/components/login/provider.d.ts.map +1 -0
  138. package/build/components/login/provider.js +31 -0
  139. package/build/components/login/provider.js.map +1 -0
  140. package/build/components/login/screen.d.ts +24 -0
  141. package/build/components/login/screen.d.ts.map +1 -0
  142. package/build/components/login/screen.js +92 -0
  143. package/build/components/login/screen.js.map +1 -0
  144. package/build/components/login/terms.d.ts +19 -0
  145. package/build/components/login/terms.d.ts.map +1 -0
  146. package/build/components/login/terms.js +32 -0
  147. package/build/components/login/terms.js.map +1 -0
  148. package/build/components/login/types.d.ts +28 -0
  149. package/build/components/login/types.d.ts.map +1 -0
  150. package/build/components/login/types.js +2 -0
  151. package/build/components/login/types.js.map +1 -0
  152. package/build/components/nav/consts.local.d.ts +41 -0
  153. package/build/components/nav/consts.local.d.ts.map +1 -0
  154. package/build/components/nav/consts.local.js +60 -0
  155. package/build/components/nav/consts.local.js.map +1 -0
  156. package/build/components/nav/index.d.ts +1 -0
  157. package/build/components/nav/index.d.ts.map +1 -1
  158. package/build/components/nav/index.js +1 -0
  159. package/build/components/nav/index.js.map +1 -1
  160. package/build/components/nav/layout.d.ts +9 -2
  161. package/build/components/nav/layout.d.ts.map +1 -1
  162. package/build/components/nav/layout.js +48 -7
  163. package/build/components/nav/layout.js.map +1 -1
  164. package/build/components/nav/mobile.d.ts +21 -0
  165. package/build/components/nav/mobile.d.ts.map +1 -0
  166. package/build/components/nav/mobile.js +55 -0
  167. package/build/components/nav/mobile.js.map +1 -0
  168. package/build/components/nav/side.d.ts.map +1 -1
  169. package/build/components/nav/side.js +10 -10
  170. package/build/components/nav/side.js.map +1 -1
  171. package/build/components/nav/top.d.ts.map +1 -1
  172. package/build/components/nav/top.js +12 -8
  173. package/build/components/nav/top.js.map +1 -1
  174. package/build/components/nav/types.d.ts +64 -1
  175. package/build/components/nav/types.d.ts.map +1 -1
  176. package/build/components/nav/viewport.d.ts +3 -0
  177. package/build/components/nav/viewport.d.ts.map +1 -0
  178. package/build/components/nav/viewport.js +14 -0
  179. package/build/components/nav/viewport.js.map +1 -0
  180. package/build/components/panel-app/component.d.ts.map +1 -1
  181. package/build/components/panel-app/component.js +4 -3
  182. package/build/components/panel-app/component.js.map +1 -1
  183. package/build/components/picker/color-picker.d.ts +9 -0
  184. package/build/components/picker/color-picker.d.ts.map +1 -0
  185. package/build/components/picker/color-picker.js +9 -0
  186. package/build/components/picker/color-picker.js.map +1 -0
  187. package/build/components/picker/consts.local.d.ts +76 -0
  188. package/build/components/picker/consts.local.d.ts.map +1 -0
  189. package/build/components/picker/consts.local.js +214 -0
  190. package/build/components/picker/consts.local.js.map +1 -0
  191. package/build/components/picker/dot.d.ts +8 -0
  192. package/build/components/picker/dot.d.ts.map +1 -0
  193. package/build/components/picker/dot.js +10 -0
  194. package/build/components/picker/dot.js.map +1 -0
  195. package/build/components/picker/grid.d.ts +17 -0
  196. package/build/components/picker/grid.d.ts.map +1 -0
  197. package/build/components/picker/grid.js +73 -0
  198. package/build/components/picker/grid.js.map +1 -0
  199. package/build/components/picker/i18n/be.json +60 -0
  200. package/build/components/picker/i18n/de.json +60 -0
  201. package/build/components/picker/i18n/en.json +60 -0
  202. package/build/components/picker/i18n/es.json +60 -0
  203. package/build/components/picker/i18n/fr.json +60 -0
  204. package/build/components/picker/i18n/pl.json +60 -0
  205. package/build/components/picker/i18n/ru.json +60 -0
  206. package/build/components/picker/i18n/uk.json +60 -0
  207. package/build/components/picker/i18n.d.ts +2 -0
  208. package/build/components/picker/i18n.d.ts.map +1 -0
  209. package/build/components/picker/i18n.js +18 -0
  210. package/build/components/picker/i18n.js.map +1 -0
  211. package/build/components/picker/icon-color-picker.d.ts +14 -0
  212. package/build/components/picker/icon-color-picker.d.ts.map +1 -0
  213. package/build/components/picker/icon-color-picker.js +15 -0
  214. package/build/components/picker/icon-color-picker.js.map +1 -0
  215. package/build/components/picker/icon-picker.d.ts +8 -0
  216. package/build/components/picker/icon-picker.d.ts.map +1 -0
  217. package/build/components/picker/icon-picker.js +8 -0
  218. package/build/components/picker/icon-picker.js.map +1 -0
  219. package/build/components/picker/index.d.ts +11 -0
  220. package/build/components/picker/index.d.ts.map +1 -0
  221. package/build/components/picker/index.js +10 -0
  222. package/build/components/picker/index.js.map +1 -0
  223. package/build/components/picker/panel.d.ts +9 -0
  224. package/build/components/picker/panel.d.ts.map +1 -0
  225. package/build/components/picker/panel.js +23 -0
  226. package/build/components/picker/panel.js.map +1 -0
  227. package/build/components/picker/root.d.ts +13 -0
  228. package/build/components/picker/root.d.ts.map +1 -0
  229. package/build/components/picker/root.js +55 -0
  230. package/build/components/picker/root.js.map +1 -0
  231. package/build/components/picker/roving.d.ts +8 -0
  232. package/build/components/picker/roving.d.ts.map +1 -0
  233. package/build/components/picker/roving.js +62 -0
  234. package/build/components/picker/roving.js.map +1 -0
  235. package/build/components/picker/surface.d.ts +18 -0
  236. package/build/components/picker/surface.d.ts.map +1 -0
  237. package/build/components/picker/surface.js +36 -0
  238. package/build/components/picker/surface.js.map +1 -0
  239. package/build/components/picker/swatches/custom.d.ts +10 -0
  240. package/build/components/picker/swatches/custom.d.ts.map +1 -0
  241. package/build/components/picker/swatches/custom.js +65 -0
  242. package/build/components/picker/swatches/custom.js.map +1 -0
  243. package/build/components/picker/swatches.d.ts +16 -0
  244. package/build/components/picker/swatches.d.ts.map +1 -0
  245. package/build/components/picker/swatches.js +35 -0
  246. package/build/components/picker/swatches.js.map +1 -0
  247. package/build/components/picker/text.d.ts +5 -0
  248. package/build/components/picker/text.d.ts.map +1 -0
  249. package/build/components/picker/text.js +29 -0
  250. package/build/components/picker/text.js.map +1 -0
  251. package/build/components/picker/tile.d.ts +11 -0
  252. package/build/components/picker/tile.d.ts.map +1 -0
  253. package/build/components/picker/tile.js +19 -0
  254. package/build/components/picker/tile.js.map +1 -0
  255. package/build/components/picker/translate.d.ts +9 -0
  256. package/build/components/picker/translate.d.ts.map +1 -0
  257. package/build/components/picker/translate.js +13 -0
  258. package/build/components/picker/translate.js.map +1 -0
  259. package/build/components/picker/trigger.d.ts +12 -0
  260. package/build/components/picker/trigger.d.ts.map +1 -0
  261. package/build/components/picker/trigger.js +29 -0
  262. package/build/components/picker/trigger.js.map +1 -0
  263. package/build/components/picker/types.d.ts +114 -0
  264. package/build/components/picker/types.d.ts.map +1 -0
  265. package/build/components/picker/types.js +2 -0
  266. package/build/components/picker/types.js.map +1 -0
  267. package/build/components/picker/types.local.d.ts +143 -0
  268. package/build/components/picker/types.local.d.ts.map +1 -0
  269. package/build/components/picker/types.local.js +2 -0
  270. package/build/components/picker/types.local.js.map +1 -0
  271. package/build/components/scheme/consts.local.d.ts +8 -0
  272. package/build/components/scheme/consts.local.d.ts.map +1 -0
  273. package/build/components/scheme/consts.local.js +13 -0
  274. package/build/components/scheme/consts.local.js.map +1 -0
  275. package/build/components/scheme/hook.d.ts +16 -0
  276. package/build/components/scheme/hook.d.ts.map +1 -0
  277. package/build/components/scheme/hook.js +52 -0
  278. package/build/components/scheme/hook.js.map +1 -0
  279. package/build/components/scheme/index.d.ts +4 -0
  280. package/build/components/scheme/index.d.ts.map +1 -0
  281. package/build/components/scheme/index.js +3 -0
  282. package/build/components/scheme/index.js.map +1 -0
  283. package/build/components/scheme/toggle.d.ts +14 -0
  284. package/build/components/scheme/toggle.d.ts.map +1 -0
  285. package/build/components/scheme/toggle.js +24 -0
  286. package/build/components/scheme/toggle.js.map +1 -0
  287. package/build/components/scheme/types.d.ts +21 -0
  288. package/build/components/scheme/types.d.ts.map +1 -0
  289. package/build/components/scheme/types.js +2 -0
  290. package/build/components/scheme/types.js.map +1 -0
  291. package/build/components/socket/i18n/be.json +9 -0
  292. package/build/components/socket/i18n/de.json +9 -0
  293. package/build/components/socket/i18n/en.json +9 -0
  294. package/build/components/socket/i18n/es.json +9 -0
  295. package/build/components/socket/i18n/fr.json +9 -0
  296. package/build/components/socket/i18n/pl.json +9 -0
  297. package/build/components/socket/i18n/ru.json +9 -0
  298. package/build/components/socket/i18n/uk.json +9 -0
  299. package/build/components/socket/i18n.d.ts +2 -0
  300. package/build/components/socket/i18n.d.ts.map +1 -0
  301. package/build/components/socket/i18n.js +18 -0
  302. package/build/components/socket/i18n.js.map +1 -0
  303. package/build/components/socket/index.d.ts +3 -0
  304. package/build/components/socket/index.d.ts.map +1 -0
  305. package/build/components/socket/index.js +3 -0
  306. package/build/components/socket/index.js.map +1 -0
  307. package/build/components/socket/reload-dialog.d.ts +22 -0
  308. package/build/components/socket/reload-dialog.d.ts.map +1 -0
  309. package/build/components/socket/reload-dialog.js +34 -0
  310. package/build/components/socket/reload-dialog.js.map +1 -0
  311. package/build/components/status.js +1 -1
  312. package/build/components/status.js.map +1 -1
  313. package/build/components/text.d.ts.map +1 -1
  314. package/build/components/text.js +2 -13
  315. package/build/components/text.js.map +1 -1
  316. package/build/components/toaster.d.ts +16 -0
  317. package/build/components/toaster.d.ts.map +1 -0
  318. package/build/components/toaster.js +52 -0
  319. package/build/components/toaster.js.map +1 -0
  320. package/build/components/uploader/consts.local.d.ts +4 -0
  321. package/build/components/uploader/consts.local.d.ts.map +1 -0
  322. package/build/components/uploader/consts.local.js +6 -0
  323. package/build/components/uploader/consts.local.js.map +1 -0
  324. package/build/components/uploader/image.d.ts.map +1 -1
  325. package/build/components/uploader/image.js +2 -6
  326. package/build/components/uploader/image.js.map +1 -1
  327. package/build/consent/component.d.ts +27 -0
  328. package/build/consent/component.d.ts.map +1 -0
  329. package/build/consent/component.js +60 -0
  330. package/build/consent/component.js.map +1 -0
  331. package/build/consent/consts.d.ts +2 -0
  332. package/build/consent/consts.d.ts.map +1 -0
  333. package/build/consent/consts.js +2 -0
  334. package/build/consent/consts.js.map +1 -0
  335. package/build/consent/consts.local.d.ts +9 -0
  336. package/build/consent/consts.local.d.ts.map +1 -0
  337. package/build/consent/consts.local.js +9 -0
  338. package/build/consent/consts.local.js.map +1 -0
  339. package/build/consent/geo.d.ts +17 -0
  340. package/build/consent/geo.d.ts.map +1 -0
  341. package/build/consent/geo.js +19 -0
  342. package/build/consent/geo.js.map +1 -0
  343. package/build/consent/index.d.ts +11 -0
  344. package/build/consent/index.d.ts.map +1 -0
  345. package/build/consent/index.js +9 -0
  346. package/build/consent/index.js.map +1 -0
  347. package/build/consent/language.d.ts +12 -0
  348. package/build/consent/language.d.ts.map +1 -0
  349. package/build/consent/language.js +11 -0
  350. package/build/consent/language.js.map +1 -0
  351. package/build/consent/menu-widget.d.ts +13 -0
  352. package/build/consent/menu-widget.d.ts.map +1 -0
  353. package/build/consent/menu-widget.js +20 -0
  354. package/build/consent/menu-widget.js.map +1 -0
  355. package/build/consent/presence.d.ts +30 -0
  356. package/build/consent/presence.d.ts.map +1 -0
  357. package/build/consent/presence.js +40 -0
  358. package/build/consent/presence.js.map +1 -0
  359. package/build/consent/service.d.ts +18 -0
  360. package/build/consent/service.d.ts.map +1 -0
  361. package/build/consent/service.js +53 -0
  362. package/build/consent/service.js.map +1 -0
  363. package/build/consent/translate.d.ts +14 -0
  364. package/build/consent/translate.d.ts.map +1 -0
  365. package/build/consent/translate.js +28 -0
  366. package/build/consent/translate.js.map +1 -0
  367. package/build/consent/types.d.ts +39 -0
  368. package/build/consent/types.d.ts.map +1 -0
  369. package/build/consent/types.js +2 -0
  370. package/build/consent/types.js.map +1 -0
  371. package/build/consent/types.local.d.ts +6 -0
  372. package/build/consent/types.local.d.ts.map +1 -0
  373. package/build/consent/types.local.js +2 -0
  374. package/build/consent/types.local.js.map +1 -0
  375. package/build/context.d.ts.map +1 -1
  376. package/build/context.js +10 -0
  377. package/build/context.js.map +1 -1
  378. package/build/editor/component.d.ts +4 -0
  379. package/build/editor/component.d.ts.map +1 -0
  380. package/build/editor/component.js +103 -0
  381. package/build/editor/component.js.map +1 -0
  382. package/build/editor/consts.local.d.ts +6 -0
  383. package/build/editor/consts.local.d.ts.map +1 -0
  384. package/build/editor/consts.local.js +58 -0
  385. package/build/editor/consts.local.js.map +1 -0
  386. package/build/editor/index.d.ts +3 -0
  387. package/build/editor/index.d.ts.map +1 -0
  388. package/build/editor/index.js +2 -0
  389. package/build/editor/index.js.map +1 -0
  390. package/build/editor/types.d.ts +24 -0
  391. package/build/editor/types.d.ts.map +1 -0
  392. package/build/editor/types.js +2 -0
  393. package/build/editor/types.js.map +1 -0
  394. package/build/entrypoints.d.ts +8 -0
  395. package/build/entrypoints.d.ts.map +1 -0
  396. package/build/entrypoints.js +4 -0
  397. package/build/entrypoints.js.map +1 -0
  398. package/build/exports.d.ts +6 -5
  399. package/build/exports.d.ts.map +1 -1
  400. package/build/exports.js +5 -5
  401. package/build/exports.js.map +1 -1
  402. package/build/index.d.ts +1 -1
  403. package/build/index.d.ts.map +1 -1
  404. package/build/index.js +1 -1
  405. package/build/index.js.map +1 -1
  406. package/build/main.d.ts +1 -4
  407. package/build/main.d.ts.map +1 -1
  408. package/build/main.js.map +1 -1
  409. package/build/modules.d.ts +1 -1
  410. package/build/modules.d.ts.map +1 -1
  411. package/build/permission/i18n/be.json +13 -0
  412. package/build/permission/i18n/de.json +13 -0
  413. package/build/permission/i18n/en.json +13 -0
  414. package/build/permission/i18n/es.json +13 -0
  415. package/build/permission/i18n/fr.json +13 -0
  416. package/build/permission/i18n/pl.json +13 -0
  417. package/build/permission/i18n/ru.json +13 -0
  418. package/build/permission/i18n/uk.json +13 -0
  419. package/build/permission/i18n.d.ts +2 -0
  420. package/build/permission/i18n.d.ts.map +1 -0
  421. package/build/permission/i18n.js +13 -0
  422. package/build/permission/i18n.js.map +1 -0
  423. package/build/permission/index.d.ts +6 -0
  424. package/build/permission/index.d.ts.map +1 -0
  425. package/build/permission/index.js +27 -0
  426. package/build/permission/index.js.map +1 -0
  427. package/build/permission/toast.d.ts +5 -0
  428. package/build/permission/toast.d.ts.map +1 -0
  429. package/build/permission/toast.js +8 -0
  430. package/build/permission/toast.js.map +1 -0
  431. package/build/permission/types.d.ts +6 -0
  432. package/build/permission/types.d.ts.map +1 -0
  433. package/build/permission/types.js +2 -0
  434. package/build/permission/types.js.map +1 -0
  435. package/build/picker/icons/consts.d.ts +9 -0
  436. package/build/picker/icons/consts.d.ts.map +1 -0
  437. package/build/picker/icons/consts.js +264 -0
  438. package/build/picker/icons/consts.js.map +1 -0
  439. package/build/picker/icons/types.d.ts +18 -0
  440. package/build/picker/icons/types.d.ts.map +1 -0
  441. package/build/picker/icons/types.js +2 -0
  442. package/build/picker/icons/types.js.map +1 -0
  443. package/build/picker/icons.d.ts +4 -0
  444. package/build/picker/icons.d.ts.map +1 -0
  445. package/build/picker/icons.js +54 -0
  446. package/build/picker/icons.js.map +1 -0
  447. package/build/picker/index.d.ts +11 -0
  448. package/build/picker/index.d.ts.map +1 -0
  449. package/build/picker/index.js +10 -0
  450. package/build/picker/index.js.map +1 -0
  451. package/build/picker/utils/color/types.d.ts +35 -0
  452. package/build/picker/utils/color/types.d.ts.map +1 -0
  453. package/build/picker/utils/color/types.js +2 -0
  454. package/build/picker/utils/color/types.js.map +1 -0
  455. package/build/picker/utils/color.d.ts +4 -0
  456. package/build/picker/utils/color.d.ts.map +1 -0
  457. package/build/picker/utils/color.js +96 -0
  458. package/build/picker/utils/color.js.map +1 -0
  459. package/build/picker/vocabulary/consts.d.ts +26 -0
  460. package/build/picker/vocabulary/consts.d.ts.map +1 -0
  461. package/build/picker/vocabulary/consts.js +336 -0
  462. package/build/picker/vocabulary/consts.js.map +1 -0
  463. package/build/picker/vocabulary/types.d.ts +67 -0
  464. package/build/picker/vocabulary/types.d.ts.map +1 -0
  465. package/build/picker/vocabulary/types.js +2 -0
  466. package/build/picker/vocabulary/types.js.map +1 -0
  467. package/build/picker/vocabulary.d.ts +11 -0
  468. package/build/picker/vocabulary.d.ts.map +1 -0
  469. package/build/picker/vocabulary.js +83 -0
  470. package/build/picker/vocabulary.js.map +1 -0
  471. package/build/scheme/consts.d.ts +8 -0
  472. package/build/scheme/consts.d.ts.map +1 -0
  473. package/build/scheme/consts.js +8 -0
  474. package/build/scheme/consts.js.map +1 -0
  475. package/build/scheme/index.d.ts +4 -0
  476. package/build/scheme/index.d.ts.map +1 -0
  477. package/build/scheme/index.js +3 -0
  478. package/build/scheme/index.js.map +1 -0
  479. package/build/scheme/scheme.d.ts +16 -0
  480. package/build/scheme/scheme.d.ts.map +1 -0
  481. package/build/scheme/scheme.js +58 -0
  482. package/build/scheme/scheme.js.map +1 -0
  483. package/build/scheme/types.d.ts +30 -0
  484. package/build/scheme/types.d.ts.map +1 -0
  485. package/build/scheme/types.js +2 -0
  486. package/build/scheme/types.js.map +1 -0
  487. package/build/types.d.ts +18 -2
  488. package/build/types.d.ts.map +1 -1
  489. package/package.json +107 -52
  490. package/src/@/components/ui/alert-dialog.tsx +156 -0
  491. package/src/@/components/ui/alert.tsx +1 -1
  492. package/src/@/components/ui/button.tsx +1 -1
  493. package/src/@/components/ui/card.tsx +1 -1
  494. package/src/@/components/ui/input.tsx +1 -1
  495. package/src/@/components/ui/label.tsx +1 -1
  496. package/src/@/components/ui/navigation-menu.tsx +1 -1
  497. package/src/@/components/ui/popover.tsx +47 -0
  498. package/src/@/components/ui/progress.tsx +1 -1
  499. package/src/@/components/ui/separator.tsx +1 -1
  500. package/src/@/components/ui/sheet.tsx +142 -0
  501. package/src/auth/context.ts +0 -2
  502. package/src/auth/entrypoints.ts +5 -0
  503. package/src/auth/exports.ts +4 -4
  504. package/src/auth/plugins/basic-ed25519.tsx +4 -4
  505. package/src/auth/plugins/re-captcha.tsx +3 -3
  506. package/src/auth/plugins/tunnel-consumer.tsx +1 -1
  507. package/src/components/block.tsx +2 -2
  508. package/src/components/consts.local.ts +29 -0
  509. package/src/components/footer/component.tsx +58 -16
  510. package/src/components/footer/credit.tsx +61 -0
  511. package/src/components/footer/index.ts +1 -0
  512. package/src/components/footer/types.ts +22 -1
  513. package/src/components/form/button/component.tsx +7 -4
  514. package/src/components/form/component.tsx +2 -2
  515. package/src/components/form/text/component.tsx +2 -2
  516. package/src/components/helper.ts +1 -13
  517. package/src/components/index.ts +4 -0
  518. package/src/components/link.tsx +3 -3
  519. package/src/components/login/append.ts +34 -0
  520. package/src/components/login/consts.local.ts +10 -0
  521. package/src/components/login/consts.ts +2 -0
  522. package/src/components/login/credit.tsx +33 -0
  523. package/src/components/login/i18n/be.json +10 -0
  524. package/src/components/login/i18n/de.json +10 -0
  525. package/src/components/login/i18n/en.json +10 -0
  526. package/src/components/login/i18n/es.json +10 -0
  527. package/src/components/login/i18n/fr.json +10 -0
  528. package/src/components/login/i18n/pl.json +10 -0
  529. package/src/components/login/i18n/ru.json +10 -0
  530. package/src/components/login/i18n/uk.json +10 -0
  531. package/src/components/login/i18n.ts +29 -0
  532. package/src/components/login/icons.tsx +39 -0
  533. package/src/components/login/index.ts +11 -0
  534. package/src/components/login/notify.ts +48 -0
  535. package/src/components/login/provider.tsx +57 -0
  536. package/src/components/login/screen.tsx +178 -0
  537. package/src/components/login/terms.tsx +75 -0
  538. package/src/components/login/types.ts +30 -0
  539. package/src/components/nav/consts.local.ts +64 -0
  540. package/src/components/nav/index.ts +1 -0
  541. package/src/components/nav/layout.tsx +184 -26
  542. package/src/components/nav/mobile.tsx +165 -0
  543. package/src/components/nav/side.tsx +43 -27
  544. package/src/components/nav/top.tsx +44 -22
  545. package/src/components/nav/types.ts +65 -2
  546. package/src/components/nav/viewport.ts +16 -0
  547. package/src/components/panel-app/component.tsx +9 -1
  548. package/src/components/picker/color-picker.tsx +15 -0
  549. package/src/components/picker/consts.local.ts +267 -0
  550. package/src/components/picker/dot.tsx +21 -0
  551. package/src/components/picker/grid.tsx +138 -0
  552. package/src/components/picker/i18n/be.json +60 -0
  553. package/src/components/picker/i18n/de.json +60 -0
  554. package/src/components/picker/i18n/en.json +60 -0
  555. package/src/components/picker/i18n/es.json +60 -0
  556. package/src/components/picker/i18n/fr.json +60 -0
  557. package/src/components/picker/i18n/pl.json +60 -0
  558. package/src/components/picker/i18n/ru.json +60 -0
  559. package/src/components/picker/i18n/uk.json +60 -0
  560. package/src/components/picker/i18n.ts +19 -0
  561. package/src/components/picker/icon-color-picker.tsx +25 -0
  562. package/src/components/picker/icon-picker.tsx +13 -0
  563. package/src/components/picker/index.ts +11 -0
  564. package/src/components/picker/panel.tsx +61 -0
  565. package/src/components/picker/root.tsx +81 -0
  566. package/src/components/picker/roving.ts +70 -0
  567. package/src/components/picker/surface.tsx +62 -0
  568. package/src/components/picker/swatches/custom.tsx +110 -0
  569. package/src/components/picker/swatches.tsx +67 -0
  570. package/src/components/picker/text.ts +46 -0
  571. package/src/components/picker/tile.tsx +35 -0
  572. package/src/components/picker/translate.ts +15 -0
  573. package/src/components/picker/trigger.tsx +54 -0
  574. package/src/components/picker/types.local.ts +154 -0
  575. package/src/components/picker/types.ts +125 -0
  576. package/src/components/scheme/consts.local.ts +13 -0
  577. package/src/components/scheme/hook.ts +62 -0
  578. package/src/components/scheme/index.ts +4 -0
  579. package/src/components/scheme/toggle.tsx +32 -0
  580. package/src/components/scheme/types.ts +23 -0
  581. package/src/components/socket/i18n/be.json +9 -0
  582. package/src/components/socket/i18n/de.json +9 -0
  583. package/src/components/socket/i18n/en.json +9 -0
  584. package/src/components/socket/i18n/es.json +9 -0
  585. package/src/components/socket/i18n/fr.json +9 -0
  586. package/src/components/socket/i18n/pl.json +9 -0
  587. package/src/components/socket/i18n/ru.json +9 -0
  588. package/src/components/socket/i18n/uk.json +9 -0
  589. package/src/components/socket/i18n.ts +19 -0
  590. package/src/components/socket/index.ts +2 -0
  591. package/src/components/socket/reload-dialog.tsx +61 -0
  592. package/src/components/status.tsx +1 -1
  593. package/src/components/text.tsx +2 -14
  594. package/src/components/toaster.tsx +65 -0
  595. package/src/components/uploader/consts.local.ts +7 -0
  596. package/src/components/uploader/image.tsx +2 -6
  597. package/src/consent/component.tsx +84 -0
  598. package/src/consent/consts.local.ts +10 -0
  599. package/src/consent/consts.ts +1 -0
  600. package/src/consent/geo.ts +26 -0
  601. package/src/consent/index.ts +24 -0
  602. package/src/consent/language.ts +12 -0
  603. package/src/consent/menu-widget.tsx +22 -0
  604. package/src/consent/presence.ts +45 -0
  605. package/src/consent/service.ts +75 -0
  606. package/src/consent/translate.ts +31 -0
  607. package/src/consent/types.local.ts +6 -0
  608. package/src/consent/types.ts +43 -0
  609. package/src/context.ts +12 -0
  610. package/src/editor/component.tsx +172 -0
  611. package/src/editor/consts.local.ts +62 -0
  612. package/src/editor/index.ts +2 -0
  613. package/src/editor/types.ts +24 -0
  614. package/src/entrypoints.ts +5 -0
  615. package/src/exports.ts +6 -5
  616. package/src/index.ts +1 -1
  617. package/src/main.tsx +2 -6
  618. package/src/permission/i18n/be.json +13 -0
  619. package/src/permission/i18n/de.json +13 -0
  620. package/src/permission/i18n/en.json +13 -0
  621. package/src/permission/i18n/es.json +13 -0
  622. package/src/permission/i18n/fr.json +13 -0
  623. package/src/permission/i18n/pl.json +13 -0
  624. package/src/permission/i18n/ru.json +13 -0
  625. package/src/permission/i18n/uk.json +13 -0
  626. package/src/permission/i18n.ts +13 -0
  627. package/src/permission/index.ts +27 -0
  628. package/src/permission/toast.tsx +20 -0
  629. package/src/permission/types.ts +5 -0
  630. package/src/picker/icons/consts.ts +309 -0
  631. package/src/picker/icons/types.ts +18 -0
  632. package/src/picker/icons.ts +70 -0
  633. package/src/picker/index.ts +11 -0
  634. package/src/picker/utils/color/types.ts +37 -0
  635. package/src/picker/utils/color.ts +119 -0
  636. package/src/picker/vocabulary/consts.ts +347 -0
  637. package/src/picker/vocabulary/types.ts +72 -0
  638. package/src/picker/vocabulary.ts +111 -0
  639. package/src/scheme/consts.ts +8 -0
  640. package/src/scheme/index.ts +3 -0
  641. package/src/scheme/scheme.ts +66 -0
  642. package/src/scheme/types.ts +30 -0
  643. package/src/types.ts +19 -2
  644. package/tests/consent-language.spec.ts +31 -0
  645. package/tests/consent.spec.ts +112 -0
  646. package/tests/context.ts +4 -0
  647. package/tests/editor.spec.ts +58 -0
  648. package/tests/harness/editor.tsx +32 -0
  649. package/tests/harness/index.html +1 -0
  650. package/tests/harness/lazy-screen.tsx +9 -0
  651. package/tests/harness/mount.tsx +370 -29
  652. package/tests/harness/picker.tsx +110 -0
  653. package/tests/lazy.spec.ts +104 -0
  654. package/tests/login-provider.spec.ts +114 -0
  655. package/tests/login.spec.ts +447 -0
  656. package/tests/nav.spec.ts +449 -3
  657. package/tests/package-boundary.spec.ts +19 -0
  658. package/tests/picker-shots.spec.ts +174 -0
  659. package/tests/picker-vocabulary.spec.ts +217 -0
  660. package/tests/picker.spec.ts +333 -0
  661. package/tests/scheme.spec.ts +149 -0
  662. package/tests/smoke.spec.ts +2 -2
  663. package/tests/socket-dialog.spec.ts +154 -0
  664. package/tests/toaster.spec.ts +59 -0
  665. package/zz-tw.d.mts +2 -0
  666. package/zz-tw.d.mts.map +1 -0
  667. package/build/.gitkeep +0 -0
  668. package/src/auth/modules.ts +0 -5
  669. package/src/modules.ts +0 -5
@@ -0,0 +1,10 @@
1
+ import type { ConsentLocale } from '@owlmeans/web-consent'
2
+ import { SUPPORTED_LNGS } from '@owlmeans/i18n'
3
+
4
+ /**
5
+ * The consent package carries its own locale list because it must build with no dependency on the
6
+ * i18n package at all. This assertion is what keeps the two from drifting: a language added to the
7
+ * framework and not to the bundle fails here, at build time, rather than as a dialog rendering
8
+ * English to the one reader who cannot report it.
9
+ */
10
+ export const _localeParity: readonly ConsentLocale[] = SUPPORTED_LNGS as readonly ConsentLocale[]
@@ -0,0 +1 @@
1
+ export const CONSENT_WIDGET_SERVICE = 'consent-widget'
@@ -0,0 +1,26 @@
1
+ import { consentPluginHelper, type ConsentGeoPlugin } from '@owlmeans/web-consent'
2
+ import type { ClientConfig } from '@owlmeans/client-context'
3
+ import type { ClientContext } from '@owlmeans/client'
4
+ import type { ConsentGeoPluginAppend } from './types.js'
5
+
6
+ /**
7
+ * Add the application's own country locator while its context is configured — beside
8
+ * `appendConsentWidgetService`, before anything renders.
9
+ *
10
+ * A locator is one async method that resolves the visitor's country or throws
11
+ * (`ConsentGeoPlugin`). It is registered into `@owlmeans/consent`'s plugin registry, ahead of the
12
+ * built-in Cloudflare one, and `PanelCookieConsent` turns the geo gate on for it even where
13
+ * `cfg.cookieConsent.geo` says nothing — appending a locator IS asking for the gate. Its result
14
+ * decides as Cloudflare's would: a visitor in a consent country is asked, anyone else is decided for
15
+ * automatically, and a throw hands over to the next locator — with none left, the visitor is asked.
16
+ */
17
+ export const appendConsentGeoPlugin = <C extends ClientConfig, T extends ClientContext<C>>(
18
+ ctx: T, plugin: ConsentGeoPlugin
19
+ ): T & ConsentGeoPluginAppend => {
20
+ const _ctx = ctx as T & ConsentGeoPluginAppend
21
+
22
+ consentPluginHelper.registerConsentPlugin(plugin)
23
+ _ctx.consentGeo = () => plugin
24
+
25
+ return _ctx
26
+ }
@@ -0,0 +1,24 @@
1
+ export * from './component.js'
2
+ export * from './menu-widget.js'
3
+ export * from './presence.js'
4
+ export { installConsentLanguage } from './language.js'
5
+ export { createConsentWidgetService, appendConsentWidgetService, CONSENT_WIDGET_STATE } from './service.js'
6
+ export { appendConsentGeoPlugin } from './geo.js'
7
+ export { CONSENT_WIDGET_SERVICE } from './consts.js'
8
+ export type {
9
+ ConsentWidgetPresenceRecord, ConsentWidgetService, ConsentWidgetServiceAppend,
10
+ PanelCookieConsentConfig, ConsentGeoPluginAppend,
11
+ } from './types.js'
12
+ export {
13
+ useConsent, useConsentCategory, consentStore, openConsent, isConsented,
14
+ readConsent, writeConsent, clearConsent, DEFAULT_CONSENT_CATEGORIES,
15
+ CONSENT_KEY, CONSENT_ESSENTIAL, CONSENT_ANALYTICS, CONSENT_MARKETING,
16
+ CONSENT_EVENT,
17
+ consentBootstrapScript,
18
+ CONSENT_REQUIRED_COUNTRIES,
19
+ } from '@owlmeans/web-consent'
20
+ export type {
21
+ ConsentCategory, ConsentMenuWidgetProps, ConsentOptions, ConsentRecord, ConsentSignal,
22
+ ConsentState, CookieConsentProps, CookiePolicyProps, ConsentDisplayMode, ConsentGeoOptions,
23
+ ConsentGeoPlugin, ConsentGeoLocation,
24
+ } from '@owlmeans/web-consent'
@@ -0,0 +1,12 @@
1
+ import type { ConsentOptions } from '@owlmeans/web-consent'
2
+
3
+ /**
4
+ * @deprecated The interface language is strictly necessary storage: `@owlmeans/client-i18n` writes
5
+ * it on every switch and reads it at every start, and `@owlmeans/consent` stores a language that
6
+ * arrives with a link — none of it waits for a cookie decision, so there is nothing left to bind.
7
+ *
8
+ * Kept as a no-op (returning a no-op cleanup) only so an application written against the earlier,
9
+ * consent-gated API — a generated target that floats to a newer release — still builds. Remove the
10
+ * call.
11
+ */
12
+ export const installConsentLanguage = (_opts?: ConsentOptions): (() => void) => () => undefined
@@ -0,0 +1,22 @@
1
+ import type { FC } from 'react'
2
+ import { ConsentMenuWidget } from '@owlmeans/web-consent'
3
+ import type { ConsentMenuWidgetProps } from '@owlmeans/web-consent'
4
+ import { useLanguage } from '@owlmeans/client-i18n'
5
+ import { useConsentTranslate } from './translate.js'
6
+
7
+ /**
8
+ * The cookie-preferences row for a host's own dropdown/menu, bound to this app's language.
9
+ *
10
+ * Purely the visual row — it carries no presence signalling of its own, since it is typically
11
+ * rendered inside a dropdown's lazily-mounted content (only present while the menu is actually
12
+ * open). A host that wants `PanelCookieConsent`'s floating button hidden for the whole time this
13
+ * row is REACHABLE (not just while the dropdown happens to be open) calls
14
+ * `useConsentMenuPresence()` from its own always-mounted menu shell instead.
15
+ */
16
+ export const PanelConsentMenuWidget: FC<ConsentMenuWidgetProps> = props => {
17
+ const [lng] = useLanguage()
18
+ const locale = props.locale ?? lng
19
+ const translate = useConsentTranslate(locale, props.translate)
20
+
21
+ return <ConsentMenuWidget {...props} locale={locale} translate={translate} />
22
+ }
@@ -0,0 +1,45 @@
1
+ import { useLayoutEffect } from 'react'
2
+ import { useStoreModel } from '@owlmeans/client'
3
+ import { useContext } from '../context.js'
4
+ import { CONSENT_WIDGET_STATE } from './service.js'
5
+ import type { AppConfig, AppContext } from '../types.js'
6
+ import type { ConsentWidgetPresenceRecord, ConsentWidgetServiceAppend } from './types.js'
7
+
8
+ /**
9
+ * Whether a cookie-preferences action is currently reachable elsewhere in this app — what
10
+ * `PanelCookieConsent` reads to hide its own floating button while it is.
11
+ *
12
+ * Reads the state resource directly, never `useConsent()` — that hook's own mount triggers
13
+ * `consentStore.init()` as a side effect, which this must not do. The resource exists only once
14
+ * `appendConsentWidgetService(context)` has run; `PanelCookieConsent` checks for the service before
15
+ * calling this, and so must any other caller.
16
+ */
17
+ export const useConsentWidgetPresent = (): boolean => {
18
+ const model = useStoreModel<ConsentWidgetPresenceRecord>(undefined, CONSENT_WIDGET_STATE)
19
+
20
+ return model.record.present === true
21
+ }
22
+
23
+ /**
24
+ * Declares that a cookie-preferences action is reachable for as long as the CALLING component
25
+ * stays mounted.
26
+ *
27
+ * Call this from a component that is mounted for the whole time the action is reachable — a
28
+ * dropdown/menu's own shell, not the menu's lazily-rendered content. Radix's `DropdownMenuContent`
29
+ * (and most headless menu content primitives) only mount their children while the menu is actually
30
+ * OPEN, so a `PanelConsentMenuWidget` row placed there is present for a fraction of the time the
31
+ * menu itself is on screen — calling this hook from inside that row hid the floating button only
32
+ * while the dropdown happened to be open, and showed it again the instant it closed.
33
+ *
34
+ * A layout effect, not a plain one: an ordinary effect runs after paint, so the floating button
35
+ * would flash for one frame before a fresh mount reports presence.
36
+ *
37
+ * Without `appendConsentWidgetService(context)` there is nothing to claim and this does nothing:
38
+ * `PanelCookieConsent` then keeps its floating button, which is visible on screen, rather than a
39
+ * throw from a layout effect, which takes the whole application down.
40
+ */
41
+ export const useConsentMenuPresence = (): void => {
42
+ const context = useContext<AppConfig, AppContext<AppConfig> & Partial<ConsentWidgetServiceAppend>>()
43
+
44
+ useLayoutEffect(() => context.consentWidget?.().claim(), [context])
45
+ }
@@ -0,0 +1,75 @@
1
+ import { createService } from '@owlmeans/context'
2
+ import { appendStateResource, stateAlias } from '@owlmeans/state'
3
+ import type { ClientConfig } from '@owlmeans/client-context'
4
+ import type { ClientContext } from '@owlmeans/client'
5
+ import { CONSENT_WIDGET_SERVICE } from './consts.js'
6
+ import type {
7
+ ConsentWidgetPresenceRecord, ConsentWidgetService, ConsentWidgetServiceAppend
8
+ } from './types.js'
9
+
10
+ /** The presence flag's state-resource alias — `single: true`, no id. */
11
+ export const CONSENT_WIDGET_STATE = stateAlias<ConsentWidgetPresenceRecord>('consent-widget-presence')
12
+
13
+ /**
14
+ * Tracks how many cookie-preferences menu rows are currently mounted, and publishes a plain
15
+ * present/absent flag into a state resource for `PanelCookieConsent` to read.
16
+ *
17
+ * Ref-counted rather than a boolean latch: a nav-mode transition can mount a new menu row before
18
+ * the old one unmounts (confirmed reachable in manager-web's own nav — a stale header still
19
+ * rendering its own dropdown for one commit while a project screen's dropdown has already
20
+ * mounted), and React 18 StrictMode double-invokes mount/cleanup in dev. Counting means the
21
+ * published flag only ever flips on a genuine 0-to-1 or 1-to-0 transition.
22
+ */
23
+ export const createConsentWidgetService = (
24
+ alias: string = CONSENT_WIDGET_SERVICE
25
+ ): ConsentWidgetService => {
26
+ let count = 0
27
+
28
+ const publish = (present: boolean): void => {
29
+ const ctx = service.assertCtx<ClientConfig, ClientContext<ClientConfig>>()
30
+ void ctx.getStateResource<ConsentWidgetPresenceRecord>(CONSENT_WIDGET_STATE).save({ present })
31
+ }
32
+
33
+ const service: ConsentWidgetService = createService<ConsentWidgetService>(alias, {
34
+ claim: () => {
35
+ count += 1
36
+ if (count === 1) {
37
+ publish(true)
38
+ }
39
+
40
+ let released = false
41
+ return () => {
42
+ if (released) {
43
+ return
44
+ }
45
+ released = true
46
+ count = Math.max(0, count - 1)
47
+ if (count === 0) {
48
+ publish(false)
49
+ }
50
+ }
51
+ },
52
+
53
+ present: () => count > 0,
54
+ })
55
+
56
+ return service
57
+ }
58
+
59
+ export const appendConsentWidgetService = <C extends ClientConfig, T extends ClientContext<C>>(
60
+ ctx: T, alias: string = CONSENT_WIDGET_SERVICE
61
+ ): T & ConsentWidgetServiceAppend => {
62
+ const _ctx = ctx as T & ConsentWidgetServiceAppend
63
+
64
+ appendStateResource<C, T, ConsentWidgetPresenceRecord>(
65
+ ctx, CONSENT_WIDGET_STATE, { single: true, default: () => ({ present: false }) }
66
+ )
67
+
68
+ if (!_ctx.hasService(alias)) {
69
+ _ctx.registerService(createConsentWidgetService(alias))
70
+ }
71
+
72
+ _ctx.consentWidget = () => _ctx.service(alias)
73
+
74
+ return _ctx
75
+ }
@@ -0,0 +1,31 @@
1
+ import { useCallback } from 'react'
2
+ import { useI18nLib } from '@owlmeans/client-i18n'
3
+ import { consentI18nHelper } from '@owlmeans/web-consent'
4
+
5
+ /**
6
+ * Resolve consent copy through the application first, and the packaged bundle second.
7
+ *
8
+ * The chain matters. `@owlmeans/web-consent` takes `translate` as a prop and, once given one,
9
+ * stops consulting its own translations — so a wrapper that forwarded the framework resolver
10
+ * alone would render the ENGLISH default for every key the application had not overridden, in
11
+ * every language. Falling through to the packaged bundle for the current locale means an
12
+ * application overrides what it wants to and inherits the packaged languages for the rest.
13
+ *
14
+ * Shared by `PanelCookieConsent`/`PanelCookiePolicy` and `PanelConsentMenuWidget` — every
15
+ * `web-panel/consent` surface resolves copy through this one chain.
16
+ */
17
+ export const useConsentTranslate = (
18
+ locale: string, override?: (key: string, defaultValue: string) => string
19
+ ): ((key: string, defaultValue: string) => string) => {
20
+ const t = useI18nLib('consent')
21
+
22
+ return useCallback((key: string, defaultValue: string) => {
23
+ if (override != null) {
24
+ return override(key, defaultValue)
25
+ }
26
+ const packaged = consentI18nHelper.defaultConsentTranslate(locale)(key, defaultValue)
27
+ // `t` answers with whatever it is given when the key is unknown, so the packaged string is
28
+ // what it is given — an application's override wins, and everything else stays translated.
29
+ return t(key, { defaultValue: packaged })
30
+ }, [t, locale, override])
31
+ }
@@ -0,0 +1,6 @@
1
+ import type { CookieConsentProps } from '@owlmeans/web-consent'
2
+
3
+ export interface BoundCookieConsentProps extends CookieConsentProps {
4
+ /** Whether a host menu currently offers the preferences row — see `useConsentMenuPresence`. */
5
+ menuPresent?: boolean
6
+ }
@@ -0,0 +1,43 @@
1
+ import type { ResourceRecord } from '@owlmeans/resource'
2
+ import type { InitializedService } from '@owlmeans/context'
3
+ import type { ConsentDisplayMode, ConsentGeoOptions, ConsentGeoPlugin } from '@owlmeans/web-consent'
4
+
5
+ /**
6
+ * `cfg.cookieConsent` — how the application's cookie consent asks, set where the rest of its
7
+ * configuration is. A prop on `PanelCookieConsent` / `PanelCookiePolicy` always wins.
8
+ */
9
+ export interface PanelCookieConsentConfig {
10
+ /** `bar` (the default) or `window` — see `ConsentDisplayMode`. */
11
+ mode?: ConsentDisplayMode
12
+ /**
13
+ * Ask only where the law requires it. `{ cloudflare: true }` locates the visitor through the
14
+ * Cloudflare edge the application is served from; a locator of the application's own is added in
15
+ * code with `appendConsentGeoPlugin`. See `ConsentGeoOptions`.
16
+ */
17
+ geo?: ConsentGeoOptions
18
+ }
19
+
20
+ /** What `appendConsentGeoPlugin` adds to the context. */
21
+ export interface ConsentGeoPluginAppend {
22
+ /** The application's own locator, registered while the context was configured. */
23
+ consentGeo: () => ConsentGeoPlugin
24
+ }
25
+
26
+ /** A `single`-store presence flag: one record, no id needed. */
27
+ export interface ConsentWidgetPresenceRecord extends ResourceRecord {
28
+ present: boolean
29
+ }
30
+
31
+ export interface ConsentWidgetService extends InitializedService {
32
+ /**
33
+ * Register one mounted cookie-preferences menu row. Returns its release — call it exactly
34
+ * once, on that instance's unmount.
35
+ */
36
+ claim: () => () => void
37
+ /** Whether at least one row is currently mounted anywhere in the app. */
38
+ present: () => boolean
39
+ }
40
+
41
+ export interface ConsentWidgetServiceAppend {
42
+ consentWidget: () => ConsentWidgetService
43
+ }
package/src/context.ts CHANGED
@@ -2,6 +2,8 @@ import { appendFlowService } from '@owlmeans/web-flow'
2
2
  import type { AppConfig , AppContext } from './types.js'
3
3
  import { makeContext as makeClientContext, useContext as useCtx } from '@owlmeans/web-client'
4
4
  import { apiConfigMiddleware } from '@owlmeans/api-config-client'
5
+ import { appendLoginScreen } from './components/login/append.js'
6
+ import { appendSocketStatus } from '@owlmeans/client-socket'
5
7
 
6
8
  export const makeContext = <C extends AppConfig, T extends AppContext<C>>(cfg: C): T => {
7
9
  const context = makeClientContext(cfg) as T
@@ -11,6 +13,16 @@ export const makeContext = <C extends AppConfig, T extends AppContext<C>>(cfg: C
11
13
  appendFlowService<C, T>(context)
12
14
  context.flow = () => context.service('flow')
13
15
 
16
+ // Registered unconditionally — cheap, and it is what lets `SocketReloadDialog` and
17
+ // `useSocketStatus()` work at all. It stays inert for an app that never opts into
18
+ // `cfg.socket.reloadDialog`: nothing renders, and every `ws()`/`useWs()` connection reporting
19
+ // into it costs one map write per state change.
20
+ appendSocketStatus<C, T>(context)
21
+
22
+ // Every app on this package gets the shadcn sign-in screen with no wiring of its own; one that
23
+ // wants its logo on it calls `appendLoginScreen` again, which is idempotent.
24
+ appendLoginScreen<C, T>(context)
25
+
14
26
  return context
15
27
  }
16
28
 
@@ -0,0 +1,172 @@
1
+ import { useEffect, useId, useMemo, useRef, useState } from 'react'
2
+ import type { FC } from 'react'
3
+ import { basicSetup } from 'codemirror'
4
+ import { Compartment, EditorState } from '@codemirror/state'
5
+ import { EditorView } from '@codemirror/view'
6
+ import { syntaxHighlighting } from '@codemirror/language'
7
+ import { json, jsonParseLinter } from '@codemirror/lang-json'
8
+ import { linter } from '@codemirror/lint'
9
+ import { Braces, Check, Copy, LockKeyhole, WrapText } from 'lucide-react'
10
+ import { Button } from '../@/components/ui/button.js'
11
+ import { cn } from '../@/lib/utils.js'
12
+ import { EDITOR_THEME, JSON_HIGHLIGHT, LABELS } from './consts.local.js'
13
+ import type { JsonEditorProps } from './types.js'
14
+
15
+ export const JsonEditor: FC<JsonEditorProps> = ({
16
+ value,
17
+ onChange,
18
+ onValidityChange,
19
+ readOnly = false,
20
+ id,
21
+ ariaLabel = 'JSON',
22
+ testId,
23
+ className,
24
+ minHeight = 120,
25
+ maxHeight = 560,
26
+ labels
27
+ }) => {
28
+ const copy = { ...LABELS, ...labels }
29
+ const errorId = useId()
30
+ const mount = useRef<HTMLDivElement>(null)
31
+ const editor = useRef<EditorView | null>(null)
32
+ const callback = useRef(onChange)
33
+ const external = useRef(false)
34
+ const [access] = useState(() => new Compartment())
35
+ const [attributes] = useState(() => new Compartment())
36
+ const [copied, setCopied] = useState(false)
37
+ const [copyFailed, setCopyFailed] = useState(false)
38
+ const error = useMemo(() => {
39
+ try {
40
+ JSON.parse(value)
41
+ return null
42
+ } catch (cause) {
43
+ return cause instanceof Error ? cause.message : String(cause)
44
+ }
45
+ }, [value])
46
+ callback.current = onChange
47
+
48
+ useEffect(() => {
49
+ if (mount.current == null) return
50
+ const view = new EditorView({
51
+ parent: mount.current,
52
+ doc: value,
53
+ extensions: [
54
+ basicSetup,
55
+ json(),
56
+ linter(jsonParseLinter()),
57
+ EDITOR_THEME,
58
+ syntaxHighlighting(JSON_HIGHLIGHT),
59
+ EditorView.lineWrapping,
60
+ access.of([EditorState.readOnly.of(readOnly), EditorView.editable.of(!readOnly)]),
61
+ attributes.of(EditorView.contentAttributes.of({ 'aria-label': ariaLabel })),
62
+ EditorView.updateListener.of((update) => {
63
+ if (update.docChanged && !external.current) callback.current?.(update.state.doc.toString())
64
+ })
65
+ ]
66
+ })
67
+ editor.current = view
68
+ return () => {
69
+ view.destroy()
70
+ editor.current = null
71
+ }
72
+ }, [])
73
+
74
+ useEffect(() => {
75
+ const view = editor.current
76
+ if (view == null || view.state.doc.toString() === value) return
77
+ external.current = true
78
+ view.dispatch({ changes: { from: 0, to: view.state.doc.length, insert: value } })
79
+ external.current = false
80
+ }, [value])
81
+
82
+ useEffect(() => {
83
+ editor.current?.dispatch({
84
+ effects: [
85
+ access.reconfigure([EditorState.readOnly.of(readOnly), EditorView.editable.of(!readOnly)]),
86
+ attributes.reconfigure(
87
+ EditorView.contentAttributes.of({
88
+ ...(id != null ? { id } : {}),
89
+ ...(testId != null ? { 'data-testid': testId } : {}),
90
+ 'aria-label': ariaLabel,
91
+ 'aria-readonly': String(readOnly),
92
+ 'aria-invalid': String(error != null),
93
+ ...(error != null ? { 'aria-describedby': errorId } : {})
94
+ })
95
+ )
96
+ ]
97
+ })
98
+ }, [readOnly, id, testId, ariaLabel, error])
99
+
100
+ useEffect(() => {
101
+ onValidityChange?.(error == null)
102
+ }, [error, onValidityChange])
103
+ useEffect(() => {
104
+ setCopied(false)
105
+ setCopyFailed(false)
106
+ }, [value])
107
+
108
+ const copyText = async (): Promise<void> => {
109
+ try {
110
+ await navigator.clipboard.writeText(value)
111
+ setCopied(true)
112
+ setCopyFailed(false)
113
+ } catch {
114
+ setCopyFailed(true)
115
+ }
116
+ }
117
+
118
+ return (
119
+ <div
120
+ data-json-editor
121
+ data-valid={error == null}
122
+ className={cn(
123
+ 'min-w-0 overflow-hidden rounded-lg border bg-background text-foreground shadow-xs focus-within:ring-2 focus-within:ring-ring/40',
124
+ error != null && 'border-destructive',
125
+ className
126
+ )}
127
+ >
128
+ <div className="flex min-h-10 flex-wrap items-center justify-between gap-2 border-b bg-muted/50 px-3 py-1">
129
+ <span className="inline-flex items-center gap-2 font-mono text-xs text-muted-foreground">
130
+ <Braces className="size-3.5" aria-hidden="true" />
131
+ JSON
132
+ {readOnly && (
133
+ <span className="inline-flex items-center gap-1 font-sans">
134
+ <LockKeyhole className="size-3" />
135
+ {copy.readOnly}
136
+ </span>
137
+ )}
138
+ </span>
139
+ <div className="flex items-center gap-1">
140
+ {!readOnly && (
141
+ <Button
142
+ type="button"
143
+ size="sm"
144
+ variant="ghost"
145
+ disabled={error != null}
146
+ onClick={() => onChange?.(JSON.stringify(JSON.parse(value), null, 2))}
147
+ >
148
+ <WrapText className="size-3.5" />
149
+ {copy.format}
150
+ </Button>
151
+ )}
152
+ <Button type="button" size="sm" variant="ghost" onClick={() => void copyText()}>
153
+ {copied ? <Check className="size-3.5" /> : <Copy className="size-3.5" />}
154
+ {copied ? copy.copied : copyFailed ? copy.copyFailed : copy.copy}
155
+ </Button>
156
+ </div>
157
+ </div>
158
+ <div
159
+ ref={mount}
160
+ className="[&_.cm-scroller]:max-h-[var(--json-max-height)] [&_.cm-scroller]:min-h-[var(--json-min-height)]"
161
+ style={{ '--json-min-height': `${minHeight}px`, '--json-max-height': `${maxHeight}px` } as React.CSSProperties}
162
+ />
163
+ <div
164
+ className={cn('border-t px-3 py-1.5 text-xs', error != null ? 'text-destructive' : 'text-muted-foreground')}
165
+ aria-live="polite"
166
+ id={errorId}
167
+ >
168
+ {error != null ? `${copy.invalid}: ${error}` : copy.valid}
169
+ </div>
170
+ </div>
171
+ )
172
+ }
@@ -0,0 +1,62 @@
1
+ import { EditorView } from '@codemirror/view'
2
+ import { HighlightStyle } from '@codemirror/language'
3
+ import { tags } from '@lezer/highlight'
4
+ import type { JsonEditorLabels } from './types.js'
5
+
6
+ export const LABELS: JsonEditorLabels = {
7
+ format: 'Format',
8
+ copy: 'Copy',
9
+ copied: 'Copied',
10
+ copyFailed: 'Copy failed',
11
+ readOnly: 'Read only',
12
+ valid: 'Valid JSON',
13
+ invalid: 'Invalid JSON'
14
+ }
15
+
16
+ export const EDITOR_THEME = EditorView.theme({
17
+ '&': {
18
+ backgroundColor: 'var(--background, var(--color-background))',
19
+ color: 'var(--foreground, var(--color-foreground))',
20
+ fontSize: '13px'
21
+ },
22
+ '&.cm-focused': { outline: 'none' },
23
+ '.cm-scroller': { fontFamily: 'ui-monospace, SFMono-Regular, monospace', overflow: 'auto', lineHeight: '1.7' },
24
+ '.cm-content': { padding: '12px 0', caretColor: 'var(--foreground, var(--color-foreground))' },
25
+ '.cm-line': { padding: '0 16px 0 10px' },
26
+ '.cm-gutters': {
27
+ backgroundColor: 'var(--muted, var(--color-muted))',
28
+ color: 'var(--muted-foreground, var(--color-muted-foreground))',
29
+ borderRight: '1px solid var(--border, var(--color-border))'
30
+ },
31
+ '.cm-activeLine, .cm-activeLineGutter': { backgroundColor: 'var(--accent, var(--color-accent))' },
32
+ '.cm-selectionBackground, &.cm-focused .cm-selectionBackground': {
33
+ backgroundColor: 'var(--accent, var(--color-accent))'
34
+ },
35
+ '.cm-cursor': { borderLeftColor: 'var(--foreground, var(--color-foreground))' },
36
+ '.cm-foldPlaceholder, .cm-tooltip': {
37
+ backgroundColor: 'var(--popover, var(--color-popover))',
38
+ color: 'var(--popover-foreground, var(--color-popover-foreground))',
39
+ border: '1px solid var(--border, var(--color-border))'
40
+ },
41
+ '.cm-matchingBracket': {
42
+ backgroundColor: 'var(--accent, var(--color-accent))',
43
+ outline: '1px solid var(--ring, var(--color-ring))'
44
+ }
45
+ })
46
+
47
+ export const JSON_HIGHLIGHT = HighlightStyle.define([
48
+ { tag: tags.propertyName, color: 'var(--primary-bright, var(--color-primary))', fontWeight: '600' },
49
+ { tag: tags.string, color: 'var(--foreground, var(--color-foreground))' },
50
+ {
51
+ tag: tags.number,
52
+ color: 'color-mix(in oklch, var(--chart-3, var(--color-primary)), var(--foreground, var(--color-foreground)) 30%)'
53
+ },
54
+ {
55
+ tag: tags.bool,
56
+ color:
57
+ 'color-mix(in oklch, var(--secondary, var(--color-primary)), var(--foreground, var(--color-foreground)) 20%)',
58
+ fontWeight: '600'
59
+ },
60
+ { tag: tags.null, color: 'var(--muted-foreground, var(--color-muted-foreground))', fontStyle: 'italic' },
61
+ { tag: tags.punctuation, color: 'var(--muted-foreground, var(--color-muted-foreground))' }
62
+ ])
@@ -0,0 +1,2 @@
1
+ export { JsonEditor } from './component.js'
2
+ export type { JsonEditorProps, JsonEditorLabels } from './types.js'
@@ -0,0 +1,24 @@
1
+ export interface JsonEditorLabels {
2
+ format: string
3
+ copy: string
4
+ copied: string
5
+ copyFailed: string
6
+ readOnly: string
7
+ valid: string
8
+ invalid: string
9
+ }
10
+
11
+ /** JSON stays text until the host saves it, including incomplete and invalid drafts. */
12
+ export interface JsonEditorProps {
13
+ value: string
14
+ onChange?: (value: string) => void
15
+ onValidityChange?: (valid: boolean) => void
16
+ readOnly?: boolean
17
+ id?: string
18
+ ariaLabel?: string
19
+ testId?: string
20
+ className?: string
21
+ minHeight?: number
22
+ maxHeight?: number
23
+ labels?: Partial<JsonEditorLabels>
24
+ }
@@ -0,0 +1,5 @@
1
+
2
+ import { entrypoints as webClientBindings } from '@owlmeans/web-client'
3
+ import { entrypoints as configBindings } from '@owlmeans/api-config-client'
4
+
5
+ export const entrypoints = [...webClientBindings, ...configBindings]
package/src/exports.ts CHANGED
@@ -1,14 +1,15 @@
1
1
 
2
- export { handler, useNavigate, useValue, useModule } from '@owlmeans/client'
2
+ export { handler, lazyHandler, lazyComponent, useNavigate, useValue, useEntrypoint } from '@owlmeans/client'
3
+ export type { LazyComponent, LazyComponentOptions, LazyHandler } from '@owlmeans/client'
3
4
  export { config } from '@owlmeans/client-context'
4
5
  export { service } from '@owlmeans/config'
5
- export { guard, parent } from '@owlmeans/entrypoint'
6
6
  export { addWebService } from '@owlmeans/client-config'
7
- export { entrypoint, elevate, provideRequest, stab } from '@owlmeans/client-entrypoint'
7
+ export { bind, bindAll, bindScreen, clientRequestHelper, provideRequest, stab } from '@owlmeans/client-entrypoint'
8
+ export { appendPermissionDeniedToast, PermissionDeniedToast } from './permission/index.js'
8
9
  export type { ClientEntrypoint as Module } from '@owlmeans/client-entrypoint'
9
10
  export { route as croute } from '@owlmeans/client-route'
10
11
  export { route, frontend } from '@owlmeans/route'
11
- export { DEFAULT_ALIAS as DAUTH_GUARD, setupExternalAuthentication } from '@owlmeans/client-auth'
12
+ export { DEFAULT_ALIAS as DAUTH_GUARD, bindExternalAuthentication } from '@owlmeans/client-auth'
12
13
 
13
14
  export { AppType, HOME, ROOT, BASE, GUEST } from '@owlmeans/context'
14
15
 
@@ -16,7 +17,7 @@ export { DISPATCHER, CAUTHEN_FLOW_ENTER } from '@owlmeans/auth'
16
17
  export type { AuthToken } from '@owlmeans/auth'
17
18
 
18
19
  export { composePrefix, useI18n, useI18nApp, useI18nLib, useLanguage } from '@owlmeans/client-i18n'
19
- export { addI18nApp, addI18nLib, SUPPORTED_LNGS } from '@owlmeans/i18n'
20
+ export { addI18nApp, addI18nLib, i18nHelper, SUPPORTED_LNGS } from '@owlmeans/i18n'
20
21
  export { flow, configureFlows } from '@owlmeans/flow'
21
22
  export { QUERY_PARAM as FLOW_PARAM, SERVICE_PARAM, useFlow } from '@owlmeans/web-flow'
22
23
  export { Dispatcher, appendWebAuthService } from '@owlmeans/web-client'
package/src/index.ts CHANGED
@@ -3,7 +3,7 @@ export type * from './types.js'
3
3
  export * from './main.js'
4
4
  export * from './exports.js'
5
5
  export * from './context.js'
6
- export * from './modules.js'
6
+ export * from './entrypoints.js'
7
7
  export * from './components/index.js'
8
8
 
9
9
  export * from '@owlmeans/client-panel'
package/src/main.tsx CHANGED
@@ -1,14 +1,10 @@
1
- import type { RenderOptions, AppContext } from '@owlmeans/web-client'
1
+ import { type AppContext, render as basicRender } from '@owlmeans/web-client'
2
2
  import type { ClientConfig, ClientContext } from '@owlmeans/client-context'
3
- import { render as basicRender } from '@owlmeans/web-client'
4
3
  import type { FC } from 'react'
5
4
  import { useI18nInstance } from '@owlmeans/client-i18n/utils'
6
5
  import detector from 'i18next-browser-languagedetector'
7
6
  import { PanelApp } from './components/panel-app/component.js'
8
-
9
- export interface WebRenderOptions extends RenderOptions {
10
- rootClassName?: string
11
- }
7
+ import type { WebRenderOptions } from './types.js'
12
8
 
13
9
  export const render = <C extends ClientConfig, T extends ClientContext<C>>(context: T, opts?: WebRenderOptions) => {
14
10
  basicRender(<App context={context as unknown as AppContext} rootClassName={opts?.rootClassName}/>, opts)