noteloom 0.4.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 +162 -1026
- 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 +29 -1
- package/dist/index.js +1600 -1542
- package/dist/index.js.map +1 -1
- package/dist/shared/{CommentThreadCard-CAJ3oPdr.cjs → CommentThreadCard-DcCHq2Dy.cjs} +2 -2
- package/dist/shared/{CommentThreadCard-CAJ3oPdr.cjs.map → CommentThreadCard-DcCHq2Dy.cjs.map} +1 -1
- package/dist/shared/{CommentThreadCard-Cxf8GwHJ.js → CommentThreadCard-DwtE85Xx.js} +2 -2
- package/dist/shared/{CommentThreadCard-Cxf8GwHJ.js.map → CommentThreadCard-DwtE85Xx.js.map} +1 -1
- package/dist/shared/{CommentsPanel-CES4uzye.cjs → CommentsPanel-BRgACUu_.cjs} +2 -2
- package/dist/shared/{CommentsPanel-CES4uzye.cjs.map → CommentsPanel-BRgACUu_.cjs.map} +1 -1
- package/dist/shared/{CommentsPanel-BwVVyMOC.js → CommentsPanel-D4eP-K_f.js} +3 -3
- package/dist/shared/{CommentsPanel-BwVVyMOC.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-Bg6fufP5.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-C1_s0jKK.js → icons-Bdptdx1e.js} +307 -277
- package/dist/shared/{icons-C1_s0jKK.js.map → icons-Bdptdx1e.js.map} +1 -1
- package/dist/shared/{icons-DtCsXuU6.cjs → icons-DabR_JDW.cjs} +3 -3
- package/dist/shared/{icons-DtCsXuU6.cjs.map → icons-DabR_JDW.cjs.map} +1 -1
- package/dist/shared/{index-D9WEXpYM.cjs → index-B7_F6NA9.cjs} +2 -2
- package/dist/shared/{index-D9WEXpYM.cjs.map → index-B7_F6NA9.cjs.map} +1 -1
- package/dist/shared/{index-B9jyyL8u.js → index-DOIEccLM.js} +52 -52
- package/dist/shared/{index-B9jyyL8u.js.map → index-DOIEccLM.js.map} +1 -1
- package/dist/shared/{leafBlockFactory-A9eUhSe-.js → leafBlockFactory-ChlzpKIn.js} +2 -2
- package/dist/shared/{leafBlockFactory-A9eUhSe-.js.map → leafBlockFactory-ChlzpKIn.js.map} +1 -1
- package/dist/shared/{leafBlockFactory-Dp382eP8.cjs → leafBlockFactory-D3SCDvzc.cjs} +2 -2
- package/dist/shared/{leafBlockFactory-Dp382eP8.cjs.map → leafBlockFactory-D3SCDvzc.cjs.map} +1 -1
- package/dist/shared/{serialize-T9Odwx24.js → serialize-C1rjLsIz.js} +2 -2
- package/dist/shared/{serialize-T9Odwx24.js.map → serialize-C1rjLsIz.js.map} +1 -1
- package/dist/shared/{serialize-DWEfk0vU.cjs → serialize-k0zXqwEM.cjs} +2 -2
- package/dist/shared/{serialize-DWEfk0vU.cjs.map → serialize-k0zXqwEM.cjs.map} +1 -1
- package/dist/shared/{starter-kit-CY5wzYDf.js → starter-kit-CJzWMyF8.js} +683 -673
- package/dist/shared/{starter-kit-CY5wzYDf.js.map → starter-kit-CJzWMyF8.js.map} +1 -1
- package/dist/shared/starter-kit-Ch2LEpzF.cjs +27 -0
- package/dist/shared/{starter-kit-lPN-NpJ5.cjs.map → starter-kit-Ch2LEpzF.cjs.map} +1 -1
- package/dist/shared/{usePopoverEdgeClamp-gmFm0CnI.js → usePopoverEdgeClamp-B9KNv9SE.js} +2 -2
- package/dist/shared/{usePopoverEdgeClamp-gmFm0CnI.js.map → usePopoverEdgeClamp-B9KNv9SE.js.map} +1 -1
- package/dist/shared/{usePopoverEdgeClamp-CDG26jBM.cjs → usePopoverEdgeClamp-gRlLQeVG.cjs} +2 -2
- package/dist/shared/{usePopoverEdgeClamp-CDG26jBM.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-Bg6fufP5.js.map +0 -1
- package/dist/shared/VersionHistory-DELa2Wbq.cjs +0 -12
- package/dist/shared/VersionHistory-DELa2Wbq.cjs.map +0 -1
- package/dist/shared/VoiceListeningIndicator-BOfVmLK0.js +0 -338
- package/dist/shared/VoiceListeningIndicator-BOfVmLK0.js.map +0 -1
- package/dist/shared/VoiceListeningIndicator-DNX8JlQM.cjs +0 -2
- package/dist/shared/VoiceListeningIndicator-DNX8JlQM.cjs.map +0 -1
- package/dist/shared/starter-kit-lPN-NpJ5.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;
|
|
@@ -815,7 +825,8 @@ export function useBlockClassName(
|
|
|
815
825
|
block: Block,
|
|
816
826
|
): string | undefined;
|
|
817
827
|
|
|
818
|
-
|
|
828
|
+
/** Inject the default theme `<style>` tag once. The explicit alternative to letting `<EditorProvider>` auto-inject (which a future major will stop doing) — or `import 'noteloom/theme'`. */
|
|
829
|
+
export function injectDefaultStyles(options?: { auto?: boolean }): void;
|
|
819
830
|
|
|
820
831
|
export function useBlock(id: string): Block | undefined;
|
|
821
832
|
export function useRun(id: string): Run | undefined;
|
|
@@ -872,6 +883,7 @@ export const BlockGutterRow: ComponentType<Record<string, unknown>>;
|
|
|
872
883
|
export const BlockRangeActionMenu: ComponentType<Record<string, unknown>>;
|
|
873
884
|
export function useBlockRangeDrag(containerRef: RefObject<HTMLElement | null>): void;
|
|
874
885
|
export function useCoarsePointer(): boolean;
|
|
886
|
+
export function useTouchOnlyDevice(): boolean;
|
|
875
887
|
export function useVirtualKeyboardInset(): number;
|
|
876
888
|
export const MobileActionBar: ComponentType<{ containerRef: RefObject<HTMLElement | null> }>;
|
|
877
889
|
export const MobileBlockPickerSheet: ComponentType<Record<string, unknown>>;
|
|
@@ -1007,6 +1019,8 @@ export interface FloatingToolbarProps {
|
|
|
1007
1019
|
onComment?: (range: CommentRange) => void;
|
|
1008
1020
|
/** Adds a Comment button using a built-in inline composer (addComment(store, range, {authorId: commentAuthorId, text})) instead of onComment -- see NoteloomEditorProps.commentAuthorId. */
|
|
1009
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>;
|
|
1010
1024
|
}
|
|
1011
1025
|
|
|
1012
1026
|
export const FloatingToolbar: ComponentType<FloatingToolbarProps>;
|
|
@@ -1150,6 +1164,12 @@ export interface NoteloomEditorProps {
|
|
|
1150
1164
|
) => Promise<{ src: string; name?: string; mimeType?: string }>;
|
|
1151
1165
|
/** Byte cap for the in-document data: URL fallback ONLY (no effect once uploadFile is configured). */
|
|
1152
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>;
|
|
1153
1173
|
children?: ReactNode;
|
|
1154
1174
|
}
|
|
1155
1175
|
|
|
@@ -1235,6 +1255,14 @@ export function removePerson(store: EditorStore | History, id: string): void;
|
|
|
1235
1255
|
/** Reactive view of the document's `people` collection. */
|
|
1236
1256
|
export function usePeople(): Person[];
|
|
1237
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
|
+
|
|
1238
1266
|
// ---------------------------------------------------------------------------
|
|
1239
1267
|
// react/useSmartQuotes.js, react/useAutoPairBrackets.js — optional typing behaviors
|
|
1240
1268
|
// ---------------------------------------------------------------------------
|