@q9labsai/chalk-whiteboard 5.2.0 → 5.2.1
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/dist/assets.d.ts +13 -0
- package/dist/assets.js +10 -0
- package/dist/chunk-BN4VA2BS.js +20 -0
- package/dist/collab/view-limits.d.ts +1 -0
- package/dist/collab/view.d.ts +26 -0
- package/dist/embedded/chalk-whiteboard/Figtree-Regular.ttf +0 -0
- package/dist/embedded/chalk-whiteboard/Figtree-SemiBold.ttf +0 -0
- package/dist/embedded/chalk-whiteboard/asset-manifest.json +19 -4
- package/dist/embedded/chalk-whiteboard/chalk.css +44 -0
- package/dist/embedded/chalk-whiteboard/licenses/Figtree.txt +93 -0
- package/dist/embedded/chalk-whiteboard/renderer.js +1669 -1418
- package/dist/embedded/controller.d.ts +16 -14
- package/dist/embedded/index.d.ts +1 -1
- package/dist/embedded/index.js +127 -8
- package/dist/embedded/protocol.d.ts +86 -0
- package/dist/embedded/renderer-assets.d.ts +1 -0
- package/dist/embedded/renderer-bridge.d.ts +10 -0
- package/dist/embedded/renderer-entry.d.ts +2 -0
- package/dist/embedded/renderer.d.ts +0 -5
- package/dist/react/board/Board.d.ts +41 -0
- package/dist/react/board/BoardCursors.d.ts +23 -0
- package/dist/react/board/BoardIcon.d.ts +46 -0
- package/dist/react/board/BoardIsland.d.ts +22 -0
- package/dist/react/board/BoardMenu.d.ts +20 -0
- package/dist/react/board/BoardStyles.d.ts +2 -0
- package/dist/react/board/board-draw-policy.d.ts +10 -0
- package/dist/react/board/board-engine.d.ts +30 -0
- package/dist/react/board/board-history.d.ts +7 -0
- package/dist/react/board/board-model.d.ts +91 -0
- package/dist/react/board/board-toasts.d.ts +15 -0
- package/dist/react/board/board-view-versions.d.ts +1 -0
- package/dist/react/board/controls/ChalkMenu.d.ts +22 -0
- package/dist/react/board/controls/ChalkPopover.d.ts +13 -0
- package/dist/react/board/controls/ChalkTooltip.d.ts +5 -0
- package/dist/react/board/controls/index.d.ts +3 -0
- package/dist/react/board/useMediaQuery.d.ts +6 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.js +1811 -18
- package/package.json +19 -5
package/dist/assets.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface WhiteboardAssetPaths {
|
|
2
|
+
excalidrawCssPath: string;
|
|
3
|
+
mathJaxBasePath: string;
|
|
4
|
+
}
|
|
5
|
+
declare global {
|
|
6
|
+
interface Window {
|
|
7
|
+
EXCALIDRAW_ASSET_PATH?: string;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/** Configure from a bootstrap module imported before the SDK. Hosts serve these files. */
|
|
11
|
+
export declare function configureWhiteboardAssets(paths: WhiteboardAssetPaths): void;
|
|
12
|
+
export declare function getWhiteboardAssets(): WhiteboardAssetPaths | undefined;
|
|
13
|
+
export declare function resolveExcalidrawAssetPath(cssPath: string): string;
|
package/dist/assets.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/assets.ts
|
|
2
|
+
var selfHostedAssets;
|
|
3
|
+
function configureWhiteboardAssets(paths) {
|
|
4
|
+
selfHostedAssets = paths;
|
|
5
|
+
if (typeof window !== "undefined") {
|
|
6
|
+
window.EXCALIDRAW_ASSET_PATH = resolveExcalidrawAssetPath(paths.excalidrawCssPath);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function getWhiteboardAssets() {
|
|
10
|
+
return selfHostedAssets;
|
|
11
|
+
}
|
|
12
|
+
function resolveExcalidrawAssetPath(cssPath) {
|
|
13
|
+
return new URL(".", new URL(cssPath, document.baseURI)).href;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
configureWhiteboardAssets,
|
|
18
|
+
getWhiteboardAssets,
|
|
19
|
+
resolveExcalidrawAssetPath
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WHITEBOARD_VIEW_PEOPLE_MAX = 500;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type WhiteboardView = {
|
|
2
|
+
readonly x: number;
|
|
3
|
+
readonly y: number;
|
|
4
|
+
readonly width: number;
|
|
5
|
+
readonly height: number;
|
|
6
|
+
readonly bring: boolean;
|
|
7
|
+
readonly lead?: boolean;
|
|
8
|
+
} & ({
|
|
9
|
+
readonly ownerId: string;
|
|
10
|
+
readonly ownerSequence: number;
|
|
11
|
+
} | {
|
|
12
|
+
readonly ownerId?: never;
|
|
13
|
+
readonly ownerSequence?: never;
|
|
14
|
+
}) & ({
|
|
15
|
+
readonly originParticipantId: string;
|
|
16
|
+
readonly originSequence: number;
|
|
17
|
+
readonly originEpoch?: string;
|
|
18
|
+
} | {
|
|
19
|
+
readonly originParticipantId?: never;
|
|
20
|
+
readonly originSequence?: never;
|
|
21
|
+
readonly originEpoch?: never;
|
|
22
|
+
});
|
|
23
|
+
export type WhiteboardViewBounds = {
|
|
24
|
+
readonly maxCoordinate: number;
|
|
25
|
+
readonly maxExtent: number;
|
|
26
|
+
};
|
|
Binary file
|
|
Binary file
|
|
@@ -6,14 +6,24 @@
|
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": "chalk.css",
|
|
9
|
-
"bytes":
|
|
10
|
-
"sha256": "
|
|
9
|
+
"bytes": 1903,
|
|
10
|
+
"sha256": "5b6358fa1f767687b37105848c962cb64aa6309827e8d46428a2177ccd42effe"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"path": "compatibility-manifest.json",
|
|
14
14
|
"bytes": 1219,
|
|
15
15
|
"sha256": "34241119dc9e5d9948cc780914de366a23f152a8bc84328eedee67962b8c4296"
|
|
16
16
|
},
|
|
17
|
+
{
|
|
18
|
+
"path": "Figtree-Regular.ttf",
|
|
19
|
+
"bytes": 40140,
|
|
20
|
+
"sha256": "4e2e9876c4a908c2cbe410ceb648e4724464a84492bd49cb2d6e7b0d3f769a66"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "Figtree-SemiBold.ttf",
|
|
24
|
+
"bytes": 40360,
|
|
25
|
+
"sha256": "1b76aae525b51758fc0c9c5096f33d90831657d3ad2fe3c34fb7e666d76f8960"
|
|
26
|
+
},
|
|
17
27
|
{
|
|
18
28
|
"path": "fonts/Assistant/Assistant-Bold.woff2",
|
|
19
29
|
"bytes": 20380,
|
|
@@ -1199,6 +1209,11 @@
|
|
|
1199
1209
|
"bytes": 1067,
|
|
1200
1210
|
"sha256": "1352d204fdb90d5e482c13139d848bc2c9300a9a7de358a0a558a23e72d0d8be"
|
|
1201
1211
|
},
|
|
1212
|
+
{
|
|
1213
|
+
"path": "licenses/Figtree.txt",
|
|
1214
|
+
"bytes": 4388,
|
|
1215
|
+
"sha256": "140d37233e7f3ce7313798befa9600893bcceaf41a55fa0fa5ad52f7f657a268"
|
|
1216
|
+
},
|
|
1202
1217
|
{
|
|
1203
1218
|
"path": "licenses/MathJax.txt",
|
|
1204
1219
|
"bytes": 11358,
|
|
@@ -1216,8 +1231,8 @@
|
|
|
1216
1231
|
},
|
|
1217
1232
|
{
|
|
1218
1233
|
"path": "renderer.js",
|
|
1219
|
-
"bytes":
|
|
1220
|
-
"sha256": "
|
|
1234
|
+
"bytes": 9145221,
|
|
1235
|
+
"sha256": "37a825e816c3f1eba5dd9087e804e638c13719a7c137dd7a1d27943863670f2d"
|
|
1221
1236
|
},
|
|
1222
1237
|
{
|
|
1223
1238
|
"path": "THIRD_PARTY_NOTICES.json",
|
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
@font-face{font-family:Figtree;src:url('./Figtree-Regular.ttf')}@font-face{font-family:Figtree;src:url('./Figtree-SemiBold.ttf');font-weight:600}
|
|
2
|
+
[data-chalk]{height:100%;width:100%;font-family:Figtree,system-ui,sans-serif;color:var(--chalk-text)}
|
|
3
|
+
[data-chalk] *{box-sizing:border-box}button{font:inherit;color:inherit;background:none;border:0;padding:0}button:disabled{opacity:.35}
|
|
4
|
+
.chalk-menu {
|
|
5
|
+
position: absolute;
|
|
6
|
+
z-index: 80;
|
|
7
|
+
min-width: 250px;
|
|
8
|
+
padding: 6px;
|
|
9
|
+
background: var(--chalk-popover);
|
|
10
|
+
border: 1px solid var(--chalk-line-strong);
|
|
11
|
+
border-radius: 12px;
|
|
12
|
+
box-shadow: 0 12px 32px var(--chalk-menu-shadow-color);
|
|
13
|
+
animation: pin 0.18s var(--chalk-ease-out-expo);
|
|
14
|
+
}
|
|
15
|
+
.chalk-menu-item {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 10px;
|
|
19
|
+
width: 100%;
|
|
20
|
+
min-height: 40px;
|
|
21
|
+
padding: 0 10px;
|
|
22
|
+
border-radius: 9px;
|
|
23
|
+
text-align: left;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
}
|
|
26
|
+
.chalk-menu-item:hover,
|
|
27
|
+
.chalk-menu-item[data-highlighted],
|
|
28
|
+
.chalk-menu-item:focus-visible {
|
|
29
|
+
background: var(--chalk-hover);
|
|
30
|
+
}
|
|
31
|
+
.chalk-menu-check {
|
|
32
|
+
width: 18px;
|
|
33
|
+
display: grid;
|
|
34
|
+
place-items: center;
|
|
35
|
+
flex: none;
|
|
36
|
+
}
|
|
37
|
+
.chalk-menu-label {
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
color: var(--chalk-muted-text);
|
|
41
|
+
padding: 8px 10px 4px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.chalk-menu-positioner{z-index:80}.chalk-popover-positioner{z-index:85}.chalk-menu{position:relative;font-family:Figtree,system-ui,sans-serif;color:var(--chalk-text)}.chalk-menu-item{cursor:pointer;min-height:44px}.chalk-menu-item[data-disabled]{opacity:.35;pointer-events:none}
|
|
1
45
|
html,body,#root{height:100%;width:100%;margin:0;overflow:hidden;background:#fff}
|
|
2
46
|
#root>div{height:100%;width:100%}
|
|
3
47
|
.chalk-whiteboard-loading,.chalk-whiteboard-closed{height:100%;display:flex;align-items:center;justify-content:center;font:600 15px Assistant,system-ui,sans-serif;color:#475569}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2022 The Figtree Project Authors (https://github.com/erikdkennedy/figtree)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|