@sanity/block-insert-picker
1.0.121.0.13
dist/index.d.ts~
dist/index.d.tsModified+14−14
Index: package/dist/index.d.ts
===================================================================
--- package/dist/index.d.ts
+++ package/dist/index.d.ts
@@ -177,9 +177,9 @@
* them (default true). See standardBlockPresets.
*/
presets?: boolean;
};
-declare function BlockInsertPicker({ arrayTypeName, filter, items, labels: labelOverrides, onInsert, openOnInsert, presets, resolveItems, shortcut }: BlockInsertPickerProps): import("react").JSX.Element | null;
+export declare function BlockInsertPicker({ arrayTypeName, filter, items, labels: labelOverrides, onInsert, openOnInsert, presets, resolveItems, shortcut }: BlockInsertPickerProps): import("react").JSX.Element | null;
/**
* Derives picker items from a portable-text array's insertable member types
* (see PickerItemsContext), so the picker automatically covers every object
* block the schema allows. The optional metadata list curates triggers,
@@ -188,10 +188,10 @@
* icons intentionally stay unresolved here: BlockInsertPicker resolves
* presentation from the member schema type, which carries member-level
* config (a member-specific icon, a per-member title override).
*/
-declare function derivePickerItems(context: PickerItemsContext, metadata?: readonly PickerItemMetadata[]): PickerItem[];
-declare function filterPickerItems(items: readonly PickerItem[], query: string): readonly PickerItem[];
+export declare function derivePickerItems(context: PickerItemsContext, metadata?: readonly PickerItemMetadata[]): PickerItem[];
+export declare function filterPickerItems(items: readonly PickerItem[], query: string): readonly PickerItem[];
/**
* Generic machinery for markdown-style input rules that replace typed text
* with an inserted object block, complementing the slash/⌘+/ picker with a
* keyboard-only path that mirrors what writers already type in markdown.
@@ -220,10 +220,10 @@
matchText: string;
keyGenerator: KeyGenerator;
}) => Record<string, unknown>;
};
-declare const CODE_FENCE_PATTERN: RegExp;
-declare const BLOCKQUOTE_PATTERN: RegExp;
+export declare const CODE_FENCE_PATTERN: RegExp;
+export declare const BLOCKQUOTE_PATTERN: RegExp;
/**
* A row of a code-fence language table: the stored `value`, the markdown
* fence tokens that should resolve to it, and an optional tab filename.
*/
@@ -232,9 +232,9 @@
aliases?: readonly string[];
filename?: string;
};
/** Sugar: a blockquote rule ("> " at the start of a block) for `blockType`. */
-declare function blockquoteRule(options: {
+export declare function blockquoteRule(options: {
blockType: string;
createValue?: (context: {
keyGenerator: KeyGenerator;
}) => Record<string, unknown>;
@@ -245,9 +245,9 @@
* selector stores, plus an optional filename; tokens outside the table pass
* through as typed so nothing the writer means is lost. `createValue` turns
* the resolved language and filename into the block's fields.
*/
-declare function codeFenceRule(options: {
+export declare function codeFenceRule(options: {
blockType: string;
languages?: readonly LanguageEntry[];
defaultLanguage?: string;
createValue: (context: {
@@ -256,15 +256,15 @@
language: string | undefined;
}) => Record<string, unknown>;
}): MarkdownInputRuleConfig;
/** Strips the leading "```" fence and surrounding whitespace from a match. */
-declare function fenceLanguageFromMatch(matchText: string): string;
+export declare function fenceLanguageFromMatch(matchText: string): string;
/**
* Resolves a typed fence token against a language table: a canonical value,
* an alias (`py`→python, `yml`→yaml), or — for anything the table doesn't
* know — the token as typed. An empty token yields `defaultLanguage`.
*/
-declare function normalizeFenceLanguage(raw: string, languages: readonly LanguageEntry[], defaultLanguage?: string): string | undefined;
+export declare function normalizeFenceLanguage(raw: string, languages: readonly LanguageEntry[], defaultLanguage?: string): string | undefined;
type MarkdownInputRulesProps = {
/**
* Escape hatch: names the portable-text array type when Studio's
* member-schema context is unavailable (see BlockInsertPickerProps).
@@ -282,9 +282,9 @@
* Mounts markdown input rules on the PTE and opens each inserted block for
* editing once its member item mounts — the same open-on-insert behavior the
* picker uses, so a fenced code block lands ready to type into.
*/
-declare function MarkdownInputRules({ arrayTypeName, onInsert, openOnInsert, rules }: MarkdownInputRulesProps): null;
+export declare function MarkdownInputRules({ arrayTypeName, onInsert, openOnInsert, rules }: MarkdownInputRulesProps): null;
interface BlockInsertPickerConfig {
/**
* Per-member curation (slash trigger, alias keywords, section grouping,
* description, badge, visibility, per-item open-on-insert) merged into the
@@ -359,9 +359,9 @@
* },
* })
* ```
*/
-declare function blockInsertPicker(config?: BlockInsertPickerConfig): ComponentType<PortableTextPluginsProps>;
+export declare function blockInsertPicker(config?: BlockInsertPickerConfig): ComponentType<PortableTextPluginsProps>;
/**
* Default triggers and search keywords for block types with fixed, official
* names: Studio's intrinsic types (`image`, `file`), first-party plugin
* types (`code`, `table`, `color`, `latex`, `mux.video`), and the Media
@@ -370,9 +370,9 @@
* never set groups (partial grouping would strand unmatched items in an
* "Other" bucket), never affect rank, and always lose to a host's `items`
* entry for the same type. Opt out entirely with `presets: false`.
*/
-declare const standardBlockPresets: readonly PickerItemMetadata[];
+export declare const standardBlockPresets: readonly PickerItemMetadata[];
/**
* Opt-in input rules for well-known block types — spread into `inputRules`
* (`inputRules: [...wellKnownInputRules]`) rather than applied by default.
* Today: a code fence for `@sanity/code-input`'s `code` type that stores the
@@ -380,7 +380,7 @@
* the array's members by name or resolved type chain (so an aliased
* `{type: 'code', name: 'snippet'}` member still gets the fence, inserted
* with the member's `_type`) and is ignored when nothing matches.
*/
-declare const wellKnownInputRules: readonly MarkdownInputRuleConfig[];
-export { BLOCKQUOTE_PATTERN, BlockInsertPicker, type BlockInsertPickerConfig, type BlockInsertPickerLabels, type BlockInsertPickerProps, CODE_FENCE_PATTERN, type KeyGenerator, type LanguageEntry, type MarkdownInputRuleConfig, MarkdownInputRules, type MarkdownInputRulesProps, type PickerActionContext, type PickerInsertEvent, type PickerItem, type PickerItemAction, type PickerItemMetadata, type PickerItemsContext, type PickerItemsResolver, type PickerMode, blockInsertPicker, blockquoteRule, codeFenceRule, derivePickerItems, fenceLanguageFromMatch, filterPickerItems, normalizeFenceLanguage, standardBlockPresets, wellKnownInputRules };
+export declare const wellKnownInputRules: readonly MarkdownInputRuleConfig[];
+export type { BlockInsertPickerConfig, BlockInsertPickerLabels, BlockInsertPickerProps, KeyGenerator, LanguageEntry, MarkdownInputRuleConfig, MarkdownInputRulesProps, PickerActionContext, PickerInsertEvent, PickerItem, PickerItemAction, PickerItemMetadata, PickerItemsContext, PickerItemsResolver, PickerMode };
//# sourceMappingURL=index.d.ts.map
\ No newline at end of file