@oakjs/addon-lexical 0.0.0-stage → 4.0.0-alpha.0
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/README.md +125 -2
- package/dist/addons-DQNB8pRc.js +1365 -0
- package/dist/addons-DQNB8pRc.js.map +1 -0
- package/dist/addons-Pp5mwM60.cjs +1406 -0
- package/dist/addons-Pp5mwM60.cjs.map +1 -0
- package/dist/addons.cjs +5 -0
- package/dist/addons.js +2 -0
- package/dist/index.cjs +10 -0
- package/dist/index.js +2 -0
- package/dist/oak-addon-lexical.min.css +2 -0
- package/dist/oak-addon-lexical.min.css.map +1 -0
- package/dist/types/Field/ColorDropdown.d.ts +9 -0
- package/dist/types/Field/ColorDropdown.d.ts.map +1 -0
- package/dist/types/Field/Cursors.d.ts +24 -0
- package/dist/types/Field/Cursors.d.ts.map +1 -0
- package/dist/types/Field/Icon.d.ts +14 -0
- package/dist/types/Field/Icon.d.ts.map +1 -0
- package/dist/types/Field/LinkDropdown.d.ts +9 -0
- package/dist/types/Field/LinkDropdown.d.ts.map +1 -0
- package/dist/types/Field/MenuItem.d.ts +10 -0
- package/dist/types/Field/MenuItem.d.ts.map +1 -0
- package/dist/types/Field/SyncPlugin.d.ts +17 -0
- package/dist/types/Field/SyncPlugin.d.ts.map +1 -0
- package/dist/types/Field/TableSizePicker.d.ts +11 -0
- package/dist/types/Field/TableSizePicker.d.ts.map +1 -0
- package/dist/types/Field/Toolbar.d.ts +12 -0
- package/dist/types/Field/Toolbar.d.ts.map +1 -0
- package/dist/types/Field/ToolbarButton.d.ts +11 -0
- package/dist/types/Field/ToolbarButton.d.ts.map +1 -0
- package/dist/types/Field/ToolbarDropdown.d.ts +21 -0
- package/dist/types/Field/ToolbarDropdown.d.ts.map +1 -0
- package/dist/types/Field/context.d.ts +16 -0
- package/dist/types/Field/context.d.ts.map +1 -0
- package/dist/types/Field/html.d.ts +17 -0
- package/dist/types/Field/html.d.ts.map +1 -0
- package/dist/types/Field/index.d.ts +21 -0
- package/dist/types/Field/index.d.ts.map +1 -0
- package/dist/types/Field/measure.d.ts +12 -0
- package/dist/types/Field/measure.d.ts.map +1 -0
- package/dist/types/Field/positions.d.ts +24 -0
- package/dist/types/Field/positions.d.ts.map +1 -0
- package/dist/types/Field/testUtils.d.ts +3 -0
- package/dist/types/Field/testUtils.d.ts.map +1 -0
- package/dist/types/Field/theme.d.ts +7 -0
- package/dist/types/Field/theme.d.ts.map +1 -0
- package/dist/types/Field/types.d.ts +19 -0
- package/dist/types/Field/types.d.ts.map +1 -0
- package/dist/types/Field/useToolbarState.d.ts +22 -0
- package/dist/types/Field/useToolbarState.d.ts.map +1 -0
- package/dist/types/addons.d.ts +12 -0
- package/dist/types/addons.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types.d.ts +20 -0
- package/dist/types/types.d.ts.map +1 -0
- package/package.json +84 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { type FieldContent } from '@junipero/react';
|
|
3
|
+
import type { FieldOptions, LexicalFontSize, LexicalToolbarItem } from '../types';
|
|
4
|
+
export declare const DEFAULT_TOOLBAR: LexicalToolbarItem[];
|
|
5
|
+
export interface LexicalFieldProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
6
|
+
/** Html content */
|
|
7
|
+
value?: string;
|
|
8
|
+
/** Toolbar items (see `DEFAULT_TOOLBAR`) */
|
|
9
|
+
toolbar?: LexicalToolbarItem[];
|
|
10
|
+
/** Sizes of the font size menu (see `DEFAULT_FONT_SIZES`) */
|
|
11
|
+
fontSizes?: LexicalFontSize[];
|
|
12
|
+
/** Given by oak builders (translations, dropdowns container...) */
|
|
13
|
+
fieldOptions?: FieldOptions;
|
|
14
|
+
onChange?(field: FieldContent<string>): void;
|
|
15
|
+
}
|
|
16
|
+
declare function LexicalField({ className, value, toolbar, fontSizes, fieldOptions, onChange, ...rest }: LexicalFieldProps): import("react").JSX.Element;
|
|
17
|
+
declare namespace LexicalField {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
export default LexicalField;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/Field/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAK9B,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAE,KAAK,YAAY,EAAc,MAAM,iBAAiB,CAAC;AAEhE,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EACnB,MAAM,UAAU,CAAC;AASlB,eAAO,MAAM,eAAe,EAAE,kBAAkB,EAuB/C,CAAC;AAeF,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACzD,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC/B,6DAA6D;IAC7D,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B,mEAAmE;IACnE,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,CAAC,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAC9C;8BAEqB,EACpB,SAAS,EACT,KAAK,EACL,OAAyB,EACzB,SAA8B,EAC9B,YAAY,EACZ,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,iBAAiB;;;;eAqEL,YAAY"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type LexicalEditor } from 'lexical';
|
|
2
|
+
import type { FieldSelection } from './types';
|
|
3
|
+
import type { FieldCursorRect } from './Cursors';
|
|
4
|
+
/**
|
|
5
|
+
* Measures where a selection (offsets, see `positions.ts`) is displayed in
|
|
6
|
+
* the editor, relative to `container`
|
|
7
|
+
*/
|
|
8
|
+
export declare const measureSelection: (editor: LexicalEditor, container: HTMLElement, { anchor, head }: FieldSelection) => {
|
|
9
|
+
caret: FieldCursorRect | null;
|
|
10
|
+
selection: FieldCursorRect[];
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=measure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../../lib/Field/measure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,SAAS,CAAC;AAG5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,WACnB,aAAa,aACV,WAAW,oBACJ,cAAc,KAC/B;IAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAAC,SAAS,EAAE,eAAe,EAAE,CAAA;CAuD/D,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type PointType } from 'lexical';
|
|
2
|
+
/** Linear representation of the document */
|
|
3
|
+
export declare const $serialize: () => string;
|
|
4
|
+
/** Offset of a selection point */
|
|
5
|
+
export declare const $getPointOffset: (point: PointType) => number;
|
|
6
|
+
export declare interface PointLocation {
|
|
7
|
+
key: string;
|
|
8
|
+
offset: number;
|
|
9
|
+
type: 'text' | 'element';
|
|
10
|
+
}
|
|
11
|
+
/** Selection point at an offset (clamped to the document) */
|
|
12
|
+
export declare const $getPointAt: (offset: number) => PointLocation;
|
|
13
|
+
/**
|
|
14
|
+
* Where a position ends up when `a` is changed into `b` (a single contiguous
|
|
15
|
+
* change between the common prefix & suffix)
|
|
16
|
+
*/
|
|
17
|
+
export declare const mapPosition: (position: number, a: string, b: string) => number;
|
|
18
|
+
export declare interface SavedSelection {
|
|
19
|
+
text: string;
|
|
20
|
+
anchor: number;
|
|
21
|
+
focus: number;
|
|
22
|
+
}
|
|
23
|
+
export declare const $selectOffsets: (anchor: number, focus: number) => void;
|
|
24
|
+
//# sourceMappingURL=positions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positions.d.ts","sourceRoot":"","sources":["../../../lib/Field/positions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EAOf,MAAM,SAAS,CAAC;AAwCjB,4CAA4C;AAC5C,eAAO,MAAM,UAAU,cACgC,CAAC;AAExD,kCAAkC;AAClC,eAAO,MAAM,eAAe,UAAW,SAAS,WA6B/C,CAAC;AAEF,MAAM,CAAC,OAAO,WAAW,aAAa;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AA4BD,6DAA6D;AAC7D,eAAO,MAAM,WAAW,WAAY,MAAM,kBACG,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,WAAW,aAAc,MAAM,KAAK,MAAM,KAAK,MAAM,WAyBjE,CAAC;AAEF,MAAM,CAAC,OAAO,WAAW,cAAc;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,cAAc,WAAY,MAAM,SAAS,MAAM,SAO3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testUtils.d.ts","sourceRoot":"","sources":["../../../lib/Field/testUtils.ts"],"names":[],"mappings":"AAUA,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,oDAe5B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditorThemeClasses } from 'lexical';
|
|
2
|
+
/**
|
|
3
|
+
* Classes used to display the content inside the editor. They're removed from
|
|
4
|
+
* the html given to `onChange`, which only relies on tags & inline styles.
|
|
5
|
+
*/
|
|
6
|
+
export declare const theme: EditorThemeClasses;
|
|
7
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../lib/Field/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,kBAiCnB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** A selection inside a field (a caret when `anchor === head`) */
|
|
2
|
+
export declare interface FieldSelection {
|
|
3
|
+
anchor: number;
|
|
4
|
+
head: number;
|
|
5
|
+
}
|
|
6
|
+
/** Another user whose cursor is in the field */
|
|
7
|
+
export declare interface FieldCollaborator extends FieldSelection {
|
|
8
|
+
id: string | number;
|
|
9
|
+
name?: string;
|
|
10
|
+
/** Css color */
|
|
11
|
+
color: string;
|
|
12
|
+
}
|
|
13
|
+
export declare interface CollaborationFieldOptions {
|
|
14
|
+
/** Other users whose cursor is in this field */
|
|
15
|
+
collaborators?: FieldCollaborator[];
|
|
16
|
+
/** Shares the local selection with the other users (`null` on blur) */
|
|
17
|
+
onSelectionChange?(selection: FieldSelection | null): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/Field/types.ts"],"names":[],"mappings":"AAKA,kEAAkE;AAClE,MAAM,CAAC,OAAO,WAAW,cAAc;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gDAAgD;AAChD,MAAM,CAAC,OAAO,WAAW,iBAAkB,SAAQ,cAAc;IAC/D,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,yBAAyB;IAChD,gDAAgD;IAChD,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACpC,uEAAuE;IACvE,iBAAiB,CAAC,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,GAAG,IAAI,CAAC;CAC5D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ElementFormatType, type LexicalEditor } from 'lexical';
|
|
2
|
+
export declare interface ToolbarState {
|
|
3
|
+
bold: boolean;
|
|
4
|
+
italic: boolean;
|
|
5
|
+
underline: boolean;
|
|
6
|
+
strikethrough: boolean;
|
|
7
|
+
link: {
|
|
8
|
+
url: string;
|
|
9
|
+
target: string | null;
|
|
10
|
+
} | null;
|
|
11
|
+
color: string;
|
|
12
|
+
fontSize: string;
|
|
13
|
+
/** `paragraph`, `quote`, `bullet`, `number`, `h1`...`h6` */
|
|
14
|
+
block: string;
|
|
15
|
+
align: ElementFormatType;
|
|
16
|
+
inTable: boolean;
|
|
17
|
+
canUndo: boolean;
|
|
18
|
+
canRedo: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** State of the toolbar buttons, updated with the editor */
|
|
21
|
+
export declare const useToolbarState: (editor: LexicalEditor) => ToolbarState;
|
|
22
|
+
//# sourceMappingURL=useToolbarState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToolbarState.d.ts","sourceRoot":"","sources":["../../../lib/Field/useToolbarState.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAOnB,MAAM,SAAS,CAAC;AAQjB,MAAM,CAAC,OAAO,WAAW,YAAY;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAuDD,4DAA4D;AAC5D,eAAO,MAAM,eAAe,WAAY,aAAa,iBAqBpD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AddonObject, FieldObject } from '@oakjs/core';
|
|
2
|
+
import Field, { type LexicalFieldProps } from './Field';
|
|
3
|
+
/**
|
|
4
|
+
* Works with every oak builder (`@oakjs/react`, `@oakjs/ash`)
|
|
5
|
+
*/
|
|
6
|
+
export declare interface LexicalFieldObject extends FieldObject {
|
|
7
|
+
render: typeof Field;
|
|
8
|
+
}
|
|
9
|
+
export declare type LexicalFieldAddonProps = Pick<LexicalFieldProps, 'toolbar' | 'fontSizes'> & Partial<Omit<FieldObject, 'render' | 'props'>>;
|
|
10
|
+
export declare const lexicalField: ({ toolbar, fontSizes, ...props }?: LexicalFieldAddonProps) => LexicalFieldObject;
|
|
11
|
+
export declare const lexicalFieldAddon: (props?: LexicalFieldAddonProps) => AddonObject;
|
|
12
|
+
//# sourceMappingURL=addons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addons.d.ts","sourceRoot":"","sources":["../../lib/addons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG5D,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAExD;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,kBAAmB,SAAQ,WAAW;IAC7D,MAAM,EAAE,OAAO,KAAK,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,MAAM,sBAAsB,GAAG,IAAI,CAC/C,iBAAiB,EAAE,SAAS,GAAG,WAAW,CAC3C,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC;AAEnD,eAAO,MAAM,YAAY,sCAItB,sBAAsB,KAAQ,kBAQ/B,CAAC;AAEH,eAAO,MAAM,iBAAiB,WACpB,sBAAsB,KAC7B,WAED,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as LexicalField, type LexicalFieldProps, DEFAULT_TOOLBAR, } from './Field';
|
|
2
|
+
export { DEFAULT_FONT_SIZES } from './Field/Toolbar';
|
|
3
|
+
export { $exportHtml, $importHtml } from './Field/html';
|
|
4
|
+
export * from './addons';
|
|
5
|
+
export type * from './types';
|
|
6
|
+
export type * from './Field/types';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,KAAK,iBAAiB,EACtB,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAExD,cAAc,UAAU,CAAC;AAEzB,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,eAAe,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CollaborationFieldOptions } from './Field/types';
|
|
2
|
+
export type GetTextCallback = (key: string, def?: string) => string;
|
|
3
|
+
/**
|
|
4
|
+
* Options given to fields by oak builders (`@oakjs/react`, `@oakjs/ash`)
|
|
5
|
+
*/
|
|
6
|
+
export declare interface FieldOptions extends CollaborationFieldOptions {
|
|
7
|
+
t?: GetTextCallback;
|
|
8
|
+
floatingsRef?: {
|
|
9
|
+
current?: HTMLElement | null;
|
|
10
|
+
};
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
/** Toolbar items, in the same spirit as CKEditor's (`|` is a separator) */
|
|
14
|
+
export declare type LexicalToolbarItem = '|' | 'undo' | 'redo' | 'heading' | 'bold' | 'italic' | 'strikethrough' | 'underline' | 'link' | 'fontColor' | 'fontSize' | 'bulletedList' | 'numberedList' | 'removeFormat' | 'outdent' | 'indent' | 'alignment' | 'horizontalLine' | 'blockQuote' | 'insertTable';
|
|
15
|
+
export declare interface LexicalFontSize {
|
|
16
|
+
label: string;
|
|
17
|
+
/** Any css font size, `null` removes the font size */
|
|
18
|
+
value: string | null;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;AAEpE;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,yBAAyB;IACrE,CAAC,CAAC,EAAE,eAAe,CAAC;IACpB,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;KAAE,CAAC;IAChD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,2EAA2E;AAC3E,MAAM,CAAC,OAAO,MAAM,kBAAkB,GAClC,GAAG,GACH,MAAM,GACN,MAAM,GACN,SAAS,GACT,MAAM,GACN,QAAQ,GACR,eAAe,GACf,WAAW,GACX,MAAM,GACN,WAAW,GACX,UAAU,GACV,cAAc,GACd,cAAc,GACd,cAAc,GACd,SAAS,GACT,QAAQ,GACR,WAAW,GACX,gBAAgB,GAChB,YAAY,GACZ,aAAa,CAAC;AAElB,MAAM,CAAC,OAAO,WAAW,eAAe;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,86 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oakjs/addon-lexical",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "4.0.0-alpha.0",
|
|
4
|
+
"description": "🌳 Lexical rich text field for oak",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/types/index.d.ts",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/p3ol/oak.git",
|
|
12
|
+
"directory": "packages/addon-lexical"
|
|
13
|
+
},
|
|
14
|
+
"author": "Ugo Stephant <ugo@poool.fr>",
|
|
15
|
+
"contributors": [
|
|
16
|
+
"Maxime Da Silva <maximed@poool.fr>"
|
|
17
|
+
],
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"*.css"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">= 20"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"@junipero/react": "^3.0.0",
|
|
27
|
+
"@lexical/html": "^0.53.0",
|
|
28
|
+
"@lexical/link": "^0.53.0",
|
|
29
|
+
"@lexical/list": "^0.53.0",
|
|
30
|
+
"@lexical/react": "^0.53.0",
|
|
31
|
+
"@lexical/rich-text": "^0.53.0",
|
|
32
|
+
"@lexical/selection": "^0.53.0",
|
|
33
|
+
"@lexical/table": "^0.53.0",
|
|
34
|
+
"@lexical/utils": "^0.53.0",
|
|
35
|
+
"@oakjs/core": "^3.0.0",
|
|
36
|
+
"lexical": "^0.53.0",
|
|
37
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
38
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@lexical/html": "0.53.0",
|
|
42
|
+
"@lexical/link": "0.53.0",
|
|
43
|
+
"@lexical/list": "0.53.0",
|
|
44
|
+
"@lexical/react": "0.53.0",
|
|
45
|
+
"@lexical/rich-text": "0.53.0",
|
|
46
|
+
"@lexical/selection": "0.53.0",
|
|
47
|
+
"@lexical/table": "0.53.0",
|
|
48
|
+
"@lexical/utils": "0.53.0",
|
|
49
|
+
"@oakjs/core": "workspace:*",
|
|
50
|
+
"lexical": "0.53.0"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"clean": "rm -rf ./dist || true",
|
|
54
|
+
"build": "yarn clean && yarn build:code && yarn build:dts && yarn build:styles",
|
|
55
|
+
"build:code": "yarn run -T tsdown",
|
|
56
|
+
"build:dts": "yarn run -T tsc --project ./tsconfig.build.json",
|
|
57
|
+
"build:styles": "node --import=tsx ../../scripts/build-css.ts --sass ./lib/index.sass ./dist/oak-addon-lexical.min.css"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"exports": {
|
|
63
|
+
".": {
|
|
64
|
+
"types": "./dist/types/index.d.ts",
|
|
65
|
+
"import": "./dist/index.js",
|
|
66
|
+
"require": "./dist/index.cjs"
|
|
67
|
+
},
|
|
68
|
+
"./addons": {
|
|
69
|
+
"types": "./dist/types/addons.d.ts",
|
|
70
|
+
"import": "./dist/addons.js",
|
|
71
|
+
"require": "./dist/addons.cjs"
|
|
72
|
+
},
|
|
73
|
+
"./dist/*": "./dist/*"
|
|
74
|
+
},
|
|
75
|
+
"files": [
|
|
76
|
+
"dist"
|
|
77
|
+
],
|
|
78
|
+
"targets": [
|
|
79
|
+
"chrome109",
|
|
80
|
+
"edge138",
|
|
81
|
+
"firefox140",
|
|
82
|
+
"safari18",
|
|
83
|
+
"opera80",
|
|
84
|
+
"node20"
|
|
85
|
+
]
|
|
86
|
+
}
|