@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.
- package/README.md +22 -0
- package/bin/serve.mjs +73 -0
- package/catalog/atoms/background.md +130 -0
- package/catalog/atoms/barcode.md +285 -0
- package/catalog/atoms/buzzer.md +210 -0
- package/catalog/atoms/card.md +174 -0
- package/catalog/atoms/chart.md +236 -0
- package/catalog/atoms/clock.md +252 -0
- package/catalog/atoms/copy-value.md +203 -0
- package/catalog/atoms/image-grid.md +208 -0
- package/catalog/atoms/image-slider.md +216 -0
- package/catalog/atoms/lang-selector.md +237 -0
- package/catalog/atoms/mosaic.md +366 -0
- package/catalog/atoms/placeholder.md +157 -0
- package/catalog/atoms/qr-code.md +334 -0
- package/catalog/atoms/rating.md +176 -0
- package/catalog/atoms/reader-doc.md +404 -0
- package/catalog/atoms/text-animate.md +122 -0
- package/catalog/atoms/thumb.md +153 -0
- package/catalog/atoms/timer.md +111 -0
- package/catalog/atoms/typewriter.md +132 -0
- package/catalog/cdk/splitter.md +63 -0
- package/catalog/cdk/table.md +188 -0
- package/catalog/forms/autocomplete.md +304 -0
- package/catalog/forms/checkbox.md +218 -0
- package/catalog/forms/input.md +193 -0
- package/catalog/forms/slider.md +142 -0
- package/catalog/forms/switch.md +188 -0
- package/catalog/guide.json +1209 -0
- package/catalog/layout/header.md +167 -0
- package/catalog/layout/main.md +158 -0
- package/catalog/layout/media-screen.md +163 -0
- package/catalog/layout/nav.md +181 -0
- package/catalog/layout/overlay.md +256 -0
- package/catalog/layout/spinner.md +94 -0
- package/catalog/layout/splitter.md +331 -0
- package/catalog/layout/tabs.md +144 -0
- package/catalog/layout/top-scroll-bottom.md +98 -0
- package/catalog/manifest.json +482 -0
- package/catalog/mcp.json +44 -0
- package/catalog/molecules/image-editor.md +285 -0
- package/catalog/usage.md +137 -0
- package/catalog/version.json +4 -0
- package/package.json +10 -0
- package/storybook/1183.da25800b.iframe.bundle.js +1 -0
- package/storybook/1255.2abec879.iframe.bundle.js +2 -0
- package/storybook/1255.2abec879.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/1516.52d2dae7.iframe.bundle.js +2 -0
- package/storybook/1516.52d2dae7.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/2033.c705a7ce.iframe.bundle.js +1 -0
- package/storybook/2089.32694489.iframe.bundle.js +1 -0
- package/storybook/2096.431fc8f5.iframe.bundle.js +1 -0
- package/storybook/2127.29f153d2.iframe.bundle.js +2 -0
- package/storybook/2127.29f153d2.iframe.bundle.js.LICENSE.txt +7 -0
- package/storybook/2228.77650ef1.iframe.bundle.js +2 -0
- package/storybook/2228.77650ef1.iframe.bundle.js.LICENSE.txt +1 -0
- package/storybook/2249.6e6782ab.iframe.bundle.js +1 -0
- package/storybook/2639.29baa8af.iframe.bundle.js +1 -0
- package/storybook/2844.c9f47654.iframe.bundle.js +1 -0
- package/storybook/2971.edb202b4.iframe.bundle.js +1 -0
- package/storybook/3899.55560628.iframe.bundle.js +2 -0
- package/storybook/3899.55560628.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/3968.69b812e4.iframe.bundle.js +1 -0
- package/storybook/4255.eeeaf087.iframe.bundle.js +111 -0
- package/storybook/4255.eeeaf087.iframe.bundle.js.LICENSE.txt +49 -0
- package/storybook/4255.eeeaf087.iframe.bundle.js.map +1 -0
- package/storybook/4425.368129b3.iframe.bundle.js +2 -0
- package/storybook/4425.368129b3.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/4476.f8e4115f.iframe.bundle.js +1 -0
- package/storybook/4495.d1c8cc8d.iframe.bundle.js +1 -0
- package/storybook/4555.066c242d.iframe.bundle.js +1 -0
- package/storybook/4755.e4656207.iframe.bundle.js +23 -0
- package/storybook/4755.e4656207.iframe.bundle.js.LICENSE.txt +14 -0
- package/storybook/4755.e4656207.iframe.bundle.js.map +1 -0
- package/storybook/4935.8959522b.iframe.bundle.js +1 -0
- package/storybook/5568.c6172f92.iframe.bundle.js +1 -0
- package/storybook/5944.810cb147.iframe.bundle.js +1 -0
- package/storybook/6115.7f1470ef.iframe.bundle.js +1 -0
- package/storybook/6169.eaeed989.iframe.bundle.js +2 -0
- package/storybook/6169.eaeed989.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/6202.b8ca0e90.iframe.bundle.js +2 -0
- package/storybook/6202.b8ca0e90.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/660.18f0458e.iframe.bundle.js +1 -0
- package/storybook/6824.f5eb8bb7.iframe.bundle.js +1 -0
- package/storybook/7316.5b024e94.iframe.bundle.js +1 -0
- package/storybook/7749.2a853795.iframe.bundle.js +1 -0
- package/storybook/8051.719eb790.iframe.bundle.js +1 -0
- package/storybook/813.805c1e5f.iframe.bundle.js +1 -0
- package/storybook/8448.1baeb046.iframe.bundle.js +1 -0
- package/storybook/871.428deceb.iframe.bundle.js +1 -0
- package/storybook/8819.220ca21d.iframe.bundle.js +1 -0
- package/storybook/9045.a50616e9.iframe.bundle.js +2 -0
- package/storybook/9045.a50616e9.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/9560.668052f3.iframe.bundle.js +7 -0
- package/storybook/9560.668052f3.iframe.bundle.js.map +1 -0
- package/storybook/973.67f44bb0.iframe.bundle.js +1 -0
- package/storybook/9850.28367747.iframe.bundle.js +1 -0
- package/storybook/9946.36014b4e.iframe.bundle.js +1 -0
- package/storybook/MaterialIcons-Regular.woff2 +0 -0
- package/storybook/MaterialIconsOutlined-Regular.woff2 +0 -0
- package/storybook/PetMe64.ttf +0 -0
- package/storybook/_external-mwork-banner-docs-mdx.0d5549a0.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-banner-mwork-banner-stories.d44f6917.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-basic-interpreter-docs-mdx.03c6205c.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-basic-interpreter-mwork-basic-interpreter-stories.3252a9b8.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-music-player-docs-mdx.6f943768.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-music-player-mwork-music-player-stories.08fbf651.iframe.bundle.js +1 -0
- package/storybook/assets/fonts/PETME64-LICENSE.txt +20 -0
- package/storybook/assets/fonts/PetMe64.ttf +0 -0
- package/storybook/assets/fonts/icons/MaterialIcons-Regular.woff2 +0 -0
- package/storybook/assets/fonts/icons/MaterialIconsOutlined-Regular.woff2 +0 -0
- package/storybook/assets/ui/documents/demo.pdf +42 -0
- package/storybook/assets/ui/i18n/de-DE.json +1 -0
- package/storybook/assets/ui/i18n/en-EN.json +2 -0
- package/storybook/assets/ui/i18n/ui/de-DE.json +95 -0
- package/storybook/assets/ui/i18n/ui/en-EN.json +95 -0
- package/storybook/assets/ui/images/600x600.png +0 -0
- package/storybook/assets/ui/images/600x800.png +0 -0
- package/storybook/assets/ui/images/800x600.png +0 -0
- package/storybook/assets/ui/images/unknown.gif +0 -0
- package/storybook/atoms-_electrons-form-error-message-docs-mdx.5b9e78fe.iframe.bundle.js +1 -0
- package/storybook/atoms-_electrons-form-error-message-form-error-message-component-stories.7f749acc.iframe.bundle.js +1 -0
- package/storybook/atoms-background-background-component-stories.b6b50c0c.iframe.bundle.js +1 -0
- package/storybook/atoms-background-docs-mdx.4f102c17.iframe.bundle.js +1 -0
- package/storybook/atoms-barcode-barcode-component-stories.dc462559.iframe.bundle.js +1 -0
- package/storybook/atoms-barcode-docs-mdx.b74c501b.iframe.bundle.js +1 -0
- package/storybook/atoms-buzzer-buzzer-component-stories.13ee130d.iframe.bundle.js +1 -0
- package/storybook/atoms-buzzer-docs-mdx.23eb1913.iframe.bundle.js +1 -0
- package/storybook/atoms-card-card-component-stories.065b34e9.iframe.bundle.js +1 -0
- package/storybook/atoms-card-docs-mdx.7d276114.iframe.bundle.js +1 -0
- package/storybook/atoms-chart-chart-component-stories.5247b7cb.iframe.bundle.js +1 -0
- package/storybook/atoms-chart-docs-mdx.204609d4.iframe.bundle.js +1 -0
- package/storybook/atoms-clock-clock-component-stories.d1464731.iframe.bundle.js +1 -0
- package/storybook/atoms-clock-docs-mdx.501e6780.iframe.bundle.js +1 -0
- package/storybook/atoms-copy-value-copy-value-component-stories.58d3956a.iframe.bundle.js +1 -0
- package/storybook/atoms-copy-value-docs-mdx.f404dcd2.iframe.bundle.js +1 -0
- package/storybook/atoms-image-grid-docs-mdx.18b4df2a.iframe.bundle.js +1 -0
- package/storybook/atoms-image-grid-image-grid-component-stories.a0a92d9e.iframe.bundle.js +1 -0
- package/storybook/atoms-image-slider-docs-mdx.c616bb37.iframe.bundle.js +1 -0
- package/storybook/atoms-image-slider-image-slider-component-stories.484b9c41.iframe.bundle.js +1 -0
- package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js +2 -0
- package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js +2 -0
- package/storybook/atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/atoms-mosaic-docs-mdx.1aebfbdf.iframe.bundle.js +1 -0
- package/storybook/atoms-mosaic-mosaic-component-stories.0a6bc043.iframe.bundle.js +1 -0
- package/storybook/atoms-placeholder-docs-mdx.cd2f3976.iframe.bundle.js +1 -0
- package/storybook/atoms-placeholder-placeholder-component-stories.bc221534.iframe.bundle.js +1 -0
- package/storybook/atoms-qr-code-docs-mdx.4202568d.iframe.bundle.js +1 -0
- package/storybook/atoms-qr-code-qr-code-component-stories.5018e2b0.iframe.bundle.js +1 -0
- package/storybook/atoms-rating-docs-mdx.32fa4104.iframe.bundle.js +1 -0
- package/storybook/atoms-rating-rating-component-stories.982db47d.iframe.bundle.js +1 -0
- package/storybook/atoms-reader-doc-docs-mdx.0688c3b9.iframe.bundle.js +1 -0
- package/storybook/atoms-reader-doc-reader-doc-component-stories.a6fec57d.iframe.bundle.js +1 -0
- package/storybook/atoms-text-animate-docs-mdx.05e1baf4.iframe.bundle.js +1 -0
- package/storybook/atoms-text-animate-text-animate-component-stories.8041c0f1.iframe.bundle.js +1 -0
- package/storybook/atoms-thumb-docs-mdx.2143ad01.iframe.bundle.js +1 -0
- package/storybook/atoms-thumb-thumb-component-stories.06f51d03.iframe.bundle.js +1 -0
- package/storybook/atoms-timer-docs-mdx.6f724cc8.iframe.bundle.js +1 -0
- package/storybook/atoms-timer-timer-component-stories.9bee1037.iframe.bundle.js +1 -0
- package/storybook/atoms-typewriter-docs-mdx.3b1088c0.iframe.bundle.js +1 -0
- package/storybook/atoms-typewriter-typewriter-component-stories.4fefc019.iframe.bundle.js +1 -0
- package/storybook/cdk-components-drag-and-drop-splitter-docs-mdx.f12088fd.iframe.bundle.js +1 -0
- package/storybook/cdk-components-drag-and-drop-splitter-splitter-component-stories.286b5171.iframe.bundle.js +1 -0
- package/storybook/cdk-components-table-docs-mdx.cc2c11e7.iframe.bundle.js +1 -0
- package/storybook/cdk-components-table-table-component-stories.db9212fd.iframe.bundle.js +1 -0
- package/storybook/examples-burger-menu-stories.0a083a75.iframe.bundle.js +1 -0
- package/storybook/examples-docs-mdx.3111f2c6.iframe.bundle.js +1 -0
- package/storybook/examples-image-grid-slider-docs-mdx.9e38157e.iframe.bundle.js +1 -0
- package/storybook/examples-image-grid-slider-image-grid-slider-stories.028c8c2b.iframe.bundle.js +1 -0
- package/storybook/examples-layout-docs-mdx.bbacdfd2.iframe.bundle.js +1 -0
- package/storybook/examples-layout-layout-stories.05cd891f.iframe.bundle.js +1 -0
- package/storybook/examples-table-edit-focus-docs-mdx.3c0d1611.iframe.bundle.js +1 -0
- package/storybook/examples-table-edit-focus-table-edit-focus-stories.c79e214a.iframe.bundle.js +1 -0
- package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js +2 -0
- package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/examples-transloco-transloco-component-stories.5baea2e2.iframe.bundle.js +2 -0
- package/storybook/examples-transloco-transloco-component-stories.5baea2e2.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/favicon-wrapper.svg +46 -0
- package/storybook/favicon.svg +1 -0
- package/storybook/forms-autocomplete-autocomplete-component-stories.443544e0.iframe.bundle.js +2 -0
- package/storybook/forms-autocomplete-autocomplete-component-stories.443544e0.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js +2 -0
- package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/forms-autofocus-autofocus-stories.2e94d887.iframe.bundle.js +1 -0
- package/storybook/forms-autofocus-docs-mdx.39611362.iframe.bundle.js +1 -0
- package/storybook/forms-checkbox-checkbox-component-stories.d45b4f0d.iframe.bundle.js +1 -0
- package/storybook/forms-checkbox-docs-mdx.74036eb7.iframe.bundle.js +1 -0
- package/storybook/forms-input-docs-mdx.72d0e99a.iframe.bundle.js +1 -0
- package/storybook/forms-input-input-component-stories.609db3f0.iframe.bundle.js +1 -0
- package/storybook/forms-slider-docs-mdx.120cefc6.iframe.bundle.js +1 -0
- package/storybook/forms-slider-slider-component-stories.058fb9b1.iframe.bundle.js +1 -0
- package/storybook/forms-switch-docs-mdx.9d58a341.iframe.bundle.js +1 -0
- package/storybook/forms-switch-switch-component-stories.bf67d7c9.iframe.bundle.js +1 -0
- package/storybook/forms-validators-docs-mdx.ebb47a43.iframe.bundle.js +1 -0
- package/storybook/forms-validators-validators-component-stories.9525f97b.iframe.bundle.js +1 -0
- package/storybook/home-guide-mdx.1a176b15.iframe.bundle.js +1 -0
- package/storybook/home-overview-mdx.d0cf448a.iframe.bundle.js +1 -0
- package/storybook/home-tips-mdx.26df81d8.iframe.bundle.js +1 -0
- package/storybook/home-usage-mdx.7ba89dd0.iframe.bundle.js +1 -0
- package/storybook/iframe.html +558 -0
- package/storybook/index.html +155 -0
- package/storybook/index.json +1 -0
- package/storybook/layout-main-docs-mdx.4c9208c5.iframe.bundle.js +1 -0
- package/storybook/layout-main-main-component-stories.788c0c54.iframe.bundle.js +1 -0
- package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js +2 -0
- package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/layout-media-screen-media-screen-component-stories.7941c064.iframe.bundle.js +2 -0
- package/storybook/layout-media-screen-media-screen-component-stories.7941c064.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/layout-nav-docs-mdx.cc919f94.iframe.bundle.js +1 -0
- package/storybook/layout-nav-nav-component-stories.766738fc.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-docs-mdx.823351e0.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-header-docs-mdx.394033ca.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-header-header-component-stories.5eaef192.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-overlay-component-stories.01f6cd84.iframe.bundle.js +1 -0
- package/storybook/layout-spinner-docs-mdx.4be572c0.iframe.bundle.js +1 -0
- package/storybook/layout-spinner-spinner-component-stories.ab8245c6.iframe.bundle.js +1 -0
- package/storybook/layout-splitter-docs-mdx.bf161b39.iframe.bundle.js +1 -0
- package/storybook/layout-splitter-splitter-component-stories.46b8b112.iframe.bundle.js +1 -0
- package/storybook/layout-tabs-docs-mdx.89d83606.iframe.bundle.js +1 -0
- package/storybook/layout-tabs-tabs-component-stories.8602cefa.iframe.bundle.js +1 -0
- package/storybook/layout-top-scroll-bottom-docs-mdx.ddc061f8.iframe.bundle.js +1 -0
- package/storybook/layout-top-scroll-bottom-top-scroll-bottom-component-stories.9ee7055f.iframe.bundle.js +1 -0
- package/storybook/main.2d116a57.iframe.bundle.js +1 -0
- package/storybook/main.a402659c6a0734088d14.css +2101 -0
- package/storybook/mocker-runtime-injected.js +1 -0
- package/storybook/molecules-image-editor-docs-mdx.119ea12a.iframe.bundle.js +1 -0
- package/storybook/molecules-image-editor-image-editor-component-stories.56467f17.iframe.bundle.js +1 -0
- package/storybook/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook/nunito-sans-bold.woff2 +0 -0
- package/storybook/nunito-sans-italic.woff2 +0 -0
- package/storybook/nunito-sans-regular.woff2 +0 -0
- package/storybook/project.json +1 -0
- package/storybook/runtime~main.a9b8ab83.iframe.bundle.js +1 -0
- package/storybook/sb-addons/docs-1/manager-bundle.js +3 -0
- package/storybook/sb-addons/libs-ui-storybook-2/manager-bundle.js +3 -0
- package/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +630 -0
- package/storybook/sb-common-assets/favicon-wrapper.svg +46 -0
- package/storybook/sb-common-assets/favicon.svg +1 -0
- package/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook/sb-manager/globals-runtime.js +76714 -0
- package/storybook/sb-manager/globals.js +24 -0
- package/storybook/sb-manager/manager-stores.js +23 -0
- package/storybook/sb-manager/runtime.js +27451 -0
- package/storybook/sb-preview/globals.js +20 -0
- package/storybook/sb-preview/runtime.js +35491 -0
- package/storybook/styling-colors-colors-component-stories.58031f40.iframe.bundle.js +1 -0
- package/storybook/styling-colors-docs-mdx.95c504e4.iframe.bundle.js +1 -0
- package/storybook/styling-css-variables-docs-mdx.48afb4f3.iframe.bundle.js +1 -0
- package/storybook/styling-forms-docs-mdx.943e72f2.iframe.bundle.js +1 -0
- package/storybook/styling-forms-forms-component-stories.8af76278.iframe.bundle.js +1 -0
- package/storybook/styling-icons-docs-mdx.e1001dfd.iframe.bundle.js +1 -0
- package/storybook/styling-icons-icons-component-stories.2dd8c6f8.iframe.bundle.js +1 -0
- package/storybook/styling-layers-docs-mdx.5039dc45.iframe.bundle.js +1 -0
- package/storybook/styling-tags-docs-mdx.23ab2316.iframe.bundle.js +1 -0
- package/storybook/styling-tags-tags-component-stories.7a64bd20.iframe.bundle.js +1 -0
- package/storybook/styling-ui-tags-docs-mdx.8f75631d.iframe.bundle.js +1 -0
- package/storybook/styling-ui-tags-ui-tags-component-stories.2ec3109b.iframe.bundle.js +1 -0
- package/storybook/version.json +4 -0
- package/version.json +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3045,6203],{"./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>UiPlaceholderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var placeholder_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"),placeholder_componentngResource_default=__webpack_require__.n(placeholder_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");let UiPlaceholderComponent=class UiPlaceholderComponent{label=(0,core.input)(null);static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiPlaceholderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-placeholder",template:"<span class=\"_label\">{{ label() ?? ('placeholder.label' | transloco) }}</span>\n",encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[placeholder_componentngResource_default()]})],UiPlaceholderComponent)},"./node_modules/css-loader/dist/runtime/api.js"(module){"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map(function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content}).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k<this.length;k++){var id=this[k][0];null!=id&&(alreadyImportedModules[id]=!0)}for(var _k=0;_k<modules.length;_k++){var item=[].concat(modules[_k]);dedupe&&alreadyImportedModules[item[0]]||(void 0!==layer&&(void 0===item[5]||(item[1]="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js"(module){"use strict";module.exports=function(i){return i[1]}},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/placeholder/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_placeholder_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_placeholder_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-placeholder.json");function _createMdxContent(props){const _components={code:"code",h3:"h3",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_placeholder_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"placeholder",children:"Placeholder"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A stand-in box with visible mass."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Documentation and examples constantly need something that takes up space, so\nthe thing being demonstrated has an edge to show itself against — how far a\npanel grows, where its content ends, what a layout does when it gets tight."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["An empty outlined ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"div"})," does that badly. It disappears against the page, and a\nreader cannot tell an intentional stand-in from a component that failed to\nrender. This one carries a filled surface and names itself, so both questions\nanswer themselves."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["It borrows the same tokens as the overlay header (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-c-primary"})," on\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-c-default"}),"), which makes it read as chrome rather than content, and it\nfollows the theme."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"ui-placeholder",entry:_guide_ui_placeholder_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"default",children:"Default"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_placeholder_component_stories__WEBPACK_IMPORTED_MODULE_4__.Default}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"size",children:"Size"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Size comes from the outside — set width and height on the tag. On its own the\ncomponent brings a floor in both directions, so it can never collapse to a text\nline and stop being the mass it exists for. Past that floor it carries only\nwhat makes it read as a surface rather than an outline: a little padding, a\nborder and the library's corner radius. Every other measurement is yours."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The floor has a deliberate escape hatch. A plain width utility cannot undercut\nit — the host rule is unlayered and wins the cascade over ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"@layer utilities"})," —\nbut the named hooks need no layer order to take effect. Where a smaller stand-in\nis genuinely wanted, set ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-placeholder-min-width"})," /\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-placeholder-min-height"})," on the tag; both fall back to the default floor\n(",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"calc(var(--ui-spacer) * 3)"}),", 120px) when unset."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_placeholder_component_stories__WEBPACK_IMPORTED_MODULE_4__.Sizes}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"own-label",children:"Own label"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_placeholder_component_stories__WEBPACK_IMPORTED_MODULE_4__.OwnLabel}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A label of its own, for when the stand-in should say what will go there later.\nThree boxes in a layout example usually mean three different things, and three\nidentical stand-ins hide exactly that."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"notes",children:"Notes"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"It cannot be selected."}),' The stand-in is scenery, never the subject, so\ntext selection is switched off on it. Dragging across a documentation page\npicks up the text around it instead of the word "placeholder", and an example\ncopied out of the page does not carry filler along.']}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"The tag is the styling hook."})," Encapsulation is off, and every rule is\nnested inside ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-placeholder"})," so none of them can leak. The tag itself stays\nstyleable from outside, which is what makes sizing it with utility classes\nwork in the first place."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"properties",children:"Properties"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("tbody",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"label"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:['Overrides the label. Without one the component shows the translated\nword for "placeholder" — a stand-in should say what it is in the\nreader\'s language, and an example that ships a hardcoded English word\ninto a German page is a small lie. The key is'," ","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"placeholder.label"}),"."]})})]})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,OwnLabel:()=>OwnLabel,Sizes:()=>Sizes,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={title:"Atoms/Placeholder",component:__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts").F,argTypes:{label:{control:{type:"select",labels:{null:"(none — the translated word)"}},options:[null,"chart","table","legend"]}}},Default={args:{label:null},render:args=>({props:{...args},template:'<ui-placeholder [label]="label"></ui-placeholder>'})},Sizes={args:{label:null},render:args=>({props:{...args},template:'\n <section class="flex flex-col gap-4">\n <ui-placeholder class="h-24" [label]="label"></ui-placeholder>\n <div class="flex gap-4">\n <ui-placeholder class="h-32 w-32" [label]="label"></ui-placeholder>\n <ui-placeholder class="h-32 w-64" [label]="label"></ui-placeholder>\n </div>\n </section>\n '})},OwnLabel={parameters:{controls:{disable:!0}},render:()=>({template:'\n <section class="grid grid-cols-3 gap-4">\n <ui-placeholder class="h-32" [label]="\'chart\'"></ui-placeholder>\n <ui-placeholder class="h-32" [label]="\'table\'"></ui-placeholder>\n <ui-placeholder class="h-32" [label]="\'legend\'"></ui-placeholder>\n </section>\n '})},__namedExportsOrder=["Default","Sizes","OwnLabel"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'{\n args: {\n label: null\n },\n render: args => ({\n props: {\n ...args\n },\n template: `<ui-placeholder [label]="label"></ui-placeholder>`\n })\n}',...Default.parameters?.docs?.source},description:{story:"The default: it names itself in the active language and brings a floor, so\nit is visible mass even with no size set on it at all.",...Default.parameters?.docs?.description}}},Sizes.parameters={...Sizes.parameters,docs:{...Sizes.parameters?.docs,source:{originalSource:'{\n args: {\n label: null\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <section class="flex flex-col gap-4">\n <ui-placeholder class="h-24" [label]="label"></ui-placeholder>\n <div class="flex gap-4">\n <ui-placeholder class="h-32 w-32" [label]="label"></ui-placeholder>\n <ui-placeholder class="h-32 w-64" [label]="label"></ui-placeholder>\n </div>\n </section>\n `\n })\n}',...Sizes.parameters?.docs?.source},description:{story:"Size comes from the outside. The tag takes width and height like any block,\nso the same stand-in serves a full-width band and a small tile.",...Sizes.parameters?.docs?.description}}},OwnLabel.parameters={...OwnLabel.parameters,docs:{...OwnLabel.parameters?.docs,source:{originalSource:'{\n // Three names from the story\'s own list — the point is that they differ, so\n // a control feeding one of the three would only ever produce a duplicate.\n // The live control is on the two stories above.\n parameters: {\n controls: {\n disable: true\n }\n },\n render: () => ({\n template: `\n <section class="grid grid-cols-3 gap-4">\n <ui-placeholder class="h-32" [label]="\'chart\'"></ui-placeholder>\n <ui-placeholder class="h-32" [label]="\'table\'"></ui-placeholder>\n <ui-placeholder class="h-32" [label]="\'legend\'"></ui-placeholder>\n </section>\n `\n })\n}',...OwnLabel.parameters?.docs?.source},description:{story:"A label of its own, for when the stand-in should say what will go there\nlater. Useful in a layout example where three boxes mean three things.",...OwnLabel.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Encapsulation.None — one nested block anchored on the tag, so the rules\n cannot leak while the host itself stays styleable from outside. */\nui-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* A floor, not a size: width and height come from wherever it is used.\n Without one an empty stand-in collapses to a text line and stops being\n the mass it exists to be. The floor is a named hook with a fallback, so a\n consumer who deliberately wants a smaller stand-in can set\n `--ui-placeholder-min-width` / `--ui-placeholder-min-height` without a\n cascade fight — an unlayered host rule otherwise beats a width utility in\n `@layer utilities` (tickets#241, tickets#251, tickets#253). */\n min-width: var(--ui-placeholder-min-width, calc(var(--ui-spacer) * 3));\n min-height: var(--ui-placeholder-min-height, calc(var(--ui-spacer) * 3));\n padding: calc(var(--ui-spacer) * 0.25);\n\n /* The overlay header's pair: filled enough to read as chrome rather than\n content, and theme-aware through the tokens. */\n background-color: var(--ui-c-primary);\n color: var(--ui-c-default);\n border: var(--ui-border-width) solid var(--ui-c-fourthly);\n border-radius: var(--ui-border-radius);\n\n /* It is scenery, never the subject: nothing here should invite a click or\n land in a text selection. */\n -webkit-user-select: none;\n user-select: none;\n\n ._label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3045],{"./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>UiPlaceholderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var placeholder_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"),placeholder_componentngResource_default=__webpack_require__.n(placeholder_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");let UiPlaceholderComponent=class UiPlaceholderComponent{label=(0,core.input)(null);static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiPlaceholderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-placeholder",template:"<span class=\"_label\">{{ label() ?? ('placeholder.label' | transloco) }}</span>\n",encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[placeholder_componentngResource_default()]})],UiPlaceholderComponent)},"./node_modules/css-loader/dist/runtime/api.js"(module){"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map(function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content}).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k<this.length;k++){var id=this[k][0];null!=id&&(alreadyImportedModules[id]=!0)}for(var _k=0;_k<modules.length;_k++){var item=[].concat(modules[_k]);dedupe&&alreadyImportedModules[item[0]]||(void 0!==layer&&(void 0===item[5]||(item[1]="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js"(module){"use strict";module.exports=function(i){return i[1]}},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,OwnLabel:()=>OwnLabel,Sizes:()=>Sizes,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={title:"Atoms/Placeholder",component:__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts").F,argTypes:{label:{control:{type:"select",labels:{null:"(none — the translated word)"}},options:[null,"chart","table","legend"]}}},Default={args:{label:null},render:args=>({props:{...args},template:'<ui-placeholder [label]="label"></ui-placeholder>'})},Sizes={args:{label:null},render:args=>({props:{...args},template:'\n <section class="flex flex-col gap-4">\n <ui-placeholder class="h-24" [label]="label"></ui-placeholder>\n <div class="flex gap-4">\n <ui-placeholder class="h-32 w-32" [label]="label"></ui-placeholder>\n <ui-placeholder class="h-32 w-64" [label]="label"></ui-placeholder>\n </div>\n </section>\n '})},OwnLabel={parameters:{controls:{disable:!0}},render:()=>({template:'\n <section class="grid grid-cols-3 gap-4">\n <ui-placeholder class="h-32" [label]="\'chart\'"></ui-placeholder>\n <ui-placeholder class="h-32" [label]="\'table\'"></ui-placeholder>\n <ui-placeholder class="h-32" [label]="\'legend\'"></ui-placeholder>\n </section>\n '})},__namedExportsOrder=["Default","Sizes","OwnLabel"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'{\n args: {\n label: null\n },\n render: args => ({\n props: {\n ...args\n },\n template: `<ui-placeholder [label]="label"></ui-placeholder>`\n })\n}',...Default.parameters?.docs?.source},description:{story:"The default: it names itself in the active language and brings a floor, so\nit is visible mass even with no size set on it at all.",...Default.parameters?.docs?.description}}},Sizes.parameters={...Sizes.parameters,docs:{...Sizes.parameters?.docs,source:{originalSource:'{\n args: {\n label: null\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <section class="flex flex-col gap-4">\n <ui-placeholder class="h-24" [label]="label"></ui-placeholder>\n <div class="flex gap-4">\n <ui-placeholder class="h-32 w-32" [label]="label"></ui-placeholder>\n <ui-placeholder class="h-32 w-64" [label]="label"></ui-placeholder>\n </div>\n </section>\n `\n })\n}',...Sizes.parameters?.docs?.source},description:{story:"Size comes from the outside. The tag takes width and height like any block,\nso the same stand-in serves a full-width band and a small tile.",...Sizes.parameters?.docs?.description}}},OwnLabel.parameters={...OwnLabel.parameters,docs:{...OwnLabel.parameters?.docs,source:{originalSource:'{\n // Three names from the story\'s own list — the point is that they differ, so\n // a control feeding one of the three would only ever produce a duplicate.\n // The live control is on the two stories above.\n parameters: {\n controls: {\n disable: true\n }\n },\n render: () => ({\n template: `\n <section class="grid grid-cols-3 gap-4">\n <ui-placeholder class="h-32" [label]="\'chart\'"></ui-placeholder>\n <ui-placeholder class="h-32" [label]="\'table\'"></ui-placeholder>\n <ui-placeholder class="h-32" [label]="\'legend\'"></ui-placeholder>\n </section>\n `\n })\n}',...OwnLabel.parameters?.docs?.source},description:{story:"A label of its own, for when the stand-in should say what will go there\nlater. Useful in a layout example where three boxes mean three things.",...OwnLabel.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Encapsulation.None — one nested block anchored on the tag, so the rules\n cannot leak while the host itself stays styleable from outside. */\nui-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* A floor, not a size: width and height come from wherever it is used.\n Without one an empty stand-in collapses to a text line and stops being\n the mass it exists to be. The floor is a named hook with a fallback, so a\n consumer who deliberately wants a smaller stand-in can set\n `--ui-placeholder-min-width` / `--ui-placeholder-min-height` without a\n cascade fight — an unlayered host rule otherwise beats a width utility in\n `@layer utilities` (tickets#241, tickets#251, tickets#253). */\n min-width: var(--ui-placeholder-min-width, calc(var(--ui-spacer) * 3));\n min-height: var(--ui-placeholder-min-height, calc(var(--ui-spacer) * 3));\n padding: calc(var(--ui-spacer) * 0.25);\n\n /* The overlay header's pair: filled enough to read as chrome rather than\n content, and theme-aware through the tokens. */\n background-color: var(--ui-c-primary);\n color: var(--ui-c-default);\n border: var(--ui-border-width) solid var(--ui-c-fourthly);\n border-radius: var(--ui-border-radius);\n\n /* It is scenery, never the subject: nothing here should invite a click or\n land in a text selection. */\n -webkit-user-select: none;\n user-select: none;\n\n ._label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[2193,4365],{"./node_modules/css-loader/dist/runtime/api.js"(module){"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map(function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content}).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k<this.length;k++){var id=this[k][0];null!=id&&(alreadyImportedModules[id]=!0)}for(var _k=0;_k<modules.length;_k++){var item=[].concat(modules[_k]);dedupe&&alreadyImportedModules[item[0]]||(void 0!==layer&&(void 0===item[5]||(item[1]="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js"(module){"use strict";module.exports=function(i){return i[1]}},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/qr-code/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_qr_code_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/qr-code/qr-code.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_qr_code_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-qr-code.json");function _createMdxContent(props){const _components={code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_qr_code_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"qr-code",children:"QR Code"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Draws a value as an inline SVG QR code."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"It encodes and draws, and nothing else. The generator is written out rather\nthan pulled in: byte mode only, UTF-8, versions 1 to 40, all four error\ncorrection levels. Numeric and alphanumeric modes would save space on\ndigit-only payloads and buy nothing for the URLs this is built for; kanji mode\nand ECI are out entirely."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Adjacent dark modules in a row are merged into single rects, so a large code\ncosts a few hundred elements rather than a few thousand."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_qr_code_component_stories__WEBPACK_IMPORTED_MODULE_4__.Default}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"ui-qr-code",entry:_guide_ui_qr_code_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"error-correction",children:"Error correction"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Higher correction survives more damage and costs modules: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"L"})," recovers roughly\n7% of the code, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"H"})," roughly 30%, and the grid grows to pay for it. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"M"})," is the\nordinary choice and the default."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Worth raising when the code will be printed small, on something that creases,\nor on a surface that gets handled."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_qr_code_component_stories__WEBPACK_IMPORTED_MODULE_4__.Levels}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"size",children:"Size"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Size comes from the outside; the SVG fills the width it is given. The component\nbrings a default width so it is visible without any styling at all."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"shape-rendering: crispEdges"})," keeps the modules meeting edge to edge at every\nsize. Without it a browser that antialiases the rect borders leaves hairlines\nbetween them, and a scanner reading off a screen sees a grid that is not quite\nsolid."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_qr_code_component_stories__WEBPACK_IMPORTED_MODULE_4__.Sizes}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"always-black-on-white",children:"Always black on white"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Same reason as the barcode: this is meant to be scanned, and a scanner has no\nopinion about dark mode."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_qr_code_component_stories__WEBPACK_IMPORTED_MODULE_4__.OnDarkSurface}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"there-is-exactly-one-way-to-fail",children:"There is exactly one way to fail"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A value is refused when it is past the capacity of version 40 at the chosen\nlevel. Nothing else: the version grows to fit, so everything short of that\nresolves itself without anyone noticing."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["How much fits depends on the level — 2953 bytes at ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"L"}),", 2331 at ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"M"}),", 1663 at\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"Q"}),", 1273 at ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"H"}),". Bytes, not characters: an umlaut costs two, an emoji four.\nThese four numbers are pinned to ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"qrFits"})," by ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"qr-code.capacity.spec.ts"})," — if\nthe capacity tables ever change, the test fails and this sentence follows."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Long before that limit the practical one arrives. Version 40 is a grid of\n177×177 modules, and printed on a label that is no longer scannable — which is\nwhy the level is never quietly lowered to make something fit. A code that is\ntechnically drawn and practically unreadable is worse than a sentence saying it\ndoes not fit."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_qr_code_component_stories__WEBPACK_IMPORTED_MODULE_4__.OverCapacity}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"an-empty-value-is-not-a-failure",children:"An empty value is not a failure"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Nothing given means nothing was asked. The component says so quietly and reports\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"null"})," instead of ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"true"}),", so a form does not accuse a field nobody has filled in\nyet."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The text is a statement, not a request: only whoever supplies the value knows\nwhat is missing, and whether there is a field to type it into at all."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_qr_code_component_stories__WEBPACK_IMPORTED_MODULE_4__.EmptyValue}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"properties",children:"Properties"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"value"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"— (required)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The payload — a URL, an identifier, any text."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"level"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiQrErrorCorrectionLevel"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'M'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Error correction level: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'L'"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'M'"}),","," ","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'Q'"})," or ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'H'"}),"."]})})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"outputs",children:"Outputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("tbody",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"overCapacity"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"boolean | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Whether a value that was given is too large to encode."," ","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})," means nothing was asked of the component: an empty\nvalue is not a failure, it is simply nothing to encode."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["It reports a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"state"}),", not an event, and therefore fires\nonce on init and again on every change — including the one that puts\nthings right. A form bound to a changing value is told when the trouble\nis over as well as when it starts."]})]})]})})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"exported-functions",children:"Exported functions"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Signature"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"qrFits"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"(value: string, level) => boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:'Whether a value still fits — the question the component asks before it\nencodes anything, so a defect in the generator stays a defect instead of\nbeing reported as "too much text".'})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"qrCodeMatrix"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"(value: string, level?) => boolean[][]"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The finished module grid, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"true"})," is dark. Throws on an empty\nvalue and on one past capacity."]})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"qrDataCodewords"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"qrVersionFor"}),","," ","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"qrSize"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"—"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The capacity arithmetic, exported so a caller that wants numbers in its\nown message can ask rather than reimplement the tables."})})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"sizing",children:"Sizing"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The host renders at ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"12rem"})," by default. Size it from the outside either with a\nwidth utility, or — with no dependence on cascade-layer order — through the\nnamed hook ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-qr-code-size"}),":"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-qr-code value="…" style="--ui-qr-code-size: 20rem"></ui-qr-code>\n'})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/qr-code/qr-code.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,EmptyValue:()=>EmptyValue,Levels:()=>Levels,OnDarkSurface:()=>OnDarkSurface,OverCapacity:()=>OverCapacity,Sizes:()=>Sizes,__namedExportsOrder:()=>__namedExportsOrder,default:()=>qr_code_component_stories});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var qr_code_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/qr-code/qr-code.component.css?ngResource"),qr_code_componentngResource_default=__webpack_require__.n(qr_code_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_resource_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");const LEVEL_FORMAT_BITS={L:1,M:0,Q:3,H:2},LEVEL_INDEX={L:0,M:1,Q:2,H:3},ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],PAD_BYTES=[236,17];function gfMultiply(x,y){let z=0;for(let i=7;i>=0;i--)z=z<<1^285*(z>>>7),z^=(y>>>i&1)*x;return 255&z}function reedSolomonRemainder(data,divisor){const result=new Array(divisor.length).fill(0);for(const byte of data){const factor=byte^result.shift();result.push(0);for(let i=0;i<divisor.length;i++)result[i]^=gfMultiply(divisor[i],factor)}return result}function qrSize(version){return 4*version+17}function rawDataModules(version){let result=(16*version+128)*version+64;if(version>=2){const numAlign=Math.floor(version/7)+2;result-=(25*numAlign-10)*numAlign-55,version>=7&&(result-=36)}return result}function qrDataCodewords(version,level){const ecl=LEVEL_INDEX[level];return Math.floor(rawDataModules(version)/8)-ECC_CODEWORDS_PER_BLOCK[ecl][version]*NUM_ERROR_CORRECTION_BLOCKS[ecl][version]}function characterCountBits(version){return version<10?8:16}function appendBits(bits,value,count){for(let i=count-1;i>=0;i--)bits.push(value>>>i&1)}function interleaveBlocks(data,version,level){const ecl=LEVEL_INDEX[level],numBlocks=NUM_ERROR_CORRECTION_BLOCKS[ecl][version],eccLen=ECC_CODEWORDS_PER_BLOCK[ecl][version],rawCodewords=Math.floor(rawDataModules(version)/8),numShort=numBlocks-rawCodewords%numBlocks,shortDataLen=Math.floor(rawCodewords/numBlocks)-eccLen,divisor=function reedSolomonDivisor(degree){if(degree<1||degree>255)throw new Error(`reedSolomonDivisor: degree out of range: ${degree}`);const result=new Array(degree).fill(0);result[degree-1]=1;let root=1;for(let i=0;i<degree;i++){for(let j=0;j<result.length;j++)result[j]=gfMultiply(result[j],root),j+1<result.length&&(result[j]^=result[j+1]);root=gfMultiply(root,2)}return result}(eccLen),blocks=[];let offset=0;for(let i=0;i<numBlocks;i++){const len=shortDataLen+(i<numShort?0:1),block=data.slice(offset,offset+len);offset+=len,blocks.push({data:block,ecc:reedSolomonRemainder(block,divisor)})}const result=[];for(let i=0;i<shortDataLen+1;i++)for(const block of blocks)i<block.data.length&&result.push(block.data[i]);for(let i=0;i<eccLen;i++)for(const block of blocks)result.push(block.ecc[i]);return result}function newGrid(size){return{size,modules:Array.from({length:size},()=>new Array(size).fill(!1)),isFunction:Array.from({length:size},()=>new Array(size).fill(!1))}}function setFunction(grid,x,y,dark){x<0||x>=grid.size||y<0||y>=grid.size||(grid.modules[y][x]=dark,grid.isFunction[y][x]=!0)}function drawFinder(grid,x,y){for(let dy=-4;dy<=4;dy++)for(let dx=-4;dx<=4;dx++){const distance=Math.max(Math.abs(dx),Math.abs(dy));setFunction(grid,x+dx,y+dy,2!==distance&&4!==distance)}}function drawAlignment(grid,x,y){for(let dy=-2;dy<=2;dy++)for(let dx=-2;dx<=2;dx++)setFunction(grid,x+dx,y+dy,1!==Math.max(Math.abs(dx),Math.abs(dy)))}function drawFormat(grid,level,mask){const bits=function qrFormatBits(level,mask){const data=LEVEL_FORMAT_BITS[level]<<3|mask;let rem=data;for(let i=0;i<10;i++)rem=rem<<1^1335*(rem>>>9);return 32767&(21522^(data<<10|rem))}(level,mask),bit=i=>!!(bits>>>i&1),size=grid.size;for(let i=0;i<=5;i++)setFunction(grid,8,i,bit(i));setFunction(grid,8,7,bit(6)),setFunction(grid,8,8,bit(7)),setFunction(grid,7,8,bit(8));for(let i=9;i<15;i++)setFunction(grid,14-i,8,bit(i));for(let i=0;i<8;i++)setFunction(grid,size-1-i,8,bit(i));for(let i=8;i<15;i++)setFunction(grid,8,size-15+i,bit(i));setFunction(grid,8,size-8,!0)}function drawFunctionPatterns(grid,version,level){const size=grid.size;for(let i=0;i<size;i++)setFunction(grid,6,i,i%2==0),setFunction(grid,i,6,i%2==0);drawFinder(grid,3,3),drawFinder(grid,size-4,3),drawFinder(grid,3,size-4);const positions=function alignmentPatternPositions(version){if(1===version)return[];const count=Math.floor(version/7)+2,step=32===version?26:2*Math.ceil((4*version+4)/(2*count-2)),result=[6];for(let pos=qrSize(version)-7;result.length<count;pos-=step)result.splice(1,0,pos);return result}(version);for(let i=0;i<positions.length;i++)for(let j=0;j<positions.length;j++){0===i&&0===j||0===i&&j===positions.length-1||i===positions.length-1&&0===j||drawAlignment(grid,positions[i],positions[j])}if(drawFormat(grid,level,0),version>=7){const bits=function qrVersionBits(version){let rem=version;for(let i=0;i<12;i++)rem=rem<<1^7973*(rem>>>11);return 262143&(version<<12|rem)}(version);for(let i=0;i<18;i++){const dark=!!(bits>>>i&1),a=size-11+i%3,b=Math.floor(i/3);setFunction(grid,a,b,dark),setFunction(grid,b,a,dark)}}}const MASK_CONDITIONS=[(x,y)=>(x+y)%2==0,(_x,y)=>y%2==0,x=>x%3==0,(x,y)=>(x+y)%3==0,(x,y)=>(Math.floor(x/3)+Math.floor(y/2))%2==0,(x,y)=>x*y%2+x*y%3==0,(x,y)=>(x*y%2+x*y%3)%2==0,(x,y)=>((x+y)%2+x*y%3)%2==0];function applyMask(grid,mask){const condition=MASK_CONDITIONS[mask];for(let y=0;y<grid.size;y++)for(let x=0;x<grid.size;x++)!grid.isFunction[y][x]&&condition(x,y)&&(grid.modules[y][x]=!grid.modules[y][x])}const FINDER_LIKE=[[!0,!1,!0,!0,!0,!1,!0,!1,!1,!1,!1],[!1,!1,!1,!1,!0,!1,!0,!0,!0,!1,!0]];function bothOrientations(modules,rule){const rows=modules.length,cols=modules[0]?.length??0;return rule((a,b)=>modules[a][b],rows,cols)+rule((a,b)=>modules[b][a],cols,rows)}function maskPenalty(modules){return function penaltyRuns(modules){return bothOrientations(modules,(at,lines,length)=>{let penalty=0;for(let a=0;a<lines;a++){let run=1;for(let b=1;b<length;b++)at(a,b)===at(a,b-1)?(run++,5===run?penalty+=3:run>5&&(penalty+=1)):run=1}return penalty})}(modules)+function penaltyBlocks(modules){const rows=modules.length,cols=modules[0]?.length??0;let penalty=0;for(let y=0;y+1<rows;y++)for(let x=0;x+1<cols;x++){const c=modules[y][x];c===modules[y][x+1]&&c===modules[y+1][x]&&c===modules[y+1][x+1]&&(penalty+=3)}return penalty}(modules)+function penaltyFinderLike(modules){return bothOrientations(modules,(at,lines,length)=>{let penalty=0;for(let a=0;a<lines;a++)for(let b=0;b+FINDER_LIKE[0].length<=length;b++)for(const pattern of FINDER_LIKE)pattern.every((dark,k)=>at(a,b+k)===dark)&&(penalty+=40);return penalty})}(modules)+function penaltyBalance(modules){let dark=0,total=0;for(const row of modules)for(const cell of row)total++,cell&&dark++;const percent=100*dark/total;return 10*Math.floor(Math.abs(percent-50)/5)}(modules)}function qrCodeMatrix(value,level="M"){if(0===value.length)throw new Error("qrCodeMatrix: empty value");const bytes=(new TextEncoder).encode(value),version=function qrVersionFor(byteLength,level){for(let version=1;version<=40;version++){const capacityBits=8*qrDataCodewords(version,level);if(4+characterCountBits(version)+8*byteLength<=capacityBits)return version}throw new Error(`qrVersionFor: ${byteLength} bytes exceed the capacity of level ${level}`)}(bytes.length,level),codewords=interleaveBlocks(function dataCodewords(bytes,version,level){const capacity=8*qrDataCodewords(version,level),bits=[];appendBits(bits,4,4),appendBits(bits,bytes.length,characterCountBits(version));for(const byte of bytes)appendBits(bits,byte,8);appendBits(bits,0,Math.min(4,capacity-bits.length)),appendBits(bits,0,(8-bits.length%8)%8);const codewords=[];for(let i=0;i<bits.length;i+=8){let byte=0;for(let j=0;j<8;j++)byte=byte<<1|bits[i+j];codewords.push(byte)}for(let i=0;8*codewords.length<capacity;i++)codewords.push(PAD_BYTES[i%2]);return codewords}(bytes,version,level),version,level),grid=newGrid(qrSize(version));drawFunctionPatterns(grid,version,level),function drawCodewords(grid,codewords){const size=grid.size;let i=0;for(let right=size-1;right>=1;right-=2){6===right&&(right=5);for(let vert=0;vert<size;vert++)for(let j=0;j<2;j++){const x=right-j,y=right+1&2?vert:size-1-vert;!grid.isFunction[y][x]&&i<8*codewords.length&&(grid.modules[y][x]=!!(codewords[i>>>3]>>>7-(7&i)&1),i++)}}}(grid,codewords);let bestMask=0,bestPenalty=1/0;for(let mask=0;mask<8;mask++){applyMask(grid,mask),drawFormat(grid,level,mask);const penalty=maskPenalty(grid.modules);penalty<bestPenalty&&(bestPenalty=penalty,bestMask=mask),applyMask(grid,mask)}return applyMask(grid,bestMask),drawFormat(grid,level,bestMask),grid.modules}let UiQrCodeComponent=class UiQrCodeComponent{value=core.input.required();level=(0,core.input)("M");overCapacity=(0,core.output)();state=(0,_resource_chunk.EW)(()=>0===this.value().length?null:!function qrFits(value,level){if(0===value.length)return!1;const byteLength=(new TextEncoder).encode(value).length,capacityBits=8*qrDataCodewords(40,level);return 4+characterCountBits(40)+8*byteLength<=capacityBits}(this.value(),this.level()));matrix=(0,_resource_chunk.EW)(()=>!1!==this.state()?[]:qrCodeMatrix(this.value(),this.level()));extent=(0,_resource_chunk.EW)(()=>{const size=this.matrix().length;return 0===size?0:size+8});runs=(0,_resource_chunk.EW)(()=>{const runs=[],matrix=this.matrix();for(const[y,row]of matrix.entries())for(let x=0;x<row.length;x++){if(!row[x])continue;const start=x;for(;x+1<row.length&&row[x+1];)x++;runs.push({x:start+4,y:y+4,width:x-start+1})}return runs});constructor(){(0,_effect_chunk2.QZP)(()=>this.overCapacity.emit(this.state()))}static ctorParameters=()=>[];static propDecorators={value:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"value",required:!0,transform:void 0}]}],level:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"level",required:!1,transform:void 0}]}],overCapacity:[{type:_debug_node_chunk.k7i,args:["overCapacity"]}]}};UiQrCodeComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-qr-code",template:'@if (extent() > 0) {\n \x3c!-- One user unit per module, so the viewBox carries the whole geometry and\n the rendered size is entirely a matter of CSS. --\x3e\n <svg\n [attr.viewBox]="\'0 0 \' + extent() + \' \' + extent()"\n role="img"\n [attr.aria-label]="value()"\n >\n <rect\n x="0"\n y="0"\n [attr.width]="extent()"\n [attr.height]="extent()"\n fill="#fff"\n />\n @for (run of runs(); track $index) {\n <rect\n [attr.x]="run.x"\n [attr.y]="run.y"\n [attr.width]="run.width"\n height="1"\n fill="#000"\n />\n }\n </svg>\n} @else if (state()) {\n <p class="_message">{{ \'qrCode.overCapacity\' | transloco }}</p>\n} @else {\n \x3c!-- Nothing was given. A statement, not a request: only whoever supplies the\n value knows what is missing. --\x3e\n <p class="_hint">{{ \'qrCode.empty\' | transloco }}</p>\n}\n',encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[qr_code_componentngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiQrCodeComponent);const qr_code_component_stories={title:"Atoms/QR Code",component:UiQrCodeComponent,argTypes:{value:{control:"text"},level:{control:"inline-radio",options:["L","M","Q","H"]}}},Default={args:{value:"https://moja.work",level:"M"},render:args=>({props:{...args},template:'<ui-qr-code [value]="value" [level]="level"></ui-qr-code>'})},Levels={argTypes:{level:{table:{disable:!0}}},args:{value:"https://moja.work"},render:args=>({props:{...args},template:'\n <section class="grid grid-cols-4 gap-4">\n <ui-qr-code class="w-full" [value]="value" [level]="\'L\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'M\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'Q\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'H\'"></ui-qr-code>\n </section>\n '})},Sizes={args:{value:"https://moja.work",level:"M"},render:args=>({props:{...args},template:'\n <section class="flex flex-wrap items-start gap-4">\n <ui-qr-code class="w-24" [value]="value" [level]="level"></ui-qr-code>\n <ui-qr-code class="w-40" [value]="value" [level]="level"></ui-qr-code>\n <ui-qr-code class="w-64" [value]="value" [level]="level"></ui-qr-code>\n </section>\n '})},OnDarkSurface={args:{value:"https://moja.work",level:"M"},render:args=>({props:{...args},template:'\n <section class="flex gap-4 bg-black p-8">\n <ui-qr-code class="w-48" [value]="value" [level]="level"></ui-qr-code>\n </section>\n '})},EmptyValue={args:{value:"",level:"M"},render:args=>({props:{...args},template:'<ui-qr-code [value]="value" [level]="level"></ui-qr-code>'})},OverCapacity={parameters:{controls:{disable:!0}},render:()=>({props:{long:"x".repeat(2500)},template:'\n <section class="flex flex-col items-start gap-4">\n <ui-qr-code class="w-48" [value]="long" [level]="\'H\'"></ui-qr-code>\n <ui-qr-code class="w-48" [value]="long" [level]="\'L\'"></ui-qr-code>\n </section>\n '})},__namedExportsOrder=["Default","Levels","Sizes","OnDarkSurface","EmptyValue","OverCapacity"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"{\n args: {\n value: 'https://moja.work',\n level: 'M'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `<ui-qr-code [value]=\"value\" [level]=\"level\"></ui-qr-code>`\n })\n}",...Default.parameters?.docs?.source},description:{story:"The default. Any text works — the longer the payload, the higher the\nversion the encoder picks and the finer the grid gets.",...Default.parameters?.docs?.description}}},Levels.parameters={...Levels.parameters,docs:{...Levels.parameters?.docs,source:{originalSource:'{\n // The four levels are named in the template, so the level control would sit\n // there offering a setting this story does not read. The value control stays\n // — it moves all four at once, which is exactly the comparison.\n argTypes: {\n level: {\n table: {\n disable: true\n }\n }\n },\n args: {\n value: \'https://moja.work\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <section class="grid grid-cols-4 gap-4">\n <ui-qr-code class="w-full" [value]="value" [level]="\'L\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'M\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'Q\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'H\'"></ui-qr-code>\n </section>\n `\n })\n}',...Levels.parameters?.docs?.source},description:{story:"The four error correction levels at the same payload. Higher correction\nsurvives more damage and costs modules: L recovers about 7% of the code,\nH about 30%, and the grid grows accordingly.",...Levels.parameters?.docs?.description}}},Sizes.parameters={...Sizes.parameters,docs:{...Sizes.parameters?.docs,source:{originalSource:'{\n args: {\n value: \'https://moja.work\',\n level: \'M\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <section class="flex flex-wrap items-start gap-4">\n <ui-qr-code class="w-24" [value]="value" [level]="level"></ui-qr-code>\n <ui-qr-code class="w-40" [value]="value" [level]="level"></ui-qr-code>\n <ui-qr-code class="w-64" [value]="value" [level]="level"></ui-qr-code>\n </section>\n `\n })\n}',...Sizes.parameters?.docs?.source},description:{story:"Size comes from the outside. `shape-rendering: crispEdges` keeps the\nmodules meeting edge to edge at every size — without it a browser leaves\nhairlines between them and a scanner reading off the screen sees a grid\nthat is not quite solid.",...Sizes.parameters?.docs?.description}}},OnDarkSurface.parameters={...OnDarkSurface.parameters,docs:{...OnDarkSurface.parameters?.docs,source:{originalSource:'{\n args: {\n value: \'https://moja.work\',\n level: \'M\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <section class="flex gap-4 bg-black p-8">\n <ui-qr-code class="w-48" [value]="value" [level]="level"></ui-qr-code>\n </section>\n `\n })\n}',...OnDarkSurface.parameters?.docs?.source},description:{story:"Black on white in both themes, on purpose — same reason as the barcode.",...OnDarkSurface.parameters?.docs?.description}}},EmptyValue.parameters={...EmptyValue.parameters,docs:{...EmptyValue.parameters?.docs,source:{originalSource:"{\n args: {\n value: '',\n level: 'M'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `<ui-qr-code [value]=\"value\" [level]=\"level\"></ui-qr-code>`\n })\n}",...EmptyValue.parameters?.docs?.source},description:{story:"Nothing given at all. That is not a failure and does not read like one — the\ncomponent states it quietly and reports `null` rather than `true`, so a form\ndoes not accuse a field nobody has filled in yet.",...EmptyValue.parameters?.docs?.description}}},OverCapacity.parameters={...OverCapacity.parameters,docs:{...OverCapacity.parameters?.docs,source:{originalSource:'{\n // Both the payload and the two levels come from the story itself; neither\n // control would move anything here.\n parameters: {\n controls: {\n disable: true\n }\n },\n render: () => ({\n props: {\n long: \'x\'.repeat(2500)\n },\n template: `\n <section class="flex flex-col items-start gap-4">\n <ui-qr-code class="w-48" [value]="long" [level]="\'H\'"></ui-qr-code>\n <ui-qr-code class="w-48" [value]="long" [level]="\'L\'"></ui-qr-code>\n </section>\n `\n })\n}',...OverCapacity.parameters?.docs?.source},description:{story:"The one way a value can fail: past the capacity of version 40. Everything\nshort of that resolves itself, because the version grows to fit.\n\nThe same payload changes sides with the level — `H` keeps a third of the\ncode recoverable and pays for it in space, so it runs out first.",...OverCapacity.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/qr-code/qr-code.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Encapsulation.None — one nested block anchored on the tag, so the rules\n cannot leak while the host itself stays styleable from outside. */\nui-qr-code {\n display: block;\n /* A sensible default; override from the outside for anything else — either\n with a width utility (the ui layer sits below `utilities`, tickets#241) or\n by setting the named hook, which needs no layer order to win. */\n width: var(--ui-qr-code-size, 12rem);\n\n svg {\n display: block;\n width: 100%;\n height: auto;\n border-radius: calc(var(--ui-border-radius) / 2);\n /* Modules meet edge to edge. Without this, a browser that antialiases the\n rect borders leaves hairlines between them, and a scanner reading off a\n screen sees a grid that is not quite solid. */\n shape-rendering: crispEdges;\n }\n\n /* The two states that carry a sentence instead of a picture. They borrow the\n image editor's pair, so a refusal reads the same wherever it appears: what\n went wrong is loud, what is simply absent is quiet. */\n ._message {\n margin: 0;\n padding: calc(var(--ui-spacer) * 0.25) calc(var(--ui-spacer) * 0.5);\n background-color: var(--ui-c-warn);\n color: var(--ui-c-static);\n border-radius: var(--ui-border-radius);\n }\n\n ._hint {\n margin: 0;\n text-align: center;\n color: var(--ui-c-default);\n opacity: 0.75;\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[4365],{"./node_modules/css-loader/dist/runtime/api.js"(module){"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map(function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content}).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k<this.length;k++){var id=this[k][0];null!=id&&(alreadyImportedModules[id]=!0)}for(var _k=0;_k<modules.length;_k++){var item=[].concat(modules[_k]);dedupe&&alreadyImportedModules[item[0]]||(void 0!==layer&&(void 0===item[5]||(item[1]="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js"(module){"use strict";module.exports=function(i){return i[1]}},"./libs/ui/src/lib/atoms/qr-code/qr-code.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,EmptyValue:()=>EmptyValue,Levels:()=>Levels,OnDarkSurface:()=>OnDarkSurface,OverCapacity:()=>OverCapacity,Sizes:()=>Sizes,__namedExportsOrder:()=>__namedExportsOrder,default:()=>qr_code_component_stories});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var qr_code_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/qr-code/qr-code.component.css?ngResource"),qr_code_componentngResource_default=__webpack_require__.n(qr_code_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_resource_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");const LEVEL_FORMAT_BITS={L:1,M:0,Q:3,H:2},LEVEL_INDEX={L:0,M:1,Q:2,H:3},ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],PAD_BYTES=[236,17];function gfMultiply(x,y){let z=0;for(let i=7;i>=0;i--)z=z<<1^285*(z>>>7),z^=(y>>>i&1)*x;return 255&z}function reedSolomonRemainder(data,divisor){const result=new Array(divisor.length).fill(0);for(const byte of data){const factor=byte^result.shift();result.push(0);for(let i=0;i<divisor.length;i++)result[i]^=gfMultiply(divisor[i],factor)}return result}function qrSize(version){return 4*version+17}function rawDataModules(version){let result=(16*version+128)*version+64;if(version>=2){const numAlign=Math.floor(version/7)+2;result-=(25*numAlign-10)*numAlign-55,version>=7&&(result-=36)}return result}function qrDataCodewords(version,level){const ecl=LEVEL_INDEX[level];return Math.floor(rawDataModules(version)/8)-ECC_CODEWORDS_PER_BLOCK[ecl][version]*NUM_ERROR_CORRECTION_BLOCKS[ecl][version]}function characterCountBits(version){return version<10?8:16}function appendBits(bits,value,count){for(let i=count-1;i>=0;i--)bits.push(value>>>i&1)}function interleaveBlocks(data,version,level){const ecl=LEVEL_INDEX[level],numBlocks=NUM_ERROR_CORRECTION_BLOCKS[ecl][version],eccLen=ECC_CODEWORDS_PER_BLOCK[ecl][version],rawCodewords=Math.floor(rawDataModules(version)/8),numShort=numBlocks-rawCodewords%numBlocks,shortDataLen=Math.floor(rawCodewords/numBlocks)-eccLen,divisor=function reedSolomonDivisor(degree){if(degree<1||degree>255)throw new Error(`reedSolomonDivisor: degree out of range: ${degree}`);const result=new Array(degree).fill(0);result[degree-1]=1;let root=1;for(let i=0;i<degree;i++){for(let j=0;j<result.length;j++)result[j]=gfMultiply(result[j],root),j+1<result.length&&(result[j]^=result[j+1]);root=gfMultiply(root,2)}return result}(eccLen),blocks=[];let offset=0;for(let i=0;i<numBlocks;i++){const len=shortDataLen+(i<numShort?0:1),block=data.slice(offset,offset+len);offset+=len,blocks.push({data:block,ecc:reedSolomonRemainder(block,divisor)})}const result=[];for(let i=0;i<shortDataLen+1;i++)for(const block of blocks)i<block.data.length&&result.push(block.data[i]);for(let i=0;i<eccLen;i++)for(const block of blocks)result.push(block.ecc[i]);return result}function newGrid(size){return{size,modules:Array.from({length:size},()=>new Array(size).fill(!1)),isFunction:Array.from({length:size},()=>new Array(size).fill(!1))}}function setFunction(grid,x,y,dark){x<0||x>=grid.size||y<0||y>=grid.size||(grid.modules[y][x]=dark,grid.isFunction[y][x]=!0)}function drawFinder(grid,x,y){for(let dy=-4;dy<=4;dy++)for(let dx=-4;dx<=4;dx++){const distance=Math.max(Math.abs(dx),Math.abs(dy));setFunction(grid,x+dx,y+dy,2!==distance&&4!==distance)}}function drawAlignment(grid,x,y){for(let dy=-2;dy<=2;dy++)for(let dx=-2;dx<=2;dx++)setFunction(grid,x+dx,y+dy,1!==Math.max(Math.abs(dx),Math.abs(dy)))}function drawFormat(grid,level,mask){const bits=function qrFormatBits(level,mask){const data=LEVEL_FORMAT_BITS[level]<<3|mask;let rem=data;for(let i=0;i<10;i++)rem=rem<<1^1335*(rem>>>9);return 32767&(21522^(data<<10|rem))}(level,mask),bit=i=>!!(bits>>>i&1),size=grid.size;for(let i=0;i<=5;i++)setFunction(grid,8,i,bit(i));setFunction(grid,8,7,bit(6)),setFunction(grid,8,8,bit(7)),setFunction(grid,7,8,bit(8));for(let i=9;i<15;i++)setFunction(grid,14-i,8,bit(i));for(let i=0;i<8;i++)setFunction(grid,size-1-i,8,bit(i));for(let i=8;i<15;i++)setFunction(grid,8,size-15+i,bit(i));setFunction(grid,8,size-8,!0)}function drawFunctionPatterns(grid,version,level){const size=grid.size;for(let i=0;i<size;i++)setFunction(grid,6,i,i%2==0),setFunction(grid,i,6,i%2==0);drawFinder(grid,3,3),drawFinder(grid,size-4,3),drawFinder(grid,3,size-4);const positions=function alignmentPatternPositions(version){if(1===version)return[];const count=Math.floor(version/7)+2,step=32===version?26:2*Math.ceil((4*version+4)/(2*count-2)),result=[6];for(let pos=qrSize(version)-7;result.length<count;pos-=step)result.splice(1,0,pos);return result}(version);for(let i=0;i<positions.length;i++)for(let j=0;j<positions.length;j++){0===i&&0===j||0===i&&j===positions.length-1||i===positions.length-1&&0===j||drawAlignment(grid,positions[i],positions[j])}if(drawFormat(grid,level,0),version>=7){const bits=function qrVersionBits(version){let rem=version;for(let i=0;i<12;i++)rem=rem<<1^7973*(rem>>>11);return 262143&(version<<12|rem)}(version);for(let i=0;i<18;i++){const dark=!!(bits>>>i&1),a=size-11+i%3,b=Math.floor(i/3);setFunction(grid,a,b,dark),setFunction(grid,b,a,dark)}}}const MASK_CONDITIONS=[(x,y)=>(x+y)%2==0,(_x,y)=>y%2==0,x=>x%3==0,(x,y)=>(x+y)%3==0,(x,y)=>(Math.floor(x/3)+Math.floor(y/2))%2==0,(x,y)=>x*y%2+x*y%3==0,(x,y)=>(x*y%2+x*y%3)%2==0,(x,y)=>((x+y)%2+x*y%3)%2==0];function applyMask(grid,mask){const condition=MASK_CONDITIONS[mask];for(let y=0;y<grid.size;y++)for(let x=0;x<grid.size;x++)!grid.isFunction[y][x]&&condition(x,y)&&(grid.modules[y][x]=!grid.modules[y][x])}const FINDER_LIKE=[[!0,!1,!0,!0,!0,!1,!0,!1,!1,!1,!1],[!1,!1,!1,!1,!0,!1,!0,!0,!0,!1,!0]];function bothOrientations(modules,rule){const rows=modules.length,cols=modules[0]?.length??0;return rule((a,b)=>modules[a][b],rows,cols)+rule((a,b)=>modules[b][a],cols,rows)}function maskPenalty(modules){return function penaltyRuns(modules){return bothOrientations(modules,(at,lines,length)=>{let penalty=0;for(let a=0;a<lines;a++){let run=1;for(let b=1;b<length;b++)at(a,b)===at(a,b-1)?(run++,5===run?penalty+=3:run>5&&(penalty+=1)):run=1}return penalty})}(modules)+function penaltyBlocks(modules){const rows=modules.length,cols=modules[0]?.length??0;let penalty=0;for(let y=0;y+1<rows;y++)for(let x=0;x+1<cols;x++){const c=modules[y][x];c===modules[y][x+1]&&c===modules[y+1][x]&&c===modules[y+1][x+1]&&(penalty+=3)}return penalty}(modules)+function penaltyFinderLike(modules){return bothOrientations(modules,(at,lines,length)=>{let penalty=0;for(let a=0;a<lines;a++)for(let b=0;b+FINDER_LIKE[0].length<=length;b++)for(const pattern of FINDER_LIKE)pattern.every((dark,k)=>at(a,b+k)===dark)&&(penalty+=40);return penalty})}(modules)+function penaltyBalance(modules){let dark=0,total=0;for(const row of modules)for(const cell of row)total++,cell&&dark++;const percent=100*dark/total;return 10*Math.floor(Math.abs(percent-50)/5)}(modules)}function qrCodeMatrix(value,level="M"){if(0===value.length)throw new Error("qrCodeMatrix: empty value");const bytes=(new TextEncoder).encode(value),version=function qrVersionFor(byteLength,level){for(let version=1;version<=40;version++){const capacityBits=8*qrDataCodewords(version,level);if(4+characterCountBits(version)+8*byteLength<=capacityBits)return version}throw new Error(`qrVersionFor: ${byteLength} bytes exceed the capacity of level ${level}`)}(bytes.length,level),codewords=interleaveBlocks(function dataCodewords(bytes,version,level){const capacity=8*qrDataCodewords(version,level),bits=[];appendBits(bits,4,4),appendBits(bits,bytes.length,characterCountBits(version));for(const byte of bytes)appendBits(bits,byte,8);appendBits(bits,0,Math.min(4,capacity-bits.length)),appendBits(bits,0,(8-bits.length%8)%8);const codewords=[];for(let i=0;i<bits.length;i+=8){let byte=0;for(let j=0;j<8;j++)byte=byte<<1|bits[i+j];codewords.push(byte)}for(let i=0;8*codewords.length<capacity;i++)codewords.push(PAD_BYTES[i%2]);return codewords}(bytes,version,level),version,level),grid=newGrid(qrSize(version));drawFunctionPatterns(grid,version,level),function drawCodewords(grid,codewords){const size=grid.size;let i=0;for(let right=size-1;right>=1;right-=2){6===right&&(right=5);for(let vert=0;vert<size;vert++)for(let j=0;j<2;j++){const x=right-j,y=right+1&2?vert:size-1-vert;!grid.isFunction[y][x]&&i<8*codewords.length&&(grid.modules[y][x]=!!(codewords[i>>>3]>>>7-(7&i)&1),i++)}}}(grid,codewords);let bestMask=0,bestPenalty=1/0;for(let mask=0;mask<8;mask++){applyMask(grid,mask),drawFormat(grid,level,mask);const penalty=maskPenalty(grid.modules);penalty<bestPenalty&&(bestPenalty=penalty,bestMask=mask),applyMask(grid,mask)}return applyMask(grid,bestMask),drawFormat(grid,level,bestMask),grid.modules}let UiQrCodeComponent=class UiQrCodeComponent{value=core.input.required();level=(0,core.input)("M");overCapacity=(0,core.output)();state=(0,_resource_chunk.EW)(()=>0===this.value().length?null:!function qrFits(value,level){if(0===value.length)return!1;const byteLength=(new TextEncoder).encode(value).length,capacityBits=8*qrDataCodewords(40,level);return 4+characterCountBits(40)+8*byteLength<=capacityBits}(this.value(),this.level()));matrix=(0,_resource_chunk.EW)(()=>!1!==this.state()?[]:qrCodeMatrix(this.value(),this.level()));extent=(0,_resource_chunk.EW)(()=>{const size=this.matrix().length;return 0===size?0:size+8});runs=(0,_resource_chunk.EW)(()=>{const runs=[],matrix=this.matrix();for(const[y,row]of matrix.entries())for(let x=0;x<row.length;x++){if(!row[x])continue;const start=x;for(;x+1<row.length&&row[x+1];)x++;runs.push({x:start+4,y:y+4,width:x-start+1})}return runs});constructor(){(0,_effect_chunk2.QZP)(()=>this.overCapacity.emit(this.state()))}static ctorParameters=()=>[];static propDecorators={value:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"value",required:!0,transform:void 0}]}],level:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"level",required:!1,transform:void 0}]}],overCapacity:[{type:_debug_node_chunk.k7i,args:["overCapacity"]}]}};UiQrCodeComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-qr-code",template:'@if (extent() > 0) {\n \x3c!-- One user unit per module, so the viewBox carries the whole geometry and\n the rendered size is entirely a matter of CSS. --\x3e\n <svg\n [attr.viewBox]="\'0 0 \' + extent() + \' \' + extent()"\n role="img"\n [attr.aria-label]="value()"\n >\n <rect\n x="0"\n y="0"\n [attr.width]="extent()"\n [attr.height]="extent()"\n fill="#fff"\n />\n @for (run of runs(); track $index) {\n <rect\n [attr.x]="run.x"\n [attr.y]="run.y"\n [attr.width]="run.width"\n height="1"\n fill="#000"\n />\n }\n </svg>\n} @else if (state()) {\n <p class="_message">{{ \'qrCode.overCapacity\' | transloco }}</p>\n} @else {\n \x3c!-- Nothing was given. A statement, not a request: only whoever supplies the\n value knows what is missing. --\x3e\n <p class="_hint">{{ \'qrCode.empty\' | transloco }}</p>\n}\n',encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[qr_code_componentngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiQrCodeComponent);const qr_code_component_stories={title:"Atoms/QR Code",component:UiQrCodeComponent,argTypes:{value:{control:"text"},level:{control:"inline-radio",options:["L","M","Q","H"]}}},Default={args:{value:"https://moja.work",level:"M"},render:args=>({props:{...args},template:'<ui-qr-code [value]="value" [level]="level"></ui-qr-code>'})},Levels={argTypes:{level:{table:{disable:!0}}},args:{value:"https://moja.work"},render:args=>({props:{...args},template:'\n <section class="grid grid-cols-4 gap-4">\n <ui-qr-code class="w-full" [value]="value" [level]="\'L\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'M\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'Q\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'H\'"></ui-qr-code>\n </section>\n '})},Sizes={args:{value:"https://moja.work",level:"M"},render:args=>({props:{...args},template:'\n <section class="flex flex-wrap items-start gap-4">\n <ui-qr-code class="w-24" [value]="value" [level]="level"></ui-qr-code>\n <ui-qr-code class="w-40" [value]="value" [level]="level"></ui-qr-code>\n <ui-qr-code class="w-64" [value]="value" [level]="level"></ui-qr-code>\n </section>\n '})},OnDarkSurface={args:{value:"https://moja.work",level:"M"},render:args=>({props:{...args},template:'\n <section class="flex gap-4 bg-black p-8">\n <ui-qr-code class="w-48" [value]="value" [level]="level"></ui-qr-code>\n </section>\n '})},EmptyValue={args:{value:"",level:"M"},render:args=>({props:{...args},template:'<ui-qr-code [value]="value" [level]="level"></ui-qr-code>'})},OverCapacity={parameters:{controls:{disable:!0}},render:()=>({props:{long:"x".repeat(2500)},template:'\n <section class="flex flex-col items-start gap-4">\n <ui-qr-code class="w-48" [value]="long" [level]="\'H\'"></ui-qr-code>\n <ui-qr-code class="w-48" [value]="long" [level]="\'L\'"></ui-qr-code>\n </section>\n '})},__namedExportsOrder=["Default","Levels","Sizes","OnDarkSurface","EmptyValue","OverCapacity"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"{\n args: {\n value: 'https://moja.work',\n level: 'M'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `<ui-qr-code [value]=\"value\" [level]=\"level\"></ui-qr-code>`\n })\n}",...Default.parameters?.docs?.source},description:{story:"The default. Any text works — the longer the payload, the higher the\nversion the encoder picks and the finer the grid gets.",...Default.parameters?.docs?.description}}},Levels.parameters={...Levels.parameters,docs:{...Levels.parameters?.docs,source:{originalSource:'{\n // The four levels are named in the template, so the level control would sit\n // there offering a setting this story does not read. The value control stays\n // — it moves all four at once, which is exactly the comparison.\n argTypes: {\n level: {\n table: {\n disable: true\n }\n }\n },\n args: {\n value: \'https://moja.work\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <section class="grid grid-cols-4 gap-4">\n <ui-qr-code class="w-full" [value]="value" [level]="\'L\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'M\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'Q\'"></ui-qr-code>\n <ui-qr-code class="w-full" [value]="value" [level]="\'H\'"></ui-qr-code>\n </section>\n `\n })\n}',...Levels.parameters?.docs?.source},description:{story:"The four error correction levels at the same payload. Higher correction\nsurvives more damage and costs modules: L recovers about 7% of the code,\nH about 30%, and the grid grows accordingly.",...Levels.parameters?.docs?.description}}},Sizes.parameters={...Sizes.parameters,docs:{...Sizes.parameters?.docs,source:{originalSource:'{\n args: {\n value: \'https://moja.work\',\n level: \'M\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <section class="flex flex-wrap items-start gap-4">\n <ui-qr-code class="w-24" [value]="value" [level]="level"></ui-qr-code>\n <ui-qr-code class="w-40" [value]="value" [level]="level"></ui-qr-code>\n <ui-qr-code class="w-64" [value]="value" [level]="level"></ui-qr-code>\n </section>\n `\n })\n}',...Sizes.parameters?.docs?.source},description:{story:"Size comes from the outside. `shape-rendering: crispEdges` keeps the\nmodules meeting edge to edge at every size — without it a browser leaves\nhairlines between them and a scanner reading off the screen sees a grid\nthat is not quite solid.",...Sizes.parameters?.docs?.description}}},OnDarkSurface.parameters={...OnDarkSurface.parameters,docs:{...OnDarkSurface.parameters?.docs,source:{originalSource:'{\n args: {\n value: \'https://moja.work\',\n level: \'M\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <section class="flex gap-4 bg-black p-8">\n <ui-qr-code class="w-48" [value]="value" [level]="level"></ui-qr-code>\n </section>\n `\n })\n}',...OnDarkSurface.parameters?.docs?.source},description:{story:"Black on white in both themes, on purpose — same reason as the barcode.",...OnDarkSurface.parameters?.docs?.description}}},EmptyValue.parameters={...EmptyValue.parameters,docs:{...EmptyValue.parameters?.docs,source:{originalSource:"{\n args: {\n value: '',\n level: 'M'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `<ui-qr-code [value]=\"value\" [level]=\"level\"></ui-qr-code>`\n })\n}",...EmptyValue.parameters?.docs?.source},description:{story:"Nothing given at all. That is not a failure and does not read like one — the\ncomponent states it quietly and reports `null` rather than `true`, so a form\ndoes not accuse a field nobody has filled in yet.",...EmptyValue.parameters?.docs?.description}}},OverCapacity.parameters={...OverCapacity.parameters,docs:{...OverCapacity.parameters?.docs,source:{originalSource:'{\n // Both the payload and the two levels come from the story itself; neither\n // control would move anything here.\n parameters: {\n controls: {\n disable: true\n }\n },\n render: () => ({\n props: {\n long: \'x\'.repeat(2500)\n },\n template: `\n <section class="flex flex-col items-start gap-4">\n <ui-qr-code class="w-48" [value]="long" [level]="\'H\'"></ui-qr-code>\n <ui-qr-code class="w-48" [value]="long" [level]="\'L\'"></ui-qr-code>\n </section>\n `\n })\n}',...OverCapacity.parameters?.docs?.source},description:{story:"The one way a value can fail: past the capacity of version 40. Everything\nshort of that resolves itself, because the version grows to fit.\n\nThe same payload changes sides with the level — `H` keeps a third of the\ncode recoverable and pays for it in space, so it runs out first.",...OverCapacity.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/qr-code/qr-code.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Encapsulation.None — one nested block anchored on the tag, so the rules\n cannot leak while the host itself stays styleable from outside. */\nui-qr-code {\n display: block;\n /* A sensible default; override from the outside for anything else — either\n with a width utility (the ui layer sits below `utilities`, tickets#241) or\n by setting the named hook, which needs no layer order to win. */\n width: var(--ui-qr-code-size, 12rem);\n\n svg {\n display: block;\n width: 100%;\n height: auto;\n border-radius: calc(var(--ui-border-radius) / 2);\n /* Modules meet edge to edge. Without this, a browser that antialiases the\n rect borders leaves hairlines between them, and a scanner reading off a\n screen sees a grid that is not quite solid. */\n shape-rendering: crispEdges;\n }\n\n /* The two states that carry a sentence instead of a picture. They borrow the\n image editor's pair, so a refusal reads the same wherever it appears: what\n went wrong is loud, what is simply absent is quiet. */\n ._message {\n margin: 0;\n padding: calc(var(--ui-spacer) * 0.25) calc(var(--ui-spacer) * 0.5);\n background-color: var(--ui-c-warn);\n color: var(--ui-c-static);\n border-radius: var(--ui-border-radius);\n }\n\n ._hint {\n margin: 0;\n text-align: center;\n color: var(--ui-c-default);\n opacity: 0.75;\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3685,7819],{"./node_modules/css-loader/dist/runtime/api.js"(module){"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map(function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content}).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k<this.length;k++){var id=this[k][0];null!=id&&(alreadyImportedModules[id]=!0)}for(var _k=0;_k<modules.length;_k++){var item=[].concat(modules[_k]);dedupe&&alreadyImportedModules[item[0]]||(void 0!==layer&&(void 0===item[5]||(item[1]="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js"(module){"use strict";module.exports=function(i){return i[1]}},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/rating/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_rating_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/rating/rating.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_rating_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-rating.json");function _createMdxContent(props){const _components={code:"code",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_rating_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"rating",children:"Rating"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A CSS-only rating display: a horizontal 0–100% bar shines through an icon\nmask. The Material icon glyphs clip a two-stop gradient\n(",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"background-clip: text"}),"), so the fill is visible only inside the icon\nshapes — five stars at 70% read as 3.5 filled stars. Works with any\nMaterial glyph; colours and size are CSS variables, so they take any CSS\ncolor, including ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"var(--ui-c-*)"})," tokens (theme aware)."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Shows a 0–100 % fill through a row of icon-shaped masks — five stars at 70 %\nread as three and a half. It is a display, not a control: it takes nothing from\nthe reader, emits nothing and holds no form state. Values outside the range are\nclamped; what the number means and where it comes from stays with the host.\nColours and size are CSS variables, not inputs."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"ui-rating",entry:_guide_ui_rating_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"properties",children:"Properties"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Input"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"value"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"number"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"0"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Fill level in percent (0–100); out-of-range values are clamped."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"icon"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'star'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Material icon glyph used as the mask shape."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"count"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"number"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"5"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Number of icons in the row."})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"css-variables",children:"CSS variables"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Colours and size are CSS variables, not inputs — set them from the outside,\non the tag or once on a container; each defaults to a library token:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-rating-color"}),": the filled part. Default ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"var(--ui-c-focus)"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-rating-track"}),": the unfilled part. Default ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"var(--ui-c-fourthly)"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-rating-size"}),": the icon size. Default ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"var(--ui-icon-size)"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-icon-font"}),": the glyph font, shared with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:".ui-icon"})," — swap it once and\nthe rating follows (see the icons page)."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The component writes none of these itself, so a value you set in a stylesheet\nis never overruled from inside the library. The only custom property it does\nwrite is the fill position, and that one is read from ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"value"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"accessibility",children:"Accessibility"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:['The glyph row is hidden from assistive technology — read aloud it would be\n"star star star star star". The tag itself is a ',(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"meter"})," from 0 to 100 and\nreports the clamped ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"value"})," as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"aria-valuenow"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Two things the component cannot know, so the tag has to bring them:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"A name."})," A meter without one is an error, not a silent gap — write\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"aria-label"})," on the tag."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"The words for the value"}),', if "70 percent" is not what you would say.\n',(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'aria-valuetext="7 of 10"'})," replaces the percentage in what is announced."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-rating [value]="70" aria-label="Rating" aria-valuetext="7 of 10"></ui-rating>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"basic-example",children:"Basic Example"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"70% over five stars — 3.5 filled stars. The three colour and size knobs\nin the panel bind the CSS variables on the tag:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_rating_component_stories__WEBPACK_IMPORTED_MODULE_4__.Rating}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"variants",children:"Variants"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Different glyphs, counts, sizes and token colours, each set through the\nvariables:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_rating_component_stories__WEBPACK_IMPORTED_MODULE_4__.RatingOverview}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"usage",children:"Usage"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-rating [value]="70" aria-label="Rating"></ui-rating>\n\n<ui-rating\n [value]="ratingSignal()"\n icon="favorite"\n [count]="5"\n [style.--ui-rating-color]="\'var(--ui-c-warn)\'"\n [style.--ui-rating-size]="\'1.6rem\'"\n aria-label="Rating"\n></ui-rating>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Or from a stylesheet, for every rating below a container:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-css",children:".reviews {\n --ui-rating-color: var(--ui-c-warn);\n --ui-rating-size: 1.6rem;\n}\n"})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/rating/rating.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Rating:()=>Rating,RatingOverview:()=>RatingOverview,__namedExportsOrder:()=>__namedExportsOrder,default:()=>rating_component_stories});var dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var rating_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/rating/rating.component.css?ngResource"),rating_componentngResource_default=__webpack_require__.n(rating_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_resource_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs");let UiRatingComponent=class UiRatingComponent{value=(0,core.input)(0);icon=(0,core.input)("star");count=(0,core.input)(5);clampedValue=(0,_resource_chunk.EW)(()=>Math.min(Math.max(this.value(),0),100));glyphs=(0,_resource_chunk.EW)(()=>Array.from({length:Math.max(0,this.count())},()=>this.icon()).join(" "));styleValue=(0,_resource_chunk.EW)(()=>`--rating-value:${this.clampedValue()}%;`);static propDecorators={value:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"value",required:!1,transform:void 0}]}],icon:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"icon",required:!1,transform:void 0}]}],count:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"count",required:!1,transform:void 0}]}]}};UiRatingComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-rating",template:'<div class="_icons" aria-hidden="true">{{ glyphs() }}</div>\n',standalone:!0,host:{"[style]":"styleValue()",role:"meter","aria-valuemin":"0","aria-valuemax":"100","[attr.aria-valuenow]":"clampedValue()"},styles:[rating_componentngResource_default()]})],UiRatingComponent);const rating_component_stories={title:"Atoms/Rating",component:UiRatingComponent,decorators:[(0,dist.Iz)({imports:[UiRatingComponent]})],argTypes:{value:{control:{type:"range",min:0,max:100}},icon:{control:"select",options:["star","favorite","grade","pets","bolt","local_pizza"]},count:{control:{type:"range",min:1,max:10,step:1}},color:{control:"select",options:["var(--ui-c-focus)","var(--ui-c-warn)","var(--ui-c-error)","var(--ui-c-success)","var(--ui-c-primary)"]},trackColor:{control:"select",options:["var(--ui-c-fourthly)","var(--ui-c-thirdly)","var(--ui-c-secondary)","var(--ui-c-default)","var(--ui-c-background)"]},size:{control:{type:"range",min:0,max:12,step:.5}}},args:{value:70,icon:"star",count:5,color:"var(--ui-c-focus)",trackColor:"var(--ui-c-fourthly)",size:0},parameters:{docs:{canvas:{sourceState:"none"}}},render:args=>({props:{...args},template:'\n <section class="relative flex flex-col p-4">\n <ui-rating\n aria-label="Rating"\n [value]="value"\n [icon]="icon"\n [count]="count"\n [style.--ui-rating-color]="color || null"\n [style.--ui-rating-track]="trackColor || null"\n [style.--ui-rating-size]="size > 0 ? size + \'rem\' : null"\n ></ui-rating>\n </section>\n '})},Rating={},RatingOverview={parameters:{controls:{disable:!0}},render:()=>({props:{variants:[{value:70,color:null,trackColor:null,icon:"star",count:5,size:null},{value:50,color:"var(--ui-c-warn)",trackColor:null,icon:"star",count:5,size:null},{value:88,color:"var(--ui-c-error)",trackColor:null,icon:"favorite",count:5,size:"6rem"},{value:30,color:"var(--ui-c-success)",trackColor:"var(--ui-c-secondary)",icon:"pets",count:8,size:"4rem"},{value:100,color:"var(--ui-c-focus)",trackColor:null,icon:"bolt",count:3,size:"8rem"}]},template:'\n <section class="relative flex flex-col gap-4 p-4">\n @for (variant of variants; track $index) {\n <ui-rating\n aria-label="Rating"\n [value]="variant.value"\n [icon]="variant.icon"\n [count]="variant.count"\n [style.--ui-rating-color]="variant.color"\n [style.--ui-rating-track]="variant.trackColor"\n [style.--ui-rating-size]="variant.size"\n ></ui-rating>\n }\n </section>\n '})},__namedExportsOrder=["Rating","RatingOverview"];Rating.parameters={...Rating.parameters,docs:{...Rating.parameters?.docs,source:{originalSource:"{}",...Rating.parameters?.docs?.source}}},RatingOverview.parameters={...RatingOverview.parameters,docs:{...RatingOverview.parameters?.docs,source:{originalSource:"{\n // Every row binds from its own list, not from the args — a panel here would\n // offer settings that move nothing.\n parameters: {\n controls: {\n disable: true\n }\n },\n render: () => ({\n props: {\n // colors ARE the demonstrated example here (allowed per story rules)\n variants: [{\n value: 70,\n color: null,\n trackColor: null,\n icon: 'star',\n count: 5,\n size: null\n }, {\n value: 50,\n color: 'var(--ui-c-warn)',\n trackColor: null,\n icon: 'star',\n count: 5,\n size: null\n }, {\n value: 88,\n color: 'var(--ui-c-error)',\n trackColor: null,\n icon: 'favorite',\n count: 5,\n size: '6rem'\n }, {\n value: 30,\n color: 'var(--ui-c-success)',\n trackColor: 'var(--ui-c-secondary)',\n icon: 'pets',\n count: 8,\n size: '4rem'\n }, {\n value: 100,\n color: 'var(--ui-c-focus)',\n trackColor: null,\n icon: 'bolt',\n count: 3,\n size: '8rem'\n }]\n },\n template: `\n <section class=\"relative flex flex-col gap-4 p-4\">\n @for (variant of variants; track $index) {\n <ui-rating\n aria-label=\"Rating\"\n [value]=\"variant.value\"\n [icon]=\"variant.icon\"\n [count]=\"variant.count\"\n [style.--ui-rating-color]=\"variant.color\"\n [style.--ui-rating-track]=\"variant.trackColor\"\n [style.--ui-rating-size]=\"variant.size\"\n ></ui-rating>\n }\n </section>\n `\n })\n}",...RatingOverview.parameters?.docs?.source}}}},"./libs/ui/src/lib/atoms/rating/rating.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n:host {\n display: inline-block;\n line-height: 1;\n}\n\n/* The glyph row masks the fill/track gradient: background-clip: text keeps\n the gradient visible only inside the icon shapes — the \"inverted icons\n over the bar\" effect. The icon font is applied directly rather than through\n the global .ui-icon class, which boxes itself to a single icon width — but\n it is the same VARIABLE that class reads, so a consumer who swaps the icon\n font once on a container gets the swap here too (see the icons page). */\n:host ._icons {\n display: inline-block;\n font-family: var(--ui-icon-font, 'Material Icons'), serif;\n font-weight: normal;\n font-style: normal;\n font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n letter-spacing: normal;\n direction: ltr;\n -webkit-user-select: none;\n user-select: none;\n line-height: 1;\n white-space: nowrap;\n /* Size and colours are consumer variables with a token fallback, never\n inline styles from the component: nothing here overrules the cascade. */\n font-size: var(--ui-rating-size, var(--ui-icon-size));\n word-spacing: -0.21em; /* space glyph is ~0.25em — keep a hairline gap at every size */\n background: linear-gradient(\n 90deg,\n var(--ui-rating-color, var(--ui-c-focus)) 0 var(--rating-value, 0%),\n var(--ui-rating-track, var(--ui-c-fourthly)) var(--rating-value, 0%) 100%\n );\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3685],{"./node_modules/css-loader/dist/runtime/api.js"(module){"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map(function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content}).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k<this.length;k++){var id=this[k][0];null!=id&&(alreadyImportedModules[id]=!0)}for(var _k=0;_k<modules.length;_k++){var item=[].concat(modules[_k]);dedupe&&alreadyImportedModules[item[0]]||(void 0!==layer&&(void 0===item[5]||(item[1]="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js"(module){"use strict";module.exports=function(i){return i[1]}},"./libs/ui/src/lib/atoms/rating/rating.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Rating:()=>Rating,RatingOverview:()=>RatingOverview,__namedExportsOrder:()=>__namedExportsOrder,default:()=>rating_component_stories});var dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var rating_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/rating/rating.component.css?ngResource"),rating_componentngResource_default=__webpack_require__.n(rating_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_resource_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs");let UiRatingComponent=class UiRatingComponent{value=(0,core.input)(0);icon=(0,core.input)("star");count=(0,core.input)(5);clampedValue=(0,_resource_chunk.EW)(()=>Math.min(Math.max(this.value(),0),100));glyphs=(0,_resource_chunk.EW)(()=>Array.from({length:Math.max(0,this.count())},()=>this.icon()).join(" "));styleValue=(0,_resource_chunk.EW)(()=>`--rating-value:${this.clampedValue()}%;`);static propDecorators={value:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"value",required:!1,transform:void 0}]}],icon:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"icon",required:!1,transform:void 0}]}],count:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"count",required:!1,transform:void 0}]}]}};UiRatingComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-rating",template:'<div class="_icons" aria-hidden="true">{{ glyphs() }}</div>\n',standalone:!0,host:{"[style]":"styleValue()",role:"meter","aria-valuemin":"0","aria-valuemax":"100","[attr.aria-valuenow]":"clampedValue()"},styles:[rating_componentngResource_default()]})],UiRatingComponent);const rating_component_stories={title:"Atoms/Rating",component:UiRatingComponent,decorators:[(0,dist.Iz)({imports:[UiRatingComponent]})],argTypes:{value:{control:{type:"range",min:0,max:100}},icon:{control:"select",options:["star","favorite","grade","pets","bolt","local_pizza"]},count:{control:{type:"range",min:1,max:10,step:1}},color:{control:"select",options:["var(--ui-c-focus)","var(--ui-c-warn)","var(--ui-c-error)","var(--ui-c-success)","var(--ui-c-primary)"]},trackColor:{control:"select",options:["var(--ui-c-fourthly)","var(--ui-c-thirdly)","var(--ui-c-secondary)","var(--ui-c-default)","var(--ui-c-background)"]},size:{control:{type:"range",min:0,max:12,step:.5}}},args:{value:70,icon:"star",count:5,color:"var(--ui-c-focus)",trackColor:"var(--ui-c-fourthly)",size:0},parameters:{docs:{canvas:{sourceState:"none"}}},render:args=>({props:{...args},template:'\n <section class="relative flex flex-col p-4">\n <ui-rating\n aria-label="Rating"\n [value]="value"\n [icon]="icon"\n [count]="count"\n [style.--ui-rating-color]="color || null"\n [style.--ui-rating-track]="trackColor || null"\n [style.--ui-rating-size]="size > 0 ? size + \'rem\' : null"\n ></ui-rating>\n </section>\n '})},Rating={},RatingOverview={parameters:{controls:{disable:!0}},render:()=>({props:{variants:[{value:70,color:null,trackColor:null,icon:"star",count:5,size:null},{value:50,color:"var(--ui-c-warn)",trackColor:null,icon:"star",count:5,size:null},{value:88,color:"var(--ui-c-error)",trackColor:null,icon:"favorite",count:5,size:"6rem"},{value:30,color:"var(--ui-c-success)",trackColor:"var(--ui-c-secondary)",icon:"pets",count:8,size:"4rem"},{value:100,color:"var(--ui-c-focus)",trackColor:null,icon:"bolt",count:3,size:"8rem"}]},template:'\n <section class="relative flex flex-col gap-4 p-4">\n @for (variant of variants; track $index) {\n <ui-rating\n aria-label="Rating"\n [value]="variant.value"\n [icon]="variant.icon"\n [count]="variant.count"\n [style.--ui-rating-color]="variant.color"\n [style.--ui-rating-track]="variant.trackColor"\n [style.--ui-rating-size]="variant.size"\n ></ui-rating>\n }\n </section>\n '})},__namedExportsOrder=["Rating","RatingOverview"];Rating.parameters={...Rating.parameters,docs:{...Rating.parameters?.docs,source:{originalSource:"{}",...Rating.parameters?.docs?.source}}},RatingOverview.parameters={...RatingOverview.parameters,docs:{...RatingOverview.parameters?.docs,source:{originalSource:"{\n // Every row binds from its own list, not from the args — a panel here would\n // offer settings that move nothing.\n parameters: {\n controls: {\n disable: true\n }\n },\n render: () => ({\n props: {\n // colors ARE the demonstrated example here (allowed per story rules)\n variants: [{\n value: 70,\n color: null,\n trackColor: null,\n icon: 'star',\n count: 5,\n size: null\n }, {\n value: 50,\n color: 'var(--ui-c-warn)',\n trackColor: null,\n icon: 'star',\n count: 5,\n size: null\n }, {\n value: 88,\n color: 'var(--ui-c-error)',\n trackColor: null,\n icon: 'favorite',\n count: 5,\n size: '6rem'\n }, {\n value: 30,\n color: 'var(--ui-c-success)',\n trackColor: 'var(--ui-c-secondary)',\n icon: 'pets',\n count: 8,\n size: '4rem'\n }, {\n value: 100,\n color: 'var(--ui-c-focus)',\n trackColor: null,\n icon: 'bolt',\n count: 3,\n size: '8rem'\n }]\n },\n template: `\n <section class=\"relative flex flex-col gap-4 p-4\">\n @for (variant of variants; track $index) {\n <ui-rating\n aria-label=\"Rating\"\n [value]=\"variant.value\"\n [icon]=\"variant.icon\"\n [count]=\"variant.count\"\n [style.--ui-rating-color]=\"variant.color\"\n [style.--ui-rating-track]=\"variant.trackColor\"\n [style.--ui-rating-size]=\"variant.size\"\n ></ui-rating>\n }\n </section>\n `\n })\n}",...RatingOverview.parameters?.docs?.source}}}},"./libs/ui/src/lib/atoms/rating/rating.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n:host {\n display: inline-block;\n line-height: 1;\n}\n\n/* The glyph row masks the fill/track gradient: background-clip: text keeps\n the gradient visible only inside the icon shapes — the \"inverted icons\n over the bar\" effect. The icon font is applied directly rather than through\n the global .ui-icon class, which boxes itself to a single icon width — but\n it is the same VARIABLE that class reads, so a consumer who swaps the icon\n font once on a container gets the swap here too (see the icons page). */\n:host ._icons {\n display: inline-block;\n font-family: var(--ui-icon-font, 'Material Icons'), serif;\n font-weight: normal;\n font-style: normal;\n font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n letter-spacing: normal;\n direction: ltr;\n -webkit-user-select: none;\n user-select: none;\n line-height: 1;\n white-space: nowrap;\n /* Size and colours are consumer variables with a token fallback, never\n inline styles from the component: nothing here overrules the cascade. */\n font-size: var(--ui-rating-size, var(--ui-icon-size));\n word-spacing: -0.21em; /* space glyph is ~0.25em — keep a hairline gap at every size */\n background: linear-gradient(\n 90deg,\n var(--ui-rating-color, var(--ui-c-focus)) 0 var(--rating-value, 0%),\n var(--ui-rating-track, var(--ui-c-fourthly)) var(--rating-value, 0%) 100%\n );\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3550],{"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/reader-doc/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/reader-doc/reader-doc.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_reader_doc_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-reader-doc.json");function _createMdxContent(props){const _components={code:"code",em:"em",h3:"h3",hr:"hr",p:"p",strong:"strong",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"readerdoc",children:"ReaderDoc"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Reads a Markdown document in the house design."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["It takes Markdown as a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"string"}),". No ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"HttpClient"}),", no route, no cache, no\nlanguage switching, no publication list — everything that knows ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.em,{children:"where"})," a text\ncame from, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.em,{children:"which"})," language it should appear in and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.em,{children:"whether"})," there is a file\nto take away stands in front of it."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"That is what lets the same component serve a public site, this Storybook page\nand a customer instance without any of them leaking into the others. On this\npage it runs with no network at all."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__.Default}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"ui-reader-doc",entry:_guide_ui_reader_doc_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"raw-html-is-discarded-not-sanitised",children:"Raw HTML is discarded, not sanitised"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Markdown allows embedded HTML, and that is the only way foreign markup could\nreach the page. The renderer closes it without any dependency: an HTML token\nproduces nothing, so afterwards the output can only consist of the tags the\nMarkdown parser builds itself. What is left to check is exactly one thing —\nthe values of ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"href"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"src"}),". Three schemes pass — ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"http:"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"https:"})," and\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"mailto:"})," — and so does every relative address, an anchor included. Everything\nelse is refused, counted and named like a dropped tag. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"urlAllowed"})," carries a\nspec of its own listing both sides, so this paragraph cannot drift away from\nthe code."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["This is a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"tighter"})," boundary than a sanitiser, not a cheaper one. A sanitiser\npermits a lot and forbids the known-bad; this renderer cannot produce anything\nforeign in the first place. It is a design decision as much as a safety one: a\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<div align>"})," or an inline ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"style"})," out of a README would break the house design\nopen from the inside."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The words between the tags survive — they are separate tokens, so a sentence\nkeeps its text and loses only its markup."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"And nothing disappears quietly."})," What was dropped is counted, named and\nstated on the page. There is no input that hides it: the notice appears only\nwhen content really was left out, so a switch against it would be flipped in\nexactly the moment it is needed. Whoever writes Markdown without HTML never\nsees it."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__.DroppedMarkup}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"A trap worth knowing:"})," HTML comments are raw-HTML tokens too.\nA house convention such as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"\x3c!-- break --\x3e"})," is a\nconvention, not discarded content, and is never counted — otherwise every\ndocument in the house would report a finding and the state would be noise\nnobody reads."]})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"sections",children:"Sections"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Every second-level heading starts a section, and every section stands open.\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Nothing in a document opens or closes."})," A reader came to read, and a text\nthat has to be unpacked first is a text that is half missing — so there is no\nfold, no summary and no second, shorter version to switch to. What the\ncomponent offers instead are ways ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.em,{children:"out"})," of the document: a finished file and a\nsheet of paper."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The title is a real ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"h2"})," carrying the section's anchor, so the document keeps\nan outline for anyone navigating by headings."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"the-text-keeps-its-own-voice",children:"The text keeps its own voice"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The document area brings ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"no design of its own"}),". Headings are told apart by\nsize and air, links are underlined, code blocks, tables and quotes take the\nlibrary's tokens and nothing else. There is no house gesture stamped onto the\ntext."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"That is not modesty, it is the job: this component carries a foreign document —\na README, a licence, a text somebody else wrote — and a reader that decorates\nwhat it displays makes every source look like it was written here. The\nsurroundings are the library's; the text is the author's."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"One position the reader does decide, because Markdown cannot: a paragraph\nthat holds nothing but an image — linked or not — is a figure and stands\ncentred. An image inside prose keeps its place in the line. No frame, no\ncaption, nothing else."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__.Figure}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["And one thing it keeps whole: inline code never wraps. An identifier, a file\nname, a flag is one token, and a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"change-me"})," split at its hyphen across two\nlines of a narrow table cell is no longer the thing it names. The line around\nthe token breaks; the token does not. A code block is unaffected — ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"pre"}),"\nkeeps its own line breaks and scrolls sideways. In the same picture: table\ncells read from their first line — a one-word key starts level with the\ndescription beside it, not halfway down it."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__.CodeInNarrowCell}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"And it holds that in both directions: the component leaves no hooks in its\noutput for an outside stylesheet to hang a design on. What it renders is\nheadings, paragraphs, lists, links, tables — the tags themselves, with nothing\nwrapped around them. Whatever this reader looks like, it decides here, in its\nown file."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"anchors-what-survives-and-what-does-not",children:"Anchors: what survives and what does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The renderer gives every heading a slug, and the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"section"})," carries it into\nthe DOM from the template — so a section is a link target."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A heading ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.em,{children:"inside"})," the injected HTML is not. Angular's sanitiser runs over\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[innerHTML]"})," as a second net and strips ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"id"})," on the way. That net is kept\ndeliberately rather than bypassed: the safety here already comes from the\nrenderer, and a second one costs nothing but those ids. The behaviour is\npinned by a test, so it cannot change unnoticed."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"two-language-states-and-they-must-never-be-confused",children:"Two language states, and they must never be confused"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"State"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"When"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"How it looks"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"none"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"view language = content language"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"nothing"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"source-language"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["they differ, and that is ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("em",{children:"expected"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"a quiet note above the document"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"fallback"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"the requested language is missing although it should exist"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"defect"}),": error colour, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:'role="alert"'})]})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The component shows the state; it does not decide it. Only the placer knows\nwhether a document ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.em,{children:"ought to have been"})," published in both languages. A fallback\nthat reads like an offer is how an English page ends up in a German view\nunremarked."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__.SourceLanguage}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__.FallbackDefect}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"the-ways-out",children:"The ways out"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A button appears only when it can keep its promise: no address, no download\nbutton. The file itself is handed in — the component makes nothing and knows\nnothing about how it came to be."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Printing is the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"side way"}),": the chrome disappears and the page breaks are\nkept off headings and out of list items — that is all the component does for\npaper, and deliberately so. A full paper design is somebody else's job; this\none shows a document on a screen and gets out of the way when the sheet\ncomes."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Both ways out are icon buttons in the library's own shape, with their wording\nin ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"title"})," so it stays translated."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:'The date in the footer is handed in as text. The component never asks the\nclock: a document is as current as the release that shipped it, and a component\nstamping "today" onto it would be making that up.'}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__.WaysOut}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"the-loud-states",children:"The loud states"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Nothing to read is a state, not an absence. An empty area looks like a\ncomponent that failed to render, and a reader cannot tell the difference."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__.Empty}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A failure the placer wants shown appears in its own words, in place of the\ndocument."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_reader_doc_component_stories__WEBPACK_IMPORTED_MODULE_4__.Failed}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"properties",children:"Properties"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"markdown"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The document. Empty or missing ends in the loud empty state, never in a\nblank page."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"error"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A failure to show ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("em",{children:"instead of"})," the document, in the placer's own\nwords — only they can say it in a way that fits the site."]})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"notice"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiReaderNotice"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'none'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'source-language'"})," or ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'fallback'"})," — see the two\nlanguage states above. The component shows the state; it does not\ndecide it."]})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"contentLang"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["The language the text is in, for the notice — a label such as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"EN"}),"."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"stand"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The house stamp, pre-formatted. Text, because the component never asks\nthe clock."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"downloadHref"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Where the ready-made file lies. No address, no button — the component\nmakes no file and knows nothing about how one came to be."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"downloadName"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The name the file is saved under."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"printable"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"false"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Whether the print button is drawn. It is not a lock on the method:\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"print()"})," is public, so a host can put the control wherever\nit belongs and leave this off."]})})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3999],{"./libs/ui/src/lib/atoms/reader-doc/reader-doc.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CodeInNarrowCell:()=>CodeInNarrowCell,Default:()=>Default,DroppedMarkup:()=>DroppedMarkup,Empty:()=>Empty,Failed:()=>Failed,FallbackDefect:()=>FallbackDefect,Figure:()=>Figure,SourceLanguage:()=>SourceLanguage,WaysOut:()=>WaysOut,__namedExportsOrder:()=>__namedExportsOrder,default:()=>reader_doc_component_stories});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var reader_doc_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/reader-doc/reader-doc.component.css?ngResource"),reader_doc_componentngResource_default=__webpack_require__.n(reader_doc_componentngResource),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_resource_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs"),marked_esm=__webpack_require__("./node_modules/marked/lib/marked.esm.js");const ALLOWED_SCHEMES=new Set(["http:","https:","mailto:"]);function slug(text){return text.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,"")||"section"}function urlAllowed(href){const value=href.trim();if(""===value)return!1;if(/[\0-]/.test(value))return!1;if(!/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(value))return!0;try{return ALLOWED_SCHEMES.has(new URL(value).protocol)}catch{return!1}}class Collector{names=new Set;total=0;add(name){this.names.add(name),this.total+=1}result(){return{count:this.total,tags:[...this.names].sort()}}}function instance(collector){return new marked_esm.Dz({renderer:{html:token=>(function openingTags(raw){return[...raw.replaceAll(/<!--[\s\S]*?-->/g,"").matchAll(/<([a-zA-Z][a-zA-Z0-9-]*)/g)].map(m=>m[1].toLowerCase())}(token.raw??token.text??"").forEach(name=>collector.add(name)),""),heading(token){const text=this.parser.parseInline(token.tokens),id=slug(token.text);return`<h${token.depth} id="${id}">${text}</h${token.depth}>\n`},link(token){const text=this.parser.parseInline(token.tokens);if(!urlAllowed(token.href))return collector.add("a"),text;const title=token.title?` title="${escapeAttribute(token.title)}"`:"";return`<a href="${escapeAttribute(token.href)}"${title}>${text}</a>`},table(token){return marked_esm.A4.prototype.table.call(this,token).replace("<table>",'<table class="ui">')},image(token){if(!urlAllowed(token.href))return collector.add("img"),"";const title=token.title?` title="${escapeAttribute(token.title)}"`:"";return`<img src="${escapeAttribute(token.href)}" alt="${escapeAttribute(token.text)}"${title} />`}}})}function escapeAttribute(value){return value.replaceAll("&","&").replaceAll('"',""").replaceAll("<","<").replaceAll(">",">")}function toView(markdown,marked){const tokens=marked.lexer(markdown),lead=[],sections=[];for(const token of tokens){if("heading"===token.type&&2===token.depth){const heading=token;sections.push({id:slug(heading.text),title:heading.text,tokens:[]});continue}const current=sections.at(-1);(void 0===current?lead:current.tokens).push(token)}return{lead:marked.parser(lead),sections:sections.map(section=>({id:section.id,title:section.title,html:marked.parser(section.tokens)}))}}let UiReaderDocComponent=class UiReaderDocComponent{markdown=(0,core.input)(null);error=(0,core.input)(null);notice=(0,core.input)("none");contentLang=(0,core.input)(null);stand=(0,core.input)(null);downloadHref=(0,core.input)(null);downloadName=(0,core.input)(null);printable=(0,core.input)(!1);document=(0,_effect_chunk2.WQX)(_effect_chunk2.qQL);rendered=(0,_resource_chunk.EW)(()=>function renderReaderDocument(markdown=""){const collector=new Collector;return{full:toView(markdown,instance(collector)),dropped:collector.result()}}(this.markdown()??""));dropped=(0,_resource_chunk.EW)(()=>this.rendered().dropped);lead=(0,_resource_chunk.EW)(()=>this.rendered().full.lead);sections=(0,_resource_chunk.EW)(()=>this.rendered().full.sections);hasBar=(0,_resource_chunk.EW)(()=>"none"!==this.notice()||this.dropped().count>0||null!==this.downloadHref()||this.printable());isEmpty=(0,_resource_chunk.EW)(()=>{const doc=this.rendered().full;return""===doc.lead.trim()&&0===doc.sections.length});print(){this.document.defaultView?.print()}static propDecorators={markdown:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"markdown",required:!1,transform:void 0}]}],error:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"error",required:!1,transform:void 0}]}],notice:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"notice",required:!1,transform:void 0}]}],contentLang:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"contentLang",required:!1,transform:void 0}]}],stand:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"stand",required:!1,transform:void 0}]}],downloadHref:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"downloadHref",required:!1,transform:void 0}]}],downloadName:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"downloadName",required:!1,transform:void 0}]}],printable:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"printable",required:!1,transform:void 0}]}]}};UiReaderDocComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-reader-doc",template:'@if (error(); as message) {\n <p class="_state _error" role="alert">{{ message }}</p>\n} @else if (isEmpty()) {\n <p class="_state _empty" role="alert">{{ \'reader.empty\' | transloco }}</p>\n} @else {\n @if (hasBar()) {\n <header class="_bar">\n <div class="_notices">\n @switch (notice()) {\n @case (\'source-language\') {\n <p class="_notice">\n {{ \'reader.sourceLanguage\' | transloco: { lang: contentLang() ?? \'\' } }}\n </p>\n }\n @case (\'fallback\') {\n <p class="_notice _defect" role="alert">\n {{ \'reader.fallback\' | transloco: { lang: contentLang() ?? \'\' } }}\n </p>\n }\n }\n\n \x3c!-- Not switchable off: it appears only when content really was left\n out, and a reader that keeps that to itself is lying quietly. --\x3e\n @if (dropped().count > 0) {\n <p class="_notice _dropped">\n {{\n \'reader.dropped\'\n | transloco: { count: dropped().count, tags: dropped().tags.join(\', \') }\n }}\n </p>\n }\n </div>\n\n <div class="_actions">\n \x3c!-- Icon buttons in the library\'s own shape: the glyph is the content,\n the wording lives in `title` so it stays translated and reachable. --\x3e\n @if (downloadHref(); as href) {\n <a\n class="ui-icon _download"\n [href]="href"\n [attr.download]="downloadName() ?? \'\'"\n [title]="\'reader.download\' | transloco"\n [attr.aria-label]="\'reader.download\' | transloco"\n >file_download</a\n >\n }\n @if (printable()) {\n <button\n type="button"\n class="ui-icon _print"\n [title]="\'reader.print\' | transloco"\n [attr.aria-label]="\'reader.print\' | transloco"\n (click)="print()"\n >\n print\n </button>\n }\n </div>\n </header>\n }\n\n <article class="_doc">\n \x3c!-- The HTML comes from the renderer next door, which can only produce the\n tags marked builds itself. Angular\'s sanitiser still runs over it — a\n second net costs nothing here, and nothing is waved through. --\x3e\n <div class="_lead" [innerHTML]="lead()"></div>\n\n @for (section of sections(); track section.id) {\n <section class="_section">\n <h2 [id]="section.id">{{ section.title }}</h2>\n <div [innerHTML]="section.html"></div>\n </section>\n }\n </article>\n\n @if (stand(); as date) {\n <footer class="_stand">{{ \'reader.stand\' | transloco: { date: date } }}</footer>\n }\n}\n',encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[reader_doc_componentngResource_default()]})],UiReaderDocComponent);const reader_doc_component_stories={title:"Atoms/ReaderDoc",component:UiReaderDocComponent,argTypes:{notice:{control:"select",options:["none","source-language","fallback"]},printable:{control:"boolean"}}},noControls={controls:{disable:!0}},render=args=>({props:{...args},template:'\n <ui-reader-doc\n class="block max-w-3xl border border-c-secondary p-6"\n [markdown]="markdown"\n [error]="error"\n [notice]="notice"\n [contentLang]="contentLang"\n [stand]="stand"\n [downloadHref]="downloadHref"\n [downloadName]="downloadName"\n [printable]="printable"\n ></ui-reader-doc>\n '}),base={markdown:"# Demo document\n\nThis document exists to be read by the component below. Everything in it\ndemonstrates one of the shapes the renderer handles.\n\n- a list item, which carries the gear instead of a bullet on paper\n- a second one, so the spacing has something to show\n\nA [link that is kept](https://moja.work) and `inline code`.\n\n## A section\n\nSecond-level headings start a section. This paragraph sits inside one.\n\n| Column | Column |\n| --- | --- |\n| cell | cell |\n\n## Another section\n\n```\na code block keeps itself whole\n```\n",error:null,notice:"none",contentLang:null,stand:null,downloadHref:null,downloadName:null,printable:!1},Default={args:{...base},render},WaysOut={parameters:noControls,args:{...base,downloadHref:"assets/ui/documents/demo.pdf",downloadName:"demo.pdf",printable:!0,stand:"2026-08-15"},render},Figure={parameters:noControls,args:{...base,markdown:"# Demo document\n\nA paragraph that holds nothing but an image is a figure and stands centred.\nThe one below links somewhere as well — a linked image is a figure too.\n\n[](https://moja.work)\n\nProse with an image inside keeps its flow: \nthe picture sits in the line where the author put it.\n"},render},CodeInNarrowCell={parameters:noControls,args:{...base,markdown:"# Demo document\n\nInline code is one token and never wraps, however narrow the cell — the text\naround it breaks instead. A code block keeps its own breaks and scrolls.\n\n| App | What it is |\n| --- | --- |\n| `change-me` | A long description that takes the width, so the first column is squeezed to what the name needs and not one character more |\n| `another-long-name` | The same again, a second row so the column has to agree on one width for both names |\n"},render},SourceLanguage={parameters:noControls,args:{...base,notice:"source-language",contentLang:"EN"},render},FallbackDefect={parameters:noControls,args:{...base,notice:"fallback",contentLang:"EN"},render},DroppedMarkup={parameters:noControls,args:{...base,markdown:"# Demo document\n\nThis document contains <b>raw HTML</b> and a <details>block element</details>.\nThe words survive, the markup does not — and the notice above says so.\n"},render},Empty={parameters:noControls,args:{...base,markdown:""},render},Failed={parameters:noControls,args:{...base,error:"The source did not answer."},render},__namedExportsOrder=["Default","WaysOut","Figure","CodeInNarrowCell","SourceLanguage","FallbackDefect","DroppedMarkup","Empty","Failed"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"{\n args: {\n ...base\n },\n render\n}",...Default.parameters?.docs?.source},description:{story:"Reading, and nothing else. No buttons, because none were handed in — a\nbutton appears only when it can keep its promise.",...Default.parameters?.docs?.description}}},WaysOut.parameters={...WaysOut.parameters,docs:{...WaysOut.parameters?.docs,source:{originalSource:"{\n parameters: noControls,\n args: {\n ...base,\n // A real, tiny PDF from the library's own assets — a stand-in that says\n // it is one when you open it. The previous one was text under a `.pdf`\n // name, so every click ended in \"the file could not be opened\": a story\n // teaching that the download is broken.\n downloadHref: 'assets/ui/documents/demo.pdf',\n downloadName: 'demo.pdf',\n printable: true,\n stand: '2026-08-15'\n },\n render\n}",...WaysOut.parameters?.docs?.source},description:{story:"Both ways out. The download is the main way and carries the weight; printing\nis the side way. The file is handed in as an address — the component makes\nnothing.",...WaysOut.parameters?.docs?.description}}},Figure.parameters={...Figure.parameters,docs:{...Figure.parameters?.docs,source:{originalSource:"{\n parameters: noControls,\n args: {\n ...base,\n markdown: WITH_FIGURE\n },\n render\n}",...Figure.parameters?.docs?.source},description:{story:"A lone image is a figure: centred, whether it links somewhere or not. An\nimage inside prose is not — it stays in its line. The renderer draws no\nframe and no caption; where the picture stands is all it decides.",...Figure.parameters?.docs?.description}}},CodeInNarrowCell.parameters={...CodeInNarrowCell.parameters,docs:{...CodeInNarrowCell.parameters?.docs,source:{originalSource:"{\n parameters: noControls,\n args: {\n ...base,\n markdown: WITH_CODE_IN_CELL\n },\n render\n}",...CodeInNarrowCell.parameters?.docs?.source},description:{story:"Inline code in a squeezed table cell: the hyphenated names stay on one line\neach, the description column takes the break.",...CodeInNarrowCell.parameters?.docs?.description}}},SourceLanguage.parameters={...SourceLanguage.parameters,docs:{...SourceLanguage.parameters?.docs,source:{originalSource:"{\n parameters: noControls,\n args: {\n ...base,\n notice: 'source-language',\n contentLang: 'EN'\n },\n render\n}",...SourceLanguage.parameters?.docs?.source},description:{story:"The quiet note: the text is in its source language and that is expected. It\nmust be distinguishable at a glance from the state below — that is the whole\nreason they are two states.",...SourceLanguage.parameters?.docs?.description}}},FallbackDefect.parameters={...FallbackDefect.parameters,docs:{...FallbackDefect.parameters?.docs,source:{originalSource:"{\n parameters: noControls,\n args: {\n ...base,\n notice: 'fallback',\n contentLang: 'EN'\n },\n render\n}",...FallbackDefect.parameters?.docs?.source},description:{story:'The defect: the requested language is missing although it should exist. It\ncarries the error colour and `role="alert"`, because a fallback nobody\nnotices is how an English page ends up in a German view unremarked.',...FallbackDefect.parameters?.docs?.description}}},DroppedMarkup.parameters={...DroppedMarkup.parameters,docs:{...DroppedMarkup.parameters?.docs,source:{originalSource:"{\n parameters: noControls,\n args: {\n ...base,\n markdown: WITH_HTML\n },\n render\n}",...DroppedMarkup.parameters?.docs?.source},description:{story:"Raw HTML is discarded, and the reader says so with a count and the element\nnames. There is no input that hides this: the notice only ever appears when\nsomething really was left out.",...DroppedMarkup.parameters?.docs?.description}}},Empty.parameters={...Empty.parameters,docs:{...Empty.parameters?.docs,source:{originalSource:"{\n parameters: noControls,\n args: {\n ...base,\n markdown: ''\n },\n render\n}",...Empty.parameters?.docs?.source},description:{story:"Nothing to read is a loud state, never a blank area that reads as a broken component.",...Empty.parameters?.docs?.description}}},Failed.parameters={...Failed.parameters,docs:{...Failed.parameters?.docs,source:{originalSource:"{\n parameters: noControls,\n args: {\n ...base,\n error: 'The source did not answer.'\n },\n render\n}",...Failed.parameters?.docs?.source},description:{story:"A failure the placer wants shown in its own words, in place of the document.",...Failed.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/reader-doc/reader-doc.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* The reader on SCREEN, and nothing but. The document area stays neutral —\n this component carries foreign text, and a reader that decorates what it\n displays makes every source look like it was written in this house.\n\n It hangs on nothing outside itself: no stylesheet is imported, no class is\n left in the output as a hook for one, and no other file is named here as\n the other half of a design. Whatever this looks like is decided in this\n file.\n\n Encapsulation is None, so everything hangs under the tag. */\n\nui-reader-doc {\n display: block;\n color: var(--ui-c-default);\n\n /* ---- states that replace the document ---- */\n\n ._state {\n /* Centred in both directions: these two replace the whole document, so the\n sentence stands in the middle of the space the text would have had\n rather than in its top-left corner like a first paragraph. */\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: var(--ui-spacer);\n border-radius: var(--ui-border-radius);\n background-color: var(--ui-c-primary);\n color: var(--ui-c-primary-invert);\n }\n\n /* A tint rather than a slab of red, and the sentence in the error colour\n itself — the same pair the fallback notice uses, one step louder. A filled\n red block reads as a warning sign; this reads as a message that went\n wrong, which is what it is. */\n ._state._error {\n border: var(--ui-border-width) solid var(--ui-c-error);\n background-color: color-mix(in srgb, var(--ui-c-error) 20%, transparent);\n color: var(--ui-c-error);\n font-weight: bold;\n }\n\n /* ---- the bar above the document ---- */\n\n ._bar {\n display: flex;\n flex-wrap: wrap;\n gap: calc(var(--ui-spacer) * 0.5);\n justify-content: space-between;\n align-items: flex-start;\n /* Half a spacer, the same step the bar uses between its own parts. A full\n one left the notice floating well clear of the text it is about. */\n margin-bottom: calc(var(--ui-spacer) * 0.5);\n }\n\n ._notices {\n display: flex;\n flex-direction: column;\n gap: calc(var(--ui-spacer) * 0.25);\n flex: 1 1 20rem;\n }\n\n ._notice {\n margin: 0;\n padding: calc(var(--ui-spacer) * 0.5);\n border: var(--ui-border-width) solid var(--ui-c-secondary);\n border-radius: var(--ui-border-radius);\n /* A tint of the border's own colour, mixed against whatever lies behind\n it — so the note carries in both themes without a second token. */\n background-color: color-mix(in srgb, var(--ui-c-secondary) 12%, transparent);\n font-size: 0.9em;\n }\n\n /* A fallback is a DEFECT and looks like one. It must never be mistaken for\n the quiet note that a text is simply in its source language — that is the\n whole reason the two are separate states. */\n ._notice._defect {\n border-color: var(--ui-c-error);\n background-color: color-mix(in srgb, var(--ui-c-error) 10%, transparent);\n color: var(--ui-c-error);\n font-weight: bold;\n }\n\n ._actions {\n display: flex;\n gap: calc(var(--ui-spacer) * 0.25);\n align-items: center;\n }\n\n /* The print button needs nothing here: `ui-icon` puts it under the library's\n own button rule, which is where the splitter's icon row gets its look\n from. The download cannot use that rule — it is an `<a>`, because `href`\n and `download` belong on a link — so the rule's declarations are mirrored\n for it, token for token, rather than a second button design invented next\n to it. Size and padding come from `.ui-icon` for both. */\n ._actions ._download {\n background-color: var(--ui-c-fourthly);\n border: var(--ui-border-width) solid transparent;\n border-radius: var(--ui-border-radius);\n box-shadow: 0 0 var(--ui-button-shadow) 0 var(--ui-c-thirdly);\n color: var(--ui-c-default);\n font-weight: 400;\n text-decoration: none;\n cursor: pointer;\n }\n\n ._actions button:hover,\n ._actions a:hover {\n color: var(--ui-c-focus);\n }\n\n ._actions button:focus-visible,\n ._actions a:focus-visible {\n outline: var(--ui-border-width) solid var(--ui-c-focus);\n outline-offset: 2px;\n }\n\n /* ---- the document ---- */\n\n ._doc {\n line-height: 165%;\n }\n\n /* Headings are told apart by size and air, not by decoration. The library\n already sizes h1..h3 globally, so the document needs nothing beyond room\n around them — a reader carries a foreign text and must not push a house\n style onto it. */\n ._doc h1,\n ._doc h2 {\n /* In `em`, so the air scales with the heading rather than with the layout\n spacer — that one is 4rem and turned every heading into a clearing.\n More room above than below: a heading belongs to the text under it. */\n margin: 1.2em 0 0.4em;\n font-weight: normal;\n line-height: 140%;\n }\n\n ._doc ._lead > :first-child {\n margin-top: 0;\n }\n\n /* A step under every block that carries text, so a paragraph, a section body\n and a table never sit flush against whatever follows them. */\n ._doc div,\n ._doc p {\n padding-bottom: calc(var(--ui-spacer) * 0.25);\n }\n\n /* A table takes its step as margin: `table.ui` collapses its borders, and in\n that model the browser ignores padding on the table itself — the text\n after it sat flush against the last row. */\n ._doc table {\n margin-bottom: calc(var(--ui-spacer) * 0.5);\n }\n\n /* The fold keeps the browser's own marker. A section that folds has to look\n like it does, and the platform's triangle says so in the reader's own\n idiom — a house shape here would be the reader's design talking over the\n document's. */\n ._doc a {\n color: var(--ui-c-default);\n text-decoration: underline;\n text-decoration-color: var(--ui-c-secondary);\n }\n\n ._doc img {\n max-width: 100%;\n }\n\n /* A paragraph that holds nothing but an image — or an image that is a link —\n is a figure, and a figure stands centred. That is the one place the reader\n decides a position for the author: Markdown has no way to say it, and a\n picture flush left under a table reads as a mistake, not as a choice.\n Prose with an image inside keeps its flow; only the lone image moves. */\n ._doc p:has(> img:only-child),\n ._doc p:has(> a:only-child > img:only-child) {\n text-align: center;\n\n /* The Tailwind preflight makes every img a block, and a block ignores\n text-align; the figure is laid out as a block of its own width in the\n middle of the line, which is what \"centred\" means for either display. */\n img {\n display: inline-block;\n }\n }\n\n /* A token is one thing. Inline code names an identifier, a file, a flag —\n and an identifier cut at its hyphen (`change-` / `me`) is no longer the\n thing it names. So code in running text never wraps; the line around it\n does. A code BLOCK is not this: `pre` keeps its own breaks and scrolls. */\n ._doc :not(pre) > code {\n white-space: nowrap;\n }\n\n ._doc pre {\n padding: calc(var(--ui-spacer) * 0.5);\n border: var(--ui-border-width) solid var(--ui-c-secondary);\n border-radius: var(--ui-border-radius);\n overflow-x: auto;\n }\n\n /* Tables carry `class=\"ui\"` from the renderer and take the library's own\n table design with it — see Styling / Tags. A second table style in this\n component is exactly the house design the document area must not bring. */\n ._doc table.ui {\n width: 100%;\n\n /* A cell reads from its first line. Browsers centre cells vertically, so a\n one-word key next to a three-line description floats mid-air and the\n eye has to find the row it belongs to; at the top, key and text start\n together. That is reading, not design — the look stays the library's. */\n th,\n td {\n vertical-align: top;\n }\n }\n\n ._doc blockquote {\n margin: 0 0 calc(var(--ui-spacer) * 0.5);\n padding-left: var(--ui-spacer);\n border-left: calc(var(--ui-border-width) * 2) solid var(--ui-c-secondary);\n }\n\n ._stand {\n margin-top: var(--ui-spacer);\n font-size: 0.85em;\n color: var(--ui-c-secondary);\n }\n\n /* ---- the side way ----\n A print of the PAGE, not a paper design: the chrome goes and the breaks\n are kept off headings, so a sheet coming out of a browser is readable.\n That is the whole of it. What a document looks like on paper as a\n designed thing is not this component's question, and nothing here knows\n of an answer to it. */\n @media print {\n ._bar ._actions,\n ._stand {\n display: none;\n }\n\n ._doc h1,\n ._doc h2,\n ._doc li,\n ._doc pre,\n ._doc blockquote {\n break-inside: avoid;\n }\n\n ._doc h1,\n ._doc h2,\n ._doc h3 {\n break-after: avoid;\n }\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|