@mojawork/ui-docs 2.6.0 → 2.6.1
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 +2 -2
- package/catalog/guide.json +3 -3
- package/catalog/manifest.json +3 -3
- package/catalog/molecules/image-editor.md +34 -19
- package/catalog/version.json +2 -2
- package/package.json +1 -1
- package/storybook/4555.251b232c.iframe.bundle.js +1 -0
- package/storybook/assets/ui/i18n/ui/de-DE.json +0 -1
- package/storybook/assets/ui/i18n/ui/en-EN.json +0 -1
- package/storybook/{home-overview-mdx.53475252.iframe.bundle.js → home-overview-mdx.0d4ede52.iframe.bundle.js} +1 -1
- package/storybook/iframe.html +1 -1
- package/storybook/molecules-image-editor-docs-mdx.805dcd5a.iframe.bundle.js +1 -0
- package/storybook/molecules-image-editor-image-editor-component-stories.fbfeff1b.iframe.bundle.js +1 -0
- package/storybook/project.json +1 -1
- package/storybook/{runtime~main.53ef982c.iframe.bundle.js → runtime~main.52ba2f02.iframe.bundle.js} +1 -1
- package/storybook/version.json +2 -2
- package/version.json +2 -2
- package/storybook/4555.2fc72918.iframe.bundle.js +0 -1
- package/storybook/molecules-image-editor-docs-mdx.119ea12a.iframe.bundle.js +0 -1
- package/storybook/molecules-image-editor-image-editor-component-stories.56467f17.iframe.bundle.js +0 -1
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @mojawork/ui-docs
|
|
2
2
|
|
|
3
|
-
The documentation of `@mojawork/ui` 2.6.
|
|
3
|
+
The documentation of `@mojawork/ui` 2.6.1, version-true and offline:
|
|
4
4
|
the built Storybook plus the cooked catalog. Install nothing — start it:
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
|
-
npx @mojawork/ui-docs@2.6.
|
|
7
|
+
npx @mojawork/ui-docs@2.6.1
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
and open the printed URL. The Storybook you see is exactly the one this
|
package/catalog/guide.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "an agent — the Claude Code session of the library workspace, writing from the sources each entry names; not a person",
|
|
3
3
|
"disclaimer": "Recommendations, not truth. Every entry was written by an agent from the sources it names, and only for what demonstrably runs somewhere in the house (shownIn). The component page — get_component_doc — is the truth; where the two disagree, the page wins. The house rules are read verbatim from the usage contract of the library (usage.md).",
|
|
4
|
-
"uiVersion": "2.6.
|
|
5
|
-
"commit": "
|
|
4
|
+
"uiVersion": "2.6.1",
|
|
5
|
+
"commit": "830ad1b4",
|
|
6
6
|
"entries": [
|
|
7
7
|
{
|
|
8
8
|
"kind": "situation",
|
|
@@ -527,7 +527,7 @@
|
|
|
527
527
|
"sources": [
|
|
528
528
|
"libs/ui/src/lib/molecules/image-editor/docs.mdx"
|
|
529
529
|
],
|
|
530
|
-
"reviewed": "
|
|
530
|
+
"reviewed": "4cc1b639"
|
|
531
531
|
},
|
|
532
532
|
{
|
|
533
533
|
"kind": "component",
|
package/catalog/manifest.json
CHANGED
|
@@ -36,9 +36,10 @@ The same content comes in two presentations, selected by the `variant` input:
|
|
|
36
36
|
It fills the width it is given; the **maximum width is set by the consumer**
|
|
37
37
|
via styles on the host or a wrapping element, the minimum emerges from the
|
|
38
38
|
footer button row (`flex-wrap` as a safety net for very narrow screens).
|
|
39
|
-
Delete
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
Delete and Save return the editor to a clean view mode instead of closing
|
|
40
|
+
anything, and leaving the crop stage is the Crop button's own second press —
|
|
41
|
+
the consumer provides whatever closes the editor itself; `active` and
|
|
42
|
+
`activeOutput` are not used.
|
|
42
43
|
- **`overlay`**: wraps the editor in the ui overlay as before — backdrop,
|
|
43
44
|
focus trap, Escape and the `active` / `activeOutput` pair.
|
|
44
45
|
|
|
@@ -79,13 +80,16 @@ The same content comes in two presentations, selected by the `variant` input:
|
|
|
79
80
|
|
|
80
81
|
Opening with an image shows it in view mode. The footer offers **Delete**,
|
|
81
82
|
**Upload** (pick a new file), **Crop** (edit the current image without
|
|
82
|
-
re-uploading)
|
|
83
|
-
|
|
83
|
+
re-uploading) and **Save**. Both **Upload** and **Crop** switch to the crop
|
|
84
|
+
stage; **Save** is enabled there. **Crop** switches back out again — it is a
|
|
85
|
+
toggle, not a one-way door.
|
|
84
86
|
|
|
85
87
|
The crop box works by pointer and by keyboard alike: it is a tab stop, the
|
|
86
88
|
arrow keys pan it, Shift with an arrow resizes it from the south-east corner
|
|
87
|
-
— a locked ratio holds exactly as it does for a pointer on that corner.
|
|
88
|
-
|
|
89
|
+
— a locked ratio holds exactly as it does for a pointer on that corner. This
|
|
90
|
+
page is the only place that says so: the hint that used to sit under the box
|
|
91
|
+
named the arrow keys but not the corner, which sent readers to pull at the
|
|
92
|
+
wrong edge.
|
|
89
93
|
|
|
90
94
|
---
|
|
91
95
|
|
|
@@ -110,11 +114,28 @@ action.
|
|
|
110
114
|
|
|
111
115
|
## Footer buttons
|
|
112
116
|
|
|
113
|
-
|
|
114
|
-
carries a `title`/`aria-label` tooltip.
|
|
117
|
+
Four icon buttons on one row (grey surface, tinted icons where it helps). Each
|
|
118
|
+
carries a `title`/`aria-label` tooltip. Muted buttons keep the same grey
|
|
115
119
|
background — only their icon is dimmed, in its normal colour, so it stays
|
|
116
120
|
readable against that surface. The [empty state](?path=/story/molecules-image-editor--empty)
|
|
117
|
-
shows this: with no image, Crop, Delete and Save are all
|
|
121
|
+
shows this: with no image, Crop, Delete and Save are all muted.
|
|
122
|
+
|
|
123
|
+
**Crop is muted, never disabled**, and that is a keyboard decision rather than
|
|
124
|
+
a visual one. Pressing it used to switch it off — entering the crop stage made
|
|
125
|
+
its own condition false — and a disabled element is not focusable, so the
|
|
126
|
+
focus was dropped by the very press that moved the editor forward, in a
|
|
127
|
+
component whose crop box is meant to be operated by keyboard. It therefore
|
|
128
|
+
carries `aria-disabled="true"` and `aria-pressed`, stays reachable in every
|
|
129
|
+
state, and does nothing when there is nothing to crop (see the house rule in
|
|
130
|
+
`usage.md`, "Disabled controls and the keyboard").
|
|
131
|
+
|
|
132
|
+
Delete and Save still use the attribute, and that is an open end rather than a
|
|
133
|
+
distinction: pressing Delete removes the image, which is the condition Delete
|
|
134
|
+
reads, and pressing Save leaves the crop stage, which is the condition Save
|
|
135
|
+
reads — so both switch themselves off under the focus that pressed them, for
|
|
136
|
+
the same reason Crop did. Crop was fixed first because it is the one you press
|
|
137
|
+
twice. The other two are named here so the gap is on the page instead of in
|
|
138
|
+
someone's memory.
|
|
118
139
|
|
|
119
140
|
<table class="ui">
|
|
120
141
|
<thead>
|
|
@@ -133,16 +154,10 @@ shows this: with no image, Crop, Delete and Save are all disabled.
|
|
|
133
154
|
<td>Opens the file picker; a chosen PNG/GIF/JPEG enters the crop stage.</td>
|
|
134
155
|
</tr>
|
|
135
156
|
<tr>
|
|
136
|
-
<td>Crop</td>
|
|
157
|
+
<td>Crop (toggle)</td>
|
|
137
158
|
<td>crop</td>
|
|
138
|
-
<td>
|
|
139
|
-
<td>Loads the current image into the crop stage.</td>
|
|
140
|
-
</tr>
|
|
141
|
-
<tr>
|
|
142
|
-
<td>Cancel</td>
|
|
143
|
-
<td>close</td>
|
|
144
|
-
<td>always</td>
|
|
145
|
-
<td>In the crop stage with a current image: discards and returns to view. Otherwise closes the overlay (embedded: resets to view).</td>
|
|
159
|
+
<td>always reachable; muted (<code>aria-disabled</code>) without an image</td>
|
|
160
|
+
<td>Loads the current image into the crop stage — and a second press discards the crop and returns to view. <code>aria-pressed</code> says which state it is in.</td>
|
|
146
161
|
</tr>
|
|
147
162
|
<tr>
|
|
148
163
|
<td>Delete (red icon)</td>
|
package/catalog/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojawork/ui-docs",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "The documentation of @mojawork/ui, version-true: the built Storybook plus the cooked catalog (truth pages, guide, usage contract, tool definitions). npx-startable.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[4555],{"./libs/ui/guide sync \\.json$"(module,__unused_webpack_exports,__webpack_require__){var map={"./app-shell.json":"./libs/ui/guide/app-shell.json","./burger-menu.json":"./libs/ui/guide/burger-menu.json","./form-basics.json":"./libs/ui/guide/form-basics.json","./image-gallery.json":"./libs/ui/guide/image-gallery.json","./table-edit-focus.json":"./libs/ui/guide/table-edit-focus.json","./translations.json":"./libs/ui/guide/translations.json","./ui-autocomplete.json":"./libs/ui/guide/ui-autocomplete.json","./ui-background.json":"./libs/ui/guide/ui-background.json","./ui-barcode.json":"./libs/ui/guide/ui-barcode.json","./ui-buzzer.json":"./libs/ui/guide/ui-buzzer.json","./ui-card.json":"./libs/ui/guide/ui-card.json","./ui-cdk-drag-drop-splitter.json":"./libs/ui/guide/ui-cdk-drag-drop-splitter.json","./ui-cdk-table-wrapper.json":"./libs/ui/guide/ui-cdk-table-wrapper.json","./ui-chart.json":"./libs/ui/guide/ui-chart.json","./ui-checkbox.json":"./libs/ui/guide/ui-checkbox.json","./ui-clock.json":"./libs/ui/guide/ui-clock.json","./ui-copy-value.json":"./libs/ui/guide/ui-copy-value.json","./ui-image-editor.json":"./libs/ui/guide/ui-image-editor.json","./ui-image-grid.json":"./libs/ui/guide/ui-image-grid.json","./ui-image-slider.json":"./libs/ui/guide/ui-image-slider.json","./ui-input.json":"./libs/ui/guide/ui-input.json","./ui-lang-selector.json":"./libs/ui/guide/ui-lang-selector.json","./ui-layout-main.json":"./libs/ui/guide/ui-layout-main.json","./ui-layout-media-screen.json":"./libs/ui/guide/ui-layout-media-screen.json","./ui-layout-nav.json":"./libs/ui/guide/ui-layout-nav.json","./ui-layout-overlay-header.json":"./libs/ui/guide/ui-layout-overlay-header.json","./ui-layout-overlay.json":"./libs/ui/guide/ui-layout-overlay.json","./ui-layout-spinner.json":"./libs/ui/guide/ui-layout-spinner.json","./ui-layout-splitter.json":"./libs/ui/guide/ui-layout-splitter.json","./ui-layout-tabs.json":"./libs/ui/guide/ui-layout-tabs.json","./ui-layout-top-scroll-bottom.json":"./libs/ui/guide/ui-layout-top-scroll-bottom.json","./ui-mosaic.json":"./libs/ui/guide/ui-mosaic.json","./ui-placeholder.json":"./libs/ui/guide/ui-placeholder.json","./ui-qr-code.json":"./libs/ui/guide/ui-qr-code.json","./ui-rating.json":"./libs/ui/guide/ui-rating.json","./ui-reader-doc.json":"./libs/ui/guide/ui-reader-doc.json","./ui-slider.json":"./libs/ui/guide/ui-slider.json","./ui-switch.json":"./libs/ui/guide/ui-switch.json","./ui-text-animate.json":"./libs/ui/guide/ui-text-animate.json","./ui-thumb.json":"./libs/ui/guide/ui-thumb.json","./ui-timer.json":"./libs/ui/guide/ui-timer.json","./ui-typewriter.json":"./libs/ui/guide/ui-typewriter.json","libs/ui/guide/app-shell.json":"./libs/ui/guide/app-shell.json","libs/ui/guide/burger-menu.json":"./libs/ui/guide/burger-menu.json","libs/ui/guide/form-basics.json":"./libs/ui/guide/form-basics.json","libs/ui/guide/image-gallery.json":"./libs/ui/guide/image-gallery.json","libs/ui/guide/table-edit-focus.json":"./libs/ui/guide/table-edit-focus.json","libs/ui/guide/translations.json":"./libs/ui/guide/translations.json","libs/ui/guide/ui-autocomplete.json":"./libs/ui/guide/ui-autocomplete.json","libs/ui/guide/ui-background.json":"./libs/ui/guide/ui-background.json","libs/ui/guide/ui-barcode.json":"./libs/ui/guide/ui-barcode.json","libs/ui/guide/ui-buzzer.json":"./libs/ui/guide/ui-buzzer.json","libs/ui/guide/ui-card.json":"./libs/ui/guide/ui-card.json","libs/ui/guide/ui-cdk-drag-drop-splitter.json":"./libs/ui/guide/ui-cdk-drag-drop-splitter.json","libs/ui/guide/ui-cdk-table-wrapper.json":"./libs/ui/guide/ui-cdk-table-wrapper.json","libs/ui/guide/ui-chart.json":"./libs/ui/guide/ui-chart.json","libs/ui/guide/ui-checkbox.json":"./libs/ui/guide/ui-checkbox.json","libs/ui/guide/ui-clock.json":"./libs/ui/guide/ui-clock.json","libs/ui/guide/ui-copy-value.json":"./libs/ui/guide/ui-copy-value.json","libs/ui/guide/ui-image-editor.json":"./libs/ui/guide/ui-image-editor.json","libs/ui/guide/ui-image-grid.json":"./libs/ui/guide/ui-image-grid.json","libs/ui/guide/ui-image-slider.json":"./libs/ui/guide/ui-image-slider.json","libs/ui/guide/ui-input.json":"./libs/ui/guide/ui-input.json","libs/ui/guide/ui-lang-selector.json":"./libs/ui/guide/ui-lang-selector.json","libs/ui/guide/ui-layout-main.json":"./libs/ui/guide/ui-layout-main.json","libs/ui/guide/ui-layout-media-screen.json":"./libs/ui/guide/ui-layout-media-screen.json","libs/ui/guide/ui-layout-nav.json":"./libs/ui/guide/ui-layout-nav.json","libs/ui/guide/ui-layout-overlay-header.json":"./libs/ui/guide/ui-layout-overlay-header.json","libs/ui/guide/ui-layout-overlay.json":"./libs/ui/guide/ui-layout-overlay.json","libs/ui/guide/ui-layout-spinner.json":"./libs/ui/guide/ui-layout-spinner.json","libs/ui/guide/ui-layout-splitter.json":"./libs/ui/guide/ui-layout-splitter.json","libs/ui/guide/ui-layout-tabs.json":"./libs/ui/guide/ui-layout-tabs.json","libs/ui/guide/ui-layout-top-scroll-bottom.json":"./libs/ui/guide/ui-layout-top-scroll-bottom.json","libs/ui/guide/ui-mosaic.json":"./libs/ui/guide/ui-mosaic.json","libs/ui/guide/ui-placeholder.json":"./libs/ui/guide/ui-placeholder.json","libs/ui/guide/ui-qr-code.json":"./libs/ui/guide/ui-qr-code.json","libs/ui/guide/ui-rating.json":"./libs/ui/guide/ui-rating.json","libs/ui/guide/ui-reader-doc.json":"./libs/ui/guide/ui-reader-doc.json","libs/ui/guide/ui-slider.json":"./libs/ui/guide/ui-slider.json","libs/ui/guide/ui-switch.json":"./libs/ui/guide/ui-switch.json","libs/ui/guide/ui-text-animate.json":"./libs/ui/guide/ui-text-animate.json","libs/ui/guide/ui-thumb.json":"./libs/ui/guide/ui-thumb.json","libs/ui/guide/ui-timer.json":"./libs/ui/guide/ui-timer.json","libs/ui/guide/ui-typewriter.json":"./libs/ui/guide/ui-typewriter.json"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./libs/ui/guide sync \\.json$"},"./libs/ui/.storybook/blocks/guide.entries.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>guideEntries});const context=__webpack_require__("./libs/ui/guide sync \\.json$"),guideEntries=context.keys().filter(key=>key.startsWith("./")).map(key=>{const entry=context(key);return entry.default??entry});if(0===guideEntries.length)throw new Error("guide: libs/ui/guide/ holds no entries — an empty guide is a generator bug, not an empty page.");const subjects=guideEntries.map(entry=>entry.component??entry.situation),twice=subjects.find((subject,index)=>subjects.indexOf(subject)!==index);if(twice)throw new Error(`guide: "${twice}" is listed twice — one entry per subject, or the overview lies about the count.`)},"./libs/ui/.storybook/blocks/guide.model.mjs"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Cc:()=>guideModel,ED:()=>reviewedStamps,K9:()=>indexRows});var storybook_internal_csf__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/storybook/dist/csf/index.js");function storyHref(story){const cut=story.lastIndexOf("/");if(cut<=0||cut===story.length-1)throw new Error(`guide: story reference "${story}" is not "Title/Export".`);const title=story.slice(0,cut),name=story.slice(cut+1);return`?path=/story/${(0,storybook_internal_csf__WEBPACK_IMPORTED_MODULE_0__.Lr)(title,(0,storybook_internal_csf__WEBPACK_IMPORTED_MODULE_0__.bE)(name))}`}const subjectOf=entry=>entry.component??entry.situation;function pageOf(entries,subject){const entry=entries.find(e=>subjectOf(e)===subject),story=entry?.shownIn.find(r=>r.story)?.story;return story?(title=story.slice(0,story.lastIndexOf("/")),`?path=/docs/${(0,storybook_internal_csf__WEBPACK_IMPORTED_MODULE_0__.aj)(title)}--docs`):null;var title}function guideModel(entry,entries,of){if(!entry||"object"!=typeof entry)throw new Error(`guide: no entry handed to the block for "${of}".`);const subject=subjectOf(entry);if(void 0!==of&&subject!==of)throw new Error(`guide: the block on "${of}" was handed the entry of "${subject}" — wrong import.`);for(const key of["useFor","notFor","shownIn","sources"])if(!Array.isArray(entry[key]))throw new Error(`guide: entry "${subject}" has no "${key}" list.`);if(0===entry.shownIn.length)throw new Error(`guide: entry "${subject}" shows nothing — no proof, no block.`);return{subject,kind:entry.component?"component":"situation",uses:(entry.uses??[]).map(s=>({selector:s,href:pageOf(entries,s)})),useFor:entry.useFor,notFor:entry.notFor,instead:(entry.instead??[]).map(s=>({selector:s,href:pageOf(entries,s)})),note:entry.note??null,shownIn:entry.shownIn.map(r=>r.story?{label:r.story,href:storyHref(r.story)}:{label:r.file,href:null}),sources:entry.sources,reviewed:entry.reviewed}}function indexRows(entries){if(!Array.isArray(entries)||0===entries.length)throw new Error("guide: the overview has no entries — an empty guide is a generator bug, not an empty page.");return entries.map(e=>({subject:subjectOf(e),kind:e.component?"component":"situation",brief:e.useFor[0],href:pageOf(entries,subjectOf(e))})).sort((a,b)=>a.kind===b.kind?a.subject.localeCompare(b.subject):"situation"===a.kind?1:-1)}const reviewedStamps=entries=>[...new Set(entries.map(e=>e.reviewed))]},"./libs/ui/guide/app-shell.json"(module){"use strict";module.exports=JSON.parse('{"situation":"app-shell","uses":["ui-layout-main","ui-layout-nav","ui-layout-splitter","ui-layout-tabs"],"useFor":["The four layout components nested by content projection: main holds the nav in its header and the page in its content; a splitter inside the content holds tabs in its left pane. Each slot is a named attribute on your own element."],"notFor":["Overlays — they stand next to the layout, not inside it."],"shownIn":[{"story":"Examples/Layout/Layout"},{"file":"libs/ui/.storybook/demos/examples/layout/docs.mdx"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/.storybook/demos/examples/layout/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/burger-menu.json"(module){"use strict";module.exports=JSON.parse('{"situation":"burger-menu","uses":["ui-layout-overlay","ui-layout-overlay-header"],"useFor":["A navigation drawer behind a burger button: the overlay with direction=\\"right\\", the header with its close, a plain link list in the overlay-content slot; every link click resets the open flag. Backdrop, Escape and the scroll-lock come with the overlay."],"notFor":["The main navigation on a wide screen — that is ui-layout-nav in the main header."],"shownIn":[{"story":"Examples/Burger Menu/BurgerMenu"},{"file":"libs/ui/src/lib/examples/docs.mdx"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/examples/docs.mdx","libs/ui/src/lib/layout/overlay/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/form-basics.json"(module){"use strict";module.exports=JSON.parse('{"situation":"form-basics","uses":["ui-input","ui-checkbox","ui-switch","ui-slider"],"useFor":["Every form in the house: <ui-input [label]=\\"…\\"><input ui-tag class=\\"ui\\" [(ngModel)]=\\"…\\" /></ui-input>. The wrapper brings label and error display, the native control keeps value, validation and type. class=\\"ui\\" on the control; class=\\"ui-flat\\" where it sits inline in a table cell."],"notFor":["A control without the class — it renders unstyled.","A validator written in the app: validators belong in the library."],"shownIn":[{"story":"Styling/Forms/Forms"},{"story":"Forms/Validators/Email"},{"file":"apps/change-me/src/app/slider/slider.component.html"}],"sources":["usage.md (Forms)","libs/ui/src/lib/forms/input/docs.mdx","libs/ui/src/lib/forms/validators/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/image-gallery.json"(module){"use strict";module.exports=JSON.parse('{"situation":"image-gallery","uses":["ui-image-grid","ui-image-slider"],"useFor":["Grid and slider sharing one index: side by side, or the slider created with @if as the zoom — two clicks by design of the grid, the first selects, the second (on the projected uiImageGridClickArea) emits clickIndex."],"notFor":["A single linked preview — ui-thumb."],"shownIn":[{"story":"Examples/Image Gallery/ImageGallery"},{"story":"Examples/Image Gallery/ImageGalleryZoom"},{"file":"libs/ui/.storybook/demos/examples/image-grid-slider/docs.mdx"},{"file":"apps/website/src/app/content/image-grid/image-grid.component.html"}],"sources":["libs/ui/.storybook/demos/examples/image-grid-slider/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/table-edit-focus.json"(module){"use strict";module.exports=JSON.parse('{"situation":"table-edit-focus","uses":["ui-cdk-table-wrapper","ui-input","ui-checkbox"],"useFor":["An inline-editing table walked by keyboard: the wrapper in inline fixed mode with the uiTableEditFocus directive; fields as ui-flat controls; the app answers uiRowNavigate and uiRowStep — the only two questions the library does not answer itself: may this row open, and what does locked mean — and calls focusCell() after it re-rendered the edit row."],"notFor":["A wrapper without inline mode: the cells shift when a text turns into a field.","Counting positions instead of naming buttons — the edit row carries more buttons than a read row."],"shownIn":[{"story":"Examples/Table Edit Focus/TableEditFocus"},{"story":"Examples/Table Edit Focus/TableEditFocusTall"},{"file":"libs/ui/.storybook/demos/examples/table-edit-focus/docs.mdx"},{"file":"apps/proto/src/app/examples/keyboard-table/keyboard-table.component.html"},{"file":"apps/proto/src/app/examples/keyboard-table/keyboard-table.component.ts"}],"sources":["libs/ui/.storybook/demos/examples/table-edit-focus/docs.mdx","libs/ui/src/lib/cdk/components/table/docs.mdx","media CLAUDE.md (own repo): Keyboard navigation — who owns what","tickets#168","tickets#169"],"reviewed":"69197b72"}')},"./libs/ui/guide/translations.json"(module){"use strict";module.exports=JSON.parse('{"situation":"translations","uses":["ui-lang-selector"],"useFor":["Loading the library\'s translation files alongside the app\'s own with Transloco; the selector switches both. The list of every key the library ships is generated from the loaded translation, never written beside it."],"notFor":["Translating inside a computed — it snapshots an empty dictionary on first render; use the pipe, or a translate helper that listens."],"shownIn":[{"story":"Examples/Transloco/LangSelector"},{"story":"Examples/Transloco/AllKeys"},{"file":"libs/ui/.storybook/demos/examples/transloco/docs.mdx"}],"sources":["libs/ui/.storybook/demos/examples/transloco/docs.mdx","media CLAUDE.md (own repo): translate() inside a computed is a snapshot","tickets#182"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-autocomplete.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-autocomplete","useFor":["An input whose suggestions the host supplies — an in-memory list, signals or a backend; minChars and delay keep the requests civil, the component never fetches."],"notFor":["Multi-select, chips, a dropdown of fixed options — a native select inside ui-input does the last.","A waiting state or an empty message: there is none by design."],"instead":["ui-input"],"shownIn":[{"story":"Forms/Autocomplete/Autocomplete"},{"story":"Forms/Autocomplete/Loading"}],"sources":["libs/ui/src/lib/forms/autocomplete/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-background.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-background","useFor":["A patterned surface behind projected content — change-me\'s slider page puts its form on one."],"notFor":["Layout; a plain colour, which is one CSS line."],"shownIn":[{"story":"Atoms/Background/BackgroundExample"},{"file":"apps/change-me/src/app/slider/slider.component.html"}],"sources":["libs/ui/src/lib/atoms/background/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-barcode.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-barcode","useFor":["Drawing an EAN-13 the app already holds — an ISBN, an internal id under its own prefix. Size comes from the outside; a utility class on the tag wins."],"notFor":["Deciding which number to draw, printing it, or reacting to a click — that stays with the app.","Any symbology but EAN-13."],"note":"Wrap it in ui-copy-value to copy the digits; the bars stay the picture.","shownIn":[{"story":"Atoms/Barcode/Default"},{"story":"Atoms/Barcode/Sizes"}],"sources":["libs/ui/src/lib/atoms/barcode/docs.mdx","media frontend (own repo): internal-barcode.spec.ts, tickets#205"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-buzzer.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-buzzer","useFor":["One big, deliberate action — a contact trigger, a push button. The website uses it twice."],"notFor":["Ordinary form buttons: those are button.ui and button.ui-flat."],"shownIn":[{"story":"Atoms/Buzzer/Buzzer"},{"file":"apps/website/src/app/content/contact/contact.component.html"},{"file":"apps/website/src/app/components/push-button/push-button.component.html"}],"sources":["libs/ui/src/lib/atoms/buzzer/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-card.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-card","useFor":["A bounded surface with an optional headline and icon around projected content — a tile, a panel, a summary."],"notFor":["Anything that has to act: copying, linking, expanding. The card is presentational and composes nothing."],"instead":["ui-copy-value"],"note":"For a copyable card, wrap it: <ui-copy-value [value]=\\"…\\"><ui-card …></ui-card></ui-copy-value>. One job per component; composition, not a mode, adds the second.","shownIn":[{"story":"Atoms/Card/Card"}],"sources":["libs/ui/src/lib/atoms/card/docs.mdx","tickets#183"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-cdk-drag-drop-splitter.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-cdk-drag-drop-splitter","useFor":["Sorting items into two buckets by drag and drop. Bind both outputs and hand the new arrays back, or nothing moves."],"notFor":["A two-pane layout.","A list that persists itself."],"instead":["ui-layout-splitter"],"shownIn":[{"story":"CDK/Drag And Drop Splitter/DragAndDropSplitter"}],"sources":["libs/ui/src/lib/cdk/components/drag-and-drop-splitter/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-cdk-table-wrapper.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-cdk-table-wrapper","useFor":["Any cdk-table in the house: loading skeleton, hover and focus, header colours, fixed or content layout.","Inline editing: inline fixed plus the uiTableEditFocus directive — the proto keyboard table and the media editor are built this way."],"notFor":["A table without the CDK.","Inline editing without inline mode: the cells shift when text turns into a field."],"shownIn":[{"story":"CDK/Table/Default"},{"story":"CDK/Table/Inline"},{"story":"Examples/Table Edit Focus/TableEditFocus"},{"file":"apps/proto/src/app/examples/keyboard-table/keyboard-table.component.html"}],"sources":["libs/ui/src/lib/cdk/components/table/docs.mdx","libs/ui/.storybook/demos/examples/table-edit-focus/docs.mdx","media CLAUDE.md (own repo): Keyboard navigation — who owns what"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-chart.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-chart","useFor":["A single ring or bar of up to three segments — a share, a progress. The number of colours is the number of rings."],"notFor":["Series, axes, legends, tooltips, more than three parts."],"shownIn":[{"story":"Atoms/Chart/Rings"}],"sources":["libs/ui/src/lib/atoms/chart/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-checkbox.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-checkbox","useFor":["A choice that may be required or validated, inside a form that reports errors.","Flag cells of an editable table row: icons while the row is closed, checkboxes while it is edited — the proto keyboard table does that with display=\\"check-icon\\"."],"notFor":["An always-valid toggle.","The native variant where Safari matters — the self-painted icon variant renders the same everywhere."],"instead":["ui-switch"],"shownIn":[{"story":"Forms/Checkbox/CheckboxIcon"},{"story":"Forms/Checkbox/CheckboxValidation"},{"file":"apps/proto/src/app/examples/keyboard-table/keyboard-table.component.html"}],"sources":["libs/ui/src/lib/forms/checkbox/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-clock.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-clock","useFor":["A decorative time display — the website\'s landscape overlay."],"notFor":["A countdown; anything that needs time zones or formats beyond 12/24 h."],"instead":["ui-timer"],"shownIn":[{"story":"Atoms/Clock/Default"},{"file":"apps/website/src/app/parts/landscape-overlay/landscape-overlay.component.html"}],"sources":["libs/ui/src/lib/atoms/clock/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-copy-value.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-copy-value","useFor":["Click-to-copy around anything that shows a value — a swatch, a barcode, a truncated label. What is shown and what is copied are two different things, and this carries the second."],"notFor":["Showing the value: it brings no appearance. Wrap the thing that does."],"note":"With an empty value it leaves the tab order and stops being a control, so it can stand around content unconditionally and be switched on by supplying a value.","shownIn":[{"story":"Atoms/Copy Value/Swatches"},{"story":"Atoms/Copy Value/OwnConfirmation"}],"sources":["libs/ui/src/lib/atoms/copy-value/docs.mdx","tickets#183"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-image-editor.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-image-editor","useFor":["Uploading and cropping one image to a ratio, result as a JPEG blob — a cover, an avatar. The media cover editor is the overlay variant; the embedded one sits in the flow."],"notFor":["Several images, drawing, filters.","Talking to a backend: it emits, the host uploads."],"shownIn":[{"story":"Molecules/Image Editor/WithImage"},{"story":"Molecules/Image Editor/Overlay"}],"sources":["libs/ui/src/lib/molecules/image-editor/docs.mdx"],"reviewed":"4cc1b639"}')},"./libs/ui/guide/ui-image-grid.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-image-grid","useFor":["The overview of a picture set, sharing one index with ui-image-slider. Always set cols; the default draws nothing."],"notFor":["Showing one picture large — that is the slider\'s half."],"instead":["ui-image-slider"],"shownIn":[{"story":"Examples/Image Gallery/ImageGallery"},{"story":"Examples/Image Gallery/ImageGalleryZoom"},{"file":"apps/website/src/app/content/image-grid/image-grid.component.html"}],"sources":["libs/ui/src/lib/atoms/image-grid/docs.mdx","libs/ui/.storybook/demos/examples/image-grid-slider/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-image-slider.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-image-slider","useFor":["One picture at a time with swipe, drag and zoom; as the zoom of a grid, created with @if only while open."],"notFor":["The overview of a set."],"instead":["ui-image-grid"],"shownIn":[{"story":"Examples/Image Gallery/ImageGallery"},{"story":"Examples/Image Gallery/ImageGalleryZoom"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/atoms/image-slider/docs.mdx","libs/ui/.storybook/demos/examples/image-grid-slider/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-input.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-input","useFor":["Every text-based control in a form: wrap the native input, textarea or select, keep [(ngModel)] on the projected element, class=\\"ui\\" on it.","Inline editing in tables: the projected control takes class=\\"ui-flat\\" instead — invisible at rest, no layout jump. The proto keyboard table has sixteen of them."],"notFor":["Ranges, checkboxes, switches — they have wrappers of their own.","Suggestions while typing."],"instead":["ui-slider","ui-checkbox","ui-switch","ui-autocomplete"],"shownIn":[{"story":"Forms/Input/Input"},{"story":"Forms/Input/InputClearable"},{"file":"apps/change-me/src/app/slider/slider.component.html"},{"file":"apps/proto/src/app/examples/keyboard-table/keyboard-table.component.html"}],"sources":["libs/ui/src/lib/forms/input/docs.mdx","usage.md (Forms)"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-lang-selector.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-lang-selector","useFor":["The one language switch of an app: one tag brings the service call, the storage and the restore on reload."],"notFor":["More than the two languages it knows; a switch that must not persist."],"shownIn":[{"story":"Examples/Transloco/LangSelector"},{"story":"Atoms/Lang Selector/OwnContent"},{"file":"apps/website/src/app/components/lang-selector/lang-selector.component.html"}],"sources":["libs/ui/src/lib/atoms/lang-selector/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-layout-main.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-main","useFor":["The root of an app shell, once: the nav in its header slot, the page in its content, a footer. The website and change-me both start here."],"notFor":["A panel inside a page — splitter, tabs and top-scroll-bottom are for that."],"shownIn":[{"story":"Examples/Layout/Layout"},{"file":"apps/website/src/app/app.component.html"},{"file":"apps/change-me/src/app/app.component.html"}],"sources":["libs/ui/src/lib/layout/main/docs.mdx","libs/ui/.storybook/demos/examples/layout/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-layout-media-screen.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-media-screen","useFor":["Once in the app shell, so every breakpoint question goes to UiLayoutMediaScreenService — never a hard-coded width in TypeScript or a breakpoint through Tailwind."],"notFor":["Anything visible; a second instance."],"shownIn":[{"story":"Layout/Media Screen/MediaScreen"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/layout/media-screen/docs.mdx","media CLAUDE.md (own repo): breakpoints never go through Tailwind"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-layout-nav.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-nav","useFor":["The app navigation in the main header, fed by UiLayoutNavService — tab theme for a site, app theme with a home button for a tool."],"notFor":["A second nav in the same layout.","A menu in a drawer — that is the burger recipe with ui-layout-overlay."],"instead":["ui-layout-overlay"],"shownIn":[{"story":"Layout/Nav/TemplateTab"},{"story":"Layout/Nav/TemplateApp"},{"story":"Examples/Layout/Layout"},{"file":"apps/website/src/app/parts/header/header.component.html"}],"sources":["libs/ui/src/lib/layout/nav/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-layout-overlay-header.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-overlay-header","useFor":["The plain header of an overlay: headline plus close, in the overlay-header slot."],"notFor":["A header with anything else in it — write your own bar into the same slot. The media record sheet does, because its close turns into a two-step discard."],"shownIn":[{"story":"Layout/Overlay Header/InsideAnOverlay"},{"story":"Examples/Burger Menu/BurgerMenu"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/layout/overlay/header/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-layout-overlay.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-overlay","useFor":["A drawer or a modal over the page — a burger menu, a sign-in sheet, a record editor. Place it at the app\'s top level next to the layout, bind active in and take activeOutput back."],"notFor":["Anything inside the layout tree.","A tooltip or a popover."],"shownIn":[{"story":"Examples/Burger Menu/BurgerMenu"},{"story":"Layout/Overlay/Overlay"},{"story":"Layout/Overlay/ScrollContainment"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/layout/overlay/docs.mdx","libs/ui/src/lib/examples/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-layout-spinner.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-spinner","useFor":["The one global loading indicator at the app root, driven by UiLayoutSpinnerService from an HTTP interceptor."],"notFor":["A component\'s own loading state — the table wrapper has its skeleton, everything else is local styling."],"shownIn":[{"story":"Layout/Spinner/Spinner"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/layout/spinner/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-layout-splitter.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-splitter","useFor":["A working view with two panes and an action header. The media editor is one: table left, detail right, and the zoom is the handle that widens the table."],"notFor":["Moving items between two lists.","Resizing panes by dragging — it has direction, zoom and fullscreen, no drag handle."],"instead":["ui-cdk-drag-drop-splitter"],"shownIn":[{"story":"Layout/Splitter/Splitter"},{"story":"Examples/Layout/Layout"}],"sources":["libs/ui/src/lib/layout/splitter/docs.mdx","media CLAUDE.md (own repo): the 4K table shots and the zoom"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-layout-tabs.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-tabs","useFor":["A few sections of one view switched in place, inside a pane."],"notFor":["Routing between pages.","Remembering the active tab across a reload."],"shownIn":[{"story":"Layout/Tabs/TabsDefault"},{"story":"Examples/Layout/Layout"}],"sources":["libs/ui/src/lib/layout/tabs/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-layout-top-scroll-bottom.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-top-scroll-bottom","useFor":["A view whose middle scrolls while header and footer stay — once per route, inside main-content."],"notFor":["Anywhere outside ui-layout-main; a second one in the same view."],"shownIn":[{"story":"Layout/Top Scroll Bottom/TopScrollBottom"}],"sources":["libs/ui/src/lib/layout/top-scroll-bottom/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-mosaic.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-mosaic","useFor":["A decorative tile field behind a page or over a picture — placed with CSS, given a box."],"notFor":["Anything clickable (pointer events are off).","An element in the flow without a height — it renders nothing, because its tile count comes from its box."],"shownIn":[{"story":"Atoms/Mosaic/Images"},{"story":"Atoms/Mosaic/OverImage"}],"sources":["libs/ui/src/lib/atoms/mosaic/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-placeholder.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-placeholder","useFor":["Filler with visible mass in stories and examples, sized from the outside (class=\\"h-64\\") — so a reader can tell a stand-in from a component that failed to render."],"notFor":["Product UI. It is scenery for documentation."],"shownIn":[{"story":"Atoms/Placeholder/Sizes"},{"story":"Examples/Layout/Layout"}],"sources":["libs/ui/src/lib/atoms/placeholder/docs.mdx","agents.md (Storybook Guidelines: filler needs visible mass)"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-qr-code.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-qr-code","useFor":["A URL or a short text as a scannable code. M is the ordinary level; raise it for small prints or surfaces that get handled."],"notFor":["Payloads past the version-40 capacity at the chosen level; kanji or ECI encodings."],"shownIn":[{"story":"Atoms/QR Code/Default"},{"story":"Atoms/QR Code/Levels"}],"sources":["libs/ui/src/lib/atoms/qr-code/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-rating.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-rating","useFor":["Displaying a rating as filled icons — read-only, any Material glyph, colours and size as CSS variables."],"notFor":["Collecting a rating: it takes no input from the reader."],"shownIn":[{"story":"Atoms/Rating/Rating"}],"sources":["libs/ui/src/lib/atoms/rating/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-reader-doc.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-reader-doc","useFor":["Rendering a Markdown string in the house design — the website\'s content pages do. Whoever fetches, caches and picks the language stands in front of it."],"notFor":["Documents whose raw HTML must survive: it is discarded, counted and named on the page."],"shownIn":[{"story":"Atoms/ReaderDoc/Default"},{"story":"Atoms/ReaderDoc/DroppedMarkup"},{"file":"apps/website/src/app/content/content.component.html"}],"sources":["libs/ui/src/lib/atoms/reader-doc/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-slider.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-slider","useFor":["A number or a min–max span the reader drags until it looks right."],"notFor":["A value the reader should type exactly — ui-input with type=\\"number\\"."],"instead":["ui-input"],"shownIn":[{"story":"Forms/Slider/Slider"},{"story":"Forms/Slider/Range"}],"sources":["libs/ui/src/lib/forms/slider/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-switch.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-switch","useFor":["A deliberate on/off decision that takes effect at once and is valid either way — a setting, a filter, a mode."],"notFor":["A choice that can be required or invalid, such as a consent."],"instead":["ui-checkbox"],"shownIn":[{"story":"Forms/Switch/Switch"},{"story":"Styling/Forms/Forms"}],"sources":["libs/ui/src/lib/forms/switch/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-text-animate.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-text-animate","useFor":["A headline that animates letter by letter; clip on the container when a variant travels in from outside."],"notFor":["Body text or anything longer than a phrase."],"shownIn":[{"story":"Atoms/Text Animate/TextAnimate"},{"file":"apps/change-me/src/app/slider/slider.component.html"}],"sources":["libs/ui/src/lib/atoms/text-animate/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-thumb.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-thumb","useFor":["A linked preview image with a caption — playlist tiles, news, references on the website. Place it in a grid cell or give it a width."],"notFor":["A gallery of pictures sharing a selection.","An image without a link — a plain <img> does that."],"instead":["ui-image-grid"],"shownIn":[{"story":"Atoms/Thumb/Thumb"},{"story":"Atoms/Thumb/ThumbInternalLink"},{"file":"apps/website/src/app/content/youtube/youtube.component.html"},{"file":"apps/website/src/app/components/news/display/display.component.html"}],"sources":["libs/ui/src/lib/atoms/thumb/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-timer.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-timer","useFor":["A countdown with a finished event; project the words that stand at zero, in your language."],"notFor":["Showing the time of day."],"instead":["ui-clock"],"shownIn":[{"story":"Atoms/Timer/Timer"}],"sources":["libs/ui/src/lib/atoms/timer/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-typewriter.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-typewriter","useFor":["A line of text that types itself, optionally with a keystroke sound — the website\'s platformer intro."],"notFor":["Body text; a loop — a second sentence is a new run."],"shownIn":[{"story":"Atoms/Typewriter/Typewriter"},{"file":"apps/website/src/app/components/platformer/platformer.component.html"}],"sources":["libs/ui/src/lib/atoms/typewriter/docs.mdx"],"reviewed":"69197b72"}')}}]);
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
"edit": "Zuschneiden",
|
|
64
64
|
"zoom": "Zoom",
|
|
65
65
|
"empty": "Noch kein Bild",
|
|
66
|
-
"cropHint": "Ziehen oder Pfeiltasten verschieben den Ausschnitt — Shift mit Pfeiltaste ändert die Größe.",
|
|
67
66
|
"cropLabel": "Zuschneidebereich",
|
|
68
67
|
"errors": {
|
|
69
68
|
"tooBig": "Die Datei ist zu groß.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[128],{"./libs/ui/src/lib/home/overview.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 jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),lib=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),blocks=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");const package_namespaceObject_rE="2.6.0";function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,lib.R)(),...props.components};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.W8,{title:"Home/Introduction"}),"\n","\n","\n",(0,jsx_runtime.jsx)("h2",{style:{textAlign:"right",borderBottom:"none",marginBottom:0},children:"Built for developers and agents"}),"\n",(0,jsx_runtime.jsx)("h1",{style:{textAlign:"right",color:"var(--ui-c-focus)",paddingBottom:"1rem",borderBottom:"var(--ui-border-width) solid var(--ui-c-fourthly)"},children:"Customers just talk to the agent"}),"\n",(0,jsx_runtime.jsx)(_components.h3,{id:"ui-library-overview",children:"UI Library Overview"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This library provides a modular set of Angular components for building consistent user\ninterfaces. It follows an atomic design approach, categorized into Electrons, Atoms,\nMolecules, Layouts, and Forms. Everything is ",(0,jsx_runtime.jsx)(_components.strong,{children:"standalone"})," — there are no NgModules anymore (the\nTransloco configuration modules are the only exception). State is managed with ",(0,jsx_runtime.jsx)(_components.strong,{children:"Signals"}),"\nand all apps run ",(0,jsx_runtime.jsx)(_components.strong,{children:"zoneless"}),"."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This documentation describes version ",(0,jsx_runtime.jsx)(_components.strong,{children:package_namespaceObject_rE})," of the library. To\ninstall exactly what is documented here:\n",(0,jsx_runtime.jsxs)("code",{children:["npm i @mojawork/ui@",package_namespaceObject_rE]}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"core-architecture",children:"Core Architecture"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The library is organized into the following categories (folders under ",(0,jsx_runtime.jsx)(_components.code,{children:"libs/ui/src/lib"}),").\nThe first three are layers, and they are told apart by ",(0,jsx_runtime.jsx)(_components.strong,{children:"composition and\nvisibility"}),", not by size: an atom may be large and a molecule small."]}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Category"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms/_electrons"})}),(0,jsx_runtime.jsxs)("td",{children:["Internal building blocks, ",(0,jsx_runtime.jsx)("strong",{children:"not exported"}),", selector ",(0,jsx_runtime.jsx)("code",{children:"ui-electron-*"}),". They exist only so ui components can build them in — an app never names one. Today: the form error message."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms"})}),(0,jsx_runtime.jsx)("td",{children:"Exported building blocks that compose nothing else from this library (e.g., thumbs, typewriter, language selector, copy-value)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"molecules"})}),(0,jsx_runtime.jsxs)("td",{children:["Built from at least one other ui component — that single test is the whole definition, and the folder follows it. ",(0,jsx_runtime.jsx)("code",{children:"image-editor"})," is the only one: it builds in the crop box, the overlay, its header and the slider. Size plays no part; an atom may be a large class and a molecule twenty lines."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"cdk"})}),(0,jsx_runtime.jsx)("td",{children:"CDK-based building blocks (e.g., table wrapper, drag-and-drop splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"layout"})}),(0,jsx_runtime.jsx)("td",{children:"Structural components that define the page grid and navigation (e.g., main layout, spinner, splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"forms"})}),(0,jsx_runtime.jsx)("td",{children:"Input elements and form validation components (inputs, checkboxes, validator directives)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsxs)("td",{children:[(0,jsx_runtime.jsx)("code",{children:"_directives"})," / ",(0,jsx_runtime.jsx)("code",{children:"_pipes"})]}),(0,jsx_runtime.jsx)("td",{children:"Utility directives and pipes for behavior modification (e.g., autofocus, intersection observer)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"transloco-modules"})}),(0,jsx_runtime.jsxs)("td",{children:["Internationalization setup (",(0,jsx_runtime.jsx)("code",{children:"TranslocoRootModule"}),") — the only remaining NgModules, imported once at application level."]})]})]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"styling-concept",children:"Styling Concept"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Every component in this library ships ",(0,jsx_runtime.jsx)(_components.strong,{children:"fully self-contained"}),": plain CSS built\nexclusively on ",(0,jsx_runtime.jsx)(_components.strong,{children:"design tokens"})," — CSS custom properties such as ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-c-*"}),"\n(colors, theme-aware), ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-spacer"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-border-radius"})," and ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-time"}),".\nThere are no hidden dependencies on any CSS framework, utility system or build\ntool: the components coexist with whatever styling setup your project uses."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Responsiveness"})," follows a single canonical breakpoint ladder with six levels\n(",(0,jsx_runtime.jsx)(_components.code,{children:"ms1"})," 340px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms2"})," 375px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms3"})," 481px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms4"})," 769px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms5"})," 1025px ·\n",(0,jsx_runtime.jsx)(_components.code,{children:"ms6"})," 1901px). The ladder deliberately exists only once and serves every layer\nfrom the same source:"]}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"CSS"}),": via named media queries (",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--ms4)"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--below-ms5)"}),")\nthat are resolved into standard queries at build time — the published package\ncontains plain, universally working CSS."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"TypeScript"}),": via the ",(0,jsx_runtime.jsx)(_components.code,{children:"UiLayoutMediaScreenService"}),", which exposes the\ncurrent level as a signal (",(0,jsx_runtime.jsx)(_components.code,{children:"mediascreen: 1..6"}),") — logic and layout are\nguaranteed to switch at the same boundaries."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"tailwind--not-required-but-offered",children:"Tailwind — not required, but offered"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The npm package ",(0,jsx_runtime.jsx)(_components.strong,{children:"does not require Tailwind"}),". Whether a project uses Tailwind\nis entirely that project's decision — the components work identically either\nway."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Projects that ",(0,jsx_runtime.jsx)(_components.strong,{children:"do want Tailwind (v4)"})," get a head start: the package ships a\nready-made theme file, ",(0,jsx_runtime.jsx)(_components.code,{children:"@mojawork/ui/styles/theme.css"}),". One import in the\napp's own Tailwind entry wires Tailwind into the library's design system:"]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-css",children:"@layer theme, base, cdk-resets, ui, components, utilities;\n@import 'tailwindcss';\n@import '@mojawork/ui/styles/theme.css';\n@source './app';\n@source '../node_modules/@mojawork/ui';\n"})}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Colors"})," mapped via ",(0,jsx_runtime.jsx)(_components.code,{children:"@theme"})," onto the runtime tokens — utilities like\n",(0,jsx_runtime.jsx)(_components.code,{children:"text-c-primary"})," automatically follow light/dark theme switching."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Breakpoints"})," ",(0,jsx_runtime.jsx)(_components.code,{children:"ms1:"}),"–",(0,jsx_runtime.jsx)(_components.code,{children:"ms6:"})," — the same ladder the components use\ninternally."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Animation presets"})," (e.g. ",(0,jsx_runtime.jsx)(_components.code,{children:"loading"}),")."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.p,{children:"The theme carries the mapping and nothing else: no Tailwind import of its\nown, no source paths. The layer line stays in the app's file because it has\nto be the first statement there, before Tailwind declares its own layers —\nan import cannot put it in front of itself."}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["In short: ",(0,jsx_runtime.jsx)(_components.strong,{children:"shipped Tailwind-free, Tailwind-ready when wanted."})," Both paths are\nfirst-class; neither is forced."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Everything the library ships sits in the ",(0,jsx_runtime.jsx)(_components.code,{children:"ui"})," cascade layer, below Tailwind's\n",(0,jsx_runtime.jsx)(_components.code,{children:"utilities"})," — so a utility you write on a ui tag beats the component's own\ndefault, and your app's unlayered CSS beats both. One line on the Tailwind\nside makes the order explicit; see ",(0,jsx_runtime.jsx)(_components.a,{href:"?path=/docs/styling-layers--docs",children:"Styling › Layers"}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"for-contributors",children:"For contributors"}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Components in ",(0,jsx_runtime.jsx)(_components.code,{children:"src/lib"})," never use Tailwind utilities or ",(0,jsx_runtime.jsx)(_components.code,{children:"@apply"})," — plain CSS\nwith ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-*"})," tokens only; component-local classes carry a ",(0,jsx_runtime.jsx)(_components.code,{children:"_"})," prefix."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Storybook ",(0,jsx_runtime.jsx)(_components.strong,{children:"stories"})," (and the showcase components under ",(0,jsx_runtime.jsx)(_components.code,{children:".storybook/demos/"}),")\nexplicitly use Tailwind for their example layout."]}),"\n",(0,jsx_runtime.jsx)(_components.li,{children:"Breakpoints are never written as pixel literals — always via the ladder's\nnamed queries."}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"getting-started",children:"Getting Started"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["All components are standalone: import them directly from the barrel into the ",(0,jsx_runtime.jsx)(_components.code,{children:"imports"}),"\narray of your standalone component. Inside the monorepo the import path is mapped via\ntsconfig; external apps install the published npm package\n(",(0,jsx_runtime.jsx)("a",{href:"https://www.npmjs.com/package/@mojawork/ui",target:"_blank",rel:"noopener",children:"@mojawork/ui"}),")."]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-typescript",children:"import { Component } from '@angular/core';\nimport { UiInputComponent, UiCardComponent } from '@mojawork/ui';\n\n@Component({\n selector: 'app-my-feature',\n imports: [UiInputComponent, UiCardComponent],\n templateUrl: './my-feature.component.html',\n})\nexport class MyFeatureComponent {}\n"})}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"usage-principles",children:"Usage Principles"}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Principle"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Composition"}),(0,jsx_runtime.jsx)("td",{children:"Prefer composing smaller components into larger ones."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Consistency"}),(0,jsx_runtime.jsx)("td",{children:"Use the provided layouts to maintain a unified user experience across the application."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Signals & zoneless"}),(0,jsx_runtime.jsx)("td",{children:"Component state uses Angular Signals; all consumers run without Zone.js."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Translation"}),(0,jsx_runtime.jsx)("td",{children:"All text within components is managed via Transloco for easy localization."})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[128],{"./libs/ui/src/lib/home/overview.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 jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),lib=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),blocks=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");const package_namespaceObject_rE="2.6.1";function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,lib.R)(),...props.components};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.W8,{title:"Home/Introduction"}),"\n","\n","\n",(0,jsx_runtime.jsx)("h2",{style:{textAlign:"right",borderBottom:"none",marginBottom:0},children:"Built for developers and agents"}),"\n",(0,jsx_runtime.jsx)("h1",{style:{textAlign:"right",color:"var(--ui-c-focus)",paddingBottom:"1rem",borderBottom:"var(--ui-border-width) solid var(--ui-c-fourthly)"},children:"Customers just talk to the agent"}),"\n",(0,jsx_runtime.jsx)(_components.h3,{id:"ui-library-overview",children:"UI Library Overview"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This library provides a modular set of Angular components for building consistent user\ninterfaces. It follows an atomic design approach, categorized into Electrons, Atoms,\nMolecules, Layouts, and Forms. Everything is ",(0,jsx_runtime.jsx)(_components.strong,{children:"standalone"})," — there are no NgModules anymore (the\nTransloco configuration modules are the only exception). State is managed with ",(0,jsx_runtime.jsx)(_components.strong,{children:"Signals"}),"\nand all apps run ",(0,jsx_runtime.jsx)(_components.strong,{children:"zoneless"}),"."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This documentation describes version ",(0,jsx_runtime.jsx)(_components.strong,{children:package_namespaceObject_rE})," of the library. To\ninstall exactly what is documented here:\n",(0,jsx_runtime.jsxs)("code",{children:["npm i @mojawork/ui@",package_namespaceObject_rE]}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"core-architecture",children:"Core Architecture"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The library is organized into the following categories (folders under ",(0,jsx_runtime.jsx)(_components.code,{children:"libs/ui/src/lib"}),").\nThe first three are layers, and they are told apart by ",(0,jsx_runtime.jsx)(_components.strong,{children:"composition and\nvisibility"}),", not by size: an atom may be large and a molecule small."]}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Category"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms/_electrons"})}),(0,jsx_runtime.jsxs)("td",{children:["Internal building blocks, ",(0,jsx_runtime.jsx)("strong",{children:"not exported"}),", selector ",(0,jsx_runtime.jsx)("code",{children:"ui-electron-*"}),". They exist only so ui components can build them in — an app never names one. Today: the form error message."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms"})}),(0,jsx_runtime.jsx)("td",{children:"Exported building blocks that compose nothing else from this library (e.g., thumbs, typewriter, language selector, copy-value)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"molecules"})}),(0,jsx_runtime.jsxs)("td",{children:["Built from at least one other ui component — that single test is the whole definition, and the folder follows it. ",(0,jsx_runtime.jsx)("code",{children:"image-editor"})," is the only one: it builds in the crop box, the overlay, its header and the slider. Size plays no part; an atom may be a large class and a molecule twenty lines."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"cdk"})}),(0,jsx_runtime.jsx)("td",{children:"CDK-based building blocks (e.g., table wrapper, drag-and-drop splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"layout"})}),(0,jsx_runtime.jsx)("td",{children:"Structural components that define the page grid and navigation (e.g., main layout, spinner, splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"forms"})}),(0,jsx_runtime.jsx)("td",{children:"Input elements and form validation components (inputs, checkboxes, validator directives)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsxs)("td",{children:[(0,jsx_runtime.jsx)("code",{children:"_directives"})," / ",(0,jsx_runtime.jsx)("code",{children:"_pipes"})]}),(0,jsx_runtime.jsx)("td",{children:"Utility directives and pipes for behavior modification (e.g., autofocus, intersection observer)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"transloco-modules"})}),(0,jsx_runtime.jsxs)("td",{children:["Internationalization setup (",(0,jsx_runtime.jsx)("code",{children:"TranslocoRootModule"}),") — the only remaining NgModules, imported once at application level."]})]})]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"styling-concept",children:"Styling Concept"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Every component in this library ships ",(0,jsx_runtime.jsx)(_components.strong,{children:"fully self-contained"}),": plain CSS built\nexclusively on ",(0,jsx_runtime.jsx)(_components.strong,{children:"design tokens"})," — CSS custom properties such as ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-c-*"}),"\n(colors, theme-aware), ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-spacer"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-border-radius"})," and ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-time"}),".\nThere are no hidden dependencies on any CSS framework, utility system or build\ntool: the components coexist with whatever styling setup your project uses."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Responsiveness"})," follows a single canonical breakpoint ladder with six levels\n(",(0,jsx_runtime.jsx)(_components.code,{children:"ms1"})," 340px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms2"})," 375px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms3"})," 481px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms4"})," 769px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms5"})," 1025px ·\n",(0,jsx_runtime.jsx)(_components.code,{children:"ms6"})," 1901px). The ladder deliberately exists only once and serves every layer\nfrom the same source:"]}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"CSS"}),": via named media queries (",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--ms4)"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--below-ms5)"}),")\nthat are resolved into standard queries at build time — the published package\ncontains plain, universally working CSS."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"TypeScript"}),": via the ",(0,jsx_runtime.jsx)(_components.code,{children:"UiLayoutMediaScreenService"}),", which exposes the\ncurrent level as a signal (",(0,jsx_runtime.jsx)(_components.code,{children:"mediascreen: 1..6"}),") — logic and layout are\nguaranteed to switch at the same boundaries."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"tailwind--not-required-but-offered",children:"Tailwind — not required, but offered"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The npm package ",(0,jsx_runtime.jsx)(_components.strong,{children:"does not require Tailwind"}),". Whether a project uses Tailwind\nis entirely that project's decision — the components work identically either\nway."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Projects that ",(0,jsx_runtime.jsx)(_components.strong,{children:"do want Tailwind (v4)"})," get a head start: the package ships a\nready-made theme file, ",(0,jsx_runtime.jsx)(_components.code,{children:"@mojawork/ui/styles/theme.css"}),". One import in the\napp's own Tailwind entry wires Tailwind into the library's design system:"]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-css",children:"@layer theme, base, cdk-resets, ui, components, utilities;\n@import 'tailwindcss';\n@import '@mojawork/ui/styles/theme.css';\n@source './app';\n@source '../node_modules/@mojawork/ui';\n"})}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Colors"})," mapped via ",(0,jsx_runtime.jsx)(_components.code,{children:"@theme"})," onto the runtime tokens — utilities like\n",(0,jsx_runtime.jsx)(_components.code,{children:"text-c-primary"})," automatically follow light/dark theme switching."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Breakpoints"})," ",(0,jsx_runtime.jsx)(_components.code,{children:"ms1:"}),"–",(0,jsx_runtime.jsx)(_components.code,{children:"ms6:"})," — the same ladder the components use\ninternally."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Animation presets"})," (e.g. ",(0,jsx_runtime.jsx)(_components.code,{children:"loading"}),")."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.p,{children:"The theme carries the mapping and nothing else: no Tailwind import of its\nown, no source paths. The layer line stays in the app's file because it has\nto be the first statement there, before Tailwind declares its own layers —\nan import cannot put it in front of itself."}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["In short: ",(0,jsx_runtime.jsx)(_components.strong,{children:"shipped Tailwind-free, Tailwind-ready when wanted."})," Both paths are\nfirst-class; neither is forced."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Everything the library ships sits in the ",(0,jsx_runtime.jsx)(_components.code,{children:"ui"})," cascade layer, below Tailwind's\n",(0,jsx_runtime.jsx)(_components.code,{children:"utilities"})," — so a utility you write on a ui tag beats the component's own\ndefault, and your app's unlayered CSS beats both. One line on the Tailwind\nside makes the order explicit; see ",(0,jsx_runtime.jsx)(_components.a,{href:"?path=/docs/styling-layers--docs",children:"Styling › Layers"}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"for-contributors",children:"For contributors"}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Components in ",(0,jsx_runtime.jsx)(_components.code,{children:"src/lib"})," never use Tailwind utilities or ",(0,jsx_runtime.jsx)(_components.code,{children:"@apply"})," — plain CSS\nwith ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-*"})," tokens only; component-local classes carry a ",(0,jsx_runtime.jsx)(_components.code,{children:"_"})," prefix."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Storybook ",(0,jsx_runtime.jsx)(_components.strong,{children:"stories"})," (and the showcase components under ",(0,jsx_runtime.jsx)(_components.code,{children:".storybook/demos/"}),")\nexplicitly use Tailwind for their example layout."]}),"\n",(0,jsx_runtime.jsx)(_components.li,{children:"Breakpoints are never written as pixel literals — always via the ladder's\nnamed queries."}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"getting-started",children:"Getting Started"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["All components are standalone: import them directly from the barrel into the ",(0,jsx_runtime.jsx)(_components.code,{children:"imports"}),"\narray of your standalone component. Inside the monorepo the import path is mapped via\ntsconfig; external apps install the published npm package\n(",(0,jsx_runtime.jsx)("a",{href:"https://www.npmjs.com/package/@mojawork/ui",target:"_blank",rel:"noopener",children:"@mojawork/ui"}),")."]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-typescript",children:"import { Component } from '@angular/core';\nimport { UiInputComponent, UiCardComponent } from '@mojawork/ui';\n\n@Component({\n selector: 'app-my-feature',\n imports: [UiInputComponent, UiCardComponent],\n templateUrl: './my-feature.component.html',\n})\nexport class MyFeatureComponent {}\n"})}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"usage-principles",children:"Usage Principles"}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Principle"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Composition"}),(0,jsx_runtime.jsx)("td",{children:"Prefer composing smaller components into larger ones."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Consistency"}),(0,jsx_runtime.jsx)("td",{children:"Use the provided layouts to maintain a unified user experience across the application."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Signals & zoneless"}),(0,jsx_runtime.jsx)("td",{children:"Component state uses Angular Signals; all consumers run without Zone.js."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Translation"}),(0,jsx_runtime.jsx)("td",{children:"All text within components is managed via Transloco for easy localization."})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
|
package/storybook/iframe.html
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3190],{"./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/molecules/image-editor/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"),_image_editor_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/molecules/image-editor/image-editor.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_image_editor_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-image-editor.json");function _createMdxContent(props){const _components={a:"a",code:"code",h1:"h1",h2:"h2",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:_image_editor_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h1,{id:"image-editor",children:"Image Editor"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["An editor for a single image. The user can delete the current image or\nupload a new one (PNG, GIF or JPEG), crop it (freely or locked to an aspect\nratio) and the result is converted to a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"JPEG entirely in the browser"})," via a\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<canvas>"})," (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"toBlob('image/jpeg', quality)"}),"). The finished blob is emitted through\nthe ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"save"})," output — the component itself never talks to a backend, so it is\nreusable across apps."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Client-side conversion means the server only has to store a small, finished\nJPEG: no server-side image library is required."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{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:["Edits one image in the browser: upload (PNG, GIF, JPEG), crop freely or to an\naspect ratio, delete, and emit the result as a JPEG blob through ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"save"}),". It\nnever talks to a backend and keeps no image beyond the one it is shown. It comes\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"embedded"})," in the flow or as an ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"overlay"})," — the same editor, not two. It is the\nlibrary's only molecule: it composes the overlay, the overlay header, the crop\nbox and the slider."]}),"\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-image-editor",entry:_guide_ui_image_editor_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.h2,{id:"variants",children:"Variants"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The same content comes in two presentations, selected by the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"variant"})," input:"]}),"\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:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"embedded"})})," (default): the editor stands in the document flow like any\nother element — no frame, no backdrop, no focus trap, no Escape semantics.\nIt fills the width it is given; the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"maximum width is set by the consumer"}),"\nvia styles on the host or a wrapping element, the minimum emerges from the\nfooter button row (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"flex-wrap"})," as a safety net for very narrow screens).\nDelete and Save return the editor to a clean view mode instead of closing\nanything, and leaving the crop stage is the Crop button's own second press —\nthe consumer provides whatever closes the editor itself; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"active"})," and\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"activeOutput"})," are not used."]}),"\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:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"overlay"})}),": wraps the editor in the ui overlay as before — backdrop,\nfocus trap, Escape and the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"active"})," / ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"activeOutput"})," pair."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--with-image",children:"Open story"})}),"\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-image-editor\n [imageUrl]="currentCover()"\n [aspectRatio]="2 / 3"\n (save)="onCoverSaved($event)"\n (deleteImage)="onCoverDeleted()"\n></ui-image-editor>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"usage-overlay",children:"Usage (overlay)"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--overlay",children:"Open story"})}),"\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-image-editor\n variant="overlay"\n [active]="editorActive()"\n [imageUrl]="currentCover()"\n [aspectRatio]="2 / 3"\n (save)="onCoverSaved($event)"\n (deleteImage)="onCoverDeleted()"\n (activeOutput)="editorActive.set($event)"\n></ui-image-editor>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"with-an-existing-image",children:"With an existing image"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--with-image",children:"Open story"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Opening with an image shows it in view mode. The footer offers ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Delete"}),",\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Upload"})," (pick a new file), ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Crop"})," (edit the current image without\nre-uploading) and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Save"}),". Both ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Upload"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Crop"})," switch to the crop\nstage; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Save"})," is enabled there. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Crop"})," switches back out again — it is a\ntoggle, not a one-way door."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The crop box works by pointer and by keyboard alike: it is a tab stop, the\narrow keys pan it, Shift with an arrow resizes it from the south-east corner\n— a locked ratio holds exactly as it does for a pointer on that corner. This\npage is the only place that says so: the hint that used to sit under the box\nnamed the arrow keys but not the corner, which sent readers to pull at the\nwrong edge."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"locked-aspect-ratio",children:"Locked aspect ratio"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story-3",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--poster-ratio",children:"Open story"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Passing ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"aspectRatio"})," (e.g. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"2 / 3"})," for a poster) constrains the crop box while\nresizing; the height follows the width automatically. Only the corner handles\nare shown in this mode."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"empty-state",children:"Empty state"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story-4",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--empty",children:"Open story"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Without an ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"imageUrl"})," the editor shows an empty placeholder and only the upload\naction."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"footer-buttons",children:"Footer buttons"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Four icon buttons on one row (grey surface, tinted icons where it helps). Each\ncarries a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"title"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"aria-label"})," tooltip. Muted buttons keep the same grey\nbackground — only their icon is dimmed, in its normal colour, so it stays\nreadable against that surface. The ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--empty",children:"empty state"}),"\nshows this: with no image, Crop, Delete and Save are all muted."]}),"\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:"Crop is muted, never disabled"}),", and that is a keyboard decision rather than\na visual one. Pressing it used to switch it off — entering the crop stage made\nits own condition false — and a disabled element is not focusable, so the\nfocus was dropped by the very press that moved the editor forward, in a\ncomponent whose crop box is meant to be operated by keyboard. It therefore\ncarries ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'aria-disabled="true"'})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"aria-pressed"}),", stays reachable in every\nstate, and does nothing when there is nothing to crop (see the house rule in\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"usage.md"}),', "Disabled controls and the keyboard").']}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Delete and Save still use the attribute, and that is an open end rather than a\ndistinction: pressing Delete removes the image, which is the condition Delete\nreads, and pressing Save leaves the crop stage, which is the condition Save\nreads — so both switch themselves off under the focus that pressed them, for\nthe same reason Crop did. Crop was fixed first because it is the one you press\ntwice. The other two are named here so the gap is on the page instead of in\nsomeone's memory."}),"\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:"Button"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Icon"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Enabled when"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Action"})]})}),(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:"Upload"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"add_a_photo"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"always"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Opens the file picker; a chosen PNG/GIF/JPEG enters the crop stage."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Crop (toggle)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"crop"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["always reachable; muted (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"aria-disabled"}),") without an image"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Loads the current image into the crop stage — and a second press discards the crop and returns to view. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"aria-pressed"})," says which state it is in."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Delete (red icon)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"delete"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"an image exists"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Emits ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"deleteImage"})," and closes the overlay (embedded: resets to view)."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Save (green icon when active)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"save"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"crop stage and not converting"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Converts the crop to a JPEG, emits ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"save"}),", closes the overlay (embedded: resets to view)."]})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Rejecting a file (wrong type or over the size limit) shows an inline error and\nstays in the current stage."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"inputs",children:"Inputs"}),"\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:"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:"variant"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'embedded' | 'overlay'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'embedded'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"In-flow presentation or the ui overlay."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"active"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Opens/closes the overlay (overlay variant only)."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"imageUrl"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"string | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The current image shown when the editor opens."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"aspectRatio"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Locks the crop to this width/height ratio; null allows free cropping."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"maxWidth"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"1200"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Maximum output width in pixels; height follows the crop ratio."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"quality"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"0.75"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"JPEG quality (0..1) of the converted output."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"maxFileSizeMb"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"10"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Rejects source files larger than this (megabytes)."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"headline"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"string | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Optional overlay title; falls back to the imageEditor.title key."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"overlayDirection"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'center' | 'top' | 'bottom' | 'left' | 'right' | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{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:"Side the overlay slides in from (overlay variant only); null keeps the\noverlay's own centre default. Use 'left'/'right' to make the editor a\ndrawer that matches an app's navigation panel."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"overlayFitContent"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Sizes the overlay to its content instead of the available height\n(overlay variant only) — see the overlay's own fitContent. Keeps a sheet\nholding a small image from standing there as a tall, empty column."})})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The overlay variant always runs with the overlay's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"viewportHeight"}),": a sheet\nbelongs to the browser window, not to the document. Without it the percentage\nheights resolve against a transformed ancestor's box, and inside a long page\nthat stretches the sheet to the full document height — header and footer end up\nfar outside the visible area."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"outputs",children:"Outputs"}),"\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:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Payload"}),(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:"save"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Blob"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The converted JPEG when the user saves."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"deleteImage"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"void"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Emitted when the user deletes the current image."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"activeOutput"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Forwards the overlay close event (emits false; overlay variant only)."})]})]})]})]})}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)}}}]);
|
package/storybook/molecules-image-editor-image-editor-component-stories.fbfeff1b.iframe.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[8180],{"./libs/ui/src/lib/molecules/image-editor/image-editor.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Empty:()=>Empty,Overlay:()=>Overlay,PosterRatio:()=>PosterRatio,WithImage:()=>WithImage,__namedExportsOrder:()=>__namedExportsOrder,default:()=>image_editor_component_stories});var dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),asyncToGenerator=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_editor_componentngResource=__webpack_require__("./libs/ui/src/lib/molecules/image-editor/image-editor.component.css?ngResource"),image_editor_componentngResource_default=__webpack_require__.n(image_editor_componentngResource),_common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.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"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs"),slider_component=__webpack_require__("./libs/ui/src/lib/forms/slider/slider.component.ts"),header_header_component=__webpack_require__("./libs/ui/src/lib/layout/overlay/header/header.component.ts"),overlay_component=__webpack_require__("./libs/ui/src/lib/layout/overlay/overlay.component.ts");var crop_box_componentngResource=__webpack_require__("./libs/ui/src/lib/molecules/image-editor/crop-box/crop-box.component.css?ngResource"),crop_box_componentngResource_default=__webpack_require__.n(crop_box_componentngResource);let UiImageEditorCropBoxComponent=class UiImageEditorCropBoxComponent{src=(0,core.input)("");aspectRatio=(0,core.input)(null);zoom=(0,core.input)(100);cropChange=(0,core.output)();preview=(0,core.viewChild)("preview");cropEl=(0,core.viewChild)("crop");frameEl=(0,core.viewChild)("frame");naturalWidth=(0,_effect_chunk2.vPA)(0);naturalHeight=(0,_effect_chunk2.vPA)(0);cornerHandles=[{h:"nw",cls:"_nw"},{h:"ne",cls:"_ne"},{h:"sw",cls:"_sw"},{h:"se",cls:"_se"}];edgeHandles=[{h:"n",cls:"_n"},{h:"s",cls:"_s"},{h:"w",cls:"_w"},{h:"e",cls:"_e"},{h:"move",cls:"_center"}];handles=(0,_resource_chunk.EW)(()=>this.aspectRatio()?this.cornerHandles:[...this.cornerHandles,...this.edgeHandles]);cropX=(0,_effect_chunk2.vPA)(0);cropY=(0,_effect_chunk2.vPA)(0);cropWidth=(0,_effect_chunk2.vPA)(0);cropHeight=(0,_effect_chunk2.vPA)(0);drag=null;constructor(){(0,_effect_chunk2.QZP)(()=>{this.src(),this.aspectRatio(),(0,_resource_chunk.O8)(()=>{this.naturalWidth()>0&&this.resetCrop()})}),(0,_effect_chunk2.QZP)(()=>this.paint()),(0,_effect_chunk2.QZP)(()=>{const el=this.frameEl()?.nativeElement;el&&(el.style.transform=`scale(${this.zoom()/100})`)})}paint(){const el=this.cropEl()?.nativeElement;el&&(el.style.left=`${this.leftPercent()}%`,el.style.top=`${this.topPercent()}%`,el.style.width=`${this.widthPercent()}%`,el.style.height=`${this.heightPercent()}%`)}onImageLoad(){const img=this.preview()?.nativeElement;img&&(this.naturalWidth.set(img.naturalWidth),this.naturalHeight.set(img.naturalHeight),this.resetCrop())}resetCrop(){const natW=this.naturalWidth(),natH=this.naturalHeight();if(0===natW||0===natH)return;const ratio=this.aspectRatio();let w=natW,h=natH;ratio&&ratio>0&&(natW/natH>ratio?(h=natH,w=h*ratio):(w=natW,h=w/ratio)),this.cropWidth.set(Math.round(w)),this.cropHeight.set(Math.round(h)),this.cropX.set(Math.round((natW-w)/2)),this.cropY.set(Math.round((natH-h)/2)),this.emit()}leftPercent=(0,_resource_chunk.EW)(()=>this.naturalWidth()?this.cropX()/this.naturalWidth()*100:0);topPercent=(0,_resource_chunk.EW)(()=>this.naturalHeight()?this.cropY()/this.naturalHeight()*100:0);widthPercent=(0,_resource_chunk.EW)(()=>this.naturalWidth()?this.cropWidth()/this.naturalWidth()*100:100);heightPercent=(0,_resource_chunk.EW)(()=>this.naturalHeight()?this.cropHeight()/this.naturalHeight()*100:100);onPointerDown(event,handle){event.preventDefault(),event.stopPropagation(),event.target.setPointerCapture(event.pointerId),this.drag={handle,startClientX:event.clientX,startClientY:event.clientY,startX:this.cropX(),startY:this.cropY(),startWidth:this.cropWidth(),startHeight:this.cropHeight()}}onPointerMove(event){if(!this.drag)return;const img=this.preview()?.nativeElement;if(!img)return;const shownWidth=img.getBoundingClientRect().width;if(0===shownWidth)return;const scale=this.naturalWidth()/shownWidth,dx=(event.clientX-this.drag.startClientX)*scale,dy=(event.clientY-this.drag.startClientY)*scale;"move"===this.drag.handle?this.moveBy(dx,dy):this.resizeBy(this.drag.handle,dx,dy),this.paint(),this.emit()}onPointerUp(event){this.drag&&(event.target.releasePointerCapture?.(event.pointerId),this.drag=null,this.emit())}onKeydown(event){const step=Math.max(8,Math.round(.02*this.naturalWidth())),dx="ArrowLeft"===event.key?-step:"ArrowRight"===event.key?step:0,dy="ArrowUp"===event.key?-step:"ArrowDown"===event.key?step:0;0===dx&&0===dy||(event.preventDefault(),this.drag={handle:event.shiftKey?"se":"move",startClientX:0,startClientY:0,startX:this.cropX(),startY:this.cropY(),startWidth:this.cropWidth(),startHeight:this.cropHeight()},event.shiftKey?this.resizeBy("se",dx,dy):this.moveBy(dx,dy),this.drag=null,this.paint(),this.emit())}moveBy(dx,dy){if(!this.drag)return;const natW=this.naturalWidth(),natH=this.naturalHeight(),w=this.drag.startWidth,h=this.drag.startHeight;this.cropX.set(this.clamp(this.drag.startX+dx,0,natW-w)),this.cropY.set(this.clamp(this.drag.startY+dy,0,natH-h))}resizeBy(handle,dx,dy){if(!this.drag)return;const natW=this.naturalWidth(),natH=this.naturalHeight(),ratio=this.aspectRatio(),left0=this.drag.startX,top0=this.drag.startY,right0=left0+this.drag.startWidth,bottom0=top0+this.drag.startHeight,mL="nw"===handle||"sw"===handle||"w"===handle,mR="ne"===handle||"se"===handle||"e"===handle,mT="nw"===handle||"ne"===handle||"n"===handle,mB="sw"===handle||"se"===handle||"s"===handle;let left=mL?this.clamp(left0+dx,0,right0-24):left0,right=mR?this.clamp(right0+dx,left0+24,natW):right0,top=mT?this.clamp(top0+dy,0,bottom0-24):top0,bottom=mB?this.clamp(bottom0+dy,top0+24,natH):bottom0;if(ratio&&ratio>0){const horizontal=mL||mR,vertical=mT||mB;if(horizontal&&!vertical){if(bottom=top+(right-left)/ratio,bottom>natH){bottom=natH;const w=(bottom-top)*ratio;mL?left=right-w:right=left+w}}else if(vertical&&!horizontal){if(right=left+(bottom-top)*ratio,right>natW){right=natW;const h=(right-left)/ratio;mT?top=bottom-h:bottom=top+h}}else{let h=(right-left)/ratio;if(mT){if(top=bottom-h,top<0){top=0,h=bottom;const w=h*ratio;mL?left=right-w:right=left+w}}else if(bottom=top+h,bottom>natH){bottom=natH,h=bottom-top;const w=h*ratio;mL?left=right-w:right=left+w}}}this.cropX.set(Math.round(left)),this.cropY.set(Math.round(top)),this.cropWidth.set(Math.round(right-left)),this.cropHeight.set(Math.round(bottom-top))}emit(){const natW=this.naturalWidth(),natH=this.naturalHeight();0!==natW&&0!==natH&&this.cropChange.emit({x:this.cropX()/natW,y:this.cropY()/natH,width:this.cropWidth()/natW,height:this.cropHeight()/natH})}clamp(value,min,max){return Math.min(Math.max(value,min),max)}static ctorParameters=()=>[];static propDecorators={src:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"src",required:!1,transform:void 0}]}],aspectRatio:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"aspectRatio",required:!1,transform:void 0}]}],zoom:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"zoom",required:!1,transform:void 0}]}],cropChange:[{type:_debug_node_chunk.k7i,args:["cropChange"]}],preview:[{type:core.ViewChild,args:["preview",{isSignal:!0}]}],cropEl:[{type:core.ViewChild,args:["crop",{isSignal:!0}]}],frameEl:[{type:core.ViewChild,args:["frame",{isSignal:!0}]}]}};UiImageEditorCropBoxComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-image-editor-crop-box",template:'<div class="_stage">\n <div #frame class="_frame">\n <img\n #preview\n class="_image"\n [src]="src()"\n alt=""\n draggable="false"\n (load)="onImageLoad()"\n />\n\n @if (naturalWidth() > 0) {\n \x3c!-- Focusable: the crop is operable by keyboard — arrows pan,\n Shift+arrows resize — so it needs a tab stop and a name. --\x3e\n <div\n #crop\n class="_crop"\n tabindex="0"\n role="group"\n [attr.aria-label]="\'imageEditor.cropLabel\' | transloco"\n (keydown)="onKeydown($event)"\n (pointerdown)="onPointerDown($event, \'move\')"\n (pointermove)="onPointerMove($event)"\n (pointerup)="onPointerUp($event)"\n >\n @for (hnd of handles(); track hnd.cls) {\n <span\n class="_handle {{ hnd.cls }}"\n (pointerdown)="onPointerDown($event, hnd.h)"\n (pointermove)="onPointerMove($event)"\n (pointerup)="onPointerUp($event)"\n ></span>\n }\n </div>\n }\n </div>\n</div>\n',encapsulation:_debug_node_chunk.gXe.Emulated,imports:[ngneat_transloco.Kj],styles:[crop_box_componentngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiImageEditorCropBoxComponent);const UI_IMAGE_EDITOR_ACCEPTED_TYPES=["image/png","image/gif","image/jpeg"];let UiImageEditorComponent=class UiImageEditorComponent{variant=(0,core.input)("embedded");active=(0,core.input)(!1);imageUrl=(0,core.input)(null);aspectRatio=(0,core.input)(null);maxWidth=(0,core.input)(1200);quality=(0,core.input)(.75);maxFileSizeMb=(0,core.input)(10);headline=(0,core.input)(null);overlayDirection=(0,core.input)(null);overlayFitContent=(0,core.input)(!1);save=(0,core.output)();deleteImage=(0,core.output)();activeOutput=(0,core.output)();fileInput=(0,core.viewChild)("fileInput");sourceUrl=(0,_effect_chunk2.vPA)(null);crop=(0,_effect_chunk2.vPA)(null);busy=(0,_effect_chunk2.vPA)(!1);errorKey=(0,_effect_chunk2.vPA)(null);zoom=(0,_effect_chunk2.vPA)(100);working=null;stage=(0,_resource_chunk.EW)(()=>this.sourceUrl()?"crop":"view");hasImage=(0,_resource_chunk.EW)(()=>Boolean(this.imageUrl()));canDelete=(0,_resource_chunk.EW)(()=>this.hasImage());canEdit=(0,_resource_chunk.EW)(()=>this.hasImage()||"crop"===this.stage());canSave=(0,_resource_chunk.EW)(()=>"crop"===this.stage()&&!this.busy());acceptAttr=UI_IMAGE_EDITOR_ACCEPTED_TYPES.join(",");constructor(){(0,_effect_chunk2.QZP)(()=>{"overlay"!==this.variant()||this.active()||this.reset()})}openPicker(){this.errorKey.set(null),this.fileInput()?.nativeElement.click()}onFileSelected(event){var _this=this;return(0,asyncToGenerator.A)(function*(){const el=event.target,file=el.files?.[0];if(el.value="",!file)return;if(!UI_IMAGE_EDITOR_ACCEPTED_TYPES.includes(file.type))return void _this.errorKey.set("wrongType");if(file.size>1024*_this.maxFileSizeMb()*1024)return void _this.errorKey.set("tooBig");_this.errorKey.set(null),_this.revokeSource();const url=URL.createObjectURL(file),img=new Image;img.decoding="async",img.src=url;try{yield img.decode()}catch{return URL.revokeObjectURL(url),void _this.errorKey.set("wrongType")}_this.working=img,_this.crop.set(null),_this.sourceUrl.set(url)})()}openEdit(){var _this2=this;return(0,asyncToGenerator.A)(function*(){const url=_this2.imageUrl();if(!url)return;_this2.errorKey.set(null);const img=new Image;img.crossOrigin="anonymous",img.decoding="async",img.src=url;try{yield img.decode()}catch{}_this2.working=img,_this2.crop.set(null),_this2.sourceUrl.set(url)})()}onCropChange(rect){this.crop.set(rect)}toggleCrop(){"crop"!==this.stage()?this.hasImage()&&this.openEdit():this.leaveCrop()}leaveCrop(){this.revokeSource(),this.working=null,this.sourceUrl.set(null),this.crop.set(null)}onDelete(){this.deleteImage.emit(),this.requestClose()}runSave(){if(this.busy()||!this.working)return;this.busy.set(!0);const img=this.working,rect=this.crop()??{x:0,y:0,width:1,height:1},sx=rect.x*img.naturalWidth,sy=rect.y*img.naturalHeight,sw=Math.max(1,rect.width*img.naturalWidth),sh=Math.max(1,rect.height*img.naturalHeight),targetW=Math.round(Math.min(sw,this.maxWidth())),targetH=Math.round(sh*(targetW/sw)),canvas=document.createElement("canvas");canvas.width=targetW,canvas.height=targetH;const ctx=canvas.getContext("2d");ctx?(ctx.imageSmoothingQuality="high",ctx.fillStyle="#ffffff",ctx.fillRect(0,0,targetW,targetH),ctx.drawImage(img,sx,sy,sw,sh,0,0,targetW,targetH),canvas.toBlob(blob=>{this.busy.set(!1),blob&&(this.save.emit(blob),this.requestClose())},"image/jpeg",this.quality())):this.busy.set(!1)}onOverlayClose(){this.activeOutput.emit(!1)}requestClose(){"overlay"===this.variant()?this.activeOutput.emit(!1):this.reset()}reset(){this.revokeSource(),this.working=null,this.sourceUrl.set(null),this.crop.set(null),this.busy.set(!1),this.errorKey.set(null),this.zoom.set(100)}revokeSource(){const url=this.sourceUrl();url&&URL.revokeObjectURL(url)}static ctorParameters=()=>[];static propDecorators={variant:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"variant",required:!1,transform:void 0}]}],active:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"active",required:!1,transform:void 0}]}],imageUrl:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"imageUrl",required:!1,transform:void 0}]}],aspectRatio:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"aspectRatio",required:!1,transform:void 0}]}],maxWidth:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"maxWidth",required:!1,transform:void 0}]}],quality:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"quality",required:!1,transform:void 0}]}],maxFileSizeMb:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"maxFileSizeMb",required:!1,transform:void 0}]}],headline:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"headline",required:!1,transform:void 0}]}],overlayDirection:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"overlayDirection",required:!1,transform:void 0}]}],overlayFitContent:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"overlayFitContent",required:!1,transform:void 0}]}],save:[{type:_debug_node_chunk.k7i,args:["save"]}],deleteImage:[{type:_debug_node_chunk.k7i,args:["deleteImage"]}],activeOutput:[{type:_debug_node_chunk.k7i,args:["activeOutput"]}],fileInput:[{type:core.ViewChild,args:["fileInput",{isSignal:!0}]}]}};UiImageEditorComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-image-editor",template:'\x3c!-- Body and footer are defined once and projected into either presentation. --\x3e\n<ng-template #bodyTpl>\n @if (errorKey()) {\n <p class="_error">{{ \'imageEditor.errors.\' + errorKey() | transloco }}</p>\n }\n\n @if (stage() === \'crop\') {\n <ui-image-editor-crop-box\n [src]="sourceUrl() ?? \'\'"\n [aspectRatio]="aspectRatio()"\n [zoom]="zoom()"\n (cropChange)="onCropChange($event)"\n ></ui-image-editor-crop-box>\n <ui-slider class="_zoom" [label]="\'imageEditor.zoom\' | transloco">\n <input\n ui-tag\n type="range"\n class="ui"\n [min]="20"\n [max]="100"\n [step]="1"\n [ngModel]="zoom()"\n (ngModelChange)="zoom.set(+$event)"\n />\n </ui-slider>\n } @else {\n <div class="_view">\n @if (hasImage()) {\n <img class="_current" [src]="imageUrl()" alt="" />\n } @else {\n <div class="_empty">\n <span class="ui-icon x3">image</span>\n <p>{{ \'imageEditor.empty\' | transloco }}</p>\n </div>\n }\n </div>\n }\n\n <input\n #fileInput\n type="file"\n [accept]="acceptAttr"\n hidden\n (change)="onFileSelected($event)"\n />\n</ng-template>\n\n<ng-template #footerTpl>\n <button\n class="ui _upload"\n type="button"\n [title]="\'imageEditor.replace\' | transloco"\n [attr.aria-label]="\'imageEditor.replace\' | transloco"\n (click)="openPicker()"\n >\n <span class="ui-icon">add_a_photo</span>\n </button>\n \x3c!-- The crop stage is entered AND left here (tickets#284), and this button\n is never `disabled`: pressing it used to switch it off under the very\n focus that pressed it, and a disabled element is not focusable — the\n keyboard lost its place in an editor whose crop box is operated by\n keyboard. So it stays reachable and says its state instead\n (usage.md, "Disabled controls and the keyboard"). --\x3e\n <button\n class="ui _crop"\n type="button"\n [title]="\'imageEditor.edit\' | transloco"\n [attr.aria-label]="\'imageEditor.edit\' | transloco"\n [attr.aria-pressed]="stage() === \'crop\'"\n [attr.aria-disabled]="canEdit() ? null : \'true\'"\n (click)="toggleCrop()"\n >\n <span class="ui-icon">crop</span>\n </button>\n <button\n class="ui _delete"\n type="button"\n [title]="\'actions.delete\' | transloco"\n [attr.aria-label]="\'actions.delete\' | transloco"\n [disabled]="!canDelete()"\n (click)="onDelete()"\n >\n <span class="ui-icon">delete</span>\n </button>\n <button\n class="ui _save"\n type="button"\n [title]="\'actions.save\' | transloco"\n [attr.aria-label]="\'actions.save\' | transloco"\n [disabled]="!canSave()"\n (click)="runSave()"\n >\n <span class="ui-icon">save</span>\n </button>\n</ng-template>\n\n@if (variant() === \'overlay\') {\n \x3c!-- viewportHeight: a sheet belongs to the browser window, not to the\n document. Without it the percentage heights are resolved against a\n transformed ancestor\'s box — inside a long page that stretches the sheet\n to the full document height and pushes header and footer out of sight. --\x3e\n <ui-layout-overlay\n [active]="active()"\n [maxWidth]="\'ms-5\'"\n [viewportHeight]="true"\n [fitContent]="overlayFitContent()"\n [direction]="overlayDirection()"\n (activeOutput)="onOverlayClose()"\n >\n <ui-layout-overlay-header\n overlay-header\n [headline]="headline() ?? (\'imageEditor.title\' | transloco)"\n (activeOutput)="onOverlayClose()"\n ></ui-layout-overlay-header>\n\n <div overlay-content class="_body">\n <ng-container [ngTemplateOutlet]="bodyTpl"></ng-container>\n </div>\n\n <div overlay-footer class="_footer">\n <ng-container [ngTemplateOutlet]="footerTpl"></ng-container>\n </div>\n </ui-layout-overlay>\n} @else {\n <div class="_body">\n <ng-container [ngTemplateOutlet]="bodyTpl"></ng-container>\n </div>\n <div class="_footer">\n <ng-container [ngTemplateOutlet]="footerTpl"></ng-container>\n </div>\n}\n',encapsulation:_debug_node_chunk.gXe.Emulated,host:{"[class.embedded]":"variant() === 'embedded'"},imports:[fesm2022_forms.YN,_common_module_chunk.T3,ngneat_transloco.Kj,overlay_component.o,header_header_component.t,UiImageEditorCropBoxComponent,slider_component.H],styles:[image_editor_componentngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiImageEditorComponent);const image_editor_component_stories={title:"Molecules/Image Editor",component:UiImageEditorComponent,decorators:[(0,dist.L4)({providers:[]}),(0,dist.Iz)({imports:[header_component.b,UiImageEditorComponent]})],argTypes:{aspectRatio:{control:{type:"range",min:.5,max:3,step:.05}},maxWidth:{control:"number"},quality:{control:{type:"range",min:.1,max:1,step:.05}},maxFileSizeMb:{control:"number"}},parameters:{docs:{canvas:{sourceState:"none"}}}},embeddedTemplate='\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="flex max-w-2xl flex-col gap-4 p-4">\n <ui-image-editor\n [imageUrl]="imageUrl"\n [aspectRatio]="aspectRatio"\n (save)="onSave($event)"\n (deleteImage)="onDelete()"\n ></ui-image-editor>\n @if (resultUrl) {\n <img class="w-[12rem] rounded" [src]="resultUrl" alt="" />\n }\n </section>\n',props=imageUrl=>({active:!1,imageUrl,resultUrl:null,onSave(blob){this.resultUrl=URL.createObjectURL(blob)},onDelete(){this.imageUrl=null}}),WithImage={render:args=>({props:{...props("assets/ui/images/800x600.png"),...args},template:embeddedTemplate})},PosterRatio={args:{aspectRatio:2/3},render:args=>({props:{...props("assets/ui/images/800x600.png"),...args},template:embeddedTemplate})},Empty={render:args=>({props:{...props(null),...args},template:embeddedTemplate})},Overlay={render:args=>({props:{...props("assets/ui/images/800x600.png"),...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="flex w-fit flex-col gap-4 p-4">\n <button class="ui" (click)="active = true">\n <span class="ui-icon">edit</span>\n </button>\n @if (resultUrl) {\n <img class="w-[12rem] rounded" [src]="resultUrl" alt="" />\n }\n </section>\n <ui-image-editor\n variant="overlay"\n [active]="active"\n [imageUrl]="imageUrl"\n [aspectRatio]="aspectRatio"\n (save)="onSave($event)"\n (deleteImage)="onDelete()"\n (activeOutput)="active = $event"\n ></ui-image-editor>\n'})},__namedExportsOrder=["WithImage","PosterRatio","Empty","Overlay"];WithImage.parameters={...WithImage.parameters,docs:{...WithImage.parameters?.docs,source:{originalSource:"{\n render: args => ({\n props: {\n ...props(uiMoleculeImageEditorMock),\n ...args\n },\n template: embeddedTemplate\n })\n}",...WithImage.parameters?.docs?.source}}},PosterRatio.parameters={...PosterRatio.parameters,docs:{...PosterRatio.parameters?.docs,source:{originalSource:"{\n args: {\n aspectRatio: 2 / 3\n },\n render: args => ({\n props: {\n ...props(uiMoleculeImageEditorMock),\n ...args\n },\n template: embeddedTemplate\n })\n}",...PosterRatio.parameters?.docs?.source}}},Empty.parameters={...Empty.parameters,docs:{...Empty.parameters?.docs,source:{originalSource:"{\n render: args => ({\n props: {\n ...props(null),\n ...args\n },\n template: embeddedTemplate\n })\n}",...Empty.parameters?.docs?.source}}},Overlay.parameters={...Overlay.parameters,docs:{...Overlay.parameters?.docs,source:{originalSource:"{\n render: args => ({\n props: {\n ...props(uiMoleculeImageEditorMock),\n ...args\n },\n template: overlayTemplate\n })\n}",...Overlay.parameters?.docs?.source}}}},"./libs/ui/src/lib/molecules/image-editor/crop-box/crop-box.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: block;\n width: 100%;\n}\n\n/* Centers the frame; clips the zoomed image to the stage. The padding leaves\n room for the edge handles (which straddle the image border) so they render\n fully square instead of being cut off at 100% zoom. */\n._stage {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n /* The image caps the height (max-height below); the stage adds padding on top\n so it must NOT also cap at 60vh, or the padding gets clipped and the edge\n handles are cut off. */\n padding: calc(var(--ui-spacer) * 0.375);\n overflow: hidden;\n -webkit-user-select: none;\n user-select: none;\n touch-action: none;\n}\n\n/* Wraps the image and crop box so both scale together on zoom. Sizes to the\n image, and is the positioning context for the absolutely-placed crop box. */\n._frame {\n position: relative;\n display: inline-block;\n line-height: 0;\n transform-origin: center;\n}\n\n._image {\n display: block;\n max-width: 100%;\n max-height: 60vh;\n object-fit: contain;\n /* Honor EXIF orientation of camera photos. */\n image-orientation: from-image;\n -webkit-user-drag: none;\n}\n\n/* The crop rectangle. The huge spread box-shadow dims everything outside it. */\n._crop {\n position: absolute;\n box-sizing: border-box;\n border: var(--ui-border-width) solid var(--ui-c-static);\n box-shadow: 0 0 0 100vmax rgba(var(--ui-c-background-value), 0.6);\n cursor: move;\n touch-action: none;\n\n /* The crop is a tab stop (arrows pan, Shift+arrows resize). The ring is\n the house focus colour ON TOP of the backdrop shadow — the shadow list\n keeps the dimmed surround, the outline says where the keys will land. */\n &:focus-visible {\n outline: calc(var(--ui-border-width) * 2) solid var(--ui-c-focus);\n outline-offset: calc(var(--ui-border-width) * -1);\n }\n}\n\n/* Rule-of-thirds guides (decorative, non-interactive). */\n._crop::before,\n._crop::after {\n content: '';\n position: absolute;\n pointer-events: none;\n opacity: 0.4;\n}\n._crop::before {\n top: 0;\n bottom: 0;\n left: 33.333%;\n right: 33.333%;\n border-left: 1px solid var(--ui-c-static);\n border-right: 1px solid var(--ui-c-static);\n}\n._crop::after {\n left: 0;\n right: 0;\n top: 33.333%;\n bottom: 33.333%;\n border-top: 1px solid var(--ui-c-static);\n border-bottom: 1px solid var(--ui-c-static);\n}\n\n._handle {\n position: absolute;\n width: calc(var(--ui-spacer) * 0.5);\n height: calc(var(--ui-spacer) * 0.5);\n background-color: var(--ui-c-static);\n border: 1px solid rgba(var(--ui-c-background-value), 0.8);\n touch-action: none;\n}\n\n._handle._nw {\n top: calc(var(--ui-spacer) * -0.25);\n left: calc(var(--ui-spacer) * -0.25);\n cursor: nwse-resize;\n}\n._handle._ne {\n top: calc(var(--ui-spacer) * -0.25);\n right: calc(var(--ui-spacer) * -0.25);\n cursor: nesw-resize;\n}\n._handle._sw {\n bottom: calc(var(--ui-spacer) * -0.25);\n left: calc(var(--ui-spacer) * -0.25);\n cursor: nesw-resize;\n}\n._handle._se {\n bottom: calc(var(--ui-spacer) * -0.25);\n right: calc(var(--ui-spacer) * -0.25);\n cursor: nwse-resize;\n}\n\n/* Edge midpoint handles. */\n._handle._n {\n top: calc(var(--ui-spacer) * -0.25);\n left: 50%;\n transform: translateX(-50%);\n cursor: ns-resize;\n}\n._handle._s {\n bottom: calc(var(--ui-spacer) * -0.25);\n left: 50%;\n transform: translateX(-50%);\n cursor: ns-resize;\n}\n._handle._w {\n left: calc(var(--ui-spacer) * -0.25);\n top: 50%;\n transform: translateY(-50%);\n cursor: ew-resize;\n}\n._handle._e {\n right: calc(var(--ui-spacer) * -0.25);\n top: 50%;\n transform: translateY(-50%);\n cursor: ew-resize;\n}\n\n/* Centre grip: pans the whole box; rounded to read as a move target. */\n._handle._center {\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n cursor: move;\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/molecules/image-editor/image-editor.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: contents;\n}\n\n/* Embedded variant: a normal block in the document flow. It fills the width it\n is given — the maximum width is set by the consumer from outside; the\n minimum emerges from the footer button row (flex-wrap as safety net). */\n:host(.embedded) {\n display: flex;\n flex-direction: column;\n gap: calc(var(--ui-spacer) * 0.5);\n width: 100%;\n}\n\n/* Embedded: no overlay edge to align to — the buttons sit centered. */\n:host(.embedded) ._footer {\n justify-content: center;\n}\n\n._body {\n display: flex;\n flex-direction: column;\n gap: calc(var(--ui-spacer) * 0.5);\n width: 100%;\n}\n\n/* Rejection notice (wrong type / too big) — filled warn box like the app errors. */\n._error {\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/* View mode: current cover or an empty placeholder. */\n._view {\n display: flex;\n justify-content: center;\n}\n\n._current {\n display: block;\n max-width: 100%;\n max-height: 60vh;\n object-fit: contain;\n border-radius: var(--ui-border-radius);\n image-orientation: from-image;\n}\n\n._empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n /* Centred in a placeholder area that keeps some surface: without a minimum\n the editor collapses to a flat strip when there is no image yet, which\n looks broken next to the same editor holding a picture. Consumers can\n give it a concrete shape (e.g. an aspect-ratio) on top of this. */\n justify-content: center;\n min-height: 16rem;\n gap: calc(var(--ui-spacer) * 0.25);\n padding: calc(var(--ui-spacer) * 2);\n color: var(--ui-c-default);\n opacity: 0.6;\n}\n\n._empty p {\n margin: 0;\n}\n\n/* Footer button row, right-aligned like the overlay Save example. */\n._footer {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: calc(var(--ui-spacer) * 0.5);\n width: 100%;\n}\n\n._footer button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Keep the grey surface identical when disabled (the base :disabled style swaps\n it for the page background); the disabled state is signalled by dimming just\n the icon, in its normal colour.\n The base :disabled rule pairs that surface swap with `color: --ui-c-fourthly`\n for the text. Restoring only the background — to the same --ui-c-fourthly the\n grey surface uses — would leave the icon tinted the exact colour it sits on,\n so it disappears (tickets#247). Restore the icon's normal colour as well; the\n per-action tints below (delete red, save green while active) still override\n it, and `opacity` alone carries the \"disabled\" signal. */\n/* A control that may not act right now is muted, not switched off — the\n crop toggle carries `aria-disabled` instead of `disabled` so the keyboard\n keeps its place on it (tickets#284). Both spellings look the same, or the\n rule would cost the reader a cue. */\n._footer button:disabled,\n._footer button[aria-disabled='true'] {\n background-color: var(--ui-c-fourthly);\n color: var(--ui-c-default);\n}\n._footer button:disabled .ui-icon,\n._footer button[aria-disabled='true'] .ui-icon {\n opacity: 0.4;\n}\n\n/* Grey buttons (the base `.ui` surface); only delete and save are tinted per\n action using the shared design tokens — upload, crop and cancel stay neutral. */\n._footer ._delete .ui-icon {\n color: var(--ui-c-error);\n}\n/* Green only while the save action is available; disabled falls back to the\n neutral (dimmed) icon colour. */\n._footer ._save:not(:disabled) .ui-icon {\n color: var(--ui-c-success);\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
package/storybook/project.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1787695640950,"userSince":1772191366759,"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"knownPackages":{"testPackages":{"@ngneat/spectator":"22.1.0","@playwright/test":"1.61.1","@vitest/coverage-v8":"4.1.10","vitest":"4.1.10"},"stylingPackages":{"tailwindcss":"^4.3.2"}},"hasRouterPackage":true,"monorepo":"Nx","packageManager":{"type":"npm","agent":"npm","nodeLinker":"node_modules"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/angular","options":{}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/angular","portableStoriesFileCount":0,"applicationFileCount":6,"storybookVersion":"10.4.6","storybookVersionSpecifier":"^10.4.6","language":"typescript","storybookPackages":{"@nx/storybook":{"version":"23.0.1"},"@storybook/angular":{"version":"10.4.6"},"eslint-plugin-storybook":{"version":"10.4.6"},"storybook":{}},"addons":{"@storybook/addon-docs":{"version":"10.4.6"}},"packageJsonType":"unknown"}
|
package/storybook/{runtime~main.53ef982c.iframe.bundle.js → runtime~main.52ba2f02.iframe.bundle.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var deferred,leafPrototypes,getProto,inProgress,__webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},deferred=[],__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(!chunkIds){var notFulfilled=1/0;for(i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(!1&priority||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority]},__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode)return value;if("object"==typeof value&&value){if(4&mode&&value.__esModule)return value;if(16&mode&&"function"==typeof value.then)return value}var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;("object"==typeof current||"function"==typeof current)&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises),[])),__webpack_require__.u=chunkId=>(({128:"home-overview-mdx",166:"forms-autofocus-docs-mdx",365:"layout-spinner-docs-mdx",943:"examples-image-grid-slider-docs-mdx",947:"layout-splitter-docs-mdx",977:"forms-switch-docs-mdx",1043:"layout-spinner-spinner-component-stories",1165:"styling-tags-tags-component-stories",1296:"examples-docs-mdx",1322:"atoms-_electrons-form-error-message-form-error-message-component-stories",1327:"cdk-components-drag-and-drop-splitter-docs-mdx",1365:"_external-mwork-music-player-mwork-music-player-stories",1461:"atoms-image-slider-image-slider-component-stories",1481:"examples-layout-docs-mdx",1686:"forms-input-input-component-stories",1809:"atoms-clock-clock-component-stories",1838:"styling-colors-docs-mdx",1860:"forms-autocomplete-autocomplete-component-stories",1927:"styling-tags-docs-mdx",1954:"atoms-mosaic-docs-mdx",1977:"styling-forms-forms-component-stories",2006:"atoms-background-docs-mdx",2074:"atoms-_electrons-form-error-message-docs-mdx",2168:"layout-overlay-docs-mdx",2193:"atoms-qr-code-docs-mdx",2379:"_external-mwork-basic-interpreter-mwork-basic-interpreter-stories",2425:"atoms-chart-chart-component-stories",2831:"atoms-mosaic-mosaic-component-stories",2960:"atoms-lang-selector-docs-mdx",3007:"atoms-copy-value-docs-mdx",3045:"atoms-placeholder-placeholder-component-stories",3048:"forms-switch-switch-component-stories",3073:"layout-top-scroll-bottom-docs-mdx",3143:"home-tips-mdx",3146:"atoms-image-grid-docs-mdx",3151:"layout-media-screen-docs-mdx",3190:"molecules-image-editor-docs-mdx",3260:"_external-mwork-music-player-docs-mdx",3277:"atoms-lang-selector-lang-selector-component-stories",3338:"styling-ui-tags-docs-mdx",3550:"atoms-reader-doc-docs-mdx",3651:"layout-media-screen-media-screen-component-stories",3678:"forms-checkbox-checkbox-component-stories",3685:"atoms-rating-rating-component-stories",3752:"_external-mwork-basic-interpreter-docs-mdx",3767:"home-guide-mdx",3837:"layout-main-docs-mdx",3842:"home-usage-mdx",3853:"atoms-copy-value-copy-value-component-stories",3857:"styling-forms-docs-mdx",3925:"atoms-thumb-thumb-component-stories",3999:"atoms-reader-doc-reader-doc-component-stories",4067:"atoms-text-animate-docs-mdx",4271:"cdk-components-drag-and-drop-splitter-splitter-component-stories",4320:"atoms-buzzer-docs-mdx",4365:"atoms-qr-code-qr-code-component-stories",4447:"atoms-timer-docs-mdx",4713:"atoms-typewriter-typewriter-component-stories",4806:"atoms-typewriter-docs-mdx",4855:"atoms-background-background-component-stories",4939:"forms-input-docs-mdx",4947:"atoms-card-card-component-stories",5084:"atoms-clock-docs-mdx",5233:"styling-ui-tags-ui-tags-component-stories",5370:"atoms-thumb-docs-mdx",5493:"examples-table-edit-focus-docs-mdx",5684:"examples-layout-layout-stories",5995:"styling-colors-colors-component-stories",6189:"atoms-timer-timer-component-stories",6203:"atoms-placeholder-docs-mdx",6212:"cdk-components-table-table-component-stories",6252:"forms-slider-docs-mdx",6331:"layout-splitter-splitter-component-stories",6354:"forms-validators-validators-component-stories",6501:"_external-mwork-banner-docs-mdx",6569:"cdk-components-table-docs-mdx",6659:"layout-overlay-overlay-component-stories",6768:"examples-transloco-docs-mdx",6892:"layout-tabs-docs-mdx",6922:"forms-slider-slider-component-stories",6978:"atoms-chart-docs-mdx",7419:"atoms-buzzer-buzzer-component-stories",7586:"forms-validators-docs-mdx",7600:"styling-layers-docs-mdx",7653:"styling-icons-icons-component-stories",7683:"layout-main-main-component-stories",7819:"atoms-rating-docs-mdx",7837:"forms-autocomplete-docs-mdx",7867:"_external-mwork-banner-mwork-banner-stories",7877:"atoms-text-animate-text-animate-component-stories",7893:"styling-css-variables-docs-mdx",7947:"atoms-image-slider-docs-mdx",8039:"atoms-image-grid-image-grid-component-stories",8092:"styling-icons-docs-mdx",8108:"forms-checkbox-docs-mdx",8180:"molecules-image-editor-image-editor-component-stories",8753:"layout-tabs-tabs-component-stories",8852:"atoms-card-docs-mdx",8938:"examples-image-grid-slider-image-grid-slider-stories",9042:"layout-overlay-header-docs-mdx",9044:"examples-transloco-transloco-component-stories",9217:"atoms-barcode-barcode-component-stories",9236:"forms-autofocus-autofocus-stories",9240:"layout-overlay-header-header-component-stories",9475:"layout-nav-nav-component-stories",9652:"examples-burger-menu-stories",9653:"layout-nav-docs-mdx",9779:"layout-top-scroll-bottom-top-scroll-bottom-component-stories",9836:"examples-table-edit-focus-table-edit-focus-stories",9918:"atoms-barcode-docs-mdx"}[chunkId]||chunkId)+"."+{128:"53475252",166:"39611362",365:"4be572c0",660:"18f0458e",813:"805c1e5f",871:"428deceb",943:"9e38157e",947:"bf161b39",973:"67f44bb0",977:"9d58a341",1043:"ab8245c6",1165:"7a64bd20",1183:"da25800b",1255:"2abec879",1296:"3111f2c6",1322:"7f749acc",1327:"f12088fd",1365:"08fbf651",1461:"484b9c41",1481:"bbacdfd2",1516:"52d2dae7",1686:"609db3f0",1809:"d1464731",1838:"95c504e4",1860:"443544e0",1927:"23ab2316",1954:"1aebfbdf",1977:"8af76278",2006:"4f102c17",2033:"c705a7ce",2074:"5b9e78fe",2089:"32694489",2096:"431fc8f5",2127:"29f153d2",2168:"823351e0",2193:"4202568d",2228:"77650ef1",2249:"6e6782ab",2379:"3252a9b8",2425:"5247b7cb",2639:"29baa8af",2831:"0a6bc043",2844:"c9f47654",2960:"a327a27f",2971:"edb202b4",3007:"f404dcd2",3045:"bc221534",3048:"bf67d7c9",3073:"ddc061f8",3143:"26df81d8",3146:"18b4df2a",3151:"b0ca9a06",3190:"119ea12a",3260:"6f943768",3277:"41d7efd1",3338:"8f75631d",3550:"0688c3b9",3651:"7941c064",3678:"d45b4f0d",3685:"982db47d",3752:"03c6205c",3767:"1a176b15",3837:"4c9208c5",3842:"fc05feec",3853:"58d3956a",3857:"943e72f2",3899:"55560628",3925:"06f51d03",3968:"69b812e4",3999:"a6fec57d",4067:"05e1baf4",4255:"eeeaf087",4271:"286b5171",4320:"23eb1913",4365:"5018e2b0",4425:"368129b3",4447:"6f724cc8",4476:"f8e4115f",4495:"d1c8cc8d",4555:"2fc72918",4713:"4fefc019",4806:"3b1088c0",4855:"b6b50c0c",4935:"8959522b",4939:"72d0e99a",4947:"065b34e9",5084:"501e6780",5233:"2ec3109b",5370:"2143ad01",5493:"3c0d1611",5568:"c6172f92",5684:"05cd891f",5944:"810cb147",5995:"58031f40",6115:"7f1470ef",6169:"eaeed989",6189:"9bee1037",6202:"b8ca0e90",6203:"cd2f3976",6212:"db9212fd",6252:"120cefc6",6331:"46b8b112",6354:"9525f97b",6501:"0d5549a0",6569:"cc2c11e7",6659:"01f6cd84",6768:"97df7022",6824:"f5eb8bb7",6892:"89d83606",6922:"058fb9b1",6978:"204609d4",7316:"5b024e94",7419:"13ee130d",7586:"ebb47a43",7600:"a563260e",7653:"2dd8c6f8",7683:"788c0c54",7749:"2a853795",7819:"32fa4104",7837:"09beba1b",7867:"d44f6917",7877:"8041c0f1",7893:"48afb4f3",7947:"c616bb37",8039:"a0a92d9e",8051:"719eb790",8092:"e1001dfd",8108:"74036eb7",8180:"56467f17",8448:"1baeb046",8753:"8602cefa",8819:"220ca21d",8852:"7d276114",8938:"028c8c2b",9042:"394033ca",9044:"5baea2e2",9045:"a50616e9",9217:"dc462559",9236:"2e94d887",9240:"5eaef192",9475:"766738fc",9560:"668052f3",9652:"0a083a75",9653:"cc919f94",9779:"9ee7055f",9836:"c79e214a",9850:"28367747",9918:"b74c501b",9946:"36014b4e"}[chunkId]+".iframe.bundle.js"),__webpack_require__.miniCssF=chunkId=>{},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),inProgress={},__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url])inProgress[url].push(done);else{var script,needAttach;if(void 0!==key)for(var scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")=="moja-work:"+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack","moja-work:"+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach(fn=>fn(event)),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}},__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.p="",(()=>{var installedChunks={5354:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData)if(installedChunkData)promises.push(installedChunkData[2]);else if(5354!=chunkId){var promise=new Promise((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]);promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=new Error;__webpack_require__.l(url,event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}},"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,[chunkIds,moreModules,runtime]=data,i=0;if(chunkIds.some(id=>0!==installedChunks[id])){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunkmoja_work=self.webpackChunkmoja_work||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
|
|
1
|
+
(()=>{"use strict";var deferred,leafPrototypes,getProto,inProgress,__webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},deferred=[],__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(!chunkIds){var notFulfilled=1/0;for(i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(!1&priority||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority]},__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode)return value;if("object"==typeof value&&value){if(4&mode&&value.__esModule)return value;if(16&mode&&"function"==typeof value.then)return value}var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;("object"==typeof current||"function"==typeof current)&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises),[])),__webpack_require__.u=chunkId=>(({128:"home-overview-mdx",166:"forms-autofocus-docs-mdx",365:"layout-spinner-docs-mdx",943:"examples-image-grid-slider-docs-mdx",947:"layout-splitter-docs-mdx",977:"forms-switch-docs-mdx",1043:"layout-spinner-spinner-component-stories",1165:"styling-tags-tags-component-stories",1296:"examples-docs-mdx",1322:"atoms-_electrons-form-error-message-form-error-message-component-stories",1327:"cdk-components-drag-and-drop-splitter-docs-mdx",1365:"_external-mwork-music-player-mwork-music-player-stories",1461:"atoms-image-slider-image-slider-component-stories",1481:"examples-layout-docs-mdx",1686:"forms-input-input-component-stories",1809:"atoms-clock-clock-component-stories",1838:"styling-colors-docs-mdx",1860:"forms-autocomplete-autocomplete-component-stories",1927:"styling-tags-docs-mdx",1954:"atoms-mosaic-docs-mdx",1977:"styling-forms-forms-component-stories",2006:"atoms-background-docs-mdx",2074:"atoms-_electrons-form-error-message-docs-mdx",2168:"layout-overlay-docs-mdx",2193:"atoms-qr-code-docs-mdx",2379:"_external-mwork-basic-interpreter-mwork-basic-interpreter-stories",2425:"atoms-chart-chart-component-stories",2831:"atoms-mosaic-mosaic-component-stories",2960:"atoms-lang-selector-docs-mdx",3007:"atoms-copy-value-docs-mdx",3045:"atoms-placeholder-placeholder-component-stories",3048:"forms-switch-switch-component-stories",3073:"layout-top-scroll-bottom-docs-mdx",3143:"home-tips-mdx",3146:"atoms-image-grid-docs-mdx",3151:"layout-media-screen-docs-mdx",3190:"molecules-image-editor-docs-mdx",3260:"_external-mwork-music-player-docs-mdx",3277:"atoms-lang-selector-lang-selector-component-stories",3338:"styling-ui-tags-docs-mdx",3550:"atoms-reader-doc-docs-mdx",3651:"layout-media-screen-media-screen-component-stories",3678:"forms-checkbox-checkbox-component-stories",3685:"atoms-rating-rating-component-stories",3752:"_external-mwork-basic-interpreter-docs-mdx",3767:"home-guide-mdx",3837:"layout-main-docs-mdx",3842:"home-usage-mdx",3853:"atoms-copy-value-copy-value-component-stories",3857:"styling-forms-docs-mdx",3925:"atoms-thumb-thumb-component-stories",3999:"atoms-reader-doc-reader-doc-component-stories",4067:"atoms-text-animate-docs-mdx",4271:"cdk-components-drag-and-drop-splitter-splitter-component-stories",4320:"atoms-buzzer-docs-mdx",4365:"atoms-qr-code-qr-code-component-stories",4447:"atoms-timer-docs-mdx",4713:"atoms-typewriter-typewriter-component-stories",4806:"atoms-typewriter-docs-mdx",4855:"atoms-background-background-component-stories",4939:"forms-input-docs-mdx",4947:"atoms-card-card-component-stories",5084:"atoms-clock-docs-mdx",5233:"styling-ui-tags-ui-tags-component-stories",5370:"atoms-thumb-docs-mdx",5493:"examples-table-edit-focus-docs-mdx",5684:"examples-layout-layout-stories",5995:"styling-colors-colors-component-stories",6189:"atoms-timer-timer-component-stories",6203:"atoms-placeholder-docs-mdx",6212:"cdk-components-table-table-component-stories",6252:"forms-slider-docs-mdx",6331:"layout-splitter-splitter-component-stories",6354:"forms-validators-validators-component-stories",6501:"_external-mwork-banner-docs-mdx",6569:"cdk-components-table-docs-mdx",6659:"layout-overlay-overlay-component-stories",6768:"examples-transloco-docs-mdx",6892:"layout-tabs-docs-mdx",6922:"forms-slider-slider-component-stories",6978:"atoms-chart-docs-mdx",7419:"atoms-buzzer-buzzer-component-stories",7586:"forms-validators-docs-mdx",7600:"styling-layers-docs-mdx",7653:"styling-icons-icons-component-stories",7683:"layout-main-main-component-stories",7819:"atoms-rating-docs-mdx",7837:"forms-autocomplete-docs-mdx",7867:"_external-mwork-banner-mwork-banner-stories",7877:"atoms-text-animate-text-animate-component-stories",7893:"styling-css-variables-docs-mdx",7947:"atoms-image-slider-docs-mdx",8039:"atoms-image-grid-image-grid-component-stories",8092:"styling-icons-docs-mdx",8108:"forms-checkbox-docs-mdx",8180:"molecules-image-editor-image-editor-component-stories",8753:"layout-tabs-tabs-component-stories",8852:"atoms-card-docs-mdx",8938:"examples-image-grid-slider-image-grid-slider-stories",9042:"layout-overlay-header-docs-mdx",9044:"examples-transloco-transloco-component-stories",9217:"atoms-barcode-barcode-component-stories",9236:"forms-autofocus-autofocus-stories",9240:"layout-overlay-header-header-component-stories",9475:"layout-nav-nav-component-stories",9652:"examples-burger-menu-stories",9653:"layout-nav-docs-mdx",9779:"layout-top-scroll-bottom-top-scroll-bottom-component-stories",9836:"examples-table-edit-focus-table-edit-focus-stories",9918:"atoms-barcode-docs-mdx"}[chunkId]||chunkId)+"."+{128:"0d4ede52",166:"39611362",365:"4be572c0",660:"18f0458e",813:"805c1e5f",871:"428deceb",943:"9e38157e",947:"bf161b39",973:"67f44bb0",977:"9d58a341",1043:"ab8245c6",1165:"7a64bd20",1183:"da25800b",1255:"2abec879",1296:"3111f2c6",1322:"7f749acc",1327:"f12088fd",1365:"08fbf651",1461:"484b9c41",1481:"bbacdfd2",1516:"52d2dae7",1686:"609db3f0",1809:"d1464731",1838:"95c504e4",1860:"443544e0",1927:"23ab2316",1954:"1aebfbdf",1977:"8af76278",2006:"4f102c17",2033:"c705a7ce",2074:"5b9e78fe",2089:"32694489",2096:"431fc8f5",2127:"29f153d2",2168:"823351e0",2193:"4202568d",2228:"77650ef1",2249:"6e6782ab",2379:"3252a9b8",2425:"5247b7cb",2639:"29baa8af",2831:"0a6bc043",2844:"c9f47654",2960:"a327a27f",2971:"edb202b4",3007:"f404dcd2",3045:"bc221534",3048:"bf67d7c9",3073:"ddc061f8",3143:"26df81d8",3146:"18b4df2a",3151:"b0ca9a06",3190:"805dcd5a",3260:"6f943768",3277:"41d7efd1",3338:"8f75631d",3550:"0688c3b9",3651:"7941c064",3678:"d45b4f0d",3685:"982db47d",3752:"03c6205c",3767:"1a176b15",3837:"4c9208c5",3842:"fc05feec",3853:"58d3956a",3857:"943e72f2",3899:"55560628",3925:"06f51d03",3968:"69b812e4",3999:"a6fec57d",4067:"05e1baf4",4255:"eeeaf087",4271:"286b5171",4320:"23eb1913",4365:"5018e2b0",4425:"368129b3",4447:"6f724cc8",4476:"f8e4115f",4495:"d1c8cc8d",4555:"251b232c",4713:"4fefc019",4806:"3b1088c0",4855:"b6b50c0c",4935:"8959522b",4939:"72d0e99a",4947:"065b34e9",5084:"501e6780",5233:"2ec3109b",5370:"2143ad01",5493:"3c0d1611",5568:"c6172f92",5684:"05cd891f",5944:"810cb147",5995:"58031f40",6115:"7f1470ef",6169:"eaeed989",6189:"9bee1037",6202:"b8ca0e90",6203:"cd2f3976",6212:"db9212fd",6252:"120cefc6",6331:"46b8b112",6354:"9525f97b",6501:"0d5549a0",6569:"cc2c11e7",6659:"01f6cd84",6768:"97df7022",6824:"f5eb8bb7",6892:"89d83606",6922:"058fb9b1",6978:"204609d4",7316:"5b024e94",7419:"13ee130d",7586:"ebb47a43",7600:"a563260e",7653:"2dd8c6f8",7683:"788c0c54",7749:"2a853795",7819:"32fa4104",7837:"09beba1b",7867:"d44f6917",7877:"8041c0f1",7893:"48afb4f3",7947:"c616bb37",8039:"a0a92d9e",8051:"719eb790",8092:"e1001dfd",8108:"74036eb7",8180:"fbfeff1b",8448:"1baeb046",8753:"8602cefa",8819:"220ca21d",8852:"7d276114",8938:"028c8c2b",9042:"394033ca",9044:"5baea2e2",9045:"a50616e9",9217:"dc462559",9236:"2e94d887",9240:"5eaef192",9475:"766738fc",9560:"668052f3",9652:"0a083a75",9653:"cc919f94",9779:"9ee7055f",9836:"c79e214a",9850:"28367747",9918:"b74c501b",9946:"36014b4e"}[chunkId]+".iframe.bundle.js"),__webpack_require__.miniCssF=chunkId=>{},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),inProgress={},__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url])inProgress[url].push(done);else{var script,needAttach;if(void 0!==key)for(var scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")=="moja-work:"+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack","moja-work:"+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach(fn=>fn(event)),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}},__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.p="",(()=>{var installedChunks={5354:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData)if(installedChunkData)promises.push(installedChunkData[2]);else if(5354!=chunkId){var promise=new Promise((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]);promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=new Error;__webpack_require__.l(url,event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}},"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,[chunkIds,moreModules,runtime]=data,i=0;if(chunkIds.some(id=>0!==installedChunks[id])){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunkmoja_work=self.webpackChunkmoja_work||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
|
package/storybook/version.json
CHANGED
package/version.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[4555],{"./libs/ui/guide sync \\.json$"(module,__unused_webpack_exports,__webpack_require__){var map={"./app-shell.json":"./libs/ui/guide/app-shell.json","./burger-menu.json":"./libs/ui/guide/burger-menu.json","./form-basics.json":"./libs/ui/guide/form-basics.json","./image-gallery.json":"./libs/ui/guide/image-gallery.json","./table-edit-focus.json":"./libs/ui/guide/table-edit-focus.json","./translations.json":"./libs/ui/guide/translations.json","./ui-autocomplete.json":"./libs/ui/guide/ui-autocomplete.json","./ui-background.json":"./libs/ui/guide/ui-background.json","./ui-barcode.json":"./libs/ui/guide/ui-barcode.json","./ui-buzzer.json":"./libs/ui/guide/ui-buzzer.json","./ui-card.json":"./libs/ui/guide/ui-card.json","./ui-cdk-drag-drop-splitter.json":"./libs/ui/guide/ui-cdk-drag-drop-splitter.json","./ui-cdk-table-wrapper.json":"./libs/ui/guide/ui-cdk-table-wrapper.json","./ui-chart.json":"./libs/ui/guide/ui-chart.json","./ui-checkbox.json":"./libs/ui/guide/ui-checkbox.json","./ui-clock.json":"./libs/ui/guide/ui-clock.json","./ui-copy-value.json":"./libs/ui/guide/ui-copy-value.json","./ui-image-editor.json":"./libs/ui/guide/ui-image-editor.json","./ui-image-grid.json":"./libs/ui/guide/ui-image-grid.json","./ui-image-slider.json":"./libs/ui/guide/ui-image-slider.json","./ui-input.json":"./libs/ui/guide/ui-input.json","./ui-lang-selector.json":"./libs/ui/guide/ui-lang-selector.json","./ui-layout-main.json":"./libs/ui/guide/ui-layout-main.json","./ui-layout-media-screen.json":"./libs/ui/guide/ui-layout-media-screen.json","./ui-layout-nav.json":"./libs/ui/guide/ui-layout-nav.json","./ui-layout-overlay-header.json":"./libs/ui/guide/ui-layout-overlay-header.json","./ui-layout-overlay.json":"./libs/ui/guide/ui-layout-overlay.json","./ui-layout-spinner.json":"./libs/ui/guide/ui-layout-spinner.json","./ui-layout-splitter.json":"./libs/ui/guide/ui-layout-splitter.json","./ui-layout-tabs.json":"./libs/ui/guide/ui-layout-tabs.json","./ui-layout-top-scroll-bottom.json":"./libs/ui/guide/ui-layout-top-scroll-bottom.json","./ui-mosaic.json":"./libs/ui/guide/ui-mosaic.json","./ui-placeholder.json":"./libs/ui/guide/ui-placeholder.json","./ui-qr-code.json":"./libs/ui/guide/ui-qr-code.json","./ui-rating.json":"./libs/ui/guide/ui-rating.json","./ui-reader-doc.json":"./libs/ui/guide/ui-reader-doc.json","./ui-slider.json":"./libs/ui/guide/ui-slider.json","./ui-switch.json":"./libs/ui/guide/ui-switch.json","./ui-text-animate.json":"./libs/ui/guide/ui-text-animate.json","./ui-thumb.json":"./libs/ui/guide/ui-thumb.json","./ui-timer.json":"./libs/ui/guide/ui-timer.json","./ui-typewriter.json":"./libs/ui/guide/ui-typewriter.json","libs/ui/guide/app-shell.json":"./libs/ui/guide/app-shell.json","libs/ui/guide/burger-menu.json":"./libs/ui/guide/burger-menu.json","libs/ui/guide/form-basics.json":"./libs/ui/guide/form-basics.json","libs/ui/guide/image-gallery.json":"./libs/ui/guide/image-gallery.json","libs/ui/guide/table-edit-focus.json":"./libs/ui/guide/table-edit-focus.json","libs/ui/guide/translations.json":"./libs/ui/guide/translations.json","libs/ui/guide/ui-autocomplete.json":"./libs/ui/guide/ui-autocomplete.json","libs/ui/guide/ui-background.json":"./libs/ui/guide/ui-background.json","libs/ui/guide/ui-barcode.json":"./libs/ui/guide/ui-barcode.json","libs/ui/guide/ui-buzzer.json":"./libs/ui/guide/ui-buzzer.json","libs/ui/guide/ui-card.json":"./libs/ui/guide/ui-card.json","libs/ui/guide/ui-cdk-drag-drop-splitter.json":"./libs/ui/guide/ui-cdk-drag-drop-splitter.json","libs/ui/guide/ui-cdk-table-wrapper.json":"./libs/ui/guide/ui-cdk-table-wrapper.json","libs/ui/guide/ui-chart.json":"./libs/ui/guide/ui-chart.json","libs/ui/guide/ui-checkbox.json":"./libs/ui/guide/ui-checkbox.json","libs/ui/guide/ui-clock.json":"./libs/ui/guide/ui-clock.json","libs/ui/guide/ui-copy-value.json":"./libs/ui/guide/ui-copy-value.json","libs/ui/guide/ui-image-editor.json":"./libs/ui/guide/ui-image-editor.json","libs/ui/guide/ui-image-grid.json":"./libs/ui/guide/ui-image-grid.json","libs/ui/guide/ui-image-slider.json":"./libs/ui/guide/ui-image-slider.json","libs/ui/guide/ui-input.json":"./libs/ui/guide/ui-input.json","libs/ui/guide/ui-lang-selector.json":"./libs/ui/guide/ui-lang-selector.json","libs/ui/guide/ui-layout-main.json":"./libs/ui/guide/ui-layout-main.json","libs/ui/guide/ui-layout-media-screen.json":"./libs/ui/guide/ui-layout-media-screen.json","libs/ui/guide/ui-layout-nav.json":"./libs/ui/guide/ui-layout-nav.json","libs/ui/guide/ui-layout-overlay-header.json":"./libs/ui/guide/ui-layout-overlay-header.json","libs/ui/guide/ui-layout-overlay.json":"./libs/ui/guide/ui-layout-overlay.json","libs/ui/guide/ui-layout-spinner.json":"./libs/ui/guide/ui-layout-spinner.json","libs/ui/guide/ui-layout-splitter.json":"./libs/ui/guide/ui-layout-splitter.json","libs/ui/guide/ui-layout-tabs.json":"./libs/ui/guide/ui-layout-tabs.json","libs/ui/guide/ui-layout-top-scroll-bottom.json":"./libs/ui/guide/ui-layout-top-scroll-bottom.json","libs/ui/guide/ui-mosaic.json":"./libs/ui/guide/ui-mosaic.json","libs/ui/guide/ui-placeholder.json":"./libs/ui/guide/ui-placeholder.json","libs/ui/guide/ui-qr-code.json":"./libs/ui/guide/ui-qr-code.json","libs/ui/guide/ui-rating.json":"./libs/ui/guide/ui-rating.json","libs/ui/guide/ui-reader-doc.json":"./libs/ui/guide/ui-reader-doc.json","libs/ui/guide/ui-slider.json":"./libs/ui/guide/ui-slider.json","libs/ui/guide/ui-switch.json":"./libs/ui/guide/ui-switch.json","libs/ui/guide/ui-text-animate.json":"./libs/ui/guide/ui-text-animate.json","libs/ui/guide/ui-thumb.json":"./libs/ui/guide/ui-thumb.json","libs/ui/guide/ui-timer.json":"./libs/ui/guide/ui-timer.json","libs/ui/guide/ui-typewriter.json":"./libs/ui/guide/ui-typewriter.json"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./libs/ui/guide sync \\.json$"},"./libs/ui/.storybook/blocks/guide.entries.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>guideEntries});const context=__webpack_require__("./libs/ui/guide sync \\.json$"),guideEntries=context.keys().filter(key=>key.startsWith("./")).map(key=>{const entry=context(key);return entry.default??entry});if(0===guideEntries.length)throw new Error("guide: libs/ui/guide/ holds no entries — an empty guide is a generator bug, not an empty page.");const subjects=guideEntries.map(e=>e.component??e.situation),twice=subjects.find((s,i)=>subjects.indexOf(s)!==i);if(twice)throw new Error(`guide: "${twice}" is listed twice — one entry per subject, or the overview lies about the count.`)},"./libs/ui/.storybook/blocks/guide.model.mjs"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Cc:()=>guideModel,ED:()=>reviewedStamps,K9:()=>indexRows});var storybook_internal_csf__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/storybook/dist/csf/index.js");function storyHref(story){const cut=story.lastIndexOf("/");if(cut<=0||cut===story.length-1)throw new Error(`guide: story reference "${story}" is not "Title/Export".`);const title=story.slice(0,cut),name=story.slice(cut+1);return`?path=/story/${(0,storybook_internal_csf__WEBPACK_IMPORTED_MODULE_0__.Lr)(title,(0,storybook_internal_csf__WEBPACK_IMPORTED_MODULE_0__.bE)(name))}`}const subjectOf=entry=>entry.component??entry.situation;function pageOf(entries,subject){const entry=entries.find(e=>subjectOf(e)===subject),story=entry?.shownIn.find(r=>r.story)?.story;return story?(title=story.slice(0,story.lastIndexOf("/")),`?path=/docs/${(0,storybook_internal_csf__WEBPACK_IMPORTED_MODULE_0__.aj)(title)}--docs`):null;var title}function guideModel(entry,entries,of){if(!entry||"object"!=typeof entry)throw new Error(`guide: no entry handed to the block for "${of}".`);const subject=subjectOf(entry);if(void 0!==of&&subject!==of)throw new Error(`guide: the block on "${of}" was handed the entry of "${subject}" — wrong import.`);for(const key of["useFor","notFor","shownIn","sources"])if(!Array.isArray(entry[key]))throw new Error(`guide: entry "${subject}" has no "${key}" list.`);if(0===entry.shownIn.length)throw new Error(`guide: entry "${subject}" shows nothing — no proof, no block.`);return{subject,kind:entry.component?"component":"situation",uses:(entry.uses??[]).map(s=>({selector:s,href:pageOf(entries,s)})),useFor:entry.useFor,notFor:entry.notFor,instead:(entry.instead??[]).map(s=>({selector:s,href:pageOf(entries,s)})),note:entry.note??null,shownIn:entry.shownIn.map(r=>r.story?{label:r.story,href:storyHref(r.story)}:{label:r.file,href:null}),sources:entry.sources,reviewed:entry.reviewed}}function indexRows(entries){if(!Array.isArray(entries)||0===entries.length)throw new Error("guide: the overview has no entries — an empty guide is a generator bug, not an empty page.");return entries.map(e=>({subject:subjectOf(e),kind:e.component?"component":"situation",brief:e.useFor[0],href:pageOf(entries,subjectOf(e))})).sort((a,b)=>a.kind===b.kind?a.subject.localeCompare(b.subject):"situation"===a.kind?1:-1)}const reviewedStamps=entries=>[...new Set(entries.map(e=>e.reviewed))]},"./libs/ui/guide/app-shell.json"(module){"use strict";module.exports=JSON.parse('{"situation":"app-shell","uses":["ui-layout-main","ui-layout-nav","ui-layout-splitter","ui-layout-tabs"],"useFor":["The four layout components nested by content projection: main holds the nav in its header and the page in its content; a splitter inside the content holds tabs in its left pane. Each slot is a named attribute on your own element."],"notFor":["Overlays — they stand next to the layout, not inside it."],"shownIn":[{"story":"Examples/Layout/Layout"},{"file":"libs/ui/.storybook/demos/examples/layout/docs.mdx"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/.storybook/demos/examples/layout/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/burger-menu.json"(module){"use strict";module.exports=JSON.parse('{"situation":"burger-menu","uses":["ui-layout-overlay","ui-layout-overlay-header"],"useFor":["A navigation drawer behind a burger button: the overlay with direction=\\"right\\", the header with its close, a plain link list in the overlay-content slot; every link click resets the open flag. Backdrop, Escape and the scroll-lock come with the overlay."],"notFor":["The main navigation on a wide screen — that is ui-layout-nav in the main header."],"shownIn":[{"story":"Examples/Burger Menu/BurgerMenu"},{"file":"libs/ui/src/lib/examples/docs.mdx"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/examples/docs.mdx","libs/ui/src/lib/layout/overlay/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/form-basics.json"(module){"use strict";module.exports=JSON.parse('{"situation":"form-basics","uses":["ui-input","ui-checkbox","ui-switch","ui-slider"],"useFor":["Every form in the house: <ui-input [label]=\\"…\\"><input ui-tag class=\\"ui\\" [(ngModel)]=\\"…\\" /></ui-input>. The wrapper brings label and error display, the native control keeps value, validation and type. class=\\"ui\\" on the control; class=\\"ui-flat\\" where it sits inline in a table cell."],"notFor":["A control without the class — it renders unstyled.","A validator written in the app: validators belong in the library."],"shownIn":[{"story":"Styling/Forms/Forms"},{"story":"Forms/Validators/Email"},{"file":"apps/change-me/src/app/slider/slider.component.html"}],"sources":["usage.md (Forms)","libs/ui/src/lib/forms/input/docs.mdx","libs/ui/src/lib/forms/validators/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/image-gallery.json"(module){"use strict";module.exports=JSON.parse('{"situation":"image-gallery","uses":["ui-image-grid","ui-image-slider"],"useFor":["Grid and slider sharing one index: side by side, or the slider created with @if as the zoom — two clicks by design of the grid, the first selects, the second (on the projected uiImageGridClickArea) emits clickIndex."],"notFor":["A single linked preview — ui-thumb."],"shownIn":[{"story":"Examples/Image Gallery/ImageGallery"},{"story":"Examples/Image Gallery/ImageGalleryZoom"},{"file":"libs/ui/.storybook/demos/examples/image-grid-slider/docs.mdx"},{"file":"apps/website/src/app/content/image-grid/image-grid.component.html"}],"sources":["libs/ui/.storybook/demos/examples/image-grid-slider/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/table-edit-focus.json"(module){"use strict";module.exports=JSON.parse('{"situation":"table-edit-focus","uses":["ui-cdk-table-wrapper","ui-input","ui-checkbox"],"useFor":["An inline-editing table walked by keyboard: the wrapper in inline fixed mode with the uiTableEditFocus directive; fields as ui-flat controls; the app answers uiRowNavigate and uiRowStep — the only two questions the library does not answer itself: may this row open, and what does locked mean — and calls focusCell() after it re-rendered the edit row."],"notFor":["A wrapper without inline mode: the cells shift when a text turns into a field.","Counting positions instead of naming buttons — the edit row carries more buttons than a read row."],"shownIn":[{"story":"Examples/Table Edit Focus/TableEditFocus"},{"story":"Examples/Table Edit Focus/TableEditFocusTall"},{"file":"libs/ui/.storybook/demos/examples/table-edit-focus/docs.mdx"},{"file":"apps/proto/src/app/examples/keyboard-table/keyboard-table.component.html"},{"file":"apps/proto/src/app/examples/keyboard-table/keyboard-table.component.ts"}],"sources":["libs/ui/.storybook/demos/examples/table-edit-focus/docs.mdx","libs/ui/src/lib/cdk/components/table/docs.mdx","media CLAUDE.md (own repo): Keyboard navigation — who owns what","tickets#168","tickets#169"],"reviewed":"69197b72"}')},"./libs/ui/guide/translations.json"(module){"use strict";module.exports=JSON.parse('{"situation":"translations","uses":["ui-lang-selector"],"useFor":["Loading the library\'s translation files alongside the app\'s own with Transloco; the selector switches both. The list of every key the library ships is generated from the loaded translation, never written beside it."],"notFor":["Translating inside a computed — it snapshots an empty dictionary on first render; use the pipe, or a translate helper that listens."],"shownIn":[{"story":"Examples/Transloco/LangSelector"},{"story":"Examples/Transloco/AllKeys"},{"file":"libs/ui/.storybook/demos/examples/transloco/docs.mdx"}],"sources":["libs/ui/.storybook/demos/examples/transloco/docs.mdx","media CLAUDE.md (own repo): translate() inside a computed is a snapshot","tickets#182"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-autocomplete.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-autocomplete","useFor":["An input whose suggestions the host supplies — an in-memory list, signals or a backend; minChars and delay keep the requests civil, the component never fetches."],"notFor":["Multi-select, chips, a dropdown of fixed options — a native select inside ui-input does the last.","A waiting state or an empty message: there is none by design."],"instead":["ui-input"],"shownIn":[{"story":"Forms/Autocomplete/Autocomplete"},{"story":"Forms/Autocomplete/Loading"}],"sources":["libs/ui/src/lib/forms/autocomplete/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-background.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-background","useFor":["A patterned surface behind projected content — change-me\'s slider page puts its form on one."],"notFor":["Layout; a plain colour, which is one CSS line."],"shownIn":[{"story":"Atoms/Background/BackgroundExample"},{"file":"apps/change-me/src/app/slider/slider.component.html"}],"sources":["libs/ui/src/lib/atoms/background/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-barcode.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-barcode","useFor":["Drawing an EAN-13 the app already holds — an ISBN, an internal id under its own prefix. Size comes from the outside; a utility class on the tag wins."],"notFor":["Deciding which number to draw, printing it, or reacting to a click — that stays with the app.","Any symbology but EAN-13."],"note":"Wrap it in ui-copy-value to copy the digits; the bars stay the picture.","shownIn":[{"story":"Atoms/Barcode/Default"},{"story":"Atoms/Barcode/Sizes"}],"sources":["libs/ui/src/lib/atoms/barcode/docs.mdx","media frontend (own repo): internal-barcode.spec.ts, tickets#205"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-buzzer.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-buzzer","useFor":["One big, deliberate action — a contact trigger, a push button. The website uses it twice."],"notFor":["Ordinary form buttons: those are button.ui and button.ui-flat."],"shownIn":[{"story":"Atoms/Buzzer/Buzzer"},{"file":"apps/website/src/app/content/contact/contact.component.html"},{"file":"apps/website/src/app/components/push-button/push-button.component.html"}],"sources":["libs/ui/src/lib/atoms/buzzer/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-card.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-card","useFor":["A bounded surface with an optional headline and icon around projected content — a tile, a panel, a summary."],"notFor":["Anything that has to act: copying, linking, expanding. The card is presentational and composes nothing."],"instead":["ui-copy-value"],"note":"For a copyable card, wrap it: <ui-copy-value [value]=\\"…\\"><ui-card …></ui-card></ui-copy-value>. One job per component; composition, not a mode, adds the second.","shownIn":[{"story":"Atoms/Card/Card"}],"sources":["libs/ui/src/lib/atoms/card/docs.mdx","tickets#183"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-cdk-drag-drop-splitter.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-cdk-drag-drop-splitter","useFor":["Sorting items into two buckets by drag and drop. Bind both outputs and hand the new arrays back, or nothing moves."],"notFor":["A two-pane layout.","A list that persists itself."],"instead":["ui-layout-splitter"],"shownIn":[{"story":"CDK/Drag And Drop Splitter/DragAndDropSplitter"}],"sources":["libs/ui/src/lib/cdk/components/drag-and-drop-splitter/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-cdk-table-wrapper.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-cdk-table-wrapper","useFor":["Any cdk-table in the house: loading skeleton, hover and focus, header colours, fixed or content layout.","Inline editing: inline fixed plus the uiTableEditFocus directive — the proto keyboard table and the media editor are built this way."],"notFor":["A table without the CDK.","Inline editing without inline mode: the cells shift when text turns into a field."],"shownIn":[{"story":"CDK/Table/Default"},{"story":"CDK/Table/Inline"},{"story":"Examples/Table Edit Focus/TableEditFocus"},{"file":"apps/proto/src/app/examples/keyboard-table/keyboard-table.component.html"}],"sources":["libs/ui/src/lib/cdk/components/table/docs.mdx","libs/ui/.storybook/demos/examples/table-edit-focus/docs.mdx","media CLAUDE.md (own repo): Keyboard navigation — who owns what"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-chart.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-chart","useFor":["A single ring or bar of up to three segments — a share, a progress. The number of colours is the number of rings."],"notFor":["Series, axes, legends, tooltips, more than three parts."],"shownIn":[{"story":"Atoms/Chart/Rings"}],"sources":["libs/ui/src/lib/atoms/chart/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-checkbox.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-checkbox","useFor":["A choice that may be required or validated, inside a form that reports errors.","Flag cells of an editable table row: icons while the row is closed, checkboxes while it is edited — the proto keyboard table does that with display=\\"check-icon\\"."],"notFor":["An always-valid toggle.","The native variant where Safari matters — the self-painted icon variant renders the same everywhere."],"instead":["ui-switch"],"shownIn":[{"story":"Forms/Checkbox/CheckboxIcon"},{"story":"Forms/Checkbox/CheckboxValidation"},{"file":"apps/proto/src/app/examples/keyboard-table/keyboard-table.component.html"}],"sources":["libs/ui/src/lib/forms/checkbox/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-clock.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-clock","useFor":["A decorative time display — the website\'s landscape overlay."],"notFor":["A countdown; anything that needs time zones or formats beyond 12/24 h."],"instead":["ui-timer"],"shownIn":[{"story":"Atoms/Clock/Default"},{"file":"apps/website/src/app/parts/landscape-overlay/landscape-overlay.component.html"}],"sources":["libs/ui/src/lib/atoms/clock/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-copy-value.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-copy-value","useFor":["Click-to-copy around anything that shows a value — a swatch, a barcode, a truncated label. What is shown and what is copied are two different things, and this carries the second."],"notFor":["Showing the value: it brings no appearance. Wrap the thing that does."],"note":"With an empty value it leaves the tab order and stops being a control, so it can stand around content unconditionally and be switched on by supplying a value.","shownIn":[{"story":"Atoms/Copy Value/Swatches"},{"story":"Atoms/Copy Value/OwnConfirmation"}],"sources":["libs/ui/src/lib/atoms/copy-value/docs.mdx","tickets#183"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-image-editor.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-image-editor","useFor":["Uploading and cropping one image to a ratio, result as a JPEG blob — a cover, an avatar. The media cover editor is the overlay variant; the embedded one sits in the flow."],"notFor":["Several images, drawing, filters.","Talking to a backend: it emits, the host uploads."],"shownIn":[{"story":"Molecules/Image Editor/WithImage"},{"story":"Molecules/Image Editor/Overlay"}],"sources":["libs/ui/src/lib/molecules/image-editor/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-image-grid.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-image-grid","useFor":["The overview of a picture set, sharing one index with ui-image-slider. Always set cols; the default draws nothing."],"notFor":["Showing one picture large — that is the slider\'s half."],"instead":["ui-image-slider"],"shownIn":[{"story":"Examples/Image Gallery/ImageGallery"},{"story":"Examples/Image Gallery/ImageGalleryZoom"},{"file":"apps/website/src/app/content/image-grid/image-grid.component.html"}],"sources":["libs/ui/src/lib/atoms/image-grid/docs.mdx","libs/ui/.storybook/demos/examples/image-grid-slider/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-image-slider.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-image-slider","useFor":["One picture at a time with swipe, drag and zoom; as the zoom of a grid, created with @if only while open."],"notFor":["The overview of a set."],"instead":["ui-image-grid"],"shownIn":[{"story":"Examples/Image Gallery/ImageGallery"},{"story":"Examples/Image Gallery/ImageGalleryZoom"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/atoms/image-slider/docs.mdx","libs/ui/.storybook/demos/examples/image-grid-slider/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-input.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-input","useFor":["Every text-based control in a form: wrap the native input, textarea or select, keep [(ngModel)] on the projected element, class=\\"ui\\" on it.","Inline editing in tables: the projected control takes class=\\"ui-flat\\" instead — invisible at rest, no layout jump. The proto keyboard table has sixteen of them."],"notFor":["Ranges, checkboxes, switches — they have wrappers of their own.","Suggestions while typing."],"instead":["ui-slider","ui-checkbox","ui-switch","ui-autocomplete"],"shownIn":[{"story":"Forms/Input/Input"},{"story":"Forms/Input/InputClearable"},{"file":"apps/change-me/src/app/slider/slider.component.html"},{"file":"apps/proto/src/app/examples/keyboard-table/keyboard-table.component.html"}],"sources":["libs/ui/src/lib/forms/input/docs.mdx","usage.md (Forms)"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-lang-selector.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-lang-selector","useFor":["The one language switch of an app: one tag brings the service call, the storage and the restore on reload."],"notFor":["More than the two languages it knows; a switch that must not persist."],"shownIn":[{"story":"Examples/Transloco/LangSelector"},{"story":"Atoms/Lang Selector/OwnContent"},{"file":"apps/website/src/app/components/lang-selector/lang-selector.component.html"}],"sources":["libs/ui/src/lib/atoms/lang-selector/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-layout-main.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-main","useFor":["The root of an app shell, once: the nav in its header slot, the page in its content, a footer. The website and change-me both start here."],"notFor":["A panel inside a page — splitter, tabs and top-scroll-bottom are for that."],"shownIn":[{"story":"Examples/Layout/Layout"},{"file":"apps/website/src/app/app.component.html"},{"file":"apps/change-me/src/app/app.component.html"}],"sources":["libs/ui/src/lib/layout/main/docs.mdx","libs/ui/.storybook/demos/examples/layout/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-layout-media-screen.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-media-screen","useFor":["Once in the app shell, so every breakpoint question goes to UiLayoutMediaScreenService — never a hard-coded width in TypeScript or a breakpoint through Tailwind."],"notFor":["Anything visible; a second instance."],"shownIn":[{"story":"Layout/Media Screen/MediaScreen"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/layout/media-screen/docs.mdx","media CLAUDE.md (own repo): breakpoints never go through Tailwind"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-layout-nav.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-nav","useFor":["The app navigation in the main header, fed by UiLayoutNavService — tab theme for a site, app theme with a home button for a tool."],"notFor":["A second nav in the same layout.","A menu in a drawer — that is the burger recipe with ui-layout-overlay."],"instead":["ui-layout-overlay"],"shownIn":[{"story":"Layout/Nav/TemplateTab"},{"story":"Layout/Nav/TemplateApp"},{"story":"Examples/Layout/Layout"},{"file":"apps/website/src/app/parts/header/header.component.html"}],"sources":["libs/ui/src/lib/layout/nav/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-layout-overlay-header.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-overlay-header","useFor":["The plain header of an overlay: headline plus close, in the overlay-header slot."],"notFor":["A header with anything else in it — write your own bar into the same slot. The media record sheet does, because its close turns into a two-step discard."],"shownIn":[{"story":"Layout/Overlay Header/InsideAnOverlay"},{"story":"Examples/Burger Menu/BurgerMenu"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/layout/overlay/header/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-layout-overlay.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-overlay","useFor":["A drawer or a modal over the page — a burger menu, a sign-in sheet, a record editor. Place it at the app\'s top level next to the layout, bind active in and take activeOutput back."],"notFor":["Anything inside the layout tree.","A tooltip or a popover."],"shownIn":[{"story":"Examples/Burger Menu/BurgerMenu"},{"story":"Layout/Overlay/Overlay"},{"story":"Layout/Overlay/ScrollContainment"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/layout/overlay/docs.mdx","libs/ui/src/lib/examples/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-layout-spinner.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-spinner","useFor":["The one global loading indicator at the app root, driven by UiLayoutSpinnerService from an HTTP interceptor."],"notFor":["A component\'s own loading state — the table wrapper has its skeleton, everything else is local styling."],"shownIn":[{"story":"Layout/Spinner/Spinner"},{"file":"apps/website/src/app/app.component.html"}],"sources":["libs/ui/src/lib/layout/spinner/docs.mdx"],"reviewed":"592c82aa"}')},"./libs/ui/guide/ui-layout-splitter.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-splitter","useFor":["A working view with two panes and an action header. The media editor is one: table left, detail right, and the zoom is the handle that widens the table."],"notFor":["Moving items between two lists.","Resizing panes by dragging — it has direction, zoom and fullscreen, no drag handle."],"instead":["ui-cdk-drag-drop-splitter"],"shownIn":[{"story":"Layout/Splitter/Splitter"},{"story":"Examples/Layout/Layout"}],"sources":["libs/ui/src/lib/layout/splitter/docs.mdx","media CLAUDE.md (own repo): the 4K table shots and the zoom"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-layout-tabs.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-tabs","useFor":["A few sections of one view switched in place, inside a pane."],"notFor":["Routing between pages.","Remembering the active tab across a reload."],"shownIn":[{"story":"Layout/Tabs/TabsDefault"},{"story":"Examples/Layout/Layout"}],"sources":["libs/ui/src/lib/layout/tabs/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-layout-top-scroll-bottom.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-layout-top-scroll-bottom","useFor":["A view whose middle scrolls while header and footer stay — once per route, inside main-content."],"notFor":["Anywhere outside ui-layout-main; a second one in the same view."],"shownIn":[{"story":"Layout/Top Scroll Bottom/TopScrollBottom"}],"sources":["libs/ui/src/lib/layout/top-scroll-bottom/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-mosaic.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-mosaic","useFor":["A decorative tile field behind a page or over a picture — placed with CSS, given a box."],"notFor":["Anything clickable (pointer events are off).","An element in the flow without a height — it renders nothing, because its tile count comes from its box."],"shownIn":[{"story":"Atoms/Mosaic/Images"},{"story":"Atoms/Mosaic/OverImage"}],"sources":["libs/ui/src/lib/atoms/mosaic/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-placeholder.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-placeholder","useFor":["Filler with visible mass in stories and examples, sized from the outside (class=\\"h-64\\") — so a reader can tell a stand-in from a component that failed to render."],"notFor":["Product UI. It is scenery for documentation."],"shownIn":[{"story":"Atoms/Placeholder/Sizes"},{"story":"Examples/Layout/Layout"}],"sources":["libs/ui/src/lib/atoms/placeholder/docs.mdx","agents.md (Storybook Guidelines: filler needs visible mass)"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-qr-code.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-qr-code","useFor":["A URL or a short text as a scannable code. M is the ordinary level; raise it for small prints or surfaces that get handled."],"notFor":["Payloads past the version-40 capacity at the chosen level; kanji or ECI encodings."],"shownIn":[{"story":"Atoms/QR Code/Default"},{"story":"Atoms/QR Code/Levels"}],"sources":["libs/ui/src/lib/atoms/qr-code/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-rating.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-rating","useFor":["Displaying a rating as filled icons — read-only, any Material glyph, colours and size as CSS variables."],"notFor":["Collecting a rating: it takes no input from the reader."],"shownIn":[{"story":"Atoms/Rating/Rating"}],"sources":["libs/ui/src/lib/atoms/rating/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-reader-doc.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-reader-doc","useFor":["Rendering a Markdown string in the house design — the website\'s content pages do. Whoever fetches, caches and picks the language stands in front of it."],"notFor":["Documents whose raw HTML must survive: it is discarded, counted and named on the page."],"shownIn":[{"story":"Atoms/ReaderDoc/Default"},{"story":"Atoms/ReaderDoc/DroppedMarkup"},{"file":"apps/website/src/app/content/content.component.html"}],"sources":["libs/ui/src/lib/atoms/reader-doc/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-slider.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-slider","useFor":["A number or a min–max span the reader drags until it looks right."],"notFor":["A value the reader should type exactly — ui-input with type=\\"number\\"."],"instead":["ui-input"],"shownIn":[{"story":"Forms/Slider/Slider"},{"story":"Forms/Slider/Range"}],"sources":["libs/ui/src/lib/forms/slider/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-switch.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-switch","useFor":["A deliberate on/off decision that takes effect at once and is valid either way — a setting, a filter, a mode."],"notFor":["A choice that can be required or invalid, such as a consent."],"instead":["ui-checkbox"],"shownIn":[{"story":"Forms/Switch/Switch"},{"story":"Styling/Forms/Forms"}],"sources":["libs/ui/src/lib/forms/switch/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-text-animate.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-text-animate","useFor":["A headline that animates letter by letter; clip on the container when a variant travels in from outside."],"notFor":["Body text or anything longer than a phrase."],"shownIn":[{"story":"Atoms/Text Animate/TextAnimate"},{"file":"apps/change-me/src/app/slider/slider.component.html"}],"sources":["libs/ui/src/lib/atoms/text-animate/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-thumb.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-thumb","useFor":["A linked preview image with a caption — playlist tiles, news, references on the website. Place it in a grid cell or give it a width."],"notFor":["A gallery of pictures sharing a selection.","An image without a link — a plain <img> does that."],"instead":["ui-image-grid"],"shownIn":[{"story":"Atoms/Thumb/Thumb"},{"story":"Atoms/Thumb/ThumbInternalLink"},{"file":"apps/website/src/app/content/youtube/youtube.component.html"},{"file":"apps/website/src/app/components/news/display/display.component.html"}],"sources":["libs/ui/src/lib/atoms/thumb/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-timer.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-timer","useFor":["A countdown with a finished event; project the words that stand at zero, in your language."],"notFor":["Showing the time of day."],"instead":["ui-clock"],"shownIn":[{"story":"Atoms/Timer/Timer"}],"sources":["libs/ui/src/lib/atoms/timer/docs.mdx"],"reviewed":"69197b72"}')},"./libs/ui/guide/ui-typewriter.json"(module){"use strict";module.exports=JSON.parse('{"component":"ui-typewriter","useFor":["A line of text that types itself, optionally with a keystroke sound — the website\'s platformer intro."],"notFor":["Body text; a loop — a second sentence is a new run."],"shownIn":[{"story":"Atoms/Typewriter/Typewriter"},{"file":"apps/website/src/app/components/platformer/platformer.component.html"}],"sources":["libs/ui/src/lib/atoms/typewriter/docs.mdx"],"reviewed":"69197b72"}')}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3190],{"./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/molecules/image-editor/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"),_image_editor_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/molecules/image-editor/image-editor.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_image_editor_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-image-editor.json");function _createMdxContent(props){const _components={a:"a",code:"code",h1:"h1",h2:"h2",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:_image_editor_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h1,{id:"image-editor",children:"Image Editor"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["An editor for a single image. The user can delete the current image or\nupload a new one (PNG, GIF or JPEG), crop it (freely or locked to an aspect\nratio) and the result is converted to a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"JPEG entirely in the browser"})," via a\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<canvas>"})," (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"toBlob('image/jpeg', quality)"}),"). The finished blob is emitted through\nthe ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"save"})," output — the component itself never talks to a backend, so it is\nreusable across apps."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Client-side conversion means the server only has to store a small, finished\nJPEG: no server-side image library is required."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{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:["Edits one image in the browser: upload (PNG, GIF, JPEG), crop freely or to an\naspect ratio, delete, and emit the result as a JPEG blob through ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"save"}),". It\nnever talks to a backend and keeps no image beyond the one it is shown. It comes\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"embedded"})," in the flow or as an ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"overlay"})," — the same editor, not two. It is the\nlibrary's only molecule: it composes the overlay, the overlay header, the crop\nbox and the slider."]}),"\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-image-editor",entry:_guide_ui_image_editor_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.h2,{id:"variants",children:"Variants"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The same content comes in two presentations, selected by the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"variant"})," input:"]}),"\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:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"embedded"})})," (default): the editor stands in the document flow like any\nother element — no frame, no backdrop, no focus trap, no Escape semantics.\nIt fills the width it is given; the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"maximum width is set by the consumer"}),"\nvia styles on the host or a wrapping element, the minimum emerges from the\nfooter button row (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"flex-wrap"})," as a safety net for very narrow screens).\nDelete, Save and Cancel-with-nothing-to-discard return the editor to a clean\nview mode instead of closing anything; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"active"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"activeOutput"})," are not\nused."]}),"\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:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"overlay"})}),": wraps the editor in the ui overlay as before — backdrop,\nfocus trap, Escape and the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"active"})," / ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"activeOutput"})," pair."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--with-image",children:"Open story"})}),"\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-image-editor\n [imageUrl]="currentCover()"\n [aspectRatio]="2 / 3"\n (save)="onCoverSaved($event)"\n (deleteImage)="onCoverDeleted()"\n></ui-image-editor>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"usage-overlay",children:"Usage (overlay)"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--overlay",children:"Open story"})}),"\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-image-editor\n variant="overlay"\n [active]="editorActive()"\n [imageUrl]="currentCover()"\n [aspectRatio]="2 / 3"\n (save)="onCoverSaved($event)"\n (deleteImage)="onCoverDeleted()"\n (activeOutput)="editorActive.set($event)"\n></ui-image-editor>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"with-an-existing-image",children:"With an existing image"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story-2",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--with-image",children:"Open story"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Opening with an image shows it in view mode. The footer offers ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Delete"}),",\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Upload"})," (pick a new file), ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Crop"})," (edit the current image without\nre-uploading), ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Cancel"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Save"}),". Both ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Upload"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Crop"})," switch to\nthe crop stage; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Save"})," is enabled there."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The crop box works by pointer and by keyboard alike: it is a tab stop, the\narrow keys pan it, Shift with an arrow resizes it from the south-east corner\n— a locked ratio holds exactly as it does for a pointer on that corner. The\nhint under the box says so in the reader's language."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"locked-aspect-ratio",children:"Locked aspect ratio"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story-3",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--poster-ratio",children:"Open story"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Passing ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"aspectRatio"})," (e.g. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"2 / 3"})," for a poster) constrains the crop box while\nresizing; the height follows the width automatically. Only the corner handles\nare shown in this mode."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"empty-state",children:"Empty state"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story-4",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--empty",children:"Open story"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Without an ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"imageUrl"})," the editor shows an empty placeholder and only the upload\naction."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"footer-buttons",children:"Footer buttons"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Five icon buttons on one row (grey surface, tinted icons where it helps). Each\ncarries a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"title"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"aria-label"})," tooltip. Disabled buttons keep the same grey\nbackground — only their icon is dimmed, in its normal colour, so it stays\nreadable against that surface. The ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/molecules-image-editor--empty",children:"empty state"}),"\nshows this: with no image, Crop, Delete and Save are all disabled."]}),"\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:"Button"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Icon"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Enabled when"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Action"})]})}),(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:"Upload"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"add_a_photo"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"always"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Opens the file picker; a chosen PNG/GIF/JPEG enters the crop stage."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Crop"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"crop"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"an image exists and view mode (not already cropping)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Loads the current image into the crop stage."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Cancel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"close"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"always"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"In the crop stage with a current image: discards and returns to view. Otherwise closes the overlay (embedded: resets to view)."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Delete (red icon)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"delete"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"an image exists"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Emits ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"deleteImage"})," and closes the overlay (embedded: resets to view)."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Save (green icon when active)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"save"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"crop stage and not converting"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Converts the crop to a JPEG, emits ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"save"}),", closes the overlay (embedded: resets to view)."]})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Rejecting a file (wrong type or over the size limit) shows an inline error and\nstays in the current stage."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"inputs",children:"Inputs"}),"\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:"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:"variant"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'embedded' | 'overlay'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'embedded'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"In-flow presentation or the ui overlay."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"active"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Opens/closes the overlay (overlay variant only)."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"imageUrl"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"string | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The current image shown when the editor opens."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"aspectRatio"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Locks the crop to this width/height ratio; null allows free cropping."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"maxWidth"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"1200"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Maximum output width in pixels; height follows the crop ratio."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"quality"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"0.75"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"JPEG quality (0..1) of the converted output."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"maxFileSizeMb"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"10"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Rejects source files larger than this (megabytes)."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"headline"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"string | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Optional overlay title; falls back to the imageEditor.title key."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"overlayDirection"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'center' | 'top' | 'bottom' | 'left' | 'right' | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{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:"Side the overlay slides in from (overlay variant only); null keeps the\noverlay's own centre default. Use 'left'/'right' to make the editor a\ndrawer that matches an app's navigation panel."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"overlayFitContent"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Sizes the overlay to its content instead of the available height\n(overlay variant only) — see the overlay's own fitContent. Keeps a sheet\nholding a small image from standing there as a tall, empty column."})})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The overlay variant always runs with the overlay's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"viewportHeight"}),": a sheet\nbelongs to the browser window, not to the document. Without it the percentage\nheights resolve against a transformed ancestor's box, and inside a long page\nthat stretches the sheet to the full document height — header and footer end up\nfar outside the visible area."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"outputs",children:"Outputs"}),"\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:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Payload"}),(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:"save"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Blob"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The converted JPEG when the user saves."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"deleteImage"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"void"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Emitted when the user deletes the current image."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"activeOutput"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Forwards the overlay close event (emits false; overlay variant only)."})]})]})]})]})}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)}}}]);
|
package/storybook/molecules-image-editor-image-editor-component-stories.56467f17.iframe.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[8180],{"./libs/ui/src/lib/molecules/image-editor/image-editor.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Empty:()=>Empty,Overlay:()=>Overlay,PosterRatio:()=>PosterRatio,WithImage:()=>WithImage,__namedExportsOrder:()=>__namedExportsOrder,default:()=>image_editor_component_stories});var dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),asyncToGenerator=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_editor_componentngResource=__webpack_require__("./libs/ui/src/lib/molecules/image-editor/image-editor.component.css?ngResource"),image_editor_componentngResource_default=__webpack_require__.n(image_editor_componentngResource),_common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.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"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs"),slider_component=__webpack_require__("./libs/ui/src/lib/forms/slider/slider.component.ts"),header_header_component=__webpack_require__("./libs/ui/src/lib/layout/overlay/header/header.component.ts"),overlay_component=__webpack_require__("./libs/ui/src/lib/layout/overlay/overlay.component.ts");var crop_box_componentngResource=__webpack_require__("./libs/ui/src/lib/molecules/image-editor/crop-box/crop-box.component.css?ngResource"),crop_box_componentngResource_default=__webpack_require__.n(crop_box_componentngResource);let UiImageEditorCropBoxComponent=class UiImageEditorCropBoxComponent{src=(0,core.input)("");aspectRatio=(0,core.input)(null);zoom=(0,core.input)(100);cropChange=(0,core.output)();preview=(0,core.viewChild)("preview");cropEl=(0,core.viewChild)("crop");frameEl=(0,core.viewChild)("frame");naturalWidth=(0,_effect_chunk2.vPA)(0);naturalHeight=(0,_effect_chunk2.vPA)(0);cornerHandles=[{h:"nw",cls:"_nw"},{h:"ne",cls:"_ne"},{h:"sw",cls:"_sw"},{h:"se",cls:"_se"}];edgeHandles=[{h:"n",cls:"_n"},{h:"s",cls:"_s"},{h:"w",cls:"_w"},{h:"e",cls:"_e"},{h:"move",cls:"_center"}];handles=(0,_resource_chunk.EW)(()=>this.aspectRatio()?this.cornerHandles:[...this.cornerHandles,...this.edgeHandles]);cropX=(0,_effect_chunk2.vPA)(0);cropY=(0,_effect_chunk2.vPA)(0);cropWidth=(0,_effect_chunk2.vPA)(0);cropHeight=(0,_effect_chunk2.vPA)(0);drag=null;constructor(){(0,_effect_chunk2.QZP)(()=>{this.src(),this.aspectRatio(),(0,_resource_chunk.O8)(()=>{this.naturalWidth()>0&&this.resetCrop()})}),(0,_effect_chunk2.QZP)(()=>this.paint()),(0,_effect_chunk2.QZP)(()=>{const el=this.frameEl()?.nativeElement;el&&(el.style.transform=`scale(${this.zoom()/100})`)})}paint(){const el=this.cropEl()?.nativeElement;el&&(el.style.left=`${this.leftPercent()}%`,el.style.top=`${this.topPercent()}%`,el.style.width=`${this.widthPercent()}%`,el.style.height=`${this.heightPercent()}%`)}onImageLoad(){const img=this.preview()?.nativeElement;img&&(this.naturalWidth.set(img.naturalWidth),this.naturalHeight.set(img.naturalHeight),this.resetCrop())}resetCrop(){const natW=this.naturalWidth(),natH=this.naturalHeight();if(0===natW||0===natH)return;const ratio=this.aspectRatio();let w=natW,h=natH;ratio&&ratio>0&&(natW/natH>ratio?(h=natH,w=h*ratio):(w=natW,h=w/ratio)),this.cropWidth.set(Math.round(w)),this.cropHeight.set(Math.round(h)),this.cropX.set(Math.round((natW-w)/2)),this.cropY.set(Math.round((natH-h)/2)),this.emit()}leftPercent=(0,_resource_chunk.EW)(()=>this.naturalWidth()?this.cropX()/this.naturalWidth()*100:0);topPercent=(0,_resource_chunk.EW)(()=>this.naturalHeight()?this.cropY()/this.naturalHeight()*100:0);widthPercent=(0,_resource_chunk.EW)(()=>this.naturalWidth()?this.cropWidth()/this.naturalWidth()*100:100);heightPercent=(0,_resource_chunk.EW)(()=>this.naturalHeight()?this.cropHeight()/this.naturalHeight()*100:100);onPointerDown(event,handle){event.preventDefault(),event.stopPropagation(),event.target.setPointerCapture(event.pointerId),this.drag={handle,startClientX:event.clientX,startClientY:event.clientY,startX:this.cropX(),startY:this.cropY(),startWidth:this.cropWidth(),startHeight:this.cropHeight()}}onPointerMove(event){if(!this.drag)return;const img=this.preview()?.nativeElement;if(!img)return;const shownWidth=img.getBoundingClientRect().width;if(0===shownWidth)return;const scale=this.naturalWidth()/shownWidth,dx=(event.clientX-this.drag.startClientX)*scale,dy=(event.clientY-this.drag.startClientY)*scale;"move"===this.drag.handle?this.moveBy(dx,dy):this.resizeBy(this.drag.handle,dx,dy),this.paint(),this.emit()}onPointerUp(event){this.drag&&(event.target.releasePointerCapture?.(event.pointerId),this.drag=null,this.emit())}onKeydown(event){const step=Math.max(8,Math.round(.02*this.naturalWidth())),dx="ArrowLeft"===event.key?-step:"ArrowRight"===event.key?step:0,dy="ArrowUp"===event.key?-step:"ArrowDown"===event.key?step:0;0===dx&&0===dy||(event.preventDefault(),this.drag={handle:event.shiftKey?"se":"move",startClientX:0,startClientY:0,startX:this.cropX(),startY:this.cropY(),startWidth:this.cropWidth(),startHeight:this.cropHeight()},event.shiftKey?this.resizeBy("se",dx,dy):this.moveBy(dx,dy),this.drag=null,this.paint(),this.emit())}moveBy(dx,dy){if(!this.drag)return;const natW=this.naturalWidth(),natH=this.naturalHeight(),w=this.drag.startWidth,h=this.drag.startHeight;this.cropX.set(this.clamp(this.drag.startX+dx,0,natW-w)),this.cropY.set(this.clamp(this.drag.startY+dy,0,natH-h))}resizeBy(handle,dx,dy){if(!this.drag)return;const natW=this.naturalWidth(),natH=this.naturalHeight(),ratio=this.aspectRatio(),left0=this.drag.startX,top0=this.drag.startY,right0=left0+this.drag.startWidth,bottom0=top0+this.drag.startHeight,mL="nw"===handle||"sw"===handle||"w"===handle,mR="ne"===handle||"se"===handle||"e"===handle,mT="nw"===handle||"ne"===handle||"n"===handle,mB="sw"===handle||"se"===handle||"s"===handle;let left=mL?this.clamp(left0+dx,0,right0-24):left0,right=mR?this.clamp(right0+dx,left0+24,natW):right0,top=mT?this.clamp(top0+dy,0,bottom0-24):top0,bottom=mB?this.clamp(bottom0+dy,top0+24,natH):bottom0;if(ratio&&ratio>0){const horizontal=mL||mR,vertical=mT||mB;if(horizontal&&!vertical){if(bottom=top+(right-left)/ratio,bottom>natH){bottom=natH;const w=(bottom-top)*ratio;mL?left=right-w:right=left+w}}else if(vertical&&!horizontal){if(right=left+(bottom-top)*ratio,right>natW){right=natW;const h=(right-left)/ratio;mT?top=bottom-h:bottom=top+h}}else{let h=(right-left)/ratio;if(mT){if(top=bottom-h,top<0){top=0,h=bottom;const w=h*ratio;mL?left=right-w:right=left+w}}else if(bottom=top+h,bottom>natH){bottom=natH,h=bottom-top;const w=h*ratio;mL?left=right-w:right=left+w}}}this.cropX.set(Math.round(left)),this.cropY.set(Math.round(top)),this.cropWidth.set(Math.round(right-left)),this.cropHeight.set(Math.round(bottom-top))}emit(){const natW=this.naturalWidth(),natH=this.naturalHeight();0!==natW&&0!==natH&&this.cropChange.emit({x:this.cropX()/natW,y:this.cropY()/natH,width:this.cropWidth()/natW,height:this.cropHeight()/natH})}clamp(value,min,max){return Math.min(Math.max(value,min),max)}static ctorParameters=()=>[];static propDecorators={src:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"src",required:!1,transform:void 0}]}],aspectRatio:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"aspectRatio",required:!1,transform:void 0}]}],zoom:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"zoom",required:!1,transform:void 0}]}],cropChange:[{type:_debug_node_chunk.k7i,args:["cropChange"]}],preview:[{type:core.ViewChild,args:["preview",{isSignal:!0}]}],cropEl:[{type:core.ViewChild,args:["crop",{isSignal:!0}]}],frameEl:[{type:core.ViewChild,args:["frame",{isSignal:!0}]}]}};UiImageEditorCropBoxComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-image-editor-crop-box",template:'<div class="_stage">\n <div #frame class="_frame">\n <img\n #preview\n class="_image"\n [src]="src()"\n alt=""\n draggable="false"\n (load)="onImageLoad()"\n />\n\n @if (naturalWidth() > 0) {\n \x3c!-- Focusable: the crop is operable by keyboard — arrows pan,\n Shift+arrows resize — so it needs a tab stop and a name. --\x3e\n <div\n #crop\n class="_crop"\n tabindex="0"\n role="group"\n [attr.aria-label]="\'imageEditor.cropLabel\' | transloco"\n (keydown)="onKeydown($event)"\n (pointerdown)="onPointerDown($event, \'move\')"\n (pointermove)="onPointerMove($event)"\n (pointerup)="onPointerUp($event)"\n >\n @for (hnd of handles(); track hnd.cls) {\n <span\n class="_handle {{ hnd.cls }}"\n (pointerdown)="onPointerDown($event, hnd.h)"\n (pointermove)="onPointerMove($event)"\n (pointerup)="onPointerUp($event)"\n ></span>\n }\n </div>\n }\n </div>\n</div>\n',encapsulation:_debug_node_chunk.gXe.Emulated,imports:[ngneat_transloco.Kj],styles:[crop_box_componentngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiImageEditorCropBoxComponent);const UI_IMAGE_EDITOR_ACCEPTED_TYPES=["image/png","image/gif","image/jpeg"];let UiImageEditorComponent=class UiImageEditorComponent{variant=(0,core.input)("embedded");active=(0,core.input)(!1);imageUrl=(0,core.input)(null);aspectRatio=(0,core.input)(null);maxWidth=(0,core.input)(1200);quality=(0,core.input)(.75);maxFileSizeMb=(0,core.input)(10);headline=(0,core.input)(null);overlayDirection=(0,core.input)(null);overlayFitContent=(0,core.input)(!1);save=(0,core.output)();deleteImage=(0,core.output)();activeOutput=(0,core.output)();fileInput=(0,core.viewChild)("fileInput");sourceUrl=(0,_effect_chunk2.vPA)(null);crop=(0,_effect_chunk2.vPA)(null);busy=(0,_effect_chunk2.vPA)(!1);errorKey=(0,_effect_chunk2.vPA)(null);zoom=(0,_effect_chunk2.vPA)(100);working=null;stage=(0,_resource_chunk.EW)(()=>this.sourceUrl()?"crop":"view");hasImage=(0,_resource_chunk.EW)(()=>Boolean(this.imageUrl()));canDelete=(0,_resource_chunk.EW)(()=>this.hasImage());canEdit=(0,_resource_chunk.EW)(()=>this.hasImage()&&"view"===this.stage());canSave=(0,_resource_chunk.EW)(()=>"crop"===this.stage()&&!this.busy());acceptAttr=UI_IMAGE_EDITOR_ACCEPTED_TYPES.join(",");constructor(){(0,_effect_chunk2.QZP)(()=>{"overlay"!==this.variant()||this.active()||this.reset()})}openPicker(){this.errorKey.set(null),this.fileInput()?.nativeElement.click()}onFileSelected(event){var _this=this;return(0,asyncToGenerator.A)(function*(){const el=event.target,file=el.files?.[0];if(el.value="",!file)return;if(!UI_IMAGE_EDITOR_ACCEPTED_TYPES.includes(file.type))return void _this.errorKey.set("wrongType");if(file.size>1024*_this.maxFileSizeMb()*1024)return void _this.errorKey.set("tooBig");_this.errorKey.set(null),_this.revokeSource();const url=URL.createObjectURL(file),img=new Image;img.decoding="async",img.src=url;try{yield img.decode()}catch{return URL.revokeObjectURL(url),void _this.errorKey.set("wrongType")}_this.working=img,_this.crop.set(null),_this.sourceUrl.set(url)})()}openEdit(){var _this2=this;return(0,asyncToGenerator.A)(function*(){const url=_this2.imageUrl();if(!url)return;_this2.errorKey.set(null);const img=new Image;img.crossOrigin="anonymous",img.decoding="async",img.src=url;try{yield img.decode()}catch{}_this2.working=img,_this2.crop.set(null),_this2.sourceUrl.set(url)})()}onCropChange(rect){this.crop.set(rect)}onDelete(){this.deleteImage.emit(),this.requestClose()}onCancel(){if("crop"===this.stage()&&this.hasImage())return this.revokeSource(),this.working=null,this.sourceUrl.set(null),void this.crop.set(null);this.requestClose()}runSave(){if(this.busy()||!this.working)return;this.busy.set(!0);const img=this.working,rect=this.crop()??{x:0,y:0,width:1,height:1},sx=rect.x*img.naturalWidth,sy=rect.y*img.naturalHeight,sw=Math.max(1,rect.width*img.naturalWidth),sh=Math.max(1,rect.height*img.naturalHeight),targetW=Math.round(Math.min(sw,this.maxWidth())),targetH=Math.round(sh*(targetW/sw)),canvas=document.createElement("canvas");canvas.width=targetW,canvas.height=targetH;const ctx=canvas.getContext("2d");ctx?(ctx.imageSmoothingQuality="high",ctx.fillStyle="#ffffff",ctx.fillRect(0,0,targetW,targetH),ctx.drawImage(img,sx,sy,sw,sh,0,0,targetW,targetH),canvas.toBlob(blob=>{this.busy.set(!1),blob&&(this.save.emit(blob),this.requestClose())},"image/jpeg",this.quality())):this.busy.set(!1)}onOverlayClose(){this.activeOutput.emit(!1)}requestClose(){"overlay"===this.variant()?this.activeOutput.emit(!1):this.reset()}reset(){this.revokeSource(),this.working=null,this.sourceUrl.set(null),this.crop.set(null),this.busy.set(!1),this.errorKey.set(null),this.zoom.set(100)}revokeSource(){const url=this.sourceUrl();url&&URL.revokeObjectURL(url)}static ctorParameters=()=>[];static propDecorators={variant:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"variant",required:!1,transform:void 0}]}],active:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"active",required:!1,transform:void 0}]}],imageUrl:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"imageUrl",required:!1,transform:void 0}]}],aspectRatio:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"aspectRatio",required:!1,transform:void 0}]}],maxWidth:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"maxWidth",required:!1,transform:void 0}]}],quality:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"quality",required:!1,transform:void 0}]}],maxFileSizeMb:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"maxFileSizeMb",required:!1,transform:void 0}]}],headline:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"headline",required:!1,transform:void 0}]}],overlayDirection:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"overlayDirection",required:!1,transform:void 0}]}],overlayFitContent:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"overlayFitContent",required:!1,transform:void 0}]}],save:[{type:_debug_node_chunk.k7i,args:["save"]}],deleteImage:[{type:_debug_node_chunk.k7i,args:["deleteImage"]}],activeOutput:[{type:_debug_node_chunk.k7i,args:["activeOutput"]}],fileInput:[{type:core.ViewChild,args:["fileInput",{isSignal:!0}]}]}};UiImageEditorComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-image-editor",template:'\x3c!-- Body and footer are defined once and projected into either presentation. --\x3e\n<ng-template #bodyTpl>\n @if (errorKey()) {\n <p class="_error">{{ \'imageEditor.errors.\' + errorKey() | transloco }}</p>\n }\n\n @if (stage() === \'crop\') {\n <ui-image-editor-crop-box\n [src]="sourceUrl() ?? \'\'"\n [aspectRatio]="aspectRatio()"\n [zoom]="zoom()"\n (cropChange)="onCropChange($event)"\n ></ui-image-editor-crop-box>\n <p class="_hint">{{ \'imageEditor.cropHint\' | transloco }}</p>\n <ui-slider class="_zoom" [label]="\'imageEditor.zoom\' | transloco">\n <input\n ui-tag\n type="range"\n class="ui"\n [min]="20"\n [max]="100"\n [step]="1"\n [ngModel]="zoom()"\n (ngModelChange)="zoom.set(+$event)"\n />\n </ui-slider>\n } @else {\n <div class="_view">\n @if (hasImage()) {\n <img class="_current" [src]="imageUrl()" alt="" />\n } @else {\n <div class="_empty">\n <span class="ui-icon x3">image</span>\n <p>{{ \'imageEditor.empty\' | transloco }}</p>\n </div>\n }\n </div>\n }\n\n <input\n #fileInput\n type="file"\n [accept]="acceptAttr"\n hidden\n (change)="onFileSelected($event)"\n />\n</ng-template>\n\n<ng-template #footerTpl>\n <button\n class="ui _upload"\n type="button"\n [title]="\'imageEditor.replace\' | transloco"\n [attr.aria-label]="\'imageEditor.replace\' | transloco"\n (click)="openPicker()"\n >\n <span class="ui-icon">add_a_photo</span>\n </button>\n <button\n class="ui _crop"\n type="button"\n [title]="\'imageEditor.edit\' | transloco"\n [attr.aria-label]="\'imageEditor.edit\' | transloco"\n [disabled]="!canEdit()"\n (click)="openEdit()"\n >\n <span class="ui-icon">crop</span>\n </button>\n <button\n class="ui _cancel"\n type="button"\n [title]="\'actions.cancel\' | transloco"\n [attr.aria-label]="\'actions.cancel\' | transloco"\n (click)="onCancel()"\n >\n <span class="ui-icon">close</span>\n </button>\n <button\n class="ui _delete"\n type="button"\n [title]="\'actions.delete\' | transloco"\n [attr.aria-label]="\'actions.delete\' | transloco"\n [disabled]="!canDelete()"\n (click)="onDelete()"\n >\n <span class="ui-icon">delete</span>\n </button>\n <button\n class="ui _save"\n type="button"\n [title]="\'actions.save\' | transloco"\n [attr.aria-label]="\'actions.save\' | transloco"\n [disabled]="!canSave()"\n (click)="runSave()"\n >\n <span class="ui-icon">save</span>\n </button>\n</ng-template>\n\n@if (variant() === \'overlay\') {\n \x3c!-- viewportHeight: a sheet belongs to the browser window, not to the\n document. Without it the percentage heights are resolved against a\n transformed ancestor\'s box — inside a long page that stretches the sheet\n to the full document height and pushes header and footer out of sight. --\x3e\n <ui-layout-overlay\n [active]="active()"\n [maxWidth]="\'ms-5\'"\n [viewportHeight]="true"\n [fitContent]="overlayFitContent()"\n [direction]="overlayDirection()"\n (activeOutput)="onOverlayClose()"\n >\n <ui-layout-overlay-header\n overlay-header\n [headline]="headline() ?? (\'imageEditor.title\' | transloco)"\n (activeOutput)="onOverlayClose()"\n ></ui-layout-overlay-header>\n\n <div overlay-content class="_body">\n <ng-container [ngTemplateOutlet]="bodyTpl"></ng-container>\n </div>\n\n <div overlay-footer class="_footer">\n <ng-container [ngTemplateOutlet]="footerTpl"></ng-container>\n </div>\n </ui-layout-overlay>\n} @else {\n <div class="_body">\n <ng-container [ngTemplateOutlet]="bodyTpl"></ng-container>\n </div>\n <div class="_footer">\n <ng-container [ngTemplateOutlet]="footerTpl"></ng-container>\n </div>\n}\n',encapsulation:_debug_node_chunk.gXe.Emulated,host:{"[class.embedded]":"variant() === 'embedded'"},imports:[fesm2022_forms.YN,_common_module_chunk.T3,ngneat_transloco.Kj,overlay_component.o,header_header_component.t,UiImageEditorCropBoxComponent,slider_component.H],styles:[image_editor_componentngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiImageEditorComponent);const image_editor_component_stories={title:"Molecules/Image Editor",component:UiImageEditorComponent,decorators:[(0,dist.L4)({providers:[]}),(0,dist.Iz)({imports:[header_component.b,UiImageEditorComponent]})],argTypes:{aspectRatio:{control:{type:"range",min:.5,max:3,step:.05}},maxWidth:{control:"number"},quality:{control:{type:"range",min:.1,max:1,step:.05}},maxFileSizeMb:{control:"number"}},parameters:{docs:{canvas:{sourceState:"none"}}}},embeddedTemplate='\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="flex max-w-2xl flex-col gap-4 p-4">\n <ui-image-editor\n [imageUrl]="imageUrl"\n [aspectRatio]="aspectRatio"\n (save)="onSave($event)"\n (deleteImage)="onDelete()"\n ></ui-image-editor>\n @if (resultUrl) {\n <img class="w-[12rem] rounded" [src]="resultUrl" alt="" />\n }\n </section>\n',props=imageUrl=>({active:!1,imageUrl,resultUrl:null,onSave(blob){this.resultUrl=URL.createObjectURL(blob)},onDelete(){this.imageUrl=null}}),WithImage={render:args=>({props:{...props("assets/ui/images/800x600.png"),...args},template:embeddedTemplate})},PosterRatio={args:{aspectRatio:2/3},render:args=>({props:{...props("assets/ui/images/800x600.png"),...args},template:embeddedTemplate})},Empty={render:args=>({props:{...props(null),...args},template:embeddedTemplate})},Overlay={render:args=>({props:{...props("assets/ui/images/800x600.png"),...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="flex w-fit flex-col gap-4 p-4">\n <button class="ui" (click)="active = true">\n <span class="ui-icon">edit</span>\n </button>\n @if (resultUrl) {\n <img class="w-[12rem] rounded" [src]="resultUrl" alt="" />\n }\n </section>\n <ui-image-editor\n variant="overlay"\n [active]="active"\n [imageUrl]="imageUrl"\n [aspectRatio]="aspectRatio"\n (save)="onSave($event)"\n (deleteImage)="onDelete()"\n (activeOutput)="active = $event"\n ></ui-image-editor>\n'})},__namedExportsOrder=["WithImage","PosterRatio","Empty","Overlay"];WithImage.parameters={...WithImage.parameters,docs:{...WithImage.parameters?.docs,source:{originalSource:"{\n render: args => ({\n props: {\n ...props(uiMoleculeImageEditorMock),\n ...args\n },\n template: embeddedTemplate\n })\n}",...WithImage.parameters?.docs?.source}}},PosterRatio.parameters={...PosterRatio.parameters,docs:{...PosterRatio.parameters?.docs,source:{originalSource:"{\n args: {\n aspectRatio: 2 / 3\n },\n render: args => ({\n props: {\n ...props(uiMoleculeImageEditorMock),\n ...args\n },\n template: embeddedTemplate\n })\n}",...PosterRatio.parameters?.docs?.source}}},Empty.parameters={...Empty.parameters,docs:{...Empty.parameters?.docs,source:{originalSource:"{\n render: args => ({\n props: {\n ...props(null),\n ...args\n },\n template: embeddedTemplate\n })\n}",...Empty.parameters?.docs?.source}}},Overlay.parameters={...Overlay.parameters,docs:{...Overlay.parameters?.docs,source:{originalSource:"{\n render: args => ({\n props: {\n ...props(uiMoleculeImageEditorMock),\n ...args\n },\n template: overlayTemplate\n })\n}",...Overlay.parameters?.docs?.source}}}},"./libs/ui/src/lib/molecules/image-editor/crop-box/crop-box.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: block;\n width: 100%;\n}\n\n/* Centers the frame; clips the zoomed image to the stage. The padding leaves\n room for the edge handles (which straddle the image border) so they render\n fully square instead of being cut off at 100% zoom. */\n._stage {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n /* The image caps the height (max-height below); the stage adds padding on top\n so it must NOT also cap at 60vh, or the padding gets clipped and the edge\n handles are cut off. */\n padding: calc(var(--ui-spacer) * 0.375);\n overflow: hidden;\n -webkit-user-select: none;\n user-select: none;\n touch-action: none;\n}\n\n/* Wraps the image and crop box so both scale together on zoom. Sizes to the\n image, and is the positioning context for the absolutely-placed crop box. */\n._frame {\n position: relative;\n display: inline-block;\n line-height: 0;\n transform-origin: center;\n}\n\n._image {\n display: block;\n max-width: 100%;\n max-height: 60vh;\n object-fit: contain;\n /* Honor EXIF orientation of camera photos. */\n image-orientation: from-image;\n -webkit-user-drag: none;\n}\n\n/* The crop rectangle. The huge spread box-shadow dims everything outside it. */\n._crop {\n position: absolute;\n box-sizing: border-box;\n border: var(--ui-border-width) solid var(--ui-c-static);\n box-shadow: 0 0 0 100vmax rgba(var(--ui-c-background-value), 0.6);\n cursor: move;\n touch-action: none;\n\n /* The crop is a tab stop (arrows pan, Shift+arrows resize). The ring is\n the house focus colour ON TOP of the backdrop shadow — the shadow list\n keeps the dimmed surround, the outline says where the keys will land. */\n &:focus-visible {\n outline: calc(var(--ui-border-width) * 2) solid var(--ui-c-focus);\n outline-offset: calc(var(--ui-border-width) * -1);\n }\n}\n\n/* Rule-of-thirds guides (decorative, non-interactive). */\n._crop::before,\n._crop::after {\n content: '';\n position: absolute;\n pointer-events: none;\n opacity: 0.4;\n}\n._crop::before {\n top: 0;\n bottom: 0;\n left: 33.333%;\n right: 33.333%;\n border-left: 1px solid var(--ui-c-static);\n border-right: 1px solid var(--ui-c-static);\n}\n._crop::after {\n left: 0;\n right: 0;\n top: 33.333%;\n bottom: 33.333%;\n border-top: 1px solid var(--ui-c-static);\n border-bottom: 1px solid var(--ui-c-static);\n}\n\n._handle {\n position: absolute;\n width: calc(var(--ui-spacer) * 0.5);\n height: calc(var(--ui-spacer) * 0.5);\n background-color: var(--ui-c-static);\n border: 1px solid rgba(var(--ui-c-background-value), 0.8);\n touch-action: none;\n}\n\n._handle._nw {\n top: calc(var(--ui-spacer) * -0.25);\n left: calc(var(--ui-spacer) * -0.25);\n cursor: nwse-resize;\n}\n._handle._ne {\n top: calc(var(--ui-spacer) * -0.25);\n right: calc(var(--ui-spacer) * -0.25);\n cursor: nesw-resize;\n}\n._handle._sw {\n bottom: calc(var(--ui-spacer) * -0.25);\n left: calc(var(--ui-spacer) * -0.25);\n cursor: nesw-resize;\n}\n._handle._se {\n bottom: calc(var(--ui-spacer) * -0.25);\n right: calc(var(--ui-spacer) * -0.25);\n cursor: nwse-resize;\n}\n\n/* Edge midpoint handles. */\n._handle._n {\n top: calc(var(--ui-spacer) * -0.25);\n left: 50%;\n transform: translateX(-50%);\n cursor: ns-resize;\n}\n._handle._s {\n bottom: calc(var(--ui-spacer) * -0.25);\n left: 50%;\n transform: translateX(-50%);\n cursor: ns-resize;\n}\n._handle._w {\n left: calc(var(--ui-spacer) * -0.25);\n top: 50%;\n transform: translateY(-50%);\n cursor: ew-resize;\n}\n._handle._e {\n right: calc(var(--ui-spacer) * -0.25);\n top: 50%;\n transform: translateY(-50%);\n cursor: ew-resize;\n}\n\n/* Centre grip: pans the whole box; rounded to read as a move target. */\n._handle._center {\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n cursor: move;\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/molecules/image-editor/image-editor.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: contents;\n}\n\n/* Embedded variant: a normal block in the document flow. It fills the width it\n is given — the maximum width is set by the consumer from outside; the\n minimum emerges from the footer button row (flex-wrap as safety net). */\n:host(.embedded) {\n display: flex;\n flex-direction: column;\n gap: calc(var(--ui-spacer) * 0.5);\n width: 100%;\n}\n\n/* Embedded: no overlay edge to align to — the buttons sit centered. */\n:host(.embedded) ._footer {\n justify-content: center;\n}\n\n._body {\n display: flex;\n flex-direction: column;\n gap: calc(var(--ui-spacer) * 0.5);\n width: 100%;\n}\n\n/* Rejection notice (wrong type / too big) — filled warn box like the app errors. */\n._error {\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/* View mode: current cover or an empty placeholder. */\n._view {\n display: flex;\n justify-content: center;\n}\n\n._current {\n display: block;\n max-width: 100%;\n max-height: 60vh;\n object-fit: contain;\n border-radius: var(--ui-border-radius);\n image-orientation: from-image;\n}\n\n._empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n /* Centred in a placeholder area that keeps some surface: without a minimum\n the editor collapses to a flat strip when there is no image yet, which\n looks broken next to the same editor holding a picture. Consumers can\n give it a concrete shape (e.g. an aspect-ratio) on top of this. */\n justify-content: center;\n min-height: 16rem;\n gap: calc(var(--ui-spacer) * 0.25);\n padding: calc(var(--ui-spacer) * 2);\n color: var(--ui-c-default);\n opacity: 0.6;\n}\n\n._empty p {\n margin: 0;\n}\n\n/* Footer button row, right-aligned like the overlay Save example. */\n._footer {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: calc(var(--ui-spacer) * 0.5);\n width: 100%;\n}\n\n._footer button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Keep the grey surface identical when disabled (the base :disabled style swaps\n it for the page background); the disabled state is signalled by dimming just\n the icon, in its normal colour.\n The base :disabled rule pairs that surface swap with `color: --ui-c-fourthly`\n for the text. Restoring only the background — to the same --ui-c-fourthly the\n grey surface uses — would leave the icon tinted the exact colour it sits on,\n so it disappears (tickets#247). Restore the icon\'s normal colour as well; the\n per-action tints below (delete red, save green while active) still override\n it, and `opacity` alone carries the "disabled" signal. */\n._footer button:disabled {\n background-color: var(--ui-c-fourthly);\n color: var(--ui-c-default);\n}\n._footer button:disabled .ui-icon {\n opacity: 0.4;\n}\n\n/* Grey buttons (the base `.ui` surface); only delete and save are tinted per\n action using the shared design tokens — upload, crop and cancel stay neutral. */\n._footer ._delete .ui-icon {\n color: var(--ui-c-error);\n}\n/* Green only while the save action is available; disabled falls back to the\n neutral (dimmed) icon colour. */\n._footer ._save:not(:disabled) .ui-icon {\n color: var(--ui-c-success);\n}\n}\n',""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|