develop/tags-3 -> build/tags-3
convert-to-yml / develop-branch (push) Successful in 33s Details

This commit is contained in:
batch-bot 2023-10-24 00:00:49 +00:00
parent f3d0897157
commit 008e4e5ab7
1 changed files with 16 additions and 25 deletions

41
try.js
View File

@ -5,19 +5,19 @@
* LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import ReactVersion from 'shared/ReactVersion';
import {LegacyRoot} from 'react-reconciler/src/ReactRootTags';
import * as React from "react";
import ReactVersion from "shared/ReactVersion";
import { LegacyRoot } from "react-reconciler/src/ReactRootTags";
import {
createContainer,
updateContainer,
injectIntoDevTools,
} from 'react-reconciler/src/ReactFiberReconciler';
import Transform from 'art/core/transform';
import Mode from 'art/modes/current';
import FastNoSideEffects from 'art/modes/fast-noSideEffects';
} from "react-reconciler/src/ReactFiberReconciler";
import Transform from "art/core/transform";
import Mode from "art/modes/current";
import FastNoSideEffects from "art/modes/fast-noSideEffects";
import {TYPES, childrenAsString} from './ReactARTInternals';
import { TYPES, childrenAsString } from "./ReactARTInternals";
Mode.setCurrent(
// Change to 'art/modes/dom' for easier debugging via SVG
@ -62,7 +62,7 @@ class Pattern {
class Surface extends React.Component {
componentDidMount() {
const {height, width} = this.props;
const { height, width } = this.props;
this._surface = Mode.Surface(+width, +height, this._tagRef);
@ -72,7 +72,7 @@ class Surface extends React.Component {
null,
false,
false,
'',
"",
);
updateContainer(this.props.children, this._mountNode, this);
}
@ -107,7 +107,7 @@ class Surface extends React.Component {
return (
<Tag
ref={ref => (this._tagRef = ref)}
ref={(ref) => (this._tagRef = ref)}
accessKey={props.accessKey}
className={props.className}
draggable={props.draggable}
@ -125,7 +125,7 @@ class Text extends React.Component {
super(props);
// We allow reading these props. Ideally we could expose the Text node as
// ref directly.
['height', 'width', 'x', 'y'].forEach(key => {
["height", "width", "x", "y"].forEach((key) => {
Object.defineProperty(this, key, {
get: function () {
return this._text ? this._text[key] : undefined;
@ -137,33 +137,24 @@ class Text extends React.Component {
// This means you can't have children that render into strings...
const T = TYPES.TEXT;
return (
<T {...this.props} ref={t => (this._text = t)}>
<T {...this.props} ref={(t) => (this._text = t)}>
{childrenAsString(this.props.children)}
</T>
);
}
}
}
injectIntoDevTools({
findFiberByHostInstance: () => null,
bundleType: __DEV__ ? 1 : 0,
version: ReactVersion,
rendererPackageName: 'react-art',
rendererPackageName: "react-art",
});
/** API */
export const ClippingRectangle = TYPES.CLIPPING_RECTANGLE;
export const Group = TYPES.GROUP;
export const Shape = TYPES.SHAPE;
export const Path = Mode.Path;
export {LinearGradient, Pattern, RadialGradient, Surface, Text, Transform};
export { LinearGradient, Pattern, RadialGradient, Surface, Text, Transform };