noteloom 0.5.0 → 0.7.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 +1 -1
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.js +1 -1
- package/dist/collab.cjs +1 -1
- package/dist/collab.cjs.map +1 -1
- package/dist/collab.js +157 -102
- package/dist/collab.js.map +1 -1
- package/dist/comments.cjs +1 -1
- package/dist/comments.js +3 -3
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +33 -0
- package/dist/index.js +1691 -1592
- package/dist/index.js.map +1 -1
- package/dist/shared/{CommentThreadCard-YziIa8My.cjs → CommentThreadCard-CIB6nZEA.cjs} +2 -2
- package/dist/shared/{CommentThreadCard-YziIa8My.cjs.map → CommentThreadCard-CIB6nZEA.cjs.map} +1 -1
- package/dist/shared/{CommentThreadCard-CwKd6fp3.js → CommentThreadCard-lW_lbI74.js} +2 -2
- package/dist/shared/{CommentThreadCard-CwKd6fp3.js.map → CommentThreadCard-lW_lbI74.js.map} +1 -1
- package/dist/shared/{CommentsPanel-DezejDdE.cjs → CommentsPanel-CRxb3RWi.cjs} +2 -2
- package/dist/shared/{CommentsPanel-DezejDdE.cjs.map → CommentsPanel-CRxb3RWi.cjs.map} +1 -1
- package/dist/shared/{CommentsPanel-dx7IaoqS.js → CommentsPanel-Dg0k_XNU.js} +3 -3
- package/dist/shared/{CommentsPanel-dx7IaoqS.js.map → CommentsPanel-Dg0k_XNU.js.map} +1 -1
- package/dist/shared/VersionHistory-BsSwOq_k.cjs +12 -0
- package/dist/shared/VersionHistory-BsSwOq_k.cjs.map +1 -0
- package/dist/shared/{VersionHistory-DhYb8C2e.js → VersionHistory-BzMnJpbc.js} +221 -206
- package/dist/shared/VersionHistory-BzMnJpbc.js.map +1 -0
- package/dist/shared/VoiceListeningIndicator-B_7-6Mq4.cjs +2 -0
- package/dist/shared/VoiceListeningIndicator-B_7-6Mq4.cjs.map +1 -0
- package/dist/shared/VoiceListeningIndicator-DeA3hb33.js +342 -0
- package/dist/shared/VoiceListeningIndicator-DeA3hb33.js.map +1 -0
- package/dist/shared/{icons-D5Ctow8R.js → icons-CmfXmn13.js} +350 -282
- package/dist/shared/icons-CmfXmn13.js.map +1 -0
- package/dist/shared/{icons-BCseh2pt.cjs → icons-DQ7j_-ZK.cjs} +44 -3
- package/dist/shared/icons-DQ7j_-ZK.cjs.map +1 -0
- package/dist/shared/{index-D_8hJpI7.js → index-DUigqWQn.js} +52 -52
- package/dist/shared/{index-D_8hJpI7.js.map → index-DUigqWQn.js.map} +1 -1
- package/dist/shared/{index-CbIBsFmI.cjs → index-vWtS1iyt.cjs} +2 -2
- package/dist/shared/{index-CbIBsFmI.cjs.map → index-vWtS1iyt.cjs.map} +1 -1
- package/dist/shared/{leafBlockFactory-CaLWUcfa.cjs → leafBlockFactory-6GFBveaC.cjs} +2 -2
- package/dist/shared/{leafBlockFactory-CaLWUcfa.cjs.map → leafBlockFactory-6GFBveaC.cjs.map} +1 -1
- package/dist/shared/{leafBlockFactory-DSa1XCox.js → leafBlockFactory-Dm6cd2NY.js} +5 -5
- package/dist/shared/{leafBlockFactory-DSa1XCox.js.map → leafBlockFactory-Dm6cd2NY.js.map} +1 -1
- package/dist/shared/{serialize-BqKU9EZy.js → serialize-R4V4gmHs.js} +2 -2
- package/dist/shared/{serialize-BqKU9EZy.js.map → serialize-R4V4gmHs.js.map} +1 -1
- package/dist/shared/{serialize-CqwX55uK.cjs → serialize-vLXz0cze.cjs} +2 -2
- package/dist/shared/{serialize-CqwX55uK.cjs.map → serialize-vLXz0cze.cjs.map} +1 -1
- package/dist/shared/starter-kit-BQUaaql0.cjs +29 -0
- package/dist/shared/starter-kit-BQUaaql0.cjs.map +1 -0
- package/dist/shared/{starter-kit-mfeNxqFn.js → starter-kit-Bp30PiE4.js} +1545 -1477
- package/dist/shared/starter-kit-Bp30PiE4.js.map +1 -0
- package/dist/shared/{usePopoverEdgeClamp-CPRWQtZV.cjs → usePopoverEdgeClamp-BJLbbANB.cjs} +2 -2
- package/dist/shared/{usePopoverEdgeClamp-CPRWQtZV.cjs.map → usePopoverEdgeClamp-BJLbbANB.cjs.map} +1 -1
- package/dist/shared/{usePopoverEdgeClamp-D_hB5t60.js → usePopoverEdgeClamp-DSpz-6xR.js} +2 -2
- package/dist/shared/{usePopoverEdgeClamp-D_hB5t60.js.map → usePopoverEdgeClamp-DSpz-6xR.js.map} +1 -1
- package/dist/starter-kit.cjs +1 -1
- package/dist/starter-kit.js +2 -2
- package/dist/style.css +41 -0
- package/dist/versions.cjs +1 -1
- package/dist/versions.js +1 -1
- package/dist/voice.cjs +1 -1
- package/dist/voice.js +1 -1
- package/package.json +2 -2
- package/dist/shared/VersionHistory-DhYb8C2e.js.map +0 -1
- package/dist/shared/VersionHistory-DuSxis_7.cjs +0 -12
- package/dist/shared/VersionHistory-DuSxis_7.cjs.map +0 -1
- package/dist/shared/VoiceListeningIndicator-BXByLZwO.cjs +0 -2
- package/dist/shared/VoiceListeningIndicator-BXByLZwO.cjs.map +0 -1
- package/dist/shared/VoiceListeningIndicator-bv285FSY.js +0 -338
- package/dist/shared/VoiceListeningIndicator-bv285FSY.js.map +0 -1
- package/dist/shared/icons-BCseh2pt.cjs.map +0 -1
- package/dist/shared/icons-D5Ctow8R.js.map +0 -1
- package/dist/shared/starter-kit-DyX1U84W.cjs +0 -27
- package/dist/shared/starter-kit-DyX1U84W.cjs.map +0 -1
- package/dist/shared/starter-kit-mfeNxqFn.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -322,6 +322,10 @@ export class CollabSession {
|
|
|
322
322
|
setLocalPresence(data: Record<string, unknown>): void;
|
|
323
323
|
getPresence(): Map<string, Record<string, unknown>>;
|
|
324
324
|
onPresenceChange(callback: (presence: Map<string, Record<string, unknown>>) => void): () => void;
|
|
325
|
+
sendCustom(channel: string, payload: unknown, remotePeerId?: string | null): void;
|
|
326
|
+
onCustomMessage(
|
|
327
|
+
callback: (channel: string, payload: unknown, remotePeerId: string) => void,
|
|
328
|
+
): () => void;
|
|
325
329
|
}
|
|
326
330
|
|
|
327
331
|
export function createWebSocketSignaling(options: {
|
|
@@ -782,6 +786,12 @@ export interface EditorProviderProps {
|
|
|
782
786
|
) => Promise<{ src: string; name?: string; mimeType?: string }>;
|
|
783
787
|
/** Byte cap for the in-document data: URL fallback ONLY (no effect once uploadFile is configured) -- an oversized file is rejected with a clear error instead of bloating the document. */
|
|
784
788
|
maxFileSize?: number;
|
|
789
|
+
/** Turns block.props.src into whatever's actually loadable on this device right now, before EmbedBlock hands it to an img/video/audio -- see useFileUpload's own doc comment. May be a real React hook (called unconditionally on every EmbedBlock render) if it needs to be reactive. Identity when not configured. */
|
|
790
|
+
resolveEmbedSrc?: (src: string) => string;
|
|
791
|
+
/** Called once if the resolved src actually fails to load (the element's native error event) -- see useFileUpload's own doc comment. Never called for oembed/file kinds. */
|
|
792
|
+
onEmbedError?: (src: string) => void;
|
|
793
|
+
/** Syntax-colors CodeBlock's text -- returns trusted HTML, rendered via dangerouslySetInnerHTML in a read-only overlay behind the real editable text. No highlighter ships with this package (zero-runtime-dependency); wire in Prism/Shiki/highlight.js/etc. here. Plain monochrome text when not configured. See useHighlightCode's own doc comment. */
|
|
794
|
+
highlightCode?: (code: string, language: string) => string;
|
|
785
795
|
children?: ReactNode;
|
|
786
796
|
}
|
|
787
797
|
|
|
@@ -797,6 +807,8 @@ export function usePreviewMode(): [boolean, (value: boolean) => void];
|
|
|
797
807
|
export function useCommentAuthorId(): string | undefined;
|
|
798
808
|
/** Whether CodeBlock should render its line-number gutter -- see EditorProviderProps.showLineNumbers. */
|
|
799
809
|
export function useShowLineNumbers(): boolean;
|
|
810
|
+
/** `highlightCode` from EditorProvider, or undefined if not configured -- see EditorProviderProps.highlightCode. */
|
|
811
|
+
export function useHighlightCode(): ((code: string, language: string) => string) | undefined;
|
|
800
812
|
/** `{ uploadFile, maxFileSize }` from EditorProvider -- see EditorProviderProps and useFileUpload's own doc comment for the full contract. */
|
|
801
813
|
export function useFileUpload(): {
|
|
802
814
|
uploadFile?: (
|
|
@@ -804,6 +816,8 @@ export function useFileUpload(): {
|
|
|
804
816
|
ctx: { kind: 'image' | 'video' | 'audio' | 'file' },
|
|
805
817
|
) => Promise<{ src: string; name?: string; mimeType?: string }>;
|
|
806
818
|
maxFileSize?: number;
|
|
819
|
+
resolveEmbedSrc: (src: string) => string;
|
|
820
|
+
onEmbedError?: (src: string) => void;
|
|
807
821
|
};
|
|
808
822
|
export function useFieldTypeEditor(): {
|
|
809
823
|
editingFieldTypeId: string | null;
|
|
@@ -873,6 +887,7 @@ export const BlockGutterRow: ComponentType<Record<string, unknown>>;
|
|
|
873
887
|
export const BlockRangeActionMenu: ComponentType<Record<string, unknown>>;
|
|
874
888
|
export function useBlockRangeDrag(containerRef: RefObject<HTMLElement | null>): void;
|
|
875
889
|
export function useCoarsePointer(): boolean;
|
|
890
|
+
export function useTouchOnlyDevice(): boolean;
|
|
876
891
|
export function useVirtualKeyboardInset(): number;
|
|
877
892
|
export const MobileActionBar: ComponentType<{ containerRef: RefObject<HTMLElement | null> }>;
|
|
878
893
|
export const MobileBlockPickerSheet: ComponentType<Record<string, unknown>>;
|
|
@@ -1008,6 +1023,8 @@ export interface FloatingToolbarProps {
|
|
|
1008
1023
|
onComment?: (range: CommentRange) => void;
|
|
1009
1024
|
/** Adds a Comment button using a built-in inline composer (addComment(store, range, {authorId: commentAuthorId, text})) instead of onComment -- see NoteloomEditorProps.commentAuthorId. */
|
|
1010
1025
|
commentAuthorId?: string;
|
|
1026
|
+
/** Surfaces a mic start/stop button when given and voice.isSupported is true -- pass the object useVoiceTyping({ store: editor.store }) (from the separate `noteloom/voice` entry point) returns; the explicit `store` is required here since this call site sits outside the <EditorProvider> the toolbar itself renders inside of. Omit to keep SpeechRecognition-related code out of your bundle entirely. */
|
|
1027
|
+
voice?: Record<string, unknown>;
|
|
1011
1028
|
}
|
|
1012
1029
|
|
|
1013
1030
|
export const FloatingToolbar: ComponentType<FloatingToolbarProps>;
|
|
@@ -1151,6 +1168,14 @@ export interface NoteloomEditorProps {
|
|
|
1151
1168
|
) => Promise<{ src: string; name?: string; mimeType?: string }>;
|
|
1152
1169
|
/** Byte cap for the in-document data: URL fallback ONLY (no effect once uploadFile is configured). */
|
|
1153
1170
|
maxFileSize?: number;
|
|
1171
|
+
/** Turns block.props.src into whatever's actually loadable on this device right now -- see EditorProviderProps.resolveEmbedSrc / useFileUpload's own doc comment. */
|
|
1172
|
+
resolveEmbedSrc?: (src: string) => string;
|
|
1173
|
+
/** Called once if the resolved src actually fails to load -- see EditorProviderProps.onEmbedError. */
|
|
1174
|
+
onEmbedError?: (src: string) => void;
|
|
1175
|
+
/** Syntax-colors CodeBlock's text -- see EditorProviderProps.highlightCode / useHighlightCode's own doc comment. */
|
|
1176
|
+
highlightCode?: (code: string, language: string) => string;
|
|
1177
|
+
/** Surfaces a mic start/stop button in the floating format toolbar -- pass the object useVoiceTyping({ store: editor.store }) (from the separate `noteloom/voice` entry point) returns; see FloatingToolbarProps.voice for why the explicit `store` is required here. Omit to keep SpeechRecognition-related code out of your bundle entirely. */
|
|
1178
|
+
voice?: Record<string, unknown>;
|
|
1154
1179
|
children?: ReactNode;
|
|
1155
1180
|
}
|
|
1156
1181
|
|
|
@@ -1236,6 +1261,14 @@ export function removePerson(store: EditorStore | History, id: string): void;
|
|
|
1236
1261
|
/** Reactive view of the document's `people` collection. */
|
|
1237
1262
|
export function usePeople(): Person[];
|
|
1238
1263
|
|
|
1264
|
+
// ---------------------------------------------------------------------------
|
|
1265
|
+
// title/title.js, react/useTitle.js — a document's own title
|
|
1266
|
+
// ---------------------------------------------------------------------------
|
|
1267
|
+
|
|
1268
|
+
export function setTitle(store: EditorStore | History, title: string): void;
|
|
1269
|
+
/** Reactive view of the document's own title (see EditorStore.getTitle). */
|
|
1270
|
+
export function useTitle(): string;
|
|
1271
|
+
|
|
1239
1272
|
// ---------------------------------------------------------------------------
|
|
1240
1273
|
// react/useSmartQuotes.js, react/useAutoPairBrackets.js — optional typing behaviors
|
|
1241
1274
|
// ---------------------------------------------------------------------------
|