juxscript 1.1.130 → 1.1.133
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/dom-structure-map.json +1 -1
- package/index.d.ts +1 -2
- package/index.d.ts.map +1 -1
- package/index.js +8 -9
- package/lib/components/base/Animations.d.ts +36 -0
- package/lib/components/base/Animations.d.ts.map +1 -0
- package/lib/components/base/Animations.js +70 -0
- package/lib/components/base/Animations.ts +112 -0
- package/lib/components/base/BaseComponent.d.ts +3 -0
- package/lib/components/base/BaseComponent.d.ts.map +1 -1
- package/lib/components/base/BaseComponent.js +4 -8
- package/lib/components/base/BaseComponent.ts +6 -10
- package/lib/components/stack/BaseStack.d.ts +40 -56
- package/lib/components/stack/BaseStack.d.ts.map +1 -1
- package/lib/components/stack/BaseStack.js +101 -173
- package/lib/components/stack/BaseStack.ts +114 -229
- package/lib/components/stack/HStack.d.ts +14 -4
- package/lib/components/stack/HStack.d.ts.map +1 -1
- package/lib/components/stack/HStack.js +16 -15
- package/lib/components/stack/HStack.ts +17 -19
- package/lib/components/stack/VStack.d.ts +15 -7
- package/lib/components/stack/VStack.d.ts.map +1 -1
- package/lib/components/stack/VStack.js +17 -17
- package/lib/components/stack/VStack.ts +18 -22
- package/lib/components/stack/ZStack.d.ts +14 -4
- package/lib/components/stack/ZStack.d.ts.map +1 -1
- package/lib/components/stack/ZStack.js +16 -15
- package/lib/components/stack/ZStack.ts +17 -19
- package/lib/styles/shadcn.css +1106 -0
- package/machinery/compiler3.js +2 -2
- package/package.json +1 -1
- package/lib/components/base/LayoutExtensions.d.ts +0 -112
- package/lib/components/base/LayoutExtensions.d.ts.map +0 -1
- package/lib/components/base/LayoutExtensions.js +0 -187
- package/lib/components/base/LayoutExtensions.ts +0 -345
package/dom-structure-map.json
CHANGED
package/index.d.ts
CHANGED
|
@@ -53,8 +53,7 @@ import { HStack, hstack } from './lib/components/stack/HStack.js';
|
|
|
53
53
|
import { ZStack, zstack } from './lib/components/stack/ZStack.js';
|
|
54
54
|
export { Link, link, navLink, externalLink } from './lib/components/link.js';
|
|
55
55
|
export type { LinkOptions } from './lib/components/link.js';
|
|
56
|
-
export {
|
|
57
|
-
export type { LayerOptions, LayerPreset } from './lib/components/layer.js';
|
|
56
|
+
export { layer, overlay } from './lib/components/layer.js';
|
|
58
57
|
/**
|
|
59
58
|
* JUX Namespace - Main API
|
|
60
59
|
*/
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC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E,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AAGzC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7E,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAG3D;;GAEG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Df,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC"}
|
package/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import { menu } from './lib/components/menu.js';
|
|
|
29
29
|
import { modal } from './lib/components/modal.js';
|
|
30
30
|
import { nav } from './lib/components/nav.js';
|
|
31
31
|
import { paragraph } from './lib/components/paragraph.js';
|
|
32
|
-
import { pen } from './lib/components/pen.js';
|
|
32
|
+
import { pen } from './lib/components/pen.js';
|
|
33
33
|
import { progress } from './lib/components/progress.js';
|
|
34
34
|
import { radio } from './lib/components/radio.js';
|
|
35
35
|
import { req } from './lib/components/req.js';
|
|
@@ -46,18 +46,18 @@ import { write } from './lib/components/write.js';
|
|
|
46
46
|
import { fetchAPI } from './lib/utils/fetch.js';
|
|
47
47
|
import { renderIcon, renderEmoji } from './lib/components/icons.js';
|
|
48
48
|
import { state } from './lib/reactivity/state.js';
|
|
49
|
-
import { registry } from './lib/components/registry.js';
|
|
50
|
-
import { stateHistory } from './lib/components/history/StateHistory.js';
|
|
49
|
+
import { registry } from './lib/components/registry.js';
|
|
50
|
+
import { stateHistory } from './lib/components/history/StateHistory.js';
|
|
51
51
|
import { watcher } from './lib/components/watcher.js';
|
|
52
|
-
export { state, registry, stateHistory };
|
|
53
|
-
//
|
|
52
|
+
export { state, registry, stateHistory };
|
|
53
|
+
// Import Stack components (already added earlier)
|
|
54
54
|
import { VStack, vstack } from './lib/components/stack/VStack.js';
|
|
55
55
|
import { HStack, hstack } from './lib/components/stack/HStack.js';
|
|
56
56
|
import { ZStack, zstack } from './lib/components/stack/ZStack.js';
|
|
57
|
-
//
|
|
57
|
+
// Link component
|
|
58
58
|
export { Link, link, navLink, externalLink } from './lib/components/link.js';
|
|
59
|
-
//
|
|
60
|
-
export {
|
|
59
|
+
// Layer component
|
|
60
|
+
export { layer, overlay } from './lib/components/layer.js';
|
|
61
61
|
/**
|
|
62
62
|
* JUX Namespace - Main API
|
|
63
63
|
*/
|
|
@@ -109,7 +109,6 @@ export const jux = {
|
|
|
109
109
|
themeToggle,
|
|
110
110
|
tooltip,
|
|
111
111
|
write,
|
|
112
|
-
// ✅ Stack components
|
|
113
112
|
vstack,
|
|
114
113
|
hstack,
|
|
115
114
|
zstack,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animation Modifiers Extension
|
|
3
|
+
*
|
|
4
|
+
* Provides animation and transition control for all components.
|
|
5
|
+
* This is the ONLY feature-oriented modifier we use at this phase.
|
|
6
|
+
*
|
|
7
|
+
* Automatically applied to BaseComponent - all components have these methods.
|
|
8
|
+
*/
|
|
9
|
+
import type { BaseComponent } from './BaseComponent.js';
|
|
10
|
+
export interface Animations {
|
|
11
|
+
transform(value: string): this;
|
|
12
|
+
transformOrigin(value: string): this;
|
|
13
|
+
rotate(degrees: number): this;
|
|
14
|
+
rotateX(degrees: number): this;
|
|
15
|
+
rotateY(degrees: number): this;
|
|
16
|
+
rotateZ(degrees: number): this;
|
|
17
|
+
scale(value: number): this;
|
|
18
|
+
scaleX(value: number): this;
|
|
19
|
+
scaleY(value: number): this;
|
|
20
|
+
translateX(value: string): this;
|
|
21
|
+
translateY(value: string): this;
|
|
22
|
+
translate(x: string, y: string): this;
|
|
23
|
+
flipX(): this;
|
|
24
|
+
flipY(): this;
|
|
25
|
+
flipBoth(): this;
|
|
26
|
+
transition(value: string): this;
|
|
27
|
+
transitionDuration(value: string): this;
|
|
28
|
+
transitionDelay(value: string): this;
|
|
29
|
+
animation(value: string): this;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Apply animation extensions to a component instance
|
|
33
|
+
* Called automatically in BaseComponent constructor
|
|
34
|
+
*/
|
|
35
|
+
export declare function applyAnimations<T extends BaseComponent<any>>(component: T): T & Animations;
|
|
36
|
+
//# sourceMappingURL=Animations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Animations.d.ts","sourceRoot":"","sources":["Animations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,WAAW,UAAU;IAEvB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,KAAK,IAAI,IAAI,CAAC;IACd,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,IAAI,IAAI,CAAC;IAGjB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAsCD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,GAAG,UAAU,CAmC1F"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animation Modifiers Extension
|
|
3
|
+
*
|
|
4
|
+
* Provides animation and transition control for all components.
|
|
5
|
+
* This is the ONLY feature-oriented modifier we use at this phase.
|
|
6
|
+
*
|
|
7
|
+
* Automatically applied to BaseComponent - all components have these methods.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Helper to add inline style
|
|
11
|
+
*/
|
|
12
|
+
function addInlineStyle(component, property, value) {
|
|
13
|
+
const currentStyle = component.state.style || '';
|
|
14
|
+
// Parse existing styles into a map
|
|
15
|
+
const styleMap = new Map();
|
|
16
|
+
currentStyle.split(';').forEach((style) => {
|
|
17
|
+
const trimmed = style.trim();
|
|
18
|
+
if (!trimmed)
|
|
19
|
+
return;
|
|
20
|
+
const colonIndex = trimmed.indexOf(':');
|
|
21
|
+
if (colonIndex === -1)
|
|
22
|
+
return;
|
|
23
|
+
const prop = trimmed.substring(0, colonIndex).trim();
|
|
24
|
+
const val = trimmed.substring(colonIndex + 1).trim();
|
|
25
|
+
if (prop && val) {
|
|
26
|
+
styleMap.set(prop, val);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
// Update or add the new property
|
|
30
|
+
styleMap.set(property, value);
|
|
31
|
+
// Rebuild style string
|
|
32
|
+
const styles = [];
|
|
33
|
+
styleMap.forEach((val, prop) => {
|
|
34
|
+
styles.push(`${prop}: ${val}`);
|
|
35
|
+
});
|
|
36
|
+
component.state.style = styles.join('; ');
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Apply animation extensions to a component instance
|
|
40
|
+
* Called automatically in BaseComponent constructor
|
|
41
|
+
*/
|
|
42
|
+
export function applyAnimations(component) {
|
|
43
|
+
const ext = component;
|
|
44
|
+
// Transform
|
|
45
|
+
ext.transform = (v) => { addInlineStyle(component, 'transform', v); return ext; };
|
|
46
|
+
ext.transformOrigin = (v) => { addInlineStyle(component, 'transform-origin', v); return ext; };
|
|
47
|
+
// Rotation (all axes)
|
|
48
|
+
ext.rotate = (deg) => { addInlineStyle(component, 'transform', `rotate(${deg}deg)`); return ext; };
|
|
49
|
+
ext.rotateX = (deg) => { addInlineStyle(component, 'transform', `rotateX(${deg}deg)`); return ext; };
|
|
50
|
+
ext.rotateY = (deg) => { addInlineStyle(component, 'transform', `rotateY(${deg}deg)`); return ext; };
|
|
51
|
+
ext.rotateZ = (deg) => { addInlineStyle(component, 'transform', `rotateZ(${deg}deg)`); return ext; };
|
|
52
|
+
// Scale (all axes)
|
|
53
|
+
ext.scale = (v) => { addInlineStyle(component, 'transform', `scale(${v})`); return ext; };
|
|
54
|
+
ext.scaleX = (v) => { addInlineStyle(component, 'transform', `scaleX(${v})`); return ext; };
|
|
55
|
+
ext.scaleY = (v) => { addInlineStyle(component, 'transform', `scaleY(${v})`); return ext; };
|
|
56
|
+
// Translate
|
|
57
|
+
ext.translateX = (v) => { addInlineStyle(component, 'transform', `translateX(${v})`); return ext; };
|
|
58
|
+
ext.translateY = (v) => { addInlineStyle(component, 'transform', `translateY(${v})`); return ext; };
|
|
59
|
+
ext.translate = (x, y) => { addInlineStyle(component, 'transform', `translate(${x}, ${y})`); return ext; };
|
|
60
|
+
// Flip (mirror) transforms
|
|
61
|
+
ext.flipX = () => { addInlineStyle(component, 'transform', 'scaleX(-1)'); return ext; };
|
|
62
|
+
ext.flipY = () => { addInlineStyle(component, 'transform', 'scaleY(-1)'); return ext; };
|
|
63
|
+
ext.flipBoth = () => { addInlineStyle(component, 'transform', 'scale(-1, -1)'); return ext; };
|
|
64
|
+
// Transition & Animation
|
|
65
|
+
ext.transition = (v) => { addInlineStyle(component, 'transition', v); return ext; };
|
|
66
|
+
ext.transitionDuration = (v) => { addInlineStyle(component, 'transition-duration', v); return ext; };
|
|
67
|
+
ext.transitionDelay = (v) => { addInlineStyle(component, 'transition-delay', v); return ext; };
|
|
68
|
+
ext.animation = (v) => { addInlineStyle(component, 'animation', v); return ext; };
|
|
69
|
+
return ext;
|
|
70
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animation Modifiers Extension
|
|
3
|
+
*
|
|
4
|
+
* Provides animation and transition control for all components.
|
|
5
|
+
* This is the ONLY feature-oriented modifier we use at this phase.
|
|
6
|
+
*
|
|
7
|
+
* Automatically applied to BaseComponent - all components have these methods.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { BaseComponent } from './BaseComponent.js';
|
|
11
|
+
|
|
12
|
+
export interface Animations {
|
|
13
|
+
// Transform (for animations)
|
|
14
|
+
transform(value: string): this;
|
|
15
|
+
transformOrigin(value: string): this;
|
|
16
|
+
rotate(degrees: number): this;
|
|
17
|
+
rotateX(degrees: number): this;
|
|
18
|
+
rotateY(degrees: number): this;
|
|
19
|
+
rotateZ(degrees: number): this;
|
|
20
|
+
scale(value: number): this;
|
|
21
|
+
scaleX(value: number): this;
|
|
22
|
+
scaleY(value: number): this;
|
|
23
|
+
translateX(value: string): this;
|
|
24
|
+
translateY(value: string): this;
|
|
25
|
+
translate(x: string, y: string): this;
|
|
26
|
+
flipX(): this;
|
|
27
|
+
flipY(): this;
|
|
28
|
+
flipBoth(): this;
|
|
29
|
+
|
|
30
|
+
// Transition & Animation
|
|
31
|
+
transition(value: string): this;
|
|
32
|
+
transitionDuration(value: string): this;
|
|
33
|
+
transitionDelay(value: string): this;
|
|
34
|
+
animation(value: string): this;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Helper to add inline style
|
|
39
|
+
*/
|
|
40
|
+
function addInlineStyle(component: BaseComponent<any>, property: string, value: string): void {
|
|
41
|
+
const currentStyle = component.state.style || '';
|
|
42
|
+
|
|
43
|
+
// Parse existing styles into a map
|
|
44
|
+
const styleMap = new Map<string, string>();
|
|
45
|
+
|
|
46
|
+
currentStyle.split(';').forEach((style: string) => {
|
|
47
|
+
const trimmed = style.trim();
|
|
48
|
+
if (!trimmed) return;
|
|
49
|
+
|
|
50
|
+
const colonIndex = trimmed.indexOf(':');
|
|
51
|
+
if (colonIndex === -1) return;
|
|
52
|
+
|
|
53
|
+
const prop = trimmed.substring(0, colonIndex).trim();
|
|
54
|
+
const val = trimmed.substring(colonIndex + 1).trim();
|
|
55
|
+
|
|
56
|
+
if (prop && val) {
|
|
57
|
+
styleMap.set(prop, val);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Update or add the new property
|
|
62
|
+
styleMap.set(property, value);
|
|
63
|
+
|
|
64
|
+
// Rebuild style string
|
|
65
|
+
const styles: string[] = [];
|
|
66
|
+
styleMap.forEach((val, prop) => {
|
|
67
|
+
styles.push(`${prop}: ${val}`);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
component.state.style = styles.join('; ');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Apply animation extensions to a component instance
|
|
75
|
+
* Called automatically in BaseComponent constructor
|
|
76
|
+
*/
|
|
77
|
+
export function applyAnimations<T extends BaseComponent<any>>(component: T): T & Animations {
|
|
78
|
+
const ext = component as T & Animations;
|
|
79
|
+
|
|
80
|
+
// Transform
|
|
81
|
+
ext.transform = (v) => { addInlineStyle(component, 'transform', v); return ext; };
|
|
82
|
+
ext.transformOrigin = (v) => { addInlineStyle(component, 'transform-origin', v); return ext; };
|
|
83
|
+
|
|
84
|
+
// Rotation (all axes)
|
|
85
|
+
ext.rotate = (deg) => { addInlineStyle(component, 'transform', `rotate(${deg}deg)`); return ext; };
|
|
86
|
+
ext.rotateX = (deg) => { addInlineStyle(component, 'transform', `rotateX(${deg}deg)`); return ext; };
|
|
87
|
+
ext.rotateY = (deg) => { addInlineStyle(component, 'transform', `rotateY(${deg}deg)`); return ext; };
|
|
88
|
+
ext.rotateZ = (deg) => { addInlineStyle(component, 'transform', `rotateZ(${deg}deg)`); return ext; };
|
|
89
|
+
|
|
90
|
+
// Scale (all axes)
|
|
91
|
+
ext.scale = (v) => { addInlineStyle(component, 'transform', `scale(${v})`); return ext; };
|
|
92
|
+
ext.scaleX = (v) => { addInlineStyle(component, 'transform', `scaleX(${v})`); return ext; };
|
|
93
|
+
ext.scaleY = (v) => { addInlineStyle(component, 'transform', `scaleY(${v})`); return ext; };
|
|
94
|
+
|
|
95
|
+
// Translate
|
|
96
|
+
ext.translateX = (v) => { addInlineStyle(component, 'transform', `translateX(${v})`); return ext; };
|
|
97
|
+
ext.translateY = (v) => { addInlineStyle(component, 'transform', `translateY(${v})`); return ext; };
|
|
98
|
+
ext.translate = (x, y) => { addInlineStyle(component, 'transform', `translate(${x}, ${y})`); return ext; };
|
|
99
|
+
|
|
100
|
+
// Flip (mirror) transforms
|
|
101
|
+
ext.flipX = () => { addInlineStyle(component, 'transform', 'scaleX(-1)'); return ext; };
|
|
102
|
+
ext.flipY = () => { addInlineStyle(component, 'transform', 'scaleY(-1)'); return ext; };
|
|
103
|
+
ext.flipBoth = () => { addInlineStyle(component, 'transform', 'scale(-1, -1)'); return ext; };
|
|
104
|
+
|
|
105
|
+
// Transition & Animation
|
|
106
|
+
ext.transition = (v) => { addInlineStyle(component, 'transition', v); return ext; };
|
|
107
|
+
ext.transitionDuration = (v) => { addInlineStyle(component, 'transition-duration', v); return ext; };
|
|
108
|
+
ext.transitionDelay = (v) => { addInlineStyle(component, 'transition-delay', v); return ext; };
|
|
109
|
+
ext.animation = (v) => { addInlineStyle(component, 'animation', v); return ext; };
|
|
110
|
+
|
|
111
|
+
return ext;
|
|
112
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { State } from '../../reactivity/state.js';
|
|
2
|
+
import { Animations } from './Animations.js';
|
|
2
3
|
/**
|
|
3
4
|
* Base state interface that ALL component states must extend
|
|
4
5
|
*/
|
|
@@ -224,4 +225,6 @@ export declare abstract class BaseComponent<TState extends BaseState = BaseState
|
|
|
224
225
|
*/
|
|
225
226
|
protected _wireFormSync(inputElement: HTMLElement, eventName?: string): void;
|
|
226
227
|
}
|
|
228
|
+
export interface BaseComponent extends Animations {
|
|
229
|
+
}
|
|
227
230
|
//# sourceMappingURL=BaseComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseComponent.d.ts","sourceRoot":"","sources":["BaseComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseComponent.d.ts","sourceRoot":"","sources":["BaseComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAA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History } from '../history/StateHistory.js';
|
|
4
|
-
import { formatIdAsLabel } from '../../utils/formatId.js';
|
|
5
|
-
import {
|
|
4
|
+
import { formatIdAsLabel } from '../../utils/formatId.js';
|
|
5
|
+
import { applyAnimations } from './Animations.js'; // ✅ Import Animations
|
|
6
6
|
/**
|
|
7
7
|
* Abstract base class for all JUX components
|
|
8
8
|
* Provides common storage, event routing, and lifecycle methods
|
|
@@ -42,12 +42,9 @@ export class BaseComponent {
|
|
|
42
42
|
const key = prop;
|
|
43
43
|
const oldValue = target[key];
|
|
44
44
|
if (oldValue !== value) {
|
|
45
|
-
// ✅ Record state change in history
|
|
46
45
|
stateHistory.recordStateChange(this._id, prop, oldValue, value);
|
|
47
46
|
target[key] = value;
|
|
48
|
-
// 1️⃣ Update DOM via update()
|
|
49
47
|
this.update(prop, value);
|
|
50
|
-
// 2️⃣ Notify synced State<T> objects (with guard)
|
|
51
48
|
if (!this._isUpdatingSync) {
|
|
52
49
|
this._notifySyncedState(prop, value);
|
|
53
50
|
}
|
|
@@ -55,8 +52,8 @@ export class BaseComponent {
|
|
|
55
52
|
return true;
|
|
56
53
|
}
|
|
57
54
|
});
|
|
58
|
-
// ✅
|
|
59
|
-
|
|
55
|
+
// ✅ Apply ONLY animation extensions
|
|
56
|
+
applyAnimations(this);
|
|
60
57
|
}
|
|
61
58
|
/**
|
|
62
59
|
* REACTIVE UPDATE HOOK (PUBLIC, CONCRETE)
|
|
@@ -637,4 +634,3 @@ export class BaseComponent {
|
|
|
637
634
|
});
|
|
638
635
|
}
|
|
639
636
|
}
|
|
640
|
-
// ...precision layout modifiers...
|
|
@@ -2,8 +2,8 @@ import { State } from '../../reactivity/state.js';
|
|
|
2
2
|
import { getOrCreateContainer } from '../helpers.js';
|
|
3
3
|
import { registry } from '../registry.js';
|
|
4
4
|
import { stateHistory } from '../history/StateHistory.js';
|
|
5
|
-
import { formatIdAsLabel } from '../../utils/formatId.js';
|
|
6
|
-
import {
|
|
5
|
+
import { formatIdAsLabel } from '../../utils/formatId.js';
|
|
6
|
+
import { applyAnimations, Animations } from './Animations.js'; // ✅ Import Animations
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Base state interface that ALL component states must extend
|
|
@@ -77,15 +77,10 @@ export abstract class BaseComponent<TState extends BaseState = BaseState> {
|
|
|
77
77
|
const oldValue = target[key];
|
|
78
78
|
|
|
79
79
|
if (oldValue !== value) {
|
|
80
|
-
// ✅ Record state change in history
|
|
81
80
|
stateHistory.recordStateChange(this._id, prop as string, oldValue, value);
|
|
82
|
-
|
|
83
81
|
target[key] = value;
|
|
84
|
-
|
|
85
|
-
// 1️⃣ Update DOM via update()
|
|
86
82
|
this.update(prop as string, value);
|
|
87
83
|
|
|
88
|
-
// 2️⃣ Notify synced State<T> objects (with guard)
|
|
89
84
|
if (!this._isUpdatingSync) {
|
|
90
85
|
this._notifySyncedState(prop as string, value);
|
|
91
86
|
}
|
|
@@ -94,8 +89,8 @@ export abstract class BaseComponent<TState extends BaseState = BaseState> {
|
|
|
94
89
|
}
|
|
95
90
|
});
|
|
96
91
|
|
|
97
|
-
// ✅
|
|
98
|
-
|
|
92
|
+
// ✅ Apply ONLY animation extensions
|
|
93
|
+
applyAnimations(this);
|
|
99
94
|
}
|
|
100
95
|
|
|
101
96
|
/* ═════════════════════════════════════════════════════════════════
|
|
@@ -769,4 +764,5 @@ export abstract class BaseComponent<TState extends BaseState = BaseState> {
|
|
|
769
764
|
}
|
|
770
765
|
}
|
|
771
766
|
|
|
772
|
-
//
|
|
767
|
+
// ✅ Type assertion for Animations (all components have animation methods)
|
|
768
|
+
export interface BaseComponent extends Animations {}
|
|
@@ -1,81 +1,65 @@
|
|
|
1
1
|
import { BaseComponent, BaseState } from '../base/BaseComponent.js';
|
|
2
|
-
import { LayoutExtensions } from '../base/LayoutExtensions.js';
|
|
3
|
-
export interface StackOptions {
|
|
4
|
-
spacing?: 'none' | 'tight' | 'normal' | 'loose';
|
|
5
|
-
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
6
|
-
justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
7
|
-
divider?: boolean;
|
|
8
|
-
responsive?: boolean;
|
|
9
|
-
}
|
|
10
2
|
export interface StackState extends BaseState {
|
|
11
|
-
spacing:
|
|
12
|
-
align:
|
|
13
|
-
justify:
|
|
3
|
+
spacing: 'none' | 'tight' | 'normal' | 'loose';
|
|
4
|
+
align: 'start' | 'center' | 'end' | 'stretch';
|
|
5
|
+
justify: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
14
6
|
divider: boolean;
|
|
15
7
|
responsive: boolean;
|
|
16
8
|
}
|
|
17
9
|
export declare abstract class BaseStack extends BaseComponent<StackState> {
|
|
18
|
-
protected children: Record<string, any> | any[];
|
|
19
10
|
protected abstract baseClassName: string;
|
|
20
11
|
protected _container: HTMLElement | null;
|
|
12
|
+
protected _children: any[];
|
|
21
13
|
protected _childStyleFunction: ((index: number) => string) | null;
|
|
22
|
-
|
|
14
|
+
protected _autoRendered: boolean;
|
|
15
|
+
constructor(id: string);
|
|
23
16
|
protected getTriggerEvents(): readonly string[];
|
|
24
17
|
protected getCallbackEvents(): readonly string[];
|
|
18
|
+
/**
|
|
19
|
+
* Set all children at once (replaces existing)
|
|
20
|
+
*/
|
|
21
|
+
items(children: any[]): this;
|
|
22
|
+
/**
|
|
23
|
+
* Add children to the end
|
|
24
|
+
*/
|
|
25
|
+
addItems(...children: any[]): this;
|
|
26
|
+
/**
|
|
27
|
+
* Add a single child
|
|
28
|
+
*/
|
|
29
|
+
addItem(child: any): this;
|
|
30
|
+
/**
|
|
31
|
+
* Replace child at index
|
|
32
|
+
*/
|
|
33
|
+
replaceItem(index: number, child: any): this;
|
|
34
|
+
/**
|
|
35
|
+
* Remove child at index
|
|
36
|
+
*/
|
|
37
|
+
removeItem(index: number): this;
|
|
38
|
+
/**
|
|
39
|
+
* Remove all children
|
|
40
|
+
*/
|
|
41
|
+
clearItems(): this;
|
|
42
|
+
/**
|
|
43
|
+
* Get current children array (read-only)
|
|
44
|
+
*/
|
|
45
|
+
getItems(): readonly any[];
|
|
25
46
|
spacing(value: 'none' | 'tight' | 'normal' | 'loose'): this;
|
|
26
47
|
align(value: 'start' | 'center' | 'end' | 'stretch'): this;
|
|
27
48
|
justify(value: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'): this;
|
|
28
|
-
divider(value
|
|
29
|
-
responsive(value
|
|
49
|
+
divider(value?: boolean): this;
|
|
50
|
+
responsive(value?: boolean): this;
|
|
30
51
|
childStyle(fn: (index: number) => string): this;
|
|
31
52
|
protected getChildStyle(index: number): string;
|
|
32
53
|
fade(topOpacity?: number, step?: number): this;
|
|
33
54
|
cascade(offset?: number, direction?: 'horizontal' | 'vertical' | 'both'): this;
|
|
34
55
|
scaleProgressive(topScale?: number, step?: number): this;
|
|
35
|
-
fadeIn(): this;
|
|
36
|
-
slideIn(direction?: 'up' | 'down' | 'left' | 'right'): this;
|
|
37
|
-
scaleIn(): this;
|
|
38
|
-
zoomIn(): this;
|
|
39
|
-
rotateIn(): this;
|
|
40
|
-
flipIn(axis?: 'x' | 'y'): this;
|
|
41
|
-
bounceIn(): this;
|
|
42
|
-
elasticIn(): this;
|
|
43
|
-
blurIn(): this;
|
|
44
|
-
glow(): this;
|
|
45
|
-
fadeInItems(): this;
|
|
46
|
-
slideInItems(direction?: 'up' | 'down' | 'left' | 'right'): this;
|
|
47
|
-
scaleInItems(): this;
|
|
48
|
-
zoomInItems(): this;
|
|
49
|
-
rotateInItems(): this;
|
|
50
|
-
flipInItems(axis?: 'x' | 'y'): this;
|
|
51
|
-
bounceInItems(): this;
|
|
52
|
-
elasticInItems(): this;
|
|
53
|
-
blurInItems(): this;
|
|
54
|
-
glowItems(): this;
|
|
55
|
-
instant(): this;
|
|
56
|
-
fast(): this;
|
|
57
|
-
normal(): this;
|
|
58
|
-
slow(): this;
|
|
59
|
-
slower(): this;
|
|
60
|
-
linear(): this;
|
|
61
|
-
ease(): this;
|
|
62
|
-
easeIn(): this;
|
|
63
|
-
easeOut(): this;
|
|
64
|
-
easeInOut(): this;
|
|
65
|
-
bounceTiming(): this;
|
|
66
|
-
elasticTiming(): this;
|
|
67
|
-
delay(ms: 100 | 200 | 300 | 500 | 1000): this;
|
|
68
|
-
staggered(): this;
|
|
69
|
-
stagger(delayMs?: number): this;
|
|
70
|
-
interactive(): this;
|
|
71
|
-
smooth(): this;
|
|
72
|
-
smoothItems(): this;
|
|
73
|
-
animateStagger(animation?: 'fade' | 'slide' | 'scale' | 'bounce', direction?: 'up' | 'down' | 'left' | 'right'): this;
|
|
74
56
|
protected buildClasses(): string;
|
|
75
57
|
protected renderChild(child: any, index: number): HTMLElement;
|
|
58
|
+
/**
|
|
59
|
+
* Refresh children when items change
|
|
60
|
+
*/
|
|
61
|
+
protected _refreshChildren(): void;
|
|
76
62
|
render(targetId?: string | HTMLElement | BaseComponent<any>): this;
|
|
77
63
|
update(prop: string, value: any): void;
|
|
78
64
|
}
|
|
79
|
-
export interface BaseStack extends LayoutExtensions {
|
|
80
|
-
}
|
|
81
65
|
//# sourceMappingURL=BaseStack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseStack.d.ts","sourceRoot":"","sources":["BaseStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseStack.d.ts","sourceRoot":"","sources":["BaseStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAKpE,MAAM,WAAW,UAAW,SAAQ,SAAS;IACzC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC/C,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IAC9C,OAAO,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,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