@maggioli-design-system/magma 2.13.0 → 2.14.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 +7 -0
- package/agents/mcp.md +12 -4
- package/agents/patterns/previews/actions/banner.dark.webp +0 -0
- package/agents/patterns/previews/actions/banner.light.webp +0 -0
- package/agents/patterns/previews/actions/confirm.dark.webp +0 -0
- package/agents/patterns/previews/actions/confirm.light.webp +0 -0
- package/agents/patterns/previews/actions/danger-zone.dark.webp +0 -0
- package/agents/patterns/previews/actions/danger-zone.light.webp +0 -0
- package/agents/patterns/previews/actions/destructive-in-menu.dark.webp +0 -0
- package/agents/patterns/previews/actions/dismiss-message.light.webp +0 -0
- package/agents/patterns/previews/actions/dismiss.dark.webp +0 -0
- package/agents/patterns/previews/actions/dismiss.light.webp +0 -0
- package/agents/patterns/previews/actions/part-primary.light.webp +0 -0
- package/agents/patterns/previews/actions/stacked.light.webp +0 -0
- package/agents/patterns/previews/app-shell/back-office.light.webp +0 -0
- package/agents/patterns/previews/app-shell/many-sections.dark.webp +0 -0
- package/agents/patterns/previews/app-shell/many-sections.light.webp +0 -0
- package/agents/patterns/previews/app-shell/public-service.dark.webp +0 -0
- package/agents/patterns/previews/app-shell/public-service.light.webp +0 -0
- package/agents/patterns/previews/app-shell/section-menus.dark.webp +0 -0
- package/agents/patterns/previews/app-shell/section-menus.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-before-sending.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-before-sending.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first-many.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first-many.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/ask-first.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/make-reversible.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/make-reversible.light.webp +0 -0
- package/agents/patterns/previews/confirm-action/send-as-shown.dark.webp +0 -0
- package/agents/patterns/previews/confirm-action/send-as-shown.light.webp +0 -0
- package/agents/patterns/previews/empty-state/add-the-first.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/add-the-first.light.webp +0 -0
- package/agents/patterns/previews/empty-state/all-done.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/all-done.light.webp +0 -0
- package/agents/patterns/previews/empty-state/clear-filters.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/clear-filters.light.webp +0 -0
- package/agents/patterns/previews/empty-state/filled-by-others.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/filled-by-others.light.webp +0 -0
- package/agents/patterns/previews/empty-state/not-found.dark.webp +0 -0
- package/agents/patterns/previews/empty-state/not-found.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/changed-meanwhile.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/changed-meanwhile.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/check-or-repeat.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/content-another-way.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/partial.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/partial.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/retry-action.light.webp +0 -0
- package/agents/patterns/previews/error-recovery/retry-content.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/sign-in-again.dark.webp +0 -0
- package/agents/patterns/previews/error-recovery/sign-in-again.light.webp +0 -0
- package/agents/patterns/previews/item-list/documents-of-a-request.dark.webp +0 -0
- package/agents/patterns/previews/item-list/documents-of-a-request.light.webp +0 -0
- package/agents/patterns/previews/item-list/queue-of-a-desk.dark.webp +0 -0
- package/agents/patterns/previews/item-list/queue-of-a-desk.light.webp +0 -0
- package/agents/patterns/previews/item-list/requests-of-an-office.dark.webp +0 -0
- package/agents/patterns/previews/item-list/requests-of-an-office.light.webp +0 -0
- package/agents/patterns/previews/item-list/requests-to-assign.dark.webp +0 -0
- package/agents/patterns/previews/item-list/requests-to-assign.light.webp +0 -0
- package/agents/patterns/previews/labels-and-values/payment-before-paying.dark.webp +0 -0
- package/agents/patterns/previews/labels-and-values/what-is-sent.dark.webp +0 -0
- package/agents/patterns/previews/labels-and-values/what-is-sent.light.webp +0 -0
- package/agents/patterns/previews/list-with-filters/act-on-many.dark.webp +0 -0
- package/agents/patterns/previews/list-with-filters/act-on-many.light.webp +0 -0
- package/agents/patterns/previews/list-with-filters/find-and-open.light.webp +0 -0
- package/agents/patterns/previews/list-with-filters/show-new-items.dark.webp +0 -0
- package/agents/patterns/previews/list-with-filters/show-new-items.light.webp +0 -0
- package/agents/patterns/previews/loading/await-and-say.dark.webp +0 -0
- package/agents/patterns/previews/loading/first-load.dark.webp +0 -0
- package/agents/patterns/previews/loading/first-load.light.webp +0 -0
- package/agents/patterns/previews/loading/keep-while-reloading.dark.webp +0 -0
- package/agents/patterns/previews/loading/keep-while-reloading.light.webp +0 -0
- package/agents/patterns/previews/loading/long-load-measured.dark.webp +0 -0
- package/agents/patterns/previews/loading/long-load-measured.light.webp +0 -0
- package/agents/patterns/previews/loading/long-load.dark.webp +0 -0
- package/agents/patterns/previews/loading/long-load.light.webp +0 -0
- package/agents/patterns/previews/loading/progress-in-place.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-failed-elsewhere.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-partial-elsewhere.light.webp +0 -0
- package/agents/patterns/previews/message-placement/action-partial-in-place.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/action-partial-in-place.light.webp +0 -0
- package/agents/patterns/previews/message-placement/app-failed.light.webp +0 -0
- package/agents/patterns/previews/message-placement/decision.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/decision.light.webp +0 -0
- package/agents/patterns/previews/message-placement/field-hint.light.webp +0 -0
- package/agents/patterns/previews/message-placement/region-failed.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/region-info.dark.webp +0 -0
- package/agents/patterns/previews/message-placement/region-info.light.webp +0 -0
- package/agents/patterns/previews/page-header/contact-being-edited.dark.webp +0 -0
- package/agents/patterns/previews/page-header/contact-being-edited.light.webp +0 -0
- package/agents/patterns/previews/page-header/members-of-a-group.light.webp +0 -0
- package/agents/patterns/previews/page-header/request-from-the-list.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/ask-for-words.light.webp +0 -0
- package/agents/patterns/previews/record-detail/edit-data.light.webp +0 -0
- package/agents/patterns/previews/record-detail/read-the-data.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/read-the-data.light.webp +0 -0
- package/agents/patterns/previews/record-detail/record-changed.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/record-changed.light.webp +0 -0
- package/agents/patterns/previews/record-detail/run-at-once.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/run-at-once.light.webp +0 -0
- package/agents/patterns/previews/record-detail/work-on-it.dark.webp +0 -0
- package/agents/patterns/previews/record-detail/work-on-it.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-containers.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/between-containers.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-fields.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/between-fields.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-groups.light.webp +0 -0
- package/agents/patterns/previews/rhythm/between-sections.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/between-sections.light.webp +0 -0
- package/agents/patterns/previews/rhythm/inline.light.webp +0 -0
- package/agents/patterns/previews/rhythm/inset.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/inset.light.webp +0 -0
- package/agents/patterns/previews/rhythm/title-content.dark.webp +0 -0
- package/agents/patterns/previews/rhythm/title-content.light.webp +0 -0
- package/agents/patterns/previews/surfaces/band.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/band.light.webp +0 -0
- package/agents/patterns/previews/surfaces/canvas.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/canvas.light.webp +0 -0
- package/agents/patterns/previews/surfaces/card.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/card.light.webp +0 -0
- package/agents/patterns/previews/surfaces/dialog.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/dialog.light.webp +0 -0
- package/agents/patterns/previews/surfaces/edit-actions.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/edit-actions.light.webp +0 -0
- package/agents/patterns/previews/surfaces/intro-band.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/intro-band.light.webp +0 -0
- package/agents/patterns/previews/surfaces/section.dark.webp +0 -0
- package/agents/patterns/previews/surfaces/section.light.webp +0 -0
- package/agents/patterns/previews/titles/dialog.dark.webp +0 -0
- package/agents/patterns/previews/titles/dialog.light.webp +0 -0
- package/agents/patterns/previews/titles/group.light.webp +0 -0
- package/agents/patterns/previews/titles/page.light.webp +0 -0
- package/agents/patterns/previews/titles/part.light.webp +0 -0
- package/agents/patterns/previews/titles/section.light.webp +0 -0
- package/agents/patterns/previews/widths/dialog.light.webp +0 -0
- package/agents/patterns/previews/widths/field.dark.webp +0 -0
- package/agents/patterns/previews/widths/field.light.webp +0 -0
- package/agents/patterns/previews/widths/form.dark.webp +0 -0
- package/agents/patterns/previews/widths/form.light.webp +0 -0
- package/agents/patterns/previews/widths/page.dark.webp +0 -0
- package/agents/patterns/previews/widths/page.light.webp +0 -0
- package/agents/patterns/previews/widths/reading.dark.webp +0 -0
- package/agents/patterns/previews/widths/reading.light.webp +0 -0
- package/agents/patterns.md +4 -3
- package/dist/cjs/mds-input-range.cjs.entry.js +27 -6
- package/dist/collection/components/mds-accordion/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-item/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-timer/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-timer/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-timer-item/documentation.json +1 -1
- package/dist/collection/components/mds-author/AGENTS.md +1 -1
- package/dist/collection/components/mds-author/documentation.json +1 -1
- package/dist/collection/components/mds-avatar/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar/documentation.json +1 -1
- package/dist/collection/components/mds-avatar-stack/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar-stack/documentation.json +1 -1
- package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar-stack-item/documentation.json +1 -1
- package/dist/collection/components/mds-badge/AGENTS.md +1 -1
- package/dist/collection/components/mds-badge/documentation.json +1 -1
- package/dist/collection/components/mds-banner/AGENTS.md +1 -1
- package/dist/collection/components/mds-banner/documentation.json +1 -1
- package/dist/collection/components/mds-benchmark-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-benchmark-bar/documentation.json +1 -1
- package/dist/collection/components/mds-bibliography/AGENTS.md +1 -1
- package/dist/collection/components/mds-bibliography/documentation.json +1 -1
- package/dist/collection/components/mds-book/AGENTS.md +1 -1
- package/dist/collection/components/mds-book/documentation.json +1 -1
- package/dist/collection/components/mds-breadcrumb/AGENTS.md +1 -1
- package/dist/collection/components/mds-breadcrumb/documentation.json +1 -1
- package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-breadcrumb-item/documentation.json +1 -1
- package/dist/collection/components/mds-button/AGENTS.md +1 -1
- package/dist/collection/components/mds-button/documentation.json +1 -1
- package/dist/collection/components/mds-button-dropdown/AGENTS.md +1 -1
- package/dist/collection/components/mds-button-dropdown/documentation.json +1 -1
- package/dist/collection/components/mds-button-group/AGENTS.md +1 -1
- package/dist/collection/components/mds-button-group/documentation.json +1 -1
- package/dist/collection/components/mds-calendar/AGENTS.md +1 -1
- package/dist/collection/components/mds-calendar/documentation.json +1 -1
- package/dist/collection/components/mds-calendar-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-calendar-cell/documentation.json +1 -1
- package/dist/collection/components/mds-card/AGENTS.md +1 -1
- package/dist/collection/components/mds-card/documentation.json +1 -1
- package/dist/collection/components/mds-card-content/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-content/documentation.json +1 -1
- package/dist/collection/components/mds-card-footer/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-footer/documentation.json +1 -1
- package/dist/collection/components/mds-card-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-header/documentation.json +1 -1
- package/dist/collection/components/mds-card-media/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-media/documentation.json +1 -1
- package/dist/collection/components/mds-chip/AGENTS.md +1 -1
- package/dist/collection/components/mds-chip/documentation.json +1 -1
- package/dist/collection/components/mds-details/AGENTS.md +1 -1
- package/dist/collection/components/mds-details/documentation.json +1 -1
- package/dist/collection/components/mds-dropdown/AGENTS.md +1 -1
- package/dist/collection/components/mds-dropdown/documentation.json +1 -1
- package/dist/collection/components/mds-emoji/AGENTS.md +1 -1
- package/dist/collection/components/mds-emoji/documentation.json +1 -1
- package/dist/collection/components/mds-entity/AGENTS.md +1 -1
- package/dist/collection/components/mds-entity/documentation.json +1 -1
- package/dist/collection/components/mds-file/AGENTS.md +1 -1
- package/dist/collection/components/mds-file/documentation.json +1 -1
- package/dist/collection/components/mds-file-preview/AGENTS.md +1 -1
- package/dist/collection/components/mds-file-preview/documentation.json +1 -1
- package/dist/collection/components/mds-filter/AGENTS.md +1 -1
- package/dist/collection/components/mds-filter/documentation.json +1 -1
- package/dist/collection/components/mds-filter-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-filter-item/documentation.json +1 -1
- package/dist/collection/components/mds-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-header/documentation.json +1 -1
- package/dist/collection/components/mds-header-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-header-bar/documentation.json +1 -1
- package/dist/collection/components/mds-help/AGENTS.md +1 -1
- package/dist/collection/components/mds-help/documentation.json +1 -1
- package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +1 -1
- package/dist/collection/components/mds-horizontal-scroll/documentation.json +1 -1
- package/dist/collection/components/mds-hr/AGENTS.md +1 -1
- package/dist/collection/components/mds-hr/documentation.json +1 -1
- package/dist/collection/components/mds-icon/AGENTS.md +1 -1
- package/dist/collection/components/mds-icon/documentation.json +1 -1
- package/dist/collection/components/mds-img/AGENTS.md +1 -1
- package/dist/collection/components/mds-img/documentation.json +1 -1
- package/dist/collection/components/mds-input/AGENTS.md +1 -1
- package/dist/collection/components/mds-input/documentation.json +1 -1
- package/dist/collection/components/mds-input-date/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date/documentation.json +1 -1
- package/dist/collection/components/mds-input-date-range/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date-range/documentation.json +1 -1
- package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date-range-preselection/documentation.json +1 -1
- package/dist/collection/components/mds-input-field/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-field/documentation.json +1 -1
- package/dist/collection/components/mds-input-otp/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-otp/documentation.json +1 -1
- package/dist/collection/components/mds-input-range/AGENTS.md +3 -1
- package/dist/collection/components/mds-input-range/documentation.json +2 -2
- package/dist/collection/components/mds-input-range/mds-input-range.css +109 -1
- package/dist/collection/components/mds-input-range/mds-input-range.js +35 -5
- package/dist/collection/components/mds-input-range-value/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-range-value/documentation.json +1 -1
- package/dist/collection/components/mds-input-select/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-select/documentation.json +1 -1
- package/dist/collection/components/mds-input-switch/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-switch/documentation.json +1 -1
- package/dist/collection/components/mds-input-tip/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-tip/documentation.json +1 -1
- package/dist/collection/components/mds-input-tip-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-tip-item/documentation.json +1 -1
- package/dist/collection/components/mds-input-upload/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-upload/documentation.json +1 -1
- package/dist/collection/components/mds-keyboard/AGENTS.md +1 -1
- package/dist/collection/components/mds-keyboard/documentation.json +1 -1
- package/dist/collection/components/mds-keyboard-key/AGENTS.md +1 -1
- package/dist/collection/components/mds-keyboard-key/documentation.json +1 -1
- package/dist/collection/components/mds-kpi/AGENTS.md +1 -1
- package/dist/collection/components/mds-kpi/documentation.json +1 -1
- package/dist/collection/components/mds-kpi-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-kpi-item/documentation.json +1 -1
- package/dist/collection/components/mds-label/AGENTS.md +1 -1
- package/dist/collection/components/mds-label/documentation.json +1 -1
- package/dist/collection/components/mds-link/AGENTS.md +1 -1
- package/dist/collection/components/mds-link/documentation.json +1 -1
- package/dist/collection/components/mds-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-list/documentation.json +1 -1
- package/dist/collection/components/mds-list-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-list-item/documentation.json +1 -1
- package/dist/collection/components/mds-mention/AGENTS.md +1 -1
- package/dist/collection/components/mds-mention/documentation.json +1 -1
- package/dist/collection/components/mds-modal/AGENTS.md +1 -1
- package/dist/collection/components/mds-modal/documentation.json +1 -1
- package/dist/collection/components/mds-note/AGENTS.md +1 -1
- package/dist/collection/components/mds-note/documentation.json +1 -1
- package/dist/collection/components/mds-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-notification/documentation.json +1 -1
- package/dist/collection/components/mds-paginator/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator/documentation.json +1 -1
- package/dist/collection/components/mds-paginator-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator-item/documentation.json +1 -1
- package/dist/collection/components/mds-policy-ai/AGENTS.md +1 -1
- package/dist/collection/components/mds-policy-ai/documentation.json +1 -1
- package/dist/collection/components/mds-pref/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref/documentation.json +1 -1
- package/dist/collection/components/mds-pref-animation/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-animation/documentation.json +1 -1
- package/dist/collection/components/mds-pref-consumption/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-consumption/documentation.json +1 -1
- package/dist/collection/components/mds-pref-contrast/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-contrast/documentation.json +1 -1
- package/dist/collection/components/mds-pref-language/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language/documentation.json +1 -1
- package/dist/collection/components/mds-pref-language-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language-item/documentation.json +1 -1
- package/dist/collection/components/mds-pref-mode/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-mode/documentation.json +1 -1
- package/dist/collection/components/mds-pref-theme/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-theme/documentation.json +1 -1
- package/dist/collection/components/mds-pref-theme-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-theme-item/documentation.json +1 -1
- package/dist/collection/components/mds-price-table/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features-cell/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features-row/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features-row/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-header/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-list-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list-item/documentation.json +1 -1
- package/dist/collection/components/mds-progress/AGENTS.md +1 -1
- package/dist/collection/components/mds-progress/documentation.json +1 -1
- package/dist/collection/components/mds-push-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification/documentation.json +1 -1
- package/dist/collection/components/mds-push-notification-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification-item/documentation.json +1 -1
- package/dist/collection/components/mds-quote/AGENTS.md +1 -1
- package/dist/collection/components/mds-quote/documentation.json +1 -1
- package/dist/collection/components/mds-radial-menu/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu/documentation.json +1 -1
- package/dist/collection/components/mds-radial-menu-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu-item/documentation.json +1 -1
- package/dist/collection/components/mds-radial-progress/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-progress/documentation.json +1 -1
- package/dist/collection/components/mds-separator/AGENTS.md +1 -1
- package/dist/collection/components/mds-separator/documentation.json +1 -1
- package/dist/collection/components/mds-spinner/AGENTS.md +1 -1
- package/dist/collection/components/mds-spinner/documentation.json +1 -1
- package/dist/collection/components/mds-status-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-status-bar/documentation.json +1 -1
- package/dist/collection/components/mds-stepper-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar/documentation.json +1 -1
- package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar-item/documentation.json +1 -1
- package/dist/collection/components/mds-tab/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab/documentation.json +1 -1
- package/dist/collection/components/mds-tab-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar/documentation.json +1 -1
- package/dist/collection/components/mds-tab-bar-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar-item/documentation.json +1 -1
- package/dist/collection/components/mds-tab-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-item/documentation.json +1 -1
- package/dist/collection/components/mds-table/AGENTS.md +1 -1
- package/dist/collection/components/mds-table/documentation.json +1 -1
- package/dist/collection/components/mds-table-body/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-body/documentation.json +1 -1
- package/dist/collection/components/mds-table-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-cell/documentation.json +1 -1
- package/dist/collection/components/mds-table-footer/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-footer/documentation.json +1 -1
- package/dist/collection/components/mds-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header/documentation.json +1 -1
- package/dist/collection/components/mds-table-header-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header-cell/documentation.json +1 -1
- package/dist/collection/components/mds-table-row/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-row/documentation.json +1 -1
- package/dist/collection/components/mds-text/AGENTS.md +1 -1
- package/dist/collection/components/mds-text/documentation.json +1 -1
- package/dist/collection/components/mds-toast/AGENTS.md +1 -1
- package/dist/collection/components/mds-toast/documentation.json +1 -1
- package/dist/collection/components/mds-toast-region/AGENTS.md +1 -1
- package/dist/collection/components/mds-toast-region/documentation.json +1 -1
- package/dist/collection/components/mds-tooltip/AGENTS.md +1 -1
- package/dist/collection/components/mds-tooltip/documentation.json +1 -1
- package/dist/collection/components/mds-tree/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree/documentation.json +1 -1
- package/dist/collection/components/mds-tree-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree-item/documentation.json +1 -1
- package/dist/collection/components/mds-url-view/AGENTS.md +1 -1
- package/dist/collection/components/mds-url-view/documentation.json +1 -1
- package/dist/collection/components/mds-usage/AGENTS.md +1 -1
- package/dist/collection/components/mds-usage/documentation.json +1 -1
- package/dist/collection/components/mds-video-wall/AGENTS.md +1 -1
- package/dist/collection/components/mds-video-wall/documentation.json +1 -1
- package/dist/collection/components/mds-zero/AGENTS.md +1 -1
- package/dist/collection/components/mds-zero/documentation.json +1 -1
- package/dist/components/mds-input-range.js +1 -1
- package/dist/documentation.json +2 -2
- package/dist/esm/mds-input-range.entry.js +27 -6
- package/dist/esm-es5/mds-input-range.entry.js +31 -24
- package/dist/hydrate/index.js +36 -6
- package/dist/hydrate/index.mjs +36 -6
- package/dist/lint/mcp/tools.json +21 -3
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/p-1e43613e.entry.js +1 -0
- package/dist/magma-components/p-B7Jp0tqu.system.js +1 -1
- package/dist/magma-components/p-b20f811b.system.entry.js +120 -0
- package/dist/mcp/checks.js +49 -20
- package/dist/mcp/cli.js +8 -2
- package/dist/mcp/context.js +21 -0
- package/dist/mcp/guides.js +2 -1
- package/dist/mcp/patterns.js +19 -9
- package/dist/mcp/render.js +4 -4
- package/dist/mcp/root.js +63 -0
- package/dist/mcp/tools.json +21 -3
- package/dist/stats.json +21 -19
- package/dist/types/components/mds-input-range/mds-input-range.d.ts +9 -0
- package/package.json +1 -1
- package/dist/magma-components/p-ccb64689.system.entry.js +0 -113
- package/dist/magma-components/p-d32ca6ce.entry.js +0 -1
package/dist/mcp/patterns.js
CHANGED
|
@@ -21,7 +21,7 @@ import { existsSync } from 'node:fs';
|
|
|
21
21
|
import path from 'node:path';
|
|
22
22
|
import { loadComponents, magmaRoot, BLOCK, DESIGN_LANGUAGE, MAGMA_LAYER, answer, examplesOf, extendedId, indexPatterns, isLayer, listPatterns, PREVIEW_IMAGE_MODES, previewImageFile, previewOf, projectErrors, rulesOfCase, readPatternDir, readPreviews, readProjectDir, regionsFor, resolveLayer, situationsMatching, splitBody, } from '@maggioli-design-system/magma/lint';
|
|
23
23
|
import { ToolError } from './protocol.js';
|
|
24
|
-
import { GAP, GAP_SCHEMA, wordsOf } from './context.js';
|
|
24
|
+
import { GAP, GAP_SCHEMA, pathFor, wordsOf } from './context.js';
|
|
25
25
|
/** Where a product keeps its layer, in its own repository (#1174, "The code: the plan"). */
|
|
26
26
|
export const PRODUCT_LAYER_DIR = 'magma/patterns';
|
|
27
27
|
/** Where the installed magma ships its patterns and the domains of the design language. */
|
|
@@ -78,10 +78,10 @@ const read = (context) => {
|
|
|
78
78
|
const previewIn = (context, preview) => {
|
|
79
79
|
const images = Object.fromEntries(PREVIEW_IMAGE_MODES.flatMap((mode) => {
|
|
80
80
|
const file = previewImageFile(preview.file, mode);
|
|
81
|
-
return existsSync(file) ? [[mode,
|
|
81
|
+
return existsSync(file) ? [[mode, pathFor(context, file)]] : [];
|
|
82
82
|
}));
|
|
83
83
|
return {
|
|
84
|
-
file:
|
|
84
|
+
file: pathFor(context, preview.file),
|
|
85
85
|
...(Object.keys(images).length ? { images } : {}),
|
|
86
86
|
try: preview.try,
|
|
87
87
|
...(preview.height ? { height: preview.height } : {}),
|
|
@@ -94,12 +94,12 @@ const previewIn = (context, preview) => {
|
|
|
94
94
|
* example, `examples` the others in order (<id>.2.html, ...), render_preview's `example` 2 on.
|
|
95
95
|
*/
|
|
96
96
|
export const previewPaths = (context, previews, pattern, id) => {
|
|
97
|
-
const [first, ...more] = examplesOf(previews, pattern, id).map((one) =>
|
|
97
|
+
const [first, ...more] = examplesOf(previews, pattern, id).map((one) => pathFor(context, one.file));
|
|
98
98
|
return first ? { preview: first, ...(more.length ? { examples: more } : {}) } : {};
|
|
99
99
|
};
|
|
100
100
|
/** The problems of the project's files, each with the file it is in. */
|
|
101
101
|
const problemsIn = (context, problems, files) => {
|
|
102
|
-
const found = files.flatMap((file) => (problems.get(file) ?? []).map((one) => `${
|
|
102
|
+
const found = files.flatMap((file) => (problems.get(file) ?? []).map((one) => `${pathFor(context, file)}: ${one}`));
|
|
103
103
|
return found.length ? { layerErrors: found } : {};
|
|
104
104
|
};
|
|
105
105
|
/** The words of a pattern a need is matched against, by weight. */
|
|
@@ -116,7 +116,7 @@ export const CANDIDATE = 'A candidate: Magma knows this need and has no default
|
|
|
116
116
|
export const getPattern = (context) => ({
|
|
117
117
|
name: 'get_pattern',
|
|
118
118
|
title: 'Read a Magma pattern',
|
|
119
|
-
description: 'The patterns Magma ships: the solution to a task across components (where a message goes, confirming an action, an empty, a loading or a failed part), the same in every product; first the domains of the design language (kind design-language), the rules of composition every pattern stands on (the space between elements, ...), then the building blocks (kind block), the sections of a page that come back in several patterns (the page header). Without arguments the list,
|
|
119
|
+
description: 'The patterns Magma ships: the solution to a task across components (where a message goes, confirming an action, an empty, a loading or a failed part), the same in every product; first the domains of the design language (kind design-language), the rules of composition every pattern stands on (the space between elements, ...), then the building blocks (kind block), the sections of a page that come back in several patterns (the page header). Without arguments the list, in layerDir the folder of the layers of this project (its magma/patterns/) and in layerErrors what is wrong in them; with need the patterns for it; with id the pattern (its variables, cases, always-true rules and open choices, with the layer of this project applied, and in layerFile the file that layer is read from, to write or change); with id and situation, the values of its variables you know, the one case to follow (with its preview when Magma has one: the stage, as markup, what to try in it and the paths of its images, light and dark, to show where the stage cannot run, and in rules the rules of the domains it relies on, each with its domain, its text and the path of its preview; the other examples of the case in examples), or which variables are still to settle; for a block, the regions that show, in the order of the page, and when the values match one of its situations, every variable given, the preview of that situation as for a case (the stage, what to try, the other examples); with id and section the text of that section. Ask before building a flow or the head of a page, and follow the case or the regions it gives and its rules.',
|
|
120
120
|
inputSchema: {
|
|
121
121
|
type: 'object',
|
|
122
122
|
properties: {
|
|
@@ -160,6 +160,14 @@ export const getPattern = (context) => ({
|
|
|
160
160
|
pattern: object,
|
|
161
161
|
id: string,
|
|
162
162
|
renamedFrom: string,
|
|
163
|
+
layerDir: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: "The folder of this project's layers and own patterns, where get_pattern reads them.",
|
|
166
|
+
},
|
|
167
|
+
layerFile: {
|
|
168
|
+
type: 'string',
|
|
169
|
+
description: "The file this project's layer of the pattern is read from, written or not yet: write or change the layer there.",
|
|
170
|
+
},
|
|
163
171
|
layerErrors: strings,
|
|
164
172
|
answer: object,
|
|
165
173
|
candidates: { type: 'array', items: object },
|
|
@@ -203,6 +211,8 @@ export const getPattern = (context) => ({
|
|
|
203
211
|
}
|
|
204
212
|
return {
|
|
205
213
|
patterns: listPatterns(all),
|
|
214
|
+
// the folder as the agent opens it, also when the project is not where it works (#1387)
|
|
215
|
+
layerDir: pathFor(context, path.join(context.root, PRODUCT_LAYER_DIR)),
|
|
206
216
|
...problemsIn(context, problems, [...problems.keys()].sort()),
|
|
207
217
|
};
|
|
208
218
|
}
|
|
@@ -274,9 +284,7 @@ export const getPattern = (context) => ({
|
|
|
274
284
|
regions: regions.regions,
|
|
275
285
|
...(rules.length ? { rules } : {}),
|
|
276
286
|
...(stage ? { preview: previewIn(context, stage) } : {}),
|
|
277
|
-
...(more.length
|
|
278
|
-
? { examples: more.map((one) => path.relative(context.root, one.file)) }
|
|
279
|
-
: {}),
|
|
287
|
+
...(more.length ? { examples: more.map((one) => pathFor(context, one.file)) } : {}),
|
|
280
288
|
},
|
|
281
289
|
...(regions.missing.length
|
|
282
290
|
? { candidates: regions.depends, missing: missingOf(regions.missing) }
|
|
@@ -340,6 +348,8 @@ export const getPattern = (context) => ({
|
|
|
340
348
|
sections: sections.map((one) => one.heading),
|
|
341
349
|
},
|
|
342
350
|
...renamed,
|
|
351
|
+
// where the layer of a Magma pattern goes, so the agent writes it where it is read (#1387)
|
|
352
|
+
...(base.layer === MAGMA_LAYER ? { layerFile: pathFor(context, projectFile) } : {}),
|
|
343
353
|
...mine,
|
|
344
354
|
};
|
|
345
355
|
},
|
package/dist/mcp/render.js
CHANGED
|
@@ -25,7 +25,7 @@ import { createRequire } from 'node:module';
|
|
|
25
25
|
import path from 'node:path';
|
|
26
26
|
import { pathToFileURL } from 'node:url';
|
|
27
27
|
import { magmaRoot, BLOCK, examplesOf, indexPatterns, ownRules, PREVIEW_IMAGE, PREVIEW_IMAGE_MODES, previewOf, readPatternDir, readPreviews, situationIds, } from '@maggioli-design-system/magma/lint';
|
|
28
|
-
import { packageDir, readJsonFile, resolvePackage } from './context.js';
|
|
28
|
+
import { packageDir, pathFor, projectFolder, readJsonFile, resolvePackage, } from './context.js';
|
|
29
29
|
import { folderOf, slugFile } from './icons.js';
|
|
30
30
|
import { ToolError, withImages } from './protocol.js';
|
|
31
31
|
import { inPage, PREVIEW_ID } from './render-page.js';
|
|
@@ -407,7 +407,7 @@ const capture = async (context, browser, html, width, options, frame) => {
|
|
|
407
407
|
const browserFor = async (context) => {
|
|
408
408
|
const chromium = await chromiumOf(context);
|
|
409
409
|
if (!chromium)
|
|
410
|
-
throw new ToolError(
|
|
410
|
+
throw new ToolError(`render_preview needs playwright-core in ${projectFolder(context)}: npm i -D playwright-core there. It drives the Google Chrome or Microsoft Edge of the machine and downloads no browser (agents/mcp.md, "Show the person what you mean").`);
|
|
411
411
|
if (!existsSync(loaderOf(context)))
|
|
412
412
|
throw new ToolError(`The installed magma has no ${LOADER}: the components cannot load.`);
|
|
413
413
|
return launch(chromium);
|
|
@@ -489,7 +489,7 @@ export const renderPreviewImages = async (context, previews, concurrency = 2) =>
|
|
|
489
489
|
}
|
|
490
490
|
catch (error) {
|
|
491
491
|
// a page that does not load (a timeout): the preview it is, not only the driver's words
|
|
492
|
-
throw new Error(`${
|
|
492
|
+
throw new Error(`${pathFor(context, preview.file)}: ${error instanceof Error ? error.message : String(error)}`);
|
|
493
493
|
}
|
|
494
494
|
images[at] = made;
|
|
495
495
|
}
|
|
@@ -703,7 +703,7 @@ export const renderPreview = (context) => ({
|
|
|
703
703
|
pattern: shipped.pattern,
|
|
704
704
|
[rule !== undefined ? 'rule' : 'case']: shipped.id,
|
|
705
705
|
...(shipped.example > 1 ? { example: shipped.example } : {}),
|
|
706
|
-
file:
|
|
706
|
+
file: pathFor(context, shipped.file),
|
|
707
707
|
...(shipped.try ? { try: shipped.try } : {}),
|
|
708
708
|
},
|
|
709
709
|
}
|
package/dist/mcp/root.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Where the project is: the folder the tools that look at the project read and resolve from
|
|
3
|
+
(check_setup, check_markup, render_preview, the product layer of get_pattern), chosen once by
|
|
4
|
+
the command and shared by every tool (#1387). The order, each step with the source that
|
|
5
|
+
decides it ("Where each answer comes from" in ../README.md):
|
|
6
|
+
|
|
7
|
+
1. `--root`, when the client names the folder.
|
|
8
|
+
2. The folder the client starts the server in, when its package.json declares
|
|
9
|
+
@maggioli-design-system/magma: every install track of the guides installs it
|
|
10
|
+
(agents/web-components.md, react.md, angular.md, step 1), so it is a Magma project.
|
|
11
|
+
3. The project the command runs magma from: the folder above the outermost `node_modules` of
|
|
12
|
+
the path the client started (`process.argv[1]`, which node keeps as given, the symlinks of
|
|
13
|
+
npm's `.bin` and of pnpm's store unresolved, where `import.meta.url` is the real file),
|
|
14
|
+
when it lies inside the start folder and declares magma. A client opens a workspace and
|
|
15
|
+
starts its servers there (`.mcp.json` at its root for Claude Code), so a project inside it
|
|
16
|
+
is one of its projects, as a lab in `tools/asset_lab` of a repository; an install outside
|
|
17
|
+
it (a global install, the cache of `npx -p` or of `pnpm dlx`) says nothing about it.
|
|
18
|
+
4. Otherwise the start folder, as before: check_setup says it has no package.json.
|
|
19
|
+
*/
|
|
20
|
+
import path from 'node:path';
|
|
21
|
+
import { readJsonFile } from './context.js';
|
|
22
|
+
/** The package every install track installs, and the one that ships this server. */
|
|
23
|
+
const MAGMA = '@maggioli-design-system/magma';
|
|
24
|
+
/**
|
|
25
|
+
* The file the `magma-mcp` bin of magma runs, inside the package (`bin` of its package.json,
|
|
26
|
+
* held by test/shipped.test.ts): a client may name it instead of the bin (#1387).
|
|
27
|
+
*/
|
|
28
|
+
export const BIN_FILE = 'dist/mcp/cli.js';
|
|
29
|
+
/** The folder has a package.json that declares magma, as a dependency or a dev dependency. */
|
|
30
|
+
export const declaresMagma = (dir) => {
|
|
31
|
+
const manifest = readJsonFile(path.join(dir, 'package.json'));
|
|
32
|
+
return Boolean(manifest?.dependencies?.[MAGMA] ?? manifest?.devDependencies?.[MAGMA]);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* The folder above the outermost `node_modules` of an absolute path: the project that
|
|
36
|
+
* installed what the path names. The outermost, because pnpm's store
|
|
37
|
+
* (`node_modules/.pnpm/<package>/node_modules/...`) and a nested install sit inside the
|
|
38
|
+
* project's own `node_modules`. Undefined when the path has none (a checkout, Yarn PnP).
|
|
39
|
+
*/
|
|
40
|
+
export const installedIn = (file) => {
|
|
41
|
+
const parts = path.resolve(file).split(path.sep);
|
|
42
|
+
const index = parts.indexOf('node_modules');
|
|
43
|
+
return index > 0 ? parts.slice(0, index).join(path.sep) || path.sep : undefined;
|
|
44
|
+
};
|
|
45
|
+
/** `dir` is `parent` or a folder inside it. */
|
|
46
|
+
const within = (dir, parent) => {
|
|
47
|
+
const relative = path.relative(parent, dir);
|
|
48
|
+
return relative !== '..' && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The project the tools look at, and how it was found, from `--root` (`option`), the folder
|
|
52
|
+
* the client started the server in (`start`) and the file it started (`entry`).
|
|
53
|
+
*/
|
|
54
|
+
export const projectRoot = ({ option, start, entry, }) => {
|
|
55
|
+
if (option)
|
|
56
|
+
return { root: path.resolve(start, option), rootFrom: 'option' };
|
|
57
|
+
if (declaresMagma(start))
|
|
58
|
+
return { root: start, rootFrom: 'start' };
|
|
59
|
+
const installed = entry ? installedIn(path.resolve(start, entry)) : undefined;
|
|
60
|
+
if (installed && within(installed, start) && declaresMagma(installed))
|
|
61
|
+
return { root: installed, rootFrom: 'install' };
|
|
62
|
+
return { root: start, rootFrom: 'start' };
|
|
63
|
+
};
|
package/dist/mcp/tools.json
CHANGED
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
{
|
|
917
917
|
"name": "get_pattern",
|
|
918
918
|
"title": "Read a Magma pattern",
|
|
919
|
-
"description": "The patterns Magma ships: the solution to a task across components (where a message goes, confirming an action, an empty, a loading or a failed part), the same in every product; first the domains of the design language (kind design-language), the rules of composition every pattern stands on (the space between elements, ...), then the building blocks (kind block), the sections of a page that come back in several patterns (the page header). Without arguments the list,
|
|
919
|
+
"description": "The patterns Magma ships: the solution to a task across components (where a message goes, confirming an action, an empty, a loading or a failed part), the same in every product; first the domains of the design language (kind design-language), the rules of composition every pattern stands on (the space between elements, ...), then the building blocks (kind block), the sections of a page that come back in several patterns (the page header). Without arguments the list, in layerDir the folder of the layers of this project (its magma/patterns/) and in layerErrors what is wrong in them; with need the patterns for it; with id the pattern (its variables, cases, always-true rules and open choices, with the layer of this project applied, and in layerFile the file that layer is read from, to write or change); with id and situation, the values of its variables you know, the one case to follow (with its preview when Magma has one: the stage, as markup, what to try in it and the paths of its images, light and dark, to show where the stage cannot run, and in rules the rules of the domains it relies on, each with its domain, its text and the path of its preview; the other examples of the case in examples), or which variables are still to settle; for a block, the regions that show, in the order of the page, and when the values match one of its situations, every variable given, the preview of that situation as for a case (the stage, what to try, the other examples); with id and section the text of that section. Ask before building a flow or the head of a page, and follow the case or the regions it gives and its rules.",
|
|
920
920
|
"inputSchema": {
|
|
921
921
|
"type": "object",
|
|
922
922
|
"properties": {
|
|
@@ -995,6 +995,14 @@
|
|
|
995
995
|
"renamedFrom": {
|
|
996
996
|
"type": "string"
|
|
997
997
|
},
|
|
998
|
+
"layerDir": {
|
|
999
|
+
"type": "string",
|
|
1000
|
+
"description": "The folder of this project's layers and own patterns, where get_pattern reads them."
|
|
1001
|
+
},
|
|
1002
|
+
"layerFile": {
|
|
1003
|
+
"type": "string",
|
|
1004
|
+
"description": "The file this project's layer of the pattern is read from, written or not yet: write or change the layer there."
|
|
1005
|
+
},
|
|
998
1006
|
"layerErrors": {
|
|
999
1007
|
"type": "array",
|
|
1000
1008
|
"items": {
|
|
@@ -1146,7 +1154,7 @@
|
|
|
1146
1154
|
{
|
|
1147
1155
|
"name": "check_setup",
|
|
1148
1156
|
"title": "Check the Magma integration of the project",
|
|
1149
|
-
"description": "Look at the project and list what its Magma integration misses, each with the guide that fixes it: design-tokens and styles installed in the range magma depends on, the React or Angular wrapper at magma's version, the fonts of the typography, an icon set, the icon path, the lint in ESLint and Stylelint, this server in the client configuration. Read-only.",
|
|
1157
|
+
"description": "Look at the project and list what its Magma integration misses, each with the guide that fixes it: design-tokens and styles installed in the range magma depends on, the React or Angular wrapper at magma's version, the fonts of the typography, an icon set, the icon path, the lint in ESLint and Stylelint, this server in the client configuration. Names the folder it read as the project and how the server found it. Read-only.",
|
|
1150
1158
|
"inputSchema": {
|
|
1151
1159
|
"type": "object",
|
|
1152
1160
|
"properties": {}
|
|
@@ -1155,7 +1163,17 @@
|
|
|
1155
1163
|
"type": "object",
|
|
1156
1164
|
"properties": {
|
|
1157
1165
|
"root": {
|
|
1158
|
-
"type": "string"
|
|
1166
|
+
"type": "string",
|
|
1167
|
+
"description": "The folder read as the project."
|
|
1168
|
+
},
|
|
1169
|
+
"rootFrom": {
|
|
1170
|
+
"type": "string",
|
|
1171
|
+
"enum": [
|
|
1172
|
+
"option",
|
|
1173
|
+
"start",
|
|
1174
|
+
"install"
|
|
1175
|
+
],
|
|
1176
|
+
"description": "How the server found it: named by --root (option), the folder the client started it in (start), the project the command runs magma from, inside that folder (install)."
|
|
1159
1177
|
},
|
|
1160
1178
|
"magma": {
|
|
1161
1179
|
"type": "string"
|
package/dist/stats.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-11-
|
|
2
|
+
"timestamp": "2026-11-12T16:08:52",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "node",
|
|
5
5
|
"version": "24.14.0"
|
|
@@ -1113,6 +1113,7 @@
|
|
|
1113
1113
|
"./dist/magma-components/p-19f3b524.system.entry.js",
|
|
1114
1114
|
"./dist/magma-components/p-1d101083.system.entry.js",
|
|
1115
1115
|
"./dist/magma-components/p-1db5ab39.entry.js",
|
|
1116
|
+
"./dist/magma-components/p-1e43613e.entry.js",
|
|
1116
1117
|
"./dist/magma-components/p-1e5d4854.system.entry.js",
|
|
1117
1118
|
"./dist/magma-components/p-1f756317.entry.js",
|
|
1118
1119
|
"./dist/magma-components/p-2100343f.entry.js",
|
|
@@ -1305,6 +1306,7 @@
|
|
|
1305
1306
|
"./dist/magma-components/p-b18b0088.system.entry.js",
|
|
1306
1307
|
"./dist/magma-components/p-b1ORvfSX.js",
|
|
1307
1308
|
"./dist/magma-components/p-b1fe6261.entry.js",
|
|
1309
|
+
"./dist/magma-components/p-b20f811b.system.entry.js",
|
|
1308
1310
|
"./dist/magma-components/p-b47c444e.system.entry.js",
|
|
1309
1311
|
"./dist/magma-components/p-b4856322.entry.js",
|
|
1310
1312
|
"./dist/magma-components/p-b7d90310.entry.js",
|
|
@@ -1329,7 +1331,6 @@
|
|
|
1329
1331
|
"./dist/magma-components/p-ca5867f5.system.entry.js",
|
|
1330
1332
|
"./dist/magma-components/p-cc5518b1.entry.js",
|
|
1331
1333
|
"./dist/magma-components/p-ccb23b6a.entry.js",
|
|
1332
|
-
"./dist/magma-components/p-ccb64689.system.entry.js",
|
|
1333
1334
|
"./dist/magma-components/p-cf8cfcac.system.entry.js",
|
|
1334
1335
|
"./dist/magma-components/p-cfb153b8.entry.js",
|
|
1335
1336
|
"./dist/magma-components/p-cfcb8bb5.entry.js",
|
|
@@ -1338,7 +1339,6 @@
|
|
|
1338
1339
|
"./dist/magma-components/p-d1281855.system.entry.js",
|
|
1339
1340
|
"./dist/magma-components/p-d173ae2f.system.entry.js",
|
|
1340
1341
|
"./dist/magma-components/p-d1751ff6.entry.js",
|
|
1341
|
-
"./dist/magma-components/p-d32ca6ce.entry.js",
|
|
1342
1342
|
"./dist/magma-components/p-d4452e41.entry.js",
|
|
1343
1343
|
"./dist/magma-components/p-d5dec64d.entry.js",
|
|
1344
1344
|
"./dist/magma-components/p-d7813f9b.system.entry.js",
|
|
@@ -1412,6 +1412,7 @@
|
|
|
1412
1412
|
"./www/build/p-19f3b524.system.entry.js",
|
|
1413
1413
|
"./www/build/p-1d101083.system.entry.js",
|
|
1414
1414
|
"./www/build/p-1db5ab39.entry.js",
|
|
1415
|
+
"./www/build/p-1e43613e.entry.js",
|
|
1415
1416
|
"./www/build/p-1e5d4854.system.entry.js",
|
|
1416
1417
|
"./www/build/p-1f756317.entry.js",
|
|
1417
1418
|
"./www/build/p-2100343f.entry.js",
|
|
@@ -1604,6 +1605,7 @@
|
|
|
1604
1605
|
"./www/build/p-b18b0088.system.entry.js",
|
|
1605
1606
|
"./www/build/p-b1ORvfSX.js",
|
|
1606
1607
|
"./www/build/p-b1fe6261.entry.js",
|
|
1608
|
+
"./www/build/p-b20f811b.system.entry.js",
|
|
1607
1609
|
"./www/build/p-b47c444e.system.entry.js",
|
|
1608
1610
|
"./www/build/p-b4856322.entry.js",
|
|
1609
1611
|
"./www/build/p-b7d90310.entry.js",
|
|
@@ -1628,7 +1630,6 @@
|
|
|
1628
1630
|
"./www/build/p-ca5867f5.system.entry.js",
|
|
1629
1631
|
"./www/build/p-cc5518b1.entry.js",
|
|
1630
1632
|
"./www/build/p-ccb23b6a.entry.js",
|
|
1631
|
-
"./www/build/p-ccb64689.system.entry.js",
|
|
1632
1633
|
"./www/build/p-cf8cfcac.system.entry.js",
|
|
1633
1634
|
"./www/build/p-cfb153b8.entry.js",
|
|
1634
1635
|
"./www/build/p-cfcb8bb5.entry.js",
|
|
@@ -1637,7 +1638,6 @@
|
|
|
1637
1638
|
"./www/build/p-d1281855.system.entry.js",
|
|
1638
1639
|
"./www/build/p-d173ae2f.system.entry.js",
|
|
1639
1640
|
"./www/build/p-d1751ff6.entry.js",
|
|
1640
|
-
"./www/build/p-d32ca6ce.entry.js",
|
|
1641
1641
|
"./www/build/p-d4452e41.entry.js",
|
|
1642
1642
|
"./www/build/p-d5dec64d.entry.js",
|
|
1643
1643
|
"./www/build/p-d7813f9b.system.entry.js",
|
|
@@ -2615,15 +2615,15 @@
|
|
|
2615
2615
|
"components": [
|
|
2616
2616
|
"mds-input-range"
|
|
2617
2617
|
],
|
|
2618
|
-
"bundleId": "p-
|
|
2619
|
-
"fileName": "p-
|
|
2618
|
+
"bundleId": "p-1e43613e",
|
|
2619
|
+
"fileName": "p-1e43613e.entry.js",
|
|
2620
2620
|
"imports": [
|
|
2621
2621
|
"p-CPibDZjX.js",
|
|
2622
2622
|
"p-wI0alRSO.js",
|
|
2623
2623
|
"p-BkfGbFba.js",
|
|
2624
2624
|
"p-BXkIXROP.js"
|
|
2625
2625
|
],
|
|
2626
|
-
"originalByteSize":
|
|
2626
|
+
"originalByteSize": 34811
|
|
2627
2627
|
},
|
|
2628
2628
|
{
|
|
2629
2629
|
"key": "mds-label.entry",
|
|
@@ -4266,7 +4266,7 @@
|
|
|
4266
4266
|
"locale-B7Hw4niB.js",
|
|
4267
4267
|
"preference-CBMLGSf7.js"
|
|
4268
4268
|
],
|
|
4269
|
-
"originalByteSize":
|
|
4269
|
+
"originalByteSize": 34832
|
|
4270
4270
|
},
|
|
4271
4271
|
{
|
|
4272
4272
|
"key": "mds-label.entry",
|
|
@@ -5909,7 +5909,7 @@
|
|
|
5909
5909
|
"locale-B7Hw4niB.js",
|
|
5910
5910
|
"preference-CBMLGSf7.js"
|
|
5911
5911
|
],
|
|
5912
|
-
"originalByteSize":
|
|
5912
|
+
"originalByteSize": 34832
|
|
5913
5913
|
},
|
|
5914
5914
|
{
|
|
5915
5915
|
"key": "mds-label.entry",
|
|
@@ -7544,15 +7544,15 @@
|
|
|
7544
7544
|
"components": [
|
|
7545
7545
|
"mds-input-range"
|
|
7546
7546
|
],
|
|
7547
|
-
"bundleId": "p-
|
|
7548
|
-
"fileName": "p-
|
|
7547
|
+
"bundleId": "p-b20f811b.system",
|
|
7548
|
+
"fileName": "p-b20f811b.system.entry.js",
|
|
7549
7549
|
"imports": [
|
|
7550
7550
|
"p-EhfbAdzV.system.js",
|
|
7551
7551
|
"p-BS7eEvwu.system.js",
|
|
7552
7552
|
"p-CzZWts7L.system.js",
|
|
7553
7553
|
"p-DGfoeZMw.system.js"
|
|
7554
7554
|
],
|
|
7555
|
-
"originalByteSize":
|
|
7555
|
+
"originalByteSize": 38430
|
|
7556
7556
|
},
|
|
7557
7557
|
{
|
|
7558
7558
|
"key": "mds-label.entry",
|
|
@@ -9195,7 +9195,7 @@
|
|
|
9195
9195
|
"locale-6jikg4jE.js",
|
|
9196
9196
|
"preference-DTUJPGHS.js"
|
|
9197
9197
|
],
|
|
9198
|
-
"originalByteSize":
|
|
9198
|
+
"originalByteSize": 34948
|
|
9199
9199
|
},
|
|
9200
9200
|
{
|
|
9201
9201
|
"key": "mds-label.entry",
|
|
@@ -45878,6 +45878,9 @@
|
|
|
45878
45878
|
"htmlAttrNames": [
|
|
45879
45879
|
"key",
|
|
45880
45880
|
"class",
|
|
45881
|
+
"aria-hidden",
|
|
45882
|
+
"style",
|
|
45883
|
+
"typography",
|
|
45881
45884
|
"type",
|
|
45882
45885
|
"aria-label",
|
|
45883
45886
|
"aria-valuetext",
|
|
@@ -45894,19 +45897,18 @@
|
|
|
45894
45897
|
"pref-theme-scheme",
|
|
45895
45898
|
"part",
|
|
45896
45899
|
"truncate",
|
|
45897
|
-
"typography",
|
|
45898
45900
|
"role",
|
|
45899
45901
|
"onPointerDown",
|
|
45900
|
-
"style",
|
|
45901
45902
|
"ref",
|
|
45902
45903
|
"name"
|
|
45903
45904
|
],
|
|
45904
45905
|
"htmlTagNames": [
|
|
45906
|
+
"div",
|
|
45907
|
+
"span",
|
|
45908
|
+
"mds-text",
|
|
45905
45909
|
"input",
|
|
45906
45910
|
"header",
|
|
45907
|
-
"
|
|
45908
|
-
"slot",
|
|
45909
|
-
"div"
|
|
45911
|
+
"slot"
|
|
45910
45912
|
],
|
|
45911
45913
|
"htmlParts": [
|
|
45912
45914
|
"header",
|
|
@@ -133,6 +133,8 @@ export declare class MdsInputRange {
|
|
|
133
133
|
* between spaces.
|
|
134
134
|
*/
|
|
135
135
|
private displayValues;
|
|
136
|
+
/** A value as the range shows it: through `formatValue`, or as it is. */
|
|
137
|
+
private formatted;
|
|
136
138
|
protected disabledChanged(newValue: boolean): void;
|
|
137
139
|
protected nameChanged(): void;
|
|
138
140
|
valueChanged(newValue: string, oldValue: string): void;
|
|
@@ -153,6 +155,13 @@ export declare class MdsInputRange {
|
|
|
153
155
|
componentWillLoad(): void;
|
|
154
156
|
componentDidLoad(): void;
|
|
155
157
|
componentDidRender(): void;
|
|
158
|
+
/**
|
|
159
|
+
* The tip of a value, right after the input of its thumb: the CSS shows it while that input is
|
|
160
|
+
* under the pointer, pressed or focused from the keyboard (`.field:hover + .tip`), and places it
|
|
161
|
+
* from `position`, where the value sits on the track (0 to 100).
|
|
162
|
+
*/
|
|
163
|
+
private renderTip;
|
|
164
|
+
/** A native input per thumb, each followed by the tip of its value. */
|
|
156
165
|
private renderThumbs;
|
|
157
166
|
render(): any;
|
|
158
167
|
}
|
package/package.json
CHANGED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
System.register(["./p-EhfbAdzV.system.js","./p-BS7eEvwu.system.js","./p-CzZWts7L.system.js","./p-DGfoeZMw.system.js"],(function(t){"use strict";var r,i,a,e,n,s,o,u,h;return{setters:[function(t){r=t.r;i=t.d;a=t.h;e=t.e;n=t.g;s=t.B},function(t){o=t.s},function(t){u=t.L},function(t){h=t.p}],execute:function(){var d="{{position}} από {{count}}";var c={position:d};var l="{{position}} of {{count}}";var f={position:l};var v="{{position}} de {{count}}";var m={position:v};var p="{{position}} di {{count}}";var g={position:p};var b=function(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-text: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{--mds-input-range-transition-duration:var(--duration-300,.3s);--private-input-range-transition-duration:var(--mds-input-range-transition-duration);--mds-input-range-thumb-background-disabled:rgb(var(--magma-wash-strong,var(--tone-neutral-08,208 208 208)));--mds-input-range-thumb-background:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));--mds-input-range-thumb-cursor:col-resize;--mds-input-range-thumb-size:calc(var(--spacing,.0025rem)*400);--mds-input-range-track-background-disabled:rgb(var(--magma-wash-strong,var(--tone-neutral-08,208 208 208)));--mds-input-range-track-background:rgb(var(--magma-wash-strong,var(--tone-neutral-08,208 208 208)));--mds-input-range-track-progress-background-disabled:rgb(var(--magma-border-strong,var(--border-neutral-strong,140 140 140)));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis-hover,var(--variant-primary-03,7 76 204)));--mds-input-range-track-size:calc(var(--spacing,.0025rem)*600);--private-border-width:calc(var(--mds-input-range-track-size)/2 - var(--mds-input-range-thumb-size)/2);--private-thumb-size:calc(var(--mds-input-range-thumb-size) + var(--private-border-width)*2);display:grid;gap:calc(var(--spacing,.0025rem)*200);grid-template-columns:minmax(0,1fr);transition-duration:var(--private-input-range-transition-duration);transition-property:color;transition-timing-function:var(--ease-out-sine,cubic-bezier(.39,.575,.565,1))}.header{display:flex;gap:calc(var(--spacing,.0025rem)*200)}.label{min-width:0}::slotted(mds-input-range-value){display:none}.value{margin-left:auto}.range{align-items:center;display:flex;height:var(--private-thumb-size);position:relative}.track{box-sizing:border-box;position:absolute;width:100%}.field{appearance:none;background-color:#0000;border-radius:var(--magma-radius-full,var(--radius-full,1000px));flex-grow:1;height:calc(var(--spacing,.0025rem)*400);margin:0;min-width:0;outline:none;z-index:20}.field:focus-visible::-webkit-slider-thumb{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.field::-webkit-slider-thumb{animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));appearance:none;background-color:var(--mds-input-range-thumb-background);border-color:var(--mds-input-range-track-progress-background);border-radius:var(--mds-input-range-thumb-size);border-style:solid;border-width:var(--private-border-width);cursor:var(--mds-input-range-thumb-cursor);height:var(--private-thumb-size);line-height:0;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));transform:translateY(-50%);transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-property:background-color,border;transition-timing-function:ease-in-out;width:var(--private-thumb-size)}.field::-webkit-slider-runnable-track{appearance:none;border:0;height:0;width:100%}.track-progress{background-color:var(--mds-input-range-track-progress-background);display:flex;height:var(--mds-input-range-track-size);transition-duration:var(--private-input-range-transition-duration);transition-property:background-color;width:calc((100% - var(--mds-input-range-track-size))*(var(--mds-input-range-progress,0)*0.01) + var(--mds-input-range-track-size)/2)}.track-progress--between{margin-left:calc((100% - var(--mds-input-range-track-size))*(var(--private-input-range-progress-start,0)*0.01) + var(--mds-input-range-track-size)/2);width:calc((100% - var(--mds-input-range-track-size))*(var(--mds-input-range-progress,0) - var(--private-input-range-progress-start,0))*.01)}.range--several .field{inset-inline:0;pointer-events:none;position:absolute}.range--several .field::-webkit-slider-thumb{pointer-events:auto}.range--several .field--held{z-index:10}.range--several .field:focus{z-index:30}.track-total{background-color:var(--mds-input-range-track-background);display:flex;height:var(--mds-input-range-track-size);overflow:hidden;transition-duration:var(--private-input-range-transition-duration);transition-property:background-color;transition-timing-function:var(--ease-out-sine,cubic-bezier(.39,.575,.565,1));width:100%}.contrast-area,.track-total{border-radius:var(--mds-input-range-track-size)}.contrast-area{margin-left:calc(var(--spacing,.0025rem)*100);margin-right:calc(var(--spacing,.0025rem)*100)}: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]){--private-input-range-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])),:host([pref-theme-scheme=dark]){--mds-input-range-thumb-background:rgb(var(--magma-text-on-emphasis,var(--tone-neutral-seed,255 255 255)));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)))}:host([pref-contrast=more]){color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}:host(:disabled:not([disabled=false])),:host([disabled]:not([disabled=false])){--mds-input-range-thumb-background:var(--mds-input-range-thumb-background-disabled);--mds-input-range-track-background:var(--mds-input-range-track-background-disabled);--mds-input-range-track-progress-background:var(--mds-input-range-track-progress-background-disabled)}:host([disabled]:not([disabled=false])) .field::-webkit-slider-thumb{cursor:not-allowed}:host(:disabled:not([disabled=false])) .field::-webkit-slider-thumb{cursor:not-allowed}@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]){--private-input-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode]):not([pref-theme-scheme=light])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--magma-text-on-emphasis,var(--tone-neutral-seed,255 255 255)));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}}"};var k="mds-input-range-value";var y=t("mds_input_range",/** @class */function(){function t(t){var a=this.constructor;var e=this;if(a===y)r(this,t);this.changeEvent=i(this,"mdsInputRangeChange",7);this.valuesChangeEvent=i(this,"mdsInputRangeValuesChange",7);if(t.$hostElement$["s-ei"]){this.internals=t.$hostElement$["s-ei"]}else{this.internals=t.$hostElement$.attachInternals();t.$hostElement$["s-ei"]=this.internals}
|
|
2
|
-
// the label of the range: its text, the mds-input-range-value children left out
|
|
3
|
-
this.label="";
|
|
4
|
-
// the thumbs of the mds-input-range-value children, in order of value; empty without children,
|
|
5
|
-
// when the range has the one thumb of `value`
|
|
6
|
-
this.thumbs=[];
|
|
7
|
-
// the value of load of each child, the first the range read from it, which a form reset brings
|
|
8
|
-
// back: a child added later starts from the value it came with
|
|
9
|
-
this.childLoadValues=new WeakMap;this.thumbKeys=new WeakMap;this.nextThumbKey=0;this.loaded=false;
|
|
10
|
-
// the last child is gone: the input of `value` comes back with the next render
|
|
11
|
-
this.singlePending=false;this.t=new u({el:c,en:f,es:m,it:g});
|
|
12
|
-
// the disabled state of the host as a form control: its own disabled, or a disabled fieldset
|
|
13
|
-
// around it, which disables the host but not the native control in its shadow root
|
|
14
|
-
this.formDisabled=false;
|
|
15
|
-
/**
|
|
16
|
-
* The greatest value in the range of permitted values
|
|
17
|
-
*/this.max=100;
|
|
18
|
-
/**
|
|
19
|
-
* The lowest value in the range of permitted values
|
|
20
|
-
*/this.min=0;
|
|
21
|
-
/**
|
|
22
|
-
* The step attribute is a number that specifies the granularity that
|
|
23
|
-
* the value must adhere to, or the special value any, which is described below.
|
|
24
|
-
*/this.step=1;this.onInput=function(){if(e.inputElement==null)return;
|
|
25
|
-
// a range input always holds a number: the browser sanitizes anything else
|
|
26
|
-
// trigger valueChanged that update progress and emit event
|
|
27
|
-
e.value=Number(e.inputElement.value)};
|
|
28
|
-
/** Reads the children again: the label, the values and their names, the children that came and went. */this.syncChildren=function(){if(!e.loaded)return;e.label=e.readLabel();var t=e.readThumbs();
|
|
29
|
-
// a value brought inside the range goes back on its child, even when its thumb stays put
|
|
30
|
-
e.writeChildValues(t);if(e.sameThumbs(t))return;if(t.length===0&&e.thumbs.length>0)e.singlePending=true;t.forEach((function(t){var r=t.element,i=t.value;if(!e.childLoadValues.has(r))e.childLoadValues.set(r,i)}));e.updateThumbs(t)};
|
|
31
|
-
// the drag of the pointer: the native input knows only min and max, the neighbours stop it here
|
|
32
|
-
this.onThumbInput=function(t){var r=t.target;var i=e.thumbInputs().indexOf(r);if(i<0)return;e.moveThumb(i,Number(r.value))};this.onThumbKeyDown=function(t){var r=e.thumbInputs().indexOf(t.target);if(r<0||e.isDisabled())return;var i=e.thumbs[r].value;var a=e.bounds(r),n=a[0],s=a[1];var o=e.allowedStep();
|
|
33
|
-
// a page is a tenth of the range, at least a step, as on a native range input
|
|
34
|
-
var u=Math.max((e.max-e.min)/10,o);var h={ArrowDown:i-o,ArrowLeft:i-o,ArrowRight:i+o,ArrowUp:i+o,End:s,Home:n,PageDown:i-u,PageUp:i+u};var d=h[t.key];if(d===undefined)return;t.preventDefault();e.moveThumb(r,d)};
|
|
35
|
-
/**
|
|
36
|
-
* A press on the track between several thumbs moves the nearest one there, as a press on the
|
|
37
|
-
* track of a native range input moves its thumb. Of two thumbs as near, the one with room
|
|
38
|
-
* toward the pointer moves. The thumbs themselves catch the pointer, which the inputs let
|
|
39
|
-
* through to the track.
|
|
40
|
-
*/this.onTrackPointerDown=function(t){var r;if(e.thumbs.length<2||e.isDisabled()||t.button!==0)return;if(t.target.tagName==="INPUT")return;var i=t.currentTarget;var a=i.querySelector(".track-total");if(!a)return;var n=i.getBoundingClientRect();
|
|
41
|
-
// the thumb is as large as the track is tall, and its centre travels the track less one thumb
|
|
42
|
-
var s=a.getBoundingClientRect().height;var o=Math.min(Math.max((t.clientX-n.left-s/2)/(n.width-s),0),1);var u=e.normalize(e.min+o*(e.max-e.min));var h=0;e.thumbs.forEach((function(t,r){var i=Math.abs(t.value-u);var a=Math.abs(e.thumbs[h].value-u);if(i<a||i===a&&u>t.value)h=r}));
|
|
43
|
-
// no mousedown after this: it would take the focus back from the thumb
|
|
44
|
-
t.preventDefault();(r=e.thumbInputs()[h])===null||r===void 0?void 0:r.focus();e.moveThumb(h,u)};this.isDisabled=function(){return!!e.disabled||e.formDisabled}}
|
|
45
|
-
/** As on a native input, a step that is not a positive number falls back to the default, 1. */t.prototype.allowedStep=function(){var t=Number(this.step);return t>0?t:1};
|
|
46
|
-
/**
|
|
47
|
-
* A value inside `min` and `max`, on the nearest step from `min`, as a native range input
|
|
48
|
-
* sanitizes it; a step past `max` falls back one step. The values are scaled to integers by
|
|
49
|
-
* the decimals of the step and of `min`, so that a decimal step snaps without float errors.
|
|
50
|
-
*/t.prototype.normalize=function(t){var r=this.allowedStep();var i=Math.pow(10,Math.max(this.countDecimals(r),this.countDecimals(this.min)));var a=Math.round(this.min*i);var e=Math.round(this.max*i);var n=Math.round(r*i);var s=Math.min(Math.max(t*i,a),e);var o=Math.round((s-a)/n)*n+a;if(o>e)o-=n;return o/i};
|
|
51
|
-
/** The default of a native range input: the middle of the range, on the step. */t.prototype.middle=function(){return this.normalize(this.min+(this.max-this.min)/2)};
|
|
52
|
-
/** Where a value sits on the track, from 0 at `min` to 100 at `max`. */t.prototype.percent=function(t){return this.max===this.min?0:(t-this.min)/(this.max-this.min)*100};t.prototype.calculateProgress=function(){if(this.inputElement==null)return;this.value=this.normalize(Number(this.inputElement.value));o(this.internals,this.value.toString());var t=this.max-this.min;var r=this.value-this.min;this.progress=r/t*100};t.prototype.countDecimals=function(t){if(Math.floor(t)===t)return 0;return t.toString().split(".")[1].length||0};
|
|
53
|
-
/** The label of the range: its text, without the names of its values. */t.prototype.readLabel=function(){return Array.from(this.element.childNodes).filter((function(t){return t.nodeName.toLowerCase()!==k})).map((function(t){var r;return(r=t.textContent)!==null&&r!==void 0?r:""})).join("").trim()};
|
|
54
|
-
/**
|
|
55
|
-
* The mds-input-range-value children as thumbs, each value inside the range and on its step, in
|
|
56
|
-
* order of value. Two thumbs on one value keep the order they had, so that a thumb that reaches
|
|
57
|
-
* its neighbour does not take its place; a new one comes after them, in the order of the markup.
|
|
58
|
-
*/t.prototype.readThumbs=function(){var t=this;var r=new Map(this.thumbs.map((function(t,r){var i=t.element;return[i,r]})));var i=Array.from(this.element.children).filter((function(t){return t.tagName.toLowerCase()===k}));return i.map((function(i,a){var e,n,s,o;
|
|
59
|
-
// the prop, or the attribute of a child not defined yet
|
|
60
|
-
var u=(e=i.value)!==null&&e!==void 0?e:i.getAttribute("value");var h=u==null||String(u).trim()===""?NaN:Number(u);var d=t.thumbKeys.get(i);if(d===undefined){d=t.nextThumbKey++;t.thumbKeys.set(i,d)}return{element:i,key:d,name:(s=(n=i.textContent)===null||n===void 0?void 0:n.trim())!==null&&s!==void 0?s:"",rank:(o=r.get(i))!==null&&o!==void 0?o:r.size+a,value:t.normalize(Number.isNaN(h)?t.middle():h)}})).sort((function(t,r){return t.value-r.value||t.rank-r.rank})).map((function(t){var r=t.element,i=t.key,a=t.name,e=t.value;return{element:r,key:i,name:a,value:e}}))};t.prototype.sameThumbs=function(t){var r=this;return t.length===this.thumbs.length&&t.every((function(t,i){var a=t.element,e=t.name,n=t.value;var s=r.thumbs[i];return a===s.element&&e===s.name&&n===s.value}))};
|
|
61
|
-
/** Writes a value on its child: through the prop, or the attribute until the child is defined. */t.prototype.writeChildValue=function(t,r){var i;if((i=globalThis.customElements)===null||i===void 0?void 0:i.get(k)){t.value=r}else{t.setAttribute("value",String(r))}};t.prototype.writeChildValues=function(t){var r=this;t.forEach((function(t){var i=t.element,a=t.value;if(Number(i.value)!==a)r.writeChildValue(i,a)}))};
|
|
62
|
-
/** Takes a new list of thumbs: their values on the children, in the form and in the event. */t.prototype.updateThumbs=function(t){this.thumbs=t;this.writeChildValues(t);this.updateFormValue();this.emitValues()};
|
|
63
|
-
/**
|
|
64
|
-
* Emits mdsInputRangeValuesChange once per list of values. The first list, the one of load, is
|
|
65
|
-
* recorded without an event: nothing has moved yet.
|
|
66
|
-
*/t.prototype.emitValues=function(){var t=this.thumbs.map((function(t){var r=t.value;return r}));var r=JSON.stringify(t);if(r===this.emittedValues)return;var i=this.emittedValues===undefined;this.emittedValues=r;if(i)return;this.valuesChangeEvent.emit({values:t})};
|
|
67
|
-
/**
|
|
68
|
-
* Reports the values to the form: the one value without children; with children an entry per
|
|
69
|
-
* value under `name`, in order, as a native `<select multiple>` and `mds-input-select multiple`.
|
|
70
|
-
*/t.prototype.updateFormValue=function(){var t;if(this.thumbs.length===0){o(this.internals,this.value==null?null:this.value.toString());return}var r=(t=this.name)!==null&&t!==void 0?t:"";if(r===""){o(this.internals,null);return}var i=new FormData;this.thumbs.forEach((function(t){var a=t.value;return i.append(r,a.toString())}));o(this.internals,i)};
|
|
71
|
-
/** The values a thumb can take: from the one before it to the one after it, both included. */t.prototype.bounds=function(t){var r=t>0?this.thumbs[t-1].value:this.min;var i=t<this.thumbs.length-1?this.thumbs[t+1].value:this.max;return[r,i]};t.prototype.thumbInputs=function(){var t,r;return Array.from((r=(t=this.element.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll(".field"))!==null&&r!==void 0?r:[])};
|
|
72
|
-
/** Moves a thumb to a value on the step, which stops at its neighbours: it reaches them, never passes them. */t.prototype.moveThumb=function(t,r){var i=this.bounds(t),a=i[0],e=i[1];var n=Math.min(Math.max(this.normalize(r),a),e);var s=this.thumbInputs()[t];if(s&&Number(s.value)!==n)s.value=String(n);if(n===this.thumbs[t].value)return;this.updateThumbs(this.thumbs.map((function(r,i){return i===t?Object.assign(Object.assign({},r),{value:n}):r})))};
|
|
73
|
-
/**
|
|
74
|
-
* The accessible name of a thumb: the text of its child, as each thumb of the multi-thumb
|
|
75
|
-
* slider of the WAI-ARIA APG; without text, the label of the range and the position of the
|
|
76
|
-
* thumb ("Prezzo, 1 di 2").
|
|
77
|
-
*/t.prototype.thumbName=function(t){var r=this.thumbs[t].name;if(r!=="")return r;var i=this.t.get("position",{position:t+1,count:this.thumbs.length});return this.label===""?i:"".concat(this.label,", ").concat(i)};
|
|
78
|
-
/**
|
|
79
|
-
* The values in the header, in order and formatted as the one value: two are an interval,
|
|
80
|
-
* joined by an en dash (U+2013) between spaces, more are a list, joined by a middle dot (U+00B7)
|
|
81
|
-
* between spaces.
|
|
82
|
-
*/t.prototype.displayValues=function(){var t=this;var r=this.thumbs.map((function(r){var i=r.value;return t.formatValue?t.formatValue(i):String(i)}));return r.join(r.length===2?" – ":" · ")};t.prototype.disabledChanged=function(t){
|
|
83
|
-
/**
|
|
84
|
-
* This is related to ALL disabled attributes set on Magma input components
|
|
85
|
-
* if solved, please check mds-button, mds-input, mds-input-*
|
|
86
|
-
* https://github.com/ionic-team/stencil/issues/5461
|
|
87
|
-
*/
|
|
88
|
-
if(t){o(this.internals,null);return}
|
|
89
|
-
// enabled again, the range reports its values again
|
|
90
|
-
this.updateFormValue()};t.prototype.nameChanged=function(){this.updateFormValue()};t.prototype.valueChanged=function(t,r){if(t===r)return;
|
|
91
|
-
// with mds-input-range-value children the values are theirs, and `value` is left out
|
|
92
|
-
if(this.thumbs.length>0||this.inputElement==null)return;this.inputElement.value=this.value.toString();this.calculateProgress();this.changeEvent.emit(this.value)};
|
|
93
|
-
/** New limits bring the values inside them and onto the new step. */t.prototype.limitsChanged=function(){if(this.thumbs.length>0){this.updateThumbs(this.readThumbs());return}this.calculateProgress()};t.prototype.minChanged=function(){this.limitsChanged()};t.prototype.maxChanged=function(){this.limitsChanged()};t.prototype.stepChanged=function(){this.limitsChanged()};t.prototype.formDisabledCallback=function(t){this.formDisabled=t};
|
|
94
|
-
/**
|
|
95
|
-
* Like a native input, a form reset brings back the value of load, thumb included; with
|
|
96
|
-
* children, each child gets back its value of load.
|
|
97
|
-
*/t.prototype.formResetCallback=function(){var t=this;if(this.thumbs.length>0){this.thumbs.forEach((function(r){var i=r.element;var a=t.childLoadValues.get(i);if(a!==undefined)t.writeChildValue(i,a)}));this.updateThumbs(this.readThumbs());return}if(this.inputElement==null)return;
|
|
98
|
-
// an empty value makes the native input take its default, the middle of the range
|
|
99
|
-
this.inputElement.value=this.loadValue===undefined?"":String(this.loadValue);this.onInput()};t.prototype.connectedCallback=function(){var t;(t=this.childObserver)===null||t===void 0?void 0:t.disconnect();if(!s.isBrowser)return;
|
|
100
|
-
// adding or removing a value is adding or removing a child, and a child's value or text
|
|
101
|
-
// can change from code: the range follows them all
|
|
102
|
-
this.childObserver=new MutationObserver(this.syncChildren);this.childObserver.observe(this.element,{attributeFilter:["value"],characterData:true,childList:true,subtree:true});
|
|
103
|
-
// what changed while the range was out of the page
|
|
104
|
-
this.syncChildren()};t.prototype.disconnectedCallback=function(){var t;(t=this.childObserver)===null||t===void 0?void 0:t.disconnect();this.childObserver=undefined};t.prototype.componentWillLoad=function(){var t=this;var r;var i=Number((r=this.value)!==null&&r!==void 0?r:NaN);this.loadValue=Number.isNaN(i)?undefined:i;this.label=this.readLabel();this.thumbs=this.readThumbs();this.thumbs.forEach((function(r){var i=r.element,a=r.value;t.childLoadValues.set(i,a)}))};t.prototype.componentDidLoad=function(){if(this.thumbs.length>0){
|
|
105
|
-
// the values of the children, brought inside the range, go back on them and to the form
|
|
106
|
-
this.updateThumbs(this.thumbs)}else{this.onInput();// define value
|
|
107
|
-
this.calculateProgress()}
|
|
108
|
-
// the values of load, recorded without an event
|
|
109
|
-
this.emitValues();this.loaded=true;
|
|
110
|
-
// the children that came while the range was loading
|
|
111
|
-
this.syncChildren()};t.prototype.componentDidRender=function(){if(!this.singlePending||this.inputElement==null)return;this.singlePending=false;this.onInput();this.calculateProgress()};t.prototype.renderThumbs=function(){var t=this;return this.thumbs.map((function(r,i){var e=t.bounds(i),n=e[0],s=e[1];return a("input",{key:r.key,class:{field:true,"field--held":n===s},type:"range","aria-label":t.thumbName(i),"aria-valuetext":t.formatValue?t.formatValue(r.value):undefined,disabled:t.isDisabled(),max:t.max,min:t.min,onInput:t.onThumbInput,onKeyDown:t.onThumbKeyDown,step:t.allowedStep(),value:r.value})}))};t.prototype.render=function(){var t=this;var r;var i=this.thumbs.length>0;var n=this.thumbs.length>1;var s=this.thumbs[0];var o=this.thumbs[this.thumbs.length-1];
|
|
112
|
-
// the fill runs from the start to the one thumb, or from the first thumb to the last
|
|
113
|
-
var u={"--mds-input-range-progress":"".concat(i?this.percent(o.value):(r=this.progress)!==null&&r!==void 0?r:0)};if(n)u["--private-input-range-progress-start"]="".concat(this.percent(s.value));return a(e,{key:"462c99434783fc2516ddf6040484e2bc87cb3dba","pref-animation":h.state.animation,"pref-contrast":h.state.contrast,"pref-mode":h.state.mode,"pref-theme-scheme":h.state["theme-scheme"]},a("header",{key:"8b2c95e6cb75396e5d72a8547f7a35d833d2c977",class:"header",part:"header"},a("mds-text",{key:"6d5625b711e63b9b874c0f9f620650bc91eed8cb",class:"label",truncate:"word",typography:"label"},a("slot",{key:"6c635c0e3888d5fc0298c6fb185c4d1350a47e20"})),a("mds-text",{key:"c762c4e553cc3fcd347fd5efb26c6d43403104ff",class:"value",typography:"label"},i?this.displayValues():this.formatValue?this.formatValue(this.value):this.value)),a("div",{key:"70aced606c83cde6aab4e07314cffaab36052640",class:{range:true,"range--several":n},role:i?"group":undefined,"aria-label":i&&this.label!==""?this.label:undefined,onPointerDown:this.onTrackPointerDown},a("div",{key:"8f33045f27c6e1e07aa941363349ba2a238dea92",class:"track",part:"track"},a("div",{key:"47277e1000e73b878894e792c423eda7bb4af267",class:"contrast-area"}),a("div",{key:"279d606dbfaca100339ad98329ba002aed415a6c",class:"track-total"},a("div",{key:"05bde12e5fff5a03ab8df028ff739f878a0c59b1",class:{"track-progress":true,"track-progress--between":n},style:u}))),i?this.renderThumbs():a("input",{ref:function(r){return t.inputElement=r},class:"field","aria-label":this.label,"aria-valuetext":this.formatValue?this.formatValue(this.value):undefined,disabled:this.isDisabled(),max:this.max,min:this.min,onInput:this.onInput,step:this.step,type:"range",value:this.value,name:this.name})))};Object.defineProperty(t,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disabled:[{disabledChanged:0}],name:[{nameChanged:0}],value:[{valueChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],step:[{stepChanged:0}]}},enumerable:false,configurable:true});return t}());y.style=b()}}}));
|