From 96d6004f26a092a1ccc625d06de8eafb2baaa7a0 Mon Sep 17 00:00:00 2001 From: gilesb Date: Tue, 24 Oct 2023 00:25:15 +0100 Subject: [PATCH 1/9] ... --- instructions/equipment-model2.a.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instructions/equipment-model2.a.yml b/instructions/equipment-model2.a.yml index fa085ee..a66f18b 100644 --- a/instructions/equipment-model2.a.yml +++ b/instructions/equipment-model2.a.yml @@ -17,7 +17,7 @@ - Name: NO - Ordinal: '0' - EnumerationSet: - - UniqueName: PHASE_FAILURES + - UniqueName: PHASE_FAILURESzx - Type: '0' - EnumerationSet: - UniqueName: $TIMER_TYPE From ccec5b4261f699827ceeccaae60384118056abdd Mon Sep 17 00:00:00 2001 From: gilesb Date: Tue, 24 Oct 2023 00:48:51 +0100 Subject: [PATCH 2/9] js --- try.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 try.js diff --git a/try.js b/try.js new file mode 100644 index 0000000..cce57f9 --- /dev/null +++ b/try.js @@ -0,0 +1 @@ +console.log( " hello" ); \ No newline at end of file From 6e1eaf6f2e7850c3f7b1faa16c24a907c2aed7c8 Mon Sep 17 00:00:00 2001 From: giles Date: Mon, 23 Oct 2023 23:50:07 +0000 Subject: [PATCH 3/9] Prettified Code! --- try.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/try.js b/try.js index cce57f9..60df12b 100644 --- a/try.js +++ b/try.js @@ -1 +1 @@ -console.log( " hello" ); \ No newline at end of file +console.log(" hello"); From 1bddb0c47c8cc8c341e51eaca477bb49e81a1f7a Mon Sep 17 00:00:00 2001 From: batch-bot Date: Mon, 23 Oct 2023 23:50:43 +0000 Subject: [PATCH 4/9] build/tags-3 -> develop/tags-3 --- try.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/try.js b/try.js index 60df12b..cce57f9 100644 --- a/try.js +++ b/try.js @@ -1 +1 @@ -console.log(" hello"); +console.log( " hello" ); \ No newline at end of file From b404b9f516a06f9a119fbd4260cfef4c7372dec7 Mon Sep 17 00:00:00 2001 From: batch-bot Date: Mon, 23 Oct 2023 23:51:00 +0000 Subject: [PATCH 5/9] Prettified Code! --- try.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/try.js b/try.js index cce57f9..60df12b 100644 --- a/try.js +++ b/try.js @@ -1 +1 @@ -console.log( " hello" ); \ No newline at end of file +console.log(" hello"); From eb83b0e6985bdf367ff112f0c58b639df06dbd68 Mon Sep 17 00:00:00 2001 From: gilesb Date: Tue, 24 Oct 2023 00:57:42 +0100 Subject: [PATCH 6/9] ... --- try.js | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 169 insertions(+), 1 deletion(-) diff --git a/try.js b/try.js index 60df12b..545ea87 100644 --- a/try.js +++ b/try.js @@ -1 +1,169 @@ -console.log(" hello"); +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * 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 { + 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'; + +import {TYPES, childrenAsString} from './ReactARTInternals'; + +Mode.setCurrent( + // Change to 'art/modes/dom' for easier debugging via SVG + FastNoSideEffects, +); + +/** Declarative fill-type objects; API design not finalized */ + +const slice = Array.prototype.slice; + +class LinearGradient { + constructor(stops, x1, y1, x2, y2) { + this._args = slice.call(arguments); + } + + applyFill(node) { + node.fillLinear.apply(node, this._args); + } +} + +class RadialGradient { + constructor(stops, fx, fy, rx, ry, cx, cy) { + this._args = slice.call(arguments); + } + + applyFill(node) { + node.fillRadial.apply(node, this._args); + } +} + +class Pattern { + constructor(url, width, height, left, top) { + this._args = slice.call(arguments); + } + + applyFill(node) { + node.fillImage.apply(node, this._args); + } +} + +/** React Components */ + +class Surface extends React.Component { + componentDidMount() { + const {height, width} = this.props; + + this._surface = Mode.Surface(+width, +height, this._tagRef); + + this._mountNode = createContainer( + this._surface, + LegacyRoot, + null, + false, + false, + '', + ); + updateContainer(this.props.children, this._mountNode, this); + } + + componentDidUpdate(prevProps, prevState) { + const props = this.props; + + if (props.height !== prevProps.height || props.width !== prevProps.width) { + this._surface.resize(+props.width, +props.height); + } + + updateContainer(this.props.children, this._mountNode, this); + + if (this._surface.render) { + this._surface.render(); + } + } + + componentWillUnmount() { + updateContainer(null, this._mountNode, this); + } + + render() { + // This is going to be a placeholder because we don't know what it will + // actually resolve to because ART may render canvas, vml or svg tags here. + // We only allow a subset of properties since others might conflict with + // ART's properties. + const props = this.props; + + // TODO: ART's Canvas Mode overrides surface title and cursor + const Tag = Mode.Surface.tagName; + + return ( + (this._tagRef = ref)} + accessKey={props.accessKey} + className={props.className} + draggable={props.draggable} + role={props.role} + style={props.style} + tabIndex={props.tabIndex} + title={props.title} + /> + ); + } +} + +class Text extends React.Component { + constructor(props) { + super(props); + // We allow reading these props. Ideally we could expose the Text node as + // ref directly. + ['height', 'width', 'x', 'y'].forEach(key => { + Object.defineProperty(this, key, { + get: function () { + return this._text ? this._text[key] : undefined; + }, + }); + }); + } + render() { + // This means you can't have children that render into strings... + const T = TYPES.TEXT; + return ( + (this._text = t)}> + {childrenAsString(this.props.children)} + + ); + } + } + +injectIntoDevTools({ + findFiberByHostInstance: () => null, + bundleType: __DEV__ ? 1 : 0, + version: ReactVersion, + 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}; \ No newline at end of file From ae69fb63f59efe7cef79987367acd871732c2bd0 Mon Sep 17 00:00:00 2001 From: giles Date: Mon, 23 Oct 2023 23:58:45 +0000 Subject: [PATCH 7/9] Prettified Code! --- try.js | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/try.js b/try.js index 545ea87..c2119d6 100644 --- a/try.js +++ b/try.js @@ -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 ( (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 ( - (this._text = t)}> + (this._text = t)}> {childrenAsString(this.props.children)} ); } - } +} 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}; \ No newline at end of file +export { LinearGradient, Pattern, RadialGradient, Surface, Text, Transform }; From a6a28130051788a517bd7b95f665d2834e56c0c1 Mon Sep 17 00:00:00 2001 From: batch-bot Date: Mon, 23 Oct 2023 23:59:19 +0000 Subject: [PATCH 8/9] build/tags-3 -> develop/tags-3 --- try.js | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/try.js b/try.js index c2119d6..545ea87 100644 --- a/try.js +++ b/try.js @@ -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 ( (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,24 +137,33 @@ class Text extends React.Component { // This means you can't have children that render into strings... const T = TYPES.TEXT; return ( - (this._text = t)}> + (this._text = t)}> {childrenAsString(this.props.children)} ); } -} + } 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}; \ No newline at end of file From 6f5c1153df2ea95d77fdbca24a9647235dbb926b Mon Sep 17 00:00:00 2001 From: batch-bot Date: Mon, 23 Oct 2023 23:59:36 +0000 Subject: [PATCH 9/9] Prettified Code! --- try.js | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/try.js b/try.js index 545ea87..c2119d6 100644 --- a/try.js +++ b/try.js @@ -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 ( (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 ( - (this._text = t)}> + (this._text = t)}> {childrenAsString(this.props.children)} ); } - } +} 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}; \ No newline at end of file +export { LinearGradient, Pattern, RadialGradient, Surface, Text, Transform };