@yurikilian/lex4 1.6.0 → 1.7.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 +4 -2
- package/dist/components/BlockTypePicker.d.ts +1 -1
- package/dist/components/BlockTypePicker.d.ts.map +1 -1
- package/dist/components/Toolbar.d.ts.map +1 -1
- package/dist/context/document-provider.d.ts.map +1 -1
- package/dist/context/toolbar-style-snapshot.d.ts +4 -0
- package/dist/context/toolbar-style-snapshot.d.ts.map +1 -0
- package/dist/context/toolbar-style-store.d.ts +28 -0
- package/dist/context/toolbar-style-store.d.ts.map +1 -0
- package/dist/lex4-editor.cjs +436 -153
- package/dist/lex4-editor.cjs.map +1 -1
- package/dist/lex4-editor.js +439 -156
- package/dist/lex4-editor.js.map +1 -1
- package/dist/lexical/commands/block-commands.d.ts +1 -1
- package/dist/lexical/commands/block-commands.d.ts.map +1 -1
- package/dist/lexical/commands/block-types.d.ts +2 -0
- package/dist/lexical/commands/block-types.d.ts.map +1 -0
- package/dist/style.css +2 -2
- package/dist/utils/text-style.d.ts +6 -0
- package/dist/utils/text-style.d.ts.map +1 -1
- package/dist/variables/variable-node.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LexicalEditor } from 'lexical';
|
|
2
|
-
|
|
2
|
+
import { BlockType } from './block-types';
|
|
3
3
|
export declare function setBlockType(editor: LexicalEditor, blockType: BlockType): void;
|
|
4
4
|
export declare function getActiveBlockType(editor: LexicalEditor): BlockType;
|
|
5
5
|
//# sourceMappingURL=block-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-commands.d.ts","sourceRoot":"","sources":["../../../src/lexical/commands/block-commands.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"block-commands.d.ts","sourceRoot":"","sources":["../../../src/lexical/commands/block-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAWL,KAAK,aAAa,EAEnB,MAAM,SAAS,CAAC;AAKjB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA+F/C,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,CAgE9E;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAgCnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-types.d.ts","sourceRoot":"","sources":["../../../src/lexical/commands/block-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
package/dist/style.css
CHANGED
|
@@ -1049,8 +1049,8 @@
|
|
|
1049
1049
|
border: 1px solid var(--lex4-variable-border, var(--color-border));
|
|
1050
1050
|
background-color: var(--lex4-variable-bg, color-mix(in srgb, var(--color-surface-elevated) 92%, var(--color-secondary)));
|
|
1051
1051
|
padding: 0.0625rem 0.3125rem;
|
|
1052
|
-
font-size:
|
|
1053
|
-
font-weight:
|
|
1052
|
+
font-size: inherit;
|
|
1053
|
+
font-weight: inherit;
|
|
1054
1054
|
color: var(--color-foreground);
|
|
1055
1055
|
-webkit-user-select: none;
|
|
1056
1056
|
-moz-user-select: none;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import { BlockType } from '../lexical/commands/block-types';
|
|
1
2
|
export declare function extractStyleValue(style: string, property: string): string | undefined;
|
|
3
|
+
export declare function removeStyleDeclaration(existingStyle: string, property: string): string;
|
|
2
4
|
export declare function mergeStyleDeclaration(existingStyle: string, property: string, value: string): string;
|
|
5
|
+
export declare function mergeStyleDeclarations(existingStyle: string, declarations: Record<string, string>): string;
|
|
3
6
|
export declare function extractFontFamilyFromStyle(style: string): string | undefined;
|
|
4
7
|
export declare function extractFontSizePtFromStyle(style: string): number | undefined;
|
|
5
8
|
export declare function mergeFontFamilyStyle(existingStyle: string, fontFamily: string): string;
|
|
6
9
|
export declare function mergeFontSizeStyle(existingStyle: string, size: number): string;
|
|
10
|
+
export declare function extractInlineBlockTypeFromStyle(style: string): BlockType | undefined;
|
|
11
|
+
export declare function createInlineBlockTypeStylePatch(blockType: BlockType): Record<string, string>;
|
|
12
|
+
export declare function mergeInlineBlockTypeStyle(existingStyle: string, blockType: BlockType): string;
|
|
7
13
|
//# sourceMappingURL=text-style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-style.d.ts","sourceRoot":"","sources":["../../src/utils/text-style.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIrF;AAED,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,MAAM,
|
|
1
|
+
{"version":3,"file":"text-style.d.ts","sourceRoot":"","sources":["../../src/utils/text-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAiEjE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIrF;AAED,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtF;AAED,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,MAAM,CAIR;AAED,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,MAAM,CAKR;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5E;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ5E;AAED,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEtF;AAED,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAGpF;AAED,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5F;AAED,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,CAQ7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable-node.d.ts","sourceRoot":"","sources":["../../src/variables/variable-node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,MAAM,EACZ,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"variable-node.d.ts","sourceRoot":"","sources":["../../src/variables/variable-node.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,qBAAqB,EAC1B,KAAK,MAAM,EACZ,MAAM,SAAS,CAAC;AAiBjB,MAAM,MAAM,sBAAsB,GAAG,MAAM,CACzC;IACE,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,E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": "1.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
"@lexical/selection": "^0.22.0",
|
|
54
54
|
"@lexical/utils": "^0.22.0",
|
|
55
55
|
"lexical": "^0.22.0",
|
|
56
|
-
"lucide-react": "^1.8.0"
|
|
56
|
+
"lucide-react": "^1.8.0",
|
|
57
|
+
"zustand": "^5.0.13"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@testing-library/jest-dom": "^6.0.0",
|