@ng-native/fabric 0.7.0 → 0.9.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 +67 -3
- package/dist/css.js +329 -62
- package/dist/css.js.map +1 -1
- package/dist/engine.d.ts +137 -7
- package/dist/engine.js +641 -48
- 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 +34 -0
- package/dist/transition.js +32 -9
- 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;
|
|
@@ -194,6 +206,8 @@ export interface EngineNode extends HostNode {
|
|
|
194
206
|
styleCache: StyleCache | null;
|
|
195
207
|
/** Set when something that could change what this node matches has changed. */
|
|
196
208
|
styleDirty: boolean;
|
|
209
|
+
/** See `StyleTarget.ownDirty`. */
|
|
210
|
+
ownDirty: boolean;
|
|
197
211
|
/** See `StyleTarget.hasDirty`. */
|
|
198
212
|
hasDirty: boolean;
|
|
199
213
|
/** See `StyleTarget.stateDirty`. */
|
|
@@ -765,16 +779,21 @@ export declare class Engine implements HostEngine {
|
|
|
765
779
|
* Mark a node whose classes changed, by what the rules that name those classes can restyle.
|
|
766
780
|
*
|
|
767
781
|
* A class no selector names changes no style: a library's own marker, of an overlay that is
|
|
768
|
-
* animating or a control that was touched. One
|
|
769
|
-
*
|
|
770
|
-
*
|
|
771
|
-
*
|
|
782
|
+
* animating or a control that was touched. One a rule is for the element of, `.on`, has that
|
|
783
|
+
* element matched again, and one named as what a rule's element is inside, `.animating .close`
|
|
784
|
+
* or `.close:is(.animating *)`, the elements under the node that such rules are for. What is
|
|
785
|
+
* under any of those is styled again from the rules it matched, for what it inherits: a `dark`
|
|
786
|
+
* class on the root finds no rule again for an element no `dark` rule is for. Any other class
|
|
787
|
+
* has the node and everything under it matched again, as any other change to it does.
|
|
772
788
|
*
|
|
773
789
|
* A sheet that names a class later restyles what it is for as it arrives, and a node not yet
|
|
774
790
|
* committed is styled when it is, with the class as it is then.
|
|
775
791
|
*/
|
|
776
792
|
private markClasses;
|
|
777
|
-
/**
|
|
793
|
+
/**
|
|
794
|
+
* Have matched again each element under a node that one of `subjects`' rules could be for. One
|
|
795
|
+
* under another is marked too: what is under an element marked this way keeps its rules.
|
|
796
|
+
*/
|
|
778
797
|
private markUnder;
|
|
779
798
|
/**
|
|
780
799
|
* The sheet of the component `node` hosts, whose `:host` rules it matches. Set again when a hot
|
|
@@ -788,13 +807,23 @@ export declare class Engine implements HostEngine {
|
|
|
788
807
|
* the web's mount point has, unless the app's `:host` sizes it otherwise.
|
|
789
808
|
*/
|
|
790
809
|
setDefaultStyle(node: EngineNode, style: Readonly<Record<string, unknown>> | undefined): void;
|
|
791
|
-
/**
|
|
810
|
+
/**
|
|
811
|
+
* `class="a b"` from a template. Replaces the set rather than adding to it. The same classes in
|
|
812
|
+
* another order are a change too, to a selector that reads the class attribute, `[class^="a"]`.
|
|
813
|
+
*/
|
|
792
814
|
setClasses(node: EngineNode, value: string): void;
|
|
793
815
|
/** Angular's `@if`/`@for`/`ViewContainerRef` markers. Ordered, never committed. */
|
|
794
816
|
createAnchor(): EngineNode;
|
|
795
817
|
createText(value: string): EngineNode;
|
|
796
818
|
appendChild(parent: EngineNode, child: EngineNode): void;
|
|
797
819
|
insertBefore(parent: EngineNode, child: EngineNode, ref: EngineNode | null): void;
|
|
820
|
+
/**
|
|
821
|
+
* A node coming under a parent other than the one it is under, or under any once it has been
|
|
822
|
+
* taken out: what is over it may be other than it was styled under. The resolver sees that for
|
|
823
|
+
* itself by the parent's cache, except between two boxes that share one, where it is told here.
|
|
824
|
+
* Moved within its own parent, a row of a list reordered, it is styled as it was.
|
|
825
|
+
*/
|
|
826
|
+
private markAdopted;
|
|
798
827
|
removeChild(parent: EngineNode | null, child: EngineNode): void;
|
|
799
828
|
/**
|
|
800
829
|
* A child came or went under a view that takes its text as a prop: that prop changed. A span
|
|
@@ -1110,6 +1139,24 @@ export declare class Engine implements HostEngine {
|
|
|
1110
1139
|
* own frames, which is what lets an element animate in without differing from anything.
|
|
1111
1140
|
*/
|
|
1112
1141
|
private animated;
|
|
1142
|
+
/**
|
|
1143
|
+
* The keyframes a node's animation names: those of its own component's sheet where it has
|
|
1144
|
+
* some by that name, as Angular scopes a component's keyframes in a browser, and otherwise
|
|
1145
|
+
* whichever sheet has them, since any other is global.
|
|
1146
|
+
*
|
|
1147
|
+
* ponytail: a host is asked of the sheet it is written in before its own component's, so
|
|
1148
|
+
* a `:host` animation is played by its parent's frames where both have the name.
|
|
1149
|
+
*/
|
|
1150
|
+
private keyframesOf;
|
|
1151
|
+
/** Each node's frames as they settle on it, kept for as long as they settle the same. */
|
|
1152
|
+
private readonly settledFrames;
|
|
1153
|
+
/**
|
|
1154
|
+
* An animation's frames for the node playing it: those with a value that waits for the node,
|
|
1155
|
+
* a `var()` it sets, settled against it. The same frames are answered while they settle the
|
|
1156
|
+
* same, and others once a variable changes, which is what an animation under way is played
|
|
1157
|
+
* on from: see `reframe`.
|
|
1158
|
+
*/
|
|
1159
|
+
private framesFor;
|
|
1113
1160
|
/**
|
|
1114
1161
|
* A clock animation the scroll plays instead: the same animation where only the timeline moved,
|
|
1115
1162
|
* and one cancelled where the name changed.
|
|
@@ -1120,7 +1167,7 @@ export declare class Engine implements HostEngine {
|
|
|
1120
1167
|
* asks for another by name, or its keyframes went, as a browser fires it.
|
|
1121
1168
|
*/
|
|
1122
1169
|
private cancelPlaying;
|
|
1123
|
-
/** Stop on native each animation whose view has left the tree. */
|
|
1170
|
+
/** Stop on native each animation and transition whose view has left the tree. */
|
|
1124
1171
|
private releasePlayedNatively;
|
|
1125
1172
|
/** Every node whose animation native is playing, with no frame of it in JavaScript. */
|
|
1126
1173
|
private readonly playedNatively;
|
|
@@ -1167,6 +1214,8 @@ export declare class Engine implements HostEngine {
|
|
|
1167
1214
|
private backToScript;
|
|
1168
1215
|
/** Start the clock on an animation, unless the node is already playing this one. */
|
|
1169
1216
|
private startPlaying;
|
|
1217
|
+
/** Play an animation that has just started: by native's layout, by native's driver, or here. */
|
|
1218
|
+
private playSomewhere;
|
|
1170
1219
|
/**
|
|
1171
1220
|
* The colour `node` inherits, for frames that set `color: currentColor`, which is that colour
|
|
1172
1221
|
* wherever the animation has got to, as in CSS. Undefined for frames that do not.
|
|
@@ -1218,6 +1267,87 @@ export declare class Engine implements HostEngine {
|
|
|
1218
1267
|
private reportHeld;
|
|
1219
1268
|
private reportMissingKeyframes;
|
|
1220
1269
|
private transitioned;
|
|
1270
|
+
/** Nobody saw what the last commit gave a view it created, so this is where the view starts. */
|
|
1271
|
+
private unseenTransitions;
|
|
1272
|
+
/** The elements native is playing a transition of. */
|
|
1273
|
+
private readonly easedNatively;
|
|
1274
|
+
/**
|
|
1275
|
+
* Hand to native each transition that just started and that it can play: opacity and
|
|
1276
|
+
* transforms, with no wait before they start. Those that start together, take as long and ease
|
|
1277
|
+
* alike share a clock. Nothing of them runs in JavaScript until native says they have ended:
|
|
1278
|
+
* a press that fades or slides something is a commit to start it and a commit to end it.
|
|
1279
|
+
*
|
|
1280
|
+
* ponytail: a colour is eased from JavaScript still, a commit a frame, and so is anything
|
|
1281
|
+
* that waits. Native has a colour node for the first; give the driver a channel for it.
|
|
1282
|
+
*/
|
|
1283
|
+
private easeNatively;
|
|
1284
|
+
/** The root's children as the views they are committed as, each reconciled. */
|
|
1285
|
+
private rootHandles;
|
|
1286
|
+
/** The transitions this commit lays out where they end, for native to move the views to. */
|
|
1287
|
+
private laying;
|
|
1288
|
+
/** Whether this commit resizes or moves a box that is in no such transition. */
|
|
1289
|
+
private movesOthers;
|
|
1290
|
+
/**
|
|
1291
|
+
* Commit where it ends each transition of a size or a place that just started, for native to
|
|
1292
|
+
* move the view there: a layout animation, which the commit asks for once it is known that
|
|
1293
|
+
* nothing else in it moves. One still on its way is committed where it ends too.
|
|
1294
|
+
*
|
|
1295
|
+
* A width eased from JavaScript is a commit a frame, and a commit lays the whole screen out.
|
|
1296
|
+
*/
|
|
1297
|
+
private layEased;
|
|
1298
|
+
/** The animations this commit lays out at their last frame, for native to move the views to. */
|
|
1299
|
+
private laidPlayed;
|
|
1300
|
+
/**
|
|
1301
|
+
* Whether an animation that has just started is one native can play by laying the view out
|
|
1302
|
+
* at its last frame: two frames of sizes or places, played once from where the view is drawn
|
|
1303
|
+
* now, which is where native moves it from. It is then committed at that frame; see `layOut`.
|
|
1304
|
+
*/
|
|
1305
|
+
private layPlayed;
|
|
1306
|
+
/** Go on from JavaScript with an animation native was to lay out, by the clock it started on. */
|
|
1307
|
+
private playLaidHere;
|
|
1308
|
+
/** An animation native laid out has had its time: it is at its last frame, and says so. */
|
|
1309
|
+
private endLaidPlayed;
|
|
1310
|
+
/**
|
|
1311
|
+
* Before a commit is handed over: ask native to move what it lays out, and take back to
|
|
1312
|
+
* ease from JavaScript whatever it cannot: all of it where the commit moves anything else,
|
|
1313
|
+
* and otherwise what would not take as long as the longest. Answers whether the tree has to
|
|
1314
|
+
* be reconciled again.
|
|
1315
|
+
*/
|
|
1316
|
+
private layOut;
|
|
1317
|
+
/** Ask native to move what the commit lays out over `duration`, and end each when it is up. */
|
|
1318
|
+
private askLayout;
|
|
1319
|
+
/**
|
|
1320
|
+
* Note a commit that resizes or moves a box in no transition native lays out: a prop of one
|
|
1321
|
+
* that moves boxes, children that came or went, text longer or shorter than it was.
|
|
1322
|
+
*/
|
|
1323
|
+
private noteMoved;
|
|
1324
|
+
/** A transition native laid out has had its time: it is where it ends, and says so. */
|
|
1325
|
+
private endLaid;
|
|
1326
|
+
/**
|
|
1327
|
+
* Bring a transition native laid out to where its clock has got to, where it is sent another
|
|
1328
|
+
* way or its rule has gone: that is where it goes on from.
|
|
1329
|
+
*/
|
|
1330
|
+
private takeBackLaid;
|
|
1331
|
+
private startEased;
|
|
1332
|
+
private playEased;
|
|
1333
|
+
/**
|
|
1334
|
+
* Native reached the end of the transitions on one clock. Where they end is committed before
|
|
1335
|
+
* the view is let go, so nothing shows of where they started, which is what it was committed
|
|
1336
|
+
* with.
|
|
1337
|
+
*/
|
|
1338
|
+
private endedEased;
|
|
1339
|
+
/** No longer one native is easing, once none of its transitions is native's. */
|
|
1340
|
+
private forgetEased;
|
|
1341
|
+
/**
|
|
1342
|
+
* Take back from native each transition it can no longer play as it was started: one sent
|
|
1343
|
+
* another way, one whose rule has gone, any of a view that was made again. Each is brought to
|
|
1344
|
+
* where its clock has got to, which is where it goes on from, here or on native again.
|
|
1345
|
+
*/
|
|
1346
|
+
private takeBackEased;
|
|
1347
|
+
/** Stop a clock native runs, and go on from JavaScript with each transition it was playing. */
|
|
1348
|
+
private backToScriptEased;
|
|
1349
|
+
/** Let go of what native is easing on an element that is going, or gone. */
|
|
1350
|
+
private stopEased;
|
|
1221
1351
|
/**
|
|
1222
1352
|
* Whether an animation that has finished goes on holding its last frame. With a forwards fill
|
|
1223
1353
|
* it does, for good: without one the element falls back to whatever the cascade gives it, and
|