@q9labsai/chalk-react-native 5.1.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/{chunk-4L5GXJ36.js → chunk-BXDD5BE4.js} +23 -1
  3. package/dist/{chunk-MBZRE4US.js → chunk-PPQSOU35.js} +5 -5
  4. package/dist/client.js +1 -0
  5. package/dist/components/EmbeddedWhiteboard.d.ts +8 -4
  6. package/dist/frame/call-controls.d.ts +2 -0
  7. package/dist/frame/use-landscape-chrome.d.ts +8 -0
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.js +358 -97
  10. package/dist/invites.d.ts +5 -0
  11. package/dist/invites.js +3 -1
  12. package/dist/primitives/IconButton.d.ts +1 -0
  13. package/dist/primitives/NameTag.d.ts +2 -1
  14. package/dist/primitives/TileShell.d.ts +2 -1
  15. package/dist/stage/ParticipantTile.d.ts +3 -1
  16. package/dist/stage/TileSheet.d.ts +1 -1
  17. package/dist/stage/stage-view.d.ts +4 -0
  18. package/dist/ui.js +1 -1
  19. package/dist/whiteboard/export-board-image.d.ts +6 -0
  20. package/dist/whiteboard/native-board-session.d.ts +15 -0
  21. package/embedded/chalk-whiteboard/Figtree-Regular.ttf +0 -0
  22. package/embedded/chalk-whiteboard/Figtree-SemiBold.ttf +0 -0
  23. package/embedded/chalk-whiteboard/asset-manifest.json +19 -4
  24. package/embedded/chalk-whiteboard/chalk.css +44 -0
  25. package/embedded/chalk-whiteboard/licenses/Figtree.txt +93 -0
  26. package/embedded/chalk-whiteboard/renderer.js +1669 -1418
  27. package/package.json +11 -6
  28. package/src/components/EmbeddedWhiteboard.tsx +90 -6
  29. package/src/dock/Dock.tsx +14 -3
  30. package/src/dock/MoreSheet.tsx +23 -0
  31. package/src/frame/CallFrame.tsx +20 -33
  32. package/src/frame/call-controls.ts +4 -0
  33. package/src/frame/use-landscape-chrome.ts +22 -0
  34. package/src/index.ts +2 -2
  35. package/src/invites.ts +32 -1
  36. package/src/primitives/IconButton.tsx +6 -5
  37. package/src/primitives/NameTag.tsx +7 -1
  38. package/src/primitives/TileShell.tsx +3 -1
  39. package/src/space-client/create-native-space-client.ts +1 -0
  40. package/src/stage/ContentTile.tsx +64 -19
  41. package/src/stage/ParticipantTile.tsx +6 -4
  42. package/src/stage/Stage.tsx +37 -6
  43. package/src/stage/TileSheet.tsx +17 -2
  44. package/src/stage/stage-view.tsx +11 -1
  45. package/src/whiteboard/export-board-image.ts +21 -0
  46. package/src/whiteboard/native-board-session.ts +29 -0
package/dist/invites.d.ts CHANGED
@@ -2,6 +2,11 @@ export type SpaceInviteLink = {
2
2
  readonly slug: string;
3
3
  readonly spaceInviteToken: string;
4
4
  };
5
+ export type ChalkInviteLink = {
6
+ readonly slug?: string;
7
+ readonly spaceInviteToken: string;
8
+ };
5
9
  export declare function parseSpaceInviteLink(input: string): SpaceInviteLink | null;
10
+ export declare function parseChalkInviteLink(input: string): ChalkInviteLink | null;
6
11
  export declare function extractSpaceInviteFromLink(input: string): SpaceInviteLink | null;
7
12
  export declare function getClipboardInviteSuggestion(clipboardText: string | null | undefined, currentInput?: string): string | null;
package/dist/invites.js CHANGED
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  extractSpaceInviteFromLink,
3
3
  getClipboardInviteSuggestion,
4
+ parseChalkInviteLink,
4
5
  parseSpaceInviteLink
5
- } from "./chunk-4L5GXJ36.js";
6
+ } from "./chunk-BXDD5BE4.js";
6
7
  export {
7
8
  extractSpaceInviteFromLink,
8
9
  getClipboardInviteSuggestion,
10
+ parseChalkInviteLink,
9
11
  parseSpaceInviteLink
10
12
  };
@@ -19,6 +19,7 @@ export type IconButtonProps = {
19
19
  /** Sits directly on the call canvas (dock, header); the light theme rings it with a hairline. */
20
20
  readonly onCanvas?: boolean;
21
21
  readonly disabled?: boolean;
22
+ readonly busy?: boolean;
22
23
  readonly testID?: string;
23
24
  };
24
25
  /** The mockup's round button (`.rb`): press scale 0.94 over 150 ms, background switches at once. */
@@ -2,6 +2,7 @@ import { type IconName } from "../icons/Icon";
2
2
  export type NameTagProps = {
3
3
  readonly name: string;
4
4
  readonly muted?: boolean;
5
+ readonly following?: boolean;
5
6
  readonly pinned?: boolean;
6
7
  /** A leading icon for a tile that isn't a person, such as `share` on a shared screen or `pen` on the board. */
7
8
  readonly icon?: IconName;
@@ -13,6 +14,6 @@ export type NameTagProps = {
13
14
  readonly testID?: string;
14
15
  };
15
16
  /** The mockup's name tag (`.tag`): bottom-left of a tile, white on the dark overlay in both themes. */
16
- export declare const NameTag: import("react").MemoExoticComponent<({ name, muted, pinned, icon, you, handRaised, handOrder, testID }: NameTagProps) => React.JSX.Element>;
17
+ export declare const NameTag: import("react").MemoExoticComponent<({ name, muted, pinned, following, icon, you, handRaised, handOrder, testID }: NameTagProps) => React.JSX.Element>;
17
18
  /** The strip at the bottom of a tile that the name tag can cover, so tile content can keep clear of it. */
18
19
  export declare const nameTagZone: number;
@@ -3,6 +3,7 @@ import { type SharedValue } from "react-native-reanimated";
3
3
  export type TileShellProps = {
4
4
  readonly children: ReactNode;
5
5
  /** The live ring shows only on a speaking person whose camera is on; a camera-off face reacts instead. */
6
+ readonly selected?: boolean;
6
7
  readonly speaking?: boolean;
7
8
  readonly cameraOn?: boolean;
8
9
  /** Speaking level from 0 to 1; the ring's opacity follows it (0.3 + 0.7 × level). */
@@ -14,4 +15,4 @@ export type TileShellProps = {
14
15
  * content, and the live ring drawn over the video. The stage fills it with video or an
15
16
  * avatar and a `NameTag`.
16
17
  */
17
- export declare const TileShell: import("react").MemoExoticComponent<({ children, speaking, cameraOn, level, testID }: TileShellProps) => React.JSX.Element>;
18
+ export declare const TileShell: import("react").MemoExoticComponent<({ children, selected, speaking, cameraOn, level, testID }: TileShellProps) => React.JSX.Element>;
@@ -4,6 +4,8 @@ export type ParticipantTileProps = {
4
4
  readonly height: number;
5
5
  /** The small tile floating over the other person when two are in the call. */
6
6
  readonly float: boolean;
7
+ readonly following?: boolean;
8
+ readonly onOptions?: (id: string) => void;
7
9
  readonly pinned: boolean;
8
10
  /** Your own front-camera video is mirrored while this is on. */
9
11
  readonly mirror: boolean;
@@ -14,4 +16,4 @@ export type ParticipantTileProps = {
14
16
  * and the speaking ring. It subscribes to that person alone, so nobody else's change re-renders
15
17
  * it, and the stage keeps it mounted across every move so the video view keeps its surface.
16
18
  */
17
- export declare const ParticipantTile: import("react").MemoExoticComponent<({ id, width, height, float, pinned, mirror, onOpen }: ParticipantTileProps) => React.JSX.Element>;
19
+ export declare const ParticipantTile: import("react").MemoExoticComponent<({ id, width, height, float, pinned, following, mirror, onOpen, onOptions }: ParticipantTileProps) => React.JSX.Element>;
@@ -6,6 +6,6 @@ export type TileSheetProps = {
6
6
  };
7
7
  /**
8
8
  * The phone's tile sheet (`#tsheet` with `tileSheetHTML`): pin, your camera and mirror, and the
9
- * host's mute and remove for someone else. Board following waits for board editing.
9
+ * host's mute and remove for someone else. Follow is available while the board is open.
10
10
  */
11
11
  export declare function TileSheet({ participantId, open, onClose }: TileSheetProps): React.JSX.Element;
@@ -3,6 +3,10 @@ export type StageLayoutChoice = "spotlight" | "grid";
3
3
  export type StageView = {
4
4
  readonly layout: StageLayoutChoice;
5
5
  readonly pinned: string | null;
6
+ readonly boardOpen: boolean | null;
7
+ readonly setBoardOpen: (open: boolean | null) => void;
8
+ readonly following: string | null;
9
+ readonly setFollowing: (participantId: string | null) => void;
6
10
  /** Whether your own front-camera video is mirrored, as in a mirror. On by default. */
7
11
  readonly mirror: boolean;
8
12
  readonly setLayout: (layout: StageLayoutChoice) => void;
package/dist/ui.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  useTheme,
30
30
  useToastClearance,
31
31
  useToasts
32
- } from "./chunk-MBZRE4US.js";
32
+ } from "./chunk-PPQSOU35.js";
33
33
  import "./chunk-GYVZSOGQ.js";
34
34
 
35
35
  // src/ui/ChalkUI.tsx
@@ -0,0 +1,6 @@
1
+ /** Native exports stay on the device and use the system’s save/share destinations. */
2
+ export declare function exportBoardImage(value: {
3
+ readonly format: "png" | "svg";
4
+ readonly dataURL: string;
5
+ readonly action?: "download" | "copy";
6
+ }): Promise<void>;
@@ -0,0 +1,15 @@
1
+ import type { ChalkWhiteboardV1Transport } from "@q9labsai/chalk-client";
2
+ type SessionClient = {
3
+ readonly whiteboard: {
4
+ readonly transport: () => Pick<ChalkWhiteboardV1Transport, "startSceneSubscription" | "stopSceneSubscription"> | null;
5
+ };
6
+ readonly getSnapshot: () => {
7
+ readonly connection: {
8
+ readonly status: string;
9
+ };
10
+ };
11
+ readonly subscribe: (listener: () => void) => () => void;
12
+ };
13
+ /** Subscribe before the tile exists, so a web presentation can open the native board. */
14
+ export declare function ownNativeBoardSession(client: SessionClient, onError: () => void): () => void;
15
+ export {};
@@ -6,14 +6,24 @@
6
6
  "files": [
7
7
  {
8
8
  "path": "chalk.css",
9
- "bytes": 404,
10
- "sha256": "bd9449212db9907d267f7f957d8c0b21fbb64d10b0e63f1fbab4373e71ac8064"
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": 8502340,
1220
- "sha256": "82afcc03b426364bcf0e83064452972ec6fc5b74f766fd024948ae866893ba68"
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.