@wrdagency/blockout 1.0.10 → 1.0.12

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.
@@ -1,7 +1,11 @@
1
+ import { Editor } from '@milkdown/kit/core';
2
+ import { PropsWithChildren, RefObject } from 'react';
1
3
  import { ControlFC } from '../base-control/props';
2
- interface MarkdownControlProps {
4
+ interface MarkdownControlProps extends PropsWithChildren {
3
5
  value?: string;
4
- onChangeValue: (value: string) => void;
6
+ onChangeValue?: (value: string) => void;
7
+ toolbar?: "top" | "bottom" | false;
8
+ milkdownRef?: RefObject<Editor | undefined>;
5
9
  }
6
10
  export declare const MarkdownControl: ControlFC<MarkdownControlProps>;
7
11
  export {};
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- interface EditorToolbarProps {
1
+ import { FC, PropsWithChildren } from 'react';
2
+ interface EditorToolbarProps extends PropsWithChildren {
3
3
  className?: string;
4
4
  }
5
5
  export declare const EditorToolbar: FC<EditorToolbarProps>;
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../toolbar/index.js";
3
3
  import "../../../index-CwFPDtaz.js";
4
- import { E as b } from "../../../toolbar-j1SJvq8D.js";
4
+ import { E as b } from "../../../toolbar-CCiZ_PIy.js";
5
5
  import "react";
6
6
  import "../../../commands-IQnqt4xL.js";
7
7
  import "../../../index-EPj3dCzl.js";
@@ -1,5 +1,8 @@
1
- import { AnchorHTMLAttributes, FC } from 'react';
1
+ import { AnchorHTMLAttributes, ElementType, FC } from 'react';
2
2
  interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
3
3
  }
4
- export declare const Link: FC<LinkProps>;
4
+ type AnchorElement = ElementType<LinkProps>;
5
+ export declare const Link: FC<LinkProps> & {
6
+ anchorElement?: AnchorElement;
7
+ };
5
8
  export {};
@@ -1,24 +1,29 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { cn as s } from "../../utils/css.js";
3
- import { isOutbound as u } from "../../utils/url.js";
4
- import { useMemo as p } from "react";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { cn as u } from "../../utils/css.js";
3
+ import { isOutbound as p } from "../../utils/url.js";
4
+ import { useMemo as c } from "react";
5
5
  import '../../assets/style2.css';/* empty css */
6
- const d = ({
6
+ const l = ({
7
7
  className: n,
8
8
  children: m,
9
9
  href: o,
10
10
  target: i,
11
- ...r
12
- }) => (p(() => o && u(o), [o]) && !i && (i = "_blank"), o ? /* @__PURE__ */ t(
13
- "a",
14
- {
15
- className: s("primitive-link", n),
16
- href: o,
17
- target: i,
18
- ...r,
19
- children: m
20
- }
21
- ) : m);
11
+ ...t
12
+ }) => {
13
+ if (c(() => o && p(o), [o]) && !i && (i = "_blank"), !o)
14
+ return m;
15
+ const r = l.anchorElement || "a";
16
+ return /* @__PURE__ */ s(
17
+ r,
18
+ {
19
+ className: u("primitive-link", n),
20
+ href: o,
21
+ target: i,
22
+ ...t,
23
+ children: m
24
+ }
25
+ );
26
+ };
22
27
  export {
23
- d as Link
28
+ l as Link
24
29
  };