2018-01-30 16:47:02 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2018-01-30 16:47:02 +00:00
|
|
|
*
|
2018-06-20 07:35:29 +00:00
|
|
|
* @flow strict
|
2018-01-30 16:47:02 +00:00
|
|
|
* @format
|
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
2018-02-24 00:46:06 +00:00
|
|
|
// TODO: type these properly.
|
|
|
|
type Node = {};
|
|
|
|
type NodeSet = Array<Node>;
|
2018-02-09 03:25:40 +00:00
|
|
|
type NodeProps = {};
|
2018-02-24 00:46:06 +00:00
|
|
|
type InstanceHandle = {};
|
2018-02-09 03:25:40 +00:00
|
|
|
type Spec = {|
|
|
|
|
+createNode: (
|
|
|
|
reactTag: number,
|
|
|
|
viewName: string,
|
|
|
|
rootTag: number,
|
|
|
|
props: NodeProps,
|
2018-02-24 00:46:06 +00:00
|
|
|
instanceHandle: InstanceHandle,
|
2018-02-09 03:25:40 +00:00
|
|
|
) => Node,
|
|
|
|
+cloneNode: (node: Node) => Node,
|
|
|
|
+cloneNodeWithNewChildren: (node: Node) => Node,
|
|
|
|
+cloneNodeWithNewProps: (node: Node, newProps: NodeProps) => Node,
|
|
|
|
+cloneNodeWithNewChildrenAndProps: (node: Node, newProps: NodeProps) => Node,
|
2018-02-24 00:46:06 +00:00
|
|
|
+createChildSet: (rootTag: number) => NodeSet,
|
2018-02-09 03:25:40 +00:00
|
|
|
+appendChild: (parentNode: Node, child: Node) => Node,
|
|
|
|
+appendChildToSet: (childSet: NodeSet, child: Node) => void,
|
|
|
|
+completeRoot: (rootTag: number, childSet: NodeSet) => void,
|
|
|
|
|};
|
|
|
|
|
2018-02-24 00:46:06 +00:00
|
|
|
const FabricUIManager: ?Spec = global.nativeFabricUIManager;
|
2018-02-09 03:25:40 +00:00
|
|
|
|
|
|
|
module.exports = FabricUIManager;
|