import { InputRule, InputRuleGuard } from "@portabletext/plugin-input-rule";
import { EditorContext, EditorSchema } from "@portabletext/editor";
/**
 * @public
 * Create an `InputRuleGuard` that can prevent the rule from running inside
 * certain decorators.
 *
 * @example
 * ```tsx
 * const guard = createDecoratorGuard({
 *  decorators: ({context}) => context.schema.decorators.flatMap((decorator) => decorator.name === 'code' ? [] : [decorator.name]),
 * })
 *
 * <TypographyPlugin guard={guard} />
 * ```
 */
declare function createDecoratorGuard(config: {
  decorators: ({ context }: {
    context: Pick<EditorContext, 'schema'>;
  }) => Array<EditorSchema['decorators'][number]['name']>;
}): InputRuleGuard;
/**
 * @public
 */
declare const emDashRule: InputRule<true>;
/**
 * @public
 */
declare const ellipsisRule: InputRule<true>;
/**
 * @public
 */
declare const openingDoubleQuoteRule: InputRule<true>;
/**
 * @public
 */
declare const closingDoubleQuoteRule: InputRule<true>;
/**
 * @public
 */
declare const openingSingleQuoteRule: InputRule<true>;
/**
 * @public
 */
declare const closingSingleQuoteRule: InputRule<true>;
/**
 * @public
 */
declare const smartQuotesRules: Array<InputRule>;
/**
 * @public
 */
declare const leftArrowRule: InputRule<true>;
/**
 * @public
 */
declare const rightArrowRule: InputRule<true>;
/**
 * @public
 */
declare const copyrightRule: InputRule<true>;
/**
 * @public
 */
declare const servicemarkRule: InputRule<true>;
/**
 * @public
 */
declare const trademarkRule: InputRule<true>;
/**
 * @beta
 */
declare const registeredTrademarkRule: InputRule<true>;
/**
 * @public
 */
declare const oneHalfRule: InputRule<true>;
/**
 * @public
 */
declare const plusMinusRule: InputRule<true>;
/**
 * @public
 */
declare const notEqualRule: InputRule<true>;
/**
 * @public
 */
declare const laquoRule: InputRule<true>;
/**
 * @public
 */
declare const raquoRule: InputRule<true>;
/**
 * @public
 */
declare const multiplicationRule: InputRule<true>;
/**
 * @public
 */
declare const superscriptTwoRule: InputRule<true>;
/**
 * @public
 */
declare const superscriptThreeRule: InputRule<true>;
/**
 * @public
 */
declare const oneQuarterRule: InputRule<true>;
/**
 * @public
 */
declare const threeQuartersRule: InputRule<true>;
declare const defaultRuleConfig: readonly [{
  readonly name: 'emDash';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'ellipsis';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'openingDoubleQuote';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'closingDoubleQuote';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'openingSingleQuote';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'closingSingleQuote';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'leftArrow';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'rightArrow';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'copyright';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'trademark';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'servicemark';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'registeredTrademark';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'on';
}, {
  readonly name: 'oneHalf';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'off';
}, {
  readonly name: 'plusMinus';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'off';
}, {
  readonly name: 'laquo';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'off';
}, {
  readonly name: 'notEqual';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'off';
}, {
  readonly name: 'raquo';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'off';
}, {
  readonly name: 'multiplication';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'off';
}, {
  readonly name: 'superscriptTwo';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'off';
}, {
  readonly name: 'superscriptThree';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'off';
}, {
  readonly name: 'oneQuarter';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'off';
}, {
  readonly name: 'threeQuarters';
  readonly rule: import("@portabletext/plugin-input-rule").InputRule<true>;
  readonly state: 'off';
}];
type RuleName = (typeof defaultRuleConfig)[number]['name'];
type DisableableRuleName<TEnabledRuleName extends RuleName> = [Exclude<RuleName, TEnabledRuleName>] extends [never] ? RuleName : Exclude<RuleName, TEnabledRuleName>;
type DefaultDisabledRuleName<TEnabledRuleName extends RuleName> = [Exclude<RuleName, TEnabledRuleName>] extends [never] ? RuleName : never;
/**
 * @public
 */
type TypographyPluginProps<TEnabledRuleName extends RuleName = RuleName, TDisabledRuleName extends DisableableRuleName<TEnabledRuleName> = DefaultDisabledRuleName<TEnabledRuleName>> = {
  guard?: InputRuleGuard;
  /**
   * Preset configuration for rules.
   * - `'default'`: Common typography rules enabled (em dash, ellipsis, quotes, arrows, copyright symbols)
   * - `'all'`: All rules enabled
   * - `'none'`: No rules enabled (use with `enable` prop)
   *
   * @defaultValue 'default'
   */
  preset?: 'default' | 'all' | 'none';
  /**
   * Enable specific rules (additive to preset).
   * Use this to enable additional rules beyond the preset.
   *
   * @example
   * ```tsx
   * // Enable multiplication and plusMinus in addition to default rules
   * <TypographyPlugin enable={['multiplication', 'plusMinus']} />
   * ```
   */
  enable?: ReadonlyArray<TEnabledRuleName>;
  /**
   * Disable specific rules (subtractive from preset).
   * Use this to disable rules that would otherwise be enabled by the preset.
   * A rule listed in both `enable` and `disable` is disabled.
   *
   * @example
   * ```tsx
   * // Disable em dash from the default rules
   * <TypographyPlugin disable={['emDash']} />
   * ```
   */
  disable?: ReadonlyArray<TDisabledRuleName>;
};
/**
 * @public
 */
declare function TypographyPlugin<TEnabledRuleName extends RuleName = RuleName, TDisabledRuleName extends DisableableRuleName<TEnabledRuleName> = DefaultDisabledRuleName<TEnabledRuleName>>(props: TypographyPluginProps<TEnabledRuleName, TDisabledRuleName>): import("react").JSX.Element;
export { TypographyPlugin, TypographyPluginProps, closingDoubleQuoteRule, closingSingleQuoteRule, copyrightRule, createDecoratorGuard, ellipsisRule, emDashRule, laquoRule, leftArrowRule, multiplicationRule, notEqualRule, oneHalfRule, oneQuarterRule, openingDoubleQuoteRule, openingSingleQuoteRule, plusMinusRule, raquoRule, registeredTrademarkRule, rightArrowRule, servicemarkRule, smartQuotesRules, superscriptThreeRule, superscriptTwoRule, threeQuartersRule, trademarkRule };
//# sourceMappingURL=index.d.ts.map