@supersoniks/concorde 3.1.13 → 3.1.15

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 (353) hide show
  1. package/build-infos.json +1 -1
  2. package/concorde-core.bundle.js +121 -121
  3. package/concorde-core.es.js +986 -969
  4. package/dist/concorde-core.bundle.js +121 -121
  5. package/dist/concorde-core.es.js +986 -969
  6. package/dist/css/docs.css +0 -0
  7. package/dist/fonts/ClashGrotesk-Bold.eot +0 -0
  8. package/dist/fonts/ClashGrotesk-Bold.ttf +0 -0
  9. package/dist/fonts/ClashGrotesk-Bold.woff +0 -0
  10. package/dist/fonts/ClashGrotesk-Bold.woff2 +0 -0
  11. package/dist/fonts/ClashGrotesk-Extralight.eot +0 -0
  12. package/dist/fonts/ClashGrotesk-Extralight.ttf +0 -0
  13. package/dist/fonts/ClashGrotesk-Extralight.woff +0 -0
  14. package/dist/fonts/ClashGrotesk-Extralight.woff2 +0 -0
  15. package/dist/fonts/ClashGrotesk-Light.eot +0 -0
  16. package/dist/fonts/ClashGrotesk-Light.ttf +0 -0
  17. package/dist/fonts/ClashGrotesk-Light.woff +0 -0
  18. package/dist/fonts/ClashGrotesk-Light.woff2 +0 -0
  19. package/dist/fonts/ClashGrotesk-Medium.eot +0 -0
  20. package/dist/fonts/ClashGrotesk-Medium.ttf +0 -0
  21. package/dist/fonts/ClashGrotesk-Medium.woff +0 -0
  22. package/dist/fonts/ClashGrotesk-Medium.woff2 +0 -0
  23. package/dist/fonts/ClashGrotesk-Regular.eot +0 -0
  24. package/dist/fonts/ClashGrotesk-Regular.ttf +0 -0
  25. package/dist/fonts/ClashGrotesk-Regular.woff +0 -0
  26. package/dist/fonts/ClashGrotesk-Regular.woff2 +0 -0
  27. package/dist/fonts/ClashGrotesk-Semibold.eot +0 -0
  28. package/dist/fonts/ClashGrotesk-Semibold.ttf +0 -0
  29. package/dist/fonts/ClashGrotesk-Semibold.woff +0 -0
  30. package/dist/fonts/ClashGrotesk-Semibold.woff2 +0 -0
  31. package/dist/fonts/ClashGrotesk-Variable.eot +0 -0
  32. package/dist/fonts/ClashGrotesk-Variable.ttf +0 -0
  33. package/dist/fonts/ClashGrotesk-Variable.woff +0 -0
  34. package/dist/fonts/ClashGrotesk-Variable.woff2 +0 -0
  35. package/dist/img/concorde-icon.svg +0 -0
  36. package/dist/img/concorde-logo.svg +0 -0
  37. package/dist/img/concorde.png +0 -0
  38. package/dist/img/concorde_def.png +0 -0
  39. package/dist/img/concorde_seuil.png.webp +0 -0
  40. package/dist/img/concorde_seuil_invert.png +0 -0
  41. package/dist/img/paul_metrand.jpg +0 -0
  42. package/dist/img/paul_metrand_xs.jpg +0 -0
  43. package/dist/svg/regular/plane.svg +0 -0
  44. package/dist/svg/solid/plane.svg +0 -0
  45. package/docs/assets/index--bDsd7qW.css +1 -0
  46. package/docs/assets/index-Ce3mr_lI.js +4040 -0
  47. package/docs/css/docs.css +0 -0
  48. package/docs/img/concorde-logo.svg +1 -0
  49. package/docs/img/concorde.png +0 -0
  50. package/docs/img/concorde_def.png +0 -0
  51. package/docs/index.html +132 -0
  52. package/docs/src/core/components/functional/date/date.md +290 -0
  53. package/docs/src/core/components/functional/fetch/fetch.md +117 -0
  54. package/docs/src/core/components/functional/if/if.md +16 -0
  55. package/docs/src/core/components/functional/list/list.md +194 -0
  56. package/docs/src/core/components/functional/mix/mix.md +41 -0
  57. package/docs/src/core/components/functional/queue/queue.md +87 -0
  58. package/docs/src/core/components/functional/router/router.md +112 -0
  59. package/docs/src/core/components/functional/sdui/default-library.json +108 -0
  60. package/docs/src/core/components/functional/sdui/example.json +99 -0
  61. package/docs/src/core/components/functional/sdui/sdui.md +356 -0
  62. package/docs/src/core/components/functional/states/states.md +87 -0
  63. package/docs/src/core/components/functional/submit/submit.md +48 -0
  64. package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
  65. package/docs/src/core/components/functional/value/value.md +35 -0
  66. package/docs/src/core/components/ui/alert/alert.md +121 -0
  67. package/docs/src/core/components/ui/badge/badge.md +102 -0
  68. package/docs/src/core/components/ui/button/button.md +184 -0
  69. package/docs/src/core/components/ui/captcha/captcha.md +12 -0
  70. package/docs/src/core/components/ui/card/card.md +96 -0
  71. package/docs/src/core/components/ui/divider/divider.md +35 -0
  72. package/docs/src/core/components/ui/form/checkbox/checkbox.md +96 -0
  73. package/docs/src/core/components/ui/form/fieldset/fieldset.md +129 -0
  74. package/docs/src/core/components/ui/form/form-actions/form-actions.md +77 -0
  75. package/docs/src/core/components/ui/form/form-layout/form-layout.md +43 -0
  76. package/docs/src/core/components/ui/form/input/input.md +168 -0
  77. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +130 -0
  78. package/docs/src/core/components/ui/form/radio/radio.md +86 -0
  79. package/docs/src/core/components/ui/form/select/select.md +99 -0
  80. package/docs/src/core/components/ui/form/textarea/textarea.md +66 -0
  81. package/docs/src/core/components/ui/group/group.md +75 -0
  82. package/docs/src/core/components/ui/icon/icon.md +125 -0
  83. package/docs/src/core/components/ui/icon/icons.json +1 -0
  84. package/docs/src/core/components/ui/image/image.md +107 -0
  85. package/docs/src/core/components/ui/link/link.md +43 -0
  86. package/docs/src/core/components/ui/loader/loader.md +37 -0
  87. package/docs/src/core/components/ui/menu/menu.md +288 -0
  88. package/docs/src/core/components/ui/modal/modal.md +123 -0
  89. package/docs/src/core/components/ui/pop/pop.md +79 -0
  90. package/docs/src/core/components/ui/progress/progress.md +65 -0
  91. package/docs/src/core/components/ui/table/table.md +467 -0
  92. package/docs/src/core/components/ui/tooltip/tooltip.md +37 -0
  93. package/docs/src/docs/_core-concept/overview.md +57 -0
  94. package/docs/src/docs/_core-concept/subscriber.md +76 -0
  95. package/docs/src/docs/_getting-started/concorde-outside.md +141 -0
  96. package/docs/src/docs/_getting-started/create-a-component.md +137 -0
  97. package/docs/src/docs/_getting-started/pubsub.md +150 -0
  98. package/docs/src/docs/_getting-started/start.md +37 -0
  99. package/docs/src/docs/_getting-started/theming.md +91 -0
  100. package/docs/src/docs/search/docs-search.json +3737 -0
  101. package/docs/src/tag-list.json +1 -0
  102. package/docs/src/tsconfig.json +113 -0
  103. package/docs/svg/regular/plane.svg +1 -0
  104. package/docs/svg/solid/plane.svg +1 -0
  105. package/index.html +0 -0
  106. package/notes de migration.md +0 -0
  107. package/package.json +258 -2
  108. package/postcss.config.cjs +0 -0
  109. package/public/css/docs.css +0 -0
  110. package/public/fonts/ClashGrotesk-Bold.eot +0 -0
  111. package/public/fonts/ClashGrotesk-Bold.ttf +0 -0
  112. package/public/fonts/ClashGrotesk-Bold.woff +0 -0
  113. package/public/fonts/ClashGrotesk-Bold.woff2 +0 -0
  114. package/public/fonts/ClashGrotesk-Extralight.eot +0 -0
  115. package/public/fonts/ClashGrotesk-Extralight.ttf +0 -0
  116. package/public/fonts/ClashGrotesk-Extralight.woff +0 -0
  117. package/public/fonts/ClashGrotesk-Extralight.woff2 +0 -0
  118. package/public/fonts/ClashGrotesk-Light.eot +0 -0
  119. package/public/fonts/ClashGrotesk-Light.ttf +0 -0
  120. package/public/fonts/ClashGrotesk-Light.woff +0 -0
  121. package/public/fonts/ClashGrotesk-Light.woff2 +0 -0
  122. package/public/fonts/ClashGrotesk-Medium.eot +0 -0
  123. package/public/fonts/ClashGrotesk-Medium.ttf +0 -0
  124. package/public/fonts/ClashGrotesk-Medium.woff +0 -0
  125. package/public/fonts/ClashGrotesk-Medium.woff2 +0 -0
  126. package/public/fonts/ClashGrotesk-Regular.eot +0 -0
  127. package/public/fonts/ClashGrotesk-Regular.ttf +0 -0
  128. package/public/fonts/ClashGrotesk-Regular.woff +0 -0
  129. package/public/fonts/ClashGrotesk-Regular.woff2 +0 -0
  130. package/public/fonts/ClashGrotesk-Semibold.eot +0 -0
  131. package/public/fonts/ClashGrotesk-Semibold.ttf +0 -0
  132. package/public/fonts/ClashGrotesk-Semibold.woff +0 -0
  133. package/public/fonts/ClashGrotesk-Semibold.woff2 +0 -0
  134. package/public/fonts/ClashGrotesk-Variable.eot +0 -0
  135. package/public/fonts/ClashGrotesk-Variable.ttf +0 -0
  136. package/public/fonts/ClashGrotesk-Variable.woff +0 -0
  137. package/public/fonts/ClashGrotesk-Variable.woff2 +0 -0
  138. package/public/img/concorde-icon.svg +0 -0
  139. package/public/img/concorde-logo.svg +0 -0
  140. package/public/img/concorde.png +0 -0
  141. package/public/img/concorde_def.png +0 -0
  142. package/public/img/concorde_seuil.png.webp +0 -0
  143. package/public/img/concorde_seuil_invert.png +0 -0
  144. package/public/img/paul_metrand.jpg +0 -0
  145. package/public/img/paul_metrand_xs.jpg +0 -0
  146. package/public/svg/regular/plane.svg +0 -0
  147. package/public/svg/solid/plane.svg +0 -0
  148. package/scripts/create-search.js +0 -0
  149. package/scripts/post-build-docs.js +0 -0
  150. package/scripts/post-build.mjs +0 -0
  151. package/scripts/pre-build.mjs +109 -0
  152. package/src/components.ts +0 -0
  153. package/src/concorde-loaded.ts +0 -0
  154. package/src/core/_types/types.ts +0 -0
  155. package/src/core/components/functional/date/date.md +0 -0
  156. package/src/core/components/functional/date/date.ts +0 -0
  157. package/src/core/components/functional/example/example.ts +0 -0
  158. package/src/core/components/functional/fetch/fetch.md +0 -0
  159. package/src/core/components/functional/fetch/fetch.ts +0 -0
  160. package/src/core/components/functional/functional.ts +0 -0
  161. package/src/core/components/functional/if/if.md +0 -0
  162. package/src/core/components/functional/if/if.test.ts +0 -0
  163. package/src/core/components/functional/if/if.ts +0 -0
  164. package/src/core/components/functional/list/list.md +0 -0
  165. package/src/core/components/functional/list/list.ts +0 -0
  166. package/src/core/components/functional/mix/mix.md +0 -0
  167. package/src/core/components/functional/mix/mix.ts +0 -0
  168. package/src/core/components/functional/queue/queue.md +0 -0
  169. package/src/core/components/functional/queue/queue.ts +0 -0
  170. package/src/core/components/functional/router/redirect.ts +0 -0
  171. package/src/core/components/functional/router/router.md +0 -0
  172. package/src/core/components/functional/router/router.ts +0 -0
  173. package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +0 -0
  174. package/src/core/components/functional/sdui/default-library.json +0 -0
  175. package/src/core/components/functional/sdui/example.json +0 -0
  176. package/src/core/components/functional/sdui/sdui-utils.ts +0 -0
  177. package/src/core/components/functional/sdui/sdui.md +0 -0
  178. package/src/core/components/functional/sdui/sdui.ts +0 -0
  179. package/src/core/components/functional/sdui/types.ts +0 -0
  180. package/src/core/components/functional/sonic-scope/sonic-scope.ts +0 -0
  181. package/src/core/components/functional/states/states.md +0 -0
  182. package/src/core/components/functional/states/states.ts +0 -0
  183. package/src/core/components/functional/submit/submit.md +0 -0
  184. package/src/core/components/functional/submit/submit.ts +3 -0
  185. package/src/core/components/functional/subscriber/subscriber.md +0 -0
  186. package/src/core/components/functional/subscriber/subscriber.ts +0 -0
  187. package/src/core/components/functional/value/value.md +0 -0
  188. package/src/core/components/functional/value/value.ts +0 -0
  189. package/src/core/components/ui/_css/scroll.ts +0 -0
  190. package/src/core/components/ui/_css/size.ts +0 -0
  191. package/src/core/components/ui/_css/type.ts +0 -0
  192. package/src/core/components/ui/alert/alert.md +0 -0
  193. package/src/core/components/ui/alert/alert.ts +0 -0
  194. package/src/core/components/ui/badge/badge.md +0 -0
  195. package/src/core/components/ui/badge/badge.ts +0 -0
  196. package/src/core/components/ui/button/button.md +0 -0
  197. package/src/core/components/ui/button/button.ts +0 -0
  198. package/src/core/components/ui/captcha/captcha.md +0 -0
  199. package/src/core/components/ui/captcha/captcha.ts +0 -0
  200. package/src/core/components/ui/card/card-footer.ts +0 -0
  201. package/src/core/components/ui/card/card-header-descripton.ts +0 -0
  202. package/src/core/components/ui/card/card-header.ts +0 -0
  203. package/src/core/components/ui/card/card-main.ts +0 -0
  204. package/src/core/components/ui/card/card.md +0 -0
  205. package/src/core/components/ui/card/card.ts +0 -0
  206. package/src/core/components/ui/divider/divider.md +0 -0
  207. package/src/core/components/ui/divider/divider.ts +0 -0
  208. package/src/core/components/ui/form/checkbox/checkbox.md +0 -0
  209. package/src/core/components/ui/form/checkbox/checkbox.ts +0 -0
  210. package/src/core/components/ui/form/css/form-control.ts +0 -0
  211. package/src/core/components/ui/form/fieldset/fieldset.md +0 -0
  212. package/src/core/components/ui/form/fieldset/fieldset.ts +0 -0
  213. package/src/core/components/ui/form/fieldset/legend-description.ts +0 -0
  214. package/src/core/components/ui/form/fieldset/legend.ts +0 -0
  215. package/src/core/components/ui/form/form-actions/form-actions.md +0 -0
  216. package/src/core/components/ui/form/form-actions/form-actions.ts +0 -0
  217. package/src/core/components/ui/form/form-layout/form-layout.md +0 -0
  218. package/src/core/components/ui/form/form-layout/form-layout.ts +0 -0
  219. package/src/core/components/ui/form/input/input.md +0 -0
  220. package/src/core/components/ui/form/input/input.ts +0 -0
  221. package/src/core/components/ui/form/input/password-helper.ts +0 -0
  222. package/src/core/components/ui/form/input/same-value-helper.ts +0 -0
  223. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -0
  224. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +0 -0
  225. package/src/core/components/ui/form/radio/radio.md +0 -0
  226. package/src/core/components/ui/form/radio/radio.ts +0 -0
  227. package/src/core/components/ui/form/select/select.md +0 -0
  228. package/src/core/components/ui/form/select/select.ts +0 -0
  229. package/src/core/components/ui/form/textarea/textarea.md +0 -0
  230. package/src/core/components/ui/form/textarea/textarea.ts +0 -0
  231. package/src/core/components/ui/group/group.md +0 -0
  232. package/src/core/components/ui/group/group.ts +0 -0
  233. package/src/core/components/ui/icon/icon.md +0 -0
  234. package/src/core/components/ui/icon/icon.stories.ts +0 -0
  235. package/src/core/components/ui/icon/icon.ts +0 -0
  236. package/src/core/components/ui/icon/icons.json +0 -0
  237. package/src/core/components/ui/icon/icons.ts +0 -0
  238. package/src/core/components/ui/icon/svgs/cancel.svg +0 -0
  239. package/src/core/components/ui/icon/svgs/check-circled-outline.svg +0 -0
  240. package/src/core/components/ui/icon/svgs/check.svg +0 -0
  241. package/src/core/components/ui/icon/svgs/emoji-puzzled.svg +0 -0
  242. package/src/core/components/ui/icon/svgs/info-empty.svg +0 -0
  243. package/src/core/components/ui/icon/svgs/loader.svg +0 -0
  244. package/src/core/components/ui/icon/svgs/minus-small.svg +0 -0
  245. package/src/core/components/ui/icon/svgs/more-horiz.svg +0 -0
  246. package/src/core/components/ui/icon/svgs/more-vert.svg +0 -0
  247. package/src/core/components/ui/icon/svgs/nav-arrow-down.svg +0 -0
  248. package/src/core/components/ui/icon/svgs/warning-circled-outline.svg +0 -0
  249. package/src/core/components/ui/image/image.md +0 -0
  250. package/src/core/components/ui/image/image.ts +0 -0
  251. package/src/core/components/ui/link/link.md +0 -0
  252. package/src/core/components/ui/link/link.ts +0 -0
  253. package/src/core/components/ui/loader/loader.md +0 -0
  254. package/src/core/components/ui/loader/loader.stories.ts +0 -0
  255. package/src/core/components/ui/loader/loader.ts +0 -0
  256. package/src/core/components/ui/loader/styles/fixed.ts +0 -0
  257. package/src/core/components/ui/loader/styles/inline.ts +0 -0
  258. package/src/core/components/ui/menu/menu-item.ts +0 -0
  259. package/src/core/components/ui/menu/menu.md +0 -0
  260. package/src/core/components/ui/menu/menu.ts +0 -0
  261. package/src/core/components/ui/modal/modal-actions.ts +0 -0
  262. package/src/core/components/ui/modal/modal-close.ts +0 -0
  263. package/src/core/components/ui/modal/modal-content.ts +0 -0
  264. package/src/core/components/ui/modal/modal-subtitle.ts +0 -0
  265. package/src/core/components/ui/modal/modal-title.ts +0 -0
  266. package/src/core/components/ui/modal/modal.md +0 -0
  267. package/src/core/components/ui/modal/modal.stories.ts +0 -0
  268. package/src/core/components/ui/modal/modal.ts +0 -0
  269. package/src/core/components/ui/pop/pop.md +0 -0
  270. package/src/core/components/ui/pop/pop.ts +0 -0
  271. package/src/core/components/ui/progress/progress.md +0 -0
  272. package/src/core/components/ui/progress/progress.ts +0 -0
  273. package/src/core/components/ui/table/table-caption.ts +0 -0
  274. package/src/core/components/ui/table/table-tbody.ts +0 -0
  275. package/src/core/components/ui/table/table-td.ts +0 -0
  276. package/src/core/components/ui/table/table-tfoot.ts +0 -0
  277. package/src/core/components/ui/table/table-th.ts +0 -0
  278. package/src/core/components/ui/table/table-thead.ts +0 -0
  279. package/src/core/components/ui/table/table-tr.ts +0 -0
  280. package/src/core/components/ui/table/table.md +0 -0
  281. package/src/core/components/ui/table/table.ts +0 -0
  282. package/src/core/components/ui/theme/theme-collection/core-variables.ts +0 -0
  283. package/src/core/components/ui/theme/theme-collection/dark.ts +0 -0
  284. package/src/core/components/ui/theme/theme-collection/light.ts +0 -0
  285. package/src/core/components/ui/theme/theme.ts +0 -0
  286. package/src/core/components/ui/toast/message-subscriber.stories.ts +0 -0
  287. package/src/core/components/ui/toast/message-subscriber.ts +0 -0
  288. package/src/core/components/ui/toast/toast-item.ts +0 -0
  289. package/src/core/components/ui/toast/toast.ts +1 -1
  290. package/src/core/components/ui/toast/types.ts +0 -0
  291. package/src/core/components/ui/tooltip/tooltip.md +0 -0
  292. package/src/core/components/ui/tooltip/tooltip.ts +0 -0
  293. package/src/core/components/ui/ui.ts +0 -0
  294. package/src/core/core.ts +1 -0
  295. package/src/core/decorators/Subscriber.ts +0 -0
  296. package/src/core/directives/DataProvider.ts +0 -0
  297. package/src/core/directives/Wording.ts +0 -0
  298. package/src/core/mixins/Fetcher.ts +0 -0
  299. package/src/core/mixins/FormCheckable.ts +0 -0
  300. package/src/core/mixins/FormElement.ts +0 -0
  301. package/src/core/mixins/FormInput.ts +0 -0
  302. package/src/core/mixins/Subscriber.ts +0 -0
  303. package/src/core/mixins/TemplatesContainer.ts +0 -0
  304. package/src/core/mixins/mixins.ts +0 -0
  305. package/src/core/utils/Arrays.ts +0 -0
  306. package/src/core/utils/DataBindObserver.ts +0 -0
  307. package/src/core/utils/Electron.ts +0 -0
  308. package/src/core/utils/Format.ts +0 -0
  309. package/src/core/utils/HTML.ts +0 -0
  310. package/src/core/utils/LocationHandler.ts +0 -0
  311. package/src/core/utils/Objects.ts +0 -0
  312. package/src/core/utils/PublisherProxy.ts +0 -0
  313. package/src/core/utils/Utils.ts +0 -0
  314. package/src/core/utils/api.ts +0 -0
  315. package/src/core/utils/route.ts +149 -0
  316. package/src/core/utils/url-pattern.ts +0 -0
  317. package/src/decorators.ts +0 -0
  318. package/src/directives.ts +0 -0
  319. package/src/docs/_core-concept/overview.md +0 -0
  320. package/src/docs/_core-concept/subscriber.md +0 -0
  321. package/src/docs/_getting-started/concorde-outside.md +0 -0
  322. package/src/docs/_getting-started/create-a-component.md +0 -0
  323. package/src/docs/_getting-started/my-first-subscriber.md +0 -0
  324. package/src/docs/_getting-started/pubsub.md +0 -0
  325. package/src/docs/_getting-started/start.md +0 -0
  326. package/src/docs/_getting-started/theming.md +0 -0
  327. package/src/docs/code.ts +0 -0
  328. package/src/docs/docs.ts +0 -0
  329. package/src/docs/example/users.ts +0 -0
  330. package/src/docs/header/header.ts +0 -0
  331. package/src/docs/navigation/navigation.ts +0 -0
  332. package/src/docs/prism/index.ts +0 -0
  333. package/src/docs/prism/prism.css +0 -0
  334. package/src/docs/prism/prism.js +0 -0
  335. package/src/docs/search/docs-search.json +0 -0
  336. package/src/docs/search/markdown-renderer.ts +0 -0
  337. package/src/docs/search/page.ts +0 -0
  338. package/src/docs/search/search.ts +0 -0
  339. package/src/docs/tailwind/css/tailwind.css +0 -0
  340. package/src/docs/tailwind/css/tailwind.d.ts +0 -0
  341. package/src/docs/tailwind/index.ts +0 -0
  342. package/src/docs.ts +0 -0
  343. package/src/index.ts +0 -0
  344. package/src/mixins.ts +0 -0
  345. package/src/tag-list.json +0 -0
  346. package/src/test-utils/TestUtils.ts +0 -0
  347. package/src/tsconfig-model.json +19 -0
  348. package/src/tsconfig.json +794 -109
  349. package/src/utils.ts +0 -0
  350. package/tailwind.config.js +0 -0
  351. package/test-utils/TestUtils.ts +0 -0
  352. package/vite/config.js +145 -21
  353. package/vite.config.mts +0 -0
@@ -0,0 +1,149 @@
1
+ import { URLPattern } from "@supersoniks/concorde/utils";
2
+
3
+ export type RouteArgs = {
4
+ propertyMap?: object;
5
+ query?: object;
6
+ hash?: string;
7
+ };
8
+ export class Route<RoutesData = any> {
9
+ private route: string = "";
10
+ constructor(name?: keyof RoutesData) {
11
+ if (!name) {
12
+ return;
13
+ }
14
+ this.route = Routes.get(name);
15
+ }
16
+
17
+ extract() {
18
+ const pattern = new URLPattern("(/)*" + this.route + "*");
19
+ const currentUrl = window.location.href.replace(window.location.origin, "");
20
+ const matches = pattern.match(currentUrl);
21
+ return matches;
22
+ }
23
+
24
+ matchesLocation() {
25
+ return this.extract() !== null;
26
+ }
27
+
28
+ fill(properties: Object) {
29
+ this.route = new URLPattern(this.route).stringify(properties);
30
+ return this;
31
+ }
32
+ query(query: Object) {
33
+ const url = new URL(this.route, window.location.origin);
34
+ Object.entries(query).forEach(([key, value]) => {
35
+ url.searchParams.set(key, value);
36
+ });
37
+ this.route = url.href.replace(window.location.origin, "");
38
+ return this;
39
+ }
40
+ hash(hash: string) {
41
+ const url = new URL(this.route, window.location.origin);
42
+ url.hash = hash;
43
+ this.route = url.href.replace(window.location.origin, "");
44
+ return this;
45
+ }
46
+ appendPath(pathname?: string) {
47
+ if (!pathname) {
48
+ return this;
49
+ }
50
+ const url = new URL(this.route, window.location.origin);
51
+ url.pathname = url.pathname.replace(/\/$/, "");
52
+ if (!pathname.startsWith("/")) {
53
+ pathname = "/" + pathname;
54
+ }
55
+ url.pathname += pathname;
56
+ this.route = url.href.replace(window.location.origin, "");
57
+ return this;
58
+ }
59
+ toString() {
60
+ return this.route;
61
+ }
62
+ valueOf() {
63
+ return this.route;
64
+ }
65
+ hasHash() {
66
+ const url = new URL(this.route, window.location.origin);
67
+ return url.hash !== "";
68
+ }
69
+ getHash() {
70
+ const url = new URL(this.route, window.location.origin);
71
+ return url.hash;
72
+ }
73
+ hasSameBaseAs(route?: Route) {
74
+ if (!route) {
75
+ return false;
76
+ }
77
+ const url = new URL(this.route, window.location.origin);
78
+ const url2 = new URL(route.route, window.location.origin);
79
+ return url.origin + url.pathname === url2.origin + url2.pathname;
80
+ }
81
+ goTo() {
82
+ window.location.href = this.route;
83
+ }
84
+ }
85
+
86
+ export class Routes {
87
+ private static routes = {};
88
+
89
+ static register<RouteData = any>(
90
+ routes: Partial<RouteData>,
91
+ baseUrlOrOpt: { baseUrl?: string; prefix?: string } | string = "",
92
+ prefix = ""
93
+ ) {
94
+ const newRoutes: Partial<RouteData> = {};
95
+ Object.keys(routes).forEach((key) => {
96
+ const name = key as keyof RouteData & string;
97
+ let route = routes[name] as string;
98
+ let baseUrl = "";
99
+ if (baseUrlOrOpt) {
100
+ if (typeof baseUrlOrOpt === "string") {
101
+ baseUrl = baseUrlOrOpt;
102
+ } else {
103
+ baseUrl = baseUrlOrOpt.baseUrl || "";
104
+ prefix = prefix || baseUrlOrOpt.prefix || "";
105
+ }
106
+ }
107
+ if (baseUrl && !route.includes(baseUrl)) {
108
+ route = baseUrl + "/" + route;
109
+ route = route?.replace(/\/+/g, "/");
110
+ route = route?.replace(/\/#/g, "#");
111
+ }
112
+ newRoutes[(prefix + name) as keyof RouteData] =
113
+ route as RouteData[keyof RouteData];
114
+ });
115
+ Routes.routes = { ...Routes.routes, ...newRoutes } as Partial<RouteData>;
116
+ }
117
+ static get<RouteData extends Record<keyof RouteData, string | undefined>>(
118
+ name: keyof RouteData,
119
+ args?: RouteArgs
120
+ ) {
121
+ const routes = Routes.routes as Partial<RouteData>;
122
+ let route = routes[name] || "";
123
+ if (args?.propertyMap) {
124
+ route = new URLPattern(route).stringify(args.propertyMap);
125
+ }
126
+ const url = new URL(
127
+ route,
128
+ route.startsWith("#") ? window.location.href : window.location.origin
129
+ );
130
+ if (args?.query) {
131
+ Object.entries(args.query).forEach(([key, value]) => {
132
+ url.searchParams.set(key, value);
133
+ });
134
+ }
135
+ if (args?.hash) {
136
+ url.hash = args.hash;
137
+ }
138
+
139
+ return url.href.replace(window.location.origin, "");
140
+ }
141
+
142
+ static fillURLPattern(route: string, properties: Object) {
143
+ return new URLPattern(route).stringify(properties);
144
+ }
145
+ }
146
+
147
+ export const route = <RouteData>(name?: keyof RouteData) => {
148
+ return new Route<RouteData>(name);
149
+ };
File without changes
package/src/decorators.ts CHANGED
File without changes
package/src/directives.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/docs/code.ts CHANGED
File without changes
package/src/docs/docs.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/docs.ts CHANGED
File without changes
package/src/index.ts CHANGED
File without changes
package/src/mixins.ts CHANGED
File without changes
package/src/tag-list.json CHANGED
File without changes
File without changes
@@ -0,0 +1,19 @@
1
+ {
2
+ "exclude": ["node_modules/**/*", "dist/**/*", "vite.config.mts", "docs.ts", "docs/*"],
3
+ "compilerOptions": {
4
+ "target": "es2021",
5
+ "experimentalDecorators": true,
6
+ "useDefineForClassFields": false,
7
+ "module": "esnext",
8
+ "moduleResolution": "bundler",
9
+ "paths": {
10
+ "@supersoniks/concorde/*":["./*"]
11
+ },
12
+ "resolveJsonModule": true,
13
+ "noEmit": true,
14
+ "esModuleInterop": true,
15
+ "forceConsistentCasingInFileNames": true,
16
+ "strict": true,
17
+ "skipLibCheck": true
18
+ }
19
+ }