Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-konva

Package Overview
Dependencies
Maintainers
1
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-konva - npm Package Compare versions

Comparing version 18.2.1 to 18.2.2

11

es/ReactKonvaCore.js

@@ -15,2 +15,3 @@ /**

import { applyNodeProps, toggleStrictMode } from './makeUpdates';
import { useContextBridge, FiberProvider } from 'its-fine';
function usePrevious(value) {

@@ -28,2 +29,3 @@ const ref = React.useRef();

const oldProps = usePrevious(props);
const Bridge = useContextBridge();
const _setRef = (stage) => {

@@ -48,4 +50,5 @@ const { forwardedRef } = props;

_setRef(stage.current);
// @ts-ignore
fiberRef.current = KonvaRenderer.createContainer(stage.current, LegacyRoot, false, null);
KonvaRenderer.updateContainer(props.children, fiberRef.current);
KonvaRenderer.updateContainer(React.createElement(Bridge, {}, props.children), fiberRef.current);
return () => {

@@ -63,3 +66,3 @@ if (!Konva.isBrowser) {

applyNodeProps(stage.current, props, oldProps);
KonvaRenderer.updateContainer(props.children, fiberRef.current, null);
KonvaRenderer.updateContainer(React.createElement(Bridge, {}, props.children), fiberRef.current, null);
});

@@ -98,4 +101,6 @@ return React.createElement('div', {

export const Transformer = 'Transformer';
// @ts-ignore
export const KonvaRenderer = ReactFiberReconciler(HostConfig);
KonvaRenderer.injectIntoDevTools({
// @ts-ignore
findHostInstanceByFiber: () => null,

@@ -107,4 +112,4 @@ bundleType: process.env.NODE_ENV !== 'production' ? 1 : 0,

export const Stage = React.forwardRef((props, ref) => {
return React.createElement(StageWrap, { ...props, forwardedRef: ref });
return React.createElement(FiberProvider, {}, React.createElement(StageWrap, { ...props, forwardedRef: ref }));
});
export const useStrictMode = toggleStrictMode;

@@ -43,2 +43,3 @@ /**

const makeUpdates_1 = require("./makeUpdates");
const its_fine_1 = require("its-fine");
function usePrevious(value) {

@@ -56,2 +57,3 @@ const ref = react_1.default.useRef();

const oldProps = usePrevious(props);
const Bridge = (0, its_fine_1.useContextBridge)();
const _setRef = (stage) => {

@@ -76,4 +78,5 @@ const { forwardedRef } = props;

_setRef(stage.current);
// @ts-ignore
fiberRef.current = exports.KonvaRenderer.createContainer(stage.current, constants_1.LegacyRoot, false, null);
exports.KonvaRenderer.updateContainer(props.children, fiberRef.current);
exports.KonvaRenderer.updateContainer(react_1.default.createElement(Bridge, {}, props.children), fiberRef.current);
return () => {

@@ -91,3 +94,3 @@ if (!Core_1.default.isBrowser) {

(0, makeUpdates_1.applyNodeProps)(stage.current, props, oldProps);
exports.KonvaRenderer.updateContainer(props.children, fiberRef.current, null);
exports.KonvaRenderer.updateContainer(react_1.default.createElement(Bridge, {}, props.children), fiberRef.current, null);
});

@@ -126,4 +129,6 @@ return react_1.default.createElement('div', {

exports.Transformer = 'Transformer';
// @ts-ignore
exports.KonvaRenderer = (0, react_reconciler_1.default)(HostConfig);
exports.KonvaRenderer.injectIntoDevTools({
// @ts-ignore
findHostInstanceByFiber: () => null,

@@ -135,4 +140,4 @@ bundleType: process.env.NODE_ENV !== 'production' ? 1 : 0,

exports.Stage = react_1.default.forwardRef((props, ref) => {
return react_1.default.createElement(StageWrap, { ...props, forwardedRef: ref });
return react_1.default.createElement(its_fine_1.FiberProvider, {}, react_1.default.createElement(StageWrap, { ...props, forwardedRef: ref }));
});
exports.useStrictMode = makeUpdates_1.toggleStrictMode;

@@ -5,3 +5,3 @@ {

"description": "React binding to canvas element via Konva framework",
"version": "18.2.1",
"version": "18.2.2",
"keywords": [

@@ -21,2 +21,3 @@ "react",

"dependencies": {
"its-fine": "^1.0.1",
"react-reconciler": "~0.29.0",

@@ -48,9 +49,9 @@ "scheduler": "^0.23.0"

"devDependencies": {
"@types/chai": "^4.3.1",
"@types/chai": "^4.3.3",
"@types/mocha": "^9.1.1",
"@types/react": "18.0.14",
"@types/react": "18.0.21",
"chai": "4.3.6",
"konva": "^8.3.10",
"konva": "^8.3.12",
"mocha-headless-chrome": "^4.0.0",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"process": "^0.11.10",

@@ -60,4 +61,4 @@ "react": "^18.2.0",

"sinon": "^14.0.0",
"typescript": "^4.7.4",
"use-image": "^1.0.12",
"typescript": "^4.8.3",
"use-image": "^1.1.0",
"util": "^0.12.4"

@@ -64,0 +65,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc