Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/fix-license-header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Fix License Header
# pin to include https://github.com/apache/skywalking-eyes/pull/168
uses: apache/skywalking-eyes/header@07a607ff5b0759f5ed47306c865aac50fe9b3985
uses: apache/skywalking-eyes/header@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1
with:
mode: fix

Expand Down
5 changes: 5 additions & 0 deletions __tests__/setup.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

// Jest setup for Lexical tests
import 'jest-environment-jsdom';

Expand Down
5 changes: 5 additions & 0 deletions __tests__/test_BigLoroDoc.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { LoroDoc, LoroText } from 'loro-crdt';
import * as fs from 'fs';
import * as path from 'path';
Expand Down
5 changes: 5 additions & 0 deletions __tests__/test_LexicalNodeData.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { $createTextNode, $createParagraphNode, $isTextNode, $isElementNode, createEditor, $getRoot } from 'lexical';
import { LexicalNodeData, LexicalNodeDataHelper } from '../src/collab/loro/types/LexicalNodeData';

Expand Down
5 changes: 5 additions & 0 deletions __tests__/test_LoroDoc.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { Delta, LoroDoc, LoroText } from 'loro-crdt';

describe('Loro Text', () => {
Expand Down
5 changes: 5 additions & 0 deletions dev/debug-offset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

// Quick debug script to understand offset calculation differences
// Run this to see the difference between YJS XmlText and LoroText

Expand Down
3 changes: 3 additions & 0 deletions dev/debug_loro_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python3
# Copyright (c) 2023-2025 Datalayer, Inc.
# Distributed under the terms of the MIT License.

"""
Debug Loro tree API to understand how to access children
"""
Expand Down
3 changes: 3 additions & 0 deletions dev/debug_loro_map.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python3
# Copyright (c) 2023-2025 Datalayer, Inc.
# Distributed under the terms of the MIT License.

"""
Debug script to understand LoroMap API
"""
Expand Down
3 changes: 3 additions & 0 deletions dev/debug_mcp_comprehensive.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python3
# Copyright (c) 2023-2025 Datalayer, Inc.
# Distributed under the terms of the MIT License.

"""
Simple integration test to validate the text content fix.
"""
Expand Down
3 changes: 3 additions & 0 deletions dev/debug_tree.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python3
# Copyright (c) 2023-2025 Datalayer, Inc.
# Distributed under the terms of the MIT License.

"""
Debug script to understand Loro tree container structure
"""
Expand Down
3 changes: 3 additions & 0 deletions dev/debug_tree_structure.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python3
# Copyright (c) 2023-2025 Datalayer, Inc.
# Distributed under the terms of the MIT License.

"""
Debug script to understand Loro tree structure for children
"""
Expand Down
3 changes: 3 additions & 0 deletions dev/debug_websocket_integration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python3
# Copyright (c) 2023-2025 Datalayer, Inc.
# Distributed under the terms of the MIT License.

"""
Quick test to verify MCP server WebSocket integration fixes
"""
Expand Down
5 changes: 5 additions & 0 deletions esm/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ Copyright (c) 2023-2025 Datalayer, Inc.
~ Distributed under the terms of the MIT License.
-->

<!DOCTYPE html>
<html lang="en">
<head>
Expand Down
5 changes: 5 additions & 0 deletions esm/index.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import {registerDragonSupport} from '@lexical/dragon';
import {createEmptyHistoryState, registerHistory} from '@lexical/history';
import {HeadingNode, QuoteNode, registerRichText} from '@lexical/rich-text';
Expand Down
5 changes: 5 additions & 0 deletions esm/prepopulatedRichText.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
Expand Down
5 changes: 5 additions & 0 deletions esm/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

.editor-wrapper {
border: 2px solid gray;
}
Expand Down
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ Copyright (c) 2023-2025 Datalayer, Inc.
~ Distributed under the terms of the MIT License.
-->

<!DOCTYPE html>
<html lang="en">
<head>
Expand Down
3 changes: 3 additions & 0 deletions lexical_loro/websocket/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env python3
# Copyright (c) 2023-2025 Datalayer, Inc.
# Distributed under the terms of the MIT License.


import asyncio
import json
Expand Down
5 changes: 5 additions & 0 deletions split/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ Copyright (c) 2023-2025 Datalayer, Inc.
~ Distributed under the terms of the MIT License.
-->

<!DOCTYPE html>
<html lang="en">
<head>
Expand Down
5 changes: 5 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import type {JSX} from 'react';
import {$createLinkNode} from '@lexical/link';
import {$createListItemNode, $createListNode} from '@lexical/list';
Expand Down
5 changes: 5 additions & 0 deletions src/Editor.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import {type JSX, useEffect, useState} from 'react';
import {AutoFocusPlugin} from '@lexical/react/LexicalAutoFocusPlugin';
import {CharacterLimitPlugin} from '@lexical/react/LexicalCharacterLimitPlugin';
Expand Down
5 changes: 5 additions & 0 deletions src/Settings.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import type {JSX} from 'react';

import {CAN_USE_BEFORE_INPUT} from '@lexical/utils';
Expand Down
5 changes: 5 additions & 0 deletions src/appSettings.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

const hostName = window.location.hostname;
export const isDevPlayground: boolean =
hostName !== 'playground.lexical.dev' &&
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/Bindings.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import type {LexicalEditor} from 'lexical';
import {Klass, LexicalNode} from 'lexical';
import type {LoroDoc, LoroTree} from 'loro-crdt';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/Debug.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import type { Binding } from './Bindings';

/**
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/LexicalCollaborationContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import {createContext, useContext} from 'react';
import type {LoroDoc} from 'loro-crdt';

Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/LexicalCollaborationPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import type {JSX} from 'react';
import {useEffect, useRef, useState} from 'react';
import {LexicalEditor} from 'lexical';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/State.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import type {LexicalCommand} from 'lexical';
import {createCommand} from 'lexical';
import type {LoroDoc, Cursor} from 'loro-crdt';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/components/LoroCollaborationUI.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import React from 'react';
import type { Binding } from '../Bindings';
import { LoroCollaborators } from './LoroCollaborators';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/components/LoroCollaborators.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import React, { useState, useEffect } from 'react';
import type { Binding } from '../Bindings';

Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

export { LoroCollaborators, type LoroCollaboratorsProps } from './LoroCollaborators';
export { LoroCollaborationUI, type LoroCollaborationUIProps } from './LoroCollaborationUI';
5 changes: 5 additions & 0 deletions src/collab/loro/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

export * from './Bindings';
export * from './LexicalCollaborationContext';
export * from './LexicalCollaborationPlugin';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/integrators/BaseIntegrator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { Binding } from '../Bindings';
import { Provider } from '../State';

Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/integrators/CounterIntegrator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { BaseIntegrator } from './BaseIntegrator';
import { Binding } from '../Bindings';
import { Provider } from '../State';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/integrators/ListIntegrator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { BaseIntegrator } from './BaseIntegrator';
import { Binding } from '../Bindings';
import { Provider } from '../State';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/integrators/MapIntegrator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { $getNodeByKey, $getRoot, RootNode, TextNode } from 'lexical';
import { BaseIntegrator } from './BaseIntegrator';
import { Binding } from '../Bindings';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/integrators/TextIntegrator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { BaseIntegrator } from './BaseIntegrator';
import { Binding } from '../Bindings';
import { Provider } from '../State';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/integrators/TreeIntegrator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import {
$getRoot,
$getNodeByKey,
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/nodes/NodeFactory.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { TreeID, LoroTree } from 'loro-crdt';
import { LexicalNode, NodeKey } from 'lexical';
import { Binding } from '../Bindings';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/nodes/NodesMapper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { LoroTree, LoroTreeNode, TreeID } from 'loro-crdt';
import { LexicalNode, NodeKey, EditorState } from 'lexical';
import { Binding } from '../Bindings';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/propagators/DecoratorNodePropagator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { TreeID, LoroTree } from 'loro-crdt';
import {
DecoratorNode,
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/propagators/ElementNodePropagator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { TreeID, LoroTree } from 'loro-crdt';
import {
$createParagraphNode,
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/propagators/LineBreakNodePropagator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { TreeID, LoroTree } from 'loro-crdt';
import { $createLineBreakNode, LineBreakNode, $isLineBreakNode, UpdateListenerPayload, NodeKey, ElementNode } from 'lexical';
import { getNodeMapper } from '../nodes/NodesMapper';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/propagators/RootNodePropagator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { TreeID, LoroTree } from 'loro-crdt';
import { UpdateListenerPayload, NodeKey, RootNode, $getRoot } from 'lexical';
import { getNodeMapper } from '../nodes/NodesMapper';
Expand Down
5 changes: 5 additions & 0 deletions src/collab/loro/propagators/TextNodePropagator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the MIT License.
*/

import { TreeID, LoroTree } from 'loro-crdt';
import {
$createTextNode,
Expand Down
Loading