@tabula-md/tabula 0.2.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 +106 -0
- package/dist/activeDocumentRuntime.d.ts +50 -0
- package/dist/activeDocumentRuntime.d.ts.map +1 -0
- package/dist/collabCollaborators.d.ts +16 -0
- package/dist/collabCollaborators.d.ts.map +1 -0
- package/dist/collabConnectionModel.d.ts +11 -0
- package/dist/collabConnectionModel.d.ts.map +1 -0
- package/dist/collabSessionState.d.ts +24 -0
- package/dist/collabSessionState.d.ts.map +1 -0
- package/dist/collaboration.d.ts +8 -0
- package/dist/collaboration.d.ts.map +1 -0
- package/dist/collaboration.js +78 -0
- package/dist/collaboration.js.map +1 -0
- package/dist/collaborationPresence.d.ts +7 -0
- package/dist/collaborationPresence.d.ts.map +1 -0
- package/dist/collaborationTypes.d.ts +27 -0
- package/dist/collaborationTypes.d.ts.map +1 -0
- package/dist/commentRuntimeModel.d.ts +53 -0
- package/dist/commentRuntimeModel.d.ts.map +1 -0
- package/dist/data/base64Url.d.ts +3 -0
- package/dist/data/base64Url.d.ts.map +1 -0
- package/dist/data/encode.d.ts +20 -0
- package/dist/data/encode.d.ts.map +1 -0
- package/dist/data/encode.js +61 -0
- package/dist/data/encode.js.map +1 -0
- package/dist/data/encryption.d.ts +20 -0
- package/dist/data/encryption.d.ts.map +1 -0
- package/dist/data/encryption.js +13 -0
- package/dist/data/encryption.js.map +1 -0
- package/dist/data/json.d.ts +18 -0
- package/dist/data/json.d.ts.map +1 -0
- package/dist/data/json.js +18 -0
- package/dist/data/json.js.map +1 -0
- package/dist/data/restore.d.ts +3 -0
- package/dist/data/restore.d.ts.map +1 -0
- package/dist/data/restore.js +6 -0
- package/dist/data/restore.js.map +1 -0
- package/dist/documentBuffer.d.ts +68 -0
- package/dist/documentBuffer.d.ts.map +1 -0
- package/dist/documentControlsModel.d.ts +58 -0
- package/dist/documentControlsModel.d.ts.map +1 -0
- package/dist/documentMetrics.d.ts +2 -0
- package/dist/documentMetrics.d.ts.map +1 -0
- package/dist/documentPrimitives.d.ts +9 -0
- package/dist/documentPrimitives.d.ts.map +1 -0
- package/dist/documentSurfaceModel.d.ts +44 -0
- package/dist/documentSurfaceModel.d.ts.map +1 -0
- package/dist/encryption-B0xRVvlF.js +82 -0
- package/dist/encryption-B0xRVvlF.js.map +1 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2474 -0
- package/dist/index.js.map +1 -0
- package/dist/jsonShareLinkModel.d.ts +36 -0
- package/dist/jsonShareLinkModel.d.ts.map +1 -0
- package/dist/lineSurfaceModel.d.ts +73 -0
- package/dist/lineSurfaceModel.d.ts.map +1 -0
- package/dist/markdown/editing.d.ts +12 -0
- package/dist/markdown/editing.d.ts.map +1 -0
- package/dist/markdown/links.d.ts +23 -0
- package/dist/markdown/links.d.ts.map +1 -0
- package/dist/markdown/tasks.d.ts +22 -0
- package/dist/markdown/tasks.d.ts.map +1 -0
- package/dist/markdown.d.ts +25 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdownEditing.d.ts +2 -0
- package/dist/markdownEditing.d.ts.map +1 -0
- package/dist/markdownFormatting.d.ts +11 -0
- package/dist/markdownFormatting.d.ts.map +1 -0
- package/dist/previewBlockModel.d.ts +66 -0
- package/dist/previewBlockModel.d.ts.map +1 -0
- package/dist/productPerformancePolicy.d.ts +14 -0
- package/dist/productPerformancePolicy.d.ts.map +1 -0
- package/dist/rightPanelCommentViewModel.d.ts +39 -0
- package/dist/rightPanelCommentViewModel.d.ts.map +1 -0
- package/dist/room/envelope.d.ts +27 -0
- package/dist/room/envelope.d.ts.map +1 -0
- package/dist/room/envelope.js +38 -0
- package/dist/room/envelope.js.map +1 -0
- package/dist/roomBinaryProtocol.d.ts +43 -0
- package/dist/roomBinaryProtocol.d.ts.map +1 -0
- package/dist/roomCollaboration.d.ts +39 -0
- package/dist/roomCollaboration.d.ts.map +1 -0
- package/dist/roomProtocol.d.ts +11 -0
- package/dist/roomProtocol.d.ts.map +1 -0
- package/dist/roomShareLinkModel.d.ts +20 -0
- package/dist/roomShareLinkModel.d.ts.map +1 -0
- package/dist/shareLinkViewModel.d.ts +8 -0
- package/dist/shareLinkViewModel.d.ts.map +1 -0
- package/dist/shareSnapshotPayload-CsTw9sRq.js +209 -0
- package/dist/shareSnapshotPayload-CsTw9sRq.js.map +1 -0
- package/dist/shareSnapshotPayload.d.ts +75 -0
- package/dist/shareSnapshotPayload.d.ts.map +1 -0
- package/dist/shareViewModel.d.ts +33 -0
- package/dist/shareViewModel.d.ts.map +1 -0
- package/dist/sourceScrollTransfer.d.ts +54 -0
- package/dist/sourceScrollTransfer.d.ts.map +1 -0
- package/dist/statusBarViewModel.d.ts +13 -0
- package/dist/statusBarViewModel.d.ts.map +1 -0
- package/dist/textPatches.d.ts +16 -0
- package/dist/textPatches.d.ts.map +1 -0
- package/dist/workspaceFileRuntimeModel.d.ts +11 -0
- package/dist/workspaceFileRuntimeModel.d.ts.map +1 -0
- package/dist/workspaceIoModel.d.ts +37 -0
- package/dist/workspaceIoModel.d.ts.map +1 -0
- package/dist/workspaceModel.d.ts +112 -0
- package/dist/workspaceModel.d.ts.map +1 -0
- package/dist/workspaceRoomCheckpoint.d.ts +46 -0
- package/dist/workspaceRoomCheckpoint.d.ts.map +1 -0
- package/dist/workspaceRoomCrdt.d.ts +55 -0
- package/dist/workspaceRoomCrdt.d.ts.map +1 -0
- package/dist/workspaceRoomModel-CO-5ZOpS.js +78 -0
- package/dist/workspaceRoomModel-CO-5ZOpS.js.map +1 -0
- package/dist/workspaceRoomModel.d.ts +69 -0
- package/dist/workspaceRoomModel.d.ts.map +1 -0
- package/dist/workspaceRoomSync-B3niC7cn.js +758 -0
- package/dist/workspaceRoomSync-B3niC7cn.js.map +1 -0
- package/dist/workspaceRoomSync.d.ts +98 -0
- package/dist/workspaceRoomSync.d.ts.map +1 -0
- package/dist/workspaceViewModel.d.ts +13 -0
- package/dist/workspaceViewModel.d.ts.map +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type JsonShareRoute = {
|
|
2
|
+
snapshotId: string;
|
|
3
|
+
key: string;
|
|
4
|
+
};
|
|
5
|
+
export type JsonShareImportRoute = {
|
|
6
|
+
status: "valid";
|
|
7
|
+
route: JsonShareRoute;
|
|
8
|
+
routeKey: string;
|
|
9
|
+
} | {
|
|
10
|
+
status: "invalid";
|
|
11
|
+
errorMessage: string;
|
|
12
|
+
routeKey: string;
|
|
13
|
+
};
|
|
14
|
+
export type JsonShareCreateResponse = {
|
|
15
|
+
id: string;
|
|
16
|
+
data: string;
|
|
17
|
+
expiresAt?: string;
|
|
18
|
+
};
|
|
19
|
+
export type JsonShareLocation = {
|
|
20
|
+
hash: string;
|
|
21
|
+
pathname: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const JSON_SHARE_KEY_BYTES = 32;
|
|
24
|
+
export declare const JSON_SHARE_ID_PATTERN: RegExp;
|
|
25
|
+
export declare const JSON_SHARE_API_PREFIX = "/api/v2/";
|
|
26
|
+
export declare const JSON_SHARE_POST_PATH = "/api/v2/post/";
|
|
27
|
+
export declare const trimTrailingSlash: (value: string) => string;
|
|
28
|
+
export declare const createJsonShareUrl: (origin: string, snapshotId: string, key: string) => string;
|
|
29
|
+
export declare const parseJsonShareFromHash: (hash: string) => JsonShareRoute | null;
|
|
30
|
+
export declare const getJsonShareRoute: (location: JsonShareLocation) => JsonShareRoute | null;
|
|
31
|
+
export declare const getJsonShareImportRoute: (location: JsonShareLocation) => JsonShareImportRoute | null;
|
|
32
|
+
export declare const formatJsonShareUrlPreview: (url: string) => string;
|
|
33
|
+
export declare const validateJsonShareCreateResponse: (value: unknown, serviceUrl: string) => JsonShareCreateResponse;
|
|
34
|
+
export { decodeBase64Url, encodeBase64Url };
|
|
35
|
+
import { decodeBase64Url, encodeBase64Url } from "./data/base64Url";
|
|
36
|
+
//# sourceMappingURL=jsonShareLinkModel.d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BAAoB,GAAG,IA2C5F,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,KAAK,MAAM,WAQpD,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAC1C,OAAO,OAAO,EACd,YAAY,MAAM,KACjB,uBAmBF,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;AA8B5C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type LineSurfaceRectKind = "text" | "empty-line";
|
|
2
|
+
export type LineSurfaceRect = {
|
|
3
|
+
kind: LineSurfaceRectKind;
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
runIndex: number;
|
|
9
|
+
};
|
|
10
|
+
export type LineSurfaceVisualRow<TRectangle extends LineSurfaceRect = LineSurfaceRect> = {
|
|
11
|
+
runIndex: number;
|
|
12
|
+
rowIndex: number;
|
|
13
|
+
left: number;
|
|
14
|
+
right: number;
|
|
15
|
+
top: number;
|
|
16
|
+
bottom: number;
|
|
17
|
+
rectangles: TRectangle[];
|
|
18
|
+
};
|
|
19
|
+
export type LineSurfaceSourceLine = {
|
|
20
|
+
number: number;
|
|
21
|
+
start: number;
|
|
22
|
+
end: number;
|
|
23
|
+
};
|
|
24
|
+
export type LineSurfaceSourceRange = {
|
|
25
|
+
start: number;
|
|
26
|
+
end: number;
|
|
27
|
+
};
|
|
28
|
+
export type LineSurfaceAnnotation = {
|
|
29
|
+
lineNumber: number;
|
|
30
|
+
start: number;
|
|
31
|
+
end: number;
|
|
32
|
+
hasBookmark: boolean;
|
|
33
|
+
hasComment: boolean;
|
|
34
|
+
hasActiveComment?: boolean;
|
|
35
|
+
};
|
|
36
|
+
export type LineSurfaceSourceBlock = {
|
|
37
|
+
startLine: number;
|
|
38
|
+
endLine: number;
|
|
39
|
+
top: number;
|
|
40
|
+
bottom: number;
|
|
41
|
+
};
|
|
42
|
+
export type LineSurfaceRow<TAnnotation extends LineSurfaceAnnotation = LineSurfaceAnnotation> = TAnnotation & {
|
|
43
|
+
top: number;
|
|
44
|
+
height: number;
|
|
45
|
+
};
|
|
46
|
+
export type LineSurfaceVisualRowOptions = {
|
|
47
|
+
rowTolerance?: number;
|
|
48
|
+
};
|
|
49
|
+
export type LineSurfaceAnnotationRowOptions = {
|
|
50
|
+
fallbackHeight?: number;
|
|
51
|
+
fallbackGap?: number;
|
|
52
|
+
minRowHeight?: number;
|
|
53
|
+
};
|
|
54
|
+
export declare const getLineSurfaceRectRight: (rectangle: Pick<LineSurfaceRect, "left" | "width">) => number;
|
|
55
|
+
export declare const getLineSurfaceRectBottom: (rectangle: Pick<LineSurfaceRect, "top" | "height">) => number;
|
|
56
|
+
export declare const buildLineSurfaceVisualRows: <TRectangle extends LineSurfaceRect>(rectangles: TRectangle[], optionOverrides?: LineSurfaceVisualRowOptions) => LineSurfaceVisualRow<TRectangle>[];
|
|
57
|
+
export declare const lineSurfaceRowsAreAdjacent: (firstRow: Pick<LineSurfaceVisualRow, "runIndex" | "rowIndex"> | undefined, secondRow: Pick<LineSurfaceVisualRow, "runIndex" | "rowIndex"> | undefined) => boolean;
|
|
58
|
+
export declare const positionInSourceLine: (position: number, lineStart: number, lineEnd: number) => boolean;
|
|
59
|
+
export declare const sourceRangeIntersectsLine: (range: LineSurfaceSourceRange, line: Pick<LineSurfaceSourceLine, "start" | "end">) => boolean;
|
|
60
|
+
export declare const getLineNumberForSourcePosition: ({ docLength, position, resolveLineAt, }: {
|
|
61
|
+
docLength: number;
|
|
62
|
+
position: number;
|
|
63
|
+
resolveLineAt: (position: number) => Pick<LineSurfaceSourceLine, "number">;
|
|
64
|
+
}) => number;
|
|
65
|
+
export declare const getLineNumbersForSourceRanges: ({ docLength, ranges, resolveLineAt, }: {
|
|
66
|
+
docLength: number;
|
|
67
|
+
ranges: LineSurfaceSourceRange[];
|
|
68
|
+
resolveLineAt: (position: number) => Pick<LineSurfaceSourceLine, "number">;
|
|
69
|
+
}) => Set<number>;
|
|
70
|
+
export declare const getLineSurfaceAnnotationsSignature: (annotations: LineSurfaceAnnotation[]) => string;
|
|
71
|
+
export declare const areLineSurfaceRowsEqual: <TRow extends LineSurfaceRow>(firstRows: TRow[], secondRows: TRow[]) => boolean;
|
|
72
|
+
export declare const buildLineSurfaceAnnotationRows: <TAnnotation extends LineSurfaceAnnotation>(annotations: TAnnotation[], sourceBlocks: LineSurfaceSourceBlock[], optionOverrides?: LineSurfaceAnnotationRowOptions) => LineSurfaceRow<TAnnotation>[];
|
|
73
|
+
//# sourceMappingURL=lineSurfaceModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineSurfaceModel.d.ts","sourceRoot":"","sources":["../src/lineSurfaceModel.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,YAAY,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,UAAU,SAAS,eAAe,GAAG,eAAe,IAAI;IACvF,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,C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kdownRangeSelection = {
|
|
2
|
+
from: number;
|
|
3
|
+
to: number;
|
|
4
|
+
};
|
|
5
|
+
export type MarkdownRangeEdit = {
|
|
6
|
+
from: number;
|
|
7
|
+
to: number;
|
|
8
|
+
insert: string;
|
|
9
|
+
selection: MarkdownRangeSelection;
|
|
10
|
+
};
|
|
11
|
+
export declare const getMarkdownIndentEdit: (text: string, selection: MarkdownRangeSelection, direction: "indent" | "outdent") => MarkdownRangeEdit | null;
|
|
12
|
+
//# sourceMappingURL=editing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../src/markdown/editing.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,sBAAsB,CAAC;CACnC,CAAC;AA2IF,eAAO,MAAM,qBAAqB,GAChC,MAAM,MAAM,EACZ,WAAW,sBAAsB,EACjC,WAAW,QAAQ,GAAG,SAAS,KAC9B,iBAAiB,GAAG,IAoBtB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TextPatch } from "../textPatches";
|
|
2
|
+
export type MarkdownLink = {
|
|
3
|
+
from: number;
|
|
4
|
+
to: number;
|
|
5
|
+
text: string;
|
|
6
|
+
url: string;
|
|
7
|
+
urlFrom: number;
|
|
8
|
+
urlTo: number;
|
|
9
|
+
isImage: boolean;
|
|
10
|
+
isSafe: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type MarkdownLinkUrlEdit = {
|
|
13
|
+
patch: TextPatch;
|
|
14
|
+
selection: {
|
|
15
|
+
from: number;
|
|
16
|
+
to: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const isSafeMarkdownLinkUrl: (url: string) => boolean;
|
|
20
|
+
export declare const getMarkdownLinks: (text: string) => MarkdownLink[];
|
|
21
|
+
export declare const getMarkdownLinkAtOffset: (text: string, offset: number) => MarkdownLink | null;
|
|
22
|
+
export declare const updateMarkdownLinkUrl: (text: string, linkFrom: number, nextUrl: string) => MarkdownLinkUrlEdit | null;
|
|
23
|
+
//# sourceMappingURL=links.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../src/markdown/links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH,CAAC;AAKF,eAAO,MAAM,qBAAqB,GAAI,KAAK,MAAM,YAAgD,CAAC;AAElG,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,YAAY,EAoBxD,CAAC;AAEL,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,KAAG,YAAY,GAAG,IAOrF,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,MAAM,MAAM,EACZ,UAAU,MAAM,EAChB,SAAS,MAAM,KACd,mBAAmB,GAAG,IAiBxB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { TextPatch } from "../textPatches";
|
|
2
|
+
export type MarkdownTaskMarker = {
|
|
3
|
+
lineStart: number;
|
|
4
|
+
lineEnd: number;
|
|
5
|
+
markerStart: number;
|
|
6
|
+
markerEnd: number;
|
|
7
|
+
stateStart: number;
|
|
8
|
+
stateEnd: number;
|
|
9
|
+
checked: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type MarkdownTaskToggleEdit = {
|
|
12
|
+
patch: TextPatch;
|
|
13
|
+
selection: {
|
|
14
|
+
from: number;
|
|
15
|
+
to: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const getMarkdownTaskMarkers: (text: string) => MarkdownTaskMarker[];
|
|
19
|
+
export declare const getMarkdownTaskAtOffset: (text: string, offset: number) => MarkdownTaskMarker | null;
|
|
20
|
+
export declare const toggleMarkdownTaskAtOffset: (text: string, offset: number) => MarkdownTaskToggleEdit | null;
|
|
21
|
+
export declare const toggleMarkdownTaskOnLine: (text: string, lineStart: number) => MarkdownTaskToggleEdit | null;
|
|
22
|
+
//# sourceMappingURL=tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/markdown/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH,CAAC;AAqBF,eAAO,MAAM,sBAAsB,GAAI,MAAM,MAAM,KAAG,kBAAkB,EAmBF,CAAC;AAEvE,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,KAAG,kBAAkB,GAAG,IAO3F,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,KAAG,sBAAsB,GAAG,IAkBlG,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,EAAE,WAAW,MAAM,KAAG,sBAAsB,GAAG,IAmBnG,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ParsedFrontmatter = {
|
|
2
|
+
attributes: Array<{
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}>;
|
|
6
|
+
body: string;
|
|
7
|
+
};
|
|
8
|
+
export type PreviewBody = {
|
|
9
|
+
body: string;
|
|
10
|
+
sourceLineOffset: number;
|
|
11
|
+
};
|
|
12
|
+
export type MarkdownHeading = {
|
|
13
|
+
depth: number;
|
|
14
|
+
text: string;
|
|
15
|
+
lineIndex: number;
|
|
16
|
+
sourceLineIndex: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const getPreviewBody: (body: string) => PreviewBody;
|
|
19
|
+
export declare const parseFrontmatter: (markdown: string) => ParsedFrontmatter;
|
|
20
|
+
export declare const getMarkdownDocumentTitle: (markdown: string) => string;
|
|
21
|
+
export declare const getOutlineHeadings: (previewBody: PreviewBody) => MarkdownHeading[];
|
|
22
|
+
export declare const getOutlineHeadingsFromMarkdown: (markdown: string) => MarkdownHeading[];
|
|
23
|
+
export declare const getLineStartOffset: (markdown: string, targetLineIndex: number) => number;
|
|
24
|
+
export declare const getLineNumberForOffset: (content: string, offset: number) => number;
|
|
25
|
+
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../src/markdown.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAmEF,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,KAAG,WAA8C,CAAC;AAE7F,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,KAAG,iBA6BnD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,UAAU,MAAM,WAYxD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,aAAa,WAAW,KAAG,eAAe,EAgBD,CAAC;AAE7E,eAAO,MAAM,8BAA8B,GAAI,UAAU,MAAM,KAAG,eAAe,EAqChF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,EAAE,iBAAiB,MAAM,WAS3E,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,EAAE,QAAQ,MAAM,WAAgD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdownEditing.d.ts","sourceRoot":"","sources":["../src/markdownEditing.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type MarkdownFormatCommand = "bold" | "italic" | "strikethrough" | "inline-code" | "link" | "image" | "quote" | "heading-1" | "heading-2" | "heading-3" | "bullet-list" | "numbered-list" | "check-list" | "horizontal-rule" | "code-block" | "table" | "frontmatter" | "footnote" | "clear-formatting";
|
|
2
|
+
export type MarkdownFormatSelection = {
|
|
3
|
+
from: number;
|
|
4
|
+
to: number;
|
|
5
|
+
};
|
|
6
|
+
export type MarkdownFormatResult = {
|
|
7
|
+
text: string;
|
|
8
|
+
selection: MarkdownFormatSelection;
|
|
9
|
+
};
|
|
10
|
+
export declare const applyMarkdownFormat: (text: string, selection: MarkdownFormatSelection, command: MarkdownFormatCommand) => MarkdownFormatResult;
|
|
11
|
+
//# sourceMappingURL=markdownFormatting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdownFormatting.d.ts","sourceRoot":"","sources":["../src/markdownFormatting.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN,QAAQ,GACR,eAAe,GACf,aAAa,GACb,MAAM,GACN,OAAO,GACP,OAAO,GACP,WAAW,GACX,WAAW,GACX,WAAW,GACX,aAAa,GACb,eAAe,GACf,YAAY,GACZ,iBAAiB,GACjB,YAAY,GACZ,OAAO,GACP,aAAa,GACb,UAAU,GACV,kBAAkB,CAAC;AAEvB,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,uBAAuB,CAAC;CACpC,CAAC;AA8WF,eAAO,MAAM,mBAAmB,GAC9B,MAAM,MAAM,EACZ,WAAW,uBAAuB,EAClC,SAAS,qBAAqB,KAC7B,oBAyCF,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type TextPatch } from "./textPatches";
|
|
2
|
+
export declare const LARGE_DOCUMENT_CHAR_THRESHOLD = 64000;
|
|
3
|
+
export declare const LARGE_DOCUMENT_LINE_THRESHOLD = 800;
|
|
4
|
+
export declare const LARGE_DOCUMENT_WORD_THRESHOLD = 8000;
|
|
5
|
+
export declare const LARGE_DOCUMENT_LONG_LINE_THRESHOLD = 8000;
|
|
6
|
+
export declare const LARGE_DOCUMENT_TABLE_RUN_THRESHOLD = 120;
|
|
7
|
+
export declare const LIVE_PREVIEW_CHAR_THRESHOLD = 24000;
|
|
8
|
+
export declare const HEAVY_PREVIEW_TABLE_RUN_THRESHOLD = 16;
|
|
9
|
+
export declare const HEAVY_PREVIEW_FENCE_LINE_THRESHOLD = 80;
|
|
10
|
+
export declare const HEAVY_PREVIEW_FENCE_CHAR_THRESHOLD = 12000;
|
|
11
|
+
export type PreviewBlockKind = "blank" | "blockquote" | "fence" | "heading" | "html" | "list" | "paragraph" | "table" | "thematic";
|
|
12
|
+
export type PreviewBlock = {
|
|
13
|
+
id: string;
|
|
14
|
+
kind: PreviewBlockKind;
|
|
15
|
+
text: string;
|
|
16
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
17
|
+
startLine: number;
|
|
18
|
+
endLine: number;
|
|
19
|
+
startOffset: number;
|
|
20
|
+
endOffset: number;
|
|
21
|
+
estimatedTop: number;
|
|
22
|
+
estimatedHeight: number;
|
|
23
|
+
};
|
|
24
|
+
export type PreviewBlockIndex = {
|
|
25
|
+
blocks: PreviewBlock[];
|
|
26
|
+
lineCount: number;
|
|
27
|
+
totalEstimatedHeight: number;
|
|
28
|
+
};
|
|
29
|
+
export type PreviewBlockMeasurements = Readonly<Record<string, number>>;
|
|
30
|
+
export type PreviewWindow = {
|
|
31
|
+
blocks: PreviewBlock[];
|
|
32
|
+
endIndex: number;
|
|
33
|
+
startIndex: number;
|
|
34
|
+
};
|
|
35
|
+
export type PreviewRenderableAnchor = {
|
|
36
|
+
endLine: number;
|
|
37
|
+
rendered: boolean;
|
|
38
|
+
sourceElement?: boolean;
|
|
39
|
+
startLine: number;
|
|
40
|
+
};
|
|
41
|
+
export type PreviewScrollMapAnchor = {
|
|
42
|
+
align: "end" | "preserve-offset";
|
|
43
|
+
lineNumber: number;
|
|
44
|
+
lineOffsetRatio?: number;
|
|
45
|
+
};
|
|
46
|
+
export type PreviewScrollMapOptions = {
|
|
47
|
+
edgePadding?: number;
|
|
48
|
+
viewportHeight: number;
|
|
49
|
+
};
|
|
50
|
+
export declare const getMarkdownLineCount: (markdown: string) => number;
|
|
51
|
+
export declare const hasLongMarkdownLine: (markdown: string, threshold?: number) => boolean;
|
|
52
|
+
export declare const hasLargeMarkdownWordCount: (markdown: string) => boolean;
|
|
53
|
+
export declare const hasLargeMarkdownDocumentShape: (markdown: string) => boolean;
|
|
54
|
+
export declare const isLargeMarkdownDocument: (markdown: string) => boolean;
|
|
55
|
+
export declare const hasHeavyMarkdownPreviewShape: (markdown: string) => boolean;
|
|
56
|
+
export declare const hasGlobalMarkdownSyntax: (markdown: string) => boolean;
|
|
57
|
+
export declare const shouldUseImmediateMarkdownPreview: (markdown: string) => boolean;
|
|
58
|
+
export declare const createPreviewBlockIndex: (markdown: string) => PreviewBlockIndex;
|
|
59
|
+
export declare const createOptimisticPreviewBlockIndex: (previousIndex: PreviewBlockIndex, previousMarkdown: string, nextMarkdown: string) => PreviewBlockIndex | null;
|
|
60
|
+
export declare const createOptimisticPreviewBlockIndexFromPatches: (previousIndex: PreviewBlockIndex, previousMarkdown: string, nextMarkdown: string, patches: readonly TextPatch[]) => PreviewBlockIndex | null;
|
|
61
|
+
export declare const applyPreviewBlockMeasurements: (index: PreviewBlockIndex, measurements: PreviewBlockMeasurements) => PreviewBlockIndex;
|
|
62
|
+
export declare const choosePreviewRenderableAnchor: <TAnchor extends PreviewRenderableAnchor>(anchors: readonly TAnchor[], sourceLineNumber: number) => TAnchor | null;
|
|
63
|
+
export declare const getPreviewScrollTopForSourceLine: (index: PreviewBlockIndex, anchor: PreviewScrollMapAnchor, options: PreviewScrollMapOptions) => number;
|
|
64
|
+
export declare const getPreviewWindow: (index: PreviewBlockIndex, scrollTop: number, viewportHeight: number, overscan?: number) => PreviewWindow;
|
|
65
|
+
export declare const mapPreviewLineToBlock: (index: PreviewBlockIndex, lineNumber: number) => PreviewBlock | null;
|
|
66
|
+
//# sourceMappingURL=previewBlockModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"previewBlockModel.d.ts","sourceRoot":"","sources":["../src/previewBlockModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAEvF,eAAO,MAAM,6BAA6B,QAAS,CAAC;AACpD,eAAO,MAAM,6BAA6B,MAAM,CAAC;AACjD,eAAO,MAAM,6BAA6B,OAAQ,CAAC;AACnD,eAAO,MAAM,kCAAkC,OAAQ,CAAC;AACxD,eAAO,MAAM,kCAAkC,MAAM,CAAC;AACtD,eAAO,MAAM,2BAA2B,QAAS,CAAC;AAClD,eAAO,MAAM,iCAAiC,KAAK,CAAC;AACpD,eAAO,MAAM,kCAAkC,KAAK,CAAC;AACrD,eAAO,MAAM,kCAAkC,QAAS,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GACxB,OAAO,GACP,YAAY,GACZ,OAAO,GACP,SAAS,GACT,MAAM,GACN,MAAM,GACN,WAAW,GACX,OAAO,GACP,UAAU,CAAC;AAEf,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;CACzB,CA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AM,YAgDvD,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAAI,UAAU,MAAM,YAGzB,CAAC;AA6V1C,eAAO,MAAM,uBAAuB,GAAI,UAAU,MAAM,KAAG,iBA4B1D,CAAC;AAgWF,eAAO,MAAM,iCAAiC,GAC5C,eAAe,iBAAiB,EAChC,kBAAkB,MAAM,EACxB,cAAc,MAAM,KACnB,iBAAiB,GAAG,IAMpB,CAAC;AAEJ,eAAO,MAAM,4CAA4C,GACvD,eAAe,iBAAiB,EAChC,kBAAkB,MAAM,EACxB,cAAc,MAAM,EACpB,SAAS,SAAS,SAAS,EAAE,KAC5B,iBAAiB,GAAG,IAUtB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,OAAO,iBAAiB,EACxB,cAAc,wBAAwB,KACrC,iBAyBF,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,OAAO,SAAS,uBAAuB,EACnF,SAAS,SAAS,OAAO,EAAE,EAC3B,kBAAkB,MAAM,KACvB,OAAO,GAAG,IAqDZ,CAAC;AAQF,eAAO,MAAM,gCAAgC,GAC3C,OAAO,iBAAiB,EACxB,QAAQ,sBAAsB,EAC9B,SAAS,uBAAuB,WA+CjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,iBAAiB,EACxB,WAAW,MAAM,EACjB,gBAAgB,MAAM,EACtB,iBAAgB,KACf,aA4CF,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,OAAO,iBAAiB,EAAE,YAAY,MAAM,wBACkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const TABULA_PRODUCT_SUPPORT_TARGETS: {
|
|
2
|
+
readonly betaMarkdownBytes: 150000;
|
|
3
|
+
readonly launchMarkdownBytes: 1000000;
|
|
4
|
+
readonly collaborationMinPeople: 2;
|
|
5
|
+
readonly collaborationMaxPeople: 5;
|
|
6
|
+
readonly collaborationSoakDurationMs: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const TABULA_LARGE_DOCUMENT_UX_POLICY: {
|
|
9
|
+
readonly editorResponsivenessFirst: true;
|
|
10
|
+
readonly splitViewPriority: "editor-responsiveness";
|
|
11
|
+
readonly previewRefresh: "idle-only";
|
|
12
|
+
readonly showTransientPreviewStatus: false;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=productPerformancePolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productPerformancePolicy.d.ts","sourceRoot":"","sources":["../src/productPerformancePolicy.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B;;;;;;CAMjC,CAAC;AAEX,eAAO,MAAM,+BAA+B;;;;;CAKlC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type CommentScope = "current" | "all";
|
|
2
|
+
export type RightPanelCommentFile = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
};
|
|
6
|
+
export type RightPanelComment = {
|
|
7
|
+
id: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
resolved?: boolean;
|
|
10
|
+
replies?: {
|
|
11
|
+
id?: string;
|
|
12
|
+
body?: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
export type RightPanelCommentGroup<TFile extends RightPanelCommentFile = RightPanelCommentFile, TComment extends RightPanelComment = RightPanelComment> = {
|
|
17
|
+
file: TFile;
|
|
18
|
+
comments: TComment[];
|
|
19
|
+
};
|
|
20
|
+
type RightPanelCommentGroups<TFile extends RightPanelCommentFile, TComment extends RightPanelComment> = {
|
|
21
|
+
openCommentGroups: RightPanelCommentGroup<TFile, TComment>[];
|
|
22
|
+
resolvedCommentGroups: RightPanelCommentGroup<TFile, TComment>[];
|
|
23
|
+
};
|
|
24
|
+
type RightPanelCommentScopeModelArgs<TFile extends RightPanelCommentFile, TComment extends RightPanelComment> = {
|
|
25
|
+
activeFileId: string;
|
|
26
|
+
openCommentGroups: RightPanelCommentGroup<TFile, TComment>[];
|
|
27
|
+
resolvedCommentGroups: RightPanelCommentGroup<TFile, TComment>[];
|
|
28
|
+
commentScope: CommentScope;
|
|
29
|
+
};
|
|
30
|
+
export declare const stripMarkdownExtension: (title: string) => string;
|
|
31
|
+
export declare const getRightPanelCommentGroups: <TFile extends RightPanelCommentFile, TComment extends RightPanelComment>(files: TFile[], commentsByFileId: Record<string, TComment[]>) => RightPanelCommentGroups<TFile, TComment>;
|
|
32
|
+
export declare const getRightPanelCommentScopeModel: <TFile extends RightPanelCommentFile, TComment extends RightPanelComment>({ activeFileId, openCommentGroups, resolvedCommentGroups, commentScope, }: RightPanelCommentScopeModelArgs<TFile, TComment>) => {
|
|
33
|
+
scopedOpenCommentGroups: RightPanelCommentGroup<TFile, TComment>[];
|
|
34
|
+
scopedResolvedCommentGroups: RightPanelCommentGroup<TFile, TComment>[];
|
|
35
|
+
hasAnyComments: boolean;
|
|
36
|
+
hideSingleActiveFileHeader: boolean;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=rightPanelCommentViewModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rightPanelCommentViewModel.d.ts","sourceRoot":"","sources":["../src/rightPanelCommentViewModel.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,KAAK,CAAC;AAE7C,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE;QACR,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;KACnB,EAAE,C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"room-event";
|
|
2
|
+
export type EncryptedEnvelope = {
|
|
3
|
+
v: 1;
|
|
4
|
+
roomId: string;
|
|
5
|
+
kind: EnvelopeKind;
|
|
6
|
+
version: number;
|
|
7
|
+
iv: string;
|
|
8
|
+
ciphertext: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
};
|
|
11
|
+
export type RoomEnvelopeMetadata = Pick<EncryptedEnvelope, "v" | "roomId" | "kind" | "version" | "createdAt">;
|
|
12
|
+
export declare const createRoomAad: ({ v, roomId, kind, version, createdAt }: RoomEnvelopeMetadata) => Uint8Array<ArrayBuffer>;
|
|
13
|
+
export declare const createRoomEnvelope: ({ roomKey, roomId, kind, version, plaintext, createdAt, }: {
|
|
14
|
+
roomKey: string | CryptoKey;
|
|
15
|
+
roomId: string;
|
|
16
|
+
kind: EnvelopeKind;
|
|
17
|
+
version: number;
|
|
18
|
+
plaintext: Uint8Array;
|
|
19
|
+
createdAt?: string;
|
|
20
|
+
}) => Promise<EncryptedEnvelope>;
|
|
21
|
+
export declare const decryptRoomEnvelope: ({ roomKey, envelope, }: {
|
|
22
|
+
roomKey: string | CryptoKey;
|
|
23
|
+
envelope: EncryptedEnvelope;
|
|
24
|
+
}) => Promise<Uint8Array<ArrayBuffer>>;
|
|
25
|
+
export declare const validateRoomPayload: (envelope: unknown) => envelope is EncryptedEnvelope;
|
|
26
|
+
export declare const isEnvelopeKind: (value: unknown) => value is EnvelopeKind;
|
|
27
|
+
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/room/envelope.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC;AAExC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,EAAE,CAAC,CAAC;IACL,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,EAAE,GAAG,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC,CAAC;AAI9G,eAAO,MAAM,aAAa,GAAI,yCAAyC,oBAAoB,4BACd,CAAC;AAE9E,eAAO,MAAM,kBAAkB,GAAU,2DAOtC;IACD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,KAAG,OAAO,CAAC,iBAAiB,CAW5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,wBAGvC;IACD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,iBAAiB,CAAC;CAC7B,qCAKE,CAAC;AAEJ,eAAO,MAAM,mBAAmB,GAAI,UAAU,OAAO,KAAG,QAAQ,IAAI,iBAenE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,YACjC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { e as p, a as i, d as m, b as c } from "../encryption-B0xRVvlF.js";
|
|
2
|
+
const v = new TextEncoder(), s = ({ v: e, roomId: t, kind: a, version: r, createdAt: o }) => v.encode(JSON.stringify({ v: e, roomId: t, kind: a, version: r, createdAt: o })), u = async ({
|
|
3
|
+
roomKey: e,
|
|
4
|
+
roomId: t,
|
|
5
|
+
kind: a,
|
|
6
|
+
version: r,
|
|
7
|
+
plaintext: o,
|
|
8
|
+
createdAt: d = (/* @__PURE__ */ new Date()).toISOString()
|
|
9
|
+
}) => {
|
|
10
|
+
const n = { v: 1, roomId: t, kind: a, version: r, createdAt: d }, { encryptedBuffer: y, iv: f } = await p(e, o, {
|
|
11
|
+
additionalData: s(n)
|
|
12
|
+
});
|
|
13
|
+
return {
|
|
14
|
+
...n,
|
|
15
|
+
iv: i(f),
|
|
16
|
+
ciphertext: i(new Uint8Array(y))
|
|
17
|
+
};
|
|
18
|
+
}, w = async ({
|
|
19
|
+
roomKey: e,
|
|
20
|
+
envelope: t
|
|
21
|
+
}) => new Uint8Array(
|
|
22
|
+
await m(c(t.iv), c(t.ciphertext), e, {
|
|
23
|
+
additionalData: s(t)
|
|
24
|
+
})
|
|
25
|
+
), x = (e) => {
|
|
26
|
+
if (!e || typeof e != "object" || Array.isArray(e))
|
|
27
|
+
return !1;
|
|
28
|
+
const t = e;
|
|
29
|
+
return t.v === 1 && typeof t.roomId == "string" && g(t.kind) && Number.isSafeInteger(t.version) && typeof t.iv == "string" && typeof t.ciphertext == "string" && typeof t.createdAt == "string";
|
|
30
|
+
}, g = (e) => e === "room-event";
|
|
31
|
+
export {
|
|
32
|
+
s as createRoomAad,
|
|
33
|
+
u as createRoomEnvelope,
|
|
34
|
+
w as decryptRoomEnvelope,
|
|
35
|
+
g as isEnvelopeKind,
|
|
36
|
+
x as validateRoomPayload
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=envelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.js","sources":["../../src/room/envelope.ts"],"sourcesContent":["import { decodeBase64Url, encodeBase64Url } from \"../data/base64Url\";\nimport { decryptData, encryptData } from \"../data/encryption\";\n\nexport type EnvelopeKind = \"room-event\";\n\nexport type EncryptedEnvelope = {\n v: 1;\n roomId: string;\n kind: EnvelopeKind;\n version: number;\n iv: string;\n ciphertext: string;\n createdAt: string;\n};\n\nexport type RoomEnvelopeMetadata = Pick<EncryptedEnvelope, \"v\" | \"roomId\" | \"kind\" | \"version\" | \"createdAt\">;\n\nconst textEncoder = new TextEncoder();\n\nexport const createRoomAad = ({ v, roomId, kind, version, createdAt }: RoomEnvelopeMetadata) =>\n textEncoder.encode(JSON.stringify({ v, roomId, kind, version, createdAt }));\n\nexport const createRoomEnvelope = async ({\n roomKey,\n roomId,\n kind,\n version,\n plaintext,\n createdAt = new Date().toISOString(),\n}: {\n roomKey: string | CryptoKey;\n roomId: string;\n kind: EnvelopeKind;\n version: number;\n plaintext: Uint8Array;\n createdAt?: string;\n}): Promise<EncryptedEnvelope> => {\n const metadata = { v: 1, roomId, kind, version, createdAt } as const;\n const { encryptedBuffer, iv } = await encryptData(roomKey, plaintext, {\n additionalData: createRoomAad(metadata),\n });\n\n return {\n ...metadata,\n iv: encodeBase64Url(iv),\n ciphertext: encodeBase64Url(new Uint8Array(encryptedBuffer)),\n };\n};\n\nexport const decryptRoomEnvelope = async ({\n roomKey,\n envelope,\n}: {\n roomKey: string | CryptoKey;\n envelope: EncryptedEnvelope;\n}) =>\n new Uint8Array(\n await decryptData(decodeBase64Url(envelope.iv), decodeBase64Url(envelope.ciphertext), roomKey, {\n additionalData: createRoomAad(envelope),\n }),\n );\n\nexport const validateRoomPayload = (envelope: unknown): envelope is EncryptedEnvelope => {\n if (!envelope || typeof envelope !== \"object\" || Array.isArray(envelope)) {\n return false;\n }\n\n const value = envelope as Partial<EncryptedEnvelope>;\n return (\n value.v === 1 &&\n typeof value.roomId === \"string\" &&\n isEnvelopeKind(value.kind) &&\n Number.isSafeInteger(value.version) &&\n typeof value.iv === \"string\" &&\n typeof value.ciphertext === \"string\" &&\n typeof value.createdAt === \"string\"\n );\n};\n\nexport const isEnvelopeKind = (value: unknown): value is EnvelopeKind =>\n value === \"room-event\";\n"],"names":["textEncoder","createRoomAad","v","roomId","kind","version","createdAt","createRoomEnvelope","roomKey","plaintext","metadata","encryptedBuffer","iv","encryptData","encodeBase64Url","decryptRoomEnvelope","envelope","decryptData","decodeBase64Url","validateRoomPayload","value","isEnvelopeKind"],"mappings":";AAiBA,MAAMA,IAAc,IAA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AAe,YAC5B,OAAOA,EAAM,aAAc;AAE/B,GAEaC,IAAiB,CAACD,MAC7BA,MAAU;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const ROOM_WIRE_PROTOCOL_VERSION = 2;
|
|
2
|
+
export declare const ROOM_WIRE_CHUNK_BYTES: number;
|
|
3
|
+
export declare const ROOM_WIRE_CHUNK_PAYLOAD_BYTES: number;
|
|
4
|
+
export declare const ROOM_WIRE_MAX_MESSAGE_BYTES: number;
|
|
5
|
+
export declare const ROOM_WIRE_MAX_CRDT_STATE_BYTES: number;
|
|
6
|
+
export declare const ROOM_WIRE_MAX_CHUNKS = 64;
|
|
7
|
+
export declare const ROOM_WIRE_MAX_INFLIGHT_PER_ACTOR = 4;
|
|
8
|
+
export declare const ROOM_WIRE_CHUNK_TTL_MS = 10000;
|
|
9
|
+
export declare const ROOM_WIRE_MAX_BUFFERED_BYTES: number;
|
|
10
|
+
export type RoomWirePacketType = "sync.message" | "awareness.updated";
|
|
11
|
+
export type RoomWireDataPacket = {
|
|
12
|
+
type: RoomWirePacketType;
|
|
13
|
+
senderId: string;
|
|
14
|
+
payload: Uint8Array;
|
|
15
|
+
};
|
|
16
|
+
export type RoomWireChunkPacket = {
|
|
17
|
+
type: "sync.chunk";
|
|
18
|
+
senderId: string;
|
|
19
|
+
messageId: string;
|
|
20
|
+
chunkIndex: number;
|
|
21
|
+
chunkCount: number;
|
|
22
|
+
totalBytes: number;
|
|
23
|
+
payload: Uint8Array;
|
|
24
|
+
};
|
|
25
|
+
export type RoomWirePacket = RoomWireDataPacket | RoomWireChunkPacket;
|
|
26
|
+
export type RoomWirePacketDecodeResult = {
|
|
27
|
+
ok: true;
|
|
28
|
+
packet: RoomWirePacket;
|
|
29
|
+
} | {
|
|
30
|
+
ok: false;
|
|
31
|
+
reason: "invalid" | "unsupported" | "oversized";
|
|
32
|
+
};
|
|
33
|
+
export declare const encodeRoomWirePacket: (packet: RoomWirePacket) => Uint8Array<ArrayBuffer>;
|
|
34
|
+
export declare const decodeRoomWirePacket: (bytes: Uint8Array) => RoomWirePacketDecodeResult;
|
|
35
|
+
export declare const encodeRoomWirePackets: (packet: RoomWireDataPacket, createMessageId: () => string) => Uint8Array[];
|
|
36
|
+
export type RoomChunkAssembler = {
|
|
37
|
+
push(packet: RoomWireChunkPacket, now?: number): RoomWireDataPacket | null;
|
|
38
|
+
clear(): void;
|
|
39
|
+
prune(now?: number): void;
|
|
40
|
+
readonly pendingCount: number;
|
|
41
|
+
};
|
|
42
|
+
export declare const createRoomChunkAssembler: () => RoomChunkAssembler;
|
|
43
|
+
//# sourceMappingURL=roomBinaryProtocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roomBinaryProtocol.d.ts","sourceRoot":"","sources":["../src/roomBinaryProtocol.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,qBAAqB,QAAa,CAAC;AAChD,eAAO,MAAM,6BAA6B,QAA+B,CAAC;AAC1E,eAAO,MAAM,2BAA2B,QAAmB,CAAC;AAC5D,eAAO,MAAM,8BAA8B,QAAmB,CAAC;AAC/D,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAC7C,eAAO,MAAM,4BAA4B,QAAmB,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG,mBAAmB,CAAC;AAEtE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;AAEtE,MAAM,MAAM,0BAA0B,GAClC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAE,GACpC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,CAAA;CAAE,CAAC;AAiBnE,eAAO,MAAM,oBAAoB,GAAI,QAAQ,cAAc,4BAoB1D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,OAAO,UAAU,KAAG,0BAuDxD,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,QAAQ,kBAAkB,EAC1B,iBAAiB,MAAM,MAAM,KAC5B,UAAU,EA+BZ,CAAC;AAWF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,MAAM,EAAE,mBAAmB,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAAC;IAC3E,KAAK,IAAI,IAAI,CAAC;IACd,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAAO,kBA2E3C,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type RoomActorKind = "human" | "agent";
|
|
2
|
+
export type RoomActorClient = "tabula-md" | "tabula-mcp" | "custom";
|
|
3
|
+
export type RoomCapability = "presence" | "read" | "write";
|
|
4
|
+
export type RoomActor = {
|
|
5
|
+
id: string;
|
|
6
|
+
kind: RoomActorKind;
|
|
7
|
+
name: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
client: RoomActorClient;
|
|
10
|
+
capabilities: RoomCapability[];
|
|
11
|
+
joinedAt: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const HUMAN_ROOM_CAPABILITIES: readonly RoomCapability[];
|
|
14
|
+
export declare const AGENT_ROOM_CAPABILITIES: readonly RoomCapability[];
|
|
15
|
+
export declare const DEFAULT_HUMAN_ACTOR_CLIENT: RoomActorClient;
|
|
16
|
+
export declare const DEFAULT_AGENT_ACTOR_CLIENT: RoomActorClient;
|
|
17
|
+
export declare const ROOM_ACTOR_ADJECTIVES: readonly ["Bright", "Calm", "Careful", "Clear", "Clever", "Curious", "Gentle", "Kind", "Lively", "Nimble", "Patient", "Quiet", "Ready", "Sharp", "Steady", "Thoughtful", "Warm", "Wise"];
|
|
18
|
+
export declare const ROOM_ACTOR_COLORS: readonly ["#0f766e", "#2563eb", "#7c3aed", "#c2410c", "#be123c", "#047857", "#0e7490", "#4f46e5", "#9333ea", "#b45309"];
|
|
19
|
+
export declare const DEFAULT_ACTOR_NAME = "Curious Human";
|
|
20
|
+
export declare const DEFAULT_ACTOR_COLOR: "#0f766e";
|
|
21
|
+
export declare const ROOM_ACTOR_MAX_ID_LENGTH = 128;
|
|
22
|
+
export declare const ROOM_ACTOR_MAX_NAME_LENGTH = 40;
|
|
23
|
+
export declare const isRoomCapability: (value: unknown) => value is RoomCapability;
|
|
24
|
+
export declare const getDefaultRoomCapabilities: (kind: RoomActorKind) => RoomCapability[];
|
|
25
|
+
export declare const normalizeRoomCapabilities: (capabilities: unknown, kind?: RoomActorKind) => RoomCapability[];
|
|
26
|
+
export declare const hasRoomCapability: (actor: Pick<RoomActor, "capabilities"> | null | undefined, capability: RoomCapability) => boolean;
|
|
27
|
+
export declare const createRoomActorName: (kind?: RoomActorKind, actorId?: string) => string;
|
|
28
|
+
export declare const createRoomActorColor: (actorId?: string) => "#0f766e" | "#2563eb" | "#7c3aed" | "#c2410c" | "#be123c" | "#047857" | "#0e7490" | "#4f46e5" | "#9333ea" | "#b45309";
|
|
29
|
+
export declare const createRoomActor: ({ id, kind, name, color, client, capabilities, joinedAt, }: {
|
|
30
|
+
id: string;
|
|
31
|
+
kind?: RoomActorKind;
|
|
32
|
+
name?: string;
|
|
33
|
+
color?: string;
|
|
34
|
+
client?: RoomActorClient;
|
|
35
|
+
capabilities?: readonly RoomCapability[];
|
|
36
|
+
joinedAt?: string;
|
|
37
|
+
}) => RoomActor;
|
|
38
|
+
export declare const parseRoomActor: (value: unknown) => RoomActor | null;
|
|
39
|
+
//# sourceMappingURL=roomCollaboration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roomCollaboration.d.ts","sourceRoot":"","sources":["../src/roomCollaboration.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,CAAC;AAEpE,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,eAAe,CAAC;IACxB,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,SAAS,cAAc,EAI5D,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,SAAS,cAAc,EAI5D,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,eAA6B,CAAC;AACvE,eAAO,MAAM,0BAA0B,EAAE,eAA8B,CAAC;AACxE,eAAO,MAAM,qBAAqB,0LAmBxB,CAAC;AACX,eAAO,MAAM,iBAAiB,yHAWpB,CAAC;AACX,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAClD,eAAO,MAAM,mBAAmB,WAAuB,CAAC;AACxD,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAa7C,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,cACI,CAAC;AAEhE,eAAO,MAAM,0BAA0B,GAAI,MAAM,aAAa,qBACkB,CAAC;AAEjF,eAAO,MAAM,yBAAyB,GACpC,cAAc,OAAO,EACrB,OAAM,aAAuB,KAC5B,cAAc,EAOhB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,OAAO,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,GAAG,IAAI,GAAG,SAAS,EACzD,YAAY,cAAc,YAC0B,CAAC;AAWvD,eAAO,MAAM,mBAAmB,GAAI,OAAM,aAAuB,EAAE,gBAAY,WAM9E,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,gBAAY,0HAGvB,CAAC;AAE3B,eAAO,MAAM,eAAe,GAAI,4DAQ7B;IACD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,YAAY,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,KAAG,SAaH,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,KAAG,SAAS,GAAG,IAsC3D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { EncryptedEnvelope, EnvelopeKind } from "./room/envelope";
|
|
2
|
+
export type RoomJoinedMessage = {
|
|
3
|
+
roomId: string;
|
|
4
|
+
clientId: string;
|
|
5
|
+
peerCount: number;
|
|
6
|
+
};
|
|
7
|
+
export type RoomPeersMessage = {
|
|
8
|
+
roomId: string;
|
|
9
|
+
peers: string[];
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=roomProtocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roomProtocol.d.ts","sourceRoot":"","sources":["../src/roomProtocol.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type RoomRouteLocation = {
|
|
2
|
+
hash: string;
|
|
3
|
+
origin: string;
|
|
4
|
+
pathname: string;
|
|
5
|
+
};
|
|
6
|
+
export type RoomSession = {
|
|
7
|
+
roomId: string;
|
|
8
|
+
roomKey: string;
|
|
9
|
+
shareUrl: string;
|
|
10
|
+
};
|
|
11
|
+
export type ParsedRoomLocation = RoomSession;
|
|
12
|
+
export declare const ROOM_ID_BYTES = 16;
|
|
13
|
+
export declare const ROOM_KEY_BYTES = 32;
|
|
14
|
+
export declare const ROOM_KEY_PATTERN: RegExp;
|
|
15
|
+
export declare const parseRoomFromHash: (hash: string) => Pick<RoomSession, "roomId" | "roomKey"> | null;
|
|
16
|
+
export declare const parseRoomKeyFromHash: (hash: string) => string | null;
|
|
17
|
+
export declare const createRoomShareUrl: (origin: string, roomId: string, roomKey: string) => string;
|
|
18
|
+
export declare const parseRoomLocation: (location: RoomRouteLocation) => ParsedRoomLocation | null;
|
|
19
|
+
export declare const parseRoomShareUrl: (shareUrl: string) => ParsedRoomLocation | null;
|
|
20
|
+
//# sourceMappingURL=roomShareLinkModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roomShareLinkModel.d.ts","sourceRoot":"","sources":["../src/roomShareLinkModel.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAE7C,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,gBAAgB,QAAqB,CAAC;AAEnD,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,SAAS,CAAC,GAAG,IAwB1F,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,kBAWhD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,QAAQ,MAAM,EAAE,SAAS,MAAM,WAC1C,CAAC;AAEzC,eAAO,MAAM,iBAAiB,GAAI,UAAU,iBAAiB,KAAG,kBAAkB,GAAG,IAepF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,kBAAkB,GAAG,IAMzE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type RoomShareLinkView = {
|
|
2
|
+
canCopy: boolean;
|
|
3
|
+
display: string;
|
|
4
|
+
title: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const getRoomShareLinkView: (shareUrl?: string, expectedRoomId?: string) => RoomShareLinkView;
|
|
8
|
+
//# sourceMappingURL=shareLinkViewModel.d.ts.map
|