noteloom 0.5.0 → 0.6.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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +27 -0
- package/dist/index.js +1600 -1542
- package/dist/index.js.map +1 -1
- package/dist/shared/{CommentThreadCard-YziIa8My.cjs → CommentThreadCard-DcCHq2Dy.cjs} +2 -2
- package/dist/shared/{CommentThreadCard-YziIa8My.cjs.map → CommentThreadCard-DcCHq2Dy.cjs.map} +1 -1
- package/dist/shared/{CommentThreadCard-CwKd6fp3.js → CommentThreadCard-DwtE85Xx.js} +2 -2
- package/dist/shared/{CommentThreadCard-CwKd6fp3.js.map → CommentThreadCard-DwtE85Xx.js.map} +1 -1
- package/dist/shared/{CommentsPanel-DezejDdE.cjs → CommentsPanel-BRgACUu_.cjs} +2 -2
- package/dist/shared/{CommentsPanel-DezejDdE.cjs.map → CommentsPanel-BRgACUu_.cjs.map} +1 -1
- package/dist/shared/{CommentsPanel-dx7IaoqS.js → CommentsPanel-D4eP-K_f.js} +3 -3
- package/dist/shared/{CommentsPanel-dx7IaoqS.js.map → CommentsPanel-D4eP-K_f.js.map} +1 -1
- package/dist/shared/VersionHistory-BRBYQgj5.cjs +12 -0
- package/dist/shared/VersionHistory-BRBYQgj5.cjs.map +1 -0
- package/dist/shared/{VersionHistory-DhYb8C2e.js → VersionHistory-D9sIIAYN.js} +221 -206
- package/dist/shared/VersionHistory-D9sIIAYN.js.map +1 -0
- package/dist/shared/VoiceListeningIndicator-DgLMmGSP.js +342 -0
- package/dist/shared/VoiceListeningIndicator-DgLMmGSP.js.map +1 -0
- package/dist/shared/VoiceListeningIndicator-Dw0fggpE.cjs +2 -0
- package/dist/shared/VoiceListeningIndicator-Dw0fggpE.cjs.map +1 -0
- package/dist/shared/{icons-D5Ctow8R.js → icons-Bdptdx1e.js} +299 -279
- package/dist/shared/{icons-D5Ctow8R.js.map → icons-Bdptdx1e.js.map} +1 -1
- package/dist/shared/{icons-BCseh2pt.cjs → icons-DabR_JDW.cjs} +3 -3
- package/dist/shared/{icons-BCseh2pt.cjs.map → icons-DabR_JDW.cjs.map} +1 -1
- package/dist/shared/{index-CbIBsFmI.cjs → index-B7_F6NA9.cjs} +2 -2
- package/dist/shared/{index-CbIBsFmI.cjs.map → index-B7_F6NA9.cjs.map} +1 -1
- package/dist/shared/{index-D_8hJpI7.js → index-DOIEccLM.js} +52 -52
- package/dist/shared/{index-D_8hJpI7.js.map → index-DOIEccLM.js.map} +1 -1
- package/dist/shared/{leafBlockFactory-DSa1XCox.js → leafBlockFactory-ChlzpKIn.js} +2 -2
- package/dist/shared/{leafBlockFactory-DSa1XCox.js.map → leafBlockFactory-ChlzpKIn.js.map} +1 -1
- package/dist/shared/{leafBlockFactory-CaLWUcfa.cjs → leafBlockFactory-D3SCDvzc.cjs} +2 -2
- package/dist/shared/{leafBlockFactory-CaLWUcfa.cjs.map → leafBlockFactory-D3SCDvzc.cjs.map} +1 -1
- package/dist/shared/{serialize-BqKU9EZy.js → serialize-C1rjLsIz.js} +2 -2
- package/dist/shared/{serialize-BqKU9EZy.js.map → serialize-C1rjLsIz.js.map} +1 -1
- package/dist/shared/{serialize-CqwX55uK.cjs → serialize-k0zXqwEM.cjs} +2 -2
- package/dist/shared/{serialize-CqwX55uK.cjs.map → serialize-k0zXqwEM.cjs.map} +1 -1
- package/dist/shared/{starter-kit-mfeNxqFn.js → starter-kit-CJzWMyF8.js} +683 -673
- package/dist/shared/{starter-kit-mfeNxqFn.js.map → starter-kit-CJzWMyF8.js.map} +1 -1
- package/dist/shared/starter-kit-Ch2LEpzF.cjs +27 -0
- package/dist/shared/{starter-kit-DyX1U84W.cjs.map → starter-kit-Ch2LEpzF.cjs.map} +1 -1
- package/dist/shared/{usePopoverEdgeClamp-D_hB5t60.js → usePopoverEdgeClamp-B9KNv9SE.js} +2 -2
- package/dist/shared/{usePopoverEdgeClamp-D_hB5t60.js.map → usePopoverEdgeClamp-B9KNv9SE.js.map} +1 -1
- package/dist/shared/{usePopoverEdgeClamp-CPRWQtZV.cjs → usePopoverEdgeClamp-gRlLQeVG.cjs} +2 -2
- package/dist/shared/{usePopoverEdgeClamp-CPRWQtZV.cjs.map → usePopoverEdgeClamp-gRlLQeVG.cjs.map} +1 -1
- package/dist/starter-kit.cjs +1 -1
- package/dist/starter-kit.js +2 -2
- 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/starter-kit-DyX1U84W.cjs +0 -27
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,10 @@ 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;
|
|
785
793
|
children?: ReactNode;
|
|
786
794
|
}
|
|
787
795
|
|
|
@@ -804,6 +812,8 @@ export function useFileUpload(): {
|
|
|
804
812
|
ctx: { kind: 'image' | 'video' | 'audio' | 'file' },
|
|
805
813
|
) => Promise<{ src: string; name?: string; mimeType?: string }>;
|
|
806
814
|
maxFileSize?: number;
|
|
815
|
+
resolveEmbedSrc: (src: string) => string;
|
|
816
|
+
onEmbedError?: (src: string) => void;
|
|
807
817
|
};
|
|
808
818
|
export function useFieldTypeEditor(): {
|
|
809
819
|
editingFieldTypeId: string | null;
|
|
@@ -873,6 +883,7 @@ export const BlockGutterRow: ComponentType<Record<string, unknown>>;
|
|
|
873
883
|
export const BlockRangeActionMenu: ComponentType<Record<string, unknown>>;
|
|
874
884
|
export function useBlockRangeDrag(containerRef: RefObject<HTMLElement | null>): void;
|
|
875
885
|
export function useCoarsePointer(): boolean;
|
|
886
|
+
export function useTouchOnlyDevice(): boolean;
|
|
876
887
|
export function useVirtualKeyboardInset(): number;
|
|
877
888
|
export const MobileActionBar: ComponentType<{ containerRef: RefObject<HTMLElement | null> }>;
|
|
878
889
|
export const MobileBlockPickerSheet: ComponentType<Record<string, unknown>>;
|
|
@@ -1008,6 +1019,8 @@ export interface FloatingToolbarProps {
|
|
|
1008
1019
|
onComment?: (range: CommentRange) => void;
|
|
1009
1020
|
/** Adds a Comment button using a built-in inline composer (addComment(store, range, {authorId: commentAuthorId, text})) instead of onComment -- see NoteloomEditorProps.commentAuthorId. */
|
|
1010
1021
|
commentAuthorId?: string;
|
|
1022
|
+
/** 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. */
|
|
1023
|
+
voice?: Record<string, unknown>;
|
|
1011
1024
|
}
|
|
1012
1025
|
|
|
1013
1026
|
export const FloatingToolbar: ComponentType<FloatingToolbarProps>;
|
|
@@ -1151,6 +1164,12 @@ export interface NoteloomEditorProps {
|
|
|
1151
1164
|
) => Promise<{ src: string; name?: string; mimeType?: string }>;
|
|
1152
1165
|
/** Byte cap for the in-document data: URL fallback ONLY (no effect once uploadFile is configured). */
|
|
1153
1166
|
maxFileSize?: number;
|
|
1167
|
+
/** Turns block.props.src into whatever's actually loadable on this device right now -- see EditorProviderProps.resolveEmbedSrc / useFileUpload's own doc comment. */
|
|
1168
|
+
resolveEmbedSrc?: (src: string) => string;
|
|
1169
|
+
/** Called once if the resolved src actually fails to load -- see EditorProviderProps.onEmbedError. */
|
|
1170
|
+
onEmbedError?: (src: string) => void;
|
|
1171
|
+
/** 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. */
|
|
1172
|
+
voice?: Record<string, unknown>;
|
|
1154
1173
|
children?: ReactNode;
|
|
1155
1174
|
}
|
|
1156
1175
|
|
|
@@ -1236,6 +1255,14 @@ export function removePerson(store: EditorStore | History, id: string): void;
|
|
|
1236
1255
|
/** Reactive view of the document's `people` collection. */
|
|
1237
1256
|
export function usePeople(): Person[];
|
|
1238
1257
|
|
|
1258
|
+
// ---------------------------------------------------------------------------
|
|
1259
|
+
// title/title.js, react/useTitle.js — a document's own title
|
|
1260
|
+
// ---------------------------------------------------------------------------
|
|
1261
|
+
|
|
1262
|
+
export function setTitle(store: EditorStore | History, title: string): void;
|
|
1263
|
+
/** Reactive view of the document's own title (see EditorStore.getTitle). */
|
|
1264
|
+
export function useTitle(): string;
|
|
1265
|
+
|
|
1239
1266
|
// ---------------------------------------------------------------------------
|
|
1240
1267
|
// react/useSmartQuotes.js, react/useAutoPairBrackets.js — optional typing behaviors
|
|
1241
1268
|
// ---------------------------------------------------------------------------
|