@measured/puck-plugin-heading-analyzer 0.21.0-canary.3aa27d1d → 0.21.0-canary.501341c5

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/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReactElement, CSSProperties, ReactNode, ElementType, JSX } from 'react';
1
+ import { ReactElement, CSSProperties, ReactNode, ElementType, Ref, JSX } from 'react';
2
2
  import { EditorStateSnapshot, Editor, Extensions } from '@tiptap/react';
3
3
  import { BlockquoteOptions } from '@tiptap/extension-blockquote';
4
4
  import { BoldOptions } from '@tiptap/extension-bold';
@@ -80,7 +80,7 @@ declare const defaultEditorState: (ctx: EditorStateSnapshot, readOnly: boolean)
80
80
 
81
81
  type RichTextSelector = (ctx: EditorStateSnapshot, readOnly: boolean) => Partial<Record<string, boolean>>;
82
82
  type DefaultEditorState = ReturnType<typeof defaultEditorState>;
83
- type EditorState<Selector extends RichTextSelector = RichTextSelector> = DefaultEditorState & Selector;
83
+ type EditorState<Selector extends RichTextSelector = RichTextSelector> = DefaultEditorState & ReturnType<Selector> & Record<string, boolean | undefined>;
84
84
 
85
85
  interface PuckRichTextOptions {
86
86
  /**
@@ -223,14 +223,14 @@ interface RichtextField<UserSelector extends RichTextSelector = RichTextSelector
223
223
  options?: Partial<PuckRichTextOptions>;
224
224
  renderMenu?: (props: {
225
225
  children: ReactNode;
226
- editor: Editor;
227
- editorState: EditorState<UserSelector>;
226
+ editor: Editor | null;
227
+ editorState: EditorState<UserSelector> | null;
228
228
  readOnly: boolean;
229
229
  }) => ReactNode;
230
230
  renderInlineMenu?: (props: {
231
231
  children: ReactNode;
232
- editor: Editor;
233
- editorState: EditorState<UserSelector>;
232
+ editor: Editor | null;
233
+ editorState: EditorState<UserSelector> | null;
234
234
  readOnly: boolean;
235
235
  }) => ReactNode;
236
236
  tiptap?: {
@@ -347,6 +347,7 @@ type DropZoneProps = {
347
347
  className?: string;
348
348
  collisionAxis?: DragAxis;
349
349
  as?: ElementType;
350
+ ref?: Ref<any>;
350
351
  };
351
352
 
352
353
  type PuckContext = {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReactElement, CSSProperties, ReactNode, ElementType, JSX } from 'react';
1
+ import { ReactElement, CSSProperties, ReactNode, ElementType, Ref, JSX } from 'react';
2
2
  import { EditorStateSnapshot, Editor, Extensions } from '@tiptap/react';
3
3
  import { BlockquoteOptions } from '@tiptap/extension-blockquote';
4
4
  import { BoldOptions } from '@tiptap/extension-bold';
@@ -80,7 +80,7 @@ declare const defaultEditorState: (ctx: EditorStateSnapshot, readOnly: boolean)
80
80
 
81
81
  type RichTextSelector = (ctx: EditorStateSnapshot, readOnly: boolean) => Partial<Record<string, boolean>>;
82
82
  type DefaultEditorState = ReturnType<typeof defaultEditorState>;
83
- type EditorState<Selector extends RichTextSelector = RichTextSelector> = DefaultEditorState & Selector;
83
+ type EditorState<Selector extends RichTextSelector = RichTextSelector> = DefaultEditorState & ReturnType<Selector> & Record<string, boolean | undefined>;
84
84
 
85
85
  interface PuckRichTextOptions {
86
86
  /**
@@ -223,14 +223,14 @@ interface RichtextField<UserSelector extends RichTextSelector = RichTextSelector
223
223
  options?: Partial<PuckRichTextOptions>;
224
224
  renderMenu?: (props: {
225
225
  children: ReactNode;
226
- editor: Editor;
227
- editorState: EditorState<UserSelector>;
226
+ editor: Editor | null;
227
+ editorState: EditorState<UserSelector> | null;
228
228
  readOnly: boolean;
229
229
  }) => ReactNode;
230
230
  renderInlineMenu?: (props: {
231
231
  children: ReactNode;
232
- editor: Editor;
233
- editorState: EditorState<UserSelector>;
232
+ editor: Editor | null;
233
+ editorState: EditorState<UserSelector> | null;
234
234
  readOnly: boolean;
235
235
  }) => ReactNode;
236
236
  tiptap?: {
@@ -347,6 +347,7 @@ type DropZoneProps = {
347
347
  className?: string;
348
348
  collisionAxis?: DragAxis;
349
349
  as?: ElementType;
350
+ ref?: Ref<any>;
350
351
  };
351
352
 
352
353
  type PuckContext = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck-plugin-heading-analyzer",
3
- "version": "0.21.0-canary.3aa27d1d",
3
+ "version": "0.21.0-canary.501341c5",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",
@@ -25,7 +25,7 @@
25
25
  "dist"
26
26
  ],
27
27
  "devDependencies": {
28
- "@measured/puck": "^0.21.0-canary.3aa27d1d",
28
+ "@measured/puck": "^0.21.0-canary.501341c5",
29
29
  "@types/minimatch": "3.0.5",
30
30
  "@types/react": "^19.0.1",
31
31
  "@types/react-dom": "^19.0.2",