@ng-native/fabric 0.6.0 → 0.8.0
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/dist/background-layers.d.ts +18 -0
- package/dist/background-layers.js +70 -0
- package/dist/background-layers.js.map +1 -0
- package/dist/css.d.ts +21 -0
- package/dist/css.js +174 -24
- package/dist/css.js.map +1 -1
- package/dist/engine.d.ts +104 -1
- package/dist/engine.js +617 -36
- package/dist/engine.js.map +1 -1
- package/dist/fabric.d.ts +1 -1
- package/dist/fabric.js +1 -0
- package/dist/fabric.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/native-drive.js +9 -0
- package/dist/native-drive.js.map +1 -1
- package/dist/scroll-animation.d.ts +11 -0
- package/dist/scroll-animation.js +30 -1
- package/dist/scroll-animation.js.map +1 -1
- package/dist/transition.d.ts +48 -1
- package/dist/transition.js +119 -29
- package/dist/transition.js.map +1 -1
- package/package.json +1 -1
package/dist/engine.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ interface ScrollAnimation {
|
|
|
25
25
|
offset: number;
|
|
26
26
|
value: unknown;
|
|
27
27
|
}[]>;
|
|
28
|
+
/** The properties among `tracks` declared `!important`, left where the rule puts them. */
|
|
29
|
+
readonly pinned: readonly string[];
|
|
28
30
|
readonly resting: Record<string, unknown>;
|
|
29
31
|
readonly first: Record<string, unknown>;
|
|
30
32
|
/** The colour the node inherits, which the tracks were built with, for frames that read it. */
|
|
@@ -52,6 +54,16 @@ export interface FabricUIManager {
|
|
|
52
54
|
/** Clone with the given props and the given children (omitting them means none). */
|
|
53
55
|
cloneNodeWithNewChildrenAndProps(node: FabricNode, newProps: object): FabricNode;
|
|
54
56
|
appendChild(parent: FabricNode, child: FabricNode): FabricNode;
|
|
57
|
+
/**
|
|
58
|
+
* Have native move each view whose frame the next commit changes to where it ends up, over a
|
|
59
|
+
* time and by one of its own curves, with no frame of it in JavaScript.
|
|
60
|
+
*/
|
|
61
|
+
configureNextLayoutAnimation?(config: {
|
|
62
|
+
duration: number;
|
|
63
|
+
update: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
}, ended: () => void, failed: () => void): void;
|
|
55
67
|
createChildSet(rootTag: number): FabricNodeSet;
|
|
56
68
|
appendChildToSet(set: FabricNodeSet, child: FabricNode): void;
|
|
57
69
|
completeRoot(rootTag: number, set: FabricNodeSet): void;
|
|
@@ -303,6 +315,10 @@ export interface EngineNode extends HostNode {
|
|
|
303
315
|
committedUnder: EngineNode | null;
|
|
304
316
|
/** The hoisted views this node keeps committed for, by element name. See `HoistOptions`. */
|
|
305
317
|
kept?: Map<string, KeptHoist>;
|
|
318
|
+
/** On a text field, the row aligned by baseline that takes a baseline from it: `lineBaseline`. */
|
|
319
|
+
onBaseline?: EngineNode;
|
|
320
|
+
/** On such a row, the fields it has marked, which it unmarks when they are no longer its own. */
|
|
321
|
+
baselineFields?: Set<EngineNode>;
|
|
306
322
|
/** Commit this node again with its children so Fabric measures it again. `remeasureText`. */
|
|
307
323
|
remeasure?: true;
|
|
308
324
|
/**
|
|
@@ -1116,7 +1132,7 @@ export declare class Engine implements HostEngine {
|
|
|
1116
1132
|
* asks for another by name, or its keyframes went, as a browser fires it.
|
|
1117
1133
|
*/
|
|
1118
1134
|
private cancelPlaying;
|
|
1119
|
-
/** Stop on native each animation whose view has left the tree. */
|
|
1135
|
+
/** Stop on native each animation and transition whose view has left the tree. */
|
|
1120
1136
|
private releasePlayedNatively;
|
|
1121
1137
|
/** Every node whose animation native is playing, with no frame of it in JavaScript. */
|
|
1122
1138
|
private readonly playedNatively;
|
|
@@ -1214,6 +1230,72 @@ export declare class Engine implements HostEngine {
|
|
|
1214
1230
|
private reportHeld;
|
|
1215
1231
|
private reportMissingKeyframes;
|
|
1216
1232
|
private transitioned;
|
|
1233
|
+
/** Nobody saw what the last commit gave a view it created, so this is where the view starts. */
|
|
1234
|
+
private unseenTransitions;
|
|
1235
|
+
/** The elements native is playing a transition of. */
|
|
1236
|
+
private readonly easedNatively;
|
|
1237
|
+
/**
|
|
1238
|
+
* Hand to native each transition that just started and that it can play: opacity and
|
|
1239
|
+
* transforms, with no wait before they start. Those that start together, take as long and ease
|
|
1240
|
+
* alike share a clock. Nothing of them runs in JavaScript until native says they have ended:
|
|
1241
|
+
* a press that fades or slides something is a commit to start it and a commit to end it.
|
|
1242
|
+
*
|
|
1243
|
+
* ponytail: a colour is eased from JavaScript still, a commit a frame, and so is anything
|
|
1244
|
+
* that waits. Native has a colour node for the first; give the driver a channel for it.
|
|
1245
|
+
*/
|
|
1246
|
+
private easeNatively;
|
|
1247
|
+
/** The root's children as the views they are committed as, each reconciled. */
|
|
1248
|
+
private rootHandles;
|
|
1249
|
+
/** The transitions this commit lays out where they end, for native to move the views to. */
|
|
1250
|
+
private laying;
|
|
1251
|
+
/** Whether this commit resizes or moves a box that is in no such transition. */
|
|
1252
|
+
private movesOthers;
|
|
1253
|
+
/**
|
|
1254
|
+
* Commit where it ends each transition of a size or a place that just started, for native to
|
|
1255
|
+
* move the view there: a layout animation, which the commit asks for once it is known that
|
|
1256
|
+
* nothing else in it moves. One still on its way is committed where it ends too.
|
|
1257
|
+
*
|
|
1258
|
+
* A width eased from JavaScript is a commit a frame, and a commit lays the whole screen out.
|
|
1259
|
+
*/
|
|
1260
|
+
private layEased;
|
|
1261
|
+
/**
|
|
1262
|
+
* Before a commit is handed over: ask native to move what it lays out, or take the
|
|
1263
|
+
* transitions back to ease them from JavaScript where the commit moves anything else, and
|
|
1264
|
+
* where they would not all take as long. Answers whether the tree has to be reconciled again.
|
|
1265
|
+
*/
|
|
1266
|
+
private layOut;
|
|
1267
|
+
/**
|
|
1268
|
+
* Note a commit that resizes or moves a box in no transition native lays out: a prop of one
|
|
1269
|
+
* that moves boxes, children that came or went, text longer or shorter than it was.
|
|
1270
|
+
*/
|
|
1271
|
+
private noteMoved;
|
|
1272
|
+
/** A transition native laid out has had its time: it is where it ends, and says so. */
|
|
1273
|
+
private endLaid;
|
|
1274
|
+
/**
|
|
1275
|
+
* Bring a transition native laid out to where its clock has got to, where it is sent another
|
|
1276
|
+
* way or its rule has gone: that is where it goes on from.
|
|
1277
|
+
*/
|
|
1278
|
+
private takeBackLaid;
|
|
1279
|
+
private startEased;
|
|
1280
|
+
private playEased;
|
|
1281
|
+
/**
|
|
1282
|
+
* Native reached the end of the transitions on one clock. Where they end is committed before
|
|
1283
|
+
* the view is let go, so nothing shows of where they started, which is what it was committed
|
|
1284
|
+
* with.
|
|
1285
|
+
*/
|
|
1286
|
+
private endedEased;
|
|
1287
|
+
/** No longer one native is easing, once none of its transitions is native's. */
|
|
1288
|
+
private forgetEased;
|
|
1289
|
+
/**
|
|
1290
|
+
* Take back from native each transition it can no longer play as it was started: one sent
|
|
1291
|
+
* another way, one whose rule has gone, any of a view that was made again. Each is brought to
|
|
1292
|
+
* where its clock has got to, which is where it goes on from, here or on native again.
|
|
1293
|
+
*/
|
|
1294
|
+
private takeBackEased;
|
|
1295
|
+
/** Stop a clock native runs, and go on from JavaScript with each transition it was playing. */
|
|
1296
|
+
private backToScriptEased;
|
|
1297
|
+
/** Let go of what native is easing on an element that is going, or gone. */
|
|
1298
|
+
private stopEased;
|
|
1217
1299
|
/**
|
|
1218
1300
|
* Whether an animation that has finished goes on holding its last frame. With a forwards fill
|
|
1219
1301
|
* it does, for good: without one the element falls back to whatever the cascade gives it, and
|
|
@@ -1254,6 +1336,27 @@ export declare class Engine implements HostEngine {
|
|
|
1254
1336
|
* that colour as a number and throws on a string, taking the whole surface down with it.
|
|
1255
1337
|
*/
|
|
1256
1338
|
private processFilters;
|
|
1339
|
+
/**
|
|
1340
|
+
* Mark the text field each box of a row aligned by baseline takes its baseline from, before
|
|
1341
|
+
* the field is merged, and unmark it when the row is aligned another way.
|
|
1342
|
+
*/
|
|
1343
|
+
private noteBaselineFields;
|
|
1344
|
+
private onBaselineOf;
|
|
1345
|
+
/**
|
|
1346
|
+
* Have the text a row aligned by baseline takes a baseline from measured again, where that
|
|
1347
|
+
* text is inside one of the row's boxes and the row is committed again. React Native keeps
|
|
1348
|
+
* what a paragraph measured on the one copy of its node that was measured, and Yoga copies a
|
|
1349
|
+
* node it lays out around: a row that is laid out again asks a box for its baseline, the box
|
|
1350
|
+
* asks the paragraph in it, and a copy that was never measured works it out then, on a node
|
|
1351
|
+
* that is by then not to be changed. A debug build stops there. Committed to be measured
|
|
1352
|
+
* again (`remeasure`), the paragraph is measured in this commit and has the answer.
|
|
1353
|
+
*
|
|
1354
|
+
* ponytail: the first box in the flow at each level, which is the one Yoga asks unless
|
|
1355
|
+
* another is aligned by baseline itself. A row a commit lays out again without the engine
|
|
1356
|
+
* cloning it, as its room changing does, is not reached: clone on a layout event if one is
|
|
1357
|
+
* seen to stop there.
|
|
1358
|
+
*/
|
|
1359
|
+
private freshBaselines;
|
|
1257
1360
|
/**
|
|
1258
1361
|
* Copy a list of gradients, running every stop's colour through the host's converter.
|
|
1259
1362
|
*
|