@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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A `background` a token holds as text, where it is no single colour: the gradients a library
|
|
3
|
+
* works out as the app runs and sets as a custom property, a colour slider's track or a colour
|
|
4
|
+
* area's two fades over a colour. A stylesheet's gradient is compiled when the app is built; one
|
|
5
|
+
* set on an element is read here, into what a view's `experimental_backgroundImage` takes.
|
|
6
|
+
*
|
|
7
|
+
* ponytail: `linear-gradient()` with a side or an angle and colour stops at percentages, which
|
|
8
|
+
* is what such a library writes. A corner, a length or two positions on a stop, `radial-` and
|
|
9
|
+
* `repeating-` are not read, and the whole background is then nothing, as an invalid one is.
|
|
10
|
+
* Native has no conic gradient at all.
|
|
11
|
+
*/
|
|
12
|
+
export interface BackgroundLayers {
|
|
13
|
+
readonly images: readonly object[];
|
|
14
|
+
/** The colour under the images: the last layer, where it is one. */
|
|
15
|
+
readonly color?: string;
|
|
16
|
+
}
|
|
17
|
+
/** The layers a background's text holds, or nothing where any of it is not read. */
|
|
18
|
+
export declare function backgroundLayers(text: string): BackgroundLayers | undefined;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { parseColor } from "./transition.js";
|
|
2
|
+
const SIDES = {
|
|
3
|
+
'to top': 0,
|
|
4
|
+
'to right': 90,
|
|
5
|
+
'to bottom': 180,
|
|
6
|
+
'to left': 270,
|
|
7
|
+
};
|
|
8
|
+
/** Split at the commas that are not inside brackets. */
|
|
9
|
+
function split(text) {
|
|
10
|
+
const parts = [];
|
|
11
|
+
let depth = 0;
|
|
12
|
+
let from = 0;
|
|
13
|
+
for (let at = 0; at < text.length; at++) {
|
|
14
|
+
const char = text[at];
|
|
15
|
+
if (char === '(')
|
|
16
|
+
depth++;
|
|
17
|
+
else if (char === ')')
|
|
18
|
+
depth--;
|
|
19
|
+
else if (char === ',' && depth === 0) {
|
|
20
|
+
parts.push(text.slice(from, at).trim());
|
|
21
|
+
from = at + 1;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
parts.push(text.slice(from).trim());
|
|
25
|
+
return parts;
|
|
26
|
+
}
|
|
27
|
+
const rgba = (text) => {
|
|
28
|
+
const parsed = parseColor(text);
|
|
29
|
+
return parsed ? `rgba(${parsed[0]}, ${parsed[1]}, ${parsed[2]}, ${parsed[3]})` : undefined;
|
|
30
|
+
};
|
|
31
|
+
/** A direction in degrees, or nothing for a first argument that is a colour stop. */
|
|
32
|
+
function direction(first) {
|
|
33
|
+
const side = SIDES[first.toLowerCase()];
|
|
34
|
+
if (side !== undefined)
|
|
35
|
+
return side;
|
|
36
|
+
const angle = /^(-?[\d.]+)deg$/i.exec(first);
|
|
37
|
+
return angle ? Number(angle[1]) : undefined;
|
|
38
|
+
}
|
|
39
|
+
/** `rgba(…) 40%` as a stop, or nothing for one this does not read. */
|
|
40
|
+
function stop(text) {
|
|
41
|
+
const placed = /^(.*\S)\s+(-?[\d.]+%)$/.exec(text);
|
|
42
|
+
const color = rgba(placed ? placed[1] : text);
|
|
43
|
+
return color === undefined ? undefined : { color, position: placed ? placed[2] : null };
|
|
44
|
+
}
|
|
45
|
+
function linear(layer) {
|
|
46
|
+
const inside = /^linear-gradient\((.*)\)$/is.exec(layer)?.[1];
|
|
47
|
+
if (inside === undefined)
|
|
48
|
+
return undefined;
|
|
49
|
+
const parts = split(inside);
|
|
50
|
+
const angle = direction(parts[0]);
|
|
51
|
+
const stops = (angle === undefined ? parts : parts.slice(1)).map(stop);
|
|
52
|
+
if (stops.length < 2 || stops.some((each) => each === undefined))
|
|
53
|
+
return undefined;
|
|
54
|
+
return {
|
|
55
|
+
type: 'linear-gradient',
|
|
56
|
+
direction: { type: 'angle', value: angle ?? 180 },
|
|
57
|
+
colorStops: stops,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/** The layers a background's text holds, or nothing where any of it is not read. */
|
|
61
|
+
export function backgroundLayers(text) {
|
|
62
|
+
const layers = split(text.trim());
|
|
63
|
+
const last = layers.at(-1);
|
|
64
|
+
const color = parseColor(last) ? last : undefined;
|
|
65
|
+
const images = (color === undefined ? layers : layers.slice(0, -1)).map(linear);
|
|
66
|
+
if (!images.length || images.some((each) => each === undefined))
|
|
67
|
+
return undefined;
|
|
68
|
+
return { images: images, color };
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=background-layers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background-layers.js","sourceRoot":"","sources":["../src/background-layers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAmB7C,MAAM,KAAK,GAAqC;IAC9C,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,GAAG;IAChB,SAAS,EAAE,GAAG;CACf,CAAC;AAEF,wDAAwD;AACxD,SAAS,KAAK,CAAC,IAAY;IACzB,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,I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AAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI,GAAG,EAAE;QACjD,UAAU,EAAE,KAAK;KAClB,CAAC;AACJ,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAClC,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC;IAC5B,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAClD,MAAM,MAAM,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChF,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IAClF,OAAO,EAAE,MAAM,EAAE,MAAkB,EAAE,KAAK,EAAE,CAAC;AAC/C,CAAC","sourcesContent":["import { parseColor } from './transition.ts';\n\n/**\n * A `background` a token holds as text, where it is no single colour: the gradients a library\n * works out as the app runs and sets as a custom property, a colour slider's track or a colour\n * area's two fades over a colour. A stylesheet's gradient is compiled when the app is built; one\n * set on an element is read here, into what a view's `experimental_backgroundImage` takes.\n *\n * ponytail: `linear-gradient()` with a side or an angle and colour stops at percentages, which\n * is what such a library writes. A corner, a length or two positions on a stop, `radial-` and\n * `repeating-` are not read, and the whole background is then nothing, as an invalid one is.\n * Native has no conic gradient at all.\n */\nexport interface BackgroundLayers {\n readonly images: readonly object[];\n /** The colour under the images: the last layer, where it is one. */\n readonly color?: string;\n}\n\nconst SIDES: Readonly<Record<string, number>> = {\n 'to top': 0,\n 'to right': 90,\n 'to bottom': 180,\n 'to left': 270,\n};\n\n/** Split at the commas that are not inside brackets. */\nfunction split(text: string): string[] {\n const parts: string[] = [];\n let depth = 0;\n let from = 0;\n for (let at = 0; at < text.length; at++) {\n const char = text[at];\n if (char === '(') depth++;\n else if (char === ')') depth--;\n else if (char === ',' && depth === 0) {\n parts.push(text.slice(from, at).trim());\n from = at + 1;\n }\n }\n parts.push(text.slice(from).trim());\n return parts;\n}\n\nconst rgba = (text: string): string | undefined => {\n const parsed = parseColor(text);\n return parsed ? `rgba(${parsed[0]}, ${parsed[1]}, ${parsed[2]}, ${parsed[3]})` : undefined;\n};\n\n/** A direction in degrees, or nothing for a first argument that is a colour stop. */\nfunction direction(first: string): number | undefined {\n const side = SIDES[first.toLowerCase()];\n if (side !== undefined) return side;\n const angle = /^(-?[\\d.]+)deg$/i.exec(first);\n return angle ? Number(angle[1]) : undefined;\n}\n\n/** `rgba(…) 40%` as a stop, or nothing for one this does not read. */\nfunction stop(text: string): { color: string; position: string | null } | undefined {\n const placed = /^(.*\\S)\\s+(-?[\\d.]+%)$/.exec(text);\n const color = rgba(placed ? placed[1]! : text);\n return color === undefined ? undefined : { color, position: placed ? placed[2]! : null };\n}\n\nfunction linear(layer: string): object | undefined {\n const inside = /^linear-gradient\\((.*)\\)$/is.exec(layer)?.[1];\n if (inside === undefined) return undefined;\n const parts = split(inside);\n const angle = direction(parts[0]!);\n const stops = (angle === undefined ? parts : parts.slice(1)).map(stop);\n if (stops.length < 2 || stops.some((each) => each === undefined)) return undefined;\n return {\n type: 'linear-gradient',\n direction: { type: 'angle', value: angle ?? 180 },\n colorStops: stops,\n };\n}\n\n/** The layers a background's text holds, or nothing where any of it is not read. */\nexport function backgroundLayers(text: string): BackgroundLayers | undefined {\n const layers = split(text.trim());\n const last = layers.at(-1)!;\n const color = parseColor(last) ? last : undefined;\n const images = (color === undefined ? layers : layers.slice(0, -1)).map(linear);\n if (!images.length || images.some((each) => each === undefined)) return undefined;\n return { images: images as object[], color };\n}\n"]}
|
package/dist/css.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface Compound {
|
|
|
30
30
|
readonly not?: readonly Compound[];
|
|
31
31
|
/** `:host`: the node must be the host of the component whose sheet is being evaluated. */
|
|
32
32
|
readonly host?: true;
|
|
33
|
-
/** `:host-context()
|
|
33
|
+
/** `:host-context()`, once for each written: the host, or one of its ancestors, must match it. */
|
|
34
34
|
readonly hostContext?: readonly Compound[];
|
|
35
35
|
/**
|
|
36
36
|
* `:is(<compound> *)`: every one of these must match some ancestor, the node itself excluded.
|
|
@@ -222,6 +222,11 @@ export interface DeferredDeclaration {
|
|
|
222
222
|
* unambiguous given a single-valued token, so `padding: var(--gap)` writes all four.
|
|
223
223
|
*/
|
|
224
224
|
readonly props: readonly string[];
|
|
225
|
+
/**
|
|
226
|
+
* `background: var()`: the token may hold gradients over a colour, so `props` names the image
|
|
227
|
+
* beside the colour and each is written from its own part of the token. See `layersOf`.
|
|
228
|
+
*/
|
|
229
|
+
readonly layers?: true;
|
|
225
230
|
/**
|
|
226
231
|
* `inherit`, written for these props: each is the parent's value for it, or nothing where the
|
|
227
232
|
* parent has none.
|
|
@@ -480,6 +485,18 @@ export interface StyleCache {
|
|
|
480
485
|
context: object;
|
|
481
486
|
/** The parent's `context` this was computed from. */
|
|
482
487
|
parentContext: object;
|
|
488
|
+
/**
|
|
489
|
+
* Identity token standing for what an element under this node could match differently: minted
|
|
490
|
+
* when the node is styled for a change that can alter that, and kept when it is styled again
|
|
491
|
+
* for one that cannot, a custom property of its own or an inherited value from above. An
|
|
492
|
+
* element whose parent's is the one it was last styled under matches the rules it did, so it
|
|
493
|
+
* is styled from those it kept and they are not found again.
|
|
494
|
+
*/
|
|
495
|
+
scope: object;
|
|
496
|
+
/** The parent's `scope` this was computed from. */
|
|
497
|
+
parentScope: object;
|
|
498
|
+
/** The rules the node matched, for a styling that finds its parent's `scope` as it was. */
|
|
499
|
+
rules?: readonly StyleRule[];
|
|
483
500
|
/** The conditions version this was resolved under. */
|
|
484
501
|
generation: number;
|
|
485
502
|
style: Record<string, unknown>;
|
|
@@ -565,6 +582,12 @@ export interface StyleTarget {
|
|
|
565
582
|
styleCache: StyleCache | null;
|
|
566
583
|
/** Set when something that could change what this node matches has changed. */
|
|
567
584
|
styleDirty: boolean;
|
|
585
|
+
/**
|
|
586
|
+
* Set when what this node matches, or a custom property it holds, may have changed, and nothing
|
|
587
|
+
* that an element under it is matched by: the node is matched and styled again, and those under
|
|
588
|
+
* it are styled from the rules they matched. Absent on a hand-built target.
|
|
589
|
+
*/
|
|
590
|
+
ownDirty?: boolean;
|
|
568
591
|
/**
|
|
569
592
|
* Set when something beneath this node changed and a sheet uses `:has()`: the node is matched
|
|
570
593
|
* again, and restyled only if the rules it matches came out different. Absent on a hand-built
|
|
@@ -698,6 +721,10 @@ interface IndexedEntry {
|
|
|
698
721
|
export interface RuleIndex {
|
|
699
722
|
readonly buckets: Map<string, IndexedEntry[]>;
|
|
700
723
|
readonly universal: IndexedEntry[];
|
|
724
|
+
/** Whether any rule is filed under an attribute, which a node's props are then looked up for. */
|
|
725
|
+
attributes?: boolean;
|
|
726
|
+
/** Whether any is filed under the class of an element its own is inside. */
|
|
727
|
+
under?: boolean;
|
|
701
728
|
}
|
|
702
729
|
/**
|
|
703
730
|
* File rules by key selector, each at `from` and on: its place among every rule there is, which
|
|
@@ -724,6 +751,11 @@ export interface Subjects {
|
|
|
724
751
|
readonly inside: Set<string>;
|
|
725
752
|
/** A rule for anything anywhere: no class, no name, and no such box to be in. */
|
|
726
753
|
any: boolean;
|
|
754
|
+
/**
|
|
755
|
+
* In what a class reaches: a rule is for the element that has the class, `.on`, which is then
|
|
756
|
+
* matched again itself. Unset where the rules are only for elements under it.
|
|
757
|
+
*/
|
|
758
|
+
own?: boolean;
|
|
727
759
|
}
|
|
728
760
|
/** Whether an inline style sets a property children inherit. Allocates nothing: it runs per set. */
|
|
729
761
|
export declare function setsInherited(style: unknown): boolean;
|
|
@@ -848,11 +880,21 @@ export declare class StyleResolver {
|
|
|
848
880
|
private readonly noted;
|
|
849
881
|
/** Read the classes a sheet names, once, as soon as any node is given it. */
|
|
850
882
|
noteSheet(sheet: StyleSheet | null | undefined): void;
|
|
883
|
+
/** The props a selector of some sheet asks about: an id, and each attribute by its name. */
|
|
884
|
+
private readonly named;
|
|
885
|
+
/**
|
|
886
|
+
* Whether a prop changing can change what any element matches: only where a selector of a
|
|
887
|
+
* sheet that was ever loaded names it. A sheet loaded later has every element matched again.
|
|
888
|
+
*/
|
|
889
|
+
reads(prop: string): boolean;
|
|
851
890
|
private noteReach;
|
|
891
|
+
/** Whether a class's reach names any element under the one that has it. */
|
|
892
|
+
reachesUnder(subjects: Subjects): boolean;
|
|
852
893
|
/**
|
|
853
894
|
* What classes coming to an element or going from it can restyle: `true` for it and all
|
|
854
|
-
* under it and after it, as any change to it does; the
|
|
855
|
-
* rules are for; or null, where no rule names any
|
|
895
|
+
* under it and after it, as any change to it does; the element itself, where `own`, and the
|
|
896
|
+
* elements under it to match again, by what rules are for; or null, where no rule names any
|
|
897
|
+
* of them and nothing is styled again.
|
|
856
898
|
*/
|
|
857
899
|
reachOf(classes: Iterable<string>): true | Subjects | null;
|
|
858
900
|
/** Whether one of the rules `subjects` stands for could be for a node. */
|
|
@@ -873,6 +915,15 @@ export declare class StyleResolver {
|
|
|
873
915
|
* resolves at most once however many descendants ask for its inherited values.
|
|
874
916
|
*/
|
|
875
917
|
resolve(node: StyleTarget, epoch: number): StyleCache;
|
|
918
|
+
/** A node styled now, from the rules found for it or from those it kept: see `matchesStand`. */
|
|
919
|
+
private styledAgain;
|
|
920
|
+
/**
|
|
921
|
+
* Whether what an element could match is as it was when it was last styled: nothing that can
|
|
922
|
+
* change it was marked on the element, its parent's `scope` is the one it was styled under,
|
|
923
|
+
* and no sheet that could match it has come since. It is being styled again all the same, for
|
|
924
|
+
* a change of its own that alters nothing under it, or for what it inherits.
|
|
925
|
+
*/
|
|
926
|
+
private matchesStand;
|
|
876
927
|
/**
|
|
877
928
|
* A cache of a node just styled, with a context of its own. It keeps the rules the node
|
|
878
929
|
* matched, for the node to be compared with, once a sheet has a use for them: see `tracksHas`.
|
|
@@ -909,6 +960,12 @@ export declare class StyleResolver {
|
|
|
909
960
|
* without resolving it. What lets a commit step over a clean child in one comparison.
|
|
910
961
|
*/
|
|
911
962
|
holds(node: StyleTarget, parentContext: object): boolean;
|
|
963
|
+
/**
|
|
964
|
+
* Whether a node was last styled under a box holding the one cache shared by every box with
|
|
965
|
+
* nothing to style. Such boxes hand the same `context` down, so the node cannot tell one from
|
|
966
|
+
* another by it: moved under another box, it has to be told.
|
|
967
|
+
*/
|
|
968
|
+
styledUnderShared(node: StyleTarget): boolean;
|
|
912
969
|
/**
|
|
913
970
|
* Whether a previous result still stands: nothing about the node changed, nothing above it
|
|
914
971
|
* moved, and the conditions have not.
|
|
@@ -929,6 +986,8 @@ export declare class StyleResolver {
|
|
|
929
986
|
* token the device had seeded.
|
|
930
987
|
*/
|
|
931
988
|
private unstyled;
|
|
989
|
+
/** The one cache of every node with nothing to style and nothing to hand down, given to one more. */
|
|
990
|
+
private sharedEmpty;
|
|
932
991
|
/**
|
|
933
992
|
* The rules worth trying against a node, in cascade order.
|
|
934
993
|
*
|
|
@@ -1014,6 +1073,11 @@ export declare class StyleResolver {
|
|
|
1014
1073
|
* A declaration with no token and no usable fallback is dropped rather than written as
|
|
1015
1074
|
* undefined, which is what a browser does with a value it cannot resolve.
|
|
1016
1075
|
*/
|
|
1076
|
+
/**
|
|
1077
|
+
* What declarations that wait for a node's tokens come to on it, where no rule of the node's
|
|
1078
|
+
* carries them: a keyframe's, which is settled against the element that plays it.
|
|
1079
|
+
*/
|
|
1080
|
+
settleFor(node: StyleTarget, deferred: readonly DeferredDeclaration[], epoch: number): Record<string, unknown>;
|
|
1017
1081
|
private applyDeferred;
|
|
1018
1082
|
/** Note what the node being resolved takes an `inherit` from, and that its parent has an heir. */
|
|
1019
1083
|
private heir;
|