Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/backend/impress/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -43,9 +43,9 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => {
const { untitledDocument } = useTrans();
const mediaUrl = useMediaUrl();
const selectRef = useRef<HTMLDivElement>(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(() => {
Expand All @@ -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',
Expand Down Expand Up @@ -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() {
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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) => {
Expand Down
Loading