diff --git a/library/components/legends/LegendMobile.vue b/library/components/legends/LegendMobile.vue index 5c2943793..d38745c2f 100644 --- a/library/components/legends/LegendMobile.vue +++ b/library/components/legends/LegendMobile.vue @@ -430,6 +430,8 @@ const onSemanticTreeSelect = inject('onSemanticTreeSelect', () => {}) // handler, so the three profiles that do not provide one are untouched. const onLegendExport = inject('onLegendExport', null) const mobileExportEnabled = computed(() => typeof onLegendExport === 'function') +// The card deck is opt-in the same way: a profile that handles 'cards' provides legendExportCards = true. +const mobileExportCards = inject('legendExportCards', false) // ── Data-driven legend (universal for all legend types) ───────────────────── const legendTypeRef = toRef(props, 'legendType') @@ -899,6 +901,7 @@ onBeforeUnmount(() => { :columnLabel="treeColumnLabelForMobile" :columns="columns || ['count', 'pop']" :export-enabled="mobileExportEnabled" + :export-cards="mobileExportEnabled && mobileExportCards === true" @select="onSemanticTreeSelect" @export="(kind) => onLegendExport && onLegendExport(kind)" > diff --git a/library/components/legends/SemanticTreeLegend.vue b/library/components/legends/SemanticTreeLegend.vue index 715f99847..b4a323fc8 100644 --- a/library/components/legends/SemanticTreeLegend.vue +++ b/library/components/legends/SemanticTreeLegend.vue @@ -111,6 +111,9 @@ const props = defineProps({ // unchanged; a profile opts in by passing :export-enabled. Gates the // top-right Export affordance (UX scaffold only — no export yet). exportEnabled: { type: Boolean, default: false }, + // Which prayer resources the host can print for the selection. 'cards' (the card deck) is OPT-IN: a + // host that does not handle it must not show a menu item that does nothing. Poster and packet stay on. + exportCards: { type: Boolean, default: false }, // Prayer progress payload for the header bar — { covered, total, segments } from // useLegendData(...).progress. null → no bar (every non-prayer legend). Falls back // to inject('legendProgress') so the mobile sheet's embedded legend (LegendMobile → @@ -1290,6 +1293,15 @@ useShadowStyles(` {{ t('legend.export.poster') }} + +