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: IS_IOS, IS_SAFARI, IS_APPLE_WEBKIT, CAN_USE_BEFORE_INPUT not found in lexical import errors #5827

Closed
lsbyerley opened this issue Apr 4, 2024 · 6 comments · Fixed by #5831

Comments

@lsbyerley
Copy link
Contributor

export 'IS_IOS' (imported as 'IS_IOS') was not found in 'lexical'
export 'IS_SAFARI' (imported as 'IS_SAFARI') was not found in 'lexical'
export 'IS_APPLE_WEBKIT' (imported as 'IS_APPLE_WEBKIT') was not found in 'lexical' 
export 'CAN_USE_BEFORE_INPUT' (imported as 'CAN_USE_BEFORE_INPUT') was not found in 'lexical'

Lexical version: 0.14.2

Steps To Reproduce

  1. Upgrade from 0.13.1 to 0.14.2 results in the above errors during build

The current behavior

  • The 4 import errors above are shown in the build logs

The expected behavior

  • No import errors
@2wheeh
Copy link
Contributor

2wheeh commented Apr 4, 2024

would you try with 0.14.3? it fixes some imports errors 😋

@lsbyerley
Copy link
Contributor Author

@2wheeh Yes, we are still observing these import errors on 0.14.3

@etrepum
Copy link
Collaborator

etrepum commented Apr 4, 2024

These constants weren't exported in 0.13.1 either… if it worked for you maybe your bundler was doing something weird?

@ivailop7
Copy link
Collaborator

ivailop7 commented Apr 4, 2024

These were never exported, they've always been in the shared folder for the Playground, which was never packaged. Copy-pasting is the current method. I do agree it makes sense to be part of the lexical-utils package.

@etrepum
Copy link
Collaborator

etrepum commented Apr 4, 2024

I would also like to see these be exported, I copied them into a project I worked on because I basically had a hybrid of registerPlainText and registerRichText and they both depend on these constants.

For what it's worth, here are the private imports used by those implementations:

packages/lexical-rich-text/src/index.ts

import caretFromPoint from 'shared/caretFromPoint';
import {
  CAN_USE_BEFORE_INPUT,
  IS_APPLE_WEBKIT,
  IS_IOS,
  IS_SAFARI,
} from 'shared/environment';

packages/lexical-plain-text/src/index.ts

import {
  CAN_USE_BEFORE_INPUT,
  IS_APPLE_WEBKIT,
  IS_IOS,
  IS_SAFARI,
} from 'shared/environment';

@ivailop7
Copy link
Collaborator

ivailop7 commented Apr 4, 2024

I would also like to see these be exported, I copied them into a project I worked on because I basically had a hybrid of registerPlainText and registerRichText and they both depend on these constants.

For what it's worth, here are the private imports used by those implementations:

packages/lexical-rich-text/src/index.ts

import caretFromPoint from 'shared/caretFromPoint';
import {
  CAN_USE_BEFORE_INPUT,
  IS_APPLE_WEBKIT,
  IS_IOS,
  IS_SAFARI,
} from 'shared/environment';

packages/lexical-plain-text/src/index.ts

import {
  CAN_USE_BEFORE_INPUT,
  IS_APPLE_WEBKIT,
  IS_IOS,
  IS_SAFARI,
} from 'shared/environment';

Feel free to raise a PR, happy to move it forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants