@oyat/editor 1.5.7 → 1.5.9
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/components/editor/plate-editor.d.ts +2 -1
- package/dist/components/editor/plate-editor.d.ts.map +1 -1
- package/dist/components/editor/plugins/block-menu-kit.d.ts +1 -0
- package/dist/components/editor/plugins/block-menu-kit.d.ts.map +1 -1
- package/dist/components/editor/plugins/block-selection-kit.d.ts +1 -0
- package/dist/components/editor/plugins/block-selection-kit.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -2,6 +2,7 @@ import { Value } from 'platejs';
|
|
|
2
2
|
export interface PlateEditorProps {
|
|
3
3
|
initialValue?: Value | string;
|
|
4
4
|
onChange?: (value: Value) => void;
|
|
5
|
+
mode?: 'draft' | 'full';
|
|
5
6
|
}
|
|
6
|
-
export declare function PlateEditor({ initialValue, onChange }: PlateEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function PlateEditor({ initialValue, onChange, mode, }: PlateEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
//# sourceMappingURL=plate-editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plate-editor.d.ts","sourceRoot":"","sources":["../../../src/components/editor/plate-editor.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"plate-editor.d.ts","sourceRoot":"","sources":["../../../src/components/editor/plate-editor.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAGrC,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACzB;AAED,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,QAAQ,EACR,IAAc,GACf,EAAE,gBAAgB,2CAyBlB"}
|
|
@@ -67,6 +67,7 @@ export declare const BlockMenuKit: (import('platejs/react').PlatePlugin<import('
|
|
|
67
67
|
};
|
|
68
68
|
editorPaddingRight?: import('react').CSSProperties["width"];
|
|
69
69
|
enableContextMenu?: boolean;
|
|
70
|
+
disableSelectAll?: boolean;
|
|
70
71
|
isSelecting?: boolean;
|
|
71
72
|
isSelectionAreaVisible?: boolean;
|
|
72
73
|
rightSelectionAreaClassName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-menu-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/block-menu-kit.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;;sDAM2vB,CAAC;;;;;;;;;;;kDAAmP,CAAC
|
|
1
|
+
{"version":3,"file":"block-menu-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/block-menu-kit.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;;sDAM2vB,CAAC;;;;;;;;;;;kDAAmP,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAA26D,CAAC;;;;;;eAAod,CAAC;;;4CAA+5I,CAAC;iBAAe,CAAC;iBAAsB,CAAC;;;;;;;0BAA8sB,CAAC;6BAA2B,CAAC;6BAAsK,CAAC;gBAAqB,CAAC;;;;;;;;;;;;;;;2BAAr0L,CAAC;;;;;;WAAod,CAAC;;;wCAAimN,CAAC;aAAa,CAAC;aAAoB,CAAC;;;;;;;sBAAsqB,CAAC;yBAAyB,CAAC;yBAA4J,CAAC;YAAmB,CAAC;;;;;;;;;;;;;;wBAAg8B,CAAC;;;;;uCAAioB,CAAC;oFAAuJ,CAAC;6EAAyJ,CAAC;;oBAAiI,CAAC;;MADv3Z,CAAC"}
|
|
@@ -39,6 +39,7 @@ export declare const BlockSelectionKit: import('platejs/react').PlatePlugin<impo
|
|
|
39
39
|
};
|
|
40
40
|
editorPaddingRight?: import('react').CSSProperties["width"];
|
|
41
41
|
enableContextMenu?: boolean;
|
|
42
|
+
disableSelectAll?: boolean;
|
|
42
43
|
isSelecting?: boolean;
|
|
43
44
|
isSelectionAreaVisible?: boolean;
|
|
44
45
|
rightSelectionAreaClassName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-selection-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/block-selection-kit.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"block-selection-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/block-selection-kit.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAwB41E,CAAC;;;;;;eAAod,CAAC;;;4CAA+5I,CAAC;iBAAe,CAAC;iBAAsB,CAAC;;;;;;;0BAA8sB,CAAC;6BAA2B,CAAC;6BAAsK,CAAC;gBAAqB,CAAC;;;;;;;;;;;;;;;2BAAr0L,CAAC;;;;;;WAAod,CAAC;;;wCAAimN,CAAC;aAAa,CAAC;aAAoB,CAAC;;;;;;;sBAAsqB,CAAC;yBAAyB,CAAC;yBAA4J,CAAC;YAAmB,CAAC;;;;;;;;;;;;;;wBAAg8B,CAAC;;;;;uCAAioB,CAAC;oFAAuJ,CAAC;6EAAyJ,CAAC;;oBAAiI,CAAC;;KAD7zY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -774,8 +774,7 @@ return bl.jsx(Ym,{...e,isHeader:!0})})],Jm=tt("block h-auto w-full cursor-pointe
|
|
|
774
774
|
return bl.jsxs(r,{...e,className:"mb-1 p-0",children:[
|
|
775
775
|
/* @__PURE__ */bl.jsx("div",{contentEditable:!1,children:n.length>0?n.map(e=>/* @__PURE__ */bl.jsx(Vl,{variant:"ghost",className:Jm({depth:e.depth}),onClick:t=>s.onClick(t,e,"smooth"),"aria-current":!0,children:e.title},e.id)):/* @__PURE__ */bl.jsx("div",{className:"text-gray-500 text-sm",children:"Create a heading to display the table of contents."})}),e.children]})})];const eh=[...xu,Ba.withComponent(function(e){const t=e.element,s=Sa(t.id),{buttonProps:n,open:o}=Ea(s);/* @__PURE__ */
|
|
776
776
|
return bl.jsxs(r,{...e,className:"pl-6",children:[
|
|
777
|
-
/* @__PURE__ */bl.jsx(Vl,{size:"icon",variant:"ghost",className:"-left-0.5 absolute top-0 size-6 cursor-pointer select-none items-center justify-center rounded-md p-px text-muted-foreground transition-colors hover:bg-accent [&_svg]:size-4",contentEditable:!1,...n,children:/* @__PURE__ */bl.jsx(ss,{className:o?"rotate-90 transition-transform duration-75":"rotate-0 transition-transform duration-75"})}),e.children]})})],th=[...zl,...Gi,...Qm,...eh,...Xm,...Gu,...Oi,...ac,...ku,...pc,...pu,...cm,...Sl,...iu,...ju,...jl,...cu,...ic,...Rm,...um,...kl,...uc,...Ll,...kc,...Cc,ae,...Nc,...vu,...Pl,...su,...au];function rh({initialValue:
|
|
778
|
-
return bl.jsx("div",{className:"h-screen w-full bg-white rounded-sm border-1",children:/* @__PURE__ */bl.jsx(O,{editor:r,onChange:({value:e})=>{t?.(e)},children:/* @__PURE__ */bl.jsx(bm,{children:/* @__PURE__ */bl.jsx(vm,{variant:"fullWidth"})})})})}const sh=[Aa.configure({inject:{nodeProps:{defaultNodeValue:"start",nodeKey:"align",styleKey:"textAlign",validNodeValues:["start","left","center","right","end","justify"]},targetPlugins:[...q.heading,q.p,q.img,q.mediaEmbed]}})];const nh=tt("relative mb-1",{variants:{variant:{h1:"mt-[1.6em] pb-1 font-bold font-heading text-4xl",h2:"mt-[1.4em] pb-px font-heading font-semibold text-2xl tracking-tight",h3:"mt-[1em] pb-px font-heading font-semibold text-xl tracking-tight",h4:"mt-[0.75em] font-heading font-semibold text-lg tracking-tight",h5:"mt-[0.75em] font-semibold text-lg tracking-tight",h6:"mt-[0.75em] font-semibold text-base tracking-tight"}}});function oh({variant:e="h1",...t}){/* @__PURE__ */
|
|
777
|
+
/* @__PURE__ */bl.jsx(Vl,{size:"icon",variant:"ghost",className:"-left-0.5 absolute top-0 size-6 cursor-pointer select-none items-center justify-center rounded-md p-px text-muted-foreground transition-colors hover:bg-accent [&_svg]:size-4",contentEditable:!1,...n,children:/* @__PURE__ */bl.jsx(ss,{className:o?"rotate-90 transition-transform duration-75":"rotate-0 transition-transform duration-75"})}),e.children]})})],th=[...zl,...Gi,...Qm,...eh,...Xm,...Gu,...Oi,...ac,...ku,...pc,...pu,...cm,...Sl,...iu,...ju,...jl,...cu,...ic,...Rm,...um,...kl,...uc,...Ll,...kc,...Cc,ae,...Nc,...vu,...Pl,...su,...au];function rh({initialValue:t,onChange:r,mode:s="draft"}){const n=R({plugins:th,value:t});return e.useEffect(()=>{n.setOption(Yn,"isSuggesting","draft"===s)},[n,s]),/* @__PURE__ */bl.jsx("div",{className:"h-screen w-full bg-white rounded-sm border-1",children:/* @__PURE__ */bl.jsx(O,{editor:n,onChange:({value:e})=>{console.log(e),r?.(e)},children:/* @__PURE__ */bl.jsx(bm,{children:/* @__PURE__ */bl.jsx(vm,{variant:"fullWidth"})})})})}const sh=[Aa.configure({inject:{nodeProps:{defaultNodeValue:"start",nodeKey:"align",styleKey:"textAlign",validNodeValues:["start","left","center","right","end","justify"]},targetPlugins:[...q.heading,q.p,q.img,q.mediaEmbed]}})];const nh=tt("relative mb-1",{variants:{variant:{h1:"mt-[1.6em] pb-1 font-bold font-heading text-4xl",h2:"mt-[1.4em] pb-px font-heading font-semibold text-2xl tracking-tight",h3:"mt-[1em] pb-px font-heading font-semibold text-xl tracking-tight",h4:"mt-[0.75em] font-heading font-semibold text-lg tracking-tight",h5:"mt-[0.75em] font-semibold text-lg tracking-tight",h6:"mt-[0.75em] font-semibold text-base tracking-tight"}}});function oh({variant:e="h1",...t}){/* @__PURE__ */
|
|
779
778
|
return bl.jsx(el,{as:e,className:nh({variant:e}),...t,children:t.children})}const ah=[le.withComponent(function(e){/* @__PURE__ */
|
|
780
779
|
return bl.jsx(el,{...e,className:_l("m-0 px-0 py-1"),children:e.children})}),Ma.withComponent(function(e){/* @__PURE__ */
|
|
781
780
|
return bl.jsx(oh,{variant:"h1",...e})}),Fa.withComponent(function(e){/* @__PURE__ */
|