@shopify/react-native-skia 1.12.3 → 2.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/lib/commonjs/Platform/Platform.web.js +1 -0
- package/lib/commonjs/Platform/Platform.web.js.map +1 -1
- package/lib/commonjs/external/reanimated/textures.js +4 -3
- package/lib/commonjs/external/reanimated/textures.js.map +1 -1
- package/lib/commonjs/headless/index.d.ts +1 -1
- package/lib/commonjs/headless/index.js +2 -2
- package/lib/commonjs/headless/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.d.ts +3 -3
- package/lib/commonjs/renderer/Canvas.js +10 -27
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Offscreen.d.ts +2 -2
- package/lib/commonjs/renderer/Offscreen.js +4 -4
- package/lib/commonjs/renderer/Offscreen.js.map +1 -1
- package/lib/commonjs/renderer/__tests__/setup.d.ts +6 -5
- package/lib/commonjs/sksg/Container.d.ts +3 -1
- package/lib/commonjs/sksg/Container.js +7 -1
- package/lib/commonjs/sksg/Container.js.map +1 -1
- package/lib/commonjs/sksg/Elements.d.ts +1 -1
- package/lib/commonjs/sksg/Elements.js.map +1 -1
- package/lib/commonjs/sksg/HostConfig.d.ts +2 -2
- package/lib/commonjs/sksg/HostConfig.js +36 -6
- package/lib/commonjs/sksg/HostConfig.js.map +1 -1
- package/lib/commonjs/sksg/Reconciler.d.ts +3 -2
- package/lib/commonjs/sksg/Reconciler.js +15 -6
- package/lib/commonjs/sksg/Reconciler.js.map +1 -1
- package/lib/module/Platform/Platform.web.js +1 -0
- package/lib/module/Platform/Platform.web.js.map +1 -1
- package/lib/module/external/reanimated/textures.js +5 -4
- package/lib/module/external/reanimated/textures.js.map +1 -1
- package/lib/module/headless/index.d.ts +1 -1
- package/lib/module/headless/index.js +2 -2
- package/lib/module/headless/index.js.map +1 -1
- package/lib/module/renderer/Canvas.d.ts +3 -3
- package/lib/module/renderer/Canvas.js +9 -27
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Offscreen.d.ts +2 -2
- package/lib/module/renderer/Offscreen.js +4 -4
- package/lib/module/renderer/Offscreen.js.map +1 -1
- package/lib/module/renderer/__tests__/setup.d.ts +6 -5
- package/lib/module/sksg/Container.d.ts +3 -1
- package/lib/module/sksg/Container.js +7 -1
- package/lib/module/sksg/Container.js.map +1 -1
- package/lib/module/sksg/Elements.d.ts +1 -1
- package/lib/module/sksg/Elements.js.map +1 -1
- package/lib/module/sksg/HostConfig.d.ts +2 -2
- package/lib/module/sksg/HostConfig.js +36 -7
- package/lib/module/sksg/HostConfig.js.map +1 -1
- package/lib/module/sksg/Reconciler.d.ts +3 -2
- package/lib/module/sksg/Reconciler.js +15 -6
- package/lib/module/sksg/Reconciler.js.map +1 -1
- package/lib/typescript/lib/commonjs/headless/index.d.ts +1 -1
- package/lib/typescript/lib/commonjs/renderer/Canvas.d.ts +9 -1
- package/lib/typescript/lib/commonjs/renderer/Offscreen.d.ts +2 -2
- package/lib/typescript/lib/commonjs/sksg/Container.d.ts +3 -0
- package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +21 -4
- package/lib/typescript/lib/commonjs/sksg/Reconciler.d.ts +9 -2
- package/lib/typescript/lib/module/Platform/Platform.web.d.ts +1 -1
- package/lib/typescript/lib/module/headless/index.d.ts +1 -1
- package/lib/typescript/lib/module/mock/index.d.ts +22 -11
- package/lib/typescript/lib/module/renderer/Canvas.d.ts +10 -2
- package/lib/typescript/lib/module/renderer/Offscreen.d.ts +2 -2
- package/lib/typescript/lib/module/sksg/Container.d.ts +3 -0
- package/lib/typescript/lib/module/sksg/HostConfig.d.ts +20 -4
- package/lib/typescript/lib/module/sksg/Reconciler.d.ts +9 -2
- package/lib/typescript/lib/module/views/SkiaPictureView.d.ts +1 -1
- package/lib/typescript/src/headless/index.d.ts +1 -1
- package/lib/typescript/src/renderer/Canvas.d.ts +3 -3
- package/lib/typescript/src/renderer/Offscreen.d.ts +2 -2
- package/lib/typescript/src/renderer/__tests__/setup.d.ts +6 -5
- package/lib/typescript/src/sksg/Container.d.ts +3 -1
- package/lib/typescript/src/sksg/Elements.d.ts +1 -1
- package/lib/typescript/src/sksg/HostConfig.d.ts +2 -2
- package/lib/typescript/src/sksg/Reconciler.d.ts +3 -2
- package/package.json +11 -10
- package/src/Platform/Platform.web.tsx +2 -1
- package/src/__tests__/snapshots/screens/snapshot2-android-ci.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot3-android-ci.png +0 -0
- package/src/external/reanimated/textures.tsx +5 -4
- package/src/headless/index.ts +2 -2
- package/src/renderer/Canvas.tsx +57 -80
- package/src/renderer/Offscreen.tsx +4 -4
- package/src/renderer/__tests__/Data.spec.tsx +9 -10
- package/src/renderer/__tests__/Drawings.spec.tsx +11 -11
- package/src/renderer/__tests__/FitBox.spec.tsx +10 -10
- package/src/renderer/__tests__/Glyphs.spec.tsx +2 -2
- package/src/renderer/__tests__/Image.spec.tsx +2 -2
- package/src/renderer/__tests__/Paths.spec.tsx +8 -8
- package/src/renderer/__tests__/Picture.spec.tsx +10 -12
- package/src/renderer/__tests__/Simple.spec.tsx +6 -6
- package/src/renderer/__tests__/Surfaces.spec.tsx +2 -2
- package/src/renderer/__tests__/Text.spec.tsx +12 -12
- package/src/renderer/__tests__/Transform.spec.tsx +8 -8
- package/src/renderer/__tests__/documentation/Group.spec.tsx +12 -12
- package/src/renderer/__tests__/documentation/getting-started/HelloWorld.spec.tsx +2 -2
- package/src/renderer/__tests__/documentation/paint/Overview.spec.tsx +8 -8
- package/src/renderer/__tests__/documentation/shapes/Box.spec.tsx +4 -4
- package/src/renderer/__tests__/e2e/Atlas.spec.tsx +3 -3
- package/src/renderer/__tests__/e2e/Offscreen.spec.tsx +1 -1
- package/src/renderer/__tests__/examples/BlendModes.spec.tsx +4 -4
- package/src/renderer/__tests__/setup.tsx +17 -13
- package/src/sksg/Container.ts +9 -1
- package/src/sksg/Elements.tsx +1 -1
- package/src/sksg/HostConfig.ts +37 -7
- package/src/sksg/Reconciler.ts +16 -6
- package/src/sksg/__tests__/Simple.spec.tsx +8 -8
- package/lib/commonjs/sksg/HostConfig2.d.ts +0 -19
- package/lib/commonjs/sksg/HostConfig2.js +0 -159
- package/lib/commonjs/sksg/HostConfig2.js.map +0 -1
- package/lib/module/sksg/HostConfig2.d.ts +0 -19
- package/lib/module/sksg/HostConfig2.js +0 -152
- package/lib/module/sksg/HostConfig2.js.map +0 -1
- package/lib/typescript/lib/commonjs/sksg/HostConfig2.d.ts +0 -44
- package/lib/typescript/lib/module/sksg/HostConfig2.d.ts +0 -43
- package/lib/typescript/src/sksg/HostConfig2.d.ts +0 -19
- package/src/sksg/HostConfig2.ts +0 -247
@@ -1,152 +0,0 @@
|
|
1
|
-
/*global NodeJS*/
|
2
|
-
|
3
|
-
import { DefaultEventPriority } from "react-reconciler/constants";
|
4
|
-
import { shallowEq } from "../renderer/typeddash";
|
5
|
-
const DEBUG = false;
|
6
|
-
export const debug = (...args) => {
|
7
|
-
if (DEBUG) {
|
8
|
-
console.log(...args);
|
9
|
-
}
|
10
|
-
};
|
11
|
-
const appendNode = (parent, child) => {
|
12
|
-
parent.children.push(child);
|
13
|
-
};
|
14
|
-
const removeNode = (parent, child) => {
|
15
|
-
parent.children.splice(parent.children.indexOf(child), 1);
|
16
|
-
};
|
17
|
-
const insertBefore = (parent, child, before) => {
|
18
|
-
parent.children.splice(parent.children.indexOf(before), 0, child);
|
19
|
-
};
|
20
|
-
export const sksgHostConfig = {
|
21
|
-
/**
|
22
|
-
* This function is used by the reconciler in order to calculate current time for prioritising work.
|
23
|
-
*/
|
24
|
-
supportsMutation: true,
|
25
|
-
isPrimaryRenderer: false,
|
26
|
-
supportsPersistence: false,
|
27
|
-
supportsHydration: false,
|
28
|
-
//supportsMicrotask: true,
|
29
|
-
|
30
|
-
scheduleTimeout: setTimeout,
|
31
|
-
cancelTimeout: clearTimeout,
|
32
|
-
noTimeout: -1,
|
33
|
-
appendChildToContainer(container, child) {
|
34
|
-
debug("appendChildToContainer");
|
35
|
-
container.root.push(child);
|
36
|
-
},
|
37
|
-
appendChild(parent, child) {
|
38
|
-
debug("appendChild", parent, child);
|
39
|
-
appendNode(parent, child);
|
40
|
-
},
|
41
|
-
getRootHostContext: _rootContainerInstance => {
|
42
|
-
debug("getRootHostContext");
|
43
|
-
return null;
|
44
|
-
},
|
45
|
-
getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {
|
46
|
-
debug("getChildHostContext");
|
47
|
-
return null;
|
48
|
-
},
|
49
|
-
shouldSetTextContent(_type, _props) {
|
50
|
-
return false;
|
51
|
-
},
|
52
|
-
createTextInstance(_text, _rootContainerInstance, _hostContext, _internalInstanceHandle) {
|
53
|
-
debug("createTextInstance");
|
54
|
-
// return SpanNode({}, text) as SkNode;
|
55
|
-
throw new Error("Text nodes are not supported yet");
|
56
|
-
},
|
57
|
-
createInstance(type, propsWithChildren, _container, _hostContext, _internalInstanceHandle) {
|
58
|
-
debug("createInstance", type);
|
59
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
60
|
-
const {
|
61
|
-
children,
|
62
|
-
...props
|
63
|
-
} = propsWithChildren;
|
64
|
-
debug("createInstance", type);
|
65
|
-
const instance = {
|
66
|
-
type,
|
67
|
-
props,
|
68
|
-
children: []
|
69
|
-
};
|
70
|
-
return instance;
|
71
|
-
},
|
72
|
-
appendInitialChild(parentInstance, child) {
|
73
|
-
debug("appendInitialChild");
|
74
|
-
appendNode(parentInstance, child);
|
75
|
-
},
|
76
|
-
finalizeInitialChildren(parentInstance, _type, _props, _rootContainerInstance, _hostContext) {
|
77
|
-
debug("finalizeInitialChildren", parentInstance);
|
78
|
-
return false;
|
79
|
-
},
|
80
|
-
commitMount() {
|
81
|
-
// if finalizeInitialChildren = true
|
82
|
-
debug("commitMount");
|
83
|
-
},
|
84
|
-
prepareForCommit(_containerInfo) {
|
85
|
-
debug("prepareForCommit");
|
86
|
-
return null;
|
87
|
-
},
|
88
|
-
resetAfterCommit(container) {
|
89
|
-
debug("resetAfterCommit");
|
90
|
-
container.redraw();
|
91
|
-
},
|
92
|
-
getPublicInstance(node) {
|
93
|
-
debug("getPublicInstance");
|
94
|
-
return node;
|
95
|
-
},
|
96
|
-
prepareUpdate: (_instance, type, oldProps, newProps, rootContainerInstance, _hostContext) => {
|
97
|
-
debug("prepareUpdate");
|
98
|
-
const propsAreEqual = shallowEq(oldProps, newProps);
|
99
|
-
if (propsAreEqual) {
|
100
|
-
return null;
|
101
|
-
}
|
102
|
-
debug("update ", type);
|
103
|
-
return rootContainerInstance;
|
104
|
-
},
|
105
|
-
commitUpdate(instance, _updatePayload, type, prevProps, nextProps, _internalHandle) {
|
106
|
-
debug("commitUpdate: ", type);
|
107
|
-
if (shallowEq(prevProps, nextProps)) {
|
108
|
-
return;
|
109
|
-
}
|
110
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
111
|
-
const {
|
112
|
-
children,
|
113
|
-
...props
|
114
|
-
} = nextProps;
|
115
|
-
instance.props = props;
|
116
|
-
},
|
117
|
-
commitTextUpdate: (_textInstance, _oldText, _newText) => {
|
118
|
-
// textInstance.instance = newText;
|
119
|
-
},
|
120
|
-
clearContainer: container => {
|
121
|
-
debug("clearContainer");
|
122
|
-
container.root = [];
|
123
|
-
},
|
124
|
-
preparePortalMount: () => {
|
125
|
-
debug("preparePortalMount");
|
126
|
-
},
|
127
|
-
removeChild: (parent, child) => {
|
128
|
-
removeNode(parent, child);
|
129
|
-
},
|
130
|
-
removeChildFromContainer: (container, child) => {
|
131
|
-
container.root.splice(container.root.indexOf(child), 1);
|
132
|
-
},
|
133
|
-
insertInContainerBefore: (container, child, before) => {
|
134
|
-
container.root.splice(container.root.indexOf(before), 0, child);
|
135
|
-
},
|
136
|
-
insertBefore: (parent, child, before) => {
|
137
|
-
insertBefore(parent, child, before);
|
138
|
-
},
|
139
|
-
// see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874
|
140
|
-
getCurrentEventPriority: () => DefaultEventPriority,
|
141
|
-
beforeActiveInstanceBlur: () => {},
|
142
|
-
afterActiveInstanceBlur: () => {},
|
143
|
-
detachDeletedInstance: () => {},
|
144
|
-
getInstanceFromNode: function (_node) {
|
145
|
-
return null;
|
146
|
-
},
|
147
|
-
prepareScopeUpdate: function (_scopeInstance, _instance) {},
|
148
|
-
getInstanceFromScope: function (_scopeInstance) {
|
149
|
-
return null;
|
150
|
-
}
|
151
|
-
};
|
152
|
-
//# sourceMappingURL=HostConfig2.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["DefaultEventPriority","shallowEq","DEBUG","debug","args","console","log","appendNode","parent","child","children","push","removeNode","splice","indexOf","insertBefore","before","sksgHostConfig","supportsMutation","isPrimaryRenderer","supportsPersistence","supportsHydration","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","appendChildToContainer","container","root","appendChild","getRootHostContext","_rootContainerInstance","getChildHostContext","_parentHostContext","_type","shouldSetTextContent","_props","createTextInstance","_text","_hostContext","_internalInstanceHandle","Error","createInstance","type","propsWithChildren","_container","props","instance","appendInitialChild","parentInstance","finalizeInitialChildren","commitMount","prepareForCommit","_containerInfo","resetAfterCommit","redraw","getPublicInstance","node","prepareUpdate","_instance","oldProps","newProps","rootContainerInstance","propsAreEqual","commitUpdate","_updatePayload","prevProps","nextProps","_internalHandle","commitTextUpdate","_textInstance","_oldText","_newText","clearContainer","preparePortalMount","removeChild","removeChildFromContainer","insertInContainerBefore","getCurrentEventPriority","beforeActiveInstanceBlur","afterActiveInstanceBlur","detachDeletedInstance","getInstanceFromNode","_node","prepareScopeUpdate","_scopeInstance","getInstanceFromScope"],"sources":["HostConfig2.ts"],"sourcesContent":["/*global NodeJS*/\nimport type { Fiber, HostConfig } from \"react-reconciler\";\nimport { DefaultEventPriority } from \"react-reconciler/constants\";\n\nimport type { NodeType } from \"../dom/types\";\nimport { shallowEq } from \"../renderer/typeddash\";\n\nimport type { Container } from \"./Container\";\nimport type { Node } from \"./Node\";\n\nconst DEBUG = false;\nexport const debug = (...args: Parameters<typeof console.log>) => {\n if (DEBUG) {\n console.log(...args);\n }\n};\n\ntype Instance = Node<unknown>;\n\ntype Props = object;\ntype TextInstance = Node<unknown>;\ntype SuspenseInstance = Instance;\ntype HydratableInstance = Instance;\ntype PublicInstance = Instance;\ntype HostContext = null;\ntype UpdatePayload = Container;\ntype ChildSet = unknown;\ntype TimeoutHandle = NodeJS.Timeout;\ntype NoTimeout = -1;\n\ntype SkiaHostConfig = HostConfig<\n NodeType,\n Props,\n Container,\n Instance,\n TextInstance,\n SuspenseInstance,\n HydratableInstance,\n PublicInstance,\n HostContext,\n UpdatePayload,\n ChildSet,\n TimeoutHandle,\n NoTimeout\n>;\n\nconst appendNode = (parent: Node<unknown>, child: Node<unknown>) => {\n parent.children.push(child);\n};\n\nconst removeNode = (parent: Node<unknown>, child: Node<unknown>) => {\n parent.children.splice(parent.children.indexOf(child), 1);\n};\n\nconst insertBefore = (\n parent: Node<unknown>,\n child: Node<unknown>,\n before: Node<unknown>\n) => {\n parent.children.splice(parent.children.indexOf(before), 0, child);\n};\n\nexport const sksgHostConfig: SkiaHostConfig = {\n /**\n * This function is used by the reconciler in order to calculate current time for prioritising work.\n */\n supportsMutation: true,\n isPrimaryRenderer: false,\n supportsPersistence: false,\n supportsHydration: false,\n //supportsMicrotask: true,\n\n scheduleTimeout: setTimeout,\n cancelTimeout: clearTimeout,\n noTimeout: -1,\n\n appendChildToContainer(container, child) {\n debug(\"appendChildToContainer\");\n container.root.push(child);\n },\n\n appendChild(parent, child) {\n debug(\"appendChild\", parent, child);\n appendNode(parent, child);\n },\n\n getRootHostContext: (_rootContainerInstance: Container) => {\n debug(\"getRootHostContext\");\n return null;\n },\n\n getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {\n debug(\"getChildHostContext\");\n return null;\n },\n\n shouldSetTextContent(_type, _props) {\n return false;\n },\n\n createTextInstance(\n _text,\n _rootContainerInstance,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createTextInstance\");\n // return SpanNode({}, text) as SkNode;\n throw new Error(\"Text nodes are not supported yet\");\n },\n\n createInstance(\n type,\n propsWithChildren,\n _container,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createInstance\", type);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { children, ...props } = propsWithChildren as any;\n debug(\"createInstance\", type);\n const instance = {\n type,\n props,\n children: [],\n };\n return instance;\n },\n\n appendInitialChild(parentInstance, child) {\n debug(\"appendInitialChild\");\n appendNode(parentInstance, child);\n },\n\n finalizeInitialChildren(\n parentInstance,\n _type,\n _props,\n _rootContainerInstance,\n _hostContext\n ) {\n debug(\"finalizeInitialChildren\", parentInstance);\n return false;\n },\n\n commitMount() {\n // if finalizeInitialChildren = true\n debug(\"commitMount\");\n },\n\n prepareForCommit(_containerInfo) {\n debug(\"prepareForCommit\");\n return null;\n },\n\n resetAfterCommit(container) {\n debug(\"resetAfterCommit\");\n container.redraw();\n },\n\n getPublicInstance(node: Instance) {\n debug(\"getPublicInstance\");\n return node;\n },\n\n prepareUpdate: (\n _instance,\n type,\n oldProps,\n newProps,\n rootContainerInstance,\n _hostContext\n ) => {\n debug(\"prepareUpdate\");\n const propsAreEqual = shallowEq(oldProps, newProps);\n if (propsAreEqual) {\n return null;\n }\n debug(\"update \", type);\n return rootContainerInstance;\n },\n\n commitUpdate(\n instance,\n _updatePayload,\n type,\n prevProps,\n nextProps,\n _internalHandle\n ) {\n debug(\"commitUpdate: \", type);\n if (shallowEq(prevProps, nextProps)) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { children, ...props } = nextProps as any;\n instance.props = props;\n },\n\n commitTextUpdate: (\n _textInstance: TextInstance,\n _oldText: string,\n _newText: string\n ) => {\n // textInstance.instance = newText;\n },\n\n clearContainer: (container) => {\n debug(\"clearContainer\");\n container.root = [];\n },\n\n preparePortalMount: () => {\n debug(\"preparePortalMount\");\n },\n\n removeChild: (parent, child) => {\n removeNode(parent, child);\n },\n\n removeChildFromContainer: (container, child) => {\n container.root.splice(container.root.indexOf(child), 1);\n },\n\n insertInContainerBefore: (container, child, before) => {\n container.root.splice(container.root.indexOf(before), 0, child);\n },\n\n insertBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n\n // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874\n getCurrentEventPriority: () => DefaultEventPriority,\n beforeActiveInstanceBlur: () => {},\n afterActiveInstanceBlur: () => {},\n detachDeletedInstance: () => {},\n\n getInstanceFromNode: function (_node): Fiber | null | undefined {\n return null;\n },\n prepareScopeUpdate: function (_scopeInstance, _instance): void {},\n getInstanceFromScope: function (_scopeInstance): Instance | null {\n return null;\n },\n};\n"],"mappings":"AAAA;;AAEA,SAASA,oBAAoB,QAAQ,4BAA4B;AAGjE,SAASC,SAAS,QAAQ,uBAAuB;AAKjD,MAAMC,KAAK,GAAG,KAAK;AACnB,OAAO,MAAMC,KAAK,GAAGA,CAAC,GAAGC,IAAoC,KAAK;EAChE,IAAIF,KAAK,EAAE;IACTG,OAAO,CAACC,GAAG,CAAC,GAAGF,IAAI,CAAC;EACtB;AACF,CAAC;AA+BD,MAAMG,UAAU,GAAGA,CAACC,MAAqB,EAAEC,KAAoB,KAAK;EAClED,MAAM,CAACE,QAAQ,CAACC,IAAI,CAACF,KAAK,CAAC;AAC7B,CAAC;AAED,MAAMG,UAAU,GAAGA,CAACJ,MAAqB,EAAEC,KAAoB,KAAK;EAClED,MAAM,CAACE,QAAQ,CAACG,MAAM,CAACL,MAAM,CAACE,QAAQ,CAACI,OAAO,CAACL,KAAK,CAAC,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED,MAAMM,YAAY,GAAGA,CACnBP,MAAqB,EACrBC,KAAoB,EACpBO,MAAqB,KAClB;EACHR,MAAM,CAACE,QAAQ,CAACG,MAAM,CAACL,MAAM,CAACE,QAAQ,CAACI,OAAO,CA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M,YAAY,EAAEA,CAACP,MAAM,EAAEC,KAAK,EAAEO,MAAM,KAAK;IACvCD,YAAY,CAACP,MAAM,EAAEC,KAAK,EAAEO,MAAM,CAAC;EACrC,CAAC;EAED;EACA+D,uBAAuB,EAAEA,CAAA,KAAM/E,oBAAoB;EACnDgF,wBAAwB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAClCC,uBAAuB,EAAEA,CAAA,KAAM,CAAC,CAAC;EACjCC,qBAAqB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAE/BC,mBAAmB,EAAE,SAAAA,CAAUC,KAAK,EAA4B;IAC9D,OAAO,IAAI;EACb,CAAC;EACDC,kBAAkB,EAAE,SAAAA,CAAUC,cAAc,EAAE1B,SAAS,EAAQ,CAAC,CAAC;EACjE2B,oBAAoB,EAAE,SAAAA,CAAUD,cAAc,EAAmB;IAC/D,OAAO,IAAI;EACb;AACF,CAAC","ignoreList":[]}
|
@@ -1,44 +0,0 @@
|
|
1
|
-
export const __esModule: boolean;
|
2
|
-
export namespace sksgHostConfig {
|
3
|
-
let supportsMutation: boolean;
|
4
|
-
let isPrimaryRenderer: boolean;
|
5
|
-
let supportsPersistence: boolean;
|
6
|
-
let supportsHydration: boolean;
|
7
|
-
let scheduleTimeout: typeof setTimeout;
|
8
|
-
let cancelTimeout: typeof clearTimeout;
|
9
|
-
let noTimeout: number;
|
10
|
-
function appendChildToContainer(container: any, child: any): void;
|
11
|
-
function appendChild(parent: any, child: any): void;
|
12
|
-
function getRootHostContext(_rootContainerInstance: any): null;
|
13
|
-
function getChildHostContext(_parentHostContext: any, _type: any, _rootContainerInstance: any): null;
|
14
|
-
function shouldSetTextContent(_type: any, _props: any): boolean;
|
15
|
-
function createTextInstance(_text: any, _rootContainerInstance: any, _hostContext: any, _internalInstanceHandle: any): never;
|
16
|
-
function createInstance(type: any, propsWithChildren: any, _container: any, _hostContext: any, _internalInstanceHandle: any): {
|
17
|
-
type: any;
|
18
|
-
props: any;
|
19
|
-
children: never[];
|
20
|
-
};
|
21
|
-
function appendInitialChild(parentInstance: any, child: any): void;
|
22
|
-
function finalizeInitialChildren(parentInstance: any, _type: any, _props: any, _rootContainerInstance: any, _hostContext: any): boolean;
|
23
|
-
function commitMount(): void;
|
24
|
-
function prepareForCommit(_containerInfo: any): null;
|
25
|
-
function resetAfterCommit(container: any): void;
|
26
|
-
function getPublicInstance(node: any): any;
|
27
|
-
function prepareUpdate(_instance: any, type: any, oldProps: any, newProps: any, rootContainerInstance: any, _hostContext: any): any;
|
28
|
-
function commitUpdate(instance: any, _updatePayload: any, type: any, prevProps: any, nextProps: any, _internalHandle: any): void;
|
29
|
-
function commitTextUpdate(_textInstance: any, _oldText: any, _newText: any): void;
|
30
|
-
function clearContainer(container: any): void;
|
31
|
-
function preparePortalMount(): void;
|
32
|
-
function removeChild(parent: any, child: any): void;
|
33
|
-
function removeChildFromContainer(container: any, child: any): void;
|
34
|
-
function insertInContainerBefore(container: any, child: any, before: any): void;
|
35
|
-
function insertBefore(parent: any, child: any, before: any): void;
|
36
|
-
function getCurrentEventPriority(): number;
|
37
|
-
function beforeActiveInstanceBlur(): void;
|
38
|
-
function afterActiveInstanceBlur(): void;
|
39
|
-
function detachDeletedInstance(): void;
|
40
|
-
function getInstanceFromNode(_node: any): null;
|
41
|
-
function prepareScopeUpdate(_scopeInstance: any, _instance: any): void;
|
42
|
-
function getInstanceFromScope(_scopeInstance: any): null;
|
43
|
-
}
|
44
|
-
export function debug(...args: any[]): void;
|
@@ -1,43 +0,0 @@
|
|
1
|
-
export function debug(...args: any[]): void;
|
2
|
-
export namespace sksgHostConfig {
|
3
|
-
let supportsMutation: boolean;
|
4
|
-
let isPrimaryRenderer: boolean;
|
5
|
-
let supportsPersistence: boolean;
|
6
|
-
let supportsHydration: boolean;
|
7
|
-
let scheduleTimeout: typeof setTimeout;
|
8
|
-
let cancelTimeout: typeof clearTimeout;
|
9
|
-
let noTimeout: number;
|
10
|
-
function appendChildToContainer(container: any, child: any): void;
|
11
|
-
function appendChild(parent: any, child: any): void;
|
12
|
-
function getRootHostContext(_rootContainerInstance: any): null;
|
13
|
-
function getChildHostContext(_parentHostContext: any, _type: any, _rootContainerInstance: any): null;
|
14
|
-
function shouldSetTextContent(_type: any, _props: any): boolean;
|
15
|
-
function createTextInstance(_text: any, _rootContainerInstance: any, _hostContext: any, _internalInstanceHandle: any): never;
|
16
|
-
function createInstance(type: any, propsWithChildren: any, _container: any, _hostContext: any, _internalInstanceHandle: any): {
|
17
|
-
type: any;
|
18
|
-
props: any;
|
19
|
-
children: never[];
|
20
|
-
};
|
21
|
-
function appendInitialChild(parentInstance: any, child: any): void;
|
22
|
-
function finalizeInitialChildren(parentInstance: any, _type: any, _props: any, _rootContainerInstance: any, _hostContext: any): boolean;
|
23
|
-
function commitMount(): void;
|
24
|
-
function prepareForCommit(_containerInfo: any): null;
|
25
|
-
function resetAfterCommit(container: any): void;
|
26
|
-
function getPublicInstance(node: any): any;
|
27
|
-
function prepareUpdate(_instance: any, type: any, oldProps: any, newProps: any, rootContainerInstance: any, _hostContext: any): any;
|
28
|
-
function commitUpdate(instance: any, _updatePayload: any, type: any, prevProps: any, nextProps: any, _internalHandle: any): void;
|
29
|
-
function commitTextUpdate(_textInstance: any, _oldText: any, _newText: any): void;
|
30
|
-
function clearContainer(container: any): void;
|
31
|
-
function preparePortalMount(): void;
|
32
|
-
function removeChild(parent: any, child: any): void;
|
33
|
-
function removeChildFromContainer(container: any, child: any): void;
|
34
|
-
function insertInContainerBefore(container: any, child: any, before: any): void;
|
35
|
-
function insertBefore(parent: any, child: any, before: any): void;
|
36
|
-
function getCurrentEventPriority(): number;
|
37
|
-
function beforeActiveInstanceBlur(): void;
|
38
|
-
function afterActiveInstanceBlur(): void;
|
39
|
-
function detachDeletedInstance(): void;
|
40
|
-
function getInstanceFromNode(_node: any): null;
|
41
|
-
function prepareScopeUpdate(_scopeInstance: any, _instance: any): void;
|
42
|
-
function getInstanceFromScope(_scopeInstance: any): null;
|
43
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import type { HostConfig } from "react-reconciler";
|
2
|
-
import type { NodeType } from "../dom/types";
|
3
|
-
import type { Container } from "./Container";
|
4
|
-
import type { Node } from "./Node";
|
5
|
-
export declare const debug: (message?: any, ...optionalParams: any[]) => void;
|
6
|
-
type Instance = Node<unknown>;
|
7
|
-
type Props = object;
|
8
|
-
type TextInstance = Node<unknown>;
|
9
|
-
type SuspenseInstance = Instance;
|
10
|
-
type HydratableInstance = Instance;
|
11
|
-
type PublicInstance = Instance;
|
12
|
-
type HostContext = null;
|
13
|
-
type UpdatePayload = Container;
|
14
|
-
type ChildSet = unknown;
|
15
|
-
type TimeoutHandle = NodeJS.Timeout;
|
16
|
-
type NoTimeout = -1;
|
17
|
-
type SkiaHostConfig = HostConfig<NodeType, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, PublicInstance, HostContext, UpdatePayload, ChildSet, TimeoutHandle, NoTimeout>;
|
18
|
-
export declare const sksgHostConfig: SkiaHostConfig;
|
19
|
-
export {};
|
package/src/sksg/HostConfig2.ts
DELETED
@@ -1,247 +0,0 @@
|
|
1
|
-
/*global NodeJS*/
|
2
|
-
import type { Fiber, HostConfig } from "react-reconciler";
|
3
|
-
import { DefaultEventPriority } from "react-reconciler/constants";
|
4
|
-
|
5
|
-
import type { NodeType } from "../dom/types";
|
6
|
-
import { shallowEq } from "../renderer/typeddash";
|
7
|
-
|
8
|
-
import type { Container } from "./Container";
|
9
|
-
import type { Node } from "./Node";
|
10
|
-
|
11
|
-
const DEBUG = false;
|
12
|
-
export const debug = (...args: Parameters<typeof console.log>) => {
|
13
|
-
if (DEBUG) {
|
14
|
-
console.log(...args);
|
15
|
-
}
|
16
|
-
};
|
17
|
-
|
18
|
-
type Instance = Node<unknown>;
|
19
|
-
|
20
|
-
type Props = object;
|
21
|
-
type TextInstance = Node<unknown>;
|
22
|
-
type SuspenseInstance = Instance;
|
23
|
-
type HydratableInstance = Instance;
|
24
|
-
type PublicInstance = Instance;
|
25
|
-
type HostContext = null;
|
26
|
-
type UpdatePayload = Container;
|
27
|
-
type ChildSet = unknown;
|
28
|
-
type TimeoutHandle = NodeJS.Timeout;
|
29
|
-
type NoTimeout = -1;
|
30
|
-
|
31
|
-
type SkiaHostConfig = HostConfig<
|
32
|
-
NodeType,
|
33
|
-
Props,
|
34
|
-
Container,
|
35
|
-
Instance,
|
36
|
-
TextInstance,
|
37
|
-
SuspenseInstance,
|
38
|
-
HydratableInstance,
|
39
|
-
PublicInstance,
|
40
|
-
HostContext,
|
41
|
-
UpdatePayload,
|
42
|
-
ChildSet,
|
43
|
-
TimeoutHandle,
|
44
|
-
NoTimeout
|
45
|
-
>;
|
46
|
-
|
47
|
-
const appendNode = (parent: Node<unknown>, child: Node<unknown>) => {
|
48
|
-
parent.children.push(child);
|
49
|
-
};
|
50
|
-
|
51
|
-
const removeNode = (parent: Node<unknown>, child: Node<unknown>) => {
|
52
|
-
parent.children.splice(parent.children.indexOf(child), 1);
|
53
|
-
};
|
54
|
-
|
55
|
-
const insertBefore = (
|
56
|
-
parent: Node<unknown>,
|
57
|
-
child: Node<unknown>,
|
58
|
-
before: Node<unknown>
|
59
|
-
) => {
|
60
|
-
parent.children.splice(parent.children.indexOf(before), 0, child);
|
61
|
-
};
|
62
|
-
|
63
|
-
export const sksgHostConfig: SkiaHostConfig = {
|
64
|
-
/**
|
65
|
-
* This function is used by the reconciler in order to calculate current time for prioritising work.
|
66
|
-
*/
|
67
|
-
supportsMutation: true,
|
68
|
-
isPrimaryRenderer: false,
|
69
|
-
supportsPersistence: false,
|
70
|
-
supportsHydration: false,
|
71
|
-
//supportsMicrotask: true,
|
72
|
-
|
73
|
-
scheduleTimeout: setTimeout,
|
74
|
-
cancelTimeout: clearTimeout,
|
75
|
-
noTimeout: -1,
|
76
|
-
|
77
|
-
appendChildToContainer(container, child) {
|
78
|
-
debug("appendChildToContainer");
|
79
|
-
container.root.push(child);
|
80
|
-
},
|
81
|
-
|
82
|
-
appendChild(parent, child) {
|
83
|
-
debug("appendChild", parent, child);
|
84
|
-
appendNode(parent, child);
|
85
|
-
},
|
86
|
-
|
87
|
-
getRootHostContext: (_rootContainerInstance: Container) => {
|
88
|
-
debug("getRootHostContext");
|
89
|
-
return null;
|
90
|
-
},
|
91
|
-
|
92
|
-
getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {
|
93
|
-
debug("getChildHostContext");
|
94
|
-
return null;
|
95
|
-
},
|
96
|
-
|
97
|
-
shouldSetTextContent(_type, _props) {
|
98
|
-
return false;
|
99
|
-
},
|
100
|
-
|
101
|
-
createTextInstance(
|
102
|
-
_text,
|
103
|
-
_rootContainerInstance,
|
104
|
-
_hostContext,
|
105
|
-
_internalInstanceHandle
|
106
|
-
) {
|
107
|
-
debug("createTextInstance");
|
108
|
-
// return SpanNode({}, text) as SkNode;
|
109
|
-
throw new Error("Text nodes are not supported yet");
|
110
|
-
},
|
111
|
-
|
112
|
-
createInstance(
|
113
|
-
type,
|
114
|
-
propsWithChildren,
|
115
|
-
_container,
|
116
|
-
_hostContext,
|
117
|
-
_internalInstanceHandle
|
118
|
-
) {
|
119
|
-
debug("createInstance", type);
|
120
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
121
|
-
const { children, ...props } = propsWithChildren as any;
|
122
|
-
debug("createInstance", type);
|
123
|
-
const instance = {
|
124
|
-
type,
|
125
|
-
props,
|
126
|
-
children: [],
|
127
|
-
};
|
128
|
-
return instance;
|
129
|
-
},
|
130
|
-
|
131
|
-
appendInitialChild(parentInstance, child) {
|
132
|
-
debug("appendInitialChild");
|
133
|
-
appendNode(parentInstance, child);
|
134
|
-
},
|
135
|
-
|
136
|
-
finalizeInitialChildren(
|
137
|
-
parentInstance,
|
138
|
-
_type,
|
139
|
-
_props,
|
140
|
-
_rootContainerInstance,
|
141
|
-
_hostContext
|
142
|
-
) {
|
143
|
-
debug("finalizeInitialChildren", parentInstance);
|
144
|
-
return false;
|
145
|
-
},
|
146
|
-
|
147
|
-
commitMount() {
|
148
|
-
// if finalizeInitialChildren = true
|
149
|
-
debug("commitMount");
|
150
|
-
},
|
151
|
-
|
152
|
-
prepareForCommit(_containerInfo) {
|
153
|
-
debug("prepareForCommit");
|
154
|
-
return null;
|
155
|
-
},
|
156
|
-
|
157
|
-
resetAfterCommit(container) {
|
158
|
-
debug("resetAfterCommit");
|
159
|
-
container.redraw();
|
160
|
-
},
|
161
|
-
|
162
|
-
getPublicInstance(node: Instance) {
|
163
|
-
debug("getPublicInstance");
|
164
|
-
return node;
|
165
|
-
},
|
166
|
-
|
167
|
-
prepareUpdate: (
|
168
|
-
_instance,
|
169
|
-
type,
|
170
|
-
oldProps,
|
171
|
-
newProps,
|
172
|
-
rootContainerInstance,
|
173
|
-
_hostContext
|
174
|
-
) => {
|
175
|
-
debug("prepareUpdate");
|
176
|
-
const propsAreEqual = shallowEq(oldProps, newProps);
|
177
|
-
if (propsAreEqual) {
|
178
|
-
return null;
|
179
|
-
}
|
180
|
-
debug("update ", type);
|
181
|
-
return rootContainerInstance;
|
182
|
-
},
|
183
|
-
|
184
|
-
commitUpdate(
|
185
|
-
instance,
|
186
|
-
_updatePayload,
|
187
|
-
type,
|
188
|
-
prevProps,
|
189
|
-
nextProps,
|
190
|
-
_internalHandle
|
191
|
-
) {
|
192
|
-
debug("commitUpdate: ", type);
|
193
|
-
if (shallowEq(prevProps, nextProps)) {
|
194
|
-
return;
|
195
|
-
}
|
196
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
197
|
-
const { children, ...props } = nextProps as any;
|
198
|
-
instance.props = props;
|
199
|
-
},
|
200
|
-
|
201
|
-
commitTextUpdate: (
|
202
|
-
_textInstance: TextInstance,
|
203
|
-
_oldText: string,
|
204
|
-
_newText: string
|
205
|
-
) => {
|
206
|
-
// textInstance.instance = newText;
|
207
|
-
},
|
208
|
-
|
209
|
-
clearContainer: (container) => {
|
210
|
-
debug("clearContainer");
|
211
|
-
container.root = [];
|
212
|
-
},
|
213
|
-
|
214
|
-
preparePortalMount: () => {
|
215
|
-
debug("preparePortalMount");
|
216
|
-
},
|
217
|
-
|
218
|
-
removeChild: (parent, child) => {
|
219
|
-
removeNode(parent, child);
|
220
|
-
},
|
221
|
-
|
222
|
-
removeChildFromContainer: (container, child) => {
|
223
|
-
container.root.splice(container.root.indexOf(child), 1);
|
224
|
-
},
|
225
|
-
|
226
|
-
insertInContainerBefore: (container, child, before) => {
|
227
|
-
container.root.splice(container.root.indexOf(before), 0, child);
|
228
|
-
},
|
229
|
-
|
230
|
-
insertBefore: (parent, child, before) => {
|
231
|
-
insertBefore(parent, child, before);
|
232
|
-
},
|
233
|
-
|
234
|
-
// see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874
|
235
|
-
getCurrentEventPriority: () => DefaultEventPriority,
|
236
|
-
beforeActiveInstanceBlur: () => {},
|
237
|
-
afterActiveInstanceBlur: () => {},
|
238
|
-
detachDeletedInstance: () => {},
|
239
|
-
|
240
|
-
getInstanceFromNode: function (_node): Fiber | null | undefined {
|
241
|
-
return null;
|
242
|
-
},
|
243
|
-
prepareScopeUpdate: function (_scopeInstance, _instance): void {},
|
244
|
-
getInstanceFromScope: function (_scopeInstance): Instance | null {
|
245
|
-
return null;
|
246
|
-
},
|
247
|
-
};
|