Skip to content

Commit

Permalink
Merge branch 'MatrixOt' into AddColRowMaps
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasCouri committed Feb 9, 2024
2 parents f586702 + 108d361 commit 1725d68
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Serializable } from '@fluidframework/datastore-definitions';
export type CollabSpaceCellType = MatrixItem<MatrixExternalType>;

// @internal (undocumented)
export function createCollabSpace(sharedObjects: Readonly<ICollabChannelFactory[]>): IFluidDataStoreFactory;
export function createCollabSpaces(sharedObjects: Readonly<ICollabChannelFactory[]>): IFluidDataStoreFactory;

// @internal (undocumented)
export type ICollabChannel = IChannel & ICollabChannelCore;
Expand Down
2 changes: 1 addition & 1 deletion packages/framework/collabspaces/src/collabSpaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function isChannelDeffered(type?: string) {
*/

/** @internal */
export class TempCollabSpaceRuntime
export class CollabSpacesRuntime
extends FluidDataStoreRuntime<ISharedMatrixEvents<MatrixExternalType>>
implements IEfficientMatrix
{
Expand Down
4 changes: 2 additions & 2 deletions packages/framework/collabspaces/src/deferreChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const snapshotFileName = "header";
*/
export class DeferredChannel extends SharedObject implements ICollabChannel {
readonly type = DeferredChannel.Type;
static readonly Type = "CollabSpacedDeferredChannelType";
static readonly Type = "CollabSpaceDeferredChannelType";

private ops: ISequencedDocumentMessage[] = [];

Expand All @@ -44,7 +44,7 @@ export class DeferredChannel extends SharedObject implements ICollabChannel {
runtime: IFluidDataStoreRuntime,
attributes: IChannelAttributes,
) {
super(id, runtime, attributes, "fluid_collabspaces_deferred");
super(id, runtime, attributes, "fluid_collabspace_deferred");
}

public get value() {
Expand Down
14 changes: 7 additions & 7 deletions packages/framework/collabspaces/src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ import {
import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";

import { IEfficientMatrix, ICollabChannelFactory } from "./contracts";
import { TempCollabSpaceRuntime } from "./collabSpaces";
import { CollabSpacesRuntime } from "./collabSpaces";

/**
*
* Factory for collab spaces
*
*/
/** @internal */
class TempCollabSpaceRuntimeFactory implements IFluidDataStoreFactory {
public readonly type = "CollabSpace-DataStore";
class CollabSpacesRuntimeFactory implements IFluidDataStoreFactory {
public readonly type = "CollabSpaces-DataStore";
constructor(private readonly sharedObjects: readonly ICollabChannelFactory[]) {}

public get IFluidDataStoreFactory() {
Expand All @@ -31,12 +31,12 @@ class TempCollabSpaceRuntimeFactory implements IFluidDataStoreFactory {
context: IFluidDataStoreContext,
existing: boolean,
): Promise<IFluidDataStoreChannel> {
const runtime = new TempCollabSpaceRuntime(
const runtime = new CollabSpacesRuntime(
context,
this.sharedObjects,
existing,
async (runtimeArg: IFluidDataStoreRuntime) => {
return runtimeArg as TempCollabSpaceRuntime as IEfficientMatrix;
return runtimeArg as CollabSpacesRuntime as IEfficientMatrix;
},
);

Expand All @@ -46,8 +46,8 @@ class TempCollabSpaceRuntimeFactory implements IFluidDataStoreFactory {
}

/** @internal */
export function createCollabSpace(
export function createCollabSpaces(
sharedObjects: Readonly<ICollabChannelFactory[]>,
): IFluidDataStoreFactory {
return new TempCollabSpaceRuntimeFactory(sharedObjects);
return new CollabSpacesRuntimeFactory(sharedObjects);
}
2 changes: 1 addition & 1 deletion packages/framework/collabspaces/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export {
ICollabChannel,
CollabSpaceCellType,
} from "./contracts";
export { createCollabSpace } from "./factory";
export { createCollabSpaces } from "./factory";
4 changes: 2 additions & 2 deletions packages/framework/collabspaces/src/test/collabSpaces.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ import {
IEfficientMatrix,
IEfficientMatrixTest,
} from "../contracts";
import { createCollabSpace } from "../factory";
import { createCollabSpaces } from "../factory";

import { CounterFactory, ISharedCounter } from "./counterFactory";

/* eslint-disable @typescript-eslint/no-non-null-assertion */

function sampleFactory() {
return createCollabSpace([new CounterFactory()]);
return createCollabSpaces([new CounterFactory()]);
}

/*
Expand Down

0 comments on commit 1725d68

Please sign in to comment.