@ng-native/fabric 0.4.0 → 0.5.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/color-mix.js +1 -16
- package/dist/color-mix.js.map +1 -1
- package/dist/css.d.ts +96 -1
- package/dist/css.js +332 -4
- package/dist/css.js.map +1 -1
- package/dist/engine.d.ts +105 -1
- package/dist/engine.js +489 -22
- package/dist/engine.js.map +1 -1
- package/dist/inline-token.js +3 -4
- package/dist/inline-token.js.map +1 -1
- package/dist/native-drive.d.ts +21 -0
- package/dist/native-drive.js +60 -0
- package/dist/native-drive.js.map +1 -1
- package/dist/premultiplied-stops.d.ts +7 -0
- package/dist/premultiplied-stops.js +131 -0
- package/dist/premultiplied-stops.js.map +1 -0
- package/dist/scroll-animation.d.ts +11 -0
- package/dist/scroll-animation.js +29 -0
- package/dist/scroll-animation.js.map +1 -1
- package/dist/transition.d.ts +15 -0
- package/dist/transition.js +42 -1
- package/dist/transition.js.map +1 -1
- package/package.json +1 -1
package/dist/engine.d.ts
CHANGED
|
@@ -194,6 +194,10 @@ export interface EngineNode extends HostNode {
|
|
|
194
194
|
styleCache: StyleCache | null;
|
|
195
195
|
/** Set when something that could change what this node matches has changed. */
|
|
196
196
|
styleDirty: boolean;
|
|
197
|
+
/** See `StyleTarget.hasDirty`. */
|
|
198
|
+
hasDirty: boolean;
|
|
199
|
+
/** See `StyleTarget.stateDirty`. */
|
|
200
|
+
stateDirty: boolean;
|
|
197
201
|
/** A family left out while it loads. See `loadingFamilies`. */
|
|
198
202
|
heldFamily?: string;
|
|
199
203
|
/** See `StyleTarget.inlineInherits`. */
|
|
@@ -230,6 +234,18 @@ export interface EngineNode extends HostNode {
|
|
|
230
234
|
ownStyle?: object;
|
|
231
235
|
/** The resolved style this node was last committed with, for the skip check in `reconcile`. */
|
|
232
236
|
styleCommitted: StyleCache | null;
|
|
237
|
+
/**
|
|
238
|
+
* How this node laid its children out when one of them last had a `fit-content` size, as
|
|
239
|
+
* `containerOf` says it. Set by such a child, and compared on each reconcile so the children
|
|
240
|
+
* are worked out again when the direction or alignment changes. Unset on every other node.
|
|
241
|
+
*/
|
|
242
|
+
fitContainer?: string;
|
|
243
|
+
/**
|
|
244
|
+
* Whether this node had a height a percentage could be taken of, when a box beneath it with a
|
|
245
|
+
* percentage height last asked, as `definiteHeight` says it. Compared on each reconcile so its
|
|
246
|
+
* children are worked out again when it changes. Unset on every other node.
|
|
247
|
+
*/
|
|
248
|
+
heightBasis?: boolean;
|
|
233
249
|
/**
|
|
234
250
|
* Per-property transition state, for every property this node has ever seen a `transition` for.
|
|
235
251
|
* A finished entry stays, because its target is what the next change is measured against.
|
|
@@ -267,6 +283,10 @@ export interface EngineNode extends HostNode {
|
|
|
267
283
|
componentHost?: true;
|
|
268
284
|
/** See `keepNativeView`. */
|
|
269
285
|
nativeView?: true;
|
|
286
|
+
/** Props kept for selectors to match and left out of what is committed. See `keepAsAttribute`. */
|
|
287
|
+
attributeOnly?: Set<string>;
|
|
288
|
+
/** The child this node's background is painted on instead of itself. See `paintOn`. */
|
|
289
|
+
paintsOn?: EngineNode;
|
|
270
290
|
/**
|
|
271
291
|
* Style weaker than every sheet, where no rule and no inline style says otherwise. What lets the
|
|
272
292
|
* root component's host fill the surface by default and still give way to its own `:host`. See
|
|
@@ -426,6 +446,8 @@ export interface ViewNameNode {
|
|
|
426
446
|
readonly nativeView?: boolean;
|
|
427
447
|
/** What it holds, which decides whether one of HTML's text elements is text or a view. */
|
|
428
448
|
readonly children?: readonly ViewNameNode[];
|
|
449
|
+
/** Set on the paragraph the engine makes for a run of text written straight into a view. */
|
|
450
|
+
readonly anonymous?: boolean;
|
|
429
451
|
}
|
|
430
452
|
/**
|
|
431
453
|
* The native view a node commits as: `Paragraph` for a `<text>`, `VirtualText` for one nested in
|
|
@@ -567,6 +589,8 @@ export declare class Engine implements HostEngine {
|
|
|
567
589
|
* does, a child list can move without anything else needing to be looked at again.
|
|
568
590
|
*/
|
|
569
591
|
private structuralSheets;
|
|
592
|
+
/** Whether any sheet uses `:has()`. See `markBeneath`. */
|
|
593
|
+
private hasSheets;
|
|
570
594
|
private readonly resolveAssetSource;
|
|
571
595
|
constructor(fabric: FabricUIManager, rootTag: number, options?: EngineOptions);
|
|
572
596
|
/**
|
|
@@ -590,6 +614,25 @@ export declare class Engine implements HostEngine {
|
|
|
590
614
|
* binding, so nothing marks an Angular view dirty and no change-detection pass would follow.
|
|
591
615
|
*/
|
|
592
616
|
private setActiveChain;
|
|
617
|
+
/** Whether any sheet styles a pressed element, and each compound that asks about one from another. */
|
|
618
|
+
private activeUse;
|
|
619
|
+
/** What each sheet in play asks about a pressed element: `activeUse` is all of them together. */
|
|
620
|
+
private readonly activeBySheet;
|
|
621
|
+
/** Note what a sheet in play asks about a pressed element. See `markActive`. */
|
|
622
|
+
private watchActive;
|
|
623
|
+
/** A sheet has left play, by a hot swap or by being removed: what it asked goes with it. */
|
|
624
|
+
private unwatchActive;
|
|
625
|
+
private countActive;
|
|
626
|
+
/**
|
|
627
|
+
* A press began or ended on `node` or under it, which is all that changed about it. A press
|
|
628
|
+
* reaches every ancestor up to the root, and marking each as restyled would style the whole
|
|
629
|
+
* screen again, twice a press. So each is only matched again, and keeps its style and all
|
|
630
|
+
* that is under it unless it now matches other rules. An element a rule asks about from
|
|
631
|
+
* inside or beside it, `.card:active .title`, changes more than itself, and is restyled with
|
|
632
|
+
* everything under it as any other change is. With no rule for a pressed element at all there
|
|
633
|
+
* is nothing to match.
|
|
634
|
+
*/
|
|
635
|
+
private markActive;
|
|
593
636
|
/**
|
|
594
637
|
* Custom properties the device knows and the stylesheet cannot, once they change.
|
|
595
638
|
*
|
|
@@ -765,6 +808,20 @@ export declare class Engine implements HostEngine {
|
|
|
765
808
|
parentNode(node: EngineNode): EngineNode | null;
|
|
766
809
|
nextSibling(node: EngineNode): EngineNode | null;
|
|
767
810
|
setProp(node: EngineNode, key: string, value: unknown): void;
|
|
811
|
+
/**
|
|
812
|
+
* Paint a node's background on one of its children instead of on the node: the node keeps its
|
|
813
|
+
* `background-color` and `background-image` in the cascade, where a stylesheet wrote them, and
|
|
814
|
+
* the child is the view that draws them. What a view that masks its children and not itself
|
|
815
|
+
* needs, as `<gradient-text>` is.
|
|
816
|
+
*/
|
|
817
|
+
paintOn(node: EngineNode, child: EngineNode): void;
|
|
818
|
+
/**
|
|
819
|
+
* Keep a prop the node already has as an attribute: on the node for a selector such as
|
|
820
|
+
* `:host([variant='primary'])` to match, and left out of what is committed to the native view.
|
|
821
|
+
* It is committed again once the prop is next written. What the platform adapter does with a
|
|
822
|
+
* static attribute that is an input of the host's component.
|
|
823
|
+
*/
|
|
824
|
+
keepAsAttribute(node: EngineNode, key: string): void;
|
|
768
825
|
/**
|
|
769
826
|
* Whether a node's inline style can change what it or anything below it resolves to: it sets,
|
|
770
827
|
* or until now set, a property its children inherit.
|
|
@@ -798,6 +855,14 @@ export declare class Engine implements HostEngine {
|
|
|
798
855
|
setText(node: EngineNode, value: string): void;
|
|
799
856
|
setEventListener(node: EngineNode, topLevelType: string, fn: (event: unknown) => void): () => void;
|
|
800
857
|
private markProps;
|
|
858
|
+
/** Start matching ancestors again on a change, once a sheet that uses `:has()` is in play. */
|
|
859
|
+
private watchHas;
|
|
860
|
+
/**
|
|
861
|
+
* Something at or beneath `from` changed: every node from there up may match a `:has()` rule
|
|
862
|
+
* it did not, or stop matching one. They are matched again rather than marked for restyling,
|
|
863
|
+
* which would restyle everything under them. Only sheets that use `:has()` pay.
|
|
864
|
+
*/
|
|
865
|
+
private markBeneath;
|
|
801
866
|
private markLaterSiblings;
|
|
802
867
|
/** `node`'s child list changed: `moved` came into it or went out of it. */
|
|
803
868
|
private markStructure;
|
|
@@ -877,6 +942,20 @@ export declare class Engine implements HostEngine {
|
|
|
877
942
|
* unrelated change.
|
|
878
943
|
*/
|
|
879
944
|
private mergeProps;
|
|
945
|
+
/**
|
|
946
|
+
* Leave a node's background out of what it commits when a child paints it, and give that child
|
|
947
|
+
* its parent's: the cascade's, and over it the parent's inline style.
|
|
948
|
+
*/
|
|
949
|
+
private movePaint;
|
|
950
|
+
/**
|
|
951
|
+
* A container whose direction or alignment changed since a child with a `fit-content` size
|
|
952
|
+
* read it, or whose height stopped or started being one a percentage is taken of since a child
|
|
953
|
+
* with a percentage height asked: those children are merged again. A change to a container
|
|
954
|
+
* marks nothing beneath it, since none of these is inherited.
|
|
955
|
+
*/
|
|
956
|
+
private refitChildren;
|
|
957
|
+
/** Have a container's children merged again, through any `display: contents` among them. */
|
|
958
|
+
private refit;
|
|
880
959
|
/**
|
|
881
960
|
* The text size cap that lays a paragraph or text input out again once a face it names has
|
|
882
961
|
* registered: a step per face above the app's own cap where it set one (below 1 is none, on
|
|
@@ -956,6 +1035,30 @@ export declare class Engine implements HostEngine {
|
|
|
956
1035
|
* asks for another by name, or its keyframes went, as a browser fires it.
|
|
957
1036
|
*/
|
|
958
1037
|
private cancelPlaying;
|
|
1038
|
+
/** Stop on native each animation whose view has left the tree. */
|
|
1039
|
+
private releasePlayedNatively;
|
|
1040
|
+
/** Every node whose animation native is playing, with no frame of it in JavaScript. */
|
|
1041
|
+
private readonly playedNatively;
|
|
1042
|
+
/**
|
|
1043
|
+
* Hand an animation that has just started to native, where native can play it: one that moves
|
|
1044
|
+
* only opacity and transforms, starts at once, and repeats a whole number of times. Native then
|
|
1045
|
+
* runs it frame by frame, and JavaScript hears of it again when it ends. Anything else is
|
|
1046
|
+
* played from here, a commit a frame. See `NativeScrollDriver.play`.
|
|
1047
|
+
*/
|
|
1048
|
+
private playNatively;
|
|
1049
|
+
/**
|
|
1050
|
+
* Native reached the end of an animation it was playing. The frame it ends at, or the resting
|
|
1051
|
+
* style where it does not fill, is committed before the view is let go, so nothing shows of
|
|
1052
|
+
* the frame it started at, which is what the view had been committed with.
|
|
1053
|
+
*/
|
|
1054
|
+
private endedNatively;
|
|
1055
|
+
/** Take an animation back from native, which stops it there. The caller plays it on, or not. */
|
|
1056
|
+
private stopNative;
|
|
1057
|
+
/**
|
|
1058
|
+
* Play on from JavaScript an animation native was playing, from where its clock has got to:
|
|
1059
|
+
* what a pause, other frames or a view made again need, none of which native can be told of.
|
|
1060
|
+
*/
|
|
1061
|
+
private backToScript;
|
|
959
1062
|
/** Start the clock on an animation, unless the node is already playing this one. */
|
|
960
1063
|
private startPlaying;
|
|
961
1064
|
/**
|
|
@@ -1047,7 +1150,8 @@ export declare class Engine implements HostEngine {
|
|
|
1047
1150
|
*
|
|
1048
1151
|
* A stop's colour is a colour like any other, but it is two levels down and nothing else looks
|
|
1049
1152
|
* there: without this the device is handed the string `rgb(255, 0, 0)` where it wants a number,
|
|
1050
|
-
* and paints nothing.
|
|
1153
|
+
* and paints nothing. The stops are first rewritten so native's interpolation paints what
|
|
1154
|
+
* CSS's premultiplied one does (see `premultipliedStops`).
|
|
1051
1155
|
*/
|
|
1052
1156
|
private processGradients;
|
|
1053
1157
|
private clearFlags;
|