notra-editor 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.
Files changed (102) hide show
  1. package/dist/components/code-block-view/code-block-shell.cjs +41 -0
  2. package/dist/components/code-block-view/code-block-shell.cjs.map +1 -0
  3. package/dist/components/code-block-view/code-block-shell.d.cts +11 -0
  4. package/dist/components/code-block-view/code-block-shell.d.ts +11 -0
  5. package/dist/components/code-block-view/code-block-shell.mjs +17 -0
  6. package/dist/components/code-block-view/code-block-shell.mjs.map +1 -0
  7. package/dist/components/{code-block-view.cjs → code-block-view/code-block-view.cjs} +16 -8
  8. package/dist/components/code-block-view/code-block-view.cjs.map +1 -0
  9. package/dist/components/code-block-view/code-block-view.d.cts +6 -0
  10. package/dist/components/code-block-view/code-block-view.d.ts +6 -0
  11. package/dist/components/code-block-view/code-block-view.mjs +26 -0
  12. package/dist/components/code-block-view/code-block-view.mjs.map +1 -0
  13. package/dist/components/code-block-view/language-select.cjs +91 -0
  14. package/dist/components/code-block-view/language-select.cjs.map +1 -0
  15. package/dist/components/code-block-view/language-select.d.cts +11 -0
  16. package/dist/components/code-block-view/language-select.d.ts +11 -0
  17. package/dist/components/code-block-view/language-select.mjs +74 -0
  18. package/dist/components/code-block-view/language-select.mjs.map +1 -0
  19. package/dist/components/image-popover/image-popover.cjs +161 -0
  20. package/dist/components/image-popover/image-popover.cjs.map +1 -0
  21. package/dist/components/image-popover/image-popover.d.cts +9 -0
  22. package/dist/components/image-popover/image-popover.d.ts +9 -0
  23. package/dist/components/image-popover/image-popover.mjs +137 -0
  24. package/dist/components/image-popover/image-popover.mjs.map +1 -0
  25. package/dist/components/image-popover/use-image-popover.cjs +88 -0
  26. package/dist/components/image-popover/use-image-popover.cjs.map +1 -0
  27. package/dist/components/image-popover/use-image-popover.d.cts +19 -0
  28. package/dist/components/image-popover/use-image-popover.d.ts +19 -0
  29. package/dist/components/image-popover/use-image-popover.mjs +64 -0
  30. package/dist/components/image-popover/use-image-popover.mjs.map +1 -0
  31. package/dist/components/link-popover/link-popover.cjs +12 -3
  32. package/dist/components/link-popover/link-popover.cjs.map +1 -1
  33. package/dist/components/link-popover/link-popover.mjs +12 -3
  34. package/dist/components/link-popover/link-popover.mjs.map +1 -1
  35. package/dist/components/link-popover/use-link-popover.cjs +17 -2
  36. package/dist/components/link-popover/use-link-popover.cjs.map +1 -1
  37. package/dist/components/link-popover/use-link-popover.d.cts +1 -0
  38. package/dist/components/link-popover/use-link-popover.d.ts +1 -0
  39. package/dist/components/link-popover/use-link-popover.mjs +17 -2
  40. package/dist/components/link-popover/use-link-popover.mjs.map +1 -1
  41. package/dist/components/ui/command.cjs +144 -0
  42. package/dist/components/ui/command.cjs.map +1 -0
  43. package/dist/components/ui/command.d.cts +12 -0
  44. package/dist/components/ui/command.d.ts +12 -0
  45. package/dist/components/ui/command.mjs +115 -0
  46. package/dist/components/ui/command.mjs.map +1 -0
  47. package/dist/extensions/code-block.cjs +76 -19
  48. package/dist/extensions/code-block.cjs.map +1 -1
  49. package/dist/extensions/code-block.d.cts +7 -3
  50. package/dist/extensions/code-block.d.ts +7 -3
  51. package/dist/extensions/code-block.mjs +73 -8
  52. package/dist/extensions/code-block.mjs.map +1 -1
  53. package/dist/extensions/editor.cjs +2 -0
  54. package/dist/extensions/editor.cjs.map +1 -1
  55. package/dist/extensions/editor.d.cts +4 -3
  56. package/dist/extensions/editor.d.ts +4 -3
  57. package/dist/extensions/editor.mjs +2 -0
  58. package/dist/extensions/editor.mjs.map +1 -1
  59. package/dist/extensions/index.d.cts +2 -1
  60. package/dist/extensions/index.d.ts +2 -1
  61. package/dist/extensions/shared.cjs +8 -2
  62. package/dist/extensions/shared.cjs.map +1 -1
  63. package/dist/extensions/shared.d.cts +3 -1
  64. package/dist/extensions/shared.d.ts +3 -1
  65. package/dist/extensions/shared.mjs +8 -2
  66. package/dist/extensions/shared.mjs.map +1 -1
  67. package/dist/index.cjs +23 -2
  68. package/dist/index.cjs.map +1 -1
  69. package/dist/index.d.cts +7 -0
  70. package/dist/index.d.ts +7 -0
  71. package/dist/index.mjs +18 -1
  72. package/dist/index.mjs.map +1 -1
  73. package/dist/lib/highlight-code-to-html.cjs +38 -0
  74. package/dist/lib/highlight-code-to-html.cjs.map +1 -0
  75. package/dist/lib/highlight-code-to-html.d.cts +6 -0
  76. package/dist/lib/highlight-code-to-html.d.ts +6 -0
  77. package/dist/lib/highlight-code-to-html.mjs +14 -0
  78. package/dist/lib/highlight-code-to-html.mjs.map +1 -0
  79. package/dist/lib/languages.cjs +181 -0
  80. package/dist/lib/languages.cjs.map +1 -0
  81. package/dist/lib/languages.d.cts +24 -0
  82. package/dist/lib/languages.d.ts +24 -0
  83. package/dist/lib/languages.mjs +155 -0
  84. package/dist/lib/languages.mjs.map +1 -0
  85. package/dist/notra-editor.cjs +3 -1
  86. package/dist/notra-editor.cjs.map +1 -1
  87. package/dist/notra-editor.mjs +3 -1
  88. package/dist/notra-editor.mjs.map +1 -1
  89. package/dist/notra-reader.cjs +32 -3
  90. package/dist/notra-reader.cjs.map +1 -1
  91. package/dist/notra-reader.d.cts +11 -1
  92. package/dist/notra-reader.d.ts +11 -1
  93. package/dist/notra-reader.mjs +32 -3
  94. package/dist/notra-reader.mjs.map +1 -1
  95. package/dist/styles/globals.css +112 -0
  96. package/dist/themes/default/shared.css +150 -5
  97. package/package.json +6 -1
  98. package/dist/components/code-block-view.cjs.map +0 -1
  99. package/dist/components/code-block-view.d.cts +0 -12
  100. package/dist/components/code-block-view.d.ts +0 -12
  101. package/dist/components/code-block-view.mjs +0 -17
  102. package/dist/components/code-block-view.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/extensions/editor.ts"],"sourcesContent":["import { ListKit } from '@tiptap/extension-list';\nimport StarterKit from '@tiptap/starter-kit';\nimport { Markdown } from 'tiptap-markdown';\n\nimport { CodeBlockExtension } from './code-block';\nimport { starterKitBaseConfig } from './shared';\n\n// Editor extensions = shared content model + interactive features + Markdown\n// codeBlock is disabled in StarterKit and replaced with the custom\n// CodeBlockExtension that mounts a NodeView (CodeBlockView).\nexport const editorExtensions = [\n\tStarterKit.configure({ ...starterKitBaseConfig, codeBlock: false }),\n\tListKit,\n\tCodeBlockExtension,\n\tMarkdown.configure({\n\t\thtml: false,\n\t\ttransformPastedText: true,\n\t\ttransformCopiedText: true\n\t})\n];\n"],"mappings":"AAAA,SAAS,eAAe;AACxB,OAAO,gBAAgB;AACvB,SAAS,gBAAgB;AAEzB,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AAK9B,MAAM,mBAAmB;AAAA,EAC/B,WAAW,UAAU,EAAE,GAAG,sBAAsB,WAAW,MAAM,CAAC;AAAA,EAClE;AAAA,EACA;AAAA,EACA,SAAS,UAAU;AAAA,IAClB,MAAM;AAAA,IACN,qBAAqB;AAAA,IACrB,qBAAqB;AAAA,EACtB,CAAC;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/extensions/editor.ts"],"sourcesContent":["import Image from '@tiptap/extension-image';\nimport { ListKit } from '@tiptap/extension-list';\nimport StarterKit from '@tiptap/starter-kit';\nimport { Markdown } from 'tiptap-markdown';\n\nimport { CodeBlockExtension } from './code-block';\nimport { starterKitBaseConfig } from './shared';\n\n// Editor extensions = shared content model + interactive features + Markdown\n// codeBlock is disabled in StarterKit and replaced with the custom\n// CodeBlockExtension that mounts a NodeView (CodeBlockView).\nexport const editorExtensions = [\n\tStarterKit.configure({ ...starterKitBaseConfig, codeBlock: false }),\n\tListKit,\n\tCodeBlockExtension,\n\tImage,\n\tMarkdown.configure({\n\t\thtml: false,\n\t\ttransformPastedText: true,\n\t\ttransformCopiedText: true\n\t})\n];\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,eAAe;AACxB,OAAO,gBAAgB;AACvB,SAAS,gBAAgB;AAEzB,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AAK9B,MAAM,mBAAmB;AAAA,EAC/B,WAAW,UAAU,EAAE,GAAG,sBAAsB,WAAW,MAAM,CAAC;AAAA,EAClE;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,UAAU;AAAA,IAClB,MAAM;AAAA,IACN,qBAAqB;AAAA,IACrB,qBAAqB;AAAA,EACtB,CAAC;AACF;","names":[]}
@@ -1,7 +1,8 @@
1
1
  export { sharedExtensions } from './shared.cjs';
2
2
  export { editorExtensions } from './editor.cjs';
3
+ import '@tiptap/extension-image';
3
4
  import '@tiptap/extension-list';
4
5
  import '@tiptap/core';
6
+ import '@tiptap/extension-code-block-lowlight';
5
7
  import '@tiptap/starter-kit';
6
8
  import 'tiptap-markdown';
7
- import '@tiptap/extension-code-block';
@@ -1,7 +1,8 @@
1
1
  export { sharedExtensions } from './shared.js';
2
2
  export { editorExtensions } from './editor.js';
3
+ import '@tiptap/extension-image';
3
4
  import '@tiptap/extension-list';
4
5
  import '@tiptap/core';
6
+ import '@tiptap/extension-code-block-lowlight';
5
7
  import '@tiptap/starter-kit';
6
8
  import 'tiptap-markdown';
7
- import '@tiptap/extension-code-block';
@@ -32,8 +32,10 @@ __export(shared_exports, {
32
32
  starterKitBaseConfig: () => starterKitBaseConfig
33
33
  });
34
34
  module.exports = __toCommonJS(shared_exports);
35
+ var import_extension_image = __toESM(require("@tiptap/extension-image"), 1);
35
36
  var import_extension_list = require("@tiptap/extension-list");
36
37
  var import_starter_kit = __toESM(require("@tiptap/starter-kit"), 1);
38
+ var import_code_block = require("./code-block");
37
39
  const starterKitBaseConfig = {
38
40
  heading: { levels: [1, 2, 3, 4, 5, 6] },
39
41
  link: {
@@ -44,7 +46,9 @@ const starterKitBaseConfig = {
44
46
  bulletList: false,
45
47
  orderedList: false,
46
48
  listItem: false,
47
- listKeymap: false
49
+ listKeymap: false,
50
+ // Disable StarterKit's vanilla code-block; use the lowlight one instead
51
+ codeBlock: false
48
52
  };
49
53
  const sharedExtensions = [
50
54
  import_starter_kit.default.configure({
@@ -54,7 +58,9 @@ const sharedExtensions = [
54
58
  undoRedo: false,
55
59
  trailingNode: false
56
60
  }),
57
- import_extension_list.ListKit
61
+ import_extension_list.ListKit,
62
+ import_code_block.CodeBlockExtension,
63
+ import_extension_image.default
58
64
  ];
59
65
  // Annotate the CommonJS export names for ESM import in node:
60
66
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/extensions/shared.ts"],"sourcesContent":["import { ListKit } from '@tiptap/extension-list';\nimport StarterKit, { type StarterKitOptions } from '@tiptap/starter-kit';\n\n// Shared StarterKit config: content nodes/marks, no lists (use ListKit instead)\nexport const starterKitBaseConfig: Partial<StarterKitOptions> = {\n\theading: { levels: [1, 2, 3, 4, 5, 6] },\n\tlink: {\n\t\topenOnClick: false,\n\t\tautolink: true\n\t},\n\t// Disable StarterKit's built-in list handling; use @tiptap/extension-list instead\n\tbulletList: false,\n\torderedList: false,\n\tlistItem: false,\n\tlistKeymap: false\n};\n\n// Content model extensions — shared by editor and reader\n// No interactive features (dropcursor, gapcursor, undoRedo, trailingNode)\nexport const sharedExtensions = [\n\tStarterKit.configure({\n\t\t...starterKitBaseConfig,\n\t\tdropcursor: false,\n\t\tgapcursor: false,\n\t\tundoRedo: false,\n\t\ttrailingNode: false\n\t}),\n\tListKit\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAwB;AACxB,yBAAmD;AAG5C,MAAM,uBAAmD;AAAA,EAC/D,SAAS,EAAE,QAAQ,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,EAAE;AAAA,EACtC,MAAM;AAAA,IACL,aAAa;AAAA,IACb,UAAU;AAAA,EACX;AAAA;AAAA,EAEA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,UAAU;AAAA,EACV,YAAY;AACb;AAIO,MAAM,mBAAmB;AAAA,EAC/B,mBAAAA,QAAW,UAAU;AAAA,IACpB,GAAG;AAAA,IACH,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,UAAU;AAAA,IACV,cAAc;AAAA,EACf,CAAC;AAAA,EACD;AACD;","names":["StarterKit"]}
1
+ {"version":3,"sources":["../../src/extensions/shared.ts"],"sourcesContent":["import Image from '@tiptap/extension-image';\nimport { ListKit } from '@tiptap/extension-list';\nimport StarterKit, { type StarterKitOptions } from '@tiptap/starter-kit';\n\nimport { CodeBlockExtension } from './code-block';\n\n// Shared StarterKit config: content nodes/marks, no lists (use ListKit instead),\n// no codeBlock (use the lowlight-extended CodeBlockExtension instead).\nexport const starterKitBaseConfig: Partial<StarterKitOptions> = {\n\theading: { levels: [1, 2, 3, 4, 5, 6] },\n\tlink: {\n\t\topenOnClick: false,\n\t\tautolink: true\n\t},\n\t// Disable StarterKit's built-in list handling; use @tiptap/extension-list instead\n\tbulletList: false,\n\torderedList: false,\n\tlistItem: false,\n\tlistKeymap: false,\n\t// Disable StarterKit's vanilla code-block; use the lowlight one instead\n\tcodeBlock: false\n};\n\n// Content model extensions — shared by editor and reader\n// No interactive features (dropcursor, gapcursor, undoRedo, trailingNode)\nexport const sharedExtensions = [\n\tStarterKit.configure({\n\t\t...starterKitBaseConfig,\n\t\tdropcursor: false,\n\t\tgapcursor: false,\n\t\tundoRedo: false,\n\t\ttrailingNode: false\n\t}),\n\tListKit,\n\tCodeBlockExtension,\n\tImage\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAkB;AAClB,4BAAwB;AACxB,yBAAmD;AAEnD,wBAAmC;AAI5B,MAAM,uBAAmD;AAAA,EAC/D,SAAS,EAAE,QAAQ,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,EAAE;AAAA,EACtC,MAAM;AAAA,IACL,aAAa;AAAA,IACb,UAAU;AAAA,EACX;AAAA;AAAA,EAEA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,UAAU;AAAA,EACV,YAAY;AAAA;AAAA,EAEZ,WAAW;AACZ;AAIO,MAAM,mBAAmB;AAAA,EAC/B,mBAAAA,QAAW,UAAU;AAAA,IACpB,GAAG;AAAA,IACH,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,UAAU;AAAA,IACV,cAAc;AAAA,EACf,CAAC;AAAA,EACD;AAAA,EACA;AAAA,EACA,uBAAAC;AACD;","names":["StarterKit","Image"]}
@@ -1,8 +1,10 @@
1
+ import * as _tiptap_extension_image from '@tiptap/extension-image';
1
2
  import * as _tiptap_extension_list from '@tiptap/extension-list';
2
3
  import * as _tiptap_core from '@tiptap/core';
4
+ import * as _tiptap_extension_code_block_lowlight from '@tiptap/extension-code-block-lowlight';
3
5
  import { StarterKitOptions } from '@tiptap/starter-kit';
4
6
 
5
7
  declare const starterKitBaseConfig: Partial<StarterKitOptions>;
6
- declare const sharedExtensions: (_tiptap_core.Extension<StarterKitOptions, any> | _tiptap_core.Extension<_tiptap_extension_list.ListKitOptions, any>)[];
8
+ declare const sharedExtensions: (_tiptap_core.Node<_tiptap_extension_code_block_lowlight.CodeBlockLowlightOptions, any> | _tiptap_core.Extension<StarterKitOptions, any> | _tiptap_core.Extension<_tiptap_extension_list.ListKitOptions, any> | _tiptap_core.Node<_tiptap_extension_image.ImageOptions, any>)[];
7
9
 
8
10
  export { sharedExtensions, starterKitBaseConfig };
@@ -1,8 +1,10 @@
1
+ import * as _tiptap_extension_image from '@tiptap/extension-image';
1
2
  import * as _tiptap_extension_list from '@tiptap/extension-list';
2
3
  import * as _tiptap_core from '@tiptap/core';
4
+ import * as _tiptap_extension_code_block_lowlight from '@tiptap/extension-code-block-lowlight';
3
5
  import { StarterKitOptions } from '@tiptap/starter-kit';
4
6
 
5
7
  declare const starterKitBaseConfig: Partial<StarterKitOptions>;
6
- declare const sharedExtensions: (_tiptap_core.Extension<StarterKitOptions, any> | _tiptap_core.Extension<_tiptap_extension_list.ListKitOptions, any>)[];
8
+ declare const sharedExtensions: (_tiptap_core.Node<_tiptap_extension_code_block_lowlight.CodeBlockLowlightOptions, any> | _tiptap_core.Extension<StarterKitOptions, any> | _tiptap_core.Extension<_tiptap_extension_list.ListKitOptions, any> | _tiptap_core.Node<_tiptap_extension_image.ImageOptions, any>)[];
7
9
 
8
10
  export { sharedExtensions, starterKitBaseConfig };
@@ -1,5 +1,7 @@
1
+ import Image from "@tiptap/extension-image";
1
2
  import { ListKit } from "@tiptap/extension-list";
2
3
  import StarterKit from "@tiptap/starter-kit";
4
+ import { CodeBlockExtension } from "./code-block";
3
5
  const starterKitBaseConfig = {
4
6
  heading: { levels: [1, 2, 3, 4, 5, 6] },
5
7
  link: {
@@ -10,7 +12,9 @@ const starterKitBaseConfig = {
10
12
  bulletList: false,
11
13
  orderedList: false,
12
14
  listItem: false,
13
- listKeymap: false
15
+ listKeymap: false,
16
+ // Disable StarterKit's vanilla code-block; use the lowlight one instead
17
+ codeBlock: false
14
18
  };
15
19
  const sharedExtensions = [
16
20
  StarterKit.configure({
@@ -20,7 +24,9 @@ const sharedExtensions = [
20
24
  undoRedo: false,
21
25
  trailingNode: false
22
26
  }),
23
- ListKit
27
+ ListKit,
28
+ CodeBlockExtension,
29
+ Image
24
30
  ];
25
31
  export {
26
32
  sharedExtensions,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/extensions/shared.ts"],"sourcesContent":["import { ListKit } from '@tiptap/extension-list';\nimport StarterKit, { type StarterKitOptions } from '@tiptap/starter-kit';\n\n// Shared StarterKit config: content nodes/marks, no lists (use ListKit instead)\nexport const starterKitBaseConfig: Partial<StarterKitOptions> = {\n\theading: { levels: [1, 2, 3, 4, 5, 6] },\n\tlink: {\n\t\topenOnClick: false,\n\t\tautolink: true\n\t},\n\t// Disable StarterKit's built-in list handling; use @tiptap/extension-list instead\n\tbulletList: false,\n\torderedList: false,\n\tlistItem: false,\n\tlistKeymap: false\n};\n\n// Content model extensions — shared by editor and reader\n// No interactive features (dropcursor, gapcursor, undoRedo, trailingNode)\nexport const sharedExtensions = [\n\tStarterKit.configure({\n\t\t...starterKitBaseConfig,\n\t\tdropcursor: false,\n\t\tgapcursor: false,\n\t\tundoRedo: false,\n\t\ttrailingNode: false\n\t}),\n\tListKit\n];\n"],"mappings":"AAAA,SAAS,eAAe;AACxB,OAAO,gBAA4C;AAG5C,MAAM,uBAAmD;AAAA,EAC/D,SAAS,EAAE,QAAQ,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,EAAE;AAAA,EACtC,MAAM;AAAA,IACL,aAAa;AAAA,IACb,UAAU;AAAA,EACX;AAAA;AAAA,EAEA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,UAAU;AAAA,EACV,YAAY;AACb;AAIO,MAAM,mBAAmB;AAAA,EAC/B,WAAW,UAAU;AAAA,IACpB,GAAG;AAAA,IACH,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,UAAU;AAAA,IACV,cAAc;AAAA,EACf,CAAC;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../src/extensions/shared.ts"],"sourcesContent":["import Image from '@tiptap/extension-image';\nimport { ListKit } from '@tiptap/extension-list';\nimport StarterKit, { type StarterKitOptions } from '@tiptap/starter-kit';\n\nimport { CodeBlockExtension } from './code-block';\n\n// Shared StarterKit config: content nodes/marks, no lists (use ListKit instead),\n// no codeBlock (use the lowlight-extended CodeBlockExtension instead).\nexport const starterKitBaseConfig: Partial<StarterKitOptions> = {\n\theading: { levels: [1, 2, 3, 4, 5, 6] },\n\tlink: {\n\t\topenOnClick: false,\n\t\tautolink: true\n\t},\n\t// Disable StarterKit's built-in list handling; use @tiptap/extension-list instead\n\tbulletList: false,\n\torderedList: false,\n\tlistItem: false,\n\tlistKeymap: false,\n\t// Disable StarterKit's vanilla code-block; use the lowlight one instead\n\tcodeBlock: false\n};\n\n// Content model extensions — shared by editor and reader\n// No interactive features (dropcursor, gapcursor, undoRedo, trailingNode)\nexport const sharedExtensions = [\n\tStarterKit.configure({\n\t\t...starterKitBaseConfig,\n\t\tdropcursor: false,\n\t\tgapcursor: false,\n\t\tundoRedo: false,\n\t\ttrailingNode: false\n\t}),\n\tListKit,\n\tCodeBlockExtension,\n\tImage\n];\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,eAAe;AACxB,OAAO,gBAA4C;AAEnD,SAAS,0BAA0B;AAI5B,MAAM,uBAAmD;AAAA,EAC/D,SAAS,EAAE,QAAQ,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,EAAE;AAAA,EACtC,MAAM;AAAA,IACL,aAAa;AAAA,IACb,UAAU;AAAA,EACX;AAAA;AAAA,EAEA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,UAAU;AAAA,EACV,YAAY;AAAA;AAAA,EAEZ,WAAW;AACZ;AAIO,MAAM,mBAAmB;AAAA,EAC/B,WAAW,UAAU;AAAA,IACpB,GAAG;AAAA,IACH,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,UAAU;AAAA,IACV,cAAc;AAAA,EACf,CAAC;AAAA,EACD;AAAA,EACA;AAAA,EACA;AACD;","names":[]}
package/dist/index.cjs CHANGED
@@ -20,7 +20,11 @@ var index_exports = {};
20
20
  __export(index_exports, {
21
21
  BlockquoteButton: () => import_blockquote_button.BlockquoteButton,
22
22
  CodeBlockButton: () => import_code_block_button.CodeBlockButton,
23
+ CodeBlockExtension: () => import_code_block.CodeBlockExtension,
23
24
  HeadingDropdownMenu: () => import_heading_dropdown_menu.HeadingDropdownMenu,
25
+ ImagePopover: () => import_image_popover.ImagePopover,
26
+ LANGUAGES: () => import_languages.LANGUAGES,
27
+ LanguageSelect: () => import_language_select.LanguageSelect,
24
28
  LinkPopover: () => import_link_popover.LinkPopover,
25
29
  ListDropdownMenu: () => import_list_dropdown_menu.ListDropdownMenu,
26
30
  MarkButton: () => import_mark_button.MarkButton,
@@ -30,7 +34,11 @@ __export(index_exports, {
30
34
  Toolbar: () => import_toolbar.Toolbar,
31
35
  ToolbarGroup: () => import_toolbar.ToolbarGroup,
32
36
  ToolbarSeparator: () => import_toolbar.ToolbarSeparator,
33
- UndoRedoButton: () => import_undo_redo_button.UndoRedoButton
37
+ UndoRedoButton: () => import_undo_redo_button.UndoRedoButton,
38
+ createCodeBlockExtension: () => import_code_block.createCodeBlockExtension,
39
+ defaultLowlight: () => import_code_block.defaultLowlight,
40
+ getLanguageLabel: () => import_languages.getLanguageLabel,
41
+ highlightCodeToHtml: () => import_highlight_code_to_html.highlightCodeToHtml
34
42
  });
35
43
  module.exports = __toCommonJS(index_exports);
36
44
  var import_globals = require("./styles/globals.css");
@@ -45,11 +53,20 @@ var import_list_dropdown_menu = require("./components/list-dropdown-menu/list-dr
45
53
  var import_blockquote_button = require("./components/blockquote-button/blockquote-button");
46
54
  var import_code_block_button = require("./components/code-block-button/code-block-button");
47
55
  var import_link_popover = require("./components/link-popover/link-popover");
56
+ var import_image_popover = require("./components/image-popover/image-popover");
57
+ var import_code_block = require("./extensions/code-block");
58
+ var import_language_select = require("./components/code-block-view/language-select");
59
+ var import_languages = require("./lib/languages");
60
+ var import_highlight_code_to_html = require("./lib/highlight-code-to-html");
48
61
  // Annotate the CommonJS export names for ESM import in node:
49
62
  0 && (module.exports = {
50
63
  BlockquoteButton,
51
64
  CodeBlockButton,
65
+ CodeBlockExtension,
52
66
  HeadingDropdownMenu,
67
+ ImagePopover,
68
+ LANGUAGES,
69
+ LanguageSelect,
53
70
  LinkPopover,
54
71
  ListDropdownMenu,
55
72
  MarkButton,
@@ -59,6 +76,10 @@ var import_link_popover = require("./components/link-popover/link-popover");
59
76
  Toolbar,
60
77
  ToolbarGroup,
61
78
  ToolbarSeparator,
62
- UndoRedoButton
79
+ UndoRedoButton,
80
+ createCodeBlockExtension,
81
+ defaultLowlight,
82
+ getLanguageLabel,
83
+ highlightCodeToHtml
63
84
  });
64
85
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import './styles/globals.css';\n\nexport { NotraEditor } from './notra-editor';\nexport type { NotraEditorProps } from './notra-editor';\n\nexport { NotraReader } from './notra-reader';\nexport type { NotraReaderProps } from './notra-reader';\n\nexport {\n\tToolbar,\n\tToolbarGroup,\n\tToolbarSeparator\n} from './components/toolbar/toolbar';\nexport type {\n\tToolbarProps,\n\tToolbarSeparatorProps\n} from './components/toolbar/toolbar';\n\nexport { UndoRedoButton } from './components/undo-redo-button/undo-redo-button';\nexport type { UndoRedoButtonProps } from './components/undo-redo-button/undo-redo-button';\n\nexport { Spacer } from './components/ui/spacer';\n\nexport { MarkButton } from './components/mark-button/mark-button';\nexport type { MarkButtonProps } from './components/mark-button/mark-button';\nexport type { MarkType } from './components/mark-button/use-mark';\n\nexport { HeadingDropdownMenu } from './components/heading-dropdown-menu/heading-dropdown-menu';\nexport type { HeadingDropdownMenuProps } from './components/heading-dropdown-menu/heading-dropdown-menu';\n\nexport { ListDropdownMenu } from './components/list-dropdown-menu/list-dropdown-menu';\nexport type { ListDropdownMenuProps } from './components/list-dropdown-menu/list-dropdown-menu';\n\nexport { BlockquoteButton } from './components/blockquote-button/blockquote-button';\nexport type { BlockquoteButtonProps } from './components/blockquote-button/blockquote-button';\n\nexport { CodeBlockButton } from './components/code-block-button/code-block-button';\nexport type { CodeBlockButtonProps } from './components/code-block-button/code-block-button';\n\nexport { LinkPopover } from './components/link-popover/link-popover';\nexport type { LinkPopoverProps } from './components/link-popover/link-popover';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAO;AAEP,0BAA4B;AAG5B,0BAA4B;AAG5B,qBAIO;AAMP,8BAA+B;AAG/B,oBAAuB;AAEvB,yBAA2B;AAI3B,mCAAoC;AAGpC,gCAAiC;AAGjC,+BAAiC;AAGjC,+BAAgC;AAGhC,0BAA4B;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import './styles/globals.css';\n\nexport { NotraEditor } from './notra-editor';\nexport type { NotraEditorProps } from './notra-editor';\n\nexport { NotraReader } from './notra-reader';\nexport type { NotraReaderProps } from './notra-reader';\n\nexport {\n\tToolbar,\n\tToolbarGroup,\n\tToolbarSeparator\n} from './components/toolbar/toolbar';\nexport type {\n\tToolbarProps,\n\tToolbarSeparatorProps\n} from './components/toolbar/toolbar';\n\nexport { UndoRedoButton } from './components/undo-redo-button/undo-redo-button';\nexport type { UndoRedoButtonProps } from './components/undo-redo-button/undo-redo-button';\n\nexport { Spacer } from './components/ui/spacer';\n\nexport { MarkButton } from './components/mark-button/mark-button';\nexport type { MarkButtonProps } from './components/mark-button/mark-button';\nexport type { MarkType } from './components/mark-button/use-mark';\n\nexport { HeadingDropdownMenu } from './components/heading-dropdown-menu/heading-dropdown-menu';\nexport type { HeadingDropdownMenuProps } from './components/heading-dropdown-menu/heading-dropdown-menu';\n\nexport { ListDropdownMenu } from './components/list-dropdown-menu/list-dropdown-menu';\nexport type { ListDropdownMenuProps } from './components/list-dropdown-menu/list-dropdown-menu';\n\nexport { BlockquoteButton } from './components/blockquote-button/blockquote-button';\nexport type { BlockquoteButtonProps } from './components/blockquote-button/blockquote-button';\n\nexport { CodeBlockButton } from './components/code-block-button/code-block-button';\nexport type { CodeBlockButtonProps } from './components/code-block-button/code-block-button';\n\nexport { LinkPopover } from './components/link-popover/link-popover';\nexport type { LinkPopoverProps } from './components/link-popover/link-popover';\n\nexport { ImagePopover } from './components/image-popover/image-popover';\nexport type { ImagePopoverProps } from './components/image-popover/image-popover';\n\nexport {\n\tCodeBlockExtension,\n\tcreateCodeBlockExtension,\n\tdefaultLowlight\n} from './extensions/code-block';\n\nexport { LanguageSelect } from './components/code-block-view/language-select';\nexport type { LanguageSelectProps } from './components/code-block-view/language-select';\n\nexport { LANGUAGES, getLanguageLabel } from './lib/languages';\nexport type { Language } from './lib/languages';\n\nexport { highlightCodeToHtml } from './lib/highlight-code-to-html';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAO;AAEP,0BAA4B;AAG5B,0BAA4B;AAG5B,qBAIO;AAMP,8BAA+B;AAG/B,oBAAuB;AAEvB,yBAA2B;AAI3B,mCAAoC;AAGpC,gCAAiC;AAGjC,+BAAiC;AAGjC,+BAAgC;AAGhC,0BAA4B;AAG5B,2BAA6B;AAG7B,wBAIO;AAEP,6BAA+B;AAG/B,uBAA4C;AAG5C,oCAAoC;","names":[]}
package/dist/index.d.cts CHANGED
@@ -10,7 +10,13 @@ export { ListDropdownMenu, ListDropdownMenuProps } from './components/list-dropd
10
10
  export { BlockquoteButton, BlockquoteButtonProps } from './components/blockquote-button/blockquote-button.cjs';
11
11
  export { CodeBlockButton, CodeBlockButtonProps } from './components/code-block-button/code-block-button.cjs';
12
12
  export { LinkPopover, LinkPopoverProps } from './components/link-popover/link-popover.cjs';
13
+ export { ImagePopover, ImagePopoverProps } from './components/image-popover/image-popover.cjs';
14
+ export { CodeBlockExtension, createCodeBlockExtension, defaultLowlight } from './extensions/code-block.cjs';
15
+ export { LanguageSelect, LanguageSelectProps } from './components/code-block-view/language-select.cjs';
16
+ export { LANGUAGES, Language, getLanguageLabel } from './lib/languages.cjs';
17
+ export { highlightCodeToHtml } from './lib/highlight-code-to-html.cjs';
13
18
  import 'react/jsx-runtime';
19
+ import 'lowlight';
14
20
  import 'react';
15
21
  import './components/undo-redo-button/use-undo-redo.cjs';
16
22
  import 'lucide-react';
@@ -20,3 +26,4 @@ import './components/ui/button.cjs';
20
26
  import 'class-variance-authority/types';
21
27
  import 'class-variance-authority';
22
28
  import './components/list-dropdown-menu/use-list.cjs';
29
+ import '@tiptap/extension-code-block-lowlight';
package/dist/index.d.ts CHANGED
@@ -10,7 +10,13 @@ export { ListDropdownMenu, ListDropdownMenuProps } from './components/list-dropd
10
10
  export { BlockquoteButton, BlockquoteButtonProps } from './components/blockquote-button/blockquote-button.js';
11
11
  export { CodeBlockButton, CodeBlockButtonProps } from './components/code-block-button/code-block-button.js';
12
12
  export { LinkPopover, LinkPopoverProps } from './components/link-popover/link-popover.js';
13
+ export { ImagePopover, ImagePopoverProps } from './components/image-popover/image-popover.js';
14
+ export { CodeBlockExtension, createCodeBlockExtension, defaultLowlight } from './extensions/code-block.js';
15
+ export { LanguageSelect, LanguageSelectProps } from './components/code-block-view/language-select.js';
16
+ export { LANGUAGES, Language, getLanguageLabel } from './lib/languages.js';
17
+ export { highlightCodeToHtml } from './lib/highlight-code-to-html.js';
13
18
  import 'react/jsx-runtime';
19
+ import 'lowlight';
14
20
  import 'react';
15
21
  import './components/undo-redo-button/use-undo-redo.js';
16
22
  import 'lucide-react';
@@ -20,3 +26,4 @@ import './components/ui/button.js';
20
26
  import 'class-variance-authority/types';
21
27
  import 'class-variance-authority';
22
28
  import './components/list-dropdown-menu/use-list.js';
29
+ import '@tiptap/extension-code-block-lowlight';
package/dist/index.mjs CHANGED
@@ -14,10 +14,23 @@ import { ListDropdownMenu } from "./components/list-dropdown-menu/list-dropdown-
14
14
  import { BlockquoteButton } from "./components/blockquote-button/blockquote-button";
15
15
  import { CodeBlockButton } from "./components/code-block-button/code-block-button";
16
16
  import { LinkPopover } from "./components/link-popover/link-popover";
17
+ import { ImagePopover } from "./components/image-popover/image-popover";
18
+ import {
19
+ CodeBlockExtension,
20
+ createCodeBlockExtension,
21
+ defaultLowlight
22
+ } from "./extensions/code-block";
23
+ import { LanguageSelect } from "./components/code-block-view/language-select";
24
+ import { LANGUAGES, getLanguageLabel } from "./lib/languages";
25
+ import { highlightCodeToHtml } from "./lib/highlight-code-to-html";
17
26
  export {
18
27
  BlockquoteButton,
19
28
  CodeBlockButton,
29
+ CodeBlockExtension,
20
30
  HeadingDropdownMenu,
31
+ ImagePopover,
32
+ LANGUAGES,
33
+ LanguageSelect,
21
34
  LinkPopover,
22
35
  ListDropdownMenu,
23
36
  MarkButton,
@@ -27,6 +40,10 @@ export {
27
40
  Toolbar,
28
41
  ToolbarGroup,
29
42
  ToolbarSeparator,
30
- UndoRedoButton
43
+ UndoRedoButton,
44
+ createCodeBlockExtension,
45
+ defaultLowlight,
46
+ getLanguageLabel,
47
+ highlightCodeToHtml
31
48
  };
32
49
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import './styles/globals.css';\n\nexport { NotraEditor } from './notra-editor';\nexport type { NotraEditorProps } from './notra-editor';\n\nexport { NotraReader } from './notra-reader';\nexport type { NotraReaderProps } from './notra-reader';\n\nexport {\n\tToolbar,\n\tToolbarGroup,\n\tToolbarSeparator\n} from './components/toolbar/toolbar';\nexport type {\n\tToolbarProps,\n\tToolbarSeparatorProps\n} from './components/toolbar/toolbar';\n\nexport { UndoRedoButton } from './components/undo-redo-button/undo-redo-button';\nexport type { UndoRedoButtonProps } from './components/undo-redo-button/undo-redo-button';\n\nexport { Spacer } from './components/ui/spacer';\n\nexport { MarkButton } from './components/mark-button/mark-button';\nexport type { MarkButtonProps } from './components/mark-button/mark-button';\nexport type { MarkType } from './components/mark-button/use-mark';\n\nexport { HeadingDropdownMenu } from './components/heading-dropdown-menu/heading-dropdown-menu';\nexport type { HeadingDropdownMenuProps } from './components/heading-dropdown-menu/heading-dropdown-menu';\n\nexport { ListDropdownMenu } from './components/list-dropdown-menu/list-dropdown-menu';\nexport type { ListDropdownMenuProps } from './components/list-dropdown-menu/list-dropdown-menu';\n\nexport { BlockquoteButton } from './components/blockquote-button/blockquote-button';\nexport type { BlockquoteButtonProps } from './components/blockquote-button/blockquote-button';\n\nexport { CodeBlockButton } from './components/code-block-button/code-block-button';\nexport type { CodeBlockButtonProps } from './components/code-block-button/code-block-button';\n\nexport { LinkPopover } from './components/link-popover/link-popover';\nexport type { LinkPopoverProps } from './components/link-popover/link-popover';\n"],"mappings":"AAAA,OAAO;AAEP,SAAS,mBAAmB;AAG5B,SAAS,mBAAmB;AAG5B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAMP,SAAS,sBAAsB;AAG/B,SAAS,cAAc;AAEvB,SAAS,kBAAkB;AAI3B,SAAS,2BAA2B;AAGpC,SAAS,wBAAwB;AAGjC,SAAS,wBAAwB;AAGjC,SAAS,uBAAuB;AAGhC,SAAS,mBAAmB;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import './styles/globals.css';\n\nexport { NotraEditor } from './notra-editor';\nexport type { NotraEditorProps } from './notra-editor';\n\nexport { NotraReader } from './notra-reader';\nexport type { NotraReaderProps } from './notra-reader';\n\nexport {\n\tToolbar,\n\tToolbarGroup,\n\tToolbarSeparator\n} from './components/toolbar/toolbar';\nexport type {\n\tToolbarProps,\n\tToolbarSeparatorProps\n} from './components/toolbar/toolbar';\n\nexport { UndoRedoButton } from './components/undo-redo-button/undo-redo-button';\nexport type { UndoRedoButtonProps } from './components/undo-redo-button/undo-redo-button';\n\nexport { Spacer } from './components/ui/spacer';\n\nexport { MarkButton } from './components/mark-button/mark-button';\nexport type { MarkButtonProps } from './components/mark-button/mark-button';\nexport type { MarkType } from './components/mark-button/use-mark';\n\nexport { HeadingDropdownMenu } from './components/heading-dropdown-menu/heading-dropdown-menu';\nexport type { HeadingDropdownMenuProps } from './components/heading-dropdown-menu/heading-dropdown-menu';\n\nexport { ListDropdownMenu } from './components/list-dropdown-menu/list-dropdown-menu';\nexport type { ListDropdownMenuProps } from './components/list-dropdown-menu/list-dropdown-menu';\n\nexport { BlockquoteButton } from './components/blockquote-button/blockquote-button';\nexport type { BlockquoteButtonProps } from './components/blockquote-button/blockquote-button';\n\nexport { CodeBlockButton } from './components/code-block-button/code-block-button';\nexport type { CodeBlockButtonProps } from './components/code-block-button/code-block-button';\n\nexport { LinkPopover } from './components/link-popover/link-popover';\nexport type { LinkPopoverProps } from './components/link-popover/link-popover';\n\nexport { ImagePopover } from './components/image-popover/image-popover';\nexport type { ImagePopoverProps } from './components/image-popover/image-popover';\n\nexport {\n\tCodeBlockExtension,\n\tcreateCodeBlockExtension,\n\tdefaultLowlight\n} from './extensions/code-block';\n\nexport { LanguageSelect } from './components/code-block-view/language-select';\nexport type { LanguageSelectProps } from './components/code-block-view/language-select';\n\nexport { LANGUAGES, getLanguageLabel } from './lib/languages';\nexport type { Language } from './lib/languages';\n\nexport { highlightCodeToHtml } from './lib/highlight-code-to-html';\n"],"mappings":"AAAA,OAAO;AAEP,SAAS,mBAAmB;AAG5B,SAAS,mBAAmB;AAG5B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAMP,SAAS,sBAAsB;AAG/B,SAAS,cAAc;AAEvB,SAAS,kBAAkB;AAI3B,SAAS,2BAA2B;AAGpC,SAAS,wBAAwB;AAGjC,SAAS,wBAAwB;AAGjC,SAAS,uBAAuB;AAGhC,SAAS,mBAAmB;AAG5B,SAAS,oBAAoB;AAG7B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEP,SAAS,sBAAsB;AAG/B,SAAS,WAAW,wBAAwB;AAG5C,SAAS,2BAA2B;","names":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var highlight_code_to_html_exports = {};
20
+ __export(highlight_code_to_html_exports, {
21
+ highlightCodeToHtml: () => highlightCodeToHtml
22
+ });
23
+ module.exports = __toCommonJS(highlight_code_to_html_exports);
24
+ var import_hast_util_to_html = require("hast-util-to-html");
25
+ function highlightCodeToHtml(code, language, lowlight) {
26
+ if (!code) return "";
27
+ const lang = language ?? "auto";
28
+ if (lang === "plaintext") {
29
+ return (0, import_hast_util_to_html.toHtml)({ type: "text", value: code });
30
+ }
31
+ const tree = lang === "auto" || !lowlight.registered(lang) ? lowlight.highlightAuto(code) : lowlight.highlight(lang, code);
32
+ return (0, import_hast_util_to_html.toHtml)(tree);
33
+ }
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ highlightCodeToHtml
37
+ });
38
+ //# sourceMappingURL=highlight-code-to-html.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/highlight-code-to-html.ts"],"sourcesContent":["import { toHtml } from 'hast-util-to-html';\n\nimport type { createLowlight } from 'lowlight';\n\ntype Lowlight = ReturnType<typeof createLowlight>;\n\n// Server-safe: lowlight + hast-util-to-html are pure JS and run in Node.\n// Used by NotraReader's nodeMapping.codeBlock; the editor uses the\n// extension's built-in ProseMirror decorations instead.\nexport function highlightCodeToHtml(\n\tcode: string,\n\tlanguage: string | null | undefined,\n\tlowlight: Lowlight\n): string {\n\tif (!code) return '';\n\n\tconst lang = language ?? 'auto';\n\n\t// \"plaintext\" deliberately skips highlighting — emit only escaped text.\n\tif (lang === 'plaintext') {\n\t\treturn toHtml({ type: 'text', value: code });\n\t}\n\n\tconst tree =\n\t\tlang === 'auto' || !lowlight.registered(lang)\n\t\t\t? lowlight.highlightAuto(code)\n\t\t\t: lowlight.highlight(lang, code);\n\n\treturn toHtml(tree);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAAuB;AAShB,SAAS,oBACf,MACA,UACA,UACS;AACT,MAAI,CAAC,KAAM,QAAO;AAElB,QAAM,OAAO,YAAY;AAGzB,MAAI,SAAS,aAAa;AACzB,eAAO,iCAAO,EAAE,MAAM,QAAQ,OAAO,KAAK,CAAC;AAAA,EAC5C;AAEA,QAAM,OACL,SAAS,UAAU,CAAC,SAAS,WAAW,IAAI,IACzC,SAAS,cAAc,IAAI,IAC3B,SAAS,UAAU,MAAM,IAAI;AAEjC,aAAO,iCAAO,IAAI;AACnB;","names":[]}
@@ -0,0 +1,6 @@
1
+ import { createLowlight } from 'lowlight';
2
+
3
+ type Lowlight = ReturnType<typeof createLowlight>;
4
+ declare function highlightCodeToHtml(code: string, language: string | null | undefined, lowlight: Lowlight): string;
5
+
6
+ export { highlightCodeToHtml };
@@ -0,0 +1,6 @@
1
+ import { createLowlight } from 'lowlight';
2
+
3
+ type Lowlight = ReturnType<typeof createLowlight>;
4
+ declare function highlightCodeToHtml(code: string, language: string | null | undefined, lowlight: Lowlight): string;
5
+
6
+ export { highlightCodeToHtml };
@@ -0,0 +1,14 @@
1
+ import { toHtml } from "hast-util-to-html";
2
+ function highlightCodeToHtml(code, language, lowlight) {
3
+ if (!code) return "";
4
+ const lang = language ?? "auto";
5
+ if (lang === "plaintext") {
6
+ return toHtml({ type: "text", value: code });
7
+ }
8
+ const tree = lang === "auto" || !lowlight.registered(lang) ? lowlight.highlightAuto(code) : lowlight.highlight(lang, code);
9
+ return toHtml(tree);
10
+ }
11
+ export {
12
+ highlightCodeToHtml
13
+ };
14
+ //# sourceMappingURL=highlight-code-to-html.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/highlight-code-to-html.ts"],"sourcesContent":["import { toHtml } from 'hast-util-to-html';\n\nimport type { createLowlight } from 'lowlight';\n\ntype Lowlight = ReturnType<typeof createLowlight>;\n\n// Server-safe: lowlight + hast-util-to-html are pure JS and run in Node.\n// Used by NotraReader's nodeMapping.codeBlock; the editor uses the\n// extension's built-in ProseMirror decorations instead.\nexport function highlightCodeToHtml(\n\tcode: string,\n\tlanguage: string | null | undefined,\n\tlowlight: Lowlight\n): string {\n\tif (!code) return '';\n\n\tconst lang = language ?? 'auto';\n\n\t// \"plaintext\" deliberately skips highlighting — emit only escaped text.\n\tif (lang === 'plaintext') {\n\t\treturn toHtml({ type: 'text', value: code });\n\t}\n\n\tconst tree =\n\t\tlang === 'auto' || !lowlight.registered(lang)\n\t\t\t? lowlight.highlightAuto(code)\n\t\t\t: lowlight.highlight(lang, code);\n\n\treturn toHtml(tree);\n}\n"],"mappings":"AAAA,SAAS,cAAc;AAShB,SAAS,oBACf,MACA,UACA,UACS;AACT,MAAI,CAAC,KAAM,QAAO;AAElB,QAAM,OAAO,YAAY;AAGzB,MAAI,SAAS,aAAa;AACzB,WAAO,OAAO,EAAE,MAAM,QAAQ,OAAO,KAAK,CAAC;AAAA,EAC5C;AAEA,QAAM,OACL,SAAS,UAAU,CAAC,SAAS,WAAW,IAAI,IACzC,SAAS,cAAc,IAAI,IAC3B,SAAS,UAAU,MAAM,IAAI;AAEjC,SAAO,OAAO,IAAI;AACnB;","names":[]}
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var languages_exports = {};
20
+ __export(languages_exports, {
21
+ LANGUAGES: () => LANGUAGES,
22
+ getLanguageLabel: () => getLanguageLabel,
23
+ normalizeLanguage: () => normalizeLanguage
24
+ });
25
+ module.exports = __toCommonJS(languages_exports);
26
+ const LANGUAGES = [
27
+ { label: "Auto", value: "auto" },
28
+ { label: "Plain Text", value: "plaintext" },
29
+ { label: "ABAP", value: "abap" },
30
+ { label: "Agda", value: "agda" },
31
+ { label: "Arduino", value: "arduino", aliases: ["ino"] },
32
+ { label: "ASCII Art", value: "ascii" },
33
+ { label: "Assembly", value: "x86asm" },
34
+ { label: "Bash", value: "bash", aliases: ["sh", "zsh"] },
35
+ { label: "BASIC", value: "basic" },
36
+ { label: "BNF", value: "bnf" },
37
+ { label: "C", value: "c", aliases: ["h"] },
38
+ { label: "C#", value: "csharp", aliases: ["cs", "c#"] },
39
+ {
40
+ label: "C++",
41
+ value: "cpp",
42
+ aliases: ["cc", "c++", "h++", "hpp", "hh", "hxx", "cxx"]
43
+ },
44
+ { label: "Clojure", value: "clojure", aliases: ["clj", "edn"] },
45
+ {
46
+ label: "CoffeeScript",
47
+ value: "coffeescript",
48
+ aliases: ["coffee", "cson", "iced"]
49
+ },
50
+ { label: "Coq", value: "coq" },
51
+ { label: "CSS", value: "css" },
52
+ { label: "Dart", value: "dart" },
53
+ { label: "Dhall", value: "dhall" },
54
+ { label: "Diff", value: "diff", aliases: ["patch"] },
55
+ { label: "Docker", value: "dockerfile", aliases: ["docker"] },
56
+ { label: "EBNF", value: "ebnf" },
57
+ { label: "Elixir", value: "elixir", aliases: ["ex", "exs"] },
58
+ { label: "Elm", value: "elm" },
59
+ { label: "Erlang", value: "erlang", aliases: ["erl"] },
60
+ { label: "F#", value: "fsharp", aliases: ["fs", "f#"] },
61
+ { label: "Flow", value: "flow" },
62
+ { label: "Fortran", value: "fortran", aliases: ["f90", "f95"] },
63
+ { label: "Gherkin", value: "gherkin", aliases: ["feature"] },
64
+ { label: "GLSL", value: "glsl" },
65
+ { label: "Go", value: "go", aliases: ["golang"] },
66
+ { label: "GraphQL", value: "graphql", aliases: ["gql"] },
67
+ { label: "Groovy", value: "groovy" },
68
+ { label: "Haskell", value: "haskell", aliases: ["hs"] },
69
+ { label: "HCL", value: "hcl" },
70
+ { label: "HTML", value: "html" },
71
+ { label: "Idris", value: "idris" },
72
+ { label: "Java", value: "java", aliases: ["jsp"] },
73
+ {
74
+ label: "JavaScript",
75
+ value: "javascript",
76
+ aliases: ["js", "jsx", "mjs", "cjs"]
77
+ },
78
+ { label: "JSON", value: "json", aliases: ["jsonc"] },
79
+ { label: "Julia", value: "julia" },
80
+ { label: "Kotlin", value: "kotlin", aliases: ["kt", "kts"] },
81
+ { label: "LaTeX", value: "latex", aliases: ["tex"] },
82
+ { label: "Less", value: "less" },
83
+ { label: "Lisp", value: "lisp" },
84
+ { label: "LiveScript", value: "livescript", aliases: ["ls"] },
85
+ { label: "LLVM IR", value: "llvm" },
86
+ { label: "Lua", value: "lua", aliases: ["pluto"] },
87
+ { label: "Makefile", value: "makefile", aliases: ["mk", "mak", "make"] },
88
+ { label: "Markdown", value: "markdown", aliases: ["md", "mkdown", "mkd"] },
89
+ { label: "Markup", value: "markup" },
90
+ { label: "MATLAB", value: "matlab" },
91
+ { label: "Mathematica", value: "mathematica", aliases: ["mma", "wl"] },
92
+ { label: "Mermaid", value: "mermaid" },
93
+ { label: "Nix", value: "nix", aliases: ["nixos"] },
94
+ { label: "Notion Formula", value: "notion" },
95
+ {
96
+ label: "Objective-C",
97
+ value: "objectivec",
98
+ aliases: ["mm", "objc", "obj-c", "obj-c++", "objective-c++"]
99
+ },
100
+ { label: "OCaml", value: "ocaml", aliases: ["ml"] },
101
+ { label: "Pascal", value: "pascal" },
102
+ { label: "Perl", value: "perl", aliases: ["pl", "pm"] },
103
+ { label: "PHP", value: "php" },
104
+ { label: "PowerShell", value: "powershell", aliases: ["pwsh", "ps", "ps1"] },
105
+ { label: "Prolog", value: "prolog" },
106
+ { label: "Protocol Buffers", value: "protobuf", aliases: ["proto"] },
107
+ { label: "PureScript", value: "purescript" },
108
+ { label: "Python", value: "python", aliases: ["py", "gyp", "ipython"] },
109
+ { label: "R", value: "r" },
110
+ { label: "Racket", value: "racket" },
111
+ { label: "Reason", value: "reasonml", aliases: ["re"] },
112
+ {
113
+ label: "Ruby",
114
+ value: "ruby",
115
+ aliases: ["rb", "gemspec", "podspec", "thor", "irb"]
116
+ },
117
+ { label: "Rust", value: "rust", aliases: ["rs"] },
118
+ { label: "Sass", value: "sass" },
119
+ { label: "Scala", value: "scala" },
120
+ { label: "Scheme", value: "scheme", aliases: ["scm"] },
121
+ { label: "SCSS", value: "scss" },
122
+ { label: "Shell", value: "shell", aliases: ["console", "shellsession"] },
123
+ { label: "Smalltalk", value: "smalltalk", aliases: ["st"] },
124
+ { label: "Solidity", value: "solidity" },
125
+ { label: "SQL", value: "sql" },
126
+ { label: "Swift", value: "swift" },
127
+ { label: "TOML", value: "toml" },
128
+ {
129
+ label: "TypeScript",
130
+ value: "typescript",
131
+ aliases: ["ts", "tsx", "mts", "cts"]
132
+ },
133
+ { label: "VB.Net", value: "vbnet", aliases: ["vb"] },
134
+ { label: "Verilog", value: "verilog", aliases: ["v", "sv", "svh"] },
135
+ { label: "VHDL", value: "vhdl" },
136
+ { label: "Visual Basic", value: "visualbasic" },
137
+ { label: "WebAssembly", value: "wasm" },
138
+ {
139
+ label: "XML",
140
+ value: "xml",
141
+ // Note: highlight.js also lists "html" here, but `html` is its own
142
+ // canonical entry above; including it would rewrite html → xml.
143
+ aliases: [
144
+ "xhtml",
145
+ "rss",
146
+ "atom",
147
+ "xjb",
148
+ "xsd",
149
+ "xsl",
150
+ "plist",
151
+ "wsf",
152
+ "svg"
153
+ ]
154
+ },
155
+ { label: "YAML", value: "yaml", aliases: ["yml"] }
156
+ ];
157
+ const ALIAS_TO_CANONICAL = (() => {
158
+ const map = /* @__PURE__ */ new Map();
159
+ for (const lang of LANGUAGES) {
160
+ for (const alias of lang.aliases ?? []) {
161
+ map.set(alias, lang.value);
162
+ }
163
+ }
164
+ return map;
165
+ })();
166
+ function normalizeLanguage(input) {
167
+ if (!input) return "";
168
+ return ALIAS_TO_CANONICAL.get(input) ?? input;
169
+ }
170
+ function getLanguageLabel(value) {
171
+ if (!value) return "Auto";
172
+ const found = LANGUAGES.find((l) => l.value === value);
173
+ return found?.label ?? value;
174
+ }
175
+ // Annotate the CommonJS export names for ESM import in node:
176
+ 0 && (module.exports = {
177
+ LANGUAGES,
178
+ getLanguageLabel,
179
+ normalizeLanguage
180
+ });
181
+ //# sourceMappingURL=languages.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/languages.ts"],"sourcesContent":["export interface Language {\n\tlabel: string;\n\tvalue: string;\n\t/**\n\t * Aliases recognized by highlight.js for this language. Used by\n\t * `normalizeLanguage` so the markdown input rule (e.g. ```js + Enter)\n\t * stores the canonical `value` instead of the raw alias. Only canonical\n\t * values are listed in this table; an alias that already exists as a\n\t * canonical `value` (e.g. `html` for `xml`) is intentionally excluded\n\t * to preserve the existing UI label.\n\t */\n\taliases?: string[];\n}\n\n// Curated set transcribed from demo/notra/components/editor/ui/language-select.tsx.\n// Keep the order: auto and plaintext first, then alphabetical by label.\n// `aliases` mirror the `aliases` field of the corresponding highlight.js\n// language module (highlight.js@11). Entries missing from highlight.js's\n// shipped languages have no aliases.\nexport const LANGUAGES: Language[] = [\n\t{ label: 'Auto', value: 'auto' },\n\t{ label: 'Plain Text', value: 'plaintext' },\n\t{ label: 'ABAP', value: 'abap' },\n\t{ label: 'Agda', value: 'agda' },\n\t{ label: 'Arduino', value: 'arduino', aliases: ['ino'] },\n\t{ label: 'ASCII Art', value: 'ascii' },\n\t{ label: 'Assembly', value: 'x86asm' },\n\t{ label: 'Bash', value: 'bash', aliases: ['sh', 'zsh'] },\n\t{ label: 'BASIC', value: 'basic' },\n\t{ label: 'BNF', value: 'bnf' },\n\t{ label: 'C', value: 'c', aliases: ['h'] },\n\t{ label: 'C#', value: 'csharp', aliases: ['cs', 'c#'] },\n\t{\n\t\tlabel: 'C++',\n\t\tvalue: 'cpp',\n\t\taliases: ['cc', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx']\n\t},\n\t{ label: 'Clojure', value: 'clojure', aliases: ['clj', 'edn'] },\n\t{\n\t\tlabel: 'CoffeeScript',\n\t\tvalue: 'coffeescript',\n\t\taliases: ['coffee', 'cson', 'iced']\n\t},\n\t{ label: 'Coq', value: 'coq' },\n\t{ label: 'CSS', value: 'css' },\n\t{ label: 'Dart', value: 'dart' },\n\t{ label: 'Dhall', value: 'dhall' },\n\t{ label: 'Diff', value: 'diff', aliases: ['patch'] },\n\t{ label: 'Docker', value: 'dockerfile', aliases: ['docker'] },\n\t{ label: 'EBNF', value: 'ebnf' },\n\t{ label: 'Elixir', value: 'elixir', aliases: ['ex', 'exs'] },\n\t{ label: 'Elm', value: 'elm' },\n\t{ label: 'Erlang', value: 'erlang', aliases: ['erl'] },\n\t{ label: 'F#', value: 'fsharp', aliases: ['fs', 'f#'] },\n\t{ label: 'Flow', value: 'flow' },\n\t{ label: 'Fortran', value: 'fortran', aliases: ['f90', 'f95'] },\n\t{ label: 'Gherkin', value: 'gherkin', aliases: ['feature'] },\n\t{ label: 'GLSL', value: 'glsl' },\n\t{ label: 'Go', value: 'go', aliases: ['golang'] },\n\t{ label: 'GraphQL', value: 'graphql', aliases: ['gql'] },\n\t{ label: 'Groovy', value: 'groovy' },\n\t{ label: 'Haskell', value: 'haskell', aliases: ['hs'] },\n\t{ label: 'HCL', value: 'hcl' },\n\t{ label: 'HTML', value: 'html' },\n\t{ label: 'Idris', value: 'idris' },\n\t{ label: 'Java', value: 'java', aliases: ['jsp'] },\n\t{\n\t\tlabel: 'JavaScript',\n\t\tvalue: 'javascript',\n\t\taliases: ['js', 'jsx', 'mjs', 'cjs']\n\t},\n\t{ label: 'JSON', value: 'json', aliases: ['jsonc'] },\n\t{ label: 'Julia', value: 'julia' },\n\t{ label: 'Kotlin', value: 'kotlin', aliases: ['kt', 'kts'] },\n\t{ label: 'LaTeX', value: 'latex', aliases: ['tex'] },\n\t{ label: 'Less', value: 'less' },\n\t{ label: 'Lisp', value: 'lisp' },\n\t{ label: 'LiveScript', value: 'livescript', aliases: ['ls'] },\n\t{ label: 'LLVM IR', value: 'llvm' },\n\t{ label: 'Lua', value: 'lua', aliases: ['pluto'] },\n\t{ label: 'Makefile', value: 'makefile', aliases: ['mk', 'mak', 'make'] },\n\t{ label: 'Markdown', value: 'markdown', aliases: ['md', 'mkdown', 'mkd'] },\n\t{ label: 'Markup', value: 'markup' },\n\t{ label: 'MATLAB', value: 'matlab' },\n\t{ label: 'Mathematica', value: 'mathematica', aliases: ['mma', 'wl'] },\n\t{ label: 'Mermaid', value: 'mermaid' },\n\t{ label: 'Nix', value: 'nix', aliases: ['nixos'] },\n\t{ label: 'Notion Formula', value: 'notion' },\n\t{\n\t\tlabel: 'Objective-C',\n\t\tvalue: 'objectivec',\n\t\taliases: ['mm', 'objc', 'obj-c', 'obj-c++', 'objective-c++']\n\t},\n\t{ label: 'OCaml', value: 'ocaml', aliases: ['ml'] },\n\t{ label: 'Pascal', value: 'pascal' },\n\t{ label: 'Perl', value: 'perl', aliases: ['pl', 'pm'] },\n\t{ label: 'PHP', value: 'php' },\n\t{ label: 'PowerShell', value: 'powershell', aliases: ['pwsh', 'ps', 'ps1'] },\n\t{ label: 'Prolog', value: 'prolog' },\n\t{ label: 'Protocol Buffers', value: 'protobuf', aliases: ['proto'] },\n\t{ label: 'PureScript', value: 'purescript' },\n\t{ label: 'Python', value: 'python', aliases: ['py', 'gyp', 'ipython'] },\n\t{ label: 'R', value: 'r' },\n\t{ label: 'Racket', value: 'racket' },\n\t{ label: 'Reason', value: 'reasonml', aliases: ['re'] },\n\t{\n\t\tlabel: 'Ruby',\n\t\tvalue: 'ruby',\n\t\taliases: ['rb', 'gemspec', 'podspec', 'thor', 'irb']\n\t},\n\t{ label: 'Rust', value: 'rust', aliases: ['rs'] },\n\t{ label: 'Sass', value: 'sass' },\n\t{ label: 'Scala', value: 'scala' },\n\t{ label: 'Scheme', value: 'scheme', aliases: ['scm'] },\n\t{ label: 'SCSS', value: 'scss' },\n\t{ label: 'Shell', value: 'shell', aliases: ['console', 'shellsession'] },\n\t{ label: 'Smalltalk', value: 'smalltalk', aliases: ['st'] },\n\t{ label: 'Solidity', value: 'solidity' },\n\t{ label: 'SQL', value: 'sql' },\n\t{ label: 'Swift', value: 'swift' },\n\t{ label: 'TOML', value: 'toml' },\n\t{\n\t\tlabel: 'TypeScript',\n\t\tvalue: 'typescript',\n\t\taliases: ['ts', 'tsx', 'mts', 'cts']\n\t},\n\t{ label: 'VB.Net', value: 'vbnet', aliases: ['vb'] },\n\t{ label: 'Verilog', value: 'verilog', aliases: ['v', 'sv', 'svh'] },\n\t{ label: 'VHDL', value: 'vhdl' },\n\t{ label: 'Visual Basic', value: 'visualbasic' },\n\t{ label: 'WebAssembly', value: 'wasm' },\n\t{\n\t\tlabel: 'XML',\n\t\tvalue: 'xml',\n\t\t// Note: highlight.js also lists \"html\" here, but `html` is its own\n\t\t// canonical entry above; including it would rewrite html → xml.\n\t\taliases: [\n\t\t\t'xhtml',\n\t\t\t'rss',\n\t\t\t'atom',\n\t\t\t'xjb',\n\t\t\t'xsd',\n\t\t\t'xsl',\n\t\t\t'plist',\n\t\t\t'wsf',\n\t\t\t'svg'\n\t\t]\n\t},\n\t{ label: 'YAML', value: 'yaml', aliases: ['yml'] }\n];\n\nconst ALIAS_TO_CANONICAL = (() => {\n\tconst map = new Map<string, string>();\n\n\tfor (const lang of LANGUAGES) {\n\t\tfor (const alias of lang.aliases ?? []) {\n\t\t\tmap.set(alias, lang.value);\n\t\t}\n\t}\n\n\treturn map;\n})();\n\n/**\n * Resolve a user-supplied language identifier to a canonical LANGUAGES.value.\n * Aliases (e.g. `js`, `ts`, `py`) collapse to their canonical form\n * (`javascript`, `typescript`, `python`); unknown identifiers and canonical\n * values pass through unchanged. Empty / undefined input returns ''.\n */\nexport function normalizeLanguage(input: string | undefined | null): string {\n\tif (!input) return '';\n\n\treturn ALIAS_TO_CANONICAL.get(input) ?? input;\n}\n\nexport function getLanguageLabel(value: string | null | undefined): string {\n\tif (!value) return 'Auto';\n\n\tconst found = LANGUAGES.find((l) => l.value === value);\n\n\treturn found?.label ?? value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBO,MAAM,YAAwB;AAAA,EACpC,EAAE,OAAO,QAAQ,OAAO,OAAO;AAAA,EAC/B,EAAE,OAAO,cAAc,OAAO,YAAY;AAAA,EAC1C,EAAE,OAAO,QAAQ,OAAO,OAAO;AAAA,EAC/B,EAAE,OAAO,QAAQ,OAAO,OAAO;AAAA,EAC/B,EAAE,OAAO,WAAW,OAAO,WAAW,SAAS,CAAC,KAAK,EAAE;AAAA,EACvD,EAAE,OAAO,aAAa,OAAO,QAAQ;AAAA,EACrC,EAAE,OAAO,YAAY,OAAO,SAAS;AAAA,EACrC,EAAE,OAAO,QAAQ,OAAO,QAAQ,SAAS,CAAC,MAAM,KAAK,EAAE;AAAA,EACvD,EAAE,OAAO,SAAS,OAAO,QAAQ;AAAA,EACjC,EAAE,OAAO,OAAO,OAAO,MAAM;AAAA,EAC7B,EAAE,OAAO,KAAK,OAAO,KAAK,SAAS,CAAC,GAAG,EAAE;AAAA,EACzC,EAAE,OAAO,MAAM,OAAO,UAAU,SAAS,CAAC,MAAM,IAAI,EAAE;AAAA,EACtD;AAAA,IACC,OAAO;AAAA,IACP,OAAO;AAAA,IACP,SAAS,CAAC,MAAM,OAAO,OAAO,OAAO,MAAM,OAAO,KAAK;AAAA,EACxD;AAAA,EACA,EAAE,OAAO,WAAW,OAAO,WAAW,SAAS,CAAC,OAAO,KAAK,EAAE;AAAA,EAC9D;AAAA,IACC,OAAO;AAAA,IACP,OAAO;AAAA,IACP,SAAS,CAAC,UAAU,QAAQ,MAAM;AAAA,EACnC;AAAA,EACA,EAAE,OAAO,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