From 6d5d47e6dce4c56c23d089423077cad73d403993 Mon Sep 17 00:00:00 2001 From: Roee Sivan Date: Mon, 5 Oct 2026 14:29:29 +0300 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(project)=20rename=20useExpor?= =?UTF-8?q?tAGPL=20to=20useExportXL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BlockNote XL packages moved from AGPL-3.0 to GPL-3.0 (or a proprietary license) between v0.30 and v0.40. We renamed the occurences of AGPL to GPL in the codebase. Signed-off-by: Roee Sivan --- CHANGELOG.md | 4 ++++ CONTRIBUTING.md | 2 +- src/backend/impress/settings.py | 2 +- .../docs/doc-export/__tests__/ExportMIT.test.tsx | 6 +++--- .../docs/doc-export/__tests__/ModalExport.test.tsx | 2 +- .../docs/doc-export/components/ModalExport.tsx | 12 ++++++------ .../src/features/docs/doc-export/hooks/index.ts | 6 +++--- .../hooks/{useExportAGPL.tsx => useExportXL.tsx} | 4 ++-- 8 files changed, 21 insertions(+), 17 deletions(-) rename src/frontend/apps/impress/src/features/docs/doc-export/hooks/{useExportAGPL.tsx => useExportXL.tsx} (96%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c96ef72e4..53bc6c1f12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ and this project adheres to - ✨(docspec) handle DocSpec 4xx/5xx import errors distinctly #2552 +### Changed + +- ♻️(frontend) replace outdated AGPL mentions of BlockNote XL packages #2775 + ## [v6.0.1] - 2026-10-15 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 46a5cc967b..237466adb5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,7 +56,7 @@ If you find an issue with the editor and are able to reproduce it on their [demo Please consider contributing to BlockNotejs, as a library, it's useful to many projects not just Docs. -The project is licensed with Mozilla Public License Version 2.0 but be aware that [XL packages](https://github.com/TypeCellOS/BlockNote/blob/main/packages/xl-docx-exporter/LICENSE) are dual licensed with GNU AFFERO GENERAL PUBLIC LICENSE Version 3 and proprietary license if you are a [sponsor](https://www.blocknotejs.org/pricing). +The project is licensed with Mozilla Public License Version 2.0 but be aware that [XL packages](https://github.com/TypeCellOS/BlockNote/blob/main/packages/xl-docx-exporter/LICENSE) are dual licensed with GNU GENERAL PUBLIC LICENSE Version 3 and proprietary license if you are a [sponsor](https://www.blocknotejs.org/pricing). ### Coordination around issues diff --git a/src/backend/impress/settings.py b/src/backend/impress/settings.py index a7aa0fac9d..4adaee4824 100755 --- a/src/backend/impress/settings.py +++ b/src/backend/impress/settings.py @@ -1011,7 +1011,7 @@ class Base(Configuration): default=False, environ_name="AI_FEATURE_ENABLED", environ_prefix=None ) # Far better UI but more flaky for the moment - # ⚠️ AGPL license, be sure to comply with the Blocknote license + # ⚠️ GPL license, be sure to comply with the Blocknote license # if you enable it (https://www.blocknotejs.org/) AI_FEATURE_BLOCKNOTE_ENABLED = values.BooleanValue( default=False, environ_name="AI_FEATURE_BLOCKNOTE_ENABLED", environ_prefix=None diff --git a/src/frontend/apps/impress/src/features/docs/doc-export/__tests__/ExportMIT.test.tsx b/src/frontend/apps/impress/src/features/docs/doc-export/__tests__/ExportMIT.test.tsx index b614a74cd1..587a776c9a 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-export/__tests__/ExportMIT.test.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-export/__tests__/ExportMIT.test.tsx @@ -1,7 +1,7 @@ import { afterAll, afterEach, describe, expect, it, vi } from 'vitest'; -vi.mock('@/docs/doc-export/hooks/useExportAGPL', () => ({ - useExportAGPL: vi.fn(), +vi.mock('@/docs/doc-export/hooks/useExportXL', () => ({ + useExportXL: vi.fn(), })); const originalEnv = process.env.NEXT_PUBLIC_PUBLISH_AS_MIT; @@ -27,6 +27,6 @@ describe('useModuleExport', () => { process.env.NEXT_PUBLIC_PUBLISH_AS_MIT = 'false'; const Export = await import('@/docs/doc-export/hooks'); - expect(Export.default).toHaveProperty('useExportAGPL'); + expect(Export.default).toHaveProperty('useExportXL'); }); }); diff --git a/src/frontend/apps/impress/src/features/docs/doc-export/__tests__/ModalExport.test.tsx b/src/frontend/apps/impress/src/features/docs/doc-export/__tests__/ModalExport.test.tsx index fa2e856b4f..528876f2db 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-export/__tests__/ModalExport.test.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-export/__tests__/ModalExport.test.tsx @@ -45,7 +45,7 @@ vi.mock('@/docs/doc-management', () => ({ vi.mock('../hooks/', () => ({ default: { - useExportAGPL: () => ({ + useExportXL: () => ({ formats: [{ label: 'PDF', value: 'pdf', labelDescription: '.pdf' }], docToBlob: mocks.docToBlob, }), diff --git a/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx b/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx index e04be65a72..e4efc8fd21 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx @@ -28,7 +28,7 @@ import { } from '../utils_html'; import { addMediaFilesToMarkdownZip } from '../utils_markdown'; -const useExportAGPL = ModulesExport?.useExportAGPL; +const useExportXL = ModulesExport?.useExportXL; interface ModalExportProps { onClose: () => void; @@ -43,9 +43,9 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => { const { untitledDocument } = useTrans(); const mediaUrl = useMediaUrl(); const selectRef = useRef(null); - const exportAGPL = useExportAGPL?.(doc, editor); + const exportXL = useExportXL?.(doc, editor); const [format, setFormat] = useState( - exportAGPL?.formats.find((opt) => opt.value === 'pdf')?.value || 'html', + exportXL?.formats.find((opt) => opt.value === 'pdf')?.value || 'html', ); useEffect(() => { @@ -59,7 +59,7 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => { }, []); const formatSelect = useMemo(() => { - const formatOptions = (exportAGPL?.formats || []).concat([ + const formatOptions = (exportXL?.formats || []).concat([ { label: t('Markdown'), value: 'markdown', @@ -87,7 +87,7 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => { : labels.join(''); return { formatOptions, formatLabels, allFormatsLabel }; - }, [t, exportAGPL?.formats]); + }, [t, exportXL?.formats]); /** Exports the selected format and always releases the loading state. */ async function onSubmit() { @@ -104,7 +104,7 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => { const filename = getExportFilename(documentTitle); let downloadExtension = format === 'markdown' ? 'md' : format; - let blobExport = await exportAGPL?.docToBlob(format, documentTitle); + let blobExport = await exportXL?.docToBlob(format, documentTitle); if (!blobExport && format === 'markdown') { const zip = new JSZip(); diff --git a/src/frontend/apps/impress/src/features/docs/doc-export/hooks/index.ts b/src/frontend/apps/impress/src/features/docs/doc-export/hooks/index.ts index 4cbea5953c..e71f6f7565 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-export/hooks/index.ts +++ b/src/frontend/apps/impress/src/features/docs/doc-export/hooks/index.ts @@ -4,15 +4,15 @@ * the application is not published as MIT. */ -import * as useExportAGPL from './useExportAGPL'; +import * as useExportXL from './useExportXL'; let modulesExport = undefined; if (process.env.NEXT_PUBLIC_PUBLISH_AS_MIT === 'false') { modulesExport = { - ...useExportAGPL, + ...useExportXL, }; } -type ModulesExport = typeof useExportAGPL; +type ModulesExport = typeof useExportXL; export default modulesExport as ModulesExport; diff --git a/src/frontend/apps/impress/src/features/docs/doc-export/hooks/useExportAGPL.tsx b/src/frontend/apps/impress/src/features/docs/doc-export/hooks/useExportXL.tsx similarity index 96% rename from src/frontend/apps/impress/src/features/docs/doc-export/hooks/useExportAGPL.tsx rename to src/frontend/apps/impress/src/features/docs/doc-export/hooks/useExportXL.tsx index 4e02985e78..a74d237579 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-export/hooks/useExportAGPL.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-export/hooks/useExportXL.tsx @@ -1,5 +1,5 @@ /** - * This exports modules are AGPL licensed and should only + * These export modules are GPL licensed and should only * be used when the application is not published as MIT. */ import { DOCXExporter } from '@blocknote/xl-docx-exporter'; @@ -20,7 +20,7 @@ import { getOdtDocsSchemaMappings } from '../mappingODT'; import { getPdfDocsSchemaMappings } from '../mappingPDF'; import { resolveInterlinkTitles } from '../utils'; -export const useExportAGPL = (doc: Doc, editor?: DocsBlockNoteEditor) => { +export const useExportXL = (doc: Doc, editor?: DocsBlockNoteEditor) => { const { t } = useTranslation(); const docToBlob = async (format: string, documentTitle: string) => {