sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: Next.js 14.2.0 changed facebook/lexical behavior in dev mode
Labels: bug

### Link to the code that reproduces this issue

https://github.com/mdx-editor/lexical-issue

### To Reproduce

To reproduce, run the project and open the console. You will see:

```
binding counter 0
binding counter 1
Update listener from instance 0
```

Typing in the editor triggers updates from instance 0.

If you run

```
npm i next@14.1.1
```
And run the project again, you will see:

```
binding counter 0
binding counter 1
Update listener from instance 1
```

Typing in the editor triggers updates from instance 1.

### Current vs. Expected behavior

The behavior of Next 14.1.1. The latest instance should be the one triggering changes. 

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 20.11.1
  npm: 10.2.4
  Yarn: 1.22.19
  pnpm: 8.15.5
Relevant Packages:
  next: 14.2.1-canary.5 // Latest available version is detected (14.2.1-canary.5).
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

_No response_
Repository: flutter
Issue: [image_picker] image_picker: ^1.0.7 image rotation issue in IOS
Labels: e: device-specific,platform-ios,p: image_picker,package,P2,team-ios,triaged-ios

### Steps to reproduce

1. get the image from library/gallery
2. select and show it
3. not all but some images are rotated to anticlockwise left side 90 degrees in IOS devices

### Expected results


The image must be same as it is placed in the gallery.

### Actual results

Image rotated automatically in IOS when choosing from library/gallery using ImagePicker().pickImage(ImageSource.gallery).


### Code sample

ImagePicker().pickImage(source: ImageSource.gallery).then((value) async {
          if (value != null) {
            List<int> imageBytes = File(value.path).readAsBytesSync();
            String _base64Image = base64Encode(imageBytes);
          }
        }).onError((err, stackTrace) {
          debugPrint(err.toString());
        });

### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

Flutter (Channel stable, 3.16.7, on Microsoft Windows [Version 10.0.19044.3086], locale en-US)
    • Flutter version 3.16.7 on channel stable at D:\dev\projects\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ef1af02aea (3 months ago), 2024-01-11 15:19:26 -0600
    • Engine revision 4a585b7929
    • Dart version 3.2.4
    • DevTools version 2.28.5
Repository: godot
Issue: Resources.Load<Json> corrupts json data by adding extra symbols to null values
Labels: discussion,documentation,topic:dotnet

### Tested versions

- Reproducible on v4.2.1.stable.mono.official [b09f793f5]

### System information

Godot v4.2.1.stable.mono - macOS 14.3.1 - Vulkan (Forward+) - integrated Apple M3 Max - Apple M3 Max (16 Threads)

Godot v4.2.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop GPU (NVIDIA; 31.0.15.3129) - 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 Threads)

### Issue description

`Godot.Json` Resource corrupts the original json data by adding extra symbols like <> to null values.

Deserialization of a valid json with null values, which was loaded by `Resources.Load<Json>(resPath)` results in exception:
```cs
System.Text.Json.JsonException: '<' is an invalid start of a value.
```

The below serializers are unable to deserialize the json:
- `System.Text.Json.JsonSerializer`
- `Newtonsoft.Json.JsonConvert`

Reading with `Resources.Load<Json> fails:
```cs
var json = ResourceLoader.Load<Json>(resPath);
var sample2 = JsonSerializer.Deserialize<SampleModel[]>(json.Data.AsString());
```

The loaded json becomes corrupted:
```json
[
    {
        "Id": 10,
        "Items": [
            "Item 1",
            "Item 2"
        ],
        "Sounds": [
            "Sound 1",
            "Sound 2"
        ]
    },
    {
        "Id": 11,
        "Items": <null>,
        "Sounds": <null>
    }
]
```

Reading with C# System.IO ok:
```cs
using var fs = File.OpenRead(ProjectSettings.GlobalizePath(resPath));
var sample1 = JsonSerializer.Deserialize<SampleModel[]>(fs);
```
Loaded json is valid, as the original file:
```json
[
    {
        "Id": 10,
        "Items": [
            "Item 1",
            "Item 2"
        ],
        "Sounds": [
            "Sound 1",
            "Sound 2"
        ]
    },
    {
        "Id": 11,
        "Items": null,
        "Sounds": null
    }
]
```
Stumbled upon this while trying to embed json resources into the build. Because Json files are now treated as resources, there should be at least a property in the `Godot.Json` class to access the raw data of the original file without having those unexpected extra modifications from the Engine's side.

### Steps to reproduce

1. Obtain a valid json file with array null values inside
2. Load the json using `Resources.Load<Json>("res://data/sample.json")`
3. Deserialize the loaded json contend at `json.Data.AsString()` with `System.Text.Json.JsonSerializer.Deserialize()`
4. Observe `System.Text.Json.JsonException: '<' is an invalid start of a value.` thrown

### Minimal reproduction project (MRP)

[JsonCorrupt.zip](https://github.com/godotengine/godot/files/14975622/JsonCorrupt.zip)
Repository: stable-diffusion-webui
Issue: [Bug]: Webui Infotext settings not working correctly
Labels: bug-report

### What happened?

I added options in settings to remove all adetailer infotext to have a simple and clean infotext but adetailer info continue to be saved in infotext. I don't know if this bug is limited to adetailer or exist in all extensions.

### Steps to reproduce the problem

Add what you don't want in infotext like image below
![Screenshot 2024-04-15 at 10-08-48 Stable Diffusion](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/39129290/1f4b645a-dec8-45dc-92f4-61ab55c928c8)


### What should have happened?

The adetailer (and others) info must no be inserted in infotext if they have been added to exclusion fields.
Webui v1.8
Repository: stable-diffusion-webui
Issue: [Feature Request]: Infotext as .txt file with just the prompt
Labels: enhancement

### What would your feature do ?

I have the idea to use my own image generation to create a new lora. What I see in this case is webui can generate clean infotext .txt file, well numbered (without overwrite+complete missing numbers) 1.jpg, 2.jpg, 3.jpg, 4.jpg,... each with an infotext file (1.txt, 2.txt, ...) that contain just the positive prompt. Like that we can use the generation directly as training data.

The infotext must no contain external lora, embedding, weight, parenthesis... The info text must be just the clean positive prompt without extra info.
Repository: pytorch
Issue: dlopen: cannot load any more object with static TLS
Labels: module: binaries,triaged

### 🐛 Describe the bug

import exception when
```
 python -c "import torch;import sklearn;"
 # or
 python -c "import sklearn;import torch;"
```

error log:
```
(vary) [centos@01 Vary-master]$ python -c "import torch;import sklearn;"
Traceback (most recent call last):
  File "/home/anaconda3/envs/vary/lib/python3.10/site-packages/sklearn/__check_build/__init__.py", line 48, in <module>
    from ._check_build import check_build  # noqa
ImportError: dlopen: cannot load any more object with static TLS

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/anaconda3/envs/vary/lib/python3.10/site-packages/sklearn/__init__.py", line 81, in <module>
    from . import __check_build  # noqa: F401
  File "/home/anaconda3/envs/vary/lib/python3.10/site-packages/sklearn/__check_build/__init__.py", line 50, in <module>
    raise_build_error(e)
  File "/home/anaconda3/envs/vary/lib/python3.10/site-packages/sklearn/__check_build/__init__.py", line 31, in raise_build_error
    raise ImportError(
ImportError: dlopen: cannot load any more object with static TLS
___________________________________________________________________________
Contents of /home/anaconda3/envs/vary/lib/python3.10/site-packages/sklearn/__check_build:
_check_build.cpython-310-x86_64-linux-gnu.so__init__.py               __pycache__
___________________________________________________________________________
It seems that scikit-learn has not been built correctly.

If you have installed scikit-learn from source, please do not forget
to build the package before using it: run `python setup.py install` or
`make` in the source directory.

If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.
(vary) [centos@01 Vary-master]$ 
(vary) [centos@01 Vary-master]$ 
(vary) [centos@01 Vary-master]$ python -c "import sklearn;import torch;"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/anaconda3/envs/vary/lib/python3.10/site-packages/torch/__init__.py", line 236, in <module>
    _load_global_deps()
  File "/home/anaconda3/envs/vary/lib/python3.10/site-packages/torch/__init__.py", line 195, in _load_global_deps
    raise err
  File "/home/anaconda3/envs/vary/lib/python3.10/site-packages/torch/__init__.py", line 176, in _load_global_deps
    ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
  File "/home/anaconda3/envs/vary/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen: cannot load any more object with static TLS
(vary) [centos@01 Vary-master]$ 

```

System: centos 7
pip package version:
torch: 2.2.2
scikit-learn: 1.2.2 or 1.4.2  (**Tried both versions**)

### Versions

`2.2.2`

pip installed

cc @seemethere @malfet @osalpekar @atalman
Repository: ui
Issue: [bug]: there's not any button to view code for example 
Labels: bug

### Describe the bug

![image](https://github.com/shadcn-ui/ui/assets/78332454/601471d6-bab3-4e3f-a5ff-d02b2da1c05e)
I want to use example but there's no any button to use view it's code 

### Affected component/components

examples page

### How to reproduce

just add button in which will show code for that component

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
window 10, brave
```


### Before submitting

- [x] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: ant-design
Issue: Select showSearch cannot select in Safari
Labels: 🐛 Bug,Inactive,IE | Firefox | Safari,unconfirmed

### Reproduction link

[https://ant.design/~demos/select-demo-search](https://ant.design/~demos/select-demo-search)

### Steps to reproduce

1. 点开选项列表
2. 点击选项内文字后面的空间，别点文字

### What is expected?

立刻选中

### What is actually happening?

有时候会选不中，多点一次才能选中

| Environment | Info |
| --- | --- |
| antd | 5.16.2 |
| React | any |
| System | MacOS |
| Browser | Safari 16.6 (18615.3.12.11.2) |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: storybook
Issue: Could not resolve "./sb-preview/runtime.js" from "iframe.html"
Labels: bug,needs triage

### Describe the bug

```
> @products/base-portal-lib@0.0.0 build-storybook
> storybook build

@storybook/cli v8.0.8

info => Cleaning outputDir: storybook-static
info => Loading presets
info => Building manager..
info => Manager built (81 ms)
info => Building preview..
vite v4.5.2 building for production...

./sb-common-assets/fonts.css doesn't exist at build time, it will remain unchanged to be resolved at runtime
✓ 17 modules transformed.
✓ built in 6.92s
Could not resolve "./sb-preview/runtime.js" from "iframe.html"
file: /Users/ruslanbabich/Documents/GitHub/baseportal/frontend/components/base-portal-lib/iframe.html
=> Failed to build the preview
RollupError: Could not resolve "./sb-preview/runtime.js" from "iframe.html"
    at error (file:///Users/ruslanbabich/Documents/GitHub/baseportal/frontend/node_modules/.pnpm/rollup@3.29.4/node_modules/rollup/dist/es/shared/node-entry.js:2287:30)
    at ModuleLoader.handleInvalidResolvedId (file:///Users/ruslanbabich/Documents/GitHub/baseportal/frontend/node_modules/.pnpm/rollup@3.29.4/node_modules/rollup/dist/es/shared/node-entry.js:24860:24)
    at file:///Users/ruslanbabich/Documents/GitHub/baseportal/frontend/node_modules/.pnpm/rollup@3.29.4/node_modules/rollup/dist/es/shared/node-entry.js:24822:26
transforming (2896) src/components/Base/TreeView/misc/nodeEvents.ts
```
base-portal-lib - is root library of project in a monorepo.
Why is iframe.html created in it instead of base-portal-lib/storybook-static?

P.S.: Also later it randomly hangs on transforming TS files...

### To Reproduce

Configuration: Vue 3 + Vite, Storybook 8.0.8 (default setup + msw-storybook-addon)

Just run `npm run build-storybook`

### System

```bash
Storybook Environment Info:

  System:
    OS: macOS 14.2.1
    CPU: (16) arm64 Apple M3 Max
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - /usr/local/bin/node
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.14.1 - /usr/local/bin/pnpm <----- active
  Browsers:
    Chrome: 123.0.6312.122
    Safari: 17.2.1
```


### Additional context

_No response_
Repository: storybook
Issue: [Bug]: Cannot find module 'react-dom/client' with portable stories in React 17 projects.
Labels: bug,react,has workaround,sev:S2,portable stories

### Describe the bug

Given the following lines of code:
https://github.com/storybookjs/storybook/blob/next/code/lib/react-dom-shim/package.json#L24-L29

If anyone runs `require('@storybook/react')` it will cause `require('@storybook/react-dom-shim')` to be called and then the react-18 file will be resolved, which will break in any non-React 18 project:

```
Uncaught Error: Cannot find module 'react-dom/client'
Require stack:
- /Users/xyz/node_modules/@storybook/react-dom-shim/dist/react-18.js
- /Users/xyz/node_modules/@storybook/react/dist/index.js
```


#### Workaround

To work around this issue, you should pass a custom alias config to your test-runner, so that the resolution points to `@storybook/react-dom-shim/dist/react-16` instead.

### Jest
```ts
const config = {
  moduleNameMapper: {
    '^@storybook/react-dom-shim$': '@storybook/react-dom-shim/dist/react-16',
  },
};
```

### Vite
```ts
mergeConfig(viteConfig, {
    resolve: {
      alias: {
        "@storybook/react-dom-shim": "@storybook/react-dom-shim/dist/react-16",
      },
    },
});
```

### To Reproduce

- Open a React 17 project with Storybook 8, e.g. https://github.com/yannbf/mealdrop (storybook/8.0.0 branch)
- Open the terminal, run `node`
- Just run `require('@storybook/react')`
- See the crash


### System

```bash
-
```


### Additional context

_No response_
Repository: material-ui
Issue: @mui/material incompatible with versions of @types/react > 18.2.60
Labels: component: text field,typescript,package: material-ui

### Steps to reproduce

https://codesandbox.io/p/sandbox/test-w2msfc?file=%2Fsrc%2FInput.tsx%3A9%2C1

Steps:
1. Check TS warning in Input.tsx

```

Type 'ForwardRefExoticComponent<Omit<InputProps, "ref"> & RefAttributes<unknown>>' is not assignable to type 'FC<InputProps>'.
  Types of property 'propTypes' are incompatible.
    Type 'WeakValidationMap<Omit<InputProps, "ref"> & RefAttributes<unknown>> | undefined' is not assignable to type 'WeakValidationMap<InputProps> | undefined'.
      Type 'WeakValidationMap<Omit<InputProps, "ref"> & RefAttributes<unknown>>' is not assignable to type 'WeakValidationMap<InputProps>'.
        Types of property 'ref' are incompatible.
          Type 'Validator<LegacyRef<unknown> | undefined> | undefined' is not assignable to type 'Validator<((instance: unknown) => void) | RefObject<unknown> | null | undefined> | undefined'.
            Type 'Validator<LegacyRef<unknown> | undefined>' is not assignable to type 'Validator<((instance: unknown) => void) | RefObject<unknown> | null | undefined>'.
              Type 'LegacyRef<unknown> | undefined' is not assignable to type '((instance: unknown) => void) | RefObject<unknown> | null | undefined'.typescript(2322)

```    

### Current behavior

Possible but verbose solution without TS error (but is it even legit)?

```

export const Input2: React.ForwardRefExoticComponent<
  Omit<InputProps, 'ref'> & React.RefAttributes<HTMLDivElement>
> = React.forwardRef<HTMLDivElement, InputProps>((props, ref) => {
  return <MuiInput {...props} ref={ref} />;
});

```

### Expected behavior

According to documentation:
https://mui.com/material-ui/guides/composition/#caveat-with-strictmode

It should be enough be enough to wrapt components like this:

```
export default React.forwardRef((props, ref) => <Component {...props} forwardedRef={ref} />);

```

### Context

Wrapping @mui/material components 

### Your environment

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  System:
    OS: macOS 14.4.1
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    npm: 10.1.0 - /usr/local/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 123.0.6312.123
    Edge: Not Found
    Safari: 17.4.1
  npmPackages:
    @emotion/react: ^11.11.4 => 11.11.4 
    @emotion/styled: 11.11.0 => 11.11.0 
    @mui/base: ^5.0.0-beta.24 => 5.0.0-beta.42 
    @mui/core-downloads-tracker:  5.15.15 
    @mui/icons-material: ^5.15.13 => 5.15.15 
    @mui/lab: ^5.0.0-alpha.153 => 5.0.0-alpha.170 
    @mui/material: ^5.15.13 => 5.15.15 
    @mui/private-theming:  5.15.14 
    @mui/styled-engine:  5.15.14 
    @mui/system: 5.15.15 
    @mui/types:  7.2.14 
    @mui/utils:  5.15.14 
    @types/react: 18.2.62 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript: ^5.4.2 => 5.4.4 
```
</details>


**Search keywords**: types @types/react forwardRef
Repository: ant-design
Issue: Bad performance when rendering Tooltips
Labels: Inactive,unconfirmed

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/devbox/mhmn3m?migrateFrom=2786n2)

### Steps to reproduce

- Record performance using the react profiler
- Check the performance of the tooltip
- Some tooltips, atleast on my system (M2 mac) take more than 5ms to render. Most of them are fine (less than 0.1ms)

### What is expected?

Rendering should not take this long. 

### What is actually happening?

Some rerenders of indivitual tooltips take up to 5ms on M2 Macs, making the total render time over 100ms for 250 tooltips.

| Environment | Info |
| --- | --- |
| antd | 5.16.2 |
| React | 16.14.0 |
| System | OSX |
| Browser | Firefox |

---
On my local project the tooltip rerenders even when parent component this is used in is memod and not rerender but I could not reproduce this here.

Also, there already is a ticket for tooltips but that is combined with dropdowns.

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: stable-diffusion-webui
Issue: [Feature Request]: Implement Fooocus inpaint
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

I have tried Fooocus Inpainting from both the standalone Fooocus as well as via Controlnet model in Forge, since Forge has not seen any update in over a month and it is the only feature I miss after switching back to a1111, I wonder if it's possible to implement it in the same fashion as Forge? https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/160

### Proposed workflow

1. Go to Img2Img>Inpaint
2. Open Controlnet
3. Select Inpaint
4. Select inpaint_v26.fooocus.patch as model


### Additional information

_No response_
Repository: TypeScript
Issue: Support importing types from a `.mts` file from within a CommonJS file.
Labels: Help Wanted,Possible Improvement

### 🔍 Search Terms

"commonjs", "import", "type", "module" 

### ✅ Viability Checklist

- [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [X] This wouldn't change the runtime behavior of existing JavaScript code
- [X] This could be implemented without emitting different JS based on the types of the expressions
- [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

### ⭐ Suggestion

Proposal: Allow importing pure types from `.mts` files from a CommonJS file.

The current behavior generates an unnecessary / incorrect error since no `require` will be emitted.

Current error:
<img width="606" alt="image" src="https://github.com/microsoft/TypeScript/assets/3740137/e949327d-877f-4026-bbb0-5506661ec2ff">

Please note, future versions of Node will support requiring an ESM module if a there is not a top level `await`. See:
- [module: support require()ing synchronous ESM graphs by joyeecheung · Pull Request #51977 · nodejs/node](https://github.com/nodejs/node/pull/51977)
 



### 📃 Motivating Example

`src/code.cts`
```ts
import type { EntityId, Entity, User } from './models.mjs';

export function userName(user: User): string {
    return user.name;
}
```

`src/models.mts`
```ts
export type EntityId = string;

export interface Entity {
    id: EntityId;
}

export interface User extends Entity {
    name: string;
}
```


### 💻 Use Cases

1. What do you want to use this for?
    In mixed code bases (especially as they transition from CommonJS to ESM) it is often necessary export the types from a module that are used in CommonJS files.
3. What shortcomings exist with current approaches?
    All shared types must be declared in CommonJS files or inferred using `Awaited`.
5. What workarounds are you using in the meantime?
    Declaring shared types in CommonJS files.