Files
klz-cables.com/.pnpm-store/v10/files/76/9b6cb09e5158d2f224838cb88d5969a6bcc3e3b6b2ced54f1669ff59d44fb32b30fa1e84228479a6090de1e572a8f8250928d902537c7f8ae244a91631682a
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

53 lines
2.7 KiB
Plaintext

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { JSX } from 'react';
import { CommandListenerPriority, LexicalCommand, LexicalEditor, TextNode } from 'lexical';
import { MutableRefObject, ReactPortal } from 'react';
export type MenuTextMatch = {
leadOffset: number;
matchingString: string;
replaceableString: string;
};
export type MenuResolution = {
match?: MenuTextMatch;
getRect: () => DOMRect;
};
export declare const PUNCTUATION = "\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;";
export declare class MenuOption {
key: string;
ref?: MutableRefObject<HTMLElement | null>;
constructor(key: string);
setRefElement(element: HTMLElement | null): void;
}
export type MenuRenderFn<TOption extends MenuOption> = (anchorElementRef: MutableRefObject<HTMLElement | null>, itemProps: {
selectedIndex: number | null;
selectOptionAndCleanUp: (option: TOption) => void;
setHighlightedIndex: (index: number) => void;
options: Array<TOption>;
}, matchingString: string | null) => ReactPortal | JSX.Element | null;
export declare function getScrollParent(element: HTMLElement, includeHidden: boolean): HTMLElement | HTMLBodyElement;
export declare function useDynamicPositioning(resolution: MenuResolution | null, targetElement: HTMLElement | null, onReposition: () => void, onVisibilityChange?: (isInView: boolean) => void): void;
export declare const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND: LexicalCommand<{
index: number;
option: MenuOption;
}>;
export declare function LexicalMenu<TOption extends MenuOption>({ close, editor, anchorElementRef, resolution, options, menuRenderFn, onSelectOption, shouldSplitNodeWithQuery, commandPriority, preselectFirstItem, }: {
close: () => void;
editor: LexicalEditor;
anchorElementRef: MutableRefObject<HTMLElement | null>;
resolution: MenuResolution;
options: Array<TOption>;
shouldSplitNodeWithQuery?: boolean;
menuRenderFn: MenuRenderFn<TOption>;
onSelectOption: (option: TOption, textNodeContainingQuery: TextNode | null, closeMenu: () => void, matchingString: string) => void;
commandPriority?: CommandListenerPriority;
preselectFirstItem?: boolean;
}): JSX.Element | null;
export declare function useMenuAnchorRef(resolution: MenuResolution | null, setResolution: (r: MenuResolution | null) => void, className?: string, parent?: HTMLElement | undefined, shouldIncludePageYOffset__EXPERIMENTAL?: boolean): MutableRefObject<HTMLElement | null>;
export type TriggerFn = (text: string, editor: LexicalEditor) => MenuTextMatch | null;