@react-fabric/lexical 1.0.0-beta.36 → 1.0.0-beta.38
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/{src/editor/Lexical.module.css → css/_lexical.css} +4 -4
- package/css/styles.css +24 -0
- package/dist/cjs/packages/lexical/src/editor/LexicalEditor.js +2 -3
- package/dist/esm/packages/lexical/src/editor/LexicalEditor.js +2 -3
- package/package.json +7 -5
- package/src/editor/LexicalEditor.tsx +2 -3
- package/dist/cjs/editor/Lexical.module.css +0 -1
- package/dist/esm/editor/Lexical.module.css +0 -1
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
|
|
24
24
|
/* stylelint-disable custom-property-pattern */
|
|
25
25
|
|
|
26
|
-
@layer
|
|
27
|
-
.lexicalEditor,
|
|
28
|
-
.lexicalToolbar {
|
|
26
|
+
@layer utilities {
|
|
27
|
+
.fabric-lexicalEditor,
|
|
28
|
+
.fabric-lexicalToolbar {
|
|
29
29
|
width: 21cm;
|
|
30
30
|
margin: 0 auto;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.lexicalEditor
|
|
33
|
+
.fabric-lexicalEditor {
|
|
34
34
|
.editor-container.editor-container.editor-container {
|
|
35
35
|
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
|
|
36
36
|
font-family: "Sakkal Majalla";
|
package/css/styles.css
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* React Fabric
|
|
3
|
+
* @version: 1.0.0
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* The MIT License (MIT)
|
|
7
|
+
* Copyright (c) 2025 Adarsh Pastakia
|
|
8
|
+
*
|
|
9
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
10
|
+
* and associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
11
|
+
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
12
|
+
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
13
|
+
* subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
16
|
+
* portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
19
|
+
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
20
|
+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
@import "./_lexical.css";
|
|
@@ -21,7 +21,6 @@ var react = require('react');
|
|
|
21
21
|
var StickyNode = require('../nodes/StickyNode.js');
|
|
22
22
|
var DraggableBlockPlugin = require('../plugins/DraggableBlockPlugin.js');
|
|
23
23
|
var StickyPlugin = require('../plugins/StickyPlugin.js');
|
|
24
|
-
var Lexical_module = require('./Lexical.module.css');
|
|
25
24
|
var theme = require('./theme.js');
|
|
26
25
|
var ToolbarPlugin = require('../plugins/ToolbarPlugin.js');
|
|
27
26
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -108,7 +107,7 @@ var LexicalEditor = function LexicalEditor(_ref) {
|
|
|
108
107
|
return !publishMode ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
109
108
|
className: "lexical-scroller area-content overflow-auto",
|
|
110
109
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
111
|
-
className: classNames(
|
|
110
|
+
className: classNames("fabric-lexicalToolbar", "sticky top-0 z-1"),
|
|
112
111
|
children: /*#__PURE__*/jsxRuntime.jsx(core.Header, {
|
|
113
112
|
className: "bg-base",
|
|
114
113
|
children: /*#__PURE__*/jsxRuntime.jsx(ToolbarPlugin.ToolbarPlugin, {})
|
|
@@ -124,7 +123,7 @@ var LexicalEditor = function LexicalEditor(_ref) {
|
|
|
124
123
|
colorScheme: "light",
|
|
125
124
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
126
125
|
role: "none",
|
|
127
|
-
className: classNames(
|
|
126
|
+
className: classNames("fabric-lexicalEditor", "lexical-container relative bg-white min-h-full mx-auto shadow-md print:shadow-none"),
|
|
128
127
|
onDragOver: function onDragOver(e) {
|
|
129
128
|
return e.stopPropagation();
|
|
130
129
|
},
|
|
@@ -21,7 +21,6 @@ import { useRef, useState, useCallback, useEffect, useMemo } from 'react';
|
|
|
21
21
|
import { StickyNode } from '../nodes/StickyNode.js';
|
|
22
22
|
import { DraggableBlockPlugin } from '../plugins/DraggableBlockPlugin.js';
|
|
23
23
|
import { StickyPlugin } from '../plugins/StickyPlugin.js';
|
|
24
|
-
import classes from './Lexical.module.css';
|
|
25
24
|
import { LexicalTheme } from './theme.js';
|
|
26
25
|
import { ToolbarPlugin } from '../plugins/ToolbarPlugin.js';
|
|
27
26
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -108,7 +107,7 @@ var LexicalEditor = function LexicalEditor(_ref) {
|
|
|
108
107
|
return !publishMode ? /*#__PURE__*/jsxs("div", {
|
|
109
108
|
className: "lexical-scroller area-content overflow-auto",
|
|
110
109
|
children: [/*#__PURE__*/jsx("div", {
|
|
111
|
-
className: classNames(
|
|
110
|
+
className: classNames("fabric-lexicalToolbar", "sticky top-0 z-1"),
|
|
112
111
|
children: /*#__PURE__*/jsx(Header, {
|
|
113
112
|
className: "bg-base",
|
|
114
113
|
children: /*#__PURE__*/jsx(ToolbarPlugin, {})
|
|
@@ -124,7 +123,7 @@ var LexicalEditor = function LexicalEditor(_ref) {
|
|
|
124
123
|
colorScheme: "light",
|
|
125
124
|
children: /*#__PURE__*/jsxs("div", {
|
|
126
125
|
role: "none",
|
|
127
|
-
className: classNames(
|
|
126
|
+
className: classNames("fabric-lexicalEditor", "lexical-container relative bg-white min-h-full mx-auto shadow-md print:shadow-none"),
|
|
128
127
|
onDragOver: function onDragOver(e) {
|
|
129
128
|
return e.stopPropagation();
|
|
130
129
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/lexical",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.38",
|
|
4
4
|
"description": "RUF: Lexical editor",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
"types": "dist/types/index.d.ts",
|
|
12
12
|
"directories": {
|
|
13
13
|
"src": "src",
|
|
14
|
+
"styles": "css",
|
|
14
15
|
"test": "tests"
|
|
15
16
|
},
|
|
16
17
|
"files": [
|
|
18
|
+
"css",
|
|
17
19
|
"src",
|
|
18
20
|
"dist"
|
|
19
21
|
],
|
|
@@ -35,9 +37,9 @@
|
|
|
35
37
|
"dependencies": {
|
|
36
38
|
"@lexical/headless": "^0.17.1",
|
|
37
39
|
"@lexical/react": "^0.17.1",
|
|
38
|
-
"@react-fabric/core": "^1.0.0-beta.
|
|
39
|
-
"@react-fabric/form": "^1.0.0-beta.
|
|
40
|
-
"@react-fabric/utilities": "^1.0.0-beta.
|
|
40
|
+
"@react-fabric/core": "^1.0.0-beta.38",
|
|
41
|
+
"@react-fabric/form": "^1.0.0-beta.38",
|
|
42
|
+
"@react-fabric/utilities": "^1.0.0-beta.38",
|
|
41
43
|
"classnames": "^2.5.1",
|
|
42
44
|
"lexical": "^0.17.1"
|
|
43
45
|
},
|
|
@@ -51,5 +53,5 @@
|
|
|
51
53
|
"node": ">=18.12.0",
|
|
52
54
|
"npm": ">=8.19.0"
|
|
53
55
|
},
|
|
54
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "3be18ab7002b2aca45795376e8765dad79de92dc"
|
|
55
57
|
}
|
|
@@ -42,7 +42,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
|
42
42
|
import { StickyNode } from "../nodes/StickyNode";
|
|
43
43
|
import { DraggableBlockPlugin } from "../plugins/DraggableBlockPlugin";
|
|
44
44
|
import { StickyPlugin } from "../plugins/StickyPlugin";
|
|
45
|
-
import classes from "./Lexical.module.css";
|
|
46
45
|
import { LexicalTheme } from "./theme";
|
|
47
46
|
import { ToolbarPlugin } from "../plugins/ToolbarPlugin";
|
|
48
47
|
|
|
@@ -162,7 +161,7 @@ export const LexicalEditor = ({
|
|
|
162
161
|
return !publishMode ? (
|
|
163
162
|
<div className="lexical-scroller area-content overflow-auto">
|
|
164
163
|
<div
|
|
165
|
-
className={classNames(
|
|
164
|
+
className={classNames("fabric-lexicalToolbar", "sticky top-0 z-1")}
|
|
166
165
|
>
|
|
167
166
|
<Header className="bg-base">
|
|
168
167
|
<ToolbarPlugin />
|
|
@@ -185,7 +184,7 @@ export const LexicalEditor = ({
|
|
|
185
184
|
<div
|
|
186
185
|
role="none"
|
|
187
186
|
className={classNames(
|
|
188
|
-
|
|
187
|
+
"fabric-lexicalEditor",
|
|
189
188
|
"lexical-container relative bg-white min-h-full mx-auto shadow-md print:shadow-none",
|
|
190
189
|
)}
|
|
191
190
|
onDragOver={(e) => e.stopPropagation()}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer util{.lexicalEditor,.lexicalToolbar{margin:0 auto;width:21cm}.lexicalEditor :global{.editor-container.editor-container.editor-container{background-color:#fff;color:#0f172a;font-family:Sakkal Majalla;font-size:18px}.editor-heading-h1{font-size:1.5em;margin-bottom:1.5em;text-transform:capitalize}.editor-heading-h1,.editor-heading-h2{font-weight:600;line-height:1.5;margin-top:1.5em;padding:0 4px}.editor-heading-h2{font-size:1.25em;margin-bottom:1em}.editor-heading-h6{color:#b45309;font-size:.875em;font-weight:600;line-height:1.25;margin-bottom:1.5em;margin-top:1.5em}.editor-paragraph{font-size:1em}.editor-paragraph,.editor-quote{line-height:1.5;margin-bottom:1.5em;margin-top:1.5em}.editor-quote{border-color:#64748b;padding-inline-start:1em}.editor-code,.editor-quote{border-inline-start-width:4px;color:#1e293b;display:block;font-size:1.125em}.editor-code{background-color:#e2e8f0;line-height:1.5;margin-bottom:1.5em;margin-top:1.5em;padding:1em}.editor-textUnderline{text-decoration:underline}.editor-textStrikethrough{text-decoration:line-through}.editor-textUnderlineStrikethrough{text-decoration:underline line-through}.editor-page-break{page-break-after:always}.editor-no-break{page-break-inside:avoid}.editor-textSmall{font-size:.875em}.editor-textBold{font-weight:600}.editor-textItalic{font-style:italic}.editor-textMuted{color:#4b5563}.editor-list-ul{list-style:disc;padding-inline-start:.5em}.editor-list-ol{list-style:decimal;padding-inline-start:.5em}.editor-listItem{margin-inline-start:1em;text-align:start}@media print{body,html{margin:0;min-height:100vh}div,h1,h2,h3,h4,h5,h6,p,span{box-sizing:border-box}body.report-template{background-size:0;min-height:100vh}body:after{background-image:inherit;content:"";height:100vh;inset:0;margin:0 auto;max-width:21cm;position:fixed;-webkit-print-color-adjust:exact;print-color-adjust:exact;width:100vw;z-index:10}.editor-page-break>div,.sticky__container{display:none}.editor-container{position:relative}.editor-editor{box-sizing:border-box;padding:0 2cm}}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer util{.lexicalEditor,.lexicalToolbar{margin:0 auto;width:21cm}.lexicalEditor :global{.editor-container.editor-container.editor-container{background-color:#fff;color:#0f172a;font-family:Sakkal Majalla;font-size:18px}.editor-heading-h1{font-size:1.5em;margin-bottom:1.5em;text-transform:capitalize}.editor-heading-h1,.editor-heading-h2{font-weight:600;line-height:1.5;margin-top:1.5em;padding:0 4px}.editor-heading-h2{font-size:1.25em;margin-bottom:1em}.editor-heading-h6{color:#b45309;font-size:.875em;font-weight:600;line-height:1.25;margin-bottom:1.5em;margin-top:1.5em}.editor-paragraph{font-size:1em}.editor-paragraph,.editor-quote{line-height:1.5;margin-bottom:1.5em;margin-top:1.5em}.editor-quote{border-color:#64748b;padding-inline-start:1em}.editor-code,.editor-quote{border-inline-start-width:4px;color:#1e293b;display:block;font-size:1.125em}.editor-code{background-color:#e2e8f0;line-height:1.5;margin-bottom:1.5em;margin-top:1.5em;padding:1em}.editor-textUnderline{text-decoration:underline}.editor-textStrikethrough{text-decoration:line-through}.editor-textUnderlineStrikethrough{text-decoration:underline line-through}.editor-page-break{page-break-after:always}.editor-no-break{page-break-inside:avoid}.editor-textSmall{font-size:.875em}.editor-textBold{font-weight:600}.editor-textItalic{font-style:italic}.editor-textMuted{color:#4b5563}.editor-list-ul{list-style:disc;padding-inline-start:.5em}.editor-list-ol{list-style:decimal;padding-inline-start:.5em}.editor-listItem{margin-inline-start:1em;text-align:start}@media print{body,html{margin:0;min-height:100vh}div,h1,h2,h3,h4,h5,h6,p,span{box-sizing:border-box}body.report-template{background-size:0;min-height:100vh}body:after{background-image:inherit;content:"";height:100vh;inset:0;margin:0 auto;max-width:21cm;position:fixed;-webkit-print-color-adjust:exact;print-color-adjust:exact;width:100vw;z-index:10}.editor-page-break>div,.sticky__container{display:none}.editor-container{position:relative}.editor-editor{box-sizing:border-box;padding:0 2cm}}}}
|