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: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
examples
demos
devtools/visual-testing/results
public
dist
node_modules
Expand Down Expand Up @@ -29,4 +31,4 @@ tests/data
tests/data/**

# Markdown files
*.md
*.md
4 changes: 4 additions & 0 deletions apps/docs/getting-started/frameworks/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function DocEditor({ document }) {
});

return () => {
superdocRef.current?.destroy();
superdocRef.current = null;
};
}, [document]);
Expand Down Expand Up @@ -69,6 +70,7 @@ const DocEditor = forwardRef(({ document, user, onReady }, ref) => {
});

return () => {
superdocRef.current?.destroy();
superdocRef.current = null;
};
}, [document, user, onReady]);
Expand Down Expand Up @@ -190,6 +192,7 @@ const DocEditor = forwardRef<EditorRef, EditorProps>(
superdocRef.current = new SuperDoc(config);

return () => {
superdocRef.current?.destroy();
superdocRef.current = null;
};
}, [document, userId, onReady]);
Expand Down Expand Up @@ -247,6 +250,7 @@ function useSuperDoc(config) {
});

return () => {
superdocRef.current?.destroy();
superdocRef.current = null;
setReady(false);
};
Expand Down
3 changes: 3 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default [
{
ignores: [
'**/dist/**',
'**/dist-types/**',
'**/node_modules/**',
// Generated/vendor files that shouldn't be linted
'**/pdfjs.js',
Expand Down Expand Up @@ -134,6 +135,8 @@ export default [
ignore: [
'^@.*$',
'^bun:.*$', // Bun built-in modules
'^superdoc$',
'^superdoc/style\\.css$',
],
}
]
Expand Down
8 changes: 0 additions & 8 deletions packages/ai/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ export { createAIProvider } from './ai-actions/providers';
export * from './shared/types';
export * from './shared/utils';
export * from './shared/constants';
export type {
AIToolActions,
SafeRecord,
SelectionRange,
SelectionSnapshot,
PlannerContextSnapshot,
BuilderPlanResult,
} from './shared/types';

export { createToolRegistry, getToolDescriptions, isValidTool } from './ai-actions/tools';

Expand Down
10 changes: 4 additions & 6 deletions packages/esign/demo/server/server.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import express from 'express';
import cors from 'cors';
import dotenv from 'dotenv';
import { config as dotenvConfig } from 'dotenv';

dotenv.config();
dotenvConfig();

const app = express();
const PORT = process.env.PORT || 3001;
const SUPERDOC_SERVICES_API_KEY = process.env.SUPERDOC_SERVICES_API_KEY;
const SUPERDOC_SERVICES_BASE_URL =
process.env.SUPERDOC_SERVICES_BASE_URL || 'https://api.superdoc.dev';
const SUPERDOC_SERVICES_BASE_URL = process.env.SUPERDOC_SERVICES_BASE_URL || 'https://api.superdoc.dev';
const CONSENT_FIELD_IDS = new Set(['consent_agreement', 'terms', 'email', '406948812']);
const SIGNATURE_FIELD_ID = '789012';
const IP_ADDRESS = '127.0.0.1'; // Replace with real client IP once available
Expand Down Expand Up @@ -85,8 +84,7 @@ const sendPdfBuffer = (res, base64, fileName, contentType = 'application/pdf') =

app.post('/v1/download', async (req, res) => {
try {
const { document, fields = {}, fileName = 'document.pdf', signatureMode = 'annotate' } =
req.body || {};
const { document, fields = {}, fileName = 'document.pdf', signatureMode = 'annotate' } = req.body || {};

if (!SUPERDOC_SERVICES_API_KEY) {
return res.status(500).json({ error: 'Missing SUPERDOC_SERVICES_API_KEY on the server' });
Expand Down
Loading
Loading