@maggioli-design-system/magma 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +45 -0
- package/agents/lint.md +20 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/magma-components.cjs.js +1 -1
- package/dist/cjs/mds-banner_3.cjs.entry.js +7 -6
- package/dist/cjs/mds-book.cjs.entry.js +53 -5
- package/dist/cjs/mds-calendar_2.cjs.entry.js +1 -1
- package/dist/cjs/mds-emoji.cjs.entry.js +39 -9
- package/dist/cjs/mds-filter.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-range.cjs.entry.js +1 -1
- package/dist/cjs/mds-modal.cjs.entry.js +1 -1
- package/dist/cjs/mds-push-notification-item.cjs.entry.js +17 -4
- package/dist/cjs/mds-toast.cjs.entry.js +2 -2
- package/dist/collection/components/mds-accordion/AGENTS.md +2 -1
- package/dist/collection/components/mds-accordion/documentation.json +4 -2
- package/dist/collection/components/mds-accordion-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-accordion-item/documentation.json +4 -2
- package/dist/collection/components/mds-accordion-timer/AGENTS.md +2 -1
- package/dist/collection/components/mds-accordion-timer/documentation.json +4 -2
- package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-accordion-timer-item/documentation.json +4 -2
- package/dist/collection/components/mds-author/AGENTS.md +2 -1
- package/dist/collection/components/mds-author/documentation.json +4 -2
- package/dist/collection/components/mds-avatar/AGENTS.md +2 -1
- package/dist/collection/components/mds-avatar/documentation.json +4 -2
- package/dist/collection/components/mds-avatar-stack/AGENTS.md +2 -1
- package/dist/collection/components/mds-avatar-stack/documentation.json +4 -2
- package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-avatar-stack-item/documentation.json +4 -2
- package/dist/collection/components/mds-badge/AGENTS.md +2 -1
- package/dist/collection/components/mds-badge/documentation.json +4 -2
- package/dist/collection/components/mds-banner/AGENTS.md +7 -4
- package/dist/collection/components/mds-banner/antipattern.md +5 -5
- package/dist/collection/components/mds-banner/documentation.json +40 -6
- package/dist/collection/components/mds-banner/mds-banner.css +7 -10
- package/dist/collection/components/mds-banner/mds-banner.js +30 -7
- package/dist/collection/components/mds-banner/pattern.md +4 -4
- package/dist/collection/components/mds-benchmark-bar/AGENTS.md +2 -1
- package/dist/collection/components/mds-benchmark-bar/documentation.json +4 -2
- package/dist/collection/components/mds-bibliography/AGENTS.md +2 -1
- package/dist/collection/components/mds-bibliography/documentation.json +4 -2
- package/dist/collection/components/mds-book/AGENTS.md +9 -4
- package/dist/collection/components/mds-book/documentation.json +46 -6
- package/dist/collection/components/mds-book/mds-book.css +91 -7
- package/dist/collection/components/mds-book/mds-book.js +79 -7
- package/dist/collection/components/mds-book/pattern.md +14 -0
- package/dist/collection/components/mds-breadcrumb/AGENTS.md +2 -1
- package/dist/collection/components/mds-breadcrumb/documentation.json +4 -2
- package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-breadcrumb-item/documentation.json +4 -2
- package/dist/collection/components/mds-button/AGENTS.md +2 -1
- package/dist/collection/components/mds-button/documentation.json +4 -2
- package/dist/collection/components/mds-button-dropdown/AGENTS.md +2 -1
- package/dist/collection/components/mds-button-dropdown/documentation.json +4 -2
- package/dist/collection/components/mds-button-group/AGENTS.md +2 -1
- package/dist/collection/components/mds-button-group/documentation.json +4 -2
- package/dist/collection/components/mds-calendar/AGENTS.md +2 -1
- package/dist/collection/components/mds-calendar/documentation.json +4 -2
- package/dist/collection/components/mds-calendar-cell/AGENTS.md +2 -1
- package/dist/collection/components/mds-calendar-cell/documentation.json +4 -2
- package/dist/collection/components/mds-calendar-cell/mds-calendar-cell.css +4 -1
- package/dist/collection/components/mds-card/AGENTS.md +2 -1
- package/dist/collection/components/mds-card/documentation.json +4 -2
- package/dist/collection/components/mds-card-content/AGENTS.md +2 -1
- package/dist/collection/components/mds-card-content/documentation.json +4 -2
- package/dist/collection/components/mds-card-footer/AGENTS.md +2 -1
- package/dist/collection/components/mds-card-footer/documentation.json +4 -2
- package/dist/collection/components/mds-card-header/AGENTS.md +2 -1
- package/dist/collection/components/mds-card-header/documentation.json +4 -2
- package/dist/collection/components/mds-card-media/AGENTS.md +2 -1
- package/dist/collection/components/mds-card-media/documentation.json +4 -2
- package/dist/collection/components/mds-chip/AGENTS.md +2 -1
- package/dist/collection/components/mds-chip/documentation.json +4 -2
- package/dist/collection/components/mds-details/AGENTS.md +2 -1
- package/dist/collection/components/mds-details/documentation.json +4 -2
- package/dist/collection/components/mds-dropdown/AGENTS.md +2 -1
- package/dist/collection/components/mds-dropdown/documentation.json +4 -2
- package/dist/collection/components/mds-emoji/AGENTS.md +2 -1
- package/dist/collection/components/mds-emoji/asset/simi.svg +1 -1
- package/dist/collection/components/mds-emoji/documentation.json +4 -2
- package/dist/collection/components/mds-emoji/mds-emoji.js +38 -8
- package/dist/collection/components/mds-entity/AGENTS.md +2 -1
- package/dist/collection/components/mds-entity/documentation.json +4 -2
- package/dist/collection/components/mds-file/AGENTS.md +2 -1
- package/dist/collection/components/mds-file/documentation.json +4 -2
- package/dist/collection/components/mds-file-preview/AGENTS.md +2 -1
- package/dist/collection/components/mds-file-preview/documentation.json +4 -2
- package/dist/collection/components/mds-filter/AGENTS.md +3 -2
- package/dist/collection/components/mds-filter/documentation.json +10 -2
- package/dist/collection/components/mds-filter/mds-filter.css +5 -1
- package/dist/collection/components/mds-filter-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-filter-item/documentation.json +4 -2
- package/dist/collection/components/mds-header/AGENTS.md +2 -1
- package/dist/collection/components/mds-header/documentation.json +5 -3
- package/dist/collection/components/mds-header/pattern.md +3 -3
- package/dist/collection/components/mds-header-bar/AGENTS.md +2 -1
- package/dist/collection/components/mds-header-bar/documentation.json +4 -2
- package/dist/collection/components/mds-help/AGENTS.md +2 -1
- package/dist/collection/components/mds-help/documentation.json +4 -2
- package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +2 -1
- package/dist/collection/components/mds-horizontal-scroll/documentation.json +4 -2
- package/dist/collection/components/mds-hr/AGENTS.md +2 -1
- package/dist/collection/components/mds-hr/documentation.json +4 -2
- package/dist/collection/components/mds-icon/AGENTS.md +2 -1
- package/dist/collection/components/mds-icon/documentation.json +4 -2
- package/dist/collection/components/mds-img/AGENTS.md +2 -1
- package/dist/collection/components/mds-img/documentation.json +4 -2
- package/dist/collection/components/mds-input/AGENTS.md +2 -1
- package/dist/collection/components/mds-input/documentation.json +4 -2
- package/dist/collection/components/mds-input-date/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-date/documentation.json +4 -2
- package/dist/collection/components/mds-input-date-range/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-date-range/documentation.json +4 -2
- package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-date-range-preselection/documentation.json +4 -2
- package/dist/collection/components/mds-input-field/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-field/documentation.json +4 -2
- package/dist/collection/components/mds-input-otp/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-otp/documentation.json +5 -3
- package/dist/collection/components/mds-input-otp/pattern.md +1 -1
- package/dist/collection/components/mds-input-range/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-range/documentation.json +4 -2
- package/dist/collection/components/mds-input-range/mds-input-range.css +7 -5
- package/dist/collection/components/mds-input-select/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-select/documentation.json +4 -2
- package/dist/collection/components/mds-input-switch/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-switch/documentation.json +4 -2
- package/dist/collection/components/mds-input-tip/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-tip/documentation.json +4 -2
- package/dist/collection/components/mds-input-tip-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-tip-item/documentation.json +4 -2
- package/dist/collection/components/mds-input-upload/AGENTS.md +2 -1
- package/dist/collection/components/mds-input-upload/documentation.json +4 -2
- package/dist/collection/components/mds-keyboard/AGENTS.md +2 -1
- package/dist/collection/components/mds-keyboard/documentation.json +4 -2
- package/dist/collection/components/mds-keyboard-key/AGENTS.md +2 -1
- package/dist/collection/components/mds-keyboard-key/documentation.json +4 -2
- package/dist/collection/components/mds-kpi/AGENTS.md +2 -1
- package/dist/collection/components/mds-kpi/documentation.json +4 -2
- package/dist/collection/components/mds-kpi-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-kpi-item/documentation.json +4 -2
- package/dist/collection/components/mds-label/AGENTS.md +2 -1
- package/dist/collection/components/mds-label/documentation.json +4 -2
- package/dist/collection/components/mds-link/AGENTS.md +2 -1
- package/dist/collection/components/mds-link/documentation.json +4 -2
- package/dist/collection/components/mds-list/AGENTS.md +2 -1
- package/dist/collection/components/mds-list/documentation.json +4 -2
- package/dist/collection/components/mds-list-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-list-item/documentation.json +4 -2
- package/dist/collection/components/mds-mention/AGENTS.md +2 -1
- package/dist/collection/components/mds-mention/documentation.json +4 -2
- package/dist/collection/components/mds-modal/AGENTS.md +5 -1
- package/dist/collection/components/mds-modal/documentation.json +5 -3
- package/dist/collection/components/mds-modal/mds-modal.css +136 -3
- package/dist/collection/components/mds-note/AGENTS.md +2 -1
- package/dist/collection/components/mds-note/documentation.json +4 -2
- package/dist/collection/components/mds-notification/AGENTS.md +2 -1
- package/dist/collection/components/mds-notification/documentation.json +4 -2
- package/dist/collection/components/mds-paginator/AGENTS.md +2 -1
- package/dist/collection/components/mds-paginator/documentation.json +4 -2
- package/dist/collection/components/mds-paginator-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-paginator-item/documentation.json +4 -2
- package/dist/collection/components/mds-policy-ai/AGENTS.md +2 -1
- package/dist/collection/components/mds-policy-ai/documentation.json +4 -2
- package/dist/collection/components/mds-pref/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref/documentation.json +4 -2
- package/dist/collection/components/mds-pref-animation/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-animation/documentation.json +4 -2
- package/dist/collection/components/mds-pref-consumption/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-consumption/documentation.json +4 -2
- package/dist/collection/components/mds-pref-contrast/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-contrast/documentation.json +4 -2
- package/dist/collection/components/mds-pref-language/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-language/documentation.json +4 -2
- package/dist/collection/components/mds-pref-language-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-language-item/documentation.json +4 -2
- package/dist/collection/components/mds-pref-mode/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-mode/documentation.json +4 -2
- package/dist/collection/components/mds-pref-theme/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-theme/documentation.json +4 -2
- package/dist/collection/components/mds-pref-theme-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-pref-theme-item/documentation.json +4 -2
- package/dist/collection/components/mds-price-table/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-features/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-features/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-features-cell/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-features-row/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-features-row/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-header/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-header/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-list/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-list/documentation.json +4 -2
- package/dist/collection/components/mds-price-table-list-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-price-table-list-item/documentation.json +4 -2
- package/dist/collection/components/mds-progress/AGENTS.md +2 -1
- package/dist/collection/components/mds-progress/documentation.json +4 -2
- package/dist/collection/components/mds-push-notification/AGENTS.md +3 -2
- package/dist/collection/components/mds-push-notification/documentation.json +6 -4
- package/dist/collection/components/mds-push-notification/pattern.md +2 -2
- package/dist/collection/components/mds-push-notification-item/AGENTS.md +6 -3
- package/dist/collection/components/mds-push-notification-item/documentation.json +38 -5
- package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.css +1 -0
- package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.js +40 -5
- package/dist/collection/components/mds-push-notification-item/pattern.md +3 -3
- package/dist/collection/components/mds-quote/AGENTS.md +2 -1
- package/dist/collection/components/mds-quote/documentation.json +4 -2
- package/dist/collection/components/mds-radial-menu/AGENTS.md +2 -1
- package/dist/collection/components/mds-radial-menu/documentation.json +4 -2
- package/dist/collection/components/mds-radial-menu-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-radial-menu-item/documentation.json +4 -2
- package/dist/collection/components/mds-radial-progress/AGENTS.md +2 -1
- package/dist/collection/components/mds-radial-progress/documentation.json +4 -2
- package/dist/collection/components/mds-separator/AGENTS.md +2 -1
- package/dist/collection/components/mds-separator/documentation.json +4 -2
- package/dist/collection/components/mds-spinner/AGENTS.md +2 -1
- package/dist/collection/components/mds-spinner/documentation.json +5 -3
- package/dist/collection/components/mds-spinner/pattern.md +9 -6
- package/dist/collection/components/mds-status-bar/AGENTS.md +2 -1
- package/dist/collection/components/mds-status-bar/documentation.json +4 -2
- package/dist/collection/components/mds-stepper-bar/AGENTS.md +2 -1
- package/dist/collection/components/mds-stepper-bar/documentation.json +4 -2
- package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-stepper-bar-item/documentation.json +4 -2
- package/dist/collection/components/mds-tab/AGENTS.md +2 -1
- package/dist/collection/components/mds-tab/documentation.json +4 -2
- package/dist/collection/components/mds-tab-bar/AGENTS.md +2 -1
- package/dist/collection/components/mds-tab-bar/documentation.json +4 -2
- package/dist/collection/components/mds-tab-bar-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-tab-bar-item/documentation.json +4 -2
- package/dist/collection/components/mds-tab-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-tab-item/documentation.json +4 -2
- package/dist/collection/components/mds-table/AGENTS.md +2 -1
- package/dist/collection/components/mds-table/documentation.json +4 -2
- package/dist/collection/components/mds-table-body/AGENTS.md +2 -1
- package/dist/collection/components/mds-table-body/documentation.json +4 -2
- package/dist/collection/components/mds-table-cell/AGENTS.md +2 -1
- package/dist/collection/components/mds-table-cell/documentation.json +4 -2
- package/dist/collection/components/mds-table-footer/AGENTS.md +2 -1
- package/dist/collection/components/mds-table-footer/documentation.json +4 -2
- package/dist/collection/components/mds-table-header/AGENTS.md +2 -1
- package/dist/collection/components/mds-table-header/documentation.json +4 -2
- package/dist/collection/components/mds-table-header-cell/AGENTS.md +2 -1
- package/dist/collection/components/mds-table-header-cell/documentation.json +4 -2
- package/dist/collection/components/mds-table-row/AGENTS.md +7 -2
- package/dist/collection/components/mds-table-row/documentation.json +11 -3
- package/dist/collection/components/mds-table-row/mds-table-row.css +1 -0
- package/dist/collection/components/mds-table-row/pattern.md +14 -1
- package/dist/collection/components/mds-text/AGENTS.md +2 -1
- package/dist/collection/components/mds-text/documentation.json +4 -2
- package/dist/collection/components/mds-toast/AGENTS.md +8 -5
- package/dist/collection/components/mds-toast/antipattern.md +2 -2
- package/dist/collection/components/mds-toast/documentation.json +40 -6
- package/dist/collection/components/mds-toast/mds-toast.js +26 -4
- package/dist/collection/components/mds-toast/pattern.md +2 -2
- package/dist/collection/components/mds-toast-region/AGENTS.md +2 -1
- package/dist/collection/components/mds-toast-region/documentation.json +5 -3
- package/dist/collection/components/mds-toast-region/pattern.md +10 -2
- package/dist/collection/components/mds-tooltip/AGENTS.md +2 -1
- package/dist/collection/components/mds-tooltip/documentation.json +4 -2
- package/dist/collection/components/mds-tree/AGENTS.md +3 -2
- package/dist/collection/components/mds-tree/documentation.json +5 -3
- package/dist/collection/components/mds-tree/pattern.md +13 -13
- package/dist/collection/components/mds-tree-item/AGENTS.md +2 -1
- package/dist/collection/components/mds-tree-item/documentation.json +4 -2
- package/dist/collection/components/mds-url-view/AGENTS.md +2 -1
- package/dist/collection/components/mds-url-view/documentation.json +4 -2
- package/dist/collection/components/mds-usage/AGENTS.md +2 -1
- package/dist/collection/components/mds-usage/documentation.json +4 -2
- package/dist/collection/components/mds-video-wall/AGENTS.md +2 -1
- package/dist/collection/components/mds-video-wall/documentation.json +4 -2
- package/dist/collection/components/mds-zero/AGENTS.md +2 -1
- package/dist/collection/components/mds-zero/documentation.json +4 -2
- package/dist/components/mds-banner.js +1 -1
- package/dist/components/mds-book.js +1 -1
- package/dist/components/mds-calendar-cell.js +1 -1
- package/dist/components/mds-calendar.js +1 -1
- package/dist/components/mds-emoji.js +1 -1
- package/dist/components/mds-filter.js +1 -1
- package/dist/components/mds-header.js +1 -1
- package/dist/components/mds-input-date-range.js +1 -1
- package/dist/components/mds-input-date.js +1 -1
- package/dist/components/mds-input-range.js +1 -1
- package/dist/components/mds-modal.js +1 -1
- package/dist/components/mds-policy-ai.js +1 -1
- package/dist/components/mds-push-notification-item.js +1 -1
- package/dist/components/mds-status-bar.js +1 -1
- package/dist/components/mds-toast.js +1 -1
- package/dist/components/p-BeZGLnJJ.js +1 -0
- package/dist/components/p-Chk4rI7N.js +1 -0
- package/dist/components/{p-CNpL55c-.js → p-Cwg4vtOr.js} +1 -1
- package/dist/components/p-Dzkiu-es.js +1 -0
- package/dist/documentation.json +406 -143
- package/dist/esm/loader.js +1 -1
- package/dist/esm/magma-components.js +1 -1
- package/dist/esm/mds-banner_3.entry.js +7 -6
- package/dist/esm/mds-book.entry.js +53 -5
- package/dist/esm/mds-calendar_2.entry.js +1 -1
- package/dist/esm/mds-emoji.entry.js +39 -9
- package/dist/esm/mds-filter.entry.js +1 -1
- package/dist/esm/mds-input-range.entry.js +1 -1
- package/dist/esm/mds-modal.entry.js +1 -1
- package/dist/esm/mds-push-notification-item.entry.js +17 -4
- package/dist/esm/mds-toast.entry.js +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/magma-components.js +1 -1
- package/dist/esm-es5/mds-banner_3.entry.js +2 -2
- package/dist/esm-es5/mds-book.entry.js +33 -26
- package/dist/esm-es5/mds-calendar_2.entry.js +8 -8
- package/dist/esm-es5/mds-emoji.entry.js +40 -31
- package/dist/esm-es5/mds-filter.entry.js +1 -1
- package/dist/esm-es5/mds-input-range.entry.js +7 -7
- package/dist/esm-es5/mds-modal.entry.js +15 -15
- package/dist/esm-es5/mds-push-notification-item.entry.js +7 -3
- package/dist/esm-es5/mds-toast.entry.js +2 -2
- package/dist/hydrate/index.js +130 -32
- package/dist/hydrate/index.mjs +130 -32
- package/dist/lint/core/checks.d.ts +5 -0
- package/dist/lint/core/checks.js +17 -0
- package/dist/lint/core/data.d.ts +4 -1
- package/dist/lint/core/data.js +3 -1
- package/dist/lint/eslint/index.js +6 -4
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/{p-354a5b47.entry.js → p-02b106c2.entry.js} +1 -1
- package/dist/magma-components/{p-17ccfc01.system.entry.js → p-3bc65166.system.entry.js} +55 -48
- package/dist/magma-components/p-425ca155.entry.js +1 -0
- package/dist/magma-components/p-523f0c30.system.entry.js +80 -0
- package/dist/magma-components/{p-07d35da6.entry.js → p-5306606b.entry.js} +1 -1
- package/dist/magma-components/{p-1b67b149.system.entry.js → p-798f460b.system.entry.js} +1 -1
- package/dist/magma-components/{p-e5f893f9.system.entry.js → p-7db14777.system.entry.js} +1 -1
- package/dist/magma-components/{p-e8452cce.entry.js → p-8641b7b2.entry.js} +1 -1
- package/dist/magma-components/{p-3a7c4314.system.entry.js → p-95ccf46d.system.entry.js} +4 -4
- package/dist/magma-components/p-968a2237.entry.js +1 -0
- package/dist/magma-components/p-9dd9eadd.entry.js +1 -0
- package/dist/magma-components/p-B8zYiZQY.system.js +1 -1
- package/dist/magma-components/{p-160cd923.entry.js → p-a25327a1.entry.js} +1 -1
- package/dist/magma-components/p-a67381bf.entry.js +1 -0
- package/dist/magma-components/{p-c2c693ed.system.entry.js → p-b27cb1ac.system.entry.js} +14 -5
- package/dist/magma-components/{p-6df26141.system.entry.js → p-c0286dc3.system.entry.js} +1 -1
- package/dist/magma-components/p-c89060ec.system.entry.js +41 -0
- package/dist/magma-components/p-eb12be86.system.entry.js +24 -0
- package/dist/magma-components/p-ebeb3fff.entry.js +1 -0
- package/dist/stats.json +383 -139
- package/dist/types/components/mds-banner/mds-banner.d.ts +9 -2
- package/dist/types/components/mds-book/mds-book.d.ts +19 -2
- package/dist/types/components/mds-emoji/mds-emoji.d.ts +1 -0
- package/dist/types/components/mds-push-notification-item/mds-push-notification-item.d.ts +10 -1
- package/dist/types/components/mds-toast/mds-toast.d.ts +7 -1
- package/dist/types/components.d.ts +56 -12
- package/package.json +8 -8
- package/dist/components/p-B8hgyXdE.js +0 -1
- package/dist/components/p-CYK2Xr_v.js +0 -1
- package/dist/components/p-DbVGGhs_.js +0 -1
- package/dist/magma-components/p-14b13850.entry.js +0 -1
- package/dist/magma-components/p-386bb24e.system.entry.js +0 -41
- package/dist/magma-components/p-6d96d223.entry.js +0 -1
- package/dist/magma-components/p-79fd07e7.system.entry.js +0 -80
- package/dist/magma-components/p-7e7391fd.entry.js +0 -1
- package/dist/magma-components/p-df387755.entry.js +0 -1
- package/dist/magma-components/p-ee780f82.system.entry.js +0 -20
- package/dist/magma-components/p-f2211b1f.entry.js +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-tree/mds-tree.tsx",
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
],
|
|
24
25
|
"usage": {
|
|
25
26
|
"1. Description": "The `<mds-tree>` web component is the root container of the Magma Design System tree view, organizing a hierarchy of slotted `<mds-tree-item>` nodes into an expandable/collapsible structure. It owns no visual row of its own: it is a compound parent that configures, stacks, and propagates state to its children.\n\n#### Semantic Behavior\n\n- **Compound parent**: The default slot accepts only `<mds-tree-item>` elements; the tree itself renders nothing but the slot and acts as the configuration and coordination root for the hierarchy.\n- **Accessibility**: The tree is a list of its items (`role=\"list\"`, named by `label`), and the items of a branch are a list inside their item, so a screen reader announces the level and the size of every branch. It is not a `role=\"tree\"`, which promises arrow-key navigation and leaves no room for the actions of an item: every button stays a Tab stop. The items of a closed branch are out of the tab order.\n- **Depth seeding**: Its direct children are assigned `depth = 0`, which removes the branch connector lines from the first level; deeper levels are indented by their nesting.\n- **Cascading `expanded`**: `expanded` on the tree, set in the markup or changed at runtime, propagates to every descendant item, opening or collapsing the whole hierarchy at once - except children marked `async`, which are left for on-demand resolution. Items added later, a branch loaded on demand, take the tree's `expanded`, `toggle`, `togglePosition`, `appearance` and `truncate` when they arrive; the items already there keep the state the user gave them.\n- **Cascading `toggle` and `truncate`**: Changing the toggle icon or the truncation mode on the tree pushes the value down to all descendant items so the whole tree stays visually consistent.\n- **Async branches**: When `async` is set on an item, its branch is expected to resolve its children after the click rather than expanding from pre-rendered content; such items are excluded from the bulk `expanded` cascade.\n\n#### Properties & Visual Configurations\n\n- **`appearance`** controls whether the depth-indicating branch decorations (connector lines and dots) are drawn: `'depth'` shows the guide lines that visualize nesting; `'none'` removes them for a flat look.\n- **`actions`** governs how per-item action controls are surfaced: `'auto'` reveals them on hover, `'visible'` keeps them always shown.\n- **`toggle`** selects the expand/collapse glyph for every item - `'chevron'` for a generic disclosure arrow, `'folder'` for a file-explorer metaphor; **`togglePosition`** places that glyph at the `'left'` or `'right'` of the label.\n\n#### Other behavioral props\n\n- **`truncate`** sets how item labels overflow: `'word'` truncates the line, `'all'` clamps to multiple lines (paired with the `--mds-tree-line-clamp` custom property), `'none'` lets text wrap freely.\n- **`expanded`** is the only mutable, reflected state prop; set it on the root to open the entire tree on first render, or change it to open or close the entire tree programmatically.\n",
|
|
26
|
-
"2. Pattern": "Correct and idiomatic ways to use the `<mds-tree>` component, ordered from most common to most specialized. Patterns assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n####
|
|
27
|
+
"2. Pattern": "Correct and idiomatic ways to use the `<mds-tree>` component, ordered from most common to most specialized. Patterns assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Nested Hierarchy\n\nThe canonical form: the root-level `<mds-tree-item>` elements are direct children of `<mds-tree>`, and `<mds-tree-item>` elements placed inside other `<mds-tree-item>` elements build depth. The tree seeds `depth = 0` on direct children, which drops their branch connector lines; nested items are indented by their nesting.\n\n```html\n<mds-tree>\n <mds-tree-item label=\"Direzione generale\">\n <mds-tree-item label=\"Segreteria\">\n <mds-tree-item label=\"Protocollo\"></mds-tree-item>\n <mds-tree-item label=\"Archivio\"></mds-tree-item>\n </mds-tree-item>\n <mds-tree-item label=\"Risorse umane\"></mds-tree-item>\n </mds-tree-item>\n</mds-tree>\n```\n\n#### Flat List\n\nRoot-level nodes with no nesting are valid too, every `<mds-tree-item>` a direct child of `<mds-tree>`. With no branch to open the tree reads as a plain list.\n\n```html\n<mds-tree>\n <mds-tree-item label=\"Bacheca\"></mds-tree-item>\n <mds-tree-item label=\"Documenti\"></mds-tree-item>\n <mds-tree-item label=\"Impostazioni\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Programmatic Expand / Collapse\n\nChange `expanded` on `<mds-tree>` at runtime to open or close the entire hierarchy at once. This cascades to all descendant items except those marked `async`, also when `expanded` is set in the markup; to start with a single branch open set `expanded` on that item instead.\n\n```html\n<!-- A branch expanded on mount -->\n<mds-tree id=\"albero-pratiche\">\n <mds-tree-item label=\"Pratiche in corso\" expanded>\n <mds-tree-item label=\"Pratica 001/2025\"></mds-tree-item>\n <mds-tree-item label=\"Pratica 002/2025\"></mds-tree-item>\n </mds-tree-item>\n</mds-tree>\n\n<script>\n // Open or close the whole hierarchy later\n document.getElementById('albero-pratiche').expanded = true;\n</script>\n```\n\n#### Folder Toggle Style\n\nUse `toggle=\"folder\"` for file-explorer metaphors. The toggle icon switches between a closed and open folder glyph when the item is expanded or collapsed.\n\n```html\n<mds-tree toggle=\"folder\" actions=\"visible\">\n <mds-tree-item label=\"Fascicoli\">\n <mds-tree-item label=\"2025\">\n <mds-tree-item label=\"Fascicolo 001\"></mds-tree-item>\n <mds-tree-item label=\"Fascicolo 002\"></mds-tree-item>\n </mds-tree-item>\n <mds-tree-item label=\"2024\">\n <mds-tree-item label=\"Fascicolo 099\"></mds-tree-item>\n </mds-tree-item>\n </mds-tree-item>\n</mds-tree>\n```\n\n#### Right-Positioned Toggle for Navigation Menus\n\nSet `toggle-position=\"right\"` and `appearance=\"none\"` for a flat navigation-menu look where the expand chevron sits at the trailing edge of the row.\n\n```html\n<mds-tree toggle=\"chevron\" toggle-position=\"right\" appearance=\"none\">\n <mds-tree-item label=\"Protocollazione documenti\">\n <mds-tree-item label=\"Nuovo protocollo in arrivo\"></mds-tree-item>\n <mds-tree-item label=\"Nuovo protocollo in partenza\"></mds-tree-item>\n </mds-tree-item>\n <mds-tree-item label=\"Gestione allegati\">\n <mds-tree-item label=\"Scansione multipla\"></mds-tree-item>\n </mds-tree-item>\n</mds-tree>\n```\n\n#### Per-Item Actions via the `action` Slot\n\nSlot `<mds-button>` or `<mds-icon>` elements into each `<mds-tree-item>` with `slot=\"action\"`. Use `actions=\"auto\"` (default) to reveal them on hover, or `actions=\"visible\"` to always show them.\n\n```html\n<mds-tree actions=\"auto\">\n <mds-tree-item label=\"Relazione annuale 2025\">\n <mds-button\n slot=\"action\"\n icon=\"mi/baseline/download\"\n variant=\"dark\"\n tone=\"text\"\n title=\"Scarica\"\n ></mds-button>\n <mds-button\n slot=\"action\"\n icon=\"mi/baseline/more-vert\"\n variant=\"dark\"\n tone=\"text\"\n title=\"Altre opzioni\"\n ></mds-button>\n <mds-tree-item label=\"Capitolo 1\"></mds-tree-item>\n <mds-tree-item label=\"Capitolo 2\"></mds-tree-item>\n </mds-tree-item>\n</mds-tree>\n```\n\n#### Listening to Expand and Collapse Events\n\n`<mds-tree-item>` emits `mdsTreeItemCollapse` when it closes, and `mdsTreeItemExpand` only when an item marked `async` is asked to open (see below): opening a regular item emits nothing. Both events bubble, so one listener on the tree catches them. Listen via `addEventListener` - do not rely on native `change` / `click` bubbling through shadow DOM.\n\n```html\n<mds-tree id=\"albero-categorie\">\n <mds-tree-item label=\"Categoria A\">\n <mds-tree-item label=\"Sottocategoria A1\"></mds-tree-item>\n </mds-tree-item>\n</mds-tree>\n\n<script>\n // emitted only by items marked async\n document.getElementById('albero-categorie').addEventListener('mdsTreeItemExpand', (event) => {\n console.log('espanso:', event.detail.element.label);\n });\n\n document.getElementById('albero-categorie').addEventListener('mdsTreeItemCollapse', (event) => {\n console.log('collassato:', event.detail.element.label);\n });\n</script>\n```\n\n#### Async Lazy-Loading Branches\n\nMark a `<mds-tree-item>` with `async` when its children must be fetched on demand. The item shows a loading spinner on click and emits `mdsTreeItemExpand`. Resolve the branch by calling `element.expand()` on the item once data is ready, then remove `async` so that reopening the branch later does not fetch it again. An item looks for child items only when it first renders: one that has none then shows no toggle (and no spinner), and children appended later do not add it.\n\n```html\n<mds-tree>\n <mds-tree-item label=\"Comune di Rimini\" icon=\"mgg/historic-building\">\n <mds-tree-item label=\"Ufficio\" async class=\"ufficio-item\" icon=\"mi/baseline/desk\">\n <!-- children appended by the script below -->\n </mds-tree-item>\n </mds-tree-item>\n</mds-tree>\n\n<script>\n document.querySelector('.ufficio-item').addEventListener('mdsTreeItemExpand', async (event) => {\n const { element } = event.detail;\n if (!element.async) return;\n const children = await fetchChildren(element.label);\n children.forEach((nome) => {\n const item = document.createElement('mds-tree-item');\n item.label = nome;\n element.appendChild(item);\n });\n element.expand();\n element.async = false;\n });\n</script>\n```\n\n#### Icon on Individual Items\n\nUse the `icon` prop on `<mds-tree-item>` to show a glyph next to the label. Reference icons by their slug from the Magma icon library.\n\n```html\n<mds-tree toggle=\"chevron\">\n <mds-tree-item label=\"Comune di Rimini\" icon=\"mgg/historic-building\">\n <mds-tree-item label=\"Sindaco\" icon=\"mdi/handshake\">\n <mds-tree-item label=\"Segretario generale\" icon=\"mi/baseline/draw\"></mds-tree-item>\n </mds-tree-item>\n </mds-tree-item>\n</mds-tree>\n```\n\n#### Styling Customization\n\nThe only public CSS custom property of the tree is `--mds-tree-line-clamp`, the number of lines a label keeps with `truncate=\"all\"` (2 by default). The colours of the labels, branches and toggles, their spacing and the transitions follow the semantic roles, so dark mode and high-contrast modes keep working: shape the tree with its props (`appearance`, `toggle`, `toggle-position`, `truncate`, `actions`) instead. Set the property on the host element or a parent selector.\n\n```css\n.navigazione-laterale mds-tree {\n --mds-tree-line-clamp: 3;\n}\n```\n\nThe toggle of an open item takes its expanded colours, and the connectors of the branches follow the distance between the toggle and the label of every item.\n",
|
|
27
28
|
"3. Antipattern": "Common incorrect uses of `<mds-tree>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/anti-patterns.md`](../../../../agents/anti-patterns.md) - they apply here too but are not repeated.\n\n#### Do Not Put Non-`mds-tree-item` Elements Directly in `<mds-tree>`\n\nThe default slot of `<mds-tree>` accepts only `<mds-tree-item>` elements. Placing raw HTML or other components as direct children breaks depth seeding and compound communication.\n\n```html\n<!-- INCORRECT -->\n<mds-tree>\n <li>Voce uno</li>\n <li>Voce due</li>\n</mds-tree>\n\n<!-- CORRECT -->\n<mds-tree>\n <mds-tree-item label=\"Voce uno\"></mds-tree-item>\n <mds-tree-item label=\"Voce due\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Slot `<mds-tree-item>` Outside `<mds-tree>`\n\n`<mds-tree-item>` is a compound child and depends on `<mds-tree>` for depth seeding and prop cascading. Using it standalone produces undefined indentation and no toggle coordination.\n\n```html\n<!-- INCORRECT -->\n<div class=\"menu\">\n <mds-tree-item label=\"Impostazioni\">\n <mds-tree-item label=\"Profilo\"></mds-tree-item>\n </mds-tree-item>\n</div>\n\n<!-- CORRECT -->\n<mds-tree>\n <mds-tree-item label=\"Impostazioni\">\n <mds-tree-item label=\"Profilo\"></mds-tree-item>\n </mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Use the `action` Slot on `<mds-tree>` Itself\n\nThe `action` slot is defined on `<mds-tree-item>`, not on `<mds-tree>`. Placing content with `slot=\"action\"` on the root container has no effect; the slot is silently discarded.\n\n```html\n<!-- INCORRECT -->\n<mds-tree>\n <mds-button slot=\"action\" icon=\"mi/baseline/add\" title=\"Aggiungi\"></mds-button>\n <mds-tree-item label=\"Documenti\"></mds-tree-item>\n</mds-tree>\n\n<!-- CORRECT -->\n<mds-tree>\n <mds-tree-item label=\"Documenti\">\n <mds-button\n slot=\"action\"\n icon=\"mi/baseline/add\"\n variant=\"dark\"\n tone=\"text\"\n title=\"Aggiungi\"\n ></mds-button>\n </mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Listen for Native `click` or `change` to Detect Expand/Collapse\n\nA native `click` tells you neither which item changed nor whether it opened or closed. Use the documented events emitted by `<mds-tree-item>`: `mdsTreeItemCollapse` when an item closes, `mdsTreeItemExpand` when an item marked `async` is asked to open.\n\n```html\n<!-- INCORRECT -->\n<mds-tree id=\"albero\">\n <mds-tree-item label=\"Sezione A\">\n <mds-tree-item label=\"Voce 1\"></mds-tree-item>\n </mds-tree-item>\n</mds-tree>\n\n<script>\n // unreliable - a click says nothing about the expanded state\n document.getElementById('albero').addEventListener('click', handler);\n</script>\n\n<!-- CORRECT -->\n<script>\n document.getElementById('albero').addEventListener('mdsTreeItemCollapse', (event) => {\n console.log('collassato:', event.detail.element.label);\n });\n</script>\n```\n\n#### Do Not Set `expanded=\"false\"` to Collapse\n\nStencil reads the exact string `\"false\"` as `false`, but the attribute stays on the element, where attribute selectors and presence checks (`hasAttribute('expanded')`) still read the tree as expanded. Remove the attribute (or set the prop to `undefined`) to collapse.\n\n```html\n<!-- INCORRECT -->\n<mds-tree expanded=\"false\">\n <mds-tree-item label=\"Sezione\"></mds-tree-item>\n</mds-tree>\n\n<!-- CORRECT -->\n<mds-tree>\n <mds-tree-item label=\"Sezione\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Use Undocumented `::part()` Targets or `>>>` to Style Internals\n\nThe supported customization surface for `<mds-tree>` is its props and its public `--mds-tree-line-clamp` CSS custom property. Shadow-DOM piercing (`>>>`, `/deep/`) is not supported and `<mds-tree>` exposes no `::part()`. Coupling to internal selectors will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-tree >>> .header {\n background: red;\n}\n\n/* CORRECT */\nmds-tree {\n --mds-tree-line-clamp: 3;\n}\n```\n\n#### Do Not Wrap `<mds-tree-item>` in an Extra Div to Add Spacing\n\nInserting wrapper elements breaks the compound slot protocol - `<mds-tree>` communicates with items via `querySelectorAll` and slot assignment, and wrappers interrupt both. Keep the items as direct children: the tree sets their spacing itself, and it has no public CSS custom property for it.\n\n```html\n<!-- INCORRECT -->\n<mds-tree>\n <div style=\"margin-bottom: 8px;\">\n <mds-tree-item label=\"Categoria A\"></mds-tree-item>\n </div>\n <div style=\"margin-bottom: 8px;\">\n <mds-tree-item label=\"Categoria B\"></mds-tree-item>\n </div>\n</mds-tree>\n\n<!-- CORRECT -->\n<mds-tree>\n <mds-tree-item label=\"Categoria A\"></mds-tree-item>\n <mds-tree-item label=\"Categoria B\"></mds-tree-item>\n</mds-tree>\n```\n"
|
|
28
29
|
},
|
|
29
30
|
"props": [
|
|
@@ -504,7 +505,8 @@
|
|
|
504
505
|
"states": [],
|
|
505
506
|
"dependents": [],
|
|
506
507
|
"dependencies": [],
|
|
507
|
-
"dependencyGraph": {}
|
|
508
|
+
"dependencyGraph": {},
|
|
509
|
+
"storybook": "ui-tree--docs"
|
|
508
510
|
}
|
|
509
511
|
]
|
|
510
512
|
}
|
|
@@ -9,21 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
Correct and idiomatic ways to use the `<mds-tree>` component, ordered from most common to most specialized. Patterns assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).
|
|
11
11
|
|
|
12
|
-
#### Minimal Flat List
|
|
13
|
-
|
|
14
|
-
The simplest usage: a list of root-level nodes with no nesting. Every `<mds-tree-item>` must be a direct child of `<mds-tree>`.
|
|
15
|
-
|
|
16
|
-
```html
|
|
17
|
-
<mds-tree>
|
|
18
|
-
<mds-tree-item label="Bacheca"></mds-tree-item>
|
|
19
|
-
<mds-tree-item label="Documenti"></mds-tree-item>
|
|
20
|
-
<mds-tree-item label="Impostazioni"></mds-tree-item>
|
|
21
|
-
</mds-tree>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
12
|
#### Nested Hierarchy
|
|
25
13
|
|
|
26
|
-
|
|
14
|
+
The canonical form: the root-level `<mds-tree-item>` elements are direct children of `<mds-tree>`, and `<mds-tree-item>` elements placed inside other `<mds-tree-item>` elements build depth. The tree seeds `depth = 0` on direct children, which drops their branch connector lines; nested items are indented by their nesting.
|
|
27
15
|
|
|
28
16
|
```html
|
|
29
17
|
<mds-tree>
|
|
@@ -37,6 +25,18 @@ Place `<mds-tree-item>` elements inside other `<mds-tree-item>` elements to buil
|
|
|
37
25
|
</mds-tree>
|
|
38
26
|
```
|
|
39
27
|
|
|
28
|
+
#### Flat List
|
|
29
|
+
|
|
30
|
+
Root-level nodes with no nesting are valid too, every `<mds-tree-item>` a direct child of `<mds-tree>`. With no branch to open the tree reads as a plain list.
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<mds-tree>
|
|
34
|
+
<mds-tree-item label="Bacheca"></mds-tree-item>
|
|
35
|
+
<mds-tree-item label="Documenti"></mds-tree-item>
|
|
36
|
+
<mds-tree-item label="Impostazioni"></mds-tree-item>
|
|
37
|
+
</mds-tree>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
40
|
#### Programmatic Expand / Collapse
|
|
41
41
|
|
|
42
42
|
Change `expanded` on `<mds-tree>` at runtime to open or close the entire hierarchy at once. This cascades to all descendant items except those marked `async`, also when `expanded` is set in the markup; to start with a single branch open set `expanded` on that item instead.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-tree-item
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-tree-item>` web component is the node primitive of the Magma Design System tree view: it represents a single labeled, expandable/collapsible entry inside an [`<mds-tree>`](../mds-tree/AGENTS.md) and is also the recursive container for its own descendants. It replaces the role of an `<li>` within a nested disclosure list.
|
|
12
12
|
|
|
@@ -34,6 +34,7 @@ The `<mds-tree-item>` web component is the node primitive of the Magma Design Sy
|
|
|
34
34
|
|
|
35
35
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
36
36
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
37
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-tree-tree-item--docs) - the live examples, in the published Storybook of `main`
|
|
37
38
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
38
39
|
|
|
39
40
|
## Props
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-tree-item/mds-tree-item.tsx",
|
|
@@ -674,7 +675,8 @@
|
|
|
674
675
|
"mds-icon",
|
|
675
676
|
"mds-text"
|
|
676
677
|
]
|
|
677
|
-
}
|
|
678
|
+
},
|
|
679
|
+
"storybook": "ui-tree-tree-item--docs"
|
|
678
680
|
}
|
|
679
681
|
]
|
|
680
682
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-url-view
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-url-view>` web component renders an embedded preview of an external web page inside a framed browser-like window, wrapping a native `<iframe>` with a titled header, an identifying icon, and a dismiss control. It is the Magma way to surface remote content (typically inside a `mds-modal`) without hand-building chrome around the raw iframe.
|
|
12
12
|
|
|
@@ -31,6 +31,7 @@ This component does not expose the shared `variant` / `tone` ladders ([`agents/v
|
|
|
31
31
|
|
|
32
32
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
33
33
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
34
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-url-view--docs) - the live examples, in the published Storybook of `main`
|
|
34
35
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
35
36
|
|
|
36
37
|
## Props
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-url-view/mds-url-view.tsx",
|
|
@@ -213,7 +214,8 @@
|
|
|
213
214
|
"mds-icon",
|
|
214
215
|
"mds-text"
|
|
215
216
|
]
|
|
216
|
-
}
|
|
217
|
+
},
|
|
218
|
+
"storybook": "ui-url-view--docs"
|
|
217
219
|
}
|
|
218
220
|
]
|
|
219
221
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-usage
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-usage>` web component is a documentation-oriented annotation block of the Magma Design System used to frame example content as a recommendation, a warning, or an informational note. It wraps slotted content in a labelled, status-colored container and has no native HTML primitive equivalent - it is a presentational guidance device, typically used inside design-system docs and Storybook.
|
|
12
12
|
|
|
@@ -37,6 +37,7 @@ The `variant` is reflected on the host, where the styles read it, so it colors t
|
|
|
37
37
|
|
|
38
38
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
39
39
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
40
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-usage--docs) - the live examples, in the published Storybook of `main`
|
|
40
41
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
41
42
|
|
|
42
43
|
## Props
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-usage/mds-usage.tsx",
|
|
@@ -195,7 +196,8 @@
|
|
|
195
196
|
"mds-icon",
|
|
196
197
|
"mds-text"
|
|
197
198
|
]
|
|
198
|
-
}
|
|
199
|
+
},
|
|
200
|
+
"storybook": "ui-usage--docs"
|
|
199
201
|
}
|
|
200
202
|
]
|
|
201
203
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-video-wall
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-video-wall>` web component is the Magma Design System's full-bleed background video surface, used to render an autoplaying, looping ambient video behind foreground content. It wraps the native `<video>` element, adding an optional grain/noise overlay and a dedicated content layer for captions or call-to-action overlays.
|
|
12
12
|
|
|
@@ -34,6 +34,7 @@ This component does not use the shared `variant` / `tone` ladders; its props map
|
|
|
34
34
|
|
|
35
35
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
36
36
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
37
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-video-wall--docs) - the live examples, in the published Storybook of `main`
|
|
37
38
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
38
39
|
|
|
39
40
|
## Props
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-video-wall/mds-video-wall.tsx",
|
|
@@ -318,7 +319,8 @@
|
|
|
318
319
|
"states": [],
|
|
319
320
|
"dependents": [],
|
|
320
321
|
"dependencies": [],
|
|
321
|
-
"dependencyGraph": {}
|
|
322
|
+
"dependencyGraph": {},
|
|
323
|
+
"storybook": "ui-video-wall--docs"
|
|
322
324
|
}
|
|
323
325
|
]
|
|
324
326
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# mds-zero
|
|
8
8
|
|
|
9
|
-
> `@maggioli-design-system/magma` 2.
|
|
9
|
+
> `@maggioli-design-system/magma` 2.9.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.
|
|
10
10
|
|
|
11
11
|
The `<mds-zero>` web component is the empty-state (zero-data) panel of the Magma Design System: a centered, vertically stacked layout that pairs an illustration, explanatory copy, and a call-to-action to guide users when a list, search, or section has no content to show. It is a pure structural container with no props - composition happens entirely through its slots.
|
|
12
12
|
|
|
@@ -31,6 +31,7 @@ The `contents` and `actions` shadow parts expose the two wrapper zones for consu
|
|
|
31
31
|
|
|
32
32
|
- [`pattern.md`](pattern.md) - correct usage, with examples
|
|
33
33
|
- [`antipattern.md`](antipattern.md) - mistakes to avoid
|
|
34
|
+
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-zero--docs) - the live examples, in the published Storybook of `main`
|
|
34
35
|
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`anti-patterns.md`](../../../../agents/anti-patterns.md) - the rules shared by every component
|
|
35
36
|
|
|
36
37
|
## Slots
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-10-
|
|
2
|
+
"timestamp": "2026-10-27T10:28:31",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.45.2",
|
|
6
6
|
"typescriptVersion": "5.8.3"
|
|
7
7
|
},
|
|
8
|
+
"storybook": "https://magma-design-system.github.io/magma/storybook/",
|
|
8
9
|
"components": [
|
|
9
10
|
{
|
|
10
11
|
"filePath": "src/components/mds-zero/mds-zero.tsx",
|
|
@@ -81,7 +82,8 @@
|
|
|
81
82
|
"states": [],
|
|
82
83
|
"dependents": [],
|
|
83
84
|
"dependencies": [],
|
|
84
|
-
"dependencyGraph": {}
|
|
85
|
+
"dependencyGraph": {},
|
|
86
|
+
"storybook": "ui-zero--docs"
|
|
85
87
|
}
|
|
86
88
|
]
|
|
87
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as o,d as r}from"./p-
|
|
1
|
+
import{M as o,d as r}from"./p-Chk4rI7N.js";const s=o,p=r;export{s as MdsBanner,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as o,h as a,c as r,t as e,B as i}from"./p-TZJN-ygm.js";import{L as s}from"./p-CZjwSwe5.js";import{p as n}from"./p-CVRN4LDc.js";const p={a4:[21,29.7],a5:[14.8,21],b5:[17.6,25]},l=17/24,d=/^(\d+(?:\.\d+)?)x(\d+(?:\.\d+)?)$/,h=t=>(null!=t?t:"").trim().toLowerCase(),c=t=>{const o=h(t);if(Object.prototype.hasOwnProperty.call(p,o))return p[o];const a=d.exec(o);if(null===a)return;const r=Number(a[1]),e=Number(a[2]);return r>0&&e>0?[r,e]:void 0},b=t=>{const o=c(t);return void 0===o?void 0:o[0]/o[1]},v=t=>null!=t&&Number.isFinite(t)&&t>0?Math.max(4,Math.min(3e3,Math.round(t))):300,g={spine:{lay:0,tilt:-6,turn:28},"fore-edge":{lay:0,tilt:-6,turn:-28},front:{lay:0,tilt:0,turn:0},lying:{lay:90,tilt:-30,turn:0},"lying-turned":{lay:90,tilt:-34,turn:32}},f=t=>Object.assign({glare:0,lift:0},Object.prototype.hasOwnProperty.call(g,null!=t?t:"")?g[t]:g.spine),k=120,m=260,u=(t,o)=>t[0]*o[0]+t[1]*o[1]+t[2]*o[2],w=t=>t*Math.PI/180,y=(([t,o,a])=>{const r=Math.hypot(t,o,a);return[t/r,o/r,a/r]})([.15,-.4,.9]),q=([t,o,a],r)=>{const e=w(r);return[t,o*Math.cos(e)-a*Math.sin(e),o*Math.sin(e)+a*Math.cos(e)]},x=(t,{lay:o,tilt:a,turn:r})=>q((([t,o,a],r)=>{const e=w(r);return[t*Math.cos(e)+a*Math.sin(e),o,-t*Math.sin(e)+a*Math.cos(e)]})(q(t,o),r),a),M=t=>[Math.sin(w(t)),0,Math.cos(w(t))],z={bottom:[0,1,0],fore:M(90),front:M(0),spine:M(-90),top:[0,-1,0]},H=(t,o,a)=>Math.max(-1,Math.min(1,1.4*(u(x(t,o),y)-a))),$=(t,o)=>{const a=(.25+o*o)/(2*o),r=a-o,e=Math.asin(.5/a);return{angle:o=>e-2*e*o/t,point:t=>({x:r-a*Math.cos(t),z:a*Math.sin(t)-.5})}},X=(()=>{const{angle:t,point:o}=$(6,.14);return Array.from({length:6},((a,r)=>{const e=t(r),i=t(r+1),s=o(e),n=o(i),p=(e+i)/2;return{width:1.04*Math.hypot(s.x-n.x,s.z-n.z),x:(s.x+n.x)/2,yaw:180*Math.atan2(-Math.cos(p),Math.sin(p))/Math.PI,z:(s.z+n.z)/2}}))})(),j=(()=>{const{angle:t,point:o}=$(6,.14),a=t=>(100*t).toFixed(3)+"%";return`polygon(${Array.from({length:7},((r,e)=>{const{x:i,z:s}=o(t(e));return`${a(1+i/.14)} ${a(-s)}`})).join(", ")})`})();var E={book:"Βιβλίο",byAuthor:"{{{name}}}, {{{author}}}"},C={book:"Book",byAuthor:"{{{name}}} by {{{author}}}"},L={book:"Libro",byAuthor:"{{{name}}} de {{{author}}}"},A={book:"Libro",byAuthor:"{{{name}}} di {{{author}}}"};const Y=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.imageError=!1,this.current=f(),this.dragged=!1,this.goal=f(),this.hovering=!1,this.pointer={x:0,y:0},this.slats=[],this.t=new s({el:E,en:C,es:L,it:A}),this.binding="paperback",this.format="auto",this.loading="lazy",this.pages=300,this.pose="spine",this.watchDrag=()=>{var t;null===(t=this.dragWatch)||void 0===t||t.abort(),this.dragWatch=new AbortController;const{signal:o}=this.dragWatch,a=()=>{this.hovering=!1,this.pointer={x:0,y:0},this.endDrag(!1)},r=t=>{null===t.relatedTarget&&a()};window.addEventListener("pointerout",r,{signal:o}),window.addEventListener("mouseout",r,{signal:o}),window.addEventListener("blur",a,{signal:o}),document.addEventListener("visibilitychange",(()=>document.hidden&&a()),{signal:o})},this.endDrag=t=>{var o,a;void 0!==this.drag&&(this.dragged=t,this.drag=void 0,null===(o=this.dragWatch)||void 0===o||o.abort(),this.dragWatch=void 0,null===(a=this.scene)||void 0===a||a.classList.remove("scene--dragging"),this.aim())},this.reducedMotion=()=>{const t=this.host.getAttribute("pref-animation");return"reduce"===t||(null===t||"system"===t)&&"function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches},this.consumption=()=>{var t;return null!==(t=this.host.getAttribute("pref-consumption"))&&void 0!==t?t:"high"},this.still=()=>this.reducedMotion()||"low"===this.consumption(),this.aim=()=>{const t=f(this.pose);if(this.still())return this.current=this.goal=t,void this.writePose();const o=this.hovering||void 0!==this.drag,a=void 0!==this.drag?1:this.hovering?.45:0;this.goal={glare:"high"===this.consumption()?a:0,lay:t.lay,lift:o?1:0,tilt:this.hovering?t.tilt-4*this.pointer.y:t.tilt,turn:void 0!==this.drag?this.goal.turn:this.hovering?t.turn+6*this.pointer.x:t.turn},this.wake()},this.wake=()=>{var t;null!==(t=this.frame)&&void 0!==t||(this.frame=requestAnimationFrame(this.tick))},this.tick=t=>{this.frame=void 0,this.current=((t,o,a)=>{const r=1-Math.exp(-a/(void 0===this.drag&&!this.hovering?m:k)),e=Object.assign({},t);for(const a of Object.keys(o)){e[a]+=(o[a]-t[a])*r;const i="glare"===a||"lift"===a?.002:.05;Math.abs(o[a]-e[a])<i&&(e[a]=o[a])}return e})(this.current,this.goal,void 0===this.lastTime?1e3/60:t-this.lastTime),this.writePose(),((t,o)=>Object.keys(t).every((a=>t[a]===o[a])))(this.current,this.goal)?this.lastTime=void 0:(this.lastTime=t,this.wake())},this.writePose=()=>{var t;const o=null===(t=this.scene)||void 0===t?void 0:t.style;if(!o)return;const a=f(this.pose),r=(t=>u(x(z.front,t),y))(a),{glare:e,lay:i,lift:s,tilt:n,turn:p}=this.current,l=((t,o)=>({bottom:H(z.bottom,t,o),fore:H(z.fore,t,o),front:H(z.front,t,o),spine:H(z.spine,t,o),top:H(z.top,t,o)}))(this.current,r);o.setProperty("--private-book-lay",i.toFixed(2)+"deg"),o.setProperty("--private-book-turn",p.toFixed(2)+"deg"),o.setProperty("--private-book-tilt",n.toFixed(2)+"deg"),o.setProperty("--private-book-lift",s.toFixed(3));const d=Math.max(0,Math.min(1,i/90));o.setProperty("--private-book-lie",d.toFixed(3)),o.setProperty("--private-book-stand",(1-d).toFixed(3)),o.setProperty("--private-book-glare",e.toFixed(3)),o.setProperty("--private-book-glare-x",((t,o)=>Math.max(0,Math.min(100,50+.8*(t-o.turn)+10*this.pointer.x)))(p,a).toFixed(1));for(const t of Object.keys(l))o.setProperty(`--private-book-${t}-light`,l[t].toFixed(3));const h=((t,o,a)=>t.map((t=>H(M(t),o,a))))(X.map((({yaw:t})=>t)),this.current,r);this.slats.forEach(((t,o)=>t.style.setProperty("--private-book-light",h[o].toFixed(3))))},this.warnInvalidFormat=t=>{(t=>{const o=h(t);return""===o||"auto"===o||void 0!==b(o)})(t)||console.warn(`mds-book: "${t}" is not a format, the book takes the proportions of its image. Use auto, a4, a5, b5 or WxH in centimetres`)},this.warnInvalidPages=t=>{(t=>null==t||Number.isFinite(t)&&t>0)(t)||console.warn(`mds-book: "${t}" is not a number of pages, the book is drawn with 300. Use a positive number, up to 3000`)},this.onLoad=t=>{const o=t.target;o.naturalWidth>0&&o.naturalHeight>0&&(this.imageRatio=o.naturalWidth/o.naturalHeight),this.coverUrl=o.currentSrc||o.src},this.onError=()=>{this.coverUrl=void 0,this.imageError=!0},this.hasImage=()=>{var t;return""!==(null!==(t=this.src)&&void 0!==t?t:"")&&!this.imageError},this.ratio=()=>{var t,o;return null!==(o=null!==(t=b(this.format))&&void 0!==t?t:this.imageRatio)&&void 0!==o?o:l},this.label=()=>{var t,o;if(null!=this.alt)return this.alt;const a=(null!==(t=this.name)&&void 0!==t?t:"").trim(),r=(null!==(o=this.author)&&void 0!==o?o:"").trim();return""!==r?this.t.get("byAuthor",{name:""!==a?a:this.t.get("book"),author:r}):""!==a?a:this.t.get("book")},this.hostRole=()=>{const t=this.label();return""===t?{role:"presentation"}:{role:"img","aria-label":t}},this.bookStyle=()=>{const t=(()=>{var t,o;return null!==(o=null===(t=c(this.format))||void 0===t?void 0:t[0])&&void 0!==o?o:17})(),o=((t,o)=>({board:o?.25/t:0,square:o?.3/t:0}))(t,"hardcover"===this.binding),a=t=>(100*t).toFixed(3)+"cqi",r={"--private-book-board":a(o.board),"--private-book-page-count":v(this.pages)+"","--private-book-square":a(o.square),"--private-book-width-mm":10*t+""};return void 0!==this.coverUrl&&this.hasImage()&&(r["--private-book-cover"]=(()=>`url("${this.coverUrl.replace(/[\\"]/g,"\\$&").replace(/[\n\r\f]/g,"")}")`)()),r},this.renderSpineText=()=>a("div",{class:"spine-text"},this.author&&a("span",{class:"spine-author"},this.author),this.name&&a("span",{class:"spine-name"},this.name),this.publisher&&a("span",{class:"spine-publisher"},this.publisher)),this.shade=()=>a("span",{class:"shade"}),this.renderHardcover=()=>[...["top","bottom"].flatMap((t=>[a("div",{key:`board-${t}-front`,class:`face board-${t} board-${t}--front lit-${t}`},this.shade()),a("div",{key:`board-${t}-back`,class:`face board-${t} board-${t}--back lit-${t}`},this.shade()),a("div",{key:"endpaper-"+t,class:`face endpaper endpaper--${t} lit-front`},this.shade()),a("div",{key:"pages-"+t,class:`face pages-${t} lit-${t}`},this.shade()),a("div",{key:"cap-"+t,class:`face cap cap--${t} lit-${t}`,style:{clipPath:j}},this.shade())])),a("div",{key:"board-fore-front",class:"face board-fore board-fore--front lit-fore"},this.shade()),a("div",{key:"board-fore-back",class:"face board-fore board-fore--back lit-fore"},this.shade()),a("div",{key:"endpaper-fore",class:"face endpaper endpaper--fore lit-front"},this.shade()),a("div",{key:"pages-fore",class:"face pages-fore lit-fore"},this.shade()),...X.map((({width:t,x:o,yaw:r,z:e},i)=>a("div",{key:"slat-"+i,class:"face slat",ref:t=>t&&(this.slats[i]=t),style:{"--private-book-slat-width":t+"","--private-book-slat-x":o+"","--private-book-slat-yaw":r+"deg","--private-book-slat-z":e+""}},this.shade()))),a("div",{key:"spine-label","aria-hidden":"true",class:"face spine-label"},this.renderSpineText())],this.renderPaperback=()=>[a("div",{key:"pages-top",class:"face pages-top pages-flush pages-flush--across lit-top"},this.shade()),a("div",{key:"pages-bottom",class:"face pages-bottom pages-flush pages-flush--across lit-bottom"},this.shade()),a("div",{key:"pages-fore",class:"face pages-fore pages-flush pages-flush--along lit-fore"},this.shade()),a("div",{key:"spine","aria-hidden":"true",class:"face spine lit-spine"},this.renderSpineText(),this.shade())]}formatHandler(t){this.warnInvalidFormat(t)}pagesHandler(t){this.warnInvalidPages(t)}poseHandler(){this.aim()}srcHandler(){this.coverUrl=void 0,this.imageError=!1,this.imageRatio=void 0}pointerEnterHandler(t){"touch"===t.pointerType||this.still()||(this.hovering=!0,this.aim())}pointerMoveHandler(t){var o,a;if(this.still())return;const{left:r,top:e,width:i,height:s}=this.host.getBoundingClientRect();if(0===i||0===s)return;const n=t=>Math.max(-1,Math.min(1,t));if("touch"!==t.pointerType&&(this.pointer={x:n((t.clientX-r)/i*2-1),y:n((t.clientY-e)/s*2-1)}),(null===(o=this.drag)||void 0===o?void 0:o.pointerId)===t.pointerId&&"touch"!==t.pointerType&&0===t.buttons&&this.endDrag(!1),(null===(a=this.drag)||void 0===a?void 0:a.pointerId)===t.pointerId){const o=t.clientX-this.drag.startX;Math.abs(o)>4&&(this.drag.moved=!0);const{max:a,min:r}=(t=>0===t.lay?{max:64,min:-64}:{max:t.turn+70,min:t.turn-70})(f(this.pose));return this.goal.turn=Math.max(r,Math.min(a,this.drag.startTurn+o/i*110)),void this.wake()}this.aim()}pointerDownHandler(t){var o;if(0===t.button&&!this.still()){this.dragged=!1,this.drag={moved:!1,pointerId:t.pointerId,startTurn:this.current.turn,startX:t.clientX};try{this.host.setPointerCapture(t.pointerId)}catch(t){}null===(o=this.scene)||void 0===o||o.classList.add("scene--dragging"),this.watchDrag(),this.aim()}}pointerUpHandler(t){var o;(null===(o=this.drag)||void 0===o?void 0:o.pointerId)===t.pointerId&&this.endDrag(this.drag.moved)}pointerLostHandler(t){var o;(null===(o=this.drag)||void 0===o?void 0:o.pointerId)===t.pointerId&&this.endDrag(!1)}pointerLeaveHandler(){void 0===this.drag&&(this.hovering=!1,this.pointer={x:0,y:0},this.aim())}clickHandler(t){this.dragged&&(this.dragged=!1,t.preventDefault(),t.stopPropagation())}componentWillLoad(){this.warnInvalidFormat(this.format),this.warnInvalidPages(this.pages),this.current=this.goal=f(this.pose)}componentDidRender(){i.isBrowser&&(this.still()&&(this.current=this.goal=f(this.pose)),this.writePose())}disconnectedCallback(){var t;void 0!==this.frame&&cancelAnimationFrame(this.frame),this.frame=void 0,this.drag=void 0,null===(t=this.dragWatch)||void 0===t||t.abort(),this.dragWatch=void 0,this.hovering=!1}render(){const t="hardcover"===this.binding;return t||(this.slats=[]),a(r,Object.assign({key:"bb31d3ccdd45d59a6586d179bec741c03f424137"},this.hostRole(),{"pref-animation":n.state.animation,"pref-consumption":n.state.consumption,style:{"--private-book-ratio":this.ratio()+""}}),a("div",{key:"d9f8342b3fbb727a4e8bf7fcc0bb8ef3ea2882bb",class:"scene",ref:t=>this.scene=t},a("div",{key:"49ed3560379bf7f7dfbc6a08674c87e80235b86f",class:"stage"},a("div",{key:"ab97382a831ca738280c51fed61c518fd536f597",class:{book:!0,"book--pending":this.hasImage()&&void 0===this.coverUrl},style:this.bookStyle()},a("div",{key:"8c91cb0b329bcf9bf6ab643fd3a0eef0722aba07",class:"floor floor--stand"}),a("div",{key:"e31e08f16ed68c3a7b43a12974ac46bb94312525",class:"floor floor--lie"}),a("div",{key:"ddc2cf056c231994f1baa01c6ebf1af6369c1459",class:"body"},a("div",{key:"6fa239a5ebfd2ec588db478faf6961cde3689950",class:"face front lit-front"},this.hasImage()?a("img",{alt:"","aria-hidden":"true",class:"cover",draggable:!1,loading:this.loading,onError:this.onError,onLoad:this.onLoad,part:"cover",src:this.src}):a("div",{"aria-hidden":"true",class:"drawn-cover"},this.author&&a("span",{class:"drawn-author"},this.author),this.name&&a("span",{class:"drawn-name"},this.name),this.publisher&&a("span",{class:"drawn-publisher"},this.publisher)),a("span",{key:"57fa73e7b9b201a245b2f0ae7ee00bb60e726556",class:"gloss"}),this.shade()),t?this.renderHardcover():this.renderPaperback())))))}get host(){return this}static get watchers(){return{format:[{formatHandler:0}],pages:[{pagesHandler:0}],pose:[{poseHandler:0}],src:[{srcHandler:0}]}}static get style(){return"@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}:host(:not(:is([hydrated],.hydrated))){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){cursor:auto;touch-action:auto}:host([pref-consumption=low]){cursor:auto;touch-action:auto}:host([pref-consumption=low]) .gloss,:host([pref-consumption=medium]) .gloss{display:none}:host([pref-consumption=low]) .scene,:host([pref-consumption=medium]) .scene{filter:none}:host{--mds-book-color:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-book-paper-color:#faf8f2;--mds-book-text-color:rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255)));--mds-book-page-weight-max:.05;--mds-book-page-weight-min:.1;--private-book-grain:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='a'%3E%3CfeTurbulence baseFrequency='1.1' numOctaves='2' stitchTiles='stitch' type='fractalNoise'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E\");--private-book-glare:0;--private-book-glare-x:50;--private-book-lay:0deg;--private-book-lie:0;--private-book-lift:0;--private-book-stand:1;--private-book-tilt:-6deg;--private-book-turn:28deg;aspect-ratio:var(--private-book-ratio,17/24);cursor:ew-resize;display:block;min-width:0;touch-action:pan-y;-webkit-user-select:none;user-select:none}:host([pose=fore-edge]){--private-book-turn:-28deg}:host([pose=front]){--private-book-tilt:0deg;--private-book-turn:0deg}:host([pose=lying]){--private-book-lay:90deg;--private-book-lie:1;--private-book-stand:0;--private-book-tilt:-30deg;--private-book-turn:0deg}:host([pose=lying-turned]){--private-book-lay:90deg;--private-book-lie:1;--private-book-stand:0;--private-book-tilt:-34deg;--private-book-turn:32deg}.scene{contain-intrinsic-inline-size:calc(var(--spacing,.0025rem)*5000);container-type:inline-size;filter:drop-shadow(0 1.2cqi 2cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.08));position:relative}.scene--dragging{-webkit-user-select:none;user-select:none}.stage{perspective:600cqi;perspective-origin:50% -80%}.book{--private-book-binding:var(--mds-book-color,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));--private-book-bulge:0cqi;--private-book-height:calc(100cqi/var(--private-book-ratio));--private-book-page-weight:calc(var(--mds-book-page-weight-min,.1) + (var(--mds-book-page-weight-max,.05) - var(--mds-book-page-weight-min,.1))*(min(var(--private-book-page-count), 1000) - 1)/999);--private-book-pages-mm:calc(var(--private-book-page-count)*var(--private-book-page-weight));--private-book-pages:calc(var(--private-book-pages-mm)/var(--private-book-width-mm)*100cqi);--private-book-depth:calc(var(--private-book-pages) + var(--private-book-board)*2);--private-book-solid:linear-gradient(var(--mds-book-spine-color),var(--mds-book-spine-color));--private-book-wrap:var(--private-book-solid,var(--private-book-cover,none));aspect-ratio:var(--private-book-ratio);position:relative;transform:rotateX(var(--private-book-tilt)) rotateY(var(--private-book-turn)) rotateX(var(--private-book-lay));transform-origin:50% 50% calc(var(--private-book-depth)/-2);transform-style:preserve-3d;width:100%}:host([binding=hardcover]) .book{--private-book-bulge:calc(var(--private-book-depth)*0.14)}.body{inset:0;transform:translate3d(0,calc(var(--private-book-lift)*var(--private-book-stand)*-3cqi),calc(var(--private-book-lift)*var(--private-book-lie)*3cqi));transform-style:preserve-3d}.body,.floor{position:absolute}.floor{background-color:rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.27);border-radius:1cqi;box-shadow:0 0 3cqi .6cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.34),0 0 9cqi 2cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1);left:0;pointer-events:none;top:0;transform-origin:0 0}.floor--stand{height:var(--private-book-depth);opacity:calc(var(--private-book-stand)*(1 - var(--private-book-lift)*0.6));transform:translate3d(0,var(--private-book-height),calc(var(--private-book-depth)*-1)) rotateX(90deg);width:100%}.floor--lie,:host([pose=lying-turned]) .floor--stand,:host([pose=lying]) .floor--stand{display:none}:host([pose=lying-turned]) .floor--lie,:host([pose=lying]) .floor--lie{display:block}.floor--lie{height:100%;opacity:calc(var(--private-book-lie)*(1 - var(--private-book-lift)*0.6));transform:translateZ(calc(var(--private-book-depth)*-1 - .2cqi));width:100%}.book--pending{--private-book-binding:rgb(var(--magma-surface-sunken,var(--surface-neutral-sunken,232 232 232)))}.face{--private-book-light:0;backface-visibility:hidden;left:0;position:absolute;top:0;transform-origin:0 0}.lit-front{--private-book-light:var(--private-book-front-light,0)}.lit-top{--private-book-light:var(--private-book-top-light,0)}.lit-bottom{--private-book-light:var(--private-book-bottom-light,0)}.lit-fore{--private-book-light:var(--private-book-fore-light,0)}.lit-spine{--private-book-light:var(--private-book-spine-light,0)}.shade{background-color:rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5)));inset:0;opacity:calc(max(0, var(--private-book-light) * -1)*.24);pointer-events:none;position:absolute}.front{background-color:var(--private-book-binding);height:100%;overflow:hidden;width:100%}.gloss{background-image:linear-gradient(105deg,#0000 34%,var(--mds-book-paper-color,#faf8f2) 44%,var(--mds-book-paper-color,#faf8f2) 50%,var(--mds-book-paper-color,#faf8f2) 56%,#0000 66%);height:100%;left:0;mix-blend-mode:screen;opacity:var(--private-book-glare);pointer-events:none;position:absolute;top:0;translate:calc(var(--private-book-glare-x)*-.6%) 0;width:250%}@supports (color:color-mix(in lab,red,red)){.gloss{background-image:linear-gradient(105deg,#0000 34%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 6%,#0000) 44%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 14%,#0000) 50%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 6%,#0000) 56%,#0000 66%)}}.front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.12),#0000 1.2cqi,var(--mds-book-paper-color,#faf8f2) 1.6cqi,#0000 2.4cqi),linear-gradient(105deg,var(--mds-book-paper-color,#faf8f2),#0000 45%);content:\"\";inset:0;pointer-events:none;position:absolute}@supports (color:color-mix(in lab,red,red)){.front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.12),#0000 1.2cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 18%,#0000) 1.6cqi,#0000 2.4cqi),linear-gradient(105deg,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 16%,#0000),#0000 45%)}}:host([binding=hardcover]) .front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.04) 2.6cqi,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.32) 3.4cqi,var(--mds-book-paper-color,#faf8f2) 4cqi,#0000 5cqi),linear-gradient(105deg,var(--mds-book-paper-color,#faf8f2),#0000 45%)}@supports (color:color-mix(in lab,red,red)){:host([binding=hardcover]) .front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.04) 2.6cqi,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.32) 3.4cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 28%,#0000) 4cqi,#0000 5cqi),linear-gradient(105deg,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 16%,#0000),#0000 45%)}}.cover{object-fit:cover;-webkit-user-drag:none;display:block;height:100%;width:100%}.drawn-cover{color:var(--mds-book-text-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));display:flex;flex-direction:column;gap:3cqi;height:100%;padding:12cqi 9cqi 9cqi 12cqi}.drawn-author{font-size:5cqi;line-height:1.2}.drawn-name{--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700);-webkit-line-clamp:6;line-clamp:6;overflow-wrap:anywhere;-webkit-box-orient:vertical;display:-webkit-box;font-size:10cqi;line-height:1.1;overflow:hidden}.drawn-publisher{font-size:4.5cqi;margin-top:auto}.board-bottom,.board-fore,.board-top,.cap,.slat{background-color:var(--private-book-binding);background-image:var(--private-book-wrap);background-position:var(--private-book-wrap-position);background-repeat:no-repeat;background-size:var(--private-book-wrap-size)}.board-bottom,.board-top{--private-book-wrap-size:100% 4000%;height:var(--private-book-board);width:100%}.board-top{--private-book-wrap-position:center top}.board-bottom{--private-book-wrap-position:center bottom}.board-top--front{transform:translateZ(calc(var(--private-book-board)*-1)) rotateX(90deg)}.board-top--back{transform:translateZ(calc(var(--private-book-depth)*-1)) rotateX(90deg)}.board-bottom--front{transform:translateY(var(--private-book-height)) rotateX(-90deg)}.board-bottom--back{transform:translate3d(0,var(--private-book-height),calc(var(--private-book-board) - var(--private-book-depth))) rotateX(-90deg)}.board-fore{--private-book-wrap-position:right center;--private-book-wrap-size:4000% 100%;height:100%;width:var(--private-book-board)}.board-fore--front{transform:translate(100cqi)rotateY(90deg)}.board-fore--back{transform:translate3d(100cqi,0,calc(var(--private-book-board) - var(--private-book-depth))) rotateY(90deg)}.endpaper{background-color:var(--mds-book-paper-color,#faf8f2);background-image:linear-gradient(var(--private-book-endpaper-fall),#0000,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.22))}@supports (color:color-mix(in lab,red,red)){.endpaper{background-color:color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 5%)}}.endpaper--top{--private-book-endpaper-fall:to bottom;transform:translateZ(calc(var(--private-book-board) - var(--private-book-depth)))}.endpaper--bottom,.endpaper--top{height:var(--private-book-square);width:100%}.endpaper--bottom{--private-book-endpaper-fall:to top;transform:translate3d(0,calc(var(--private-book-height) - var(--private-book-square)),calc(var(--private-book-board) - var(--private-book-depth)))}.endpaper--fore{--private-book-endpaper-fall:to left;height:100%;transform:translate3d(calc(100cqi - var(--private-book-square)),0,calc(var(--private-book-board) - var(--private-book-depth)));width:var(--private-book-square)}.pages-bottom,.pages-fore,.pages-top{background-color:var(--mds-book-paper-color,#faf8f2);background-repeat:no-repeat,repeat,no-repeat;background-size:100% 100%,auto,100% 100%}.pages-bottom,.pages-top{background-image:linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to bottom,#0000 0 .45cqi,var(--mds-book-paper-color,#faf8f2) .45cqi .55cqi);height:var(--private-book-pages);width:calc(100cqi - var(--private-book-square))}@supports (color:color-mix(in lab,red,red)){.pages-bottom,.pages-top{background-image:linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to bottom,#0000 0 .45cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 9%) .45cqi .55cqi)}}.pages-top{transform:translate3d(0,var(--private-book-square),calc(var(--private-book-board) - var(--private-book-depth))) rotateX(90deg)}.pages-bottom{transform:translate3d(0,calc(var(--private-book-height) - var(--private-book-square)),calc(var(--private-book-board)*-1)) rotateX(-90deg)}.pages-bottom:before,.pages-top:before{background-image:repeating-linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.55) 0 .35cqi,var(--mds-book-paper-color,#faf8f2) .35cqi .7cqi);bottom:0;content:\"\";left:0;position:absolute;top:0;width:1cqi}.pages-fore{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to right,#0000 0 .45cqi,var(--mds-book-paper-color,#faf8f2) .45cqi .55cqi);height:calc(100% - var(--private-book-square)*2);transform:translate3d(calc(100cqi - var(--private-book-square)),var(--private-book-square),calc(var(--private-book-board)*-1)) rotateY(90deg);width:var(--private-book-pages)}@supports (color:color-mix(in lab,red,red)){.pages-fore{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to right,#0000 0 .45cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 9%) .45cqi .55cqi)}}.pages-flush:after,.pages-flush:before{background-color:var(--private-book-binding);background-image:var(--private-book-wrap);background-position:var(--private-book-wrap-position);background-repeat:no-repeat;background-size:var(--private-book-wrap-size);content:\"\";position:absolute}.pages-flush--across{--private-book-wrap-size:100% 4000%;height:var(--private-book-depth);width:100%}.pages-flush--across:after,.pages-flush--across:before{height:1px;inset:0 0 auto;width:auto}.pages-flush--across:after{bottom:0;top:auto}.pages-top.pages-flush{--private-book-wrap-position:center top;transform:translateZ(calc(var(--private-book-depth)*-1)) rotateX(90deg)}.pages-bottom.pages-flush{--private-book-wrap-position:center bottom;transform:translateY(var(--private-book-height)) rotateX(-90deg)}.pages-flush--along{--private-book-wrap-position:right center;--private-book-wrap-size:4000% 100%;height:100%;transform:translate(100cqi)rotateY(90deg);width:var(--private-book-depth)}.pages-flush--along:after,.pages-flush--along:before{bottom:0;left:0;top:0;width:1px}.pages-flush--along:after{left:auto;right:0}.spine,.spine-label{box-sizing:border-box;display:flex;font-size:min(calc(var(--private-book-depth)*.42),4.5cqi);height:100%;justify-content:center;padding-block:7cqi;width:var(--private-book-depth)}.spine{background-color:var(--private-book-binding);background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1),#0000 .6cqi,#0000 calc(100% - .6cqi),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1)),var(--private-book-wrap);background-position:0 0,0;background-repeat:no-repeat;background-size:100% 100%,4000% 100%;transform:translateZ(calc(var(--private-book-depth)*-1)) rotateY(-90deg)}.slat{--private-book-wrap-position:left center;--private-book-wrap-size:4000% 100%;height:100%;transform:translate3d(calc(var(--private-book-slat-x)*var(--private-book-depth)),0,calc(var(--private-book-slat-z)*var(--private-book-depth))) rotateY(var(--private-book-slat-yaw)) translateX(-50%);width:calc(var(--private-book-slat-width)*var(--private-book-depth))}.spine-label{transform:translate3d(calc(var(--private-book-bulge)*-1 - .2cqi),0,calc(var(--private-book-depth)*-1)) rotateY(-90deg)}.cap{--private-book-wrap-position:left top;--private-book-wrap-size:4000% 4000%;height:var(--private-book-depth);width:var(--private-book-bulge)}.cap--top{transform:translate3d(calc(var(--private-book-bulge)*-1),0,calc(var(--private-book-depth)*-1)) rotateX(90deg)}.cap--bottom{transform:translate3d(calc(var(--private-book-bulge)*-1),var(--private-book-height),0) rotateX(-90deg)}.spine-text{align-items:center;color:var(--mds-book-text-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));display:flex;gap:.8lh;line-height:1.2;min-block-size:0;opacity:clamp(0,(var(--private-book-pages-mm) - 5) * 2,1);text-shadow:0 0 .3lh rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.4);writing-mode:vertical-rl}.spine-text>span{min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spine-author{flex-shrink:4}.spine-name{--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700)}.spine-publisher{flex-shrink:0;margin-inline-start:auto}@property --tw-font-weight{syntax:\"*\";inherits:false}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){cursor:auto;touch-action:auto}}"}},[1,"mds-book",{alt:[1],author:[1],binding:[513],format:[513],loading:[1],name:[1],pages:[2],pose:[513],publisher:[1],src:[1],coverUrl:[32],imageError:[32],imageRatio:[32]},[[1,"pointerenter","pointerEnterHandler"],[1,"pointermove","pointerMoveHandler"],[1,"pointerdown","pointerDownHandler"],[1,"pointerup","pointerUpHandler"],[1,"pointercancel","pointerLostHandler"],[0,"lostpointercapture","pointerLostHandler"],[1,"pointerleave","pointerLeaveHandler"],[2,"click","clickHandler"]],{format:[{formatHandler:0}],pages:[{pagesHandler:0}],pose:[{poseHandler:0}],src:[{srcHandler:0}]}]),O=Y,Z=function(){"undefined"!=typeof customElements&&["mds-book"].forEach((t=>{"mds-book"===t&&(customElements.get(e(t))||customElements.define(e(t),Y))}))};export{O as MdsBook,Z as defineCustomElement}
|
|
1
|
+
import{p as o,H as t,h as a,c as r,t as e,B as i}from"./p-TZJN-ygm.js";import{L as s}from"./p-CZjwSwe5.js";import{p as n}from"./p-CVRN4LDc.js";const l={a4:[21,29.7],a5:[14.8,21],b5:[17.6,25]},p=17/24,h=/^(\d+(?:\.\d+)?)x(\d+(?:\.\d+)?)$/,d=o=>(null!=o?o:"").trim().toLowerCase(),c=o=>{const t=d(o);if(Object.prototype.hasOwnProperty.call(l,t))return l[t];const a=h.exec(t);if(null===a)return;const r=Number(a[1]),e=Number(a[2]);return r>0&&e>0?[r,e]:void 0},v=o=>{const t=c(o);return void 0===t?void 0:t[0]/t[1]},b=o=>`url("${o.replace(/[\\"]/g,"\\$&").replace(/[\n\r\f]/g,"")}")`,g=o=>null!=o&&Number.isFinite(o)&&o>0?Math.max(4,Math.min(3e3,Math.round(o))):300,m={spine:{lay:0,tilt:-6,turn:28},"fore-edge":{lay:0,tilt:-6,turn:-28},front:{lay:0,tilt:0,turn:0},lying:{lay:90,tilt:-30,turn:0},"lying-turned":{lay:90,tilt:-34,turn:32}},k=o=>Object.assign({glare:0,lift:0},Object.prototype.hasOwnProperty.call(m,null!=o?o:"")?m[o]:m.spine),f=120,u=260,w=(o,t)=>o[0]*t[0]+o[1]*t[1]+o[2]*t[2],y=o=>o*Math.PI/180,q=(([o,t,a])=>{const r=Math.hypot(o,t,a);return[o/r,t/r,a/r]})([.15,-.4,.9]),x=([o,t,a],r)=>{const e=y(r);return[o,t*Math.cos(e)-a*Math.sin(e),t*Math.sin(e)+a*Math.cos(e)]},M=(o,{lay:t,tilt:a,turn:r})=>x((([o,t,a],r)=>{const e=y(r);return[o*Math.cos(e)+a*Math.sin(e),t,-o*Math.sin(e)+a*Math.cos(e)]})(x(o,t),r),a),z=o=>[Math.sin(y(o)),0,Math.cos(y(o))],H={bottom:[0,1,0],fore:z(90),front:z(0),spine:z(-90),top:[0,-1,0]},$=(o,t,a)=>Math.max(-1,Math.min(1,1.4*(w(M(o,t),q)-a))),L=(o,t)=>{const a=(.25+t*t)/(2*t),r=a-t,e=Math.asin(.5/a);return{angle:t=>e-2*e*t/o,point:o=>({x:r-a*Math.cos(o),z:a*Math.sin(o)-.5})}},E=(()=>{const{angle:o,point:t}=L(6,.14);return Array.from({length:6},((a,r)=>{const e=o(r),i=o(r+1),s=t(e),n=t(i),l=(e+i)/2;return{width:1.04*Math.hypot(s.x-n.x,s.z-n.z),x:(s.x+n.x)/2,yaw:180*Math.atan2(-Math.cos(l),Math.sin(l))/Math.PI,z:(s.z+n.z)/2}}))})(),X=(()=>{const{angle:o,point:t}=L(6,.14),a=o=>(100*o).toFixed(3)+"%";return`polygon(${Array.from({length:7},((r,e)=>{const{x:i,z:s}=t(o(e));return`${a(1+i/.14)} ${a(-s)}`})).join(", ")})`})();var j={book:"Βιβλίο",byAuthor:"{{{name}}}, {{{author}}}"},C={book:"Book",byAuthor:"{{{name}}} by {{{author}}}"},A={book:"Libro",byAuthor:"{{{name}}} de {{{author}}}"},Y={book:"Libro",byAuthor:"{{{name}}} di {{{author}}}"};const O=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.imageError=!1,this.logoError=!1,this.current=k(),this.dragged=!1,this.goal=k(),this.hovering=!1,this.pointer={x:0,y:0},this.slats=[],this.t=new s({el:j,en:C,es:A,it:Y}),this.binding="paperback",this.format="auto",this.loading="lazy",this.pages=300,this.pose="spine",this.watchDrag=()=>{var o;null===(o=this.dragWatch)||void 0===o||o.abort(),this.dragWatch=new AbortController;const{signal:t}=this.dragWatch,a=()=>{this.hovering=!1,this.pointer={x:0,y:0},this.endDrag(!1)},r=o=>{null===o.relatedTarget&&a()};window.addEventListener("pointerout",r,{signal:t}),window.addEventListener("mouseout",r,{signal:t}),window.addEventListener("blur",a,{signal:t}),document.addEventListener("visibilitychange",(()=>document.hidden&&a()),{signal:t})},this.endDrag=o=>{var t,a;void 0!==this.drag&&(this.dragged=o,this.drag=void 0,null===(t=this.dragWatch)||void 0===t||t.abort(),this.dragWatch=void 0,null===(a=this.scene)||void 0===a||a.classList.remove("scene--dragging"),this.aim())},this.reducedMotion=()=>{const o=this.host.getAttribute("pref-animation");return"reduce"===o||(null===o||"system"===o)&&"function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches},this.consumption=()=>{var o;return null!==(o=this.host.getAttribute("pref-consumption"))&&void 0!==o?o:"high"},this.still=()=>this.reducedMotion()||"low"===this.consumption(),this.aim=()=>{const o=k(this.pose);if(this.still())return this.current=this.goal=o,void this.writePose();const t=this.hovering||void 0!==this.drag,a=void 0!==this.drag?1:this.hovering?.45:0;this.goal={glare:"high"===this.consumption()?a:0,lay:o.lay,lift:t?1:0,tilt:this.hovering?o.tilt-4*this.pointer.y:o.tilt,turn:void 0!==this.drag?this.goal.turn:this.hovering?o.turn+6*this.pointer.x:o.turn},this.wake()},this.wake=()=>{var o;null!==(o=this.frame)&&void 0!==o||(this.frame=requestAnimationFrame(this.tick))},this.tick=o=>{this.frame=void 0,this.current=((o,t,a)=>{const r=1-Math.exp(-a/(void 0===this.drag&&!this.hovering?u:f)),e=Object.assign({},o);for(const a of Object.keys(t)){e[a]+=(t[a]-o[a])*r;const i="glare"===a||"lift"===a?.002:.05;Math.abs(t[a]-e[a])<i&&(e[a]=t[a])}return e})(this.current,this.goal,void 0===this.lastTime?1e3/60:o-this.lastTime),this.writePose(),((o,t)=>Object.keys(o).every((a=>o[a]===t[a])))(this.current,this.goal)?this.lastTime=void 0:(this.lastTime=o,this.wake())},this.writePose=()=>{var o;const t=null===(o=this.scene)||void 0===o?void 0:o.style;if(!t)return;const a=k(this.pose),r=(o=>w(M(H.front,o),q))(a),{glare:e,lay:i,lift:s,tilt:n,turn:l}=this.current,p=((o,t)=>({bottom:$(H.bottom,o,t),fore:$(H.fore,o,t),front:$(H.front,o,t),spine:$(H.spine,o,t),top:$(H.top,o,t)}))(this.current,r);t.setProperty("--private-book-lay",i.toFixed(2)+"deg"),t.setProperty("--private-book-turn",l.toFixed(2)+"deg"),t.setProperty("--private-book-tilt",n.toFixed(2)+"deg"),t.setProperty("--private-book-lift",s.toFixed(3));const h=Math.max(0,Math.min(1,i/90));t.setProperty("--private-book-lie",h.toFixed(3)),t.setProperty("--private-book-stand",(1-h).toFixed(3)),t.setProperty("--private-book-glare",e.toFixed(3)),t.setProperty("--private-book-glare-x",((o,t)=>Math.max(0,Math.min(100,50+.8*(o-t.turn)+10*this.pointer.x)))(l,a).toFixed(1));for(const o of Object.keys(p))t.setProperty(`--private-book-${o}-light`,p[o].toFixed(3));const d=((o,t,a)=>o.map((o=>$(z(o),t,a))))(E.map((({yaw:o})=>o)),this.current,r);this.slats.forEach(((o,t)=>o.style.setProperty("--private-book-light",d[t].toFixed(3))))},this.warnInvalidFormat=o=>{(o=>{const t=d(o);return""===t||"auto"===t||void 0!==v(t)})(o)||console.warn(`mds-book: "${o}" is not a format, the book takes the proportions of its image. Use auto, a4, a5, b5 or WxH in centimetres`)},this.warnInvalidPages=o=>{(o=>null==o||Number.isFinite(o)&&o>0)(o)||console.warn(`mds-book: "${o}" is not a number of pages, the book is drawn with 300. Use a positive number, up to 3000`)},this.onLoad=o=>{const t=o.target;t.naturalWidth>0&&t.naturalHeight>0&&(this.imageRatio=t.naturalWidth/t.naturalHeight),this.coverUrl=t.currentSrc||t.src},this.onError=()=>{this.coverUrl=void 0,this.imageError=!0},this.hasImage=()=>{var o;return""!==(null!==(o=this.src)&&void 0!==o?o:"")&&!this.imageError},this.loadLogo=()=>{var o;this.logoLoader&&(this.logoLoader.onload=null,this.logoLoader.onerror=null),this.logoLoader=void 0,this.logoError=!1,this.logoUrl=void 0;const t=(null!==(o=this.publisherLogo)&&void 0!==o?o:"").trim();if(""===t||!i.isBrowser)return;const a=new Image;a.crossOrigin="anonymous",a.onload=()=>{this.logoUrl=a.src},a.onerror=()=>{this.logoError=!0},a.src=t,this.logoLoader=a},this.logoPending=()=>{var o;return""!==(null!==(o=this.publisherLogo)&&void 0!==o?o:"").trim()&&void 0===this.logoUrl&&!this.logoError},this.ratio=()=>{var o,t;return null!==(t=null!==(o=v(this.format))&&void 0!==o?o:this.imageRatio)&&void 0!==t?t:p},this.label=()=>{var o,t;if(null!=this.alt)return this.alt;const a=(null!==(o=this.name)&&void 0!==o?o:"").trim(),r=(null!==(t=this.author)&&void 0!==t?t:"").trim();return""!==r?this.t.get("byAuthor",{name:""!==a?a:this.t.get("book"),author:r}):""!==a?a:this.t.get("book")},this.hostRole=()=>{const o=this.label();return""===o?{role:"presentation"}:{role:"img","aria-label":o}},this.bookStyle=()=>{const o=(()=>{var o,t;return null!==(t=null===(o=c(this.format))||void 0===o?void 0:o[0])&&void 0!==t?t:17})(),t=((o,t)=>({board:t?.25/o:0,square:t?.3/o:0}))(o,"hardcover"===this.binding),a=o=>(100*o).toFixed(3)+"cqi",r={"--private-book-board":a(t.board),"--private-book-page-count":g(this.pages)+"","--private-book-square":a(t.square),"--private-book-width-mm":10*o+""};return void 0!==this.coverUrl&&this.hasImage()&&(r["--private-book-cover"]=b(this.coverUrl)),void 0!==this.logoUrl&&(r["--private-book-logo"]=b(this.logoUrl)),r},this.renderPublisher=o=>{var t;return void 0!==this.logoUrl?a("span",{class:o+"-logo"}):this.logoPending()||""===(null!==(t=this.publisher)&&void 0!==t?t:"")?null:a("span",{class:o+"-publisher"},this.publisher)},this.renderSpineText=()=>a("div",{class:"spine-text"},this.name&&a("span",{class:"spine-name"},this.name),this.author&&a("span",{class:"spine-author"},this.author),this.renderPublisher("spine")),this.shade=()=>a("span",{class:"shade"}),this.renderHardcover=()=>[...["top","bottom"].flatMap((o=>[a("div",{key:`board-${o}-front`,class:`face board-${o} board-${o}--front lit-${o}`},this.shade()),a("div",{key:`board-${o}-back`,class:`face board-${o} board-${o}--back lit-${o}`},this.shade()),a("div",{key:"endpaper-"+o,class:`face endpaper endpaper--${o} lit-front`},this.shade()),a("div",{key:"pages-"+o,class:`face pages-${o} lit-${o}`},this.shade()),a("div",{key:"cap-"+o,class:`face cap cap--${o} lit-${o}`,style:{clipPath:X}},this.shade())])),a("div",{key:"board-fore-front",class:"face board-fore board-fore--front lit-fore"},this.shade()),a("div",{key:"board-fore-back",class:"face board-fore board-fore--back lit-fore"},this.shade()),a("div",{key:"endpaper-fore",class:"face endpaper endpaper--fore lit-front"},this.shade()),a("div",{key:"pages-fore",class:"face pages-fore lit-fore"},this.shade()),...E.map((({width:o,x:t,yaw:r,z:e},i)=>a("div",{key:"slat-"+i,class:"face slat",ref:o=>o&&(this.slats[i]=o),style:{"--private-book-slat-width":o+"","--private-book-slat-x":t+"","--private-book-slat-yaw":r+"deg","--private-book-slat-z":e+""}},this.shade()))),a("div",{key:"spine-label","aria-hidden":"true",class:"face spine-label"},this.renderSpineText())],this.renderPaperback=()=>[a("div",{key:"pages-top",class:"face pages-top pages-flush pages-flush--across lit-top"},this.shade()),a("div",{key:"pages-bottom",class:"face pages-bottom pages-flush pages-flush--across lit-bottom"},this.shade()),a("div",{key:"pages-fore",class:"face pages-fore pages-flush pages-flush--along lit-fore"},this.shade()),a("div",{key:"spine","aria-hidden":"true",class:"face spine lit-spine"},this.renderSpineText(),this.shade())]}formatHandler(o){this.warnInvalidFormat(o)}pagesHandler(o){this.warnInvalidPages(o)}poseHandler(){this.aim()}publisherLogoHandler(){this.loadLogo()}srcHandler(){this.coverUrl=void 0,this.imageError=!1,this.imageRatio=void 0}pointerEnterHandler(o){"touch"===o.pointerType||this.still()||(this.hovering=!0,this.aim())}pointerMoveHandler(o){var t,a;if(this.still())return;const{left:r,top:e,width:i,height:s}=this.host.getBoundingClientRect();if(0===i||0===s)return;const n=o=>Math.max(-1,Math.min(1,o));if("touch"!==o.pointerType&&(this.pointer={x:n((o.clientX-r)/i*2-1),y:n((o.clientY-e)/s*2-1)}),(null===(t=this.drag)||void 0===t?void 0:t.pointerId)===o.pointerId&&"touch"!==o.pointerType&&0===o.buttons&&this.endDrag(!1),(null===(a=this.drag)||void 0===a?void 0:a.pointerId)===o.pointerId){const t=o.clientX-this.drag.startX;Math.abs(t)>4&&(this.drag.moved=!0);const{max:a,min:r}=(o=>0===o.lay?{max:64,min:-64}:{max:o.turn+70,min:o.turn-70})(k(this.pose));return this.goal.turn=Math.max(r,Math.min(a,this.drag.startTurn+t/i*110)),void this.wake()}this.aim()}pointerDownHandler(o){var t;if(0===o.button&&!this.still()){this.dragged=!1,this.drag={moved:!1,pointerId:o.pointerId,startTurn:this.current.turn,startX:o.clientX};try{this.host.setPointerCapture(o.pointerId)}catch(o){}null===(t=this.scene)||void 0===t||t.classList.add("scene--dragging"),this.watchDrag(),this.aim()}}pointerUpHandler(o){var t;(null===(t=this.drag)||void 0===t?void 0:t.pointerId)===o.pointerId&&this.endDrag(this.drag.moved)}pointerLostHandler(o){var t;(null===(t=this.drag)||void 0===t?void 0:t.pointerId)===o.pointerId&&this.endDrag(!1)}pointerLeaveHandler(){void 0===this.drag&&(this.hovering=!1,this.pointer={x:0,y:0},this.aim())}clickHandler(o){this.dragged&&(this.dragged=!1,o.preventDefault(),o.stopPropagation())}componentWillLoad(){this.warnInvalidFormat(this.format),this.warnInvalidPages(this.pages),this.current=this.goal=k(this.pose),this.loadLogo()}componentDidRender(){i.isBrowser&&(this.still()&&(this.current=this.goal=k(this.pose)),this.writePose())}disconnectedCallback(){var o;void 0!==this.frame&&cancelAnimationFrame(this.frame),this.frame=void 0,this.drag=void 0,null===(o=this.dragWatch)||void 0===o||o.abort(),this.dragWatch=void 0,this.hovering=!1}render(){const o="hardcover"===this.binding;return o||(this.slats=[]),a(r,Object.assign({key:"6db72570ca99aeae50cd052ce53087f6838176d5"},this.hostRole(),{"pref-animation":n.state.animation,"pref-consumption":n.state.consumption,style:{"--private-book-ratio":this.ratio()+""}}),a("div",{key:"a29488e2e6b9082dfdb9eff07f02f99914226643",class:"scene",ref:o=>this.scene=o},a("div",{key:"fa6308238a1093dc99028cf46719f2e2597300fb",class:"stage"},a("div",{key:"dfd216ee44d9f22a7fc01a76553871969ce8e24d",class:{book:!0,"book--pending":this.hasImage()&&void 0===this.coverUrl},style:this.bookStyle()},a("div",{key:"b355dc416691ccb540ddfc66ef4878fb2a3b0f94",class:"floor floor--stand"}),a("div",{key:"6a9c1d6da5077a160c28e0ed042dae5331009f1e",class:"floor floor--lie"}),a("div",{key:"34ba5e97961fce9af6dd2f76e9dbc3cb66f1c5b9",class:"body"},a("div",{key:"17881cac62566ff36b44f5ed76e6d2355df3cb3f",class:"face front lit-front"},this.hasImage()?a("img",{alt:"","aria-hidden":"true",class:"cover",draggable:!1,loading:this.loading,onError:this.onError,onLoad:this.onLoad,part:"cover",src:this.src}):a("div",{"aria-hidden":"true",class:"drawn-cover"},this.author&&a("span",{class:"drawn-author"},this.author),this.name&&a("span",{class:"drawn-name"},this.name),this.renderPublisher("drawn")),a("span",{key:"0ac0926637c0a49703e658ccd67c2f01aa185c19",class:"gloss"}),this.shade()),o?this.renderHardcover():this.renderPaperback())))))}get host(){return this}static get watchers(){return{format:[{formatHandler:0}],pages:[{pagesHandler:0}],pose:[{poseHandler:0}],publisherLogo:[{publisherLogoHandler:0}],src:[{srcHandler:0}]}}static get style(){return"@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}:host(:not(:is([hydrated],.hydrated))){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){cursor:auto;touch-action:auto}:host([pref-consumption=low]){cursor:auto;touch-action:auto}:host([pref-consumption=low]) .gloss,:host([pref-consumption=medium]) .gloss{display:none}:host([pref-consumption=low]) .scene,:host([pref-consumption=medium]) .scene{filter:none}:host{--mds-book-color:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-book-paper-color:#faf8f2;--mds-book-text-color:rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255)));--mds-book-publisher-color:var(--mds-book-text-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-book-page-weight-max:.05;--mds-book-page-weight-min:.1;--private-book-grain:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='a'%3E%3CfeTurbulence baseFrequency='1.1' numOctaves='2' stitchTiles='stitch' type='fractalNoise'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E\");--private-book-glare:0;--private-book-glare-x:50;--private-book-lay:0deg;--private-book-lie:0;--private-book-lift:0;--private-book-stand:1;--private-book-tilt:-6deg;--private-book-turn:28deg;aspect-ratio:var(--private-book-ratio,17/24);cursor:ew-resize;display:block;min-width:0;touch-action:pan-y;-webkit-user-select:none;user-select:none}:host([pose=fore-edge]){--private-book-turn:-28deg}:host([pose=front]){--private-book-tilt:0deg;--private-book-turn:0deg}:host([pose=lying]){--private-book-lay:90deg;--private-book-lie:1;--private-book-stand:0;--private-book-tilt:-30deg;--private-book-turn:0deg}:host([pose=lying-turned]){--private-book-lay:90deg;--private-book-lie:1;--private-book-stand:0;--private-book-tilt:-34deg;--private-book-turn:32deg}.scene{contain-intrinsic-inline-size:calc(var(--spacing,.0025rem)*5000);container-type:inline-size;filter:drop-shadow(0 1.2cqi 2cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.08));position:relative}.scene--dragging{-webkit-user-select:none;user-select:none}.stage{perspective:600cqi;perspective-origin:50% -80%}.book{--private-book-binding:var(--mds-book-color,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));--private-book-bulge:0cqi;--private-book-height:calc(100cqi/var(--private-book-ratio));--private-book-page-weight:calc(var(--mds-book-page-weight-min,.1) + (var(--mds-book-page-weight-max,.05) - var(--mds-book-page-weight-min,.1))*(min(var(--private-book-page-count), 1000) - 1)/999);--private-book-pages-mm:calc(var(--private-book-page-count)*var(--private-book-page-weight));--private-book-pages:calc(var(--private-book-pages-mm)/var(--private-book-width-mm)*100cqi);--private-book-depth:calc(var(--private-book-pages) + var(--private-book-board)*2);--private-book-solid:linear-gradient(var(--mds-book-spine-color),var(--mds-book-spine-color));--private-book-wrap:var(--private-book-solid,var(--private-book-cover,none));aspect-ratio:var(--private-book-ratio);position:relative;transform:rotateX(var(--private-book-tilt)) rotateY(var(--private-book-turn)) rotateX(var(--private-book-lay));transform-origin:50% 50% calc(var(--private-book-depth)/-2);transform-style:preserve-3d;width:100%}:host([binding=hardcover]) .book{--private-book-bulge:calc(var(--private-book-depth)*0.14)}.body{inset:0;transform:translate3d(0,calc(var(--private-book-lift)*var(--private-book-stand)*-3cqi),calc(var(--private-book-lift)*var(--private-book-lie)*3cqi));transform-style:preserve-3d}.body,.floor{position:absolute}.floor{background-color:rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.27);border-radius:1cqi;box-shadow:0 0 3cqi .6cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.34),0 0 9cqi 2cqi rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1);left:0;pointer-events:none;top:0;transform-origin:0 0}.floor--stand{height:var(--private-book-depth);opacity:calc(var(--private-book-stand)*(1 - var(--private-book-lift)*0.6));transform:translate3d(0,var(--private-book-height),calc(var(--private-book-depth)*-1)) rotateX(90deg);width:100%}.floor--lie,:host([pose=lying-turned]) .floor--stand,:host([pose=lying]) .floor--stand{display:none}:host([pose=lying-turned]) .floor--lie,:host([pose=lying]) .floor--lie{display:block}.floor--lie{height:100%;opacity:calc(var(--private-book-lie)*(1 - var(--private-book-lift)*0.6));transform:translateZ(calc(var(--private-book-depth)*-1 - .2cqi));width:100%}.book--pending{--private-book-binding:rgb(var(--magma-surface-sunken,var(--surface-neutral-sunken,232 232 232)))}.face{--private-book-light:0;backface-visibility:hidden;left:0;position:absolute;top:0;transform-origin:0 0}.lit-front{--private-book-light:var(--private-book-front-light,0)}.lit-top{--private-book-light:var(--private-book-top-light,0)}.lit-bottom{--private-book-light:var(--private-book-bottom-light,0)}.lit-fore{--private-book-light:var(--private-book-fore-light,0)}.lit-spine{--private-book-light:var(--private-book-spine-light,0)}.shade{background-color:rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5)));inset:0;opacity:calc(max(0, var(--private-book-light) * -1)*.24);pointer-events:none;position:absolute}.front{background-color:var(--private-book-binding);height:100%;overflow:hidden;width:100%}.gloss{background-image:linear-gradient(105deg,#0000 34%,var(--mds-book-paper-color,#faf8f2) 44%,var(--mds-book-paper-color,#faf8f2) 50%,var(--mds-book-paper-color,#faf8f2) 56%,#0000 66%);height:100%;left:0;mix-blend-mode:screen;opacity:var(--private-book-glare);pointer-events:none;position:absolute;top:0;translate:calc(var(--private-book-glare-x)*-.6%) 0;width:250%}@supports (color:color-mix(in lab,red,red)){.gloss{background-image:linear-gradient(105deg,#0000 34%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 6%,#0000) 44%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 14%,#0000) 50%,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 6%,#0000) 56%,#0000 66%)}}.front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.12),#0000 1.2cqi,var(--mds-book-paper-color,#faf8f2) 1.6cqi,#0000 2.4cqi),linear-gradient(105deg,var(--mds-book-paper-color,#faf8f2),#0000 45%);content:\"\";inset:0;pointer-events:none;position:absolute}@supports (color:color-mix(in lab,red,red)){.front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.12),#0000 1.2cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 18%,#0000) 1.6cqi,#0000 2.4cqi),linear-gradient(105deg,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 16%,#0000),#0000 45%)}}:host([binding=hardcover]) .front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.04) 2.6cqi,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.32) 3.4cqi,var(--mds-book-paper-color,#faf8f2) 4cqi,#0000 5cqi),linear-gradient(105deg,var(--mds-book-paper-color,#faf8f2),#0000 45%)}@supports (color:color-mix(in lab,red,red)){:host([binding=hardcover]) .front:after{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.04) 2.6cqi,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.32) 3.4cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 28%,#0000) 4cqi,#0000 5cqi),linear-gradient(105deg,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2) 16%,#0000),#0000 45%)}}.cover{object-fit:cover;-webkit-user-drag:none;display:block;height:100%;width:100%}.drawn-cover{box-sizing:border-box;color:var(--mds-book-text-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));display:flex;flex-direction:column;gap:3cqi;height:100%;padding:12cqi 9cqi 9cqi 12cqi}.drawn-author{font-size:5cqi;line-height:1.2}.drawn-name{font-family:var(--font-title,Roboto,system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif);--tw-font-weight:var(--font-weight-black,900);font-weight:var(--font-weight-black,900);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-line-clamp:6;line-clamp:6;overflow-wrap:anywhere;-webkit-box-orient:vertical;display:-webkit-box;font-size:10cqi;line-height:1.1;overflow:hidden}.drawn-logo,.drawn-publisher{margin-top:auto}.drawn-publisher{color:var(--mds-book-publisher-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));font-size:4.5cqi}.drawn-logo,.spine-logo{background-color:var(--mds-book-publisher-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));flex-shrink:0;-webkit-mask-image:var(--private-book-logo);mask-image:var(--private-book-logo);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}.drawn-logo{height:15cqi;-webkit-mask-position:0 100%;mask-position:0 100%;width:50cqi}.board-bottom,.board-fore,.board-top,.cap,.slat{background-color:var(--private-book-binding);background-image:var(--private-book-wrap);background-position:var(--private-book-wrap-position);background-repeat:no-repeat;background-size:var(--private-book-wrap-size)}.board-bottom,.board-top{--private-book-wrap-size:100% 4000%;height:var(--private-book-board);width:100%}.board-top{--private-book-wrap-position:center top}.board-bottom{--private-book-wrap-position:center bottom}.board-top--front{transform:translateZ(calc(var(--private-book-board)*-1)) rotateX(90deg)}.board-top--back{transform:translateZ(calc(var(--private-book-depth)*-1)) rotateX(90deg)}.board-bottom--front{transform:translateY(var(--private-book-height)) rotateX(-90deg)}.board-bottom--back{transform:translate3d(0,var(--private-book-height),calc(var(--private-book-board) - var(--private-book-depth))) rotateX(-90deg)}.board-fore{--private-book-wrap-position:right center;--private-book-wrap-size:4000% 100%;height:100%;width:var(--private-book-board)}.board-fore--front{transform:translate(100cqi)rotateY(90deg)}.board-fore--back{transform:translate3d(100cqi,0,calc(var(--private-book-board) - var(--private-book-depth))) rotateY(90deg)}.endpaper{background-color:var(--mds-book-paper-color,#faf8f2);background-image:linear-gradient(var(--private-book-endpaper-fall),#0000,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.22))}@supports (color:color-mix(in lab,red,red)){.endpaper{background-color:color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 5%)}}.endpaper--top{--private-book-endpaper-fall:to bottom;transform:translateZ(calc(var(--private-book-board) - var(--private-book-depth)))}.endpaper--bottom,.endpaper--top{height:var(--private-book-square);width:100%}.endpaper--bottom{--private-book-endpaper-fall:to top;transform:translate3d(0,calc(var(--private-book-height) - var(--private-book-square)),calc(var(--private-book-board) - var(--private-book-depth)))}.endpaper--fore{--private-book-endpaper-fall:to left;height:100%;transform:translate3d(calc(100cqi - var(--private-book-square)),0,calc(var(--private-book-board) - var(--private-book-depth)));width:var(--private-book-square)}.pages-bottom,.pages-fore,.pages-top{background-color:var(--mds-book-paper-color,#faf8f2);background-repeat:no-repeat,repeat,no-repeat;background-size:100% 100%,auto,100% 100%}.pages-bottom,.pages-top{background-image:linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to bottom,#0000 0 .45cqi,var(--mds-book-paper-color,#faf8f2) .45cqi .55cqi);height:var(--private-book-pages);width:calc(100cqi - var(--private-book-square))}@supports (color:color-mix(in lab,red,red)){.pages-bottom,.pages-top{background-image:linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to bottom,#0000 0 .45cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 9%) .45cqi .55cqi)}}.pages-top{transform:translate3d(0,var(--private-book-square),calc(var(--private-book-board) - var(--private-book-depth))) rotateX(90deg)}.pages-bottom{transform:translate3d(0,calc(var(--private-book-height) - var(--private-book-square)),calc(var(--private-book-board)*-1)) rotateX(-90deg)}.pages-bottom:before,.pages-top:before{background-image:repeating-linear-gradient(to bottom,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.55) 0 .35cqi,var(--mds-book-paper-color,#faf8f2) .35cqi .7cqi);bottom:0;content:\"\";left:0;position:absolute;top:0;width:1cqi}.pages-fore{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to right,#0000 0 .45cqi,var(--mds-book-paper-color,#faf8f2) .45cqi .55cqi);height:calc(100% - var(--private-book-square)*2);transform:translate3d(calc(100cqi - var(--private-book-square)),var(--private-book-square),calc(var(--private-book-board)*-1)) rotateY(90deg);width:var(--private-book-pages)}@supports (color:color-mix(in lab,red,red)){.pages-fore{background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16),#0000 22%,#0000 78%,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.16)),var(--private-book-grain),repeating-linear-gradient(to right,#0000 0 .45cqi,color-mix(in srgb,var(--mds-book-paper-color,#faf8f2),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))) 9%) .45cqi .55cqi)}}.pages-flush:after,.pages-flush:before{background-color:var(--private-book-binding);background-image:var(--private-book-wrap);background-position:var(--private-book-wrap-position);background-repeat:no-repeat;background-size:var(--private-book-wrap-size);content:\"\";position:absolute}.pages-flush--across{--private-book-wrap-size:100% 4000%;height:var(--private-book-depth);width:100%}.pages-flush--across:after,.pages-flush--across:before{height:1px;inset:0 0 auto;width:auto}.pages-flush--across:after{bottom:0;top:auto}.pages-top.pages-flush{--private-book-wrap-position:center top;transform:translateZ(calc(var(--private-book-depth)*-1)) rotateX(90deg)}.pages-bottom.pages-flush{--private-book-wrap-position:center bottom;transform:translateY(var(--private-book-height)) rotateX(-90deg)}.pages-flush--along{--private-book-wrap-position:right center;--private-book-wrap-size:4000% 100%;height:100%;transform:translate(100cqi)rotateY(90deg);width:var(--private-book-depth)}.pages-flush--along:after,.pages-flush--along:before{bottom:0;left:0;top:0;width:1px}.pages-flush--along:after{left:auto;right:0}.spine,.spine-label{box-sizing:border-box;container-type:inline-size;display:flex;font-size:min(calc(var(--private-book-depth)*.42),4.5cqi);height:100%;justify-content:center;padding-block:7cqi;width:var(--private-book-depth)}.spine{background-color:var(--private-book-binding);background-image:linear-gradient(to right,rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1),#0000 .6cqi,#0000 calc(100% - .6cqi),rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.1)),var(--private-book-wrap);background-position:0 0,0;background-repeat:no-repeat;background-size:100% 100%,4000% 100%;transform:translateZ(calc(var(--private-book-depth)*-1)) rotateY(-90deg)}.slat{--private-book-wrap-position:left center;--private-book-wrap-size:4000% 100%;height:100%;transform:translate3d(calc(var(--private-book-slat-x)*var(--private-book-depth)),0,calc(var(--private-book-slat-z)*var(--private-book-depth))) rotateY(var(--private-book-slat-yaw)) translateX(-50%);width:calc(var(--private-book-slat-width)*var(--private-book-depth))}.spine-label{transform:translate3d(calc(var(--private-book-bulge)*-1 - .2cqi),0,calc(var(--private-book-depth)*-1)) rotateY(-90deg)}.cap{--private-book-wrap-position:left top;--private-book-wrap-size:4000% 4000%;height:var(--private-book-depth);width:var(--private-book-bulge)}.cap--top{transform:translate3d(calc(var(--private-book-bulge)*-1),0,calc(var(--private-book-depth)*-1)) rotateX(90deg)}.cap--bottom{transform:translate3d(calc(var(--private-book-bulge)*-1),var(--private-book-height),0) rotateX(-90deg)}.spine-text{align-items:center;color:var(--mds-book-text-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))));display:flex;gap:.8lh;line-height:1.2;min-block-size:0;opacity:clamp(0,(var(--private-book-pages-mm) - 5) * 2,1);text-shadow:0 0 .3lh rgb(var(--magma-shadow-ink,var(--tone-neutral-01,5 5 5))/.4);writing-mode:vertical-rl}.spine-text>span{min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spine-author{flex-shrink:4}.spine-name{font-family:var(--font-title,Roboto,system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif);--tw-font-weight:var(--font-weight-black,900);font-weight:var(--font-weight-black,900);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.spine-logo,.spine-publisher{flex-shrink:0;margin-inline-start:auto}.spine-publisher{color:var(--mds-book-publisher-color,rgb(var(--magma-accent-on-emphasis,var(--tone-neutral-seed,255 255 255))))}.spine-logo{height:2lh;-webkit-mask-position:bottom;mask-position:bottom;width:1.4lh}@container (min-width:3em){.spine-text{display:grid;gap:0 .8lh;grid-template-columns:minmax(0,1fr) auto}.spine-name{grid-area:1/1}.spine-author{font-size:80%;grid-area:2/1}.spine-logo,.spine-publisher{grid-area:1/2/span 2}}@property --tw-font-weight{syntax:\"*\";inherits:false}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){cursor:auto;touch-action:auto}}"}},[1,"mds-book",{alt:[1],author:[1],binding:[513],format:[513],loading:[1],name:[1],pages:[2],pose:[513],publisher:[1],publisherLogo:[1,"publisher-logo"],src:[1],coverUrl:[32],imageError:[32],imageRatio:[32],logoError:[32],logoUrl:[32]},[[1,"pointerenter","pointerEnterHandler"],[1,"pointermove","pointerMoveHandler"],[1,"pointerdown","pointerDownHandler"],[1,"pointerup","pointerUpHandler"],[1,"pointercancel","pointerLostHandler"],[0,"lostpointercapture","pointerLostHandler"],[1,"pointerleave","pointerLeaveHandler"],[2,"click","clickHandler"]],{format:[{formatHandler:0}],pages:[{pagesHandler:0}],pose:[{poseHandler:0}],publisherLogo:[{publisherLogoHandler:0}],src:[{srcHandler:0}]}]),U=O,Z=function(){"undefined"!=typeof customElements&&["mds-book"].forEach((o=>{"mds-book"===o&&(customElements.get(e(o))||customElements.define(e(o),O))}))};export{U as MdsBook,Z as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as
|
|
1
|
+
import{M as s,d as o}from"./p-Dzkiu-es.js";const p=s,r=o;export{p as MdsCalendarCell,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as o,d as
|
|
1
|
+
import{M as o,d as r}from"./p-Cwg4vtOr.js";const s=o,t=r;export{s as MdsCalendar,t as defineCustomElement}
|