Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: pdf-editor example missing exported function. #3744

Open
1 task done
spencerchang opened this issue May 13, 2024 · 2 comments
Open
1 task done

[Bug]: pdf-editor example missing exported function. #3744

spencerchang opened this issue May 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@spencerchang
Copy link

What happened?

Step1: Install page folder latest next.js 14.2.3 with default typescript.
Step2: Install latest tldraw 2.1.4, npm install tldraw
Step3: Follow https://tldraw.dev/examples/use-cases/pdf-editor create same folders and files.
Step4: Some missing exported function showed up.
Step5: Example couldn't work.

ExportPdfButton.tsx:
import { Editor, assert, exportToBlob, useEditor } from 'tldraw'
Module '"tldraw"' has no exported member 'assert'.ts(2305)

PdfPicker.tsx:
import { AssetRecordType, Box, TLAssetId, TLShapeId, assertExists, createShapeId } from 'tldraw'
Module '"tldraw"' has no exported member 'assertExists'.ts(2305)

PdfEditor.tsx:
import { Box, DEFAULT_CAMERA_OPTIONS, SVGContainer, TLComponents, TLImageShape, TLShapePartial, Tldraw, compact, getIndicesBetween, react, sortByIndex, track, useEditor, } from "tldraw";

Module '"tldraw"' has no exported member 'DEFAULT_CAMERA_OPTIONS'.ts(2305)
Module '"tldraw"' has no exported member 'compact'.ts(2305)

How can we reproduce the bug?

Step1: Install page folder latest next.js 14.2.3 with default typescript.
Step2: Install latest tldraw 2.1.4, npm install tldraw
Step3: Follow https://tldraw.dev/examples/use-cases/pdf-editor create same folders and files.
Step4: Some missing exported function showed up.
Step5: Example couldn't work.

What browsers are you seeing the problem on?

Firefox, Chrome, Safari

Contact Details

[email protected]

Code of Conduct

  • I agree to follow this project's Code of Conduct
@spencerchang spencerchang added the bug Something isn't working label May 13, 2024
Copy link

linear bot commented May 13, 2024

@ds300
Copy link
Collaborator

ds300 commented May 17, 2024

Thanks for the report! This was fixed in #3746 and the docs site will update to reflect those changes in our next sdk release which is planned for next week. I'll leave this open until that happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants