@ng-native/fabric 0.13.0 → 0.15.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/css.d.ts +63 -6
- package/dist/css.js +268 -59
- package/dist/css.js.map +1 -1
- package/dist/defer-triggers.js +2 -8
- package/dist/defer-triggers.js.map +1 -1
- package/dist/engine.d.ts +201 -21
- package/dist/engine.js +915 -125
- package/dist/engine.js.map +1 -1
- package/dist/fabric.d.ts +1 -1
- package/dist/fabric.js +25 -0
- package/dist/fabric.js.map +1 -1
- package/dist/font-faces.d.ts +19 -0
- package/dist/font-faces.js +42 -0
- package/dist/font-faces.js.map +1 -1
- package/dist/forms-inputs.d.ts +1 -1
- package/dist/forms-inputs.js +2 -2
- package/dist/forms-inputs.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/inline-derived-token.js +56 -7
- package/dist/inline-derived-token.js.map +1 -1
- package/dist/inline-token.d.ts +4 -3
- package/dist/inline-token.js +41 -8
- package/dist/inline-token.js.map +1 -1
- package/dist/native-drive.d.ts +42 -1
- package/dist/native-drive.js +135 -9
- package/dist/native-drive.js.map +1 -1
- package/dist/node-global.d.ts +9 -0
- package/dist/node-global.js +41 -0
- package/dist/node-global.js.map +1 -0
- package/dist/relative-colour.d.ts +2 -2
- package/dist/relative-colour.js +4 -0
- package/dist/relative-colour.js.map +1 -1
- package/dist/scroll-animation.d.ts +12 -0
- package/dist/scroll-animation.js +10 -0
- package/dist/scroll-animation.js.map +1 -1
- package/dist/transition.d.ts +3 -2
- package/dist/transition.js +17 -8
- package/dist/transition.js.map +1 -1
- package/package.json +1 -1
package/dist/css.d.ts
CHANGED
|
@@ -487,6 +487,11 @@ export interface StyleSheet {
|
|
|
487
487
|
/** The weights a variable font covers, `font-weight: 100 900`, in place of one `weight`. */
|
|
488
488
|
readonly weightRange?: readonly [number, number];
|
|
489
489
|
readonly style?: string;
|
|
490
|
+
/**
|
|
491
|
+
* The name inside the face's file, which the build reads where it can. SwiftUI finds a face by
|
|
492
|
+
* this name only, and not by the name it is registered under.
|
|
493
|
+
*/
|
|
494
|
+
readonly postScriptName?: string;
|
|
490
495
|
}[];
|
|
491
496
|
}
|
|
492
497
|
export interface StyleCache {
|
|
@@ -549,7 +554,7 @@ export interface StyleCache {
|
|
|
549
554
|
export declare function fills(child: StyleTarget): boolean;
|
|
550
555
|
/** What the matcher needs of a node. The engine's node satisfies this structurally. */
|
|
551
556
|
export interface StyleTarget {
|
|
552
|
-
readonly
|
|
557
|
+
readonly tag: string;
|
|
553
558
|
readonly parent: StyleTarget | null;
|
|
554
559
|
/**
|
|
555
560
|
* Needed only by the selectors that ask about a node's place among its siblings, which is why
|
|
@@ -662,6 +667,8 @@ export declare const styleStats: {
|
|
|
662
667
|
nodesResolved: number;
|
|
663
668
|
/** Rules filed by key selector: each sheet's once, however many sheets come after it. */
|
|
664
669
|
rulesFiled: number;
|
|
670
|
+
/** Nodes asked whether a rule `:has()` was asked for could be for them: see `isFor`. */
|
|
671
|
+
subjectTests: number;
|
|
665
672
|
};
|
|
666
673
|
export declare function resetStyleStats(): void;
|
|
667
674
|
/**
|
|
@@ -716,6 +723,11 @@ export interface PlaceReader {
|
|
|
716
723
|
* from (`.a:first-child + .b`), is that element's own: the rules it matches say.
|
|
717
724
|
*/
|
|
718
725
|
export declare function placeReadElsewhere(sheet: StyleSheet): readonly PlaceReader[];
|
|
726
|
+
/**
|
|
727
|
+
* The props a sheet's rules ask of an element before another in a child list, `[data-on] ~ .x`:
|
|
728
|
+
* those whose change can restyle the elements after it. An id is asked as `nativeID`.
|
|
729
|
+
*/
|
|
730
|
+
export declare function namedBeside(sheet: StyleSheet): ReadonlySet<string>;
|
|
719
731
|
/** One rule in a cascade: the sheet it came from, which `:host` needs, and its weight here. */
|
|
720
732
|
interface RuleEntry {
|
|
721
733
|
readonly rule: StyleRule;
|
|
@@ -784,6 +796,16 @@ export interface Subjects {
|
|
|
784
796
|
* matched again itself. Unset where the rules are only for elements under it.
|
|
785
797
|
*/
|
|
786
798
|
own?: boolean;
|
|
799
|
+
/**
|
|
800
|
+
* In what a class reaches: a rule names it in `:has()`, `.field:has(.on)`, which the boxes
|
|
801
|
+
* above the element that has it are then asked again.
|
|
802
|
+
*/
|
|
803
|
+
beneath?: boolean;
|
|
804
|
+
/**
|
|
805
|
+
* In what a class reaches: a rule names it in `:has(> )` alone, `.field:has(> .on)`, which only
|
|
806
|
+
* the box right above the element that has it is then asked again.
|
|
807
|
+
*/
|
|
808
|
+
parentHas?: boolean;
|
|
787
809
|
}
|
|
788
810
|
/**
|
|
789
811
|
* A box a rule asks `:has()` of that is not the node it styles, `.card:has(.x) .title`, by the
|
|
@@ -796,6 +818,8 @@ export interface HasAbove {
|
|
|
796
818
|
}
|
|
797
819
|
/** Each box a sheet's rules ask `:has()` of above the node they style. */
|
|
798
820
|
export declare function hasAbove(sheet: StyleSheet): readonly HasAbove[];
|
|
821
|
+
/** What all of `each` are for, as one. */
|
|
822
|
+
export declare function joinSubjects(each: readonly Subjects[]): Subjects;
|
|
799
823
|
/** Whether an inline style sets a property children inherit. Allocates nothing: it runs per set. */
|
|
800
824
|
export declare function setsInherited(style: unknown): boolean;
|
|
801
825
|
/**
|
|
@@ -923,8 +947,11 @@ export declare class StyleResolver {
|
|
|
923
947
|
*/
|
|
924
948
|
private readonly deepSheets;
|
|
925
949
|
private readonly deepIndexes;
|
|
926
|
-
/**
|
|
927
|
-
|
|
950
|
+
/**
|
|
951
|
+
* Read the classes a sheet names, once, as soon as any node is given it. One `scoped` to a
|
|
952
|
+
* component or a host asks of its elements for good, global or not.
|
|
953
|
+
*/
|
|
954
|
+
noteSheet(sheet: StyleSheet | null | undefined, scoped?: boolean): void;
|
|
928
955
|
/** The props a selector of some sheet asks about: an id, and each attribute by its name. */
|
|
929
956
|
private readonly named;
|
|
930
957
|
/**
|
|
@@ -932,6 +959,18 @@ export declare class StyleResolver {
|
|
|
932
959
|
* sheet that was ever loaded names it. A sheet loaded later has every element matched again.
|
|
933
960
|
*/
|
|
934
961
|
reads(prop: string): boolean;
|
|
962
|
+
/**
|
|
963
|
+
* By prop, how many sheets in play ask it of an element before another: see `namedBeside`. A
|
|
964
|
+
* global sheet taken away, or replaced, asks no more.
|
|
965
|
+
*/
|
|
966
|
+
private readonly besideNamed;
|
|
967
|
+
private readonly besideNoted;
|
|
968
|
+
/** The sheets a component or a host was given: see `noteSheet`. */
|
|
969
|
+
private readonly scoped;
|
|
970
|
+
private noteBeside;
|
|
971
|
+
private forgetBeside;
|
|
972
|
+
/** Whether a prop changing can change what the elements after its element match. */
|
|
973
|
+
readsBeside(prop: string): boolean;
|
|
935
974
|
private noteReach;
|
|
936
975
|
/** Whether a class's reach names any element under the one that has it. */
|
|
937
976
|
reachesUnder(subjects: Subjects): boolean;
|
|
@@ -942,6 +981,8 @@ export declare class StyleResolver {
|
|
|
942
981
|
* of them and nothing is styled again.
|
|
943
982
|
*/
|
|
944
983
|
reachOf(classes: Iterable<string>): true | Subjects | null;
|
|
984
|
+
/** How far a class reaches by its name, and by each test of the class attribute it answers. */
|
|
985
|
+
private reachesOf;
|
|
945
986
|
/** Whether one of the rules `subjects` stands for could be for a node. */
|
|
946
987
|
isFor(subjects: Subjects, node: StyleTarget): boolean;
|
|
947
988
|
/**
|
|
@@ -967,6 +1008,9 @@ export declare class StyleResolver {
|
|
|
967
1008
|
* change it was marked on the element, its parent's `scope` is the one it was styled under,
|
|
968
1009
|
* and no sheet that could match it has come since. It is being styled again all the same, for
|
|
969
1010
|
* a change of its own that alters nothing under it, or for what it inherits.
|
|
1011
|
+
*
|
|
1012
|
+
* A change beneath it is not one: what it answers `:has()` is asked again, and the elements a
|
|
1013
|
+
* rule asking that of it is for are marked on their own (`markUnderHas`), not all under it.
|
|
970
1014
|
*/
|
|
971
1015
|
private matchesStand;
|
|
972
1016
|
/**
|
|
@@ -1174,11 +1218,24 @@ export declare class StyleResolver {
|
|
|
1174
1218
|
* the compiler writes for the same value in a rule. `token` is the value as a token, which is an
|
|
1175
1219
|
* alias when it is a `var()`; null for any other.
|
|
1176
1220
|
*
|
|
1177
|
-
*
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1221
|
+
* A colour made of tokens, `color-mix(in srgb, var(--brand), white 20%)`, is worked out from the
|
|
1222
|
+
* tokens where it is used, as a fallback of the same shape is.
|
|
1223
|
+
*
|
|
1224
|
+
* ponytail: any other value has to be the whole `var()`. One inside a longer value, `calc()`
|
|
1225
|
+
* included, is what the compiler parses at build time and nothing here does; write the sum in a
|
|
1226
|
+
* custom property, `[style.--gap]`, and read that in the stylesheet.
|
|
1180
1227
|
*/
|
|
1181
1228
|
export declare function boundDeclaration(prop: string, token: TokenValue | undefined, on?: string): DeferredDeclaration | null;
|
|
1229
|
+
/** Whether `text` is a `line-height` below zero, which a browser drops: `-1.5`, `-1em`, `-2px`. */
|
|
1230
|
+
export declare const isNegativeLineHeight: (prop: string, text: string) => boolean;
|
|
1231
|
+
/**
|
|
1232
|
+
* A bound declaration of a length in `em` or a viewport unit, `[style.width]="'2em'"`, as the
|
|
1233
|
+
* deferred declaration the compiler writes for the same value in a rule: measured where it is
|
|
1234
|
+
* used, against the font size in scope. A viewport unit is measured against the viewport, and
|
|
1235
|
+
* again when it changes. A `line-height` with no unit is the number a rule hands down. Null for
|
|
1236
|
+
* any other value, and for a property that takes no length.
|
|
1237
|
+
*/
|
|
1238
|
+
export declare function boundRelativeLength(prop: string, text: string, on?: string): DeferredDeclaration | null;
|
|
1182
1239
|
/** `hsl()` reads a channels token as hue, saturation and lightness; `rgb()` as sRGB. */
|
|
1183
1240
|
type ChannelSpace = 'rgb' | 'hsl';
|
|
1184
1241
|
/**
|