@ds-mo/ui 9.1.0 → 9.2.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/dist/.build-stamp +1 -1
- package/dist/agent-patterns.json +165 -1
- package/dist/agent.json +2110 -634
- package/dist/angular/ds-agent-activity.d.ts +12 -0
- package/dist/angular/ds-agent-activity.js +38 -0
- package/dist/angular/ds-agent-response.d.ts +12 -0
- package/dist/angular/ds-agent-response.js +38 -0
- package/dist/angular/ds-agent-source-list.d.ts +12 -0
- package/dist/angular/ds-agent-source-list.js +38 -0
- package/dist/angular/ds-agent-tool-call.d.ts +12 -0
- package/dist/angular/ds-agent-tool-call.js +38 -0
- package/dist/angular/ds-attachment-list.d.ts +12 -0
- package/dist/angular/ds-attachment-list.js +38 -0
- package/dist/angular/ds-avatar.d.ts +12 -0
- package/dist/angular/ds-avatar.js +38 -0
- package/dist/angular/ds-code-block.d.ts +12 -0
- package/dist/angular/ds-code-block.js +38 -0
- package/dist/angular/ds-conversation-list-item.d.ts +19 -0
- package/dist/angular/ds-conversation-list-item.js +42 -0
- package/dist/angular/ds-conversation-list-section.d.ts +12 -0
- package/dist/angular/ds-conversation-list-section.js +38 -0
- package/dist/angular/ds-conversation-list.d.ts +12 -0
- package/dist/angular/ds-conversation-list.js +37 -0
- package/dist/angular/ds-markdown.d.ts +12 -0
- package/dist/angular/ds-markdown.js +38 -0
- package/dist/angular/ds-menu.d.ts +1 -1
- package/dist/angular/ds-menu.js +3 -3
- package/dist/angular/ds-message-bubble.d.ts +12 -0
- package/dist/angular/ds-message-bubble.js +38 -0
- package/dist/angular/ds-message-composer.d.ts +23 -0
- package/dist/angular/ds-message-composer.js +49 -0
- package/dist/angular/ds-message-scroller.d.ts +15 -0
- package/dist/angular/ds-message-scroller.js +43 -0
- package/dist/angular/ds-message.d.ts +12 -0
- package/dist/angular/ds-message.js +38 -0
- package/dist/angular/ds-panel-tool-header.d.ts +25 -0
- package/dist/angular/ds-panel-tool-header.js +49 -0
- package/dist/angular/ds-panel-tool-search.d.ts +19 -0
- package/dist/angular/ds-panel-tool-search.js +49 -0
- package/dist/angular/ds-panel-tools.d.ts +30 -1
- package/dist/angular/ds-panel-tools.js +14 -5
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +17 -0
- package/dist/angular/proxies.d.ts +17 -0
- package/dist/angular/proxies.js +17 -0
- package/dist/components/ds-agent-activity.d.ts +11 -0
- package/dist/components/ds-agent-activity.js +2 -0
- package/dist/components/ds-agent-activity.js.map +1 -0
- package/dist/components/ds-agent-response.d.ts +11 -0
- package/dist/components/ds-agent-response.js +2 -0
- package/dist/components/ds-agent-response.js.map +1 -0
- package/dist/components/ds-agent-source-list.d.ts +11 -0
- package/dist/components/ds-agent-source-list.js +2 -0
- package/dist/components/ds-agent-source-list.js.map +1 -0
- package/dist/components/ds-agent-tool-call.d.ts +11 -0
- package/dist/components/ds-agent-tool-call.js +2 -0
- package/dist/components/ds-agent-tool-call.js.map +1 -0
- package/dist/components/ds-app-shell.js +1 -1
- package/dist/components/ds-app-shell.js.map +1 -1
- package/dist/components/ds-attachment-list.d.ts +11 -0
- package/dist/components/ds-attachment-list.js +2 -0
- package/dist/components/ds-attachment-list.js.map +1 -0
- package/dist/components/ds-avatar.d.ts +11 -0
- package/dist/components/ds-avatar.js +2 -0
- package/dist/components/ds-avatar.js.map +1 -0
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-nav.js.map +1 -1
- package/dist/components/ds-button-filled.js +1 -1
- package/dist/components/ds-button-unfilled.js +1 -1
- package/dist/components/ds-card-data-viz-donut.js +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-card-shell-data-viz.js +1 -1
- package/dist/components/ds-card.js +1 -1
- package/dist/components/ds-chart-bar.js +1 -1
- package/dist/components/ds-chart-bar.js.map +1 -1
- package/dist/components/ds-chart-donut.js +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart-line.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-code-block.d.ts +11 -0
- package/dist/components/ds-code-block.js +2 -0
- package/dist/components/ds-code-block.js.map +1 -0
- package/dist/components/ds-conversation-list-item.d.ts +11 -0
- package/dist/components/ds-conversation-list-item.js +2 -0
- package/dist/components/ds-conversation-list-item.js.map +1 -0
- package/dist/components/ds-conversation-list-section.d.ts +11 -0
- package/dist/components/ds-conversation-list-section.js +2 -0
- package/dist/components/ds-conversation-list-section.js.map +1 -0
- package/dist/components/ds-conversation-list.d.ts +11 -0
- package/dist/components/ds-conversation-list.js +2 -0
- package/dist/components/ds-conversation-list.js.map +1 -0
- package/dist/components/ds-divider.js +1 -1
- package/dist/components/ds-divider.js.map +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-icon.js +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-markdown.d.ts +11 -0
- package/dist/components/ds-markdown.js +2 -0
- package/dist/components/ds-markdown.js.map +1 -0
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-bubble.d.ts +11 -0
- package/dist/components/ds-message-bubble.js +2 -0
- package/dist/components/ds-message-bubble.js.map +1 -0
- package/dist/components/ds-message-composer.d.ts +11 -0
- package/dist/components/ds-message-composer.js +2 -0
- package/dist/components/ds-message-composer.js.map +1 -0
- package/dist/components/ds-message-scroller.d.ts +11 -0
- package/dist/components/ds-message-scroller.js +2 -0
- package/dist/components/ds-message-scroller.js.map +1 -0
- package/dist/components/ds-message.d.ts +11 -0
- package/dist/components/ds-message.js +2 -0
- package/dist/components/ds-message.js.map +1 -0
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-nav.js.map +1 -1
- package/dist/components/ds-panel-sub-nav.js +1 -1
- package/dist/components/ds-panel-tool-header.d.ts +11 -0
- package/dist/components/ds-panel-tool-header.js +2 -0
- package/dist/components/ds-panel-tool-header.js.map +1 -0
- package/dist/components/ds-panel-tool-search.d.ts +11 -0
- package/dist/components/ds-panel-tool-search.js +2 -0
- package/dist/components/ds-panel-tool-search.js.map +1 -0
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-panel-tools.js.map +1 -1
- package/dist/components/ds-radio.js +1 -1
- package/dist/components/ds-select-multi.js +1 -1
- package/dist/components/ds-select-multi.js.map +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-select.js.map +1 -1
- package/dist/components/ds-shell-gradient-picker.js +1 -1
- package/dist/components/ds-shell-gradient-picker.js.map +1 -1
- package/dist/components/ds-shell-gradient-swatch.js +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-slider.js.map +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-switch.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-tab-group.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-tooltip-data-viz.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/index.d.ts +14 -0
- package/dist/components/p--KbMQblZ.js +2 -0
- package/dist/components/p--KbMQblZ.js.map +1 -0
- package/dist/components/p-2br9YDbG.js +2 -0
- package/dist/components/p-2br9YDbG.js.map +1 -0
- package/dist/components/p-41UAx2eq.js +2 -0
- package/dist/components/p-41UAx2eq.js.map +1 -0
- package/dist/components/{p-HBIxvS5C.js → p-B1pWGQn1.js} +2 -2
- package/dist/components/p-B7NbIYjS.js +2 -0
- package/dist/components/p-B7NbIYjS.js.map +1 -0
- package/dist/components/p-BBu_Svz7.js +2 -0
- package/dist/components/p-BBu_Svz7.js.map +1 -0
- package/dist/components/p-BEQB8EnB.js +2 -0
- package/dist/components/p-BEQB8EnB.js.map +1 -0
- package/dist/components/{p-CZ9wemOA.js → p-BFWC17em.js} +2 -2
- package/dist/components/{p-KRGBGTu5.js → p-BO6C8abO.js} +2 -2
- package/dist/components/{p-CbS_WWs2.js → p-BSOZXagj.js} +2 -2
- package/dist/components/p-BSOZXagj.js.map +1 -0
- package/dist/components/{p-DT2MK8Kt.js → p-BZAEZENv.js} +2 -2
- package/dist/components/p-BhC1YyId.js +2 -0
- package/dist/components/p-BhC1YyId.js.map +1 -0
- package/dist/components/p-BjtXYFhw.js +2 -0
- package/dist/components/p-BjtXYFhw.js.map +1 -0
- package/dist/components/{p-B-zhgAvL.js → p-Bo5wikia.js} +2 -2
- package/dist/components/p-Bx1G7P6W.js +2 -0
- package/dist/components/p-Bx1G7P6W.js.map +1 -0
- package/dist/components/p-C0sq948W.js +2 -0
- package/dist/components/p-C0sq948W.js.map +1 -0
- package/dist/components/p-CC1C8s6m.js +2 -0
- package/dist/components/p-CC1C8s6m.js.map +1 -0
- package/dist/components/p-CKaJx0IX.js +2 -0
- package/dist/components/p-CKaJx0IX.js.map +1 -0
- package/dist/components/{p-DyZj3k9S.js → p-CZMEhdlA.js} +2 -2
- package/dist/components/{p-BbV68F23.js → p-CiwdnKKp.js} +2 -2
- package/dist/components/{p-BLzivrE3.js → p-CnM9SW_8.js} +2 -2
- package/dist/components/{p-C7UFYvsO.js → p-CuKn9I5f.js} +2 -2
- package/dist/components/p-DFMM60My.js +2 -0
- package/dist/components/p-DFMM60My.js.map +1 -0
- package/dist/components/p-DIsDiGcp.js +2 -0
- package/dist/components/p-DIsDiGcp.js.map +1 -0
- package/dist/components/p-DVsje4AY.js +2 -0
- package/dist/components/p-DVsje4AY.js.map +1 -0
- package/dist/components/p-Di-ThR90.js +2 -0
- package/dist/components/p-Di-ThR90.js.map +1 -0
- package/dist/components/{p-C7RObioO.js → p-Di4HBckb.js} +2 -2
- package/dist/components/p-a9nGf1s6.js +2 -0
- package/dist/components/p-a9nGf1s6.js.map +1 -0
- package/dist/components/p-gidVv1FX.js +2 -0
- package/dist/components/p-gidVv1FX.js.map +1 -0
- package/dist/components/p-rEe-3KR_.js +2 -0
- package/dist/components/p-rEe-3KR_.js.map +1 -0
- package/dist/components/p-t9Ei1kHP.js +2 -0
- package/dist/components/p-t9Ei1kHP.js.map +1 -0
- package/dist/docs/components.json +7834 -3899
- package/dist/lib/components/Menu/menu-placement.d.ts +13 -0
- package/dist/lib/shell/index.d.ts +1 -1
- package/dist/lib/shell/index.js +8 -0
- package/dist/lib/shell/index.js.map +2 -2
- package/dist/mcp-data/registry/agent-activity.json +158 -0
- package/dist/mcp-data/registry/agent-response.json +211 -0
- package/dist/mcp-data/registry/agent-source-list.json +153 -0
- package/dist/mcp-data/registry/agent-tool-call.json +213 -0
- package/dist/mcp-data/registry/app-shell.json +2 -2
- package/dist/mcp-data/registry/attachment-list.json +137 -0
- package/dist/mcp-data/registry/avatar.json +136 -0
- package/dist/mcp-data/registry/bar-nav.json +2 -2
- package/dist/mcp-data/registry/code-block.json +150 -0
- package/dist/mcp-data/registry/conversation-list-item.json +265 -0
- package/dist/mcp-data/registry/conversation-list-section.json +139 -0
- package/dist/mcp-data/registry/conversation-list.json +101 -0
- package/dist/mcp-data/registry/markdown.json +141 -0
- package/dist/mcp-data/registry/menu.json +27 -7
- package/dist/mcp-data/registry/message-bubble.json +119 -0
- package/dist/mcp-data/registry/message-composer.json +265 -0
- package/dist/mcp-data/registry/message-scroller.json +217 -0
- package/dist/mcp-data/registry/message.json +255 -0
- package/dist/mcp-data/registry/panel-nav.json +2 -2
- package/dist/mcp-data/registry/panel-tool-header.json +342 -0
- package/dist/mcp-data/registry/panel-tool-search.json +387 -0
- package/dist/mcp-data/registry/panel-tools.json +150 -10
- package/dist/mcp-data/registry/registry.json +2146 -619
- package/dist/mcp-data/registry/select.json +1 -1
- package/dist/mcp-data/registry/slider.json +4 -4
- package/dist/mcp-data/registry/tab-group.json +2 -2
- package/dist/mcp-data/registry/text.json +1 -1
- package/dist/react/components.d.ts +17 -0
- package/dist/react/components.js +17 -0
- package/dist/react/ds-agent-activity.d.ts +9 -0
- package/dist/react/ds-agent-activity.js +12 -0
- package/dist/react/ds-agent-response.d.ts +9 -0
- package/dist/react/ds-agent-response.js +12 -0
- package/dist/react/ds-agent-source-list.d.ts +9 -0
- package/dist/react/ds-agent-source-list.js +12 -0
- package/dist/react/ds-agent-tool-call.d.ts +9 -0
- package/dist/react/ds-agent-tool-call.js +12 -0
- package/dist/react/ds-attachment-list.d.ts +9 -0
- package/dist/react/ds-attachment-list.js +12 -0
- package/dist/react/ds-avatar.d.ts +9 -0
- package/dist/react/ds-avatar.js +12 -0
- package/dist/react/ds-code-block.d.ts +9 -0
- package/dist/react/ds-code-block.js +12 -0
- package/dist/react/ds-conversation-list-item.d.ts +14 -0
- package/dist/react/ds-conversation-list-item.js +12 -0
- package/dist/react/ds-conversation-list-section.d.ts +9 -0
- package/dist/react/ds-conversation-list-section.js +12 -0
- package/dist/react/ds-conversation-list.d.ts +9 -0
- package/dist/react/ds-conversation-list.js +12 -0
- package/dist/react/ds-markdown.d.ts +9 -0
- package/dist/react/ds-markdown.js +12 -0
- package/dist/react/ds-message-bubble.d.ts +9 -0
- package/dist/react/ds-message-bubble.js +12 -0
- package/dist/react/ds-message-composer.d.ts +16 -0
- package/dist/react/ds-message-composer.js +16 -0
- package/dist/react/ds-message-scroller.d.ts +12 -0
- package/dist/react/ds-message-scroller.js +12 -0
- package/dist/react/ds-message.d.ts +9 -0
- package/dist/react/ds-message.js +12 -0
- package/dist/react/ds-panel-tool-header.d.ts +17 -0
- package/dist/react/ds-panel-tool-header.js +16 -0
- package/dist/react/ds-panel-tool-search.d.ts +14 -0
- package/dist/react/ds-panel-tool-search.js +16 -0
- package/dist/react/ds-panel-tools.d.ts +10 -0
- package/dist/react/ds-panel-tools.js +3 -0
- package/dist/types/components/AgentActivity/AgentActivity.d.ts +14 -0
- package/dist/types/components/AgentResponse/AgentResponse.d.ts +12 -0
- package/dist/types/components/AgentSourceList/AgentSourceList.d.ts +9 -0
- package/dist/types/components/AgentToolCall/AgentToolCall.d.ts +13 -0
- package/dist/types/components/AppShell/AppShell.d.ts +4 -0
- package/dist/types/components/AttachmentList/AttachmentList.d.ts +8 -0
- package/dist/types/components/Avatar/Avatar.d.ts +8 -0
- package/dist/types/components/CodeBlock/CodeBlock.d.ts +11 -0
- package/dist/types/components/ConversationList/ConversationList.d.ts +4 -0
- package/dist/types/components/ConversationListItem/ConversationListItem.d.ts +22 -0
- package/dist/types/components/ConversationListSection/ConversationListSection.d.ts +9 -0
- package/dist/types/components/Markdown/Markdown.d.ts +15 -0
- package/dist/types/components/Menu/Menu.d.ts +3 -0
- package/dist/types/components/Menu/menu-placement.d.ts +13 -0
- package/dist/types/components/Menu/menu-types.d.ts +1 -1
- package/dist/types/components/Message/Message.d.ts +17 -0
- package/dist/types/components/MessageBubble/MessageBubble.d.ts +6 -0
- package/dist/types/components/MessageComposer/MessageComposer.d.ts +29 -0
- package/dist/types/components/MessageScroller/MessageScroller.d.ts +37 -0
- package/dist/types/components/PanelNav/PanelNav.d.ts +3 -0
- package/dist/types/components/PanelToolHeader/PanelToolHeader.d.ts +34 -0
- package/dist/types/components/PanelToolSearch/PanelToolSearch.d.ts +35 -0
- package/dist/types/components/PanelTools/PanelTools.d.ts +40 -1
- package/dist/types/components/PanelTools/panel-tools-types.d.ts +20 -0
- package/dist/types/components/PanelTools/panel-tools-utils.d.ts +2 -0
- package/dist/types/components/Slider/Slider.d.ts +1 -1
- package/dist/types/components/conversation-types.d.ts +55 -0
- package/dist/types/components.d.ts +1185 -8
- package/dist/types/shell/index.d.ts +1 -1
- package/dist/types/utils/choice-list-parts.d.ts +4 -1
- package/package.json +4 -1
- package/dist/components/p-CXF8yd-g.js +0 -2
- package/dist/components/p-CXF8yd-g.js.map +0 -1
- package/dist/components/p-CbS_WWs2.js.map +0 -1
- package/dist/components/p-VKIsOVza.js +0 -2
- package/dist/components/p-VKIsOVza.js.map +0 -1
- package/dist/components/p-tQ1QHeOE.js +0 -2
- package/dist/components/p-tQ1QHeOE.js.map +0 -1
- /package/dist/components/{p-HBIxvS5C.js.map → p-B1pWGQn1.js.map} +0 -0
- /package/dist/components/{p-CZ9wemOA.js.map → p-BFWC17em.js.map} +0 -0
- /package/dist/components/{p-KRGBGTu5.js.map → p-BO6C8abO.js.map} +0 -0
- /package/dist/components/{p-DT2MK8Kt.js.map → p-BZAEZENv.js.map} +0 -0
- /package/dist/components/{p-B-zhgAvL.js.map → p-Bo5wikia.js.map} +0 -0
- /package/dist/components/{p-DyZj3k9S.js.map → p-CZMEhdlA.js.map} +0 -0
- /package/dist/components/{p-BbV68F23.js.map → p-CiwdnKKp.js.map} +0 -0
- /package/dist/components/{p-BLzivrE3.js.map → p-CnM9SW_8.js.map} +0 -0
- /package/dist/components/{p-C7UFYvsO.js.map → p-CuKn9I5f.js.map} +0 -0
- /package/dist/components/{p-C7RObioO.js.map → p-Di4HBckb.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["computeMenuPosition","computeAnchoredPopupPosition","isMenuGradientPickerSection","section","variant","isMenuSwatchPickerSection","isMenuPickerSection","menuCss","POSITION_RETRY_BUDGET","MENU_FOCUSABLE_SELECTOR","join","Menu","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","open","items","selectionMode","sections","side","align","anchorAlignment","sideOffset","TOKEN_CSS_LENGTHS","space050","alignOffset","initialFocusVisible","menuLabel","shouldRender","closing","pos","x","y","focusedIndex","positionReady","focusRingVisible","clickOutsideHandler","scrollResizeHandler","closeTimer","itemEls","positionRetryRaf","listenersReady","componentDidLoad","onOpenChange","disconnectedCallback","cancelPositionRetry","teardownListeners","isOpen","setupListeners","schedulePositionUpdate","focusInitialItem","closeAnimationMs","finishClose","setTimeout","onAnchorChange","onPositionPropsChange","viewportPadPx","resolveCssLengthPx","TOKEN_DEFAULTS","sideOffsetPx","alignOffsetPx","popupFallbackWidthPx","menuWidthXs","popupFallbackHeightPx","menuFallbackHeight","resolveMotionTimeMs","motionShort2","animationDurationShort3","resolvedAnchor","anchor","anchorId","document","getElementById","anchorFocusTarget","matches","querySelector","focusAnchor","setFocus","focus","moveFocusAfterTab","backwards","candidates","Array","from","querySelectorAll","filter","element","closest","getClientRects","length","index","indexOf","compositeTabLeavesPopup","event","popup","el","focusables","currentIndex","target","shiftKey","activeSections","flatItems","flatMap","hasCompositeSections","some","cancelAnimationFrame","onReady","remaining","attempt","calculatePosition","requestAnimationFrame","anchorEl","anchorRect","getBoundingClientRect","sectionInsetPx","minWidth","style","choicePopupMinWidth","width","removeProperty","popupWidth","offsetWidth","popupHeight","offsetHeight","resolveChoicePopupAlignOffset","viewportWidth","window","innerWidth","viewportHeight","innerHeight","flat","selectedIdx","findIndex","it","isSelected","isInactive","firstEnabledIdx","btns","e","t","contains","close","addEventListener","removeEventListener","clearTimeout","restoreFocus","dsClose","emit","handleKeyDown","key","preventDefault","enabled","map","i","cur","safe","stopPropagation","focusItem","idx","handleItemClick","item","dsSelect","handleGradientSelect","preset","dsGradientSelect","handleSwatchSelect","value","dsSwatchSelect","render","h","Host","display","flatIdx","popupStyle","position","left","top","transform","Math","round","zIndex","visibility","menuWidth","class","role","undefined","si","header","as","emphasis","color","groupLabel","shellGradientPickerSections","onDsChange","detail","options","isFocused","isRadioItem","showSwitch","type","isDestructive","String","switchValue","disabled","tabIndex","onMouseDown","onClick","onFocus","label","subtext","dot","hasRing","size","checked","presentation"],"sources":["src/wc/components/Menu/menu-position.ts","src/wc/components/Menu/menu-types.ts","src/wc/components/Menu/Menu.css?tag=ds-menu&encapsulation=scoped","src/wc/components/Menu/Menu.tsx"],"sourcesContent":["import {\n computeAnchoredPopupPosition,\n type AnchoredPopupAlign,\n type AnchoredPopupPositionInput,\n type AnchoredPopupSide,\n} from '../../utils/anchored-popup';\n\nexport type MenuSide = AnchoredPopupSide;\nexport type MenuAlign = AnchoredPopupAlign;\nexport type MenuPositionInput = AnchoredPopupPositionInput;\n\n/** Backward-compatible menu alias for the shared anchored-popup layout math. */\nexport const computeMenuPosition = computeAnchoredPopupPosition;\n","import type { ShellGradientPreset } from '../../shell/shell-gradient-presets';\nimport type { SwatchPickerOption, SwatchPickerSection } from '../SwatchPicker/swatch-picker-types';\n\nexport type { MenuAlign, MenuSide } from './menu-position';\nexport {\n PANEL_NAV_USER_MENU_PLACEMENT,\n PANEL_TOOLS_HEADER_MENU_PLACEMENT,\n type MenuPlacement,\n} from './menu-placement';\n\nexport interface MenuItemData {\n label: string;\n value?: string;\n subtext?: string;\n /** Show a supplemental brand notification dot. */\n dot?: boolean;\n isSelected?: boolean;\n isInactive?: boolean;\n isDestructive?: boolean;\n /** Render a compact switch indicator; the menu row owns interaction. */\n showSwitch?: boolean;\n switchValue?: boolean;\n}\n\nexport interface MenuItemsSection {\n header?: string;\n items: MenuItemData[];\n}\n\nexport interface MenuGradientPickerSection {\n header?: string;\n /** @deprecated Use the generic `swatch-picker` section. */\n variant: 'gradient-picker';\n value: ShellGradientPreset;\n}\n\nexport interface MenuSwatchPickerSection {\n header?: string;\n variant: 'swatch-picker';\n value: string;\n options?: SwatchPickerOption[];\n sections?: SwatchPickerSection[];\n groupLabel?: string;\n}\n\nexport type MenuSection =\n | MenuItemsSection\n | MenuGradientPickerSection\n | MenuSwatchPickerSection;\n\nexport function isMenuGradientPickerSection(\n section: MenuSection,\n): section is MenuGradientPickerSection {\n return 'variant' in section && section.variant === 'gradient-picker';\n}\n\nexport function isMenuSwatchPickerSection(\n section: MenuSection,\n): section is MenuSwatchPickerSection {\n return 'variant' in section && section.variant === 'swatch-picker';\n}\n\nexport function isMenuPickerSection(\n section: MenuSection,\n): section is MenuGradientPickerSection | MenuSwatchPickerSection {\n return isMenuGradientPickerSection(section) || isMenuSwatchPickerSection(section);\n}\n\nexport type { ShellGradientPreset };\nexport type { SwatchPickerOption, SwatchPickerSection };\n","@import '../../utils/choice-list.css';\n\n/* Inactive: `.ds-control-inactive` (25% opacity). */\n\n.menu-item--destructive .menu-item__label {\n /* Beat ds-text color-* host classes for destructive rows. */\n color: var(--color-foreground-bold-negative) !important;\n}\n\n/* Standard md icon zone keeps the dot aligned with other control suffixes. */\n.menu-item__dot-box {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--ds-control-icon, var(--dimension-iconography-md));\n height: var(--ds-control-icon, var(--dimension-iconography-md));\n pointer-events: none;\n}\n\n/* ── Switch suffix ───────────────────────────────────────────────────────── */\n\n.menu-item__switch {\n flex-shrink: 0;\n}\n\n/* ── Single-selection radio indicator ───────────────────────────────────── */\n\n.menu-item__radio-box {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--ds-control-icon, var(--dimension-iconography-md));\n height: var(--ds-control-icon, var(--dimension-iconography-md));\n pointer-events: none;\n}\n\n.menu-item__radio {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: var(--dimension-iconography-sm);\n height: var(--dimension-iconography-sm);\n border-radius: var(--dimension-radius-half);\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-015) var(--color-foreground-tertiary);\n}\n\n.menu-item__radio--checked {\n background-color: var(--color-background-bold-brand);\n box-shadow: none;\n}\n\n.menu-item__radio-dot {\n width: var(--dimension-size-100);\n height: var(--dimension-size-100);\n border-radius: var(--dimension-radius-half);\n background-color: var(--color-foreground-on-bold-background-primary);\n}\n","import {\n Component,\n Prop,\n State,\n Event,\n EventEmitter,\n Element,\n Watch,\n Listen,\n h,\n Host,\n} from '@stencil/core';\nimport {\n choicePopupMinWidth,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n TOKEN_CSS_LENGTHS,\n TOKEN_DEFAULTS,\n type ChoicePopupAnchorAlignment,\n} from '../../utils';\nimport { computeMenuPosition, type MenuAlign, type MenuSide } from './menu-position';\nimport type { MenuItemData, MenuSection } from './menu-types';\n\nexport type MenuSelectionMode = 'none' | 'single';\nimport {\n isMenuGradientPickerSection,\n isMenuPickerSection,\n isMenuSwatchPickerSection,\n} from './menu-types';\nimport {\n shellGradientPickerSections,\n type ShellGradientPreset,\n} from '../../shell/shell-gradient-presets';\n\n/** rAF retries while the popup mounts or the anchor resolves. */\nconst POSITION_RETRY_BUDGET = 8;\nconst MENU_FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\n@Component({\n tag: 'ds-menu',\n styleUrl: 'Menu.css',\n scoped: true,\n})\nexport class Menu {\n @Element() el!: HTMLElement;\n\n @Prop({ mutable: true }) open: boolean = false;\n @Prop() items: MenuItemData[] = [];\n /** Give ordinary rows mutually-exclusive radio-menu semantics using isSelected. */\n @Prop() selectionMode: MenuSelectionMode = 'none';\n @Prop() sections: MenuSection[] = [];\n @Prop() side: MenuSide = 'bottom';\n @Prop() align: MenuAlign = 'start';\n /** Align choice-row edges to the anchor by default; use `popup-frame` only for custom frame geometry. */\n @Prop() anchorAlignment: ChoicePopupAnchorAlignment = 'choice-cell';\n /** Gap between anchor and menu — number (px) or TokoMo length (`var(--dimension-space-050)`, etc.). */\n @Prop() sideOffset: number | string = TOKEN_CSS_LENGTHS.space050;\n /** Cross-axis offset — number (px) or TokoMo length. */\n @Prop() alignOffset: number | string = 0;\n @Prop() menuWidth: string | undefined;\n @Prop() minWidth: string | undefined;\n /** External trigger element to position against. Set via JS: menuEl.anchor = buttonEl */\n @Prop() anchor: HTMLElement | undefined;\n /** ID of the external trigger element for positioning */\n @Prop() anchorId: string | undefined;\n /** Show a visible ring on the initially focused menu item. Use only when the opener was keyboard-driven. */\n @Prop() initialFocusVisible: boolean = false;\n /** Accessible name for the popup menu. */\n @Prop() menuLabel: string = 'Menu';\n\n @State() private shouldRender: boolean = false;\n @State() private closing: boolean = false;\n @State() private pos: { x: number; y: number } = { x: 0, y: 0 };\n @State() private focusedIndex: number = 0;\n @State() private positionReady: boolean = false;\n @State() private focusRingVisible: boolean = false;\n\n @Event() dsClose!: EventEmitter<void>;\n @Event() dsSelect!: EventEmitter<MenuItemData>;\n /** Emitted when a `gradient-picker` section swatch is chosen. */\n @Event() dsGradientSelect!: EventEmitter<ShellGradientPreset>;\n /** Emitted when a generic `swatch-picker` section option is chosen. */\n @Event() dsSwatchSelect!: EventEmitter<string>;\n\n private clickOutsideHandler: ((e: MouseEvent) => void) | null = null;\n private scrollResizeHandler: (() => void) | null = null;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private itemEls: HTMLElement[] = [];\n private positionRetryRaf: number | null = null;\n private listenersReady = false;\n\n componentDidLoad() {\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.cancelPositionRetry();\n this.teardownListeners();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.teardownListeners();\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.listenersReady = false;\n this.focusRingVisible = this.initialFocusVisible;\n this.listenersReady = true;\n this.setupListeners();\n this.schedulePositionUpdate(() => {\n this.focusInitialItem();\n });\n } else if (this.shouldRender) {\n this.cancelPositionRetry();\n this.closing = true;\n this.teardownListeners();\n this.listenersReady = false;\n const closeAnimationMs = this.closeAnimationMs;\n if (closeAnimationMs <= 0) {\n this.finishClose();\n return;\n }\n this.closeTimer = setTimeout(() => {\n this.closeTimer = null;\n this.finishClose();\n }, closeAnimationMs);\n }\n }\n\n @Watch('anchor')\n @Watch('anchorId')\n onAnchorChange() {\n if (this.open) this.schedulePositionUpdate();\n }\n\n @Watch('side')\n @Watch('align')\n @Watch('anchorAlignment')\n @Watch('sideOffset')\n @Watch('alignOffset')\n onPositionPropsChange() {\n if (this.open) this.schedulePositionUpdate();\n }\n\n private get viewportPadPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n }\n\n private get sideOffsetPx(): number {\n return resolveCssLengthPx(this.sideOffset, TOKEN_DEFAULTS.space050);\n }\n\n private get alignOffsetPx(): number {\n return resolveCssLengthPx(this.alignOffset, 0);\n }\n\n private get popupFallbackWidthPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthXs, TOKEN_DEFAULTS.menuWidthXs);\n }\n\n private get popupFallbackHeightPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private get closeAnimationMs(): number {\n return resolveMotionTimeMs(TOKEN_DEFAULTS.motionShort2, TOKEN_DEFAULTS.animationDurationShort3);\n }\n\n private finishClose() {\n this.shouldRender = false;\n this.closing = false;\n }\n\n private get resolvedAnchor(): HTMLElement | null {\n if (this.anchor) return this.anchor;\n if (this.anchorId) return document.getElementById(this.anchorId);\n return null;\n }\n\n private get anchorFocusTarget(): HTMLElement | null {\n const anchor = this.resolvedAnchor;\n if (!anchor) return null;\n if (anchor.matches(MENU_FOCUSABLE_SELECTOR)) return anchor;\n return anchor.querySelector<HTMLElement>(MENU_FOCUSABLE_SELECTOR) ?? anchor;\n }\n\n private focusAnchor() {\n const anchor = this.resolvedAnchor as\n | (HTMLElement & { setFocus?: () => Promise<void> | void })\n | null;\n if (anchor?.setFocus) {\n anchor.setFocus();\n return;\n }\n this.anchorFocusTarget?.focus();\n }\n\n private moveFocusAfterTab(backwards: boolean) {\n const anchor = this.anchorFocusTarget;\n if (!anchor) return;\n if (backwards) {\n anchor.focus();\n return;\n }\n\n const candidates = Array.from(\n document.querySelectorAll<HTMLElement>(MENU_FOCUSABLE_SELECTOR)\n ).filter(\n element =>\n !element.closest('.menu-popup') &&\n !element.closest('[inert]') &&\n element.getClientRects().length > 0\n );\n const index = candidates.indexOf(anchor);\n (candidates[index + 1] ?? anchor).focus();\n }\n\n private compositeTabLeavesPopup(event: KeyboardEvent): boolean {\n const popup = this.el.querySelector<HTMLElement>('.menu-popup');\n if (!popup) return true;\n const focusables = Array.from(\n popup.querySelectorAll<HTMLElement>(MENU_FOCUSABLE_SELECTOR)\n ).filter(element => element.getClientRects().length > 0);\n const currentIndex = focusables.indexOf(event.target as HTMLElement);\n if (currentIndex < 0) return true;\n return event.shiftKey ? currentIndex === 0 : currentIndex === focusables.length - 1;\n }\n\n private get activeSections(): MenuSection[] {\n if (this.sections.length > 0) return this.sections;\n if (this.items.length > 0) return [{ items: this.items }];\n return [];\n }\n\n private get flatItems(): MenuItemData[] {\n return this.activeSections.flatMap(section =>\n isMenuPickerSection(section) ? [] : section.items\n );\n }\n\n /** Rich preference content is a non-modal dialog, not an ARIA action menu. */\n private get hasCompositeSections(): boolean {\n return this.activeSections.some(isMenuPickerSection);\n }\n\n private cancelPositionRetry() {\n if (this.positionRetryRaf !== null) {\n cancelAnimationFrame(this.positionRetryRaf);\n this.positionRetryRaf = null;\n }\n }\n\n /** Retry until anchor + popup exist — do not reveal at 0,0 on a failed first pass. */\n private schedulePositionUpdate(onReady?: () => void) {\n if (!this.open) return;\n\n this.cancelPositionRetry();\n this.positionReady = false;\n\n let remaining = POSITION_RETRY_BUDGET;\n\n const attempt = () => {\n this.positionRetryRaf = null;\n if (!this.open) return;\n\n if (this.calculatePosition()) {\n this.positionReady = true;\n onReady?.();\n return;\n }\n\n if (remaining > 0) {\n remaining -= 1;\n this.positionRetryRaf = requestAnimationFrame(attempt);\n }\n };\n\n this.positionRetryRaf = requestAnimationFrame(attempt);\n }\n\n /** @returns `true` when anchor and popup were found and `pos` was updated. */\n private calculatePosition(): boolean {\n const anchorEl = this.resolvedAnchor;\n if (!anchorEl) return false;\n const popup = this.el.querySelector('.menu-popup') as HTMLElement | null;\n if (!popup) return false;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n const sectionInsetPx = this.viewportPadPx;\n if (!this.minWidth) {\n if (\n this.anchorAlignment === 'choice-cell' &&\n (this.side === 'top' || this.side === 'bottom')\n ) {\n popup.style.minWidth = `max(var(--dimension-menu-width-xs), ${choicePopupMinWidth(\n anchorRect.width,\n sectionInsetPx\n )}px)`;\n } else {\n popup.style.removeProperty('min-width');\n }\n }\n\n this.pos = computeMenuPosition({\n anchorRect,\n popupWidth: popup.offsetWidth || this.popupFallbackWidthPx,\n popupHeight: popup.offsetHeight || this.popupFallbackHeightPx,\n side: this.side,\n align: this.align,\n sideOffsetPx: this.sideOffsetPx,\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align: this.align,\n alignOffsetPx: this.alignOffsetPx,\n sectionInsetPx,\n anchorAlignment: this.anchorAlignment,\n }),\n viewportPadPx: this.viewportPadPx,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n });\n return true;\n }\n\n /** Focus the selected item when present, otherwise the first enabled item. */\n private focusInitialItem() {\n if (this.hasCompositeSections) {\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>('.menu-popup [tabindex=\"0\"]')?.focus();\n });\n return;\n }\n\n const flat = this.flatItems;\n const selectedIdx = flat.findIndex(it => it.isSelected && !it.isInactive);\n const firstEnabledIdx = flat.findIndex(it => !it.isInactive);\n this.focusedIndex = selectedIdx >= 0 ? selectedIdx : firstEnabledIdx >= 0 ? firstEnabledIdx : 0;\n\n requestAnimationFrame(() => {\n const btns = this.el.querySelectorAll<HTMLElement>('.menu-item');\n btns[this.focusedIndex]?.focus();\n });\n }\n\n private setupListeners() {\n this.clickOutsideHandler = (e: MouseEvent) => {\n const t = e.target as Node;\n const popup = this.el.querySelector('.menu-popup');\n const anchorEl = this.resolvedAnchor;\n if (popup?.contains(t) || anchorEl?.contains(t)) return;\n this.close();\n };\n\n this.scrollResizeHandler = () => {\n if (this.shouldRender && !this.closing) this.calculatePosition();\n };\n\n document.addEventListener('mousedown', this.clickOutsideHandler, true);\n window.addEventListener('scroll', this.scrollResizeHandler, true);\n window.addEventListener('resize', this.scrollResizeHandler);\n }\n\n private teardownListeners() {\n if (this.clickOutsideHandler) {\n document.removeEventListener('mousedown', this.clickOutsideHandler, true);\n this.clickOutsideHandler = null;\n }\n if (this.scrollResizeHandler) {\n window.removeEventListener('scroll', this.scrollResizeHandler, true);\n window.removeEventListener('resize', this.scrollResizeHandler);\n this.scrollResizeHandler = null;\n }\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close(restoreFocus = true) {\n if (restoreFocus) this.focusAnchor();\n this.dsClose.emit();\n this.open = false;\n this.onOpenChange(false);\n }\n\n @Listen('keydown')\n handleKeyDown(e: KeyboardEvent) {\n if (!this.shouldRender || this.closing) return;\n\n if (e.key === 'Escape') {\n e.preventDefault();\n this.close();\n return;\n }\n\n if (e.key === 'Tab') {\n if (this.hasCompositeSections && !this.compositeTabLeavesPopup(e)) return;\n e.preventDefault();\n this.close(false);\n this.moveFocusAfterTab(e.shiftKey);\n return;\n }\n\n if (this.hasCompositeSections) return;\n\n const flat = this.flatItems;\n const enabled = flat\n .map((it, i) => ({ it, i }))\n .filter(({ it }) => !it.isInactive)\n .map(({ i }) => i);\n if (!enabled.length) return;\n\n const cur = enabled.indexOf(this.focusedIndex);\n const safe = cur < 0 ? 0 : cur;\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[(safe + 1) % enabled.length];\n this.focusItem(this.focusedIndex);\n break;\n case 'ArrowUp':\n e.preventDefault();\n e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[(safe - 1 + enabled.length) % enabled.length];\n this.focusItem(this.focusedIndex);\n break;\n case 'Home':\n e.preventDefault();\n e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[0];\n this.focusItem(this.focusedIndex);\n break;\n case 'End':\n e.preventDefault();\n e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[enabled.length - 1];\n this.focusItem(this.focusedIndex);\n break;\n }\n }\n\n private focusItem(idx: number) {\n const btns = this.el.querySelectorAll<HTMLElement>('.menu-item');\n btns[idx]?.focus();\n }\n\n private handleItemClick(item: MenuItemData) {\n if (item.isInactive) return;\n this.dsSelect.emit(item);\n }\n\n private handleGradientSelect(preset: ShellGradientPreset) {\n this.dsGradientSelect.emit(preset);\n }\n\n private handleSwatchSelect(value: string) {\n this.dsSwatchSelect.emit(value);\n }\n\n render() {\n if (!this.shouldRender) return <Host style={{ display: 'contents' }} />;\n\n const sections = this.activeSections;\n let flatIdx = 0;\n\n const popupStyle: Record<string, string> = {\n position: 'fixed',\n left: '0',\n top: '0',\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: '9998',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n if (this.menuWidth) popupStyle['width'] = this.menuWidth;\n if (this.minWidth) popupStyle['min-width'] = this.minWidth;\n\n return (\n <Host style={{ display: 'contents' }}>\n <div\n class={{\n 'menu-popup': true,\n 'menu-popup--closing': this.closing,\n 'ds-choice-popup': true,\n 'ds-choice-popup--closing': this.closing,\n }}\n style={popupStyle}\n role={this.hasCompositeSections ? 'dialog' : 'menu'}\n aria-label={this.menuLabel}\n aria-orientation={this.hasCompositeSections ? undefined : 'vertical'}\n >\n <div class=\"ds-choice-list\">\n {sections.map((section, si) => (\n <div\n key={si}\n class={{\n 'menu-section': true,\n 'menu-section--divided': si < sections.length - 1,\n 'menu-section--gradient-picker': isMenuPickerSection(section),\n 'ds-choice-section': true,\n 'ds-choice-section--divided': si < sections.length - 1,\n }}\n role={section.header ? 'group' : undefined}\n aria-label={section.header}\n >\n {section.header && (\n <ds-text\n class=\"section-header ds-choice-section__header ds-control--md\"\n as=\"span\"\n variant=\"text-body-small\"\n emphasis\n color=\"primary\"\n aria-hidden=\"true\"\n >\n {section.header}\n </ds-text>\n )}\n {isMenuGradientPickerSection(section) ? (\n <ds-swatch-picker\n value={section.value}\n groupLabel={section.header ?? 'Shell gradient theme'}\n sections={shellGradientPickerSections()}\n onDsChange={(e: CustomEvent<string>) => {\n e.stopPropagation();\n this.handleGradientSelect(e.detail as ShellGradientPreset);\n }}\n />\n ) : isMenuSwatchPickerSection(section) ? (\n <ds-swatch-picker\n value={section.value}\n groupLabel={section.groupLabel ?? section.header ?? 'Swatch options'}\n options={section.options ?? []}\n sections={section.sections ?? []}\n onDsChange={(e: CustomEvent<string>) => {\n e.stopPropagation();\n this.handleSwatchSelect(e.detail);\n }}\n />\n ) : (\n section.items.map(item => {\n const idx = flatIdx++;\n const isFocused = this.focusedIndex === idx;\n const isRadioItem =\n !this.hasCompositeSections &&\n this.selectionMode === 'single' &&\n !item.showSwitch;\n return (\n <button\n key={idx}\n type=\"button\"\n class={{\n 'menu-item': true,\n 'ds-choice-item': true,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': isFocused && this.focusRingVisible,\n 'ds-interaction-fill': !item.isInactive,\n 'ds-interaction-fill--selected': !!item.isSelected && !item.isInactive,\n 'menu-item--selected': !!item.isSelected,\n 'ds-control-inactive': !!item.isInactive,\n 'menu-item--destructive': !!item.isDestructive,\n 'menu-item--focused': isFocused,\n }}\n role={\n this.hasCompositeSections\n ? undefined\n : item.showSwitch\n ? 'menuitemcheckbox'\n : isRadioItem\n ? 'menuitemradio'\n : 'menuitem'\n }\n aria-checked={\n !this.hasCompositeSections && item.showSwitch\n ? String(!!item.switchValue)\n : isRadioItem\n ? String(!!item.isSelected)\n : undefined\n }\n aria-pressed={\n this.hasCompositeSections\n ? String(item.showSwitch ? !!item.switchValue : !!item.isSelected)\n : undefined\n }\n aria-current={\n !this.hasCompositeSections &&\n !item.showSwitch &&\n !isRadioItem &&\n item.isSelected\n ? 'true'\n : undefined\n }\n disabled={item.isInactive}\n tabIndex={this.hasCompositeSections ? 0 : isFocused ? 0 : -1}\n onMouseDown={() => {\n this.focusRingVisible = false;\n }}\n onClick={() => this.handleItemClick(item)}\n onFocus={() => {\n this.focusedIndex = idx;\n }}\n >\n {isRadioItem && (\n <span\n class=\"menu-item__radio-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <span\n class={{\n 'menu-item__radio': true,\n 'menu-item__radio--checked': !!item.isSelected,\n }}\n >\n {item.isSelected && <span class=\"menu-item__radio-dot\" />}\n </span>\n </span>\n )}\n <div class=\"menu-item__content ds-choice-item__content ds-interaction-fill__content\">\n <ds-text\n class=\"menu-item__label ds-choice-item__label\"\n as=\"span\"\n variant=\"text-body-medium\"\n color={item.isSelected ? 'primary' : 'secondary'}\n >\n {item.label}\n </ds-text>\n {item.subtext && (\n <ds-text\n class=\"menu-item__subtext ds-choice-item__subtext\"\n as=\"span\"\n variant=\"text-body-small\"\n color=\"secondary\"\n >\n {item.subtext}\n </ds-text>\n )}\n </div>\n {item.dot && (\n <span\n class=\"menu-item__dot-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-badge\n class=\"menu-item__dot\"\n variant=\"dot\"\n hasRing={false}\n label=\"\"\n />\n </span>\n )}\n {item.showSwitch && (\n <ds-switch\n class=\"menu-item__switch ds-interaction-fill__content\"\n size=\"md\"\n checked={!!item.switchValue}\n presentation\n />\n )}\n </button>\n );\n })\n )}\n </div>\n ))}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"sZAYO,MAAMA,EAAsBC,ECsC7B,SAAUC,EACdC,GAEA,MAAO,YAAaA,GAAWA,EAAQC,UAAY,iBACrD,CAEM,SAAUC,EACdF,GAEA,MAAO,YAAaA,GAAWA,EAAQC,UAAY,eACrD,CAEM,SAAUE,EACdH,GAEA,OAAOD,EAA4BC,IAAYE,EAA0BF,EAC3E,CClEA,MAAMI,EAAU,IAAM,ylaCoCtB,MAAMC,EAAwB,EAC9B,MAAMC,EAA0B,CAC9B,UACA,yBACA,6CACA,yBACA,2BACA,mCACAC,KAAK,K,MAOMC,EAAIC,EAAA,MAAAD,UAAAE,EALjB,WAAAC,CAAAC,G,0MAQ2BC,KAAAC,KAAgB,MACjCD,KAAAE,MAAwB,GAExBF,KAAAG,cAAmC,OACnCH,KAAAI,SAA0B,GAC1BJ,K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iBAAmB,KAAK,EAE/B2K,QAAS,IAAMhM,KAAKiJ,gBAAgBC,GACpC+C,QAAS,KACPjM,KAAKmB,aAAe6H,CAAG,GAGxBuC,GACC5B,EAAA,QACEc,MAAM,oDAAmD,cAC7C,QAEZd,EAAA,QACEc,MAAO,CACL,mBAAoB,KACpB,8BAA+BvB,EAAK1B,aAGrC0B,EAAK1B,YAAcmC,EAAA,QAAMc,MAAM,2BAItCd,EAAA,OAAKc,MAAM,2EACTd,EAAA,WACEc,MAAM,yCACNK,GAAG,OACH1L,QAAQ,mBACR4L,MAAO9B,EAAK1B,WAAa,UAAY,aAEpC0B,EAAKgD,OAEPhD,EAAKiD,SACJxC,EAAA,WACEc,MAAM,6CACNK,GAAG,OACH1L,QAAQ,kBACR4L,MAAM,aAEL9B,EAAKiD,UAIXjD,EAAKkD,KACJzC,EAAA,QACEc,MAAM,kDAAiD,cAC3C,QAEZd,EAAA,YACEc,MAAM,iBACNrL,QAAQ,MACRiN,QAAS,MACTH,MAAM,MAIXhD,EAAKsC,YACJ7B,EAAA,aACEc,MAAM,iDACN6B,KAAK,KACLC,UAAWrD,EAAK0C,YAChBY,aAAY,OAGT,S","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as t,e,n,g as r}from"./p-BBu_Svz7.js";import{t as o}from"./p-rEe-3KR_.js";function i(t,e){const n=String(t);if(typeof e!=="string"){throw new TypeError("Expected character")}let r=0;let o=n.indexOf(e);while(o!==-1){r++;o=n.indexOf(e,o+e.length)}return r}function f(t){if(typeof t!=="string"){throw new TypeError("Expected a string")}return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const s=function(t){if(t===null||t===undefined){return h}if(typeof t==="function"){return a(t)}if(typeof t==="object"){return Array.isArray(t)?c(t):u(t)}if(typeof t==="string"){return l(t)}throw new Error("Expected function, string, or object as test")};function c(t){const e=[];let n=-1;while(++n<t.length){e[n]=s(t[n])}return a(r);function r(...t){let n=-1;while(++n<e.length){if(e[n].apply(this,t))return true}return false}}function u(t){const e=t;return a(n);function n(n){const r=n;let o;for(o in t){if(r[o]!==e[o])return false}return true}}function l(t){return a(e);function e(e){return e&&e.type===t}}function a(t){return e;function e(e,n,r){return Boolean(d(e)&&t.call(this,e,typeof n==="number"?n:undefined,r||undefined))}}function h(){return true}function d(t){return t!==null&&typeof t==="object"&&"type"in t}function p(t){return t}const b=[];const w=true;const g=false;const m="skip";function x(t,e,n,r){let o;if(typeof e==="function"&&typeof n!=="function"){r=n;n=e}else{o=e}const i=s(o);const f=r?-1:1;c(t,undefined,[])();function c(t,o,s){const u=t&&typeof t==="object"?t:{};if(typeof u.type==="string"){const e=typeof u.tagName==="string"?u.tagName:typeof u.name==="string"?u.name:undefined;Object.defineProperty(l,"name",{value:"node ("+p(t.type+(e?"<"+e+">":""))+")"})}return l;function l(){let u=b;let l;let a;let h;if(!e||i(t,o,s[s.length-1]||undefined)){u=y(n(t,s));if(u[0]===g){return u}}if("children"in t&&t.children){const e=t;if(e.children&&u[0]!==m){a=(r?e.children.length:-1)+f;h=s.concat(e);while(a>-1&&a<e.children.length){const t=e.children[a];l=c(t,a,h)();if(l[0]===g){return l}a=typeof l[1]==="number"?l[1]:a+f}}}return u}}}function y(t){if(Array.isArray(t)){return t}if(typeof t==="number"){return[w,t]}return t===null||t===undefined?b:[t]}function k(t,e,n){const r=n||{};const o=s(r.ignore||[]);const i=C(e);let f=-1;while(++f<i.length){x(t,"text",c)}function c(t,e){let n=-1;let r;while(++n<e.length){const t=e[n];const i=r?r.children:undefined;if(o(t,i?i.indexOf(t):undefined,r)){return}r=t}if(r){return u(t,e)}}function u(t,e){const n=e[e.length-1];const r=i[f][0];const o=i[f][1];let s=0;const c=n.children;const u=c.indexOf(t);let l=false;let a=[];r.lastIndex=0;let h=r.exec(t.value);while(h){const n=h.index;const i={index:h.index,input:h.input,stack:[...e,t]};let f=o(...h,i);if(typeof f==="string"){f=f.length>0?{type:"text",value:f}:undefined}if(f===false){r.lastIndex=n+1}else{if(s!==n){a.push({type:"text",value:t.value.slice(s,n)})}if(Array.isArray(f)){a.push(...f)}else if(f){a.push(f)}s=n+h[0].length;l=true}if(!r.global){break}h=r.exec(t.value)}if(l){if(s<t.value.length){a.push({type:"text",value:t.value.slice(s)})}n.children.splice(u,1,...a)}else{a=[t]}return u+a.length}}function C(t){const e=[];if(!Array.isArray(t)){throw new TypeError("Expected find and replace tuple or list of tuples")}const n=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;while(++r<n.length){const t=n[r];e.push([E(t[0]),R(t[1])])}return e}function E(t){return typeof t==="string"?new RegExp(f(t),"g"):t}function R(t){return typeof t==="function"?t:function(){return t}}const A="phrasing";const $=["autolink","link","image","label"];function z(){return{transforms:[S],enter:{literalAutolink:I,literalAutolinkEmail:B,literalAutolinkHttp:B,literalAutolinkWww:B},exit:{literalAutolink:L,literalAutolinkEmail:D,literalAutolinkHttp:_,literalAutolinkWww:v}}}function F(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:A,notInConstruct:$},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:A,notInConstruct:$},{character:":",before:"[ps]",after:"\\/",inConstruct:A,notInConstruct:$}]}}function I(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function B(t){this.config.enter.autolinkProtocol.call(this,t)}function _(t){this.config.exit.autolinkProtocol.call(this,t)}function v(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.url="http://"+this.sliceSerialize(t)}function D(t){this.config.exit.autolinkEmail.call(this,t)}function L(t){this.exit(t)}function S(t){k(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,j],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,M]],{ignore:["link","linkReference"]})}function j(t,e,n,r,o){let i="";if(!H(o)){return false}if(/^w/i.test(e)){n=e+n;e="";i="http://"}if(!T(n)){return false}const f=O(n+r);if(!f[0])return false;const s={type:"link",title:null,url:i+e+f[0],children:[{type:"text",value:e+f[0]}]};if(f[1]){return[s,{type:"text",value:f[1]}]}return s}function M(t,e,n,r){if(!H(r,true)||/[-\d_]$/.test(n)){return false}return{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function T(t){const e=t.split(".");if(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2]))){return false}return true}function O(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e){return[t,undefined]}t=t.slice(0,e.index);let n=e[0];let r=n.indexOf(")");const o=i(t,"(");let f=i(t,")");while(r!==-1&&o>f){t+=n.slice(0,r+1);n=n.slice(r+1);r=n.indexOf(")");f++}return[t,n]}function H(n,r){const o=n.input.charCodeAt(n.index-1);return(n.index===0||t(o)||e(o))&&(!r||o!==47)}U.peek=P;function Q(){this.buffer()}function q(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function V(){this.buffer()}function W(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Z(t){const e=this.resume();const r=this.stack[this.stack.length-1];r.identifier=n(this.sliceSerialize(t)).toLowerCase();r.label=e}function G(t){this.exit(t)}function J(t){const e=this.resume();const r=this.stack[this.stack.length-1];r.identifier=n(this.sliceSerialize(t)).toLowerCase();r.label=e}function K(t){this.exit(t)}function P(){return"["}function U(t,e,n,r){const o=n.createTracker(r);let i=o.move("[^");const f=n.enter("footnoteReference");const s=n.enter("reference");i+=o.move(n.safe(n.associationId(t),{after:"]",before:i}));s();f();i+=o.move("]");return i}function N(){return{enter:{gfmFootnoteCallString:Q,gfmFootnoteCall:q,gfmFootnoteDefinitionLabelString:V,gfmFootnoteDefinition:W},exit:{gfmFootnoteCallString:Z,gfmFootnoteCall:G,gfmFootnoteDefinitionLabelString:J,gfmFootnoteDefinition:K}}}function X(t){let e=false;if(t&&t.firstLineBlank){e=true}return{handlers:{footnoteDefinition:n,footnoteReference:U},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(t,n,r,o){const i=r.createTracker(o);let f=i.move("[^");const s=r.enter("footnoteDefinition");const c=r.enter("label");f+=i.move(r.safe(r.associationId(t),{before:f,after:"]"}));c();f+=i.move("]:");if(t.children&&t.children.length>0){i.shift(4);f+=i.move((e?"\n":" ")+r.indentLines(r.containerFlow(t,i.current()),e?tt:Y))}s();return f}}function Y(t,e,n){return e===0?t:tt(t,e,n)}function tt(t,e,n){return(n?"":" ")+t}const et=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ft.peek=st;function nt(){return{canContainEols:["delete"],enter:{strikethrough:ot},exit:{strikethrough:it}}}function rt(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:et}],handlers:{delete:ft}}}function ot(t){this.enter({type:"delete",children:[]},t)}function it(t){this.exit(t)}function ft(t,e,n,r){const o=n.createTracker(r);const i=n.enter("strikethrough");let f=o.move("~~");f+=n.containerPhrasing(t,{...o.current(),before:f,after:"~"});f+=o.move("~~");i();return f}function st(){return"~"}function ct(t){return t.length}function ut(t,e){const n=e||{};const r=(n.align||[]).concat();const o=n.stringLength||ct;const i=[];const f=[];const s=[];const c=[];let u=0;let l=-1;while(++l<t.length){const e=[];const r=[];let i=-1;if(t[l].length>u){u=t[l].length}while(++i<t[l].length){const f=lt(t[l][i]);if(n.alignDelimiters!==false){const t=o(f);r[i]=t;if(c[i]===undefined||t>c[i]){c[i]=t}}e.push(f)}f[l]=e;s[l]=r}let a=-1;if(typeof r==="object"&&"length"in r){while(++a<u){i[a]=at(r[a])}}else{const t=at(r);while(++a<u){i[a]=t}}a=-1;const h=[];const d=[];while(++a<u){const t=i[a];let e="";let r="";if(t===99){e=":";r=":"}else if(t===108){e=":"}else if(t===114){r=":"}let o=n.alignDelimiters===false?1:Math.max(1,c[a]-e.length-r.length);const f=e+"-".repeat(o)+r;if(n.alignDelimiters!==false){o=e.length+o+r.length;if(o>c[a]){c[a]=o}d[a]=o}h[a]=f}f.splice(1,0,h);s.splice(1,0,d);l=-1;const p=[];while(++l<f.length){const t=f[l];const e=s[l];a=-1;const r=[];while(++a<u){const o=t[a]||"";let f="";let s="";if(n.alignDelimiters!==false){const t=c[a]-(e[a]||0);const n=i[a];if(n===114){f=" ".repeat(t)}else if(n===99){if(t%2){f=" ".repeat(t/2+.5);s=" ".repeat(t/2-.5)}else{f=" ".repeat(t/2);s=f}}else{s=" ".repeat(t)}}if(n.delimiterStart!==false&&!a){r.push("|")}if(n.padding!==false&&!(n.alignDelimiters===false&&o==="")&&(n.delimiterStart!==false||a)){r.push(" ")}if(n.alignDelimiters!==false){r.push(f)}r.push(o);if(n.alignDelimiters!==false){r.push(s)}if(n.padding!==false){r.push(" ")}if(n.delimiterEnd!==false||a!==u-1){r.push("|")}}p.push(n.delimiterEnd===false?r.join("").replace(/ +$/,""):r.join(""))}return p.join("\n")}function lt(t){return t===null||t===undefined?"":String(t)}function at(t){const e=typeof t==="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function ht(t,e,n,r){const o=n.enter("blockquote");const i=n.createTracker(r);i.move("> ");i.shift(2);const f=n.indentLines(n.containerFlow(t,i.current()),dt);o();return f}function dt(t,e,n){return">"+(n?"":" ")+t}function pt(t,e){return bt(t,e.inConstruct,true)&&!bt(t,e.notInConstruct,false)}function bt(t,e,n){if(typeof e==="string"){e=[e]}if(!e||e.length===0){return n}let r=-1;while(++r<e.length){if(t.includes(e[r])){return true}}return false}function wt(t,e,n,r){let o=-1;while(++o<n.unsafe.length){if(n.unsafe[o].character==="\n"&&pt(n.stack,n.unsafe[o])){return/[ \t]/.test(r.before)?"":" "}}return"\\\n"}function gt(t,e){const n=String(t);let r=n.indexOf(e);let o=r;let i=0;let f=0;if(typeof e!=="string"){throw new TypeError("Expected substring")}while(r!==-1){if(r===o){if(++i>f){f=i}}else{i=1}o=r+e.length;r=n.indexOf(e,o)}return f}function mt(t,e){return Boolean(e.options.fences===false&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function xt(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~"){throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`")}return e}function yt(t,e,n,r){const o=xt(n);const i=t.value||"";const f=o==="`"?"GraveAccent":"Tilde";if(mt(t,n)){const t=n.enter("codeIndented");const e=n.indentLines(i,kt);t();return e}const s=n.createTracker(r);const c=o.repeat(Math.max(gt(i,o)+1,3));const u=n.enter("codeFenced");let l=s.move(c);if(t.lang){const e=n.enter(`codeFencedLang${f}`);l+=s.move(n.safe(t.lang,{before:l,after:" ",encode:["`"],...s.current()}));e()}if(t.lang&&t.meta){const e=n.enter(`codeFencedMeta${f}`);l+=s.move(" ");l+=s.move(n.safe(t.meta,{before:l,after:"\n",encode:["`"],...s.current()}));e()}l+=s.move("\n");if(i){l+=s.move(i+"\n")}l+=s.move(c);u();return l}function kt(t,e,n){return(n?"":" ")+t}function Ct(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'"){throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`")}return e}function Et(t,e,n,r){const o=Ct(n);const i=o==='"'?"Quote":"Apostrophe";const f=n.enter("definition");let s=n.enter("label");const c=n.createTracker(r);let u=c.move("[");u+=c.move(n.safe(n.associationId(t),{before:u,after:"]",...c.current()}));u+=c.move("]: ");s();if(!t.url||/[\0- \u007F]/.test(t.url)){s=n.enter("destinationLiteral");u+=c.move("<");u+=c.move(n.safe(t.url,{before:u,after:">",...c.current()}));u+=c.move(">")}else{s=n.enter("destinationRaw");u+=c.move(n.safe(t.url,{before:u,after:t.title?" ":"\n",...c.current()}))}s();if(t.title){s=n.enter(`title${i}`);u+=c.move(" "+o);u+=c.move(n.safe(t.title,{before:u,after:o,...c.current()}));u+=c.move(o);s()}f();return u}function Rt(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_"){throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`")}return e}function At(t){return"&#x"+t.toString(16).toUpperCase()+";"}function $t(t,e,n){const o=r(t);const i=r(e);if(o===undefined){return i===undefined?n==="_"?{inside:true,outside:true}:{inside:false,outside:false}:i===1?{inside:true,outside:true}:{inside:false,outside:true}}if(o===1){return i===undefined?{inside:false,outside:false}:i===1?{inside:true,outside:true}:{inside:false,outside:false}}return i===undefined?{inside:false,outside:false}:i===1?{inside:true,outside:false}:{inside:false,outside:false}}zt.peek=Ft;function zt(t,e,n,r){const o=Rt(n);const i=n.enter("emphasis");const f=n.createTracker(r);const s=f.move(o);let c=f.move(n.containerPhrasing(t,{after:o,before:s,...f.current()}));const u=c.charCodeAt(0);const l=$t(r.before.charCodeAt(r.before.length-1),u,o);if(l.inside){c=At(u)+c.slice(1)}const a=c.charCodeAt(c.length-1);const h=$t(r.after.charCodeAt(0),a,o);if(h.inside){c=c.slice(0,-1)+At(a)}const d=f.move(o);i();n.attentionEncodeSurroundingInfo={after:h.outside,before:l.outside};return s+c+d}function Ft(t,e,n){return n.options.emphasis||"*"}function It(t,e,n,r){let o;let i;let f;if(typeof e==="function"&&typeof n!=="function"){i=undefined;f=e;o=n}else{i=e;f=n;o=r}x(t,i,s,o);function s(t,e){const n=e[e.length-1];const r=n?n.children.indexOf(t):undefined;return f(t,r,n)}}function Bt(t,e){let n=false;It(t,(function(t){if("value"in t&&/\r?\n|\r/.test(t.value)||t.type==="break"){n=true;return g}}));return Boolean((!t.depth||t.depth<3)&&o(t)&&(e.options.setext||n))}function _t(t,e,n,r){const o=Math.max(Math.min(6,t.depth||1),1);const i=n.createTracker(r);if(Bt(t,n)){const e=n.enter("headingSetext");const r=n.enter("phrasing");const f=n.containerPhrasing(t,{...i.current(),before:"\n",after:"\n"});r();e();return f+"\n"+(o===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf("\n"))+1))}const f="#".repeat(o);const s=n.enter("headingAtx");const c=n.enter("phrasing");i.move(f+" ");let u=n.containerPhrasing(t,{before:"# ",after:"\n",...i.current()});if(/^[\t ]/.test(u)){u=At(u.charCodeAt(0))+u.slice(1)}u=u?f+" "+u:f;if(n.options.closeAtx){u+=" "+f}c();s();return u}vt.peek=Dt;function vt(t){return t.value||""}function Dt(){return"<"}Lt.peek=St;function Lt(t,e,n,r){const o=Ct(n);const i=o==='"'?"Quote":"Apostrophe";const f=n.enter("image");let s=n.enter("label");const c=n.createTracker(r);let u=c.move("![");u+=c.move(n.safe(t.alt,{before:u,after:"]",...c.current()}));u+=c.move("](");s();if(!t.url&&t.title||/[\0- \u007F]/.test(t.url)){s=n.enter("destinationLiteral");u+=c.move("<");u+=c.move(n.safe(t.url,{before:u,after:">",...c.current()}));u+=c.move(">")}else{s=n.enter("destinationRaw");u+=c.move(n.safe(t.url,{before:u,after:t.title?" ":")",...c.current()}))}s();if(t.title){s=n.enter(`title${i}`);u+=c.move(" "+o);u+=c.move(n.safe(t.title,{before:u,after:o,...c.current()}));u+=c.move(o);s()}u+=c.move(")");f();return u}function St(){return"!"}jt.peek=Mt;function jt(t,e,n,r){const o=t.referenceType;const i=n.enter("imageReference");let f=n.enter("label");const s=n.createTracker(r);let c=s.move("![");const u=n.safe(t.alt,{before:c,after:"]",...s.current()});c+=s.move(u+"][");f();const l=n.stack;n.stack=[];f=n.enter("reference");const a=n.safe(n.associationId(t),{before:c,after:"]",...s.current()});f();n.stack=l;i();if(o==="full"||!u||u!==a){c+=s.move(a+"]")}else if(o==="shortcut"){c=c.slice(0,-1)}else{c+=s.move("]")}return c}function Mt(){return"!"}Tt.peek=Ot;function Tt(t,e,n){let r=t.value||"";let o="`";let i=-1;while(new RegExp("(^|[^`])"+o+"([^`]|$)").test(r)){o+="`"}if(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))){r=" "+r+" "}while(++i<n.unsafe.length){const t=n.unsafe[i];const e=n.compilePattern(t);let o;if(!t.atBreak)continue;while(o=e.exec(r)){let t=o.index;if(r.charCodeAt(t)===10&&r.charCodeAt(t-1)===13){t--}r=r.slice(0,t)+" "+r.slice(o.index+1)}}return o+r+o}function Ot(){return"`"}function Ht(t,e){const n=o(t);return Boolean(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Qt.peek=qt;function Qt(t,e,n,r){const o=Ct(n);const i=o==='"'?"Quote":"Apostrophe";const f=n.createTracker(r);let s;let c;if(Ht(t,n)){const e=n.stack;n.stack=[];s=n.enter("autolink");let r=f.move("<");r+=f.move(n.containerPhrasing(t,{before:r,after:">",...f.current()}));r+=f.move(">");s();n.stack=e;return r}s=n.enter("link");c=n.enter("label");let u=f.move("[");u+=f.move(n.containerPhrasing(t,{before:u,after:"](",...f.current()}));u+=f.move("](");c();if(!t.url&&t.title||/[\0- \u007F]/.test(t.url)){c=n.enter("destinationLiteral");u+=f.move("<");u+=f.move(n.safe(t.url,{before:u,after:">",...f.current()}));u+=f.move(">")}else{c=n.enter("destinationRaw");u+=f.move(n.safe(t.url,{before:u,after:t.title?" ":")",...f.current()}))}c();if(t.title){c=n.enter(`title${i}`);u+=f.move(" "+o);u+=f.move(n.safe(t.title,{before:u,after:o,...f.current()}));u+=f.move(o);c()}u+=f.move(")");s();return u}function qt(t,e,n){return Ht(t,n)?"<":"["}Vt.peek=Wt;function Vt(t,e,n,r){const o=t.referenceType;const i=n.enter("linkReference");let f=n.enter("label");const s=n.createTracker(r);let c=s.move("[");const u=n.containerPhrasing(t,{before:c,after:"]",...s.current()});c+=s.move(u+"][");f();const l=n.stack;n.stack=[];f=n.enter("reference");const a=n.safe(n.associationId(t),{before:c,after:"]",...s.current()});f();n.stack=l;i();if(o==="full"||!u||u!==a){c+=s.move(a+"]")}else if(o==="shortcut"){c=c.slice(0,-1)}else{c+=s.move("]")}return c}function Wt(){return"["}function Zt(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-"){throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`")}return e}function Gt(t){const e=Zt(t);const n=t.options.bulletOther;if(!n){return e==="*"?"-":"*"}if(n!=="*"&&n!=="+"&&n!=="-"){throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`")}if(n===e){throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different")}return n}function Jt(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")"){throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`")}return e}function Kt(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_"){throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`")}return e}function Pt(t,e,n,r){const o=n.enter("list");const i=n.bulletCurrent;let f=t.ordered?Jt(n):Zt(n);const s=t.ordered?f==="."?")":".":Gt(n);let c=e&&n.bulletLastUsed?f===n.bulletLastUsed:false;if(!t.ordered){const e=t.children?t.children[0]:undefined;if((f==="*"||f==="-")&&e&&(!e.children||!e.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0){c=true}if(Kt(n)===f&&e){let e=-1;while(++e<t.children.length){const n=t.children[e];if(n&&n.type==="listItem"&&n.children&&n.children[0]&&n.children[0].type==="thematicBreak"){c=true;break}}}}if(c){f=s}n.bulletCurrent=f;const u=n.containerFlow(t,r);n.bulletLastUsed=f;n.bulletCurrent=i;o();return u}function Ut(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed"){throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`")}return e}function Nt(t,e,n,r){const o=Ut(n);let i=n.bulletCurrent||Zt(n);if(e&&e.type==="list"&&e.ordered){i=(typeof e.start==="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===false?0:e.children.indexOf(t))+i}let f=i.length+1;if(o==="tab"||o==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread)){f=Math.ceil(f/4)*4}const s=n.createTracker(r);s.move(i+" ".repeat(f-i.length));s.shift(f);const c=n.enter("listItem");const u=n.indentLines(n.containerFlow(t,s.current()),l);c();return u;function l(t,e,n){if(e){return(n?"":" ".repeat(f))+t}return(n?i:i+" ".repeat(f-i.length))+t}}function Xt(t,e,n,r){const o=n.enter("paragraph");const i=n.enter("phrasing");const f=n.containerPhrasing(t,r);i();o();return f}const Yt=s(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function te(t,e,n,r){const o=t.children.some((function(t){return Yt(t)}));const i=o?n.containerPhrasing:n.containerFlow;return i.call(n,t,r)}function ee(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_"){throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`")}return e}ne.peek=re;function ne(t,e,n,r){const o=ee(n);const i=n.enter("strong");const f=n.createTracker(r);const s=f.move(o+o);let c=f.move(n.containerPhrasing(t,{after:o,before:s,...f.current()}));const u=c.charCodeAt(0);const l=$t(r.before.charCodeAt(r.before.length-1),u,o);if(l.inside){c=At(u)+c.slice(1)}const a=c.charCodeAt(c.length-1);const h=$t(r.after.charCodeAt(0),a,o);if(h.inside){c=c.slice(0,-1)+At(a)}const d=f.move(o+o);i();n.attentionEncodeSurroundingInfo={after:h.outside,before:l.outside};return s+c+d}function re(t,e,n){return n.options.strong||"*"}function oe(t,e,n,r){return n.safe(t.value,r)}function ie(t){const e=t.options.ruleRepetition||3;if(e<3){throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more")}return e}function fe(t,e,n){const r=(Kt(n)+(n.options.ruleSpaces?" ":"")).repeat(ie(n));return n.options.ruleSpaces?r.slice(0,-1):r}const se={blockquote:ht,break:wt,code:yt,definition:Et,emphasis:zt,hardBreak:wt,heading:_t,html:vt,image:Lt,imageReference:jt,inlineCode:Tt,link:Qt,linkReference:Vt,list:Pt,listItem:Nt,paragraph:Xt,root:te,strong:ne,text:oe,thematicBreak:fe};function ce(){return{enter:{table:ue,tableData:de,tableHeader:de,tableRow:ae},exit:{codeText:pe,table:le,tableData:he,tableHeader:he,tableRow:he}}}function ue(t){const e=t._align;this.enter({type:"table",align:e.map((function(t){return t==="none"?null:t})),children:[]},t);this.data.inTable=true}function le(t){this.exit(t);this.data.inTable=undefined}function ae(t){this.enter({type:"tableRow",children:[]},t)}function he(t){this.exit(t)}function de(t){this.enter({type:"tableCell",children:[]},t)}function pe(t){let e=this.resume();if(this.data.inTable){e=e.replace(/\\([\\|])/g,be)}const n=this.stack[this.stack.length-1];n.value=e;this.exit(t)}function be(t,e){return e==="|"?e:t}function we(t){const e=t||{};const n=e.tableCellPadding;const r=e.tablePipeAlign;const o=e.stringLength;const i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:true,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:true,character:":",after:"-"},{atBreak:true,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:f,tableCell:c,tableRow:s}};function f(t,e,n,r){return u(l(t,n,r),t.align)}function s(t,e,n,r){const o=a(t,n,r);const i=u([o]);return i.slice(0,i.indexOf("\n"))}function c(t,e,n,r){const o=n.enter("tableCell");const f=n.enter("phrasing");const s=n.containerPhrasing(t,{...r,before:i,after:i});f();o();return s}function u(t,e){return ut(t,{align:e,alignDelimiters:r,padding:n,stringLength:o})}function l(t,e,n){const r=t.children;let o=-1;const i=[];const f=e.enter("table");while(++o<r.length){i[o]=a(r[o],e,n)}f();return i}function a(t,e,n){const r=t.children;let o=-1;const i=[];const f=e.enter("tableRow");while(++o<r.length){i[o]=c(r[o],t,e,n)}f();return i}function h(t,e,n){let r=se.inlineCode(t,e,n);if(n.stack.includes("tableCell")){r=r.replace(/\|/g,"\\$&")}return r}}function ge(){return{exit:{taskListCheckValueChecked:xe,taskListCheckValueUnchecked:xe,paragraph:ye}}}function me(){return{unsafe:[{atBreak:true,character:"-",after:"[:|-]"}],handlers:{listItem:ke}}}function xe(t){const e=this.stack[this.stack.length-2];e.checked=t.type==="taskListCheckValueChecked"}function ye(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked==="boolean"){const t=this.stack[this.stack.length-1];const n=t.children[0];if(n&&n.type==="text"){const r=e.children;let o=-1;let i;while(++o<r.length){const t=r[o];if(t.type==="paragraph"){i=t;break}}if(i===t){n.value=n.value.slice(1);if(n.value.length===0){t.children.shift()}else if(t.position&&n.position&&typeof n.position.start.offset==="number"){n.position.start.column++;n.position.start.offset++;t.position.start=Object.assign({},n.position.start)}}}}this.exit(t)}function ke(t,e,n,r){const o=t.children[0];const i=typeof t.checked==="boolean"&&o&&o.type==="paragraph";const f="["+(t.checked?"x":" ")+"] ";const s=n.createTracker(r);if(i){s.move(f)}let c=se.listItem(t,e,n,{...r,...s.current()});if(i){c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)}return c;function u(t){return t+f}}function Ce(){return[z(),N(),nt(),ce(),ge()]}function Ee(t){return{extensions:[F(),X(t),rt(),we(t),me()]}}export{Ce as gfmFromMarkdown,Ee as gfmToMarkdown};
|
|
2
|
+
//# sourceMappingURL=p-DVsje4AY.js.map
|