@blocknote/core 0.54.0 → 0.54.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 (62) hide show
  1. package/dist/blocknote.cjs +1 -1
  2. package/dist/blocknote.js +6 -6
  3. package/dist/{blocks-CzkqclGj.cjs → blocks-CTB_5Vyj.cjs} +4 -4
  4. package/dist/blocks-CTB_5Vyj.cjs.map +1 -0
  5. package/dist/{blocks-CzQLehlc.js → blocks-Dol85hpH.js} +337 -330
  6. package/dist/blocks-Dol85hpH.js.map +1 -0
  7. package/dist/blocks.cjs +1 -1
  8. package/dist/blocks.js +2 -2
  9. package/dist/extensions-B7Rsp_Ft.cjs +58 -0
  10. package/dist/extensions-B7Rsp_Ft.cjs.map +1 -0
  11. package/dist/{extensions-DGuhtOgB.js → extensions-D6JcJCwd.js} +389 -346
  12. package/dist/extensions-D6JcJCwd.js.map +1 -0
  13. package/dist/extensions.cjs +1 -1
  14. package/dist/extensions.js +3 -3
  15. package/dist/{src-BkfZVfaO.js → src-Buuo5l7X.js} +521 -516
  16. package/dist/{src-BkfZVfaO.js.map → src-Buuo5l7X.js.map} +1 -1
  17. package/dist/{src-DM3syMdf.cjs → src-C54Ok9E0.cjs} +10 -10
  18. package/dist/{src-DM3syMdf.cjs.map → src-C54Ok9E0.cjs.map} +1 -1
  19. package/dist/webpack-stats.json +1 -1
  20. package/dist/y.cjs +1 -1
  21. package/dist/y.cjs.map +1 -1
  22. package/dist/y.js +205 -205
  23. package/dist/y.js.map +1 -1
  24. package/dist/yjs.cjs +1 -1
  25. package/dist/yjs.js +21 -21
  26. package/package.json +1 -1
  27. package/src/api/getBlocksChangedByTransaction.test.ts +211 -0
  28. package/src/api/getBlocksChangedByTransaction.ts +48 -12
  29. package/src/api/getChangedRange.ts +54 -0
  30. package/src/blocks/index.ts +0 -1
  31. package/src/editor/performance.test.ts +45 -0
  32. package/src/exporter/Exporter.test.ts +148 -10
  33. package/src/exporter/Exporter.ts +20 -2
  34. package/src/extensions/PreviousBlockType/PreviousBlockType.test.ts +21 -0
  35. package/src/extensions/PreviousBlockType/PreviousBlockType.ts +5 -3
  36. package/src/extensions/TableHandles/TableHandles.browser.test.ts +305 -0
  37. package/src/extensions/TableHandles/TableHandles.ts +82 -41
  38. package/src/fonts/inter.css +9 -9
  39. package/src/schema/blocks/createSpec.ts +4 -5
  40. package/src/schema/inlineContent/createSpec.ts +4 -5
  41. package/src/schema/nodeViewMutations.test.ts +81 -56
  42. package/src/schema/nodeViewMutations.ts +30 -27
  43. package/src/schema/schema.test.ts +110 -0
  44. package/src/schema/schema.ts +13 -4
  45. package/src/y/extensions/AttributionExtension.test.ts +8 -9
  46. package/src/y/versioning/__test__/yhub.test.ts +92 -59
  47. package/src/y/versioning/yhub.ts +35 -29
  48. package/types/src/api/getChangedRange.d.ts +14 -0
  49. package/types/src/blocks/index.d.ts +0 -1
  50. package/types/src/exporter/Exporter.d.ts +9 -0
  51. package/types/src/extensions/TableHandles/TableHandles.browser.test.d.ts +1 -0
  52. package/types/src/extensions/TableHandles/TableHandles.d.ts +3 -0
  53. package/types/src/schema/nodeViewMutations.d.ts +2 -2
  54. package/types/src/schema/schema.test.d.ts +1 -0
  55. package/types/src/y/versioning/yhub.d.ts +3 -2
  56. package/dist/blocks-CzQLehlc.js.map +0 -1
  57. package/dist/blocks-CzkqclGj.cjs.map +0 -1
  58. package/dist/extensions-CSB9ZvuL.cjs +0 -58
  59. package/dist/extensions-CSB9ZvuL.cjs.map +0 -1
  60. package/dist/extensions-DGuhtOgB.js.map +0 -1
  61. package/src/blocks/File/helpers/uploadToTmpFilesDotOrg_DEV_ONLY.ts +0 -20
  62. package/types/src/blocks/File/helpers/uploadToTmpFilesDotOrg_DEV_ONLY.d.ts +0 -6
@@ -56,6 +56,15 @@ export declare abstract class Exporter<B extends BlockSchema, I extends InlineCo
56
56
  */
57
57
  get dictionary(): Dictionary["exporter"];
58
58
  resolveFile(url: string): Promise<Blob>;
59
+ /**
60
+ * Fetch a URL as a Blob, throwing a clear error on a non-OK response. Without
61
+ * this an error page (404 / rate-limit / proxy failure) would be returned as
62
+ * the file's bytes and silently embedded as a corrupt image. An unreachable
63
+ * file is an environment failure, not expected input, so it fails the export
64
+ * loudly (see the error-handling conventions in AGENTS.md) rather than
65
+ * degrading the document silently.
66
+ */
67
+ private fetchBlob;
59
68
  mapStyles(styles: Styles<S>): RS[];
60
69
  mapInlineContent(inlineContent: InlineContent<I, S>): RI;
61
70
  transformInlineContent(inlineContentArray: InlineContent<I, S>[]): RI[];
@@ -1,3 +1,4 @@
1
+ import type { Node } from "prosemirror-model";
1
2
  import { EditorState, Plugin, PluginKey, PluginView } from "prosemirror-state";
2
3
  import { EditorView } from "prosemirror-view";
3
4
  import { RelativeCellIndices } from "../../api/blockManipulation/tables/tables.js";
@@ -33,10 +34,12 @@ export declare class TableHandlesView implements PluginView {
33
34
  prevWasEditable: boolean | null;
34
35
  constructor(editor: BlockNoteEditor<BlockSchemaWithBlock<"table", DefaultBlockSchema["table"]>, any, any>, pmView: EditorView, emitUpdate: (state: TableHandlesState | undefined) => void);
35
36
  viewMousedownHandler: () => void;
37
+ hideHandles: () => void;
36
38
  mouseUpHandler: (event: MouseEvent) => void;
37
39
  mouseMoveHandler: (event: MouseEvent) => false | undefined;
38
40
  dragOverHandler: (event: DragEvent) => void;
39
41
  dropHandler: (event: DragEvent) => boolean;
42
+ getTablePos(doc: Node): number | undefined;
40
43
  update(): void;
41
44
  destroy(): void;
42
45
  }
@@ -1,3 +1,3 @@
1
1
  import { NodeView, ViewMutationRecord } from "@tiptap/pm/view";
2
- export declare function isNonContentMutation(mutation: ViewMutationRecord, contentDOM: HTMLElement | null | undefined): boolean;
3
- export declare function ignoreNonContentMutations(nodeView: NodeView): void;
2
+ export declare function isDarkReaderMutation(mutation: ViewMutationRecord): boolean;
3
+ export declare function ignoreDarkReaderMutations(nodeView: NodeView): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -5,7 +5,8 @@ import { VersioningEndpointsFactory } from "../../extensions/Versioning/index.js
5
5
  */
6
6
  export interface YHubVersioningOptions {
7
7
  /**
8
- * Base URL of the YHub API (e.g. `"https://yhub.example.com"`).
8
+ * Base URL of the YHub API, including the API prefix
9
+ * (e.g. `"https://yhub.example.com/api"`).
9
10
  * Must **not** include a trailing slash.
10
11
  */
11
12
  baseUrl: string;
@@ -75,7 +76,7 @@ export interface YHubVersioningOptions {
75
76
  * user: { name: "Alice", color: "#ff0" },
76
77
  * provider,
77
78
  * versioningEndpoints: createYHubVersioningEndpoints({
78
- * baseUrl: "https://yhub.example.com",
79
+ * baseUrl: "https://yhub.example.com/api",
79
80
  * org: "my-org",
80
81
  * docId: "my-doc",
81
82
  * }),