@textbus/xnote 0.3.5 → 0.3.7

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.
@@ -6,8 +6,6 @@ export interface CommonState {
6
6
  selectEmbed: boolean;
7
7
  }
8
8
  export declare class ToolService {
9
- private selection;
10
- private controller;
11
9
  state: Signal<CommonState>;
12
10
  private sub;
13
11
  constructor(selection: Selection, controller: Controller);
@@ -36,7 +36,7 @@ export declare class AtComponent extends Component<AtComponentState> {
36
36
  selectedIndex: import("@viewfly/core").Signal<number>;
37
37
  private selection;
38
38
  private organization;
39
- constructor(textbus: Textbus, state?: AtComponentState);
39
+ constructor(state?: AtComponentState);
40
40
  getSlots(): Slot[];
41
41
  setup(): void;
42
42
  atMember(member?: Member): void;
@@ -10,7 +10,7 @@ export declare class BlockquoteComponent extends Component<BlockquoteComponentSt
10
10
  static componentName: string;
11
11
  static zenCoding: ZenCodingGrammarInterceptor<BlockquoteComponentState>;
12
12
  static fromJSON(textbus: Textbus, json: ComponentStateLiteral<BlockquoteComponentState>): BlockquoteComponent;
13
- constructor(textbus: Textbus, state?: BlockquoteComponentState);
13
+ constructor(state?: BlockquoteComponentState);
14
14
  getSlots(): Slot[];
15
15
  setup(): void;
16
16
  }
@@ -11,7 +11,7 @@ export declare class HighlightBoxComponent extends Component<HighlightBoxCompone
11
11
  static componentName: string;
12
12
  static type: ContentType;
13
13
  static fromJSON(textbus: Textbus, json: ComponentStateLiteral<HighlightBoxComponentState>): HighlightBoxComponent;
14
- constructor(textbus: Textbus, state?: HighlightBoxComponentState);
14
+ constructor(state?: HighlightBoxComponentState);
15
15
  getSlots(): Slot[];
16
16
  setup(): void;
17
17
  }
@@ -9,7 +9,7 @@ export declare class KatexComponent extends Component<KatexComponentState> {
9
9
  static componentName: string;
10
10
  static type: ContentType;
11
11
  static fromJSON(textbus: Textbus, state: ComponentStateLiteral<KatexComponentState>): KatexComponent;
12
- constructor(textbus: Textbus, state?: KatexComponentState);
12
+ constructor(state?: KatexComponentState);
13
13
  getSlots(): Slot[];
14
14
  }
15
15
  export declare function KatexComponentView(props: ViewComponentProps<KatexComponent>): () => import("@viewfly/core/jsx-runtime").JSX.Element;
@@ -9,10 +9,10 @@ export declare class ParagraphComponent extends Component<ParagraphComponentStat
9
9
  static componentName: string;
10
10
  static type: ContentType;
11
11
  static fromJSON(textbus: Textbus, json: ComponentStateLiteral<ParagraphComponentState>): ParagraphComponent;
12
- constructor(textbus: Textbus, state?: ParagraphComponentState);
12
+ constructor(state?: ParagraphComponentState);
13
13
  getSlots(): Slot[];
14
14
  setup(): void;
15
15
  }
16
16
  export declare function ParagraphView(props: ViewComponentProps<ParagraphComponent>): () => import("@viewfly/core/jsx-runtime").JSX.Element;
17
17
  export declare const paragraphComponentLoader: ComponentLoader;
18
- export declare function deltaToBlock(delta: DeltaLite, textbus: Textbus): Component<import("@textbus/core").State>[];
18
+ export declare function deltaToBlock(delta: DeltaLite): Component<import("@textbus/core").State>[];
@@ -9,7 +9,7 @@ export declare class RootComponent extends Component<RootComponentState> {
9
9
  static componentName: string;
10
10
  static type: ContentType;
11
11
  static fromJSON(textbus: Textbus, json: ComponentStateLiteral<RootComponentState>): RootComponent;
12
- onCompositionStart: Subject<Event<Slot, CompositionStartEventData>>;
12
+ onCompositionStart: Subject<Event<Slot<Record<string, any>>, CompositionStartEventData>>;
13
13
  getSlots(): Slot[];
14
14
  setup(): void;
15
15
  afterCheck(): void;
@@ -6,7 +6,7 @@ export interface StepComponentState {
6
6
  step: number;
7
7
  items: StepComponentItem[];
8
8
  }
9
- export declare function createStepItem(textbus: Textbus): StepComponentItem;
9
+ export declare function createStepItem(): StepComponentItem;
10
10
  export declare class StepComponent extends Component<StepComponentState> {
11
11
  static componentName: string;
12
12
  static type: ContentType;
@@ -21,7 +21,7 @@ export declare class TableComponent extends Component<TableComponentState> {
21
21
  static fromJSON(textbus: Textbus, json: ComponentStateLiteral<TableComponentState>): TableComponent;
22
22
  private selection;
23
23
  private commander;
24
- constructor(textbus: Textbus, state?: TableComponentState);
24
+ constructor(state?: TableComponentState);
25
25
  focus: Subject<boolean>;
26
26
  tableSelection: import("@viewfly/core").Signal<TableSelection | null>;
27
27
  ignoreSelectionChanges: boolean;
@@ -6,7 +6,7 @@ export interface TimelineComponentItem {
6
6
  export interface TimelineComponentState {
7
7
  items: TimelineComponentItem[];
8
8
  }
9
- export declare function createTimelineItem(textbus: Textbus, theme: string): TimelineComponentItem;
9
+ export declare function createTimelineItem(theme: string): TimelineComponentItem;
10
10
  export declare class TimelineComponent extends Component<TimelineComponentState> {
11
11
  static componentName: string;
12
12
  static type: ContentType;
@@ -10,7 +10,7 @@ export interface VideoComponentState {
10
10
  export declare class VideoComponent extends Component<VideoComponentState> {
11
11
  static type: ContentType;
12
12
  static componentName: string;
13
- static fromJSON(textbus: Textbus, json: ComponentStateLiteral<VideoComponentState>): VideoComponent;
13
+ static fromJSON(_: Textbus, json: ComponentStateLiteral<VideoComponentState>): VideoComponent;
14
14
  getSlots(): never[];
15
15
  }
16
16
  export declare function VideoView(props: ViewComponentProps<VideoComponent>): () => import("@viewfly/core/jsx-runtime").JSX.Element;
package/index.tsx CHANGED
@@ -91,13 +91,13 @@ function EditorContainer() {
91
91
  const editor = new Editor({
92
92
  readonly: false,
93
93
  // content: document.getElementById('article')!.innerHTML,
94
- collaborateConfig: {
95
- userinfo: user,
96
- createConnector(yDoc): SyncConnector {
97
- return new YWebsocketConnector('ws://localhost:1234', 'xnote', yDoc)
98
- // return new YWebsocketConnector('wss://textbus.io/api', 'xnote', yDoc)
99
- }
100
- },
94
+ // collaborateConfig: {
95
+ // userinfo: user,
96
+ // createConnector(yDoc): SyncConnector {
97
+ // return new YWebsocketConnector('ws://localhost:1234', 'xnote', yDoc)
98
+ // // return new YWebsocketConnector('wss://textbus.io/api', 'xnote', yDoc)
99
+ // }
100
+ // },
101
101
  // plugins: [
102
102
  // new SuspensionToolbarPlugin()
103
103
  // ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/xnote",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "A high-performance rich text editor that supports multiplayer online collaboration.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -27,14 +27,13 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@tanbo/color": "^0.1.1",
30
- "@textbus/adapter-viewfly": "^4.5.0",
31
- "@textbus/collaborate": "^4.5.1",
32
- "@textbus/core": "^4.5.0",
33
- "@textbus/platform-browser": "^4.5.0",
34
- "@viewfly/core": "^1.2.3",
35
- "@viewfly/hooks": "^1.2.3",
36
- "@viewfly/platform-browser": "^1.2.3",
37
- "@viewfly/scoped-css": "^1.2.3",
30
+ "@textbus/adapter-viewfly": "^5.0.0-alpha.19",
31
+ "@textbus/collaborate": "^5.0.0-alpha.19",
32
+ "@textbus/core": "^5.0.0-alpha.19",
33
+ "@textbus/platform-browser": "^5.0.0-alpha.19",
34
+ "@viewfly/core": "^2.0.0-alpha.7",
35
+ "@viewfly/platform-browser": "^2.0.0-alpha.7",
36
+ "@viewfly/scoped-css": "^2.0.0-alpha.7",
38
37
  "highlight.js": "^11.9.0",
39
38
  "katex": "^0.16.10",
40
39
  "uuid": "^10.0.0"
@@ -47,7 +46,7 @@
47
46
  "@types/uuid": "^10.0.0",
48
47
  "@typescript-eslint/eslint-plugin": "^5.8.0",
49
48
  "@typescript-eslint/parser": "^5.8.0",
50
- "@viewfly/devtools": "^1.1.10",
49
+ "@viewfly/devtools": "^1.2.7",
51
50
  "autoprefixer": "^10.4.0",
52
51
  "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
53
52
  "core-js": "^3.20.1",