@mojawork/ui-docs 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/README.md +22 -0
  2. package/bin/serve.mjs +73 -0
  3. package/catalog/atoms/background.md +130 -0
  4. package/catalog/atoms/barcode.md +285 -0
  5. package/catalog/atoms/buzzer.md +210 -0
  6. package/catalog/atoms/card.md +174 -0
  7. package/catalog/atoms/chart.md +236 -0
  8. package/catalog/atoms/clock.md +252 -0
  9. package/catalog/atoms/copy-value.md +203 -0
  10. package/catalog/atoms/image-grid.md +208 -0
  11. package/catalog/atoms/image-slider.md +216 -0
  12. package/catalog/atoms/lang-selector.md +237 -0
  13. package/catalog/atoms/mosaic.md +366 -0
  14. package/catalog/atoms/placeholder.md +157 -0
  15. package/catalog/atoms/qr-code.md +334 -0
  16. package/catalog/atoms/rating.md +176 -0
  17. package/catalog/atoms/reader-doc.md +404 -0
  18. package/catalog/atoms/text-animate.md +122 -0
  19. package/catalog/atoms/thumb.md +153 -0
  20. package/catalog/atoms/timer.md +111 -0
  21. package/catalog/atoms/typewriter.md +132 -0
  22. package/catalog/cdk/splitter.md +63 -0
  23. package/catalog/cdk/table.md +188 -0
  24. package/catalog/forms/autocomplete.md +304 -0
  25. package/catalog/forms/checkbox.md +218 -0
  26. package/catalog/forms/input.md +193 -0
  27. package/catalog/forms/slider.md +142 -0
  28. package/catalog/forms/switch.md +188 -0
  29. package/catalog/guide.json +1209 -0
  30. package/catalog/layout/header.md +167 -0
  31. package/catalog/layout/main.md +158 -0
  32. package/catalog/layout/media-screen.md +163 -0
  33. package/catalog/layout/nav.md +181 -0
  34. package/catalog/layout/overlay.md +256 -0
  35. package/catalog/layout/spinner.md +94 -0
  36. package/catalog/layout/splitter.md +331 -0
  37. package/catalog/layout/tabs.md +144 -0
  38. package/catalog/layout/top-scroll-bottom.md +98 -0
  39. package/catalog/manifest.json +482 -0
  40. package/catalog/mcp.json +44 -0
  41. package/catalog/molecules/image-editor.md +285 -0
  42. package/catalog/usage.md +137 -0
  43. package/catalog/version.json +4 -0
  44. package/package.json +10 -0
  45. package/storybook/1183.da25800b.iframe.bundle.js +1 -0
  46. package/storybook/1255.2abec879.iframe.bundle.js +2 -0
  47. package/storybook/1255.2abec879.iframe.bundle.js.LICENSE.txt +5 -0
  48. package/storybook/1516.52d2dae7.iframe.bundle.js +2 -0
  49. package/storybook/1516.52d2dae7.iframe.bundle.js.LICENSE.txt +5 -0
  50. package/storybook/2033.c705a7ce.iframe.bundle.js +1 -0
  51. package/storybook/2089.32694489.iframe.bundle.js +1 -0
  52. package/storybook/2096.431fc8f5.iframe.bundle.js +1 -0
  53. package/storybook/2127.29f153d2.iframe.bundle.js +2 -0
  54. package/storybook/2127.29f153d2.iframe.bundle.js.LICENSE.txt +7 -0
  55. package/storybook/2228.77650ef1.iframe.bundle.js +2 -0
  56. package/storybook/2228.77650ef1.iframe.bundle.js.LICENSE.txt +1 -0
  57. package/storybook/2249.6e6782ab.iframe.bundle.js +1 -0
  58. package/storybook/2639.29baa8af.iframe.bundle.js +1 -0
  59. package/storybook/2844.c9f47654.iframe.bundle.js +1 -0
  60. package/storybook/2971.edb202b4.iframe.bundle.js +1 -0
  61. package/storybook/3899.55560628.iframe.bundle.js +2 -0
  62. package/storybook/3899.55560628.iframe.bundle.js.LICENSE.txt +5 -0
  63. package/storybook/3968.69b812e4.iframe.bundle.js +1 -0
  64. package/storybook/4255.eeeaf087.iframe.bundle.js +111 -0
  65. package/storybook/4255.eeeaf087.iframe.bundle.js.LICENSE.txt +49 -0
  66. package/storybook/4255.eeeaf087.iframe.bundle.js.map +1 -0
  67. package/storybook/4425.368129b3.iframe.bundle.js +2 -0
  68. package/storybook/4425.368129b3.iframe.bundle.js.LICENSE.txt +5 -0
  69. package/storybook/4476.f8e4115f.iframe.bundle.js +1 -0
  70. package/storybook/4495.d1c8cc8d.iframe.bundle.js +1 -0
  71. package/storybook/4555.066c242d.iframe.bundle.js +1 -0
  72. package/storybook/4755.e4656207.iframe.bundle.js +23 -0
  73. package/storybook/4755.e4656207.iframe.bundle.js.LICENSE.txt +14 -0
  74. package/storybook/4755.e4656207.iframe.bundle.js.map +1 -0
  75. package/storybook/4935.8959522b.iframe.bundle.js +1 -0
  76. package/storybook/5568.c6172f92.iframe.bundle.js +1 -0
  77. package/storybook/5944.810cb147.iframe.bundle.js +1 -0
  78. package/storybook/6115.7f1470ef.iframe.bundle.js +1 -0
  79. package/storybook/6169.eaeed989.iframe.bundle.js +2 -0
  80. package/storybook/6169.eaeed989.iframe.bundle.js.LICENSE.txt +5 -0
  81. package/storybook/6202.b8ca0e90.iframe.bundle.js +2 -0
  82. package/storybook/6202.b8ca0e90.iframe.bundle.js.LICENSE.txt +5 -0
  83. package/storybook/660.18f0458e.iframe.bundle.js +1 -0
  84. package/storybook/6824.f5eb8bb7.iframe.bundle.js +1 -0
  85. package/storybook/7316.5b024e94.iframe.bundle.js +1 -0
  86. package/storybook/7749.2a853795.iframe.bundle.js +1 -0
  87. package/storybook/8051.719eb790.iframe.bundle.js +1 -0
  88. package/storybook/813.805c1e5f.iframe.bundle.js +1 -0
  89. package/storybook/8448.1baeb046.iframe.bundle.js +1 -0
  90. package/storybook/871.428deceb.iframe.bundle.js +1 -0
  91. package/storybook/8819.220ca21d.iframe.bundle.js +1 -0
  92. package/storybook/9045.a50616e9.iframe.bundle.js +2 -0
  93. package/storybook/9045.a50616e9.iframe.bundle.js.LICENSE.txt +5 -0
  94. package/storybook/9560.668052f3.iframe.bundle.js +7 -0
  95. package/storybook/9560.668052f3.iframe.bundle.js.map +1 -0
  96. package/storybook/973.67f44bb0.iframe.bundle.js +1 -0
  97. package/storybook/9850.28367747.iframe.bundle.js +1 -0
  98. package/storybook/9946.36014b4e.iframe.bundle.js +1 -0
  99. package/storybook/MaterialIcons-Regular.woff2 +0 -0
  100. package/storybook/MaterialIconsOutlined-Regular.woff2 +0 -0
  101. package/storybook/PetMe64.ttf +0 -0
  102. package/storybook/_external-mwork-banner-docs-mdx.0d5549a0.iframe.bundle.js +1 -0
  103. package/storybook/_external-mwork-banner-mwork-banner-stories.d44f6917.iframe.bundle.js +1 -0
  104. package/storybook/_external-mwork-basic-interpreter-docs-mdx.03c6205c.iframe.bundle.js +1 -0
  105. package/storybook/_external-mwork-basic-interpreter-mwork-basic-interpreter-stories.3252a9b8.iframe.bundle.js +1 -0
  106. package/storybook/_external-mwork-music-player-docs-mdx.6f943768.iframe.bundle.js +1 -0
  107. package/storybook/_external-mwork-music-player-mwork-music-player-stories.08fbf651.iframe.bundle.js +1 -0
  108. package/storybook/assets/fonts/PETME64-LICENSE.txt +20 -0
  109. package/storybook/assets/fonts/PetMe64.ttf +0 -0
  110. package/storybook/assets/fonts/icons/MaterialIcons-Regular.woff2 +0 -0
  111. package/storybook/assets/fonts/icons/MaterialIconsOutlined-Regular.woff2 +0 -0
  112. package/storybook/assets/ui/documents/demo.pdf +42 -0
  113. package/storybook/assets/ui/i18n/de-DE.json +1 -0
  114. package/storybook/assets/ui/i18n/en-EN.json +2 -0
  115. package/storybook/assets/ui/i18n/ui/de-DE.json +95 -0
  116. package/storybook/assets/ui/i18n/ui/en-EN.json +95 -0
  117. package/storybook/assets/ui/images/600x600.png +0 -0
  118. package/storybook/assets/ui/images/600x800.png +0 -0
  119. package/storybook/assets/ui/images/800x600.png +0 -0
  120. package/storybook/assets/ui/images/unknown.gif +0 -0
  121. package/storybook/atoms-_electrons-form-error-message-docs-mdx.5b9e78fe.iframe.bundle.js +1 -0
  122. package/storybook/atoms-_electrons-form-error-message-form-error-message-component-stories.7f749acc.iframe.bundle.js +1 -0
  123. package/storybook/atoms-background-background-component-stories.b6b50c0c.iframe.bundle.js +1 -0
  124. package/storybook/atoms-background-docs-mdx.4f102c17.iframe.bundle.js +1 -0
  125. package/storybook/atoms-barcode-barcode-component-stories.dc462559.iframe.bundle.js +1 -0
  126. package/storybook/atoms-barcode-docs-mdx.b74c501b.iframe.bundle.js +1 -0
  127. package/storybook/atoms-buzzer-buzzer-component-stories.13ee130d.iframe.bundle.js +1 -0
  128. package/storybook/atoms-buzzer-docs-mdx.23eb1913.iframe.bundle.js +1 -0
  129. package/storybook/atoms-card-card-component-stories.065b34e9.iframe.bundle.js +1 -0
  130. package/storybook/atoms-card-docs-mdx.7d276114.iframe.bundle.js +1 -0
  131. package/storybook/atoms-chart-chart-component-stories.5247b7cb.iframe.bundle.js +1 -0
  132. package/storybook/atoms-chart-docs-mdx.204609d4.iframe.bundle.js +1 -0
  133. package/storybook/atoms-clock-clock-component-stories.d1464731.iframe.bundle.js +1 -0
  134. package/storybook/atoms-clock-docs-mdx.501e6780.iframe.bundle.js +1 -0
  135. package/storybook/atoms-copy-value-copy-value-component-stories.58d3956a.iframe.bundle.js +1 -0
  136. package/storybook/atoms-copy-value-docs-mdx.f404dcd2.iframe.bundle.js +1 -0
  137. package/storybook/atoms-image-grid-docs-mdx.18b4df2a.iframe.bundle.js +1 -0
  138. package/storybook/atoms-image-grid-image-grid-component-stories.a0a92d9e.iframe.bundle.js +1 -0
  139. package/storybook/atoms-image-slider-docs-mdx.c616bb37.iframe.bundle.js +1 -0
  140. package/storybook/atoms-image-slider-image-slider-component-stories.484b9c41.iframe.bundle.js +1 -0
  141. package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js +2 -0
  142. package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js.LICENSE.txt +5 -0
  143. package/storybook/atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js +2 -0
  144. package/storybook/atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js.LICENSE.txt +5 -0
  145. package/storybook/atoms-mosaic-docs-mdx.1aebfbdf.iframe.bundle.js +1 -0
  146. package/storybook/atoms-mosaic-mosaic-component-stories.0a6bc043.iframe.bundle.js +1 -0
  147. package/storybook/atoms-placeholder-docs-mdx.cd2f3976.iframe.bundle.js +1 -0
  148. package/storybook/atoms-placeholder-placeholder-component-stories.bc221534.iframe.bundle.js +1 -0
  149. package/storybook/atoms-qr-code-docs-mdx.4202568d.iframe.bundle.js +1 -0
  150. package/storybook/atoms-qr-code-qr-code-component-stories.5018e2b0.iframe.bundle.js +1 -0
  151. package/storybook/atoms-rating-docs-mdx.32fa4104.iframe.bundle.js +1 -0
  152. package/storybook/atoms-rating-rating-component-stories.982db47d.iframe.bundle.js +1 -0
  153. package/storybook/atoms-reader-doc-docs-mdx.0688c3b9.iframe.bundle.js +1 -0
  154. package/storybook/atoms-reader-doc-reader-doc-component-stories.a6fec57d.iframe.bundle.js +1 -0
  155. package/storybook/atoms-text-animate-docs-mdx.05e1baf4.iframe.bundle.js +1 -0
  156. package/storybook/atoms-text-animate-text-animate-component-stories.8041c0f1.iframe.bundle.js +1 -0
  157. package/storybook/atoms-thumb-docs-mdx.2143ad01.iframe.bundle.js +1 -0
  158. package/storybook/atoms-thumb-thumb-component-stories.06f51d03.iframe.bundle.js +1 -0
  159. package/storybook/atoms-timer-docs-mdx.6f724cc8.iframe.bundle.js +1 -0
  160. package/storybook/atoms-timer-timer-component-stories.9bee1037.iframe.bundle.js +1 -0
  161. package/storybook/atoms-typewriter-docs-mdx.3b1088c0.iframe.bundle.js +1 -0
  162. package/storybook/atoms-typewriter-typewriter-component-stories.4fefc019.iframe.bundle.js +1 -0
  163. package/storybook/cdk-components-drag-and-drop-splitter-docs-mdx.f12088fd.iframe.bundle.js +1 -0
  164. package/storybook/cdk-components-drag-and-drop-splitter-splitter-component-stories.286b5171.iframe.bundle.js +1 -0
  165. package/storybook/cdk-components-table-docs-mdx.cc2c11e7.iframe.bundle.js +1 -0
  166. package/storybook/cdk-components-table-table-component-stories.db9212fd.iframe.bundle.js +1 -0
  167. package/storybook/examples-burger-menu-stories.0a083a75.iframe.bundle.js +1 -0
  168. package/storybook/examples-docs-mdx.3111f2c6.iframe.bundle.js +1 -0
  169. package/storybook/examples-image-grid-slider-docs-mdx.9e38157e.iframe.bundle.js +1 -0
  170. package/storybook/examples-image-grid-slider-image-grid-slider-stories.028c8c2b.iframe.bundle.js +1 -0
  171. package/storybook/examples-layout-docs-mdx.bbacdfd2.iframe.bundle.js +1 -0
  172. package/storybook/examples-layout-layout-stories.05cd891f.iframe.bundle.js +1 -0
  173. package/storybook/examples-table-edit-focus-docs-mdx.3c0d1611.iframe.bundle.js +1 -0
  174. package/storybook/examples-table-edit-focus-table-edit-focus-stories.c79e214a.iframe.bundle.js +1 -0
  175. package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js +2 -0
  176. package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js.LICENSE.txt +5 -0
  177. package/storybook/examples-transloco-transloco-component-stories.5baea2e2.iframe.bundle.js +2 -0
  178. package/storybook/examples-transloco-transloco-component-stories.5baea2e2.iframe.bundle.js.LICENSE.txt +5 -0
  179. package/storybook/favicon-wrapper.svg +46 -0
  180. package/storybook/favicon.svg +1 -0
  181. package/storybook/forms-autocomplete-autocomplete-component-stories.443544e0.iframe.bundle.js +2 -0
  182. package/storybook/forms-autocomplete-autocomplete-component-stories.443544e0.iframe.bundle.js.LICENSE.txt +5 -0
  183. package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js +2 -0
  184. package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js.LICENSE.txt +5 -0
  185. package/storybook/forms-autofocus-autofocus-stories.2e94d887.iframe.bundle.js +1 -0
  186. package/storybook/forms-autofocus-docs-mdx.39611362.iframe.bundle.js +1 -0
  187. package/storybook/forms-checkbox-checkbox-component-stories.d45b4f0d.iframe.bundle.js +1 -0
  188. package/storybook/forms-checkbox-docs-mdx.74036eb7.iframe.bundle.js +1 -0
  189. package/storybook/forms-input-docs-mdx.72d0e99a.iframe.bundle.js +1 -0
  190. package/storybook/forms-input-input-component-stories.609db3f0.iframe.bundle.js +1 -0
  191. package/storybook/forms-slider-docs-mdx.120cefc6.iframe.bundle.js +1 -0
  192. package/storybook/forms-slider-slider-component-stories.058fb9b1.iframe.bundle.js +1 -0
  193. package/storybook/forms-switch-docs-mdx.9d58a341.iframe.bundle.js +1 -0
  194. package/storybook/forms-switch-switch-component-stories.bf67d7c9.iframe.bundle.js +1 -0
  195. package/storybook/forms-validators-docs-mdx.ebb47a43.iframe.bundle.js +1 -0
  196. package/storybook/forms-validators-validators-component-stories.9525f97b.iframe.bundle.js +1 -0
  197. package/storybook/home-guide-mdx.1a176b15.iframe.bundle.js +1 -0
  198. package/storybook/home-overview-mdx.d0cf448a.iframe.bundle.js +1 -0
  199. package/storybook/home-tips-mdx.26df81d8.iframe.bundle.js +1 -0
  200. package/storybook/home-usage-mdx.7ba89dd0.iframe.bundle.js +1 -0
  201. package/storybook/iframe.html +558 -0
  202. package/storybook/index.html +155 -0
  203. package/storybook/index.json +1 -0
  204. package/storybook/layout-main-docs-mdx.4c9208c5.iframe.bundle.js +1 -0
  205. package/storybook/layout-main-main-component-stories.788c0c54.iframe.bundle.js +1 -0
  206. package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js +2 -0
  207. package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js.LICENSE.txt +5 -0
  208. package/storybook/layout-media-screen-media-screen-component-stories.7941c064.iframe.bundle.js +2 -0
  209. package/storybook/layout-media-screen-media-screen-component-stories.7941c064.iframe.bundle.js.LICENSE.txt +5 -0
  210. package/storybook/layout-nav-docs-mdx.cc919f94.iframe.bundle.js +1 -0
  211. package/storybook/layout-nav-nav-component-stories.766738fc.iframe.bundle.js +1 -0
  212. package/storybook/layout-overlay-docs-mdx.823351e0.iframe.bundle.js +1 -0
  213. package/storybook/layout-overlay-header-docs-mdx.394033ca.iframe.bundle.js +1 -0
  214. package/storybook/layout-overlay-header-header-component-stories.5eaef192.iframe.bundle.js +1 -0
  215. package/storybook/layout-overlay-overlay-component-stories.01f6cd84.iframe.bundle.js +1 -0
  216. package/storybook/layout-spinner-docs-mdx.4be572c0.iframe.bundle.js +1 -0
  217. package/storybook/layout-spinner-spinner-component-stories.ab8245c6.iframe.bundle.js +1 -0
  218. package/storybook/layout-splitter-docs-mdx.bf161b39.iframe.bundle.js +1 -0
  219. package/storybook/layout-splitter-splitter-component-stories.46b8b112.iframe.bundle.js +1 -0
  220. package/storybook/layout-tabs-docs-mdx.89d83606.iframe.bundle.js +1 -0
  221. package/storybook/layout-tabs-tabs-component-stories.8602cefa.iframe.bundle.js +1 -0
  222. package/storybook/layout-top-scroll-bottom-docs-mdx.ddc061f8.iframe.bundle.js +1 -0
  223. package/storybook/layout-top-scroll-bottom-top-scroll-bottom-component-stories.9ee7055f.iframe.bundle.js +1 -0
  224. package/storybook/main.2d116a57.iframe.bundle.js +1 -0
  225. package/storybook/main.a402659c6a0734088d14.css +2101 -0
  226. package/storybook/mocker-runtime-injected.js +1 -0
  227. package/storybook/molecules-image-editor-docs-mdx.119ea12a.iframe.bundle.js +1 -0
  228. package/storybook/molecules-image-editor-image-editor-component-stories.56467f17.iframe.bundle.js +1 -0
  229. package/storybook/nunito-sans-bold-italic.woff2 +0 -0
  230. package/storybook/nunito-sans-bold.woff2 +0 -0
  231. package/storybook/nunito-sans-italic.woff2 +0 -0
  232. package/storybook/nunito-sans-regular.woff2 +0 -0
  233. package/storybook/project.json +1 -0
  234. package/storybook/runtime~main.a9b8ab83.iframe.bundle.js +1 -0
  235. package/storybook/sb-addons/docs-1/manager-bundle.js +3 -0
  236. package/storybook/sb-addons/libs-ui-storybook-2/manager-bundle.js +3 -0
  237. package/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +630 -0
  238. package/storybook/sb-common-assets/favicon-wrapper.svg +46 -0
  239. package/storybook/sb-common-assets/favicon.svg +1 -0
  240. package/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  241. package/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  242. package/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  243. package/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  244. package/storybook/sb-manager/globals-runtime.js +76714 -0
  245. package/storybook/sb-manager/globals.js +24 -0
  246. package/storybook/sb-manager/manager-stores.js +23 -0
  247. package/storybook/sb-manager/runtime.js +27451 -0
  248. package/storybook/sb-preview/globals.js +20 -0
  249. package/storybook/sb-preview/runtime.js +35491 -0
  250. package/storybook/styling-colors-colors-component-stories.58031f40.iframe.bundle.js +1 -0
  251. package/storybook/styling-colors-docs-mdx.95c504e4.iframe.bundle.js +1 -0
  252. package/storybook/styling-css-variables-docs-mdx.48afb4f3.iframe.bundle.js +1 -0
  253. package/storybook/styling-forms-docs-mdx.943e72f2.iframe.bundle.js +1 -0
  254. package/storybook/styling-forms-forms-component-stories.8af76278.iframe.bundle.js +1 -0
  255. package/storybook/styling-icons-docs-mdx.e1001dfd.iframe.bundle.js +1 -0
  256. package/storybook/styling-icons-icons-component-stories.2dd8c6f8.iframe.bundle.js +1 -0
  257. package/storybook/styling-layers-docs-mdx.5039dc45.iframe.bundle.js +1 -0
  258. package/storybook/styling-tags-docs-mdx.23ab2316.iframe.bundle.js +1 -0
  259. package/storybook/styling-tags-tags-component-stories.7a64bd20.iframe.bundle.js +1 -0
  260. package/storybook/styling-ui-tags-docs-mdx.8f75631d.iframe.bundle.js +1 -0
  261. package/storybook/styling-ui-tags-ui-tags-component-stories.2ec3109b.iframe.bundle.js +1 -0
  262. package/storybook/version.json +4 -0
  263. package/version.json +4 -0
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # @mojawork/ui-docs
2
+
3
+ The documentation of `@mojawork/ui` 2.3.0, version-true and offline:
4
+ the built Storybook plus the cooked catalog. Install nothing — start it:
5
+
6
+ ```bash
7
+ npx @mojawork/ui-docs@2.3.0
8
+ ```
9
+
10
+ and open the printed URL. The Storybook you see is exactly the one this
11
+ version of the library was released with — not the current line.
12
+
13
+ Next to it, `catalog/` holds the same documentation as data: one cooked
14
+ markdown page per component (the truth: "What it does, and what it does
15
+ not"), `guide.json` (recommendations with proof), `usage.md` (the usage
16
+ contract) and `mcp.json` (the tool definitions of the hosted catalog
17
+ endpoint). An agent can read these files directly.
18
+
19
+ The current line lives at https://moja.work/storybook — the machine
20
+ counterpart is the MCP endpoint at https://moja.work/ui/mcp.
21
+
22
+ MIT.
package/bin/serve.mjs ADDED
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+ // The bin of @mojawork/ui-docs: serves the packaged Storybook for as long as
3
+ // the process lives. It exists because a built Storybook cannot be opened
4
+ // from file:// — the browser refuses its module scripts across origins.
5
+ // No dependencies, on purpose: forty lines of node, nothing to install.
6
+ //
7
+ // npx @mojawork/ui-docs → http://localhost:6006
8
+ // npx @mojawork/ui-docs 4444 → http://localhost:4444
9
+
10
+ import { createReadStream, readFileSync, statSync } from 'node:fs';
11
+ import { createServer } from 'node:http';
12
+ import { dirname, extname, join, normalize, resolve } from 'node:path';
13
+ import { fileURLToPath } from 'node:url';
14
+
15
+ const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
16
+ const root = join(packageRoot, 'storybook');
17
+ const { version } = JSON.parse(readFileSync(join(packageRoot, 'package.json'), 'utf8'));
18
+ const port = Number(process.argv[2] ?? process.env.PORT ?? 6006);
19
+
20
+ if (!Number.isInteger(port) || port < 1 || port > 65535) {
21
+ console.error(`ui-docs: "${process.argv[2]}" is not a port.`);
22
+ process.exit(1);
23
+ }
24
+
25
+ /** Enough types for a built Storybook; anything else is served as bytes. */
26
+ const TYPES = {
27
+ '.html': 'text/html; charset=utf-8',
28
+ '.js': 'text/javascript; charset=utf-8',
29
+ '.mjs': 'text/javascript; charset=utf-8',
30
+ '.css': 'text/css; charset=utf-8',
31
+ '.json': 'application/json; charset=utf-8',
32
+ '.svg': 'image/svg+xml',
33
+ '.png': 'image/png',
34
+ '.jpg': 'image/jpeg',
35
+ '.woff2': 'font/woff2',
36
+ '.pdf': 'application/pdf',
37
+ };
38
+
39
+ const server = createServer((request, response) => {
40
+ const path = decodeURIComponent(new URL(request.url, 'http://x').pathname);
41
+ // `normalize` first, then the prefix check: a request may not climb out of
42
+ // the directory it is served from.
43
+ const file = join(root, normalize(path).replace(/^(\.\.[/\\])+/, ''));
44
+ if (!file.startsWith(root)) {
45
+ response.writeHead(403).end('forbidden');
46
+ return;
47
+ }
48
+ let target = file;
49
+ try {
50
+ if (statSync(target).isDirectory()) target = join(target, 'index.html');
51
+ statSync(target);
52
+ } catch {
53
+ response.writeHead(404).end('not found');
54
+ return;
55
+ }
56
+ response.writeHead(200, { 'Content-Type': TYPES[extname(target)] ?? 'application/octet-stream' });
57
+ createReadStream(target).pipe(response);
58
+ });
59
+
60
+ server.on('error', (error) => {
61
+ if (error.code === 'EADDRINUSE') {
62
+ console.error(`ui-docs: port ${port} is taken — pass another one: npx @mojawork/ui-docs <port>`);
63
+ process.exit(1);
64
+ }
65
+ throw error;
66
+ });
67
+
68
+ server.listen(port, () => {
69
+ console.log(`@mojawork/ui-docs ${version} — the Storybook of exactly this version:`);
70
+ console.log(` http://localhost:${port}`);
71
+ console.log(`The catalog as data (truth pages, guide.json, usage.md, mcp.json):`);
72
+ console.log(` ${join(packageRoot, 'catalog')}`);
73
+ });
@@ -0,0 +1,130 @@
1
+ ### Background
2
+ A reusable and customizable background component for Angular.
3
+
4
+ ---
5
+
6
+ ### What it does, and what it does not
7
+
8
+ Paints a decorative pattern — chess, dots, hearts, stars, carbon and the like —
9
+ behind whatever is projected into it, tinted through `--ui-background-color`.
10
+ It is scenery with a content slot: it has no size of its own beyond what the
11
+ host and the projected content give it, it takes no clicks, and it does not
12
+ arrange what lies in front of it.
13
+
14
+ ---
15
+
16
+ > **Guide:** recommendations for `ui-background` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-background`). The section above is the truth; the guide is the offer.
17
+
18
+ ---
19
+
20
+ ### Overview
21
+
22
+ The `UiBackgroundComponent` provides a variety of background patterns and allows for custom background colors. It is designed to be easily integrated as a decorative element in any UI layout.
23
+
24
+ ---
25
+
26
+ ### Properties
27
+
28
+ The following properties can be used to configure the background:
29
+
30
+ - `background`: (Input) The type of background pattern to display. See `UiBackgroundType` for available options (e.g., 'chess', 'dot', 'star').
31
+
32
+ ### CSS variables
33
+
34
+ - `--ui-background-color`: the fill of the pattern layer. Any CSS color or
35
+ token (e.g. `#ff0000`, `rgba(0,0,0,0.5)`, `var(--ui-c-primary)`). Unset,
36
+ each pattern keeps its own token default. The story below binds it so the
37
+ colour you see is the example.
38
+
39
+ What that fill *is* differs by pattern, and the difference is visible:
40
+ `dot`, `dot-repeat`, `heart`, `heart-repeat`, `sun`, `star` and `carbon` are
41
+ a coloured surface cut to shape by a mask, so the tint colours **the shapes
42
+ themselves**. `chess` and `cube` draw their figure with gradients on top of
43
+ that surface, so the tint colours **the ground behind the figure** while the
44
+ figure keeps its own tokens. A tint that recoloured both would leave those
45
+ two as a single flat rectangle.
46
+
47
+ ---
48
+
49
+ ### Basic Example
50
+
51
+ In this example, you can interactively change the background pattern and the background color.
52
+
53
+ #### Story: Background
54
+
55
+ ```ts
56
+ export const Background: Story = {
57
+ render: (args) => {
58
+ return {
59
+ props: {
60
+ ...args,
61
+ },
62
+ template: `
63
+ <ui-intern-header theme="theme-light"></ui-intern-header>
64
+ <section class="relative flex flex-col">
65
+ <h3>{{background}}</h3>
66
+ <div class="flex h-80 w-80 border border-[var(--ui-c-default)]">
67
+ <ui-background [style.--ui-background-color]="color" [background]="background">
68
+ </ui-background>
69
+ </div>
70
+ </section>
71
+ `,
72
+ };
73
+ },
74
+ };
75
+
76
+ /**
77
+ * The full set at a glance. Every tile is bound from the pattern list, not
78
+ * from the args, so the Controls panel is removed here entirely rather than
79
+ * left standing with dashes in it. Storybook is read by people who do not
80
+ * write Angular, and a row that offers a setting and then does nothing reads
81
+ * as a broken page, not as a disabled control. The interactive one is the
82
+ * story above.
83
+ */
84
+ ```
85
+
86
+ ---
87
+
88
+ ***Usage***
89
+
90
+ ```html
91
+ <ui-background [background]="'chess'" style="--ui-background-color: #cfcfff"></ui-background>
92
+ ```
93
+
94
+ ---
95
+
96
+ ### Pattern Overview
97
+
98
+ This overview shows all available background patterns.
99
+
100
+ ### [Open Story](?path=/story/atoms-background--background)
101
+
102
+ ---
103
+
104
+ ### Component Details
105
+
106
+ - **Selector:** `ui-background`
107
+ - **Encapsulation:** `ViewEncapsulation.None`
108
+
109
+ The component uses `ViewEncapsulation.None`, which means its styles are applied globally and can affect elements outside the component's scope if not properly scoped.
110
+
111
+ ### Types
112
+
113
+ #### UiBackgroundType
114
+
115
+ Available patterns, read from the exported `uiBackgroundData` list — this
116
+ line cannot fall behind the code because it is the code:
117
+
118
+ <code>{uiBackgroundData.map((type) => `'${type}'`).join(' | ')}</code>
119
+
120
+ ---
121
+
122
+ ### Sizing
123
+
124
+ The host fills its container (`100%` / `100%`) by default. Give it a fixed size
125
+ without a cascade fight through the named hooks `--ui-background-width` and
126
+ `--ui-background-height`:
127
+
128
+ ```html
129
+ <ui-background style="--ui-background-width: 20rem; --ui-background-height: 20rem"></ui-background>
130
+ ```
@@ -0,0 +1,285 @@
1
+ ### Barcode
2
+
3
+ Draws an EAN-13 as an inline SVG — bars and the human-readable digits
4
+ underneath.
5
+
6
+ ---
7
+
8
+ ### What it does, and what it does not
9
+
10
+ It draws. Where the code comes from, whether it gets printed, what happens on a
11
+ click: none of that is a barcode's business. A component that also printed
12
+ would force anyone wanting a bar somewhere else to take the printing along.
13
+
14
+ The same line runs through the encoding itself, one step further in.
15
+ `ean13Modules` answers what a code draws, `ean13FromNumber` does the arithmetic
16
+ that turns a number into one — but **which** number, and under which prefix, is
17
+ the application's decision and stays there. An ISBN, a database id, a box on a
18
+ shelf: the norm has no opinion about any of it.
19
+
20
+ #### Story: Default
21
+
22
+ ```ts
23
+ export const Default: Story = {
24
+ args: { code: '4006381333931' },
25
+ render: (args) => ({
26
+ props: { ...args },
27
+ template: `<ui-barcode [code]="code"></ui-barcode>`,
28
+ }),
29
+ };
30
+
31
+ /**
32
+ * Size comes from the outside. The SVG fills the width it is given, and the
33
+ * bars stay proportional — a barcode that is too small to scan is a layout
34
+ * decision, not something the component can prevent.
35
+ *
36
+ * Three plain utilities, no `!`: the component's `width: 14rem` lives in the
37
+ * `ui.components` layer below Tailwind's `utilities`, so `w-40`, `w-64` and
38
+ * `w-96` render at 100, 160 and 240px (tickets#241). They used to need a `!`
39
+ * each, and without it all three stood at 140px — a story that looked fine
40
+ * until someone measured it.
41
+ */
42
+ ```
43
+
44
+ ---
45
+
46
+ > **Guide:** recommendations for `ui-barcode` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-barcode`). The section above is the truth; the guide is the offer.
47
+
48
+ ---
49
+
50
+ ### Size
51
+
52
+ Size comes from the outside, and the SVG fills the width it is given. The
53
+ component brings a default width so it is visible without any styling at all.
54
+
55
+ A barcode too small to scan is a layout decision; the component cannot prevent
56
+ it and does not try.
57
+
58
+ #### Story: Sizes
59
+
60
+ ```ts
61
+ export const Sizes: Story = {
62
+ args: { code: '4006381333931' },
63
+ render: (args) => ({
64
+ props: { ...args },
65
+ template: `
66
+ <section class="flex flex-col items-start gap-4">
67
+ <ui-barcode class="w-40" [code]="code"></ui-barcode>
68
+ <ui-barcode class="w-64" [code]="code"></ui-barcode>
69
+ <ui-barcode class="w-96" [code]="code"></ui-barcode>
70
+ </section>
71
+ `,
72
+ }),
73
+ };
74
+
75
+ /**
76
+ * Black on white in both themes, on purpose. The label is meant to be
77
+ * scanned, and a scanner has no opinion about dark mode — a barcode that
78
+ * inverts itself politely is a barcode that stops working.
79
+ */
80
+ ```
81
+
82
+ #### A Tailwind width reaches it
83
+
84
+ The default is `width: 14rem` in the component's own stylesheet, and a
85
+ consumer's utility beats it: `class="w-64"` renders 160px, measured in the
86
+ story above. That is not the barcode's doing but the library's cascade
87
+ layers — every component style sits in `ui.components`, below Tailwind's
88
+ `utilities`, so a default stays a default. The rule and what it asks of a
89
+ consumer are on the [Styling page](?path=/docs/styling-layers--docs).
90
+
91
+ ---
92
+
93
+ ### Always black on white
94
+
95
+ The label keeps its colours in both themes, on purpose. It is meant to be
96
+ SCANNED, and a scanner has no opinion about dark mode — a barcode that politely
97
+ inverts itself is a barcode that stops working.
98
+
99
+ #### Story: OnDarkSurface
100
+
101
+ ```ts
102
+ export const OnDarkSurface: Story = {
103
+ args: { code: '4006381333931' },
104
+ render: (args) => ({
105
+ props: { ...args },
106
+ template: `
107
+ <section class="flex gap-4 bg-black p-8">
108
+ <ui-barcode class="w-64" [code]="code"></ui-barcode>
109
+ </section>
110
+ `,
111
+ }),
112
+ };
113
+ ```
114
+
115
+ ---
116
+
117
+ ### A code it cannot use is not drawn
118
+
119
+ Two things make a code unusable, and the component checks both: the shape —
120
+ thirteen digits, nothing else — and the check digit, which has to agree with the
121
+ other twelve.
122
+
123
+ The second one is the reason the first is not enough. A well-formed code with a
124
+ wrong check digit looks perfectly ordinary and no scanner will take it, which is
125
+ the harder failure to spot: it only shows at the till, after the label has been
126
+ printed and stuck on.
127
+
128
+ Both mean the same thing to whoever holds the label, so they share one state and
129
+ one sentence. The bars are not drawn — a picture that cannot be scanned is worse
130
+ than a line of text, because it looks like it works.
131
+
132
+ The `code` control of the first story carries the second, harder case as
133
+ `4006381333930 (invalid)` — the story's own default with its final digit
134
+ changed, one character away from a code that works.
135
+
136
+ ---
137
+
138
+ ### An empty code is not a failure
139
+
140
+ Nothing given means nothing was asked. The component says so quietly and reports
141
+ `null` instead of `true`, so a form does not accuse a field nobody has filled in
142
+ yet.
143
+
144
+ The text is a statement, not a request: only whoever supplies the code knows what
145
+ is missing, and whether there is a field to type it into at all.
146
+
147
+ Pick `(empty)` in the first story's control to see it.
148
+
149
+ ---
150
+
151
+ ### Properties
152
+
153
+ <table>
154
+ <thead>
155
+ <tr>
156
+ <th>Name</th>
157
+ <th>Type</th>
158
+ <th>Default</th>
159
+ <th>Description</th>
160
+ </tr>
161
+ </thead>
162
+ <tbody>
163
+ <tr>
164
+ <td><code>code</code></td>
165
+ <td><code>string</code></td>
166
+ <td>— (required)</td>
167
+ <td>
168
+ The thirteen digits to draw. Anything else is refused. The first digit
169
+ is never drawn as bars of its own; it only decides the parity pattern of
170
+ the left half.
171
+ </td>
172
+ </tr>
173
+ </tbody>
174
+ </table>
175
+
176
+ ---
177
+
178
+ ### Outputs
179
+
180
+ <table>
181
+ <thead>
182
+ <tr>
183
+ <th>Name</th>
184
+ <th>Type</th>
185
+ <th>Description</th>
186
+ </tr>
187
+ </thead>
188
+ <tbody>
189
+ <tr>
190
+ <td><code>invalidCode</code></td>
191
+ <td><code>boolean | null</code></td>
192
+ <td>
193
+ Whether a code that was given cannot be used — wrong shape or wrong
194
+ check digit, the two are not told apart. <code>null</code> means nothing
195
+ was asked of the component: an empty value is not a failure, it is
196
+ simply nothing to draw.
197
+ <br />
198
+ <br />
199
+ Not plain <code>invalid</code>: that is a native DOM event, and an
200
+ output may not borrow one.
201
+ <br />
202
+ <br />
203
+ It reports a <strong>state</strong>, not an event, and therefore fires
204
+ once on init and again on every change — including the one that puts
205
+ things right. A form bound to a changing code is told when the trouble is
206
+ over as well as when it starts.
207
+ </td>
208
+ </tr>
209
+ </tbody>
210
+ </table>
211
+
212
+ ---
213
+
214
+ ### Exported functions
215
+
216
+ <table>
217
+ <thead>
218
+ <tr>
219
+ <th>Name</th>
220
+ <th>Signature</th>
221
+ <th>Description</th>
222
+ </tr>
223
+ </thead>
224
+ <tbody>
225
+ <tr>
226
+ <td><code>ean13CheckDigit</code></td>
227
+ <td><code>(first12: string) =&gt; number</code></td>
228
+ <td>
229
+ The check digit for the first twelve digits — modulo 10, weights 1 and
230
+ 3. Useful for building a code, and for asking whether one is sound.
231
+ </td>
232
+ </tr>
233
+ <tr>
234
+ <td><code>isValidEan13</code></td>
235
+ <td><code>(code: string) =&gt; boolean</code></td>
236
+ <td>
237
+ Shape and check digit in one question, and the one the component asks
238
+ before it draws anything.
239
+ </td>
240
+ </tr>
241
+ <tr>
242
+ <td><code>ean13FromNumber</code></td>
243
+ <td><code>(value: number, prefix: string) =&gt; string</code></td>
244
+ <td>
245
+ Mints a valid code from a plain number: padded out to the digits the
246
+ prefix leaves free, check digit appended. Throws when the number no
247
+ longer fits — a number that has outgrown its range is a data problem,
248
+ and it belongs where the number is issued rather than in a quietly wrong
249
+ label. See below for the prefix.
250
+ </td>
251
+ </tr>
252
+ <tr>
253
+ <td><code>ean13Modules</code></td>
254
+ <td><code>(code: string) =&gt; string</code></td>
255
+ <td>
256
+ The 95-module pattern as a string of <code>0</code> and <code>1</code>,
257
+ where <code>1</code> is a bar: guard, six digits, centre, six digits,
258
+ guard. Throws when the input is not thirteen digits. The check digit is
259
+ not verified here — that is what <code>isValidEan13</code> is for.
260
+ </td>
261
+ </tr>
262
+ </tbody>
263
+ </table>
264
+
265
+ ---
266
+
267
+ ### Turning a number into a code
268
+
269
+ A shelf, a box, a book without an ISBN: anything that only exists on the
270
+ premises needs a code before it can have a barcode. `ean13FromNumber` does the
271
+ arithmetic; the prefix stays the caller's decision, because only the caller
272
+ knows what its numbers mean.
273
+
274
+ ```ts
275
+ [code]="ean13FromNumber(12, '201')" // → 2010000000120
276
+ ```
277
+
278
+ GS1 reserves the range `20`–`29` for exactly this: codes that never pass a
279
+ foreign till. Padding with zeros instead would produce a code beginning with
280
+ `0`, and a scanner reads that as a UPC-A — it works, but it claims an origin
281
+ that is not true.
282
+
283
+ The digits a prefix leaves are what limits the numbers: `201` leaves nine, so
284
+ 999 999 999 boxes. Different prefixes for different things (boxes, books, …)
285
+ means a scan says what was scanned.