Compare commits
32 Commits
deployed/v
...
master
Author | SHA1 | Date |
---|---|---|
giles | fe653240e4 | |
gilesb | e9f787b82b | |
gilesb | 381b1211b6 | |
gilesb | 3f8a784ea0 | |
gilesb | 6a76cd6dc2 | |
gilesb | bf4335c8b8 | |
gilesb | f75a54e273 | |
gilesb | 6f92610c26 | |
gilesb | 9c8429ae68 | |
gilesb | 369b5ffd29 | |
gilesb | e535cb3c62 | |
gilesb | d1a1d14664 | |
gilesb | 47695a0523 | |
gilesb | 7dbab1a28f | |
gilesb | e3199a06ec | |
giles | 79136f6882 | |
gilesb | f35b8f67af | |
gilesb | d3c03369aa | |
gilesb | b21f3838d4 | |
gilesb | b698ad512d | |
giles | 3c15598faa | |
gilesb | 64d8cb6f40 | |
giles | ed41a9707b | |
batch-bot | 6f5c1153df | |
batch-bot | a6a2813005 | |
giles | ae69fb63f5 | |
gilesb | eb83b0e698 | |
batch-bot | b404b9f516 | |
batch-bot | 1bddb0c47c | |
giles | 6e1eaf6f2e | |
gilesb | ccec5b4261 | |
gilesb | 96d6004f26 |
|
@ -1,4 +1,4 @@
|
||||||
name: build-develop-branch
|
name: master-pushed
|
||||||
run-name: ${{ github.actor }} is learning GitHub Actions
|
run-name: ${{ github.actor }} is learning GitHub Actions
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -19,10 +19,6 @@ jobs:
|
||||||
token: ${{ secrets.BOT_TOKEN }}
|
token: ${{ secrets.BOT_TOKEN }}
|
||||||
- name: bump release
|
- name: bump release
|
||||||
run: |
|
run: |
|
||||||
../tea r ls -o=simple
|
export version=$(../tea r ls -o=simple | head -n 1 | tr " " "\n" | head -n 1 | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')
|
||||||
version="$(../tea r ls -o=simple | head -n 1 | tr " " "\n" | head -n 1 | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')"
|
|
||||||
../tea r c --note="this isrelease ${version}" --tag=${version} --title=${version} --target=${{ github.sha }}
|
../tea r c --note="this isrelease ${version}" --tag=${version} --title=${version} --target=${{ github.sha }}
|
||||||
- name: change log
|
echo ::set-env name=VERSION::$version
|
||||||
uses: heinrichreimer/action-github-changelog-generator@v2.3
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.BOT_TOKEN }}
|
|
||||||
|
|
|
@ -31,4 +31,4 @@ jobs:
|
||||||
git config --global user.email "username@users.noreply.github.com"
|
git config --global user.email "username@users.noreply.github.com"
|
||||||
git add -A
|
git add -A
|
||||||
git commit -a -m "${{ github.ref_name }} -> refs/heads/deployed/${{ github.ref_name }} "
|
git commit -a -m "${{ github.ref_name }} -> refs/heads/deployed/${{ github.ref_name }} "
|
||||||
git push origin HEAD:refs/heads/deployed/${{ github.ref_name }}
|
git push -f origin HEAD:refs/heads/deployed/${{ github.ref_name }}
|
|
@ -17,7 +17,7 @@
|
||||||
- Name: NO
|
- Name: NO
|
||||||
- Ordinal: '0'
|
- Ordinal: '0'
|
||||||
- EnumerationSet:
|
- EnumerationSet:
|
||||||
- UniqueName: PHASE_FAILURES
|
- UniqueName: PHASE_FAILURESzx
|
||||||
- Type: '0'
|
- Type: '0'
|
||||||
- EnumerationSet:
|
- EnumerationSet:
|
||||||
- UniqueName: $TIMER_TYPE
|
- UniqueName: $TIMER_TYPE
|
||||||
|
|
|
@ -0,0 +1,160 @@
|
||||||
|
/**
|
||||||
|
* 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 (
|
||||||
|
<Tag
|
||||||
|
ref={(ref) => (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 (
|
||||||
|
<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",
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 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 };
|
Loading…
Reference in New Issue