@octanejs/lexical 0.1.11 → 0.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/lexical",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -104,20 +104,20 @@
104
104
  "@lexical/utils": "0.46.0",
105
105
  "@lexical/yjs": "0.46.0",
106
106
  "lexical": "0.46.0",
107
- "yjs": "^13.6.0",
108
- "@octanejs/floating-ui": "0.1.11"
107
+ "yjs": "^13.6.31",
108
+ "@octanejs/floating-ui": "0.1.12"
109
109
  },
110
110
  "peerDependencies": {
111
- "octane": "0.1.12"
111
+ "octane": "0.1.13"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@lexical/react": "0.46.0",
115
- "@tsrx/react": "^0.2.44",
115
+ "@tsrx/react": "^0.2.46",
116
116
  "esbuild": "^0.28.1",
117
- "react": "^19.2.0",
118
- "react-dom": "^19.2.0",
119
- "vitest": "^4.1.9",
120
- "octane": "0.1.12"
117
+ "react": "^19.2.7",
118
+ "react-dom": "^19.2.7",
119
+ "vitest": "^4.1.10",
120
+ "octane": "0.1.13"
121
121
  },
122
122
  "scripts": {
123
123
  "test": "vitest run"
@@ -29,7 +29,9 @@ type LexicalAutoEmbedPluginProps<TEmbedConfig extends EmbedConfig> = {
29
29
  menuCommandPriority?: CommandListenerPriority;
30
30
  };
31
31
 
32
- export function LexicalAutoEmbedPlugin<TEmbedConfig extends EmbedConfig>(props: LexicalAutoEmbedPluginProps<TEmbedConfig>) {
32
+ export function LexicalAutoEmbedPlugin<TEmbedConfig extends EmbedConfig>(
33
+ props: LexicalAutoEmbedPluginProps<TEmbedConfig>,
34
+ ) {
33
35
  const embedConfigs = props.embedConfigs;
34
36
  const onOpenEmbedModalForConfig = props.onOpenEmbedModalForConfig;
35
37
  const getMenuOptions = props.getMenuOptions;
@@ -21,7 +21,8 @@ import type { ElementFormatType, NodeKey } from 'lexical';
21
21
  import { useEffect, useRef } from 'octane';
22
22
  import type { OctaneNode } from 'octane';
23
23
 
24
- type Props = Readonly<{
24
+ type Props =
25
+ Readonly<{
25
26
  children: OctaneNode;
26
27
  format?: ElementFormatType | null;
27
28
  nodeKey: NodeKey;
@@ -36,9 +36,7 @@ type RendererProps = {
36
36
  function DefaultRenderer(props: RendererProps) @{
37
37
  <span
38
38
  class={'characters-limit ' + (props.remainingCharacters < 0 ? 'characters-limit-exceeded' : '')}
39
- >
40
- {props.remainingCharacters as unknown as string}
41
- </span>
39
+ >{props.remainingCharacters as unknown as string}</span>
42
40
  }
43
41
 
44
42
  type Props = {
@@ -4,7 +4,8 @@ import { useLexicalComposerContext } from './LexicalComposerContext';
4
4
  import { registerClearEditor } from '@lexical/extension';
5
5
  import { useLayoutEffect } from 'octane';
6
6
 
7
- type Props = Readonly<{
7
+ type Props =
8
+ Readonly<{
8
9
  onClear?: () => void;
9
10
  }>;
10
11
 
@@ -29,7 +29,8 @@ const HR: ElementTransformer = {
29
29
 
30
30
  export const DEFAULT_TRANSFORMERS: Transformer[] = [HR, ...TRANSFORMERS];
31
31
 
32
- type Props = Readonly<{
32
+ type Props =
33
+ Readonly<{
33
34
  transformers?: Transformer[];
34
35
  }>;
35
36
 
@@ -113,7 +113,8 @@ interface Props {
113
113
  // item-only fields are optional (`type` is a plain string, so the union does not
114
114
  // discriminate), plus the item's resolved getItemProps() bag —
115
115
  // `Record<string, unknown>`, the @octanejs/floating-ui prop-getter return type.
116
- type ContextMenuListItem = MenuSeparatorType & {
116
+ type ContextMenuListItem =
117
+ MenuSeparatorType & {
117
118
  disabled?: boolean;
118
119
  icon?: OctaneNode | null;
119
120
  label?: string;
@@ -143,9 +144,7 @@ function ContextMenuList(props: ContextMenuListProps) @{
143
144
  @if (item.type === 'item') {
144
145
  <button {...item.itemProps} class={item.className} role="menuitem" disabled={item.disabled}>
145
146
  {item.icon}
146
- <span>
147
- {item.label as string}
148
- </span>
147
+ <span>{item.label as string}</span>
149
148
  </button>
150
149
  } @else {
151
150
  <hr {...item.itemProps} class={item.className} />
@@ -26,7 +26,9 @@ export type NodeMenuPluginProps<TOption extends MenuOption> = {
26
26
  parent?: HTMLElement;
27
27
  };
28
28
 
29
- export function LexicalNodeMenuPlugin<TOption extends MenuOption>(props: NodeMenuPluginProps<TOption>) {
29
+ export function LexicalNodeMenuPlugin<TOption extends MenuOption>(
30
+ props: NodeMenuPluginProps<TOption>,
31
+ ) {
30
32
  const options = props.options;
31
33
  const nodeKey = props.nodeKey;
32
34
  const onClose = props.onClose;
@@ -9,7 +9,8 @@ import type { OctaneNode } from 'octane';
9
9
 
10
10
  // Octane analog of @lexical/react's ErrorBoundaryType (a component taking the
11
11
  // decorator subtree plus an onError callback).
12
- type ErrorBoundaryType = (props: {
12
+ type ErrorBoundaryType =
13
+ (props: {
13
14
  children: OctaneNode;
14
15
  onError: (error: Error) => void;
15
16
  }) => OctaneNode;
@@ -11,7 +11,8 @@ import type { OctaneNode } from 'octane';
11
11
 
12
12
  // Octane analog of @lexical/react's ErrorBoundaryType (a component taking the
13
13
  // decorator subtree plus an onError callback).
14
- type ErrorBoundaryType = (props: {
14
+ type ErrorBoundaryType =
15
+ (props: {
15
16
  children: OctaneNode;
16
17
  onError: (error: Error) => void;
17
18
  }) => OctaneNode;
@@ -3,7 +3,8 @@ import { selectionAlwaysOnDisplay } from '@lexical/utils';
3
3
  import { useLexicalComposerContext } from './LexicalComposerContext';
4
4
  import { useEffect } from 'octane';
5
5
 
6
- type Props = Readonly<{
6
+ type Props =
7
+ Readonly<{
7
8
  onReposition?: (node: readonly HTMLElement[]) => void;
8
9
  }>;
9
10
 
@@ -40,7 +40,9 @@ export type TypeaheadMenuPluginProps<TOption extends MenuOption> = {
40
40
  ignoreEntityBoundary?: boolean;
41
41
  };
42
42
 
43
- export function LexicalTypeaheadMenuPlugin<TOption extends MenuOption>(props: TypeaheadMenuPluginProps<TOption>) {
43
+ export function LexicalTypeaheadMenuPlugin<TOption extends MenuOption>(
44
+ props: TypeaheadMenuPluginProps<TOption>,
45
+ ) {
44
46
  const options = props.options;
45
47
  const onQueryChange = props.onQueryChange;
46
48
  const onSelectOption = props.onSelectOption;
@@ -20,7 +20,8 @@ type DivAttributes = Octane.HTMLAttributes<HTMLDivElement>;
20
20
  * set ARIA properties. The camelCase `aria*` props (such as `ariaLabel`) are
21
21
  * also accepted but are retained only for backwards compatibility.
22
22
  */
23
- export type ContentEditableElementProps = {
23
+ export type ContentEditableElementProps =
24
+ {
24
25
  editor: LexicalEditor;
25
26
  ariaActiveDescendant?: DivAttributes['aria-activedescendant'];
26
27
  ariaAutoComplete?: DivAttributes['aria-autocomplete'];
@@ -21,7 +21,8 @@ import {
21
21
  Suspense,
22
22
  } from 'octane';
23
23
 
24
- type ErrorBoundaryType = (props: {
24
+ type ErrorBoundaryType =
25
+ (props: {
25
26
  children: OctaneNode;
26
27
  onError: (error: Error) => void;
27
28
  }) => OctaneNode;
package/src/types.ts CHANGED
@@ -12,10 +12,7 @@ import type {
12
12
  // tsgo treats as `any` via the ambient module — so the typed surface lives here).
13
13
 
14
14
  export type InitialEditorStateType =
15
- | null
16
- | string
17
- | EditorState
18
- | ((editor: LexicalEditor) => void);
15
+ null | string | EditorState | ((editor: LexicalEditor) => void);
19
16
 
20
17
  export type InitialConfigType = Readonly<{
21
18
  namespace: string;