@lyfie/luthor 2.3.2 → 2.3.4
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 +49 -290
- package/package.json +11 -50
package/README.md
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/lyfie-app/luthor/main/apps/web/public/luthor-logo-horizontal.png" alt="Luthor" width="360" />
|
|
3
|
+
<h1>@lyfie/luthor</h1>
|
|
4
|
+
<p><strong>Plug-and-play rich text editor presets for React, powered by Luthor Headless + Lexical.</strong></p>
|
|
5
|
+
</div>
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
<div align="center">
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
[](https://www.npmjs.com/package/@lyfie/luthor)
|
|
10
|
+
[](https://www.npmjs.com/package/@lyfie/luthor)
|
|
11
|
+
[](https://bundlephobia.com/package/@lyfie/luthor)
|
|
12
|
+
[](https://www.npmjs.com/package/@lyfie/luthor)
|
|
13
|
+
[](https://github.com/lyfie-app/luthor/blob/main/LICENSE)
|
|
14
|
+
[](https://github.com/lyfie-app/luthor/commits/main)
|
|
6
15
|
|
|
7
|
-
|
|
8
|
-
- Reuses headless behavior APIs instead of re-implementing Lexical semantics.
|
|
9
|
-
- Exposes headless namespace for advanced users who need lower-level control.
|
|
16
|
+
</div>
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
<p align="center">
|
|
19
|
+
:rocket: Ship fast | :control_knobs: Customize deeply | :white_check_mark: Production-ready presets
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
## Install
|
|
12
23
|
|
|
13
24
|
```bash
|
|
14
25
|
pnpm add @lyfie/luthor react react-dom
|
|
15
26
|
```
|
|
16
27
|
|
|
17
|
-
## Quick
|
|
28
|
+
## Quick Usage
|
|
18
29
|
|
|
19
30
|
```tsx
|
|
20
31
|
import { ExtensiveEditor } from "@lyfie/luthor";
|
|
@@ -25,296 +36,44 @@ export function App() {
|
|
|
25
36
|
}
|
|
26
37
|
```
|
|
27
38
|
|
|
28
|
-
## What
|
|
29
|
-
|
|
30
|
-
- Preset editor component: `ExtensiveEditor`
|
|
31
|
-
- Additional preset editors: `SimpleTextEditor`, `RichTextBoxEditor`, `ChatWindowEditor`, `EmailComposeEditor`, `MDTextEditor`, `NotionLikeEditor`, `HeadlessEditorPreset`, `NotesEditor`
|
|
32
|
-
- Preset builder helpers: `extensivePreset`, `createExtensivePreset`, `presetRegistry`
|
|
33
|
-
- Extension composition helpers: `createExtensiveExtensions`, `extensiveExtensions`
|
|
34
|
-
- Feature flag helpers: `resolveFeatureFlags`, `isFeatureEnabled`, `DEFAULT_FEATURE_FLAGS`
|
|
35
|
-
- Core UI + command utilities: `Toolbar`, `FloatingToolbar`, `generateCommands`, `registerKeyboardShortcuts`, and more
|
|
36
|
-
- Full headless passthrough namespace: `headless`
|
|
37
|
-
|
|
38
|
-
```tsx
|
|
39
|
-
import { headless } from "@lyfie/luthor";
|
|
40
|
-
|
|
41
|
-
const { createEditorSystem, richTextExtension, boldExtension } = headless;
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Preset Catalog
|
|
45
|
-
|
|
46
|
-
- `ExtensiveEditor`: full-feature visual/jsonb preset.
|
|
47
|
-
- `SimpleTextEditor`: plain-text locked preset.
|
|
48
|
-
- `RichTextBoxEditor`: inline formatting + list preset with optional compact toolbar.
|
|
49
|
-
- `ChatWindowEditor`: chat composer with send action row.
|
|
50
|
-
- `EmailComposeEditor`: compose shell (To/CC/BCC/Subject) + rich body.
|
|
51
|
-
- `MDTextEditor`: visual/markdown mode switching.
|
|
52
|
-
- `NotionLikeEditor`: slash-first + draggable defaults.
|
|
53
|
-
- `HeadlessEditorPreset`: minimal plain-control reference.
|
|
54
|
-
- `NotesEditor`: note-taking shell with title/actions callbacks.
|
|
55
|
-
|
|
56
|
-
## ExtensiveEditor API
|
|
57
|
-
|
|
58
|
-
### Props
|
|
59
|
-
|
|
60
|
-
| Prop | Type | Default | Notes |
|
|
61
|
-
|---|---|---|---|
|
|
62
|
-
| `className` | `string` | `undefined` | Appended to wrapper root. |
|
|
63
|
-
| `variantClassName` | `string` | `undefined` | Extra preset variant class on wrapper. |
|
|
64
|
-
| `onReady` | `(methods: ExtensiveEditorRef) => void` | `undefined` | Called when editor methods are ready. |
|
|
65
|
-
| `initialTheme` | `"light" \| "dark"` | `"light"` | Initial visual theme mode. |
|
|
66
|
-
| `theme` | `Partial<LuthorTheme>` | `undefined` | Theme class/style overrides merged with default theme. |
|
|
67
|
-
| `defaultContent` | `string` | `undefined` | If provided, injected as initial content (JSON parsed or plain text converted to JSONB). |
|
|
68
|
-
| `showDefaultContent` | `boolean` | `true` | If `true` and `defaultContent` is not provided, loads built-in welcome content. |
|
|
69
|
-
| `placeholder` | `string \| { visual?: string; jsonb?: string }` | `"Write anything..."` | String applies to visual mode; object lets you set visual and JSONB placeholders separately. |
|
|
70
|
-
| `initialMode` | `"visual" \| "jsonb"` | `"visual"` | Initial open mode; clamped to `availableModes`. |
|
|
71
|
-
| `availableModes` | `readonly ("visual" \| "jsonb")[]` | `["visual", "jsonb"]` | Visible mode tabs and allowed switching targets. |
|
|
72
|
-
| `toolbarLayout` | `ToolbarLayout` | `TRADITIONAL_TOOLBAR_LAYOUT` | Custom toolbar sections/items order. |
|
|
73
|
-
| `toolbarVisibility` | `Partial<Record<ToolbarItemType, boolean>>` | `undefined` | Per-item hide/show map. Unsupported items are auto-hidden. |
|
|
74
|
-
| `toolbarPosition` | `"top" \| "bottom"` | `"top"` | Renders toolbar above or below visual editor. |
|
|
75
|
-
| `toolbarAlignment` | `"left" \| "center" \| "right"` | `"left"` | Horizontal toolbar alignment class. |
|
|
76
|
-
| `toolbarClassName` | `string` | `undefined` | Extra class for toolbar root (`.luthor-toolbar`). |
|
|
77
|
-
| `toolbarStyleVars` | `ToolbarStyleVars` | `undefined` | Inline `--luthor-toolbar-*` CSS variable overrides. |
|
|
78
|
-
| `isToolbarEnabled` | `boolean` | `true` | Hides toolbar UI only; keyboard/commands still exist unless feature-flagged off. |
|
|
79
|
-
| `quoteClassName` | `string` | `undefined` | Appended to quote node class. |
|
|
80
|
-
| `quoteStyleVars` | `QuoteStyleVars` | `undefined` | Inline `--luthor-quote-*` CSS variable overrides. |
|
|
81
|
-
| `defaultSettings` | `DefaultSettings` | `undefined` | High-level style token API for common color settings. |
|
|
82
|
-
| `editorThemeOverrides` | `LuthorEditorThemeOverrides` | `undefined` | Inline editor-wide `--luthor-*` token overrides. |
|
|
83
|
-
| `fontFamilyOptions` | `readonly FontFamilyOption[]` | preset defaults | Sanitized: duplicates removed, invalid tokens removed, `default` auto-added if missing. |
|
|
84
|
-
| `fontSizeOptions` | `readonly FontSizeOption[]` | preset defaults | Sanitized similarly to font family options. |
|
|
85
|
-
| `minimumDefaultLineHeight` | `string \| number` | `1.5` | Sets the editor default line height and the minimum selectable/accepted line-height floor for the line-height feature; minimum accepted value is `1.0`. |
|
|
86
|
-
| `lineHeightOptions` | `readonly LineHeightOption[]` | preset defaults | Uses unitless ratios (`"1.5"`) for non-default values; minimum allowed is `1.0`. |
|
|
87
|
-
| `scaleByRatio` | `boolean` | `false` | Image resize behavior (`true` = keep ratio by default, Shift unlocks). |
|
|
88
|
-
| `headingOptions` | `readonly ("h1"\|"h2"\|"h3"\|"h4"\|"h5"\|"h6")[]` | all headings | Invalid/duplicate entries are removed. |
|
|
89
|
-
| `paragraphLabel` | `string` | `"Paragraph"` behavior | Label for paragraph entry in block format menu/commands. |
|
|
90
|
-
| `syncHeadingOptionsWithCommands` | `boolean` | `true` | Syncs heading command generation with `headingOptions`. |
|
|
91
|
-
| `slashCommandVisibility` | `SlashCommandVisibility` | `undefined` | Slash command filter using allowlist/denylist or enabled-ID selection array form. |
|
|
92
|
-
| `shortcutConfig` | `ShortcutConfig` | `undefined` | Per-instance command shortcut config (disable/remap, collision and native conflict prevention). |
|
|
93
|
-
| `commandPaletteShortcutOnly` | `boolean` | `false` | When `true`, command palette only shows commands that have a visible keyboard shortcut. |
|
|
94
|
-
| `isDraggableBoxEnabled` | `boolean` | `undefined` | Shortcut for enabling/disabling draggable block UI (maps into `featureFlags.draggableBlock`). |
|
|
95
|
-
| `featureFlags` | `Partial<Record<FeatureFlag, boolean>>` | all `true` | Central capability switchboard; affects extensions, toolbar, commands, shortcuts. |
|
|
96
|
-
| `syntaxHighlighting` | `"auto" \| "disabled"` | extension default (`"auto"`) | Code block syntax highlighting strategy. |
|
|
97
|
-
| `codeHighlightProvider` | `CodeHighlightProvider \| null` | `undefined` | Injected highlight provider instance. |
|
|
98
|
-
| `loadCodeHighlightProvider` | `() => Promise<CodeHighlightProvider \| null>` | `undefined` | Lazy async provider loader. |
|
|
99
|
-
| `maxAutoDetectCodeLength` | `number` | `12000` in code intelligence extension | Guard for auto language detection input size. |
|
|
100
|
-
| `isCopyAllowed` | `boolean` | `true` | Enables/disables code block copy button and command path. |
|
|
101
|
-
| `languageOptions` | `readonly string[] \| { mode?: "append"\|"replace"; values: readonly string[] }` | default language catalog | Controls visible code language options. |
|
|
102
|
-
|
|
103
|
-
### Ref Methods
|
|
104
|
-
|
|
105
|
-
```ts
|
|
106
|
-
type ExtensiveEditorRef = {
|
|
107
|
-
injectJSONB: (content: string) => void;
|
|
108
|
-
getJSONB: () => string;
|
|
109
|
-
};
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Valid Argument Sets
|
|
113
|
-
|
|
114
|
-
### `ToolbarItemType`
|
|
115
|
-
|
|
116
|
-
`"fontFamily"`, `"fontSize"`, `"lineHeight"`, `"textColor"`, `"textHighlight"`, `"bold"`, `"italic"`, `"underline"`, `"strikethrough"`, `"subscript"`, `"superscript"`, `"code"`, `"link"`, `"blockFormat"`, `"quote"`, `"alignLeft"`, `"alignCenter"`, `"alignRight"`, `"alignJustify"`, `"codeBlock"`, `"unorderedList"`, `"orderedList"`, `"checkList"`, `"indentList"`, `"outdentList"`, `"horizontalRule"`, `"table"`, `"image"`, `"emoji"`, `"embed"`, `"undo"`, `"redo"`, `"commandPalette"`, `"themeToggle"`.
|
|
117
|
-
|
|
118
|
-
### `FeatureFlag`
|
|
119
|
-
|
|
120
|
-
`"bold"`, `"italic"`, `"underline"`, `"strikethrough"`, `"fontFamily"`, `"fontSize"`, `"lineHeight"`, `"textColor"`, `"textHighlight"`, `"subscript"`, `"superscript"`, `"link"`, `"horizontalRule"`, `"table"`, `"list"`, `"history"`, `"image"`, `"blockFormat"`, `"code"`, `"codeIntelligence"`, `"codeFormat"`, `"tabIndent"`, `"enterKeyBehavior"`, `"iframeEmbed"`, `"youTubeEmbed"`, `"floatingToolbar"`, `"contextMenu"`, `"commandPalette"`, `"slashCommand"`, `"emoji"`, `"draggableBlock"`, `"customNode"`, `"themeToggle"`.
|
|
121
|
-
|
|
122
|
-
## Usage Recipes
|
|
123
|
-
|
|
124
|
-
### 1) Minimal with defaults
|
|
125
|
-
|
|
126
|
-
```tsx
|
|
127
|
-
import { ExtensiveEditor } from "@lyfie/luthor";
|
|
128
|
-
import "@lyfie/luthor/styles.css";
|
|
129
|
-
|
|
130
|
-
export function App() {
|
|
131
|
-
return <ExtensiveEditor />;
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### 2) Placeholder per mode + restricted modes
|
|
136
|
-
|
|
137
|
-
```tsx
|
|
138
|
-
<ExtensiveEditor
|
|
139
|
-
initialMode="visual"
|
|
140
|
-
availableModes={["visual", "jsonb"]}
|
|
141
|
-
placeholder={{
|
|
142
|
-
visual: "Write release notes...",
|
|
143
|
-
jsonb: "Paste JSONB...",
|
|
144
|
-
}}
|
|
145
|
-
/>
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### 3) Feature-gated editor (product tiers)
|
|
149
|
-
|
|
150
|
-
```tsx
|
|
151
|
-
<ExtensiveEditor
|
|
152
|
-
featureFlags={{
|
|
153
|
-
image: false,
|
|
154
|
-
iframeEmbed: false,
|
|
155
|
-
youTubeEmbed: false,
|
|
156
|
-
emoji: false,
|
|
157
|
-
commandPalette: false,
|
|
158
|
-
}}
|
|
159
|
-
toolbarVisibility={{
|
|
160
|
-
embed: false,
|
|
161
|
-
image: false,
|
|
162
|
-
emoji: false,
|
|
163
|
-
}}
|
|
164
|
-
/>
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### 4) Slash command allowlist
|
|
168
|
-
|
|
169
|
-
```tsx
|
|
170
|
-
<ExtensiveEditor
|
|
171
|
-
slashCommandVisibility={{
|
|
172
|
-
allowlist: [
|
|
173
|
-
"block.paragraph",
|
|
174
|
-
"block.heading1",
|
|
175
|
-
"block.heading2",
|
|
176
|
-
"insert.table",
|
|
177
|
-
],
|
|
178
|
-
denylist: ["insert.image"],
|
|
179
|
-
}}
|
|
180
|
-
/>
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
### 5) Code language list replacement
|
|
184
|
-
|
|
185
|
-
```tsx
|
|
186
|
-
<ExtensiveEditor
|
|
187
|
-
languageOptions={{
|
|
188
|
-
mode: "replace",
|
|
189
|
-
values: ["plaintext", "typescript", "javascript", "markdown", "sql"],
|
|
190
|
-
}}
|
|
191
|
-
syntaxHighlighting="auto"
|
|
192
|
-
maxAutoDetectCodeLength={10000}
|
|
193
|
-
/>
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Optional: use highlight.js stylesheet for richer code colors
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
pnpm add highlight.js
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
```tsx
|
|
203
|
-
import { ExtensiveEditor } from "@lyfie/luthor";
|
|
204
|
-
import "@lyfie/luthor/styles.css";
|
|
205
|
-
import "highlight.js/styles/github.css"; // any highlight.js theme
|
|
206
|
-
|
|
207
|
-
export function App() {
|
|
208
|
-
return <ExtensiveEditor syntaxHighlighting="auto" />;
|
|
209
|
-
}
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
What happens:
|
|
213
|
-
|
|
214
|
-
- Luthor does not auto-detect code language anymore. Language comes from the selected code language option.
|
|
215
|
-
- Language options are normalized through Lexical/Prism aliases (`md` -> `markdown`, `js` -> `javascript` family, `ts` -> `typescript`).
|
|
216
|
-
- Only Prism-supported loaded languages are accepted. Unsupported values (for example `yaml` without Prism YAML grammar loaded) fall back to plain text.
|
|
217
|
-
- `plaintext` uses plain fallback syntax styling.
|
|
218
|
-
- Non-plaintext languages emit `hljs-*` token classes.
|
|
219
|
-
- If a highlight.js stylesheet is loaded, those `hljs-*` tokens use highlight.js colors.
|
|
220
|
-
- Without highlight.js stylesheet, code uses the built-in muted/plain fallback.
|
|
221
|
-
|
|
222
|
-
### 6) Per-instance shortcut remap/disable
|
|
223
|
-
|
|
224
|
-
```tsx
|
|
225
|
-
<ExtensiveEditor
|
|
226
|
-
shortcutConfig={{
|
|
227
|
-
disabledCommandIds: ["format.italic"],
|
|
228
|
-
bindings: {
|
|
229
|
-
"format.bold": { key: "m", ctrlKey: true },
|
|
230
|
-
"palette.show": [
|
|
231
|
-
{ key: "k", ctrlKey: true, shiftKey: true },
|
|
232
|
-
],
|
|
233
|
-
},
|
|
234
|
-
}}
|
|
235
|
-
/>
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
### 7) Command palette shortcut-only mode
|
|
239
|
-
|
|
240
|
-
```tsx
|
|
241
|
-
<ExtensiveEditor commandPaletteShortcutOnly />
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### 8) Style token overrides
|
|
245
|
-
|
|
246
|
-
```tsx
|
|
247
|
-
<ExtensiveEditor
|
|
248
|
-
editorThemeOverrides={{
|
|
249
|
-
"--luthor-bg": "#fffaf2",
|
|
250
|
-
"--luthor-fg": "#431407",
|
|
251
|
-
"--luthor-accent": "#c2410c",
|
|
252
|
-
}}
|
|
253
|
-
toolbarStyleVars={{
|
|
254
|
-
"--luthor-toolbar-button-active-bg": "#ea580c",
|
|
255
|
-
"--luthor-toolbar-button-active-fg": "#ffffff",
|
|
256
|
-
}}
|
|
257
|
-
quoteStyleVars={{
|
|
258
|
-
"--luthor-quote-bg": "#fff7ed",
|
|
259
|
-
"--luthor-quote-fg": "#7c2d12",
|
|
260
|
-
"--luthor-quote-border": "#ea580c",
|
|
261
|
-
}}
|
|
262
|
-
/>
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
### 9) Emoji library auto-detection (works in `apps/demo`)
|
|
266
|
-
|
|
267
|
-
Install emoji-mart data in the app:
|
|
268
|
-
|
|
269
|
-
```bash
|
|
270
|
-
pnpm add -F demo @emoji-mart/data
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
Then use `ExtensiveEditor` normally:
|
|
39
|
+
## What You Get
|
|
274
40
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
41
|
+
- :sparkles: `ExtensiveEditor` with rich defaults and polished UX
|
|
42
|
+
- :toolbox: Built-in toolbars, slash commands, floating actions, source mode
|
|
43
|
+
- :framed_picture: Media and embed workflows (image, iframe, YouTube)
|
|
44
|
+
- :shield: TypeScript-first APIs and reusable preset architecture
|
|
45
|
+
- :twisted_rightwards_arrows: Headless escape hatch via `headless` re-export
|
|
278
46
|
|
|
279
|
-
|
|
280
|
-
return <ExtensiveEditor />;
|
|
281
|
-
}
|
|
282
|
-
```
|
|
47
|
+
## Presets Included
|
|
283
48
|
|
|
284
|
-
|
|
49
|
+
- `ExtensiveEditor`
|
|
50
|
+
- `SimpleTextEditor`
|
|
51
|
+
- `RichTextBoxEditor`
|
|
52
|
+
- `ChatWindowEditor`
|
|
53
|
+
- `EmailComposeEditor`
|
|
54
|
+
- `MDTextEditor`
|
|
55
|
+
- `NotionLikeEditor`
|
|
56
|
+
- `HeadlessEditorPreset`
|
|
57
|
+
- `NotesEditor`
|
|
285
58
|
|
|
286
|
-
|
|
287
|
-
- Emoji toolbar dropdown uses the detected emoji-mart catalog.
|
|
288
|
-
- If the library is not installed/available, it automatically falls back to the built-in emoji list.
|
|
59
|
+
## Compatibility
|
|
289
60
|
|
|
290
|
-
|
|
61
|
+
- React: `^18.0.0 || ^19.0.0`
|
|
62
|
+
- React DOM: `^18.0.0 || ^19.0.0`
|
|
63
|
+
- Lexical family: `^0.40.0`
|
|
291
64
|
|
|
292
|
-
|
|
293
|
-
- `slashCommandVisibility` keeps original command ordering; it only filters visibility.
|
|
294
|
-
- `shortcutConfig.disabledCommandIds` removes commands from keyboard handling and command UIs for that editor instance.
|
|
295
|
-
- `shortcutConfig` drops duplicate bindings by default and blocks native editable conflicts by default.
|
|
296
|
-
- `commandPaletteShortcutOnly` is optional; by default command palette can include command items without shortcuts.
|
|
297
|
-
- `languageOptions` normalizes aliases (for example `js` becomes `javascript`) and rejects duplicates after normalization.
|
|
298
|
-
- Emoji suggestions/tooling auto-detect external emoji-mart data when available, and otherwise use the built-in default emoji catalog.
|
|
299
|
-
- `defaultSettings` is style-only; behavior is controlled by explicit props (for example `featureFlags`, `availableModes`).
|
|
300
|
-
- `isToolbarEnabled={false}` hides toolbar UI, but editor shortcuts/features still work unless disabled via `featureFlags`.
|
|
301
|
-
|
|
302
|
-
## Which Package Should I Use?
|
|
65
|
+
## Documentation
|
|
303
66
|
|
|
304
|
-
-
|
|
305
|
-
-
|
|
67
|
+
- Docs landing: [luthor.fyi/docs/getting-started/luthor](https://www.luthor.fyi/docs/getting-started/luthor)
|
|
68
|
+
- Presets docs: [luthor.fyi/docs/luthor/presets](https://www.luthor.fyi/docs/luthor/presets)
|
|
69
|
+
- User guide (repo): [documentation/user/luthor/getting-started.md](https://github.com/lyfie-app/luthor/blob/main/documentation/user/luthor/getting-started.md)
|
|
70
|
+
- Presets/config: [documentation/user/luthor/presets-and-configuration.md](https://github.com/lyfie-app/luthor/blob/main/documentation/user/luthor/presets-and-configuration.md)
|
|
71
|
+
- Extensive editor guide: [documentation/user/luthor/extensive-editor.md](https://github.com/lyfie-app/luthor/blob/main/documentation/user/luthor/extensive-editor.md)
|
|
306
72
|
|
|
307
|
-
##
|
|
73
|
+
## Need Headless Control?
|
|
308
74
|
|
|
309
|
-
|
|
310
|
-
- Headless package README: [../headless/README.md](../headless/README.md)
|
|
311
|
-
- User docs: [../../documentation/user/luthor/getting-started.md](../../documentation/user/luthor/getting-started.md)
|
|
312
|
-
- Developer docs: [../../documentation/developer/luthor/architecture.md](../../documentation/developer/luthor/architecture.md)
|
|
75
|
+
Use [`@lyfie/luthor-headless`](https://www.npmjs.com/package/@lyfie/luthor-headless) when you want total UI and extension composition control.
|
|
313
76
|
|
|
314
|
-
##
|
|
77
|
+
## License
|
|
315
78
|
|
|
316
|
-
|
|
317
|
-
pnpm --filter @lyfie/luthor dev
|
|
318
|
-
pnpm --filter @lyfie/luthor build
|
|
319
|
-
pnpm --filter @lyfie/luthor lint
|
|
320
|
-
```
|
|
79
|
+
MIT (c) Luthor Team
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyfie/luthor",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
4
4
|
"description": "Luthor presets and plug-and-play configuration for the headless editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
|
-
"dist",
|
|
11
|
-
"
|
|
10
|
+
"dist/**/*.js",
|
|
11
|
+
"dist/**/*.css",
|
|
12
|
+
"dist/**/*.d.ts"
|
|
12
13
|
],
|
|
13
14
|
"sideEffects": [
|
|
14
15
|
"**/*.css"
|
|
@@ -20,50 +21,10 @@
|
|
|
20
21
|
"default": "./dist/index.js"
|
|
21
22
|
},
|
|
22
23
|
"./styles.css": "./dist/index.css",
|
|
23
|
-
"./presets
|
|
24
|
-
"types": "./dist/presets
|
|
25
|
-
"import": "./dist/presets
|
|
26
|
-
"default": "./dist/presets
|
|
27
|
-
},
|
|
28
|
-
"./presets/simple-text": {
|
|
29
|
-
"types": "./dist/presets/simple-text/index.d.ts",
|
|
30
|
-
"import": "./dist/presets/simple-text/index.js",
|
|
31
|
-
"default": "./dist/presets/simple-text/index.js"
|
|
32
|
-
},
|
|
33
|
-
"./presets/rich-text-box": {
|
|
34
|
-
"types": "./dist/presets/rich-text-box/index.d.ts",
|
|
35
|
-
"import": "./dist/presets/rich-text-box/index.js",
|
|
36
|
-
"default": "./dist/presets/rich-text-box/index.js"
|
|
37
|
-
},
|
|
38
|
-
"./presets/chat-window": {
|
|
39
|
-
"types": "./dist/presets/chat-window/index.d.ts",
|
|
40
|
-
"import": "./dist/presets/chat-window/index.js",
|
|
41
|
-
"default": "./dist/presets/chat-window/index.js"
|
|
42
|
-
},
|
|
43
|
-
"./presets/email-compose": {
|
|
44
|
-
"types": "./dist/presets/email-compose/index.d.ts",
|
|
45
|
-
"import": "./dist/presets/email-compose/index.js",
|
|
46
|
-
"default": "./dist/presets/email-compose/index.js"
|
|
47
|
-
},
|
|
48
|
-
"./presets/md-text": {
|
|
49
|
-
"types": "./dist/presets/md-text/index.d.ts",
|
|
50
|
-
"import": "./dist/presets/md-text/index.js",
|
|
51
|
-
"default": "./dist/presets/md-text/index.js"
|
|
52
|
-
},
|
|
53
|
-
"./presets/notion-like": {
|
|
54
|
-
"types": "./dist/presets/notion-like/index.d.ts",
|
|
55
|
-
"import": "./dist/presets/notion-like/index.js",
|
|
56
|
-
"default": "./dist/presets/notion-like/index.js"
|
|
57
|
-
},
|
|
58
|
-
"./presets/headless-editor": {
|
|
59
|
-
"types": "./dist/presets/headless-editor/index.d.ts",
|
|
60
|
-
"import": "./dist/presets/headless-editor/index.js",
|
|
61
|
-
"default": "./dist/presets/headless-editor/index.js"
|
|
62
|
-
},
|
|
63
|
-
"./presets/notes": {
|
|
64
|
-
"types": "./dist/presets/notes/index.d.ts",
|
|
65
|
-
"import": "./dist/presets/notes/index.js",
|
|
66
|
-
"default": "./dist/presets/notes/index.js"
|
|
24
|
+
"./presets/*": {
|
|
25
|
+
"types": "./dist/presets/*/index.d.ts",
|
|
26
|
+
"import": "./dist/presets/*/index.js",
|
|
27
|
+
"default": "./dist/presets/*/index.js"
|
|
67
28
|
}
|
|
68
29
|
},
|
|
69
30
|
"keywords": [
|
|
@@ -96,7 +57,7 @@
|
|
|
96
57
|
"@lexical/table": "^0.40.0",
|
|
97
58
|
"@lexical/utils": "^0.40.0",
|
|
98
59
|
"lexical": "^0.40.0",
|
|
99
|
-
"@lyfie/luthor-headless": "2.3.
|
|
60
|
+
"@lyfie/luthor-headless": "2.3.4"
|
|
100
61
|
},
|
|
101
62
|
"devDependencies": {
|
|
102
63
|
"@types/node": "^20.19.33",
|
|
@@ -109,8 +70,8 @@
|
|
|
109
70
|
"tsup": "^8.0.0",
|
|
110
71
|
"typescript": "^5.7.3",
|
|
111
72
|
"vitest": "^3.2.4",
|
|
112
|
-
"@repo/
|
|
113
|
-
"@repo/
|
|
73
|
+
"@repo/eslint-config": "0.0.0",
|
|
74
|
+
"@repo/typescript-config": "0.0.0"
|
|
114
75
|
},
|
|
115
76
|
"peerDependencies": {
|
|
116
77
|
"react": "^18.0.0 || ^19.0.0",
|