@tachui/modifiers 0.8.20 → 0.8.22
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/appearance/background.d.ts +22 -0
- package/dist/appearance/background.d.ts.map +1 -1
- package/dist/appearance/blend-mode.d.ts +24 -0
- package/dist/appearance/blend-mode.d.ts.map +1 -0
- package/dist/appearance/compositing-group.d.ts +16 -0
- package/dist/appearance/compositing-group.d.ts.map +1 -0
- package/dist/appearance/index.d.ts +2 -0
- package/dist/appearance/index.d.ts.map +1 -1
- package/dist/appearance/index.js +38 -30
- package/dist/base.js +2 -2
- package/dist/basic/index.d.ts.map +1 -1
- package/dist/basic/index.js +256 -248
- package/dist/basic/margin.js +4 -4
- package/dist/basic/padding.js +1 -1
- package/dist/basic/size.js +6 -6
- package/dist/effects/backdrop/index.js +1 -1
- package/dist/index.js +275 -267
- package/dist/interaction/index.js +32 -32
- package/dist/layout/index.js +1 -1
- package/dist/{modifiers-basic-CsxLd0CR.js → modifiers-basic-Cs3mAr8i.js} +1118 -1009
- package/dist/preload/basic.js +256 -248
- package/dist/types.d.ts +5 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/typography/index.js +1 -1
- package/dist/typography/text.js +1 -1
- package/dist/utility/index.js +9 -9
- package/package.json +4 -4
|
@@ -5,10 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { BaseModifier } from '../basic/base';
|
|
7
7
|
import type { ModifierContext } from '@tachui/types/modifiers';
|
|
8
|
+
import type { BackgroundImageOptions } from '@tachui/types/modifiers';
|
|
9
|
+
export type { BackgroundImageOptions, BackgroundImageRepeat, BackgroundImageSize, } from '@tachui/types/modifiers';
|
|
8
10
|
import type { DOMNode } from '@tachui/types/runtime';
|
|
9
11
|
import type { StatefulBackgroundValue } from '@tachui/core/gradients/types';
|
|
12
|
+
import type { ImageAssetProxy } from '@tachui/types/assets';
|
|
10
13
|
export interface BackgroundOptions {
|
|
11
14
|
background: StatefulBackgroundValue;
|
|
15
|
+
cssProperty?: 'background' | 'backgroundColor';
|
|
12
16
|
}
|
|
13
17
|
export declare class BackgroundModifier extends BaseModifier<BackgroundOptions> {
|
|
14
18
|
readonly type = "background";
|
|
@@ -33,6 +37,17 @@ export interface BackgroundClipOptions {
|
|
|
33
37
|
color?: string;
|
|
34
38
|
webkitTextFillColor?: string;
|
|
35
39
|
}
|
|
40
|
+
export interface BackgroundImageModifierProps {
|
|
41
|
+
source: ImageAssetProxy | string;
|
|
42
|
+
options: Required<BackgroundImageOptions>;
|
|
43
|
+
}
|
|
44
|
+
export declare class BackgroundImageModifier extends BaseModifier<BackgroundImageModifierProps> {
|
|
45
|
+
readonly type = "backgroundImage";
|
|
46
|
+
readonly priority = 94;
|
|
47
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
48
|
+
private mapRepeatValue;
|
|
49
|
+
private applyImageAssetWithThemeReactivity;
|
|
50
|
+
}
|
|
36
51
|
export declare class BackgroundClipModifier extends BaseModifier<BackgroundClipOptions> {
|
|
37
52
|
readonly type = "backgroundClip";
|
|
38
53
|
readonly priority = 40;
|
|
@@ -41,6 +56,13 @@ export declare class BackgroundClipModifier extends BaseModifier<BackgroundClipO
|
|
|
41
56
|
}
|
|
42
57
|
export declare function backgroundColor(color: string | any): BackgroundModifier;
|
|
43
58
|
export declare function background(value: string | any): BackgroundModifier;
|
|
59
|
+
/**
|
|
60
|
+
* Apply CSS background-image styles.
|
|
61
|
+
*
|
|
62
|
+
* String sources must be valid CSS background-image values
|
|
63
|
+
* (for example: `url('/image.png')` or `linear-gradient(...)`).
|
|
64
|
+
*/
|
|
65
|
+
export declare function backgroundImage(source: ImageAssetProxy | string, options?: BackgroundImageOptions): BackgroundImageModifier;
|
|
44
66
|
export declare function backgroundClip(backgroundImage: string, clip?: 'text' | 'border-box' | 'padding-box' | 'content-box', color?: string): BackgroundClipModifier;
|
|
45
67
|
export declare function gradientText(gradient: string): BackgroundClipModifier;
|
|
46
68
|
export declare function blueGradientText(): BackgroundClipModifier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../src/appearance/background.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAO5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,KAAK,EACV,uBAAuB,EAExB,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../src/appearance/background.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAO5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EACV,sBAAsB,EAGvB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,KAAK,EACV,uBAAuB,EAExB,MAAM,8BAA8B,CAAA;AAErC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAM3D,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,uBAAuB,CAAA;IACnC,WAAW,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAA;CAC/C;AAED,qBAAa,kBAAmB,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IACrE,QAAQ,CAAC,IAAI,gBAAe;IAC5B,QAAQ,CAAC,QAAQ,MAAK;IAEtB,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;IA4CpE;;;OAGG;IACH,OAAO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,MAAM,GAAG,GAAG,GAAG,kBAAkB,CAKlE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,eAAe,GAAG,MAAM,EAChC,OAAO,GAAE,sBAA2B,GACnC,uBAAuB,CAQzB;AAED,wBAAgB,cAAc,CAC5B,eAAe,EAAE,MAAM,EACvB,IAAI,GAAE,MAAM,GAAG,YAAY,GAAG,aAAa,GAAG,aAAsB,EACpE,KAAK,GAAE,MAAsB,GAC5B,sBAAsB,CAMxB;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,sBAAsB,CAQrE;AAED,wBAAgB,gBAAgB,IAAI,sBAAsB,CAEzD;AAED,wBAAgB,mBAAmB,IAAI,sBAAsB,CAI5D;AAED,wBAAgB,kBAAkB,IAAI,sBAAsB,CAE3D;AAED,wBAAgB,iBAAiB,IAAI,sBAAsB,CAE1D;AAED,wBAAgB,gBAAgB,IAAI,sBAAsB,CAEzD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blend Mode Modifiers
|
|
3
|
+
*
|
|
4
|
+
* CSS compositing modifiers for element and background layer blending.
|
|
5
|
+
*/
|
|
6
|
+
import { BaseModifier } from '../basic/base';
|
|
7
|
+
import type { DOMNode } from '@tachui/types/runtime';
|
|
8
|
+
import type { ModifierContext, BlendMode } from '@tachui/types/modifiers';
|
|
9
|
+
export interface BlendModeModifierProps {
|
|
10
|
+
mode: BlendMode;
|
|
11
|
+
}
|
|
12
|
+
export declare class BlendModeModifier extends BaseModifier<BlendModeModifierProps> {
|
|
13
|
+
readonly type = "blendMode";
|
|
14
|
+
readonly priority = 92;
|
|
15
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
16
|
+
}
|
|
17
|
+
export declare class BackgroundBlendModeModifier extends BaseModifier<BlendModeModifierProps> {
|
|
18
|
+
readonly type = "backgroundBlendMode";
|
|
19
|
+
readonly priority = 93;
|
|
20
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare function blendMode(mode: BlendMode): BlendModeModifier;
|
|
23
|
+
export declare function backgroundBlendMode(mode: BlendMode): BackgroundBlendModeModifier;
|
|
24
|
+
//# sourceMappingURL=blend-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blend-mode.d.ts","sourceRoot":"","sources":["../../src/appearance/blend-mode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAEzE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,SAAS,CAAA;CAChB;AAED,qBAAa,iBAAkB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IACzE,QAAQ,CAAC,IAAI,eAAc;IAC3B,QAAQ,CAAC,QAAQ,MAAK;IAEtB,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;CAKrE;AAED,qBAAa,2BAA4B,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IACnF,QAAQ,CAAC,IAAI,yBAAwB;IACrC,QAAQ,CAAC,QAAQ,MAAK;IAEtB,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;CASrE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,iBAAiB,CAI5D;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,SAAS,GACd,2BAA2B,CAG7B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compositing Group Modifier
|
|
3
|
+
*
|
|
4
|
+
* Creates a local compositing context so descendant blend modes are isolated
|
|
5
|
+
* from content outside this element.
|
|
6
|
+
*/
|
|
7
|
+
import { BaseModifier } from '../basic/base';
|
|
8
|
+
import type { DOMNode } from '@tachui/types/runtime';
|
|
9
|
+
import type { ModifierContext } from '@tachui/types/modifiers';
|
|
10
|
+
export declare class CompositingGroupModifier extends BaseModifier<Record<string, never>> {
|
|
11
|
+
readonly type = "compositingGroup";
|
|
12
|
+
readonly priority = 91;
|
|
13
|
+
apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare function compositingGroup(): CompositingGroupModifier;
|
|
16
|
+
//# sourceMappingURL=compositing-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compositing-group.d.ts","sourceRoot":"","sources":["../../src/appearance/compositing-group.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAE9D,qBAAa,wBAAyB,SAAQ,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/E,QAAQ,CAAC,IAAI,sBAAqB;IAClC,QAAQ,CAAC,QAAQ,MAAK;IAEtB,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;CAKrE;AAED,wBAAgB,gBAAgB,IAAI,wBAAwB,CAE3D"}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Visual styling modifiers for colors, backgrounds, borders, and foreground
|
|
5
5
|
*/
|
|
6
6
|
export * from './background';
|
|
7
|
+
export * from './blend-mode';
|
|
8
|
+
export * from './compositing-group';
|
|
7
9
|
export * from './border';
|
|
8
10
|
export * from './foreground';
|
|
9
11
|
export * from './clip-shape';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appearance/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appearance/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AAGnC,cAAc,UAAU,CAAA;AAGxB,cAAc,cAAc,CAAA;AAG5B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
|
package/dist/appearance/index.js
CHANGED
|
@@ -1,33 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { am as o, aa as e, a9 as d, a8 as i, al as s, ar as n, aG as t, aI as g, ap as u, as as b, aD as l, ac as p, ao as c, ae as f, ab as M, ad as k, an as B, ag as C, at as x, aw as G, aA as T, ay as m, ax as h, av as I, au as R, az as w, aB as z, aH as F, aJ as H, aq as L, aC as S, aF as j, aE as q, ak as v, af as y, aj as A, ah as D, ai as E } from "../modifiers-basic-Cs3mAr8i.js";
|
|
2
2
|
export {
|
|
3
|
+
o as BackgroundBlendModeModifier,
|
|
3
4
|
e as BackgroundClipModifier,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
l as
|
|
13
|
-
p as
|
|
14
|
-
|
|
15
|
-
f as
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
C as
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
h as
|
|
25
|
-
|
|
26
|
-
R as
|
|
27
|
-
w as
|
|
28
|
-
z as
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
5
|
+
d as BackgroundImageModifier,
|
|
6
|
+
i as BackgroundModifier,
|
|
7
|
+
s as BlendModeModifier,
|
|
8
|
+
n as BorderModifier,
|
|
9
|
+
t as ClipShapeModifier,
|
|
10
|
+
g as ClippedModifier,
|
|
11
|
+
u as CompositingGroupModifier,
|
|
12
|
+
b as CornerRadiusModifier,
|
|
13
|
+
l as ForegroundModifier,
|
|
14
|
+
p as background,
|
|
15
|
+
c as backgroundBlendMode,
|
|
16
|
+
f as backgroundClip,
|
|
17
|
+
M as backgroundColor,
|
|
18
|
+
k as backgroundImage,
|
|
19
|
+
B as blendMode,
|
|
20
|
+
C as blueGradientText,
|
|
21
|
+
x as border,
|
|
22
|
+
G as borderBottom,
|
|
23
|
+
T as borderHorizontal,
|
|
24
|
+
m as borderLeading,
|
|
25
|
+
h as borderLeft,
|
|
26
|
+
I as borderRight,
|
|
27
|
+
R as borderTop,
|
|
28
|
+
w as borderTrailing,
|
|
29
|
+
z as borderVertical,
|
|
30
|
+
F as clipShape,
|
|
31
|
+
H as clipped,
|
|
32
|
+
L as compositingGroup,
|
|
33
|
+
S as cornerRadius,
|
|
34
|
+
j as foreground,
|
|
35
|
+
q as foregroundColor,
|
|
36
|
+
v as goldGradientText,
|
|
37
|
+
y as gradientText,
|
|
38
|
+
A as oceanGradientText,
|
|
39
|
+
D as rainbowGradientText,
|
|
40
|
+
E as sunsetGradientText
|
|
33
41
|
};
|
package/dist/base.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@tachui/core/reactive";
|
|
2
|
-
import {
|
|
2
|
+
import { dw as d, du as r, ds as f, dv as s, dt as t, dx as M } from "./modifiers-basic-Cs3mAr8i.js";
|
|
3
3
|
import "@tachui/core/constants/layout";
|
|
4
4
|
export {
|
|
5
5
|
d as AnimationModifier,
|
|
@@ -7,5 +7,5 @@ export {
|
|
|
7
7
|
f as BaseModifier,
|
|
8
8
|
s as InteractionModifier,
|
|
9
9
|
t as LayoutModifier,
|
|
10
|
-
|
|
10
|
+
M as LifecycleModifier
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/basic/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/basic/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAkNxD,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAmM/E,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAC5B,CAAA;AAED,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAetE;AAMD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAG9D,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAG7B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA"}
|